Skip to content

Commit ca02651

Browse files
Tavish Narukanashif
authored andcommitted
toolchain: gcc: fix SECTION_DATA_PROLOGUE for XIP
Current if CONFIG_XIP is enabled, then ALIGN_WITH_INPUT and the align argument to SECTION_DATA_PROLOGUE are set together, and that is not a valid option combination; if ALIGN_WITH_INPUT is present, then the section's LMA alignment is inherited from the previous section, and that cannot be combined with another alignment option. The background for this line is in the following commit: 6b3c5e8 Additionally, this is the documentation from ld: (from https://sourceware.org/binutils/docs/ld/Forced-Output-Alignment.html) > 3.6.8.3 Forced Output Alignment > > You can increase an output section’s alignment by using ALIGN. As an > alternative you can enforce that the difference between the VMA and > LMA remains intact throughout this output section with the > ALIGN_WITH_INPUT attribute. Signed-off-by: Tavish Naruka <[email protected]>
1 parent 7802fff commit ca02651

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/zephyr/linker/linker-tool-gcc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
*/
201201
#if defined(CONFIG_XIP)
202202
#define SECTION_DATA_PROLOGUE(name, options, align) \
203-
name options : ALIGN_WITH_INPUT align
203+
name options : ALIGN_WITH_INPUT
204204
#else
205205
#define SECTION_DATA_PROLOGUE(name, options, align) \
206206
SECTION_PROLOGUE(name, options, align)

0 commit comments

Comments
 (0)