X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FLinker.c;h=878c86b60aa4fd58dce8a626b0b684ba3df6343a;hb=05859437c5dfd2967418e3267f7cfc37e4f8952d;hp=92c1197f321d5cfbdefd17b90a7a7727ee16a2b8;hpb=c8749d21d9fbb5c644b098fee74caf876ca5206c;p=ghc-hetmet.git diff --git a/rts/Linker.c b/rts/Linker.c index 92c1197..878c86b 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -69,7 +69,15 @@ #include #endif -#if defined(linux_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS) || defined(darwin_HOST_OS) +#if defined(linux_HOST_OS ) || defined(freebsd_HOST_OS) || \ + defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS ) || \ + defined(openbsd_HOST_OS ) || \ + ( defined(darwin_HOST_OS ) && !defined(powerpc_HOST_ARCH) ) +/* Don't use mmap on powerpc-apple-darwin as mmap doesn't support + * reallocating but we need to allocate jump islands just after each + * object images. Otherwise relative branches to jump islands can fail + * due to 24-bits displacement overflow. + */ #define USE_MMAP #include #include @@ -261,6 +269,7 @@ typedef struct _RtsSymbolVal { SymI_HasProto(unlockFile) \ SymI_HasProto(signal_handlers) \ SymI_HasProto(stg_sig_install) \ + SymI_HasProto(rtsTimerSignal) \ SymI_NeedsProto(nocldstop) #endif @@ -880,7 +889,7 @@ typedef struct _RtsSymbolVal { SymI_HasProto(rts_unlock) \ SymI_HasProto(rts_unsafeGetMyCapability) \ SymI_HasProto(rtsSupportsBoundThreads) \ - SymI_HasProto(rts_isProfiled) \ + SymI_HasProto(rts_isProfiled) \ SymI_HasProto(setProgArgv) \ SymI_HasProto(startupHaskell) \ SymI_HasProto(shutdownHaskell) \ @@ -1960,6 +1969,9 @@ loadObj( char *path ) int fd; #else FILE *f; +# if defined(darwin_HOST_OS) + int misalignment; +# endif #endif IF_DEBUG(linker, debugBelch("loadObj %s\n", path));