]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Obsolete _dl_mcount_wrapper in glibc 2.40 [BZ #31765]
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 21 May 2024 02:37:20 +0000 (19:37 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 21 May 2024 17:11:57 +0000 (10:11 -0700)
There is no _dl_mcount_wrapper prototype in any installed header files.
Fix BZ #31765 by changing _dl_mcount_wrapper to a compat symbol and
obsolete it in glibc 2.40.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
elf/libc-dl-profstub.c

index 36a65f4616e96d6ae5d6d52884851807721adc58..dd12443f2c7e4b36fdb16f648bdbf43285f6a119 100644 (file)
 #include <dlfcn.h>
 #include <elf.h>
 #include <ldsodefs.h>
+#include <shlib-compat.h>
 
 /* This is the map for the shared object we profile.  It is defined here
    only because we test for this value being NULL or not.  */
 
-
+#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_40)
+attribute_compat_text_section
 void
 _dl_mcount_wrapper (void *selfpc)
 {
   GLRO(dl_mcount) ((ElfW(Addr)) RETURN_ADDRESS (0), (ElfW(Addr)) selfpc);
 }
 
+compat_symbol (libc, _dl_mcount_wrapper, _dl_mcount_wrapper, GLIBC_2_1);
+#endif
 
 void
 _dl_mcount_wrapper_check (void *selfpc)