mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
Move all PROGMEM to their own section (#5048)
According to the GCC man page, __section__ attributes should only be used for global variables. However, the PROGMEM and ICACHE_RODATA macros use this variable decorator even for local variables. Most of the time it works, but when a static or inlined function tries to use a PROGMEM/PSTR/etc. variable the compiler can throw an error like: error: XXX causes a section type conflict with YYY Change the PROGMEM macro to emit a section name that is unique (a combo of the file, line, and counter variables to ensure uniqueness). The standard linker script will place them properly in .IROM without any changes. Fixes #5036 and others.
This commit is contained in:
committed by
Develo
parent
adde93bcaa
commit
56b98fd4df
@ -5,7 +5,7 @@ namespace mime
|
||||
{
|
||||
|
||||
// Table of extension->MIME strings stored in PROGMEM, needs to be global due to GCC section typing rules
|
||||
const Entry mimeTable[maxType] ICACHE_RODATA_ATTR =
|
||||
const Entry mimeTable[maxType] PROGMEM =
|
||||
{
|
||||
{ ".html", "text/html" },
|
||||
{ ".htm", "text/html" },
|
||||
|
Reference in New Issue
Block a user