[Top][All Lists]

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

Re: [Libunwind-devel] compilation errors involving _Unwind_Resume

From: Arun Sharma
Subject: Re: [Libunwind-devel] compilation errors involving _Unwind_Resume
Date: Wed, 27 Feb 2008 13:31:21 -0800

On Wed, Feb 27, 2008 at 1:03 PM, Adam Portley <address@hidden> wrote:
Hi Arun,

I'm using a version from savannah mentioned in perftools:
but I can try downloading from git if it's likely to be more up-to-date.

I was afraid that you were using the 0.98 release. The above tar ball should work ok mostly for x86.


Thanks very much for the linking suggestion.  I couldn't find -lgcc_eh (maybe because my gcc was compiled with "--enable-shared=libstdc++"?) but I was able to compile using "libgcc.a libunwind.a libstdc++.a".  Are there any drawbacks to using this instead?

No. This should be fine.

  Just for curiosity's sake, why does adding libgcc resolve the multiple definition error?

C++ exception handling API:

is implemented by both libunwind.a and libgcc*.a. On ia64 (Itanium), gcc uses the implementation in libunwind.a. On most other platforms, the implementation comes from libgcc*.a.

When you link in libunwind, you might be inadvertently using the libunwind implementation for C++ exception handling (which may work just fine). One possibility is to provide a config option that uses libunwind only when the application explicitly invokes it (and not implicitly for C++ exception handling).


I guess the warnings in perftools/INSTALL about static linkage apply to my case (since I'm linking with the *.a files).  I will add the --eh-frame-hdr linker option as suggested.  Do you know of any other caveats? 

No. I think I documented most of them in the google perftools INSTALL file.
I'd prefer to not have to install these libraries everywhere if possible - do you think this setup will work given that the app is compiled on a 32 bit machine and run on x86_64?

Should work fine. Although I personally test 64 bit on x86_64 case more.


reply via email to

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