glibc/sysdeps/mach/hurd/i386/localplt.data
Florian Weimer ee1ada1bdb elf: Rework exception handling in the dynamic loader [BZ #25486]
The old exception handling implementation used function interposition
to replace the dynamic loader implementation (no TLS support) with the
libc implementation (TLS support).  This results in problems if the
link order between the dynamic loader and libc is reversed (bug 25486).

The new implementation moves the entire implementation of the
exception handling functions back into the dynamic loader, using
THREAD_GETMEM and THREAD_SETMEM for thread-local data support.
These depends on Hurd support for these macros, added in commit
b65a82e4e7 ("hurd: Add THREAD_GET/SETMEM/_NC").

One small obstacle is that the exception handling facilities are used
before the TCB has been set up, so a check is needed if the TCB is
available.  If not, a regular global variable is used to store the
exception handling information.

Also rename dl-error.c to dl-catch.c, to avoid confusion with the
dlerror function.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2022-11-03 09:39:31 +01:00

46 lines
1.4 KiB
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_386_GLOB_DAT relocation against the same symbol.
libc.so: calloc + REL R_386_GLOB_DAT
libc.so: free + REL R_386_GLOB_DAT
libc.so: malloc + REL R_386_GLOB_DAT
libc.so: realloc + REL R_386_GLOB_DAT
libm.so: matherr + REL R_386_GLOB_DAT
# The dynamic linker has its own versions of basic functions for initial loading
# of shared libraries. These need to be overriden by libc once loaded.
ld.so: __open ?
ld.so: __open64 ?
ld.so: __open_nocancel
ld.so: __close ?
ld.so: __close_nocancel
ld.so: __read ?
ld.so: __read_nocancel
ld.so: __pread64
ld.so: __pread64_nocancel
ld.so: __write ?
ld.so: __write_nocancel
ld.so: __writev
ld.so: __libc_lseek64
ld.so: __mmap
ld.so: __fstat64
ld.so: __stat64
ld.so: __access
ld.so: __access_noerrno
ld.so: __getpid
ld.so: __getcwd
ld.so: _exit ?
ld.so: abort
ld.so: _hurd_intr_rpc_mach_msg
ld.so: __errno_location
ld.so: _dl_init_first
#
# These should ideally be avoided, but is currently difficult
libc.so: siglongjmp ?
libc.so: longjmp ?
# This is from lseek.c
libc.so: __libc_lseek64 ?
# This is through cleanup_region_start from vfprintf.c
libc.so: _IO_funlockfile ?