This is an automated email from the ASF dual-hosted git repository.

gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit a0488a31b37cd3fab331899d77aafa784b46e3ae
Author: Abdelatif Guettouche <[email protected]>
AuthorDate: Wed Sep 29 18:59:10 2021 +0200

    boards/esp32: Strongly declare libgcc symbols that exist in the ROM
    linker script, so that we can link them instead of those present in
    libgcc.a
    
    Signed-off-by: Abdelatif Guettouche <[email protected]>
---
 boards/xtensa/esp32/common/scripts/esp32_rom.ld | 184 ++++++++++++------------
 1 file changed, 93 insertions(+), 91 deletions(-)

diff --git a/boards/xtensa/esp32/common/scripts/esp32_rom.ld 
b/boards/xtensa/esp32/common/scripts/esp32_rom.ld
index 6088eeb..a6755fa 100644
--- a/boards/xtensa/esp32/common/scripts/esp32_rom.ld
+++ b/boards/xtensa/esp32/common/scripts/esp32_rom.ld
@@ -4,19 +4,106 @@ Generated for ROM with MD5sum:
 ab8282ae908fe9e7a63fb2a4ac2df013  ../../rom_image/prorom.elf
 */
 
+/* Unlike other ROM functions which are exported using PROVIDE, which declares
+ * weak symbols, these libgcc functions are exported using assignment,
+ * which declares strong symbols. This is done so that ROM functions are always
+ * used instead of the ones provided by libgcc.a.
+ */
+
+__absvdi2 = 0x4006387c;
+__absvsi2 = 0x40063868;
+__adddf3 = 0x40002590;
+__addsf3 = 0x400020e8;
+__addvdi3 = 0x40002cbc;
+__addvsi3 = 0x40002c98;
+__ashldi3 = 0x4000c818;
+__ashrdi3 = 0x4000c830;
+__bswapdi2 = 0x40064b08;
+__bswapsi2 = 0x40064ae0;
+__clrsbdi2 = 0x40064b7c;
+__clrsbsi2 = 0x40064b64;
+__clzdi2 = 0x4000ca50;
+__clzsi2 = 0x4000c7e8;
+__cmpdi2 = 0x40063820;
+__ctzdi2 = 0x4000ca64;
+__ctzsi2 = 0x4000c7f0;
+__divdc3 = 0x400645a4;
+__divdf3 = 0x40002954;
+__divdi3 = 0x4000ca84;
+__divsi3 = 0x4000c7b8;
+__eqdf2 = 0x400636a8;
+__eqsf2 = 0x40063374;
+__extendsfdf2 = 0x40002c34;
+__fixdfdi = 0x40002ac4;
+__fixdfsi = 0x40002a78;
+__fixsfdi = 0x4000244c;
+__fixsfsi = 0x4000240c;
+__fixunsdfsi = 0x40002b30;
+__fixunssfdi = 0x40002504;
+__fixunssfsi = 0x400024ac;
+__floatdidf = 0x4000c988;
+__floatdisf = 0x4000c8c0;
+__floatsidf = 0x4000c944;
+__floatsisf = 0x4000c870;
+__floatundidf = 0x4000c978;
+__floatundisf = 0x4000c8b0;
+__floatunsidf = 0x4000c938;
+__floatunsisf = 0x4000c864;
+__gcc_bcmp = 0x40064a70;
+__gedf2 = 0x40063768;
+__gesf2 = 0x4006340c;
+__gtdf2 = 0x400636dc;
+__gtsf2 = 0x400633a0;
+__ledf2 = 0x40063704;
+__lesf2 = 0x400633c0;
+__lshrdi3 = 0x4000c84c;
+__ltdf2 = 0x40063790;
+__ltsf2 = 0x4006342c;
+__moddi3 = 0x4000cd4c;
+__modsi3 = 0x4000c7c0;
+__muldc3 = 0x40063c90;
+__muldf3 = 0x4006358c;
+__muldi3 = 0x4000c9fc;
+__mulsf3 = 0x400632c8;
+__mulsi3 = 0x4000c7b0;
+__mulvdi3 = 0x40002d78;
+__mulvsi3 = 0x40002d60;
+__nedf2 = 0x400636a8;
+__negdf2 = 0x400634a0;
+__negdi2 = 0x4000ca14;
+__negsf2 = 0x400020c0;
+__negvdi2 = 0x40002e98;
+__negvsi2 = 0x40002e78;
+__nesf2 = 0x40063374;
+__nsau_data = 0x3ff96544;
+__paritysi2 = 0x40002f3c;
+__popcount_tab = 0x3ff96544;
+__popcountdi2 = 0x40002ef8;
+__popcountsi2 = 0x40002ed0;
+__powidf2 = 0x400638e4;
+__subdf3 = 0x400026e4;
+__subsf3 = 0x400021d0;
+__subvdi3 = 0x40002d20;
+__subvsi3 = 0x40002cf8;
+__truncdfsf2 = 0x40002b90;
+__ucmpdi2 = 0x40063840;
+__udiv_w_sdiv = 0x40064bec;
+__udivdi3 = 0x4000cff8;
+__udivmoddi4 = 0x40064bf4;
+__udivsi3 = 0x4000c7c8;
+__umoddi3 = 0x4000d280;
+__umodsi3 = 0x4000c7d0;
+__umulsidi3 = 0x4000c7d8;
+__unorddf2 = 0x400637f4;
+__unordsf2 = 0x40063478;
+
 PROVIDE ( abort = 0x4000bba4 );
 PROVIDE ( abs = 0x40056340 );
