This is the mail archive of the 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: Set dynamic tag VMA and size from dynamic section when possible

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
> 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
ifunc yet.

Alan Modra
Australia Development Lab, IBM

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