[commit: ghc] master: linker: Move mmapForLinker declaration into LinkerInternals.h (43c8c1c)

git at git.haskell.org git at git.haskell.org
Wed Nov 2 20:15:18 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/43c8c1c4a21c3b0a281433394163ba46a124a925/ghc

>---------------------------------------------------------------

commit 43c8c1c4a21c3b0a281433394163ba46a124a925
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Wed Nov 2 15:01:03 2016 -0400

    linker: Move mmapForLinker declaration into LinkerInternals.h
    
    Test Plan: Validate
    
    Reviewers: simonmar, erikd, austin
    
    Reviewed By: simonmar
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2645


>---------------------------------------------------------------

43c8c1c4a21c3b0a281433394163ba46a124a925
 rts/LinkerInternals.h | 6 +++++-
 rts/linker/M32Alloc.c | 1 +
 rts/linker/M32Alloc.h | 2 --
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
index 460beae..2fe9ff9 100644
--- a/rts/LinkerInternals.h
+++ b/rts/LinkerInternals.h
@@ -12,6 +12,8 @@
 #include "Rts.h"
 #include "Hash.h"
 
+#include "BeginPrivate.h"
+
 /* See Linker.c Note [runtime-linker-phases] */
 typedef enum {
     OBJECT_LOADED,
@@ -184,6 +186,8 @@ void exitLinker( void );
 
 void freeObjectCode (ObjectCode *oc);
 
+void *mmapForLinker (size_t bytes, uint32_t flags, int fd, int offset);
+
 #if defined(mingw32_HOST_OS)
 
 typedef unsigned char          UChar;
@@ -323,6 +327,6 @@ getting, here. */
 #define USE_CONTIGUOUS_MMAP 0
 #endif
 
-
+#include "EndPrivate.h"
 
 #endif /* LINKERINTERNALS_H */
diff --git a/rts/linker/M32Alloc.c b/rts/linker/M32Alloc.c
index bdc2fdb..73f9be9 100644
--- a/rts/linker/M32Alloc.c
+++ b/rts/linker/M32Alloc.c
@@ -9,6 +9,7 @@
 #include "Rts.h"
 #include "sm/OSMem.h"
 #include "linker/M32Alloc.h"
+#include "LinkerInternals.h"
 
 #include <inttypes.h>
 #include <stdlib.h>
diff --git a/rts/linker/M32Alloc.h b/rts/linker/M32Alloc.h
index 3d53a26..db3d8c0 100644
--- a/rts/linker/M32Alloc.h
+++ b/rts/linker/M32Alloc.h
@@ -40,8 +40,6 @@ void m32_free(void *addr, size_t size) M32_NO_RETURN;
 
 void * m32_alloc(size_t size, size_t alignment) M32_NO_RETURN;
 
-void * mmapForLinker (size_t bytes, uint32_t flags, int fd, int offset);
-
 #include "EndPrivate.h"
 
 #endif



More information about the ghc-commits mailing list