http://sourceware.org/bugzilla/show_bug.cgi?id=13894
Bug #: 13894
Summary: ppc64 objdump -S segfault
Product: binutils
Version: 2.23 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: unassig...@sourceware.org
ReportedBy: amo...@gmail.com
Classification: Unclassified
Created attachment 6298
-- http://sourceware.org/bugzilla/attachment.cgi?id=6298
testcase
The recent changes to find function elf symbols relies on the existence of the
internal symbol hash table.
./objdump -d -S myadd.o
Disassembly of section .text:
._Z3sumii:
0: 7c 63 22 14 add r3,r3,r4
4: 4e 80 00 20 blr
8: 00 00 00 00 .long 0x0
c: 00 09 00 00 .long 0x9
10: 00 00 00 00 .long 0x0
Segmentation fault (core dumped)
elf64-ppc.c: line 5608
else
{
struct elf_link_hash_entry **sym_hashes;
struct elf_link_hash_entry *rh;
sym_hashes = elf_sym_hashes (opd_bfd); =
rh = sym_hashes[symndx - symtab_hdr-sh_info];
rh = elf_follow_link (rh);
BFD_ASSERT (rh-root.type == bfd_link_hash_defined
|| rh-root.type == bfd_link_hash_defweak);
val = rh-root.u.def.value;
sec = rh-root.u.def.section;
}
Program received signal SIGSEGV, Segmentation fault.
0x004ac1f6 in opd_entry_value (opd_sec=0x75b9e8, offset=0,
code_sec=0x7fffdc28, code_off=0x7fffdc20) at
../../src_bin/bfd/elf64-ppc.c:5614
1: x/i $pc
= 0x4ac1f6 opd_entry_value+1024: mov(%rax),%rax
(gdb) where
#0 0x004ac1f6 in opd_entry_value (opd_sec=0x75b9e8, offset=0,
code_sec=0x7fffdc28, code_off=0x7fffdc20) at
../../src_bin/bfd/elf64-ppc.c:5614
#1 0x004ac354 in ppc64_elf_maybe_function_sym (sym=0x7662a0,
code_sec=0x7fffdc28, code_off=0x7fffdc20) at
../../src_bin/bfd/elf64-ppc.c:5646
#2 0x0046af21 in elf_find_function (section=0x75b508, symbols=value
optimized out, offset=20, filename_ptr=0x0, functionname_ptr=0x7fffdd28,
abfd=value optimized out) at ../../src_bin/bfd/elf.c:7419
#3 0x004744bb in _bfd_elf_find_nearest_line (abfd=0x759010,
section=0x75b508, symbols=0x75b3a0, offset=20, filename_ptr=value optimized
out, functionname_ptr=0x7fffdd28, line_ptr=0x7fffdd24) at
../../src_bin/bfd/elf.c:7480
#4 0x00404575 in show_line (abfd=0x759010, section=0x75b508,
addr_offset=20) at ../../src_bin/binutils/objdump.c:1316
#5 0x00404ef5 in disassemble_bytes (inf=0x7fffe0d0,
disassemble_fn=0x440740 print_insn_big_powerpc, insns=1, data=0x75b440
|c\\024N\200, start_offset=0, stop_offset=32, rel_offset=0,
relppp=0x7fffdf90, relppend=0x0) at ../../src_bin/binutils/objdump.c:1588
#6 0x0040645e in disassemble_section (abfd=0x759010, section=0x75b508,
inf=0x7fffe0d0) at ../../src_bin/binutils/objdump.c:2081
#7 0x0044d24c in bfd_map_over_sections (abfd=0x759010,
operation=0x405a71 disassemble_section, user_storage=0x7fffe0d0) at
../../src_bin/bfd/section.c:1285
#8 0x0040697f in disassemble_data (abfd=0x759010) at
../../src_bin/binutils/objdump.c:2216
#9 0x00408d1b in dump_bfd (abfd=0x759010) at
../../src_bin/binutils/objdump.c:3211
#10 0x00408e99 in display_object_bfd (abfd=0x759010) at
../../src_bin/binutils/objdump.c:3267
#11 0x0040907f in display_any_bfd (file=0x759010, level=0) at
../../src_bin/binutils/objdump.c:3341
#12 0x004090eb in display_file (filename=0x7fffe6f5 myadd.o,
target=0x0) at ../../src_bin/binutils/objdump.c:3362
#13 0x0040991e in main (argc=5, argv=0x7fffe408) at
../../src_bin/binutils/objdump.c:3641
(gdb)
--
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