Commit | Line | Data |
---|---|---|
b968e4f4 | 1 | /* Target definitions for NN-bit ELF |
35a3e78e | 2 | Copyright 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. |
3adad029 KR |
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 2 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 | |
4e98461f | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
3adad029 KR |
19 | |
20 | /* This structure contains everything that BFD knows about a target. | |
21 | It includes things like its byte order, name, what routines to call | |
22 | to do various operations, etc. Every BFD points to a target structure | |
23 | with its "xvec" member. | |
24 | ||
25 | There are two such structures here: one for big-endian machines and | |
26 | one for little-endian machines. */ | |
27 | ||
b968e4f4 KR |
28 | #define bfd_elfNN_close_and_cleanup _bfd_generic_close_and_cleanup |
29 | #define bfd_elfNN_bfd_free_cached_info _bfd_generic_bfd_free_cached_info | |
30 | #ifndef bfd_elfNN_get_section_contents | |
31 | #define bfd_elfNN_get_section_contents _bfd_generic_get_section_contents | |
3adad029 | 32 | #endif |
3adad029 | 33 | |
ede4eed4 KR |
34 | #define bfd_elfNN_canonicalize_dynamic_symtab _bfd_elf_canonicalize_dynamic_symtab |
35 | #define bfd_elfNN_canonicalize_reloc _bfd_elf_canonicalize_reloc | |
36 | #ifndef bfd_elfNN_find_nearest_line | |
37 | #define bfd_elfNN_find_nearest_line _bfd_elf_find_nearest_line | |
38 | #endif | |
4e98461f SC |
39 | #define bfd_elfNN_read_minisymbols _bfd_elf_read_minisymbols |
40 | #define bfd_elfNN_minisymbol_to_symbol _bfd_elf_minisymbol_to_symbol | |
ede4eed4 KR |
41 | #define bfd_elfNN_get_dynamic_symtab_upper_bound _bfd_elf_get_dynamic_symtab_upper_bound |
42 | #define bfd_elfNN_get_lineno _bfd_elf_get_lineno | |
e35765a9 | 43 | #ifndef bfd_elfNN_get_reloc_upper_bound |
ede4eed4 | 44 | #define bfd_elfNN_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound |
e35765a9 | 45 | #endif |
ede4eed4 KR |
46 | #define bfd_elfNN_get_symbol_info _bfd_elf_get_symbol_info |
47 | #define bfd_elfNN_get_symtab _bfd_elf_get_symtab | |
48 | #define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound | |
6ab826bd | 49 | #if 0 /* done in elf-bfd.h */ |
ede4eed4 KR |
50 | #define bfd_elfNN_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol |
51 | #endif | |
52 | #define bfd_elfNN_make_empty_symbol _bfd_elf_make_empty_symbol | |
53 | #define bfd_elfNN_new_section_hook _bfd_elf_new_section_hook | |
54 | #define bfd_elfNN_set_arch_mach _bfd_elf_set_arch_mach | |
55 | #ifndef bfd_elfNN_set_section_contents | |
56 | #define bfd_elfNN_set_section_contents _bfd_elf_set_section_contents | |
57 | #endif | |
58 | #define bfd_elfNN_sizeof_headers _bfd_elf_sizeof_headers | |
59 | #define bfd_elfNN_write_object_contents _bfd_elf_write_object_contents | |
60 | ||
631b10f4 ILT |
61 | #define bfd_elfNN_get_section_contents_in_window \ |
62 | _bfd_generic_get_section_contents_in_window | |
63 | ||
ede4eed4 KR |
64 | #ifndef elf_backend_want_got_plt |
65 | #define elf_backend_want_got_plt 0 | |
66 | #endif | |
67 | #ifndef elf_backend_plt_readonly | |
68 | #define elf_backend_plt_readonly 0 | |
69 | #endif | |
70 | #ifndef elf_backend_want_plt_sym | |
71 | #define elf_backend_want_plt_sym 0 | |
72 | #endif | |
73 | ||
b968e4f4 KR |
74 | #define bfd_elfNN_bfd_debug_info_start bfd_void |
75 | #define bfd_elfNN_bfd_debug_info_end bfd_void | |
76 | #define bfd_elfNN_bfd_debug_info_accumulate (PROTO(void,(*),(bfd*, struct sec *))) bfd_void | |
77 | ||
78 | #ifndef bfd_elfNN_bfd_get_relocated_section_contents | |
79 | #define bfd_elfNN_bfd_get_relocated_section_contents \ | |
3adad029 | 80 | bfd_generic_get_relocated_section_contents |
b968e4f4 KR |
81 | #endif |
82 | ||
e35765a9 | 83 | #ifndef bfd_elfNN_bfd_relax_section |
b968e4f4 | 84 | #define bfd_elfNN_bfd_relax_section bfd_generic_relax_section |
e35765a9 ILT |
85 | #endif |
86 | ||
b968e4f4 | 87 | #define bfd_elfNN_bfd_make_debug_symbol \ |
3adad029 KR |
88 | ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr) |
89 | ||
b968e4f4 KR |
90 | #ifndef bfd_elfNN_bfd_copy_private_symbol_data |
91 | #define bfd_elfNN_bfd_copy_private_symbol_data \ | |
631b10f4 | 92 | _bfd_elf_copy_private_symbol_data |
6167a840 | 93 | #endif |
631b10f4 | 94 | |
b968e4f4 KR |
95 | #ifndef bfd_elfNN_bfd_copy_private_section_data |
96 | #define bfd_elfNN_bfd_copy_private_section_data \ | |
631b10f4 | 97 | _bfd_elf_copy_private_section_data |
5b3577cb | 98 | #endif |
b968e4f4 KR |
99 | #ifndef bfd_elfNN_bfd_copy_private_bfd_data |
100 | #define bfd_elfNN_bfd_copy_private_bfd_data \ | |
5b3577cb JL |
101 | ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true) |
102 | #endif | |
4e98461f SC |
103 | #ifndef bfd_elfNN_bfd_print_private_bfd_data |
104 | #define bfd_elfNN_bfd_print_private_bfd_data \ | |
27fb8f29 | 105 | _bfd_elf_print_private_bfd_data |
4e98461f | 106 | #endif |
b968e4f4 KR |
107 | #ifndef bfd_elfNN_bfd_merge_private_bfd_data |
108 | #define bfd_elfNN_bfd_merge_private_bfd_data \ | |
d5fb1e2a MM |
109 | ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true) |
110 | #endif | |
b968e4f4 KR |
111 | #ifndef bfd_elfNN_bfd_set_private_flags |
112 | #define bfd_elfNN_bfd_set_private_flags \ | |
d5fb1e2a MM |
113 | ((boolean (*) PARAMS ((bfd *, flagword))) bfd_true) |
114 | #endif | |
35a3e78e ILT |
115 | #ifndef bfd_elfNN_bfd_is_local_label_name |
116 | #define bfd_elfNN_bfd_is_local_label_name bfd_generic_is_local_label_name | |
5b3577cb JL |
117 | #endif |
118 | ||
b968e4f4 KR |
119 | #ifndef bfd_elfNN_get_dynamic_reloc_upper_bound |
120 | #define bfd_elfNN_get_dynamic_reloc_upper_bound \ | |
e35765a9 | 121 | _bfd_elf_get_dynamic_reloc_upper_bound |
cb71adf1 | 122 | #endif |
b968e4f4 KR |
123 | #ifndef bfd_elfNN_canonicalize_dynamic_reloc |
124 | #define bfd_elfNN_canonicalize_dynamic_reloc \ | |
e35765a9 | 125 | _bfd_elf_canonicalize_dynamic_reloc |
cb71adf1 PS |
126 | #endif |
127 | ||
6ec3bb6a | 128 | #ifdef elf_backend_relocate_section |
b968e4f4 KR |
129 | #ifndef bfd_elfNN_bfd_link_hash_table_create |
130 | #define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create | |
6ec3bb6a ILT |
131 | #endif |
132 | #else /* ! defined (elf_backend_relocate_section) */ | |
133 | /* If no backend relocate_section routine, use the generic linker. */ | |
b968e4f4 KR |
134 | #ifndef bfd_elfNN_bfd_link_hash_table_create |
135 | #define bfd_elfNN_bfd_link_hash_table_create \ | |
6ec3bb6a ILT |
136 | _bfd_generic_link_hash_table_create |
137 | #endif | |
b968e4f4 KR |
138 | #ifndef bfd_elfNN_bfd_link_add_symbols |
139 | #define bfd_elfNN_bfd_link_add_symbols _bfd_generic_link_add_symbols | |
6ec3bb6a | 140 | #endif |
b968e4f4 KR |
141 | #ifndef bfd_elfNN_bfd_final_link |
142 | #define bfd_elfNN_bfd_final_link _bfd_generic_final_link | |
6ec3bb6a ILT |
143 | #endif |
144 | #endif /* ! defined (elf_backend_relocate_section) */ | |
b968e4f4 KR |
145 | #ifndef bfd_elfNN_bfd_link_split_section |
146 | #define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section | |
6167a840 | 147 | #endif |
6ec3bb6a | 148 | |
e35765a9 ILT |
149 | #ifndef bfd_elfNN_archive_p |
150 | #define bfd_elfNN_archive_p bfd_generic_archive_p | |
151 | #endif | |
152 | ||
153 | #ifndef bfd_elfNN_write_archive_contents | |
154 | #define bfd_elfNN_write_archive_contents _bfd_write_archive_contents | |
155 | #endif | |
156 | ||
ff12f303 ILT |
157 | #ifndef bfd_elfNN_mkobject |
158 | #define bfd_elfNN_mkobject bfd_elf_mkobject | |
159 | #endif | |
160 | ||
e35765a9 ILT |
161 | #ifndef bfd_elfNN_mkarchive |
162 | #define bfd_elfNN_mkarchive _bfd_generic_mkarchive | |
163 | #endif | |
164 | ||
d1bf45aa ILT |
165 | #ifndef elf_symbol_leading_char |
166 | #define elf_symbol_leading_char 0 | |
167 | #endif | |
168 | ||
169 | #ifndef elf_info_to_howto | |
170 | #define elf_info_to_howto 0 | |
171 | #endif | |
172 | ||
b3024965 KR |
173 | #ifndef elf_info_to_howto_rel |
174 | #define elf_info_to_howto_rel 0 | |
175 | #endif | |
176 | ||
177 | #ifndef ELF_MAXPAGESIZE | |
178 | #define ELF_MAXPAGESIZE 1 | |
179 | #endif | |
180 | ||
6ec3bb6a ILT |
181 | #ifndef elf_backend_collect |
182 | #define elf_backend_collect false | |
183 | #endif | |
5b3b9ff6 ILT |
184 | #ifndef elf_backend_type_change_ok |
185 | #define elf_backend_type_change_ok false | |
186 | #endif | |
6ec3bb6a | 187 | |
643e9fc7 ILT |
188 | #ifndef elf_backend_sym_is_global |
189 | #define elf_backend_sym_is_global 0 | |
190 | #endif | |
a5ccdad1 | 191 | #ifndef elf_backend_object_p |
643e9fc7 | 192 | #define elf_backend_object_p 0 |
a5ccdad1 | 193 | #endif |
95469b02 | 194 | #ifndef elf_backend_symbol_processing |
643e9fc7 | 195 | #define elf_backend_symbol_processing 0 |
95469b02 ILT |
196 | #endif |
197 | #ifndef elf_backend_symbol_table_processing | |
643e9fc7 | 198 | #define elf_backend_symbol_table_processing 0 |
95469b02 ILT |
199 | #endif |
200 | #ifndef elf_backend_section_processing | |
643e9fc7 | 201 | #define elf_backend_section_processing 0 |
95469b02 ILT |
202 | #endif |
203 | #ifndef elf_backend_section_from_shdr | |
643e9fc7 | 204 | #define elf_backend_section_from_shdr 0 |
95469b02 ILT |
205 | #endif |
206 | #ifndef elf_backend_fake_sections | |
643e9fc7 | 207 | #define elf_backend_fake_sections 0 |
95469b02 ILT |
208 | #endif |
209 | #ifndef elf_backend_section_from_bfd_section | |
643e9fc7 ILT |
210 | #define elf_backend_section_from_bfd_section 0 |
211 | #endif | |
6ec3bb6a ILT |
212 | #ifndef elf_backend_add_symbol_hook |
213 | #define elf_backend_add_symbol_hook 0 | |
214 | #endif | |
ff5a090f JL |
215 | #ifndef elf_backend_link_output_symbol_hook |
216 | #define elf_backend_link_output_symbol_hook 0 | |
217 | #endif | |
013dec1a ILT |
218 | #ifndef elf_backend_create_dynamic_sections |
219 | #define elf_backend_create_dynamic_sections 0 | |
220 | #endif | |
374d2ef9 ILT |
221 | #ifndef elf_backend_check_relocs |
222 | #define elf_backend_check_relocs 0 | |
223 | #endif | |
013dec1a ILT |
224 | #ifndef elf_backend_adjust_dynamic_symbol |
225 | #define elf_backend_adjust_dynamic_symbol 0 | |
226 | #endif | |
ff12f303 ILT |
227 | #ifndef elf_backend_always_size_sections |
228 | #define elf_backend_always_size_sections 0 | |
229 | #endif | |
013dec1a ILT |
230 | #ifndef elf_backend_size_dynamic_sections |
231 | #define elf_backend_size_dynamic_sections 0 | |
232 | #endif | |
6ec3bb6a ILT |
233 | #ifndef elf_backend_relocate_section |
234 | #define elf_backend_relocate_section 0 | |
235 | #endif | |
013dec1a ILT |
236 | #ifndef elf_backend_finish_dynamic_symbol |
237 | #define elf_backend_finish_dynamic_symbol 0 | |
238 | #endif | |
239 | #ifndef elf_backend_finish_dynamic_sections | |
240 | #define elf_backend_finish_dynamic_sections 0 | |
241 | #endif | |
99a6c761 JL |
242 | #ifndef elf_backend_begin_write_processing |
243 | #define elf_backend_begin_write_processing 0 | |
244 | #endif | |
643e9fc7 ILT |
245 | #ifndef elf_backend_final_write_processing |
246 | #define elf_backend_final_write_processing 0 | |
95469b02 | 247 | #endif |
5b3b9ff6 ILT |
248 | #ifndef elf_backend_additional_program_headers |
249 | #define elf_backend_additional_program_headers 0 | |
250 | #endif | |
251 | #ifndef elf_backend_modify_segment_map | |
252 | #define elf_backend_modify_segment_map 0 | |
6ab826bd | 253 | #endif |
95469b02 | 254 | #ifndef elf_backend_ecoff_debug_swap |
643e9fc7 | 255 | #define elf_backend_ecoff_debug_swap 0 |
95469b02 ILT |
256 | #endif |
257 | ||
8c9bfee3 MM |
258 | #ifndef ELF_MACHINE_ALT1 |
259 | #define ELF_MACHINE_ALT1 0 | |
260 | #endif | |
261 | ||
262 | #ifndef ELF_MACHINE_ALT2 | |
263 | #define ELF_MACHINE_ALT2 0 | |
264 | #endif | |
265 | ||
d1bf45aa ILT |
266 | #ifndef elf_backend_size_info |
267 | #define elf_backend_size_info _bfd_elfNN_size_info | |
268 | #endif | |
269 | ||
ede4eed4 KR |
270 | extern const struct elf_size_info _bfd_elfNN_size_info; |
271 | ||
b968e4f4 | 272 | static CONST struct elf_backend_data elfNN_bed = |
3adad029 KR |
273 | { |
274 | #ifdef USE_REL | |
275 | 0, /* use_rela_p */ | |
276 | #else | |
277 | 1, /* use_rela_p */ | |
b968e4f4 | 278 | #endif |
3adad029 | 279 | ELF_ARCH, /* arch */ |
a5ccdad1 | 280 | ELF_MACHINE_CODE, /* elf_machine_code */ |
95469b02 | 281 | ELF_MAXPAGESIZE, /* maxpagesize */ |
6ec3bb6a | 282 | elf_backend_collect, |
5b3b9ff6 | 283 | elf_backend_type_change_ok, |
643e9fc7 ILT |
284 | elf_info_to_howto, |
285 | elf_info_to_howto_rel, | |
286 | elf_backend_sym_is_global, | |
287 | elf_backend_object_p, | |
288 | elf_backend_symbol_processing, | |
289 | elf_backend_symbol_table_processing, | |
290 | elf_backend_section_processing, | |
291 | elf_backend_section_from_shdr, | |
292 | elf_backend_fake_sections, | |
293 | elf_backend_section_from_bfd_section, | |
6ec3bb6a | 294 | elf_backend_add_symbol_hook, |
ff5a090f | 295 | elf_backend_link_output_symbol_hook, |
013dec1a | 296 | elf_backend_create_dynamic_sections, |
374d2ef9 | 297 | elf_backend_check_relocs, |
013dec1a | 298 | elf_backend_adjust_dynamic_symbol, |
ff12f303 | 299 | elf_backend_always_size_sections, |
013dec1a | 300 | elf_backend_size_dynamic_sections, |
6ec3bb6a | 301 | elf_backend_relocate_section, |
013dec1a ILT |
302 | elf_backend_finish_dynamic_symbol, |
303 | elf_backend_finish_dynamic_sections, | |
99a6c761 JL |
304 | elf_backend_begin_write_processing, |
305 | elf_backend_final_write_processing, | |
5b3b9ff6 ILT |
306 | elf_backend_additional_program_headers, |
307 | elf_backend_modify_segment_map, | |
8c9bfee3 MM |
308 | elf_backend_ecoff_debug_swap, |
309 | ELF_MACHINE_ALT1, | |
ede4eed4 | 310 | ELF_MACHINE_ALT2, |
d1bf45aa | 311 | &elf_backend_size_info, |
ede4eed4 KR |
312 | elf_backend_want_got_plt, |
313 | elf_backend_plt_readonly, | |
d1bf45aa | 314 | elf_backend_want_plt_sym |
3adad029 KR |
315 | }; |
316 | ||
317 | #ifdef TARGET_BIG_SYM | |
2f3508ad | 318 | const bfd_target TARGET_BIG_SYM = |
3adad029 KR |
319 | { |
320 | /* name: identify kind of target */ | |
321 | TARGET_BIG_NAME, | |
322 | ||
323 | /* flavour: general indication about file */ | |
324 | bfd_target_elf_flavour, | |
325 | ||
5b3b9ff6 ILT |
326 | /* byteorder: data is big endian */ |
327 | BFD_ENDIAN_BIG, | |
3adad029 | 328 | |
5b3b9ff6 ILT |
329 | /* header_byteorder: header is also big endian */ |
330 | BFD_ENDIAN_BIG, | |
3adad029 KR |
331 | |
332 | /* object_flags: mask of all file flags */ | |
333 | (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS | | |
fa15568a | 334 | DYNAMIC | WP_TEXT | D_PAGED), |
ff12f303 | 335 | |
3adad029 KR |
336 | /* section_flags: mask of all section flags */ |
337 | (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY | | |
83f4323e | 338 | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES), |
3adad029 KR |
339 | |
340 | /* leading_symbol_char: is the first char of a user symbol | |
341 | predictable, and if so what is it */ | |
d1bf45aa | 342 | elf_symbol_leading_char, |
3adad029 KR |
343 | |
344 | /* ar_pad_char: pad character for filenames within an archive header | |
345 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
346 | of the archiver and/or os and should be independently tunable */ | |
347 | '/', | |
348 | ||
349 | /* ar_max_namelen: maximum number of characters in an archive header | |
350 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
351 | of the archiver and should be independently tunable. This value is | |
352 | a WAG (wild a** guess) */ | |
7a0c782d | 353 | 14, |
3adad029 | 354 | |
3adad029 | 355 | /* Routines to byte-swap various sized integers from the data sections */ |
23f44e6f ILT |
356 | bfd_getb64, bfd_getb_signed_64, bfd_putb64, |
357 | bfd_getb32, bfd_getb_signed_32, bfd_putb32, | |
358 | bfd_getb16, bfd_getb_signed_16, bfd_putb16, | |
3adad029 KR |
359 | |
360 | /* Routines to byte-swap various sized integers from the file headers */ | |
23f44e6f ILT |
361 | bfd_getb64, bfd_getb_signed_64, bfd_putb64, |
362 | bfd_getb32, bfd_getb_signed_32, bfd_putb32, | |
363 | bfd_getb16, bfd_getb_signed_16, bfd_putb16, | |
3adad029 KR |
364 | |
365 | /* bfd_check_format: check the format of a file being read */ | |
366 | { _bfd_dummy_target, /* unknown format */ | |
b968e4f4 | 367 | bfd_elfNN_object_p, /* assembler/linker output (object file) */ |
e35765a9 | 368 | bfd_elfNN_archive_p, /* an archive */ |
b968e4f4 | 369 | bfd_elfNN_core_file_p /* a core file */ |
3adad029 KR |
370 | }, |
371 | ||
372 | /* bfd_set_format: set the format of a file being written */ | |
373 | { bfd_false, | |
ff12f303 | 374 | bfd_elfNN_mkobject, |
e35765a9 | 375 | bfd_elfNN_mkarchive, |
3adad029 KR |
376 | bfd_false |
377 | }, | |
378 | ||
379 | /* bfd_write_contents: write cached information into a file being written */ | |
380 | { bfd_false, | |
b968e4f4 | 381 | bfd_elfNN_write_object_contents, |
e35765a9 | 382 | bfd_elfNN_write_archive_contents, |
3adad029 KR |
383 | bfd_false |
384 | }, | |
385 | ||
b968e4f4 KR |
386 | BFD_JUMP_TABLE_GENERIC (bfd_elfNN), |
387 | BFD_JUMP_TABLE_COPY (bfd_elfNN), | |
388 | BFD_JUMP_TABLE_CORE (bfd_elfNN), | |
e35765a9 ILT |
389 | #ifdef bfd_elfNN_archive_functions |
390 | BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive), | |
391 | #else | |
6812b607 | 392 | BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), |
e35765a9 | 393 | #endif |
b968e4f4 KR |
394 | BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN), |
395 | BFD_JUMP_TABLE_RELOCS (bfd_elfNN), | |
396 | BFD_JUMP_TABLE_WRITE (bfd_elfNN), | |
397 | BFD_JUMP_TABLE_LINK (bfd_elfNN), | |
398 | BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN), | |
3adad029 KR |
399 | |
400 | /* backend_data: */ | |
b968e4f4 | 401 | (PTR) &elfNN_bed, |
3adad029 KR |
402 | }; |
403 | #endif | |
404 | ||
405 | #ifdef TARGET_LITTLE_SYM | |
2f3508ad | 406 | const bfd_target TARGET_LITTLE_SYM = |
3adad029 KR |
407 | { |
408 | /* name: identify kind of target */ | |
409 | TARGET_LITTLE_NAME, | |
410 | ||
411 | /* flavour: general indication about file */ | |
412 | bfd_target_elf_flavour, | |
413 | ||
5b3b9ff6 ILT |
414 | /* byteorder: data is little endian */ |
415 | BFD_ENDIAN_LITTLE, | |
3adad029 | 416 | |
5b3b9ff6 ILT |
417 | /* header_byteorder: header is also little endian */ |
418 | BFD_ENDIAN_LITTLE, | |
3adad029 KR |
419 | |
420 | /* object_flags: mask of all file flags */ | |
421 | (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS | | |
fa15568a | 422 | DYNAMIC | WP_TEXT | D_PAGED), |
ff12f303 | 423 | |
3adad029 KR |
424 | /* section_flags: mask of all section flags */ |
425 | (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY | | |
83f4323e | 426 | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES), |
3adad029 KR |
427 | |
428 | /* leading_symbol_char: is the first char of a user symbol | |
429 | predictable, and if so what is it */ | |
d1bf45aa | 430 | elf_symbol_leading_char, |
3adad029 KR |
431 | |
432 | /* ar_pad_char: pad character for filenames within an archive header | |
433 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
434 | of the archiver and/or os and should be independently tunable */ | |
435 | '/', | |
436 | ||
437 | /* ar_max_namelen: maximum number of characters in an archive header | |
438 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
439 | of the archiver and should be independently tunable. This value is | |
440 | a WAG (wild a** guess) */ | |
7a0c782d | 441 | 14, |
3adad029 | 442 | |
3adad029 | 443 | /* Routines to byte-swap various sized integers from the data sections */ |
23f44e6f ILT |
444 | bfd_getl64, bfd_getl_signed_64, bfd_putl64, |
445 | bfd_getl32, bfd_getl_signed_32, bfd_putl32, | |
446 | bfd_getl16, bfd_getl_signed_16, bfd_putl16, | |
3adad029 KR |
447 | |
448 | /* Routines to byte-swap various sized integers from the file headers */ | |
23f44e6f ILT |
449 | bfd_getl64, bfd_getl_signed_64, bfd_putl64, |
450 | bfd_getl32, bfd_getl_signed_32, bfd_putl32, | |
451 | bfd_getl16, bfd_getl_signed_16, bfd_putl16, | |
3adad029 KR |
452 | |
453 | /* bfd_check_format: check the format of a file being read */ | |
454 | { _bfd_dummy_target, /* unknown format */ | |
b968e4f4 | 455 | bfd_elfNN_object_p, /* assembler/linker output (object file) */ |
e35765a9 | 456 | bfd_elfNN_archive_p, /* an archive */ |
b968e4f4 | 457 | bfd_elfNN_core_file_p /* a core file */ |
3adad029 KR |
458 | }, |
459 | ||
460 | /* bfd_set_format: set the format of a file being written */ | |
461 | { bfd_false, | |
ff12f303 | 462 | bfd_elfNN_mkobject, |
e35765a9 | 463 | bfd_elfNN_mkarchive, |
3adad029 KR |
464 | bfd_false |
465 | }, | |
466 | ||
467 | /* bfd_write_contents: write cached information into a file being written */ | |
468 | { bfd_false, | |
b968e4f4 | 469 | bfd_elfNN_write_object_contents, |
e35765a9 | 470 | bfd_elfNN_write_archive_contents, |
3adad029 KR |
471 | bfd_false |
472 | }, | |
473 | ||
b968e4f4 KR |
474 | BFD_JUMP_TABLE_GENERIC (bfd_elfNN), |
475 | BFD_JUMP_TABLE_COPY (bfd_elfNN), | |
476 | BFD_JUMP_TABLE_CORE (bfd_elfNN), | |
e35765a9 ILT |
477 | #ifdef bfd_elfNN_archive_functions |
478 | BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive), | |
479 | #else | |
6812b607 | 480 | BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), |
e35765a9 | 481 | #endif |
b968e4f4 KR |
482 | BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN), |
483 | BFD_JUMP_TABLE_RELOCS (bfd_elfNN), | |
484 | BFD_JUMP_TABLE_WRITE (bfd_elfNN), | |
485 | BFD_JUMP_TABLE_LINK (bfd_elfNN), | |
486 | BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN), | |
3adad029 KR |
487 | |
488 | /* backend_data: */ | |
b968e4f4 | 489 | (PTR) &elfNN_bed, |
3adad029 KR |
490 | }; |
491 | #endif |