Bug 883 - Linker creates unnecessary R_IA64_FPTR64LSB relocations
Summary: Linker creates unnecessary R_IA64_FPTR64LSB relocations
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-27 23:05 UTC by H.J. Lu
Modified: 2005-05-09 14:51 UTC (History)
1 user (show)

See Also:
Host: ia64-unknown-linux-gnu
Target: ia64-unknown-linux-gnu
Build: ia64-unknown-linux-gnu
Last reconfirmed:


Attachments
A testcase (603 bytes, application/octet-stream)
2005-04-27 23:11 UTC, H.J. Lu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2005-04-27 23:05:42 UTC
R_IA64_FPTR64LSB is used for function pointer comparison. But linker
creates one even if it isn't needed.
Comment 1 H.J. Lu 2005-04-27 23:11:41 UTC
Created attachment 468 [details]
A testcase

[hjl@gnu-4 299]$ make tar
tar cfz bug.tar.gz Makefile *.c
[hjl@gnu-4 299]$ make -f Makefile
gcc -B./    -c -o main.o main.c
gcc -B./    -c -o sub.o sub.c
gcc -B./ -shared -fpic -o so.so so.c
gcc -B./ -o prog main.o sub.o so.so -Wl,-rpath,.
readelf -r prog | grep i_prot1
6000000000001218  000500000047 R_IA64_FPTR64LSB  4000000000000990 i_prot1 + 0
readelf -r so.so | grep i_prot1
000000010f00  001400000081 R_IA64_IPLTLSB    0000000000000000 i_prot1 + 0

R_IA64_FPTR64LSB shouldn't be needed for executable.
Comment 2 H.J. Lu 2005-05-09 14:51:08 UTC
R_IA64_FPTR64LSB is needed for function pointer reference from a
dlopened DSO.