Commit 9d063b69 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

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
parent cb0d29b2
......@@ -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++;
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment