diff --git a/src/rp2_common/pico_double/double_init_rom.c b/src/rp2_common/pico_double/double_init_rom.c index 1a25559..2255939 100644 --- a/src/rp2_common/pico_double/double_init_rom.c +++ b/src/rp2_common/pico_double/double_init_rom.c @@ -19,6 +19,8 @@ static __attribute__((noreturn)) void missing_double_func_shim(void) { #endif extern void double_table_shim_on_use_helper(void); +void __attribute__((weak)) *sf_clz_func; + void __aeabi_double_init(void) { int rom_version = rp2040_rom_version(); #if PICO_DOUBLE_SUPPORT_ROM_V1 @@ -63,4 +65,6 @@ void __aeabi_double_init(void) { // we use the unused entry for SINCOS sd_table[SF_TABLE_V3_FSINCOS / 4] = (uintptr_t) double_table_shim_on_use_helper; } + + sf_clz_func = rom_func_lookup(rom_table_code('L', '3')); } diff --git a/src/rp2_common/pico_float/float_init_rom.c b/src/rp2_common/pico_float/float_init_rom.c index 24c74ce..c7a52c2 100644 --- a/src/rp2_common/pico_float/float_init_rom.c +++ b/src/rp2_common/pico_float/float_init_rom.c @@ -11,7 +11,7 @@ // NOTE THIS FUNCTION TABLE IS NOT PUBLIC OR NECESSARILY COMPLETE... // IT IS ***NOT*** SAFE TO CALL THESE FUNCTION POINTERS FROM ARBITRARY CODE uint32_t sf_table[SF_TABLE_V2_SIZE / 2]; -void *sf_clz_func; +void __attribute__((weak)) *sf_clz_func; #if !PICO_FLOAT_SUPPORT_ROM_V1 static __attribute__((noreturn)) void missing_float_func_shim(void) {