]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r287369:
authorandrew <andrew@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 8 Sep 2015 12:00:13 +0000 (12:00 +0000)
committerandrew <andrew@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 8 Sep 2015 12:00:13 +0000 (12:00 +0000)
commit931065bbae8f66d177a48a83dada9d17eec9d042
treecedc8abfa94316d4142a24ec0af1c4b65b3b7e22
parent09a361ca5678e4539f699524153f686d1be904f0
MFC r287369:
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@287560 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
libexec/rtld-elf/rtld.c