libunwind-devel
[Top][All Lists]
Advanced

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

[libunwind] x86 dwarf unwinding requires -fpic compile for shared libs ?


From: David Simms
Subject: [libunwind] x86 dwarf unwinding requires -fpic compile for shared libs ?
Date: Thu, 15 Jul 2004 12:53:37 +0200

Gidday,

I was most interested to see libunwind (0.97) has support for dwarf2 on
x86, it's exactly what I needed. But I ran into a problem when trying to
test it...

libunwind relies on a .eh_frame_hdr section with FDE table present. To
obtain this using gcc 3.2.3 & ld (RH binutils 2.14) I need to compile
with -fpic (& -gdwarf-2 -funwind-tables) before linking with
--eh-frame-hdr (& -shared). If only one object was compiled without
-fpic the .eh_frame_hdr contained no optional FDE table, and libunwind
won't work.

Is this really necessary to use -fpic ? From my understanding it's
possible to link shared without compiling PIC on x86, which is desirable
considering the performance implications. I.E. I wish to avoid it. Does
anyone know if it's possible to generate .eh_frame_hdr without -fpic ?

Are there any plans to include processing of .eh_frame section if 
.eh_frame_hdr fails ? It probably be more portable with older gcc/ld
versions.

Cheers.


reply via email to

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