-PROVIDE ( __absvdi2 = 0x4006387c );
-PROVIDE ( __absvsi2 = 0x40063868 );
 PROVIDE ( Add2SelfBigHex256 = 0x40015b7c );
 PROVIDE ( AddBigHex256 = 0x40015b28 );
 PROVIDE ( AddBigHexModP256 = 0x40015c98 );
-PROVIDE ( __adddf3 = 0x40002590 );
 PROVIDE ( AddP256 = 0x40015c74 );
 PROVIDE ( AddPdiv2_256 = 0x40015ce0 );
-PROVIDE ( __addsf3 = 0x400020e8 );
-PROVIDE ( __addvdi3 = 0x40002cbc );
-PROVIDE ( __addvsi3 = 0x40002c98 );
 PROVIDE ( aes_128_cbc_decrypt = 0x4005cc7c );
 PROVIDE ( aes_128_cbc_encrypt = 0x4005cc18 );
 PROVIDE ( aes_unwrap = 0x4005ccf0 );
@@ -25,8 +112,6 @@ PROVIDE ( app_gpio_handler = 0x3ffe0040 );
 PROVIDE ( __ascii_wctomb = 0x40058ef0 );
 PROVIDE ( asctime = 0x40059588 );
 PROVIDE ( asctime_r = 0x40000ec8 );
-PROVIDE ( __ashldi3 = 0x4000c818 );
-PROVIDE ( __ashrdi3 = 0x4000c830 );
 PROVIDE ( asiprintf = 0x40056d9c );
 PROVIDE ( _asiprintf_r = 0x40056d4c );
 PROVIDE ( asniprintf = 0x40056cd8 );
@@ -45,8 +130,6 @@ PROVIDE ( BasePoint_x_256 = 0x3ff97488 );
 PROVIDE ( BasePoint_y_256 = 0x3ff97468 );
 PROVIDE ( bigHexInversion256 = 0x400168f0 );
 PROVIDE ( bigHexP256 = 0x3ff973bc );
-PROVIDE ( __bswapdi2 = 0x400649c4 );
-PROVIDE ( __bswapsi2 = 0x4006499c );
 PROVIDE ( btdm_r_ble_bt_handler_tab_p_get = 0x40019b0c );
 PROVIDE ( btdm_r_btdm_option_data_p_get = 0x40010004 );
 PROVIDE ( btdm_r_btdm_rom_version_get = 0x40010078 );
