This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19520] protected function pointer doesn't work right
- From: "hjl at lucon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2005 01:47:58 -0000
- Subject: [Bug target/19520] protected function pointer doesn't work right
- References: <20050119002432.19520.hjl@lucon.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From hjl at lucon dot org 2005-01-19 01:47 -------
Please take a closer look at the testcase. It is different from
bug 10908. Basically, main executable and DSO see different
function pointer values for the SAME function. From the linker
/* Will references to this symbol always reference the symbol
in this object? STV_PROTECTED is excluded from the visibility test
here so that function pointer comparisons work properly. Since
function symbols not defined in an app are set to their .plt entry,
it's necessary for shared libs to also reference the .plt even
though the symbol is really local to the shared lib. */
On many architectures, the function pointer != the address of the function
body.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|DUPLICATE |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19520