1 /* BFD back-end for Intel 960 b.out binaries.
2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4 Free Software Foundation, Inc.
5 Written by Cygnus Support.
7 This file is part of BFD, the Binary File Descriptor library.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
30 #include "aout/stab_gnu.h"
31 #include "libaout.h" /* BFD a.out internal data structures. */
33 static int aligncode
PARAMS ((bfd
*abfd
, asection
*input_section
, arelent
*r
, unsigned int shrink
));
34 static void perform_slip
PARAMS ((bfd
*abfd
, unsigned int slip
, asection
*input_section
, bfd_vma value
));
35 static boolean b_out_squirt_out_relocs
PARAMS ((bfd
*abfd
, asection
*section
));
36 static const bfd_target
* b_out_callback
PARAMS ((bfd
*));
37 static bfd_reloc_status_type calljx_callback
PARAMS ((bfd
*, struct bfd_link_info
*, arelent
*, PTR src
, PTR dst
, asection
*));
38 static bfd_reloc_status_type callj_callback
PARAMS ((bfd
*, struct bfd_link_info
*, arelent
*, PTR data
, unsigned int srcidx
, unsigned int dstidx
, asection
*, boolean
));
39 static bfd_vma get_value
PARAMS ((arelent
*, struct bfd_link_info
*, asection
*));
40 static int abs32code
PARAMS ((bfd
*, asection
*, arelent
*, unsigned int, struct bfd_link_info
*));
41 static boolean b_out_bfd_relax_section
PARAMS ((bfd
*, asection
*, struct bfd_link_info
*, boolean
*));
42 static bfd_byte
* b_out_bfd_get_relocated_section_contents
PARAMS ((bfd
*, struct bfd_link_info
*, struct bfd_link_order
*, bfd_byte
*, boolean
, asymbol
**));
43 static int b_out_sizeof_headers
PARAMS ((bfd
*, boolean
));
44 static boolean b_out_set_arch_mach
PARAMS ((bfd
*, enum bfd_architecture
, unsigned long));
45 static boolean b_out_set_section_contents
PARAMS ((bfd
*, asection
*, PTR
, file_ptr
, bfd_size_type
));
46 static long b_out_get_reloc_upper_bound
PARAMS ((bfd
*, sec_ptr
));
47 static long b_out_canonicalize_reloc
PARAMS ((bfd
*, sec_ptr
, arelent
**, asymbol
**));
48 static boolean b_out_slurp_reloc_table
PARAMS ((bfd
*, sec_ptr
, asymbol
**));
49 static reloc_howto_type
* b_out_bfd_reloc_type_lookup
PARAMS ((bfd
*, bfd_reloc_code_real_type
));
50 static boolean b_out_write_object_contents
PARAMS ((bfd
*));
51 static int b_out_symbol_cmp
PARAMS ((const void *, const void *));
52 static boolean b_out_mkobject
PARAMS ((bfd
*));
53 static const bfd_target
* b_out_object_p
PARAMS ((bfd
*));
55 void bout_swap_exec_header_in
PARAMS ((bfd
*, struct external_exec
*, struct internal_exec
*));
56 void bout_swap_exec_header_out
PARAMS ((bfd
*, struct internal_exec
*, struct external_exec
*));
58 /* Swaps the information in an executable header taken from a raw byte
59 stream memory image, into the internal exec_header structure. */
62 bout_swap_exec_header_in (abfd
, raw_bytes
, execp
)
64 struct external_exec
*raw_bytes
;
65 struct internal_exec
*execp
;
67 struct external_exec
*bytes
= (struct external_exec
*)raw_bytes
;
69 /* Now fill in fields in the execp, from the bytes in the raw data. */
70 execp
->a_info
= bfd_h_get_32 (abfd
, bytes
->e_info
);
71 execp
->a_text
= GET_WORD (abfd
, bytes
->e_text
);
72 execp
->a_data
= GET_WORD (abfd
, bytes
->e_data
);
73 execp
->a_bss
= GET_WORD (abfd
, bytes
->e_bss
);
74 execp
->a_syms
= GET_WORD (abfd
, bytes
->e_syms
);
75 execp
->a_entry
= GET_WORD (abfd
, bytes
->e_entry
);
76 execp
->a_trsize
= GET_WORD (abfd
, bytes
->e_trsize
);
77 execp
->a_drsize
= GET_WORD (abfd
, bytes
->e_drsize
);
78 execp
->a_tload
= GET_WORD (abfd
, bytes
->e_tload
);
79 execp
->a_dload
= GET_WORD (abfd
, bytes
->e_dload
);
80 execp
->a_talign
= bytes
->e_talign
[0];
81 execp
->a_dalign
= bytes
->e_dalign
[0];
82 execp
->a_balign
= bytes
->e_balign
[0];
83 execp
->a_relaxable
= bytes
->e_relaxable
[0];
86 /* Swaps the information in an internal exec header structure into the
87 supplied buffer ready for writing to disk. */
90 bout_swap_exec_header_out (abfd
, execp
, raw_bytes
)
92 struct internal_exec
*execp
;
93 struct external_exec
*raw_bytes
;
95 struct external_exec
*bytes
= (struct external_exec
*)raw_bytes
;
97 /* Now fill in fields in the raw data, from the fields in the exec struct. */
98 bfd_h_put_32 (abfd
, execp
->a_info
, bytes
->e_info
);
99 PUT_WORD (abfd
, execp
->a_text
, bytes
->e_text
);
100 PUT_WORD (abfd
, execp
->a_data
, bytes
->e_data
);
101 PUT_WORD (abfd
, execp
->a_bss
, bytes
->e_bss
);
102 PUT_WORD (abfd
, execp
->a_syms
, bytes
->e_syms
);
103 PUT_WORD (abfd
, execp
->a_entry
, bytes
->e_entry
);
104 PUT_WORD (abfd
, execp
->a_trsize
, bytes
->e_trsize
);
105 PUT_WORD (abfd
, execp
->a_drsize
, bytes
->e_drsize
);
106 PUT_WORD (abfd
, execp
->a_tload
, bytes
->e_tload
);
107 PUT_WORD (abfd
, execp
->a_dload
, bytes
->e_dload
);
108 bytes
->e_talign
[0] = execp
->a_talign
;
109 bytes
->e_dalign
[0] = execp
->a_dalign
;
110 bytes
->e_balign
[0] = execp
->a_balign
;
111 bytes
->e_relaxable
[0] = execp
->a_relaxable
;
114 static const bfd_target
*
115 b_out_object_p (abfd
)
118 struct internal_exec anexec
;
119 struct external_exec exec_bytes
;
121 if (bfd_read ((PTR
) &exec_bytes
, 1, EXEC_BYTES_SIZE
, abfd
)
124 if (bfd_get_error () != bfd_error_system_call
)
125 bfd_set_error (bfd_error_wrong_format
);
129 anexec
.a_info
= bfd_h_get_32 (abfd
, exec_bytes
.e_info
);
131 if (N_BADMAG (anexec
))
133 bfd_set_error (bfd_error_wrong_format
);
137 bout_swap_exec_header_in (abfd
, &exec_bytes
, &anexec
);
138 return aout_32_some_aout_object_p (abfd
, &anexec
, b_out_callback
);
141 /* Finish up the opening of a b.out file for reading. Fill in all the
142 fields that are not handled by common code. */
144 static const bfd_target
*
145 b_out_callback (abfd
)
148 struct internal_exec
*execp
= exec_hdr (abfd
);
149 unsigned long bss_start
;
151 /* Architecture and machine type. */
152 bfd_set_arch_mach(abfd
,
153 bfd_arch_i960
, /* B.out only used on i960 */
154 bfd_mach_i960_core
/* Default */
157 /* The positions of the string table and symbol table. */
158 obj_str_filepos (abfd
) = N_STROFF (*execp
);
159 obj_sym_filepos (abfd
) = N_SYMOFF (*execp
);
161 /* The alignments of the sections. */
162 obj_textsec (abfd
)->alignment_power
= execp
->a_talign
;
163 obj_datasec (abfd
)->alignment_power
= execp
->a_dalign
;
164 obj_bsssec (abfd
)->alignment_power
= execp
->a_balign
;
166 /* The starting addresses of the sections. */
167 obj_textsec (abfd
)->vma
= execp
->a_tload
;
168 obj_datasec (abfd
)->vma
= execp
->a_dload
;
170 obj_textsec (abfd
)->lma
= obj_textsec (abfd
)->vma
;
171 obj_datasec (abfd
)->lma
= obj_datasec (abfd
)->vma
;
173 /* And reload the sizes, since the aout module zaps them. */
174 obj_textsec (abfd
)->_raw_size
= execp
->a_text
;
176 bss_start
= execp
->a_dload
+ execp
->a_data
; /* BSS = end of data section */
177 obj_bsssec (abfd
)->vma
= align_power (bss_start
, execp
->a_balign
);
179 obj_bsssec (abfd
)->lma
= obj_bsssec (abfd
)->vma
;
181 /* The file positions of the sections. */
182 obj_textsec (abfd
)->filepos
= N_TXTOFF(*execp
);
183 obj_datasec (abfd
)->filepos
= N_DATOFF(*execp
);
185 /* The file positions of the relocation info. */
186 obj_textsec (abfd
)->rel_filepos
= N_TROFF(*execp
);
187 obj_datasec (abfd
)->rel_filepos
= N_DROFF(*execp
);
189 adata(abfd
).page_size
= 1; /* Not applicable. */
190 adata(abfd
).segment_size
= 1; /* Not applicable. */
191 adata(abfd
).exec_bytes_size
= EXEC_BYTES_SIZE
;
193 if (execp
->a_relaxable
)
194 abfd
->flags
|= BFD_IS_RELAXABLE
;
198 struct bout_data_struct
201 struct internal_exec e
;
205 b_out_mkobject (abfd
)
208 struct bout_data_struct
*rawptr
;
210 rawptr
= (struct bout_data_struct
*) bfd_zalloc (abfd
, sizeof (struct bout_data_struct
));
214 abfd
->tdata
.bout_data
= rawptr
;
215 exec_hdr (abfd
) = &rawptr
->e
;
217 obj_textsec (abfd
) = (asection
*)NULL
;
218 obj_datasec (abfd
) = (asection
*)NULL
;
219 obj_bsssec (abfd
) = (asection
*)NULL
;
225 b_out_symbol_cmp (a_ptr
, b_ptr
)
229 struct aout_symbol
** a
= (struct aout_symbol
**) a_ptr
;
230 struct aout_symbol
** b
= (struct aout_symbol
**) b_ptr
;
234 /* Primary key is address. */
235 sec
= bfd_get_section (&(*a
)->symbol
);
236 av
= sec
->output_section
->vma
+ sec
->output_offset
+ (*a
)->symbol
.value
;
237 sec
= bfd_get_section (&(*b
)->symbol
);
238 bv
= sec
->output_section
->vma
+ sec
->output_offset
+ (*b
)->symbol
.value
;
245 /* Secondary key puts CALLNAME syms last and BALNAME syms first, so
246 that they have the best chance of being contiguous. */
247 if (IS_BALNAME ((*a
)->other
) || IS_CALLNAME ((*b
)->other
))
249 if (IS_CALLNAME ((*a
)->other
) || IS_BALNAME ((*b
)->other
))
256 b_out_write_object_contents (abfd
)
259 struct external_exec swapped_hdr
;
261 if (! aout_32_make_sections (abfd
))
264 exec_hdr (abfd
)->a_info
= BMAGIC
;
266 exec_hdr (abfd
)->a_text
= obj_textsec (abfd
)->_raw_size
;
267 exec_hdr (abfd
)->a_data
= obj_datasec (abfd
)->_raw_size
;
268 exec_hdr (abfd
)->a_bss
= obj_bsssec (abfd
)->_raw_size
;
269 exec_hdr (abfd
)->a_syms
= bfd_get_symcount (abfd
) * sizeof (struct nlist
);
270 exec_hdr (abfd
)->a_entry
= bfd_get_start_address (abfd
);
271 exec_hdr (abfd
)->a_trsize
= ((obj_textsec (abfd
)->reloc_count
) *
272 sizeof (struct relocation_info
));
273 exec_hdr (abfd
)->a_drsize
= ((obj_datasec (abfd
)->reloc_count
) *
274 sizeof (struct relocation_info
));
276 exec_hdr (abfd
)->a_talign
= obj_textsec (abfd
)->alignment_power
;
277 exec_hdr (abfd
)->a_dalign
= obj_datasec (abfd
)->alignment_power
;
278 exec_hdr (abfd
)->a_balign
= obj_bsssec (abfd
)->alignment_power
;
280 exec_hdr (abfd
)->a_tload
= obj_textsec (abfd
)->vma
;
281 exec_hdr (abfd
)->a_dload
= obj_datasec (abfd
)->vma
;
283 bout_swap_exec_header_out (abfd
, exec_hdr (abfd
), &swapped_hdr
);
285 if (bfd_seek (abfd
, (file_ptr
) 0, SEEK_SET
) != 0
286 || (bfd_write ((PTR
) &swapped_hdr
, 1, EXEC_BYTES_SIZE
, abfd
)
290 /* Now write out reloc info, followed by syms and strings */
291 if (bfd_get_symcount (abfd
) != 0)
293 /* Make sure {CALL,BAL}NAME symbols remain adjacent on output
294 by sorting. This is complicated by the fact that stabs are
295 also ordered. Solve this by shifting all stabs to the end
296 in order, then sorting the rest. */
298 asymbol
**outsyms
, **p
, **q
;
300 outsyms
= bfd_get_outsymbols (abfd
);
301 p
= outsyms
+ bfd_get_symcount (abfd
);
303 for (q
= p
--; p
>= outsyms
; p
--)
305 if ((*p
)->flags
& BSF_DEBUGGING
)
314 qsort (outsyms
, q
- outsyms
, sizeof (asymbol
*), b_out_symbol_cmp
);
316 /* Back to your regularly scheduled program. */
317 if (bfd_seek (abfd
, (file_ptr
) (N_SYMOFF(*exec_hdr(abfd
))), SEEK_SET
)
321 if (! aout_32_write_syms (abfd
))
324 if (bfd_seek (abfd
, (file_ptr
) (N_TROFF(*exec_hdr(abfd
))), SEEK_SET
) != 0)
327 if (!b_out_squirt_out_relocs (abfd
, obj_textsec (abfd
))) return false;
328 if (bfd_seek (abfd
, (file_ptr
) (N_DROFF(*exec_hdr(abfd
))), SEEK_SET
)
332 if (!b_out_squirt_out_relocs (abfd
, obj_datasec (abfd
))) return false;
337 /* Some reloc hackery. */
339 #define CALLS 0x66003800 /* Template for 'calls' instruction */
340 #define BAL 0x0b000000 /* Template for 'bal' instruction */
341 #define BAL_MASK 0x00ffffff
342 #define BALX 0x85f00000 /* Template for 'balx' instruction */
343 #define BALX_MASK 0x0007ffff
344 #define CALL 0x09000000
345 #define PCREL13_MASK 0x1fff
347 #define output_addr(sec) ((sec)->output_offset+(sec)->output_section->vma)
349 /* Magic to turn callx into calljx. */
351 static bfd_reloc_status_type
352 calljx_callback (abfd
, link_info
, reloc_entry
, src
, dst
, input_section
)
354 struct bfd_link_info
*link_info
;
355 arelent
*reloc_entry
;
358 asection
*input_section
;
360 int word
= bfd_get_32 (abfd
, src
);
361 asymbol
*symbol_in
= *(reloc_entry
->sym_ptr_ptr
);
362 aout_symbol_type
*symbol
= aout_symbol (symbol_in
);
365 value
= get_value (reloc_entry
, link_info
, input_section
);
367 if (IS_CALLNAME (symbol
->other
))
369 aout_symbol_type
*balsym
= symbol
+1;
370 int inst
= bfd_get_32 (abfd
, (bfd_byte
*) src
-4);
371 /* The next symbol should be an N_BALNAME. */
372 BFD_ASSERT (IS_BALNAME (balsym
->other
));
375 bfd_put_32 (abfd
, inst
, (bfd_byte
*) dst
-4);
377 value
= (symbol
->symbol
.value
378 + output_addr (symbol
->symbol
.section
));
381 word
+= value
+ reloc_entry
->addend
;
383 bfd_put_32 (abfd
, word
, dst
);
387 /* Magic to turn call into callj. */
389 static bfd_reloc_status_type
390 callj_callback (abfd
, link_info
, reloc_entry
, data
, srcidx
, dstidx
,
391 input_section
, shrinking
)
393 struct bfd_link_info
*link_info
;
394 arelent
*reloc_entry
;
398 asection
*input_section
;
401 int word
= bfd_get_32 (abfd
, (bfd_byte
*) data
+ srcidx
);
402 asymbol
*symbol_in
= *(reloc_entry
->sym_ptr_ptr
);
403 aout_symbol_type
*symbol
= aout_symbol (symbol_in
);
406 value
= get_value (reloc_entry
, link_info
, input_section
);
408 if (IS_OTHER(symbol
->other
))
410 /* Call to a system procedure - replace code with system
412 word
= CALLS
| (symbol
->other
- 1);
414 else if (IS_CALLNAME(symbol
->other
))
416 aout_symbol_type
*balsym
= symbol
+1;
418 /* The next symbol should be an N_BALNAME. */
419 BFD_ASSERT(IS_BALNAME(balsym
->other
));
421 /* We are calling a leaf, so replace the call instruction with a
424 + output_addr (balsym
->symbol
.section
)
425 + balsym
->symbol
.value
+ reloc_entry
->addend
427 - output_addr (input_section
))
430 else if ((symbol
->symbol
.flags
& BSF_SECTION_SYM
) != 0)
432 /* A callj against a symbol in the same section is a fully
433 resolved relative call. We don't need to do anything here.
434 If the symbol is not in the same section, I'm not sure what
435 to do; fortunately, this case will probably never arise. */
436 BFD_ASSERT (! shrinking
);
437 BFD_ASSERT (symbol
->symbol
.section
== input_section
);
441 word
= CALL
| (((word
& BAL_MASK
)
443 + reloc_entry
->addend
444 - (shrinking
? dstidx
: 0)
445 - output_addr (input_section
))
448 bfd_put_32 (abfd
, word
, (bfd_byte
*) data
+ dstidx
);
452 /* type rshift size bitsize pcrel bitpos absolute overflow check*/
455 #define ABS32CODE_SHRUNK 1
460 #define ABS32_MAYBE_RELAXABLE 1
461 #define ABS32_WAS_RELAXABLE 2
465 static reloc_howto_type howto_reloc_callj
=
466 HOWTO(CALLJ
, 0, 2, 24, true, 0, complain_overflow_signed
, 0,"callj", true, 0x00ffffff, 0x00ffffff,false);
467 static reloc_howto_type howto_reloc_abs32
=
468 HOWTO(ABS32
, 0, 2, 32, false, 0, complain_overflow_bitfield
,0,"abs32", true, 0xffffffff,0xffffffff,false);
469 static reloc_howto_type howto_reloc_pcrel24
=
470 HOWTO(PCREL24
, 0, 2, 24, true, 0, complain_overflow_signed
,0,"pcrel24", true, 0x00ffffff,0x00ffffff,false);
472 static reloc_howto_type howto_reloc_pcrel13
=
473 HOWTO(PCREL13
, 0, 2, 13, true, 0, complain_overflow_signed
,0,"pcrel13", true, 0x00001fff,0x00001fff,false);
475 static reloc_howto_type howto_reloc_abs32codeshrunk
=
476 HOWTO(ABS32CODE_SHRUNK
, 0, 2, 24, true, 0, complain_overflow_signed
, 0,"callx->callj", true, 0x00ffffff, 0x00ffffff,false);
478 static reloc_howto_type howto_reloc_abs32code
=
479 HOWTO(ABS32CODE
, 0, 2, 32, false, 0, complain_overflow_bitfield
,0,"callx", true, 0xffffffff,0xffffffff,false);
481 static reloc_howto_type howto_align_table
[] = {
482 HOWTO (ALIGNER
, 0, 0x1, 0, false, 0, complain_overflow_dont
, 0, "align16", false, 0, 0, false),
483 HOWTO (ALIGNER
, 0, 0x3, 0, false, 0, complain_overflow_dont
, 0, "align32", false, 0, 0, false),
484 HOWTO (ALIGNER
, 0, 0x7, 0, false, 0, complain_overflow_dont
, 0, "align64", false, 0, 0, false),
485 HOWTO (ALIGNER
, 0, 0xf, 0, false, 0, complain_overflow_dont
, 0, "align128", false, 0, 0, false),
488 static reloc_howto_type howto_done_align_table
[] = {
489 HOWTO (ALIGNDONE
, 0x1, 0x1, 0, false, 0, complain_overflow_dont
, 0, "donealign16", false, 0, 0, false),
490 HOWTO (ALIGNDONE
, 0x3, 0x3, 0, false, 0, complain_overflow_dont
, 0, "donealign32", false, 0, 0, false),
491 HOWTO (ALIGNDONE
, 0x7, 0x7, 0, false, 0, complain_overflow_dont
, 0, "donealign64", false, 0, 0, false),
492 HOWTO (ALIGNDONE
, 0xf, 0xf, 0, false, 0, complain_overflow_dont
, 0, "donealign128", false, 0, 0, false),
495 static reloc_howto_type
*
496 b_out_bfd_reloc_type_lookup (abfd
, code
)
497 bfd
*abfd ATTRIBUTE_UNUSED
;
498 bfd_reloc_code_real_type code
;
504 case BFD_RELOC_I960_CALLJ
:
505 return &howto_reloc_callj
;
508 return &howto_reloc_abs32
;
509 case BFD_RELOC_24_PCREL
:
510 return &howto_reloc_pcrel24
;
514 /* Allocate enough room for all the reloc entries, plus pointers to them all. */
517 b_out_slurp_reloc_table (abfd
, asect
, symbols
)
522 register struct relocation_info
*rptr
;
523 unsigned int counter
;
525 int extern_mask
, pcrel_mask
, callj_mask
, length_shift
;
528 bfd_vma prev_addr
= 0;
531 struct relocation_info
*relocs
;
532 arelent
*reloc_cache
;
534 if (asect
->relocation
)
537 if (!aout_32_slurp_symbol_table (abfd
))
540 if (asect
== obj_datasec (abfd
))
542 reloc_size
= exec_hdr(abfd
)->a_drsize
;
546 if (asect
== obj_textsec (abfd
))
548 reloc_size
= exec_hdr(abfd
)->a_trsize
;
552 if (asect
== obj_bsssec (abfd
))
558 bfd_set_error (bfd_error_invalid_operation
);
562 if (bfd_seek (abfd
, (file_ptr
) (asect
->rel_filepos
), SEEK_SET
) != 0)
564 count
= reloc_size
/ sizeof (struct relocation_info
);
566 relocs
= (struct relocation_info
*) bfd_malloc (reloc_size
);
567 if (!relocs
&& reloc_size
!= 0)
570 reloc_cache
= (arelent
*) bfd_malloc ((count
+1) * sizeof (arelent
));
574 free ((char*)relocs
);
578 if (bfd_read ((PTR
) relocs
, 1, reloc_size
, abfd
) != reloc_size
)
586 if (bfd_header_big_endian (abfd
))
588 /* Big-endian bit field allocation order. */
598 /* Little-endian bit field allocation order. */
607 for (rptr
= relocs
, cache_ptr
= reloc_cache
, counter
= 0;
609 counter
++, rptr
++, cache_ptr
++)
611 unsigned char *raw
= (unsigned char *)rptr
;
614 cache_ptr
->address
= bfd_h_get_32 (abfd
, raw
+ 0);
615 cache_ptr
->howto
= 0;
617 if (bfd_header_big_endian (abfd
))
618 symnum
= (raw
[4] << 16) | (raw
[5] << 8) | raw
[6];
620 symnum
= (raw
[6] << 16) | (raw
[5] << 8) | raw
[4];
622 if (raw
[7] & extern_mask
)
624 /* If this is set then the r_index is a index into the symbol table;
625 if the bit is not set then r_index contains a section map.
626 We either fill in the sym entry with a pointer to the symbol,
627 or point to the correct section. */
628 cache_ptr
->sym_ptr_ptr
= symbols
+ symnum
;
629 cache_ptr
->addend
= 0;
633 /* In a.out symbols are relative to the beginning of the
634 file rather than sections ?
635 (look in translate_from_native_sym_flags)
636 The reloc entry addend has added to it the offset into the
637 file of the data, so subtract the base to make the reloc
641 /* Sign-extend symnum from 24 bits to whatever host uses. */
646 cache_ptr
->sym_ptr_ptr
= (asymbol
**)NULL
;
651 cache_ptr
->sym_ptr_ptr
= obj_textsec (abfd
)->symbol_ptr_ptr
;
652 cache_ptr
->addend
= - obj_textsec (abfd
)->vma
;
656 cache_ptr
->sym_ptr_ptr
= obj_datasec (abfd
)->symbol_ptr_ptr
;
657 cache_ptr
->addend
= - obj_datasec (abfd
)->vma
;
661 cache_ptr
->sym_ptr_ptr
= obj_bsssec (abfd
)->symbol_ptr_ptr
;
662 cache_ptr
->addend
= - obj_bsssec (abfd
)->vma
;
666 cache_ptr
->sym_ptr_ptr
= obj_bsssec (abfd
)->symbol_ptr_ptr
;
667 cache_ptr
->addend
= 0;
669 case -2: /* .align */
670 if (raw
[7] & pcrel_mask
)
672 cache_ptr
->howto
= &howto_align_table
[(raw
[7] >> length_shift
) & 3];
673 cache_ptr
->sym_ptr_ptr
= bfd_abs_section_ptr
->symbol_ptr_ptr
;
680 cache_ptr
->addend
= 0;
688 /* The i960 only has a few relocation types:
689 abs 32-bit and pcrel 24bit. except for callj's! */
690 if (cache_ptr
->howto
!= 0)
692 else if (raw
[7] & callj_mask
)
694 cache_ptr
->howto
= &howto_reloc_callj
;
696 else if ( raw
[7] & pcrel_mask
)
698 if (raw
[7] & size_mask
)
699 cache_ptr
->howto
= &howto_reloc_pcrel13
;
701 cache_ptr
->howto
= &howto_reloc_pcrel24
;
705 if (raw
[7] & incode_mask
)
706 cache_ptr
->howto
= &howto_reloc_abs32code
;
708 cache_ptr
->howto
= &howto_reloc_abs32
;
711 if (cache_ptr
->address
< prev_addr
)
713 /* Ouch! this reloc is out of order, insert into the right place. */
715 arelent
*cursor
= cache_ptr
-1;
716 bfd_vma stop
= cache_ptr
->address
;
719 while (cursor
->address
> stop
&& cursor
>= reloc_cache
)
721 cursor
[1] = cursor
[0];
729 prev_addr
= cache_ptr
->address
;
735 asect
->relocation
= reloc_cache
;
736 asect
->reloc_count
= count
;
742 b_out_squirt_out_relocs (abfd
, section
)
751 unsigned int count
= section
->reloc_count
;
752 struct relocation_info
*native
, *natptr
;
753 size_t natsize
= count
* sizeof (struct relocation_info
);
754 int extern_mask
, pcrel_mask
, len_2
, callj_mask
;
759 generic
= section
->orelocation
;
760 native
= ((struct relocation_info
*) bfd_malloc (natsize
));
761 if (!native
&& natsize
!= 0)
764 if (bfd_header_big_endian (abfd
))
766 /* Big-endian bit field allocation order. */
776 /* Little-endian bit field allocation order. */
785 for (natptr
= native
; count
> 0; --count
, ++natptr
, ++generic
)
787 arelent
*g
= *generic
;
788 unsigned char *raw
= (unsigned char *)natptr
;
789 asymbol
*sym
= *(g
->sym_ptr_ptr
);
790 asection
*output_section
= sym
->section
->output_section
;
792 bfd_h_put_32(abfd
, g
->address
, raw
);
793 /* Find a type in the output format which matches the input howto -
794 at the moment we assume input format == output format FIXME!! */
796 /* FIXME: Need callj stuff here, and to check the howto entries to
797 be sure they are real for this architecture. */
798 if (g
->howto
== &howto_reloc_callj
)
799 raw
[7] = callj_mask
+ pcrel_mask
+ len_2
;
800 else if (g
->howto
== &howto_reloc_pcrel24
)
801 raw
[7] = pcrel_mask
+ len_2
;
802 else if (g
->howto
== &howto_reloc_pcrel13
)
803 raw
[7] = pcrel_mask
+ len_1
;
804 else if (g
->howto
== &howto_reloc_abs32code
)
805 raw
[7] = len_2
+ incode_mask
;
806 else if (g
->howto
>= howto_align_table
807 && g
->howto
<= (howto_align_table
808 + sizeof (howto_align_table
) / sizeof (howto_align_table
[0])
811 /* symnum == -2; extern_mask not set, pcrel_mask set. */
815 | ((g
->howto
- howto_align_table
) << 1));
821 /* Already mucked with r_extern, r_idx. */;
822 else if (bfd_is_com_section (output_section
)
823 || bfd_is_abs_section (output_section
)
824 || bfd_is_und_section (output_section
))
826 if (bfd_abs_section_ptr
->symbol
== sym
)
828 /* Whoops, looked like an abs symbol, but is really an offset
829 from the abs section. */
835 /* Fill in symbol. */
837 r_idx
= (*g
->sym_ptr_ptr
)->udata
.i
;
842 /* Just an ordinary section. */
844 r_idx
= output_section
->target_index
;
847 if (bfd_header_big_endian (abfd
))
849 raw
[4] = (unsigned char) (r_idx
>> 16);
850 raw
[5] = (unsigned char) (r_idx
>> 8);
851 raw
[6] = (unsigned char) (r_idx
);
855 raw
[6] = (unsigned char) (r_idx
>> 16);
856 raw
[5] = (unsigned char) (r_idx
>> 8);
857 raw
[4] = (unsigned char) (r_idx
);
861 raw
[7] |= extern_mask
;
864 if (bfd_write ((PTR
) native
, 1, natsize
, abfd
) != natsize
)
875 /* This is stupid. This function should be a boolean predicate. */
878 b_out_canonicalize_reloc (abfd
, section
, relptr
, symbols
)
887 if ((section
->flags
& SEC_CONSTRUCTOR
) != 0)
889 arelent_chain
*chain
= section
->constructor_chain
;
891 for (count
= 0; count
< section
->reloc_count
; count
++)
893 *relptr
++ = &chain
->relent
;
899 if (section
->relocation
== NULL
900 && ! b_out_slurp_reloc_table (abfd
, section
, symbols
))
903 tblptr
= section
->relocation
;
904 for (count
= 0; count
++ < section
->reloc_count
;)
905 *relptr
++ = tblptr
++;
910 return section
->reloc_count
;
914 b_out_get_reloc_upper_bound (abfd
, asect
)
918 if (bfd_get_format (abfd
) != bfd_object
)
920 bfd_set_error (bfd_error_invalid_operation
);
924 if (asect
->flags
& SEC_CONSTRUCTOR
)
925 return sizeof (arelent
*) * (asect
->reloc_count
+ 1);
927 if (asect
== obj_datasec (abfd
))
928 return (sizeof (arelent
*) *
929 ((exec_hdr(abfd
)->a_drsize
/ sizeof (struct relocation_info
))
932 if (asect
== obj_textsec (abfd
))
933 return (sizeof (arelent
*) *
934 ((exec_hdr(abfd
)->a_trsize
/ sizeof (struct relocation_info
))
937 if (asect
== obj_bsssec (abfd
))
940 bfd_set_error (bfd_error_invalid_operation
);
946 b_out_set_section_contents (abfd
, section
, location
, offset
, count
)
953 if (abfd
->output_has_begun
== false)
955 /* Set by bfd.c handler. */
956 if (! aout_32_make_sections (abfd
))
959 obj_textsec (abfd
)->filepos
= sizeof (struct internal_exec
);
960 obj_datasec(abfd
)->filepos
= obj_textsec(abfd
)->filepos
961 + obj_textsec (abfd
)->_raw_size
;
964 /* Regardless, once we know what we're doing, we might as well get going. */
965 if (bfd_seek (abfd
, section
->filepos
+ offset
, SEEK_SET
) != 0)
969 return (bfd_write ((PTR
)location
, 1, count
, abfd
) == count
) ? true : false;
975 b_out_set_arch_mach (abfd
, arch
, machine
)
977 enum bfd_architecture arch
;
978 unsigned long machine
;
980 bfd_default_set_arch_mach(abfd
, arch
, machine
);
982 if (arch
== bfd_arch_unknown
) /* Unknown machine arch is OK. */
985 if (arch
== bfd_arch_i960
) /* i960 default is OK. */
988 case bfd_mach_i960_core
:
989 case bfd_mach_i960_kb_sb
:
990 case bfd_mach_i960_mc
:
991 case bfd_mach_i960_xa
:
992 case bfd_mach_i960_ca
:
993 case bfd_mach_i960_ka_sa
:
994 case bfd_mach_i960_jx
:
995 case bfd_mach_i960_hx
:
1006 b_out_sizeof_headers (ignore_abfd
, ignore
)
1007 bfd
*ignore_abfd ATTRIBUTE_UNUSED
;
1008 boolean ignore ATTRIBUTE_UNUSED
;
1010 return sizeof (struct internal_exec
);
1015 get_value (reloc
, link_info
, input_section
)
1017 struct bfd_link_info
*link_info
;
1018 asection
*input_section
;
1021 asymbol
*symbol
= *(reloc
->sym_ptr_ptr
);
1023 /* A symbol holds a pointer to a section, and an offset from the
1024 base of the section. To relocate, we find where the section will
1025 live in the output and add that in. */
1026 if (bfd_is_und_section (symbol
->section
))
1028 struct bfd_link_hash_entry
*h
;
1030 /* The symbol is undefined in this BFD. Look it up in the
1031 global linker hash table. FIXME: This should be changed when
1032 we convert b.out to use a specific final_link function and
1033 change the interface to bfd_relax_section to not require the
1035 h
= bfd_wrapped_link_hash_lookup (input_section
->owner
, link_info
,
1036 bfd_asymbol_name (symbol
),
1037 false, false, true);
1038 if (h
!= (struct bfd_link_hash_entry
*) NULL
1039 && (h
->type
== bfd_link_hash_defined
1040 || h
->type
== bfd_link_hash_defweak
))
1041 value
= h
->u
.def
.value
+ output_addr (h
->u
.def
.section
);
1042 else if (h
!= (struct bfd_link_hash_entry
*) NULL
1043 && h
->type
== bfd_link_hash_common
)
1044 value
= h
->u
.c
.size
;
1047 if (! ((*link_info
->callbacks
->undefined_symbol
)
1048 (link_info
, bfd_asymbol_name (symbol
),
1049 input_section
->owner
, input_section
, reloc
->address
,
1057 value
= symbol
->value
+ output_addr (symbol
->section
);
1060 /* Add the value contained in the relocation. */
1061 value
+= reloc
->addend
;
1067 perform_slip (abfd
, slip
, input_section
, value
)
1070 asection
*input_section
;
1075 s
= _bfd_generic_link_get_symbols (abfd
);
1076 BFD_ASSERT (s
!= (asymbol
**) NULL
);
1078 /* Find all symbols past this point, and make them know
1084 if (p
->section
== input_section
)
1086 /* This was pointing into this section, so mangle it. */
1087 if (p
->value
> value
)
1091 if (p
->udata
.p
!= NULL
)
1093 struct generic_link_hash_entry
*h
;
1095 h
= (struct generic_link_hash_entry
*) p
->udata
.p
;
1096 BFD_ASSERT (h
->root
.type
== bfd_link_hash_defined
);
1097 h
->root
.u
.def
.value
-= slip
;
1098 BFD_ASSERT (h
->root
.u
.def
.value
== p
->value
);
1106 /* This routine works out if the thing we want to get to can be
1107 reached with a 24bit offset instead of a 32 bit one.
1108 If it can, then it changes the amode. */
1111 abs32code (abfd
, input_section
, r
, shrink
, link_info
)
1113 asection
*input_section
;
1115 unsigned int shrink
;
1116 struct bfd_link_info
*link_info
;
1118 bfd_vma value
= get_value (r
, link_info
, input_section
);
1119 bfd_vma dot
= output_addr (input_section
) + r
->address
;
1122 /* See if the address we're looking at within 2^23 bytes of where
1123 we are, if so then we can use a small branch rather than the
1124 jump we were going to. */
1125 gap
= value
- (dot
- shrink
);
1127 if (-1 << 23 < (long)gap
&& (long)gap
< 1 << 23)
1129 /* Change the reloc type from 32bitcode possible 24, to 24bit
1131 r
->howto
= &howto_reloc_abs32codeshrunk
;
1132 /* The place to relc moves back by four bytes. */
1135 /* This will be four bytes smaller in the long run. */
1137 perform_slip (abfd
, 4, input_section
, r
->address
-shrink
+ 4);
1144 aligncode (abfd
, input_section
, r
, shrink
)
1146 asection
*input_section
;
1148 unsigned int shrink
;
1150 bfd_vma dot
= output_addr (input_section
) + r
->address
;
1155 int size
= r
->howto
->size
;
1157 /* Reduce the size of the alignment so that it's still aligned but
1158 smaller - the current size is already the same size as or bigger
1159 than the alignment required. */
1161 /* Calculate the first byte following the padding before we optimize. */
1162 old_end
= ((dot
+ size
) & ~size
) + size
+1;
1163 /* Work out where the new end will be - remember that we're smaller
1164 than we used to be. */
1165 new_end
= ((dot
- shrink
+ size
) & ~size
);
1167 /* This is the new end. */
1168 gap
= old_end
- ((dot
+ size
) & ~size
);
1170 shrink_delta
= (old_end
- new_end
) - shrink
;
1174 /* Change the reloc so that it knows how far to align to. */
1175 r
->howto
= howto_done_align_table
+ (r
->howto
- howto_align_table
);
1177 /* Encode the stuff into the addend - for future use we need to
1178 know how big the reloc used to be. */
1179 r
->addend
= old_end
- dot
+ r
->address
;
1181 /* This will be N bytes smaller in the long run, adjust all the symbols. */
1182 perform_slip (abfd
, shrink_delta
, input_section
, r
->address
- shrink
);
1183 shrink
+= shrink_delta
;
1190 b_out_bfd_relax_section (abfd
, i
, link_info
, again
)
1193 struct bfd_link_info
*link_info
;
1196 /* Get enough memory to hold the stuff. */
1197 bfd
*input_bfd
= i
->owner
;
1198 asection
*input_section
= i
;
1200 arelent
**reloc_vector
= NULL
;
1201 long reloc_size
= bfd_get_reloc_upper_bound(input_bfd
,
1207 /* We only run this relaxation once. It might work to run it
1208 multiple times, but it hasn't been tested. */
1215 reloc_vector
= (arelent
**) bfd_malloc (reloc_size
);
1216 if (reloc_vector
== NULL
&& reloc_size
!= 0)
1219 /* Get the relocs and think about them. */
1221 bfd_canonicalize_reloc (input_bfd
, input_section
, reloc_vector
,
1222 _bfd_generic_link_get_symbols (input_bfd
));
1223 if (reloc_count
< 0)
1225 if (reloc_count
> 0)
1229 for (parent
= reloc_vector
; *parent
; parent
++)
1231 arelent
*r
= *parent
;
1233 switch (r
->howto
->type
)
1236 /* An alignment reloc. */
1237 shrink
= aligncode (abfd
, input_section
, r
, shrink
);
1240 /* A 32bit reloc in an addressing mode. */
1241 shrink
= abs32code (input_bfd
, input_section
, r
, shrink
,
1244 case ABS32CODE_SHRUNK
:
1251 input_section
->_cooked_size
= input_section
->_raw_size
- shrink
;
1253 if (reloc_vector
!= NULL
)
1254 free (reloc_vector
);
1257 if (reloc_vector
!= NULL
)
1258 free (reloc_vector
);
1263 b_out_bfd_get_relocated_section_contents (output_bfd
, link_info
, link_order
,
1264 data
, relocateable
, symbols
)
1266 struct bfd_link_info
*link_info
;
1267 struct bfd_link_order
*link_order
;
1269 boolean relocateable
;
1272 /* Get enough memory to hold the stuff. */
1273 bfd
*input_bfd
= link_order
->u
.indirect
.section
->owner
;
1274 asection
*input_section
= link_order
->u
.indirect
.section
;
1275 long reloc_size
= bfd_get_reloc_upper_bound (input_bfd
,
1277 arelent
**reloc_vector
= NULL
;
1283 /* If producing relocateable output, don't bother to relax. */
1285 return bfd_generic_get_relocated_section_contents (output_bfd
, link_info
,
1290 reloc_vector
= (arelent
**) bfd_malloc (reloc_size
);
1291 if (reloc_vector
== NULL
&& reloc_size
!= 0)
1294 input_section
->reloc_done
= 1;
1296 /* Read in the section. */
1297 BFD_ASSERT (true == bfd_get_section_contents (input_bfd
,
1301 input_section
->_raw_size
));
1303 reloc_count
= bfd_canonicalize_reloc (input_bfd
,
1307 if (reloc_count
< 0)
1309 if (reloc_count
> 0)
1311 arelent
**parent
= reloc_vector
;
1313 unsigned int dst_address
= 0;
1314 unsigned int src_address
= 0;
1318 /* Find how long a run we can do. */
1319 while (dst_address
< link_order
->size
)
1324 /* Note that the relaxing didn't tie up the addresses in the
1325 relocation, so we use the original address to work out the
1326 run of non-relocated data. */
1327 BFD_ASSERT (reloc
->address
>= src_address
);
1328 run
= reloc
->address
- src_address
;
1333 run
= link_order
->size
- dst_address
;
1336 /* Copy the bytes. */
1337 for (idx
= 0; idx
< run
; idx
++)
1338 data
[dst_address
++] = data
[src_address
++];
1340 /* Now do the relocation. */
1343 switch (reloc
->howto
->type
)
1346 calljx_callback (input_bfd
, link_info
, reloc
,
1347 src_address
+ data
, dst_address
+ data
,
1353 bfd_put_32 (input_bfd
,
1354 (bfd_get_32 (input_bfd
, data
+ src_address
)
1355 + get_value (reloc
, link_info
, input_section
)),
1356 data
+ dst_address
);
1361 callj_callback (input_bfd
, link_info
, reloc
, data
,
1362 src_address
, dst_address
, input_section
,
1368 BFD_ASSERT (reloc
->addend
>= src_address
);
1369 BFD_ASSERT (reloc
->addend
<= input_section
->_raw_size
);
1370 src_address
= reloc
->addend
;
1371 dst_address
= ((dst_address
+ reloc
->howto
->size
)
1372 & ~reloc
->howto
->size
);
1374 case ABS32CODE_SHRUNK
:
1375 /* This used to be a callx, but we've found out that a
1376 callj will reach, so do the right thing. */
1377 callj_callback (input_bfd
, link_info
, reloc
, data
,
1378 src_address
+ 4, dst_address
, input_section
,
1385 long int word
= bfd_get_32 (input_bfd
,
1386 data
+ src_address
);
1389 value
= get_value (reloc
, link_info
, input_section
);
1390 word
= ((word
& ~BAL_MASK
)
1391 | (((word
& BAL_MASK
)
1393 - output_addr (input_section
)
1397 bfd_put_32 (input_bfd
, word
, data
+ dst_address
);
1405 long int word
= bfd_get_32 (input_bfd
,
1406 data
+ src_address
);
1409 value
= get_value (reloc
, link_info
, input_section
);
1410 word
= ((word
& ~PCREL13_MASK
)
1411 | (((word
& PCREL13_MASK
)
1414 - output_addr (input_section
))
1417 bfd_put_32 (input_bfd
, word
, data
+ dst_address
);
1429 if (reloc_vector
!= NULL
)
1430 free (reloc_vector
);
1433 if (reloc_vector
!= NULL
)
1434 free (reloc_vector
);
1439 /* Build the transfer vectors for Big and Little-Endian B.OUT files. */
1441 #define aout_32_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
1442 #define aout_32_close_and_cleanup aout_32_bfd_free_cached_info
1444 #define b_out_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
1445 #define b_out_bfd_link_add_symbols _bfd_generic_link_add_symbols
1446 #define b_out_bfd_final_link _bfd_generic_final_link
1447 #define b_out_bfd_link_split_section _bfd_generic_link_split_section
1448 #define b_out_bfd_gc_sections bfd_generic_gc_sections
1449 #define b_out_bfd_merge_sections bfd_generic_merge_sections
1451 #define aout_32_get_section_contents_in_window \
1452 _bfd_generic_get_section_contents_in_window
1454 extern const bfd_target b_out_vec_little_host
;
1456 const bfd_target b_out_vec_big_host
=
1458 "b.out.big", /* name */
1459 bfd_target_aout_flavour
,
1460 BFD_ENDIAN_LITTLE
, /* data byte order is little */
1461 BFD_ENDIAN_BIG
, /* hdr byte order is big */
1462 (HAS_RELOC
| EXEC_P
| /* object flags */
1463 HAS_LINENO
| HAS_DEBUG
|
1464 HAS_SYMS
| HAS_LOCALS
| WP_TEXT
| BFD_IS_RELAXABLE
),
1465 (SEC_HAS_CONTENTS
| SEC_ALLOC
| SEC_LOAD
| SEC_RELOC
| SEC_CODE
| SEC_DATA
),
1466 '_', /* symbol leading char */
1467 ' ', /* ar_pad_char */
1468 16, /* ar_max_namelen */
1470 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
1471 bfd_getl32
, bfd_getl_signed_32
, bfd_putl32
,
1472 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* data */
1473 bfd_getb64
, bfd_getb_signed_64
, bfd_putb64
,
1474 bfd_getb32
, bfd_getb_signed_32
, bfd_putb32
,
1475 bfd_getb16
, bfd_getb_signed_16
, bfd_putb16
, /* hdrs */
1476 {_bfd_dummy_target
, b_out_object_p
, /* bfd_check_format */
1477 bfd_generic_archive_p
, _bfd_dummy_target
},
1478 {bfd_false
, b_out_mkobject
, /* bfd_set_format */
1479 _bfd_generic_mkarchive
, bfd_false
},
1480 {bfd_false
, b_out_write_object_contents
, /* bfd_write_contents */
1481 _bfd_write_archive_contents
, bfd_false
},
1483 BFD_JUMP_TABLE_GENERIC (aout_32
),
1484 BFD_JUMP_TABLE_COPY (_bfd_generic
),
1485 BFD_JUMP_TABLE_CORE (_bfd_nocore
),
1486 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd
),
1487 BFD_JUMP_TABLE_SYMBOLS (aout_32
),
1488 BFD_JUMP_TABLE_RELOCS (b_out
),
1489 BFD_JUMP_TABLE_WRITE (b_out
),
1490 BFD_JUMP_TABLE_LINK (b_out
),
1491 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic
),
1493 & b_out_vec_little_host
,
1498 const bfd_target b_out_vec_little_host
=
1500 "b.out.little", /* name */
1501 bfd_target_aout_flavour
,
1502 BFD_ENDIAN_LITTLE
, /* data byte order is little */
1503 BFD_ENDIAN_LITTLE
, /* header byte order is little */
1504 (HAS_RELOC
| EXEC_P
| /* object flags */
1505 HAS_LINENO
| HAS_DEBUG
|
1506 HAS_SYMS
| HAS_LOCALS
| WP_TEXT
| BFD_IS_RELAXABLE
),
1507 (SEC_HAS_CONTENTS
| SEC_ALLOC
| SEC_LOAD
| SEC_RELOC
| SEC_CODE
| SEC_DATA
),
1508 '_', /* symbol leading char */
1509 ' ', /* ar_pad_char */
1510 16, /* ar_max_namelen */
1511 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
1512 bfd_getl32
, bfd_getl_signed_32
, bfd_putl32
,
1513 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* data */
1514 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
1515 bfd_getl32
, bfd_getl_signed_32
, bfd_putl32
,
1516 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* hdrs */
1518 {_bfd_dummy_target
, b_out_object_p
, /* bfd_check_format */
1519 bfd_generic_archive_p
, _bfd_dummy_target
},
1520 {bfd_false
, b_out_mkobject
, /* bfd_set_format */
1521 _bfd_generic_mkarchive
, bfd_false
},
1522 {bfd_false
, b_out_write_object_contents
, /* bfd_write_contents */
1523 _bfd_write_archive_contents
, bfd_false
},
1525 BFD_JUMP_TABLE_GENERIC (aout_32
),
1526 BFD_JUMP_TABLE_COPY (_bfd_generic
),
1527 BFD_JUMP_TABLE_CORE (_bfd_nocore
),
1528 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd
),
1529 BFD_JUMP_TABLE_SYMBOLS (aout_32
),
1530 BFD_JUMP_TABLE_RELOCS (b_out
),
1531 BFD_JUMP_TABLE_WRITE (b_out
),
1532 BFD_JUMP_TABLE_LINK (b_out
),
1533 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic
),
1535 & b_out_vec_big_host
,