This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/12156] New: ARM libraries do not have unique function pointers
- From: "drow at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2003 17:53:24 -0000
- Subject: [Bug target/12156] New: ARM libraries do not have unique function pointers
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12156
Summary: ARM libraries do not have unique function pointers
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: drow at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: armv5tel-unknown-linux-gnu
GCC target triplet: armv5tel-unknown-linux-gnu
Non-call references to a function in a PIC library are always supposed
to load its address from the GOT, so that the function pointer will
point to the PLT stub in the application. This lets the function pointer
be compared from within other objects. Tests for this are in the GNU ld
testsuite, in ld-elfvsb. (You need to run the testsuite natively on an
ELF target to see these, in 2.14. I think some of them will run on the sim
now?)
Loads of a function pointer (see shlib_shlibvar1 in ld-elfvsb/sh1.c) emit
GOTOFF references. These bypass the GOT and access the function's start
PC-relatively based on the GOT address. This causes a number of failures
in the binutils testsuite on arm-linux.