# their implementation is provided differently in rtld, and the symbol
# discovery mechanism is not compatible with the libc implementation
# when compiled for libc.
-rtld-stubbed-symbols =
+rtld-stubbed-symbols = \
+ calloc \
+ free \
+ malloc \
+ realloc \
# The GCC arguments that implement $(rtld-stubbed-symbols).
rtld-stubbed-symbols-args = \
ld {
GLIBC_2.0 {
- # Functions which are interposed from libc.so.
- calloc; free; malloc; realloc;
-
_r_debug;
}
GLIBC_2.1 {
tab->size = newsize;
size = newsize;
entries = tab->entries = newentries;
- tab->free = free;
+ tab->free = __rtld_free;
}
}
else
tab->entries = entries;
tab->size = size;
- tab->free = free;
+ tab->free = __rtld_free;
}
if ((type_class & ELF_RTYPE_CLASS_COPY) != 0)
#include <sys/param.h>
#include <sys/types.h>
#include <ldsodefs.h>
+#include <dl-irel.h>
+#include <dl-hash.h>
+#include <dl-sym-post.h>
#include <_itoa.h>
#include <malloc/malloc-internal.h>
#include <assert.h>
+/* The rtld startup code calls __rtld_malloc_init_stubs after the
+ first self-relocation to adjust the pointers to the minimal
+ implementation below. Before the final relocation,
+ __rtld_malloc_init_real is called to replace the pointers with the
+ real implementation. */
+__typeof (calloc) *__rtld_calloc;
+__typeof (free) *__rtld_free;
+__typeof (malloc) *__rtld_malloc;
+__typeof (realloc) *__rtld_realloc;
+
+/* Defined below. */
+static __typeof (calloc) rtld_calloc attribute_relro;
+static __typeof (free) rtld_free attribute_relro;
+static __typeof (malloc) rtld_malloc attribute_relro;
+static __typeof (realloc) rtld_realloc attribute_relro;
+
+void
+__rtld_malloc_init_stubs (void)
+{
+ __rtld_calloc = &rtld_calloc;
+ __rtld_free = &rtld_free;
+ __rtld_malloc = &rtld_malloc;
+ __rtld_realloc = &rtld_realloc;
+}
+
+/* Lookup NAME at VERSION in the scope of MATCH. */
+static void *
+lookup_malloc_symbol (struct link_map *main_map, const char *name,
+ struct r_found_version *version)
+{
+
+ const ElfW(Sym) *ref = NULL;
+ lookup_t result = _dl_lookup_symbol_x (name, main_map, &ref,
+ main_map->l_scope,
+ version, 0, 0, NULL);
+
+ assert (ELFW(ST_TYPE) (ref->st_info) != STT_TLS);
+ void *value = DL_SYMBOL_ADDRESS (result, ref);
+
+ return _dl_sym_post (result, ref, value, 0, main_map);
+}
+
+void
+__rtld_malloc_init_real (struct link_map *main_map)
+{
+ /* We cannot use relocations and initializers for this because the
+ changes made by __rtld_malloc_init_stubs break REL-style
+ (non-RELA) relocations that depend on the previous pointer
+ contents. Also avoid direct relocation depedencies for the
+ malloc symbols so this function can be called before the final
+ rtld relocation (which enables RELRO, after which the pointer
+ variables cannot be written to). */
+
+ struct r_found_version version;
+ version.name = symbol_version_string (libc, GLIBC_2_0);
+ version.hidden = 0;
+ version.hash = _dl_elf_hash (version.name);
+ version.filename = NULL;
+
+ void *new_calloc = lookup_malloc_symbol (main_map, "calloc", &version);
+ void *new_free = lookup_malloc_symbol (main_map, "free", &version);
+ void *new_malloc = lookup_malloc_symbol (main_map, "malloc", &version);
+ void *new_realloc = lookup_malloc_symbol (main_map, "realloc", &version);
+
+ /* Update the pointers in one go, so that any internal allocations
+ performed by lookup_malloc_symbol see a consistent
+ implementation. */
+ __rtld_calloc = new_calloc;
+ __rtld_free = new_free;
+ __rtld_malloc = new_malloc;
+ __rtld_realloc = new_realloc;
+}
+
/* 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
static void *alloc_ptr, *alloc_end, *alloc_last_block;
-/* Declarations of global functions. */
-extern void weak_function free (void *ptr);
-extern void * weak_function realloc (void *ptr, size_t n);
-
-
/* Allocate an aligned memory block. */
-void * weak_function
-malloc (size_t n)
+static void *
+rtld_malloc (size_t n)
{
if (alloc_end == 0)
{
/* 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. */
-void * weak_function
-calloc (size_t nmemb, size_t size)
+static void *
+rtld_calloc (size_t nmemb, size_t size)
{
/* New memory from the trivial malloc above is always already cleared.
(We make sure that's true in the rare occasion it might not be,
}
/* This will rarely be called. */
-void weak_function
-free (void *ptr)
+void
+rtld_free (void *ptr)
{
/* We can free only the last block allocated. */
if (ptr == alloc_last_block)
}
/* This is only called with the most recent block returned by malloc. */
-void * weak_function
-realloc (void *ptr, size_t n)
+void *
+rtld_realloc (void *ptr, size_t n)
{
if (ptr == NULL)
return malloc (n);
header table in core. Put the rest of _dl_start into a separate
function, that way the compiler cannot put accesses to the GOT
before ELF_DYNAMIC_RELOCATE. */
+
+ __rtld_malloc_init_stubs ();
+
{
#ifdef DONT_USE_BOOTSTRAP_MAP
ElfW(Addr) entry = _dl_start_final (arg);
rtld_timer_stop (&relocate_time, start);
}
+ /* The library defining malloc has already been relocated due to
+ prelinking. Resolve the malloc symbols for the dynamic
+ loader. */
+ __rtld_malloc_init_real (main_map);
/* Mark all the objects so we know they have been already relocated. */
for (struct link_map *l = main_map; l != NULL; l = l->l_next)
re-relocation, we might call a user-supplied function
(e.g. calloc from _dl_relocate_object) that uses TLS data. */
+ /* The malloc implementation has been relocated, so resolving
+ its symbols (and potentially calling IFUNC resolvers) is safe
+ at this point. */
+ __rtld_malloc_init_real (main_map);
+
RTLD_TIMING_VAR (start);
rtld_timer_start (&start);
return NULL;
ht->size = 3;
ht->entries = malloc (sizeof (void *) * ht->size);
- ht->free = free;
+ ht->free = __rtld_free;
if (! ht->entries)
{
free (ht);
/* Use the free() corresponding to the malloc() above to free this
up. */
- htab->free = free;
+ htab->free = __rtld_free;
return 1;
}
# define _default_symbol_version(real, name, version) \
__asm__ (".symver " #real "," #name "@@" #version)
# endif
-#else
+
+/* Evalutes to a string literal for VERSION in LIB. */
+# define symbol_version_string(lib, version) \
+ _symbol_version_stringify_1 (VERSION_##lib##_##version)
+# define _symbol_version_stringify_1(arg) _symbol_version_stringify_2 (arg)
+# define _symbol_version_stringify_2(arg) #arg
+
+#else /* !SHARED */
# define symbol_version(real, name, version)
# define default_symbol_version(real, name, version) \
strong_alias(real, name)
#ifndef _MALLOC_H
+
#include <malloc/malloc.h>
# ifndef _ISOMAC
+# include <rtld-malloc.h>
/* In the GNU libc we rename the global variable
`__malloc_initialized' to `__libc_malloc_initialized'. */
--- /dev/null
+/* Redirection of malloc inside the dynamic linker.
+ Copyright (C) 2020 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/>. */
+
+/* The dynamic linker needs to use its own minimal malloc before libc
+ has been relocated, and the libc malloc afterwards. The active
+ malloc implementation is reached via the __rtld_* function pointers
+ declared below. They are initialized to the minimal malloc by
+ __rtld_malloc_init_stubs, and set to the final implementation by
+ __rtld_malloc_init_real. */
+
+#ifndef _RTLD_MALLOC_H
+#define _RTLD_MALLOC_H
+
+#if IS_IN (rtld)
+
+extern __typeof (calloc) *__rtld_calloc attribute_hidden;
+extern __typeof (free) *__rtld_free attribute_hidden;
+extern __typeof (malloc) *__rtld_malloc attribute_hidden;
+extern __typeof (realloc) *__rtld_realloc attribute_hidden;
+
+/* Wrapper functions which call through the function pointers above.
+ Note that it is not supported to take the address of those
+ functions. Instead the function pointers must be used
+ directly. */
+
+__extern_inline void *
+calloc (size_t a, size_t b)
+{
+ return __rtld_calloc (a, b);
+}
+
+__extern_inline void
+free (void *ptr)
+{
+ __rtld_free (ptr);
+}
+
+__extern_inline void *
+malloc (size_t size)
+{
+ return __rtld_malloc (size);
+}
+
+__extern_inline void *
+realloc (void *ptr, size_t size)
+{
+ return __rtld_realloc (ptr, size);
+}
+
+/* Called after the first self-relocation to activate the minimal malloc
+ implementation. */
+void __rtld_malloc_init_stubs (void) attribute_hidden;
+
+/* Called shortly before the final self-relocation (when RELRO
+ variables are still writable) to activate the real malloc
+ implementation. MAIN_MAP is the link map of the executable. */
+struct link_map;
+void __rtld_malloc_init_real (struct link_map *main_map) attribute_hidden;
+
+#else /* !IS_IN (rtld) */
+
+/* This allows static/non-rtld builds to get a pointer to the
+ functions, in the same way that is required inside rtld. */
+# define __rtld_calloc (&calloc)
+# define __rtld_free (&free)
+# define __rtld_malloc (&malloc)
+# define __rtld_realloc (&realloc)
+
+#endif /* !IS_IN (rtld) */
+#endif /* _RTLD_MALLOC_H */
#if !defined _ISOMAC
# include <sys/stat.h>
+# include <rtld-malloc.h>
+
extern __typeof (strtol_l) __strtol_l;
extern __typeof (strtoul_l) __strtoul_l;
extern __typeof (strtoll_l) __strtoll_l;
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
GLIBC_2.2.6 _hurd_intr_rpc_mach_msg F
GLIBC_2.2.6 _r_debug D 0x14
GLIBC_2.2.6 abort F
-GLIBC_2.2.6 calloc F
-GLIBC_2.2.6 free F
-GLIBC_2.2.6 malloc F
-GLIBC_2.2.6 realloc F
GLIBC_2.3 ___tls_get_addr F
GLIBC_2.3 __tls_get_addr F
GLIBC_2.4 __stack_chk_guard D 0x4
libc.so: memalign + REL R_386_GLOB_DAT
libc.so: realloc + REL R_386_GLOB_DAT
libm.so: matherr + 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
-ld.so: free + REL R_386_GLOB_DAT
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error + REL R_386_GLOB_DAT
ld.so: _dl_catch_error + REL R_386_GLOB_DAT
GLIBC_2.17 __tls_get_addr F
GLIBC_2.17 _dl_mcount F
GLIBC_2.17 _r_debug D 0x28
-GLIBC_2.17 calloc F
-GLIBC_2.17 free F
-GLIBC_2.17 malloc F
-GLIBC_2.17 realloc F
libm.so: matherr
# The dynamic loader needs __tls_get_addr for TLS.
ld.so: __tls_get_addr
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
GLIBC_2.0 _r_debug D 0x28
-GLIBC_2.0 calloc F
-GLIBC_2.0 free F
-GLIBC_2.0 malloc F
-GLIBC_2.0 realloc F
GLIBC_2.1 __libc_stack_end D 0x8
GLIBC_2.1 _dl_mcount F
GLIBC_2.3 __tls_get_addr F
libm.so: __atan2
# The dynamic loader needs __tls_get_addr for TLS.
ld.so: __tls_get_addr ?
-# 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
-ld.so: free + RELA R_ALPHA_GLOB_DAT
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error + RELA R_ALPHA_GLOB_DAT
ld.so: _dl_catch_error + RELA R_ALPHA_GLOB_DAT
GLIBC_2.4 __tls_get_addr F
GLIBC_2.4 _dl_mcount F
GLIBC_2.4 _r_debug D 0x14
-GLIBC_2.4 calloc F
-GLIBC_2.4 free F
-GLIBC_2.4 malloc F
-GLIBC_2.4 realloc F
GLIBC_2.4 __tls_get_addr F
GLIBC_2.4 _dl_mcount F
GLIBC_2.4 _r_debug D 0x14
-GLIBC_2.4 calloc F
-GLIBC_2.4 free F
-GLIBC_2.4 malloc F
-GLIBC_2.4 realloc F
libpthread.so: raise
# The dynamic loader needs __tls_get_addr for TLS.
ld.so: __tls_get_addr
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
GLIBC_2.29 __tls_get_addr F
GLIBC_2.29 _dl_mcount F
GLIBC_2.29 _r_debug D 0x14
-GLIBC_2.29 calloc F
-GLIBC_2.29 free F
-GLIBC_2.29 malloc F
-GLIBC_2.29 realloc F
libc.so: malloc
libc.so: memalign
libc.so: realloc
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
GLIBC_2.2 __libc_stack_end D 0x4
GLIBC_2.2 _dl_mcount F
GLIBC_2.2 _r_debug D 0x14
-GLIBC_2.2 calloc F
-GLIBC_2.2 free F
-GLIBC_2.2 malloc F
-GLIBC_2.2 realloc F
GLIBC_2.3 __tls_get_addr F
GLIBC_2.4 __stack_chk_guard D 0x4
libc.so: _IO_funlockfile
libc.so: __errno_location
libm.so: matherr
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
GLIBC_2.0 _r_debug D 0x14
-GLIBC_2.0 calloc F
-GLIBC_2.0 free F
-GLIBC_2.0 malloc F
-GLIBC_2.0 realloc F
GLIBC_2.1 __libc_stack_end D 0x4
GLIBC_2.1 _dl_mcount F
GLIBC_2.3 ___tls_get_addr F
libc.so: memalign + REL R_386_GLOB_DAT
libc.so: realloc + REL R_386_GLOB_DAT
libm.so: matherr + 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
-ld.so: free + REL R_386_GLOB_DAT
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error + REL R_386_GLOB_DAT
ld.so: _dl_catch_error + REL R_386_GLOB_DAT
GLIBC_2.2 __libc_stack_end D 0x8
GLIBC_2.2 _dl_mcount F
GLIBC_2.2 _r_debug D 0x28
-GLIBC_2.2 calloc F
-GLIBC_2.2 free F
-GLIBC_2.2 malloc F
-GLIBC_2.2 realloc F
GLIBC_2.3 __tls_get_addr F
libm.so: matherr
libm.so: matherrf
libm.so: matherrl
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
GLIBC_2.4 __tls_get_addr F
GLIBC_2.4 _dl_mcount F
GLIBC_2.4 _r_debug D 0x14
-GLIBC_2.4 calloc F
-GLIBC_2.4 free F
-GLIBC_2.4 malloc F
-GLIBC_2.4 realloc F
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
GLIBC_2.0 _r_debug D 0x14
-GLIBC_2.0 calloc F
-GLIBC_2.0 free F
-GLIBC_2.0 malloc F
-GLIBC_2.0 realloc F
GLIBC_2.1 __libc_stack_end D 0x4
GLIBC_2.1 _dl_mcount F
GLIBC_2.3 __tls_get_addr F
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
GLIBC_2.18 __tls_get_addr F
GLIBC_2.18 _dl_mcount F
GLIBC_2.18 _r_debug D 0x14
-GLIBC_2.18 calloc F
-GLIBC_2.18 free F
-GLIBC_2.18 malloc F
-GLIBC_2.18 realloc F
libm.so: matherr
# The dynamic loader needs __tls_get_addr for TLS.
ld.so: __tls_get_addr ?
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
GLIBC_2.0 _r_debug D 0x14
-GLIBC_2.0 calloc F
-GLIBC_2.0 free F
-GLIBC_2.0 malloc F
-GLIBC_2.0 realloc F
GLIBC_2.2 __libc_stack_end D 0x4
GLIBC_2.2 _dl_mcount F
GLIBC_2.3 __tls_get_addr F
GLIBC_2.0 _r_debug D 0x14
-GLIBC_2.0 calloc F
-GLIBC_2.0 free F
-GLIBC_2.0 malloc F
-GLIBC_2.0 realloc F
GLIBC_2.2 __libc_stack_end D 0x4
GLIBC_2.2 _dl_mcount F
GLIBC_2.3 __tls_get_addr F
GLIBC_2.0 _r_debug D 0x28
-GLIBC_2.0 calloc F
-GLIBC_2.0 free F
-GLIBC_2.0 malloc F
-GLIBC_2.0 realloc F
GLIBC_2.2 __libc_stack_end D 0x8
GLIBC_2.2 _dl_mcount F
GLIBC_2.3 __tls_get_addr F
GLIBC_2.21 __tls_get_addr F
GLIBC_2.21 _dl_mcount F
GLIBC_2.21 _r_debug D 0x14
-GLIBC_2.21 calloc F
-GLIBC_2.21 free F
-GLIBC_2.21 malloc F
-GLIBC_2.21 realloc F
libc.so: __extendsfdf2
libc.so: __floatundidf ?
libm.so: matherr
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
GLIBC_2.0 _r_debug D 0x14
-GLIBC_2.0 calloc F
-GLIBC_2.0 free F
-GLIBC_2.0 malloc F
-GLIBC_2.0 realloc F
GLIBC_2.1 __libc_stack_end D 0x4
GLIBC_2.1 _dl_mcount F
GLIBC_2.22 __tls_get_addr_opt F
libm.so: copysignl ?
libm.so: fabsl
libm.so: matherr
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
GLIBC_2.3 __tls_get_addr F
GLIBC_2.3 _dl_mcount F
GLIBC_2.3 _r_debug D 0x28
-GLIBC_2.3 calloc F
-GLIBC_2.3 free F
-GLIBC_2.3 malloc F
-GLIBC_2.3 realloc F
GLIBC_2.17 __tls_get_addr F
GLIBC_2.17 _dl_mcount F
GLIBC_2.17 _r_debug D 0x28
-GLIBC_2.17 calloc F
-GLIBC_2.17 free F
-GLIBC_2.17 malloc F
-GLIBC_2.17 realloc F
GLIBC_2.22 __tls_get_addr_opt F
GLIBC_2.23 __parse_hwcap_and_convert_at_platform F
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
libc.so: malloc
libc.so: memalign
libc.so: realloc
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
GLIBC_2.27 __tls_get_addr F
GLIBC_2.27 _dl_mcount F
GLIBC_2.27 _r_debug D 0x28
-GLIBC_2.27 calloc F
-GLIBC_2.27 free F
-GLIBC_2.27 malloc F
-GLIBC_2.27 realloc F
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
GLIBC_2.0 _r_debug D 0x14
-GLIBC_2.0 calloc F
-GLIBC_2.0 free F
-GLIBC_2.0 malloc F
-GLIBC_2.0 realloc F
GLIBC_2.1 __libc_stack_end D 0x4
GLIBC_2.1 _dl_mcount F
GLIBC_2.3 __tls_get_offset F
GLIBC_2.2 __libc_stack_end D 0x8
GLIBC_2.2 _dl_mcount F
GLIBC_2.2 _r_debug D 0x28
-GLIBC_2.2 calloc F
-GLIBC_2.2 free F
-GLIBC_2.2 malloc F
-GLIBC_2.2 realloc F
GLIBC_2.3 __tls_get_offset F
GLIBC_2.2 __libc_stack_end D 0x4
GLIBC_2.2 _dl_mcount F
GLIBC_2.2 _r_debug D 0x14
-GLIBC_2.2 calloc F
-GLIBC_2.2 free F
-GLIBC_2.2 malloc F
-GLIBC_2.2 realloc F
GLIBC_2.3 __tls_get_addr F
GLIBC_2.4 __stack_chk_guard D 0x4
GLIBC_2.2 __libc_stack_end D 0x4
GLIBC_2.2 _dl_mcount F
GLIBC_2.2 _r_debug D 0x14
-GLIBC_2.2 calloc F
-GLIBC_2.2 free F
-GLIBC_2.2 malloc F
-GLIBC_2.2 realloc F
GLIBC_2.3 __tls_get_addr F
GLIBC_2.4 __stack_chk_guard D 0x4
libm.so: matherr
# Generated by the compiler because there is no trap insn pattern.
libc.so: abort ?
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
GLIBC_2.0 _r_debug D 0x14
-GLIBC_2.0 calloc F
-GLIBC_2.0 free F
-GLIBC_2.0 malloc F
-GLIBC_2.0 realloc F
GLIBC_2.1 __libc_stack_end D 0x4
GLIBC_2.1 _dl_mcount F
GLIBC_2.3 __tls_get_addr F
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
GLIBC_2.2 __libc_stack_end D 0x8
GLIBC_2.2 _dl_mcount F
GLIBC_2.2 _r_debug D 0x28
-GLIBC_2.2 calloc F
-GLIBC_2.2 free F
-GLIBC_2.2 malloc F
-GLIBC_2.2 realloc F
GLIBC_2.3 __tls_get_addr F
libc.so: memalign
libc.so: realloc
libm.so: matherr
-# 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
-ld.so: free
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
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.2.5 calloc F
-GLIBC_2.2.5 free F
-GLIBC_2.2.5 malloc F
-GLIBC_2.2.5 realloc F
GLIBC_2.3 __tls_get_addr F
GLIBC_2.16 __tls_get_addr F
GLIBC_2.16 _dl_mcount F
GLIBC_2.16 _r_debug D 0x14
-GLIBC_2.16 calloc F
-GLIBC_2.16 free F
-GLIBC_2.16 malloc F
-GLIBC_2.16 realloc F
libc.so: memalign + RELA R_X86_64_GLOB_DAT
libc.so: realloc + RELA R_X86_64_GLOB_DAT
libm.so: matherr + 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
-ld.so: free + RELA R_X86_64_GLOB_DAT
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error + RELA R_X86_64_GLOB_DAT
ld.so: _dl_catch_error + RELA R_X86_64_GLOB_DAT