From 5752e4d5888e9e7bfe3182ec0f24e58159fa3350 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 28 Jun 2018 12:25:26 +0800 Subject: [PATCH 1/2] esp32: fix addresses of some libgcc functions in ROM ld script --- components/esp32/ld/esp32.rom.ld | 22 ++-- components/esp32/test/test_libgcc.c | 185 ++++++++++++++++++++++++++++ 2 files changed, 196 insertions(+), 11 deletions(-) create mode 100644 components/esp32/test/test_libgcc.c diff --git a/components/esp32/ld/esp32.rom.ld b/components/esp32/ld/esp32.rom.ld index 8c458ff14..0bbed973d 100644 --- a/components/esp32/ld/esp32.rom.ld +++ b/components/esp32/ld/esp32.rom.ld @@ -28,8 +28,8 @@ PROVIDE ( BasePoint_x_256 = 0x3ff97488 ); PROVIDE ( BasePoint_y_256 = 0x3ff97468 ); PROVIDE ( bigHexInversion256 = 0x400168f0 ); PROVIDE ( bigHexP256 = 0x3ff973bc ); -PROVIDE ( __bswapdi2 = 0x400649c4 ); -PROVIDE ( __bswapsi2 = 0x4006499c ); +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 ); @@ -53,8 +53,8 @@ PROVIDE ( calloc = 0x4000bee4 ); PROVIDE ( _calloc_r = 0x4000bbf8 ); PROVIDE ( __clear_cache = 0x40063860 ); PROVIDE ( _close_r = 0x4000bd3c ); -PROVIDE ( __clrsbdi2 = 0x40064a38 ); -PROVIDE ( __clrsbsi2 = 0x40064a20 ); +PROVIDE ( __clrsbdi2 = 0x40064b7c ); +PROVIDE ( __clrsbsi2 = 0x40064b64 ); PROVIDE ( __clzdi2 = 0x4000ca50 ); PROVIDE ( __clzsi2 = 0x4000c7e8 ); PROVIDE ( __cmpdi2 = 0x40063820 ); @@ -103,10 +103,10 @@ PROVIDE ( dh_group2_generator = 0x3ff9ada2 ); PROVIDE ( dh_group2_prime = 0x3ff9ad22 ); PROVIDE ( dh_group5_generator = 0x3ff9ad21 ); PROVIDE ( dh_group5_prime = 0x3ff9ac61 ); -PROVIDE ( __divdc3 = 0x40064460 ); +PROVIDE ( __divdc3 = 0x400645a4 ); PROVIDE ( __divdf3 = 0x40002954 ); PROVIDE ( __divdi3 = 0x4000ca84 ); -PROVIDE ( __divsc3 = 0x40064200 ); +PROVIDE ( __divsc3 = 0x4006429c ); PROVIDE ( __divsf3 = 0x4000234c ); PROVIDE ( __divsi3 = 0x4000c7b8 ); PROVIDE ( g_rom_spiflash_dummy_len_plus = 0x3ffae290 ); @@ -271,10 +271,10 @@ PROVIDE ( mmu_init = 0x400095a4 ); PROVIDE ( __moddi3 = 0x4000cd4c ); PROVIDE ( __modsi3 = 0x4000c7c0 ); PROVIDE ( __month_lengths = 0x3ff9609c ); -PROVIDE ( __muldc3 = 0x40063bf4 ); +PROVIDE ( __muldc3 = 0x40063c90 ); PROVIDE ( __muldf3 = 0x4006358c ); PROVIDE ( __muldi3 = 0x4000c9fc ); -PROVIDE ( __mulsc3 = 0x40063934 ); +PROVIDE ( __mulsc3 = 0x40063944 ); PROVIDE ( __mulsf3 = 0x400632c8 ); PROVIDE ( __mulsi3 = 0x4000c7b0 ); PROVIDE ( MultiplyBigHexByUint32_256 = 0x40016214 ); @@ -303,7 +303,7 @@ PROVIDE ( phy_get_romfuncs = 0x40004100 ); PROVIDE ( __popcountdi2 = 0x40002ef8 ); PROVIDE ( __popcountsi2 = 0x40002ed0 ); PROVIDE ( __popcount_tab = 0x3ff96544 ); -PROVIDE ( __powidf2 = 0x400638d4 ); +PROVIDE ( __powidf2 = 0x400638e4 ); PROVIDE ( __powisf2 = 0x4006389c ); PROVIDE ( _Pri_4_HandlerAddress = 0x3ffe0648 ); PROVIDE ( _Pri_5_HandlerAddress = 0x3ffe064c ); @@ -1449,9 +1449,9 @@ PROVIDE ( _tzname = 0x3ffae030 ); PROVIDE ( UartDev = 0x3ffe019c ); PROVIDE ( __ucmpdi2 = 0x40063840 ); PROVIDE ( __udivdi3 = 0x4000cff8 ); -PROVIDE ( __udivmoddi4 = 0x40064ab0 ); +PROVIDE ( __udivmoddi4 = 0x40064bf4 ); PROVIDE ( __udivsi3 = 0x4000c7c8 ); -PROVIDE ( __udiv_w_sdiv = 0x40064aa8 ); +PROVIDE ( __udiv_w_sdiv = 0x40064bec ); PROVIDE ( __umoddi3 = 0x4000d280 ); PROVIDE ( __umodsi3 = 0x4000c7d0 ); PROVIDE ( __umulsidi3 = 0x4000c7d8 ); diff --git a/components/esp32/test/test_libgcc.c b/components/esp32/test/test_libgcc.c new file mode 100644 index 000000000..7fca990d4 --- /dev/null +++ b/components/esp32/test/test_libgcc.c @@ -0,0 +1,185 @@ +#include +#include "unity.h" + +TEST_CASE("libgcc math functions", "[rom]") +{ + extern int64_t __absvdi2(int64_t x); + TEST_ASSERT(__absvdi2(-1L) == 1); + extern int __absvsi2(int x); + TEST_ASSERT(__absvsi2(-1) == 1); + extern double __adddf3(double x, double y); + TEST_ASSERT(__adddf3(1.0, 4.0) == 5.0); + extern float __addsf3(float x, float y); + TEST_ASSERT(__addsf3(1.0f, 4.0f) == 5.0f); + extern int64_t __addvdi3(int64_t x, int64_t y); + TEST_ASSERT(__addvdi3(1L, 4L) == 5L); + extern int __addvsi3(int x, int y); + TEST_ASSERT(__addvsi3(1, 4) == 5); + extern int64_t __ashldi3(int64_t x, int y); + TEST_ASSERT(__ashldi3(1, 4) == 16); + extern int64_t __ashrdi3(int64_t x, int y); + TEST_ASSERT(__ashrdi3(4, 1) == 2); + extern int64_t __bswapdi2(int64_t x); + TEST_ASSERT(__bswapdi2(0xaabbccddeeff0011ULL) == 0x1100ffeeddccbbaaULL); + extern int32_t __bswapsi2(int32_t x); + TEST_ASSERT(__bswapsi2(0xaabbccdd) == 0xddccbbaa); + extern int64_t __clrsbdi2(int64_t x); + TEST_ASSERT(__clrsbdi2(-1) == 63); + extern int __clrsbsi2(int x); + TEST_ASSERT(__clrsbsi2(-1) == 31); + extern int __clzdi2(int64_t x); + TEST_ASSERT(__clzdi2(1) == 63); + extern int __clzsi2(int x); + TEST_ASSERT(__clzsi2(1) == 31); + extern int __cmpdi2(int64_t x, int64_t y); + TEST_ASSERT(__cmpdi2(10, 10) == 1); + extern int __ctzdi2(uint64_t x); + TEST_ASSERT(__ctzdi2(0x8000000000000000ULL) == 63); + extern int __ctzsi2(unsigned x); + TEST_ASSERT(__ctzsi2(0x80000000U) == 31); + extern complex double __divdc3(double a, double b, double c, double d); + TEST_ASSERT(__divdc3(0, 1, 1, 0) == I); + extern double __divdf3(double x, double y); + TEST_ASSERT(__divdf3(16.0, 2.0) == 8.0); + extern int64_t __divdi3(int64_t x, int64_t y); + TEST_ASSERT(__divdi3(16, 2) == 8); + extern complex float __divsc3(float a, float b, float c, float d); + TEST_ASSERT(__divsc3(0, 1, 1, 0) == I); + extern float __divsf3(float x, float y); + TEST_ASSERT(__divsf3(16.0f, 2.0f) == 8.0f); + extern int __divsi3(int x, int y); + TEST_ASSERT(__divsi3(16, 2) == 8); + extern int __eqdf2(double x, double y); + TEST_ASSERT(__eqdf2(4.0, 4.0) == 0); + extern int __eqsf2(float x, float y); + TEST_ASSERT(__eqsf2(4.0f, 4.0f) == 0); + extern double __extendsfdf2(float x); + TEST_ASSERT(__extendsfdf2(4.0f) == 4.0); + extern int __ffsdi2(uint64_t x); + TEST_ASSERT(__ffsdi2(0x8000000000000000ULL) == 64); + extern int __ffssi2(unsigned x); + TEST_ASSERT(__ffssi2(0x80000000) == 32); + extern int64_t __fixdfdi(double x); + TEST_ASSERT(__fixdfdi(4.0) == 4LL); + extern int __fixdfsi(double x); + TEST_ASSERT(__fixdfsi(4.0) == 4); + extern int64_t __fixsfdi(float x); + TEST_ASSERT(__fixsfdi(4.0f) == 4LL); + extern int __fixsfsi(float x); + TEST_ASSERT(__fixsfsi(4.0f) == 4); + extern unsigned __fixunsdfsi(double x); + TEST_ASSERT(__fixunsdfsi(16.0) == 16); + extern uint64_t __fixunssfdi(float x); + TEST_ASSERT(__fixunssfdi(16.0f) == 16); + extern unsigned __fixunssfsi(float x); + TEST_ASSERT(__fixunssfsi(16.0f) == 16); + extern double __floatdidf(int64_t); + TEST_ASSERT(__floatdidf(-1LL) == -1.0f); + extern float __floatdisf(int64_t); + TEST_ASSERT(__floatdisf(-1LL) == -1.0f); + extern double __floatsidf(int x); + TEST_ASSERT(__floatsidf(-1) == -1.0); + extern float __floatsisf(int x); + TEST_ASSERT(__floatsisf(-1) == -1.0f); + extern double __floatundidf(uint64_t x); + TEST_ASSERT(__floatundidf(16) == 16.0); + extern float __floatundisf(uint64_t x); + TEST_ASSERT(__floatundisf(16) == 16.0f); + extern double __floatunsidf(unsigned x); + TEST_ASSERT(__floatunsidf(16) == 16.0); + extern float __floatunsisf(unsigned x); + TEST_ASSERT(__floatunsisf(16) == 16.0f); + extern int __gedf2(double x, double y); + TEST_ASSERT(__gedf2(2.0, 0.0) >= 0); + extern int __gesf2(float x, float y); + TEST_ASSERT(__gesf2(2.0f, 0.0f) >= 0); + extern int __gtdf2(double x, double y); + TEST_ASSERT(__gtdf2(2.0, 0.0) >= 0); + extern int __gtsf2(float x, float y); + TEST_ASSERT(__gtsf2(2.0f, 0.0f) >= 0); + extern int __ledf2(double x, double y); + TEST_ASSERT(__ledf2(0.0, 2.0) <= 0); + extern int __lesf2(float x, float y); + TEST_ASSERT(__lesf2(0.0f, 2.0f) <= 0); + extern int64_t __lshrdi3(int64_t x, int y); + TEST_ASSERT(__lshrdi3(0x8000000000000000LL, 1) == 0x4000000000000000LL); + extern int __ltdf2(double x, double y); + TEST_ASSERT(__ltdf2(0.0, 2.0) < 0); + extern int __ltsf2(float x, float y); + TEST_ASSERT(__ltsf2(0.0f, 2.0f) < 0); + extern int64_t __moddi3(int64_t x, int64_t y); + TEST_ASSERT(__moddi3(15, 2) == 1); + extern int __modsi3(int x, int y); + TEST_ASSERT(__modsi3(15, 2) == 1); + extern complex double __muldc3(double a, double b, double c, double d); + TEST_ASSERT(__muldc3(1.0, 0.0, 0.0, 1.0) == I); + extern double __muldf3(double x, double y); + TEST_ASSERT(__muldf3(2.0, 8.0) == 16.0); + extern int64_t __muldi3(int64_t x, int64_t y); + TEST_ASSERT(__muldi3(2, 8) == 16); + extern complex float __mulsc3 (float a, float b, float c, float d); + TEST_ASSERT(__mulsc3(1.0f, 0.0f, 0.0f, -1.0f) == -I); + extern float __mulsf3 (float a, float b); + TEST_ASSERT(__mulsf3(2.0f, 8.0f) == 16.0f); + extern int __mulsi3(int x, int y); + TEST_ASSERT(__mulsi3(2, 8) == 16); + extern int __mulvdi3(int64_t x, int64_t y); + TEST_ASSERT(__mulvdi3(2, 8) == 16); + extern int __mulvsi3(int x, int y); + TEST_ASSERT(__mulvsi3(2, 8) == 16); + extern int __nedf2(double x, double y); + TEST_ASSERT(__nedf2(2.0, 2.0) == 0); + extern double __negdf2(double x); + TEST_ASSERT(__negdf2(1.0) == -1.0); + extern int64_t __negdi2(int64_t x); + TEST_ASSERT(__negdi2(-1LL) == 1); + extern float __negsf2(float x); + TEST_ASSERT(__negsf2(-1.0f) == 1.0f); + extern int64_t __negvdi2(int64_t x); + TEST_ASSERT(__negvdi2(-1LL) == 1); + extern int __negvsi2(int x); + TEST_ASSERT(__negvsi2(-1) == 1); + extern int __nesf2(float x, float y); + TEST_ASSERT(__nesf2(2.0, 0.0) != 0); + extern int __paritysi2(unsigned x); + TEST_ASSERT(__paritysi2(0x10101010) == 0); + extern int __popcountdi2(uint64_t); + TEST_ASSERT(__popcountdi2(0xaaaaaaaa11111111ULL) == 24); + extern int __popcountsi2(unsigned x); + TEST_ASSERT(__popcountsi2(0x11111111) == 8); + extern double __powidf2(double x, int y); + TEST_ASSERT(__powidf2(2.0, -1) == 0.5); + extern float __powisf2(float x, int y); + TEST_ASSERT(__powisf2(2.0f, 2) == 4.0f); + extern double __subdf3(double x, double y); + TEST_ASSERT(__subdf3(2.0, 1.0) == 1.0); + extern float __subsf3(float x, float y); + TEST_ASSERT(__subsf3(5.0f, 4.0f) == 1.0f); + extern int64_t __subvdi3(int64_t x, int64_t y); + TEST_ASSERT(__subvdi3(-1LL, -1LL) == 0); + extern int __subvsi3(int x, int y); + TEST_ASSERT(__subvsi3(-1, -1) == 0); + extern float __truncdfsf2(double x); + TEST_ASSERT(__truncdfsf2(4.0) == 4.0f); + extern int __ucmpdi2(uint64_t x, uint64_t y); + TEST_ASSERT(__ucmpdi2(0x100000000ULL, 0x100000000ULL) == 1); + extern uint64_t __udivdi3(uint64_t x, uint64_t y); + TEST_ASSERT(__udivdi3(15, 2) == 7); + extern uint64_t __udivmoddi4(uint64_t x, uint64_t y, uint64_t* z); + uint64_t z; + TEST_ASSERT(__udivmoddi4(15, 2, &z) == 7); + TEST_ASSERT(z == 1); + extern unsigned __udivsi3(unsigned x, unsigned y); + TEST_ASSERT(__udivsi3(15, 2) == 7); + extern uint64_t __umoddi3(uint64_t x, uint64_t y); + TEST_ASSERT(__umoddi3(15, 2) == 1); + extern unsigned __umodsi3(unsigned x, unsigned y); + TEST_ASSERT(__umodsi3(15, 2) == 1); + extern uint64_t __umulsidi3(unsigned x, unsigned y); + TEST_ASSERT(__umulsidi3(0x10000000, 0x10000000) == 0x100000000000000ULL); + extern int __unorddf2(double x, double y); + TEST_ASSERT(__unorddf2(1.0, 2.0) == 0); + extern int __unordsf2(float x, float y); + TEST_ASSERT(__unordsf2(2.0f, 1.0f) == 0); + +} From debe83c3b5ced0aa0de1a27d5490788fe87607d7 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 28 Jun 2018 12:48:31 +0800 Subject: [PATCH 2/2] esp32: force pure math functions from libgcc to be linked from ROM --- components/esp32/component.mk | 3 + components/esp32/ld/esp32.rom.ld | 91 ------------------------- components/esp32/ld/esp32.rom.libgcc.ld | 91 +++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 91 deletions(-) create mode 100644 components/esp32/ld/esp32.rom.libgcc.ld diff --git a/components/esp32/component.mk b/components/esp32/component.mk index fb53bfbb4..6c03587a3 100644 --- a/components/esp32/component.mk +++ b/components/esp32/component.mk @@ -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 diff --git a/components/esp32/ld/esp32.rom.ld b/components/esp32/ld/esp32.rom.ld index 0bbed973d..7e6cc72bf 100644 --- a/components/esp32/ld/esp32.rom.ld +++ b/components/esp32/ld/esp32.rom.ld @@ -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 ); @@ -53,11 +43,6 @@ PROVIDE ( calloc = 0x4000bee4 ); PROVIDE ( _calloc_r = 0x4000bbf8 ); 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 ); @@ -69,8 +54,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 ); @@ -103,49 +86,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 ); @@ -155,8 +110,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 ); @@ -202,8 +155,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 ); @@ -256,9 +207,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 ); @@ -268,43 +216,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 ); @@ -1418,15 +1342,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 ); @@ -1444,20 +1364,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 ); diff --git a/components/esp32/ld/esp32.rom.libgcc.ld b/components/esp32/ld/esp32.rom.libgcc.ld new file mode 100644 index 000000000..51448b332 --- /dev/null +++ b/components/esp32/ld/esp32.rom.libgcc.ld @@ -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;