Bug 679 - ld failed to support protected data symbols
Summary: ld failed to support protected data symbols
Status: RESOLVED FIXED
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-01-19 00:02 IST by H.J. Lu
Modified: 2006-01-29 16:06 IST (History)
1 user (show)

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


Attachments
A testcase (418 bytes, application/octet-stream)
2005-01-19 00:03 IST, 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-01-19 00:02:19 IST
_bfd_elf_symbol_refs_local_p treats all STV_PROTECTED symbols as
dynamic to support function pointer equality tests. It doesn't work
with protected data symbols on x86_64.
Comment 1 H.J. Lu 2005-01-19 00:03:46 IST
Created attachment 375 [details]
A testcase

[hjl@gnu-20 x86_64-2]$ make
gcc -B./ -fPIC	 -c -o x.o x.c
ld -shared -o libx.so x.o
ld: x.o: relocation R_X86_64_PC32 against `_memcpy_mem_ops_method' can not be
used when making a shared object; recompile with -fPIC
ld: final link failed: Bad value
make: *** [libx.so] Error 1
Comment 2 H.J. Lu 2005-01-19 00:27:58 IST
A patch is posted at

http://sources.redhat.com/ml/binutils/2005-01/msg00232.html
Comment 3 H.J. Lu 2005-03-02 18:35:24 IST
Fixed.
Comment 4 Per Steinar Iversen 2006-01-20 11:41:48 IST
This problem seems to be present still in AS4 U2, it appeared when installing
Oracle 10.2.0.1.0 on a fully updated machine. As an experiment I rebuilt
binutils with the patch from the binutils list and Oracle then installed without
any complaints.

There is a reference to this bug here, at the bottom of the page:

http://www.puschitz.com/InstallingOracle10g.shtml
Comment 5 H.J. Lu 2006-01-29 16:06:15 IST
This bug database is for the FSF binutils. Please report your Red Hat
binutils problem to Red Hat.