[PATCH] Fix building statically linked ARM EABI applications

Joseph S. Myers joseph at codesourcery.com
Tue Sep 22 15:38:06 UTC 2009


On Tue, 22 Sep 2009, Ricard Wanderlof wrote:

> > > /trees/prod1/target/armv5-axis-linux-gnueabiucl
> > > ibc/lib/libc.a(sigrestorer.os):(.ARM.exidx+0x0): undefined reference to
> > > `__aeabi_unwind_cpp_pr1'
> > > 
> > > This can be fixed with the following patch. Doesn't seem to have any
> > > detrimental effects. Anyone think of a reason this couldn't be commited?
> > 
> > Yes, this function is defined in libgcc_eh.a and the libc version is a dummy
> > version that is *incorrect* for programs requiring unwinding and should only
> > be used internally in libc.  If it's not in your libgcc_eh.a or that is not
> > being searched, your toolchain is misconfigured.
> 
> But then how come the libc version is included at all in the shared version of
> the library?

This is explained in the comments in the relevant source file.  Note that 
it is hidden and not exported from libc.

/* Because some objects in ld.so and libc.so are built with
   -fexceptions, we end up with references to this personality
   routine.  However, these libraries are not linked against
   libgcc_eh.a, so we need a dummy definition.   This routine will
   never actually be called.  */

-- 
Joseph S. Myers
joseph at codesourcery.com


More information about the uClibc mailing list