Don't use __weak_reference() when a __strong_reference() is needed.

OpenLibm uses the __weak_reference() macro for platforms where double
and long double use the same layout. That way functions only need to be
provided by the library once. The point is, in this specific case we
want to use strong references; not weak references.

Strong references can be used to give a symbol a second name. If you
look at the resulting object file, you will have two symbols with the
same offset and size. Weak references are different, in the sense that
they are marked in such a way that they act as fallbacks. They are only
used if an explicitly matching symbol is missing.
This commit is contained in:
Ed Schouten 2015-01-10 10:04:11 +01:00
parent c253db68ca
commit 9ab9db387d
29 changed files with 32 additions and 32 deletions

View file

@ -107,5 +107,5 @@ __ieee754_acos(double x)
}
#if LDBL_MANT_DIG == 53
__weak_reference(acos, acosl);
__strong_reference(acos, acosl);
#endif

View file

@ -113,5 +113,5 @@ __ieee754_asin(double x)
}
#if LDBL_MANT_DIG == 53
__weak_reference(asin, asinl);
__strong_reference(asin, asinl);
#endif

View file

@ -125,5 +125,5 @@ __ieee754_atan2(double y, double x)
}
#if LDBL_MANT_DIG == 53
__weak_reference(atan2, atan2l);
__strong_reference(atan2, atan2l);
#endif

View file

@ -127,5 +127,5 @@ __ieee754_hypot(double x, double y)
}
#if LDBL_MANT_DIG == 53
__weak_reference(hypot, hypotl);
__strong_reference(hypot, hypotl);
#endif

View file

@ -75,5 +75,5 @@ __ieee754_remainder(double x, double p)
}
#if LDBL_MANT_DIG == 53
__weak_reference(remainder, remainderl);
__strong_reference(remainder, remainderl);
#endif

View file

@ -189,7 +189,7 @@ __ieee754_sqrt(double x)
}
#if (LDBL_MANT_DIG == 53)
__weak_reference(sqrt, sqrtl);
__strong_reference(sqrt, sqrtl);
#endif
/*

View file

@ -120,5 +120,5 @@ atan(double x)
}
#if LDBL_MANT_DIG == 53
__weak_reference(atan, atanl);
__strong_reference(atan, atanl);
#endif

View file

@ -114,5 +114,5 @@ cbrt(double x)
}
#if (LDBL_MANT_DIG == 53)
__weak_reference(cbrt, cbrtl);
__strong_reference(cbrt, cbrtl);
#endif

View file

@ -73,5 +73,5 @@ ceil(double x)
}
#if LDBL_MANT_DIG == 53
__weak_reference(ceil, ceill);
__strong_reference(ceil, ceill);
#endif

View file

@ -85,5 +85,5 @@ cos(double x)
}
#if (LDBL_MANT_DIG == 53)
__weak_reference(cos, cosl);
__strong_reference(cos, cosl);
#endif

View file

@ -43,5 +43,5 @@ cproj(double complex z)
}
#if LDBL_MANT_DIG == 53
__weak_reference(cproj, cprojl);
__strong_reference(cproj, cprojl);
#endif

View file

@ -110,5 +110,5 @@ csqrt(double complex z)
}
#if LDBL_MANT_DIG == 53
__weak_reference(csqrt, csqrtl);
__strong_reference(csqrt, csqrtl);
#endif

View file

@ -392,5 +392,5 @@ exp2(double x)
}
#if (LDBL_MANT_DIG == 53)
__weak_reference(exp2, exp2l);
__strong_reference(exp2, exp2l);
#endif

View file

@ -74,5 +74,5 @@ floor(double x)
}
#if LDBL_MANT_DIG == 53
__weak_reference(floor, floorl);
__strong_reference(floor, floorl);
#endif

View file

@ -280,5 +280,5 @@ fma(double x, double y, double z)
}
#if (LDBL_MANT_DIG == 53)
__weak_reference(fma, fmal);
__strong_reference(fma, fmal);
#endif

View file

@ -52,5 +52,5 @@ frexp(double x, int *eptr)
}
#if (LDBL_MANT_DIG == 53)
__weak_reference(frexp, frexpl);
__strong_reference(frexp, frexpl);
#endif

View file

@ -62,4 +62,4 @@ __isinfl(long double e)
}
#endif
__weak_reference(__isinff, isinff);
__strong_reference(__isinff, isinff);

View file

@ -63,4 +63,4 @@ __isnanl(long double e)
}
#endif
__weak_reference(__isnanf, isnanf);
__strong_reference(__isnanf, isnanf);

View file

@ -45,5 +45,5 @@ logb(double x)
}
#if (LDBL_MANT_DIG == 53)
__weak_reference(logb, logbl);
__strong_reference(logb, logbl);
#endif

View file

@ -120,5 +120,5 @@ nanf(const char *s)
}
#if (LDBL_MANT_DIG == 53)
__weak_reference(nan, nanl);
__strong_reference(nan, nanl);
#endif

View file

@ -77,7 +77,7 @@ nextafter(double x, double y)
}
#if (LDBL_MANT_DIG == 53)
__weak_reference(nextafter, nexttoward);
__weak_reference(nextafter, nexttowardl);
__weak_reference(nextafter, nextafterl);
__strong_reference(nextafter, nexttoward);
__strong_reference(nextafter, nexttowardl);
__strong_reference(nextafter, nextafterl);
#endif

View file

@ -154,5 +154,5 @@ fixup:
}
#if LDBL_MANT_DIG == 53
__weak_reference(remquo, remquol);
__strong_reference(remquo, remquol);
#endif

View file

@ -88,5 +88,5 @@ rint(double x)
}
#if (LDBL_MANT_DIG == 53)
__weak_reference(rint, rintl);
__strong_reference(rint, rintl);
#endif

View file

@ -59,8 +59,8 @@ scalbn (double x, int n)
}
#if (LDBL_MANT_DIG == 53)
__weak_reference(scalbn, ldexpl);
__weak_reference(scalbn, scalbnl);
__strong_reference(scalbn, ldexpl);
__strong_reference(scalbn, scalbnl);
#endif
__strong_reference(scalbn, ldexp);

View file

@ -85,5 +85,5 @@ sin(double x)
}
#if (LDBL_MANT_DIG == 53)
__weak_reference(sin, sinl);
__strong_reference(sin, sinl);
#endif

View file

@ -146,5 +146,5 @@ sincos(double x, double * s, double * c)
}
#if (LDBL_MANT_DIG == 53)
__weak_reference(sincos, sincosl);
__strong_reference(sincos, sincosl);
#endif

View file

@ -79,5 +79,5 @@ tan(double x)
}
#if (LDBL_MANT_DIG == 53)
__weak_reference(tan, tanl);
__strong_reference(tan, tanl);
#endif

View file

@ -63,5 +63,5 @@ trunc(double x)
}
#if LDBL_MANT_DIG == 53
__weak_reference(trunc, truncl);
__strong_reference(trunc, truncl);
#endif

View file

@ -21,5 +21,5 @@ cabs(double complex z)
}
#if LDBL_MANT_DIG == 53
__weak_reference(cabs, cabsl);
__strong_reference(cabs, cabsl);
#endif