diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-10-24 19:20:21 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-10-26 19:53:36 -0400 |
commit | 417f59d4140ef43714abf0307d2abd0742222db2 (patch) | |
tree | bd0fb7b8649e4df7993b1ebad563a88bd8f94a97 /rts | |
parent | 6057559683757aa6cc2b69dc81bb0027f5e61fc0 (diff) | |
download | haskell-417f59d4140ef43714abf0307d2abd0742222db2.tar.gz |
rts: Fix ARM linker includes
* Prefer #pragma once over guard macros
* Drop redundant #includes
* Fix order to ensure that necessary macros are defined when we
condition on them
Diffstat (limited to 'rts')
-rw-r--r-- | rts/linker/elf_compat.h | 5 | ||||
-rw-r--r-- | rts/linker/elf_got.h | 1 | ||||
-rw-r--r-- | rts/linker/elf_plt.h | 5 | ||||
-rw-r--r-- | rts/linker/elf_reloc_aarch64.h | 4 | ||||
-rw-r--r-- | rts/linker/elf_util.h | 4 | ||||
-rw-r--r-- | rts/linker/util.h | 5 |
6 files changed, 7 insertions, 17 deletions
diff --git a/rts/linker/elf_compat.h b/rts/linker/elf_compat.h index b409728a09..424d1d25f8 100644 --- a/rts/linker/elf_compat.h +++ b/rts/linker/elf_compat.h @@ -9,8 +9,7 @@ // under which it is distrubuted. // -#if !defined(RTS_ELF_COMPAT_H) -#define RTS_ELF_COMPAT_H +#pragma once #define PASTE(x,y) x ## y #define EVAL(x,y) PASTE(x,y) @@ -31,5 +30,3 @@ enum Reloci386 { enum RelocX86_64 { #include "ELFRelocs/x86_64.def" }; - -#endif //RTS_ELF_COMPAT_H diff --git a/rts/linker/elf_got.h b/rts/linker/elf_got.h index 4653030ab3..811404c4cd 100644 --- a/rts/linker/elf_got.h +++ b/rts/linker/elf_got.h @@ -1,7 +1,6 @@ #pragma once #include "LinkerInternals.h" -#include "ghcplatform.h" #include <stdbool.h> #include <linker/ElfTypes.h> diff --git a/rts/linker/elf_plt.h b/rts/linker/elf_plt.h index 0d99c7e462..081420476f 100644 --- a/rts/linker/elf_plt.h +++ b/rts/linker/elf_plt.h @@ -1,13 +1,12 @@ #pragma once -#if defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH) - -#include "ghcplatform.h" #include <LinkerInternals.h> #include "elf_plt_arm.h" #include "elf_plt_aarch64.h" +#if defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH) + #if defined(OBJFORMAT_ELF) #if defined(__x86_64__) diff --git a/rts/linker/elf_reloc_aarch64.h b/rts/linker/elf_reloc_aarch64.h index 06b41eff0e..ac7a90ea16 100644 --- a/rts/linker/elf_reloc_aarch64.h +++ b/rts/linker/elf_reloc_aarch64.h @@ -1,9 +1,9 @@ #pragma once -#if defined(OBJFORMAT_ELF) - #include "LinkerInternals.h" +#if defined(OBJFORMAT_ELF) + bool relocateObjectCodeAarch64(ObjectCode * oc); diff --git a/rts/linker/elf_util.h b/rts/linker/elf_util.h index 2ece198268..0f9a85ffb0 100644 --- a/rts/linker/elf_util.h +++ b/rts/linker/elf_util.h @@ -1,5 +1,4 @@ -#if !defined(RTS_LINKER_ELF_UTIL_H) -#define RTS_LINKER_ELF_UTIL_H +#pragma once #include "LinkerInternals.h" @@ -13,4 +12,3 @@ ElfSymbol * findSymbol(ObjectCode * oc, unsigned long symbolIndex); #endif -#endif //RTS_LINKER_ELF_UTIL_H diff --git a/rts/linker/util.h b/rts/linker/util.h index 77f06978ab..6f08729075 100644 --- a/rts/linker/util.h +++ b/rts/linker/util.h @@ -1,5 +1,4 @@ -#if !defined(RTS_LINKER_UTIL_H) -#define RTS_LINKER_UTIL_H +#pragma once #include <stdint.h> #include <stdbool.h> @@ -26,5 +25,3 @@ isInt64(uint32_t bits, int64_t x) { return bits > 64 || (-((int64_t)1 << (bits-1)) <= x && x < ((int64_t)1 << (bits-1))); } - -#endif //RTS_LINKER_UTIL_H |