arm bfd.h tidy
authorAlan Modra <amodra@gmail.com>
Mon, 23 Sep 2019 00:36:45 +0000 (10:06 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 23 Sep 2019 00:57:21 +0000 (10:27 +0930)
bfd/
* bfd-in.h: Move arm declaraions..
* cpu-arm.h: ..to here, new file..
* coff-arm.h: ..and here, new file..
* elf32-arm.h: ..and here, new file.
* cpu-arm.c: Include cpu-arm.h.
* coff-arm.c: Include cpu-arm.h and coff-arm.h.
* elf32-arm.c: Include cpu-arm.h and elf32-arm.h.
* pe-arm.c: Move function rename defines later.
* pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early.
* bfd-in2.h: Regenerate.
gas/
* config/tc-arm.c: Include cpu-arm.h.
ld/
* emultempl/armelf.em: Include elf32-arm.h.
* emultempl/pe.em: Move func defines later and include coff-arm.h.

16 files changed:
bfd/ChangeLog
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/coff-arm.c
bfd/coff-arm.h [new file with mode: 0644]
bfd/cpu-arm.c
bfd/cpu-arm.h [new file with mode: 0644]
bfd/elf32-arm.c
bfd/elf32-arm.h [new file with mode: 0644]
bfd/pe-arm-wince.c
bfd/pe-arm.c
gas/ChangeLog
gas/config/tc-arm.c
ld/ChangeLog
ld/emultempl/armelf.em
ld/emultempl/pe.em

index 06b09a16ab533485b8a6e4a4f956bd2feb12cd3f..c1f82cda92c08eac4fc2d86414480f102cc3594c 100644 (file)
@@ -1,3 +1,16 @@
+2019-09-23  Alan Modra  <amodra@gmail.com>
+
+       * bfd-in.h: Move arm declaraions..
+       * cpu-arm.h: ..to here, new file..
+       * coff-arm.h: ..and here, new file..
+       * elf32-arm.h: ..and here, new file.
+       * cpu-arm.c: Include cpu-arm.h.
+       * coff-arm.c: Include cpu-arm.h and coff-arm.h.
+       * elf32-arm.c: Include cpu-arm.h and elf32-arm.h.
+       * pe-arm.c: Move function rename defines later.
+       * pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early.
+       * bfd-in2.h: Regenerate.
+
 2019-09-23  Alan Modra  <amodra@gmail.com>
 
        * bfd-in.h: Move tic6x function declaration..
index c923e54f5d6f24be74c0de709fcf68d81379b101..124a0c2b817e32623fedca1637a547dd4fc78814 100644 (file)
@@ -763,143 +763,3 @@ union internal_auxent;
 
 extern bfd_boolean bfd_coff_set_symbol_class
   (bfd *, struct bfd_symbol *, unsigned int);
-
-/* ARM VFP11 erratum workaround support.  */
-typedef enum
-{
-  BFD_ARM_VFP11_FIX_DEFAULT,
-  BFD_ARM_VFP11_FIX_NONE,
-  BFD_ARM_VFP11_FIX_SCALAR,
-  BFD_ARM_VFP11_FIX_VECTOR
-} bfd_arm_vfp11_fix;
-
-extern void bfd_elf32_arm_init_maps
-  (bfd *);
-
-extern void bfd_elf32_arm_set_vfp11_fix
-  (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_set_cortex_a8_fix
-  (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
-  (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_vfp11_fix_veneer_locations
-  (bfd *, struct bfd_link_info *);
-
-/* ARM STM STM32L4XX erratum workaround support.  */
-typedef enum
-{
-  BFD_ARM_STM32L4XX_FIX_NONE,
-  BFD_ARM_STM32L4XX_FIX_DEFAULT,
-  BFD_ARM_STM32L4XX_FIX_ALL
-} bfd_arm_stm32l4xx_fix;
-
-extern void bfd_elf32_arm_set_stm32l4xx_fix
-  (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan
-  (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations
-  (bfd *, struct bfd_link_info *);
-
-/* ARM Interworking support.  Called from linker.  */
-extern bfd_boolean bfd_arm_allocate_interworking_sections
-  (struct bfd_link_info *);
-
-extern bfd_boolean bfd_arm_process_before_allocation
-  (bfd *, struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_arm_get_bfd_for_interworking
-  (bfd *, struct bfd_link_info *);
-
-/* PE ARM Interworking support.  Called from linker.  */
-extern bfd_boolean bfd_arm_pe_allocate_interworking_sections
-  (struct bfd_link_info *);
-
-extern bfd_boolean bfd_arm_pe_process_before_allocation
-  (bfd *, struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking
-  (bfd *, struct bfd_link_info *);
-
-/* ELF ARM Interworking support.  Called from linker.  */
-extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
-  (struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_process_before_allocation
-  (bfd *, struct bfd_link_info *);
-
-struct elf32_arm_params {
-  char *thumb_entry_symbol;
-  int byteswap_code;
-  int target1_is_rel;
-  char * target2_type;
-  int fix_v4bx;
-  int use_blx;
-  bfd_arm_vfp11_fix vfp11_denorm_fix;
-  bfd_arm_stm32l4xx_fix stm32l4xx_fix;
-  int no_enum_size_warning;
-  int no_wchar_size_warning;
-  int pic_veneer;
-  int fix_cortex_a8;
-  int fix_arm1176;
-  int merge_exidx_entries;
-  int cmse_implib;
-  bfd *in_implib_bfd;
-};
-
-void bfd_elf32_arm_set_target_params
-  (bfd *, struct bfd_link_info *, struct elf32_arm_params *);
-
-extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
-  (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
-  (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_keep_private_stub_output_sections
-  (struct bfd_link_info *);
-
-/* ELF ARM mapping symbol support.  */
-#define BFD_ARM_SPECIAL_SYM_TYPE_MAP   (1 << 0)
-#define BFD_ARM_SPECIAL_SYM_TYPE_TAG   (1 << 1)
-#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2)
-#define BFD_ARM_SPECIAL_SYM_TYPE_ANY   (~0)
-
-extern bfd_boolean bfd_is_arm_special_symbol_name
-  (const char *, int);
-
-extern void bfd_elf32_arm_set_byteswap_code
-  (struct bfd_link_info *, int);
-
-extern void bfd_elf32_arm_use_long_plt (void);
-
-/* ARM Note section processing.  */
-extern bfd_boolean bfd_arm_merge_machines
-  (bfd *, bfd *);
-
-extern bfd_boolean bfd_arm_update_notes
-  (bfd *, const char *);
-
-extern unsigned int bfd_arm_get_mach_from_notes
-  (bfd *, const char *);
-
-/* ARM stub generation support.  Called from the linker.  */
-extern int elf32_arm_setup_section_lists
-  (bfd *, struct bfd_link_info *);
-extern void elf32_arm_next_input_section
-  (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf32_arm_size_stubs
-  (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
-   struct bfd_section * (*) (const char *, struct bfd_section *,
-                            struct bfd_section *, unsigned int),
-   void (*) (void));
-extern bfd_boolean elf32_arm_build_stubs
-  (struct bfd_link_info *);
-
-/* ARM unwind section editing support.  */
-extern bfd_boolean elf32_arm_fix_exidx_coverage
-(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
index 74aaf3c5aa23206c950eb613f76bc979697415c0..052a826176e6e0a3b5cfc6becb41ca62a7430ea3 100644 (file)
@@ -770,146 +770,6 @@ union internal_auxent;
 
 extern bfd_boolean bfd_coff_set_symbol_class
   (bfd *, struct bfd_symbol *, unsigned int);
-
-/* ARM VFP11 erratum workaround support.  */
-typedef enum
-{
-  BFD_ARM_VFP11_FIX_DEFAULT,
-  BFD_ARM_VFP11_FIX_NONE,
-  BFD_ARM_VFP11_FIX_SCALAR,
-  BFD_ARM_VFP11_FIX_VECTOR
-} bfd_arm_vfp11_fix;
-
-extern void bfd_elf32_arm_init_maps
-  (bfd *);
-
-extern void bfd_elf32_arm_set_vfp11_fix
-  (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_set_cortex_a8_fix
-  (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
-  (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_vfp11_fix_veneer_locations
-  (bfd *, struct bfd_link_info *);
-
-/* ARM STM STM32L4XX erratum workaround support.  */
-typedef enum
-{
-  BFD_ARM_STM32L4XX_FIX_NONE,
-  BFD_ARM_STM32L4XX_FIX_DEFAULT,
-  BFD_ARM_STM32L4XX_FIX_ALL
-} bfd_arm_stm32l4xx_fix;
-
-extern void bfd_elf32_arm_set_stm32l4xx_fix
-  (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan
-  (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations
-  (bfd *, struct bfd_link_info *);
-
-/* ARM Interworking support.  Called from linker.  */
-extern bfd_boolean bfd_arm_allocate_interworking_sections
-  (struct bfd_link_info *);
-
-extern bfd_boolean bfd_arm_process_before_allocation
-  (bfd *, struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_arm_get_bfd_for_interworking
-  (bfd *, struct bfd_link_info *);
-
-/* PE ARM Interworking support.  Called from linker.  */
-extern bfd_boolean bfd_arm_pe_allocate_interworking_sections
-  (struct bfd_link_info *);
-
-extern bfd_boolean bfd_arm_pe_process_before_allocation
-  (bfd *, struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking
-  (bfd *, struct bfd_link_info *);
-
-/* ELF ARM Interworking support.  Called from linker.  */
-extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
-  (struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_process_before_allocation
-  (bfd *, struct bfd_link_info *);
-
-struct elf32_arm_params {
-  char *thumb_entry_symbol;
-  int byteswap_code;
-  int target1_is_rel;
-  char * target2_type;
-  int fix_v4bx;
-  int use_blx;
-  bfd_arm_vfp11_fix vfp11_denorm_fix;
-  bfd_arm_stm32l4xx_fix stm32l4xx_fix;
-  int no_enum_size_warning;
-  int no_wchar_size_warning;
-  int pic_veneer;
-  int fix_cortex_a8;
-  int fix_arm1176;
-  int merge_exidx_entries;
-  int cmse_implib;
-  bfd *in_implib_bfd;
-};
-
-void bfd_elf32_arm_set_target_params
-  (bfd *, struct bfd_link_info *, struct elf32_arm_params *);
-
-extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
-  (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
-  (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_keep_private_stub_output_sections
-  (struct bfd_link_info *);
-
-/* ELF ARM mapping symbol support.  */
-#define BFD_ARM_SPECIAL_SYM_TYPE_MAP   (1 << 0)
-#define BFD_ARM_SPECIAL_SYM_TYPE_TAG   (1 << 1)
-#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2)
-#define BFD_ARM_SPECIAL_SYM_TYPE_ANY   (~0)
-
-extern bfd_boolean bfd_is_arm_special_symbol_name
-  (const char *, int);
-
-extern void bfd_elf32_arm_set_byteswap_code
-  (struct bfd_link_info *, int);
-
-extern void bfd_elf32_arm_use_long_plt (void);
-
-/* ARM Note section processing.  */
-extern bfd_boolean bfd_arm_merge_machines
-  (bfd *, bfd *);
-
-extern bfd_boolean bfd_arm_update_notes
-  (bfd *, const char *);
-
-extern unsigned int bfd_arm_get_mach_from_notes
-  (bfd *, const char *);
-
-/* ARM stub generation support.  Called from the linker.  */
-extern int elf32_arm_setup_section_lists
-  (bfd *, struct bfd_link_info *);
-extern void elf32_arm_next_input_section
-  (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf32_arm_size_stubs
-  (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
-   struct bfd_section * (*) (const char *, struct bfd_section *,
-                            struct bfd_section *, unsigned int),
-   void (*) (void));
-extern bfd_boolean elf32_arm_build_stubs
-  (struct bfd_link_info *);
-
-/* ARM unwind section editing support.  */
-extern bfd_boolean elf32_arm_fix_exidx_coverage
-(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
 /* Extracted from init.c.  */
 unsigned int bfd_init (void);
 
index cbc5257e9f3e951a5ed46aa92336426ef0aee07c..c9a7c098f541a9014ea0e11cb34e057e5dc617e9 100644 (file)
@@ -24,6 +24,8 @@
 #include "libbfd.h"
 #include "coff/arm.h"
 #include "coff/internal.h"
+#include "cpu-arm.h"
+#include "coff-arm.h"
 
 #ifdef COFF_WITH_PE
 #include "coff/pe.h"
diff --git a/bfd/coff-arm.h b/bfd/coff-arm.h
new file mode 100644 (file)
index 0000000..e0a93d6
--- /dev/null
@@ -0,0 +1,29 @@
+/* BFD back-end for ARM COFF files.
+   Copyright (C) 2019 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+/* ARM Interworking support.  Called from linker.  */
+extern bfd_boolean bfd_arm_allocate_interworking_sections
+  (struct bfd_link_info *);
+
+extern bfd_boolean bfd_arm_process_before_allocation
+  (bfd *, struct bfd_link_info *, int);
+
+extern bfd_boolean bfd_arm_get_bfd_for_interworking
+  (bfd *, struct bfd_link_info *);
index 71a78daf1196c86e3bd9ac4959b7881390110f09..4a8c340f70e8b8e378895e47b7258ffc14b58fc8 100644 (file)
@@ -23,6 +23,7 @@
 #include "bfd.h"
 #include "libbfd.h"
 #include "libiberty.h"
+#include "cpu-arm.h"
 
 /* This routine is provided two arch_infos and works out which ARM
    machine which would be compatible with both and returns a pointer
diff --git a/bfd/cpu-arm.h b/bfd/cpu-arm.h
new file mode 100644 (file)
index 0000000..116b040
--- /dev/null
@@ -0,0 +1,39 @@
+/* BFD support for the ARM processor
+   Copyright (C) 2019 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+/* ARM Note section processing.  */
+extern bfd_boolean bfd_arm_merge_machines
+  (bfd *, bfd *);
+
+extern bfd_boolean bfd_arm_update_notes
+  (bfd *, const char *);
+
+extern unsigned int bfd_arm_get_mach_from_notes
+  (bfd *, const char *);
+
+/* ELF ARM mapping symbol support.  */
+#define BFD_ARM_SPECIAL_SYM_TYPE_MAP   (1 << 0)
+#define BFD_ARM_SPECIAL_SYM_TYPE_TAG   (1 << 1)
+#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2)
+#define BFD_ARM_SPECIAL_SYM_TYPE_ANY   (~0)
+
+extern bfd_boolean bfd_is_arm_special_symbol_name
+  (const char *, int);
+
index 1c4887a03408ce0c019151911a958a907f1e6b2f..bb53e039e307c4a3705371bb72126d74e0852200 100644 (file)
@@ -28,6 +28,8 @@
 #include "elf-nacl.h"
 #include "elf-vxworks.h"
 #include "elf/arm.h"
+#include "elf32-arm.h"
+#include "cpu-arm.h"
 
 /* Return the relocation section associated with NAME.  HTAB is the
    bfd's elf32_arm_link_hash_entry.  */
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
new file mode 100644 (file)
index 0000000..ba6c236
--- /dev/null
@@ -0,0 +1,121 @@
+/* 32-bit ELF support for ARM
+   Copyright (C) 2019 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+
+/* ARM VFP11 erratum workaround support.  */
+typedef enum
+{
+  BFD_ARM_VFP11_FIX_DEFAULT,
+  BFD_ARM_VFP11_FIX_NONE,
+  BFD_ARM_VFP11_FIX_SCALAR,
+  BFD_ARM_VFP11_FIX_VECTOR
+} bfd_arm_vfp11_fix;
+
+extern void bfd_elf32_arm_init_maps
+  (bfd *);
+
+extern void bfd_elf32_arm_set_vfp11_fix
+  (bfd *, struct bfd_link_info *);
+
+extern void bfd_elf32_arm_set_cortex_a8_fix
+  (bfd *, struct bfd_link_info *);
+
+extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
+  (bfd *, struct bfd_link_info *);
+
+extern void bfd_elf32_arm_vfp11_fix_veneer_locations
+  (bfd *, struct bfd_link_info *);
+
+/* ARM STM STM32L4XX erratum workaround support.  */
+typedef enum
+{
+  BFD_ARM_STM32L4XX_FIX_NONE,
+  BFD_ARM_STM32L4XX_FIX_DEFAULT,
+  BFD_ARM_STM32L4XX_FIX_ALL
+} bfd_arm_stm32l4xx_fix;
+
+extern void bfd_elf32_arm_set_stm32l4xx_fix
+  (bfd *, struct bfd_link_info *);
+
+extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan
+  (bfd *, struct bfd_link_info *);
+
+extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations
+  (bfd *, struct bfd_link_info *);
+
+/* ELF ARM Interworking support.  Called from linker.  */
+extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
+  (struct bfd_link_info *);
+
+extern bfd_boolean bfd_elf32_arm_process_before_allocation
+  (bfd *, struct bfd_link_info *);
+
+struct elf32_arm_params {
+  char *thumb_entry_symbol;
+  int byteswap_code;
+  int target1_is_rel;
+  char * target2_type;
+  int fix_v4bx;
+  int use_blx;
+  bfd_arm_vfp11_fix vfp11_denorm_fix;
+  bfd_arm_stm32l4xx_fix stm32l4xx_fix;
+  int no_enum_size_warning;
+  int no_wchar_size_warning;
+  int pic_veneer;
+  int fix_cortex_a8;
+  int fix_arm1176;
+  int merge_exidx_entries;
+  int cmse_implib;
+  bfd *in_implib_bfd;
+};
+
+void bfd_elf32_arm_set_target_params
+  (bfd *, struct bfd_link_info *, struct elf32_arm_params *);
+
+extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
+  (bfd *, struct bfd_link_info *);
+
+extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
+  (bfd *, struct bfd_link_info *);
+
+extern void bfd_elf32_arm_keep_private_stub_output_sections
+  (struct bfd_link_info *);
+
+extern void bfd_elf32_arm_set_byteswap_code
+  (struct bfd_link_info *, int);
+
+extern void bfd_elf32_arm_use_long_plt (void);
+
+/* ARM stub generation support.  Called from the linker.  */
+extern int elf32_arm_setup_section_lists
+  (bfd *, struct bfd_link_info *);
+extern void elf32_arm_next_input_section
+  (struct bfd_link_info *, struct bfd_section *);
+extern bfd_boolean elf32_arm_size_stubs
+  (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
+   struct bfd_section * (*) (const char *, struct bfd_section *,
+                            struct bfd_section *, unsigned int),
+   void (*) (void));
+extern bfd_boolean elf32_arm_build_stubs
+  (struct bfd_link_info *);
+
+/* ARM unwind section editing support.  */
+extern bfd_boolean elf32_arm_fix_exidx_coverage
+(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
index d3d52ee520c01448c8d1a1a793f858cb0d39a2b9..733b8380f5691772c3581d3b3d973321bdae9367 100644 (file)
@@ -18,6 +18,9 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
    MA 02110-1301, USA.  */
 
+#include "sysdep.h"
+#include "bfd.h"
+
 #define TARGET_UNDERSCORE    0
 #define USER_LABEL_PREFIX    ""
 
 #define TARGET_BIG_SYM       arm_pe_wince_be_vec
 #define TARGET_BIG_NAME      "pe-arm-wince-big"
 
+#define LOCAL_LABEL_PREFIX "."
+
+#undef  bfd_pe_print_pdata
+#define        bfd_pe_print_pdata   _bfd_pe_print_ce_compressed_pdata
+
 #define bfd_arm_allocate_interworking_sections \
   bfd_arm_wince_pe_allocate_interworking_sections
 #define bfd_arm_get_bfd_for_interworking \
 #define bfd_arm_process_before_allocation \
   bfd_arm_wince_pe_process_before_allocation
 
-#define LOCAL_LABEL_PREFIX "."
-
-#include "sysdep.h"
-#include "bfd.h"
-
-#undef  bfd_pe_print_pdata
-#define        bfd_pe_print_pdata   _bfd_pe_print_ce_compressed_pdata
-
 #include "pe-arm.c"
-
index 2d1b7ead1f796daa4ad7b4a8a9f56998c0d9947a..4667046108fff7d9abdd215454a1b26aeae7a4c7 100644 (file)
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
    MA 02110-1301, USA.  */
 
-
-/* Do this before including bfd.h, so we prototype the right functions.  */
-
-#ifndef bfd_arm_allocate_interworking_sections
-#define bfd_arm_allocate_interworking_sections \
-  bfd_armpe_allocate_interworking_sections
-#define bfd_arm_get_bfd_for_interworking \
-  bfd_armpe_get_bfd_for_interworking
-#define bfd_arm_process_before_allocation \
-  bfd_armpe_process_before_allocation
-#endif
-
 #include "sysdep.h"
 #include "bfd.h"
 
 { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \
   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
 
+#ifndef bfd_arm_allocate_interworking_sections
+#define bfd_arm_allocate_interworking_sections \
+  bfd_armpe_allocate_interworking_sections
+#define bfd_arm_get_bfd_for_interworking \
+  bfd_armpe_get_bfd_for_interworking
+#define bfd_arm_process_before_allocation \
+  bfd_armpe_process_before_allocation
+#endif
+
 #include "coff-arm.c"
index 39537f81298a2b69bbf5d9d79dc2ee93e3b36b99..cab918a49c3580e34f88372d6da497980cfb3616 100644 (file)
@@ -1,3 +1,7 @@
+2019-09-23  Alan Modra  <amodra@gmail.com>
+
+       * config/tc-arm.c: Include cpu-arm.h.
+
 2019-09-21  Alan Modra  <amodra@gmail.com>
 
        * config/tc-i386.c (md_parse_option): Fix warning on vexwig assignment.
index b0f1507c360621cc269937f619b5c16f7882712a..7760d1807d3599690d1ee8cdfcdc90f547699605 100644 (file)
@@ -32,6 +32,7 @@
 #include "obstack.h"
 #include "libiberty.h"
 #include "opcode/arm.h"
+#include "cpu-arm.h"
 
 #ifdef OBJ_ELF
 #include "elf/arm.h"
index 378fcea06486a221a43d07ef6698b6edc6c87a20..f0fcd202e9d5384dab673bd932e16e72bc004402 100644 (file)
@@ -1,3 +1,8 @@
+2019-09-23  Alan Modra  <amodra@gmail.com>
+
+       * emultempl/armelf.em: Include elf32-arm.h.
+       * emultempl/pe.em: Move func defines later and include coff-arm.h.
+
 2019-09-23  Alan Modra  <amodra@gmail.com>
 
        * emultempl/aarch64elf.em: Include elfxx-aarch64.h.
index 0cbfcc70b320ddfa46b492778a59921e8016cb61..9a1bc9a04b40b4ab93dbf563ed59b008f301770f 100644 (file)
@@ -27,6 +27,7 @@ fragment <<EOF
 
 #include "ldctor.h"
 #include "elf/arm.h"
+#include "elf32-arm.h"
 
 static struct elf32_arm_params params =
 {
index 150c98296f187b5ba171a4d6c99e78884432d238..c1932d79adeb8ebf2f8b31f1f03cc3985793af7c 100644 (file)
@@ -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"
This page took 0.047769 seconds and 4 git commands to generate.