mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
ld.so: Do not export free/calloc/malloc/realloc functions [BZ #25486]
Exporting functions and relying on symbol interposition from libc.so
makes the choice of implementation dependent on DT_NEEDED order, which
is not what some compiler drivers expect.
This commit replaces one magic mechanism (symbol interposition) with
another one (preprocessor-/compiler-based redirection). This makes
the hand-over from the minimal malloc to the full malloc more
explicit.
Removing the ABI symbols is backwards-compatible because libc.so is
always in scope, and the dynamic loader will find the malloc-related
symbols there since commit f0b2132b35
("ld.so: Support moving versioned symbols between sonames
[BZ #24741]").
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
@ -5,12 +5,6 @@ libc.so: malloc
|
||||
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
|
||||
|
@ -1,8 +1,4 @@
|
||||
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
|
||||
|
@ -36,12 +36,6 @@ libc.so: realloc
|
||||
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
|
||||
|
@ -4,7 +4,3 @@ 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.3 calloc F
|
||||
GLIBC_2.3 free F
|
||||
GLIBC_2.3 malloc F
|
||||
GLIBC_2.3 realloc F
|
||||
|
@ -2,9 +2,5 @@ GLIBC_2.17 __libc_stack_end D 0x8
|
||||
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
|
||||
|
@ -4,12 +4,6 @@ libc.so: malloc
|
||||
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
|
||||
|
Reference in New Issue
Block a user