diff mbox series

[23/58] Mark internal netlink functions with attribute_hidden [BZ #18822]

Message ID 20170901180029.9527-24-hjl.tools@gmail.com
State New
Headers show
Series Hide internal functions in libc.so | expand

Commit Message

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

	[BZ #18822]
	* sysdeps/unix/sysv/linux/netlinkaccess.h (__netlink_open): Add
	attribute_hidden.
	(__netlink_close): Likewise.
	(__netlink_free_handle): Likewise.
	(__netlink_request): Likewise.
---
 sysdeps/unix/sysv/linux/netlinkaccess.h | 10 ++++++----
 1 file changed, 6 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 netlink functions with attribute_hidden to allow direct
> access within libc.so and libc.a without using GOT nor PLT.
>
> 	[BZ #18822]
> 	* sysdeps/unix/sysv/linux/netlinkaccess.h (__netlink_open): Add
> 	attribute_hidden.
> 	(__netlink_close): Likewise.
> 	(__netlink_free_handle): Likewise.
> 	(__netlink_request): Likewise.

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

Patch

diff --git a/sysdeps/unix/sysv/linux/netlinkaccess.h b/sysdeps/unix/sysv/linux/netlinkaccess.h
index 66bbbe6158..f4973e2a04 100644
--- a/sysdeps/unix/sysv/linux/netlinkaccess.h
+++ b/sysdeps/unix/sysv/linux/netlinkaccess.h
@@ -44,10 +44,12 @@  struct netlink_handle
 };
 
 
-extern int __netlink_open (struct netlink_handle *h);
-extern void __netlink_close (struct netlink_handle *h);
-extern void __netlink_free_handle (struct netlink_handle *h);
-extern int __netlink_request (struct netlink_handle *h, int type);
+extern int __netlink_open (struct netlink_handle *h) attribute_hidden;
+extern void __netlink_close (struct netlink_handle *h) attribute_hidden;
+extern void __netlink_free_handle (struct netlink_handle *h)
+     attribute_hidden;
+extern int __netlink_request (struct netlink_handle *h, int type)
+     attribute_hidden;
 
 /* Terminate the process if RESULT is an invalid recvmsg result for
    the netlink socket FD.  */