Invoking atomic functions from a C++ shared lib (or should I force linking with -lgcc?)
Christophe Lyon
christophe.lyon@st.com
Fri Nov 19 10:21:00 GMT 2010
>
> What I have found is that g++ (unlike gcc) links with -lgcc_s instead of
> -lgcc and that the atomic functions are present in libgcc.a and not in
> libgcc_s.so.
>
Anyone knows the rationale for the absence of functions such as
__sync_fetch_and_add (and more generally all __sunc* functions) from
libgcc_s.so ?
Is it a bug/feature specific to the ARM port? (on x86 for instance, such
functions do not exist, the corresponding builtin is fully expanded and
requires not lib call).
Thanks!
Christophe.
More information about the Gcc-help
mailing list