bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/13894] New: ppc64 objdump -S segfault


From: amodra at gmail dot com
Subject: [Bug binutils/13894] New: ppc64 objdump -S segfault
Date: Fri, 23 Mar 2012 01:12:16 +0000

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: address@hidden
        ReportedBy: address@hidden
    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:

0000000000000000 <._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 0x90000
  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.
0x00000000004ac1f6 in opd_entry_value (opd_sec=0x75b9e8, offset=0,
code_sec=0x7fffffffdc28, code_off=0x7fffffffdc20) at
../../src_bin/bfd/elf64-ppc.c:5614
1: x/i $pc
=> 0x4ac1f6 <opd_entry_value+1024>:     mov    (%rax),%rax
(gdb) where
#0  0x00000000004ac1f6 in opd_entry_value (opd_sec=0x75b9e8, offset=0,
code_sec=0x7fffffffdc28, code_off=0x7fffffffdc20) at
../../src_bin/bfd/elf64-ppc.c:5614
#1  0x00000000004ac354 in ppc64_elf_maybe_function_sym (sym=0x7662a0,
code_sec=0x7fffffffdc28, code_off=0x7fffffffdc20) at
../../src_bin/bfd/elf64-ppc.c:5646
#2  0x000000000046af21 in elf_find_function (section=0x75b508, symbols=<value
optimized out>, offset=20, filename_ptr=0x0, functionname_ptr=0x7fffffffdd28,
abfd=<value optimized out>) at ../../src_bin/bfd/elf.c:7419
#3  0x00000000004744bb in _bfd_elf_find_nearest_line (abfd=0x759010,
section=0x75b508, symbols=0x75b3a0, offset=20, filename_ptr=<value optimized
out>, functionname_ptr=0x7fffffffdd28, line_ptr=0x7fffffffdd24) at
../../src_bin/bfd/elf.c:7480
#4  0x0000000000404575 in show_line (abfd=0x759010, section=0x75b508,
addr_offset=20) at ../../src_bin/binutils/objdump.c:1316
#5  0x0000000000404ef5 in disassemble_bytes (inf=0x7fffffffe0d0,
disassemble_fn=0x440740 <print_insn_big_powerpc>, insns=1, data=0x75b440
"|c\"\024N\200", start_offset=0, stop_offset=32, rel_offset=0,
relppp=0x7fffffffdf90, relppend=0x0) at ../../src_bin/binutils/objdump.c:1588
#6  0x000000000040645e in disassemble_section (abfd=0x759010, section=0x75b508,
inf=0x7fffffffe0d0) at ../../src_bin/binutils/objdump.c:2081
#7  0x000000000044d24c in bfd_map_over_sections (abfd=0x759010,
operation=0x405a71 <disassemble_section>, user_storage=0x7fffffffe0d0) at
../../src_bin/bfd/section.c:1285
#8  0x000000000040697f in disassemble_data (abfd=0x759010) at
../../src_bin/binutils/objdump.c:2216
#9  0x0000000000408d1b in dump_bfd (abfd=0x759010) at
../../src_bin/binutils/objdump.c:3211
#10 0x0000000000408e99 in display_object_bfd (abfd=0x759010) at
../../src_bin/binutils/objdump.c:3267
#11 0x000000000040907f in display_any_bfd (file=0x759010, level=0) at
../../src_bin/binutils/objdump.c:3341
#12 0x00000000004090eb in display_file (filename=0x7fffffffe6f5 "myadd.o",
target=0x0) at ../../src_bin/binutils/objdump.c:3362
#13 0x000000000040991e in main (argc=5, argv=0x7fffffffe408) 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]