From: H.J. Lu Date: Tue, 21 May 2024 02:37:20 +0000 (-0700) Subject: Obsolete _dl_mcount_wrapper in glibc 2.40 [BZ #31765] X-Git-Tag: glibc-2.40~183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d97842653fba2fe5c093a101ac923a1b9e5e637c;p=thirdparty%2Fglibc.git Obsolete _dl_mcount_wrapper in glibc 2.40 [BZ #31765] 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 Reviewed-by: Sunil K Pandey --- diff --git a/elf/libc-dl-profstub.c b/elf/libc-dl-profstub.c index 36a65f4616..dd12443f2c 100644 --- a/elf/libc-dl-profstub.c +++ b/elf/libc-dl-profstub.c @@ -19,17 +19,21 @@ #include #include #include +#include /* 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)