]> sourceware.org Git - glibc.git/commitdiff
linux: Make profil_counter a compat_symbol (BZ#17726)
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 1 Aug 2019 18:01:22 +0000 (18:01 +0000)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 23 Aug 2019 14:30:56 +0000 (11:30 -0300)
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.

ChangeLog
gmon/Versions
sysdeps/unix/sysv/linux/arm/profil-counter.h
sysdeps/unix/sysv/linux/sparc/profil-counter.h

index 386e025fbc13a443b9de016afab7c4c28f95fe91..8c98317b82be3c19603e20a3e0ebdf1fb68ecd9f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
 2019-08-23  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
            Florian Weimer  <fweimer@redhat.com>
 
+       * 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.
index d0b63334f26d381b4edb30e403030df9b751e58d..cc705bd97829c655fb2856328b10bc6ae7ebc63c 100644 (file)
@@ -19,4 +19,6 @@ libc {
   GLIBC_2.2.3 {
     sprofil;
   }
+  GLIBC_2.31 {
+  }
 }
index 040c7aa59a09705366fedb9d31c8d7be2a43f371..df393332e2a71ed38da835e4138cd05e87dbecbc 100644 (file)
@@ -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 <shlib-compat.h>
+# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_31)
+compat_symbol (libc, __profil_counter, profil_counter, GLIBC_2_0);
+# endif
 #endif
index ad06a4fe061be2c4e64d512d5f6a94ab9b5f97f4..01271103bbdee73ca2a99e7c5e093c2afad807eb 100644 (file)
@@ -21,6 +21,8 @@
 #include <sysdeps/unix/sysv/linux/profil-counter.h>
 
 #ifndef __profil_counter
+# include <shlib-compat.h>
+# 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
This page took 0.084922 seconds and 5 git commands to generate.