summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rts/linker/elf_got.c1
-rw-r--r--rts/linker/elf_plt_aarch64.c4
-rw-r--r--rts/linker/elf_plt_arm.c1
-rw-r--r--rts/linker/elf_reloc.c3
-rw-r--r--rts/linker/elf_reloc_aarch64.c8
5 files changed, 10 insertions, 7 deletions
diff --git a/rts/linker/elf_got.c b/rts/linker/elf_got.c
index 5cb56cd2dc..27e0f818a0 100644
--- a/rts/linker/elf_got.c
+++ b/rts/linker/elf_got.c
@@ -1,5 +1,6 @@
#include "elf_got.h"
#include <string.h>
+
#if defined(OBJFORMAT_ELF)
/*
* Check if we need a global offset table slot for a
diff --git a/rts/linker/elf_plt_aarch64.c b/rts/linker/elf_plt_aarch64.c
index dc528bce79..85c7a9b0c1 100644
--- a/rts/linker/elf_plt_aarch64.c
+++ b/rts/linker/elf_plt_aarch64.c
@@ -1,11 +1,9 @@
#include <stdlib.h>
#include "elf_compat.h"
-#include "ghcplatform.h"
+#include "elf_plt_aarch64.h"
#if defined(aarch64_HOST_ARCH)
-#include "elf_plt_aarch64.h"
-
#if defined(OBJFORMAT_ELF)
/* five 4 byte instructions */
diff --git a/rts/linker/elf_plt_arm.c b/rts/linker/elf_plt_arm.c
index 4ef50c6ceb..4fa9a28b19 100644
--- a/rts/linker/elf_plt_arm.c
+++ b/rts/linker/elf_plt_arm.c
@@ -3,6 +3,7 @@
#include <stdlib.h>
#include "elf_compat.h"
#include "ghcplatform.h"
+
#if defined(arm_HOST_ARCH)
#include "Elf.h"
diff --git a/rts/linker/elf_reloc.c b/rts/linker/elf_reloc.c
index 954512d769..e1421d2269 100644
--- a/rts/linker/elf_reloc.c
+++ b/rts/linker/elf_reloc.c
@@ -2,11 +2,14 @@
#include "elf_plt.h"
#if defined(OBJFORMAT_ELF)
+
/* we currently only use this abstraction for elf/arm64 */
#if defined(aarch64_HOST_ARCH)
+
bool
relocateObjectCode(ObjectCode * oc) {
return ADD_SUFFIX(relocateObjectCode)(oc);
}
#endif
+
#endif
diff --git a/rts/linker/elf_reloc_aarch64.c b/rts/linker/elf_reloc_aarch64.c
index 35cc70b5bc..bb15576d06 100644
--- a/rts/linker/elf_reloc_aarch64.c
+++ b/rts/linker/elf_reloc_aarch64.c
@@ -1,7 +1,3 @@
-#if defined(aarch64_HOST_ARCH)
-
-#if defined(OBJFORMAT_ELF)
-
#include <stdlib.h>
#include <assert.h>
#include "elf_compat.h"
@@ -10,6 +6,10 @@
#include "elf_util.h"
#include "elf_plt.h"
+#if defined(aarch64_HOST_ARCH)
+
+#if defined(OBJFORMAT_ELF)
+
#define Page(x) ((x) & ~0xFFF)
typedef uint64_t addr_t;