public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* debug/7521: DWARF problem: bad .text reference from .debug_line section.
@ 2002-08-07  3:56 niting
  0 siblings, 0 replies; only message in thread
From: niting @ 2002-08-07  3:56 UTC (permalink / raw)
  To: gcc-gnats


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-08-07 10:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-07  3:56 debug/7521: DWARF problem: bad .text reference from .debug_line section niting

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).