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: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2005 03:11:38 -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 pinskia at gcc dot gnu dot org 2005-01-19 03:11 -------
The difference between non protected and protected functions is the following in the asm:
movl foo@GOT(%ebx), %eax
leal foo@GOTOFF(%ebx), %eax
but really add -fPIC to m.c make this work, so again this looks like an ld bug (maybe it is keeping the
symbol protected or something).
Or gcc is doing:
cmpl $foo, -4(%ebp)
which is not wrong in the non pic case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19520