This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] x86: Generate PLT relocations for -z now
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, binutils at sourceware dot org, GNU C Library <libc-alpha at sourceware dot org>
- Cc: nd at arm dot com
- Date: Thu, 11 May 2017 13:24:10 -0400
- Subject: Re: [PATCH] x86: Generate PLT relocations for -z now
- Authentication-results: sourceware.org; auth=none
- References: <20170508202153.GA28618@intel.com> <146b87ef-0c8c-c829-18e1-41db38df5fd1@redhat.com> <591431AE.6000201@arm.com>
On 05/11/2017 05:41 AM, Szabolcs Nagy wrote:
> i think this is not a binutils issue,
> gcc can do an optimization to load
> foo from the got and call it indirectly
> and later return it, then the linker
> has no chance to emit plt reloc for foo.
I do not disagree with you.
Function pointers are a blind spot in PLT-based auditing, and
some day we might be able to solve that.
That does not mean we should continue to erode that support
without having a discussion.
If we are going to deprecate LD_AUDIT, LD_PROFILE, and ltrace,
what do we replace them with? Are those replacements mature
technology?
Keep in mind that LD_AUDIT has worked fora long time and it's
only in binutils 2.26 where we've started to introduce
non-optional optimizations that might break things.
> this is why i said plt should not be
> considered part of the abi because it's
> unreliable anyway
That is not true. You need to think big and consider yourself
part of a large GNU community. We are not isolated silos.
The GNU implementation includes a compiler, linker, and dynamic
loader, and all of these parts can collude to provide a better
than average developer experience.
We made PLTs part of the implementation by implementing LD_AUDIT,
LD_PROFILE, and by supporting ltrace.
--
Cheers,
Carlos.