gsfgf ggfgf
|
How do I build applications with stack smashing protection?
|
gsfgf ggfgf
09/18/2013 7:56 AM
post105194
|
How do I build applications with stack smashing protection?
Hi,
I am having difficulties compiling binaries with stack smashing protection.
I am using the -fstack-protector-all flag to gcc. I receive the following error:
/opt/qnx650/host/linux/x86/usr/bin/ntoarm-ld: cannot find -lssp_nonshared
After some searching, it seems that the __stack_chk_fail and __stack_chk_guard symbols are defined in libc.so/libc.a,
rather than in seperate libssp libraries. I experimented with creating symlinks to libc for the libraries. If I do that
then it compiles and runs except in two (important) cases. A: if I build with -Wl,-z,now:
ldd:FATAL: Attempt to call unresolved object: Executable
ldd:FATAL: Attempt to call unresolved object: Executable
ldd:FATAL: Attempt to call unresolved object: Executable
Or B: this error if it's linked against a similarly built library:
ldd:FATAL: Unresolved symbol "__umoddi3" called from libtestlib.so
Target OS is QNX 6.5.0 on armle arch. Toolchain is from QNX momentics 6.5.0SP1.
Thanks
Sass
|
|
|