Commit | Line | Data |
---|---|---|
252b5132 | 1 | /* Target definitions for NN-bit ELF |
82704155 | 2 | Copyright (C) 1993-2019 Free Software Foundation, Inc. |
252b5132 | 3 | |
5e8d7549 | 4 | This file is part of BFD, the Binary File Descriptor library. |
252b5132 | 5 | |
5e8d7549 NC |
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 | |
cd123cb7 | 8 | the Free Software Foundation; either version 3 of the License, or |
5e8d7549 | 9 | (at your option) any later version. |
252b5132 | 10 | |
5e8d7549 NC |
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. | |
252b5132 | 15 | |
5e8d7549 NC |
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 | |
cd123cb7 NC |
18 | Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
19 | MA 02110-1301, USA. */ | |
20 | ||
252b5132 RH |
21 | |
22 | /* This structure contains everything that BFD knows about a target. | |
23 | It includes things like its byte order, name, what routines to call | |
24 | to do various operations, etc. Every BFD points to a target structure | |
25 | with its "xvec" member. | |
26 | ||
27 | There are two such structures here: one for big-endian machines and | |
28 | one for little-endian machines. */ | |
29 | ||
957c6e41 | 30 | #ifndef bfd_elfNN_close_and_cleanup |
252b5132 | 31 | #define bfd_elfNN_close_and_cleanup _bfd_elf_close_and_cleanup |
957c6e41 | 32 | #endif |
b25e3d87 L |
33 | #ifndef bfd_elfNN_bfd_free_cached_info |
34 | #define bfd_elfNN_bfd_free_cached_info _bfd_free_cached_info | |
35 | #endif | |
252b5132 RH |
36 | #ifndef bfd_elfNN_get_section_contents |
37 | #define bfd_elfNN_get_section_contents _bfd_generic_get_section_contents | |
38 | #endif | |
39 | ||
e656e369 AM |
40 | #define bfd_elfNN_canonicalize_dynamic_symtab \ |
41 | _bfd_elf_canonicalize_dynamic_symtab | |
90e3cdf2 | 42 | #ifndef bfd_elfNN_get_synthetic_symtab |
4c45e5c9 JJ |
43 | #define bfd_elfNN_get_synthetic_symtab \ |
44 | _bfd_elf_get_synthetic_symtab | |
90e3cdf2 | 45 | #endif |
fee24f1c | 46 | #ifndef bfd_elfNN_canonicalize_reloc |
252b5132 | 47 | #define bfd_elfNN_canonicalize_reloc _bfd_elf_canonicalize_reloc |
fee24f1c | 48 | #endif |
23186865 JM |
49 | #ifndef bfd_elfNN_set_reloc |
50 | #define bfd_elfNN_set_reloc _bfd_generic_set_reloc | |
51 | #endif | |
252b5132 RH |
52 | #ifndef bfd_elfNN_find_nearest_line |
53 | #define bfd_elfNN_find_nearest_line _bfd_elf_find_nearest_line | |
54 | #endif | |
9c461f7d AM |
55 | #ifndef bfd_elfNN_find_line |
56 | #define bfd_elfNN_find_line _bfd_elf_find_line | |
57 | #endif | |
4ab527b0 FF |
58 | #ifndef bfd_elfNN_find_inliner_info |
59 | #define bfd_elfNN_find_inliner_info _bfd_elf_find_inliner_info | |
60 | #endif | |
252b5132 RH |
61 | #define bfd_elfNN_read_minisymbols _bfd_elf_read_minisymbols |
62 | #define bfd_elfNN_minisymbol_to_symbol _bfd_elf_minisymbol_to_symbol | |
e656e369 AM |
63 | #define bfd_elfNN_get_dynamic_symtab_upper_bound \ |
64 | _bfd_elf_get_dynamic_symtab_upper_bound | |
252b5132 RH |
65 | #define bfd_elfNN_get_lineno _bfd_elf_get_lineno |
66 | #ifndef bfd_elfNN_get_reloc_upper_bound | |
67 | #define bfd_elfNN_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound | |
68 | #endif | |
7cdc5bba | 69 | #ifndef bfd_elfNN_get_symbol_info |
252b5132 | 70 | #define bfd_elfNN_get_symbol_info _bfd_elf_get_symbol_info |
7cdc5bba | 71 | #endif |
60bb06bc L |
72 | #ifndef bfd_elfNN_get_symbol_version_string |
73 | #define bfd_elfNN_get_symbol_version_string \ | |
74 | _bfd_elf_get_symbol_version_string | |
75 | #endif | |
6cee3f79 | 76 | #define bfd_elfNN_canonicalize_symtab _bfd_elf_canonicalize_symtab |
252b5132 | 77 | #define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound |
252b5132 | 78 | #define bfd_elfNN_make_empty_symbol _bfd_elf_make_empty_symbol |
f0abc2a1 | 79 | #ifndef bfd_elfNN_new_section_hook |
252b5132 | 80 | #define bfd_elfNN_new_section_hook _bfd_elf_new_section_hook |
f0abc2a1 | 81 | #endif |
252b5132 RH |
82 | #define bfd_elfNN_set_arch_mach _bfd_elf_set_arch_mach |
83 | #ifndef bfd_elfNN_set_section_contents | |
84 | #define bfd_elfNN_set_section_contents _bfd_elf_set_section_contents | |
85 | #endif | |
86 | #define bfd_elfNN_sizeof_headers _bfd_elf_sizeof_headers | |
87 | #define bfd_elfNN_write_object_contents _bfd_elf_write_object_contents | |
88 | #define bfd_elfNN_write_corefile_contents _bfd_elf_write_corefile_contents | |
89 | ||
90 | #define bfd_elfNN_get_section_contents_in_window \ | |
91 | _bfd_generic_get_section_contents_in_window | |
92 | ||
3c3bdf30 NC |
93 | #ifndef elf_backend_can_refcount |
94 | #define elf_backend_can_refcount 0 | |
95 | #endif | |
252b5132 RH |
96 | #ifndef elf_backend_want_got_plt |
97 | #define elf_backend_want_got_plt 0 | |
98 | #endif | |
99 | #ifndef elf_backend_plt_readonly | |
100 | #define elf_backend_plt_readonly 0 | |
101 | #endif | |
102 | #ifndef elf_backend_want_plt_sym | |
103 | #define elf_backend_want_plt_sym 0 | |
104 | #endif | |
105 | #ifndef elf_backend_plt_not_loaded | |
106 | #define elf_backend_plt_not_loaded 0 | |
107 | #endif | |
108 | #ifndef elf_backend_plt_alignment | |
109 | #define elf_backend_plt_alignment 2 | |
110 | #endif | |
3018b441 RH |
111 | #ifndef elf_backend_want_dynbss |
112 | #define elf_backend_want_dynbss 1 | |
113 | #endif | |
5474d94f AM |
114 | #ifndef elf_backend_want_dynrelro |
115 | #define elf_backend_want_dynrelro 0 | |
116 | #endif | |
5e8d7549 NC |
117 | #ifndef elf_backend_want_p_paddr_set_to_zero |
118 | #define elf_backend_want_p_paddr_set_to_zero 0 | |
119 | #endif | |
a8c75b76 AM |
120 | #ifndef elf_backend_no_page_alias |
121 | #define elf_backend_no_page_alias 0 | |
122 | #endif | |
6bfdb61b AM |
123 | #ifndef elf_backend_default_execstack |
124 | #define elf_backend_default_execstack 1 | |
125 | #endif | |
53291d1f AM |
126 | #ifndef elf_backend_caches_rawsize |
127 | #define elf_backend_caches_rawsize 0 | |
128 | #endif | |
f7483970 L |
129 | #ifndef elf_backend_extern_protected_data |
130 | #define elf_backend_extern_protected_data 0 | |
131 | #endif | |
23ec1e32 MR |
132 | #ifndef elf_backend_always_renumber_dynsyms |
133 | #define elf_backend_always_renumber_dynsyms FALSE | |
134 | #endif | |
a2f63b2e MR |
135 | #ifndef elf_backend_linux_prpsinfo32_ugid16 |
136 | #define elf_backend_linux_prpsinfo32_ugid16 FALSE | |
137 | #endif | |
3c9a7b0d MR |
138 | #ifndef elf_backend_linux_prpsinfo64_ugid16 |
139 | #define elf_backend_linux_prpsinfo64_ugid16 FALSE | |
140 | #endif | |
04c3a755 NS |
141 | #ifndef elf_backend_stack_align |
142 | #define elf_backend_stack_align 16 | |
143 | #endif | |
84865015 NC |
144 | #ifndef elf_backend_strtab_flags |
145 | #define elf_backend_strtab_flags 0 | |
146 | #endif | |
252b5132 | 147 | |
d00dd7dc AM |
148 | #define bfd_elfNN_bfd_debug_info_start _bfd_void_bfd |
149 | #define bfd_elfNN_bfd_debug_info_end _bfd_void_bfd | |
150 | #define bfd_elfNN_bfd_debug_info_accumulate _bfd_void_bfd_asection | |
252b5132 RH |
151 | |
152 | #ifndef bfd_elfNN_bfd_get_relocated_section_contents | |
153 | #define bfd_elfNN_bfd_get_relocated_section_contents \ | |
e656e369 | 154 | bfd_generic_get_relocated_section_contents |
252b5132 RH |
155 | #endif |
156 | ||
157 | #ifndef bfd_elfNN_bfd_relax_section | |
158 | #define bfd_elfNN_bfd_relax_section bfd_generic_relax_section | |
159 | #endif | |
160 | ||
161 | #ifndef elf_backend_can_gc_sections | |
162 | #define elf_backend_can_gc_sections 0 | |
163 | #endif | |
51b64d56 AM |
164 | #ifndef elf_backend_can_refcount |
165 | #define elf_backend_can_refcount 0 | |
166 | #endif | |
2517a57f AM |
167 | #ifndef elf_backend_want_got_sym |
168 | #define elf_backend_want_got_sym 1 | |
169 | #endif | |
74f0fb50 AM |
170 | #ifndef elf_backend_gc_keep |
171 | #define elf_backend_gc_keep _bfd_elf_gc_keep | |
172 | #endif | |
64d03ab5 AM |
173 | #ifndef elf_backend_gc_mark_dynamic_ref |
174 | #define elf_backend_gc_mark_dynamic_ref bfd_elf_gc_mark_dynamic_ref_symbol | |
175 | #endif | |
252b5132 | 176 | #ifndef elf_backend_gc_mark_hook |
07adf181 | 177 | #define elf_backend_gc_mark_hook _bfd_elf_gc_mark_hook |
252b5132 | 178 | #endif |
6a5bb875 | 179 | #ifndef elf_backend_gc_mark_extra_sections |
7f6ab9f8 | 180 | #define elf_backend_gc_mark_extra_sections _bfd_elf_gc_mark_extra_sections |
6a5bb875 | 181 | #endif |
252b5132 | 182 | #ifndef bfd_elfNN_bfd_gc_sections |
c152c796 | 183 | #define bfd_elfNN_bfd_gc_sections bfd_elf_gc_sections |
252b5132 RH |
184 | #endif |
185 | ||
8550eb6e JJ |
186 | #ifndef bfd_elfNN_bfd_merge_sections |
187 | #define bfd_elfNN_bfd_merge_sections \ | |
188 | _bfd_elf_merge_sections | |
189 | #endif | |
190 | ||
72adc230 AM |
191 | #ifndef bfd_elfNN_bfd_is_group_section |
192 | #define bfd_elfNN_bfd_is_group_section bfd_elf_is_group_section | |
193 | #endif | |
194 | ||
cb7f4b29 AM |
195 | #ifndef bfd_elfNN_bfd_group_name |
196 | #define bfd_elfNN_bfd_group_name bfd_elf_group_name | |
197 | #endif | |
198 | ||
b15c48d1 BE |
199 | #ifndef bfd_elfNN_bfd_discard_group |
200 | #define bfd_elfNN_bfd_discard_group bfd_generic_discard_group | |
201 | #endif | |
202 | ||
082b7297 L |
203 | #ifndef bfd_elfNN_section_already_linked |
204 | #define bfd_elfNN_section_already_linked \ | |
205 | _bfd_elf_section_already_linked | |
206 | #endif | |
207 | ||
3023e3f6 RS |
208 | #ifndef bfd_elfNN_bfd_define_common_symbol |
209 | #define bfd_elfNN_bfd_define_common_symbol bfd_generic_define_common_symbol | |
210 | #endif | |
211 | ||
34a87bb0 L |
212 | #ifndef bfd_elfNN_bfd_link_hide_symbol |
213 | #define bfd_elfNN_bfd_link_hide_symbol _bfd_elf_link_hide_symbol | |
214 | #endif | |
215 | ||
ae17ab41 CM |
216 | #ifndef bfd_elfNN_bfd_lookup_section_flags |
217 | #define bfd_elfNN_bfd_lookup_section_flags bfd_elf_lookup_section_flags | |
218 | #endif | |
219 | ||
d1cf510e | 220 | #ifndef bfd_elfNN_bfd_make_debug_symbol |
d00dd7dc | 221 | #define bfd_elfNN_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol |
d1cf510e | 222 | #endif |
252b5132 RH |
223 | |
224 | #ifndef bfd_elfNN_bfd_copy_private_symbol_data | |
225 | #define bfd_elfNN_bfd_copy_private_symbol_data \ | |
226 | _bfd_elf_copy_private_symbol_data | |
227 | #endif | |
228 | ||
229 | #ifndef bfd_elfNN_bfd_copy_private_section_data | |
230 | #define bfd_elfNN_bfd_copy_private_section_data \ | |
231 | _bfd_elf_copy_private_section_data | |
232 | #endif | |
80fccad2 BW |
233 | #ifndef bfd_elfNN_bfd_copy_private_header_data |
234 | #define bfd_elfNN_bfd_copy_private_header_data \ | |
235 | _bfd_elf_copy_private_header_data | |
236 | #endif | |
252b5132 RH |
237 | #ifndef bfd_elfNN_bfd_copy_private_bfd_data |
238 | #define bfd_elfNN_bfd_copy_private_bfd_data \ | |
2d502050 | 239 | _bfd_elf_copy_private_bfd_data |
252b5132 RH |
240 | #endif |
241 | #ifndef bfd_elfNN_bfd_print_private_bfd_data | |
242 | #define bfd_elfNN_bfd_print_private_bfd_data \ | |
243 | _bfd_elf_print_private_bfd_data | |
244 | #endif | |
245 | #ifndef bfd_elfNN_bfd_merge_private_bfd_data | |
d00dd7dc | 246 | #define bfd_elfNN_bfd_merge_private_bfd_data _bfd_bool_bfd_link_true |
252b5132 RH |
247 | #endif |
248 | #ifndef bfd_elfNN_bfd_set_private_flags | |
d00dd7dc | 249 | #define bfd_elfNN_bfd_set_private_flags _bfd_bool_bfd_uint_true |
252b5132 RH |
250 | #endif |
251 | #ifndef bfd_elfNN_bfd_is_local_label_name | |
252 | #define bfd_elfNN_bfd_is_local_label_name _bfd_elf_is_local_label_name | |
253 | #endif | |
3c9458e9 | 254 | #ifndef bfd_elfNN_bfd_is_target_special_symbol |
d00dd7dc | 255 | #define bfd_elfNN_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false |
3c9458e9 | 256 | #endif |
252b5132 RH |
257 | |
258 | #ifndef bfd_elfNN_get_dynamic_reloc_upper_bound | |
259 | #define bfd_elfNN_get_dynamic_reloc_upper_bound \ | |
260 | _bfd_elf_get_dynamic_reloc_upper_bound | |
261 | #endif | |
262 | #ifndef bfd_elfNN_canonicalize_dynamic_reloc | |
263 | #define bfd_elfNN_canonicalize_dynamic_reloc \ | |
264 | _bfd_elf_canonicalize_dynamic_reloc | |
265 | #endif | |
266 | ||
8ea2e4bd | 267 | #ifdef elf_backend_relocate_section |
252b5132 RH |
268 | #ifndef bfd_elfNN_bfd_link_hash_table_create |
269 | #define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create | |
270 | #endif | |
66a36822 PC |
271 | #ifndef bfd_elfNN_bfd_copy_link_hash_symbol_type |
272 | #define bfd_elfNN_bfd_copy_link_hash_symbol_type \ | |
273 | _bfd_elf_copy_link_hash_symbol_type | |
274 | #endif | |
4ad4eba5 AM |
275 | #ifndef bfd_elfNN_bfd_link_add_symbols |
276 | #define bfd_elfNN_bfd_link_add_symbols bfd_elf_link_add_symbols | |
277 | #endif | |
7dba9362 AM |
278 | #ifndef bfd_elfNN_bfd_define_start_stop |
279 | #define bfd_elfNN_bfd_define_start_stop bfd_elf_define_start_stop | |
280 | #endif | |
c152c796 AM |
281 | #ifndef bfd_elfNN_bfd_final_link |
282 | #define bfd_elfNN_bfd_final_link bfd_elf_final_link | |
283 | #endif | |
8ea2e4bd NC |
284 | #else /* ! defined (elf_backend_relocate_section) */ |
285 | /* If no backend relocate_section routine, use the generic linker. | |
286 | Note - this will prevent the port from being able to use some of | |
287 | the other features of the ELF linker, because the generic hash structure | |
288 | does not have the fields needed by the ELF linker. In particular it | |
289 | means that linking directly to S-records will not work. */ | |
290 | #ifndef bfd_elfNN_bfd_link_hash_table_create | |
291 | #define bfd_elfNN_bfd_link_hash_table_create \ | |
292 | _bfd_generic_link_hash_table_create | |
293 | #endif | |
66a36822 PC |
294 | #ifndef bfd_elfNN_bfd_copy_link_hash_symbol_type |
295 | #define bfd_elfNN_bfd_copy_link_hash_symbol_type \ | |
296 | _bfd_generic_copy_link_hash_symbol_type | |
297 | #endif | |
252b5132 RH |
298 | #ifndef bfd_elfNN_bfd_link_add_symbols |
299 | #define bfd_elfNN_bfd_link_add_symbols _bfd_generic_link_add_symbols | |
300 | #endif | |
7dba9362 AM |
301 | #ifndef bfd_elfNN_bfd_define_start_stop |
302 | #define bfd_elfNN_bfd_define_start_stop bfd_generic_define_start_stop | |
303 | #endif | |
252b5132 RH |
304 | #ifndef bfd_elfNN_bfd_final_link |
305 | #define bfd_elfNN_bfd_final_link _bfd_generic_final_link | |
306 | #endif | |
307 | #endif /* ! defined (elf_backend_relocate_section) */ | |
2d653fc7 AM |
308 | |
309 | #ifndef bfd_elfNN_bfd_link_just_syms | |
310 | #define bfd_elfNN_bfd_link_just_syms _bfd_elf_link_just_syms | |
311 | #endif | |
312 | ||
252b5132 RH |
313 | #ifndef bfd_elfNN_bfd_link_split_section |
314 | #define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section | |
315 | #endif | |
316 | ||
4f3b23b3 NC |
317 | #ifndef bfd_elfNN_bfd_link_check_relocs |
318 | #define bfd_elfNN_bfd_link_check_relocs _bfd_elf_link_check_relocs | |
319 | #endif | |
320 | ||
252b5132 RH |
321 | #ifndef bfd_elfNN_archive_p |
322 | #define bfd_elfNN_archive_p bfd_generic_archive_p | |
323 | #endif | |
324 | ||
325 | #ifndef bfd_elfNN_write_archive_contents | |
326 | #define bfd_elfNN_write_archive_contents _bfd_write_archive_contents | |
327 | #endif | |
328 | ||
329 | #ifndef bfd_elfNN_mkobject | |
ae95ffa6 | 330 | #define bfd_elfNN_mkobject bfd_elf_make_object |
252b5132 RH |
331 | #endif |
332 | ||
333 | #ifndef bfd_elfNN_mkcorefile | |
334 | #define bfd_elfNN_mkcorefile bfd_elf_mkcorefile | |
335 | #endif | |
336 | ||
337 | #ifndef bfd_elfNN_mkarchive | |
338 | #define bfd_elfNN_mkarchive _bfd_generic_mkarchive | |
339 | #endif | |
340 | ||
c152c796 AM |
341 | #ifndef bfd_elfNN_print_symbol |
342 | #define bfd_elfNN_print_symbol bfd_elf_print_symbol | |
343 | #endif | |
344 | ||
252b5132 RH |
345 | #ifndef elf_symbol_leading_char |
346 | #define elf_symbol_leading_char 0 | |
347 | #endif | |
348 | ||
349 | #ifndef elf_info_to_howto | |
f3185997 | 350 | #define elf_info_to_howto NULL |
252b5132 RH |
351 | #endif |
352 | ||
353 | #ifndef elf_info_to_howto_rel | |
f3185997 | 354 | #define elf_info_to_howto_rel NULL |
252b5132 RH |
355 | #endif |
356 | ||
23209a78 RM |
357 | #ifndef elf_backend_arch_data |
358 | #define elf_backend_arch_data NULL | |
359 | #endif | |
360 | ||
ae95ffa6 L |
361 | #ifndef ELF_TARGET_ID |
362 | #define ELF_TARGET_ID GENERIC_ELF_DATA | |
363 | #endif | |
364 | ||
d1036acb L |
365 | #ifndef ELF_OSABI |
366 | #define ELF_OSABI ELFOSABI_NONE | |
367 | #endif | |
368 | ||
252b5132 | 369 | #ifndef ELF_MAXPAGESIZE |
19ec0de7 | 370 | # error ELF_MAXPAGESIZE is not defined |
79e5982f | 371 | #define ELF_MAXPAGESIZE 1 |
252b5132 RH |
372 | #endif |
373 | ||
19ec0de7 JK |
374 | #ifndef ELF_COMMONPAGESIZE |
375 | #define ELF_COMMONPAGESIZE ELF_MAXPAGESIZE | |
376 | #endif | |
377 | ||
702d1671 AM |
378 | #ifndef ELF_RELROPAGESIZE |
379 | #define ELF_RELROPAGESIZE ELF_COMMONPAGESIZE | |
380 | #endif | |
381 | ||
b1342370 | 382 | #ifndef ELF_MINPAGESIZE |
19ec0de7 | 383 | #define ELF_MINPAGESIZE ELF_COMMONPAGESIZE |
b1342370 DJ |
384 | #endif |
385 | ||
19ec0de7 JK |
386 | #if ELF_COMMONPAGESIZE > ELF_MAXPAGESIZE |
387 | # error ELF_COMMONPAGESIZE > ELF_MAXPAGESIZE | |
388 | #endif | |
702d1671 AM |
389 | #if ELF_RELROPAGESIZE > ELF_MAXPAGESIZE |
390 | # error ELF_RELROPAGESIZE > ELF_MAXPAGESIZE | |
391 | #endif | |
19ec0de7 JK |
392 | #if ELF_MINPAGESIZE > ELF_COMMONPAGESIZE |
393 | # error ELF_MINPAGESIZE > ELF_COMMONPAGESIZE | |
24718e3b | 394 | #endif |
702d1671 AM |
395 | #if ELF_MINPAGESIZE > ELF_RELROPAGESIZE |
396 | # error ELF_MINPAGESIZE > ELF_RELROPAGESIZE | |
397 | #endif | |
24718e3b | 398 | |
e5a52504 MM |
399 | #ifndef ELF_DYNAMIC_SEC_FLAGS |
400 | /* Note that we set the SEC_IN_MEMORY flag for these sections. */ | |
401 | #define ELF_DYNAMIC_SEC_FLAGS \ | |
402 | (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS \ | |
403 | | SEC_IN_MEMORY | SEC_LINKER_CREATED) | |
404 | #endif | |
405 | ||
252b5132 | 406 | #ifndef elf_backend_collect |
b34976b6 | 407 | #define elf_backend_collect FALSE |
252b5132 RH |
408 | #endif |
409 | #ifndef elf_backend_type_change_ok | |
b34976b6 | 410 | #define elf_backend_type_change_ok FALSE |
252b5132 RH |
411 | #endif |
412 | ||
413 | #ifndef elf_backend_sym_is_global | |
414 | #define elf_backend_sym_is_global 0 | |
415 | #endif | |
416 | #ifndef elf_backend_object_p | |
417 | #define elf_backend_object_p 0 | |
418 | #endif | |
419 | #ifndef elf_backend_symbol_processing | |
420 | #define elf_backend_symbol_processing 0 | |
421 | #endif | |
422 | #ifndef elf_backend_symbol_table_processing | |
423 | #define elf_backend_symbol_table_processing 0 | |
424 | #endif | |
425 | #ifndef elf_backend_get_symbol_type | |
426 | #define elf_backend_get_symbol_type 0 | |
427 | #endif | |
8387904d AM |
428 | #ifndef elf_backend_archive_symbol_lookup |
429 | #define elf_backend_archive_symbol_lookup _bfd_elf_archive_symbol_lookup | |
430 | #endif | |
174fd7f9 RS |
431 | #ifndef elf_backend_name_local_section_symbols |
432 | #define elf_backend_name_local_section_symbols 0 | |
433 | #endif | |
252b5132 RH |
434 | #ifndef elf_backend_section_processing |
435 | #define elf_backend_section_processing 0 | |
436 | #endif | |
437 | #ifndef elf_backend_section_from_shdr | |
8c1acd09 | 438 | #define elf_backend_section_from_shdr _bfd_elf_make_section_from_shdr |
252b5132 | 439 | #endif |
fa152c49 JW |
440 | #ifndef elf_backend_section_flags |
441 | #define elf_backend_section_flags 0 | |
442 | #endif | |
551b43fd AM |
443 | #ifndef elf_backend_get_sec_type_attr |
444 | #define elf_backend_get_sec_type_attr _bfd_elf_get_sec_type_attr | |
445 | #endif | |
20cfcaae | 446 | #ifndef elf_backend_section_from_phdr |
8c1acd09 | 447 | #define elf_backend_section_from_phdr _bfd_elf_make_section_from_phdr |
20cfcaae | 448 | #endif |
252b5132 RH |
449 | #ifndef elf_backend_fake_sections |
450 | #define elf_backend_fake_sections 0 | |
451 | #endif | |
452 | #ifndef elf_backend_section_from_bfd_section | |
453 | #define elf_backend_section_from_bfd_section 0 | |
454 | #endif | |
455 | #ifndef elf_backend_add_symbol_hook | |
456 | #define elf_backend_add_symbol_hook 0 | |
457 | #endif | |
458 | #ifndef elf_backend_link_output_symbol_hook | |
459 | #define elf_backend_link_output_symbol_hook 0 | |
460 | #endif | |
461 | #ifndef elf_backend_create_dynamic_sections | |
462 | #define elf_backend_create_dynamic_sections 0 | |
463 | #endif | |
aee6f5b4 | 464 | #ifndef elf_backend_omit_section_dynsym |
d00dd7dc | 465 | #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_default |
aee6f5b4 | 466 | #endif |
13285a1b AM |
467 | #ifndef elf_backend_relocs_compatible |
468 | #define elf_backend_relocs_compatible _bfd_elf_default_relocs_compatible | |
469 | #endif | |
252b5132 RH |
470 | #ifndef elf_backend_check_relocs |
471 | #define elf_backend_check_relocs 0 | |
472 | #endif | |
85fbca6a NC |
473 | #ifndef elf_backend_check_directives |
474 | #define elf_backend_check_directives 0 | |
475 | #endif | |
e5034e59 AM |
476 | #ifndef elf_backend_notice_as_needed |
477 | #define elf_backend_notice_as_needed _bfd_elf_notice_as_needed | |
97fed1c9 | 478 | #endif |
252b5132 RH |
479 | #ifndef elf_backend_adjust_dynamic_symbol |
480 | #define elf_backend_adjust_dynamic_symbol 0 | |
481 | #endif | |
482 | #ifndef elf_backend_always_size_sections | |
483 | #define elf_backend_always_size_sections 0 | |
484 | #endif | |
485 | #ifndef elf_backend_size_dynamic_sections | |
486 | #define elf_backend_size_dynamic_sections 0 | |
487 | #endif | |
74541ad4 | 488 | #ifndef elf_backend_init_index_section |
d00dd7dc | 489 | #define elf_backend_init_index_section _bfd_void_bfd_link |
74541ad4 | 490 | #endif |
252b5132 RH |
491 | #ifndef elf_backend_relocate_section |
492 | #define elf_backend_relocate_section 0 | |
493 | #endif | |
494 | #ifndef elf_backend_finish_dynamic_symbol | |
495 | #define elf_backend_finish_dynamic_symbol 0 | |
496 | #endif | |
497 | #ifndef elf_backend_finish_dynamic_sections | |
498 | #define elf_backend_finish_dynamic_sections 0 | |
499 | #endif | |
500 | #ifndef elf_backend_begin_write_processing | |
501 | #define elf_backend_begin_write_processing 0 | |
502 | #endif | |
503 | #ifndef elf_backend_final_write_processing | |
06f44071 | 504 | #define elf_backend_final_write_processing _bfd_elf_final_write_processing |
252b5132 RH |
505 | #endif |
506 | #ifndef elf_backend_additional_program_headers | |
507 | #define elf_backend_additional_program_headers 0 | |
508 | #endif | |
509 | #ifndef elf_backend_modify_segment_map | |
510 | #define elf_backend_modify_segment_map 0 | |
511 | #endif | |
6d6c25c8 AM |
512 | #ifndef elf_backend_modify_headers |
513 | #define elf_backend_modify_headers _bfd_elf_modify_headers | |
e36284ab | 514 | #endif |
1a9ccd70 | 515 | #ifndef elf_backend_allow_non_load_phdr |
d00dd7dc | 516 | #define elf_backend_allow_non_load_phdr 0 |
1a9ccd70 | 517 | #endif |
252b5132 RH |
518 | #ifndef elf_backend_ecoff_debug_swap |
519 | #define elf_backend_ecoff_debug_swap 0 | |
520 | #endif | |
8d6337fe RM |
521 | #ifndef elf_backend_bfd_from_remote_memory |
522 | #define elf_backend_bfd_from_remote_memory _bfd_elfNN_bfd_from_remote_memory | |
523 | #endif | |
864619bb KS |
524 | #ifndef elf_backend_core_find_build_id |
525 | #define elf_backend_core_find_build_id _bfd_elfNN_core_find_build_id | |
526 | #endif | |
252b5132 RH |
527 | #ifndef elf_backend_got_header_size |
528 | #define elf_backend_got_header_size 0 | |
529 | #endif | |
10455f89 HPN |
530 | #ifndef elf_backend_got_elt_size |
531 | #define elf_backend_got_elt_size _bfd_elf_default_got_elt_size | |
532 | #endif | |
104d59d1 JM |
533 | #ifndef elf_backend_obj_attrs_vendor |
534 | #define elf_backend_obj_attrs_vendor NULL | |
535 | #endif | |
536 | #ifndef elf_backend_obj_attrs_section | |
537 | #define elf_backend_obj_attrs_section NULL | |
538 | #endif | |
539 | #ifndef elf_backend_obj_attrs_arg_type | |
540 | #define elf_backend_obj_attrs_arg_type NULL | |
541 | #endif | |
542 | #ifndef elf_backend_obj_attrs_section_type | |
543 | #define elf_backend_obj_attrs_section_type SHT_GNU_ATTRIBUTES | |
544 | #endif | |
5aa6ff7c AS |
545 | #ifndef elf_backend_obj_attrs_order |
546 | #define elf_backend_obj_attrs_order NULL | |
547 | #endif | |
e8b36cd1 JM |
548 | #ifndef elf_backend_obj_attrs_handle_unknown |
549 | #define elf_backend_obj_attrs_handle_unknown NULL | |
550 | #endif | |
46bed679 L |
551 | #ifndef elf_backend_parse_gnu_properties |
552 | #define elf_backend_parse_gnu_properties NULL | |
553 | #endif | |
554 | #ifndef elf_backend_merge_gnu_properties | |
555 | #define elf_backend_merge_gnu_properties NULL | |
556 | #endif | |
557 | #ifndef elf_backend_setup_gnu_properties | |
558 | #define elf_backend_setup_gnu_properties _bfd_elf_link_setup_gnu_properties | |
559 | #endif | |
bfb1e8c1 L |
560 | #ifndef elf_backend_fixup_gnu_properties |
561 | #define elf_backend_fixup_gnu_properties NULL | |
562 | #endif | |
7dc98aea RO |
563 | #ifndef elf_backend_static_tls_alignment |
564 | #define elf_backend_static_tls_alignment 1 | |
565 | #endif | |
ed7e9d0b AM |
566 | #ifndef elf_backend_init_file_header |
567 | #define elf_backend_init_file_header _bfd_elf_init_file_header | |
e6c51ed4 | 568 | #endif |
587ff49e RH |
569 | #ifndef elf_backend_print_symbol_all |
570 | #define elf_backend_print_symbol_all NULL | |
571 | #endif | |
4e617b1e PB |
572 | #ifndef elf_backend_output_arch_local_syms |
573 | #define elf_backend_output_arch_local_syms NULL | |
574 | #endif | |
587ff49e RH |
575 | #ifndef elf_backend_output_arch_syms |
576 | #define elf_backend_output_arch_syms NULL | |
577 | #endif | |
76359541 TP |
578 | #ifndef elf_backend_filter_implib_symbols |
579 | #define elf_backend_filter_implib_symbols NULL | |
580 | #endif | |
c61b8717 | 581 | #ifndef elf_backend_copy_indirect_symbol |
76359541 | 582 | #define elf_backend_copy_indirect_symbol _bfd_elf_link_hash_copy_indirect |
c61b8717 RH |
583 | #endif |
584 | #ifndef elf_backend_hide_symbol | |
76359541 | 585 | #define elf_backend_hide_symbol _bfd_elf_link_hash_hide_symbol |
c61b8717 | 586 | #endif |
508c3946 | 587 | #ifndef elf_backend_fixup_symbol |
23209a78 | 588 | #define elf_backend_fixup_symbol NULL |
508c3946 | 589 | #endif |
9bf7216d KK |
590 | #ifndef elf_backend_merge_symbol_attribute |
591 | #define elf_backend_merge_symbol_attribute NULL | |
592 | #endif | |
ad9563d6 CM |
593 | #ifndef elf_backend_get_target_dtag |
594 | #define elf_backend_get_target_dtag NULL | |
595 | #endif | |
12ac1cf5 NC |
596 | #ifndef elf_backend_ignore_undef_symbol |
597 | #define elf_backend_ignore_undef_symbol NULL | |
598 | #endif | |
9317eacc | 599 | #ifndef elf_backend_emit_relocs |
eac338cf | 600 | #define elf_backend_emit_relocs _bfd_elf_link_output_relocs |
9317eacc | 601 | #endif |
9eaff861 AO |
602 | #ifndef elf_backend_update_relocs |
603 | #define elf_backend_update_relocs NULL | |
604 | #endif | |
9317eacc CM |
605 | #ifndef elf_backend_count_relocs |
606 | #define elf_backend_count_relocs NULL | |
607 | #endif | |
491d01d3 YU |
608 | #ifndef elf_backend_count_additional_relocs |
609 | #define elf_backend_count_additional_relocs NULL | |
610 | #endif | |
28dbcedc AM |
611 | #ifndef elf_backend_sort_relocs_p |
612 | #define elf_backend_sort_relocs_p NULL | |
613 | #endif | |
bb0082d6 AM |
614 | #ifndef elf_backend_grok_prstatus |
615 | #define elf_backend_grok_prstatus NULL | |
616 | #endif | |
617 | #ifndef elf_backend_grok_psinfo | |
618 | #define elf_backend_grok_psinfo NULL | |
619 | #endif | |
544c67cd JB |
620 | #ifndef elf_backend_grok_freebsd_prstatus |
621 | #define elf_backend_grok_freebsd_prstatus NULL | |
622 | #endif | |
183e98be AM |
623 | #ifndef elf_backend_write_core_note |
624 | #define elf_backend_write_core_note NULL | |
625 | #endif | |
ae17ab41 CM |
626 | #ifndef elf_backend_lookup_section_flags_hook |
627 | #define elf_backend_lookup_section_flags_hook NULL | |
628 | #endif | |
db6751f2 JJ |
629 | #ifndef elf_backend_reloc_type_class |
630 | #define elf_backend_reloc_type_class _bfd_elf_reloc_type_class | |
631 | #endif | |
73d074b4 DJ |
632 | #ifndef elf_backend_discard_info |
633 | #define elf_backend_discard_info NULL | |
634 | #endif | |
635 | #ifndef elf_backend_ignore_discarded_relocs | |
636 | #define elf_backend_ignore_discarded_relocs NULL | |
637 | #endif | |
8a696751 AM |
638 | #ifndef elf_backend_action_discarded |
639 | #define elf_backend_action_discarded _bfd_elf_default_action_discarded | |
640 | #endif | |
8c946ed5 RS |
641 | #ifndef elf_backend_eh_frame_address_size |
642 | #define elf_backend_eh_frame_address_size _bfd_elf_eh_frame_address_size | |
643 | #endif | |
ec3391e7 AO |
644 | #ifndef elf_backend_can_make_relative_eh_frame |
645 | #define elf_backend_can_make_relative_eh_frame _bfd_elf_can_make_relative | |
646 | #endif | |
647 | #ifndef elf_backend_can_make_lsda_relative_eh_frame | |
648 | #define elf_backend_can_make_lsda_relative_eh_frame _bfd_elf_can_make_relative | |
649 | #endif | |
650 | #ifndef elf_backend_encode_eh_address | |
651 | #define elf_backend_encode_eh_address _bfd_elf_encode_eh_address | |
652 | #endif | |
73d074b4 DJ |
653 | #ifndef elf_backend_write_section |
654 | #define elf_backend_write_section NULL | |
655 | #endif | |
c6e90b02 TS |
656 | #ifndef elf_backend_mips_irix_compat |
657 | #define elf_backend_mips_irix_compat NULL | |
658 | #endif | |
659 | #ifndef elf_backend_mips_rtype_to_howto | |
660 | #define elf_backend_mips_rtype_to_howto NULL | |
661 | #endif | |
c61b8717 | 662 | |
bf572ba0 MM |
663 | /* Previously, backends could only use SHT_REL or SHT_RELA relocation |
664 | sections, but not both. They defined USE_REL to indicate SHT_REL | |
665 | sections, and left it undefined to indicated SHT_RELA sections. | |
666 | For backwards compatibility, we still support this usage. */ | |
667 | #ifndef USE_REL | |
668 | #define USE_REL 0 | |
3e932841 | 669 | #endif |
bf572ba0 MM |
670 | |
671 | /* Use these in new code. */ | |
3e932841 | 672 | #ifndef elf_backend_may_use_rel_p |
bf572ba0 | 673 | #define elf_backend_may_use_rel_p USE_REL |
3e932841 | 674 | #endif |
bf572ba0 MM |
675 | #ifndef elf_backend_may_use_rela_p |
676 | #define elf_backend_may_use_rela_p !USE_REL | |
677 | #endif | |
3e932841 | 678 | #ifndef elf_backend_default_use_rela_p |
bf572ba0 MM |
679 | #define elf_backend_default_use_rela_p !USE_REL |
680 | #endif | |
d35fd659 RS |
681 | #ifndef elf_backend_rela_plts_and_copies_p |
682 | #define elf_backend_rela_plts_and_copies_p elf_backend_default_use_rela_p | |
683 | #endif | |
bf572ba0 | 684 | |
b491616a AM |
685 | #ifndef elf_backend_rela_normal |
686 | #define elf_backend_rela_normal 0 | |
687 | #endif | |
688 | ||
64f52338 AM |
689 | #ifndef elf_backend_dtrel_excludes_plt |
690 | #define elf_backend_dtrel_excludes_plt 0 | |
691 | #endif | |
692 | ||
4c45e5c9 JJ |
693 | #ifndef elf_backend_plt_sym_val |
694 | #define elf_backend_plt_sym_val NULL | |
695 | #endif | |
696 | #ifndef elf_backend_relplt_name | |
697 | #define elf_backend_relplt_name NULL | |
698 | #endif | |
699 | ||
252b5132 RH |
700 | #ifndef ELF_MACHINE_ALT1 |
701 | #define ELF_MACHINE_ALT1 0 | |
702 | #endif | |
703 | ||
704 | #ifndef ELF_MACHINE_ALT2 | |
705 | #define ELF_MACHINE_ALT2 0 | |
706 | #endif | |
707 | ||
708 | #ifndef elf_backend_size_info | |
709 | #define elf_backend_size_info _bfd_elfNN_size_info | |
710 | #endif | |
711 | ||
29ef7005 L |
712 | #ifndef elf_backend_special_sections |
713 | #define elf_backend_special_sections NULL | |
714 | #endif | |
715 | ||
86dc0f79 RH |
716 | #ifndef elf_backend_sign_extend_vma |
717 | #define elf_backend_sign_extend_vma 0 | |
718 | #endif | |
719 | ||
185d09ad | 720 | #ifndef elf_backend_link_order_error_handler |
52d45da3 | 721 | #define elf_backend_link_order_error_handler _bfd_error_handler |
185d09ad L |
722 | #endif |
723 | ||
a4d8e49b L |
724 | #ifndef elf_backend_common_definition |
725 | #define elf_backend_common_definition _bfd_elf_common_definition | |
726 | #endif | |
727 | ||
728 | #ifndef elf_backend_common_section_index | |
729 | #define elf_backend_common_section_index _bfd_elf_common_section_index | |
730 | #endif | |
731 | ||
732 | #ifndef elf_backend_common_section | |
733 | #define elf_backend_common_section _bfd_elf_common_section | |
734 | #endif | |
735 | ||
736 | #ifndef elf_backend_merge_symbol | |
737 | #define elf_backend_merge_symbol NULL | |
738 | #endif | |
739 | ||
fdc90cb4 JJ |
740 | #ifndef elf_backend_hash_symbol |
741 | #define elf_backend_hash_symbol _bfd_elf_hash_symbol | |
742 | #endif | |
743 | ||
f16a9783 MS |
744 | #ifndef elf_backend_record_xhash_symbol |
745 | #define elf_backend_record_xhash_symbol NULL | |
746 | #endif | |
747 | ||
fcb93ecf PB |
748 | #ifndef elf_backend_is_function_type |
749 | #define elf_backend_is_function_type _bfd_elf_is_function_type | |
750 | #endif | |
751 | ||
9f296da3 AM |
752 | #ifndef elf_backend_maybe_function_sym |
753 | #define elf_backend_maybe_function_sym _bfd_elf_maybe_function_sym | |
754 | #endif | |
755 | ||
bd53a53a | 756 | #ifndef elf_backend_get_reloc_section |
bce964aa | 757 | #define elf_backend_get_reloc_section _bfd_elf_plt_get_reloc_section |
bd53a53a L |
758 | #endif |
759 | ||
5522f910 NC |
760 | #ifndef elf_backend_copy_special_section_fields |
761 | #define elf_backend_copy_special_section_fields NULL | |
84865015 NC |
762 | #endif |
763 | ||
2f0c68f2 CM |
764 | #ifndef elf_backend_compact_eh_encoding |
765 | #define elf_backend_compact_eh_encoding NULL | |
766 | #endif | |
767 | ||
768 | #ifndef elf_backend_cant_unwind_opcode | |
769 | #define elf_backend_cant_unwind_opcode 0 | |
770 | #endif | |
771 | ||
0aabe54e AM |
772 | #ifndef elf_match_priority |
773 | #define elf_match_priority \ | |
774 | (ELF_ARCH == bfd_arch_unknown ? 2 : ELF_OSABI == ELFOSABI_NONE ? 1 : 0) | |
775 | #endif | |
776 | ||
252b5132 RH |
777 | extern const struct elf_size_info _bfd_elfNN_size_info; |
778 | ||
24718e3b | 779 | static struct elf_backend_data elfNN_bed = |
252b5132 | 780 | { |
252b5132 | 781 | ELF_ARCH, /* arch */ |
ae95ffa6 | 782 | ELF_TARGET_ID, /* target_id */ |
252b5132 | 783 | ELF_MACHINE_CODE, /* elf_machine_code */ |
d1036acb | 784 | ELF_OSABI, /* elf_osabi */ |
252b5132 | 785 | ELF_MAXPAGESIZE, /* maxpagesize */ |
b1342370 | 786 | ELF_MINPAGESIZE, /* minpagesize */ |
24718e3b | 787 | ELF_COMMONPAGESIZE, /* commonpagesize */ |
702d1671 | 788 | ELF_RELROPAGESIZE, /* commonpagesize to use with -z relro */ |
3b36f7e6 | 789 | ELF_DYNAMIC_SEC_FLAGS, /* dynamic_sec_flags */ |
23209a78 | 790 | elf_backend_arch_data, |
252b5132 RH |
791 | elf_info_to_howto, |
792 | elf_info_to_howto_rel, | |
793 | elf_backend_sym_is_global, | |
794 | elf_backend_object_p, | |
795 | elf_backend_symbol_processing, | |
796 | elf_backend_symbol_table_processing, | |
797 | elf_backend_get_symbol_type, | |
8387904d | 798 | elf_backend_archive_symbol_lookup, |
174fd7f9 | 799 | elf_backend_name_local_section_symbols, |
252b5132 RH |
800 | elf_backend_section_processing, |
801 | elf_backend_section_from_shdr, | |
fa152c49 | 802 | elf_backend_section_flags, |
551b43fd | 803 | elf_backend_get_sec_type_attr, |
20cfcaae | 804 | elf_backend_section_from_phdr, |
252b5132 RH |
805 | elf_backend_fake_sections, |
806 | elf_backend_section_from_bfd_section, | |
807 | elf_backend_add_symbol_hook, | |
808 | elf_backend_link_output_symbol_hook, | |
809 | elf_backend_create_dynamic_sections, | |
aee6f5b4 | 810 | elf_backend_omit_section_dynsym, |
13285a1b | 811 | elf_backend_relocs_compatible, |
252b5132 | 812 | elf_backend_check_relocs, |
85fbca6a | 813 | elf_backend_check_directives, |
e5034e59 | 814 | elf_backend_notice_as_needed, |
252b5132 RH |
815 | elf_backend_adjust_dynamic_symbol, |
816 | elf_backend_always_size_sections, | |
817 | elf_backend_size_dynamic_sections, | |
74541ad4 | 818 | elf_backend_init_index_section, |
252b5132 RH |
819 | elf_backend_relocate_section, |
820 | elf_backend_finish_dynamic_symbol, | |
821 | elf_backend_finish_dynamic_sections, | |
822 | elf_backend_begin_write_processing, | |
823 | elf_backend_final_write_processing, | |
824 | elf_backend_additional_program_headers, | |
825 | elf_backend_modify_segment_map, | |
6d6c25c8 | 826 | elf_backend_modify_headers, |
1a9ccd70 | 827 | elf_backend_allow_non_load_phdr, |
74f0fb50 | 828 | elf_backend_gc_keep, |
64d03ab5 | 829 | elf_backend_gc_mark_dynamic_ref, |
252b5132 | 830 | elf_backend_gc_mark_hook, |
6a5bb875 | 831 | elf_backend_gc_mark_extra_sections, |
ed7e9d0b | 832 | elf_backend_init_file_header, |
587ff49e | 833 | elf_backend_print_symbol_all, |
4e617b1e | 834 | elf_backend_output_arch_local_syms, |
587ff49e | 835 | elf_backend_output_arch_syms, |
76359541 | 836 | elf_backend_filter_implib_symbols, |
c61b8717 RH |
837 | elf_backend_copy_indirect_symbol, |
838 | elf_backend_hide_symbol, | |
508c3946 | 839 | elf_backend_fixup_symbol, |
9bf7216d | 840 | elf_backend_merge_symbol_attribute, |
ad9563d6 | 841 | elf_backend_get_target_dtag, |
12ac1cf5 | 842 | elf_backend_ignore_undef_symbol, |
9317eacc | 843 | elf_backend_emit_relocs, |
9eaff861 | 844 | elf_backend_update_relocs, |
9317eacc | 845 | elf_backend_count_relocs, |
491d01d3 | 846 | elf_backend_count_additional_relocs, |
28dbcedc | 847 | elf_backend_sort_relocs_p, |
bb0082d6 AM |
848 | elf_backend_grok_prstatus, |
849 | elf_backend_grok_psinfo, | |
544c67cd | 850 | elf_backend_grok_freebsd_prstatus, |
183e98be | 851 | elf_backend_write_core_note, |
ae17ab41 | 852 | elf_backend_lookup_section_flags_hook, |
db6751f2 | 853 | elf_backend_reloc_type_class, |
73d074b4 DJ |
854 | elf_backend_discard_info, |
855 | elf_backend_ignore_discarded_relocs, | |
8a696751 | 856 | elf_backend_action_discarded, |
8c946ed5 | 857 | elf_backend_eh_frame_address_size, |
ec3391e7 AO |
858 | elf_backend_can_make_relative_eh_frame, |
859 | elf_backend_can_make_lsda_relative_eh_frame, | |
860 | elf_backend_encode_eh_address, | |
73d074b4 | 861 | elf_backend_write_section, |
c6e90b02 TS |
862 | elf_backend_mips_irix_compat, |
863 | elf_backend_mips_rtype_to_howto, | |
252b5132 | 864 | elf_backend_ecoff_debug_swap, |
8d6337fe | 865 | elf_backend_bfd_from_remote_memory, |
864619bb | 866 | elf_backend_core_find_build_id, |
4c45e5c9 | 867 | elf_backend_plt_sym_val, |
a4d8e49b L |
868 | elf_backend_common_definition, |
869 | elf_backend_common_section_index, | |
870 | elf_backend_common_section, | |
871 | elf_backend_merge_symbol, | |
fdc90cb4 | 872 | elf_backend_hash_symbol, |
f16a9783 | 873 | elf_backend_record_xhash_symbol, |
fcb93ecf | 874 | elf_backend_is_function_type, |
9f296da3 | 875 | elf_backend_maybe_function_sym, |
bd53a53a | 876 | elf_backend_get_reloc_section, |
5522f910 | 877 | elf_backend_copy_special_section_fields, |
185d09ad | 878 | elf_backend_link_order_error_handler, |
4c45e5c9 | 879 | elf_backend_relplt_name, |
252b5132 RH |
880 | ELF_MACHINE_ALT1, |
881 | ELF_MACHINE_ALT2, | |
882 | &elf_backend_size_info, | |
29ef7005 | 883 | elf_backend_special_sections, |
252b5132 | 884 | elf_backend_got_header_size, |
10455f89 | 885 | elf_backend_got_elt_size, |
104d59d1 JM |
886 | elf_backend_obj_attrs_vendor, |
887 | elf_backend_obj_attrs_section, | |
888 | elf_backend_obj_attrs_arg_type, | |
889 | elf_backend_obj_attrs_section_type, | |
5aa6ff7c | 890 | elf_backend_obj_attrs_order, |
e8b36cd1 | 891 | elf_backend_obj_attrs_handle_unknown, |
46bed679 L |
892 | elf_backend_parse_gnu_properties, |
893 | elf_backend_merge_gnu_properties, | |
894 | elf_backend_setup_gnu_properties, | |
bfb1e8c1 | 895 | elf_backend_fixup_gnu_properties, |
2f0c68f2 CM |
896 | elf_backend_compact_eh_encoding, |
897 | elf_backend_cant_unwind_opcode, | |
7dc98aea | 898 | elf_backend_static_tls_alignment, |
04c3a755 | 899 | elf_backend_stack_align, |
84865015 | 900 | elf_backend_strtab_flags, |
86dc0f79 RH |
901 | elf_backend_collect, |
902 | elf_backend_type_change_ok, | |
bf572ba0 MM |
903 | elf_backend_may_use_rel_p, |
904 | elf_backend_may_use_rela_p, | |
905 | elf_backend_default_use_rela_p, | |
d35fd659 | 906 | elf_backend_rela_plts_and_copies_p, |
b491616a | 907 | elf_backend_rela_normal, |
64f52338 | 908 | elf_backend_dtrel_excludes_plt, |
86dc0f79 | 909 | elf_backend_sign_extend_vma, |
252b5132 RH |
910 | elf_backend_want_got_plt, |
911 | elf_backend_plt_readonly, | |
912 | elf_backend_want_plt_sym, | |
913 | elf_backend_plt_not_loaded, | |
914 | elf_backend_plt_alignment, | |
2ac8ce5f | 915 | elf_backend_can_gc_sections, |
51b64d56 | 916 | elf_backend_can_refcount, |
7fda6dbc | 917 | elf_backend_want_got_sym, |
5e8d7549 | 918 | elf_backend_want_dynbss, |
5474d94f | 919 | elf_backend_want_dynrelro, |
6bfdb61b | 920 | elf_backend_want_p_paddr_set_to_zero, |
a8c75b76 | 921 | elf_backend_no_page_alias, |
53291d1f | 922 | elf_backend_default_execstack, |
f7483970 | 923 | elf_backend_caches_rawsize, |
23ec1e32 | 924 | elf_backend_extern_protected_data, |
a2f63b2e | 925 | elf_backend_always_renumber_dynsyms, |
3c9a7b0d MR |
926 | elf_backend_linux_prpsinfo32_ugid16, |
927 | elf_backend_linux_prpsinfo64_ugid16 | |
252b5132 RH |
928 | }; |
929 | ||
c3c89269 NC |
930 | /* Forward declaration for use when initialising alternative_target field. */ |
931 | #ifdef TARGET_LITTLE_SYM | |
932 | extern const bfd_target TARGET_LITTLE_SYM; | |
933 | #endif | |
934 | ||
252b5132 RH |
935 | #ifdef TARGET_BIG_SYM |
936 | const bfd_target TARGET_BIG_SYM = | |
937 | { | |
938 | /* name: identify kind of target */ | |
939 | TARGET_BIG_NAME, | |
940 | ||
941 | /* flavour: general indication about file */ | |
942 | bfd_target_elf_flavour, | |
943 | ||
944 | /* byteorder: data is big endian */ | |
945 | BFD_ENDIAN_BIG, | |
946 | ||
947 | /* header_byteorder: header is also big endian */ | |
948 | BFD_ENDIAN_BIG, | |
949 | ||
950 | /* object_flags: mask of all file flags */ | |
e0aae569 | 951 | (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
cd6faa73 | 952 | | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS |
b8871f35 | 953 | | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON), |
252b5132 RH |
954 | |
955 | /* section_flags: mask of all section flags */ | |
e0aae569 RH |
956 | (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
957 | | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES | |
ebe372c1 | 958 | | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP), |
252b5132 RH |
959 | |
960 | /* leading_symbol_char: is the first char of a user symbol | |
961 | predictable, and if so what is it */ | |
962 | elf_symbol_leading_char, | |
963 | ||
964 | /* ar_pad_char: pad character for filenames within an archive header | |
965 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
966 | of the archiver and/or os and should be independently tunable */ | |
967 | '/', | |
968 | ||
969 | /* ar_max_namelen: maximum number of characters in an archive header | |
970 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
a1aefc76 NC |
971 | of the archiver and should be independently tunable. The System V ABI, |
972 | Chapter 7 (Formats & Protocols), Archive section sets this as 15. */ | |
973 | 15, | |
252b5132 | 974 | |
0aabe54e AM |
975 | elf_match_priority, |
976 | ||
252b5132 RH |
977 | /* Routines to byte-swap various sized integers from the data sections */ |
978 | bfd_getb64, bfd_getb_signed_64, bfd_putb64, | |
979 | bfd_getb32, bfd_getb_signed_32, bfd_putb32, | |
980 | bfd_getb16, bfd_getb_signed_16, bfd_putb16, | |
981 | ||
982 | /* Routines to byte-swap various sized integers from the file headers */ | |
983 | bfd_getb64, bfd_getb_signed_64, bfd_putb64, | |
984 | bfd_getb32, bfd_getb_signed_32, bfd_putb32, | |
985 | bfd_getb16, bfd_getb_signed_16, bfd_putb16, | |
986 | ||
987 | /* bfd_check_format: check the format of a file being read */ | |
988 | { _bfd_dummy_target, /* unknown format */ | |
989 | bfd_elfNN_object_p, /* assembler/linker output (object file) */ | |
990 | bfd_elfNN_archive_p, /* an archive */ | |
991 | bfd_elfNN_core_file_p /* a core file */ | |
992 | }, | |
993 | ||
994 | /* bfd_set_format: set the format of a file being written */ | |
d00dd7dc | 995 | { _bfd_bool_bfd_false_error, |
252b5132 RH |
996 | bfd_elfNN_mkobject, |
997 | bfd_elfNN_mkarchive, | |
998 | bfd_elfNN_mkcorefile | |
999 | }, | |
1000 | ||
1001 | /* bfd_write_contents: write cached information into a file being written */ | |
d00dd7dc | 1002 | { _bfd_bool_bfd_false_error, |
252b5132 RH |
1003 | bfd_elfNN_write_object_contents, |
1004 | bfd_elfNN_write_archive_contents, | |
1005 | bfd_elfNN_write_corefile_contents, | |
1006 | }, | |
1007 | ||
e656e369 AM |
1008 | BFD_JUMP_TABLE_GENERIC (bfd_elfNN), |
1009 | BFD_JUMP_TABLE_COPY (bfd_elfNN), | |
1010 | BFD_JUMP_TABLE_CORE (bfd_elfNN), | |
252b5132 | 1011 | #ifdef bfd_elfNN_archive_functions |
e656e369 | 1012 | BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive), |
e6cc316a L |
1013 | #elif defined USE_64_BIT_ARCHIVE |
1014 | BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_64_bit), | |
252b5132 | 1015 | #else |
e656e369 | 1016 | BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), |
252b5132 | 1017 | #endif |
e656e369 AM |
1018 | BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN), |
1019 | BFD_JUMP_TABLE_RELOCS (bfd_elfNN), | |
1020 | BFD_JUMP_TABLE_WRITE (bfd_elfNN), | |
1021 | BFD_JUMP_TABLE_LINK (bfd_elfNN), | |
1022 | BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN), | |
252b5132 | 1023 | |
c3c89269 NC |
1024 | /* Alternative endian target. */ |
1025 | #ifdef TARGET_LITTLE_SYM | |
1026 | & TARGET_LITTLE_SYM, | |
1027 | #else | |
1028 | NULL, | |
1029 | #endif | |
1030 | ||
252b5132 | 1031 | /* backend_data: */ |
9c5bfbb7 | 1032 | &elfNN_bed |
252b5132 RH |
1033 | }; |
1034 | #endif | |
1035 | ||
1036 | #ifdef TARGET_LITTLE_SYM | |
1037 | const bfd_target TARGET_LITTLE_SYM = | |
1038 | { | |
1039 | /* name: identify kind of target */ | |
1040 | TARGET_LITTLE_NAME, | |
1041 | ||
1042 | /* flavour: general indication about file */ | |
1043 | bfd_target_elf_flavour, | |
1044 | ||
1045 | /* byteorder: data is little endian */ | |
1046 | BFD_ENDIAN_LITTLE, | |
1047 | ||
1048 | /* header_byteorder: header is also little endian */ | |
1049 | BFD_ENDIAN_LITTLE, | |
1050 | ||
1051 | /* object_flags: mask of all file flags */ | |
e0aae569 | 1052 | (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
cd6faa73 | 1053 | | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS |
b8871f35 | 1054 | | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON), |
252b5132 RH |
1055 | |
1056 | /* section_flags: mask of all section flags */ | |
e0aae569 RH |
1057 | (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
1058 | | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES | |
ebe372c1 | 1059 | | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP), |
252b5132 RH |
1060 | |
1061 | /* leading_symbol_char: is the first char of a user symbol | |
1062 | predictable, and if so what is it */ | |
1063 | elf_symbol_leading_char, | |
1064 | ||
1065 | /* ar_pad_char: pad character for filenames within an archive header | |
1066 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
1067 | of the archiver and/or os and should be independently tunable */ | |
1068 | '/', | |
1069 | ||
1070 | /* ar_max_namelen: maximum number of characters in an archive header | |
1071 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
a1aefc76 NC |
1072 | of the archiver and should be independently tunable. The System V ABI, |
1073 | Chapter 7 (Formats & Protocols), Archive section sets this as 15. */ | |
1074 | 15, | |
252b5132 | 1075 | |
0aabe54e AM |
1076 | elf_match_priority, |
1077 | ||
252b5132 RH |
1078 | /* Routines to byte-swap various sized integers from the data sections */ |
1079 | bfd_getl64, bfd_getl_signed_64, bfd_putl64, | |
1080 | bfd_getl32, bfd_getl_signed_32, bfd_putl32, | |
1081 | bfd_getl16, bfd_getl_signed_16, bfd_putl16, | |
1082 | ||
1083 | /* Routines to byte-swap various sized integers from the file headers */ | |
1084 | bfd_getl64, bfd_getl_signed_64, bfd_putl64, | |
1085 | bfd_getl32, bfd_getl_signed_32, bfd_putl32, | |
1086 | bfd_getl16, bfd_getl_signed_16, bfd_putl16, | |
1087 | ||
1088 | /* bfd_check_format: check the format of a file being read */ | |
1089 | { _bfd_dummy_target, /* unknown format */ | |
1090 | bfd_elfNN_object_p, /* assembler/linker output (object file) */ | |
1091 | bfd_elfNN_archive_p, /* an archive */ | |
1092 | bfd_elfNN_core_file_p /* a core file */ | |
1093 | }, | |
1094 | ||
1095 | /* bfd_set_format: set the format of a file being written */ | |
d00dd7dc | 1096 | { _bfd_bool_bfd_false_error, |
252b5132 RH |
1097 | bfd_elfNN_mkobject, |
1098 | bfd_elfNN_mkarchive, | |
1099 | bfd_elfNN_mkcorefile | |
1100 | }, | |
1101 | ||
1102 | /* bfd_write_contents: write cached information into a file being written */ | |
d00dd7dc | 1103 | { _bfd_bool_bfd_false_error, |
252b5132 RH |
1104 | bfd_elfNN_write_object_contents, |
1105 | bfd_elfNN_write_archive_contents, | |
1106 | bfd_elfNN_write_corefile_contents, | |
1107 | }, | |
1108 | ||
e656e369 AM |
1109 | BFD_JUMP_TABLE_GENERIC (bfd_elfNN), |
1110 | BFD_JUMP_TABLE_COPY (bfd_elfNN), | |
1111 | BFD_JUMP_TABLE_CORE (bfd_elfNN), | |
252b5132 | 1112 | #ifdef bfd_elfNN_archive_functions |
e656e369 | 1113 | BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive), |
e6cc316a L |
1114 | #elif defined USE_64_BIT_ARCHIVE |
1115 | BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_64_bit), | |
252b5132 | 1116 | #else |
e656e369 | 1117 | BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), |
252b5132 | 1118 | #endif |
e656e369 AM |
1119 | BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN), |
1120 | BFD_JUMP_TABLE_RELOCS (bfd_elfNN), | |
1121 | BFD_JUMP_TABLE_WRITE (bfd_elfNN), | |
1122 | BFD_JUMP_TABLE_LINK (bfd_elfNN), | |
1123 | BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN), | |
252b5132 | 1124 | |
c3c89269 NC |
1125 | /* Alternative endian target. */ |
1126 | #ifdef TARGET_BIG_SYM | |
1127 | & TARGET_BIG_SYM, | |
1128 | #else | |
1129 | NULL, | |
1130 | #endif | |
3e932841 | 1131 | |
252b5132 | 1132 | /* backend_data: */ |
9c5bfbb7 | 1133 | &elfNN_bed |
252b5132 RH |
1134 | }; |
1135 | #endif |