R_386_32 relocations with sym-value=0 ?

Nils Asmussen nils@script-solution.de
Tue Aug 17 16:02:00 GMT 2010


> This suggests to me that you are using a linker which does not support
> --eh-frame-hdr, or your compiler has been configured to not pass that
> option to the linker (normally gcc will pass the option if the linker
> supports it).
> 
> If your linker does not support --eh-frame-hdr, then exception frames
> must be explicitly registered at program startup time.  If they are not,
> exceptions can not unwind the stack.  When the linker does support
> --eh-frame-hdr, the linker creates a PT_GNU_EH_FRAME program segment
> which lists the exception frames, and the runtime support uses
> dl_iterate_phdr to find it.
Ah, I see. That does indeed fix it on linux (using ld directly for
linking the shared library).
That brought me a big step forward. Thank you very much! :)

When I understand it correctly, the glibc provides its own
_Unwind_Find_FDE (in gcc/unwind-dw2-fde-glibc.c) instead of the one from
libgcc, which - as you said - finds the GNU_EH_FRAME-segment with
dl_iterate_phdr. So, should I do it similar and change my cross-compiler
a bit? Or what would be the best way to do it in my case?

Nils Asmussen



More information about the Binutils mailing list