From: H.J. Lu Date: Mon, 2 Oct 2017 00:33:08 +0000 (-0700) Subject: Hide internal idna functions [BZ #18822] X-Git-Tag: glibc-2.27~790 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43b7dfd1b6cfd1b603e96270dc6a0b1758f81a13;p=thirdparty%2Fglibc.git Hide internal idna functions [BZ #18822] Hide internal idna functions to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * include/idna.h: New file. * inet/getnameinfo.c: Include instead of . (__idna_to_unicode_lzlz): Removed. * sysdeps/posix/getaddrinfo.c: Include instead of . (__idna_to_ascii_lz): Removed. (__idna_to_unicode_lzlz): Likewise. --- diff --git a/ChangeLog b/ChangeLog index dd228bc2f2c..ad10a7a1350 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2017-10-01 H.J. Lu + + [BZ #18822] + * include/idna.h: New file. + * inet/getnameinfo.c: Include instead of + . + (__idna_to_unicode_lzlz): Removed. + * sysdeps/posix/getaddrinfo.c: Include instead of + . + (__idna_to_ascii_lz): Removed. + (__idna_to_unicode_lzlz): Likewise. + 2017-10-01 H.J. Lu [BZ #18822] diff --git a/include/idna.h b/include/idna.h new file mode 100644 index 00000000000..dcb271d5757 --- /dev/null +++ b/include/idna.h @@ -0,0 +1,8 @@ +#ifndef _IDNA_H +#include + +extern __typeof (idna_to_ascii_lz) __idna_to_ascii_lz attribute_hidden; +extern __typeof (idna_to_unicode_lzlz ) __idna_to_unicode_lzlz + attribute_hidden; + +#endif diff --git a/inet/getnameinfo.c b/inet/getnameinfo.c index b41e555f3ce..292e087362d 100644 --- a/inet/getnameinfo.c +++ b/inet/getnameinfo.c @@ -73,9 +73,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #ifdef HAVE_LIBIDN -# include -extern int __idna_to_unicode_lzlz (const char *input, char **output, - int flags); +# include #endif #ifndef min diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index ce099bdf9cc..c58d54dff50 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -86,10 +86,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #ifdef HAVE_LIBIDN -extern int __idna_to_ascii_lz (const char *input, char **output, int flags); -extern int __idna_to_unicode_lzlz (const char *input, char **output, - int flags); -# include +# include #endif struct gaih_service