glibc/sysdeps/unix/sysv/linux/sh/localplt.data
Florian Weimer 3a0ecccb59 ld.so: Do not export free/calloc/malloc/realloc functions [BZ ]
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 ]").

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2020-02-15 11:01:23 +01:00

20 lines
634 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.
libc.so: calloc
libc.so: free
libc.so: malloc
libc.so: memalign
libc.so: realloc
libc.so: _Unwind_Find_FDE
libc.so: _exit
libc.so: __errno_location
libm.so: matherr
# Generated by the compiler because there is no trap insn pattern.
libc.so: abort ?
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
ld.so: _dl_catch_error
ld.so: _dl_signal_exception
ld.so: _dl_catch_exception