[arm-gnu] .debug_type missing from elf output

Carlos O'Donell carlos_odonell at mentor.com
Thu Apr 12 05:31:34 UTC 2012


On 4/12/2012 12:29 AM, Leo Havmøller wrote:
> Thank you for your response.
> 
> I have tested with the compiler/linker options used in the real project, and found that --gc-sections is the curprit.
> 
> If you use:
> arm-none-eabi-gcc -gdwarf-4 -Wl,--gc-sections -T generic-hosted.ld -o test test.c arm-none-eabi-readelf -a test | grep types
> Then the .debug_types section is missing from the elf output.

Add this to keep it from being discarded.

  /* DWARF 4 */
  .debug_types 0 : { KEEP (*(.debug_types)) }

I don't know why the linker would cull this.

I've filed an internal issue for this.

Cheers,
Carlos.
-- 
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos_odonell at mentor.com
carlos at codesourcery.com
+1 (613) 963 1026



More information about the arm-gnu mailing list