libdwarf build failure with hardened builds

Tom Hughes tom at
Thu Mar 12 08:46:28 UTC 2015

Does anybody have any clue what's going on here:

It's an update to libdwarf, but the actual cause appears to be that it 
doesn't like the new hardened build options. It's a glibc symbol that it 
seems to be complaing about though:

   /usr/bin/ld: dwgetopt.o: relocation R_386_GOTOFF against undefined 
symbol `optopt@@GLIBC_2.0' can not be used when making a shared object

The dwgetopt.o file appears to have been been correctly build with the 
hardening flags:

   gcc  -O2 -g -pipe -Wall -Werror=format-security 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong 
--param=ssp-buffer-size=4 -grecord-gcc-switches 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 
-mtune=atom -fasynchronous-unwind-tables -I. -I. -I./../libdwarf 
-DCONFPREFIX=/usr/local/lib  -c ./dwgetopt.c


Tom Hughes (tom at

More information about the devel mailing list