[44/58] Hide internal __hash_string function [BZ #18822]

Message ID 20170901180029.9527-45-hjl.tools@gmail.com
State Committed
Commit 57f859bdb7be1acb7eea48aba8edf0c6b5900191
Headers

Commit Message

H.J. Lu Sept. 1, 2017, 6 p.m. UTC
  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.
---
 intl/hash-string.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

H.J. Lu Oct. 2, 2017, 12:40 a.m. UTC | #1
On 9/1/17, H.J. Lu <hjl.tools@gmail.com> wrote:
> 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.

Tested with build-many-glibcs.py.  I am checking it in.
  

Patch

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;