This is the mail archive of the
mailing list for the binutils project.
Re: [patch bfd]: Adjust handling for plugin-generated sections for pe-coff targets
- From: Alan Modra <amodra at gmail dot com>
- To: NightStrike <nightstrike at gmail dot com>
- Cc: Kai Tietz <ktietz70 at googlemail dot com>, Binutils <binutils at sourceware dot org>
- Date: Thu, 6 Oct 2011 13:21:19 +1030
- Subject: Re: [patch bfd]: Adjust handling for plugin-generated sections for pe-coff targets
- References: <CAEwic4YyBYESy4W36A4pB1Dg0TuRC2xa5Yo7BLacYVAAojThQg@mail.gmail.com> <20110929044033.GR10321@bubble.grove.modra.org> <CAEwic4Zx5ggzs8o39w0C2WZq5qybvV11WuzyZfyPDEKBPvwaUQ@mail.gmail.com> <CAF1jjLsATdxpDAehqWGBSC=6PNcVkLHda+OXRc=yYYb65j0EeA@mail.gmail.com>
On Tue, Oct 04, 2011 at 08:50:20AM -0400, NightStrike wrote:
I've been away..
> On Thu, Sep 29, 2011 at 4:56 AM, Kai Tietz <email@example.com> wrote:
> > 2011/9/29 Alan Modra <firstname.lastname@example.org>:
> >> I think this is wrong. You should never be applying a relocation
> >> against a symbol defined in an IR section. If you are, then either ld
> >> has failed to redefine the symbol properly when given a real
> >> definition in LTO output, or gcc has failed to supply the real
> >> definition. Either way, you shouldn't hide this error.
> > Well, it might be wrong, if we assume that all objects are seen by IR.
> > That isn't the case for now. By this it happens (I can sent you test
> > for this issue offline - it is a bit too big and complex to do for it
> > a binutils testcase, if you are intetested) in cases that within a
> > used library the same object (call it x) as additional specified on
> > command-line is specified. Here the object-file x on command-line
> > gets resolved later, so that IR assumes it has an IRONLY symbol from
> > its library version of x, but later on when the object x from
> > command-line is finally linked, the IR version of x is getting
> > discarded. By this any function reference in library to a symbol of
> > library's object x version, are pointing to discarded version, This
> > doesn't cause troubles, as on final linking the already linked
> > object-references are used instead. Actually they aren't
> > multiple-times linked, just once.
Your argument hasn't convinced me to approve your patch. I still
believe it is wrong to ignore *all* relocs against symbols defined in
IR sections, as your patch does. It might be reasonable to ignore
some, as the ELF linker does for relocs in debug or other special
Australia Development Lab, IBM