This is the mail archive of the
mailing list for the binutils project.
Re: Set dynamic tag VMA and size from dynamic section when possible
- From: Alan Modra <amodra at gmail dot com>
- To: Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- Cc: binutils at sourceware dot org, Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Date: Thu, 9 Jun 2016 15:21:16 +0930
- Subject: Re: Set dynamic tag VMA and size from dynamic section when possible
- Authentication-results: sourceware.org; auth=none
- References: <20160513051802 dot GJ2111 at bubble dot grove dot modra dot org> <8005a199-a003-f074-8232-a418c67dc23e at 0x04 dot net>
On Wed, Jun 08, 2016 at 05:46:48PM +0200, Marcin KoÅcielnicki wrote:
> On 13/05/16 07:18, Alan Modra wrote:
> >Rather than searching the output for a specific named section, it's
> >better, where possible, to use a linker created dynamic section to set
> >a dynamic tag's value. That way ld doesn't depend on the output
> >section name, making it possibile to map dynamic sections differently.
> >The ARM backend used to report an error on a missing .rel.plt output
> >section. That no longer happens, because merging .rel.plt into
> >.rel.dyn is now supported. I've updated the testcase that used to
> >check for an error, to instead check that dynamic relocs and tags
> >are correct.
> This silently breaks linking glibc on s390 (and any other shared library
> involving local STT_GNU_IFUNC) - .rela.plt and .rela.iplt are distinct
> linker sections, and DT_PLTRELSZ now includes only .rela.plt, so ld.so
> doesn't see R_390_IRELATIVE relocations at all. I'll fix s390 (by including
> irelplt as well as srelplt in the calculation), but I'm going to guess some
> other architectures are affected as well.
Apologies for the breakage. The other targets that might be affected
are those with IREL_IN_PLT set in ld/emulparams/*, which is just
aarch64, x86 and x86_64. x86 and x86_64 are OK due to only using
.rel[a].iplt in static executables. aarch64 appears to not support
Australia Development Lab, IBM