libdwarf build failure with hardened builds

Moez Roy moez.roy at
Thu Mar 12 17:55:40 UTC 2015

On Thu, Mar 12, 2015 at 1:46 AM, Tom Hughes <tom at> wrote:
> 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

What is interesting about this is it built successfully for x86_64 but
failed for i686.

More information about the devel mailing list