[commit: ghc] master: Linker: Fix signedness mismatch (9d063b6)
git at git.haskell.org
git at git.haskell.org
Fri Apr 15 14:22:18 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9d063b690766af7d805ff015c0a0f69326ea3db7/ghc
>---------------------------------------------------------------
commit 9d063b690766af7d805ff015c0a0f69326ea3db7
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Fri Apr 15 11:41:34 2016 +0200
Linker: Fix signedness mismatch
Test Plan: Validate on OS X
Reviewers: erikd, austin, Phyx
Reviewed By: austin, Phyx
Subscribers: Phyx, thomie
Differential Revision: https://phabricator.haskell.org/D2110
GHC Trac Issues: #11828
>---------------------------------------------------------------
9d063b690766af7d805ff015c0a0f69326ea3db7
rts/Linker.c | 4 ++--
rts/LinkerInternals.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/rts/Linker.c b/rts/Linker.c
index 782444a..50f438a 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -6975,7 +6975,7 @@ ocGetNames_MachO(ObjectCode* oc)
else
{
IF_DEBUG(linker, debugBelch("ocGetNames_MachO: inserting %s\n", nm));
- char* addr = image
+ void* addr = image
+ sections[nlist[i].n_sect - 1].offset
- sections[nlist[i].n_sect - 1].addr
+ nlist[i].n_value;
@@ -6987,7 +6987,7 @@ ocGetNames_MachO(ObjectCode* oc)
, HS_BOOL_FALSE
, oc);
- oc->symbols[curSymbol].name = nm;
+ oc->symbols[curSymbol].name = nm;
oc->symbols[curSymbol].addr = addr;
oc->symbols[curSymbol].isWeak = HS_BOOL_FALSE;
curSymbol++;
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
index 4ff6e99..a34e6f3 100644
--- a/rts/LinkerInternals.h
+++ b/rts/LinkerInternals.h
@@ -106,7 +106,7 @@ typedef struct _SymbolInfo {
char* name;
/* The address of the symbol. */
- unsigned char* addr;
+ void* addr;
/* Indicates if the symbol is weak */
HsBool isWeak;
More information about the ghc-commits
mailing list