]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Don't use INTDEF/INTUSE with _dl_mcount (bug 14132).
authorJoseph Myers <joseph@codesourcery.com>
Wed, 5 Nov 2014 01:02:47 +0000 (01:02 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 5 Nov 2014 01:02:47 +0000 (01:02 +0000)
Continuing the removal of the obsolete INTDEF / INTUSE mechanism, this
patch replaces its use for _dl_mcount with use of rtld_hidden_def /
rtld_hidden_proto.

Tested for x86_64 that installed stripped shared libraries are
unchanged by the patch.

[BZ #14132]
* elf/dl-profile.c (_dl_mcount): Use rtld_hidden_def instead of
INTDEF.
* sysdeps/generic/ldsodefs.h (_dl_mcount_internal): Remove
declaration.
(_dl_mcount): Use rtld_hidden_proto.
* elf/dl-runtime.c (_dl_profile_fixup): Don't use INTUSE with
_dl_mcount.
* elf/rtld.c (_rtld_global_ro): Likewise.

ChangeLog
elf/dl-profile.c
elf/dl-runtime.c
elf/rtld.c
sysdeps/generic/ldsodefs.h

index 21cf47f55291ad45748a1b9c5b023fda120902a0..bcd5d671e0c1ff131a3d924211f98ffb43ad02ac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2014-11-04  Joseph Myers  <joseph@codesourcery.com>
 
+       [BZ #14132]
+       * elf/dl-profile.c (_dl_mcount): Use rtld_hidden_def instead of
+       INTDEF.
+       * sysdeps/generic/ldsodefs.h (_dl_mcount_internal): Remove
+       declaration.
+       (_dl_mcount): Use rtld_hidden_proto.
+       * elf/dl-runtime.c (_dl_profile_fixup): Don't use INTUSE with
+       _dl_mcount.
+       * elf/rtld.c (_rtld_global_ro): Likewise.
+
        [BZ #14132]
        * elf/dl-init.c (_dl_init): Don't use INTDEF.
        * sysdeps/aarch64/dl-machine.h (RTLD_START): Use _dl_init instead
index 2fca7fda19517434e40c5f986c637a62fbf7e40c..4f83497d32f3e4452cbb6a09b3d2244e458b6744 100644 (file)
@@ -598,4 +598,4 @@ _dl_mcount (ElfW(Addr) frompc, ElfW(Addr) selfpc)
  done:
   ;
 }
-INTDEF(_dl_mcount)
+rtld_hidden_def (_dl_mcount)
index 11eba4a83264c21061210b25081495bdf6d49001..ee02d5a0e477440d3d3850a0ae2396d6c204ef3f 100644 (file)
@@ -158,7 +158,7 @@ _dl_profile_fixup (
                   struct link_map *l, ElfW(Word) reloc_arg,
                   ElfW(Addr) retaddr, void *regs, long int *framesizep)
 {
-  void (*mcount_fct) (ElfW(Addr), ElfW(Addr)) = INTUSE(_dl_mcount);
+  void (*mcount_fct) (ElfW(Addr), ElfW(Addr)) = _dl_mcount;
 
   if (l->l_reloc_result == NULL)
     {
index 537fc437444ae90842d2ec0d41768becc14c8d7d..b07ff435dc33cc05f458ef0e0349d80eb803fcf3 100644 (file)
@@ -170,7 +170,7 @@ struct rtld_global_ro _rtld_global_ro attribute_relro =
     ._dl_debug_printf = _dl_debug_printf,
     ._dl_catch_error = _dl_catch_error,
     ._dl_signal_error = _dl_signal_error,
-    ._dl_mcount = _dl_mcount_internal,
+    ._dl_mcount = _dl_mcount,
     ._dl_lookup_symbol_x = _dl_lookup_symbol_x,
     ._dl_check_caller = _dl_check_caller,
     ._dl_open = _dl_open,
index d1c8e2cb9d09465e31466fcf5b724133e79bd9fd..f339ee3db9cede9f67dc4a7b456d17f4050eaf67 100644 (file)
@@ -885,8 +885,7 @@ extern void _dl_start_profile (void) internal_function attribute_hidden;
 
 /* The actual functions used to keep book on the calls.  */
 extern void _dl_mcount (ElfW(Addr) frompc, ElfW(Addr) selfpc);
-extern void _dl_mcount_internal (ElfW(Addr) frompc, ElfW(Addr) selfpc)
-     attribute_hidden;
+rtld_hidden_proto (_dl_mcount)
 
 /* This function is simply a wrapper around the _dl_mcount function
    which does not require a FROMPC parameter since this is the