[22/58] Mark internal rpc functions with attribute_hidden [BZ #18822]

Message ID 20170901180029.9527-23-hjl.tools@gmail.com
State Committed
Commit d48354d86087ba63acb7e2b20fb604c0b6ba4352
Headers

Commit Message

H.J. Lu Sept. 1, 2017, 5:59 p.m. UTC
  Mark internal rpc functions with attribute_hidden to allow direct
access within libc.so and libc.a without using GOT nor PLT.

	[BZ #18822]
	* include/rpc/rpc.h (__rpc_thread_variables): Add
	attribute_hidden.
	(__rpc_thread_svc_cleanup): Likewise.
	(__rpc_thread_clnt_cleanup): Likewise.
	(__rpc_thread_key_cleanup): Likewise.
---
 include/rpc/rpc.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Comments

H.J. Lu Oct. 1, 2017, 10:24 p.m. UTC | #1
On 9/1/17, H.J. Lu <hjl.tools@gmail.com> wrote:
> Mark internal rpc functions with attribute_hidden to allow direct
> access within libc.so and libc.a without using GOT nor PLT.
>
> 	[BZ #18822]
> 	* include/rpc/rpc.h (__rpc_thread_variables): Add
> 	attribute_hidden.
> 	(__rpc_thread_svc_cleanup): Likewise.
> 	(__rpc_thread_clnt_cleanup): Likewise.
> 	(__rpc_thread_key_cleanup): Likewise.

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

Patch

diff --git a/include/rpc/rpc.h b/include/rpc/rpc.h
index 60c78968de..1fb925e85c 100644
--- a/include/rpc/rpc.h
+++ b/include/rpc/rpc.h
@@ -41,10 +41,10 @@  struct rpc_thread_variables {
 };
 
 extern struct rpc_thread_variables *__rpc_thread_variables(void)
-     __attribute__ ((const));
-extern void __rpc_thread_svc_cleanup (void);
-extern void __rpc_thread_clnt_cleanup (void);
-extern void __rpc_thread_key_cleanup (void);
+     __attribute__ ((const)) attribute_hidden;
+extern void __rpc_thread_svc_cleanup (void) attribute_hidden;
+extern void __rpc_thread_clnt_cleanup (void) attribute_hidden;
+extern void __rpc_thread_key_cleanup (void) attribute_hidden;
 
 extern void __rpc_thread_destroy (void);