xtensa: Assure end of U-Boot is at 8-byte aligned offset
Make sure the end of U-Boot is at 8-byte aligned offset, not 4-byte aligned offset. This allows safely appending DT at the end of U-Boot with the guarantee that the DT will be at 8-byte aligned offset. This 8-byte alignment is now checked by newer libfdt 1.7.2 . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
This commit is contained in:
@@ -78,7 +78,7 @@ SECTIONS
|
||||
SECTION_text(XTENSA_SYS_TEXT_ADDR, FOLLOWING(.DoubleExceptionVector.text))
|
||||
SECTION_rodata(ALIGN(16), FOLLOWING(.text))
|
||||
SECTION_u_boot_list(ALIGN(16), FOLLOWING(.rodata))
|
||||
SECTION_data(ALIGN(16), FOLLOWING(__u_boot_list))
|
||||
SECTION_data(ALIGN(16), FOLLOWINGDT(__u_boot_list))
|
||||
|
||||
__reloc_end = .;
|
||||
__init_end = .;
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
#define FORCE_OUTPUT . = .
|
||||
#define FOLLOWING(sec) \
|
||||
AT(((LOADADDR(sec) + SIZEOF(sec) + ALIGN_LMA-1)) & ~(ALIGN_LMA-1))
|
||||
#define ALIGN_LMA_DT 8
|
||||
#define FOLLOWINGDT(sec) \
|
||||
AT(((LOADADDR(sec) + SIZEOF(sec) + ALIGN_LMA_DT-1)) & ~(ALIGN_LMA_DT-1))
|
||||
|
||||
/*
|
||||
* Specify an output section that will be added to the ROM store table
|
||||
@@ -110,6 +113,7 @@
|
||||
___u_boot_list_start = ABSOLUTE(.); \
|
||||
KEEP(*(SORT(__u_boot_list*))); \
|
||||
___u_boot_list_end = ABSOLUTE(.); \
|
||||
. = ALIGN(ALIGN_LMA_DT); \
|
||||
}
|
||||
|
||||
#define SECTION_data(_vma_, _lma_) \
|
||||
@@ -130,6 +134,7 @@
|
||||
*(.eh_frame) \
|
||||
*(.dynamic) \
|
||||
*(.gnu.version_d) \
|
||||
. = ALIGN(ALIGN_LMA_DT); \
|
||||
_data_end = ABSOLUTE(.); \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user