bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU ld 2.11 bug on Solaris 2.8?


From: Brian Shaft
Subject: Re: GNU ld 2.11 bug on Solaris 2.8?
Date: Thu, 03 May 2001 11:12:37 -0700

I have seen the same thing for C compiles on gcc 2.95.3 with ld 2.10.1. It seems
to be caused by the pointer to _DTOR_LIST being zero. I avoided it by removing
-with-gnu-ld in the configure parameters. It is on my list to characterise the
problem further, but a simple check in __do__global__dtors__aux should detour
the problem if the dig into bfd does not come up with the answer.

Beware, gcc uses the presence of ld in its install directory to decide which ld
to run - so if you build binutils after you build gcc it will pick it up for
subsequent use. I ended up just removing the relevant copy after the make. 

Brian Shaft

gentilesco wrote:
> 
> Hi,
> 
> When compiling any C++ program, even the most trivial:
> 
> void main() {}
> 
> with GNU g++ 2.95.2 and using the GNU ld from the binutils 2.11,
> the program core dumps when run under a Solaris 2.8 on a SUN Sparc Ultra-60.
> 
> The gdb debugger indicates a Segmentation Violation in the function
> __do__global__dtors__aux, which I assume is the destructor cleanup
> function called automatically before exiting main().
> 
> If I move the GNU ld out of the way, and recompile, the program gets
> linked with the Solaris linker ld 4.0 instead, and the resulting executable
> does *not* core dump when executed.
> 
> Can you confirm whether this is a bug in the GNU ld, probably
> related to Solaris 2.8? It is such a fundamental problem, it should have been
> seen long ago. Any Ideas?
> The binutils 2.11 (which includes GNU ld) was built with GCC 2.95.2 on the 
> same
> platform indicated above.
> 
> Thanks,
> Jim Gentilesco
> address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]