Bug 2443 - Dwarf2 reader doesn't handle file 0 correctly
Summary: Dwarf2 reader doesn't handle file 0 correctly
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-10 19:32 UTC by H.J. Lu
Modified: 2006-03-16 19:42 UTC (History)
1 user (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2006-03-10 19:32:26 UTC
[hjl@gnu-13 binutils]$  gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes
-Werror -g -O2 -o nm-new nm.o budemang.o bucomm.o version.o filemode.o 
../bfd/.libs/libbfd.a ../libiberty/libiberty.a -B./
./ld: Dwarf Error: mangled line number section (bad file number).
./ld: Dwarf Error: mangled line number section (bad file number).
./ld: Dwarf Error: mangled line number section (bad file number).
./ld: Dwarf Error: mangled line number section (bad file number).
./ld: Dwarf Error: mangled line number section (bad file number).
./ld: Dwarf Error: mangled line number section (bad file number).
./ld: Dwarf Error: mangled line number section (bad file number).
./ld: Dwarf Error: mangled line number section (bad file number).
./ld: Dwarf Error: mangled line number section (bad file number).
./ld: Dwarf Error: mangled line number section (bad file number).
bucomm.o: In function
`make_tempname':/export/gnu/src/binutils-import/binutils/binutils/bucomm.c:426:
warning: the use of `mktemp' is dangerous, better use `mkstemp'
Comment 1 H.J. Lu 2006-03-10 20:40:15 UTC
The problem is

 <2><4ef9>: Abbrev Number: 52 (DW_TAG_inlined_subroutine)
     DW_AT_abstract_origin: <4f18>
     DW_AT_ranges      : 0x3e0
     DW_AT_call_file   : 0
     DW_AT_call_line   : 0

According to DWARF 3, 0 means no source file has been specified. The same
applies to DW_AT_call_line.
Comment 2 H.J. Lu 2006-03-10 20:54:14 UTC
A patch is posted at

http://sourceware.org/ml/binutils/2006-03/msg00143.html
Comment 3 H.J. Lu 2006-03-16 19:42:59 UTC
Fixed.