esp32: force pure math functions from libgcc to be linked from ROM

This commit is contained in:
Ivan Grokhotkov 2018-06-28 12:48:31 +08:00
parent 40b5f10611
commit ae006fed83
3 changed files with 94 additions and 91 deletions

View file

@ -13,6 +13,9 @@ endif
#specifies its own scripts.
LINKER_SCRIPTS += esp32.common.ld esp32.rom.ld esp32.peripherals.ld
#Force pure functions from libgcc.a to be linked from ROM
LINKER_SCRIPTS += esp32.rom.libgcc.ld
#SPI-RAM incompatible functions can be used in when the SPI RAM
#workaround is not enabled.
ifndef CONFIG_SPIRAM_CACHE_WORKAROUND

View file

@ -4,32 +4,22 @@ Generated for ROM with MD5sum:
ab8282ae908fe9e7a63fb2a4ac2df013 ../../rom_image/prorom.elf
*/
PROVIDE ( abort = 0x4000bba4 );
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 );
PROVIDE ( app_gpio_arg = 0x3ffe003c );
PROVIDE ( app_gpio_handler = 0x3ffe0040 );
PROVIDE ( __ashldi3 = 0x4000c818 );
PROVIDE ( __ashrdi3 = 0x4000c830 );
PROVIDE ( base64_decode = 0x4005ced8 );
PROVIDE ( base64_encode = 0x4005cdbc );
PROVIDE ( BasePoint_x_256 = 0x3ff97488 );
PROVIDE ( BasePoint_y_256 = 0x3ff97468 );
PROVIDE ( bigHexInversion256 = 0x400168f0 );
PROVIDE ( bigHexP256 = 0x3ff973bc );
PROVIDE ( __bswapdi2 = 0x40064b08 );
PROVIDE ( __bswapsi2 = 0x40064ae0 );
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 );
@ -52,11 +42,6 @@ PROVIDE ( calc_rtc_memory_crc = 0x40008170 );
PROVIDE ( calloc = 0x4000bee4 );
PROVIDE ( __clear_cache = 0x40063860 );
PROVIDE ( _close_r = 0x4000bd3c );
PROVIDE ( __clrsbdi2 = 0x40064b7c );
PROVIDE ( __clrsbsi2 = 0x40064b64 );
PROVIDE ( __clzdi2 = 0x4000ca50 );
PROVIDE ( __clzsi2 = 0x4000c7e8 );
PROVIDE ( __cmpdi2 = 0x40063820 );
PROVIDE ( co_default_bdaddr = 0x3ffae704 );
PROVIDE ( co_null_bdaddr = 0x3ffb80e0 );
PROVIDE ( co_sca2ppm = 0x3ff971e8 );
@ -68,8 +53,6 @@ PROVIDE ( crc8_be = 0x4005d114 );
PROVIDE ( crc8_le = 0x4005d0e0 );
PROVIDE ( _ctype_ = 0x3ff96354 );
PROVIDE ( __ctype_ptr__ = 0x3ff96350 );
PROVIDE ( __ctzdi2 = 0x4000ca64 );
PROVIDE ( __ctzsi2 = 0x4000c7f0 );
PROVIDE ( _data_end_rom = 0x4000d5c8 );
PROVIDE ( _data_end_btdm_rom = 0x4000d4f8 );
PROVIDE ( _data_start_rom = 0x4000d4f8 );
@ -102,49 +85,21 @@ PROVIDE ( dh_group2_generator = 0x3ff9ada2 );
PROVIDE ( dh_group2_prime = 0x3ff9ad22 );
PROVIDE ( dh_group5_generator = 0x3ff9ad21 );
PROVIDE ( dh_group5_prime = 0x3ff9ac61 );
PROVIDE ( __divdc3 = 0x400645a4 );
PROVIDE ( __divdf3 = 0x40002954 );
PROVIDE ( __divdi3 = 0x4000ca84 );
PROVIDE ( __divsc3 = 0x4006429c );
PROVIDE ( __divsf3 = 0x4000234c );
PROVIDE ( __divsi3 = 0x4000c7b8 );
PROVIDE ( g_rom_spiflash_dummy_len_plus = 0x3ffae290 );
PROVIDE ( ecc_env = 0x3ffb8d60 );
PROVIDE ( ecc_Jacobian_InfinityPoint256 = 0x3ff972e8 );
PROVIDE ( em_buf_env = 0x3ffb8d74 );
PROVIDE ( environ = 0x3ffae0b4 );
PROVIDE ( __eqdf2 = 0x400636a8 );
PROVIDE ( __eqsf2 = 0x40063374 );
PROVIDE ( esp_crc8 = 0x4005d144 );
PROVIDE ( _etext = 0x4000d66c );
PROVIDE ( ets_readySet_ = 0x3ffe01f0 );
PROVIDE ( ets_startup_callback = 0x3ffe0404 );
PROVIDE ( exc_cause_table = 0x3ff991d0 );
PROVIDE ( _exit_r = 0x4000bd28 );
PROVIDE ( __extendsfdf2 = 0x40002c34 );
PROVIDE ( __ffsdi2 = 0x4000ca2c );
PROVIDE ( __ffssi2 = 0x4000c804 );
PROVIDE ( __fixdfdi = 0x40002ac4 );
PROVIDE ( __fixdfsi = 0x40002a78 );
PROVIDE ( __fixsfdi = 0x4000244c );
PROVIDE ( __fixsfsi = 0x4000240c );
PROVIDE ( __fixunsdfsi = 0x40002b30 );
PROVIDE ( __fixunssfdi = 0x40002504 );
PROVIDE ( __fixunssfsi = 0x400024ac );
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 ( free = 0x4000beb8 );
PROVIDE ( _free_r = 0x4000bbcc );
PROVIDE ( _fstat_r = 0x4000bccc );
PROVIDE ( __gcc_bcmp = 0x40064a70 );
PROVIDE ( __gedf2 = 0x40063768 );
PROVIDE ( __gesf2 = 0x4006340c );
PROVIDE ( _getpid_r = 0x4000bcfc );
PROVIDE ( __getreent = 0x4000be8c );
PROVIDE ( _gettimeofday_r = 0x4000bc58 );
@ -154,8 +109,6 @@ PROVIDE ( GF_Point_Jacobian_To_Affine256 = 0x40016b0c );
PROVIDE ( _global_impure_ptr = 0x3ffae0b0 );
PROVIDE ( g_phyFuns_instance = 0x3ffae0c4 );
PROVIDE ( g_rom_flashchip = 0x3ffae270 );
PROVIDE ( __gtdf2 = 0x400636dc );
PROVIDE ( __gtsf2 = 0x400633a0 );
PROVIDE ( gTxMsg = 0x3ffe0050 );
PROVIDE ( hci_cmd_desc_root_tab = 0x3ff976d4 );
PROVIDE ( hci_cmd_desc_tab_ctrl_bb = 0x3ff97b70 );
@ -201,8 +154,6 @@ PROVIDE ( ld_env = 0x3ffb9510 );
PROVIDE ( ld_pcm_settings_dft = 0x3ff98a0c );
PROVIDE ( ld_sched_params = 0x3ffb96c0 );
PROVIDE ( ld_sync_train_channels = 0x3ff98a3c );
PROVIDE ( __ledf2 = 0x40063704 );
PROVIDE ( __lesf2 = 0x400633c0 );
PROVIDE ( _link_r = 0x4000bc9c );
PROVIDE ( llc_default_handler = 0x3ff98b3c );
PROVIDE ( llc_default_state_tab_p_get = 0x40046058 );
@ -255,9 +206,6 @@ PROVIDE ( _lock_release_recursive = 0x4000be78 );
PROVIDE ( _lock_try_acquire = 0x4000be3c );
PROVIDE ( _lock_try_acquire_recursive = 0x4000be50 );
PROVIDE ( _lseek_r = 0x4000bd8c );
PROVIDE ( __lshrdi3 = 0x4000c84c );
PROVIDE ( __ltdf2 = 0x40063790 );
PROVIDE ( __ltsf2 = 0x4006342c );
PROVIDE ( malloc = 0x4000bea0 );
PROVIDE ( _malloc_r = 0x4000bbb4 );
PROVIDE ( maxSecretKey_256 = 0x3ff97448 );
@ -267,43 +215,19 @@ PROVIDE ( MD5Init = 0x4005da7c );
PROVIDE ( MD5Update = 0x4005da9c );
PROVIDE ( md5_vector = 0x4005db80 );
PROVIDE ( mmu_init = 0x400095a4 );
PROVIDE ( __moddi3 = 0x4000cd4c );
PROVIDE ( __modsi3 = 0x4000c7c0 );
PROVIDE ( __month_lengths = 0x3ff9609c );
PROVIDE ( __muldc3 = 0x40063c90 );
PROVIDE ( __muldf3 = 0x4006358c );
PROVIDE ( __muldi3 = 0x4000c9fc );
PROVIDE ( __mulsc3 = 0x40063944 );
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 ( notEqual256 = 0x40015b04 );
PROVIDE ( __nsau_data = 0x3ff96544 );
PROVIDE ( one_bits = 0x3ff971f8 );
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 = 0x400638e4 );
PROVIDE ( __powisf2 = 0x4006389c );
PROVIDE ( _Pri_4_HandlerAddress = 0x3ffe0648 );
PROVIDE ( _Pri_5_HandlerAddress = 0x3ffe064c );
PROVIDE ( r_btdm_option_data = 0x3ffae6e0 );
@ -1417,15 +1341,11 @@ PROVIDE ( _start = 0x40000704 );
PROVIDE ( start_tb_console = 0x4005a980 );
PROVIDE ( _stat_r = 0x4000bcb4 );
PROVIDE ( _stext = 0x40000560 );
PROVIDE ( __subdf3 = 0x400026e4 );
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 ( sw_to_hw = 0x3ffb8d40 );
PROVIDE ( syscall_table_ptr_app = 0x3ffae020 );
PROVIDE ( syscall_table_ptr_pro = 0x3ffae024 );
@ -1443,20 +1363,9 @@ PROVIDE ( _timezone = 0x3ffae0a0 );
PROVIDE ( tinfl_decompress = 0x4005ef30 );
PROVIDE ( tinfl_decompress_mem_to_callback = 0x40060090 );
PROVIDE ( tinfl_decompress_mem_to_mem = 0x40060050 );
PROVIDE ( __truncdfsf2 = 0x40002b90 );
PROVIDE ( _tzname = 0x3ffae030 );
PROVIDE ( UartDev = 0x3ffe019c );
PROVIDE ( __ucmpdi2 = 0x40063840 );
PROVIDE ( __udivdi3 = 0x4000cff8 );
PROVIDE ( __udivmoddi4 = 0x40064bf4 );
PROVIDE ( __udivsi3 = 0x4000c7c8 );
PROVIDE ( __udiv_w_sdiv = 0x40064bec );
PROVIDE ( __umoddi3 = 0x4000d280 );
PROVIDE ( __umodsi3 = 0x4000c7d0 );
PROVIDE ( __umulsidi3 = 0x4000c7d8 );
PROVIDE ( _unlink_r = 0x4000bc84 );
PROVIDE ( __unorddf2 = 0x400637f4 );
PROVIDE ( __unordsf2 = 0x40063478 );
PROVIDE ( user_code_start = 0x3ffe0400 );
PROVIDE ( veryBigHexP256 = 0x3ff9736c );
PROVIDE ( __wctomb = 0x3ff96540 );

View file

@ -0,0 +1,91 @@
__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;
__divsc3 = 0x4006429c;
__divsf3 = 0x4000234c;
__divsi3 = 0x4000c7b8;
__eqdf2 = 0x400636a8;
__eqsf2 = 0x40063374;
__extendsfdf2 = 0x40002c34;
__ffsdi2 = 0x4000ca2c;
__ffssi2 = 0x4000c804;
__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;
__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;
__mulsc3 = 0x40063944;
__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;
__powisf2 = 0x4006389c;
__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;