summaryrefslogtreecommitdiff
path: root/ldso/ldso/or1k/dl-sysdep.h
diff options
context:
space:
mode:
authorYann Sionneau <yann@sionneau.net>2020-03-31 08:51:31 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2020-04-01 21:43:45 +0200
commitdb4b12ae6213a28136d7622b74405c6c71c055b0 (patch)
tree8abd01ec4ca6a45be982bb327d46eea1016c4751 /ldso/ldso/or1k/dl-sysdep.h
parentcb6a910ab89befef46ebb6251a9800110bbd5c08 (diff)
or1k: fix some TLS issues
Before this commit tst-tls-at-ctor test would segfault. After it passes. testsuite run before: https://pastebin.com/504JgQXa testsuite run after: https://pastebin.com/d2aNciVt Stafford Horne already fixed it in glibc: * https://github.com/openrisc/or1k-glibc/blob/bcd87396ebe78228645c0731b06c934dfd88855a/sysdeps/or1k/dl-machine.h#L298 * https://github.com/openrisc/or1k-glibc/blob/bcd87396ebe78228645c0731b06c934dfd88855a/sysdeps/or1k/dl-machine.h#L99
Diffstat (limited to 'ldso/ldso/or1k/dl-sysdep.h')
-rw-r--r--ldso/ldso/or1k/dl-sysdep.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/ldso/ldso/or1k/dl-sysdep.h b/ldso/ldso/or1k/dl-sysdep.h
index d79249449..d838a50eb 100644
--- a/ldso/ldso/or1k/dl-sysdep.h
+++ b/ldso/ldso/or1k/dl-sysdep.h
@@ -36,8 +36,10 @@ do { \
#define ELF_TARGET "or1k"
#define elf_machine_type_class(type) \
- (((type) == R_OR1K_JMP_SLOT) * ELF_RTYPE_CLASS_PLT \
- | ((type) == R_OR1K_COPY) * ELF_RTYPE_CLASS_COPY)
+ (((type) == R_OR1K_JMP_SLOT || (type) == R_OR1K_TLS_DTPMOD || \
+ (type) == R_OR1K_TLS_DTPOFF || \
+ (type) == R_OR1K_TLS_TPOFF) * ELF_RTYPE_CLASS_PLT \
+ | ((type) == R_OR1K_COPY) * ELF_RTYPE_CLASS_COPY)
static inline Elf32_Addr *
or1k_get_got (void)