From: Kim Phillips Date: Mon, 16 Feb 2009 19:44:15 -0600 Subject: [PATCH] mpc83xx: fix builds with new linker and improve link script rodata section Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 stole Trent's 85xx version and made to apply to 83xx. Signed-off-by: Kim Phillips --- cpu/mpc83xx/u-boot.lds | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/cpu/mpc83xx/u-boot.lds b/cpu/mpc83xx/u-boot.lds index 3a08f64..7d57ee4 100644 --- a/cpu/mpc83xx/u-boot.lds +++ b/cpu/mpc83xx/u-boot.lds @@ -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) } -- 1.6.0.3.640.g6331a Kim