freebsd-dev/libexec/rtld-elf
Andrew Turner 878165d2ef Ensure we use calculate_first_tls_offset, even if the main program doesn't
have TLS program header. This is needed on architectures with Variant I
tls, that is arm, arm64, mips, and powerpc. These place the thread control
block at the start of the buffer and, without this, this data may be
trashed.

This appears to not be an issue on mips or powerpc as they include a second
adjustment to move the thread local data, however this is on arm64 (with a
future change to fix placing this data), and should be on arm. I am unable
to trigger this on arm, even after changing the code to move the data
around to make it more likely to be hit. This is most likely because my
tests didn't use the variable in offset 0.

Reviewed by:	kib
MFC after:	1 week
Sponsored by:	ABT Systems Ltd
2015-09-01 15:43:56 +00:00
..
aarch64 Add on the addend when in the R_AARCH64_ABS64 and R_AARCH64_GLOB_DAT cases. 2015-07-05 11:42:01 +00:00
amd64 Disable SSE in libthr 2015-08-05 12:53:55 +00:00
arm IFUNC symbol type shall be processed for non-PLT relocations, 2014-08-29 09:29:10 +00:00
i386 Disable SSE in libthr 2015-08-05 12:53:55 +00:00
mips MIPS rtld: report missing symbol rather than segfaulting 2015-04-05 14:06:11 +00:00
powerpc Apply r246556 to powerpc: 2015-01-06 03:49:22 +00:00
powerpc64 IFUNC symbol type shall be processed for non-PLT relocations, 2014-08-29 09:29:10 +00:00
sparc64 IFUNC symbol type shall be processed for non-PLT relocations, 2014-08-29 09:29:10 +00:00
tests Fix "make checkdpadd" by "spoofing" DPADD 2014-08-26 09:01:11 +00:00
debug.c Rtld links with the specially built pic static libc library to get some 2011-08-24 20:05:13 +00:00
debug.h Remove historical GNUC test 2015-05-06 15:29:11 +00:00
libmap.c Always check the limits of array index variables before using them. 2014-08-21 02:40:33 +00:00
libmap.h Make the directory mapping functionality, which was previously only 2013-09-21 21:03:52 +00:00
Makefile Change compiler setting to make default visibility of the symbols for 2015-03-29 18:53:21 +00:00
Makefile.depend new depends 2015-06-16 23:37:19 +00:00
malloc.c Before calling mmap() on a shared library's text and data sections, rtld 2014-04-11 16:55:25 +00:00
map_object.c Before calling mmap() on a shared library's text and data sections, rtld 2014-04-11 16:55:25 +00:00
rtld_lock.c Change compiler setting to make default visibility of the symbols for 2015-03-29 18:53:21 +00:00
rtld_lock.h Change compiler setting to make default visibility of the symbols for 2015-03-29 18:53:21 +00:00
rtld_printf.c Add the LD_LIBRARY_PATH_FDS environmental variable. 2014-06-20 17:08:32 +00:00
rtld_printf.h Add the LD_LIBRARY_PATH_FDS environmental variable. 2014-06-20 17:08:32 +00:00
rtld_tls.h Change compiler setting to make default visibility of the symbols for 2015-03-29 18:53:21 +00:00
rtld.1 mdoc: remove superfluous paragraph macros. 2014-06-23 18:40:21 +00:00
rtld.c Ensure we use calculate_first_tls_offset, even if the main program doesn't 2015-09-01 15:43:56 +00:00
rtld.h Implement support -z global linker option. It marks the shared object 2015-04-15 08:16:34 +00:00
Symbol.map Add rtld private interface for dso to detect dynamic loading 2015-01-03 18:09:53 +00:00
xmalloc.c Increase alignment to size of pointer if the alignment is too small. 2014-02-22 11:06:48 +00:00