From: sof Date: Wed, 11 May 2005 00:31:11 +0000 (+0000) Subject: [project @ 2005-05-11 00:31:11 by sof] X-Git-Tag: Initial_conversion_from_CVS_complete~578 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=73c01dffd5e11315ac1a52e7833d3ec516a3bcf8;p=ghc-hetmet.git [project @ 2005-05-11 00:31:11 by sof] ocResolve_PEi386(): updated comment re: REL32/DISP32 relocations --- 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;