.debug_macro

Sebastian Huber sebastian.huber@embedded-brains.de
Thu Jun 21 11:24:00 GMT 2012


Hi,

I use Binutils  2.22.52.20120621.  I encountered an error in the G++ 4.8 
testsuite on ARM:

/home/sh/git-rtems-testing/gcc/b-arm-gcc/gcc/testsuite/g++/../../g++ 
-B/home/sh/git-rtems-testing/gcc/b-arm-gcc/gcc/testsuite/g++/../../ 
/home/sh/archive/gcc-4.8-20120617/gcc/testsuite/g++.dg/debug/debug4.C g++_tg.o 
-fno-diagnostics-show-caret -nostdinc++ 
-I/home/sh/git-rtems-testing/gcc/b-arm-gcc/arm-rtems4.11/libstdc++-v3/include/arm-rtems4.11 
-I/home/sh/git-rtems-testing/gcc/b-arm-gcc/arm-rtems4.11/libstdc++-v3/include 
-I/home/sh/archive/gcc-4.8-20120617/libstdc++-v3/libsupc++ 
-I/home/sh/archive/gcc-4.8-20120617/libstdc++-v3/include/backward 
-I/home/sh/archive/gcc-4.8-20120617/libstdc++-v3/testsuite/util 
-fmessage-length=0 -gdwarf-2 -g3 -O2 -isystem 
/home/sh/git-rtems-testing/gcc/b-arm-gcc/arm-rtems4.11/./newlib/targ-include 
-isystem /home/sh/archive/gcc-4.8-20120617/newlib/libc/include -mcpu=arm7tdmi 
-B/home/sh/install-4.8-20120617/arm-rtems4.11/edb7312/lib/ -specs bsp_specs 
-qrtems -B/home/sh/git-rtems-testing/gcc/b-arm-gcc/arm-rtems4.11/./newlib/ 
-L/home/sh/git-rtems-testing/gcc/b-arm-gcc/arm-rtems4.11/./newlib 
/home/sh/git-rtems-testing/gcc/b-arm-gcc/rtems_gcc_main.o 
-L/home/sh/git-rtems-testing/gcc/b-arm-gcc/arm-rtems4.11/./libstdc++-v3/src/.libs 
-B/home/sh/git-rtems-testing/gcc/b-arm-gcc/arm-rtems4.11/./libstdc++-v3/src/.libs 
-Wl,-wrap,exit -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort -lm -o debug4.exe 
-Wl,-Map,debug4.map -save-temps
/opt/rtems-4.11/bin/arm-rtems4.11-ld: debug4.exe section `.unexpected_sections' 
will not fit in region `UNEXPECTED_SECTIONS'
/opt/rtems-4.11/bin/arm-rtems4.11-ld: region `UNEXPECTED_SECTIONS' overflowed 
by 2053 bytes
collect2: error: ld returned 1 exit status

This is because my linker command file contains

SECTIONS {
   [...]
   .unexpected_sections : { *(*) } > UNEXPECTED_SECTIONS
}

to catch all unexpected sections.

The unexpected section is this:

objdump -h debug4.o
[...]
  10 .debug_macro  00000804  00000000  00000000  0000019d  2**0
                   CONTENTS, RELOC, READONLY, DEBUGGING
[...]

The standard linker command file has no hint. A "arm-rtems4.11-ld --verbose | 
grep debug_macro" yields nothing.

I added this line to my linker command file:

   .debug_macro    0 : { *(.debug_macro) }

Is this the right fix?  If it is ok, then why doesn't the standard linker 
command file have it?

-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the Binutils mailing list