Binutils, its testcases and -fstack-protector-all

Peter Hjalmarsson
Fri May 14 19:11:00 GMT 2010


If you:
export CC="gcc"
export CFLAGS="-march=native -pipe -O2 -fstack-protector-all"
cd binutils
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
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?

Peter Hjalmarsson

More information about the Binutils mailing list