aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-12-03 20:32:49 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-12-09 15:04:56 -0300
commit0487ebed2278b20971af4cabf186fd3681adccf0 (patch)
tree3d5424fedbc56d2436e0857dbf2e48cbda4c6077 /nptl
parent7badf7b06fe796b3f549663d0d65d3012a7e0457 (diff)
downloadglibc-0487ebed2278b20971af4cabf186fd3681adccf0.zip
glibc-0487ebed2278b20971af4cabf186fd3681adccf0.tar.gz
glibc-0487ebed2278b20971af4cabf186fd3681adccf0.tar.bz2
nptl: Add more missing placeholder abi symbol from nanosleep move
This patch adds the missing __libpthread_version_placeholder for GLIBC_2.2.6 version from the nanosleep implementation move from libpthread to libc (79a547b162). It also fixes the wrong compat symbol definitions added by changing back the version used on vfork check and remove the __libpthread_version_placeholder added on some ABI (4f4bb489e0dd). The __libpthread_version_placeholder is also refactored to make it simpler to add new compat_symbols by adding a new macro compat_symbol_unique which uses the compiler extension __COUNTER__ to generate unique strong alias to be used with compat_symbol. Checked with a updated-abi on the all affected abis of the nanosleep move. Change-Id: I347a4dbdc931bb42b359456932dd1e17aa4d4078
Diffstat (limited to 'nptl')
-rw-r--r--nptl/libpthread-compat.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/nptl/libpthread-compat.c b/nptl/libpthread-compat.c
index 7398f5e..e2db3f2 100644
--- a/nptl/libpthread-compat.c
+++ b/nptl/libpthread-compat.c
@@ -16,8 +16,18 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#include <sys/cdefs.h>
#include <shlib-compat.h>
+#ifdef SHARED
+static void
+attribute_compat_text_section
+__attribute_used__
+__libpthread_version_placeholder (void)
+{
+}
+#endif
+
/* This is an unused compatibility symbol definition, to prevent ld
from creating a weak version definition for GLIBC_2.1.2. (__vfork
used to be defined at that version, but it is now provided by libc,
@@ -26,12 +36,12 @@
version or later, the placeholder symbol is not needed because
there are plenty of other symbols which populate those later
versions. */
-#if (SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_2_6))
-void
-attribute_compat_text_section
-__libpthread_version_placeholder (void)
-{
-}
-compat_symbol (libpthread, __libpthread_version_placeholder,
- __libpthread_version_placeholder, GLIBC_2_1_2);
+#if (SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_2))
+compat_symbol_unique (libpthread,
+ __libpthread_version_placeholder, GLIBC_2_1_2);
+#endif
+
+#if (SHLIB_COMPAT (libpthread, GLIBC_2_2_6, GLIBC_2_3))
+compat_symbol_unique (libpthread,
+ __libpthread_version_placeholder, GLIBC_2_2_6);
#endif