summaryrefslogtreecommitdiff
path: root/rts/linker/SymbolExtras.c
diff options
context:
space:
mode:
authorViktor Dukhovni <ietf-dane@dukhovni.org>2021-04-19 04:02:33 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-04-22 17:00:55 -0400
commitaa685c50d575ccf6c46a89d4ecdc9cffcf8b73f4 (patch)
tree29bd281a842b6dd355222c46cd866d61fee7b9e6 /rts/linker/SymbolExtras.c
parent350f4f61ae847c8adf376b9ca49ad1fee64e2e95 (diff)
downloadhaskell-aa685c50d575ccf6c46a89d4ecdc9cffcf8b73f4.tar.gz
Add background note in elf_tlsgd.c.
Also some code cleanup, and a fix for an (extant unrelated) missing <pthread_np.h> include that should hopefully resolve a failure in the FreeBSD CI build, since it is best to make sure that this MR actually builds on FreeBSD systems other than mine. Some unexpected metric changes on FreeBSD (perhaps because CI had been failing for a while???): Metric Decrease: T3064 T5321Fun T5642 T9020 T12227 T13253-spj T15164 T18282 WWRec Metric Increase: haddock.compiler
Diffstat (limited to 'rts/linker/SymbolExtras.c')
-rw-r--r--rts/linker/SymbolExtras.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/rts/linker/SymbolExtras.c b/rts/linker/SymbolExtras.c
index e209e211e1..ddb58e4a4e 100644
--- a/rts/linker/SymbolExtras.c
+++ b/rts/linker/SymbolExtras.c
@@ -183,6 +183,7 @@ SymbolExtra* makeSymbolExtra( ObjectCode const* oc,
// jmp *-14(%rip)
// 0xFF 25 is opcode + ModRM of near absolute indirect jump
// Two bytes trailing padding, needed for TLSGD GOT entries
+ // See Note [TLSGD relocation] in elf_tlsgd.c
static uint8_t jmp[] = { 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xFF, 0x00, 0x00 };
extra->addr = target;
memcpy(extra->jumpIsland, jmp, 8);