[36/58] Hide internal __fopen_maybe_mmap function [BZ #18822]

Message ID 20170901180029.9527-37-hjl.tools@gmail.com
State Committed
Commit 6036fc38bf50d61ac5f09a435ce4622b586238ed
Headers

Commit Message

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

	[BZ #18822]
	* libio/iolibio.h (__fopen_maybe_mmap): Add attribute_hidden.
---
 libio/iolibio.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

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

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

Patch

diff --git a/libio/iolibio.h b/libio/iolibio.h
index 754d8b0650..0185e685d4 100644
--- a/libio/iolibio.h
+++ b/libio/iolibio.h
@@ -25,7 +25,7 @@  extern _IO_FILE *_IO_new_fopen (const char*, const char*);
 extern _IO_FILE *_IO_fopen64 (const char*, const char*);
 extern _IO_FILE *__fopen_internal (const char*, const char*, int)
 	attribute_hidden;
-extern _IO_FILE *__fopen_maybe_mmap (_IO_FILE *) __THROW;
+extern _IO_FILE *__fopen_maybe_mmap (_IO_FILE *) __THROW attribute_hidden;
 extern int _IO_fprintf (_IO_FILE*, const char*, ...);
 extern int _IO_fputs (const char*, _IO_FILE*);
 libc_hidden_proto (_IO_fputs)