]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix glibc 2.34 ABI omission (missing GLIBC_2.34 in dynamic loader)
authorFlorian Weimer <fweimer@redhat.com>
Thu, 27 Jan 2022 15:03:58 +0000 (16:03 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 31 Jan 2022 13:58:02 +0000 (14:58 +0100)
The glibc 2.34 release really should have added a GLIBC_2.34
symbol to the dynamic loader. With it, we could move functions such
as dlopen or pthread_key_create that work on process-global state
into the dynamic loader (once we have fixed a longstanding issue
with static linking).  Without the GLIBC_2.34 symbol, yet another
new symbol version would be needed because old glibc will fail to
load binaries due to the missing symbol version in ld.so that newly
linked programs will require.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit af121ae3e7cd12628c91ecfc46a9d65313a6e972)

33 files changed:
elf/Makefile
elf/Versions
elf/dl-compat.c [new file with mode: 0644]
sysdeps/mach/hurd/i386/ld.abilist
sysdeps/unix/sysv/linux/aarch64/ld.abilist
sysdeps/unix/sysv/linux/alpha/ld.abilist
sysdeps/unix/sysv/linux/arc/ld.abilist
sysdeps/unix/sysv/linux/arm/be/ld.abilist
sysdeps/unix/sysv/linux/arm/le/ld.abilist
sysdeps/unix/sysv/linux/csky/ld.abilist
sysdeps/unix/sysv/linux/hppa/ld.abilist
sysdeps/unix/sysv/linux/i386/ld.abilist
sysdeps/unix/sysv/linux/ia64/ld.abilist
sysdeps/unix/sysv/linux/m68k/coldfire/ld.abilist
sysdeps/unix/sysv/linux/m68k/m680x0/ld.abilist
sysdeps/unix/sysv/linux/microblaze/ld.abilist
sysdeps/unix/sysv/linux/mips/mips32/ld.abilist
sysdeps/unix/sysv/linux/mips/mips64/n32/ld.abilist
sysdeps/unix/sysv/linux/mips/mips64/n64/ld.abilist
sysdeps/unix/sysv/linux/nios2/ld.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc64/be/ld.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc64/le/ld.abilist
sysdeps/unix/sysv/linux/riscv/rv32/ld.abilist
sysdeps/unix/sysv/linux/riscv/rv64/ld.abilist
sysdeps/unix/sysv/linux/s390/s390-32/ld.abilist
sysdeps/unix/sysv/linux/s390/s390-64/ld.abilist
sysdeps/unix/sysv/linux/sh/be/ld.abilist
sysdeps/unix/sysv/linux/sh/le/ld.abilist
sysdeps/unix/sysv/linux/sparc/sparc32/ld.abilist
sysdeps/unix/sysv/linux/sparc/sparc64/ld.abilist
sysdeps/unix/sysv/linux/x86_64/64/ld.abilist
sysdeps/unix/sysv/linux/x86_64/x32/ld.abilist

index f930e04e274a32a0f5d39ce43dc34b312955e53a..af4ccb978cdc0d6a361da2ab011facf22a7ccdff 100644 (file)
@@ -115,6 +115,7 @@ elide-routines.os = \
 # interpreter and operating independent of libc.
 rtld-routines = \
   $(all-dl-routines) \
+  dl-compat \
   dl-conflict \
   dl-diagnostics \
   dl-diagnostics-cpu \
index 775aab62af500f6c40c9feb559d082242d9aa8c9..2af210b8f771c950971c184dea98e4f5234ef206 100644 (file)
@@ -48,6 +48,9 @@ ld {
     # stack canary
     __stack_chk_guard;
   }
