From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10978 invoked by alias); 7 Aug 2002 10:26:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 10954 invoked by uid 71); 7 Aug 2002 10:26:01 -0000 Resent-Date: 7 Aug 2002 10:26:01 -0000 Resent-Message-ID: <20020807102601.10952.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, niting@noida.hcltech.com Received: (qmail 9019 invoked by uid 61); 7 Aug 2002 10:17:31 -0000 Message-Id: <20020807101731.9018.qmail@sources.redhat.com> Date: Wed, 07 Aug 2002 03:56:00 -0000 From: niting@noida.hcltech.com Reply-To: niting@noida.hcltech.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: debug/7521: DWARF problem: bad .text reference from .debug_line section. X-SW-Source: 2002-08/txt/msg00132.txt.bz2 List-Id: >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 main(int argc, char *argv[]) { cout<< "Hello World"; return 0; } To reproduce - build the test case with -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: