This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: Undefined references to __udivsi3 and __umodsi3 (arm-elf)
Thanks for the clarification, guys.
Next issue when libgcc.a is linked is
undefined reference to `atexit' in function
`__do_global_ctors'
I believe this is from calls to __gccmain
made from main().
Is there a FAQ somewhere as this seems to
be quite common issues.
Rgds,
Peter
> Yes. The libgcc library contains C operations such as divide, mod,
multiply...
> (you are missing a divide and mod operator below). Such operations
require
> target-specific code and sometimes are too big/complex to generate in-line
so the compiler
> creates functions for them and generates calls whenever C code (including
newlib) uses them.
> They do not belong in the C library as they are part of supporting the
> C language for the platform.
>
> -- Jeff J.
>