summaryrefslogtreecommitdiff
path: root/rts/RtsSymbols.h
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-02-04 08:44:49 -0500
committerBen Gamari <ben@smart-cactus.org>2022-04-06 16:25:25 -0400
commitd286a55caebca8a4e5e73bbfeeb766e333271a09 (patch)
treed1c9c1dd3e34e2bd3661aae9719f094015799388 /rts/RtsSymbols.h
parent42bf7528559fb518092fef3902afb73af5de146e (diff)
downloadhaskell-d286a55caebca8a4e5e73bbfeeb766e333271a09.tar.gz
rts/linker: Preserve information about symbol types
As noted in #20978, the linker would previously handle overflowed relocations by creating a jump island. While this is fine in the case of code symbols, it's very much not okay in the case of data symbols. To fix this we must keep track of whether each symbol is code or data and relocate them appropriately. This patch takes the first step in this direction, adding a symbol type field to the linker's symbol table. It doesn't yet change relocation behavior to take advantage of this knowledge. Fixes #20978.
Diffstat (limited to 'rts/RtsSymbols.h')
-rw-r--r--rts/RtsSymbols.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/rts/RtsSymbols.h b/rts/RtsSymbols.h
index 0efc16be0f..44760066db 100644
--- a/rts/RtsSymbols.h
+++ b/rts/RtsSymbols.h
@@ -22,6 +22,7 @@ typedef struct _RtsSymbolVal {
const SymbolName* lbl;
SymbolAddr* addr;
SymStrength strength;
+ SymType type;
} RtsSymbolVal;
extern RtsSymbolVal rtsSyms[];