@@ -74,11 +157,6 @@ PROVIDE ( _cleanup_r = 0x40001d48 );
 PROVIDE ( __clear_cache = 0x40063860 );
 PROVIDE ( close = 0x40001778 );
 PROVIDE ( _close_r = 0x4000bd3c );
-PROVIDE ( __clrsbdi2 = 0x40064a38 );
-PROVIDE ( __clrsbsi2 = 0x40064a20 );
-PROVIDE ( __clzdi2 = 0x4000ca50 );
-PROVIDE ( __clzsi2 = 0x4000c7e8 );
-PROVIDE ( __cmpdi2 = 0x40063820 );
 PROVIDE ( co_default_bdaddr = 0x3ffae704 );
 PROVIDE ( co_null_bdaddr = 0x3ffb80e0 );
 PROVIDE ( co_sca2ppm = 0x3ff971e8 );
@@ -93,8 +171,6 @@ PROVIDE ( ctime = 0x400595b0 );
 PROVIDE ( ctime_r = 0x400595c4 );
 PROVIDE ( _ctype_ = 0x3ff96354 );
 PROVIDE ( __ctype_ptr__ = 0x3ff96350 );
-PROVIDE ( __ctzdi2 = 0x4000ca64 );
-PROVIDE ( __ctzsi2 = 0x4000c7f0 );
 PROVIDE ( _data_end = 0x4000d5c8 );
 PROVIDE ( _data_end_btdm_rom = 0x4000d4f8 );
 PROVIDE ( _data_start = 0x4000d4f8 );
@@ -129,12 +205,6 @@ PROVIDE ( dh_group2_prime = 0x3ff9ad22 );
 PROVIDE ( dh_group5_generator = 0x3ff9ad21 );
 PROVIDE ( dh_group5_prime = 0x3ff9ac61 );
 PROVIDE ( div = 0x40056348 );
-PROVIDE ( __divdc3 = 0x40064460 );
-PROVIDE ( __divdf3 = 0x40002954 );
-PROVIDE ( __divdi3 = 0x4000ca84 );
-PROVIDE ( __divsc3 = 0x40064200 );
-PROVIDE ( __divsf3 = 0x4000234c );
-PROVIDE ( __divsi3 = 0x4000c7b8 );
 PROVIDE ( _DoubleExceptionVector = 0x400003c0 );
 PROVIDE ( dummy_len_plus = 0x3ffae290 );
 PROVIDE ( __dummy_lock = 0x4000c728 );
@@ -145,8 +215,6 @@ PROVIDE ( em_buf_env = 0x3ffb8d74 );
 PROVIDE ( environ = 0x3ffae0b4 );
 PROVIDE ( __env_lock = 0x40001fd4 );
 PROVIDE ( __env_unlock = 0x40001fe0 );
-PROVIDE ( __eqdf2 = 0x400636a8 );
-PROVIDE ( __eqsf2 = 0x40063374 );
 PROVIDE ( esp_crc8 = 0x4005d144 );
 PROVIDE ( _etext = 0x4000d66c );
 PROVIDE ( ets_aes_crypt = 0x4005c9b8 );
@@ -223,13 +291,10 @@ PROVIDE ( ets_update_cpu_frequency = 0x40008550 );
 PROVIDE ( ets_waiti0 = 0x400067d8 );
 PROVIDE ( exc_cause_table = 0x3ff991d0 );
 PROVIDE ( _exit_r = 0x4000bd28 );
-PROVIDE ( __extendsfdf2 = 0x40002c34 );
 PROVIDE ( fclose = 0x400020ac );
 PROVIDE ( _fclose_r = 0x40001fec );
 PROVIDE ( fflush = 0x40059394 );
 PROVIDE ( _fflush_r = 0x40059320 );
-PROVIDE ( __ffsdi2 = 0x4000ca2c );
-PROVIDE ( __ffssi2 = 0x4000c804 );
 PROVIDE ( FilePacketSendDeflatedReqMsgProc = 0x40008b24 );
 PROVIDE ( FilePacketSendReqMsgProc = 0x40008860 );
 PROVIDE ( _findenv_r = 0x40001f44 );
@@ -237,26 +302,11 @@ PROVIDE ( fiprintf = 0x40056efc );
 PROVIDE ( _fiprintf_r = 0x40056ed8 );
 PROVIDE ( fiscanf = 0x40058884 );
 PROVIDE ( _fiscanf_r = 0x400588b4 );
-PROVIDE ( __fixdfdi = 0x40002ac4 );
-PROVIDE ( __fixdfsi = 0x40002a78 );
-PROVIDE ( __fixsfdi = 0x4000244c );
-PROVIDE ( __fixsfsi = 0x4000240c );
-PROVIDE ( __fixunsdfsi = 0x40002b30 );
-PROVIDE ( __fixunssfdi = 0x40002504 );
-PROVIDE ( __fixunssfsi = 0x400024ac );
 PROVIDE ( FlashDwnLdDeflatedStartMsgProc = 0x40008ad8 );
 PROVIDE ( FlashDwnLdParamCfgMsgProc = 0x4000891c );
 PROVIDE ( FlashDwnLdStartMsgProc = 0x40008820 );
 PROVIDE ( FlashDwnLdStopDeflatedReqMsgProc = 0x40008c18 );
 PROVIDE ( FlashDwnLdStopReqMsgProc = 0x400088ec );
-PROVIDE ( __floatdidf = 0x4000c988 );
-PROVIDE ( __floatdisf = 0x4000c8c0 );
-PROVIDE ( __floatsidf = 0x4000c944 );
-PROVIDE ( __floatsisf = 0x4000c870 );
-PROVIDE ( __floatundidf = 0x4000c978 );
-PROVIDE ( __floatundisf = 0x4000c8b0 );
-PROVIDE ( __floatunsidf = 0x4000c938 );
-PROVIDE ( __floatunsisf = 0x4000c864 );
 PROVIDE ( __fp_lock_all = 0x40001f1c );
 PROVIDE ( fprintf = 0x40056efc );
 PROVIDE ( _fprintf_r = 0x40056ed8 );
@@ -271,10 +321,7 @@ PROVIDE ( _fscanf_r = 0x400588b4 );
 PROVIDE ( _fstat_r = 0x4000bccc );
 PROVIDE ( _fwalk = 0x4000c738 );
 PROVIDE ( _fwalk_reent = 0x4000c770 );
-PROVIDE ( __gcc_bcmp = 0x40064a70 );
-PROVIDE ( __gedf2 = 0x40063768 );
 PROVIDE ( _GeneralException = 0x40000e14 );
-PROVIDE ( __gesf2 = 0x4006340c );
 PROVIDE ( __get_current_time_locale = 0x40001834 );
 PROVIDE ( _getenv_r = 0x40001fbc );
 PROVIDE ( _getpid_r = 0x4000bcfc );
@@ -314,8 +361,6 @@ PROVIDE ( gpio_pin_wakeup_disable = 0x40009eb0 );
 PROVIDE ( gpio_pin_wakeup_enable = 0x40009e7c );
 PROVIDE ( gpio_register_get = 0x40009cbc );
 PROVIDE ( gpio_register_set = 0x40009bbc );
-PROVIDE ( __gtdf2 = 0x400636dc );
-PROVIDE ( __gtsf2 = 0x400633a0 );
 PROVIDE ( gTxMsg = 0x3ffe0050 );
 PROVIDE ( hci_cmd_desc_root_tab = 0x3ff976d4 );
 PROVIDE ( hci_cmd_desc_tab_ctrl_bb = 0x3ff97b70 );
