From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15719 invoked by alias); 23 Aug 2019 14:45:41 -0000 Mailing-List: contact glibc-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: , Sender: glibc-cvs-owner@sourceware.org List-Subscribe: Received: (qmail 15560 invoked by uid 9943); 23 Aug 2019 14:45:41 -0000 Date: Fri, 23 Aug 2019 14:45:00 -0000 Message-ID: <20190823144541.15558.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] linux: Make profil_counter a compat_symbol (BZ#17726) X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/master X-Git-Oldrev: a43565ac447b1608ae2626f5012673560bb623ab X-Git-Newrev: 08d57105bbcbb4f950cd7cdf881a50977e44b8c6 X-SW-Source: 2019-q3/txt/msg00391.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=08d57105bbcbb4f950cd7cdf881a50977e44b8c6 commit 08d57105bbcbb4f950cd7cdf881a50977e44b8c6 Author: Adhemerval Zanella Date: Thu Aug 1 18:01:22 2019 +0000 linux: Make profil_counter a compat_symbol (BZ#17726) As indicated by Joseph's comment on BZ#17726, this symbol is most likely a historical ABI accident. This patch make it on both arm and sparc ABIs a compat_symbol. Checked against a build arm-linux-gnueabihf, sparcv9-linux-gnu, adn sparc64-linux-gnu to see if the symbol is still present. * gmon/Versions (libc) [GLIBC_2.31]: New entry. * sysdeps/unix/sysv/linux/arm/profil-counter.h (profil_counter): Make a compat_symbol. * sysdeps/unix/sysv/linux/sparc/profil-counter.h (__profil_counter_global): Likewise. Diff: --- ChangeLog | 6 ++++++ gmon/Versions | 2 ++ sysdeps/unix/sysv/linux/arm/profil-counter.h | 5 ++++- sysdeps/unix/sysv/linux/sparc/profil-counter.h | 5 ++++- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 386e025..8c98317 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ 2019-08-23 Adhemerval Zanella Florian Weimer + * gmon/Versions (libc) [GLIBC_2.31]: New entry. + * sysdeps/unix/sysv/linux/arm/profil-counter.h (profil_counter): + Make a compat_symbol. + * sysdeps/unix/sysv/linux/sparc/profil-counter.h + (__profil_counter_global): Likewise. + * debug/segfault.c (install_handler): Use SA_SIGINFO if defined. * sysdeps/generic/profil-counter.h (__profil_counter): Cast to uintptr_t. diff --git a/gmon/Versions b/gmon/Versions index d0b6333..cc705bd 100644 --- a/gmon/Versions +++ b/gmon/Versions @@ -19,4 +19,6 @@ libc { GLIBC_2.2.3 { sprofil; } + GLIBC_2.31 { + } } diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h index 040c7aa..df39333 100644 --- a/sysdeps/unix/sysv/linux/arm/profil-counter.h +++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h @@ -30,5 +30,8 @@ __profil_counter (int signo, siginfo_t *_si, void *scp) asm volatile (""); } #ifndef __profil_counter -weak_alias (__profil_counter, profil_counter) +# include +# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_31) +compat_symbol (libc, __profil_counter, profil_counter, GLIBC_2_0); +# endif #endif diff --git a/sysdeps/unix/sysv/linux/sparc/profil-counter.h b/sysdeps/unix/sysv/linux/sparc/profil-counter.h index ad06a4f..0127110 100644 --- a/sysdeps/unix/sysv/linux/sparc/profil-counter.h +++ b/sysdeps/unix/sysv/linux/sparc/profil-counter.h @@ -21,6 +21,8 @@ #include #ifndef __profil_counter +# include +# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_31) void __profil_counter_global (int signo, struct sigcontext *si) { @@ -30,5 +32,6 @@ __profil_counter_global (int signo, struct sigcontext *si) profil_count (si->si_regs.pc); #endif } -weak_alias (__profil_counter_global, profil_counter) +compat_symbol (libc, __profil_counter_global, profil_counter, GLIBC_2_0); +# endif #endif