* mips-opc.c (mips_opcodes): Correct operands of "nor" with an
[deliverable/binutils-gdb.git] / bfd / elf64-target.h
CommitLineData
3adad029
KR
1/* Target definitions for 64-bit ELF
2 Copyright 1993 Free Software Foundation, Inc.
3
4This file is part of BFD, the Binary File Descriptor library.
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
18Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
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
28/* Archives are generic or unimplemented. */
29#ifndef bfd_elf64_slurp_armap
30#define bfd_elf64_slurp_armap bfd_slurp_coff_armap
31#endif
32#define bfd_elf64_slurp_extended_name_table _bfd_slurp_extended_name_table
33#define bfd_elf64_truncate_arname bfd_dont_truncate_arname
34#define bfd_elf64_openr_next_archived_file bfd_generic_openr_next_archived_file
35#define bfd_elf64_generic_stat_arch_elt bfd_generic_stat_arch_elt
36#ifndef bfd_elf64_write_armap
37#define bfd_elf64_write_armap coff_write_armap
38#endif
39
40/* Ordinary section reading and writing */
41#define bfd_elf64_get_section_contents bfd_generic_get_section_contents
42#define bfd_elf64_close_and_cleanup bfd_generic_close_and_cleanup
43
44#define bfd_elf64_bfd_debug_info_start bfd_void
45#define bfd_elf64_bfd_debug_info_end bfd_void
46#define bfd_elf64_bfd_debug_info_accumulate (PROTO(void,(*),(bfd*, struct sec *))) bfd_void
47#define bfd_elf64_bfd_get_relocated_section_contents \
48 bfd_generic_get_relocated_section_contents
49#define bfd_elf64_bfd_relax_section bfd_generic_relax_section
3adad029
KR
50#define bfd_elf64_bfd_make_debug_symbol \
51 ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
4c3721d5
ILT
52#ifndef bfd_elf64_bfd_link_hash_table_create
53#define bfd_elf64_bfd_link_hash_table_create \
54 _bfd_generic_link_hash_table_create
55#endif
56#ifndef bfd_elf64_bfd_link_add_symbols
57#define bfd_elf64_bfd_link_add_symbols _bfd_generic_link_add_symbols
58#endif
59#ifndef bfd_elf64_bfd_final_link
60#define bfd_elf64_bfd_final_link _bfd_generic_final_link
61#endif
3adad029 62
5b3577cb
JL
63#ifndef bfd_elf64_bfd_copy_private_section_data
64#define bfd_elf64_bfd_copy_private_section_data \
65 ((boolean (*) PARAMS ((bfd *, asection *, bfd *, asection *))) bfd_true)
66#endif
67#ifndef bfd_elf64_bfd_copy_private_bfd_data
68#define bfd_elf64_bfd_copy_private_bfd_data \
69 ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
70#endif
5b3577cb
JL
71#ifndef bfd_elf64_bfd_is_local_label
72#define bfd_elf64_bfd_is_local_label bfd_generic_is_local_label
73#endif
9deaaaf1
ILT
74#ifndef bfd_elf64_bfd_free_cached_info
75#define bfd_elf64_bfd_free_cached_info bfd_true
76#endif
5b3577cb 77
b3024965
KR
78#ifndef elf_info_to_howto_rel
79#define elf_info_to_howto_rel 0
80#endif
81
82#ifndef ELF_MAXPAGESIZE
83#define ELF_MAXPAGESIZE 1
84#endif
85
643e9fc7
ILT
86#ifndef elf_backend_sym_is_global
87#define elf_backend_sym_is_global 0
88#endif
a5ccdad1 89#ifndef elf_backend_object_p
643e9fc7 90#define elf_backend_object_p 0
a5ccdad1 91#endif
95469b02 92#ifndef elf_backend_symbol_processing
643e9fc7 93#define elf_backend_symbol_processing 0
95469b02
ILT
94#endif
95#ifndef elf_backend_symbol_table_processing
643e9fc7 96#define elf_backend_symbol_table_processing 0
95469b02
ILT
97#endif
98#ifndef elf_backend_section_processing
643e9fc7 99#define elf_backend_section_processing 0
95469b02
ILT
100#endif
101#ifndef elf_backend_section_from_shdr
643e9fc7 102#define elf_backend_section_from_shdr 0
95469b02
ILT
103#endif
104#ifndef elf_backend_fake_sections
643e9fc7 105#define elf_backend_fake_sections 0
95469b02
ILT
106#endif
107#ifndef elf_backend_section_from_bfd_section
643e9fc7
ILT
108#define elf_backend_section_from_bfd_section 0
109#endif
110#ifndef elf_backend_final_write_processing
111#define elf_backend_final_write_processing 0
95469b02
ILT
112#endif
113#ifndef elf_backend_ecoff_debug_swap
643e9fc7 114#define elf_backend_ecoff_debug_swap 0
95469b02
ILT
115#endif
116
3adad029
KR
117static CONST struct elf_backend_data elf64_bed =
118{
119#ifdef USE_REL
120 0, /* use_rela_p */
121#else
122 1, /* use_rela_p */
123#endif
95469b02 124 1, /* elf_64_p */
3adad029 125 ELF_ARCH, /* arch */
a5ccdad1 126 ELF_MACHINE_CODE, /* elf_machine_code */
95469b02 127 ELF_MAXPAGESIZE, /* maxpagesize */
643e9fc7
ILT
128 elf_info_to_howto,
129 elf_info_to_howto_rel,
130 elf_backend_sym_is_global,
131 elf_backend_object_p,
132 elf_backend_symbol_processing,
133 elf_backend_symbol_table_processing,
134 elf_backend_section_processing,
135 elf_backend_section_from_shdr,
136 elf_backend_fake_sections,
137 elf_backend_section_from_bfd_section,
138 elf_backend_ecoff_debug_swap
3adad029
KR
139};
140
141#ifdef TARGET_BIG_SYM
142bfd_target TARGET_BIG_SYM =
143{
144 /* name: identify kind of target */
145 TARGET_BIG_NAME,
146
147 /* flavour: general indication about file */
148 bfd_target_elf_flavour,
149
150 /* byteorder_big_p: data is big endian */
151 true,
152
153 /* header_byteorder_big_p: header is also big endian */
154 true,
155
156 /* object_flags: mask of all file flags */
157 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
158 DYNAMIC | WP_TEXT),
159
160 /* section_flags: mask of all section flags */
161 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
d6e5f950 162 SEC_CODE | SEC_DATA | SEC_DEBUGGING),
3adad029
KR
163
164 /* leading_symbol_char: is the first char of a user symbol
165 predictable, and if so what is it */
166 0,
167
168 /* ar_pad_char: pad character for filenames within an archive header
169 FIXME: this really has nothing to do with ELF, this is a characteristic
170 of the archiver and/or os and should be independently tunable */
171 '/',
172
173 /* ar_max_namelen: maximum number of characters in an archive header
174 FIXME: this really has nothing to do with ELF, this is a characteristic
175 of the archiver and should be independently tunable. This value is
176 a WAG (wild a** guess) */
177 15,
178
179 /* align_power_min: minimum alignment restriction for any section
180 FIXME: this value may be target machine dependent */
181 3,
182
183 /* Routines to byte-swap various sized integers from the data sections */
23f44e6f
ILT
184 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
185 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
186 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
3adad029
KR
187
188 /* Routines to byte-swap various sized integers from the file headers */
23f44e6f
ILT
189 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
190 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
191 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
3adad029
KR
192
193 /* bfd_check_format: check the format of a file being read */
194 { _bfd_dummy_target, /* unknown format */
195 bfd_elf64_object_p, /* assembler/linker output (object file) */
196 bfd_generic_archive_p, /* an archive */
197 bfd_elf64_core_file_p /* a core file */
198 },
199
200 /* bfd_set_format: set the format of a file being written */
201 { bfd_false,
202 bfd_elf_mkobject,
203 _bfd_generic_mkarchive,
204 bfd_false
205 },
206
207 /* bfd_write_contents: write cached information into a file being written */
208 { bfd_false,
209 bfd_elf64_write_object_contents,
210 _bfd_write_archive_contents,
211 bfd_false
212 },
213
214 /* Initialize a jump table with the standard macro. All names start with
215 "elf" */
216 JUMP_TABLE(bfd_elf64),
217
218 /* backend_data: */
219 (PTR) &elf64_bed,
220};
221#endif
222
223#ifdef TARGET_LITTLE_SYM
224bfd_target TARGET_LITTLE_SYM =
225{
226 /* name: identify kind of target */
227 TARGET_LITTLE_NAME,
228
229 /* flavour: general indication about file */
230 bfd_target_elf_flavour,
231
232 /* byteorder_big_p: data is big endian */
233 false, /* Nope -- this one's little endian */
234
235 /* header_byteorder_big_p: header is also big endian */
236 false, /* Nope -- this one's little endian */
237
238 /* object_flags: mask of all file flags */
239 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
240 DYNAMIC | WP_TEXT),
241
242 /* section_flags: mask of all section flags */
243 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
d6e5f950 244 SEC_CODE | SEC_DATA | SEC_DEBUGGING),
3adad029
KR
245
246 /* leading_symbol_char: is the first char of a user symbol
247 predictable, and if so what is it */
248 0,
249
250 /* ar_pad_char: pad character for filenames within an archive header
251 FIXME: this really has nothing to do with ELF, this is a characteristic
252 of the archiver and/or os and should be independently tunable */
253 '/',
254
255 /* ar_max_namelen: maximum number of characters in an archive header
256 FIXME: this really has nothing to do with ELF, this is a characteristic
257 of the archiver and should be independently tunable. This value is
258 a WAG (wild a** guess) */
259 15,
260
261 /* align_power_min: minimum alignment restriction for any section
262 FIXME: this value may be target machine dependent */
263 3,
264
265 /* Routines to byte-swap various sized integers from the data sections */
23f44e6f
ILT
266 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
267 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
268 bfd_getl16, bfd_getl_signed_16, bfd_putl16,
3adad029
KR
269
270 /* Routines to byte-swap various sized integers from the file headers */
23f44e6f
ILT
271 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
272 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
273 bfd_getl16, bfd_getl_signed_16, bfd_putl16,
3adad029
KR
274
275 /* bfd_check_format: check the format of a file being read */
276 { _bfd_dummy_target, /* unknown format */
277 bfd_elf64_object_p, /* assembler/linker output (object file) */
278 bfd_generic_archive_p, /* an archive */
279 bfd_elf64_core_file_p /* a core file */
280 },
281
282 /* bfd_set_format: set the format of a file being written */
283 { bfd_false,
284 bfd_elf_mkobject,
285 _bfd_generic_mkarchive,
286 bfd_false
287 },
288
289 /* bfd_write_contents: write cached information into a file being written */
290 { bfd_false,
291 bfd_elf64_write_object_contents,
292 _bfd_write_archive_contents,
293 bfd_false
294 },
295
296 /* Initialize a jump table with the standard macro. All names start with
297 "elf" */
298 JUMP_TABLE(bfd_elf64),
299
300 /* backend_data: */
301 (PTR) &elf64_bed,
302};
303#endif
This page took 0.070553 seconds and 4 git commands to generate.