Re: ld terminated with signal 11



vsouders@xxxxxxxxxxxxxx wrote:
I'm working on setting up an ARM toolchain under Linux.  I've installed
binutils 2.10, arm-gcc 2.95.2 and glibc 2.1.3.  When I try to compile
the simple test code shown below, the linker terminates with a signal
11.  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?  I've
set up a similar tool chain on Windows using cygwin and didn't have
this issue.  Any help would be much appreciated.

Thanks,
Vance

#include <iostream>

using namespace std;

int main()
{
  cout << "Hello ARM" << endl;
  return 0;
}


Are you trying to compile/link C++ code with the 'gcc' command? It will not link properly. C++ must be linked with 'g++'.

GCC 2.95 is very old, and the ARM support is somewhat
kludged on it. Please get a GCC 3.x.y series compiler
with suitable version of binutils and libraries.

The 'simple' C++ program creates HUGE amounts of
code when expanded. Start with a pure C program.

There is little (or no at all) sense to attempt C++
before plain C is running OK.

If you're targeting an embedded system without an
operating system, please understand that the standard
I/O library needs a lot of other code to run. This
applies to stdio.h as well as the iostream functions.

--

Tauno Voipio
tauno voipio (at) iki fi

.



Relevant Pages

  • Re: Cross platform building best practices (building 6 on 7)
    ... I've done a lot of Googling and scouring the lists about this ... No dice (and I'm still debugging why since this binutils ... at what failed to compile. ... need to bootstrap my dev environment for 6.x development on 7.x. ...
    (freebsd-hackers)
  • Re: [PATCH 0/14] KVM: Kernel-based Virtual Machine (v4)
    ... But no one will compile kvm for non-x86: ... Not only hacky, it will confuse the regular user who gets a nonworking kvm.ko due to old binutils. ... assembler version feed into the Kconfig system (nor do we want it, ...
    (Linux-Kernel)
  • Re: Why is the gcc (version 3.2) binary so big?
    ... Floyd L. Davidson wrote: ... Just compile it again with: ... Tauno Voipio ...
    (comp.os.linux.development.apps)
  • Re: arch xtensa does not compile
    ... > I guess I'm using the wrong binutils version. ... > recommended gcc/binutils pair which is supposed to compile the kernel? ... I don't think the correct configuration is currently ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Optimizing with GCC
    ... I use Binutils 2.16.1, ... I compile for an ... What target are you using? ... mean there was no startup code, or the startup code was located ...
    (comp.arch.embedded)