https://sourceware.org/bugzilla/show_bug.cgi?id=33243
Bug ID: 33243 Summary: gnu-debuglink (objdump 1) FAILs on Solaris/amd64 Product: binutils Version: 2.46 (HEAD) Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: ro at gcc dot gnu.org Target Milestone: --- Target: amd64-pc-solaris2.11 The "gnu-debuglink (objdump 1)" test FAILs on Solaris/amd64 (only, i386, sparc, and sparcv9 are fine): FAIL: gnu-debuglink (objdump 1) The failure is spawn -ignore SIGHUP diff tmpdir/testprog.dump tmpdir/testprog.compress.dump 30c30,32 < 400660: ff 35 b2 05 20 00 ff 25 b4 05 20 00 0f 1f 40 00 .5.. ..%.. ...@. --- > 400660: ff 35 b2 05 20 00 push 0x2005b2(%rip) # 600c18 > <_GLOBAL_OFFSET_TABLE_+0x8> > 400666: ff 25 b4 05 20 00 jmp *0x2005b4(%rip) # 600c20 > <_GLOBAL_OFFSET_TABLE_+0x10> > 40066c: 0f 1f 40 00 nopl 0x0(%rax) i.e. in the first case (objdump -d testprog), the PLT of the original executable isn't disassembled while in the second (objdump -d -WK, on the output of objcopy --add-gnu-debuglink=testprog.compress testprog.strip testprog) it is. I couldn't make much sense of that. Running a debug build of objdump under gdb shows that in objdump.c (disassemble_section), l.4091, insns is set differently: without -WK: with -WK: insn false true disassemble_all false false sym != NULL != NULL sym->section 0x905af0 0x90d310 == != section 0x905af0 0x905af0 without -WK: (gdb) p *sym->section $17 = {name = 0x906ad4 ".plt", next = 0x905c18, prev = 0x9059c8, id = 25, section_id = 0, index = 9, flags = 283, user_set_vma = 1, linker_mark = 0, linker_has_input = 0, gc_mark = 0, compress_status = 0, segment_mark = 0, sec_info_type = 0, use_rela_p = 1, mmapped_p = 0, alloced = 0, sec_flg0 = 0, sec_flg1 = 0, sec_flg2 = 0, sec_flg3 = 0, sec_flg4 = 0, sec_flg5 = 0, vma = 4195936, lma = 4195936, size = 96, rawsize = 0, compressed_size = 0, output_offset = 0, output_section = 0x0, relocation = 0x0, orelocation = 0x0, reloc_count = 0, alignment_power = 4, filepos = 1632, rel_filepos = 0, line_filepos = 0, userdata = 0x0, contents = 0x0, lineno = 0x0, lineno_count = 0, entsize = 0, kept_section = 0x0, moving_line_filepos = 0, target_index = 0, used_by_bfd = 0x907770, constructor_chain = 0x0, owner = 0x901610, symbol = 0x9078e0, map_head = { link_order = 0x0, s = 0x0, linked_to_symbol_name = 0x0}, map_tail = { link_order = 0x0, s = 0x0, linked_to_symbol_name = 0x0}, already_assigned = 0x0, type = 0} with -WK: (gdb) p *sym->section $28 = {name = 0x921184 ".plt", next = 0x90d438, prev = 0x90d1e8, id = 77, section_id = 0, index = 9, flags = 25, user_set_vma = 1, linker_mark = 0, linker_has_input = 0, gc_mark = 0, compress_status = 0, segment_mark = 0, sec_info_type = 0, use_rela_p = 1, mmapped_p = 0, alloced = 0, sec_flg0 = 0, sec_flg1 = 0, sec_flg2 = 0, sec_flg3 = 0, sec_flg4 = 0, sec_flg5 = 0, vma = 4195936, lma = 4195936, size = 96, rawsize = 0, compressed_size = 0, output_offset = 0, output_section = 0x0, relocation = 0x0, orelocation = 0x0, reloc_count = 0, alignment_power = 4, filepos = 400, rel_filepos = 0, line_filepos = 0, userdata = 0x0, contents = 0x0, lineno = 0x0, lineno_count = 0, entsize = 0, kept_section = 0x0, moving_line_filepos = 0, target_index = 0, used_by_bfd = 0x921e68, constructor_chain = 0x0, owner = 0x903fd0, symbol = 0x921f90, map_head = { link_order = 0x0, s = 0x0, linked_to_symbol_name = 0x0}, map_tail = { link_order = 0x0, s = 0x0, linked_to_symbol_name = 0x0}, already_assigned = 0x0, type = 0} (gdb) p *section $29 = {name = 0x906ad4 ".plt", next = 0x905c18, prev = 0x9059c8, id = 25, section_id = 0, index = 9, flags = 283, user_set_vma = 1, linker_mark = 0, linker_has_input = 0, gc_mark = 0, compress_status = 0, segment_mark = 0, sec_info_type = 0, use_rela_p = 1, mmapped_p = 0, alloced = 0, sec_flg0 = 0, sec_flg1 = 0, sec_flg2 = 0, sec_flg3 = 0, sec_flg4 = 0, sec_flg5 = 0, vma = 4195936, lma = 4195936, size = 96, rawsize = 0, compressed_size = 0, output_offset = 0, output_section = 0x0, relocation = 0x0, orelocation = 0x0, reloc_count = 0, alignment_power = 4, filepos = 1632, rel_filepos = 0, line_filepos = 0, userdata = 0x0, contents = 0x0, lineno = 0x0, lineno_count = 0, entsize = 0, kept_section = 0x0, moving_line_filepos = 0, target_index = 0, used_by_bfd = 0x907770, constructor_chain = 0x0, owner = 0x901610, symbol = 0x9078e0, map_head = { link_order = 0x0, s = 0x0, linked_to_symbol_name = 0x0}, map_tail = { link_order = 0x0, s = 0x0, linked_to_symbol_name = 0x0}, already_assigned = 0x0, type = 0} i.e. in the working -WK case there are two different .plt sections while in the failing one there's only one. I'm attaching the script used to create the different versions and the save outputs. -- You are receiving this mail because: You are on the CC list for the bug.