Proetcted symbol handling bug
H. J. Lu
hjl@lucon.org
Tue May 6 00:37:00 GMT 2003
If gcc supports visibility, it will optimize protected symbol. In
case of normal call to protected function, it won't do PIC since it
won't get overridden at the run-time. However, i386 linker doesn't
do the right thing:
# make
cc -fPIC -c -o foo.o foo.c
ld -shared -o libfoo.so foo.o
readelf -d libfoo.so | grep TEXTREL; \
if [ $? = 0 ]; then exit 1; else exit 0; fi
0x00000016 (TEXTREL) 0x0
make: *** [all] Error 1
This protected symbol handling is psABI-dependent and has to be done
based on the relocation type.
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.tar.gz
Type: application/x-gzip
Size: 432 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20030506/a547b2c6/attachment.bin>
More information about the Binutils
mailing list