public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: other/7671: RH7.3 gnu ld (version 2.11.93.0.2 20020207) problem w/ gnu.linkonce.*
@ 2003-05-14 10:28 giovannibajo
  0 siblings, 0 replies; 3+ messages in thread
From: giovannibajo @ 2003-05-14 10:28 UTC (permalink / raw)
  To: SvetlanaX_Gvozdeva, gcc-bugs, gcc-prs, miwako.tokugawa, nobody

Synopsis: RH7.3 gnu ld (version 2.11.93.0.2 20020207) problem w/ gnu.linkonce.*

State-Changed-From-To: open->feedback
State-Changed-By: bajo
State-Changed-When: Wed May 14 10:28:11 2003
State-Changed-Why:
    See Dara's question

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7671


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: other/7671: RH7.3 gnu ld (version 2.11.93.0.2 20020207) problem w/ gnu.linkonce.*
@ 2003-05-13 18:26 Dara Hazeghi
  0 siblings, 0 replies; 3+ messages in thread
From: Dara Hazeghi @ 2003-05-13 18:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR other/7671; it has been noted by GNATS.

From: Dara Hazeghi <dhazeghi@yahoo.com>
To: SvetlanaX_Gvozdeva@vniief.ims.intel.com, miwako.tokugawa@intel.com,
   gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: other/7671: RH7.3 gnu ld (version 2.11.93.0.2 20020207) problem w/ gnu.linkonce.*
Date: Tue, 13 May 2003 11:18:31 -0700

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- 
 trail&database=gcc&pr=7671
 
 Hello,
 
 firstly this bug report appears to be a problem with an unreleased  
 version of ld that RedHat included in their 7.1 distribution. If there  
 is a problem with it, they would be the people to contact, not us.  
 Secondly, ld is not a part of gcc, but of binutils, and a regression of  
 ld should be reported to the binutils list. Finally, your message  
 refers to a nonexistent archive that demonstrates the bug. Could the  
 submitter of this report explain why this bug is a gcc bug, and include  
 a testcase? Otherwise this report will be closed. Thank you,
 
 Dara
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* other/7671: RH7.3 gnu ld (version 2.11.93.0.2 20020207) problem w/ gnu.linkonce.*
@ 2002-08-20 20:06 miwako.tokugawa
  0 siblings, 0 replies; 3+ messages in thread
From: miwako.tokugawa @ 2002-08-20 20:06 UTC (permalink / raw)
  To: gcc-gnats; +Cc: SvetlanaX_Gvozdeva


>Number:         7671
>Category:       other
>Synopsis:       RH7.3 gnu ld (version 2.11.93.0.2 20020207) problem w/ gnu.linkonce.*
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 20 18:16:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     miwako.tokugawa@intel.com
>Release:        unknown-1.0
>Organization:
>Environment:

>Description:
ld on RH7.3 (2.11.93.0.2. 20020207) seems to have a problem with .gnu.linknce.t<...> (and possibly .d, .w..) This is a regression from older versions. 

Given 
file1: .textfile1 + gnu.linkonce.t1+...gnu.linkonce.tn
file2: .textfile2 + gnu.linkonce.t12+...gnu.linkonce.tn2
.....
filen: .textfilen + gnu.linkonce.t13+...gnu.linkonce.tn3

Older linkers combine sections with code in .text section in the following order:
executable file: textfile1+ textfile2 + ... + textfilen + gnu.linkonce.t1+...gnu.linkonce.tn3

while the new linker does:
executable file: textfile1 + gnu.linkonce.t1+...gnu.linkonce.tn + textfile2 + gnu.linkonce.t12+...gnu.linkonce.tn2 + ... +
textfilen + gnu.linkonce.t13+...gnu.linkonce.tn3.

If we compile files with debug information then every object file has sections .debug_info, .debug_line and rel.debug_info and .rel_debug_line.
Some records for relocation refer to start of sections .gnu.linkonce.t<..>.
If some object files have the same sections .gnu.linkonce.t<...> then they may have the records of relocations, which refer to the start of the same .gnu.linkonce.t<...> sections. 

The new linker is able to resolve records for relocations that refer to the start of the same .gnu.linkonce.t.<..> sections correctly for the first processed object file ONLY!!! The relocation records in other object files that refer to the same .gnu.linkonce.t<..> section are not resolved at all!

If you build test ladbCpp/test01a using command line as 'g++ -gdwarf-2 test01a.cpp test01b.cpp test01c.cpp'  on Red Hat 7.3 you can make dump of debug information and see (fragment of debug information about line numbers):

Extended opcode 2: set Address to 0x0
  Set File Name to entry 2 in the File Name Table
  Special opcode 13: advance Address by 0 to 0x0 and Line by 3 to 4
  Extended opcode 2: set Address to 0x15
  Extended opcode 1: End of Sequence

  Extended opcode 2: set Address to 0x0
  Set File Name to entry 3 in the File Name Table
  Special opcode 13: advance Address by 0 to 0x0 and Line by 3 to 4
  Extended opcode 2: set Address to 0x15
  Extended opcode 1: End of Sequence

I have attached the dump as dump.txt

Example of test debug session with GDB for test01a, which was built by 'g++' for Red Hat 7.3:

[sana@altair opt_debug_asm]$ gdb g++.out
GNU gdb Red Hat Linux (5.1.90CVS-5)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) b foo2
Breakpoint 1 at 0x8048702: file test01c.cpp, line 6.
(gdb) r
Starting program: /home/sana/iidb/idbCpp/opt_debug_asm/g++.out 

Breakpoint 1, foo2 (a=1) at test01c.cpp:6
6       A *pa = new A;
(gdb) b test01a.h:4
Note: breakpoint -12 (disabled) also set at pc 0x0.
Breakpoint 2 at 0x0: file test01a.h, line 4.
(gdb) 

The same test debug session for Red Hat 7.1:

GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) b foo2
Breakpoint 1 at 0x8048736: file test01c.cpp, line 6.
(gdb) r
Starting program: /home1/sana/miwako_opyt/a.out 

Breakpoint 1, foo2 (a=1) at test01c.cpp:6
6       A *pa = new A;
Current language:  auto; currently c++
(gdb) b test01a.h:4
Breakpoint 2 at 0x8048860: file test01a.h, line 4.
(gdb)
>How-To-Repeat:
Please see Description and 28302.zip/command.txt
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-14 10:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-14 10:28 other/7671: RH7.3 gnu ld (version 2.11.93.0.2 20020207) problem w/ gnu.linkonce.* giovannibajo
  -- strict thread matches above, loose matches on Subject: below --
2003-05-13 18:26 Dara Hazeghi
2002-08-20 20:06 miwako.tokugawa

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