#include "RtsUtils.h"
#include "Schedule.h"
#include "Sparks.h"
-#include "RtsTypeable.h"
+#include "RtsGlobals.h"
#include "Timer.h"
#include "Trace.h"
#define MMAP_32BIT_BASE_DEFAULT 0x40000000
#endif
-static void *mmap_32bit_base = MMAP_32BIT_BASE_DEFAULT;
+static void *mmap_32bit_base = (void *)MMAP_32BIT_BASE_DEFAULT;
#endif
/* MAP_ANONYMOUS is MAP_ANON on some systems, e.g. OpenBSD */
SymI_HasProto(barf) \
SymI_HasProto(debugBelch) \
SymI_HasProto(errorBelch) \
+ SymI_HasProto(sysErrorBelch) \
SymI_HasProto(asyncExceptionsBlockedzh_fast) \
SymI_HasProto(blockAsyncExceptionszh_fast) \
SymI_HasProto(catchzh_fast) \
SymI_HasProto(freeHaskellFunctionPtr) \
SymI_HasProto(freeStablePtr) \
SymI_HasProto(getOrSetTypeableStore) \
+ SymI_HasProto(getOrSetSignalHandlerStore) \
SymI_HasProto(gcdIntegerzh_fast) \
SymI_HasProto(gcdIntegerIntzh_fast) \
SymI_HasProto(gcdIntzh_fast) \
SymI_HasProto(hs_free_stable_ptr) \
SymI_HasProto(hs_free_fun_ptr) \
SymI_HasProto(hs_hpc_rootModule) \
+ SymI_HasProto(hs_hpc_module) \
SymI_HasProto(initLinker) \
SymI_HasProto(unpackClosurezh_fast) \
SymI_HasProto(getApStackValzh_fast) \
mmap_32bit_base = (void*)RtsFlags.MiscFlags.linkerMemBase;
}
#endif
+
+#if defined(mingw32_HOST_OS)
+ /*
+ * These two libraries cause problems when added to the static link,
+ * but are necessary for resolving symbols in GHCi, hence we load
+ * them manually here.
+ */
+ addDLL("msvcrt");
+ addDLL("kernel32");
+#endif
}
/* -----------------------------------------------------------------------------
copyName ( sym->Name, strtab, symbol, 1000-1 );
S = (UInt32) lookupSymbol( symbol );
if ((void*)S != NULL) goto foundit;
- /* Newline first because the interactive linker has printed "linking..." */
- errorBelch("\n%s: unknown symbol `%s'", oc->fileName, symbol);
+ errorBelch("%s: unknown symbol `%s'", oc->fileName, symbol);
return 0;
foundit:;
}
char *thingPtr = image + sect->offset + reloc->r_address;
uint64_t thing;
- uint64_t value;
+ /* We shouldn't need to initialise this, but gcc on OS X 64 bit
+ complains that it may be used uninitialized if we don't */
+ uint64_t value = 0;
uint64_t baseValue;
int type = reloc->r_type;