bug-binutils
[Top][All Lists]
Advanced

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

Solaris 9 + g++ + gnu ld + native strip = bus error


From: Greg Hudson
Subject: Solaris 9 + g++ + gnu ld + native strip = bus error
Date: Mon, 18 Oct 2004 17:23:33 -0400

On Solaris 9 with 112963-16 (or with 112963-12, doesn't matter), if I run:

  g++ hello.c               # Using gnu ld from binutils-2.15
  /usr/ccs/bin/strip a.out
  ./a.out

then I get a bus error.

It seems to be important that hello.c makes a library call, but it
doesn't matter much what it is.  My hello.c is:

  #include <stdio.h>

  int main()
  {
      printf("Hello, world.\n");
  }

I tried both gcc 3.3.2 and gcc 3.4.2 and it didn't affect the outcome.

If I use gnu ld from the binutils trunk, the example still fails
(i.e. gives a bus error).

If I use the vendor linker, the example works (i.e. prints "Hello,
world.\n" and exits rather than giving a bus error).

If I use the gnu ld from binutils 2.11.2, the example works.

If I use strip from binutils instead of /usr/ccs/bin/strip, the
example works.

If I compile with gcc instead of g++, the example works.

Google didn't find me any indication that this problem was known.




reply via email to

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