From: Kim Phillips <kim.phillips@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Fix all linker script to handle all rodata sections
Date: Thu, 19 Feb 2009 11:52:02 -0600 [thread overview]
Message-ID: <20090219115202.b9dcd944.kim.phillips@freescale.com> (raw)
In-Reply-To: <1234999325-13456-1-git-send-email-tpiepho@freescale.com>
On Wed, 18 Feb 2009 15:22:05 -0800
Trent Piepho <tpiepho@freescale.com> wrote:
> From: Trent Piepho <xyzzy@speakeasy.org>
>
> A recent gcc added a new unaligned rodata section called '.rodata.str1.1',
> which needs to be added the the linker script. Instead of just adding this
> one section, we use a wildcard ".rodata*" to get all rodata linker section
> gcc has now and might add in the future.
>
> However, '*(.rodata*)' by itself will result in sub-optimal section
> ordering. The sections will be sorted by object file, which causes extra
> padding between the unaligned rodata.str.1.1 of one object file and the
> aligned rodata of the next object file. This is easy to fix by using the
> SORT_BY_ALIGNMENT command.
>
> This patch has not be tested one most of the boards modified. Some boards
> have a linker script that looks something like this:
>
> *(.text)
> . = ALIGN(16);
> *(.rodata)
> *(.rodata.str1.4)
> *(.eh_frame)
>
> I change this to:
>
> *(.text)
> . = ALIGN(16);
> *(.eh_frame)
> *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
>
> This means the start of rodata will no longer be 16 bytes aligned.
> However, the boundary between text and rodata/eh_frame is still aligned to
> 16 bytes, which is what I think the real purpose of the ALIGN call is.
>
> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
> ---
This fixes my problem, and I can't find anything wrong with it
upon visual inspection, so:
A-Big-Huge-Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
thanks Trent, I owe you a beer.
Kim
next prev parent reply other threads:[~2009-02-19 17:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 23:29 [U-Boot] [PATCH] Fix Freescale link scripts for newer GCCs Matthew L. Creech
2009-01-22 1:11 ` Kim Phillips
2009-01-31 11:02 ` Trent Piepho
2009-01-31 20:23 ` Wolfgang Denk
2009-02-03 4:11 ` Trent Piepho
2009-02-17 2:05 ` Kim Phillips
2009-02-18 0:04 ` Wolfgang Denk
2009-02-18 18:52 ` Jon Loeliger
2009-02-18 21:54 ` Wolfgang Denk
2009-02-18 22:00 ` ksi at koi8.net
2009-02-18 23:17 ` Trent Piepho
2009-02-18 23:22 ` [U-Boot] [PATCH] Fix all linker script to handle all rodata sections Trent Piepho
2009-02-19 0:00 ` Wolfgang Denk
2009-02-19 17:52 ` Kim Phillips [this message]
2009-08-10 8:35 ` Wolfgang Denk
2009-08-15 22:02 ` Wolfgang Denk
2009-08-17 19:20 ` Trent Piepho
2009-08-17 19:33 ` Wolfgang Denk
2009-01-31 20:23 ` [U-Boot] [PATCH] Fix Freescale link scripts for newer GCCs Wolfgang Denk
2009-01-31 20:23 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090219115202.b9dcd944.kim.phillips@freescale.com \
--to=kim.phillips@freescale.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox