This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Expand PIC calls without PLT with -fno-plt
- From: Michael Matz <matz at suse dot de>
- To: Rich Felker <dalias at libc dot org>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, Alexander Monakov <amonakov at ispras dot ru>, Jakub Jelinek <jakub at redhat dot com>, Jeff Law <law at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 11 May 2015 13:48:03 +0200 (CEST)
- Subject: Re: [PATCH] Expand PIC calls without PLT with -fno-plt
- Authentication-results: sourceware.org; auth=none
- References: <5547AF7C dot 9030500 at redhat dot com> <alpine dot LNX dot 2 dot 11 dot 1505061730460 dot 22867 at monopod dot intra dot ispras dot ru> <20150506154554 dot GZ1751 at tucnak dot redhat dot com> <alpine dot LNX dot 2 dot 11 dot 1505061939240 dot 22867 at monopod dot intra dot ispras dot ru> <20150506173521 dot GJ17573 at brightrain dot aerifal dot cx> <CAMe9rOqDZyY-UTb8xW4OM7ZbW7p_W5w7Vk7Pbh07vAechqj2Nw at mail dot gmail dot com> <20150506183735 dot GK17573 at brightrain dot aerifal dot cx> <CAMe9rOoxbn33SwXCmHcwYL87t4_JgxgHtT6HSECtFguyLQpxKw at mail dot gmail dot com> <20150506190128 dot GL17573 at brightrain dot aerifal dot cx> <CAMe9rOokRzVkeaaeXYwFhnPLjnfKw+QUiJC1nEgGM05fDy-zMQ at mail dot gmail dot com> <20150506191750 dot GM17573 at brightrain dot aerifal dot cx>
Hi,
On Wed, 6 May 2015, Rich Felker wrote:
> I don't see how this case is improved unless GCC is failing to consider
> strong definitions in the same TU as locally-binding.
Interposition of non-static non-inline non-weak symbols is supported
independend of if they are defined in the same TU or not (if you're
producing a shared lib, that is). I.e. no, they are not considered
locally-binding (for instance, they aren't automatically inlined).
> If this is the case, is there a reason for that behavior?
Because IMHO interposition is orthogonal to TU placement, and hence
shouldn't be influenced by it. There's visibility, inline hints or
static-ness to achieve different effects. (perhaps the real reason is:
because it always worked like that :) )
> IMO it's wrong.
Why? I think it's right.
Ciao,
Michael.