bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/10341] objdump segfault on stripped elf files


From: paulreed at paddedcell dot com
Subject: [Bug binutils/10341] objdump segfault on stripped elf files
Date: 2 Oct 2009 19:28:02 -0000

------- Additional Comments From paulreed at paddedcell dot com  2009-10-02 
19:28 -------
Created an attachment (id=4247)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4247&action=view)
Patch to decide based on symtab_size, not symtab != NULL

The symtab check should go on symtab_size, not whether symtab is allocated.  
In binutils/objdump.c:disassemble_data, sorted_syms is always xmalloc'd, even
if there are no symbols.  The previous patch didn't fix this because *
info->symtab is still (non-NULL) garbage.

Sample output after patching:

...
Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00003710  000080ac  000080ac  000000ac  2**2
                  CONTENTS, ALLOC, LOAD, CODE
...

SYMBOL TABLE:
no symbols



Disassembly of section .text:

000080ac <.text>:
    80ac:       eb000004        bl      0x80c4
...


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sources dot   |paulreed at paddedcell dot
                   |redhat dot com              |com
             Status|NEW                         |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=10341

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

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