[PATCH] Fix building statically linked ARM EABI applications

Joseph S. Myers joseph at codesourcery.com
Tue Sep 22 15:07:47 UTC 2009

On Mon, 21 Sep 2009, Ricard Wanderlof wrote:

> When linking applications statically for ARM using EABI, which use
> __default_sa_restorer (e.g. via abort, as in 'int main(void) { abort(); }'),
> this results in the following failure:
> /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.

Joseph S. Myers
joseph at codesourcery.com

More information about the uClibc mailing list