debug/7521: DWARF problem: bad .text reference from .debug_line section.
niting@noida.hcltech.com
niting@noida.hcltech.com
Wed Aug 7 03:26:00 GMT 2002
>Number: 7521
>Category: debug
>Synopsis: DWARF problem: bad .text reference from .debug_line section.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 07 03:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Nitin Gupta
>Release: 3.1.1 and 3.2 20020722 (experimental)
>Organization:
>Environment:
RedHat Linux 7.3 and Windows 2000 for mingw build of gcc
>Description:
The text section references in the DWARF
information generated by gcc for the
C++ programs are not correct.
The linker is not able to resolve the relocation
entries of a few .text references of the object
files in libstdc++ library. Following are the
two such library objects of which the references
are not resolved correctly:
libstdc++/src/io-inst.o
libstdc++/src/stdexcept.o
I saw the relocation entries for these references
and found that at all the places ( in .debug_range, .debug_info etc ) where ever the "these" relocation
needs to applied the executable contains 0x0. Since
I don't understand the relocation entries very
well, I'm not sure whose problem is this compiler
or linker or is it me overlooking something.However
I could reproduce this "behavior" with following
development environments:
1) sh-elf on Linux
gcc ver 3.1.1
binutils ver 2.12
2.) sh-elf mingw32nsvc
gcc ver 3.2
binutils ver 2.12
3.) i386-pc-linux-gnu
gcc ver 3.2
binutils ver 2.11.93.0.2 20020207 (default
with RedHat 7.3)
Please let me know if I need to more analysis!
>How-To-Repeat:
The problem is reproducible even with
C++ hello world test case.
#include<iostream.h>
main(int argc, char *argv[])
{
cout<< "Hello World";
return 0;
}
To reproduce
- build the test case with <target>-g++ -g
-O2
- run readelf -wl (to get the .debug_line
section disassembly)
- search for the "set Address to 0x0". All
the text references would be calculated
from 0x0 in that line sequence hence all
will be wrong.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list