About stdlib/strto* change
Jakub Jelinek
jakub@redhat.com
Mon Aug 13 15:28:00 GMT 2007
On Mon, Aug 13, 2007 at 11:56:06PM +0900, Kaz Kojima wrote:
> There is a build failure for SH during compiling stdlib/strtold_l.c:
>
> strtold_l.c:61: error: 'strtold_l' aliased to undefined symbol '__strtold_l'
>
> In Aug 6 Roland's change, libc_hidden_proto (__strtold_l) is added
> to include/stdlib.h and weak_alias (__STRTOLD, STRTOLD) is added to
> stdlib/strtold_l.c. It seems that libc_hedden_def is needed also
> for __strtold_l just before the above weak_alias statement. Is it
> right? x86 uses sysdeps/ieee754/ldbl-96/strtold_l.c which includes
> stdlib/strtod_l.c instead of stdlib/strtold_l.c and the corresponding
> libc_hedden_def was added to stdlib/strtod_l.c at that time.
> The attached patch works for me, though I suspect that I've missed
> something.
I believe you should match what has been added to strtod_l.c, i.e.:
{
return INTERNAL (__STRTOD) (nptr, endptr, 0, loc);
}
+#if defined _LIBC
+libc_hidden_def (__STRTOLD)
+libc_hidden_ver (__STRTOLD, STRTOLD)
+#endif
weak_alias (__STRTOLD, STRTOLD)
otherwise calls to strtold_l from within libc.so will go through
PLT. stdlib/strtold_l.c is only used on
sizeof (double) == sizeof (long double) arches, which I'm afraid
I don't have access to any.
Jakub
More information about the Libc-hacker
mailing list