[Bug target/32219] optimizer causes wrong code in pic/hidden/weak symbol checking.
pluto at agmk dot net
gcc-bugzilla@gcc.gnu.org
Sat Feb 23 21:10:00 GMT 2008
------- Comment #5 from pluto at agmk dot net 2008-02-23 21:09 -------
(In reply to comment #3)
> (In reply to comment #2)
>
> > Also you should be using -PIE when linking.
>
> hmm, it doesn't work with int main();
>
> $ gcc -s main.c -fpie -Wl,-pie
> /usr/bin/ld: /usr/lib64/crt1.o: relocation R_X86_64_32S against
> `__libc_csu_fini' can not be used when making a shared object;
> recompile with -fPIC
> /usr/lib64/crt1.o: could not read symbols: Bad value
> collect2: ld returned 1 exit status
>
> huh, glibc bug, linker bug?
with gcc-4.2.3 and binutils-2.18.50.0.4 it links fine.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32219
More information about the Gcc-bugs
mailing list