This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
-fno-stack-protector not ensuring binary compatibility
- From: PÃdraig Brady <P at draigBrady dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 27 Aug 2007 17:29:28 +0100
- Subject: -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.