strong_alias versus weak_alias

Joakim Tjernlund joakim.tjernlund at transmode.se
Mon Dec 12 08:48:21 UTC 2005


> 
> Hello!
> 
> Until now I was sure that using strong_alias(__X,X) is correct 
> everywhere, because we do not have overlapping objects, we 
> build from each 
> function only one version.
> Is it true, that having only X() in libc it is possible that 
> an app can 
> overwrite X(), but having __X() in libc and a 
> strong_alias(__X,X) does not allow it?

You can still overwrite X(), but not __X() as that one is internal
to libc. If you overwrite X() all X() users will use the new X(), but
__X()
users(libc) will still be using __X().

> If true, then which are the functions we should allow to be 
> overwritable 
> and which not?
> The problem does not come up as it seems in native builds, but in 
> cross-compiler env. (as libiberty.a w/ strncmp) it may happen.
> How do we proceed?

Don't know.

> 
> Peter



More information about the uClibc mailing list