@@ -383,8 +428,6 @@ PROVIDE ( ldiv = 0x40056378 );
 PROVIDE ( ld_pcm_settings_dft = 0x3ff98a0c );
 PROVIDE ( ld_sched_params = 0x3ffb96c0 );
 PROVIDE ( ld_sync_train_channels = 0x3ff98a3c );
-PROVIDE ( __ledf2 = 0x40063704 );
-PROVIDE ( __lesf2 = 0x400633c0 );
 PROVIDE ( _xtensa_level2_from = 0x40000954 );
 PROVIDE ( _xtensa_level2_vector = 0x40000180 );
 PROVIDE ( _xtensa_level3_from = 0x40000a28 );
@@ -449,9 +492,6 @@ PROVIDE ( _lock_try_acquire = 0x4000be3c );
 PROVIDE ( _lock_try_acquire_recursive = 0x4000be50 );
 PROVIDE ( longjmp = 0x400562cc );
 PROVIDE ( _lseek_r = 0x4000bd8c );
-PROVIDE ( __lshrdi3 = 0x4000c84c );
-PROVIDE ( __ltdf2 = 0x40063790 );
-PROVIDE ( __ltsf2 = 0x4006342c );
 PROVIDE ( malloc = 0x4000bea0 );
 PROVIDE ( _malloc_r = 0x4000bbb4 );
 PROVIDE ( maxSecretKey_256 = 0x3ff97448 );
@@ -472,44 +512,21 @@ PROVIDE ( memrchr = 0x4000c400 );
 PROVIDE ( memset = 0x4000c44c );
 PROVIDE ( mktime = 0x4005a5e8 );
 PROVIDE ( mmu_init = 0x400095a4 );
-PROVIDE ( __moddi3 = 0x4000cd4c );
-PROVIDE ( __modsi3 = 0x4000c7c0 );
 PROVIDE ( __month_lengths = 0x3ff9609c );
-PROVIDE ( __muldc3 = 0x40063bf4 );
-PROVIDE ( __muldf3 = 0x4006358c );
-PROVIDE ( __muldi3 = 0x4000c9fc );
-PROVIDE ( __mulsc3 = 0x40063934 );
-PROVIDE ( __mulsf3 = 0x400632c8 );
-PROVIDE ( __mulsi3 = 0x4000c7b0 );
 PROVIDE ( MultiplyBigHexByUint32_256 = 0x40016214 );
 PROVIDE ( MultiplyBigHexModP256 = 0x400160b8 );
 PROVIDE ( MultiplyByU32ModP256 = 0x40015fdc );
 PROVIDE ( multofup = 0x4000ab8c );
-PROVIDE ( __mulvdi3 = 0x40002d78 );
-PROVIDE ( __mulvsi3 = 0x40002d60 );
 PROVIDE ( mz_adler32 = 0x4005edbc );
 PROVIDE ( mz_crc32 = 0x4005ee88 );
 PROVIDE ( mz_free = 0x4005eed4 );
-PROVIDE ( __nedf2 = 0x400636a8 );
-PROVIDE ( __negdf2 = 0x400634a0 );
-PROVIDE ( __negdi2 = 0x4000ca14 );
-PROVIDE ( __negsf2 = 0x400020c0 );
-PROVIDE ( __negvdi2 = 0x40002e98 );
-PROVIDE ( __negvsi2 = 0x40002e78 );
-PROVIDE ( __nesf2 = 0x40063374 );
 PROVIDE ( _NMIExceptionVector = 0x400002c0 );
 PROVIDE ( notEqual256 = 0x40015b04 );
-PROVIDE ( __nsau_data = 0x3ff96544 );
 PROVIDE ( one_bits = 0x3ff971f8 );
 PROVIDE ( open = 0x4000178c );
 PROVIDE ( _open_r = 0x4000bd54 );
-PROVIDE ( __paritysi2 = 0x40002f3c );
 PROVIDE ( pbkdf2_sha1 = 0x40060ba4 );
 PROVIDE ( phy_get_romfuncs = 0x40004100 );
