aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-11-30 16:23:58 +0100
committerFlorian Weimer <fweimer@redhat.com>2016-11-30 16:23:58 +0100
commitb04beebf0731c0da49bf9113bf299acf56e4c2e5 (patch)
treee9d30cedb0a14f36f23dcab98641603c2cbe92dc
parent9e78f6f6e7134a5f299cc8de77370218f8019237 (diff)
downloadglibc-b04beebf0731c0da49bf9113bf299acf56e4c2e5.zip
glibc-b04beebf0731c0da49bf9113bf299acf56e4c2e5.tar.gz
glibc-b04beebf0731c0da49bf9113bf299acf56e4c2e5.tar.bz2
ld.so: Remove __libc_memalign
It is no longer needed since commit 6c444ad6e953dbdf9c7be065308a0a777 (elf: Do not use memalign for TCB/TLS blocks allocation [BZ #17730]). Applications do not link against ld.so and will use the definition in libc.so, so there is no ABI impact.
-rw-r--r--ChangeLog57
-rw-r--r--elf/Versions4
-rw-r--r--elf/dl-minimal.c18
-rw-r--r--sysdeps/generic/localplt.data6
-rw-r--r--sysdeps/nacl/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/localplt.data7
-rw-r--r--sysdeps/unix/sysv/linux/alpha/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/alpha/localplt.data7
-rw-r--r--sysdeps/unix/sysv/linux/arm/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/arm/localplt.data7
-rw-r--r--sysdeps/unix/sysv/linux/hppa/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/hppa/localplt.data6
-rw-r--r--sysdeps/unix/sysv/linux/i386/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/i386/localplt.data6
-rw-r--r--sysdeps/unix/sysv/linux/ia64/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/ia64/localplt.data6
-rw-r--r--sysdeps/unix/sysv/linux/m68k/coldfire/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/localplt.data6
-rw-r--r--sysdeps/unix/sysv/linux/m68k/m680x0/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/localplt.data7
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n32/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n64/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/nios2/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/nios2/localplt.data6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/localplt.data6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/ld-le.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/localplt.data6
-rw-r--r--sysdeps/unix/sysv/linux/s390/localplt.data13
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/sh/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/sh/localplt.data6
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data6
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data6
-rw-r--r--sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/tile/tilepro/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/64/ld.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/ld.abilist1
-rw-r--r--sysdeps/x86_64/localplt.data6
48 files changed, 106 insertions, 119 deletions
diff --git a/ChangeLog b/ChangeLog
index d017478..09c2e52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,62 @@
2016-11-30 Florian Weimer <fweimer@redhat.com>
+ Remove __libc_memalign from ld.so because it is unused.
+ * elf/dl-minimal.c: Update comment on the malloc implementation.
+ (malloc): Renamed from __libc_memalign, replacing the original
+ malloc implementation. Replace the align parameter with
+ MALLOC_ALIGNMENT.
+ * elf/Versions (ld): Update comment and remove __libc_memalign.
+ * sysdeps/nacl/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/aarch64/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/arm/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/hppa/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/i386/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/coldfire/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/m680x0/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/microblaze/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips32/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/nios2/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/ld-le.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-32/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-64/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/sh/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/tile/tilepro/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/64/ld.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/x32/ld.abilist: Likewise.
+ * sysdeps/generic/localplt.data (ld.so): Likewise.
+ * sysdeps/unix/sysv/linux/aarch64/localplt.data (ld.so): Likewise.
+ * sysdeps/unix/sysv/linux/alpha/localplt.data (ld.so): Likewise.
+ * sysdeps/unix/sysv/linux/arm/localplt.data (ld.so): Likewise.
+ * sysdeps/unix/sysv/linux/hppa/localplt.data (ld.so): Likewise.
+ * sysdeps/unix/sysv/linux/i386/localplt.data (ld.so): Likewise.
+ * sysdeps/unix/sysv/linux/ia64/localplt.data (ld.so): Likewise.
+ * sysdeps/unix/sysv/linux/m68k/localplt.data (ld.so): Likewise.
+ * sysdeps/unix/sysv/linux/microblaze/localplt.data (ld.so): Likewise.
+ * sysdeps/unix/sysv/linux/nios2/localplt.data (ld.so): Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/localplt.data
+ (ld.so): Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data
+ (ld.so): Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/localplt.data (ld.so):
+ Likewise.
+ * sysdeps/unix/sysv/linux/s390/localplt.data (ld.so): Likewise.
+ * sysdeps/unix/sysv/linux/sh/localplt.data (ld.so): Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data (ld.so): Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data (ld.so): Likewise.
+ * sysdeps/x86_64/localplt.data (ld.so): Likewise.
+
+2016-11-30 Florian Weimer <fweimer@redhat.com>
+
[BZ #16628]
Implement _dl_catch_error, _dl_signal_error in libc.so.
* elf/dl-error-skeleton.c: Rename from elf/dl-error.c.
diff --git a/elf/Versions b/elf/Versions
index 05e5449..08f76a7 100644
--- a/elf/Versions
+++ b/elf/Versions
@@ -34,8 +34,8 @@ libc {
ld {
GLIBC_2.0 {
- # Function from libc.so which must be shared with libc.
- __libc_memalign; calloc; free; malloc; realloc;
+ # Functions which are interposed from libc.so.
+ calloc; free; malloc; realloc;
_r_debug;
}
diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c
index 6034b5a..116ec49 100644
--- a/elf/dl-minimal.c
+++ b/elf/dl-minimal.c
@@ -31,8 +31,10 @@
#include <assert.h>
-/* Minimal `malloc' allocator for use while loading shared libraries.
- No block is ever freed. */
+/* Minimal malloc allocator for used during initial link. After the
+ initial link, a full malloc implementation is interposed, either
+ the one in libc, or a different one supplied by the user through
+ interposition. */
static void *alloc_ptr, *alloc_end, *alloc_last_block;
@@ -49,7 +51,7 @@ extern unsigned long int weak_function strtoul (const char *nptr,
/* Allocate an aligned memory block. */
void * weak_function
-__libc_memalign (size_t align, size_t n)
+malloc (size_t n)
{
if (alloc_end == 0)
{
@@ -62,8 +64,8 @@ __libc_memalign (size_t align, size_t n)
}
/* Make sure the allocation pointer is ideally aligned. */
- alloc_ptr = (void *) 0 + (((alloc_ptr - (void *) 0) + align - 1)
- & ~(align - 1));
+ alloc_ptr = (void *) 0 + (((alloc_ptr - (void *) 0) + MALLOC_ALIGNMENT - 1)
+ & ~(MALLOC_ALIGNMENT - 1));
if (alloc_ptr + n >= alloc_end || n >= -(uintptr_t) alloc_ptr)
{
@@ -88,12 +90,6 @@ __libc_memalign (size_t align, size_t n)
return alloc_last_block;
}
-void * weak_function
-malloc (size_t n)
-{
- return __libc_memalign (MALLOC_ALIGNMENT, n);
-}
-
/* We use this function occasionally since the real implementation may
be optimized when it can assume the memory it returns already is
set to NUL. */
diff --git a/sysdeps/generic/localplt.data b/sysdeps/generic/localplt.data
index 5cf53a4..81c741b 100644
--- a/sysdeps/generic/localplt.data
+++ b/sysdeps/generic/localplt.data
@@ -7,10 +7,8 @@ libc.so: malloc
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# The dynamic loader uses __libc_memalign internally to allocate aligned
-# TLS storage. The other malloc family of functions are expected to allow
-# user symbol interposition.
-ld.so: __libc_memalign
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc
ld.so: calloc
ld.so: realloc
diff --git a/sysdeps/nacl/ld.abilist b/sysdeps/nacl/ld.abilist
index 242f6d0..0a52a24 100644
--- a/sysdeps/nacl/ld.abilist
+++ b/sysdeps/nacl/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.22 GLIBC_2.22 A
-GLIBC_2.22 __libc_memalign F
GLIBC_2.22 __libc_stack_end D 0x4
GLIBC_2.22 __stack_chk_guard D 0x4
GLIBC_2.22 __tls_get_addr F
diff --git a/sysdeps/unix/sysv/linux/aarch64/ld.abilist b/sysdeps/unix/sysv/linux/aarch64/ld.abilist
index ab08a98..ec7f617 100644
--- a/sysdeps/unix/sysv/linux/aarch64/ld.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.17 GLIBC_2.17 A
-GLIBC_2.17 __libc_memalign F
GLIBC_2.17 __libc_stack_end D 0x8
GLIBC_2.17 __stack_chk_guard D 0x8
GLIBC_2.17 __tls_get_addr F
diff --git a/sysdeps/unix/sysv/linux/aarch64/localplt.data b/sysdeps/unix/sysv/linux/aarch64/localplt.data
index e431f36..bb18ff9 100644
--- a/sysdeps/unix/sysv/linux/aarch64/localplt.data
+++ b/sysdeps/unix/sysv/linux/aarch64/localplt.data
@@ -7,11 +7,10 @@ libc.so: malloc
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# The dynamic loader needs __tls_get_addr for TLS, and uses __libc_memalign
-# internally to allocate aligned TLS storage. The other malloc family of
-# functions are expected to allow user symbol interposition.
+# The dynamic loader needs __tls_get_addr for TLS.
ld.so: __tls_get_addr
-ld.so: __libc_memalign
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc
ld.so: calloc
ld.so: realloc
diff --git a/sysdeps/unix/sysv/linux/alpha/ld.abilist b/sysdeps/unix/sysv/linux/alpha/ld.abilist
index 9faf6eb..ca34294 100644
--- a/sysdeps/unix/sysv/linux/alpha/ld.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.0 GLIBC_2.0 A
-GLIBC_2.0 __libc_memalign F
GLIBC_2.0 _r_debug D 0x28
GLIBC_2.0 calloc F
GLIBC_2.0 free F
diff --git a/sysdeps/unix/sysv/linux/alpha/localplt.data b/sysdeps/unix/sysv/linux/alpha/localplt.data
index 2984393..cca17f1 100644
--- a/sysdeps/unix/sysv/linux/alpha/localplt.data
+++ b/sysdeps/unix/sysv/linux/alpha/localplt.data
@@ -24,11 +24,10 @@ libm.so: matherr
# We used to offer inline functions that used this, so it must be exported.
# Ought to reorg things such that carg isn't thus forced to use a plt.
libm.so: __atan2
-# The dynamic loader needs __tls_get_addr for TLS, and uses __libc_memalign
-# internally to allocate aligned TLS storage. The other malloc family of
-# functions are expected to allow user symbol interposition.
+# The dynamic loader needs __tls_get_addr for TLS.
ld.so: __tls_get_addr ?
-ld.so: __libc_memalign + RELA R_ALPHA_GLOB_DAT
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc + RELA R_ALPHA_GLOB_DAT
ld.so: calloc + RELA R_ALPHA_GLOB_DAT
ld.so: realloc + RELA R_ALPHA_GLOB_DAT
diff --git a/sysdeps/unix/sysv/linux/arm/ld.abilist b/sysdeps/unix/sysv/linux/arm/ld.abilist
index 4de351e..cbf3a3c 100644
--- a/sysdeps/unix/sysv/linux/arm/ld.abilist
+++ b/sysdeps/unix/sysv/linux/arm/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.4 GLIBC_2.4 A
-GLIBC_2.4 __libc_memalign F
GLIBC_2.4 __libc_stack_end D 0x4
GLIBC_2.4 __stack_chk_guard D 0x4
GLIBC_2.4 __tls_get_addr F
diff --git a/sysdeps/unix/sysv/linux/arm/localplt.data b/sysdeps/unix/sysv/linux/arm/localplt.data
index a5ccd7f..8bc876d 100644
--- a/sysdeps/unix/sysv/linux/arm/localplt.data
+++ b/sysdeps/unix/sysv/linux/arm/localplt.data
@@ -7,11 +7,10 @@ libc.so: realloc
libm.so: matherr
libpthread.so: __errno_location
libpthread.so: raise
-# The dynamic loader needs __tls_get_addr for TLS, and uses __libc_memalign
-# internally to allocate aligned TLS storage. The other malloc family of
-# functions are expected to allow user symbol interposition.
+# The dynamic loader needs __tls_get_addr for TLS.
ld.so: __tls_get_addr
-ld.so: __libc_memalign
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc
ld.so: calloc
ld.so: realloc
diff --git a/sysdeps/unix/sysv/linux/hppa/ld.abilist b/sysdeps/unix/sysv/linux/hppa/ld.abilist
index dc3ebf4..fc1c60e 100644
--- a/sysdeps/unix/sysv/linux/hppa/ld.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.2 GLIBC_2.2 A
-GLIBC_2.2 __libc_memalign F
GLIBC_2.2 __libc_stack_end D 0x4
GLIBC_2.2 _dl_mcount F
GLIBC_2.2 _r_debug D 0x14
diff --git a/sysdeps/unix/sysv/linux/hppa/localplt.data b/sysdeps/unix/sysv/linux/hppa/localplt.data
index fea8c9c..9dd81b4 100644
--- a/sysdeps/unix/sysv/linux/hppa/localplt.data
+++ b/sysdeps/unix/sysv/linux/hppa/localplt.data
@@ -13,10 +13,8 @@ libc.so: sigprocmask
libc.so: __errno_location
libm.so: matherr
libpthread.so: __errno_location
-# The dynamic loader uses __libc_memalign internally to allocate aligned
-# TLS storage. The other malloc family of functions are expected to allow
-# user symbol interposition.
-ld.so: __libc_memalign
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc
ld.so: calloc
ld.so: realloc
diff --git a/sysdeps/unix/sysv/linux/i386/ld.abilist b/sysdeps/unix/sysv/linux/i386/ld.abilist
index b8914ed..ddf9e78 100644
--- a/sysdeps/unix/sysv/linux/i386/ld.abilist
+++ b/sysdeps/unix/sysv/linux/i386/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.0 GLIBC_2.0 A
-GLIBC_2.0 __libc_memalign F
GLIBC_2.0 _r_debug D 0x14
GLIBC_2.0 calloc F
GLIBC_2.0 free F
diff --git a/sysdeps/unix/sysv/linux/i386/localplt.data b/sysdeps/unix/sysv/linux/i386/localplt.data
index 48bcc42..2c25849 100644
--- a/sysdeps/unix/sysv/linux/i386/localplt.data
+++ b/sysdeps/unix/sysv/linux/i386/localplt.data
@@ -7,10 +7,8 @@ libc.so: malloc + REL R_386_GLOB_DAT
libc.so: memalign + REL R_386_GLOB_DAT
libc.so: realloc + REL R_386_GLOB_DAT
libm.so: matherr
-# The dynamic loader uses __libc_memalign internally to allocate aligned
-# TLS storage. The other malloc family of functions are expected to allow
-# user symbol interposition.
-ld.so: __libc_memalign + REL R_386_GLOB_DAT
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc + REL R_386_GLOB_DAT
ld.so: calloc + REL R_386_GLOB_DAT
ld.so: realloc + REL R_386_GLOB_DAT
diff --git a/sysdeps/unix/sysv/linux/ia64/ld.abilist b/sysdeps/unix/sysv/linux/ia64/ld.abilist
index 9041ccb..9b45d5e 100644
--- a/sysdeps/unix/sysv/linux/ia64/ld.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.2 GLIBC_2.2 A
-GLIBC_2.2 __libc_memalign F
GLIBC_2.2 __libc_stack_end D 0x8
GLIBC_2.2 _dl_mcount F
GLIBC_2.2 _r_debug D 0x28
diff --git a/sysdeps/unix/sysv/linux/ia64/localplt.data b/sysdeps/unix/sysv/linux/ia64/localplt.data
index df63530..fd2b98c 100644
--- a/sysdeps/unix/sysv/linux/ia64/localplt.data
+++ b/sysdeps/unix/sysv/linux/ia64/localplt.data
@@ -6,10 +6,8 @@ libc.so: realloc
libm.so: matherr
libm.so: matherrf
libm.so: matherrl
-# The dynamic loader uses __libc_memalign internally to allocate aligned
-# TLS storage. The other malloc family of functions are expected to allow
-# user symbol interposition.
-ld.so: __libc_memalign
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc
ld.so: calloc
ld.so: realloc
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/ld.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/ld.abilist
index 4de351e..cbf3a3c 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/ld.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.4 GLIBC_2.4 A
-GLIBC_2.4 __libc_memalign F
GLIBC_2.4 __libc_stack_end D 0x4
GLIBC_2.4 __stack_chk_guard D 0x4
GLIBC_2.4 __tls_get_addr F
diff --git a/sysdeps/unix/sysv/linux/m68k/localplt.data b/sysdeps/unix/sysv/linux/m68k/localplt.data
index abfbd34..1a2acfd 100644
--- a/sysdeps/unix/sysv/linux/m68k/localplt.data
+++ b/sysdeps/unix/sysv/linux/m68k/localplt.data
@@ -6,10 +6,8 @@ libc.so: malloc
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# The dynamic loader uses __libc_memalign internally to allocate aligned
-# TLS storage. The other malloc family of functions are expected to allow
-# user symbol interposition.
-ld.so: __libc_memalign
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc
ld.so: calloc
ld.so: realloc
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/ld.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/ld.abilist
index ee34589..3907c9d 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/ld.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.0 GLIBC_2.0 A
-GLIBC_2.0 __libc_memalign F
GLIBC_2.0 _r_debug D 0x14
GLIBC_2.0 calloc F
GLIBC_2.0 free F
diff --git a/sysdeps/unix/sysv/linux/microblaze/ld.abilist b/sysdeps/unix/sysv/linux/microblaze/ld.abilist
index f486acb..265085e 100644
--- a/sysdeps/unix/sysv/linux/microblaze/ld.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.18 GLIBC_2.18 A
-GLIBC_2.18 __libc_memalign F
GLIBC_2.18 __libc_stack_end D 0x4
GLIBC_2.18 __stack_chk_guard D 0x4
GLIBC_2.18 __tls_get_addr F
diff --git a/sysdeps/unix/sysv/linux/microblaze/localplt.data b/sysdeps/unix/sysv/linux/microblaze/localplt.data
index 697fdd0..07bcf3b 100644
--- a/sysdeps/unix/sysv/linux/microblaze/localplt.data
+++ b/sysdeps/unix/sysv/linux/microblaze/localplt.data
@@ -6,11 +6,10 @@ libc.so: memalign
libc.so: realloc
libm.so: matherr
libpthread.so: __errno_location
-# The dynamic loader needs __tls_get_addr for TLS, and uses __libc_memalign
-# internally to allocate aligned TLS storage. The other malloc family of
-# functions are expected to allow user symbol interposition.
+# The dynamic loader needs __tls_get_addr for TLS.
ld.so: __tls_get_addr
-ld.so: __libc_memalign
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc
ld.so: calloc
ld.so: realloc
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/ld.abilist b/sysdeps/unix/sysv/linux/mips/mips32/ld.abilist
index afdb905..651b952 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/ld.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.0 GLIBC_2.0 A
-GLIBC_2.0 __libc_memalign F
GLIBC_2.0 _r_debug D 0x14
GLIBC_2.0 calloc F
GLIBC_2.0 free F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/ld.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/ld.abilist
index 6993e70..bf55148 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/ld.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.0 GLIBC_2.0 A
-GLIBC_2.0 __libc_memalign F
GLIBC_2.0 _r_debug D 0x14
GLIBC_2.0 calloc F
GLIBC_2.0 free F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/ld.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/ld.abilist
index 759e99b..f7ba5fd 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/ld.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.0 GLIBC_2.0 A
-GLIBC_2.0 __libc_memalign F
GLIBC_2.0 _r_debug D 0x28
GLIBC_2.0 calloc F
GLIBC_2.0 free F
diff --git a/sysdeps/unix/sysv/linux/nios2/ld.abilist b/sysdeps/unix/sysv/linux/nios2/ld.abilist
index 389bdaa..a127464 100644
--- a/sysdeps/unix/sysv/linux/nios2/ld.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.21 GLIBC_2.21 A
-GLIBC_2.21 __libc_memalign F
GLIBC_2.21 __libc_stack_end D 0x4
GLIBC_2.21 __stack_chk_guard D 0x4
GLIBC_2.21 __tls_get_addr F
diff --git a/sysdeps/unix/sysv/linux/nios2/localplt.data b/sysdeps/unix/sysv/linux/nios2/localplt.data
index a7d774d..584963d 100644
--- a/sysdeps/unix/sysv/linux/nios2/localplt.data
+++ b/sysdeps/unix/sysv/linux/nios2/localplt.data
@@ -27,10 +27,8 @@ libc.so: __nedf2
libc.so: __eqdf2
libc.so: __extendsfdf2
libm.so: matherr
-# The dynamic loader uses __libc_memalign internally to allocate aligned
-# TLS storage. The other malloc family of functions are expected to allow
-# user symbol interposition.
-ld.so: __libc_memalign
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc
ld.so: calloc
ld.so: realloc
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/localplt.data
index 4ef5bf4..5000631 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/localplt.data
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/localplt.data
@@ -5,10 +5,8 @@ libc.so: malloc
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# The dynamic loader uses __libc_memalign internally to allocate aligned
-# TLS storage. The other malloc family of functions are expected to allow
-# user symbol interposition.
-ld.so: __libc_memalign
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc
ld.so: calloc
ld.so: realloc
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist
index 2eb4d5f..100d133 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.0 GLIBC_2.0 A
-GLIBC_2.0 __libc_memalign F
GLIBC_2.0 _r_debug D 0x14
GLIBC_2.0 calloc F
GLIBC_2.0 free F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data
index c919426..1c20d2f 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data
@@ -35,10 +35,8 @@ libc.so: realloc
libm.so: copysignl ?
libm.so: fabsl
libm.so: matherr
-# The dynamic loader uses __libc_memalign internally to allocate aligned
-# TLS storage. The other malloc family of functions are expected to allow
-# user symbol interposition.
-ld.so: __libc_memalign
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc
ld.so: calloc
ld.so: realloc
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld-le.abilist
index 27d451b..ef6159b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld-le.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld-le.abilist
@@ -1,5 +1,4 @@
GLIBC_2.17 GLIBC_2.17 A
-GLIBC_2.17 __libc_memalign F
GLIBC_2.17 __libc_stack_end D 0x8
GLIBC_2.17 __tls_get_addr F
GLIBC_2.17 _dl_mcount F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld.abilist
index 8914eb0..2c3b74c 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld.abilist
@@ -3,7 +3,6 @@ GLIBC_2.22 __tls_get_addr_opt F
GLIBC_2.23 GLIBC_2.23 A
GLIBC_2.23 __parse_hwcap_and_convert_at_platform F
GLIBC_2.3 GLIBC_2.3 A
-GLIBC_2.3 __libc_memalign F
GLIBC_2.3 __libc_stack_end D 0x8
GLIBC_2.3 __tls_get_addr F
GLIBC_2.3 _dl_mcount F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc64/localplt.data
index 2d43472..6f8ed25 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/localplt.data
@@ -4,10 +4,8 @@ libc.so: malloc
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# The dynamic loader uses __libc_memalign internally to allocate aligned
-# TLS storage. The other malloc family of functions are expected to
-# allow user symbol interposition.
-ld.so: __libc_memalign
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc
ld.so: calloc
ld.so: realloc
diff --git a/sysdeps/unix/sysv/linux/s390/localplt.data b/sysdeps/unix/sysv/linux/s390/localplt.data
index bd1addd..5000631 100644
--- a/sysdeps/unix/sysv/linux/s390/localplt.data
+++ b/sysdeps/unix/sysv/linux/s390/localplt.data
@@ -5,17 +5,8 @@ libc.so: malloc
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# The dynamic loader uses __libc_memalign internally to allocate aligned
-# TLS storage. The other malloc family of functions are expected to allow
-# user symbol interposition.
-# It is also allowed to call __libc_memalign via function-pointer loaded from
-# GOT instead of calling via a plt-stub. In this case there is a R_390_GLOB_DAT
-# relocation in section .rela.dyn instead of R_390_JMP_SLOT in .rela.plt.
-# After commit "elf: Do not use memalign for TCB/TLS blocks allocation
-# [BZ #17730]" __libc_memalign is only called in elf/dl-minimal.c: malloc() in
-# ld.so and gcc -O2/-O3 leads to R_390_GLOB_DAT. If build with
-# -fno-optimize-sibling-calls an R_390_JMP_SLOT is generated.
-ld.so: __libc_memalign + RELA R_390_GLOB_DAT
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc
ld.so: calloc
ld.so: realloc
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/ld.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/ld.abilist
index ec7491f..c16b2c1 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/ld.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.0 GLIBC_2.0 A
-GLIBC_2.0 __libc_memalign F
GLIBC_2.0 _r_debug D 0x14
GLIBC_2.0 calloc F
GLIBC_2.0 free F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/ld.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/ld.abilist
index c2e0d96..5e604f5 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/ld.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.2 GLIBC_2.2 A
-GLIBC_2.2 __libc_memalign F
GLIBC_2.2 __libc_stack_end D 0x8
GLIBC_2.2 _dl_mcount F
GLIBC_2.2 _r_debug D 0x28
diff --git a/sysdeps/unix/sysv/linux/sh/ld.abilist b/sysdeps/unix/sysv/linux/sh/ld.abilist
index dc3ebf4..fc1c60e 100644
--- a/sysdeps/unix/sysv/linux/sh/ld.abilist
+++ b/sysdeps/unix/sysv/linux/sh/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.2 GLIBC_2.2 A
-GLIBC_2.2 __libc_memalign F
GLIBC_2.2 __libc_stack_end D 0x4
GLIBC_2.2 _dl_mcount F
GLIBC_2.2 _r_debug D 0x14
diff --git a/sysdeps/unix/sysv/linux/sh/localplt.data b/sysdeps/unix/sysv/linux/sh/localplt.data
index e6fb930..f1f5eff 100644
--- a/sysdeps/unix/sysv/linux/sh/localplt.data
+++ b/sysdeps/unix/sysv/linux/sh/localplt.data
@@ -10,10 +10,8 @@ libc.so: _Unwind_Find_FDE
libc.so: _exit
libc.so: __errno_location
libm.so: matherr
-# The dynamic loader uses __libc_memalign internally to allocate aligned
-# TLS storage. The other malloc family of functions are expected to allow
-# user symbol interposition.
-ld.so: __libc_memalign
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc
ld.so: calloc
ld.so: realloc
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/ld.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/ld.abilist
index 3acaae2..fb4bcb0 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/ld.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.0 GLIBC_2.0 A
-GLIBC_2.0 __libc_memalign F
GLIBC_2.0 _r_debug D 0x14
GLIBC_2.0 calloc F
GLIBC_2.0 free F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data
index d5b5895..c9786fd 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data
@@ -16,10 +16,8 @@ libc.so: malloc
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# The dynamic loader uses __libc_memalign internally to allocate
-# aligned TLS storage. The other malloc family of functions are
-# expected to allow user symbol interposition.
-ld.so: __libc_memalign
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc
ld.so: calloc
ld.so: realloc
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/ld.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/ld.abilist
index 9041ccb..9b45d5e 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/ld.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.2 GLIBC_2.2 A
-GLIBC_2.2 __libc_memalign F
GLIBC_2.2 __libc_stack_end D 0x8
GLIBC_2.2 _dl_mcount F
GLIBC_2.2 _r_debug D 0x28
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
index edceab5..912bd1a 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
@@ -18,10 +18,8 @@ libc.so: malloc
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# The dynamic loader uses __libc_memalign internally to allocate
-# aligned TLS storage. The other malloc family of functions are
-# expected to allow user symbol interposition.
-ld.so: __libc_memalign
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc
ld.so: calloc
ld.so: realloc
diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/ld.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/ld.abilist
index 3ab170c..f166310 100644
--- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/ld.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.12 GLIBC_2.12 A
-GLIBC_2.12 __libc_memalign F
GLIBC_2.12 __libc_stack_end D 0x4
GLIBC_2.12 __tls_get_addr F
GLIBC_2.12 _dl_mcount F
diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/ld.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/ld.abilist
index aa6cbab..ab74e7e 100644
--- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/ld.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.12 GLIBC_2.12 A
-GLIBC_2.12 __libc_memalign F
GLIBC_2.12 __libc_stack_end D 0x8
GLIBC_2.12 __tls_get_addr F
GLIBC_2.12 _dl_mcount F
diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/ld.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/ld.abilist
index 3ab170c..f166310 100644
--- a/sysdeps/unix/sysv/linux/tile/tilepro/ld.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilepro/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.12 GLIBC_2.12 A
-GLIBC_2.12 __libc_memalign F
GLIBC_2.12 __libc_stack_end D 0x4
GLIBC_2.12 __tls_get_addr F
GLIBC_2.12 _dl_mcount F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/ld.abilist b/sysdeps/unix/sysv/linux/x86_64/64/ld.abilist
index 9e09ac6..07cab4b 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/ld.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.2.5 GLIBC_2.2.5 A
-GLIBC_2.2.5 __libc_memalign F
GLIBC_2.2.5 __libc_stack_end D 0x8
GLIBC_2.2.5 _dl_mcount F
GLIBC_2.2.5 _r_debug D 0x28
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/ld.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/ld.abilist
index d595038..236357b 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/ld.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/ld.abilist
@@ -1,5 +1,4 @@
GLIBC_2.16 GLIBC_2.16 A
-GLIBC_2.16 __libc_memalign F
GLIBC_2.16 __libc_stack_end D 0x4
GLIBC_2.16 __tls_get_addr F
GLIBC_2.16 _dl_mcount F
diff --git a/sysdeps/x86_64/localplt.data b/sysdeps/x86_64/localplt.data
index 28096f8..014a9f4 100644
--- a/sysdeps/x86_64/localplt.data
+++ b/sysdeps/x86_64/localplt.data
@@ -9,10 +9,8 @@ libc.so: malloc + RELA R_X86_64_GLOB_DAT
libc.so: memalign + RELA R_X86_64_GLOB_DAT
libc.so: realloc + RELA R_X86_64_GLOB_DAT
libm.so: matherr
-# The dynamic loader uses __libc_memalign internally to allocate aligned
-# TLS storage. The other malloc family of functions are expected to allow
-# user symbol interposition.
-ld.so: __libc_memalign + RELA R_X86_64_GLOB_DAT
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
ld.so: malloc + RELA R_X86_64_GLOB_DAT
ld.so: calloc + RELA R_X86_64_GLOB_DAT
ld.so: realloc + RELA R_X86_64_GLOB_DAT