freebsd-dev/libexec/rtld-elf
Konstantin Belousov 91880e07f6 rtld: do not allow both dynamic DTV index and static TLS offset
If we are allocating static offset for an object with dynamic index,
return failure.  In the opposite case, if dynamic index is requested for
statically allocated TLS area, directly use the offset instead of
setting the index.

Taken from NetBSD Joerg Sonnenberger change for src/libexec/ld.elf_so/tls.c
rev. 1.18.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-06-05 22:33:18 +03:00
..
aarch64 rtld: rename tls_done to tls_static 2023-06-05 22:33:17 +03:00
amd64 rtld: rename tls_done to tls_static 2023-06-05 22:33:17 +03:00
arm rtld: rename tls_done to tls_static 2023-06-05 22:33:17 +03:00
i386 rtld: rename tls_done to tls_static 2023-06-05 22:33:17 +03:00
powerpc rtld: rename tls_done to tls_static 2023-06-05 22:33:17 +03:00
powerpc64 rtld: rename tls_done to tls_static 2023-06-05 22:33:17 +03:00
riscv rtld: rename tls_done to tls_static 2023-06-05 22:33:17 +03:00
rtld-libc Have rtld query the page size from the kernel 2022-04-07 15:37:37 +01:00
tests spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
debug.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
debug.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
libmap.c rtld: fix typo in comment 2022-10-17 17:10:03 +03:00
libmap.conf Move libmap.conf to libexec/rtld-elf/ 2018-09-18 00:25:00 +00:00
libmap.h rtld-elf/libmap.h: style declarations 2022-09-19 01:49:41 +03:00
Makefile rtld: don't add extraneous -L directory when MK_TOOLCHAIN == no 2023-05-02 18:01:43 -04:00
Makefile.depend Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
map_object.c rtld: rename tls_done to tls_static 2023-06-05 22:33:17 +03:00
rtld_lock.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
rtld_lock.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
rtld_malloc.c rtld-elf/paths.h: Make it usable outside rtld 2021-10-21 03:08:54 +03:00
rtld_malloc.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
rtld_paths.h libcasper: Move helper libraries from /lib/casper to /lib. 2023-03-29 15:04:28 -07:00
rtld_printf.c rtld: add rtld_fdprintfx() 2021-11-13 19:33:13 +02:00
rtld_printf.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
rtld_tls.h rtld_tls.h: style 2023-06-05 22:33:17 +03:00
rtld_utrace.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rtld.1 rtld: add support for the $LIB token 2022-11-11 12:06:30 +02:00
rtld.c rtld: do not allow both dynamic DTV index and static TLS offset 2023-06-05 22:33:18 +03:00
rtld.h rtld: do not allow both dynamic DTV index and static TLS offset 2023-06-05 22:33:18 +03:00
Symbol.map rtld dl_iterate_phdr(): dlpi_tls_data is wrong 2021-04-06 03:23:08 +03:00
xmalloc.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00