This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-fno-stack-protector not ensuring binary compatibility


Hi,

I'm trying to compile a binary on Fedora 7
and have it work on older systems:
$ rpm -q gcc glibc
gcc-4.1.2-12
glibc-2.6-3

Now I want to link statically against libcrypto (from openssl),
but I think however the static libcrypto is pulling in
references to stack_chk_fail (possibly through libz):
$ nm lincense | grep -F stack_chk_fail
         U __stack_chk_fail@@GLIBC_2.4
080b9e50 T __stack_chk_fail_local

The error on the older system is:
./prog: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.4' not found (required by ./prog)

The compiler command is:
gcc prog.c -o prog -lz -ldl -Wl,--hash-style=sysv -Wl,-Bstatic -lcrypto -Wl,-Bdynamic

any ideas appreciated.

cheers,
PÃdraig.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]