[Bug binutils/9735] wrong source file shown by objdump -S

2009-01-13 Thread dick at streefland dot net

--- Additional Comments From dick at streefland dot net  2009-01-13 09:29 
---
Sorry, I thought the bug would show up for every target. It was in binutils-avr,
for the Atmel AVR. In the debugger, I could see that the filename and modname
strings for the first entry in the print_files list would change when
bfd_find_nearest_line() returned a line in the next file.

-- 


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

--- 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/9735] wrong source file shown by objdump -S

2009-01-13 Thread dick at streefland dot net

--- Additional Comments From dick at streefland dot net  2009-01-13 11:16 
---
Created an attachment (id=3660)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3660&action=view)
test case to reproduce the problem

Here is a gzipped tar file with a test case to reproduce the problem. Type
"make disasm" to compile the application and generate the disassembly. This
requires gcc-avr, avr-libc and binutils-avr. The output of "make disasm" is
included as the file "output". You will see that the disassembly of the module
foo.c is accompanied by source lines from main.c.

-- 


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

--- 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/9735] wrong source file shown by objdump -S

2009-01-13 Thread amodra at bigpond dot net dot au

--- Additional Comments From amodra at bigpond dot net dot au  2009-01-13 
12:25 ---
I still can't replicate the problem.  The testcase isn't a great help since I
don't have avr-gcc.  Please attach the compiled program.

Hmm, you do realise that entries are added to the beginning of the print_files
list?  So I'd expect "p *print_files" to show different info.

-- 
   What|Removed |Added

 GCC target triplet||avr-elf


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

--- 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/9735] wrong source file shown by objdump -S

2009-01-13 Thread dick at streefland dot net

--- Additional Comments From dick at streefland dot net  2009-01-13 12:37 
---
Created an attachment (id=3661)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3661&action=view)
ELF file of the example

Here is the ELF file.

When I was debugging the problem, print_files only contained a single entry
(next pointer was NULL), but the strings origname/modname changed during the
call to bfd_find_nearest_line(). Because the strings changed to the new source
file name, update_source_path() was not called.

-- 


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

--- 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/9727] ld crashes in bfd/elf.c bfd_elf_set_group_contents()

2009-01-13 Thread hjl dot tools at gmail dot com

--- Additional Comments From hjl dot tools at gmail dot com  2009-01-13 
22:06 ---
I saw it on Linux/x86:

[...@gnu-6 9727]$ cat x.s
.section.text.foo,"axG",@progbits,foo,comdat
.globl foo
.type   foo,@function
foo:
.byte 0
.section.text.bar,"axG",@progbits,bar,comdat
.globl bar
.type   bar,@function
bar:
.byte 0
[...@gnu-6 9727]$ gcc -c x.s
[...@gnu-6 9727]$ ld -r --gc-sections --entry foo x.o
Segmentation fault
[...@gnu-6 9727]$ 

-- 
   What|Removed |Added

 CC||hjl dot tools at gmail dot
   ||com
   GCC host triplet|mingw32 |
 GCC target triplet|arm-elf |
Version|2.19|2.20 (HEAD)


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

--- 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/9727] ld crashes in bfd/elf.c bfd_elf_set_group_contents()

2009-01-13 Thread hjl dot tools at gmail dot com

--- Additional Comments From hjl dot tools at gmail dot com  2009-01-13 
22:39 ---
We should check section groups to properly support ld -r --gc-sections:

1. If all sections in a section group are removed, we should also
remove the group section.
2. If any sections in a section group is kept, we should keep all
sections in the section group.

-- 
   What|Removed |Added

 CC||amodra at bigpond dot net
   ||dot au


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

--- 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/9735] wrong source file shown by objdump -S

2009-01-13 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2009-01-13 
23:45 ---
Subject: Bug 9735

CVSROOT:/cvs/src
Module name:src
Changes by: amo...@sourceware.org   2009-01-13 23:44:45

Modified files:
bfd: ChangeLog syms.c 

Log message:
PR 9735
* syms.c (_bfd_stab_section_find_nearest_line): Don't free
saved filename, use bfd_alloc rather than bfd_malloc for it.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.4418&r2=1.4419
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/syms.c.diff?cvsroot=src&r1=1.49&r2=1.50



-- 


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

--- 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/9735] wrong source file shown by objdump -S

2009-01-13 Thread amodra at bigpond dot net dot au

--- Additional Comments From amodra at bigpond dot net dot au  2009-01-13 
23:48 ---
I should have guessed this was stabs..   Rather than papering over the problem
in objdump, I fixed it at its source.  At least one other app similarly keeps
previous file name pointers returned from bfd_find_nearest_line.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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

--- 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