aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/pe.em
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl/pe.em')
-rw-r--r--ld/emultempl/pe.em23
1 files changed, 11 insertions, 12 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 150c982..c1932d7 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -37,18 +37,6 @@ fragment <<EOF
#define TARGET_IS_${EMULATION_NAME}
-/* Do this before including bfd.h, so we prototype the right functions. */
-
-#if defined(TARGET_IS_armpe) \
- || defined(TARGET_IS_arm_wince_pe)
-#define bfd_arm_allocate_interworking_sections \
- bfd_${EMULATION_NAME}_allocate_interworking_sections
-#define bfd_arm_get_bfd_for_interworking \
- bfd_${EMULATION_NAME}_get_bfd_for_interworking
-#define bfd_arm_process_before_allocation \
- bfd_${EMULATION_NAME}_process_before_allocation
-#endif
-
#include "sysdep.h"
#include "bfd.h"
#include "bfdlink.h"
@@ -78,6 +66,17 @@ fragment <<EOF
#include "../bfd/libcoff.h"
#include "../bfd/libpei.h"
+#if defined(TARGET_IS_armpe) \
+ || defined(TARGET_IS_arm_wince_pe)
+#define bfd_arm_allocate_interworking_sections \
+ bfd_${EMULATION_NAME}_allocate_interworking_sections
+#define bfd_arm_get_bfd_for_interworking \
+ bfd_${EMULATION_NAME}_get_bfd_for_interworking
+#define bfd_arm_process_before_allocation \
+ bfd_${EMULATION_NAME}_process_before_allocation
+#include "coff-arm.h"
+#endif
+
#include "deffile.h"
#include "pe-dll.h"
#include "safe-ctype.h"