GNU Binutils with patches for OS216
Revision | f37164d78b0d9600862b7038b896922127749b52 (tree) |
---|---|
Time | 2019-09-23 09:57:21 |
Author | Alan Modra <amodra@gmai...> |
Commiter | Alan Modra |
arm bfd.h tidy
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.
@@ -1,5 +1,18 @@ | ||
1 | 1 | 2019-09-23 Alan Modra <amodra@gmail.com> |
2 | 2 | |
3 | + * bfd-in.h: Move arm declaraions.. | |
4 | + * cpu-arm.h: ..to here, new file.. | |
5 | + * coff-arm.h: ..and here, new file.. | |
6 | + * elf32-arm.h: ..and here, new file. | |
7 | + * cpu-arm.c: Include cpu-arm.h. | |
8 | + * coff-arm.c: Include cpu-arm.h and coff-arm.h. | |
9 | + * elf32-arm.c: Include cpu-arm.h and elf32-arm.h. | |
10 | + * pe-arm.c: Move function rename defines later. | |
11 | + * pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early. | |
12 | + * bfd-in2.h: Regenerate. | |
13 | + | |
14 | +2019-09-23 Alan Modra <amodra@gmail.com> | |
15 | + | |
3 | 16 | * bfd-in.h: Move tic6x function declaration.. |
4 | 17 | * elf32-tic6x.h: ..to here. |
5 | 18 | * bfd-in2.h: Regenerate. |
@@ -763,143 +763,3 @@ union internal_auxent; | ||
763 | 763 | |
764 | 764 | extern bfd_boolean bfd_coff_set_symbol_class |
765 | 765 | (bfd *, struct bfd_symbol *, unsigned int); |
766 | - | |
767 | -/* ARM VFP11 erratum workaround support. */ | |
768 | -typedef enum | |
769 | -{ | |
770 | - BFD_ARM_VFP11_FIX_DEFAULT, | |
771 | - BFD_ARM_VFP11_FIX_NONE, | |
772 | - BFD_ARM_VFP11_FIX_SCALAR, | |
773 | - BFD_ARM_VFP11_FIX_VECTOR | |
774 | -} bfd_arm_vfp11_fix; | |
775 | - | |
776 | -extern void bfd_elf32_arm_init_maps | |
777 | - (bfd *); | |
778 | - | |
779 | -extern void bfd_elf32_arm_set_vfp11_fix | |
780 | - (bfd *, struct bfd_link_info *); | |
781 | - | |
782 | -extern void bfd_elf32_arm_set_cortex_a8_fix | |
783 | - (bfd *, struct bfd_link_info *); | |
784 | - | |
785 | -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan | |
786 | - (bfd *, struct bfd_link_info *); | |
787 | - | |
788 | -extern void bfd_elf32_arm_vfp11_fix_veneer_locations | |
789 | - (bfd *, struct bfd_link_info *); | |
790 | - | |
791 | -/* ARM STM STM32L4XX erratum workaround support. */ | |
792 | -typedef enum | |
793 | -{ | |
794 | - BFD_ARM_STM32L4XX_FIX_NONE, | |
795 | - BFD_ARM_STM32L4XX_FIX_DEFAULT, | |
796 | - BFD_ARM_STM32L4XX_FIX_ALL | |
797 | -} bfd_arm_stm32l4xx_fix; | |
798 | - | |
799 | -extern void bfd_elf32_arm_set_stm32l4xx_fix | |
800 | - (bfd *, struct bfd_link_info *); | |
801 | - | |
802 | -extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan | |
803 | - (bfd *, struct bfd_link_info *); | |
804 | - | |
805 | -extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations | |
806 | - (bfd *, struct bfd_link_info *); | |
807 | - | |
808 | -/* ARM Interworking support. Called from linker. */ | |
809 | -extern bfd_boolean bfd_arm_allocate_interworking_sections | |
810 | - (struct bfd_link_info *); | |
811 | - | |
812 | -extern bfd_boolean bfd_arm_process_before_allocation | |
813 | - (bfd *, struct bfd_link_info *, int); | |
814 | - | |
815 | -extern bfd_boolean bfd_arm_get_bfd_for_interworking | |
816 | - (bfd *, struct bfd_link_info *); | |
817 | - | |
818 | -/* PE ARM Interworking support. Called from linker. */ | |
819 | -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections | |
820 | - (struct bfd_link_info *); | |
821 | - | |
822 | -extern bfd_boolean bfd_arm_pe_process_before_allocation | |
823 | - (bfd *, struct bfd_link_info *, int); | |
824 | - | |
825 | -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking | |
826 | - (bfd *, struct bfd_link_info *); | |
827 | - | |
828 | -/* ELF ARM Interworking support. Called from linker. */ | |
829 | -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections | |
830 | - (struct bfd_link_info *); | |
831 | - | |
832 | -extern bfd_boolean bfd_elf32_arm_process_before_allocation | |
833 | - (bfd *, struct bfd_link_info *); | |
834 | - | |
835 | -struct elf32_arm_params { | |
836 | - char *thumb_entry_symbol; | |
837 | - int byteswap_code; | |
838 | - int target1_is_rel; | |
839 | - char * target2_type; | |
840 | - int fix_v4bx; | |
841 | - int use_blx; | |
842 | - bfd_arm_vfp11_fix vfp11_denorm_fix; | |
843 | - bfd_arm_stm32l4xx_fix stm32l4xx_fix; | |
844 | - int no_enum_size_warning; | |
845 | - int no_wchar_size_warning; | |
846 | - int pic_veneer; | |
847 | - int fix_cortex_a8; | |
848 | - int fix_arm1176; | |
849 | - int merge_exidx_entries; | |
850 | - int cmse_implib; | |
851 | - bfd *in_implib_bfd; | |
852 | -}; | |
853 | - | |
854 | -void bfd_elf32_arm_set_target_params | |
855 | - (bfd *, struct bfd_link_info *, struct elf32_arm_params *); | |
856 | - | |
857 | -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking | |
858 | - (bfd *, struct bfd_link_info *); | |
859 | - | |
860 | -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd | |
861 | - (bfd *, struct bfd_link_info *); | |
862 | - | |
863 | -extern void bfd_elf32_arm_keep_private_stub_output_sections | |
864 | - (struct bfd_link_info *); | |
865 | - | |
866 | -/* ELF ARM mapping symbol support. */ | |
867 | -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) | |
868 | -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) | |
869 | -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) | |
870 | -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) | |
871 | - | |
872 | -extern bfd_boolean bfd_is_arm_special_symbol_name | |
873 | - (const char *, int); | |
874 | - | |
875 | -extern void bfd_elf32_arm_set_byteswap_code | |
876 | - (struct bfd_link_info *, int); | |
877 | - | |
878 | -extern void bfd_elf32_arm_use_long_plt (void); | |
879 | - | |
880 | -/* ARM Note section processing. */ | |
881 | -extern bfd_boolean bfd_arm_merge_machines | |
882 | - (bfd *, bfd *); | |
883 | - | |
884 | -extern bfd_boolean bfd_arm_update_notes | |
885 | - (bfd *, const char *); | |
886 | - | |
887 | -extern unsigned int bfd_arm_get_mach_from_notes | |
888 | - (bfd *, const char *); | |
889 | - | |
890 | -/* ARM stub generation support. Called from the linker. */ | |
891 | -extern int elf32_arm_setup_section_lists | |
892 | - (bfd *, struct bfd_link_info *); | |
893 | -extern void elf32_arm_next_input_section | |
894 | - (struct bfd_link_info *, struct bfd_section *); | |
895 | -extern bfd_boolean elf32_arm_size_stubs | |
896 | - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, | |
897 | - struct bfd_section * (*) (const char *, struct bfd_section *, | |
898 | - struct bfd_section *, unsigned int), | |
899 | - void (*) (void)); | |
900 | -extern bfd_boolean elf32_arm_build_stubs | |
901 | - (struct bfd_link_info *); | |
902 | - | |
903 | -/* ARM unwind section editing support. */ | |
904 | -extern bfd_boolean elf32_arm_fix_exidx_coverage | |
905 | -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); |
@@ -770,146 +770,6 @@ union internal_auxent; | ||
770 | 770 | |
771 | 771 | extern bfd_boolean bfd_coff_set_symbol_class |
772 | 772 | (bfd *, struct bfd_symbol *, unsigned int); |
773 | - | |
774 | -/* ARM VFP11 erratum workaround support. */ | |
775 | -typedef enum | |
776 | -{ | |
777 | - BFD_ARM_VFP11_FIX_DEFAULT, | |
778 | - BFD_ARM_VFP11_FIX_NONE, | |
779 | - BFD_ARM_VFP11_FIX_SCALAR, | |
780 | - BFD_ARM_VFP11_FIX_VECTOR | |
781 | -} bfd_arm_vfp11_fix; | |
782 | - | |
783 | -extern void bfd_elf32_arm_init_maps | |
784 | - (bfd *); | |
785 | - | |
786 | -extern void bfd_elf32_arm_set_vfp11_fix | |
787 | - (bfd *, struct bfd_link_info *); | |
788 | - | |
789 | -extern void bfd_elf32_arm_set_cortex_a8_fix | |
790 | - (bfd *, struct bfd_link_info *); | |
791 | - | |
792 | -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan | |
793 | - (bfd *, struct bfd_link_info *); | |
794 | - | |
795 | -extern void bfd_elf32_arm_vfp11_fix_veneer_locations | |
796 | - (bfd *, struct bfd_link_info *); | |
797 | - | |
798 | -/* ARM STM STM32L4XX erratum workaround support. */ | |
799 | -typedef enum | |
800 | -{ | |
801 | - BFD_ARM_STM32L4XX_FIX_NONE, | |
802 | - BFD_ARM_STM32L4XX_FIX_DEFAULT, | |
803 | - BFD_ARM_STM32L4XX_FIX_ALL | |
804 | -} bfd_arm_stm32l4xx_fix; | |
805 | - | |
806 | -extern void bfd_elf32_arm_set_stm32l4xx_fix | |
807 | - (bfd *, struct bfd_link_info *); | |
808 | - | |
809 | -extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan | |
810 | - (bfd *, struct bfd_link_info *); | |
811 | - | |
812 | -extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations | |
813 | - (bfd *, struct bfd_link_info *); | |
814 | - | |
815 | -/* ARM Interworking support. Called from linker. */ | |
816 | -extern bfd_boolean bfd_arm_allocate_interworking_sections | |
817 | - (struct bfd_link_info *); | |
818 | - | |
819 | -extern bfd_boolean bfd_arm_process_before_allocation | |
820 | - (bfd *, struct bfd_link_info *, int); | |
821 | - | |
822 | -extern bfd_boolean bfd_arm_get_bfd_for_interworking | |
823 | - (bfd *, struct bfd_link_info *); | |
824 | - | |
825 | -/* PE ARM Interworking support. Called from linker. */ | |
826 | -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections | |
827 | - (struct bfd_link_info *); | |
828 | - | |
829 | -extern bfd_boolean bfd_arm_pe_process_before_allocation | |
830 | - (bfd *, struct bfd_link_info *, int); | |
831 | - | |
832 | -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking | |
833 | - (bfd *, struct bfd_link_info *); | |
834 | - | |
835 | -/* ELF ARM Interworking support. Called from linker. */ | |
836 | -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections | |
837 | - (struct bfd_link_info *); | |
838 | - | |
839 | -extern bfd_boolean bfd_elf32_arm_process_before_allocation | |
840 | - (bfd *, struct bfd_link_info *); | |
841 | - | |
842 | -struct elf32_arm_params { | |
843 | - char *thumb_entry_symbol; | |
844 | - int byteswap_code; | |
845 | - int target1_is_rel; | |
846 | - char * target2_type; | |
847 | - int fix_v4bx; | |
848 | - int use_blx; | |
849 | - bfd_arm_vfp11_fix vfp11_denorm_fix; | |
850 | - bfd_arm_stm32l4xx_fix stm32l4xx_fix; | |
851 | - int no_enum_size_warning; | |
852 | - int no_wchar_size_warning; | |
853 | - int pic_veneer; | |
854 | - int fix_cortex_a8; | |
855 | - int fix_arm1176; | |
856 | - int merge_exidx_entries; | |
857 | - int cmse_implib; | |
858 | - bfd *in_implib_bfd; | |
859 | -}; | |
860 | - | |
861 | -void bfd_elf32_arm_set_target_params | |
862 | - (bfd *, struct bfd_link_info *, struct elf32_arm_params *); | |
863 | - | |
864 | -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking | |
865 | - (bfd *, struct bfd_link_info *); | |
866 | - | |
867 | -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd | |
868 | - (bfd *, struct bfd_link_info *); | |
869 | - | |
870 | -extern void bfd_elf32_arm_keep_private_stub_output_sections | |
871 | - (struct bfd_link_info *); | |
872 | - | |
873 | -/* ELF ARM mapping symbol support. */ | |
874 | -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) | |
875 | -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) | |
876 | -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) | |
877 | -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) | |
878 | - | |
879 | -extern bfd_boolean bfd_is_arm_special_symbol_name | |
880 | - (const char *, int); | |
881 | - | |
882 | -extern void bfd_elf32_arm_set_byteswap_code | |
883 | - (struct bfd_link_info *, int); | |
884 | - | |
885 | -extern void bfd_elf32_arm_use_long_plt (void); | |
886 | - | |
887 | -/* ARM Note section processing. */ | |
888 | -extern bfd_boolean bfd_arm_merge_machines | |
889 | - (bfd *, bfd *); | |
890 | - | |
891 | -extern bfd_boolean bfd_arm_update_notes | |
892 | - (bfd *, const char *); | |
893 | - | |
894 | -extern unsigned int bfd_arm_get_mach_from_notes | |
895 | - (bfd *, const char *); | |
896 | - | |
897 | -/* ARM stub generation support. Called from the linker. */ | |
898 | -extern int elf32_arm_setup_section_lists | |
899 | - (bfd *, struct bfd_link_info *); | |
900 | -extern void elf32_arm_next_input_section | |
901 | - (struct bfd_link_info *, struct bfd_section *); | |
902 | -extern bfd_boolean elf32_arm_size_stubs | |
903 | - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, | |
904 | - struct bfd_section * (*) (const char *, struct bfd_section *, | |
905 | - struct bfd_section *, unsigned int), | |
906 | - void (*) (void)); | |
907 | -extern bfd_boolean elf32_arm_build_stubs | |
908 | - (struct bfd_link_info *); | |
909 | - | |
910 | -/* ARM unwind section editing support. */ | |
911 | -extern bfd_boolean elf32_arm_fix_exidx_coverage | |
912 | -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); | |
913 | 773 | /* Extracted from init.c. */ |
914 | 774 | unsigned int bfd_init (void); |
915 | 775 |
@@ -24,6 +24,8 @@ | ||
24 | 24 | #include "libbfd.h" |
25 | 25 | #include "coff/arm.h" |
26 | 26 | #include "coff/internal.h" |
27 | +#include "cpu-arm.h" | |
28 | +#include "coff-arm.h" | |
27 | 29 | |
28 | 30 | #ifdef COFF_WITH_PE |
29 | 31 | #include "coff/pe.h" |
@@ -0,0 +1,29 @@ | ||
1 | +/* BFD back-end for ARM COFF files. | |
2 | + Copyright (C) 2019 Free Software Foundation, Inc. | |
3 | + | |
4 | + This file is part of BFD, the Binary File Descriptor library. | |
5 | + | |
6 | + This program is free software; you can redistribute it and/or modify | |
7 | + it under the terms of the GNU General Public License as published by | |
8 | + the Free Software Foundation; either version 3 of the License, or | |
9 | + (at your option) any later version. | |
10 | + | |
11 | + This program is distributed in the hope that it will be useful, | |
12 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | + GNU General Public License for more details. | |
15 | + | |
16 | + You should have received a copy of the GNU General Public License | |
17 | + along with this program; if not, write to the Free Software | |
18 | + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, | |
19 | + MA 02110-1301, USA. */ | |
20 | + | |
21 | +/* ARM Interworking support. Called from linker. */ | |
22 | +extern bfd_boolean bfd_arm_allocate_interworking_sections | |
23 | + (struct bfd_link_info *); | |
24 | + | |
25 | +extern bfd_boolean bfd_arm_process_before_allocation | |
26 | + (bfd *, struct bfd_link_info *, int); | |
27 | + | |
28 | +extern bfd_boolean bfd_arm_get_bfd_for_interworking | |
29 | + (bfd *, struct bfd_link_info *); |
@@ -23,6 +23,7 @@ | ||
23 | 23 | #include "bfd.h" |
24 | 24 | #include "libbfd.h" |
25 | 25 | #include "libiberty.h" |
26 | +#include "cpu-arm.h" | |
26 | 27 | |
27 | 28 | /* This routine is provided two arch_infos and works out which ARM |
28 | 29 | machine which would be compatible with both and returns a pointer |
@@ -0,0 +1,39 @@ | ||
1 | +/* BFD support for the ARM processor | |
2 | + Copyright (C) 2019 Free Software Foundation, Inc. | |
3 | + | |
4 | + This file is part of BFD, the Binary File Descriptor library. | |
5 | + | |
6 | + This program is free software; you can redistribute it and/or modify | |
7 | + it under the terms of the GNU General Public License as published by | |
8 | + the Free Software Foundation; either version 3 of the License, or | |
9 | + (at your option) any later version. | |
10 | + | |
11 | + This program is distributed in the hope that it will be useful, | |
12 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | + GNU General Public License for more details. | |
15 | + | |
16 | + You should have received a copy of the GNU General Public License | |
17 | + along with this program; if not, write to the Free Software | |
18 | + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, | |
19 | + MA 02110-1301, USA. */ | |
20 | + | |
21 | +/* ARM Note section processing. */ | |
22 | +extern bfd_boolean bfd_arm_merge_machines | |
23 | + (bfd *, bfd *); | |
24 | + | |
25 | +extern bfd_boolean bfd_arm_update_notes | |
26 | + (bfd *, const char *); | |
27 | + | |
28 | +extern unsigned int bfd_arm_get_mach_from_notes | |
29 | + (bfd *, const char *); | |
30 | + | |
31 | +/* ELF ARM mapping symbol support. */ | |
32 | +#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) | |
33 | +#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) | |
34 | +#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) | |
35 | +#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) | |
36 | + | |
37 | +extern bfd_boolean bfd_is_arm_special_symbol_name | |
38 | + (const char *, int); | |
39 | + |
@@ -28,6 +28,8 @@ | ||
28 | 28 | #include "elf-nacl.h" |
29 | 29 | #include "elf-vxworks.h" |
30 | 30 | #include "elf/arm.h" |
31 | +#include "elf32-arm.h" | |
32 | +#include "cpu-arm.h" | |
31 | 33 | |
32 | 34 | /* Return the relocation section associated with NAME. HTAB is the |
33 | 35 | bfd's elf32_arm_link_hash_entry. */ |
@@ -0,0 +1,121 @@ | ||
1 | +/* 32-bit ELF support for ARM | |
2 | + Copyright (C) 2019 Free Software Foundation, Inc. | |
3 | + | |
4 | + This file is part of BFD, the Binary File Descriptor library. | |
5 | + | |
6 | + This program is free software; you can redistribute it and/or modify | |
7 | + it under the terms of the GNU General Public License as published by | |
8 | + the Free Software Foundation; either version 3 of the License, or | |
9 | + (at your option) any later version. | |
10 | + | |
11 | + This program is distributed in the hope that it will be useful, | |
12 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | + GNU General Public License for more details. | |
15 | + | |
16 | + You should have received a copy of the GNU General Public License | |
17 | + along with this program; if not, write to the Free Software | |
18 | + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, | |
19 | + MA 02110-1301, USA. */ | |
20 | + | |
21 | + | |
22 | +/* ARM VFP11 erratum workaround support. */ | |
23 | +typedef enum | |
24 | +{ | |
25 | + BFD_ARM_VFP11_FIX_DEFAULT, | |
26 | + BFD_ARM_VFP11_FIX_NONE, | |
27 | + BFD_ARM_VFP11_FIX_SCALAR, | |
28 | + BFD_ARM_VFP11_FIX_VECTOR | |
29 | +} bfd_arm_vfp11_fix; | |
30 | + | |
31 | +extern void bfd_elf32_arm_init_maps | |
32 | + (bfd *); | |
33 | + | |
34 | +extern void bfd_elf32_arm_set_vfp11_fix | |
35 | + (bfd *, struct bfd_link_info *); | |
36 | + | |
37 | +extern void bfd_elf32_arm_set_cortex_a8_fix | |
38 | + (bfd *, struct bfd_link_info *); | |
39 | + | |
40 | +extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan | |
41 | + (bfd *, struct bfd_link_info *); | |
42 | + | |
43 | +extern void bfd_elf32_arm_vfp11_fix_veneer_locations | |
44 | + (bfd *, struct bfd_link_info *); | |
45 | + | |
46 | +/* ARM STM STM32L4XX erratum workaround support. */ | |
47 | +typedef enum | |
48 | +{ | |
49 | + BFD_ARM_STM32L4XX_FIX_NONE, | |
50 | + BFD_ARM_STM32L4XX_FIX_DEFAULT, | |
51 | + BFD_ARM_STM32L4XX_FIX_ALL | |
52 | +} bfd_arm_stm32l4xx_fix; | |
53 | + | |
54 | +extern void bfd_elf32_arm_set_stm32l4xx_fix | |
55 | + (bfd *, struct bfd_link_info *); | |
56 | + | |
57 | +extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan | |
58 | + (bfd *, struct bfd_link_info *); | |
59 | + | |
60 | +extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations | |
61 | + (bfd *, struct bfd_link_info *); | |
62 | + | |
63 | +/* ELF ARM Interworking support. Called from linker. */ | |
64 | +extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections | |
65 | + (struct bfd_link_info *); | |
66 | + | |
67 | +extern bfd_boolean bfd_elf32_arm_process_before_allocation | |
68 | + (bfd *, struct bfd_link_info *); | |
69 | + | |
70 | +struct elf32_arm_params { | |
71 | + char *thumb_entry_symbol; | |
72 | + int byteswap_code; | |
73 | + int target1_is_rel; | |
74 | + char * target2_type; | |
75 | + int fix_v4bx; | |
76 | + int use_blx; | |
77 | + bfd_arm_vfp11_fix vfp11_denorm_fix; | |
78 | + bfd_arm_stm32l4xx_fix stm32l4xx_fix; | |
79 | + int no_enum_size_warning; | |
80 | + int no_wchar_size_warning; | |
81 | + int pic_veneer; | |
82 | + int fix_cortex_a8; | |
83 | + int fix_arm1176; | |
84 | + int merge_exidx_entries; | |
85 | + int cmse_implib; | |
86 | + bfd *in_implib_bfd; | |
87 | +}; | |
88 | + | |
89 | +void bfd_elf32_arm_set_target_params | |
90 | + (bfd *, struct bfd_link_info *, struct elf32_arm_params *); | |
91 | + | |
92 | +extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking | |
93 | + (bfd *, struct bfd_link_info *); | |
94 | + | |
95 | +extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd | |
96 | + (bfd *, struct bfd_link_info *); | |
97 | + | |
98 | +extern void bfd_elf32_arm_keep_private_stub_output_sections | |
99 | + (struct bfd_link_info *); | |
100 | + | |
101 | +extern void bfd_elf32_arm_set_byteswap_code | |
102 | + (struct bfd_link_info *, int); | |
103 | + | |
104 | +extern void bfd_elf32_arm_use_long_plt (void); | |
105 | + | |
106 | +/* ARM stub generation support. Called from the linker. */ | |
107 | +extern int elf32_arm_setup_section_lists | |
108 | + (bfd *, struct bfd_link_info *); | |
109 | +extern void elf32_arm_next_input_section | |
110 | + (struct bfd_link_info *, struct bfd_section *); | |
111 | +extern bfd_boolean elf32_arm_size_stubs | |
112 | + (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, | |
113 | + struct bfd_section * (*) (const char *, struct bfd_section *, | |
114 | + struct bfd_section *, unsigned int), | |
115 | + void (*) (void)); | |
116 | +extern bfd_boolean elf32_arm_build_stubs | |
117 | + (struct bfd_link_info *); | |
118 | + | |
119 | +/* ARM unwind section editing support. */ | |
120 | +extern bfd_boolean elf32_arm_fix_exidx_coverage | |
121 | +(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); |
@@ -18,6 +18,9 @@ | ||
18 | 18 | Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
19 | 19 | MA 02110-1301, USA. */ |
20 | 20 | |
21 | +#include "sysdep.h" | |
22 | +#include "bfd.h" | |
23 | + | |
21 | 24 | #define TARGET_UNDERSCORE 0 |
22 | 25 | #define USER_LABEL_PREFIX "" |
23 | 26 |
@@ -26,6 +29,11 @@ | ||
26 | 29 | #define TARGET_BIG_SYM arm_pe_wince_be_vec |
27 | 30 | #define TARGET_BIG_NAME "pe-arm-wince-big" |
28 | 31 | |
32 | +#define LOCAL_LABEL_PREFIX "." | |
33 | + | |
34 | +#undef bfd_pe_print_pdata | |
35 | +#define bfd_pe_print_pdata _bfd_pe_print_ce_compressed_pdata | |
36 | + | |
29 | 37 | #define bfd_arm_allocate_interworking_sections \ |
30 | 38 | bfd_arm_wince_pe_allocate_interworking_sections |
31 | 39 | #define bfd_arm_get_bfd_for_interworking \ |
@@ -33,13 +41,4 @@ | ||
33 | 41 | #define bfd_arm_process_before_allocation \ |
34 | 42 | bfd_arm_wince_pe_process_before_allocation |
35 | 43 | |
36 | -#define LOCAL_LABEL_PREFIX "." | |
37 | - | |
38 | -#include "sysdep.h" | |
39 | -#include "bfd.h" | |
40 | - | |
41 | -#undef bfd_pe_print_pdata | |
42 | -#define bfd_pe_print_pdata _bfd_pe_print_ce_compressed_pdata | |
43 | - | |
44 | 44 | #include "pe-arm.c" |
45 | - |
@@ -18,18 +18,6 @@ | ||
18 | 18 | Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
19 | 19 | MA 02110-1301, USA. */ |
20 | 20 | |
21 | - | |
22 | -/* Do this before including bfd.h, so we prototype the right functions. */ | |
23 | - | |
24 | -#ifndef bfd_arm_allocate_interworking_sections | |
25 | -#define bfd_arm_allocate_interworking_sections \ | |
26 | - bfd_armpe_allocate_interworking_sections | |
27 | -#define bfd_arm_get_bfd_for_interworking \ | |
28 | - bfd_armpe_get_bfd_for_interworking | |
29 | -#define bfd_arm_process_before_allocation \ | |
30 | - bfd_armpe_process_before_allocation | |
31 | -#endif | |
32 | - | |
33 | 21 | #include "sysdep.h" |
34 | 22 | #include "bfd.h" |
35 | 23 |
@@ -64,4 +52,13 @@ | ||
64 | 52 | { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \ |
65 | 53 | COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 } |
66 | 54 | |
55 | +#ifndef bfd_arm_allocate_interworking_sections | |
56 | +#define bfd_arm_allocate_interworking_sections \ | |
57 | + bfd_armpe_allocate_interworking_sections | |
58 | +#define bfd_arm_get_bfd_for_interworking \ | |
59 | + bfd_armpe_get_bfd_for_interworking | |
60 | +#define bfd_arm_process_before_allocation \ | |
61 | + bfd_armpe_process_before_allocation | |
62 | +#endif | |
63 | + | |
67 | 64 | #include "coff-arm.c" |
@@ -1,3 +1,7 @@ | ||
1 | +2019-09-23 Alan Modra <amodra@gmail.com> | |
2 | + | |
3 | + * config/tc-arm.c: Include cpu-arm.h. | |
4 | + | |
1 | 5 | 2019-09-21 Alan Modra <amodra@gmail.com> |
2 | 6 | |
3 | 7 | * config/tc-i386.c (md_parse_option): Fix warning on vexwig assignment. |
@@ -32,6 +32,7 @@ | ||
32 | 32 | #include "obstack.h" |
33 | 33 | #include "libiberty.h" |
34 | 34 | #include "opcode/arm.h" |
35 | +#include "cpu-arm.h" | |
35 | 36 | |
36 | 37 | #ifdef OBJ_ELF |
37 | 38 | #include "elf/arm.h" |
@@ -1,5 +1,10 @@ | ||
1 | 1 | 2019-09-23 Alan Modra <amodra@gmail.com> |
2 | 2 | |
3 | + * emultempl/armelf.em: Include elf32-arm.h. | |
4 | + * emultempl/pe.em: Move func defines later and include coff-arm.h. | |
5 | + | |
6 | +2019-09-23 Alan Modra <amodra@gmail.com> | |
7 | + | |
3 | 8 | * emultempl/aarch64elf.em: Include elfxx-aarch64.h. |
4 | 9 | |
5 | 10 | 2019-09-23 Alan Modra <amodra@gmail.com> |
@@ -27,6 +27,7 @@ fragment <<EOF | ||
27 | 27 | |
28 | 28 | #include "ldctor.h" |
29 | 29 | #include "elf/arm.h" |
30 | +#include "elf32-arm.h" | |
30 | 31 | |
31 | 32 | static struct elf32_arm_params params = |
32 | 33 | { |
@@ -37,18 +37,6 @@ fragment <<EOF | ||
37 | 37 | |
38 | 38 | #define TARGET_IS_${EMULATION_NAME} |
39 | 39 | |
40 | -/* Do this before including bfd.h, so we prototype the right functions. */ | |
41 | - | |
42 | -#if defined(TARGET_IS_armpe) \ | |
43 | - || defined(TARGET_IS_arm_wince_pe) | |
44 | -#define bfd_arm_allocate_interworking_sections \ | |
45 | - bfd_${EMULATION_NAME}_allocate_interworking_sections | |
46 | -#define bfd_arm_get_bfd_for_interworking \ | |
47 | - bfd_${EMULATION_NAME}_get_bfd_for_interworking | |
48 | -#define bfd_arm_process_before_allocation \ | |
49 | - bfd_${EMULATION_NAME}_process_before_allocation | |
50 | -#endif | |
51 | - | |
52 | 40 | #include "sysdep.h" |
53 | 41 | #include "bfd.h" |
54 | 42 | #include "bfdlink.h" |
@@ -78,6 +66,17 @@ fragment <<EOF | ||
78 | 66 | #include "../bfd/libcoff.h" |
79 | 67 | #include "../bfd/libpei.h" |
80 | 68 | |
69 | +#if defined(TARGET_IS_armpe) \ | |
70 | + || defined(TARGET_IS_arm_wince_pe) | |
71 | +#define bfd_arm_allocate_interworking_sections \ | |
72 | + bfd_${EMULATION_NAME}_allocate_interworking_sections | |
73 | +#define bfd_arm_get_bfd_for_interworking \ | |
74 | + bfd_${EMULATION_NAME}_get_bfd_for_interworking | |
75 | +#define bfd_arm_process_before_allocation \ | |
76 | + bfd_${EMULATION_NAME}_process_before_allocation | |
77 | +#include "coff-arm.h" | |
78 | +#endif | |
79 | + | |
81 | 80 | #include "deffile.h" |
82 | 81 | #include "pe-dll.h" |
83 | 82 | #include "safe-ctype.h" |