summaryrefslogtreecommitdiff
path: root/rts/rts.cabal.in
diff options
context:
space:
mode:
authorViktor Dukhovni <ietf-dane@dukhovni.org>2021-04-18 01:37:39 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-04-22 17:00:54 -0400
commit350f4f61ae847c8adf376b9ca49ad1fee64e2e95 (patch)
treeb307732567a2e0a480bc99c0057cc49883c12cc2 /rts/rts.cabal.in
parent4723652a655f74f36f3503f8e09c6e674ea25790 (diff)
downloadhaskell-350f4f61ae847c8adf376b9ca49ad1fee64e2e95.tar.gz
Support R_X86_64_TLSGD relocation on FreeBSD
The FreeBSD C <ctype.h> header supports per-thread locales by exporting a static inline function that references the `_ThreadRuneLocale` thread-local variable. This means that object files that use e.g. isdigit(3) end up with TLSGD(19) relocations, and would not load into ghci or the language server. Here we add support for this type of relocation, for now just on FreeBSD, and only for external references to thread-specifics defined in already loaded dynamic modules (primarily libc.so). This is sufficient to resolve the <ctype.h> issues. Runtime linking of ".o" files which *define* new thread-specific variables would be noticeably more difficult, as this would likely require new rtld APIs.
Diffstat (limited to 'rts/rts.cabal.in')
-rw-r--r--rts/rts.cabal.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in
index 6e1de4a4d5..872a9e3493 100644
--- a/rts/rts.cabal.in
+++ b/rts/rts.cabal.in
@@ -508,6 +508,7 @@ library
linker/elf_plt_arm.c
linker/elf_reloc.c
linker/elf_reloc_aarch64.c
+ linker/elf_tlsgd.c
linker/elf_util.c
sm/BlockAlloc.c
sm/CNF.c