http://sourceware.org/bugzilla/show_bug.cgi?id=13560
Bug #: 13560 Summary: DWARF2 .debug_info section not found if placed after .debug_line and .debug_abbrev sections Product: binutils Version: 2.22 Status: NEW Severity: normal Priority: P2 Component: binutils AssignedTo: unassig...@sourceware.org ReportedBy: lionel.am...@cegetel.net Classification: Unclassified Created attachment 6144 --> http://sourceware.org/bugzilla/attachment.cgi?id=6144 dcc DWARF2 object file Hi, I am generating powerpc code with dcc (aka Wind River diab compiler) version 5.6.1.0. Resulting sections list is like this one : readelfppc -S toto.o There are 12 section headers, starting at offset 0x1a98: Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .text PROGBITS 00000000 000038 00037c 00 AX 0 0 4 [ 2] .debug_line NOTE 00000000 0003b8 0000ed 00 0 0 1 [ 3] .debug_abbrev NOTE 00000000 0004a8 0000a9 00 0 0 1 [ 4] .debug_info NOTE 00000000 000558 0007a4 00 0 0 1 [ 5] .debug_frame PROGBITS 00000000 000d00 00002c 00 0 0 1 [ 6] .strtab STRTAB 00000000 000d30 000346 00 0 0 1 [ 7] .symtab SYMTAB 00000000 001078 0001c0 10 6 10 1 [ 8] .rela.text RELA 00000000 001238 0004ec 0c 7 1 1 [ 9] .rela.debug_info RELA 00000000 001728 00033c 0c 7 4 1 [10] .rela.debug_frame RELA 00000000 001a68 000018 0c 7 5 1 [11] .rela.debug_line RELA 00000000 001a80 000018 0c 7 2 1 I cannot strip debug information from it (recompiled binutils 2.22 package on cygwin) : strip-new -v -S toto.o copy from `toto.o' [elf32-powerpc] to `st3A03Ru' [elf32-powerpc] BFD: st3A03Ru: symbol `.debug_info' required but not present This message comes from : ./bfd/elf.c:5324: (_("%B: symbol `%s' required but not present"), If I list sections from one gcc 4.0.4 sun/solaris object (also a DWARF2 object), I get these list/order of sections : readelfppc -S asc2bin.o There are 18 section headers, starting at offset 0xe0c: Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .shstrtab STRTAB 00000000 000034 0000da 00 0 0 1 [ 2] .text PROGBITS 00000000 000110 0003c8 00 AX 0 0 4 [ 3] .rodata PROGBITS 00000000 0004d8 000028 00 A 0 0 8 [ 4] .compcom PROGBITS 00000000 000500 000022 00 0 0 8 [ 5] .debug_info PROGBITS 00000000 000522 000358 01 0 0 1 [ 6] .debug_line PROGBITS 00000000 00087a 0000ba 01 0 0 1 [ 7] .debug_abbrev PROGBITS 00000000 000934 0000b4 01 0 0 1 [ 8] .debug_pubnames PROGBITS 00000000 0009e8 00001c 01 0 0 1 [ 9] .debug_typenames PROGBITS 00000000 000a04 000034 01 0 0 1 [10] .symtab SYMTAB 00000000 000a38 000160 10 A 11 12 4 [11] .strtab STRTAB 00000000 000b98 000055 00 A 0 0 1 [12] .rela.text RELA 00000000 000bf0 0000f0 0c A 10 2 4 [13] .rela.debug_info RELA 00000000 000ce0 000030 0c A 10 5 4 [14] .rela.debug_line RELA 00000000 000d10 00000c 0c A 10 6 4 [15] .rela.debug_pubna RELA 00000000 000d1c 00000c 0c A 10 8 4 [16] .rela.debug_typen RELA 00000000 000d28 00000c 0c A 10 9 4 [17] .comment PROGBITS 00000000 000d34 0000d8 00 0 0 1 I suspect that dcc objects not having .debug_info section as the first .debug* one are preventing binutils from finding it correctly. I cannot try my 'compiled' strip-new.exe command on it as my exe does not handle elf32-sparc files type. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils