Bug 4267 - [2.18 regression] ld segfaults building gcc-4.2's debug libstdc++
Summary: [2.18 regression] ld segfaults building gcc-4.2's debug libstdc++
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.18
: P2 normal
Target Milestone: ---
Assignee: Alan Modra
URL:
Keywords:
: 4031 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-03-23 11:09 UTC by Matthias Klose
Modified: 2007-07-05 11:51 UTC (History)
1 user (show)

See Also:
Host:
Target: powerpc-linux-gnu
Build:
Last reconfirmed: 2007-03-29 01:31:23


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Klose 2007-03-23 11:09:38 UTC
trying to build current gcc-4.2 branch with --enable-libstdcxx-debug, ld
segfaults while linking the the debug version of libstdc++.

2.17 works ok, but any 2007 version from HEAD fails to build the library.
Comment 1 Nick Clifton 2007-03-23 14:00:33 UTC
What is the linker command line when this seg-fault happens ?

Is it possible for you to upload the object files that are needed in order to
reproduce this failure ?

Cheers
  Nick
Comment 2 Matthias Klose 2007-03-25 14:21:48 UTC
please see
  http://people.ubuntu.com/~doko/tmp/libstd++-v3-powerpc.tar.bz2
  http://people.ubuntu.com/~doko/tmp/libstdc++-v3-sparc.tar.bz2

the linker command line is in the collect2.sh file; I see another segfault on
sparc-linux-gnu

the powerpc binutils are configured using --enable-targets=powerpc64-linux-gnu,
the sparc binutils using --enable-targets=sparc-linux-gnu

  Matthias
Comment 3 Matthias Klose 2007-03-28 19:20:02 UTC
Not sure, if it's only a ld bug; the gcc powerpc build was configured with
-enable-secureplt. Omitting this option results in a sucessful gcc bootstrap.

related to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31364 ?
Comment 4 Alan Modra 2007-03-29 01:40:36 UTC
Looks like a linker bug in elf32-ppc.c:allocate_dynrelocs.  Testing a fix.
Comment 5 Alan Modra 2007-03-29 03:40:02 UTC
Powerpc bug fixed by http://sourceware.org/ml/binutils-cvs/2007-03/msg00177.html.

I am not able to fully test the sparc64 problem because the testcase lacks libm
and libc, however I did find a segfault in evaluate_complex_relocation_symbols.
Fixed by http://sourceware.org/ml/binutils-cvs/2007-03/msg00178.html.  Being an
optimist I'm closing the bug as fixed.  Matthias, please reopen if this isn't
the case.
Comment 6 Matthias Klose 2007-03-30 15:00:38 UTC
both segfaults on powerpc and sparc are gone

thanks, Matthias
Comment 7 Alan Modra 2007-07-05 11:51:03 UTC
*** Bug 4031 has been marked as a duplicate of this bug. ***