1 |
/* Main header file for the bfd library -- portable access to object files. |
/* Main header file for the bfd library -- portable access to object files. |
2 |
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
|
3 |
2000, 2001, 2002 |
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, |
4 |
Free Software Foundation, Inc. |
1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
5 |
|
|
6 |
Contributed by Cygnus Support. |
Contributed by Cygnus Support. |
7 |
|
|
8 |
This file is part of BFD, the Binary File Descriptor library. |
This file is part of BFD, the Binary File Descriptor library. |
42 |
#endif |
#endif |
43 |
#endif |
#endif |
44 |
|
|
|
#define BFD_VERSION @bfd_version@ |
|
|
#define BFD_VERSION_DATE @bfd_version_date@ |
|
|
#define BFD_VERSION_STRING @bfd_version_string@ |
|
|
|
|
45 |
/* The word size used by BFD on the host. This may be 64 with a 32 |
/* The word size used by BFD on the host. This may be 64 with a 32 |
46 |
bit target if the host is 64 bit, or if other 64 bit targets have |
bit target if the host is 64 bit, or if other 64 bit targets have |
47 |
been selected with --enable-targets, or if --enable-64-bit-bfd. */ |
been selected with --enable-targets, or if --enable-64-bit-bfd. */ |
51 |
#define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@ |
#define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@ |
52 |
|
|
53 |
#define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@ |
#define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@ |
54 |
|
#define BFD_HOST_LONG_LONG @BFD_HOST_LONG_LONG@ |
55 |
#if @BFD_HOST_64_BIT_DEFINED@ |
#if @BFD_HOST_64_BIT_DEFINED@ |
56 |
#define BFD_HOST_64_BIT @BFD_HOST_64_BIT@ |
#define BFD_HOST_64_BIT @BFD_HOST_64_BIT@ |
57 |
#define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@ |
#define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@ |
58 |
|
typedef BFD_HOST_64_BIT bfd_int64_t; |
59 |
|
typedef BFD_HOST_U_64_BIT bfd_uint64_t; |
60 |
#endif |
#endif |
61 |
|
|
62 |
#if BFD_ARCH_SIZE >= 64 |
#if BFD_ARCH_SIZE >= 64 |
72 |
#endif |
#endif |
73 |
|
|
74 |
/* Forward declaration. */ |
/* Forward declaration. */ |
75 |
typedef struct _bfd bfd; |
typedef struct bfd bfd; |
76 |
|
|
77 |
/* To squelch erroneous compiler warnings ("illegal pointer |
/* Boolean type used in bfd. Too many systems define their own |
78 |
combination") from the SVR3 compiler, we would like to typedef |
versions of "boolean" for us to safely typedef a "boolean" of |
79 |
boolean to int (it doesn't like functions which return boolean. |
our own. Using an enum for "bfd_boolean" has its own set of |
80 |
Making sure they are never implicitly declared to return int |
problems, with strange looking casts required to avoid warnings |
81 |
doesn't seem to help). But this file is not configured based on |
on some older compilers. Thus we just use an int. |
82 |
the host. */ |
|
83 |
/* General rules: functions which are boolean return true on success |
General rule: Functions which are bfd_boolean return TRUE on |
84 |
and false on failure (unless they're a predicate). -- bfd.doc */ |
success and FALSE on failure (unless they're a predicate). */ |
85 |
/* I'm sure this is going to break something and someone is going to |
|
86 |
force me to change it. */ |
typedef int bfd_boolean; |
87 |
/* typedef enum boolean {false, true} boolean; */ |
#undef FALSE |
88 |
/* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h> -fnf */ |
#undef TRUE |
89 |
/* It gets worse if the host also defines a true/false enum... -sts */ |
#define FALSE 0 |
90 |
/* And even worse if your compiler has built-in boolean types... -law */ |
#define TRUE 1 |
|
/* And even worse if your compiler provides a stdbool.h that conflicts |
|
|
with these definitions... gcc 2.95 and later do. If so, it must |
|
|
be included first. -drow */ |
|
|
#if defined (__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6)) |
|
|
#define TRUE_FALSE_ALREADY_DEFINED |
|
|
#else |
|
|
#if defined (__bool_true_false_are_defined) |
|
|
/* We have <stdbool.h>. */ |
|
|
#define TRUE_FALSE_ALREADY_DEFINED |
|
|
#endif |
|
|
#endif |
|
|
#ifdef MPW |
|
|
/* Pre-emptive strike - get the file with the enum. */ |
|
|
#include <Types.h> |
|
|
#define TRUE_FALSE_ALREADY_DEFINED |
|
|
#endif /* MPW */ |
|
|
#ifndef TRUE_FALSE_ALREADY_DEFINED |
|
|
typedef enum bfd_boolean {false, true} boolean; |
|
|
#define BFD_TRUE_FALSE |
|
|
#else |
|
|
/* Use enum names that will appear nowhere else. */ |
|
|
typedef enum bfd_boolean {bfd_fffalse, bfd_tttrue} boolean; |
|
|
#endif |
|
|
|
|
|
/* Support for different sizes of target format ints and addresses. |
|
|
If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be |
|
|
set to 1 above. Otherwise, if gcc is being used, this code will |
|
|
use gcc's "long long" type. Otherwise, BFD_HOST_64_BIT must be |
|
|
defined above. */ |
|
|
|
|
|
#ifndef BFD_HOST_64_BIT |
|
|
# if BFD_HOST_64BIT_LONG |
|
|
# define BFD_HOST_64_BIT long |
|
|
# define BFD_HOST_U_64_BIT unsigned long |
|
|
# else |
|
|
# ifdef __GNUC__ |
|
|
# if __GNUC__ >= 2 |
|
|
# define BFD_HOST_64_BIT long long |
|
|
# define BFD_HOST_U_64_BIT unsigned long long |
|
|
# endif /* __GNUC__ >= 2 */ |
|
|
# endif /* ! defined (__GNUC__) */ |
|
|
# endif /* ! BFD_HOST_64BIT_LONG */ |
|
|
#endif /* ! defined (BFD_HOST_64_BIT) */ |
|
91 |
|
|
92 |
#ifdef BFD64 |
#ifdef BFD64 |
93 |
|
|
136 |
|
|
137 |
#endif /* not BFD64 */ |
#endif /* not BFD64 */ |
138 |
|
|
139 |
/* A pointer to a position in a file. */ |
#ifndef BFD_HOST_64_BIT |
140 |
/* FIXME: This should be using off_t from <sys/types.h>. |
/* Fall back on a 32 bit type. The idea is to make these types always |
141 |
For now, try to avoid breaking stuff by not including <sys/types.h> here. |
available for function return types, but in the case that |
142 |
This will break on systems with 64-bit file offsets (e.g. 4.4BSD). |
BFD_HOST_64_BIT is undefined such a function should abort or |
143 |
Probably the best long-term answer is to avoid using file_ptr AND off_t |
otherwise signal an error. */ |
144 |
in this header file, and to handle this in the BFD implementation |
typedef bfd_signed_vma bfd_int64_t; |
145 |
rather than in its interface. */ |
typedef bfd_vma bfd_uint64_t; |
146 |
/* typedef off_t file_ptr; */ |
#endif |
|
typedef bfd_signed_vma file_ptr; |
|
|
typedef bfd_vma ufile_ptr; |
|
147 |
|
|
148 |
extern void bfd_sprintf_vma PARAMS ((bfd *, char *, bfd_vma)); |
/* An offset into a file. BFD always uses the largest possible offset |
149 |
extern void bfd_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma)); |
based on the build time availability of fseek, fseeko, or fseeko64. */ |
150 |
|
typedef @bfd_file_ptr@ file_ptr; |
151 |
|
typedef unsigned @bfd_file_ptr@ ufile_ptr; |
152 |
|
|
153 |
|
extern void bfd_sprintf_vma (bfd *, char *, bfd_vma); |
154 |
|
extern void bfd_fprintf_vma (bfd *, void *, bfd_vma); |
155 |
|
|
156 |
#define printf_vma(x) fprintf_vma(stdout,x) |
#define printf_vma(x) fprintf_vma(stdout,x) |
157 |
#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x) |
#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x) |
164 |
typedef enum bfd_format |
typedef enum bfd_format |
165 |
{ |
{ |
166 |
bfd_unknown = 0, /* File format is unknown. */ |
bfd_unknown = 0, /* File format is unknown. */ |
167 |
bfd_object, /* Linker/assember/compiler output. */ |
bfd_object, /* Linker/assembler/compiler output. */ |
168 |
bfd_archive, /* Object archive file. */ |
bfd_archive, /* Object archive file. */ |
169 |
bfd_core, /* Core dump. */ |
bfd_core, /* Core dump. */ |
170 |
bfd_type_end /* Marks the end; don't use it! */ |
bfd_type_end /* Marks the end; don't use it! */ |
227 |
/* This flag indicates that the BFD contents are actually cached in |
/* This flag indicates that the BFD contents are actually cached in |
228 |
memory. If this is set, iostream points to a bfd_in_memory struct. */ |
memory. If this is set, iostream points to a bfd_in_memory struct. */ |
229 |
#define BFD_IN_MEMORY 0x800 |
#define BFD_IN_MEMORY 0x800 |
230 |
|
|
231 |
|
/* The sections in this BFD specify a memory page. */ |
232 |
|
#define HAS_LOAD_PAGE 0x1000 |
233 |
|
|
234 |
|
/* This BFD has been created by the linker and doesn't correspond |
235 |
|
to any input file. */ |
236 |
|
#define BFD_LINKER_CREATED 0x2000 |
237 |
|
|
238 |
/* Symbols and relocation. */ |
/* Symbols and relocation. */ |
239 |
|
|
241 |
typedef unsigned long symindex; |
typedef unsigned long symindex; |
242 |
|
|
243 |
/* How to perform a relocation. */ |
/* How to perform a relocation. */ |
244 |
typedef const struct reloc_howto_struct reloc_howto_type; |
typedef struct reloc_howto_struct reloc_howto_type; |
245 |
|
|
246 |
#define BFD_NO_MORE_SYMBOLS ((symindex) ~0) |
#define BFD_NO_MORE_SYMBOLS ((symindex) ~0) |
247 |
|
|
286 |
unsigned int line_number; /* Linenumber from start of function. */ |
unsigned int line_number; /* Linenumber from start of function. */ |
287 |
union |
union |
288 |
{ |
{ |
289 |
struct symbol_cache_entry *sym; /* Function name. */ |
struct bfd_symbol *sym; /* Function name. */ |
290 |
bfd_vma offset; /* Offset into section. */ |
bfd_vma offset; /* Offset into section. */ |
291 |
} u; |
} u; |
292 |
} |
} |
295 |
/* Object and core file sections. */ |
/* Object and core file sections. */ |
296 |
|
|
297 |
#define align_power(addr, align) \ |
#define align_power(addr, align) \ |
298 |
( ((addr) + ((1<<(align))-1)) & (-1 << (align))) |
(((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) |
299 |
|
|
300 |
typedef struct sec *sec_ptr; |
typedef struct bfd_section *sec_ptr; |
301 |
|
|
302 |
#define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0) |
#define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0) |
303 |
#define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0) |
#define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0) |
304 |
#define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0) |
#define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0) |
305 |
#define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0) |
#define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0) |
306 |
#define bfd_section_name(bfd, ptr) ((ptr)->name) |
#define bfd_section_name(bfd, ptr) ((ptr)->name) |
307 |
#define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr)) |
#define bfd_section_size(bfd, ptr) ((ptr)->size) |
308 |
|
#define bfd_get_section_size(ptr) ((ptr)->size) |
309 |
#define bfd_section_vma(bfd, ptr) ((ptr)->vma) |
#define bfd_section_vma(bfd, ptr) ((ptr)->vma) |
310 |
#define bfd_section_lma(bfd, ptr) ((ptr)->lma) |
#define bfd_section_lma(bfd, ptr) ((ptr)->lma) |
311 |
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) |
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) |
314 |
|
|
315 |
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) |
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) |
316 |
|
|
317 |
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (boolean)true), true) |
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) |
318 |
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true) |
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) |
319 |
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true) |
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) |
320 |
|
/* Find the address one past the end of SEC. */ |
321 |
|
#define bfd_get_section_limit(bfd, sec) \ |
322 |
|
(((sec)->rawsize ? (sec)->rawsize : (sec)->size) \ |
323 |
|
/ bfd_octets_per_byte (bfd)) |
324 |
|
|
325 |
typedef struct stat stat_type; |
typedef struct stat stat_type; |
326 |
|
|
346 |
|
|
347 |
/* Get the name of a stabs type code. */ |
/* Get the name of a stabs type code. */ |
348 |
|
|
349 |
extern const char *bfd_get_stab_name PARAMS ((int)); |
extern const char *bfd_get_stab_name (int); |
350 |
|
|
351 |
/* Hash table routines. There is no way to free up a hash table. */ |
/* Hash table routines. There is no way to free up a hash table. */ |
352 |
|
|
379 |
built each of which calls the function in the superclass. Thus |
built each of which calls the function in the superclass. Thus |
380 |
each function should be written to allocate a new block of memory |
each function should be written to allocate a new block of memory |
381 |
only if the argument is NULL. */ |
only if the argument is NULL. */ |
382 |
struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *, |
struct bfd_hash_entry *(*newfunc) |
383 |
struct bfd_hash_table *, |
(struct bfd_hash_entry *, struct bfd_hash_table *, const char *); |
|
const char *)); |
|
384 |
/* An objalloc for this hash table. This is a struct objalloc *, |
/* An objalloc for this hash table. This is a struct objalloc *, |
385 |
but we use PTR to avoid requiring the inclusion of objalloc.h. */ |
but we use void * to avoid requiring the inclusion of objalloc.h. */ |
386 |
PTR memory; |
void *memory; |
387 |
}; |
}; |
388 |
|
|
389 |
/* Initialize a hash table. */ |
/* Initialize a hash table. */ |
390 |
extern boolean bfd_hash_table_init |
extern bfd_boolean bfd_hash_table_init |
391 |
PARAMS ((struct bfd_hash_table *, |
(struct bfd_hash_table *, |
392 |
struct bfd_hash_entry *(*) (struct bfd_hash_entry *, |
struct bfd_hash_entry *(*) (struct bfd_hash_entry *, |
393 |
struct bfd_hash_table *, |
struct bfd_hash_table *, |
394 |
const char *))); |
const char *)); |
395 |
|
|
396 |
/* Initialize a hash table specifying a size. */ |
/* Initialize a hash table specifying a size. */ |
397 |
extern boolean bfd_hash_table_init_n |
extern bfd_boolean bfd_hash_table_init_n |
398 |
PARAMS ((struct bfd_hash_table *, |
(struct bfd_hash_table *, |
399 |
struct bfd_hash_entry *(*) (struct bfd_hash_entry *, |
struct bfd_hash_entry *(*) (struct bfd_hash_entry *, |
400 |
struct bfd_hash_table *, |
struct bfd_hash_table *, |
401 |
const char *), |
const char *), |
402 |
unsigned int size)); |
unsigned int size); |
403 |
|
|
404 |
/* Free up a hash table. */ |
/* Free up a hash table. */ |
405 |
extern void bfd_hash_table_free PARAMS ((struct bfd_hash_table *)); |
extern void bfd_hash_table_free |
406 |
|
(struct bfd_hash_table *); |
407 |
|
|
408 |
/* Look up a string in a hash table. If CREATE is true, a new entry |
/* Look up a string in a hash table. If CREATE is TRUE, a new entry |
409 |
will be created for this string if one does not already exist. The |
will be created for this string if one does not already exist. The |
410 |
COPY argument must be true if this routine should copy the string |
COPY argument must be TRUE if this routine should copy the string |
411 |
into newly allocated memory when adding an entry. */ |
into newly allocated memory when adding an entry. */ |
412 |
extern struct bfd_hash_entry *bfd_hash_lookup |
extern struct bfd_hash_entry *bfd_hash_lookup |
413 |
PARAMS ((struct bfd_hash_table *, const char *, boolean create, |
(struct bfd_hash_table *, const char *, bfd_boolean create, |
414 |
boolean copy)); |
bfd_boolean copy); |
415 |
|
|
416 |
/* Replace an entry in a hash table. */ |
/* Replace an entry in a hash table. */ |
417 |
extern void bfd_hash_replace |
extern void bfd_hash_replace |
418 |
PARAMS ((struct bfd_hash_table *, struct bfd_hash_entry *old, |
(struct bfd_hash_table *, struct bfd_hash_entry *old, |
419 |
struct bfd_hash_entry *nw)); |
struct bfd_hash_entry *nw); |
420 |
|
|
421 |
/* Base method for creating a hash table entry. */ |
/* Base method for creating a hash table entry. */ |
422 |
extern struct bfd_hash_entry *bfd_hash_newfunc |
extern struct bfd_hash_entry *bfd_hash_newfunc |
423 |
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, |
(struct bfd_hash_entry *, struct bfd_hash_table *, const char *); |
|
const char *)); |
|
424 |
|
|
425 |
/* Grab some space for a hash table entry. */ |
/* Grab some space for a hash table entry. */ |
426 |
extern PTR bfd_hash_allocate PARAMS ((struct bfd_hash_table *, |
extern void *bfd_hash_allocate |
427 |
unsigned int)); |
(struct bfd_hash_table *, unsigned int); |
428 |
|
|
429 |
/* Traverse a hash table in a random order, calling a function on each |
/* Traverse a hash table in a random order, calling a function on each |
430 |
element. If the function returns false, the traversal stops. The |
element. If the function returns FALSE, the traversal stops. The |
431 |
INFO argument is passed to the function. */ |
INFO argument is passed to the function. */ |
432 |
extern void bfd_hash_traverse PARAMS ((struct bfd_hash_table *, |
extern void bfd_hash_traverse |
433 |
boolean (*) (struct bfd_hash_entry *, |
(struct bfd_hash_table *, |
434 |
PTR), |
bfd_boolean (*) (struct bfd_hash_entry *, void *), |
435 |
PTR info)); |
void *info); |
436 |
|
|
437 |
|
/* Allows the default size of a hash table to be configured. New hash |
438 |
|
tables allocated using bfd_hash_table_init will be created with |
439 |
|
this size. */ |
440 |
|
extern void bfd_hash_set_default_size (bfd_size_type); |
441 |
|
|
442 |
|
/* This structure is used to keep track of stabs in sections |
443 |
|
information while linking. */ |
444 |
|
|
445 |
|
struct stab_info |
446 |
|
{ |
447 |
|
/* A hash table used to hold stabs strings. */ |
448 |
|
struct bfd_strtab_hash *strings; |
449 |
|
/* The header file hash table. */ |
450 |
|
struct bfd_hash_table includes; |
451 |
|
/* The first .stabstr section. */ |
452 |
|
struct bfd_section *stabstr; |
453 |
|
}; |
454 |
|
|
455 |
#define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table |
#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table |
456 |
|
|
457 |
/* User program access to BFD facilities. */ |
/* User program access to BFD facilities. */ |
458 |
|
|
459 |
/* Direct I/O routines, for programs which know more about the object |
/* Direct I/O routines, for programs which know more about the object |
460 |
file than BFD does. Use higher level routines if possible. */ |
file than BFD does. Use higher level routines if possible. */ |
461 |
|
|
462 |
extern bfd_size_type bfd_bread PARAMS ((PTR, bfd_size_type, bfd *)); |
extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *); |
463 |
extern bfd_size_type bfd_bwrite PARAMS ((const PTR, bfd_size_type, bfd *)); |
extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *); |
464 |
extern int bfd_seek PARAMS ((bfd *, file_ptr, int)); |
extern int bfd_seek (bfd *, file_ptr, int); |
465 |
extern ufile_ptr bfd_tell PARAMS ((bfd *)); |
extern file_ptr bfd_tell (bfd *); |
466 |
extern int bfd_flush PARAMS ((bfd *)); |
extern int bfd_flush (bfd *); |
467 |
extern int bfd_stat PARAMS ((bfd *, struct stat *)); |
extern int bfd_stat (bfd *, struct stat *); |
468 |
|
|
469 |
/* Deprecated old routines. */ |
/* Deprecated old routines. */ |
470 |
#if __GNUC__ |
#if __GNUC__ |
482 |
(warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ |
(warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ |
483 |
bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) |
bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) |
484 |
#endif |
#endif |
485 |
extern void warn_deprecated |
extern void warn_deprecated (const char *, const char *, int, const char *); |
|
PARAMS ((const char *, const char *, int, const char *)); |
|
486 |
|
|
487 |
/* Cast from const char * to char * so that caller can assign to |
/* Cast from const char * to char * so that caller can assign to |
488 |
a char * without a warning. */ |
a char * without a warning. */ |
514 |
#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) |
#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) |
515 |
#define bfd_count_sections(abfd) ((abfd)->section_count) |
#define bfd_count_sections(abfd) ((abfd)->section_count) |
516 |
|
|
517 |
|
#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) |
518 |
|
|
519 |
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) |
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) |
520 |
|
|
521 |
#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean) (bool)), true) |
#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) |
522 |
|
|
523 |
extern boolean bfd_cache_close PARAMS ((bfd *abfd)); |
extern bfd_boolean bfd_cache_close |
524 |
|
(bfd *abfd); |
525 |
/* NB: This declaration should match the autogenerated one in libbfd.h. */ |
/* NB: This declaration should match the autogenerated one in libbfd.h. */ |
526 |
|
|
527 |
extern boolean bfd_record_phdr |
extern bfd_boolean bfd_cache_close_all (void); |
528 |
PARAMS ((bfd *, unsigned long, boolean, flagword, boolean, bfd_vma, |
|
529 |
boolean, boolean, unsigned int, struct sec **)); |
extern bfd_boolean bfd_record_phdr |
530 |
|
(bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma, |
531 |
|
bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **); |
532 |
|
|
533 |
/* Byte swapping routines. */ |
/* Byte swapping routines. */ |
534 |
|
|
535 |
bfd_vma bfd_getb64 PARAMS ((const unsigned char *)); |
bfd_uint64_t bfd_getb64 (const void *); |
536 |
bfd_vma bfd_getl64 PARAMS ((const unsigned char *)); |
bfd_uint64_t bfd_getl64 (const void *); |
537 |
bfd_signed_vma bfd_getb_signed_64 PARAMS ((const unsigned char *)); |
bfd_int64_t bfd_getb_signed_64 (const void *); |
538 |
bfd_signed_vma bfd_getl_signed_64 PARAMS ((const unsigned char *)); |
bfd_int64_t bfd_getl_signed_64 (const void *); |
539 |
bfd_vma bfd_getb32 PARAMS ((const unsigned char *)); |
bfd_vma bfd_getb32 (const void *); |
540 |
bfd_vma bfd_getl32 PARAMS ((const unsigned char *)); |
bfd_vma bfd_getl32 (const void *); |
541 |
bfd_signed_vma bfd_getb_signed_32 PARAMS ((const unsigned char *)); |
bfd_signed_vma bfd_getb_signed_32 (const void *); |
542 |
bfd_signed_vma bfd_getl_signed_32 PARAMS ((const unsigned char *)); |
bfd_signed_vma bfd_getl_signed_32 (const void *); |
543 |
bfd_vma bfd_getb16 PARAMS ((const unsigned char *)); |
bfd_vma bfd_getb16 (const void *); |
544 |
bfd_vma bfd_getl16 PARAMS ((const unsigned char *)); |
bfd_vma bfd_getl16 (const void *); |
545 |
bfd_signed_vma bfd_getb_signed_16 PARAMS ((const unsigned char *)); |
bfd_signed_vma bfd_getb_signed_16 (const void *); |
546 |
bfd_signed_vma bfd_getl_signed_16 PARAMS ((const unsigned char *)); |
bfd_signed_vma bfd_getl_signed_16 (const void *); |
547 |
void bfd_putb64 PARAMS ((bfd_vma, unsigned char *)); |
void bfd_putb64 (bfd_uint64_t, void *); |
548 |
void bfd_putl64 PARAMS ((bfd_vma, unsigned char *)); |
void bfd_putl64 (bfd_uint64_t, void *); |
549 |
void bfd_putb32 PARAMS ((bfd_vma, unsigned char *)); |
void bfd_putb32 (bfd_vma, void *); |
550 |
void bfd_putl32 PARAMS ((bfd_vma, unsigned char *)); |
void bfd_putl32 (bfd_vma, void *); |
551 |
void bfd_putb16 PARAMS ((bfd_vma, unsigned char *)); |
void bfd_putb16 (bfd_vma, void *); |
552 |
void bfd_putl16 PARAMS ((bfd_vma, unsigned char *)); |
void bfd_putl16 (bfd_vma, void *); |
553 |
|
|
554 |
/* Byte swapping routines which take size and endiannes as arguments. */ |
/* Byte swapping routines which take size and endiannes as arguments. */ |
555 |
|
|
556 |
bfd_vma bfd_get_bits PARAMS ((bfd_byte *, int, boolean)); |
bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); |
557 |
void bfd_put_bits PARAMS ((bfd_vma, bfd_byte *, int, boolean)); |
void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); |
558 |
|
|
559 |
|
extern bfd_boolean bfd_section_already_linked_table_init (void); |
560 |
|
extern void bfd_section_already_linked_table_free (void); |
561 |
|
|
562 |
/* Externally visible ECOFF routines. */ |
/* Externally visible ECOFF routines. */ |
563 |
|
|
565 |
struct ecoff_debug_info; |
struct ecoff_debug_info; |
566 |
struct ecoff_debug_swap; |
struct ecoff_debug_swap; |
567 |
struct ecoff_extr; |
struct ecoff_extr; |
568 |
struct symbol_cache_entry; |
struct bfd_symbol; |
569 |
struct bfd_link_info; |
struct bfd_link_info; |
570 |
struct bfd_link_hash_entry; |
struct bfd_link_hash_entry; |
571 |
struct bfd_elf_version_tree; |
struct bfd_elf_version_tree; |
572 |
#endif |
#endif |
573 |
extern bfd_vma bfd_ecoff_get_gp_value PARAMS ((bfd * abfd)); |
extern bfd_vma bfd_ecoff_get_gp_value |
574 |
extern boolean bfd_ecoff_set_gp_value PARAMS ((bfd *abfd, bfd_vma gp_value)); |
(bfd * abfd); |
575 |
extern boolean bfd_ecoff_set_regmasks |
extern bfd_boolean bfd_ecoff_set_gp_value |
576 |
PARAMS ((bfd *abfd, unsigned long gprmask, unsigned long fprmask, |
(bfd *abfd, bfd_vma gp_value); |
577 |
unsigned long *cprmask)); |
extern bfd_boolean bfd_ecoff_set_regmasks |
578 |
extern PTR bfd_ecoff_debug_init |
(bfd *abfd, unsigned long gprmask, unsigned long fprmask, |
579 |
PARAMS ((bfd *output_bfd, struct ecoff_debug_info *output_debug, |
unsigned long *cprmask); |
580 |
const struct ecoff_debug_swap *output_swap, |
extern void *bfd_ecoff_debug_init |
581 |
struct bfd_link_info *)); |
(bfd *output_bfd, struct ecoff_debug_info *output_debug, |
582 |
|
const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); |
583 |
extern void bfd_ecoff_debug_free |
extern void bfd_ecoff_debug_free |
584 |
PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, |
(void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, |
585 |
const struct ecoff_debug_swap *output_swap, |
const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); |
586 |
struct bfd_link_info *)); |
extern bfd_boolean bfd_ecoff_debug_accumulate |
587 |
extern boolean bfd_ecoff_debug_accumulate |
(void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, |
588 |
PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, |
const struct ecoff_debug_swap *output_swap, bfd *input_bfd, |
589 |
const struct ecoff_debug_swap *output_swap, |
struct ecoff_debug_info *input_debug, |
590 |
bfd *input_bfd, struct ecoff_debug_info *input_debug, |
const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); |
591 |
const struct ecoff_debug_swap *input_swap, |
extern bfd_boolean bfd_ecoff_debug_accumulate_other |
592 |
struct bfd_link_info *)); |
(void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, |
593 |
extern boolean bfd_ecoff_debug_accumulate_other |
const struct ecoff_debug_swap *output_swap, bfd *input_bfd, |
594 |
PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, |
struct bfd_link_info *); |
595 |
const struct ecoff_debug_swap *output_swap, bfd *input_bfd, |
extern bfd_boolean bfd_ecoff_debug_externals |
596 |
struct bfd_link_info *)); |
(bfd *abfd, struct ecoff_debug_info *debug, |
597 |
extern boolean bfd_ecoff_debug_externals |
const struct ecoff_debug_swap *swap, bfd_boolean relocatable, |
598 |
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug, |
bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), |
599 |
const struct ecoff_debug_swap *swap, |
void (*set_index) (struct bfd_symbol *, bfd_size_type)); |
600 |
boolean relocateable, |
extern bfd_boolean bfd_ecoff_debug_one_external |
601 |
boolean (*get_extr) (struct symbol_cache_entry *, |
(bfd *abfd, struct ecoff_debug_info *debug, |
602 |
struct ecoff_extr *), |
const struct ecoff_debug_swap *swap, const char *name, |
603 |
void (*set_index) (struct symbol_cache_entry *, |
struct ecoff_extr *esym); |
|
bfd_size_type))); |
|
|
extern boolean bfd_ecoff_debug_one_external |
|
|
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug, |
|
|
const struct ecoff_debug_swap *swap, |
|
|
const char *name, struct ecoff_extr *esym)); |
|
604 |
extern bfd_size_type bfd_ecoff_debug_size |
extern bfd_size_type bfd_ecoff_debug_size |
605 |
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug, |
(bfd *abfd, struct ecoff_debug_info *debug, |
606 |
const struct ecoff_debug_swap *swap)); |
const struct ecoff_debug_swap *swap); |
607 |
extern boolean bfd_ecoff_write_debug |
extern bfd_boolean bfd_ecoff_write_debug |
608 |
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug, |
(bfd *abfd, struct ecoff_debug_info *debug, |
609 |
const struct ecoff_debug_swap *swap, file_ptr where)); |
const struct ecoff_debug_swap *swap, file_ptr where); |
610 |
extern boolean bfd_ecoff_write_accumulated_debug |
extern bfd_boolean bfd_ecoff_write_accumulated_debug |
611 |
PARAMS ((PTR handle, bfd *abfd, struct ecoff_debug_info *debug, |
(void *handle, bfd *abfd, struct ecoff_debug_info *debug, |
612 |
const struct ecoff_debug_swap *swap, |
const struct ecoff_debug_swap *swap, |
613 |
struct bfd_link_info *info, file_ptr where)); |
struct bfd_link_info *info, file_ptr where); |
|
extern boolean bfd_mips_ecoff_create_embedded_relocs |
|
|
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, |
|
|
char **)); |
|
614 |
|
|
615 |
/* Externally visible ELF routines. */ |
/* Externally visible ELF routines. */ |
616 |
|
|
621 |
const char *name; |
const char *name; |
622 |
}; |
}; |
623 |
|
|
624 |
extern boolean bfd_elf32_record_link_assignment |
enum dynamic_lib_link_class { |
625 |
PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean)); |
DYN_NORMAL = 0, |
626 |
extern boolean bfd_elf64_record_link_assignment |
DYN_AS_NEEDED = 1, |
627 |
PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean)); |
DYN_DT_NEEDED = 2, |
628 |
|
DYN_NO_ADD_NEEDED = 4, |
629 |
|
DYN_NO_NEEDED = 8 |
630 |
|
}; |
631 |
|
|
632 |
|
extern bfd_boolean bfd_elf_record_link_assignment |
633 |
|
(bfd *, struct bfd_link_info *, const char *, bfd_boolean); |
634 |
extern struct bfd_link_needed_list *bfd_elf_get_needed_list |
extern struct bfd_link_needed_list *bfd_elf_get_needed_list |
635 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
636 |
extern boolean bfd_elf_get_bfd_needed_list |
extern bfd_boolean bfd_elf_get_bfd_needed_list |
637 |
PARAMS ((bfd *, struct bfd_link_needed_list **)); |
(bfd *, struct bfd_link_needed_list **); |
638 |
extern boolean bfd_elf32_size_dynamic_sections |
extern bfd_boolean bfd_elf_size_dynamic_sections |
639 |
PARAMS ((bfd *, const char *, const char *, const char *, |
(bfd *, const char *, const char *, const char *, const char * const *, |
640 |
const char * const *, struct bfd_link_info *, struct sec **, |
struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *); |
641 |
struct bfd_elf_version_tree *)); |
extern void bfd_elf_set_dt_needed_name |
642 |
extern boolean bfd_elf64_size_dynamic_sections |
(bfd *, const char *); |
643 |
PARAMS ((bfd *, const char *, const char *, const char *, |
extern const char *bfd_elf_get_dt_soname |
644 |
const char * const *, struct bfd_link_info *, struct sec **, |
(bfd *); |
645 |
struct bfd_elf_version_tree *)); |
extern void bfd_elf_set_dyn_lib_class |
646 |
extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *)); |
(bfd *, int); |
647 |
extern void bfd_elf_set_dt_needed_soname PARAMS ((bfd *, const char *)); |
extern int bfd_elf_get_dyn_lib_class |
648 |
extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *)); |
(bfd *); |
649 |
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list |
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list |
650 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
651 |
extern boolean bfd_elf32_discard_info |
extern bfd_boolean bfd_elf_discard_info |
652 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
|
extern boolean bfd_elf64_discard_info |
|
|
PARAMS ((bfd *, struct bfd_link_info *)); |
|
653 |
|
|
654 |
/* Return an upper bound on the number of bytes required to store a |
/* Return an upper bound on the number of bytes required to store a |
655 |
copy of ABFD's program header table entries. Return -1 if an error |
copy of ABFD's program header table entries. Return -1 if an error |
656 |
occurs; bfd_get_error will return an appropriate code. */ |
occurs; bfd_get_error will return an appropriate code. */ |
657 |
extern long bfd_get_elf_phdr_upper_bound PARAMS ((bfd *abfd)); |
extern long bfd_get_elf_phdr_upper_bound |
658 |
|
(bfd *abfd); |
659 |
|
|
660 |
/* Copy ABFD's program header table entries to *PHDRS. The entries |
/* Copy ABFD's program header table entries to *PHDRS. The entries |
661 |
will be stored as an array of Elf_Internal_Phdr structures, as |
will be stored as an array of Elf_Internal_Phdr structures, as |
664 |
|
|
665 |
Return the number of program header table entries read, or -1 if an |
Return the number of program header table entries read, or -1 if an |
666 |
error occurs; bfd_get_error will return an appropriate code. */ |
error occurs; bfd_get_error will return an appropriate code. */ |
667 |
extern int bfd_get_elf_phdrs PARAMS ((bfd *abfd, void *phdrs)); |
extern int bfd_get_elf_phdrs |
668 |
|
(bfd *abfd, void *phdrs); |
669 |
|
|
670 |
|
/* Create a new BFD as if by bfd_openr. Rather than opening a file, |
671 |
|
reconstruct an ELF file by reading the segments out of remote memory |
672 |
|
based on the ELF file header at EHDR_VMA and the ELF program headers it |
673 |
|
points to. If not null, *LOADBASEP is filled in with the difference |
674 |
|
between the VMAs from which the segments were read, and the VMAs the |
675 |
|
file headers (and hence BFD's idea of each section's VMA) put them at. |
676 |
|
|
677 |
|
The function TARGET_READ_MEMORY is called to copy LEN bytes from the |
678 |
|
remote memory at target address VMA into the local buffer at MYADDR; it |
679 |
|
should return zero on success or an `errno' code on failure. TEMPL must |
680 |
|
be a BFD for an ELF target with the word size and byte order found in |
681 |
|
the remote memory. */ |
682 |
|
extern bfd *bfd_elf_bfd_from_remote_memory |
683 |
|
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, |
684 |
|
int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len)); |
685 |
|
|
686 |
/* Return the arch_size field of an elf bfd, or -1 if not elf. */ |
/* Return the arch_size field of an elf bfd, or -1 if not elf. */ |
687 |
extern int bfd_get_arch_size PARAMS ((bfd *)); |
extern int bfd_get_arch_size |
688 |
|
(bfd *); |
689 |
|
|
690 |
/* Return true if address "naturally" sign extends, or -1 if not elf. */ |
/* Return TRUE if address "naturally" sign extends, or -1 if not elf. */ |
691 |
extern int bfd_get_sign_extend_vma PARAMS ((bfd *)); |
extern int bfd_get_sign_extend_vma |
692 |
|
(bfd *); |
693 |
|
|
694 |
extern boolean bfd_m68k_elf32_create_embedded_relocs |
extern struct bfd_section *_bfd_elf_tls_setup |
695 |
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, |
(bfd *, struct bfd_link_info *); |
696 |
char **)); |
|
697 |
extern boolean bfd_mips_elf32_create_embedded_relocs |
extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs |
698 |
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, |
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); |
|
char **)); |
|
699 |
|
|
700 |
/* SunOS shared library support routines for the linker. */ |
/* SunOS shared library support routines for the linker. */ |
701 |
|
|
702 |
extern struct bfd_link_needed_list *bfd_sunos_get_needed_list |
extern struct bfd_link_needed_list *bfd_sunos_get_needed_list |
703 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
704 |
extern boolean bfd_sunos_record_link_assignment |
extern bfd_boolean bfd_sunos_record_link_assignment |
705 |
PARAMS ((bfd *, struct bfd_link_info *, const char *)); |
(bfd *, struct bfd_link_info *, const char *); |
706 |
extern boolean bfd_sunos_size_dynamic_sections |
extern bfd_boolean bfd_sunos_size_dynamic_sections |
707 |
PARAMS ((bfd *, struct bfd_link_info *, struct sec **, struct sec **, |
(bfd *, struct bfd_link_info *, struct bfd_section **, struct bfd_section **, struct bfd_section **); |
|
struct sec **)); |
|
708 |
|
|
709 |
/* Linux shared library support routines for the linker. */ |
/* Linux shared library support routines for the linker. */ |
710 |
|
|
711 |
extern boolean bfd_i386linux_size_dynamic_sections |
extern bfd_boolean bfd_i386linux_size_dynamic_sections |
712 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
713 |
extern boolean bfd_m68klinux_size_dynamic_sections |
extern bfd_boolean bfd_m68klinux_size_dynamic_sections |
714 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
715 |
extern boolean bfd_sparclinux_size_dynamic_sections |
extern bfd_boolean bfd_sparclinux_size_dynamic_sections |
716 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
717 |
|
|
718 |
/* mmap hacks */ |
/* mmap hacks */ |
719 |
|
|
723 |
typedef struct _bfd_window |
typedef struct _bfd_window |
724 |
{ |
{ |
725 |
/* What the user asked for. */ |
/* What the user asked for. */ |
726 |
PTR data; |
void *data; |
727 |
bfd_size_type size; |
bfd_size_type size; |
728 |
/* The actual window used by BFD. Small user-requested read-only |
/* The actual window used by BFD. Small user-requested read-only |
729 |
regions sharing a page may share a single window into the object |
regions sharing a page may share a single window into the object |
735 |
} |
} |
736 |
bfd_window; |
bfd_window; |
737 |
|
|
738 |
extern void bfd_init_window PARAMS ((bfd_window *)); |
extern void bfd_init_window |
739 |
extern void bfd_free_window PARAMS ((bfd_window *)); |
(bfd_window *); |
740 |
extern boolean bfd_get_file_window |
extern void bfd_free_window |
741 |
PARAMS ((bfd *, file_ptr, bfd_size_type, bfd_window *, boolean)); |
(bfd_window *); |
742 |
|
extern bfd_boolean bfd_get_file_window |
743 |
|
(bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); |
744 |
|
|
745 |
/* XCOFF support routines for the linker. */ |
/* XCOFF support routines for the linker. */ |
746 |
|
|
747 |
extern boolean bfd_xcoff_link_record_set |
extern bfd_boolean bfd_xcoff_link_record_set |
748 |
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, |
(bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); |
749 |
bfd_size_type)); |
extern bfd_boolean bfd_xcoff_import_symbol |
750 |
extern boolean bfd_xcoff_import_symbol |
(bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, |
751 |
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, |
const char *, const char *, const char *, unsigned int); |
752 |
bfd_vma, const char *, const char *, const char *, unsigned int)); |
extern bfd_boolean bfd_xcoff_export_symbol |
753 |
extern boolean bfd_xcoff_export_symbol |
(bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); |
754 |
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *)); |
extern bfd_boolean bfd_xcoff_link_count_reloc |
755 |
extern boolean bfd_xcoff_link_count_reloc |
(bfd *, struct bfd_link_info *, const char *); |
756 |
PARAMS ((bfd *, struct bfd_link_info *, const char *)); |
extern bfd_boolean bfd_xcoff_record_link_assignment |
757 |
extern boolean bfd_xcoff_record_link_assignment |
(bfd *, struct bfd_link_info *, const char *); |
758 |
PARAMS ((bfd *, struct bfd_link_info *, const char *)); |
extern bfd_boolean bfd_xcoff_size_dynamic_sections |
759 |
extern boolean bfd_xcoff_size_dynamic_sections |
(bfd *, struct bfd_link_info *, const char *, const char *, |
760 |
PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *, |
unsigned long, unsigned long, unsigned long, bfd_boolean, |
761 |
unsigned long, unsigned long, unsigned long, boolean, |
int, bfd_boolean, bfd_boolean, struct bfd_section **, bfd_boolean); |
762 |
int, boolean, boolean, struct sec **, boolean)); |
extern bfd_boolean bfd_xcoff_link_generate_rtinit |
763 |
extern boolean bfd_xcoff_link_generate_rtinit |
(bfd *, const char *, const char *, bfd_boolean); |
|
PARAMS ((bfd *, const char *, const char *, boolean)); |
|
764 |
|
|
765 |
/* XCOFF support routines for ar. */ |
/* XCOFF support routines for ar. */ |
766 |
extern boolean bfd_xcoff_ar_archive_set_magic PARAMS ((bfd *, char *)); |
extern bfd_boolean bfd_xcoff_ar_archive_set_magic |
767 |
|
(bfd *, char *); |
768 |
|
|
769 |
/* Externally visible COFF routines. */ |
/* Externally visible COFF routines. */ |
770 |
|
|
773 |
union internal_auxent; |
union internal_auxent; |
774 |
#endif |
#endif |
775 |
|
|
776 |
extern boolean bfd_coff_get_syment |
extern bfd_boolean bfd_coff_get_syment |
777 |
PARAMS ((bfd *, struct symbol_cache_entry *, struct internal_syment *)); |
(bfd *, struct bfd_symbol *, struct internal_syment *); |
778 |
|
|
779 |
extern boolean bfd_coff_get_auxent |
extern bfd_boolean bfd_coff_get_auxent |
780 |
PARAMS ((bfd *, struct symbol_cache_entry *, int, union internal_auxent *)); |
(bfd *, struct bfd_symbol *, int, union internal_auxent *); |
781 |
|
|
782 |
extern boolean bfd_coff_set_symbol_class |
extern bfd_boolean bfd_coff_set_symbol_class |
783 |
PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int)); |
(bfd *, struct bfd_symbol *, unsigned int); |
784 |
|
|
785 |
extern boolean bfd_m68k_coff_create_embedded_relocs |
extern bfd_boolean bfd_m68k_coff_create_embedded_relocs |
786 |
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, |
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); |
|
char **)); |
|
787 |
|
|
788 |
/* ARM Interworking support. Called from linker. */ |
/* ARM Interworking support. Called from linker. */ |
789 |
extern boolean bfd_arm_allocate_interworking_sections |
extern bfd_boolean bfd_arm_allocate_interworking_sections |
790 |
PARAMS ((struct bfd_link_info *)); |
(struct bfd_link_info *); |
791 |
|
|
792 |
extern boolean bfd_arm_process_before_allocation |
extern bfd_boolean bfd_arm_process_before_allocation |
793 |
PARAMS ((bfd *, struct bfd_link_info *, int)); |
(bfd *, struct bfd_link_info *, int); |
794 |
|
|
795 |
extern boolean bfd_arm_get_bfd_for_interworking |
extern bfd_boolean bfd_arm_get_bfd_for_interworking |
796 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
797 |
|
|
798 |
/* PE ARM Interworking support. Called from linker. */ |
/* PE ARM Interworking support. Called from linker. */ |
799 |
extern boolean bfd_arm_pe_allocate_interworking_sections |
extern bfd_boolean bfd_arm_pe_allocate_interworking_sections |
800 |
PARAMS ((struct bfd_link_info *)); |
(struct bfd_link_info *); |
801 |
|
|
802 |
extern boolean bfd_arm_pe_process_before_allocation |
extern bfd_boolean bfd_arm_pe_process_before_allocation |
803 |
PARAMS ((bfd *, struct bfd_link_info *, int)); |
(bfd *, struct bfd_link_info *, int); |
804 |
|
|
805 |
extern boolean bfd_arm_pe_get_bfd_for_interworking |
extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking |
806 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
807 |
|
|
808 |
/* ELF ARM Interworking support. Called from linker. */ |
/* ELF ARM Interworking support. Called from linker. */ |
809 |
extern boolean bfd_elf32_arm_allocate_interworking_sections |
extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections |
810 |
PARAMS ((struct bfd_link_info *)); |
(struct bfd_link_info *); |
811 |
|
|
812 |
|
extern bfd_boolean bfd_elf32_arm_process_before_allocation |
813 |
|
(bfd *, struct bfd_link_info *, int); |
814 |
|
|
815 |
|
void bfd_elf32_arm_set_target_relocs |
816 |
|
(struct bfd_link_info *, int, char *, int); |
817 |
|
|
818 |
|
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking |
819 |
|
(bfd *, struct bfd_link_info *); |
820 |
|
|
821 |
|
extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd |
822 |
|
(bfd *, struct bfd_link_info *); |
823 |
|
|
824 |
extern boolean bfd_elf32_arm_process_before_allocation |
/* ARM Note section processing. */ |
825 |
PARAMS ((bfd *, struct bfd_link_info *, int)); |
extern bfd_boolean bfd_arm_merge_machines |
826 |
|
(bfd *, bfd *); |
827 |
|
|
828 |
extern boolean bfd_elf32_arm_get_bfd_for_interworking |
extern bfd_boolean bfd_arm_update_notes |
829 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, const char *); |
830 |
|
|
831 |
extern boolean bfd_elf32_arm_add_glue_sections_to_bfd |
extern unsigned int bfd_arm_get_mach_from_notes |
832 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, const char *); |
833 |
|
|
834 |
/* TI COFF load page support. */ |
/* TI COFF load page support. */ |
835 |
extern void bfd_ticoff_set_section_load_page |
extern void bfd_ticoff_set_section_load_page |
836 |
PARAMS ((struct sec *, int)); |
(struct bfd_section *, int); |
837 |
|
|
838 |
extern int bfd_ticoff_get_section_load_page |
extern int bfd_ticoff_get_section_load_page |
839 |
PARAMS ((struct sec *)); |
(struct bfd_section *); |
840 |
|
|
841 |
|
/* H8/300 functions. */ |
842 |
|
extern bfd_vma bfd_h8300_pad_address |
843 |
|
(bfd *, bfd_vma); |
844 |
|
|
845 |
|
/* IA64 Itanium code generation. Called from linker. */ |
846 |
|
extern void bfd_elf32_ia64_after_parse |
847 |
|
(int); |
848 |
|
|
849 |
|
extern void bfd_elf64_ia64_after_parse |
850 |
|
(int); |
851 |
|
|
852 |
|
/* This structure is used for a comdat section, as in PE. A comdat |
853 |
|
section is associated with a particular symbol. When the linker |
854 |
|
sees a comdat section, it keeps only one of the sections with a |
855 |
|
given name and associated with a given symbol. */ |
856 |
|
|
857 |
|
struct coff_comdat_info |
858 |
|
{ |
859 |
|
/* The name of the symbol associated with a comdat section. */ |
860 |
|
const char *name; |
861 |
|
|
862 |
|
/* The local symbol table index of the symbol associated with a |
863 |
|
comdat section. This is only meaningful to the object file format |
864 |
|
specific code; it is not an index into the list returned by |
865 |
|
bfd_canonicalize_symtab. */ |
866 |
|
long symbol; |
867 |
|
}; |
868 |
|
|
869 |
|
extern struct coff_comdat_info *bfd_coff_get_comdat_section |
870 |
|
(bfd *, struct bfd_section *); |
871 |
|
|