-PROVIDE ( __popcountdi2 = 0x40002ef8 );
-PROVIDE ( __popcountsi2 = 0x40002ed0 );
-PROVIDE ( __popcount_tab = 0x3ff96544 );
-PROVIDE ( __powidf2 = 0x400638d4 );
 PROVIDE ( __powisf2 = 0x4006389c );
 PROVIDE ( _Pri_4_HandlerAddress = 0x3ffe0648 );
 PROVIDE ( _Pri_5_HandlerAddress = 0x3ffe064c );
@@ -1667,16 +1684,12 @@ PROVIDE ( _strtol_r = 0x40056714 );
 PROVIDE ( strtoul = 0x4005692c );
 PROVIDE ( _strtoul_r = 0x40056834 );
 PROVIDE ( strupr = 0x4000174c );
-PROVIDE ( __subdf3 = 0x400026e4 );
 PROVIDE ( __submore = 0x40058f3c );
-PROVIDE ( __subsf3 = 0x400021d0 );
 PROVIDE ( SubtractBigHex256 = 0x40015bcc );
 PROVIDE ( SubtractBigHexMod256 = 0x40015e8c );
 PROVIDE ( SubtractBigHexUint32_256 = 0x40015f8c );
 PROVIDE ( SubtractFromSelfBigHex256 = 0x40015c20 );
 PROVIDE ( SubtractFromSelfBigHexSign256 = 0x40015dc8 );
-PROVIDE ( __subvdi3 = 0x40002d20 );
-PROVIDE ( __subvsi3 = 0x40002cf8 );
 PROVIDE ( _sungetc_r = 0x40057f6c );
 PROVIDE ( _svfiprintf_r = 0x40057100 );
 PROVIDE ( __svfiscanf_r = 0x40057b08 );
@@ -1712,7 +1725,6 @@ PROVIDE ( tinfl_decompress_mem_to_mem = 0x40060050 );
 PROVIDE ( toascii = 0x4000c720 );
 PROVIDE ( tolower = 0x40001868 );
 PROVIDE ( toupper = 0x40001884 );
-PROVIDE ( __truncdfsf2 = 0x40002b90 );
 PROVIDE ( __tzcalc_limits = 0x400018a0 );
 PROVIDE ( __tz_lock = 0x40001a04 );
 PROVIDE ( _tzname = 0x3ffae030 );
@@ -1744,19 +1756,9 @@ PROVIDE ( uart_tx_one_char = 0x40009200 );
 PROVIDE ( uart_tx_one_char2 = 0x4000922c );
 PROVIDE ( uart_tx_switch = 0x40009028 );
 PROVIDE ( uart_tx_wait_idle = 0x40009278 );
-PROVIDE ( __ucmpdi2 = 0x40063840 );
-PROVIDE ( __udivdi3 = 0x4000cff8 );
-PROVIDE ( __udivmoddi4 = 0x40064ab0 );
-PROVIDE ( __udivsi3 = 0x4000c7c8 );
-PROVIDE ( __udiv_w_sdiv = 0x40064aa8 );
-PROVIDE ( __umoddi3 = 0x4000d280 );
-PROVIDE ( __umodsi3 = 0x4000c7d0 );
-PROVIDE ( __umulsidi3 = 0x4000c7d8 );
 PROVIDE ( ungetc = 0x400590f4 );
 PROVIDE ( _ungetc_r = 0x40058fa0 );
 PROVIDE ( _unlink_r = 0x4000bc84 );
-PROVIDE ( __unorddf2 = 0x400637f4 );
-PROVIDE ( __unordsf2 = 0x40063478 );
 PROVIDE ( user_code_start = 0x3ffe0400 );
 PROVIDE ( _UserExceptionVector = 0x40000340 );
 PROVIDE ( utoa = 0x40056258 );

Reply via email to