[Bug driver/7516] Ambiguous driver behaviour with "-shared -static" cmd line options combination
pluto at agmk dot net
gcc-bugzilla@gcc.gnu.org
Thu May 4 13:21:00 GMT 2006
------- Comment #3 from pluto at agmk dot net 2006-05-04 13:21 -------
(In reply to comment #0)
> $ ldd ./libfoo.so
> /lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x40003000)
> libc.so.6 => /lib/i686/libc.so.6 (0x40015000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)
>
> *** This is not what expected! ***
i'm using a little workaround:
gcc libfoo.c -o libfoo.so -shared -fPIC \
-nodefaultlibs -Wl,-Bstatic -lc -lgcc -lgcc_eh -lc
$ ldd libfoo.so
statically linked
$ file libfoo.so
libfoo.so: ELF 64-bit LSB shared object, AMD x86-64,
version 1 (SYSV), not stripped
--
pluto at agmk dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7516
More information about the Gcc-bugs
mailing list