* targets.c (bfd_target): Make ar_max_namelen an unsigned char.
[deliverable/binutils-gdb.git] / bfd / coff-or32.c
CommitLineData
3b16e843 1/* BFD back-end for OpenRISC 1000 COFF binaries.
0aabe54e 2 Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011
2b5c217d 3 Free Software Foundation, Inc.
3b16e843
NC
4 Contributed by Ivan Guzvinec <ivang@opencores.org>
5
6 This file is part of BFD, the Binary File Descriptor library.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
cd123cb7 10 the Free Software Foundation; either version 3 of the License, or
3b16e843
NC
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
cd123cb7
NC
20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21 MA 02110-1301, USA. */
3b16e843
NC
22
23#define OR32 1
24
3b16e843 25#include "sysdep.h"
3db64b00 26#include "bfd.h"
3b16e843
NC
27#include "libbfd.h"
28#include "coff/or32.h"
29#include "coff/internal.h"
30#include "libcoff.h"
31
b34976b6
AM
32static long get_symbol_value
33 PARAMS ((asymbol *));
34static bfd_reloc_status_type or32_reloc
35 PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
36static bfd_boolean coff_or32_relocate_section
37 PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
38 struct internal_reloc *, struct internal_syment *, asection **));
39static bfd_boolean coff_or32_adjust_symndx
40 PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
41 struct internal_reloc *, bfd_boolean *));
42static void reloc_processing
43 PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
3b16e843
NC
44
45#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
46
47#define INSERT_HWORD(WORD,HWORD) \
48 (((WORD) & 0xffff0000) | ((HWORD)& 0x0000ffff))
49#define EXTRACT_HWORD(WORD) \
50 ((WORD) & 0x0000ffff)
51#define SIGN_EXTEND_HWORD(HWORD) \
52 ((HWORD) & 0x8000 ? (HWORD)|(~0xffffL) : (HWORD))
53
54#define INSERT_JUMPTARG(WORD,JT) \
55 (((WORD) & 0xfc000000) | ((JT)& 0x03ffffff))
56#define EXTRACT_JUMPTARG(WORD) \
57 ((WORD) & 0x03ffffff)
58#define SIGN_EXTEND_JUMPTARG(JT) \
59 ((JT) & 0x04000000 ? (JT)|(~0x03ffffffL) : (JT))
60
61/* Provided the symbol, returns the value reffed. */
62
63static long
b34976b6 64get_symbol_value (symbol)
3b16e843 65 asymbol *symbol;
b34976b6 66{
3b16e843
NC
67 long relocation = 0;
68
69 if (bfd_is_com_section (symbol->section))
b34976b6
AM
70 relocation = 0;
71 else
3b16e843
NC
72 relocation = symbol->value +
73 symbol->section->output_section->vma +
74 symbol->section->output_offset;
75
76 return relocation;
77}
78
79/* This function is in charge of performing all the or32 relocations. */
80
81static bfd_reloc_status_type
82or32_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
83 error_message)
84 bfd *abfd;
85 arelent *reloc_entry;
86 asymbol *symbol_in;
87 PTR data;
88 asection *input_section;
89 bfd *output_bfd;
90 char **error_message;
91{
92 /* The consth relocation comes in two parts, we have to remember
93 the state between calls, in these variables. */
b34976b6 94 static bfd_boolean part1_consth_active = FALSE;
3b16e843
NC
95 static unsigned long part1_consth_value;
96
97 unsigned long insn;
98 unsigned long sym_value;
99 unsigned long unsigned_value;
100 unsigned short r_type;
101 long signed_value;
102
103 unsigned long addr = reloc_entry->address ; /*+ input_section->vma*/
104 bfd_byte *hit_data =addr + (bfd_byte *)(data);
b34976b6 105
3b16e843
NC
106 r_type = reloc_entry->howto->type;
107
b34976b6 108 if (output_bfd)
3b16e843
NC
109 {
110 /* Partial linking - do nothing. */
111 reloc_entry->address += input_section->output_offset;
112 return bfd_reloc_ok;
113 }
114
115 if (symbol_in != NULL
116 && bfd_is_und_section (symbol_in->section))
117 {
118 /* Keep the state machine happy in case we're called again. */
b34976b6 119 if (r_type == R_IHIHALF)
3b16e843 120 {
b34976b6 121 part1_consth_active = TRUE;
3b16e843
NC
122 part1_consth_value = 0;
123 }
124
125 return bfd_reloc_undefined;
126 }
127
b34976b6 128 if ((part1_consth_active) && (r_type != R_IHCONST))
3b16e843 129 {
b34976b6 130 part1_consth_active = FALSE;
3b16e843
NC
131 *error_message = (char *) "Missing IHCONST";
132
133 return bfd_reloc_dangerous;
134 }
135
136 sym_value = get_symbol_value (symbol_in);
137
b34976b6 138 switch (r_type)
3b16e843 139 {
b34976b6
AM
140 case R_IREL:
141 insn = bfd_get_32(abfd, hit_data);
3b16e843
NC
142
143 /* Take the value in the field and sign extend it. */
144 signed_value = EXTRACT_JUMPTARG (insn);
145 signed_value = SIGN_EXTEND_JUMPTARG (signed_value);
146 signed_value <<= 2;
147
148 /* See the note on the R_IREL reloc in coff_or32_relocate_section. */
149 if (signed_value == - (long) reloc_entry->address)
150 signed_value = 0;
151
152 signed_value += sym_value + reloc_entry->addend;
0e71e495
BE
153 /* Relative jmp/call, so subtract from the value the
154 address of the place we're coming from. */
155 signed_value -= (reloc_entry->address
156 + input_section->output_section->vma
157 + input_section->output_offset);
158 if (signed_value > 0x7ffffff || signed_value < -0x8000000)
159 return bfd_reloc_overflow;
160
3b16e843
NC
161 signed_value >>= 2;
162 insn = INSERT_JUMPTARG (insn, signed_value);
b34976b6 163 bfd_put_32 (abfd, insn, hit_data);
3b16e843
NC
164 break;
165
b34976b6
AM
166 case R_ILOHALF:
167 insn = bfd_get_32 (abfd, hit_data);
3b16e843
NC
168 unsigned_value = EXTRACT_HWORD (insn);
169 unsigned_value += sym_value + reloc_entry->addend;
170 insn = INSERT_HWORD (insn, unsigned_value);
b34976b6 171 bfd_put_32 (abfd, insn, hit_data);
3b16e843
NC
172 break;
173
174 case R_IHIHALF:
b34976b6 175 insn = bfd_get_32 (abfd, hit_data);
3b16e843 176
b34976b6 177 /* consth, part 1
3b16e843 178 Just get the symbol value that is referenced. */
b34976b6 179 part1_consth_active = TRUE;
3b16e843
NC
180 part1_consth_value = sym_value + reloc_entry->addend;
181
182 /* Don't modify insn until R_IHCONST. */
183 break;
184
b34976b6
AM
185 case R_IHCONST:
186 insn = bfd_get_32 (abfd, hit_data);
3b16e843 187
b34976b6 188 /* consth, part 2
3b16e843 189 Now relocate the reference. */
b34976b6 190 if (! part1_consth_active)
3b16e843
NC
191 {
192 *error_message = (char *) "Missing IHIHALF";
193 return bfd_reloc_dangerous;
194 }
195
196 /* sym_ptr_ptr = r_symndx, in coff_slurp_reloc_table() */
197 unsigned_value = 0; /*EXTRACT_HWORD(insn) << 16;*/
198 unsigned_value += reloc_entry->addend; /* r_symndx */
199 unsigned_value += part1_consth_value;
200 unsigned_value = unsigned_value >> 16;
201 insn = INSERT_HWORD (insn, unsigned_value);
b34976b6
AM
202 part1_consth_active = FALSE;
203 bfd_put_32 (abfd, insn, hit_data);
3b16e843
NC
204 break;
205
206 case R_BYTE:
b34976b6
AM
207 insn = bfd_get_8 (abfd, hit_data);
208 unsigned_value = insn + sym_value + reloc_entry->addend;
3b16e843
NC
209 if (unsigned_value & 0xffffff00)
210 return bfd_reloc_overflow;
b34976b6 211 bfd_put_8 (abfd, unsigned_value, hit_data);
3b16e843
NC
212 break;
213
214 case R_HWORD:
b34976b6
AM
215 insn = bfd_get_16 (abfd, hit_data);
216 unsigned_value = insn + sym_value + reloc_entry->addend;
3b16e843
NC
217 if (unsigned_value & 0xffff0000)
218 return bfd_reloc_overflow;
b34976b6 219 bfd_put_16 (abfd, insn, hit_data);
3b16e843
NC
220 break;
221
222 case R_WORD:
b34976b6
AM
223 insn = bfd_get_32 (abfd, hit_data);
224 insn += sym_value + reloc_entry->addend;
3b16e843
NC
225 bfd_put_32 (abfd, insn, hit_data);
226 break;
227
228 default:
229 *error_message = _("Unrecognized reloc");
230 return bfd_reloc_dangerous;
231 }
232
233 return bfd_reloc_ok;
234}
235
236/* type rightshift
237 size
238 bitsize
239 pc-relative
240 bitpos
241 absolute
242 complain_on_overflow
243 special_function
244 relocation name
b34976b6 245 partial_inplace
3b16e843
NC
246 src_mask
247*/
248
249/* FIXME: I'm not real sure about this table. */
b34976b6 250static reloc_howto_type howto_table[] =
3b16e843 251{
b34976b6 252 { R_ABS, 0, 3, 32, FALSE, 0, complain_overflow_bitfield, or32_reloc, "ABS", TRUE, 0xffffffff,0xffffffff, FALSE },
5e37cc46
NC
253 EMPTY_HOWTO (1),
254 EMPTY_HOWTO (2),
255 EMPTY_HOWTO (3),
256 EMPTY_HOWTO (4),
257 EMPTY_HOWTO (5),
258 EMPTY_HOWTO (6),
259 EMPTY_HOWTO (7),
260 EMPTY_HOWTO (8),
261 EMPTY_HOWTO (9),
262 EMPTY_HOWTO (10),
263 EMPTY_HOWTO (11),
264 EMPTY_HOWTO (12),
265 EMPTY_HOWTO (13),
266 EMPTY_HOWTO (14),
267 EMPTY_HOWTO (15),
268 EMPTY_HOWTO (16),
269 EMPTY_HOWTO (17),
270 EMPTY_HOWTO (18),
271 EMPTY_HOWTO (19),
272 EMPTY_HOWTO (20),
273 EMPTY_HOWTO (21),
274 EMPTY_HOWTO (22),
275 EMPTY_HOWTO (23),
b34976b6
AM
276 { R_IREL, 0, 3, 32, TRUE, 0, complain_overflow_signed, or32_reloc, "IREL", TRUE, 0xffffffff,0xffffffff, FALSE },
277 { R_IABS, 0, 3, 32, FALSE, 0, complain_overflow_bitfield, or32_reloc, "IABS", TRUE, 0xffffffff,0xffffffff, FALSE },
278 { R_ILOHALF, 0, 3, 16, TRUE, 0, complain_overflow_signed, or32_reloc, "ILOHALF", TRUE, 0x0000ffff,0x0000ffff, FALSE },
279 { R_IHIHALF, 0, 3, 16, TRUE, 16,complain_overflow_signed, or32_reloc, "IHIHALF", TRUE, 0xffff0000,0xffff0000, FALSE },
280 { R_IHCONST, 0, 3, 16, TRUE, 0, complain_overflow_signed, or32_reloc, "IHCONST", TRUE, 0xffff0000,0xffff0000, FALSE },
281 { R_BYTE, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, or32_reloc, "BYTE", TRUE, 0x000000ff,0x000000ff, FALSE },
282 { R_HWORD, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, or32_reloc, "HWORD", TRUE, 0x0000ffff,0x0000ffff, FALSE },
283 { R_WORD, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, or32_reloc, "WORD", TRUE, 0xffffffff,0xffffffff, FALSE },
3b16e843
NC
284};
285
286#define BADMAG(x) OR32BADMAG (x)
287
288#define RELOC_PROCESSING(relent, reloc, symbols, abfd, section) \
289 reloc_processing (relent, reloc, symbols, abfd, section)
290
291static void
292reloc_processing (relent,reloc, symbols, abfd, section)
293 arelent *relent;
294 struct internal_reloc *reloc;
295 asymbol **symbols;
296 bfd *abfd;
297 asection *section;
298{
299 static bfd_vma ihihalf_vaddr = (bfd_vma) -1;
300
b34976b6 301 relent->address = reloc->r_vaddr;
3b16e843
NC
302 relent->howto = howto_table + reloc->r_type;
303
b34976b6
AM
304 if (reloc->r_type == R_IHCONST)
305 {
3b16e843
NC
306 /* The address of an R_IHCONST should always be the address of
307 the immediately preceding R_IHIHALF. relocs generated by gas
308 are correct, but relocs generated by High C are different (I
309 can't figure out what the address means for High C). We can
310 handle both gas and High C by ignoring the address here, and
311 simply reusing the address saved for R_IHIHALF. */
312 if (ihihalf_vaddr == (bfd_vma) -1)
313 abort ();
314
315 relent->address = ihihalf_vaddr;
316 ihihalf_vaddr = (bfd_vma) -1;
317 relent->addend = reloc->r_symndx;
318 relent->sym_ptr_ptr= bfd_abs_section_ptr->symbol_ptr_ptr;
319 }
320 else
321 {
3b16e843 322 relent->sym_ptr_ptr = symbols + obj_convert (abfd)[reloc->r_symndx];
3b16e843
NC
323 relent->addend = 0;
324 relent->address-= section->vma;
325
326 if (reloc->r_type == R_IHIHALF)
327 ihihalf_vaddr = relent->address;
328 else if (ihihalf_vaddr != (bfd_vma) -1)
329 abort ();
330 }
331}
332
333/* The reloc processing routine for the optimized COFF linker. */
334
b34976b6 335static bfd_boolean
3b16e843
NC
336coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
337 contents, relocs, syms, sections)
5e37cc46 338 bfd *output_bfd ATTRIBUTE_UNUSED;
3b16e843
NC
339 struct bfd_link_info *info;
340 bfd *input_bfd;
341 asection *input_section;
342 bfd_byte *contents;
343 struct internal_reloc *relocs;
344 struct internal_syment *syms;
345 asection **sections;
346{
347 struct internal_reloc *rel;
348 struct internal_reloc *relend;
b34976b6 349 bfd_boolean hihalf;
3b16e843
NC
350 bfd_vma hihalf_val;
351
1049f94e 352 /* If we are performing a relocatable link, we don't need to do a
3b16e843
NC
353 thing. The caller will take care of adjusting the reloc
354 addresses and symbol indices. */
1049f94e 355 if (info->relocatable)
b34976b6 356 return TRUE;
3b16e843 357
b34976b6 358 hihalf = FALSE;
3b16e843
NC
359 hihalf_val = 0;
360
361 rel = relocs;
362 relend = rel + input_section->reloc_count;
363
364 for (; rel < relend; rel++)
365 {
366 long symndx;
367 bfd_byte *loc;
368 struct coff_link_hash_entry *h;
369 struct internal_syment *sym;
370 asection *sec;
371 bfd_vma val;
b34976b6 372 bfd_boolean overflow;
3b16e843
NC
373 unsigned long insn;
374 long signed_value;
375 unsigned long unsigned_value;
376 bfd_reloc_status_type rstat;
377
378 symndx = rel->r_symndx;
379 loc = contents + rel->r_vaddr - input_section->vma;
380
381 if (symndx == -1 || rel->r_type == R_IHCONST)
382 h = NULL;
383 else
384 h = obj_coff_sym_hashes (input_bfd)[symndx];
385
386 sym = NULL;
387 sec = NULL;
388 val = 0;
389
390 /* An R_IHCONST reloc does not have a symbol. Instead, the
391 symbol index is an addend. R_IHCONST is always used in
392 conjunction with R_IHHALF. */
393 if (rel->r_type != R_IHCONST)
394 {
395 if (h == NULL)
396 {
397 if (symndx == -1)
398 sec = bfd_abs_section_ptr;
399 else
400 {
401 sym = syms + symndx;
402 sec = sections[symndx];
403 val = (sec->output_section->vma
404 + sec->output_offset
405 + sym->n_value
406 - sec->vma);
407 }
408 }
409 else
410 {
411 if (h->root.type == bfd_link_hash_defined
412 || h->root.type == bfd_link_hash_defweak)
413 {
414 sec = h->root.u.def.section;
415 val = (h->root.u.def.value
416 + sec->output_section->vma
417 + sec->output_offset);
418 }
419 else
420 {
421 if (! ((*info->callbacks->undefined_symbol)
422 (info, h->root.root.string, input_bfd, input_section,
b34976b6
AM
423 rel->r_vaddr - input_section->vma, TRUE)))
424 return FALSE;
3b16e843
NC
425 }
426 }
427
428 if (hihalf)
429 {
430 if (! ((*info->callbacks->reloc_dangerous)
431 (info, "missing IHCONST reloc", input_bfd,
432 input_section, rel->r_vaddr - input_section->vma)))
b34976b6
AM
433 return FALSE;
434 hihalf = FALSE;
3b16e843
NC
435 }
436 }
437
b34976b6 438 overflow = FALSE;
3b16e843
NC
439
440 switch (rel->r_type)
441 {
442 default:
443 bfd_set_error (bfd_error_bad_value);
b34976b6 444 return FALSE;
3b16e843
NC
445
446 case R_IREL:
447 insn = bfd_get_32 (input_bfd, loc);
448
449 /* Extract the addend. */
450 signed_value = EXTRACT_JUMPTARG (insn);
451 signed_value = SIGN_EXTEND_JUMPTARG (signed_value);
452 signed_value <<= 2;
453
454 /* Determine the destination of the jump. */
455 signed_value += val;
456
0e71e495
BE
457 /* Make the destination PC relative. */
458 signed_value -= (input_section->output_section->vma
459 + input_section->output_offset
460 + (rel->r_vaddr - input_section->vma));
461 if (signed_value > 0x7ffffff || signed_value < - 0x8000000)
462 {
463 overflow = TRUE;
464 signed_value = 0;
465 }
3b16e843
NC
466
467 /* Put the adjusted value back into the instruction. */
468 signed_value >>= 2;
469 insn = INSERT_JUMPTARG(insn, signed_value);
470
471 bfd_put_32 (input_bfd, (bfd_vma) insn, loc);
472 break;
473
474 case R_ILOHALF:
475 insn = bfd_get_32 (input_bfd, loc);
476 unsigned_value = EXTRACT_HWORD (insn);
477 unsigned_value += val;
478 insn = INSERT_HWORD (insn, unsigned_value);
479 bfd_put_32 (input_bfd, insn, loc);
480 break;
481
482 case R_IHIHALF:
483 /* Save the value for the R_IHCONST reloc. */
b34976b6 484 hihalf = TRUE;
3b16e843
NC
485 hihalf_val = val;
486 break;
487
488 case R_IHCONST:
489 if (! hihalf)
490 {
491 if (! ((*info->callbacks->reloc_dangerous)
492 (info, "missing IHIHALF reloc", input_bfd,
493 input_section, rel->r_vaddr - input_section->vma)))
b34976b6 494 return FALSE;
3b16e843
NC
495 hihalf_val = 0;
496 }
497
498 insn = bfd_get_32 (input_bfd, loc);
499 unsigned_value = rel->r_symndx + hihalf_val;
500 unsigned_value >>= 16;
501 insn = INSERT_HWORD (insn, unsigned_value);
502 bfd_put_32 (input_bfd, (bfd_vma) insn, loc);
503
b34976b6 504 hihalf = FALSE;
3b16e843
NC
505 break;
506
507 case R_BYTE:
508 case R_HWORD:
509 case R_WORD:
510 rstat = _bfd_relocate_contents (howto_table + rel->r_type,
511 input_bfd, val, loc);
512 if (rstat == bfd_reloc_overflow)
b34976b6 513 overflow = TRUE;
3b16e843
NC
514 else if (rstat != bfd_reloc_ok)
515 abort ();
516 break;
517 }
518
519 if (overflow)
520 {
521 const char *name;
522 char buf[SYMNMLEN + 1];
523
524 if (symndx == -1)
525 name = "*ABS*";
526 else if (h != NULL)
dfeffb9f 527 name = NULL;
3b16e843
NC
528 else if (sym == NULL)
529 name = "*unknown*";
530 else if (sym->_n._n_n._n_zeroes == 0
531 && sym->_n._n_n._n_offset != 0)
532 name = obj_coff_strings (input_bfd) + sym->_n._n_n._n_offset;
533 else
534 {
535 strncpy (buf, sym->_n._n_name, SYMNMLEN);
536 buf[SYMNMLEN] = '\0';
537 name = buf;
538 }
539
540 if (! ((*info->callbacks->reloc_overflow)
dfeffb9f
L
541 (info, (h ? &h->root : NULL), name,
542 howto_table[rel->r_type].name, (bfd_vma) 0, input_bfd,
543 input_section, rel->r_vaddr - input_section->vma)))
b34976b6 544 return FALSE;
3b16e843 545 }
b34976b6 546 }
3b16e843 547
b34976b6 548 return TRUE;
3b16e843
NC
549}
550
551#define coff_relocate_section coff_or32_relocate_section
552
553/* We don't want to change the symndx of a R_IHCONST reloc, since it
554 is actually an addend, not a symbol index at all. */
555
b34976b6 556static bfd_boolean
3b16e843
NC
557coff_or32_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
558 bfd *obfd ATTRIBUTE_UNUSED;
559 struct bfd_link_info *info ATTRIBUTE_UNUSED;
560 bfd *ibfd ATTRIBUTE_UNUSED;
561 asection *sec ATTRIBUTE_UNUSED;
562 struct internal_reloc *irel;
b34976b6 563 bfd_boolean *adjustedp;
3b16e843
NC
564{
565 if (irel->r_type == R_IHCONST)
b34976b6 566 *adjustedp = TRUE;
3b16e843 567 else
b34976b6
AM
568 *adjustedp = FALSE;
569 return TRUE;
3b16e843
NC
570}
571
572#define coff_adjust_symndx coff_or32_adjust_symndx
573
2b5c217d
NC
574#ifndef bfd_pe_print_pdata
575#define bfd_pe_print_pdata NULL
576#endif
577
3b16e843
NC
578#include "coffcode.h"
579
580const bfd_target or32coff_big_vec =
581{
582 "coff-or32-big", /* Name. */
583 bfd_target_coff_flavour,
584 BFD_ENDIAN_BIG, /* Data byte order is big. */
585 BFD_ENDIAN_BIG, /* Header byte order is big. */
586
587 (HAS_RELOC | EXEC_P | /* Object flags. */
588 HAS_LINENO | HAS_DEBUG |
589 HAS_SYMS | HAS_LOCALS | WP_TEXT),
590
591 (SEC_HAS_CONTENTS | SEC_ALLOC | /* Section flags. */
b34976b6 592 SEC_LOAD | SEC_RELOC |
3b16e843
NC
593 SEC_READONLY ),
594 '_', /* Leading underscore. */
595 '/', /* ar_pad_char. */
596 15, /* ar_max_namelen. */
0aabe54e 597 0, /* match priority. */
3b16e843
NC
598
599 /* Data. */
600 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
601 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
602 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
603
604 /* Headers. */
605 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
606 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
607 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
608
b34976b6 609 {
3b16e843
NC
610 _bfd_dummy_target,
611 coff_object_p,
612 bfd_generic_archive_p,
613 _bfd_dummy_target
614 },
615 {
616 bfd_false,
617 coff_mkobject,
618 _bfd_generic_mkarchive,
619 bfd_false
620 },
621 {
622 bfd_false,
623 coff_write_object_contents,
624 _bfd_write_archive_contents,
625 bfd_false
626 },
627
628 BFD_JUMP_TABLE_GENERIC (coff),
629 BFD_JUMP_TABLE_COPY (coff),
630 BFD_JUMP_TABLE_CORE (_bfd_nocore),
631 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
632 BFD_JUMP_TABLE_SYMBOLS (coff),
633 BFD_JUMP_TABLE_RELOCS (coff),
634 BFD_JUMP_TABLE_WRITE (coff),
635 BFD_JUMP_TABLE_LINK (coff),
636 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
b34976b6 637
3b16e843
NC
638 /* Alternative_target. */
639#ifdef TARGET_LITTLE_SYM
640 & TARGET_LITTLE_SYM,
641#else
642 NULL,
643#endif
644
645 COFF_SWAP_TABLE
646};
This page took 0.526416 seconds and 4 git commands to generate.