]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Make __tunables_init hidden and avoid PLT
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 25 May 2017 13:55:42 +0000 (06:55 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 25 May 2017 13:55:58 +0000 (06:55 -0700)
Since __tunables_init is internal to ld.so, we should mark it hidden
to avoid PLT.  We should also avoid PLT when calling __tunable_set_val
within ld.so.

2017-05-25   Siddhesh Poyarekar  <siddhesh@sourceware.org>
     H.J. Lu  <hongjiu.lu@intel.com>

* elf/dl-tunables.c (__tunable_set_val): Make a hidden alias.
* elf/dl-tunables.h (__tunables_init): Mark it hidden in rtld.
(__tunable_set_val): Likewise.

ChangeLog
elf/dl-tunables.c
elf/dl-tunables.h

index b0c2047b80ed01954a0640e91cab201a20eacc13..baf21026c39eb19b88fc6f082f25b71aea5fbac1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-05-25   Siddhesh Poyarekar  <siddhesh@sourceware.org>
+            H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf/dl-tunables.c (__tunable_set_val): Make a hidden alias.
+       * elf/dl-tunables.h (__tunables_init): Mark it hidden in rtld.
+       (__tunable_set_val): Likewise.
+
 2017-05-25  H.J. Lu  <hongjiu.lu@intel.com>
 
        * Makeconfig ($(common-objpfx)dl-tunable-list.h): Also check
index 8d72e268efc8b1b4403d66b6107528f0cc1fe8d6..b6e6b3da528327797e6b051e2fc835db693af67d 100644 (file)
@@ -470,3 +470,5 @@ cb:
   if (callback)
     callback (&cur->val);
 }
+
+rtld_hidden_def (__tunable_set_val)
index f33adfb359bba7665a105574761f39feb6e3fc43..20ee51254e2c2b053b293f2ab08dac19caf1a144 100644 (file)
@@ -69,6 +69,9 @@ typedef struct _tunable tunable_t;
 extern void __tunables_init (char **);
 extern void __tunable_set_val (tunable_id_t, void *, tunable_callback_t);
 
+rtld_hidden_proto (__tunables_init)
+rtld_hidden_proto (__tunable_set_val)
+
 /* Check if the tunable has been set to a non-default value and if it is, copy
    it over into __VAL.  */
 # define TUNABLE_SET_VAL(__id,__val) \