1 /* BFD back-end for Intel 386 COFF files.
2 Copyright (C) 1990-2024 Free Software Foundation, Inc.
3 Written by Cygnus Support.
5 This file is part of BFD, the Binary File Descriptor library.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20 MA 02110-1301, USA. */
26 #include "coff/i386.h"
28 #include "coff/internal.h"
34 #ifndef bfd_pe_print_pdata
35 #define bfd_pe_print_pdata NULL
40 /* All users of this file have bfd_octets_per_byte (abfd, sec) == 1. */
41 #define OCTETS_PER_BYTE(ABFD, SEC) 1
43 static reloc_howto_type
*coff_i386_rtype_to_howto
44 (bfd
*, asection
*, struct internal_reloc
*,
45 struct coff_link_hash_entry
*, struct internal_syment
*,
47 static reloc_howto_type
*coff_i386_reloc_type_lookup
48 (bfd
*, bfd_reloc_code_real_type
);
50 #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
51 /* The page size is a guess based on ELF. */
53 #define COFF_PAGE_SIZE 0x1000
55 /* For some reason when using i386 COFF the value stored in the .text
56 section for a reference to a common symbol is the value itself plus
57 any desired offset. Ian Taylor, Cygnus Support. */
59 /* If we are producing relocatable output, we need to do some
60 adjustments to the object file that are not done by the
61 bfd_perform_relocation function. This function is called by every
62 reloc type to make any required adjustments. */
64 static bfd_reloc_status_type
65 coff_i386_reloc (bfd
*abfd
,
69 asection
*input_section
,
71 char **error_message ATTRIBUTE_UNUSED
)
76 if (output_bfd
== (bfd
*) NULL
)
77 return bfd_reloc_continue
;
80 if (bfd_is_com_section (symbol
->section
))
83 /* We are relocating a common symbol. The current value in the
84 object file is ORIG + OFFSET, where ORIG is the value of the
85 common symbol as seen by the object file when it was compiled
86 (this may be zero if the symbol was undefined) and OFFSET is
87 the offset into the common symbol (normally zero, but may be
88 non-zero when referring to a field in a common structure).
89 ORIG is the negative of reloc_entry->addend, which is set by
90 the CALC_ADDEND macro below. We want to replace the value in
91 the object file with NEW + OFFSET, where NEW is the value of
92 the common symbol which we are going to put in the final
93 object file. NEW is symbol->value. */
94 diff
= symbol
->value
+ reloc_entry
->addend
;
96 /* In PE mode, we do not offset the common symbol. */
97 diff
= reloc_entry
->addend
;
102 /* For some reason bfd_perform_relocation always effectively
103 ignores the addend for a COFF target when producing
104 relocatable output. This seems to be always wrong for 386
105 COFF, so we handle the addend here instead. */
107 if (output_bfd
== (bfd
*) NULL
)
109 reloc_howto_type
*howto
= reloc_entry
->howto
;
111 /* Although PC relative relocations are very similar between
112 PE and non-PE formats, but they are off by howto->size
113 bytes. For the external relocation, PE is very different
114 from others. See md_apply_fix3 () in gas/config/tc-i386.c.
115 When we link PE and non-PE object files together to
116 generate a non-PE executable, we have to compensate it
118 if (howto
->pc_relative
&& howto
->pcrel_offset
)
119 diff
= -bfd_get_reloc_size (howto
);
120 else if (symbol
->flags
& BSF_WEAK
)
121 diff
= reloc_entry
->addend
- symbol
->value
;
123 diff
= -reloc_entry
->addend
;
127 diff
= reloc_entry
->addend
;
131 /* FIXME: How should this case be handled? */
132 if (reloc_entry
->howto
->type
== R_IMAGEBASE
133 && output_bfd
!= NULL
134 && bfd_get_flavour(output_bfd
) == bfd_target_coff_flavour
)
135 diff
-= pe_data (output_bfd
)->pe_opthdr
.ImageBase
;
139 x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask))
143 reloc_howto_type
*howto
= reloc_entry
->howto
;
144 bfd_size_type octets
= (reloc_entry
->address
145 * OCTETS_PER_BYTE (abfd
, input_section
));
146 unsigned char *addr
= (unsigned char *) data
+ octets
;
148 if (!bfd_reloc_offset_in_range (howto
, abfd
, input_section
, octets
))
149 return bfd_reloc_outofrange
;
151 switch (bfd_get_reloc_size (howto
))
155 char x
= bfd_get_8 (abfd
, addr
);
157 bfd_put_8 (abfd
, x
, addr
);
163 short x
= bfd_get_16 (abfd
, addr
);
165 bfd_put_16 (abfd
, (bfd_vma
) x
, addr
);
171 long x
= bfd_get_32 (abfd
, addr
);
173 bfd_put_32 (abfd
, (bfd_vma
) x
, addr
);
182 /* Now let bfd_perform_relocation finish everything up. */
183 return bfd_reloc_continue
;
187 /* Return TRUE if this relocation should appear in the output .reloc
191 in_reloc_p (bfd
*abfd ATTRIBUTE_UNUSED
, reloc_howto_type
*howto
)
193 return ! howto
->pc_relative
194 && howto
->type
!= R_IMAGEBASE
195 && howto
->type
!= R_SECREL32
196 && howto
->type
!= R_SECTION
;
198 #endif /* COFF_WITH_PE */
201 #define PCRELOFFSET false
204 static reloc_howto_type howto_table
[] =
212 HOWTO (R_DIR32
, /* type */
216 false, /* pc_relative */
218 complain_overflow_bitfield
, /* complain_on_overflow */
219 coff_i386_reloc
, /* special_function */
221 true, /* partial_inplace */
222 0xffffffff, /* src_mask */
223 0xffffffff, /* dst_mask */
224 true), /* pcrel_offset */
225 /* PE IMAGE_REL_I386_DIR32NB relocation (7). */
226 HOWTO (R_IMAGEBASE
, /* type */
230 false, /* pc_relative */
232 complain_overflow_bitfield
, /* complain_on_overflow */
233 coff_i386_reloc
, /* special_function */
235 true, /* partial_inplace */
236 0xffffffff, /* src_mask */
237 0xffffffff, /* dst_mask */
238 false), /* pcrel_offset */
242 /* 16-bit word section relocation (012). */
243 HOWTO (R_SECTION
, /* type */
247 false, /* pc_relative */
249 complain_overflow_bitfield
, /* complain_on_overflow */
250 coff_i386_reloc
, /* special_function */
252 true, /* partial_inplace */
253 0xffffffff, /* src_mask */
254 0xffffffff, /* dst_mask */
255 true), /* pcrel_offset */
256 /* 32-bit longword section relative relocation (013). */
257 HOWTO (R_SECREL32
, /* type */
261 false, /* pc_relative */
263 complain_overflow_bitfield
, /* complain_on_overflow */
264 coff_i386_reloc
, /* special_function */
265 "secrel32", /* name */
266 true, /* partial_inplace */
267 0xffffffff, /* src_mask */
268 0xffffffff, /* dst_mask */
269 true), /* pcrel_offset */
277 /* Byte relocation (017). */
278 HOWTO (R_RELBYTE
, /* type */
282 false, /* pc_relative */
284 complain_overflow_bitfield
, /* complain_on_overflow */
285 coff_i386_reloc
, /* special_function */
287 true, /* partial_inplace */
288 0x000000ff, /* src_mask */
289 0x000000ff, /* dst_mask */
290 PCRELOFFSET
), /* pcrel_offset */
291 /* 16-bit word relocation (020). */
292 HOWTO (R_RELWORD
, /* type */
296 false, /* pc_relative */
298 complain_overflow_bitfield
, /* complain_on_overflow */
299 coff_i386_reloc
, /* special_function */
301 true, /* partial_inplace */
302 0x0000ffff, /* src_mask */
303 0x0000ffff, /* dst_mask */
304 PCRELOFFSET
), /* pcrel_offset */
305 /* 32-bit longword relocation (021). */
306 HOWTO (R_RELLONG
, /* type */
310 false, /* pc_relative */
312 complain_overflow_bitfield
, /* complain_on_overflow */
313 coff_i386_reloc
, /* special_function */
315 true, /* partial_inplace */
316 0xffffffff, /* src_mask */
317 0xffffffff, /* dst_mask */
318 PCRELOFFSET
), /* pcrel_offset */
319 /* Byte PC relative relocation (022). */
320 HOWTO (R_PCRBYTE
, /* type */
324 true, /* pc_relative */
326 complain_overflow_signed
, /* complain_on_overflow */
327 coff_i386_reloc
, /* special_function */
329 true, /* partial_inplace */
330 0x000000ff, /* src_mask */
331 0x000000ff, /* dst_mask */
332 PCRELOFFSET
), /* pcrel_offset */
333 /* 16-bit word PC relative relocation (023). */
334 HOWTO (R_PCRWORD
, /* type */
338 true, /* pc_relative */
340 complain_overflow_signed
, /* complain_on_overflow */
341 coff_i386_reloc
, /* special_function */
343 true, /* partial_inplace */
344 0x0000ffff, /* src_mask */
345 0x0000ffff, /* dst_mask */
346 PCRELOFFSET
), /* pcrel_offset */
347 /* 32-bit longword PC relative relocation (024). */
348 HOWTO (R_PCRLONG
, /* type */
352 true, /* pc_relative */
354 complain_overflow_signed
, /* complain_on_overflow */
355 coff_i386_reloc
, /* special_function */
357 true, /* partial_inplace */
358 0xffffffff, /* src_mask */
359 0xffffffff, /* dst_mask */
360 PCRELOFFSET
) /* pcrel_offset */
363 #define NUM_HOWTOS (sizeof (howto_table) / sizeof (howto_table[0]))
365 /* Turn a howto into a reloc nunmber */
367 #define SELECT_RELOC(x,howto) { x.r_type = howto->type; }
368 #define BADMAG(x) I386BADMAG(x)
369 #define I386 1 /* Customize coffcode.h */
371 #define RTYPE2HOWTO(cache_ptr, dst) \
372 ((cache_ptr)->howto = \
373 ((dst)->r_type < NUM_HOWTOS \
374 ? howto_table + (dst)->r_type \
377 /* For 386 COFF a STYP_NOLOAD | STYP_BSS section is part of a shared
378 library. On some other COFF targets STYP_BSS is normally
380 #define BSS_NOLOAD_IS_SHARED_LIBRARY
382 /* Compute the addend of a reloc. If the reloc is to a common symbol,
383 the object file contains the value of the common symbol. By the
384 time this is called, the linker may be using a different symbol
385 from a different object file with a different value. Therefore, we
386 hack wildly to locate the original symbol from this file so that we
387 can make the correct adjustment. This macro sets coffsym to the
388 symbol from the original file, and uses it to set the addend value
389 correctly. If this is not a common symbol, the usual addend
390 calculation is done, except that an additional tweak is needed for
392 FIXME: This macro refers to symbols and asect; these are from the
393 calling function, not the macro arguments. */
395 #define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) \
397 coff_symbol_type *coffsym = (coff_symbol_type *) NULL; \
398 if (ptr && bfd_asymbol_bfd (ptr) != abfd) \
399 coffsym = (obj_symbols (abfd) \
400 + (cache_ptr->sym_ptr_ptr - symbols)); \
402 coffsym = coff_symbol_from (ptr); \
403 if (coffsym != (coff_symbol_type *) NULL \
404 && coffsym->native->u.syment.n_scnum == 0) \
405 cache_ptr->addend = - coffsym->native->u.syment.n_value; \
406 else if (ptr && bfd_asymbol_bfd (ptr) == abfd \
407 && ptr->section != (asection *) NULL) \
408 cache_ptr->addend = - (ptr->section->vma \
409 + COFF_PE_ADDEND_BIAS (ptr)); \
411 cache_ptr->addend = 0; \
412 if (ptr && reloc.r_type < NUM_HOWTOS \
413 && howto_table[reloc.r_type].pc_relative) \
414 cache_ptr->addend += asect->vma; \
417 /* We use the special COFF backend linker. For normal i386 COFF, we
418 can use the generic relocate_section routine. For PE, we need our
423 #define coff_relocate_section _bfd_coff_generic_relocate_section
425 #else /* COFF_WITH_PE */
427 /* The PE relocate section routine. We handle secidx relocations here,
428 as well as making sure that we don't do anything for a relocatable
432 coff_pe_i386_relocate_section (bfd
*output_bfd
,
433 struct bfd_link_info
*info
,
435 asection
*input_section
,
437 struct internal_reloc
*relocs
,
438 struct internal_syment
*syms
,
441 struct internal_reloc
*rel
;
442 struct internal_reloc
*relend
;
444 if (bfd_link_relocatable (info
))
448 relend
= rel
+ input_section
->reloc_count
;
450 for (; rel
< relend
; rel
++)
453 struct coff_link_hash_entry
*h
;
455 uint16_t idx
= 0, i
= 1;
457 if (rel
->r_type
!= R_SECTION
)
460 /* Make sure that _bfd_coff_generic_relocate_section won't parse
461 this reloc after us. */
464 symndx
= rel
->r_symndx
;
467 || (unsigned long) symndx
>= obj_raw_syment_count (input_bfd
))
470 h
= obj_coff_sym_hashes (input_bfd
)[symndx
];
473 sec
= sections
[symndx
];
476 if (h
->root
.type
== bfd_link_hash_defined
477 || h
->root
.type
== bfd_link_hash_defweak
)
479 /* Defined weak symbols are a GNU extension. */
480 sec
= h
->root
.u
.def
.section
;
491 if (bfd_is_abs_section (sec
))
494 if (discarded_section (sec
))
497 s
= output_bfd
->sections
;
500 if (s
== sec
->output_section
)
510 bfd_putl16 (idx
, contents
+ rel
->r_vaddr
- input_section
->vma
);
513 return _bfd_coff_generic_relocate_section (output_bfd
, info
, input_bfd
,
514 input_section
, contents
,
515 relocs
, syms
, sections
);
518 #define coff_relocate_section coff_pe_i386_relocate_section
520 #endif /* COFF_WITH_PE */
522 /* Convert an rtype to howto for the COFF backend linker. */
524 static reloc_howto_type
*
525 coff_i386_rtype_to_howto (bfd
*abfd ATTRIBUTE_UNUSED
,
527 struct internal_reloc
*rel
,
528 struct coff_link_hash_entry
*h
,
529 struct internal_syment
*sym
,
532 reloc_howto_type
*howto
;
534 if (rel
->r_type
>= NUM_HOWTOS
)
536 bfd_set_error (bfd_error_bad_value
);
540 howto
= howto_table
+ rel
->r_type
;
543 /* Cancel out code in _bfd_coff_generic_relocate_section. */
547 if (howto
->pc_relative
)
548 *addendp
+= sec
->vma
;
550 if (sym
!= NULL
&& sym
->n_scnum
== 0 && sym
->n_value
!= 0)
552 /* This is a common symbol. The section contents include the
553 size (sym->n_value) as an addend. The relocate_section
554 function will be adding in the final value of the symbol. We
555 need to subtract out the current size in order to get the
558 BFD_ASSERT (h
!= NULL
);
561 /* I think we *do* want to bypass this. If we don't, I have
562 seen some data parameters get the wrong relocation address.
563 If I link two versions with and without this section bypassed
564 and then do a binary comparison, the addresses which are
565 different can be looked up in the map. The case in which
566 this section has been bypassed has addresses which correspond
567 to values I can find in the map. */
568 *addendp
-= sym
->n_value
;
573 /* If the output symbol is common (in which case this must be a
574 relocatable link), we need to add in the final size of the
576 if (h
!= NULL
&& h
->root
.type
== bfd_link_hash_common
)
577 *addendp
+= h
->root
.u
.c
.size
;
581 if (howto
->pc_relative
)
585 /* If the symbol is defined, then the generic code is going to
586 add back the symbol value in order to cancel out an
587 adjustment it made to the addend. However, we set the addend
588 to 0 at the start of this function. We need to adjust here,
589 to avoid the adjustment the generic code will make. FIXME:
590 This is getting a bit hackish. */
591 if (sym
!= NULL
&& sym
->n_scnum
!= 0)
592 *addendp
-= sym
->n_value
;
595 if (rel
->r_type
== R_IMAGEBASE
596 && (bfd_get_flavour(sec
->output_section
->owner
)
597 == bfd_target_coff_flavour
))
599 *addendp
-= pe_data(sec
->output_section
->owner
)->pe_opthdr
.ImageBase
;
602 /* PR 17099 - Absolute R_PCRLONG relocations do not need a symbol. */
603 if (rel
->r_type
== R_PCRLONG
&& sym
== NULL
)
604 *addendp
-= rel
->r_vaddr
;
606 BFD_ASSERT (sym
!= NULL
);
608 if (rel
->r_type
== R_SECREL32
&& sym
!= NULL
)
612 if (h
&& (h
->root
.type
== bfd_link_hash_defined
613 || h
->root
.type
== bfd_link_hash_defweak
))
614 osect_vma
= h
->root
.u
.def
.section
->output_section
->vma
;
620 /* Sigh, the only way to get the section to offset against
621 is to find it the hard way. */
623 for (s
= abfd
->sections
, i
= 1; i
< sym
->n_scnum
; i
++)
626 osect_vma
= s
->output_section
->vma
;
629 *addendp
-= osect_vma
;
636 #define coff_bfd_reloc_type_lookup coff_i386_reloc_type_lookup
637 #define coff_bfd_reloc_name_lookup coff_i386_reloc_name_lookup
639 static reloc_howto_type
*
640 coff_i386_reloc_type_lookup (bfd
*abfd ATTRIBUTE_UNUSED
,
641 bfd_reloc_code_real_type code
)
646 return howto_table
+ R_IMAGEBASE
;
648 return howto_table
+ R_DIR32
;
649 case BFD_RELOC_32_PCREL
:
650 return howto_table
+ R_PCRLONG
;
652 return howto_table
+ R_RELWORD
;
653 case BFD_RELOC_16_PCREL
:
654 return howto_table
+ R_PCRWORD
;
656 return howto_table
+ R_RELBYTE
;
657 case BFD_RELOC_8_PCREL
:
658 return howto_table
+ R_PCRBYTE
;
660 case BFD_RELOC_32_SECREL
:
661 return howto_table
+ R_SECREL32
;
662 case BFD_RELOC_16_SECIDX
:
663 return howto_table
+ R_SECTION
;
671 static reloc_howto_type
*
672 coff_i386_reloc_name_lookup (bfd
*abfd ATTRIBUTE_UNUSED
,
677 for (i
= 0; i
< NUM_HOWTOS
; i
++)
678 if (howto_table
[i
].name
!= NULL
679 && strcasecmp (howto_table
[i
].name
, r_name
) == 0)
680 return &howto_table
[i
];
685 #define coff_rtype_to_howto coff_i386_rtype_to_howto
687 #ifdef TARGET_UNDERSCORE
689 /* If i386 gcc uses underscores for symbol names, then it does not use
690 a leading dot for local labels, so if TARGET_UNDERSCORE is defined
691 we treat all symbols starting with L as local. */
694 coff_i386_is_local_label_name (bfd
*abfd
, const char *name
)
699 return _bfd_coff_is_local_label_name (abfd
, name
);
702 #define coff_bfd_is_local_label_name coff_i386_is_local_label_name
704 #endif /* TARGET_UNDERSCORE */
706 #include "coffcode.h"
718 "coff-i386", /* name */
720 bfd_target_coff_flavour
,
721 BFD_ENDIAN_LITTLE
, /* data byte order is little */
722 BFD_ENDIAN_LITTLE
, /* header byte order is little */
724 (HAS_RELOC
| EXEC_P
| /* object flags */
725 HAS_LINENO
| HAS_DEBUG
|
726 HAS_SYMS
| HAS_LOCALS
| WP_TEXT
| D_PAGED
| BFD_COMPRESS
| BFD_DECOMPRESS
),
728 (SEC_HAS_CONTENTS
| SEC_ALLOC
| SEC_LOAD
| SEC_RELOC
/* section flags */
730 | SEC_LINK_ONCE
| SEC_LINK_DUPLICATES
| SEC_READONLY
| SEC_DEBUGGING
732 | SEC_CODE
| SEC_DATA
| SEC_EXCLUDE
),
734 #ifdef TARGET_UNDERSCORE
735 TARGET_UNDERSCORE
, /* leading underscore */
737 0, /* leading underscore */
739 '/', /* ar_pad_char */
740 15, /* ar_max_namelen */
741 0, /* match priority. */
742 TARGET_KEEP_UNUSED_SECTION_SYMBOLS
, /* keep unused section symbols. */
744 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
745 bfd_getl32
, bfd_getl_signed_32
, bfd_putl32
,
746 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* data */
747 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
748 bfd_getl32
, bfd_getl_signed_32
, bfd_putl32
,
749 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* hdrs */
751 #ifndef COFF_CHECK_FORMAT
752 #define COFF_CHECK_FORMAT coff_object_p
754 #ifndef COFF_WRITE_CONTENTS
755 #define COFF_WRITE_CONTENTS coff_write_object_contents
758 /* Note that we allow an object file to be treated as a core file as well. */
760 { /* bfd_check_format */
763 bfd_generic_archive_p
,
766 { /* bfd_set_format */
767 _bfd_bool_bfd_false_error
,
769 _bfd_generic_mkarchive
,
770 _bfd_bool_bfd_false_error
772 { /* bfd_write_contents */
773 _bfd_bool_bfd_false_error
,
775 _bfd_write_archive_contents
,
776 _bfd_bool_bfd_false_error
779 BFD_JUMP_TABLE_GENERIC (coff
),
780 BFD_JUMP_TABLE_COPY (coff
),
781 BFD_JUMP_TABLE_CORE (_bfd_nocore
),
782 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff
),
783 BFD_JUMP_TABLE_SYMBOLS (coff
),
784 BFD_JUMP_TABLE_RELOCS (coff
),
785 BFD_JUMP_TABLE_WRITE (coff
),
786 BFD_JUMP_TABLE_LINK (coff
),
787 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic
),
794 #ifdef COFF_WITH_PE_BIGOBJ
799 bfd_target_coff_flavour
,
800 BFD_ENDIAN_LITTLE
, /* data byte order is little */
801 BFD_ENDIAN_LITTLE
, /* header byte order is little */
803 (HAS_RELOC
| EXEC_P
| /* object flags */
804 HAS_LINENO
| HAS_DEBUG
|
805 HAS_SYMS
| HAS_LOCALS
| WP_TEXT
| D_PAGED
| BFD_COMPRESS
| BFD_DECOMPRESS
),
807 (SEC_HAS_CONTENTS
| SEC_ALLOC
| SEC_LOAD
| SEC_RELOC
/* section flags */
809 | SEC_LINK_ONCE
| SEC_LINK_DUPLICATES
| SEC_READONLY
| SEC_DEBUGGING
811 | SEC_CODE
| SEC_DATA
| SEC_EXCLUDE
),
813 #ifdef TARGET_UNDERSCORE
814 TARGET_UNDERSCORE
, /* leading underscore */
816 0, /* leading underscore */
818 '/', /* ar_pad_char */
819 15, /* ar_max_namelen */
820 0, /* match priority. */
821 TARGET_KEEP_UNUSED_SECTION_SYMBOLS
, /* keep unused section symbols. */
823 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
824 bfd_getl32
, bfd_getl_signed_32
, bfd_putl32
,
825 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* data */
826 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
827 bfd_getl32
, bfd_getl_signed_32
, bfd_putl32
,
828 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* hdrs */
830 /* Note that we allow an object file to be treated as a core file as well. */
832 { /* bfd_check_format */
835 bfd_generic_archive_p
,
838 { /* bfd_set_format */
839 _bfd_bool_bfd_false_error
,
841 _bfd_generic_mkarchive
,
842 _bfd_bool_bfd_false_error
844 { /* bfd_write_contents */
845 _bfd_bool_bfd_false_error
,
847 _bfd_write_archive_contents
,
848 _bfd_bool_bfd_false_error
851 BFD_JUMP_TABLE_GENERIC (coff
),
852 BFD_JUMP_TABLE_COPY (coff
),
853 BFD_JUMP_TABLE_CORE (_bfd_nocore
),
854 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff
),
855 BFD_JUMP_TABLE_SYMBOLS (coff
),
856 BFD_JUMP_TABLE_RELOCS (coff
),
857 BFD_JUMP_TABLE_WRITE (coff
),
858 BFD_JUMP_TABLE_LINK (coff
),
859 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic
),