[30/58] Hide __posix_spawn_file_actions_realloc/__spawni [BZ #18822]

Message ID 20170901180029.9527-31-hjl.tools@gmail.com
State Committed
Commit 85b358949d506ddc7c35301e7ae1316d2036a736
Headers

Commit Message

H.J. Lu Sept. 1, 2017, 6 p.m. UTC
  Hide internal __posix_spawn_file_actions_realloc and /__spawni functions
to allow direct access within libc.so and libc.a without using GOT nor
PLT.

	[BZ #18822]
	* posix/spawn_int.h (__posix_spawn_file_actions_realloc): Add
	attribute_hidden.
	(__spawni): Likewise.
---
 posix/spawn_int.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Comments

H.J. Lu Oct. 1, 2017, 10:34 p.m. UTC | #1
On 9/1/17, H.J. Lu <hjl.tools@gmail.com> wrote:
> Hide internal __posix_spawn_file_actions_realloc and /__spawni functions
> to allow direct access within libc.so and libc.a without using GOT nor
> PLT.
>
> 	[BZ #18822]
> 	* posix/spawn_int.h (__posix_spawn_file_actions_realloc): Add
> 	attribute_hidden.
> 	(__spawni): Likewise.
> ---

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

Patch

diff --git a/posix/spawn_int.h b/posix/spawn_int.h
index 6ada827f55..01bf603e27 100644
--- a/posix/spawn_int.h
+++ b/posix/spawn_int.h
@@ -57,12 +57,13 @@  struct __spawn_action
 #define SPAWN_XFLAGS_TRY_SHELL	0x2
 
 extern int __posix_spawn_file_actions_realloc (posix_spawn_file_actions_t *
-					       file_actions);
+					       file_actions)
+     attribute_hidden;
 
 extern int __spawni (pid_t *pid, const char *path,
 		     const posix_spawn_file_actions_t *file_actions,
 		     const posix_spawnattr_t *attrp, char *const argv[],
-		     char *const envp[], int xflags);
+		     char *const envp[], int xflags) attribute_hidden;
 
 /* Return true if FD falls into the range valid for file descriptors.
    The check in this form is mandated by POSIX.  */