Making x86_64 PLT elision configurable
Florian Weimer
fweimer@redhat.com
Wed Sep 5 19:18:00 GMT 2018
On 09/05/2018 06:16 PM, Nick Clifton wrote:
> I would like to add a run time option, with a configurable default,
> which would stop the linker from optimizing away x86_64 PLT entries.
> The reason being that certain tools like ltrace and rtld-audit rely
> upon global symbols having PLT entries that they can intercept. When
> these entries are optimized away, the tools stop working.
>
> I get that having these PLT entries might slow the program down, but I
> think that a user should be able to choose whether the speed of the
> linked binary is more important that being able to use the tools on
> it. And toolchain builders ought to be able to decide the default
> behaviour for their linker.
If we look at this problem differently (and had effectively unbounded
time), we could pick up the work on address significance tables and
teach the dynamic linker to synthesize a stub whenever a non-significant
address relocation is used (to record the who-calls-what information),
and use a generic stub which only has what-is-called information for
address-significant relocations.
Thanks,
Florian
More information about the Binutils
mailing list