summaryrefslogtreecommitdiff
path: root/nscd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-01 17:49:47 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-01 17:49:59 -0700
commit36e7ae1e9d3b6a434e119aab4d10176aaaddf0c3 (patch)
treeb0c5db0b386dc00f6c0ffc8c37f304a71a6b7d32 /nscd
parent87078544f24cfbd355bf2f7e63a0d01ff7c96cca (diff)
Hide internal __nis_hash function [BZ #18822]
Hide internal __nis_hash function to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * nscd/nscd_helper.c (__nis_hash): New prototype.
Diffstat (limited to 'nscd')
-rw-r--r--nscd/nscd_helper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
index a225623f92..56e6d1421f 100644
--- a/nscd/nscd_helper.c
+++ b/nscd/nscd_helper.c
@@ -443,6 +443,11 @@ __nscd_get_map_ref (request_type type, const char *name,
#define MINIMUM_HASHENTRY_SIZE \
(offsetof (struct hashentry, dellist) + sizeof (int32_t))
+/* __nis_hash is defined in nis_hash.c which is included both libnsl
+ and libc. Since the one in libnsl is exported and the one in libc
+ is hidden, __nis_hash is marked as hidden where it is referenced,
+ not where it is defined. */
+extern __typeof (__nis_hash) __nis_hash attribute_hidden;
/* Don't return const struct datahead *, as eventhough the record
is normally constant, it can change arbitrarily during nscd