+  GLIBC_2.34 {
+    __rtld_version_placeholder;
+  }
   GLIBC_PRIVATE {
     # Those are in the dynamic linker, but used by libc.so.
     __libc_enable_secure;
diff --git a/elf/dl-compat.c b/elf/dl-compat.c
new file mode 100644 (file)
index 0000000..cc560c5
--- /dev/null
@@ -0,0 +1,32 @@
+/* Placeholder compatibility symbols.
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <shlib-compat.h>
+#include <sys/cdefs.h>
+
+/* GLIBC_2.34 placeholder for future symbol moves.  */
+
+void
+attribute_compat_text_section
+__attribute_used__
+__rtld_version_placeholder_1 (void)
+{
+}
+
+compat_symbol (ld, __rtld_version_placeholder_1,
+               __rtld_version_placeholder, GLIBC_2_34);
index 7e20c5e7ce8a7a5e81c37fd92ee33de00e4fb4d2..ebba31f7706d854d3ce5dcd6e0f208d5c8107e0f 100644 (file)
@@ -16,3 +16,4 @@ GLIBC_2.2.6 _r_debug D 0x14
 GLIBC_2.2.6 abort F
 GLIBC_2.3 ___tls_get_addr F
 GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
index 80b2fe672541c6e946c6ac202960c3528b5e85c6..b7196a80e2df8efce49b6e80210e734ec65bd118 100644 (file)
@@ -3,3 +3,4 @@ GLIBC_2.17 __stack_chk_guard D 0x8
 GLIBC_2.17 __tls_get_addr F
 GLIBC_2.17 _dl_mcount F
 GLIBC_2.17 _r_debug D 0x28
+GLIBC_2.34 __rtld_version_placeholder F
index 98a03f611f98f3a49d0f5eca738741ad92d950e3..13f7fc74af62941d649aa5c9b80a0f46c798bdd3 100644 (file)
@@ -2,4 +2,5 @@ GLIBC_2.0 _r_debug D 0x28
 GLIBC_2.1 __libc_stack_end D 0x8
 GLIBC_2.1 _dl_mcount F
 GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
 GLIBC_2.4 __stack_chk_guard D 0x8
index 048f17c8486f3d546948e8298a4afa4fdce16822..7284383a6bea8e64c68d1475fef08ba94e52a29e 100644 (file)
@@ -3,3 +3,4 @@ GLIBC_2.32 __stack_chk_guard D 0x4
 GLIBC_2.32 __tls_get_addr F
 GLIBC_2.32 _dl_mcount F
 GLIBC_2.32 _r_debug D 0x14
+GLIBC_2.34 __rtld_version_placeholder F
index cc8825c3bc68ad4aa08b1083acea3fa5f997a585..7987bbae1112aa3dda7239678db696062d626b17 100644 (file)
@@ -1,3 +1,4 @@
+GLIBC_2.34 __rtld_version_placeholder F
 GLIBC_2.4 __libc_stack_end D 0x4
 GLIBC_2.4 __stack_chk_guard D 0x4
 GLIBC_2.4 __tls_get_addr F
index cc8825c3bc68ad4aa08b1083acea3fa5f997a585..7987bbae1112aa3dda7239678db696062d626b17 100644 (file)
@@ -1,3 +1,4 @@
+GLIBC_2.34 __rtld_version_placeholder F
 GLIBC_2.4 __libc_stack_end D 0x4
 GLIBC_2.4 __stack_chk_guard D 0x4
 GLIBC_2.4 __tls_get_addr F
index 564ac09737d6d8d5afdb2aefae5dbd0c2aaffbf8..4939b20631dc6c5424ceb655f761f1c1c5e03d26 100644 (file)
@@ -3,3 +3,4 @@ GLIBC_2.29 __stack_chk_guard D 0x4
 GLIBC_2.29 __tls_get_addr F
 GLIBC_2.29 _dl_mcount F
 GLIBC_2.29 _r_debug D 0x14
+GLIBC_2.34 __rtld_version_placeholder F
index d155a59843df90918e3f6800efb86411f0f23b2e..7cc9ebd792c2aadc85b6086a783d72d6a4dae6ff 100644 (file)
@@ -2,4 +2,5 @@ GLIBC_2.2 __libc_stack_end D 0x4
 GLIBC_2.2 _dl_mcount F
 GLIBC_2.2 _r_debug D 0x14
 GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
 GLIBC_2.4 __stack_chk_guard D 0x4
index 0478e220712a55e68dbf03aa2afb8878411e2aef..e8d187b14d722a646c4ba2c8d0ead783804f4c00 100644 (file)
@@ -3,3 +3,4 @@ GLIBC_2.1 __libc_stack_end D 0x4
 GLIBC_2.1 _dl_mcount F
 GLIBC_2.3 ___tls_get_addr F
 GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
index 33f91199bfa516fbad2b738d27eef634e7ed6d56..be5122650ae2b3273d0c664b55ca2272a311afa7 100644 (file)
@@ -2,3 +2,4 @@ GLIBC_2.2 __libc_stack_end D 0x8
 GLIBC_2.2 _dl_mcount F
 GLIBC_2.2 _r_debug D 0x28
 GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
index cc8825c3bc68ad4aa08b1083acea3fa5f997a585..7987bbae1112aa3dda7239678db696062d626b17 100644 (file)
@@ -1,3 +1,4 @@
+GLIBC_2.34 __rtld_version_placeholder F
 GLIBC_2.4 __libc_stack_end D 0x4
 GLIBC_2.4 __stack_chk_guard D 0x4
 GLIBC_2.4 __tls_get_addr F
index 3ba474c27f62fb1035c194097f0d0fbe3eea303e..4f2854edf7746958568af4529a05368f08723871 100644 (file)
@@ -2,4 +2,5 @@ GLIBC_2.0 _r_debug D 0x14
 GLIBC_2.1 __libc_stack_end D 0x4
 GLIBC_2.1 _dl_mcount F
 GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
 GLIBC_2.4 __stack_chk_guard D 0x4
index a4933c3541119538383fd444b34cd4a35d5aab5b..9f0fdeca38890a34a4c2d1ac25074b6b7301bc24 100644 (file)
@@ -3,3 +3,4 @@ GLIBC_2.18 __stack_chk_guard D 0x4
 GLIBC_2.18 __tls_get_addr F
 GLIBC_2.18 _dl_mcount F
 GLIBC_2.18 _r_debug D 0x14
+GLIBC_2.34 __rtld_version_placeholder F
index be09641a48962434b03f2aa45897ef74da3e8eb9..f750067d5c34bf428a65749a37a6853299254072 100644 (file)
@@ -2,4 +2,5 @@ GLIBC_2.0 _r_debug D 0x14
 GLIBC_2.2 __libc_stack_end D 0x4
 GLIBC_2.2 _dl_mcount F
 GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
 GLIBC_2.4 __stack_chk_guard D 0x4
index be09641a48962434b03f2aa45897ef74da3e8eb9..f750067d5c34bf428a65749a37a6853299254072 100644 (file)
@@ -2,4 +2,5 @@ GLIBC_2.0 _r_debug D 0x14
 GLIBC_2.2 __libc_stack_end D 0x4
 GLIBC_2.2 _dl_mcount F
 GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
 GLIBC_2.4 __stack_chk_guard D 0x4
index 1ea36e13f294a2495b388fdb1ae2e8599471bf09..2fba6a9b6ec92e47f11c04d834d5c4d731fe5767 100644 (file)
@@ -2,4 +2,5 @@ GLIBC_2.0 _r_debug D 0x28
 GLIBC_2.2 __libc_stack_end D 0x8
 GLIBC_2.2 _dl_mcount F
 GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
 GLIBC_2.4 __stack_chk_guard D 0x8
index 52178802dd82b59aec99573988172590de683455..57dfad5a53b739e85b51a1c3365dea26a7e146a3 100644 (file)
@@ -3,3 +3,4 @@ GLIBC_2.21 __stack_chk_guard D 0x4
 GLIBC_2.21 __tls_get_addr F
 GLIBC_2.21 _dl_mcount F
 GLIBC_2.21 _r_debug D 0x14
+GLIBC_2.34 __rtld_version_placeholder F
index 4bbfba7a61c7a5ef05eeb10c331072768d101b17..e89660739262c6abaa6e4e110816b2cee454a2e9 100644 (file)
@@ -4,3 +4,4 @@ GLIBC_2.1 _dl_mcount F
 GLIBC_2.22 __tls_get_addr_opt F
 GLIBC_2.23 __parse_hwcap_and_convert_at_platform F
 GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
index 283fb4510bea40ba233662c44b9c7d99514586cf..ce0bc639597c4bd970b80ab06d77d973ed896fa7 100644 (file)
@@ -4,3 +4,4 @@ GLIBC_2.3 __libc_stack_end D 0x8
 GLIBC_2.3 __tls_get_addr F
 GLIBC_2.3 _dl_mcount F
 GLIBC_2.3 _r_debug D 0x28
+GLIBC_2.34 __rtld_version_placeholder F
index b1f313c7cd33defc02660a9ab1a934b0c19fbf62..65b22674d2462e9624fc90f014ee07bf05308c51 100644 (file)
@@ -4,3 +4,4 @@ GLIBC_2.17 _dl_mcount F
 GLIBC_2.17 _r_debug D 0x28
 GLIBC_2.22 __tls_get_addr_opt F
 GLIBC_2.23 __parse_hwcap_and_convert_at_platform F
+GLIBC_2.34 __rtld_version_placeholder F
index 94ca64c43db63b2a49a8aa4af3e97dc5b1629f49..5ad4c81d12d7a612e4db666e507b2b7c8d8b1715 100644 (file)
@@ -3,3 +3,4 @@ GLIBC_2.33 __stack_chk_guard D 0x4
 GLIBC_2.33 __tls_get_addr F
 GLIBC_2.33 _dl_mcount F
 GLIBC_2.33 _r_debug D 0x14
+GLIBC_2.34 __rtld_version_placeholder F
index 845f356c3c3fad54ddea4aae75b1f059c3d6d9c6..479efdea9bb654bb330e531ad22152e9babe5f21 100644 (file)
@@ -3,3 +3,4 @@ GLIBC_2.27 __stack_chk_guard D 0x8
 GLIBC_2.27 __tls_get_addr F
 GLIBC_2.27 _dl_mcount F
 GLIBC_2.27 _r_debug D 0x28
+GLIBC_2.34 __rtld_version_placeholder F
index b56f005bebd3baf158797bd40843fba3193e8c43..d5ecb636bb792bdfa2408c4867549e84e43edcef 100644 (file)
@@ -2,3 +2,4 @@ GLIBC_2.0 _r_debug D 0x14
 GLIBC_2.1 __libc_stack_end D 0x4
 GLIBC_2.1 _dl_mcount F
 GLIBC_2.3 __tls_get_offset F
+GLIBC_2.34 __rtld_version_placeholder F
index 6f788a086d68aaa500197acbdbc3f08e0e03561b..62a5e1d99a2e6f42084ed8cb978a1a444896e9d1 100644 (file)
@@ -2,3 +2,4 @@ GLIBC_2.2 __libc_stack_end D 0x8
 GLIBC_2.2 _dl_mcount F
 GLIBC_2.2 _r_debug D 0x28
 GLIBC_2.3 __tls_get_offset F
+GLIBC_2.34 __rtld_version_placeholder F
index d155a59843df90918e3f6800efb86411f0f23b2e..7cc9ebd792c2aadc85b6086a783d72d6a4dae6ff 100644 (file)
@@ -2,4 +2,5 @@ GLIBC_2.2 __libc_stack_end D 0x4
 GLIBC_2.2 _dl_mcount F
 GLIBC_2.2 _r_debug D 0x14
 GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
 GLIBC_2.4 __stack_chk_guard D 0x4
index d155a59843df90918e3f6800efb86411f0f23b2e..7cc9ebd792c2aadc85b6086a783d72d6a4dae6ff 100644 (file)
@@ -2,4 +2,5 @@ GLIBC_2.2 __libc_stack_end D 0x4
 GLIBC_2.2 _dl_mcount F
 GLIBC_2.2 _r_debug D 0x14
 GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
 GLIBC_2.4 __stack_chk_guard D 0x4
index 0c6610e3c2f00cf3d5a8af0a6890487e477e6427..2e6054349871e7d5cc8c2df186e5dc7e8dd55c11 100644 (file)
@@ -2,3 +2,4 @@ GLIBC_2.0 _r_debug D 0x14
 GLIBC_2.1 __libc_stack_end D 0x4
 GLIBC_2.1 _dl_mcount F
 GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
index 33f91199bfa516fbad2b738d27eef634e7ed6d56..be5122650ae2b3273d0c664b55ca2272a311afa7 100644 (file)
@@ -2,3 +2,4 @@ GLIBC_2.2 __libc_stack_end D 0x8
 GLIBC_2.2 _dl_mcount F
 GLIBC_2.2 _r_debug D 0x28
 GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
index d3cdf7611eb9cab33080cdb9711460af7f443848..afddaec57c11f837fddb75679de5b786d38407a4 100644 (file)
@@ -2,3 +2,4 @@ GLIBC_2.2.5 __libc_stack_end D 0x8
 GLIBC_2.2.5 _dl_mcount F
 GLIBC_2.2.5 _r_debug D 0x28
 GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
index c70bccf78245a552f32e5cf0dfd0c876b6acb328..defc488d137c61c3f5937d7f1952590f1dedafa5 100644 (file)
@@ -2,3 +2,4 @@ GLIBC_2.16 __libc_stack_end D 0x4
 GLIBC_2.16 __tls_get_addr F
 GLIBC_2.16 _dl_mcount F
 GLIBC_2.16 _r_debug D 0x14
+GLIBC_2.34 __rtld_version_placeholder F