This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gold patch] Start sections at 0 for relocatable links


On Fri, Apr 12, 2013 at 4:42 PM, Cary Coutant <ccoutant@google.com> wrote:
> If an Output_section_definition immediately follows an orphaned
> section of non-zero size in the layout order, that section is assigned
> a starting address based on the length of the last orphaned section.
> This patch fixes this by resetting dot_value to 0 after each orphaned
> section.
>
> Tested on x86_64. OK to apply?
>
> -cary
>
> gold/
>     * script-sections.cc (Orphan_output_section): Reset address
>     to zero after each orphaned section for relocatable links.

This is kind of weird but I don't think there is a good solution here.
 It's strange to use a script with a relocateable link and if you do
use a script its clearly best to not have an orphan section.  I
suppose this is OK.  I do sort of wonder why GNU ld does, but it's
hard to care very much.  Thanks.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]