about summary refs log tree commit diff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-01 17:41:20 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-01 17:41:34 -0700
commit57f859bdb7be1acb7eea48aba8edf0c6b5900191 (patch)
treecea245948dfc1275257d5a959e89014dadbfaab0
parentd19033298f832f5b3e10da6f07e7959f0483df74 (diff)
downloadglibc-57f859bdb7be1acb7eea48aba8edf0c6b5900191.tar.gz
glibc-57f859bdb7be1acb7eea48aba8edf0c6b5900191.tar.xz
glibc-57f859bdb7be1acb7eea48aba8edf0c6b5900191.zip
Hide internal __hash_string function [BZ #18822]
Hide internal __hash_string function to allow direct access within
libc.so and libc.a without using GOT nor PLT.

	[BZ #18822]
	* intl/hash-string.h (__hash_string): Add attribute_hidden.
-rw-r--r--ChangeLog5
-rw-r--r--intl/hash-string.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 24de2e0a6d..1d9b8a4bbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 2017-10-01  H.J. Lu  <hongjiu.lu@intel.com>
 
 	[BZ #18822]
+	* intl/hash-string.h (__hash_string): Add attribute_hidden.
+
+2017-10-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	[BZ #18822]
 	* include/mntent.h (__hasmntopt): Add libc_hidden_proto.
 	* misc/mntent_r.c (__hasmntopt): Add libc_hidden_def.
 
diff --git a/intl/hash-string.h b/intl/hash-string.h
index 21dcb16739..e579a7cab3 100644
--- a/intl/hash-string.h
+++ b/intl/hash-string.h
@@ -31,4 +31,5 @@
 /* Defines the so called `hashpjw' function by P.J. Weinberger
    [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
    1986, 1987 Bell Telephone Laboratories, Inc.]  */
-extern unsigned long int __hash_string (const char *str_param);
+extern unsigned long int __hash_string (const char *str_param)
+     attribute_hidden;