This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 16/19] Mark ld.so internel mmap functions hidden
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 14 Oct 2015 15:47:54 -0700
- Subject: [PATCH 16/19] Mark ld.so internel mmap functions hidden
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Since ld.so internel mmap functions are only used internally in ld.so,
they can be made hidden.
[BZ #19122]
* include/sys/mman.h [IS_IN (rtld)] (__mmap): Add
attribute_hidden.
[IS_IN (rtld)] (__mprotect): Likewise.
[IS_IN (rtld)] (__munmap): Likewise.
---
include/sys/mman.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/sys/mman.h b/include/sys/mman.h
index fd125ec..fdfedbb 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -16,6 +16,12 @@ libc_hidden_proto (__madvise)
/* This one is Linux specific. */
extern void *__mremap (void *__addr, size_t __old_len,
size_t __new_len, int __flags, ...);
+
+# if IS_IN (rtld)
+extern __typeof (__mmap) __mmap attribute_hidden;
+extern __typeof (__mprotect) __mprotect attribute_hidden;
+extern __typeof (__munmap) __munmap attribute_hidden;
+# endif
#endif
#endif
--
2.4.3