Implement _dl_catch_error, _dl_signal_error in libc.so [BZ #16628]
authorFlorian Weimer <fweimer@redhat.com>
Wed, 30 Nov 2016 14:59:57 +0000 (15:59 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 30 Nov 2016 14:59:57 +0000 (15:59 +0100)
commit9e78f6f6e7134a5f299cc8de77370218f8019237
tree04aa339daf9901b8fc1851353c697528659e7afe
parent705a79f82560ff6472cebed86aa5db04cdea3bce
Implement _dl_catch_error, _dl_signal_error in libc.so [BZ #16628]

This change moves the main implementation of _dl_catch_error,
_dl_signal_error to libc.so, where TLS variables can be used
directly.  This removes a writable function pointer from the
rtld_global variable.

For use during initial relocation, minimal implementations of these
functions are provided in ld.so.  These are eventually interposed
by the libc.so implementations.  This is implemented by compiling
elf/dl-error-skeleton.c twice, via elf/dl-error.c and
elf/dl-error-minimal.c.

As a side effect of this change, the static version of dl-error.c
no longer includes support for the
_dl_signal_cerror/_dl_receive_error mechanism because it is only
used in ld.so.
37 files changed:
ChangeLog
dlfcn/dlerror.c
dlfcn/dlinfo.c
dlfcn/dlmopen.c
dlfcn/dlopen.c
elf/Makefile
elf/Versions
elf/dl-close.c
elf/dl-error-minimal.c [new file with mode: 0644]
elf/dl-error-skeleton.c [new file with mode: 0644]
elf/dl-error.c
elf/dl-libc.c
elf/dl-sym.c
elf/dl-tsd.c [deleted file]
elf/rtld.c
elf/tst-latepthread.c [new file with mode: 0644]
elf/tst-latepthreadmod.c [new file with mode: 0644]
nptl/nptl-init.c
sysdeps/generic/ldsodefs.h
sysdeps/generic/localplt.data
sysdeps/unix/sysv/linux/aarch64/localplt.data
sysdeps/unix/sysv/linux/alpha/localplt.data
sysdeps/unix/sysv/linux/arm/localplt.data
sysdeps/unix/sysv/linux/hppa/localplt.data
sysdeps/unix/sysv/linux/i386/localplt.data
sysdeps/unix/sysv/linux/ia64/localplt.data
sysdeps/unix/sysv/linux/m68k/localplt.data
sysdeps/unix/sysv/linux/microblaze/localplt.data
sysdeps/unix/sysv/linux/nios2/localplt.data
sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/localplt.data
sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data
sysdeps/unix/sysv/linux/powerpc/powerpc64/localplt.data
sysdeps/unix/sysv/linux/s390/localplt.data
sysdeps/unix/sysv/linux/sh/localplt.data
sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
sysdeps/x86_64/localplt.data