freebsd-dev/libexec/rtld-elf
John Baldwin 8bcdb144eb TLS: Use <machine/tls.h> for libc and rtld.
- Include <machine/tls.h> in MD rtld_machdep.h headers.

- Remove local definitions of TLS_* constants from rtld_machdep.h
  headers and libc using the values from <machine/tls.h> instead.

- Use _tcb_set() instead of inlined versions in MD
  allocate_initial_tls() routines in rtld.  The one exception is amd64
  whose _tcb_set() invokes the amd64_set_fsbase ifunc.  rtld cannot
  use ifuncs, so amd64 inlines the logic to optionally write to fsbase
  directly.

- Use _tcb_set() instead of _set_tp() in libc.

- Use '&_tcb_get()->tcb_dtv' instead of _get_tp() in both rtld and libc.
  This permits removing _get_tp.c from rtld.

- Use TLS_TCB_SIZE and TLS_TCB_ALIGN with allocate_tls() in MD
  allocate_initial_tls() routines in rtld.

Reviewed by:	kib, jrtc27 (earlier version)
Differential Revision:	https://reviews.freebsd.org/D33353
2021-12-09 13:23:05 -08:00
..
aarch64 TLS: Use <machine/tls.h> for libc and rtld. 2021-12-09 13:23:05 -08:00
amd64 TLS: Use <machine/tls.h> for libc and rtld. 2021-12-09 13:23:05 -08:00
arm TLS: Use <machine/tls.h> for libc and rtld. 2021-12-09 13:23:05 -08:00
i386 TLS: Use <machine/tls.h> for libc and rtld. 2021-12-09 13:23:05 -08:00
mips TLS: Use <machine/tls.h> for libc and rtld. 2021-12-09 13:23:05 -08:00
powerpc TLS: Use <machine/tls.h> for libc and rtld. 2021-12-09 13:23:05 -08:00
powerpc64 TLS: Use <machine/tls.h> for libc and rtld. 2021-12-09 13:23:05 -08:00
riscv TLS: Use <machine/tls.h> for libc and rtld. 2021-12-09 13:23:05 -08:00
rtld-libc TLS: Use <machine/tls.h> for libc and rtld. 2021-12-09 13:23:05 -08:00
tests rtld/tests: Avoid function name conflict with libc opendir() 2021-07-06 10:51:57 +01:00
debug.c libexec: adoption of SPDX licensing ID tags. 2017-11-27 15:25:02 +00:00
debug.h Use rtld_putstr() instead of write() for the rtld msg() macro 2019-06-26 15:43:26 +00:00
libmap.c rtld-elf/paths.h: Make it usable outside rtld 2021-10-21 03:08:54 +03:00
libmap.conf Move libmap.conf to libexec/rtld-elf/ 2018-09-18 00:25:00 +00:00
libmap.h rtld: constify most variables holding references to the environment values 2021-08-17 15:06:08 +03:00
Makefile rtld: Do not install libmap.conf when installing the COMPAT32 version 2021-10-13 14:42:08 +02:00
Makefile.depend
map_object.c rtld: extract header validation into new helper check_elf_headers() 2021-12-06 20:46:49 +02:00
rtld_lock.c rtld: initialize default dlerror_seen_val as true 2021-05-13 02:31:29 +03:00
rtld_lock.h rtld_lock.h: add some comments about versioning of struct RtldLockInfo 2021-04-11 11:16:13 +03:00
rtld_malloc.c rtld-elf/paths.h: Make it usable outside rtld 2021-10-21 03:08:54 +03:00
rtld_malloc.h Add header file missed in r343564. 2019-01-29 22:45:24 +00:00
rtld_paths.h rtld_paths.h: Provide _PATH_ELF32_HINTS string, unconditionally 2021-11-25 01:55:03 +02:00
rtld_printf.c rtld: add rtld_fdprintfx() 2021-11-13 19:33:13 +02:00
rtld_printf.h rtld: add rtld_fdprintfx() 2021-11-13 19:33:13 +02:00
rtld_tls.h Remove sparc64 specific parts of rtld-elf. 2020-02-26 18:49:25 +00:00
rtld_utrace.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rtld.1 rtld: Implement LD_SHOW_AUXV 2021-11-13 19:33:13 +02:00
rtld.c TLS: Use <machine/tls.h> for libc and rtld. 2021-12-09 13:23:05 -08:00
rtld.h TLS: Use <machine/tls.h> for libc and rtld. 2021-12-09 13:23:05 -08:00
Symbol.map rtld dl_iterate_phdr(): dlpi_tls_data is wrong 2021-04-06 03:23:08 +03:00
xmalloc.c Make p_vaddr % p_align == p_offset % p_align for (some) TLS segments. 2020-04-04 22:37:50 +00:00