This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/32219] optimizer causes wrong code in pic/hidden/weak symbol checking.
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Feb 2008 22:16:17 -0000
- Subject: [Bug target/32219] optimizer causes wrong code in pic/hidden/weak symbol checking.
- References: <bug-32219-7667@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from hjl dot tools at gmail dot com 2008-02-25 22:16 -------
It is a compiler bug after all. From:
http://groups.google.com/group/generic-abi/browse_thread/thread/4364eb484397ebe0
A hidden symbol must be defined in the same component, *if it is
defined at all*. That last part is the key to the issue. In the case
of a WEAK HIDDEN UNDEF symbol, it is possible for the symbol to remain
undefined (or, looked at another way, it is possible for the symbol to
be defined at link time as an absolute symbol with value 0). I agree
with Daniel; the compiler should be aware of this possibility and
generate code that will not require a dynamic relocation for this case.
For a weak and hidden symbol, it is bound local only if PIC is false or
it is used for branch. Otherwise, it should be treated with default
visibility.
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
Version|4.2.1 |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32219