This is the mail archive of the
mailing list for the GCC project.
Re: Add flag to optionally ignore ELF interposition
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 20 May 2014 21:44:50 +0000
- Subject: Re: Add flag to optionally ignore ELF interposition
- Authentication-results: sourceware.org; auth=none
- References: <20140520200432 dot GA609 at kam dot mff dot cuni dot cz>
On Tue, 20 May 2014, Jan Hubicka wrote:
> as disucssed some time ago, our assumption that every symbol of shared library can
> be interposed at runtime is expensive and prevents a lot of useful optimizations,
> including inlining or IPA propagation.
> While this is useful feature, it is rather incommon to use it for bigger C++
> projects, like firefox and at least clang seems to ignore the ELF interposition
> rules and always inline/propagate. This patch adds flag to control the behaviour.
> Symbols explicitly delcared WEAK are still considered as interposable.
I could see a use for an option listing the symbols that can be
interposed. (For example, glibc supports interposition of a limited
number of malloc-related symbols, but if it were made to support building
with LTO in future that it would make sense to be able to optimize calls
to most other functions.)
Joseph S. Myers