mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-15 09:30:06 +00:00
3a0ecccb59
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>
17 lines
873 B
Plaintext
17 lines
873 B
Plaintext
# See scripts/check-localplt.awk for how this file is processed.
|
|
# PLT use is required for the malloc family and for matherr because
|
|
# users can define their own functions and have library internals call them.
|
|
# Linker in binutils 2.26 and newer consolidates R_X86_64_JUMP_SLOT
|
|
# relocation with R_X86_64_GLOB_DAT relocation against the same symbol.
|
|
libc.so: calloc + RELA R_X86_64_GLOB_DAT
|
|
libc.so: free + RELA R_X86_64_GLOB_DAT
|
|
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 + 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
|
|
ld.so: _dl_signal_exception + RELA R_X86_64_GLOB_DAT
|
|
ld.so: _dl_catch_exception + RELA R_X86_64_GLOB_DAT
|