https://sourceware.org/bugzilla/show_bug.cgi?id=30699
Nick Clifton <nickc at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nickc at redhat dot com Status|NEW |ASSIGNED Assignee|unassigned at sourceware dot org |nickc at redhat dot com --- Comment #3 from Nick Clifton <nickc at redhat dot com> --- Hi Sam, The test appears to be failing because it thinks that the .debug_macro sections, and their associated .rela.debug_macro sections do not contain debug information and as a result, should not appear (with contents) in a file that has been stripped of everything but debugging: Expected SHT_NOBITS type for .debug_macro Expected SHT_NOBITS type for .rela.debug_macro FAIL: --only-keep-debug for ELF relocatables The reason that the test thinks that these sections do not contain debug info is because they are part of a section group. The test code runs readelf over the before-being-stripped version of the file and looks for any section with either the ALLOC or GROUP flags set. Any such section found is added to a list of non-debug sections: if { $type != "NOTE" && [regexp {[AG]} $flag] } { lappend non_debug_sections $name But two of the .debug_macro sections are part of a group: [14] .debug_macro PROGBITS 0000000000000000 00070f 00001a 00 0 0 1 [15] .rela.debug_macro RELA 0000000000000000 001ed8 000048 18 I 29 14 8 [16] .debug_macro PROGBITS 0000000000000000 000730 000038 00 GC 0 0 8 [17] .rela.debug_macro RELA 0000000000000000 001f20 0028f8 18 IG 29 16 8 [18] .debug_macro PROGBITS 0000000000000000 000768 000028 00 G 0 0 1 [19] .rela.debug_macro RELA 0000000000000000 004818 000090 18 IG 29 18 8 (I assume that this is normal behaviour for gcc when it is creating .debug_macro sections). So I think that the logic in proc keep_debug_symbols_for_elf_relocatable in binutils/testsuite/binutils-all/objcopy.exp needs to be updated. Would it be possible for you to upload a copy of the unstriped version of testprog.o that is triggering these results ? The version of gcc that I am using does not generate .debug_macro sections, so I cannot test any changes that I make using my own compiler. Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug.