1 /* A -*- C -*- header file for the bfd library
2 Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
3 Contributed 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 2 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
21 /* bfd.h -- The only header file required by users of the bfd library
23 This file is generated from various .c files, if you change it, your
26 All the prototypes and definitions following the comment "THE FOLLOWING
27 IS EXTRACTED FROM THE SOURCE" are extracted from the source files for
28 BFD. If you change it, someone oneday will extract it from the source
29 again, and your changes will be lost. To save yourself from this bind,
30 change the definitions in the source in the bfd directory. Type "make
31 docs" and then "make headers" in that directory, and magically this file
32 will change to reflect your changes.
34 If you don't have the tools to perform the extraction, then you are
35 safe from someone on your system trampling over your header files.
36 You should still maintain the equivalence between the source and this
37 file though; every change you make to the .c file should be reflected
40 #ifndef __BFD_H_SEEN__
41 #define __BFD_H_SEEN__
46 /* Make it easier to declare prototypes (puts conditional here) */
49 # define PROTO(type, name, arglist) type name arglist
51 # define PROTO(type, name, arglist) type name ()
55 #define BFD_VERSION "2.0"
57 /* forward declaration */
58 typedef struct _bfd bfd
;
60 /* General rules: functions which are boolean return true on success
61 and false on failure (unless they're a predicate). -- bfd.doc */
62 /* I'm sure this is going to break something and someone is going to
63 force me to change it. */
64 /* typedef enum boolean {false, true} boolean; */
65 /* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h> -fnf */
66 typedef enum bfd_boolean
{false, true} boolean
;
68 /* A pointer to a position in a file. */
69 /* FIXME: This should be using off_t from <sys/types.h>.
70 For now, try to avoid breaking stuff by not including <sys/types.h> here.
71 This will break on systems with 64-bit file offsets (e.g. 4.4BSD).
72 Probably the best long-term answer is to avoid using file_ptr AND off_t
73 in this header file, and to handle this in the BFD implementation
74 rather than in its interface. */
75 /* typedef off_t file_ptr; */
76 typedef long int file_ptr
;
78 /* Support for different sizes of target format ints and addresses */
81 typedef HOST_64_BIT rawdata_offset
;
82 typedef HOST_64_BIT bfd_vma
;
83 typedef HOST_64_BIT bfd_word
;
84 typedef HOST_64_BIT bfd_offset
;
85 typedef HOST_64_BIT bfd_size_type
;
86 typedef HOST_64_BIT symvalue
;
87 typedef HOST_64_BIT bfd_64_type
;
88 #define fprintf_vma(s,x) \
89 fprintf(s,"%08x%08x", uint64_typeHIGH(x), uint64_typeLOW(x))
91 typedef struct {int a
,b
;} bfd_64_type
;
92 typedef unsigned long rawdata_offset
;
93 typedef unsigned long bfd_vma
;
94 typedef unsigned long bfd_offset
;
95 typedef unsigned long bfd_word
;
96 typedef unsigned long bfd_size
;
97 typedef unsigned long symvalue
;
98 typedef unsigned long bfd_size_type
;
99 #define fprintf_vma(s,x) fprintf(s, "%08lx", x)
101 #define printf_vma(x) fprintf_vma(stdout,x)
103 typedef unsigned int flagword
; /* 32 bits of flags */
107 typedef enum bfd_format
{
108 bfd_unknown
= 0, /* file format is unknown */
109 bfd_object
, /* linker/assember/compiler output */
110 bfd_archive
, /* object archive file */
111 bfd_core
, /* core dump */
112 bfd_type_end
} /* marks the end; don't use it! */
115 /* Object file flag values */
116 #define NO_FLAGS 0x00
117 #define HAS_RELOC 0x01
119 #define HAS_LINENO 0x04
120 #define HAS_DEBUG 0x08
121 #define HAS_SYMS 0x10
122 #define HAS_LOCALS 0x20
125 #define D_PAGED 0x100
126 #define BFD_IS_RELAXABLE 0x200
128 /* symbols and relocation */
130 typedef unsigned long symindex
;
132 #define BFD_NO_MORE_SYMBOLS ((symindex) ~0)
134 typedef enum bfd_symclass
{
135 bfd_symclass_unknown
= 0,
136 bfd_symclass_fcommon
, /* fortran common symbols */
137 bfd_symclass_global
, /* global symbol, what a surprise */
138 bfd_symclass_debugger
, /* some debugger symbol */
139 bfd_symclass_undefined
/* none known */
143 typedef int symtype
; /* Who knows, yet? */
146 /* general purpose part of a symbol;
147 target specific parts will be found in libcoff.h, liba.out.h etc */
150 #define bfd_get_section(x) ((x)->section)
151 #define bfd_get_output_section(x) ((x)->section->output_section)
152 #define bfd_set_section(x,y) ((x)->section) = (y)
153 #define bfd_asymbol_base(x) ((x)->section?((x)->section->vma):0)
154 #define bfd_asymbol_value(x) (bfd_asymbol_base(x) + x->value)
155 #define bfd_asymbol_name(x) ((x)->name)
157 /* This is a type pun with struct ranlib on purpose! */
158 typedef struct carsym
{
160 file_ptr file_offset
; /* look here to find the file */
161 } carsym
; /* to make these you call a carsymogen */
164 /* Used in generating armaps. Perhaps just a forward definition would do? */
165 struct orl
{ /* output ranlib */
166 char **name
; /* symbol name */
167 file_ptr pos
; /* bfd* or file position */
168 int namidx
; /* index into string table */
173 /* Linenumber stuff */
174 typedef struct lineno_cache_entry
{
175 unsigned int line_number
; /* Linenumber from start of function*/
177 struct symbol_cache_entry
*sym
; /* Function name */
178 unsigned long offset
; /* Offset into section */
182 /* object and core file sections */
185 #define align_power(addr, align) \
186 ( ((addr) + ((1<<(align))-1)) & (-1 << (align)))
188 typedef struct sec
*sec_ptr
;
190 #define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0)
191 #define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0)
192 #define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0)
193 #define bfd_section_name(bfd, ptr) ((ptr)->name)
194 #define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr))
195 #define bfd_section_vma(bfd, ptr) ((ptr)->vma)
196 #define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
197 #define bfd_get_section_flags(bfd, ptr) ((ptr)->flags + 0)
198 #define bfd_get_section_userdata(bfd, ptr) ((ptr)->userdata)
200 #define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (val)), ((ptr)->user_set_vma = true), true)
201 #define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true)
202 #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true)
204 typedef struct stat stat_type
;
206 /** Error handling */
208 typedef enum bfd_error
{
209 no_error
= 0, system_call_error
, invalid_target
,
210 wrong_format
, invalid_operation
, no_memory
,
211 no_symbols
, no_relocation_info
,
212 no_more_archived_files
, malformed_archive
,
213 symbol_not_found
, file_not_recognized
,
214 file_ambiguously_recognized
, no_contents
,
215 bfd_error_nonrepresentable_section
,
216 no_debug_section
, bad_value
,
217 invalid_error_code
} bfd_ec
;
219 extern bfd_ec bfd_error
;
220 struct reloc_cache_entry
;
221 struct bfd_seclet_struct
;
224 typedef struct bfd_error_vector
{
225 PROTO(void,(* nonrepresentable_section
),(CONST bfd
*CONST abfd
,
226 CONST
char *CONST name
));
227 PROTO(void,(* undefined_symbol
),(CONST
struct reloc_cache_entry
*rel
,
228 CONST
struct bfd_seclet_struct
*sec
230 PROTO(void, (* reloc_value_truncated
),(CONST
struct
231 reloc_cache_entry
*rel
,
232 struct bfd_seclet_struct
*sec
));
234 PROTO(void, (* reloc_dangerous
),(CONST
struct reloc_cache_entry
*rel
,
235 CONST
struct bfd_seclet_struct
*sec
));
237 } bfd_error_vector_type
;
239 PROTO (CONST
char *, bfd_errmsg
, (bfd_ec error_tag
));
240 PROTO (void, bfd_perror
, (CONST
char *message
));
243 typedef enum bfd_print_symbol
245 bfd_print_symbol_name
,
246 bfd_print_symbol_more
,
247 bfd_print_symbol_all
,
248 bfd_print_symbol_nm
/* Pretty format suitable for nm program. */
249 } bfd_print_symbol_type
;
253 /* The code that implements targets can initialize a jump table with this
254 macro. It must name all its routines the same way (a prefix plus
255 the standard routine suffix), or it must #define the routines that
256 are not so named, before calling JUMP_TABLE in the initializer. */
258 /* Semi-portable string concatenation in cpp */
261 #define CAT(a,b) a##b
263 #define CAT(a,b) a/**/b
267 #define JUMP_TABLE(NAME)\
268 CAT(NAME,_core_file_failing_command),\
269 CAT(NAME,_core_file_failing_signal),\
270 CAT(NAME,_core_file_matches_executable_p),\
271 CAT(NAME,_slurp_armap),\
272 CAT(NAME,_slurp_extended_name_table),\
273 CAT(NAME,_truncate_arname),\
274 CAT(NAME,_write_armap),\
275 CAT(NAME,_close_and_cleanup), \
276 CAT(NAME,_set_section_contents),\
277 CAT(NAME,_get_section_contents),\
278 CAT(NAME,_new_section_hook),\
279 CAT(NAME,_get_symtab_upper_bound),\
280 CAT(NAME,_get_symtab),\
281 CAT(NAME,_get_reloc_upper_bound),\
282 CAT(NAME,_canonicalize_reloc),\
283 CAT(NAME,_make_empty_symbol),\
284 CAT(NAME,_print_symbol),\
285 CAT(NAME,_get_lineno),\
286 CAT(NAME,_set_arch_mach),\
287 CAT(NAME,_openr_next_archived_file),\
288 CAT(NAME,_find_nearest_line),\
289 CAT(NAME,_generic_stat_arch_elt),\
290 CAT(NAME,_sizeof_headers),\
291 CAT(NAME,_bfd_debug_info_start),\
292 CAT(NAME,_bfd_debug_info_end),\
293 CAT(NAME,_bfd_debug_info_accumulate),\
294 CAT(NAME,_bfd_get_relocated_section_contents),\
295 CAT(NAME,_bfd_relax_section)
297 #define COFF_SWAP_TABLE \
298 coff_swap_aux_in, coff_swap_sym_in, coff_swap_lineno_in, \
299 coff_swap_aux_out, coff_swap_sym_out, \
300 coff_swap_lineno_out, coff_swap_reloc_out, \
301 coff_swap_filehdr_out, coff_swap_aouthdr_out, \
306 /* User program access to BFD facilities */
308 extern CONST
short _bfd_host_big_endian
;
309 #define HOST_BYTE_ORDER_BIG_P (*(char *)&_bfd_host_big_endian)
313 /* Cast from const char * to char * so that caller can assign to
314 a char * without a warning. */
315 #define bfd_get_filename(abfd) ((char *) (abfd)->filename)
316 #define bfd_get_format(abfd) ((abfd)->format)
317 #define bfd_get_target(abfd) ((abfd)->xvec->name)
318 #define bfd_get_file_flags(abfd) ((abfd)->flags)
319 #define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
320 #define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
321 #define bfd_my_archive(abfd) ((abfd)->my_archive)
322 #define bfd_has_map(abfd) ((abfd)->has_armap)
323 #define bfd_header_twiddle_required(abfd) \
324 ((((abfd)->xvec->header_byteorder_big_p) \
325 != (boolean)HOST_BYTE_ORDER_BIG_P) ? true:false)
327 #define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types)
328 #define bfd_usrdata(abfd) ((abfd)->usrdata)
330 #define bfd_get_start_address(abfd) ((abfd)->start_address)
331 #define bfd_get_symcount(abfd) ((abfd)->symcount)
332 #define bfd_get_outsymbols(abfd) ((abfd)->outsymbols)
333 #define bfd_count_sections(abfd) ((abfd)->section_count)
334 #define bfd_get_architecture(abfd) ((abfd)->obj_arch)
335 #define bfd_get_machine(abfd) ((abfd)->obj_machine)
337 #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
343 /* And more from the source. */
344 void EXFUN(bfd_init
, (void));
345 bfd
*EXFUN(bfd_openr
, (CONST
char *filename
, CONST
char*target
));
346 bfd
*EXFUN(bfd_fdopenr
, (CONST
char *filename
, CONST
char *target
, int fd
));
347 bfd
*EXFUN(bfd_openw
, (CONST
char *filename
, CONST
char *target
));
348 boolean
EXFUN(bfd_close
, (bfd
*));
349 boolean
EXFUN(bfd_close_all_done
, (bfd
*));
350 bfd_size_type
EXFUN(bfd_alloc_size
, (bfd
*abfd
));
351 bfd
*EXFUN(bfd_create
, (CONST
char *filename
, bfd
*template));
352 #define bfd_put_8(abfd, val, ptr) \
353 (*((char *)ptr) = (char)val)
354 #define bfd_get_8(abfd, ptr) \
356 #define bfd_put_16(abfd, val, ptr) \
357 BFD_SEND(abfd, bfd_putx16, (val,ptr))
358 #define bfd_get_16(abfd, ptr) \
359 BFD_SEND(abfd, bfd_getx16, (ptr))
360 #define bfd_put_32(abfd, val, ptr) \
361 BFD_SEND(abfd, bfd_putx32, (val,ptr))
362 #define bfd_get_32(abfd, ptr) \
363 BFD_SEND(abfd, bfd_getx32, (ptr))
364 #define bfd_put_64(abfd, val, ptr) \
365 BFD_SEND(abfd, bfd_putx64, (val, ptr))
366 #define bfd_get_64(abfd, ptr) \
367 BFD_SEND(abfd, bfd_getx64, (ptr))
368 #define bfd_h_put_8(abfd, val, ptr) \
369 (*((char *)ptr) = (char)val)
370 #define bfd_h_get_8(abfd, ptr) \
372 #define bfd_h_put_16(abfd, val, ptr) \
373 BFD_SEND(abfd, bfd_h_putx16,(val,ptr))
374 #define bfd_h_get_16(abfd, ptr) \
375 BFD_SEND(abfd, bfd_h_getx16,(ptr))
376 #define bfd_h_put_32(abfd, val, ptr) \
377 BFD_SEND(abfd, bfd_h_putx32,(val,ptr))
378 #define bfd_h_get_32(abfd, ptr) \
379 BFD_SEND(abfd, bfd_h_getx32,(ptr))
380 #define bfd_h_put_64(abfd, val, ptr) \
381 BFD_SEND(abfd, bfd_h_putx64,(val, ptr))
382 #define bfd_h_get_64(abfd, ptr) \
383 BFD_SEND(abfd, bfd_h_getx64,(ptr))
386 /* The name of the section, the name isn't a copy, the pointer is
387 the same as that passed to bfd_make_section. */
392 /* Which section is it 0.nth */
396 /* The next section in the list belonging to the BFD, or NULL. */
400 /* The field flags contains attributes of the section. Some of
401 flags are read in from the object file, and some are
402 synthesized from other information. */
406 #define SEC_NO_FLAGS 0x000
408 /* Tells the OS to allocate space for this section when loaded.
409 This would clear for a section containing debug information
413 #define SEC_ALLOC 0x001
414 /* Tells the OS to load the section from the file when loading.
415 This would be clear for a .bss section */
417 #define SEC_LOAD 0x002
418 /* The section contains data still to be relocated, so there will
419 be some relocation information too. */
421 #define SEC_RELOC 0x004
425 #define SEC_BALIGN 0x008
427 /* A signal to the OS that the section contains read only
429 #define SEC_READONLY 0x010
431 /* The section contains code only. */
433 #define SEC_CODE 0x020
435 /* The section contains data only. */
437 #define SEC_DATA 0x040
439 /* The section will reside in ROM. */
441 #define SEC_ROM 0x080
443 /* The section contains constructor information. This section
444 type is used by the linker to create lists of constructors and
445 destructors used by <<g++>>. When a back end sees a symbol
446 which should be used in a constructor list, it creates a new
447 section for the type of name (eg <<__CTOR_LIST__>>), attaches
448 the symbol to it and builds a relocation. To build the lists
449 of constructors, all the linker has to to is catenate all the
450 sections called <<__CTOR_LIST__>> and relocte the data
451 contained within - exactly the operations it would peform on
454 #define SEC_CONSTRUCTOR 0x100
456 /* The section is a constuctor, and should be placed at the
460 #define SEC_CONSTRUCTOR_TEXT 0x1100
462 #define SEC_CONSTRUCTOR_DATA 0x2100
464 #define SEC_CONSTRUCTOR_BSS 0x3100
467 /* The section has contents - a bss section could be
468 <<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>, a debug section could be
469 <<SEC_HAS_CONTENTS>> */
471 #define SEC_HAS_CONTENTS 0x200
473 /* An instruction to the linker not to output sections
474 containing this flag even if they have information which
475 would normally be written. */
477 #define SEC_NEVER_LOAD 0x400
482 boolean user_set_vma
;
484 /* The size of the section in bytes, as it will be output.
485 contains a value even if the section has no contents (eg, the
486 size of <<.bss>>). This will be filled in after relocation */
488 bfd_size_type _cooked_size
;
490 /* The size on disk of the section in bytes originally. Normally this
491 value is the same as the size, but if some relaxing has
492 been done, then this value will be bigger. */
494 bfd_size_type _raw_size
;
496 /* If this section is going to be output, then this value is the
497 offset into the output section of the first byte in the input
498 section. Eg, if this was going to start at the 100th byte in
499 the output section, this value would be 100. */
501 bfd_vma output_offset
;
503 /* The output section through which to map on output. */
505 struct sec
*output_section
;
507 /* The alignment requirement of the section, as an exponent - eg
508 3 aligns to 2^3 (or 8) */
510 unsigned int alignment_power
;
512 /* If an input section, a pointer to a vector of relocation
513 records for the data in this section. */
515 struct reloc_cache_entry
*relocation
;
517 /* If an output section, a pointer to a vector of pointers to
518 relocation records for the data in this section. */
520 struct reloc_cache_entry
**orelocation
;
522 /* The number of relocation records in one of the above */
524 unsigned reloc_count
;
526 /* Information below is back end specific - and not always used
529 File position of section data */
533 /* File position of relocation info */
535 file_ptr rel_filepos
;
537 /* File position of line data */
539 file_ptr line_filepos
;
541 /* Pointer to data for applications */
545 struct lang_output_section
*otheruserdata
;
547 /* Attached line number information */
551 /* Number of line number records */
553 unsigned int lineno_count
;
555 /* When a section is being output, this value changes as more
556 linenumbers are written out */
558 file_ptr moving_line_filepos
;
560 /* what the section number is in the target world */
566 /* If this is a constructor section then here is a list of the
567 relocations created to relocate items within it. */
569 struct relent_chain
*constructor_chain
;
571 /* The BFD which owns the section. */
576 /* A symbol which points at this section only */
577 struct symbol_cache_entry
*symbol
;
578 struct symbol_cache_entry
**symbol_ptr_ptr
;
579 struct bfd_seclet_struct
*seclets_head
;
580 struct bfd_seclet_struct
*seclets_tail
;
584 #define BFD_ABS_SECTION_NAME "*ABS*"
585 #define BFD_UND_SECTION_NAME "*UND*"
586 #define BFD_COM_SECTION_NAME "*COM*"
588 /* the absolute section */
589 extern asection bfd_abs_section
;
590 /* Pointer to the undefined section */
591 extern asection bfd_und_section
;
592 /* Pointer to the common section */
593 extern asection bfd_com_section
;
595 extern struct symbol_cache_entry
*bfd_abs_symbol
;
596 extern struct symbol_cache_entry
*bfd_com_symbol
;
597 extern struct symbol_cache_entry
*bfd_und_symbol
;
598 #define bfd_get_section_size_before_reloc(section) \
599 (section->reloc_done ? (abort(),1): (section)->_raw_size)
600 #define bfd_get_section_size_after_reloc(section) \
601 ((section->reloc_done) ? (section)->_cooked_size: (abort(),1))
602 asection
*EXFUN(bfd_get_section_by_name
, (bfd
*abfd
, CONST
char *name
));
603 asection
*EXFUN(bfd_make_section_old_way
, (bfd
*, CONST
char *name
));
604 asection
* EXFUN(bfd_make_section
, (bfd
*, CONST
char *name
));
605 boolean
EXFUN(bfd_set_section_flags
, (bfd
*, asection
*, flagword
));
606 void EXFUN(bfd_map_over_sections
, (bfd
*abfd
,
607 void (*func
)(bfd
*abfd
,
611 boolean
EXFUN(bfd_set_section_size
, (bfd
*, asection
*, bfd_size_type val
));
612 boolean
EXFUN(bfd_set_section_contents
617 bfd_size_type count
));
618 boolean
EXFUN(bfd_get_section_contents
619 , (bfd
*abfd
, asection
*section
, PTR location
,
620 file_ptr offset
, bfd_size_type count
));
621 enum bfd_architecture
623 bfd_arch_unknown
, /* File arch not known */
624 bfd_arch_obscure
, /* Arch known, not one of these */
625 bfd_arch_m68k
, /* Motorola 68xxx */
626 bfd_arch_vax
, /* DEC Vax */
627 bfd_arch_i960
, /* Intel 960 */
628 /* The order of the following is important.
629 lower number indicates a machine type that
630 only accepts a subset of the instructions
631 available to machines with higher numbers.
632 The exception is the "ca", which is
633 incompatible with all other machines except
636 #define bfd_mach_i960_core 1
637 #define bfd_mach_i960_ka_sa 2
638 #define bfd_mach_i960_kb_sb 3
639 #define bfd_mach_i960_mc 4
640 #define bfd_mach_i960_xa 5
641 #define bfd_mach_i960_ca 6
643 bfd_arch_a29k
, /* AMD 29000 */
644 bfd_arch_sparc
, /* SPARC */
645 bfd_arch_mips
, /* MIPS Rxxxx */
646 bfd_arch_i386
, /* Intel 386 */
647 bfd_arch_we32k
, /* AT&T WE32xxx */
648 bfd_arch_tahoe
, /* CCI/Harris Tahoe */
649 bfd_arch_i860
, /* Intel 860 */
650 bfd_arch_romp
, /* IBM ROMP PC/RT */
651 bfd_arch_alliant
, /* Alliant */
652 bfd_arch_convex
, /* Convex */
653 bfd_arch_m88k
, /* Motorola 88xxx */
654 bfd_arch_pyramid
, /* Pyramid Technology */
655 bfd_arch_h8300
, /* Hitachi H8/300 */
656 bfd_arch_rs6000
, /* IBM RS/6000 */
657 bfd_arch_hppa
, /* HP PA RISC */
658 bfd_arch_z8k
, /* Zilog Z8000 */
659 #define bfd_mach_z8001 1
660 #define bfd_mach_z8002 2
664 typedef struct bfd_arch_info
667 int bits_per_address
;
669 enum bfd_architecture arch
;
672 CONST
char *printable_name
;
673 unsigned int section_align_power
;
674 /* true if this is the default machine for the architecture */
676 CONST
struct bfd_arch_info
* EXFUN((*compatible
),
677 (CONST
struct bfd_arch_info
*a
,
678 CONST
struct bfd_arch_info
*b
));
680 boolean
EXFUN((*scan
),(CONST
struct bfd_arch_info
*,CONST
char *));
681 unsigned int EXFUN((*disassemble
),(bfd_vma addr
, CONST
char *data
,
684 struct bfd_arch_info
*next
;
685 } bfd_arch_info_type
;
686 CONST
char *EXFUN(bfd_printable_name
, (bfd
*abfd
));
687 bfd_arch_info_type
*EXFUN(bfd_scan_arch
, (CONST
char *));
688 CONST bfd_arch_info_type
*EXFUN(bfd_arch_get_compatible
, (
691 void EXFUN(bfd_set_arch_info
, (bfd
*, bfd_arch_info_type
*));
692 enum bfd_architecture
EXFUN(bfd_get_arch
, (bfd
*abfd
));
693 unsigned long EXFUN(bfd_get_mach
, (bfd
*abfd
));
694 unsigned int EXFUN(bfd_arch_bits_per_byte
, (bfd
*abfd
));
695 unsigned int EXFUN(bfd_arch_bits_per_address
, (bfd
*abfd
));
696 bfd_arch_info_type
* EXFUN(bfd_get_arch_info
, (bfd
*));
697 bfd_arch_info_type
*EXFUN(bfd_lookup_arch
698 , (enum bfd_architecture
701 CONST
char * EXFUN(bfd_printable_arch_mach
702 , (enum bfd_architecture arch
, unsigned long machine
));
703 typedef enum bfd_reloc_status
705 /* No errors detected */
708 /* The relocation was performed, but there was an overflow. */
711 /* The address to relocate was not within the section supplied*/
712 bfd_reloc_outofrange
,
714 /* Used by special functions */
718 bfd_reloc_notsupported
,
720 /* Unsupported relocation size requested. */
723 /* The symbol to relocate against was undefined.*/
726 /* The relocation was performed, but may not be ok - presently
727 generated only when linking i960 coff files with i960 b.out
731 bfd_reloc_status_type
;
734 typedef struct reloc_cache_entry
736 /* A pointer into the canonical table of pointers */
737 struct symbol_cache_entry
**sym_ptr_ptr
;
739 /* offset in section */
740 rawdata_offset address
;
742 /* addend for relocation value */
745 /* Pointer to how to perform the required relocation */
746 CONST
struct reloc_howto_struct
*howto
;
750 typedef CONST
struct reloc_howto_struct
752 /* The type field has mainly a documetary use - the back end can
753 to what it wants with it, though the normally the back end's
754 external idea of what a reloc number would be would be stored
755 in this field. For example, the a PC relative word relocation
756 in a coff environment would have the type 023 - because that's
757 what the outside world calls a R_PCRWORD reloc. */
760 /* The value the final relocation is shifted right by. This drops
761 unwanted data from the relocation. */
762 unsigned int rightshift
;
764 /* The size of the item to be relocated - 0, is one byte, 1 is 2
765 bytes, 3 is four bytes. A -ve value indicates that the
766 result is to be subtracted from the data*/
770 unsigned int bitsize
;
772 /* Notes that the relocation is relative to the location in the
773 data section of the addend. The relocation function will
774 subtract from the relocation value the address of the location
784 /* Causes the relocation routine to return an error if overflow
785 is detected when relocating. */
786 boolean complain_on_overflow
;
788 /* If this field is non null, then the supplied function is
789 called rather than the normal function. This allows really
790 strange relocation methods to be accomodated (eg, i960 callj
792 bfd_reloc_status_type
EXFUN ((*special_function
),
794 arelent
*reloc_entry
,
795 struct symbol_cache_entry
*symbol
,
797 asection
*input_section
,
800 /* The textual name of the relocation type. */
803 /* When performing a partial link, some formats must modify the
804 relocations rather than the data - this flag signals this.*/
805 boolean partial_inplace
;
807 /* The src_mask is used to select what parts of the read in data
808 are to be used in the relocation sum. Eg, if this was an 8 bit
809 bit of data which we read and relocated, this would be
810 0x000000ff. When we have relocs which have an addend, such as
811 sun4 extended relocs, the value in the offset part of a
812 relocating field is garbage so we never use it. In this case
813 the mask would be 0x00000000. */
816 /* The dst_mask is what parts of the instruction are replaced
817 into the instruction. In most cases src_mask == dst_mask,
818 except in the above special case, where dst_mask would be
819 0x000000ff, and src_mask would be 0x00000000. */
822 /* When some formats create PC relative instructions, they leave
823 the value of the pc of the place being relocated in the offset
824 slot of the instruction, so that a PC relative relocation can
825 be made just by adding in an ordinary offset (eg sun3 a.out).
826 Some formats leave the displacement part of an instruction
827 empty (eg m88k bcs), this flag signals the fact.*/
828 boolean pcrel_offset
;
831 #define HOWTO(C, R,S,B, P, BI, ABS, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
832 {(unsigned)C,R,S,B, P, BI, ABS,O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC}
833 #define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,false,false,FUNCTION, NAME,false,0,0,IN)
835 #define HOWTO_PREPARE(relocation, symbol) \
837 if (symbol != (asymbol *)NULL) { \
838 if (symbol->section == &bfd_com_section) { \
842 relocation = symbol->value; \
846 typedef unsigned char bfd_byte
;
848 typedef struct relent_chain
{
850 struct relent_chain
*next
;
852 bfd_reloc_status_type
853 EXFUN(bfd_perform_relocation
855 arelent
*reloc_entry
,
857 asection
*input_section
,
859 typedef enum bfd_reloc_code_real
862 /* 16 bits wide, simple reloc */
865 /* 8 bits wide, but used to form an address like 0xffnn */
868 /* 8 bits wide, simple */
871 /* 8 bits wide, pc relative */
874 /* The type of reloc used to build a contructor table - at the
875 moment probably a 32 bit wide abs address, but the cpu can
880 /* 32 bits wide, simple reloc */
882 /* 32 bits, PC-relative */
885 /* High 22 bits of 32-bit value; simple reloc. */
890 /* Reloc types used for i960/b.out. */
892 BFD_RELOC_I960_CALLJ
,
895 /* 32-bit pc-relative, shifted right 2 bits (i.e., 30-bit
896 word displacement, e.g. for SPARC) */
897 BFD_RELOC_32_PCREL_S2
,
899 /* now for the sparc/elf codes */
900 BFD_RELOC_NONE
, /* actually used */
901 BFD_RELOC_SPARC_WDISP22
,
904 BFD_RELOC_SPARC_BASE13
,
905 BFD_RELOC_SPARC_GOT10
,
906 BFD_RELOC_SPARC_GOT13
,
907 BFD_RELOC_SPARC_GOT22
,
908 BFD_RELOC_SPARC_PC10
,
909 BFD_RELOC_SPARC_PC22
,
910 BFD_RELOC_SPARC_WPLT30
,
911 BFD_RELOC_SPARC_COPY
,
912 BFD_RELOC_SPARC_GLOB_DAT
,
913 BFD_RELOC_SPARC_JMP_SLOT
,
914 BFD_RELOC_SPARC_RELATIVE
,
915 BFD_RELOC_SPARC_UA32
,
917 /* this one is a.out specific? */
918 BFD_RELOC_SPARC_BASE22
,
920 /* this must be the highest numeric value */
922 } bfd_reloc_code_real_type
;
923 CONST
struct reloc_howto_struct
*
924 EXFUN(bfd_reloc_type_lookup
, (bfd
*abfd
, bfd_reloc_code_real_type code
));
925 typedef struct symbol_cache_entry
927 /* A pointer to the BFD which owns the symbol. This information
928 is necessary so that a back end can work out what additional
929 (invisible to the application writer) information is carried
932 struct _bfd
*the_bfd
;
934 /* The text of the symbol. The name is left alone, and not copied - the
935 application may not alter it. */
938 /* The value of the symbol.*/
941 /* Attributes of a symbol: */
943 #define BSF_NO_FLAGS 0x00
945 /* The symbol has local scope; <<static>> in <<C>>. The value
946 is the offset into the section of the data. */
947 #define BSF_LOCAL 0x01
949 /* The symbol has global scope; initialized data in <<C>>. The
950 value is the offset into the section of the data. */
951 #define BSF_GLOBAL 0x02
954 #define BSF_IMPORT 0x04
956 /* The symbol has global scope, and is exported. The value is
957 the offset into the section of the data. */
958 #define BSF_EXPORT 0x08
960 /* The symbol is undefined. <<extern>> in <<C>>. The value has
962 #define BSF_UNDEFINED_OBS 0x10
964 /* The symbol is common, initialized to zero; default in
965 <<C>>. The value is the size of the object in bytes. */
966 #define BSF_FORT_COMM_OBS 0x20
968 /* A normal C symbol would be one of:
969 <<BSF_LOCAL>>, <<BSF_FORT_COMM>>, <<BSF_UNDEFINED>> or
970 <<BSF_EXPORT|BSD_GLOBAL>> */
972 /* The symbol is a debugging record. The value has an arbitary
974 #define BSF_DEBUGGING 0x40
976 /* Used by the linker */
977 #define BSF_KEEP 0x10000
978 #define BSF_KEEP_G 0x80000
981 #define BSF_WEAK 0x100000
982 #define BSF_CTOR 0x200000
984 /* This symbol was created to point to a section, e.g. ELF's
985 STT_SECTION symbols. */
986 #define BSF_SECTION_SYM 0x400000
988 /* The symbol used to be a common symbol, but now it is
990 #define BSF_OLD_COMMON 0x800000
992 /* The default value for common data. */
993 #define BFD_FORT_COMM_DEFAULT_VALUE 0
995 /* In some files the type of a symbol sometimes alters its
996 location in an output file - ie in coff a <<ISFCN>> symbol
997 which is also <<C_EXT>> symbol appears where it was
998 declared and not at the end of a section. This bit is set
999 by the target BFD part to convey this information. */
1001 #define BSF_NOT_AT_END 0x40000
1003 /* Signal that the symbol is the label of constructor section. */
1004 #define BSF_CONSTRUCTOR 0x1000000
1006 /* Signal that the symbol is a warning symbol. If the symbol
1007 is a warning symbol, then the value field (I know this is
1008 tacky) will point to the asymbol which when referenced will
1009 cause the warning. */
1010 #define BSF_WARNING 0x2000000
1012 /* Signal that the symbol is indirect. The value of the symbol
1013 is a pointer to an undefined asymbol which contains the
1014 name to use instead. */
1015 #define BSF_INDIRECT 0x4000000
1017 /* BSF_FILE marks symbols that contain a file name. This is used
1018 for ELF STT_FILE symbols. */
1019 #define BSF_FILE 0x08000000
1023 /* A pointer to the section to which this symbol is
1024 relative. This will always be non NULL, there are special
1025 sections for undefined and absolute symbols */
1026 struct sec
*section
;
1028 /* Back end special data. This is being phased out in favour
1029 of making this a union. */
1033 #define get_symtab_upper_bound(abfd) \
1034 BFD_SEND (abfd, _get_symtab_upper_bound, (abfd))
1035 #define bfd_canonicalize_symtab(abfd, location) \
1036 BFD_SEND (abfd, _bfd_canonicalize_symtab,\
1038 boolean
EXFUN(bfd_set_symtab
, (bfd
*, asymbol
**, unsigned int ));
1039 void EXFUN(bfd_print_symbol_vandf
, (PTR file
, asymbol
*symbol
));
1040 #define bfd_make_empty_symbol(abfd) \
1041 BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
1042 #define bfd_make_debug_symbol(abfd,ptr,size) \
1043 BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
1044 int EXFUN(bfd_decode_symclass
, (asymbol
*symbol
));
1047 /* The filename the application opened the BFD with. */
1048 CONST
char *filename
;
1050 /* A pointer to the target jump table. */
1051 struct bfd_target
*xvec
;
1053 /* To avoid dragging too many header files into every file that
1054 includes `<<bfd.h>>', IOSTREAM has been declared as a "char
1055 *", and MTIME as a "long". Their correct types, to which they
1056 are cast when used, are "FILE *" and "time_t". The iostream
1057 is the result of an fopen on the filename. */
1060 /* Is the file being cached */
1064 /* Marks whether there was a default target specified when the
1065 BFD was opened. This is used to select what matching algorithm
1066 to use to chose the back end. */
1068 boolean target_defaulted
;
1070 /* The caching routines use these to maintain a
1071 least-recently-used list of BFDs */
1073 struct _bfd
*lru_prev
, *lru_next
;
1075 /* When a file is closed by the caching routines, BFD retains
1076 state information on the file here:
1083 boolean opened_once
;
1085 /* Set if we have a locally maintained mtime value, rather than
1086 getting it from the file each time: */
1090 /* File modified time, if mtime_set is true: */
1094 /* Reserved for an unimplemented file locking extension.*/
1098 /* The format which belongs to the BFD.*/
1102 /* The direction the BFD was opened with*/
1104 enum bfd_direction
{no_direction
= 0,
1106 write_direction
= 2,
1107 both_direction
= 3} direction
;
1109 /* Format_specific flags*/
1113 /* Currently my_archive is tested before adding origin to
1114 anything. I believe that this can become always an add of
1115 origin, with origin set to 0 for non archive files. */
1119 /* Remember when output has begun, to stop strange things
1121 boolean output_has_begun
;
1123 /* Pointer to linked list of sections*/
1124 struct sec
*sections
;
1126 /* The number of sections */
1127 unsigned int section_count
;
1129 /* Stuff only useful for object files:
1130 The start address. */
1131 bfd_vma start_address
;
1133 /* Used for input and output*/
1134 unsigned int symcount
;
1136 /* Symbol table for output BFD*/
1137 struct symbol_cache_entry
**outsymbols
;
1139 /* Pointer to structure which contains architecture information*/
1140 struct bfd_arch_info
*arch_info
;
1142 /* Stuff only useful for archives:*/
1144 struct _bfd
*my_archive
;
1146 struct _bfd
*archive_head
;
1149 /* Used by the back end to hold private data. */
1153 struct aout_data_struct
*aout_data
;
1154 struct artdata
*aout_ar_data
;
1155 struct _oasys_data
*oasys_obj_data
;
1156 struct _oasys_ar_data
*oasys_ar_data
;
1157 struct coff_tdata
*coff_obj_data
;
1158 struct ieee_data_struct
*ieee_data
;
1159 struct ieee_ar_data_struct
*ieee_ar_data
;
1160 struct srec_data_struct
*srec_data
;
1161 struct srec_data_struct
*tekhex_data
;
1162 struct elf_obj_tdata
*elf_obj_data
;
1163 struct bout_data_struct
*bout_data
;
1164 struct sun_core_struct
*sun_core_data
;
1165 struct trad_core_struct
*trad_core_data
;
1166 struct hppa_data_struct
*hppa_data
;
1170 /* Used by the application to hold private data*/
1173 /* Where all the allocated stuff under this BFD goes */
1174 struct obstack memory
;
1176 /* Is this really needed in addition to usrdata? */
1177 asymbol
**ld_symbols
;
1180 unsigned int EXFUN(bfd_get_reloc_upper_bound
, (bfd
*abfd
, asection
*sect
));
1181 unsigned int EXFUN(bfd_canonicalize_reloc
1186 boolean
EXFUN(bfd_set_file_flags
, (bfd
*abfd
, flagword flags
));
1187 void EXFUN(bfd_set_reloc
1188 , (bfd
*abfd
, asection
*sec
, arelent
**rel
, unsigned int count
)
1191 boolean
EXFUN(bfd_set_start_address
, (bfd
*, bfd_vma
));
1192 long EXFUN(bfd_get_mtime
, (bfd
*));
1193 #define bfd_sizeof_headers(abfd, reloc) \
1194 BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
1196 #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
1197 BFD_SEND (abfd, _bfd_find_nearest_line, (abfd, sec, syms, off, file, func, line))
1199 /* Do these three do anything useful at all, for any back end? */
1200 #define bfd_debug_info_start(abfd) \
1201 BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
1203 #define bfd_debug_info_end(abfd) \
1204 BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
1206 #define bfd_debug_info_accumulate(abfd, section) \
1207 BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
1210 #define bfd_stat_arch_elt(abfd, stat) \
1211 BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
1213 #define bfd_coff_swap_aux_in(a,e,t,c,i) \
1214 BFD_SEND (a, _bfd_coff_swap_aux_in, (a,e,t,c,i))
1216 #define bfd_coff_swap_sym_in(a,e,i) \
1217 BFD_SEND (a, _bfd_coff_swap_sym_in, (a,e,i))
1219 #define bfd_coff_swap_lineno_in(a,e,i) \
1220 BFD_SEND ( a, _bfd_coff_swap_lineno_in, (a,e,i))
1222 #define bfd_set_arch_mach(abfd, arch, mach)\
1223 BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
1225 #define bfd_coff_swap_reloc_out(abfd, i, o) \
1226 BFD_SEND (abfd, _bfd_coff_swap_reloc_out, (abfd, i, o))
1228 #define bfd_coff_swap_lineno_out(abfd, i, o) \
1229 BFD_SEND (abfd, _bfd_coff_swap_lineno_out, (abfd, i, o))
1231 #define bfd_coff_swap_aux_out(abfd, i, t,c,o) \
1232 BFD_SEND (abfd, _bfd_coff_swap_aux_out, (abfd, i,t,c, o))
1234 #define bfd_coff_swap_sym_out(abfd, i,o) \
1235 BFD_SEND (abfd, _bfd_coff_swap_sym_out, (abfd, i, o))
1237 #define bfd_coff_swap_scnhdr_out(abfd, i,o) \
1238 BFD_SEND (abfd, _bfd_coff_swap_scnhdr_out, (abfd, i, o))
1240 #define bfd_coff_swap_filehdr_out(abfd, i,o) \
1241 BFD_SEND (abfd, _bfd_coff_swap_filehdr_out, (abfd, i, o))
1243 #define bfd_coff_swap_aouthdr_out(abfd, i,o) \
1244 BFD_SEND (abfd, _bfd_coff_swap_aouthdr_out, (abfd, i, o))
1246 #define bfd_get_relocated_section_contents(abfd, seclet, data) \
1247 BFD_SEND (abfd, _bfd_get_relocated_section_contents, (abfd, seclet, data))
1249 #define bfd_relax_section(abfd, section, symbols) \
1250 BFD_SEND (abfd, _bfd_relax_section, (abfd, section, symbols))
1251 symindex
EXFUN(bfd_get_next_mapent
, (bfd
*, symindex previous
, carsym
** sym
));
1252 boolean
EXFUN(bfd_set_archive_head
, (bfd
*output
, bfd
*new_head
));
1253 bfd
*EXFUN(bfd_get_elt_at_index
, (bfd
* archive
, int index
));
1254 bfd
* EXFUN(bfd_openr_next_archived_file
, (bfd
*archive
, bfd
*previous
));
1255 CONST
char *EXFUN(bfd_core_file_failing_command
, (bfd
*));
1256 int EXFUN(bfd_core_file_failing_signal
, (bfd
*));
1257 boolean
EXFUN(core_file_matches_executable_p
1258 , (bfd
*core_bfd
, bfd
*exec_bfd
));
1259 #define SDEF(ret, name, arglist) \
1260 PROTO(ret,(*name),arglist)
1261 #define SDEF_FMT(ret, name, arglist) \
1262 PROTO(ret,(*name[bfd_type_end]),arglist)
1263 #define BFD_SEND(bfd, message, arglist) \
1264 ((*((bfd)->xvec->message)) arglist)
1265 #define BFD_SEND_FMT(bfd, message, arglist) \
1266 (((bfd)->xvec->message[(int)((bfd)->format)]) arglist)
1267 typedef struct bfd_target
1270 enum target_flavour
{
1271 bfd_target_unknown_flavour
,
1272 bfd_target_aout_flavour
,
1273 bfd_target_coff_flavour
,
1274 bfd_target_elf_flavour
,
1275 bfd_target_ieee_flavour
,
1276 bfd_target_oasys_flavour
,
1277 bfd_target_tekhex_flavour
,
1278 bfd_target_srec_flavour
,
1279 bfd_target_hppa_flavour
} flavour
;
1280 boolean byteorder_big_p
;
1281 boolean header_byteorder_big_p
;
1282 flagword object_flags
;
1283 flagword section_flags
;
1284 char symbol_leading_char
;
1286 unsigned short ar_max_namelen
;
1287 unsigned int align_power_min
;
1288 SDEF (bfd_vma
, bfd_getx64
, (bfd_byte
*));
1289 SDEF (void, bfd_putx64
, (bfd_vma
, bfd_byte
*));
1290 SDEF (bfd_vma
, bfd_getx32
, (bfd_byte
*));
1291 SDEF (void, bfd_putx32
, (bfd_vma
, bfd_byte
*));
1292 SDEF (bfd_vma
, bfd_getx16
, (bfd_byte
*));
1293 SDEF (void, bfd_putx16
, (bfd_vma
, bfd_byte
*));
1294 SDEF (bfd_vma
, bfd_h_getx64
, (bfd_byte
*));
1295 SDEF (void, bfd_h_putx64
, (bfd_vma
, bfd_byte
*));
1296 SDEF (bfd_vma
, bfd_h_getx32
, (bfd_byte
*));
1297 SDEF (void, bfd_h_putx32
, (bfd_vma
, bfd_byte
*));
1298 SDEF (bfd_vma
, bfd_h_getx16
, (bfd_byte
*));
1299 SDEF (void, bfd_h_putx16
, (bfd_vma
, bfd_byte
*));
1300 SDEF_FMT (struct bfd_target
*, _bfd_check_format
, (bfd
*));
1301 SDEF_FMT (boolean
, _bfd_set_format
, (bfd
*));
1302 SDEF_FMT (boolean
, _bfd_write_contents
, (bfd
*));
1303 SDEF (char *, _core_file_failing_command
, (bfd
*));
1304 SDEF (int, _core_file_failing_signal
, (bfd
*));
1305 SDEF (boolean
, _core_file_matches_executable_p
, (bfd
*, bfd
*));
1306 SDEF (boolean
, _bfd_slurp_armap
, (bfd
*));
1307 SDEF (boolean
, _bfd_slurp_extended_name_table
, (bfd
*));
1308 SDEF (void, _bfd_truncate_arname
, (bfd
*, CONST
char *, char *));
1309 SDEF (boolean
, write_armap
, (bfd
*arch
,
1310 unsigned int elength
,
1312 unsigned int orl_count
,
1314 SDEF (boolean
, _close_and_cleanup
, (bfd
*));
1315 SDEF (boolean
, _bfd_set_section_contents
, (bfd
*, sec_ptr
, PTR
,
1316 file_ptr
, bfd_size_type
));
1317 SDEF (boolean
, _bfd_get_section_contents
, (bfd
*, sec_ptr
, PTR
,
1318 file_ptr
, bfd_size_type
));
1319 SDEF (boolean
, _new_section_hook
, (bfd
*, sec_ptr
));
1320 SDEF (unsigned int, _get_symtab_upper_bound
, (bfd
*));
1321 SDEF (unsigned int, _bfd_canonicalize_symtab
,
1322 (bfd
*, struct symbol_cache_entry
**));
1323 SDEF (unsigned int, _get_reloc_upper_bound
, (bfd
*, sec_ptr
));
1324 SDEF (unsigned int, _bfd_canonicalize_reloc
, (bfd
*, sec_ptr
, arelent
**,
1325 struct symbol_cache_entry
**));
1326 SDEF (struct symbol_cache_entry
*, _bfd_make_empty_symbol
, (bfd
*));
1327 SDEF (void, _bfd_print_symbol
, (bfd
*, PTR
, struct symbol_cache_entry
*,
1328 bfd_print_symbol_type
));
1329 #define bfd_print_symbol(b,p,s,e) BFD_SEND(b, _bfd_print_symbol, (b,p,s,e))
1330 SDEF (alent
*, _get_lineno
, (bfd
*, struct symbol_cache_entry
*));
1332 SDEF (boolean
, _bfd_set_arch_mach
, (bfd
*, enum bfd_architecture
,
1335 SDEF (bfd
*, openr_next_archived_file
, (bfd
*arch
, bfd
*prev
));
1336 SDEF (boolean
, _bfd_find_nearest_line
,
1337 (bfd
*abfd
, struct sec
*section
,
1338 struct symbol_cache_entry
**symbols
,bfd_vma offset
,
1339 CONST
char **file
, CONST
char **func
, unsigned int *line
));
1340 SDEF (int, _bfd_stat_arch_elt
, (bfd
*, struct stat
*));
1342 SDEF (int, _bfd_sizeof_headers
, (bfd
*, boolean
));
1344 SDEF (void, _bfd_debug_info_start
, (bfd
*));
1345 SDEF (void, _bfd_debug_info_end
, (bfd
*));
1346 SDEF (void, _bfd_debug_info_accumulate
, (bfd
*, struct sec
*));
1347 SDEF (bfd_byte
*, _bfd_get_relocated_section_contents
, (bfd
*,struct bfd_seclet_struct
*, bfd_byte
*data
));
1348 SDEF (boolean
,_bfd_relax_section
,(bfd
*, struct sec
*, struct symbol_cache_entry
**));
1349 SDEF(void, _bfd_coff_swap_aux_in
,(
1356 SDEF(void, _bfd_coff_swap_sym_in
,(
1361 SDEF(void, _bfd_coff_swap_lineno_in
, (
1366 SDEF(unsigned int, _bfd_coff_swap_aux_out
,(
1373 SDEF(unsigned int, _bfd_coff_swap_sym_out
,(
1378 SDEF(unsigned int, _bfd_coff_swap_lineno_out
,(
1383 SDEF(unsigned int, _bfd_coff_swap_reloc_out
,(
1388 SDEF(unsigned int, _bfd_coff_swap_filehdr_out
,(
1393 SDEF(unsigned int, _bfd_coff_swap_aouthdr_out
,(
1398 SDEF(unsigned int, _bfd_coff_swap_scnhdr_out
,(
1403 /* See documentation on reloc types. */
1404 SDEF (CONST
struct reloc_howto_struct
*,
1406 (bfd
*abfd
, bfd_reloc_code_real_type code
));
1408 /* Complete and utter crock, currently used for the assembler
1409 when creating COFF files. */
1410 SDEF (asymbol
*, _bfd_make_debug_symbol
, (
1413 unsigned long size
));
1416 bfd_target
*EXFUN(bfd_find_target
, (CONST
char *, bfd
*));
1417 CONST
char **EXFUN(bfd_target_list
, (void));
1418 boolean
EXFUN(bfd_check_format
, (bfd
*abfd
, bfd_format format
));
1419 boolean
EXFUN(bfd_set_format
, (bfd
*, bfd_format
));
1420 CONST
char *EXFUN(bfd_format_string
, (bfd_format
));