On Wed, Oct 30, 2013 at 04:13:10PM +0100, Nicolas Sauzede wrote:
> Hello,
> 
> This is my first post to the uClibc mailing-list.
> I have a question related to weak API symbols of the uClibc.
> 
> I have noticed that, when linking a static binary against the
> uClibc, that certain symbols,
> such as 'abort', are not defined as weak symbol.
> The end result is that this kind of trivial program my_abort.c :

Redefining any function in the standard library (formally, in the
namespace reserved for external identifiers) invokes undefined
behavior. While it would be possible to support this usage for some
functions (often it's supported for the malloc functions), in general
it's impossible (or at least impractical) to support this kind of
usage.

Note that even if you could override the abort symbol like you're
trying to do, this would not cause uclibc-internal usage of abort to
call your function. The reason is exactly the same reason you're
getting the error: uclibc references it through the internal __GI_
prefixed symbol.

I have no idea whether the uclibc maintainers are willing or able to
support this usage for abort, but your overriding it is broken usage
anyway.

Rich
_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to