This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/55012] Protected visibility wrongly uses GOT-relative addresses
- From: "bugdal at aerifal dot cx" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 21 Oct 2012 22:06:39 +0000
- Subject: [Bug target/55012] Protected visibility wrongly uses GOT-relative addresses
- Auto-submitted: auto-generated
- References: <bug-55012-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55012
--- Comment #1 from Rich Felker <bugdal at aerifal dot cx> 2012-10-21 22:06:39 UTC ---
I'm not sure whether the fix should be in gcc/varasm.c,
default_binds_local_p_1(), or in the config/i386/predicates.md,
local_symbolic_operand predicate.
In the former, all non-default-visibility symbols are considered "local". In
the latter, this "local" flag is used to determine that a got-relative offset
would be allowed.
If varasm.c is modified, it should be to make protected symbols considered
non-local. I don't know if this would hurt code generation on other archs that
don't use copy relocations, however.
If predicated.md is to be modified, I don't see a good way, since the
information on visibility seems to be lost at this point. Hidden symbols must
continue to be considered local, but protected ones should not.