mpc83xx: fix builds with new linker and improve link script rodata section
PATCH 1/1 mpc83xx: fix builds with new linker and improve link script rodata section
A recent gcc added a new unaligned rodata section called '.rodata.str1.1' and that needs to be added the the linker script.
Rather than just add that one section, instead use '*(.rodata*)' to catch that section and any future rodata sections.
'*(.rodata*)' by itself will result in sub-optimal section ordering. The section will be sorted by object file, which causes extra padding between the unaligned rodata.str.1.1 of one object file and the aligned rotdata of the next object file. This is easy to fix by using the SORT_BY_ALIGNMENT command.
Signed-off-by Trent Piepho <[email protected]>
stole Trent's 85xx version and made to apply to 83xx.
Signed-off-by Kim Phillips <[email protected]>
--- cpu/mpc83xx/u-boot.lds | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
cpu/mpc83xx/u-boot.lds +1 -3
@@ -55,10 +55,8 @@ SECTIONS *(.fixup) *(.got1) . = ALIGN(16); - *(.rodata) - *(.rodata1) - *(.rodata.str1.4) *(.eh_frame) + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } .fini : { *(.fini) } =0 .ctors : { *(.ctors) }
Signature · 3 lines
1.6.0.3.640.g6331a Kim