[uClibc] Strange dynamic symbol in PPC

Manuel Novoa III mjn3 at codepoet.org
Fri Jan 30 18:16:02 UTC 2004


Hello,

On Fri, Jan 30, 2004 at 06:51:00PM +0100, Joakim Tjernlund wrote:
> hmm, none of __pthread_once and pthread_self appear to be a weak symbol.
> readelf reports them as GLOBAL. What am I missing?

The symbols are defined in both libpthread _and_ libc.  In libc, they
are weaks and meant to be overriden if threading is being used, be it
by directly linking libpthread or by dlopen()ing it.

See libc/misc/pthread/weaks.c.

> I found the "strong_alias" macro which is used to define those symbols but
> I don't understand what the macro does.

The strong_alias and weak_alias macros are used to create linker-visible
non-overridable (strong) or overridable (weak) aliass for symbols.  Is
that what you're asking?

Manuel



More information about the uClibc mailing list