From 73c01dffd5e11315ac1a52e7833d3ec516a3bcf8 Mon Sep 17 00:00:00 2001 From: sof Date: Wed, 11 May 2005 00:31:11 +0000 Subject: [PATCH] [project @ 2005-05-11 00:31:11 by sof] ocResolve_PEi386(): updated comment re: REL32/DISP32 relocations --- ghc/rts/Linker.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ghc/rts/Linker.c b/ghc/rts/Linker.c index 11e111a..f7821fd 100644 --- a/ghc/rts/Linker.c +++ b/ghc/rts/Linker.c @@ -2229,6 +2229,13 @@ ocResolve_PEi386 ( ObjectCode* oc ) So, add displacement to old value instead of asserting A to be zero. Fixes wxhaskell-related crashes, and no other ill effects have been observed. + + Update: the reason why we're seeing these more elaborate + relocations is due to a switch in how the NCG compiles SRTs + and offsets to them from info tables. SRTs live in .(ro)data, + while info tables live in .text, causing GAS to emit REL32/DISP32 + relocations with non-zero values. Adding the displacement is + the right thing to do. */ *pP = S - ((UInt32)pP) - 4 + A; break; -- 1.7.10.4