Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch :
http://hackage.haskell.org/trac/ghc/changeset/a914a2249f13e36695060084465e97c2174ab71d >--------------------------------------------------------------- commit a914a2249f13e36695060084465e97c2174ab71d Author: [email protected] <unknown> Date: Wed Feb 9 22:24:23 2011 +0000 Fix #4867, ghci displays negative floats incorrectly This patch fixes the erroneous relocations that caused the bug in ticket #4867. External addresses and global offset table entries were relocated correctly, but all other relocations were incorrectly calculated. This caused, for example, bad references to constants stored in the __const section of the __TEXT segment. This bug only affected OS X on 64-bit platforms. >--------------------------------------------------------------- rts/Linker.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/rts/Linker.c b/rts/Linker.c index 70aae3b..ee7a9c9 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -4690,9 +4690,7 @@ static int relocateSection( } else { - value = sections[reloc->r_symbolnum-1].offset - - sections[reloc->r_symbolnum-1].addr - + (uint64_t) image; + value = relocateAddress(oc, nSections, sections, reloc->r_address); } IF_DEBUG(linker, debugBelch("relocateSection: value = %p\n", (void *)value)); _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
