public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/17608] New: [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s
@ 2004-09-22 12:35 schwab at suse dot de
  2004-09-22 12:44 ` [Bug target/17608] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: schwab at suse dot de @ 2004-09-22 12:35 UTC (permalink / raw)
  To: gcc-bugs

When linking with -profile then -lc_p is used instead of -lc, and the former is 
only available as a static library.  Thus this should be treated like a static 
link, and no shared libgcc should be linked in.  But when HAVE_LD_AS_NEEDED 
then -lgcc_s is also being linked in by default, causing a shared link that 
uses both libc_p and libc, and the resulting binary will crash.

-- 
           Summary: [3.3.4/3.4/4.0 regression] -profile should prevent use
                    of libgcc_s
           Product: gcc
           Version: 3.3.4
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: driver
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schwab at suse dot de
                CC: amodra at bigpond dot net dot au,gcc-bugs at gcc dot gnu
                    dot org,jakub at redhat dot com
GCC target triplet: ia64-suse-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17608


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

* [Bug target/17608] [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s
  2004-09-22 12:35 [Bug driver/17608] New: [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s schwab at suse dot de
@ 2004-09-22 12:44 ` pinskia at gcc dot gnu dot org
  2004-09-22 21:21 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-22 12:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-22 12:44 -------
This is a target problem....

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|driver                      |target


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17608


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

* [Bug target/17608] [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s
  2004-09-22 12:35 [Bug driver/17608] New: [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s schwab at suse dot de
  2004-09-22 12:44 ` [Bug target/17608] " pinskia at gcc dot gnu dot org
@ 2004-09-22 21:21 ` pinskia at gcc dot gnu dot org
  2004-11-01  0:45 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-22 21:21 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gdr at gcc dot gnu dot org
   Target Milestone|---                         |3.4.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17608


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

* [Bug target/17608] [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s
  2004-09-22 12:35 [Bug driver/17608] New: [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s schwab at suse dot de
  2004-09-22 12:44 ` [Bug target/17608] " pinskia at gcc dot gnu dot org
  2004-09-22 21:21 ` pinskia at gcc dot gnu dot org
@ 2004-11-01  0:45 ` mmitchel at gcc dot gnu dot org
  2004-12-20  1:58 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-11-01  0:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-11-01 00:45 -------
Postponed until GCC 3.4.4.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.3                       |3.4.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17608


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

* [Bug target/17608] [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s
  2004-09-22 12:35 [Bug driver/17608] New: [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s schwab at suse dot de
                   ` (2 preceding siblings ...)
  2004-11-01  0:45 ` mmitchel at gcc dot gnu dot org
@ 2004-12-20  1:58 ` pinskia at gcc dot gnu dot org
  2004-12-20  7:43 ` amodra at bigpond dot net dot au
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-20  1:58 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-12-20 01:58:23
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17608


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

* [Bug target/17608] [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s
  2004-09-22 12:35 [Bug driver/17608] New: [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s schwab at suse dot de
                   ` (3 preceding siblings ...)
  2004-12-20  1:58 ` pinskia at gcc dot gnu dot org
@ 2004-12-20  7:43 ` amodra at bigpond dot net dot au
  2004-12-20  8:35 ` amodra at bigpond dot net dot au
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-12-20  7:43 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |amodra at bigpond dot net
                   |dot org                     |dot au
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2004-12-20 01:58:23         |2004-12-20 07:43:27
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17608


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

* [Bug target/17608] [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s
  2004-09-22 12:35 [Bug driver/17608] New: [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s schwab at suse dot de
                   ` (4 preceding siblings ...)
  2004-12-20  7:43 ` amodra at bigpond dot net dot au
@ 2004-12-20  8:35 ` amodra at bigpond dot net dot au
  2004-12-22  2:44 ` amodra at bigpond dot net dot au
  2004-12-22  4:16 ` amodra at bigpond dot net dot au
  7 siblings, 0 replies; 9+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-12-20  8:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-12-20 08:35 -------
I suspect that -profile ought to always imply -static.  For instance, you can
get the same crash by linking with -profile and -lm, because libm.so needs libc.so.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17608


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

* [Bug target/17608] [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s
  2004-09-22 12:35 [Bug driver/17608] New: [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s schwab at suse dot de
                   ` (5 preceding siblings ...)
  2004-12-20  8:35 ` amodra at bigpond dot net dot au
@ 2004-12-22  2:44 ` amodra at bigpond dot net dot au
  2004-12-22  4:16 ` amodra at bigpond dot net dot au
  7 siblings, 0 replies; 9+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-12-22  2:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-12-22 02:44 -------
On investigating, I'm convinced this is a linker bug.  When linking we use:
-lgcc --as-needed -lgcc_s --no-as-needed -lc_p -lgcc --as-needed -lgcc_s
--no-as-needed.

During the first scan of libgcc_s.so, the linker finds no reason to mark
libgcc_s.so as needed, because no symbols in libgcc_s.so are referenced at that
point.  After linking libc_p.a, the second scan of libgcc_s.so does find
referenced symbols.  However, the linker sees that these symbols have already
been defined, thus the "new" definitions found in the second scan of libgcc_s.so
aren't used.  (If a symbol is defined in two shared libs, the one from the lib
first encountered by the linker is used.  As far as the linker is concerned the
first libgcc_s.so is a different shared lib from the second libgcc_s.so).  Thus
the linker decides that the second libgcc_s.so isn't needed, and so doesn't emit
a DT_NEEDED tag for libgcc_s.so.

With older glibc ld.so, this resulted in segfaults.  Current ld.so complains with
 Inconsistency detected by ld.so: dl-version.c: 230: _dl_check_map_versions:
Assertion `needed != ((void *)0)' failed!

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17608


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

* [Bug target/17608] [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s
  2004-09-22 12:35 [Bug driver/17608] New: [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s schwab at suse dot de
                   ` (6 preceding siblings ...)
  2004-12-22  2:44 ` amodra at bigpond dot net dot au
@ 2004-12-22  4:16 ` amodra at bigpond dot net dot au
  7 siblings, 0 replies; 9+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-12-22  4:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-12-22 04:16 -------
Fixed by http://sources.redhat.com/ml/binutils/2004-12/msg00272.html
Since this was a linker problem, the proper solution would be to add a configure
test for a fixed linker and only enable USE_LD_AS_NEEDED when a good linker is
found.  However, that would disable this linker feature for the normal (ie. non
-profile) case, breaking cancellation.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17608


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

end of thread, other threads:[~2004-12-22  4:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-22 12:35 [Bug driver/17608] New: [3.3.4/3.4/4.0 regression] -profile should prevent use of libgcc_s schwab at suse dot de
2004-09-22 12:44 ` [Bug target/17608] " pinskia at gcc dot gnu dot org
2004-09-22 21:21 ` pinskia at gcc dot gnu dot org
2004-11-01  0:45 ` mmitchel at gcc dot gnu dot org
2004-12-20  1:58 ` pinskia at gcc dot gnu dot org
2004-12-20  7:43 ` amodra at bigpond dot net dot au
2004-12-20  8:35 ` amodra at bigpond dot net dot au
2004-12-22  2:44 ` amodra at bigpond dot net dot au
2004-12-22  4:16 ` amodra at bigpond dot net dot au

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