1 /* 32-bit ELF support for ARM
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
4 This file is part of BFD, the Binary File Descriptor library.
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.
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.
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. */
22 /* ARM VFP11 erratum workaround support. */
25 BFD_ARM_VFP11_FIX_DEFAULT
,
26 BFD_ARM_VFP11_FIX_NONE
,
27 BFD_ARM_VFP11_FIX_SCALAR
,
28 BFD_ARM_VFP11_FIX_VECTOR
31 extern void bfd_elf32_arm_init_maps
34 extern void bfd_elf32_arm_set_vfp11_fix
35 (bfd
*, struct bfd_link_info
*);
37 extern void bfd_elf32_arm_set_cortex_a8_fix
38 (bfd
*, struct bfd_link_info
*);
40 extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
41 (bfd
*, struct bfd_link_info
*);
43 extern void bfd_elf32_arm_vfp11_fix_veneer_locations
44 (bfd
*, struct bfd_link_info
*);
46 /* ARM STM STM32L4XX erratum workaround support. */
49 BFD_ARM_STM32L4XX_FIX_NONE
,
50 BFD_ARM_STM32L4XX_FIX_DEFAULT
,
51 BFD_ARM_STM32L4XX_FIX_ALL
52 } bfd_arm_stm32l4xx_fix
;
54 extern void bfd_elf32_arm_set_stm32l4xx_fix
55 (bfd
*, struct bfd_link_info
*);
57 extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan
58 (bfd
*, struct bfd_link_info
*);
60 extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations
61 (bfd
*, struct bfd_link_info
*);
63 /* ELF ARM Interworking support. Called from linker. */
64 extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
65 (struct bfd_link_info
*);
67 extern bfd_boolean bfd_elf32_arm_process_before_allocation
68 (bfd
*, struct bfd_link_info
*);
70 struct elf32_arm_params
{
71 char *thumb_entry_symbol
;
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
;
84 int merge_exidx_entries
;
89 void bfd_elf32_arm_set_target_params
90 (bfd
*, struct bfd_link_info
*, struct elf32_arm_params
*);
92 extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
93 (bfd
*, struct bfd_link_info
*);
95 extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
96 (bfd
*, struct bfd_link_info
*);
98 extern void bfd_elf32_arm_keep_private_stub_output_sections
99 (struct bfd_link_info
*);
101 extern void bfd_elf32_arm_set_byteswap_code
102 (struct bfd_link_info
*, int);
104 extern void bfd_elf32_arm_use_long_plt (void);
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),
116 extern bfd_boolean elf32_arm_build_stubs
117 (struct bfd_link_info
*);
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
);