This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/54182] -fvisibility=hidden shouldn't be disabled with -fPIE -pie
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 11 Aug 2012 07:32:52 +0000
- Subject: [Bug other/54182] -fvisibility=hidden shouldn't be disabled with -fPIE -pie
- Auto-submitted: auto-generated
- References: <bug-54182-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54182
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |INVALID
--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-08-11 07:32:52 UTC ---
It is not a bug and not everyone wants the same as you, e.g. you can't refer to
symbols in the PIE from plugins if you do. When compiling PIE executables, you
shouldn't be using the -fPIC/-fpic flag, but -fPIE/-fpie instead, which works
similarly to -fvisibility=hidden in that references to those symbols are
cheaper (can use GOT/IP relative addressing on many architectures), but the
symbols are still exported. Please stop reopening.