Hide internal __tdestroy function [BZ #18822]
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 1 Oct 2017 23:06:43 +0000 (16:06 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 1 Oct 2017 23:06:58 +0000 (16:06 -0700)
Hide internal __tdestroy function to allow direct access within libc.so
and libc.a without using GOT nor PLT.

[BZ #18822]
* include/search.h (__tdestroy): Add libc_hidden_proto.
* misc/tsearch.c (__tdestroy): Add libc_hidden_def.

ChangeLog
include/search.h
misc/tsearch.c

index 2b486b1..ccdc1c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
 2017-10-01  H.J. Lu  <hongjiu.lu@intel.com>
 
        [BZ #18822]
+       * include/search.h (__tdestroy): Add libc_hidden_proto.
+       * misc/tsearch.c (__tdestroy): Add libc_hidden_def.
+
+2017-10-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+       [BZ #18822]
        * include/assert.h (__assert_fail_base): Add attribute_hidden.
 
 2017-10-01  H.J. Lu  <hongjiu.lu@intel.com>
index a941959..e176930 100644 (file)
@@ -24,5 +24,6 @@ libc_hidden_proto (__tdelete)
 extern void __twalk (const void *__root, __action_fn_t action);
 libc_hidden_proto (__twalk)
 extern void __tdestroy (void *__root, __free_fn_t freefct);
+libc_hidden_proto (__tdestroy)
 #endif
 #endif
index aef9c7c..cdc401a 100644 (file)
@@ -745,4 +745,5 @@ __tdestroy (void *vroot, __free_fn_t freefct)
   if (root != NULL)
     tdestroy_recurse (root, freefct);
 }
+libc_hidden_def (__tdestroy)
 weak_alias (__tdestroy, tdestroy)