Take the 2-minute tour ×

On my system when I compile something (with bfin-linux-uclibc-g++ but that is irrelevant), I get hundreds of warnings (not in my own code base) with respect to one of the compiler flags. I want to disable it.

fde encoding in src/SpiMessageUtil.o(.eh_frame) prevents .eh_frame_hdr table being created.

This orginates from a default gcc flag which is handed over to the linker, which is easy to check by adding '-v' to the compilation step:

COLLECT_GCC_OPTIONS=... --eh-frame-hdr ...

I would like to get rid of this option, which is indeed by default defined:

bfin-linux-uclibc-g++ -dumpspecs | grep frame-hdr
%{mfdpic: -m elf32bfinfd -z text} %{shared} %{pie}   \
%{static:-dn -Bstatic}   %{shared:-G -Bdynamic}   \
%{!shared: %{!static:    %{rdynamic:-export-dynamic}    \
  %{!dynamic-linker:-dynamic-linker \
     %{mglibc:%{muclibc:%e-mglibc and -muclibc used together;:%e-mglibc not supported for this target};:/lib/ld-uClibc.so.0 \
%{static}} -init __init -fini __fini

How can I override this option? I cannot use -Wl,--no-eh-frame-hdr, because there is nothing like that defined.

share|improve this question
I disabled the option by this: strace /opt/uClinux/bfin-linux-uclibc/bin/bfin-linux-uclibc-gcc 2>&1 | grep -i spec, go to one of these directories, bfin-linux-uclibc-g++ -dumpspecs > specs and manually update the specs file there. Looks ugly though. Removing the flag does not get rid of the warnings, but seems to be a bug (see patch 22 Jan. 2013): sourceware.org/ml/binutils/2013-01/msg00333.html. Is this indeed how you're supposed to do this, or is there a more beautiful way? –  Anne van Rossum Jun 4 '13 at 8:29
add comment


Your Answer



Browse other questions tagged or ask your own question.