[PATCH] In _IEEE_LIBM mode, use weak symbols instead of wrapper funcs [v3]
Keith Packard
keithp@keithp.com
Fri Sep 21 21:29:00 GMT 2018
Craig Howland <howland@LGSInnovations.com> writes:
> It's no difference than a weak alias--it requires object file support. To quote
> from the GCC manual about a function alias attribute (which is what the macro
> ends up using), "This attribute requires assembler and object file support, and
> may not be available on all targets."
It is different from weak in that it doesn't require any object file or
linker support. For instance, here's what the __strong_reference does in
e_acos.c:
.globl acos
.set acos,__ieee754_acos
Using __weak_reference does this instead:
.weak acos
.equ acos, __ieee754_acos
The GCC docs don't really talk about non-weak aliases at all which makes
me unhappy as it would be useful to know if the statement you quoted
refers to *all* aliases, or only weak aliases.
However, given the current GCC docs, we'll certainly want to use a
separate conditional instead of attempting to auto-detect this mode.
I'll add that, but I won't add any autotools mechanism to define it as I
cannot rebuild the configure scripts on Debian any longer.
I'm not getting a sense of whether you think this is a useful change
though; it seems like a fairly obvious optimization of the existing
feature to me, but perhaps you're finding it too complicated to be
useful upstream?
--
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20180921/0cf59caf/attachment.sig>
More information about the Newlib
mailing list