Commit | Line | Data |
---|---|---|
f37164d7 | 1 | /* 32-bit ELF support for ARM |
b3adc24a | 2 | Copyright (C) 2019-2020 Free Software Foundation, Inc. |
f37164d7 AM |
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); |