Re: ld terminated with signal 11
- From: Hans-Bernhard Broeker <broeker@xxxxxxxxxxxxxxxxxxxxx>
- Date: 26 Jul 2005 18:47:00 GMT
vsouders@xxxxxxxxxxxxxx wrote:
> the simple test code shown below, the linker terminates with a signal
> 11.
Signal 11 on a x86 Linux box is a segfault. Tradtionally, the most
likely reason for that to occur in a GCC run is unstable hardware,
often flaky RAM --- GCC uses pointers all over the place extensively
enough that any memory glitch is almost guaranteed to crash it. The
linker OTOH isn't particularly renowned for serving as hardware tester
in this way --- but that's usually because GCC will have crashed long
before the linker even gets to be run on a job large enough to trigger
this.
> If I remove the iostream include and the cout statement, the
> application compiles and links without errors. Does this mean the
> linker is attempting to link against an incorrect lib version?
Quite possibly. Add -v and perhaps -Wl,-v flags to your link command
and observe what's actually happening. Pay special attention to what
startup code and libraries get used.
And BTW: before you call that test code "simple", do yourself a favour
and look at what the preprocessor makes out of it. Here's a small
experiment using a more current GCC and native tools on Linux:
~> echo "#include <iostream>" > tt.cc
~> gcc -E tt.cc | wc
27753 66420 717061
I don't know about you, but I'm not particularly willing to accept
more than half a megabyte of C++ source as being a "simple test code".
The 'gcc -Q' listing of all method names alone is 125 kB!
--
Hans-Bernhard Broeker (broeker@xxxxxxxxxxxxxxxxxxxxx)
Even if all the snow were burnt, ashes would remain.
.
- References:
- ld terminated with signal 11
- From: vsouders
- ld terminated with signal 11
- Prev by Date: ld terminated with signal 11
- Next by Date: 8051 + iim7010a
- Previous by thread: ld terminated with signal 11
- Next by thread: Re: ld terminated with signal 11
- Index(es):
Relevant Pages
|