This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libgcc_s, Linux, and PT_GNU_EH_FRAME, and binutils

Jakub Jelinek <> writes:

> Here I don't understand what you mean. If one gcc was configured against
> 2.12 binutils (2.12.1+ or plain 2.12 (which shouldn't be used)?), then
> it forever requires those binutils, as it passes --eh-frame-hdr from
> specs (and relies on PT_GNU_EH_FRAME being present, so
> that __register_frame* calls are not necessary in the crtstuff).
> Which crtstuff is used is picked at link time and at the same time
> you either pass or don't pass --eh-frame-hdr, so you either rely on
> PT_GNU_EH_FRAME or don't.

What happened was this: System A has ld 20020627 Debian
GNU/Linux. A binary "test" is created with g++ 3.1.1 on this system
(compiled and linked).

System B has ld 20011021 (SuSE). g++ 3.3 20020804 is
built on this system, including

The binary "test" is copied from A to B. When run on B, it crashes.

Notice that B's binutils are not used at all - this is purely an ABI
issue. Yet still their version number alone resulted in a binary
incompatibilitity - if I copy from A to B also, "test"
works fine.

I'll attach the source code below.


#include <stdio.h>
int main () {
  try {
    throw 1;
  } catch (...) {

  return 1;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]