-snip- #include <stdio.h> main() { printf ("Hello World!\n"); } -snip- $ gcc -save-temps -fstack-protector -fPIE hello.c -o hello $ ./hello $ Hello World! $ gcc -save-temps -fstack-protector-all -fPIE helloall.c -o helloall $ ./helloall $ Segmentation fault
helloall.s segfaults, hello.s runs fine. if -fstack-protector isn't to be supported on arm, it gcc should ignore the option like done on mips/mipsel. Package source: gcc-4.3 GCC version: 4.3.1 Base Debian version: 4.3 Configured with: -v --with-pkgversion='Debian 4.3.0-3' --with-bugurl='file:///usr/share/doc/gcc-4.3/README.Bugs' --enable-languages=c,c++,fortran,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-libffi --enable-mpfr --disable-libssp --disable-sjlj-exceptions --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi Target: arm-linux-gnueabi Configured with: ../src/configure linux gnueabi Thread model: posix gcc version 4.3.1 20080401 (prerelease) (Debian 4.3.0-3) -- Summary: -fstack-protector produces segfaulting binaries on arm/armel Product: gcc Version: 4.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: riku dot voipio at iki dot fi GCC build triplet: arm-linux-gnueabi GCC host triplet: arm-linux-gnueabi GCC target triplet: arm-linux-gnueabi http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35965