File tree 2 files changed +10
-6
lines changed
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,13 @@ typedef enum {
84
84
#define SHMEM_ATTR
85
85
86
86
#ifdef ICACHE_FLASH
87
- #define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))
88
- #define ICACHE_RAM_ATTR __attribute__((section(".iram.text")))
89
- #define ICACHE_RODATA_ATTR __attribute__((section(".irom.text")))
87
+ // The following two macros cause a parameter to be enclosed in quotes
88
+ // by the preopressor (i.e. for concatenating ints to strings)
89
+ #define __ICACHE_STRINGIZE_NX (A ) #A
90
+ #define __ICACHE_STRINGIZE (A ) __ICACHE_STRINGIZE_NX(A)
91
+ #define ICACHE_FLASH_ATTR __attribute__((section( "\".irom0.text." __FILE__ "." __ICACHE_STRINGIZE(__LINE__) "." __ICACHE_STRINGIZE(__COUNTER__) "\"")))
92
+ #define ICACHE_RAM_ATTR __attribute__((section( "\".iram.text." __FILE__ "." __ICACHE_STRINGIZE(__LINE__) "." __ICACHE_STRINGIZE(__COUNTER__) "\"")))
93
+ #define ICACHE_RODATA_ATTR __attribute__((section( "\".irom.text." __FILE__ "." __ICACHE_STRINGIZE(__LINE__) "." __ICACHE_STRINGIZE(__COUNTER__) "\"")))
90
94
#else
91
95
#define ICACHE_FLASH_ATTR
92
96
#define ICACHE_RAM_ATTR
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ SECTIONS
127
127
* libwpa .a :(.literal .* .text .* )
128
128
* libwpa2 .a :(.literal .* .text .* )
129
129
* libwps .a :(.literal .* .text .* )
130
- * (.irom0 .literal .irom .literal .irom .text .literal .irom0 .text .irom .text .irom .text .* )
130
+ * (.irom0 .literal .irom .literal .irom .text .literal .irom0 .text .irom0 . text . * . irom .text .irom .text .* )
131
131
_irom0_text_end = ABSOLUTE (.);
132
132
_flash_code_end = ABSOLUTE (.);
133
133
} > irom0_0_seg :irom0_0_phdr
@@ -164,8 +164,8 @@ SECTIONS
164
164
* (.init .literal )
165
165
* (.init )
166
166
* (.literal .text .literal .* .text .* .stub .gnu .warning .gnu .linkonce .literal .* .gnu .linkonce .t .* .literal .gnu .linkonce .t .* )
167
- * .cpp .o (.iram .text )
168
- * .c .o (.iram .text )
167
+ * .cpp .o (.iram .text . iram . text . * )
168
+ * .c .o (.iram .text . iram . text . * )
169
169
#ifdef VTABLES_IN_IRAM
170
170
* (.rodata ._ZTV * ) /* C++ vtables */
171
171
#endif
You can’t perform that action at this time.
0 commit comments