Indeed, just tested, and the DISCARD linker script does not work for this as it gets added anyway when I add "-lgcc".
I see some suspicious extra .debug_frame section listed by objdump when -lgcc is there but this does not get into the binary as adding it into DISCARD works and the btoa string is still the same even when not seeing it in the output.
Not sure if everything from libgcc.a is harmless like this but looks like for this case it works fine indeed.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Indeed, just tested, and the DISCARD linker script does not work for this as it gets added anyway when I add "-lgcc".
I see some suspicious extra .debug_frame section listed by objdump when -lgcc is there but this does not get into the binary as adding it into DISCARD works and the btoa string is still the same even when not seeing it in the output.
Not sure if everything from libgcc.a is harmless like this but looks like for this case it works fine indeed.