From a2ca165230cfa951605e5904be838c3e3e04be0b Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 1 Oct 2017 15:15:15 -0700 Subject: Mark internal gmp functions with attribute_hidden [BZ #18822] Mark internal gmp functions with attribute_hidden to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * include/gmp.h: Declare internal functions only if _ISOMAC is undefined. (__mpn_extract_double): Add attribute_hidden. (__mpn_extract_long_double): Likewise. (__mpn_extract_float128): Likewise. (__mpn_construct_float): Likewise. (__mpn_construct_double): Likewise. (__mpn_construct_long_double): Likewise. (__mpn_construct_float128): Likewise. (mpn_add_1): Likewise. (mpn_addmul_1): Likewise. (mpn_add_n): Likewise. (mpn_cmp): Likewise. (mpn_divrem): Likewise. (mpn_lshift): Likewise. (mpn_mul): Likewise. (mpn_mul_1): Likewise. (mpn_rshift): Likewise. (mpn_sub_1): Likewise. (mpn_submul_1): Likewise. (mpn_sub_n): Likewise. --- stdlib/gmp-impl.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'stdlib') diff --git a/stdlib/gmp-impl.h b/stdlib/gmp-impl.h index 42d3e4afac..cbbf9479ac 100644 --- a/stdlib/gmp-impl.h +++ b/stdlib/gmp-impl.h @@ -308,13 +308,17 @@ typedef unsigned int UHWtype; /* Prototypes for internal mpn calls. */ extern void impn_mul_n_basecase _PROTO ((mp_ptr prodp, mp_srcptr up, - mp_srcptr vp, mp_size_t size)); + mp_srcptr vp, mp_size_t size)) + attribute_hidden; extern void impn_mul_n _PROTO ((mp_ptr prodp, mp_srcptr up, mp_srcptr vp, - mp_size_t size, mp_ptr tspace)); + mp_size_t size, mp_ptr tspace)) + attribute_hidden; extern void impn_sqr_n_basecase _PROTO ((mp_ptr prodp, mp_srcptr up, - mp_size_t size)); + mp_size_t size)) + attribute_hidden; extern void impn_sqr_n _PROTO ((mp_ptr prodp, mp_srcptr up, mp_size_t size, - mp_ptr tspace)); + mp_ptr tspace)) + attribute_hidden; -- cgit v1.2.3-70-g09d2