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

2009-10-02 Thread paulreed at paddedcell dot com

--- 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 3710  80ac  80ac  00ac  2**2
  CONTENTS, ALLOC, LOAD, CODE
...

SYMBOL TABLE:
no symbols



Disassembly of section .text:

80ac <.text>:
80ac:   eb04bl  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.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


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

2009-10-02 Thread paulreed at paddedcell dot com


-- 
   What|Removed |Added

 Status|ASSIGNED|WAITING


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.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/9790] LD's "export everything" logic problematic

2009-10-02 Thread d dot g dot gorbachev at gmail dot com

--- Additional Comments From d dot g dot gorbachev at gmail dot com  
2009-10-03 00:28 ---
Created an attachment (id=4249)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4249&action=view)
Patch

This patch adds a new `--exclude-all-symbols' option. It does not affect the
existing behavior, thus more chances that it will be accepted. Both
`--export-all-symbols' and `--exclude-all-symbols' are needed, because it's a
3-way choice -- export everything, export nothing, and export something. When
these options are used together, `--exclude-all-symbols' takes precedence.

By the way, the description of auto-export behavior is not quite correct:

> If `--export-all-symbols' is not given explicitly on the
> command line, then the default auto-export behavior will be
> _disabled_ if either of the following are true:
>
>* A DEF file is used.

> Using a DEF file turns off the normal auto-export behavior,
> unless the `--export-all-symbols' option is also used.

In reality, if a DEF file does not export any symbols, using it does not turn
auto-export off. (Having no talent of speaking, I do not dare to change the
documentation.)

Another way to fix this problem would be to modify the auto-export behavior in
accordance with the existing documentation.

-- 


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

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils