mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
* Move all PSTRs to own section, allow string dedup GNU ld can deduplicate strings, and does so for most normal char *s automatically. However, for PSTRs we were using a unique section per string *and* the section was not flagges as containing dedupable 0-terminated strings. Modify the PSTR macro to emit assembly, which lets us set the section flags required (SM) for the variables, and use inline assembly to get the asm-block defined address. Should result in smaller compiled binaries if any strings are duplicated. * Give each PSTR its own segment * Allow disposing of unused strings before merging Add the "a" section flag to allow the linker to throw away unneeded strings. Without this flag, the linker will not discard unreferenced strings and ROMs will increase in size, possibly dramatically.