This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] BFD: Consider any section whose name starts with ".__abs" to be absolute.
- From: Alan Modra <amodra at gmail dot com>
- To: John Darrington <john at darrington dot wattle dot id dot au>
- Cc: binutils at sourceware dot org
- Date: Wed, 27 Jun 2018 23:05:15 +0930
- Subject: Re: [PATCH] BFD: Consider any section whose name starts with ".__abs" to be absolute.
- References: <1529771681-22770-1-git-send-email-john@darrington.wattle.id.au> <1529771681-22770-2-git-send-email-john@darrington.wattle.id.au> <20180623164035.GA22944@jocasta.intra> <20180626053519.GA3404@bubble.grove.modra.org> <20180627112240.GA27796@jocasta.intra>
On Wed, Jun 27, 2018 at 01:22:40PM +0200, John Darrington wrote:
> On Tue, Jun 26, 2018 at 03:05:20PM +0930, Alan Modra wrote:
> On Sat, Jun 23, 2018 at 06:40:35PM +0200, John Darrington wrote:
> > The relocatable ELF files produced by the compiler of a major semiconductor
> > manufactoror does not put absolute symbols into the *ABS* section.
> > Instead, each seems to have its own section whose name starts with .__absdata_
> >
> > This causes ld to mislink such files. This patch seems to fix the problem.
> > It doesn't seem like an elegant solution, but then it isn't an elegant problem...
>
> No, that isn't the right way. Investigate elf_add_symbol_hook.
>
> After quite a bit of investigation, I concluded that this hook is always ignored
> unless one also defines elf_backend_relocate_sections - which would open up a huge
> can of worms.
Ah, you're using the generic linker. In that case you might need to
look at tweaking the symbol with elf_backend_symbol_processing.
--
Alan Modra
Australia Development Lab, IBM