Binutils, its testcases and -fstack-protector-all

Peter Hjalmarsson xake@rymdraket.net
Fri May 14 19:11:00 GMT 2010


Hello.

If you:
export CC="gcc"
export CFLAGS="-march=native -pipe -O2 -fstack-protector-all"
cd binutils
./configure 
make
make check

you will get:

Running binutils/ld/testsuite/ld-elfvsb/elfvsb.exp ...
FAIL: common hidden symbol
FAIL: weak hidden symbol DSO last
FAIL: weak hidden symbol DSO first


This because if you compile a object with -fstackprotector-all it needs
to link against libc. Now as I see it there are three ways to handle
this:
1. somehow make gcc compile this test with -fno-stack-protector 
2. somehow make ld link this test against libc
3. tell users to not compile binutils with -fstack-protector-all if you
want to run the testsuit

What sound like a good thing?

Regards
Peter Hjalmarsson



More information about the Binutils mailing list