1 |
/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically |
/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically |
2 |
generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c" and |
generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c", |
3 |
"section.c". |
"bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c", |
4 |
|
"syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c", |
5 |
|
"linker.c" and "simple.c". |
6 |
Run "make headers" in your build bfd/ to regenerate. */ |
Run "make headers" in your build bfd/ to regenerate. */ |
7 |
|
|
8 |
/* Main header file for the bfd library -- portable access to object files. |
/* Main header file for the bfd library -- portable access to object files. |
9 |
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
|
10 |
2000, 2001, 2002 |
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, |
11 |
Free Software Foundation, Inc. |
1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
12 |
|
|
13 |
Contributed by Cygnus Support. |
Contributed by Cygnus Support. |
14 |
|
|
15 |
This file is part of BFD, the Binary File Descriptor library. |
This file is part of BFD, the Binary File Descriptor library. |
49 |
#endif |
#endif |
50 |
#endif |
#endif |
51 |
|
|
|
#define BFD_VERSION @bfd_version@ |
|
|
#define BFD_VERSION_DATE @bfd_version_date@ |
|
|
#define BFD_VERSION_STRING @bfd_version_string@ |
|
|
|
|
52 |
/* 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 |
53 |
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 |
54 |
been selected with --enable-targets, or if --enable-64-bit-bfd. */ |
been selected with --enable-targets, or if --enable-64-bit-bfd. */ |
58 |
#define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@ |
#define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@ |
59 |
|
|
60 |
#define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@ |
#define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@ |
61 |
|
#define BFD_HOST_LONG_LONG @BFD_HOST_LONG_LONG@ |
62 |
#if @BFD_HOST_64_BIT_DEFINED@ |
#if @BFD_HOST_64_BIT_DEFINED@ |
63 |
#define BFD_HOST_64_BIT @BFD_HOST_64_BIT@ |
#define BFD_HOST_64_BIT @BFD_HOST_64_BIT@ |
64 |
#define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@ |
#define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@ |
65 |
|
typedef BFD_HOST_64_BIT bfd_int64_t; |
66 |
|
typedef BFD_HOST_U_64_BIT bfd_uint64_t; |
67 |
#endif |
#endif |
68 |
|
|
69 |
#if BFD_ARCH_SIZE >= 64 |
#if BFD_ARCH_SIZE >= 64 |
79 |
#endif |
#endif |
80 |
|
|
81 |
/* Forward declaration. */ |
/* Forward declaration. */ |
82 |
typedef struct _bfd bfd; |
typedef struct bfd bfd; |
|
|
|
|
/* To squelch erroneous compiler warnings ("illegal pointer |
|
|
combination") from the SVR3 compiler, we would like to typedef |
|
|
boolean to int (it doesn't like functions which return boolean. |
|
|
Making sure they are never implicitly declared to return int |
|
|
doesn't seem to help). But this file is not configured based on |
|
|
the host. */ |
|
|
/* General rules: functions which are boolean return true on success |
|
|
and false on failure (unless they're a predicate). -- bfd.doc */ |
|
|
/* I'm sure this is going to break something and someone is going to |
|
|
force me to change it. */ |
|
|
/* typedef enum boolean {false, true} boolean; */ |
|
|
/* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h> -fnf */ |
|
|
/* It gets worse if the host also defines a true/false enum... -sts */ |
|
|
/* And even worse if your compiler has built-in boolean types... -law */ |
|
|
/* 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 |
|
83 |
|
|
84 |
/* Support for different sizes of target format ints and addresses. |
/* Boolean type used in bfd. Too many systems define their own |
85 |
If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be |
versions of "boolean" for us to safely typedef a "boolean" of |
86 |
set to 1 above. Otherwise, if gcc is being used, this code will |
our own. Using an enum for "bfd_boolean" has its own set of |
87 |
use gcc's "long long" type. Otherwise, BFD_HOST_64_BIT must be |
problems, with strange looking casts required to avoid warnings |
88 |
defined above. */ |
on some older compilers. Thus we just use an int. |
89 |
|
|
90 |
#ifndef BFD_HOST_64_BIT |
General rule: Functions which are bfd_boolean return TRUE on |
91 |
# if BFD_HOST_64BIT_LONG |
success and FALSE on failure (unless they're a predicate). */ |
92 |
# define BFD_HOST_64_BIT long |
|
93 |
# define BFD_HOST_U_64_BIT unsigned long |
typedef int bfd_boolean; |
94 |
# else |
#undef FALSE |
95 |
# ifdef __GNUC__ |
#undef TRUE |
96 |
# if __GNUC__ >= 2 |
#define FALSE 0 |
97 |
# define BFD_HOST_64_BIT long long |
#define TRUE 1 |
|
# 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) */ |
|
98 |
|
|
99 |
#ifdef BFD64 |
#ifdef BFD64 |
100 |
|
|
143 |
|
|
144 |
#endif /* not BFD64 */ |
#endif /* not BFD64 */ |
145 |
|
|
146 |
/* A pointer to a position in a file. */ |
#ifndef BFD_HOST_64_BIT |
147 |
/* 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 |
148 |
For now, try to avoid breaking stuff by not including <sys/types.h> here. |
available for function return types, but in the case that |
149 |
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 |
150 |
Probably the best long-term answer is to avoid using file_ptr AND off_t |
otherwise signal an error. */ |
151 |
in this header file, and to handle this in the BFD implementation |
typedef bfd_signed_vma bfd_int64_t; |
152 |
rather than in its interface. */ |
typedef bfd_vma bfd_uint64_t; |
153 |
/* typedef off_t file_ptr; */ |
#endif |
154 |
typedef bfd_signed_vma file_ptr; |
|
155 |
typedef bfd_vma ufile_ptr; |
/* An offset into a file. BFD always uses the largest possible offset |
156 |
|
based on the build time availability of fseek, fseeko, or fseeko64. */ |
157 |
|
typedef @bfd_file_ptr@ file_ptr; |
158 |
|
typedef unsigned @bfd_file_ptr@ ufile_ptr; |
159 |
|
|
160 |
extern void bfd_sprintf_vma PARAMS ((bfd *, char *, bfd_vma)); |
extern void bfd_sprintf_vma (bfd *, char *, bfd_vma); |
161 |
extern void bfd_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma)); |
extern void bfd_fprintf_vma (bfd *, void *, bfd_vma); |
162 |
|
|
163 |
#define printf_vma(x) fprintf_vma(stdout,x) |
#define printf_vma(x) fprintf_vma(stdout,x) |
164 |
#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x) |
#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x) |
171 |
typedef enum bfd_format |
typedef enum bfd_format |
172 |
{ |
{ |
173 |
bfd_unknown = 0, /* File format is unknown. */ |
bfd_unknown = 0, /* File format is unknown. */ |
174 |
bfd_object, /* Linker/assember/compiler output. */ |
bfd_object, /* Linker/assembler/compiler output. */ |
175 |
bfd_archive, /* Object archive file. */ |
bfd_archive, /* Object archive file. */ |
176 |
bfd_core, /* Core dump. */ |
bfd_core, /* Core dump. */ |
177 |
bfd_type_end /* Marks the end; don't use it! */ |
bfd_type_end /* Marks the end; don't use it! */ |
234 |
/* This flag indicates that the BFD contents are actually cached in |
/* This flag indicates that the BFD contents are actually cached in |
235 |
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. */ |
236 |
#define BFD_IN_MEMORY 0x800 |
#define BFD_IN_MEMORY 0x800 |
237 |
|
|
238 |
|
/* The sections in this BFD specify a memory page. */ |
239 |
|
#define HAS_LOAD_PAGE 0x1000 |
240 |
|
|
241 |
|
/* This BFD has been created by the linker and doesn't correspond |
242 |
|
to any input file. */ |
243 |
|
#define BFD_LINKER_CREATED 0x2000 |
244 |
|
|
245 |
/* Symbols and relocation. */ |
/* Symbols and relocation. */ |
246 |
|
|
293 |
unsigned int line_number; /* Linenumber from start of function. */ |
unsigned int line_number; /* Linenumber from start of function. */ |
294 |
union |
union |
295 |
{ |
{ |
296 |
struct symbol_cache_entry *sym; /* Function name. */ |
struct bfd_symbol *sym; /* Function name. */ |
297 |
bfd_vma offset; /* Offset into section. */ |
bfd_vma offset; /* Offset into section. */ |
298 |
} u; |
} u; |
299 |
} |
} |
302 |
/* Object and core file sections. */ |
/* Object and core file sections. */ |
303 |
|
|
304 |
#define align_power(addr, align) \ |
#define align_power(addr, align) \ |
305 |
( ((addr) + ((1<<(align))-1)) & (-1 << (align))) |
(((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) |
306 |
|
|
307 |
typedef struct sec *sec_ptr; |
typedef struct bfd_section *sec_ptr; |
308 |
|
|
309 |
#define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0) |
#define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0) |
310 |
#define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0) |
#define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0) |
311 |
#define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0) |
#define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0) |
312 |
#define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0) |
#define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0) |
313 |
#define bfd_section_name(bfd, ptr) ((ptr)->name) |
#define bfd_section_name(bfd, ptr) ((ptr)->name) |
314 |
#define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr)) |
#define bfd_section_size(bfd, ptr) ((ptr)->size) |
315 |
|
#define bfd_get_section_size(ptr) ((ptr)->size) |
316 |
#define bfd_section_vma(bfd, ptr) ((ptr)->vma) |
#define bfd_section_vma(bfd, ptr) ((ptr)->vma) |
317 |
#define bfd_section_lma(bfd, ptr) ((ptr)->lma) |
#define bfd_section_lma(bfd, ptr) ((ptr)->lma) |
318 |
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) |
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) |
321 |
|
|
322 |
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) |
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) |
323 |
|
|
324 |
#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) |
325 |
#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) |
326 |
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true) |
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) |
327 |
|
/* Find the address one past the end of SEC. */ |
328 |
|
#define bfd_get_section_limit(bfd, sec) \ |
329 |
|
(((sec)->rawsize ? (sec)->rawsize : (sec)->size) \ |
330 |
|
/ bfd_octets_per_byte (bfd)) |
331 |
|
|
332 |
typedef struct stat stat_type; |
typedef struct stat stat_type; |
333 |
|
|
353 |
|
|
354 |
/* Get the name of a stabs type code. */ |
/* Get the name of a stabs type code. */ |
355 |
|
|
356 |
extern const char *bfd_get_stab_name PARAMS ((int)); |
extern const char *bfd_get_stab_name (int); |
357 |
|
|
358 |
/* 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. */ |
359 |
|
|
386 |
built each of which calls the function in the superclass. Thus |
built each of which calls the function in the superclass. Thus |
387 |
each function should be written to allocate a new block of memory |
each function should be written to allocate a new block of memory |
388 |
only if the argument is NULL. */ |
only if the argument is NULL. */ |
389 |
struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *, |
struct bfd_hash_entry *(*newfunc) |
390 |
struct bfd_hash_table *, |
(struct bfd_hash_entry *, struct bfd_hash_table *, const char *); |
|
const char *)); |
|
391 |
/* An objalloc for this hash table. This is a struct objalloc *, |
/* An objalloc for this hash table. This is a struct objalloc *, |
392 |
but we use PTR to avoid requiring the inclusion of objalloc.h. */ |
but we use void * to avoid requiring the inclusion of objalloc.h. */ |
393 |
PTR memory; |
void *memory; |
394 |
}; |
}; |
395 |
|
|
396 |
/* Initialize a hash table. */ |
/* Initialize a hash table. */ |
397 |
extern boolean bfd_hash_table_init |
extern bfd_boolean bfd_hash_table_init |
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 |
|
|
403 |
/* Initialize a hash table specifying a size. */ |
/* Initialize a hash table specifying a size. */ |
404 |
extern boolean bfd_hash_table_init_n |
extern bfd_boolean bfd_hash_table_init_n |
405 |
PARAMS ((struct bfd_hash_table *, |
(struct bfd_hash_table *, |
406 |
struct bfd_hash_entry *(*) (struct bfd_hash_entry *, |
struct bfd_hash_entry *(*) (struct bfd_hash_entry *, |
407 |
struct bfd_hash_table *, |
struct bfd_hash_table *, |
408 |
const char *), |
const char *), |
409 |
unsigned int size)); |
unsigned int size); |
410 |
|
|
411 |
/* Free up a hash table. */ |
/* Free up a hash table. */ |
412 |
extern void bfd_hash_table_free PARAMS ((struct bfd_hash_table *)); |
extern void bfd_hash_table_free |
413 |
|
(struct bfd_hash_table *); |
414 |
|
|
415 |
/* 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 |
416 |
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 |
417 |
COPY argument must be true if this routine should copy the string |
COPY argument must be TRUE if this routine should copy the string |
418 |
into newly allocated memory when adding an entry. */ |
into newly allocated memory when adding an entry. */ |
419 |
extern struct bfd_hash_entry *bfd_hash_lookup |
extern struct bfd_hash_entry *bfd_hash_lookup |
420 |
PARAMS ((struct bfd_hash_table *, const char *, boolean create, |
(struct bfd_hash_table *, const char *, bfd_boolean create, |
421 |
boolean copy)); |
bfd_boolean copy); |
422 |
|
|
423 |
/* Replace an entry in a hash table. */ |
/* Replace an entry in a hash table. */ |
424 |
extern void bfd_hash_replace |
extern void bfd_hash_replace |
425 |
PARAMS ((struct bfd_hash_table *, struct bfd_hash_entry *old, |
(struct bfd_hash_table *, struct bfd_hash_entry *old, |
426 |
struct bfd_hash_entry *nw)); |
struct bfd_hash_entry *nw); |
427 |
|
|
428 |
/* Base method for creating a hash table entry. */ |
/* Base method for creating a hash table entry. */ |
429 |
extern struct bfd_hash_entry *bfd_hash_newfunc |
extern struct bfd_hash_entry *bfd_hash_newfunc |
430 |
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, |
(struct bfd_hash_entry *, struct bfd_hash_table *, const char *); |
|
const char *)); |
|
431 |
|
|
432 |
/* Grab some space for a hash table entry. */ |
/* Grab some space for a hash table entry. */ |
433 |
extern PTR bfd_hash_allocate PARAMS ((struct bfd_hash_table *, |
extern void *bfd_hash_allocate |
434 |
unsigned int)); |
(struct bfd_hash_table *, unsigned int); |
435 |
|
|
436 |
/* 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 |
437 |
element. If the function returns false, the traversal stops. The |
element. If the function returns FALSE, the traversal stops. The |
438 |
INFO argument is passed to the function. */ |
INFO argument is passed to the function. */ |
439 |
extern void bfd_hash_traverse PARAMS ((struct bfd_hash_table *, |
extern void bfd_hash_traverse |
440 |
boolean (*) (struct bfd_hash_entry *, |
(struct bfd_hash_table *, |
441 |
PTR), |
bfd_boolean (*) (struct bfd_hash_entry *, void *), |
442 |
PTR info)); |
void *info); |
443 |
|
|
444 |
|
/* Allows the default size of a hash table to be configured. New hash |
445 |
|
tables allocated using bfd_hash_table_init will be created with |
446 |
|
this size. */ |
447 |
|
extern void bfd_hash_set_default_size (bfd_size_type); |
448 |
|
|
449 |
|
/* This structure is used to keep track of stabs in sections |
450 |
|
information while linking. */ |
451 |
|
|
452 |
|
struct stab_info |
453 |
|
{ |
454 |
|
/* A hash table used to hold stabs strings. */ |
455 |
|
struct bfd_strtab_hash *strings; |
456 |
|
/* The header file hash table. */ |
457 |
|
struct bfd_hash_table includes; |
458 |
|
/* The first .stabstr section. */ |
459 |
|
struct bfd_section *stabstr; |
460 |
|
}; |
461 |
|
|
462 |
#define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table |
#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table |
463 |
|
|
464 |
/* User program access to BFD facilities. */ |
/* User program access to BFD facilities. */ |
465 |
|
|
466 |
/* Direct I/O routines, for programs which know more about the object |
/* Direct I/O routines, for programs which know more about the object |
467 |
file than BFD does. Use higher level routines if possible. */ |
file than BFD does. Use higher level routines if possible. */ |
468 |
|
|
469 |
extern bfd_size_type bfd_bread PARAMS ((PTR, bfd_size_type, bfd *)); |
extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *); |
470 |
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 *); |
471 |
extern int bfd_seek PARAMS ((bfd *, file_ptr, int)); |
extern int bfd_seek (bfd *, file_ptr, int); |
472 |
extern ufile_ptr bfd_tell PARAMS ((bfd *)); |
extern file_ptr bfd_tell (bfd *); |
473 |
extern int bfd_flush PARAMS ((bfd *)); |
extern int bfd_flush (bfd *); |
474 |
extern int bfd_stat PARAMS ((bfd *, struct stat *)); |
extern int bfd_stat (bfd *, struct stat *); |
475 |
|
|
476 |
/* Deprecated old routines. */ |
/* Deprecated old routines. */ |
477 |
#if __GNUC__ |
#if __GNUC__ |
489 |
(warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ |
(warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ |
490 |
bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) |
bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) |
491 |
#endif |
#endif |
492 |
extern void warn_deprecated |
extern void warn_deprecated (const char *, const char *, int, const char *); |
|
PARAMS ((const char *, const char *, int, const char *)); |
|
493 |
|
|
494 |
/* Cast from const char * to char * so that caller can assign to |
/* Cast from const char * to char * so that caller can assign to |
495 |
a char * without a warning. */ |
a char * without a warning. */ |
521 |
#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) |
#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) |
522 |
#define bfd_count_sections(abfd) ((abfd)->section_count) |
#define bfd_count_sections(abfd) ((abfd)->section_count) |
523 |
|
|
524 |
|
#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) |
525 |
|
|
526 |
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) |
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) |
527 |
|
|
528 |
#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean) (bool)), true) |
#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) |
529 |
|
|
530 |
extern boolean bfd_cache_close PARAMS ((bfd *abfd)); |
extern bfd_boolean bfd_cache_close |
531 |
|
(bfd *abfd); |
532 |
/* NB: This declaration should match the autogenerated one in libbfd.h. */ |
/* NB: This declaration should match the autogenerated one in libbfd.h. */ |
533 |
|
|
534 |
extern boolean bfd_record_phdr |
extern bfd_boolean bfd_cache_close_all (void); |
535 |
PARAMS ((bfd *, unsigned long, boolean, flagword, boolean, bfd_vma, |
|
536 |
boolean, boolean, unsigned int, struct sec **)); |
extern bfd_boolean bfd_record_phdr |
537 |
|
(bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma, |
538 |
|
bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **); |
539 |
|
|
540 |
/* Byte swapping routines. */ |
/* Byte swapping routines. */ |
541 |
|
|
542 |
bfd_vma bfd_getb64 PARAMS ((const unsigned char *)); |
bfd_uint64_t bfd_getb64 (const void *); |
543 |
bfd_vma bfd_getl64 PARAMS ((const unsigned char *)); |
bfd_uint64_t bfd_getl64 (const void *); |
544 |
bfd_signed_vma bfd_getb_signed_64 PARAMS ((const unsigned char *)); |
bfd_int64_t bfd_getb_signed_64 (const void *); |
545 |
bfd_signed_vma bfd_getl_signed_64 PARAMS ((const unsigned char *)); |
bfd_int64_t bfd_getl_signed_64 (const void *); |
546 |
bfd_vma bfd_getb32 PARAMS ((const unsigned char *)); |
bfd_vma bfd_getb32 (const void *); |
547 |
bfd_vma bfd_getl32 PARAMS ((const unsigned char *)); |
bfd_vma bfd_getl32 (const void *); |
548 |
bfd_signed_vma bfd_getb_signed_32 PARAMS ((const unsigned char *)); |
bfd_signed_vma bfd_getb_signed_32 (const void *); |
549 |
bfd_signed_vma bfd_getl_signed_32 PARAMS ((const unsigned char *)); |
bfd_signed_vma bfd_getl_signed_32 (const void *); |
550 |
bfd_vma bfd_getb16 PARAMS ((const unsigned char *)); |
bfd_vma bfd_getb16 (const void *); |
551 |
bfd_vma bfd_getl16 PARAMS ((const unsigned char *)); |
bfd_vma bfd_getl16 (const void *); |
552 |
bfd_signed_vma bfd_getb_signed_16 PARAMS ((const unsigned char *)); |
bfd_signed_vma bfd_getb_signed_16 (const void *); |
553 |
bfd_signed_vma bfd_getl_signed_16 PARAMS ((const unsigned char *)); |
bfd_signed_vma bfd_getl_signed_16 (const void *); |
554 |
void bfd_putb64 PARAMS ((bfd_vma, unsigned char *)); |
void bfd_putb64 (bfd_uint64_t, void *); |
555 |
void bfd_putl64 PARAMS ((bfd_vma, unsigned char *)); |
void bfd_putl64 (bfd_uint64_t, void *); |
556 |
void bfd_putb32 PARAMS ((bfd_vma, unsigned char *)); |
void bfd_putb32 (bfd_vma, void *); |
557 |
void bfd_putl32 PARAMS ((bfd_vma, unsigned char *)); |
void bfd_putl32 (bfd_vma, void *); |
558 |
void bfd_putb16 PARAMS ((bfd_vma, unsigned char *)); |
void bfd_putb16 (bfd_vma, void *); |
559 |
void bfd_putl16 PARAMS ((bfd_vma, unsigned char *)); |
void bfd_putl16 (bfd_vma, void *); |
560 |
|
|
561 |
/* Byte swapping routines which take size and endiannes as arguments. */ |
/* Byte swapping routines which take size and endiannes as arguments. */ |
562 |
|
|
563 |
bfd_vma bfd_get_bits PARAMS ((bfd_byte *, int, boolean)); |
bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); |
564 |
void bfd_put_bits PARAMS ((bfd_vma, bfd_byte *, int, boolean)); |
void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); |
565 |
|
|
566 |
|
extern bfd_boolean bfd_section_already_linked_table_init (void); |
567 |
|
extern void bfd_section_already_linked_table_free (void); |
568 |
|
|
569 |
/* Externally visible ECOFF routines. */ |
/* Externally visible ECOFF routines. */ |
570 |
|
|
572 |
struct ecoff_debug_info; |
struct ecoff_debug_info; |
573 |
struct ecoff_debug_swap; |
struct ecoff_debug_swap; |
574 |
struct ecoff_extr; |
struct ecoff_extr; |
575 |
struct symbol_cache_entry; |
struct bfd_symbol; |
576 |
struct bfd_link_info; |
struct bfd_link_info; |
577 |
struct bfd_link_hash_entry; |
struct bfd_link_hash_entry; |
578 |
struct bfd_elf_version_tree; |
struct bfd_elf_version_tree; |
579 |
#endif |
#endif |
580 |
extern bfd_vma bfd_ecoff_get_gp_value PARAMS ((bfd * abfd)); |
extern bfd_vma bfd_ecoff_get_gp_value |
581 |
extern boolean bfd_ecoff_set_gp_value PARAMS ((bfd *abfd, bfd_vma gp_value)); |
(bfd * abfd); |
582 |
extern boolean bfd_ecoff_set_regmasks |
extern bfd_boolean bfd_ecoff_set_gp_value |
583 |
PARAMS ((bfd *abfd, unsigned long gprmask, unsigned long fprmask, |
(bfd *abfd, bfd_vma gp_value); |
584 |
unsigned long *cprmask)); |
extern bfd_boolean bfd_ecoff_set_regmasks |
585 |
extern PTR bfd_ecoff_debug_init |
(bfd *abfd, unsigned long gprmask, unsigned long fprmask, |
586 |
PARAMS ((bfd *output_bfd, struct ecoff_debug_info *output_debug, |
unsigned long *cprmask); |
587 |
const struct ecoff_debug_swap *output_swap, |
extern void *bfd_ecoff_debug_init |
588 |
struct bfd_link_info *)); |
(bfd *output_bfd, struct ecoff_debug_info *output_debug, |
589 |
|
const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); |
590 |
extern void bfd_ecoff_debug_free |
extern void bfd_ecoff_debug_free |
591 |
PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, |
(void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, |
592 |
const struct ecoff_debug_swap *output_swap, |
const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); |
593 |
struct bfd_link_info *)); |
extern bfd_boolean bfd_ecoff_debug_accumulate |
594 |
extern boolean bfd_ecoff_debug_accumulate |
(void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, |
595 |
PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, |
const struct ecoff_debug_swap *output_swap, bfd *input_bfd, |
596 |
const struct ecoff_debug_swap *output_swap, |
struct ecoff_debug_info *input_debug, |
597 |
bfd *input_bfd, struct ecoff_debug_info *input_debug, |
const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); |
598 |
const struct ecoff_debug_swap *input_swap, |
extern bfd_boolean bfd_ecoff_debug_accumulate_other |
599 |
struct bfd_link_info *)); |
(void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, |
600 |
extern boolean bfd_ecoff_debug_accumulate_other |
const struct ecoff_debug_swap *output_swap, bfd *input_bfd, |
601 |
PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, |
struct bfd_link_info *); |
602 |
const struct ecoff_debug_swap *output_swap, bfd *input_bfd, |
extern bfd_boolean bfd_ecoff_debug_externals |
603 |
struct bfd_link_info *)); |
(bfd *abfd, struct ecoff_debug_info *debug, |
604 |
extern boolean bfd_ecoff_debug_externals |
const struct ecoff_debug_swap *swap, bfd_boolean relocatable, |
605 |
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug, |
bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), |
606 |
const struct ecoff_debug_swap *swap, |
void (*set_index) (struct bfd_symbol *, bfd_size_type)); |
607 |
boolean relocateable, |
extern bfd_boolean bfd_ecoff_debug_one_external |
608 |
boolean (*get_extr) (struct symbol_cache_entry *, |
(bfd *abfd, struct ecoff_debug_info *debug, |
609 |
struct ecoff_extr *), |
const struct ecoff_debug_swap *swap, const char *name, |
610 |
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)); |
|
611 |
extern bfd_size_type bfd_ecoff_debug_size |
extern bfd_size_type bfd_ecoff_debug_size |
612 |
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug, |
(bfd *abfd, struct ecoff_debug_info *debug, |
613 |
const struct ecoff_debug_swap *swap)); |
const struct ecoff_debug_swap *swap); |
614 |
extern boolean bfd_ecoff_write_debug |
extern bfd_boolean bfd_ecoff_write_debug |
615 |
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug, |
(bfd *abfd, struct ecoff_debug_info *debug, |
616 |
const struct ecoff_debug_swap *swap, file_ptr where)); |
const struct ecoff_debug_swap *swap, file_ptr where); |
617 |
extern boolean bfd_ecoff_write_accumulated_debug |
extern bfd_boolean bfd_ecoff_write_accumulated_debug |
618 |
PARAMS ((PTR handle, bfd *abfd, struct ecoff_debug_info *debug, |
(void *handle, bfd *abfd, struct ecoff_debug_info *debug, |
619 |
const struct ecoff_debug_swap *swap, |
const struct ecoff_debug_swap *swap, |
620 |
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 **)); |
|
621 |
|
|
622 |
/* Externally visible ELF routines. */ |
/* Externally visible ELF routines. */ |
623 |
|
|
628 |
const char *name; |
const char *name; |
629 |
}; |
}; |
630 |
|
|
631 |
extern boolean bfd_elf32_record_link_assignment |
enum dynamic_lib_link_class { |
632 |
PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean)); |
DYN_NORMAL = 0, |
633 |
extern boolean bfd_elf64_record_link_assignment |
DYN_AS_NEEDED = 1, |
634 |
PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean)); |
DYN_DT_NEEDED = 2, |
635 |
|
DYN_NO_ADD_NEEDED = 4, |
636 |
|
DYN_NO_NEEDED = 8 |
637 |
|
}; |
638 |
|
|
639 |
|
extern bfd_boolean bfd_elf_record_link_assignment |
640 |
|
(bfd *, struct bfd_link_info *, const char *, bfd_boolean); |
641 |
extern struct bfd_link_needed_list *bfd_elf_get_needed_list |
extern struct bfd_link_needed_list *bfd_elf_get_needed_list |
642 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
643 |
extern boolean bfd_elf_get_bfd_needed_list |
extern bfd_boolean bfd_elf_get_bfd_needed_list |
644 |
PARAMS ((bfd *, struct bfd_link_needed_list **)); |
(bfd *, struct bfd_link_needed_list **); |
645 |
extern boolean bfd_elf32_size_dynamic_sections |
extern bfd_boolean bfd_elf_size_dynamic_sections |
646 |
PARAMS ((bfd *, const char *, const char *, const char *, |
(bfd *, const char *, const char *, const char *, const char * const *, |
647 |
const char * const *, struct bfd_link_info *, struct sec **, |
struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *); |
648 |
struct bfd_elf_version_tree *)); |
extern void bfd_elf_set_dt_needed_name |
649 |
extern boolean bfd_elf64_size_dynamic_sections |
(bfd *, const char *); |
650 |
PARAMS ((bfd *, const char *, const char *, const char *, |
extern const char *bfd_elf_get_dt_soname |
651 |
const char * const *, struct bfd_link_info *, struct sec **, |
(bfd *); |
652 |
struct bfd_elf_version_tree *)); |
extern void bfd_elf_set_dyn_lib_class |
653 |
extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *)); |
(bfd *, int); |
654 |
extern void bfd_elf_set_dt_needed_soname PARAMS ((bfd *, const char *)); |
extern int bfd_elf_get_dyn_lib_class |
655 |
extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *)); |
(bfd *); |
656 |
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list |
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list |
657 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
658 |
extern boolean bfd_elf32_discard_info |
extern bfd_boolean bfd_elf_discard_info |
659 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
|
extern boolean bfd_elf64_discard_info |
|
|
PARAMS ((bfd *, struct bfd_link_info *)); |
|
660 |
|
|
661 |
/* 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 |
662 |
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 |
663 |
occurs; bfd_get_error will return an appropriate code. */ |
occurs; bfd_get_error will return an appropriate code. */ |
664 |
extern long bfd_get_elf_phdr_upper_bound PARAMS ((bfd *abfd)); |
extern long bfd_get_elf_phdr_upper_bound |
665 |
|
(bfd *abfd); |
666 |
|
|
667 |
/* Copy ABFD's program header table entries to *PHDRS. The entries |
/* Copy ABFD's program header table entries to *PHDRS. The entries |
668 |
will be stored as an array of Elf_Internal_Phdr structures, as |
will be stored as an array of Elf_Internal_Phdr structures, as |
671 |
|
|
672 |
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 |
673 |
error occurs; bfd_get_error will return an appropriate code. */ |
error occurs; bfd_get_error will return an appropriate code. */ |
674 |
extern int bfd_get_elf_phdrs PARAMS ((bfd *abfd, void *phdrs)); |
extern int bfd_get_elf_phdrs |
675 |
|
(bfd *abfd, void *phdrs); |
676 |
|
|
677 |
|
/* Create a new BFD as if by bfd_openr. Rather than opening a file, |
678 |
|
reconstruct an ELF file by reading the segments out of remote memory |
679 |
|
based on the ELF file header at EHDR_VMA and the ELF program headers it |
680 |
|
points to. If not null, *LOADBASEP is filled in with the difference |
681 |
|
between the VMAs from which the segments were read, and the VMAs the |
682 |
|
file headers (and hence BFD's idea of each section's VMA) put them at. |
683 |
|
|
684 |
|
The function TARGET_READ_MEMORY is called to copy LEN bytes from the |
685 |
|
remote memory at target address VMA into the local buffer at MYADDR; it |
686 |
|
should return zero on success or an `errno' code on failure. TEMPL must |
687 |
|
be a BFD for an ELF target with the word size and byte order found in |
688 |
|
the remote memory. */ |
689 |
|
extern bfd *bfd_elf_bfd_from_remote_memory |
690 |
|
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, |
691 |
|
int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len)); |
692 |
|
|
693 |
/* 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. */ |
694 |
extern int bfd_get_arch_size PARAMS ((bfd *)); |
extern int bfd_get_arch_size |
695 |
|
(bfd *); |
696 |
|
|
697 |
|
/* Return TRUE if address "naturally" sign extends, or -1 if not elf. */ |
698 |
|
extern int bfd_get_sign_extend_vma |
699 |
|
(bfd *); |
700 |
|
|
701 |
/* Return true if address "naturally" sign extends, or -1 if not elf. */ |
extern struct bfd_section *_bfd_elf_tls_setup |
702 |
extern int bfd_get_sign_extend_vma PARAMS ((bfd *)); |
(bfd *, struct bfd_link_info *); |
703 |
|
|
704 |
extern boolean bfd_m68k_elf32_create_embedded_relocs |
extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs |
705 |
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, |
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); |
|
char **)); |
|
|
extern boolean bfd_mips_elf32_create_embedded_relocs |
|
|
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, |
|
|
char **)); |
|
706 |
|
|
707 |
/* SunOS shared library support routines for the linker. */ |
/* SunOS shared library support routines for the linker. */ |
708 |
|
|
709 |
extern struct bfd_link_needed_list *bfd_sunos_get_needed_list |
extern struct bfd_link_needed_list *bfd_sunos_get_needed_list |
710 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
711 |
extern boolean bfd_sunos_record_link_assignment |
extern bfd_boolean bfd_sunos_record_link_assignment |
712 |
PARAMS ((bfd *, struct bfd_link_info *, const char *)); |
(bfd *, struct bfd_link_info *, const char *); |
713 |
extern boolean bfd_sunos_size_dynamic_sections |
extern bfd_boolean bfd_sunos_size_dynamic_sections |
714 |
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 **)); |
|
715 |
|
|
716 |
/* Linux shared library support routines for the linker. */ |
/* Linux shared library support routines for the linker. */ |
717 |
|
|
718 |
extern boolean bfd_i386linux_size_dynamic_sections |
extern bfd_boolean bfd_i386linux_size_dynamic_sections |
719 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
720 |
extern boolean bfd_m68klinux_size_dynamic_sections |
extern bfd_boolean bfd_m68klinux_size_dynamic_sections |
721 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
722 |
extern boolean bfd_sparclinux_size_dynamic_sections |
extern bfd_boolean bfd_sparclinux_size_dynamic_sections |
723 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
724 |
|
|
725 |
/* mmap hacks */ |
/* mmap hacks */ |
726 |
|
|
730 |
typedef struct _bfd_window |
typedef struct _bfd_window |
731 |
{ |
{ |
732 |
/* What the user asked for. */ |
/* What the user asked for. */ |
733 |
PTR data; |
void *data; |
734 |
bfd_size_type size; |
bfd_size_type size; |
735 |
/* The actual window used by BFD. Small user-requested read-only |
/* The actual window used by BFD. Small user-requested read-only |
736 |
regions sharing a page may share a single window into the object |
regions sharing a page may share a single window into the object |
742 |
} |
} |
743 |
bfd_window; |
bfd_window; |
744 |
|
|
745 |
extern void bfd_init_window PARAMS ((bfd_window *)); |
extern void bfd_init_window |
746 |
extern void bfd_free_window PARAMS ((bfd_window *)); |
(bfd_window *); |
747 |
extern boolean bfd_get_file_window |
extern void bfd_free_window |
748 |
PARAMS ((bfd *, file_ptr, bfd_size_type, bfd_window *, boolean)); |
(bfd_window *); |
749 |
|
extern bfd_boolean bfd_get_file_window |
750 |
|
(bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); |
751 |
|
|
752 |
/* XCOFF support routines for the linker. */ |
/* XCOFF support routines for the linker. */ |
753 |
|
|
754 |
extern boolean bfd_xcoff_link_record_set |
extern bfd_boolean bfd_xcoff_link_record_set |
755 |
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, |
(bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); |
756 |
bfd_size_type)); |
extern bfd_boolean bfd_xcoff_import_symbol |
757 |
extern boolean bfd_xcoff_import_symbol |
(bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, |
758 |
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, |
const char *, const char *, const char *, unsigned int); |
759 |
bfd_vma, const char *, const char *, const char *, unsigned int)); |
extern bfd_boolean bfd_xcoff_export_symbol |
760 |
extern boolean bfd_xcoff_export_symbol |
(bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); |
761 |
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *)); |
extern bfd_boolean bfd_xcoff_link_count_reloc |
762 |
extern boolean bfd_xcoff_link_count_reloc |
(bfd *, struct bfd_link_info *, const char *); |
763 |
PARAMS ((bfd *, struct bfd_link_info *, const char *)); |
extern bfd_boolean bfd_xcoff_record_link_assignment |
764 |
extern boolean bfd_xcoff_record_link_assignment |
(bfd *, struct bfd_link_info *, const char *); |
765 |
PARAMS ((bfd *, struct bfd_link_info *, const char *)); |
extern bfd_boolean bfd_xcoff_size_dynamic_sections |
766 |
extern boolean bfd_xcoff_size_dynamic_sections |
(bfd *, struct bfd_link_info *, const char *, const char *, |
767 |
PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *, |
unsigned long, unsigned long, unsigned long, bfd_boolean, |
768 |
unsigned long, unsigned long, unsigned long, boolean, |
int, bfd_boolean, bfd_boolean, struct bfd_section **, bfd_boolean); |
769 |
int, boolean, boolean, struct sec **, boolean)); |
extern bfd_boolean bfd_xcoff_link_generate_rtinit |
770 |
extern boolean bfd_xcoff_link_generate_rtinit |
(bfd *, const char *, const char *, bfd_boolean); |
|
PARAMS ((bfd *, const char *, const char *, boolean)); |
|
771 |
|
|
772 |
/* XCOFF support routines for ar. */ |
/* XCOFF support routines for ar. */ |
773 |
extern boolean bfd_xcoff_ar_archive_set_magic PARAMS ((bfd *, char *)); |
extern bfd_boolean bfd_xcoff_ar_archive_set_magic |
774 |
|
(bfd *, char *); |
775 |
|
|
776 |
/* Externally visible COFF routines. */ |
/* Externally visible COFF routines. */ |
777 |
|
|
780 |
union internal_auxent; |
union internal_auxent; |
781 |
#endif |
#endif |
782 |
|
|
783 |
extern boolean bfd_coff_get_syment |
extern bfd_boolean bfd_coff_get_syment |
784 |
PARAMS ((bfd *, struct symbol_cache_entry *, struct internal_syment *)); |
(bfd *, struct bfd_symbol *, struct internal_syment *); |
785 |
|
|
786 |
extern boolean bfd_coff_get_auxent |
extern bfd_boolean bfd_coff_get_auxent |
787 |
PARAMS ((bfd *, struct symbol_cache_entry *, int, union internal_auxent *)); |
(bfd *, struct bfd_symbol *, int, union internal_auxent *); |
788 |
|
|
789 |
extern boolean bfd_coff_set_symbol_class |
extern bfd_boolean bfd_coff_set_symbol_class |
790 |
PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int)); |
(bfd *, struct bfd_symbol *, unsigned int); |
791 |
|
|
792 |
extern boolean bfd_m68k_coff_create_embedded_relocs |
extern bfd_boolean bfd_m68k_coff_create_embedded_relocs |
793 |
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, |
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); |
|
char **)); |
|
794 |
|
|
795 |
/* ARM Interworking support. Called from linker. */ |
/* ARM Interworking support. Called from linker. */ |
796 |
extern boolean bfd_arm_allocate_interworking_sections |
extern bfd_boolean bfd_arm_allocate_interworking_sections |
797 |
PARAMS ((struct bfd_link_info *)); |
(struct bfd_link_info *); |
798 |
|
|
799 |
extern boolean bfd_arm_process_before_allocation |
extern bfd_boolean bfd_arm_process_before_allocation |
800 |
PARAMS ((bfd *, struct bfd_link_info *, int)); |
(bfd *, struct bfd_link_info *, int); |
801 |
|
|
802 |
extern boolean bfd_arm_get_bfd_for_interworking |
extern bfd_boolean bfd_arm_get_bfd_for_interworking |
803 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
804 |
|
|
805 |
/* PE ARM Interworking support. Called from linker. */ |
/* PE ARM Interworking support. Called from linker. */ |
806 |
extern boolean bfd_arm_pe_allocate_interworking_sections |
extern bfd_boolean bfd_arm_pe_allocate_interworking_sections |
807 |
PARAMS ((struct bfd_link_info *)); |
(struct bfd_link_info *); |
808 |
|
|
809 |
extern boolean bfd_arm_pe_process_before_allocation |
extern bfd_boolean bfd_arm_pe_process_before_allocation |
810 |
PARAMS ((bfd *, struct bfd_link_info *, int)); |
(bfd *, struct bfd_link_info *, int); |
811 |
|
|
812 |
extern boolean bfd_arm_pe_get_bfd_for_interworking |
extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking |
813 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
814 |
|
|
815 |
/* ELF ARM Interworking support. Called from linker. */ |
/* ELF ARM Interworking support. Called from linker. */ |
816 |
extern boolean bfd_elf32_arm_allocate_interworking_sections |
extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections |
817 |
PARAMS ((struct bfd_link_info *)); |
(struct bfd_link_info *); |
818 |
|
|
819 |
extern boolean bfd_elf32_arm_process_before_allocation |
extern bfd_boolean bfd_elf32_arm_process_before_allocation |
820 |
PARAMS ((bfd *, struct bfd_link_info *, int)); |
(bfd *, struct bfd_link_info *, int); |
821 |
|
|
822 |
extern boolean bfd_elf32_arm_get_bfd_for_interworking |
void bfd_elf32_arm_set_target_relocs |
823 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(struct bfd_link_info *, int, char *, int); |
824 |
|
|
825 |
extern boolean bfd_elf32_arm_add_glue_sections_to_bfd |
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking |
826 |
PARAMS ((bfd *, struct bfd_link_info *)); |
(bfd *, struct bfd_link_info *); |
827 |
|
|
828 |
|
extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd |
829 |
|
(bfd *, struct bfd_link_info *); |
830 |
|
|
831 |
|
/* ARM Note section processing. */ |
832 |
|
extern bfd_boolean bfd_arm_merge_machines |
833 |
|
(bfd *, bfd *); |
834 |
|
|
835 |
|
extern bfd_boolean bfd_arm_update_notes |
836 |
|
(bfd *, const char *); |
837 |
|
|
838 |
|
extern unsigned int bfd_arm_get_mach_from_notes |
839 |
|
(bfd *, const char *); |
840 |
|
|
841 |
/* TI COFF load page support. */ |
/* TI COFF load page support. */ |
842 |
extern void bfd_ticoff_set_section_load_page |
extern void bfd_ticoff_set_section_load_page |
843 |
PARAMS ((struct sec *, int)); |
(struct bfd_section *, int); |
844 |
|
|
845 |
extern int bfd_ticoff_get_section_load_page |
extern int bfd_ticoff_get_section_load_page |
846 |
PARAMS ((struct sec *)); |
(struct bfd_section *); |
847 |
|
|
848 |
|
/* H8/300 functions. */ |
849 |
|
extern bfd_vma bfd_h8300_pad_address |
850 |
|
(bfd *, bfd_vma); |
851 |
|
|
852 |
|
/* IA64 Itanium code generation. Called from linker. */ |
853 |
|
extern void bfd_elf32_ia64_after_parse |
854 |
|
(int); |
855 |
|
|
856 |
|
extern void bfd_elf64_ia64_after_parse |
857 |
|
(int); |
858 |
|
|
859 |
|
/* This structure is used for a comdat section, as in PE. A comdat |
860 |
|
section is associated with a particular symbol. When the linker |
861 |
|
sees a comdat section, it keeps only one of the sections with a |
862 |
|
given name and associated with a given symbol. */ |
863 |
|
|
864 |
|
struct coff_comdat_info |
865 |
|
{ |
866 |
|
/* The name of the symbol associated with a comdat section. */ |
867 |
|
const char *name; |
868 |
|
|
869 |
|
/* The local symbol table index of the symbol associated with a |
870 |
|
comdat section. This is only meaningful to the object file format |
871 |
|
specific code; it is not an index into the list returned by |
872 |
|
bfd_canonicalize_symtab. */ |
873 |
|
long symbol; |
874 |
|
}; |
875 |
|
|
876 |
|
extern struct coff_comdat_info *bfd_coff_get_comdat_section |
877 |
|
(bfd *, struct bfd_section *); |
878 |
|
|
879 |
/* Extracted from init.c. */ |
/* Extracted from init.c. */ |
880 |
void |
void bfd_init (void); |
|
bfd_init PARAMS ((void)); |
|
881 |
|
|
882 |
/* Extracted from opncls.c. */ |
/* Extracted from opncls.c. */ |
883 |
bfd * |
bfd *bfd_openr (const char *filename, const char *target); |
884 |
bfd_openr PARAMS ((const char *filename, const char *target)); |
|
885 |
|
bfd *bfd_fdopenr (const char *filename, const char *target, int fd); |
886 |
|
|
887 |
|
bfd *bfd_openstreamr (const char *, const char *, void *); |
888 |
|
|
889 |
|
bfd *bfd_openr_iovec (const char *filename, const char *target, |
890 |
|
void *(*open) (struct bfd *nbfd, |
891 |
|
void *open_closure), |
892 |
|
void *open_closure, |
893 |
|
file_ptr (*pread) (struct bfd *nbfd, |
894 |
|
void *stream, |
895 |
|
void *buf, |
896 |
|
file_ptr nbytes, |
897 |
|
file_ptr offset), |
898 |
|
int (*close) (struct bfd *nbfd, |
899 |
|
void *stream)); |
900 |
|
|
901 |
|
bfd *bfd_openw (const char *filename, const char *target); |
902 |
|
|
903 |
|
bfd_boolean bfd_close (bfd *abfd); |
904 |
|
|
905 |
bfd * |
bfd_boolean bfd_close_all_done (bfd *); |
|
bfd_fdopenr PARAMS ((const char *filename, const char *target, int fd)); |
|
906 |
|
|
907 |
bfd * |
bfd *bfd_create (const char *filename, bfd *templ); |
|
bfd_openstreamr PARAMS ((const char *, const char *, PTR)); |
|
908 |
|
|
909 |
bfd * |
bfd_boolean bfd_make_writable (bfd *abfd); |
|
bfd_openw PARAMS ((const char *filename, const char *target)); |
|
910 |
|
|
911 |
boolean |
bfd_boolean bfd_make_readable (bfd *abfd); |
|
bfd_close PARAMS ((bfd *abfd)); |
|
912 |
|
|
913 |
boolean |
unsigned long bfd_calc_gnu_debuglink_crc32 |
914 |
bfd_close_all_done PARAMS ((bfd *)); |
(unsigned long crc, const unsigned char *buf, bfd_size_type len); |
915 |
|
|
916 |
bfd * |
char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir); |
|
bfd_create PARAMS ((const char *filename, bfd *templ)); |
|
917 |
|
|
918 |
boolean |
struct bfd_section *bfd_create_gnu_debuglink_section |
919 |
bfd_make_writable PARAMS ((bfd *abfd)); |
(bfd *abfd, const char *filename); |
920 |
|
|
921 |
boolean |
bfd_boolean bfd_fill_in_gnu_debuglink_section |
922 |
bfd_make_readable PARAMS ((bfd *abfd)); |
(bfd *abfd, struct bfd_section *sect, const char *filename); |
923 |
|
|
924 |
/* Extracted from libbfd.c. */ |
/* Extracted from libbfd.c. */ |
925 |
|
|
926 |
/* Byte swapping macros for user section data. */ |
/* Byte swapping macros for user section data. */ |
927 |
|
|
928 |
#define bfd_put_8(abfd, val, ptr) \ |
#define bfd_put_8(abfd, val, ptr) \ |
929 |
((void) (*((unsigned char *) (ptr)) = (unsigned char) (val))) |
((void) (*((unsigned char *) (ptr)) = (val) & 0xff)) |
930 |
#define bfd_put_signed_8 \ |
#define bfd_put_signed_8 \ |
931 |
bfd_put_8 |
bfd_put_8 |
932 |
#define bfd_get_8(abfd, ptr) \ |
#define bfd_get_8(abfd, ptr) \ |
933 |
(*(unsigned char *) (ptr) & 0xff) |
(*(unsigned char *) (ptr) & 0xff) |
934 |
#define bfd_get_signed_8(abfd, ptr) \ |
#define bfd_get_signed_8(abfd, ptr) \ |
935 |
(((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) |
(((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) |
936 |
|
|
937 |
#define bfd_put_16(abfd, val, ptr) \ |
#define bfd_put_16(abfd, val, ptr) \ |
938 |
BFD_SEND(abfd, bfd_putx16, ((val),(ptr))) |
BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) |
939 |
#define bfd_put_signed_16 \ |
#define bfd_put_signed_16 \ |
940 |
bfd_put_16 |
bfd_put_16 |
941 |
#define bfd_get_16(abfd, ptr) \ |
#define bfd_get_16(abfd, ptr) \ |
942 |
BFD_SEND(abfd, bfd_getx16, (ptr)) |
BFD_SEND (abfd, bfd_getx16, (ptr)) |
943 |
#define bfd_get_signed_16(abfd, ptr) \ |
#define bfd_get_signed_16(abfd, ptr) \ |
944 |
BFD_SEND (abfd, bfd_getx_signed_16, (ptr)) |
BFD_SEND (abfd, bfd_getx_signed_16, (ptr)) |
945 |
|
|
946 |
#define bfd_put_32(abfd, val, ptr) \ |
#define bfd_put_32(abfd, val, ptr) \ |
947 |
BFD_SEND(abfd, bfd_putx32, ((val),(ptr))) |
BFD_SEND (abfd, bfd_putx32, ((val),(ptr))) |
948 |
#define bfd_put_signed_32 \ |
#define bfd_put_signed_32 \ |
949 |
bfd_put_32 |
bfd_put_32 |
950 |
#define bfd_get_32(abfd, ptr) \ |
#define bfd_get_32(abfd, ptr) \ |
951 |
BFD_SEND(abfd, bfd_getx32, (ptr)) |
BFD_SEND (abfd, bfd_getx32, (ptr)) |
952 |
#define bfd_get_signed_32(abfd, ptr) \ |
#define bfd_get_signed_32(abfd, ptr) \ |
953 |
BFD_SEND(abfd, bfd_getx_signed_32, (ptr)) |
BFD_SEND (abfd, bfd_getx_signed_32, (ptr)) |
954 |
|
|
955 |
#define bfd_put_64(abfd, val, ptr) \ |
#define bfd_put_64(abfd, val, ptr) \ |
956 |
BFD_SEND(abfd, bfd_putx64, ((val), (ptr))) |
BFD_SEND (abfd, bfd_putx64, ((val), (ptr))) |
957 |
#define bfd_put_signed_64 \ |
#define bfd_put_signed_64 \ |
958 |
bfd_put_64 |
bfd_put_64 |
959 |
#define bfd_get_64(abfd, ptr) \ |
#define bfd_get_64(abfd, ptr) \ |
960 |
BFD_SEND(abfd, bfd_getx64, (ptr)) |
BFD_SEND (abfd, bfd_getx64, (ptr)) |
961 |
#define bfd_get_signed_64(abfd, ptr) \ |
#define bfd_get_signed_64(abfd, ptr) \ |
962 |
BFD_SEND(abfd, bfd_getx_signed_64, (ptr)) |
BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) |
963 |
|
|
964 |
#define bfd_get(bits, abfd, ptr) \ |
#define bfd_get(bits, abfd, ptr) \ |
965 |
( (bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr) \ |
((bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr) \ |
966 |
: (bits) == 16 ? bfd_get_16 (abfd, ptr) \ |
: (bits) == 16 ? bfd_get_16 (abfd, ptr) \ |
967 |
: (bits) == 32 ? bfd_get_32 (abfd, ptr) \ |
: (bits) == 32 ? bfd_get_32 (abfd, ptr) \ |
968 |
: (bits) == 64 ? bfd_get_64 (abfd, ptr) \ |
: (bits) == 64 ? bfd_get_64 (abfd, ptr) \ |
969 |
: (abort (), (bfd_vma) - 1)) |
: (abort (), (bfd_vma) - 1)) |
970 |
|
|
971 |
#define bfd_put(bits, abfd, val, ptr) \ |
#define bfd_put(bits, abfd, val, ptr) \ |
972 |
( (bits) == 8 ? bfd_put_8 (abfd, val, ptr) \ |
((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \ |
973 |
: (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \ |
: (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \ |
974 |
: (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \ |
: (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \ |
975 |
: (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \ |
: (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \ |
976 |
: (abort (), (void) 0)) |
: (abort (), (void) 0)) |
977 |
|
|
978 |
|
|
979 |
/* Byte swapping macros for file header data. */ |
/* Byte swapping macros for file header data. */ |
1014 |
#define bfd_h_get_signed_64(abfd, ptr) \ |
#define bfd_h_get_signed_64(abfd, ptr) \ |
1015 |
BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr)) |
BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr)) |
1016 |
|
|
1017 |
/* Refinements on the above, which should eventually go away. Save |
/* Aliases for the above, which should eventually go away. */ |
|
cluttering the source with (bfd_vma) and (bfd_byte *) casts. */ |
|
1018 |
|
|
1019 |
#define H_PUT_64(abfd, val, where) \ |
#define H_PUT_64 bfd_h_put_64 |
1020 |
bfd_h_put_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) |
#define H_PUT_32 bfd_h_put_32 |
1021 |
|
#define H_PUT_16 bfd_h_put_16 |
1022 |
|
#define H_PUT_8 bfd_h_put_8 |
1023 |
|
#define H_PUT_S64 bfd_h_put_signed_64 |
1024 |
|
#define H_PUT_S32 bfd_h_put_signed_32 |
1025 |
|
#define H_PUT_S16 bfd_h_put_signed_16 |
1026 |
|
#define H_PUT_S8 bfd_h_put_signed_8 |
1027 |
|
#define H_GET_64 bfd_h_get_64 |
1028 |
|
#define H_GET_32 bfd_h_get_32 |
1029 |
|
#define H_GET_16 bfd_h_get_16 |
1030 |
|
#define H_GET_8 bfd_h_get_8 |
1031 |
|
#define H_GET_S64 bfd_h_get_signed_64 |
1032 |
|
#define H_GET_S32 bfd_h_get_signed_32 |
1033 |
|
#define H_GET_S16 bfd_h_get_signed_16 |
1034 |
|
#define H_GET_S8 bfd_h_get_signed_8 |
1035 |
|
|
|
#define H_PUT_32(abfd, val, where) \ |
|
|
bfd_h_put_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) |
|
1036 |
|
|
1037 |
#define H_PUT_16(abfd, val, where) \ |
/* Extracted from bfdio.c. */ |
1038 |
bfd_h_put_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) |
long bfd_get_mtime (bfd *abfd); |
|
|
|
|
#define H_PUT_8 bfd_h_put_8 |
|
|
|
|
|
#define H_PUT_S64(abfd, val, where) \ |
|
|
bfd_h_put_signed_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) |
|
|
|
|
|
#define H_PUT_S32(abfd, val, where) \ |
|
|
bfd_h_put_signed_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) |
|
|
|
|
|
#define H_PUT_S16(abfd, val, where) \ |
|
|
bfd_h_put_signed_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) |
|
|
|
|
|
#define H_PUT_S8 bfd_h_put_signed_8 |
|
|
|
|
|
#define H_GET_64(abfd, where) \ |
|
|
bfd_h_get_64 ((abfd), (bfd_byte *) (where)) |
|
|
|
|
|
#define H_GET_32(abfd, where) \ |
|
|
bfd_h_get_32 ((abfd), (bfd_byte *) (where)) |
|
|
|
|
|
#define H_GET_16(abfd, where) \ |
|
|
bfd_h_get_16 ((abfd), (bfd_byte *) (where)) |
|
|
|
|
|
#define H_GET_8 bfd_h_get_8 |
|
|
|
|
|
#define H_GET_S64(abfd, where) \ |
|
|
bfd_h_get_signed_64 ((abfd), (bfd_byte *) (where)) |
|
|
|
|
|
#define H_GET_S32(abfd, where) \ |
|
|
bfd_h_get_signed_32 ((abfd), (bfd_byte *) (where)) |
|
|
|
|
|
#define H_GET_S16(abfd, where) \ |
|
|
bfd_h_get_signed_16 ((abfd), (bfd_byte *) (where)) |
|
|
|
|
|
#define H_GET_S8 bfd_h_get_signed_8 |
|
1039 |
|
|
1040 |
|
long bfd_get_size (bfd *abfd); |
1041 |
|
|
1042 |
|
/* Extracted from bfdwin.c. */ |
1043 |
/* Extracted from section.c. */ |
/* Extracted from section.c. */ |
1044 |
/* This structure is used for a comdat section, as in PE. A comdat |
typedef struct bfd_section |
|
section is associated with a particular symbol. When the linker |
|
|
sees a comdat section, it keeps only one of the sections with a |
|
|
given name and associated with a given symbol. */ |
|
|
|
|
|
struct bfd_comdat_info |
|
|
{ |
|
|
/* The name of the symbol associated with a comdat section. */ |
|
|
const char *name; |
|
|
|
|
|
/* The local symbol table index of the symbol associated with a |
|
|
comdat section. This is only meaningful to the object file format |
|
|
specific code; it is not an index into the list returned by |
|
|
bfd_canonicalize_symtab. */ |
|
|
long symbol; |
|
|
}; |
|
|
|
|
|
typedef struct sec |
|
1045 |
{ |
{ |
1046 |
/* The name of the section; the name isn't a copy, the pointer is |
/* The name of the section; the name isn't a copy, the pointer is |
1047 |
the same as that passed to bfd_make_section. */ |
the same as that passed to bfd_make_section. */ |
1054 |
int index; |
int index; |
1055 |
|
|
1056 |
/* The next section in the list belonging to the BFD, or NULL. */ |
/* The next section in the list belonging to the BFD, or NULL. */ |
1057 |
struct sec *next; |
struct bfd_section *next; |
1058 |
|
|
1059 |
/* The field flags contains attributes of the section. Some |
/* The field flags contains attributes of the section. Some |
1060 |
flags are read in from the object file, and some are |
flags are read in from the object file, and some are |
1075 |
some relocation information too. */ |
some relocation information too. */ |
1076 |
#define SEC_RELOC 0x004 |
#define SEC_RELOC 0x004 |
1077 |
|
|
|
/* ELF reserves 4 processor specific bits and 8 operating system |
|
|
specific bits in sh_flags; at present we can get away with just |
|
|
one in communicating between the assembler and BFD, but this |
|
|
isn't a good long-term solution. */ |
|
|
#define SEC_ARCH_BIT_0 0x008 |
|
|
|
|
1078 |
/* A signal to the OS that the section contains read only data. */ |
/* A signal to the OS that the section contains read only data. */ |
1079 |
#define SEC_READONLY 0x010 |
#define SEC_READONLY 0x008 |
1080 |
|
|
1081 |
/* The section contains code only. */ |
/* The section contains code only. */ |
1082 |
#define SEC_CODE 0x020 |
#define SEC_CODE 0x010 |
1083 |
|
|
1084 |
/* The section contains data only. */ |
/* The section contains data only. */ |
1085 |
#define SEC_DATA 0x040 |
#define SEC_DATA 0x020 |
1086 |
|
|
1087 |
/* The section will reside in ROM. */ |
/* The section will reside in ROM. */ |
1088 |
#define SEC_ROM 0x080 |
#define SEC_ROM 0x040 |
1089 |
|
|
1090 |
/* The section contains constructor information. This section |
/* The section contains constructor information. This section |
1091 |
type is used by the linker to create lists of constructors and |
type is used by the linker to create lists of constructors and |
1097 |
sections called <<__CTOR_LIST__>> and relocate the data |
sections called <<__CTOR_LIST__>> and relocate the data |
1098 |
contained within - exactly the operations it would peform on |
contained within - exactly the operations it would peform on |
1099 |
standard data. */ |
standard data. */ |
1100 |
#define SEC_CONSTRUCTOR 0x100 |
#define SEC_CONSTRUCTOR 0x080 |
1101 |
|
|
1102 |
/* The section has contents - a data section could be |
/* The section has contents - a data section could be |
1103 |
<<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be |
<<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be |
1104 |
<<SEC_HAS_CONTENTS>> */ |
<<SEC_HAS_CONTENTS>> */ |
1105 |
#define SEC_HAS_CONTENTS 0x200 |
#define SEC_HAS_CONTENTS 0x100 |
1106 |
|
|
1107 |
/* An instruction to the linker to not output the section |
/* An instruction to the linker to not output the section |
1108 |
even if it has information which would normally be written. */ |
even if it has information which would normally be written. */ |
1109 |
#define SEC_NEVER_LOAD 0x400 |
#define SEC_NEVER_LOAD 0x200 |
|
|
|
|
/* The section is a COFF shared library section. This flag is |
|
|
only for the linker. If this type of section appears in |
|
|
the input file, the linker must copy it to the output file |
|
|
without changing the vma or size. FIXME: Although this |
|
|
was originally intended to be general, it really is COFF |
|
|
specific (and the flag was renamed to indicate this). It |
|
|
might be cleaner to have some more general mechanism to |
|
|
allow the back end to control what the linker does with |
|
|
sections. */ |
|
|
#define SEC_COFF_SHARED_LIBRARY 0x800 |
|
1110 |
|
|
1111 |
/* The section contains thread local data. */ |
/* The section contains thread local data. */ |
1112 |
#define SEC_THREAD_LOCAL 0x1000 |
#define SEC_THREAD_LOCAL 0x400 |
1113 |
|
|
1114 |
/* The section has GOT references. This flag is only for the |
/* The section has GOT references. This flag is only for the |
1115 |
linker, and is currently only used by the elf32-hppa back end. |
linker, and is currently only used by the elf32-hppa back end. |
1117 |
in this section, which indicate to the linker that the section |
in this section, which indicate to the linker that the section |
1118 |
contains PIC code, and must be handled specially when doing a |
contains PIC code, and must be handled specially when doing a |
1119 |
static link. */ |
static link. */ |
1120 |
#define SEC_HAS_GOT_REF 0x4000 |
#define SEC_HAS_GOT_REF 0x800 |
1121 |
|
|
1122 |
/* The section contains common symbols (symbols may be defined |
/* The section contains common symbols (symbols may be defined |
1123 |
multiple times, the value of a symbol is the amount of |
multiple times, the value of a symbol is the amount of |
1124 |
space it requires, and the largest symbol value is the one |
space it requires, and the largest symbol value is the one |
1125 |
used). Most targets have exactly one of these (which we |
used). Most targets have exactly one of these (which we |
1126 |
translate to bfd_com_section_ptr), but ECOFF has two. */ |
translate to bfd_com_section_ptr), but ECOFF has two. */ |
1127 |
#define SEC_IS_COMMON 0x8000 |
#define SEC_IS_COMMON 0x1000 |
1128 |
|
|
1129 |
/* The section contains only debugging information. For |
/* The section contains only debugging information. For |
1130 |
example, this is set for ELF .debug and .stab sections. |
example, this is set for ELF .debug and .stab sections. |
1131 |
strip tests this flag to see if a section can be |
strip tests this flag to see if a section can be |
1132 |
discarded. */ |
discarded. */ |
1133 |
#define SEC_DEBUGGING 0x10000 |
#define SEC_DEBUGGING 0x2000 |
1134 |
|
|
1135 |
/* The contents of this section are held in memory pointed to |
/* The contents of this section are held in memory pointed to |
1136 |
by the contents field. This is checked by bfd_get_section_contents, |
by the contents field. This is checked by bfd_get_section_contents, |
1137 |
and the data is retrieved from memory if appropriate. */ |
and the data is retrieved from memory if appropriate. */ |
1138 |
#define SEC_IN_MEMORY 0x20000 |
#define SEC_IN_MEMORY 0x4000 |
1139 |
|
|
1140 |
/* The contents of this section are to be excluded by the |
/* The contents of this section are to be excluded by the |
1141 |
linker for executable and shared objects unless those |
linker for executable and shared objects unless those |
1142 |
objects are to be further relocated. */ |
objects are to be further relocated. */ |
1143 |
#define SEC_EXCLUDE 0x40000 |
#define SEC_EXCLUDE 0x8000 |
1144 |
|
|
1145 |
/* The contents of this section are to be sorted based on the sum of |
/* The contents of this section are to be sorted based on the sum of |
1146 |
the symbol and addend values specified by the associated relocation |
the symbol and addend values specified by the associated relocation |
1147 |
entries. Entries without associated relocation entries will be |
entries. Entries without associated relocation entries will be |
1148 |
appended to the end of the section in an unspecified order. */ |
appended to the end of the section in an unspecified order. */ |
1149 |
#define SEC_SORT_ENTRIES 0x80000 |
#define SEC_SORT_ENTRIES 0x10000 |
1150 |
|
|
1151 |
/* When linking, duplicate sections of the same name should be |
/* When linking, duplicate sections of the same name should be |
1152 |
discarded, rather than being combined into a single section as |
discarded, rather than being combined into a single section as |
1153 |
is usually done. This is similar to how common symbols are |
is usually done. This is similar to how common symbols are |
1154 |
handled. See SEC_LINK_DUPLICATES below. */ |
handled. See SEC_LINK_DUPLICATES below. */ |
1155 |
#define SEC_LINK_ONCE 0x100000 |
#define SEC_LINK_ONCE 0x20000 |
1156 |
|
|
1157 |
/* If SEC_LINK_ONCE is set, this bitfield describes how the linker |
/* If SEC_LINK_ONCE is set, this bitfield describes how the linker |
1158 |
should handle duplicate sections. */ |
should handle duplicate sections. */ |
1159 |
#define SEC_LINK_DUPLICATES 0x600000 |
#define SEC_LINK_DUPLICATES 0x40000 |
1160 |
|
|
1161 |
/* This value for SEC_LINK_DUPLICATES means that duplicate |
/* This value for SEC_LINK_DUPLICATES means that duplicate |
1162 |
sections with the same name should simply be discarded. */ |
sections with the same name should simply be discarded. */ |
1165 |
/* This value for SEC_LINK_DUPLICATES means that the linker |
/* This value for SEC_LINK_DUPLICATES means that the linker |
1166 |
should warn if there are any duplicate sections, although |
should warn if there are any duplicate sections, although |
1167 |
it should still only link one copy. */ |
it should still only link one copy. */ |
1168 |
#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000 |
#define SEC_LINK_DUPLICATES_ONE_ONLY 0x80000 |
1169 |
|
|
1170 |
/* This value for SEC_LINK_DUPLICATES means that the linker |
/* This value for SEC_LINK_DUPLICATES means that the linker |
1171 |
should warn if any duplicate sections are a different size. */ |
should warn if any duplicate sections are a different size. */ |
1172 |
#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000 |
#define SEC_LINK_DUPLICATES_SAME_SIZE 0x100000 |
1173 |
|
|
1174 |
/* This value for SEC_LINK_DUPLICATES means that the linker |
/* This value for SEC_LINK_DUPLICATES means that the linker |
1175 |
should warn if any duplicate sections contain different |
should warn if any duplicate sections contain different |
1176 |
contents. */ |
contents. */ |
1177 |
#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000 |
#define SEC_LINK_DUPLICATES_SAME_CONTENTS \ |
1178 |
|
(SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE) |
1179 |
|
|
1180 |
/* This section was created by the linker as part of dynamic |
/* This section was created by the linker as part of dynamic |
1181 |
relocation or other arcane processing. It is skipped when |
relocation or other arcane processing. It is skipped when |
1182 |
going through the first-pass output, trusting that someone |
going through the first-pass output, trusting that someone |
1183 |
else up the line will take care of it later. */ |
else up the line will take care of it later. */ |
1184 |
#define SEC_LINKER_CREATED 0x800000 |
#define SEC_LINKER_CREATED 0x200000 |
1185 |
|
|
1186 |
/* This section should not be subject to garbage collection. */ |
/* This section should not be subject to garbage collection. */ |
1187 |
#define SEC_KEEP 0x1000000 |
#define SEC_KEEP 0x400000 |
1188 |
|
|
1189 |
/* This section contains "short" data, and should be placed |
/* This section contains "short" data, and should be placed |
1190 |
"near" the GP. */ |
"near" the GP. */ |
1191 |
#define SEC_SMALL_DATA 0x2000000 |
#define SEC_SMALL_DATA 0x800000 |
|
|
|
|
/* This section contains data which may be shared with other |
|
|
executables or shared objects. */ |
|
|
#define SEC_SHARED 0x4000000 |
|
|
|
|
|
/* When a section with this flag is being linked, then if the size of |
|
|
the input section is less than a page, it should not cross a page |
|
|
boundary. If the size of the input section is one page or more, it |
|
|
should be aligned on a page boundary. */ |
|
|
#define SEC_BLOCK 0x8000000 |
|
|
|
|
|
/* Conditionally link this section; do not link if there are no |
|
|
references found to any symbol in the section. */ |
|
|
#define SEC_CLINK 0x10000000 |
|
1192 |
|
|
1193 |
/* Attempt to merge identical entities in the section. |
/* Attempt to merge identical entities in the section. |
1194 |
Entity size is given in the entsize field. */ |
Entity size is given in the entsize field. */ |
1195 |
#define SEC_MERGE 0x20000000 |
#define SEC_MERGE 0x1000000 |
1196 |
|
|
1197 |
/* If given with SEC_MERGE, entities to merge are zero terminated |
/* If given with SEC_MERGE, entities to merge are zero terminated |
1198 |
strings where entsize specifies character size instead of fixed |
strings where entsize specifies character size instead of fixed |
1199 |
size entries. */ |
size entries. */ |
1200 |
#define SEC_STRINGS 0x40000000 |
#define SEC_STRINGS 0x2000000 |
1201 |
|
|
1202 |
/* This section contains data about section groups. */ |
/* This section contains data about section groups. */ |
1203 |
#define SEC_GROUP 0x80000000 |
#define SEC_GROUP 0x4000000 |
1204 |
|
|
1205 |
|
/* The section is a COFF shared library section. This flag is |
1206 |
|
only for the linker. If this type of section appears in |
1207 |
|
the input file, the linker must copy it to the output file |
1208 |
|
without changing the vma or size. FIXME: Although this |
1209 |
|
was originally intended to be general, it really is COFF |
1210 |
|
specific (and the flag was renamed to indicate this). It |
1211 |
|
might be cleaner to have some more general mechanism to |
1212 |
|
allow the back end to control what the linker does with |
1213 |
|
sections. */ |
1214 |
|
#define SEC_COFF_SHARED_LIBRARY 0x10000000 |
1215 |
|
|
1216 |
|
/* This section contains data which may be shared with other |
1217 |
|
executables or shared objects. This is for COFF only. */ |
1218 |
|
#define SEC_COFF_SHARED 0x20000000 |
1219 |
|
|
1220 |
|
/* When a section with this flag is being linked, then if the size of |
1221 |
|
the input section is less than a page, it should not cross a page |
1222 |
|
boundary. If the size of the input section is one page or more, |
1223 |
|
it should be aligned on a page boundary. This is for TI |
1224 |
|
TMS320C54X only. */ |
1225 |
|
#define SEC_TIC54X_BLOCK 0x40000000 |
1226 |
|
|
1227 |
|
/* Conditionally link this section; do not link if there are no |
1228 |
|
references found to any symbol in the section. This is for TI |
1229 |
|
TMS320C54X only. */ |
1230 |
|
#define SEC_TIC54X_CLINK 0x80000000 |
1231 |
|
|
1232 |
/* End of section flags. */ |
/* End of section flags. */ |
1233 |
|
|
1236 |
/* See the vma field. */ |
/* See the vma field. */ |
1237 |
unsigned int user_set_vma : 1; |
unsigned int user_set_vma : 1; |
1238 |
|
|
|
/* Whether relocations have been processed. */ |
|
|
unsigned int reloc_done : 1; |
|
|
|
|
1239 |
/* A mark flag used by some of the linker backends. */ |
/* A mark flag used by some of the linker backends. */ |
1240 |
unsigned int linker_mark : 1; |
unsigned int linker_mark : 1; |
1241 |
|
|
1246 |
/* A mark flag used by some linker backends for garbage collection. */ |
/* A mark flag used by some linker backends for garbage collection. */ |
1247 |
unsigned int gc_mark : 1; |
unsigned int gc_mark : 1; |
1248 |
|
|
1249 |
/* Used by the ELF code to mark sections which have been allocated |
/* The following flags are used by the ELF linker. */ |
1250 |
to segments. */ |
|
1251 |
|
/* Mark sections which have been allocated to segments. */ |
1252 |
unsigned int segment_mark : 1; |
unsigned int segment_mark : 1; |
1253 |
|
|
1254 |
|
/* Type of sec_info information. */ |
1255 |
|
unsigned int sec_info_type:3; |
1256 |
|
#define ELF_INFO_TYPE_NONE 0 |
1257 |
|
#define ELF_INFO_TYPE_STABS 1 |
1258 |
|
#define ELF_INFO_TYPE_MERGE 2 |
1259 |
|
#define ELF_INFO_TYPE_EH_FRAME 3 |
1260 |
|
#define ELF_INFO_TYPE_JUST_SYMS 4 |
1261 |
|
|
1262 |
|
/* Nonzero if this section uses RELA relocations, rather than REL. */ |
1263 |
|
unsigned int use_rela_p:1; |
1264 |
|
|
1265 |
|
/* Bits used by various backends. The generic code doesn't touch |
1266 |
|
these fields. */ |
1267 |
|
|
1268 |
|
/* Nonzero if this section has TLS related relocations. */ |
1269 |
|
unsigned int has_tls_reloc:1; |
1270 |
|
|
1271 |
|
/* Nonzero if this section has a gp reloc. */ |
1272 |
|
unsigned int has_gp_reloc:1; |
1273 |
|
|
1274 |
|
/* Nonzero if this section needs the relax finalize pass. */ |
1275 |
|
unsigned int need_finalize_relax:1; |
1276 |
|
|
1277 |
|
/* Whether relocations have been processed. */ |
1278 |
|
unsigned int reloc_done : 1; |
1279 |
|
|
1280 |
/* End of internal packed boolean fields. */ |
/* End of internal packed boolean fields. */ |
1281 |
|
|
1282 |
/* The virtual memory address of the section - where it will be |
/* The virtual memory address of the section - where it will be |
1294 |
|
|
1295 |
/* The size of the section in octets, as it will be output. |
/* The size of the section in octets, as it will be output. |
1296 |
Contains a value even if the section has no contents (e.g., the |
Contains a value even if the section has no contents (e.g., the |
1297 |
size of <<.bss>>). This will be filled in after relocation. */ |
size of <<.bss>>). */ |
1298 |
bfd_size_type _cooked_size; |
bfd_size_type size; |
1299 |
|
|
1300 |
/* The original size on disk of the section, in octets. Normally this |
/* For input sections, the original size on disk of the section, in |
1301 |
value is the same as the size, but if some relaxing has |
octets. This field is used by the linker relaxation code. It is |
1302 |
been done, then this value will be bigger. */ |
currently only set for sections where the linker relaxation scheme |
1303 |
bfd_size_type _raw_size; |
doesn't cache altered section and reloc contents (stabs, eh_frame, |
1304 |
|
SEC_MERGE, some coff relaxing targets), and thus the original size |
1305 |
|
needs to be kept to read the section multiple times. |
1306 |
|
For output sections, rawsize holds the section size calculated on |
1307 |
|
a previous linker relaxation pass. */ |
1308 |
|
bfd_size_type rawsize; |
1309 |
|
|
1310 |
/* If this section is going to be output, then this value is the |
/* If this section is going to be output, then this value is the |
1311 |
offset in *bytes* into the output section of the first byte in the |
offset in *bytes* into the output section of the first byte in the |
1317 |
bfd_vma output_offset; |
bfd_vma output_offset; |
1318 |
|
|
1319 |
/* The output section through which to map on output. */ |
/* The output section through which to map on output. */ |
1320 |
struct sec *output_section; |
struct bfd_section *output_section; |
1321 |
|
|
1322 |
/* The alignment requirement of the section, as an exponent of 2 - |
/* The alignment requirement of the section, as an exponent of 2 - |
1323 |
e.g., 3 aligns to 2^3 (or 8). */ |
e.g., 3 aligns to 2^3 (or 8). */ |
1347 |
file_ptr line_filepos; |
file_ptr line_filepos; |
1348 |
|
|
1349 |
/* Pointer to data for applications. */ |
/* Pointer to data for applications. */ |
1350 |
PTR userdata; |
void *userdata; |
1351 |
|
|
1352 |
/* If the SEC_IN_MEMORY flag is set, this points to the actual |
/* If the SEC_IN_MEMORY flag is set, this points to the actual |
1353 |
contents. */ |
contents. */ |
1362 |
/* Entity size for merging purposes. */ |
/* Entity size for merging purposes. */ |
1363 |
unsigned int entsize; |
unsigned int entsize; |
1364 |
|
|
1365 |
/* Optional information about a COMDAT entry; NULL if not COMDAT. */ |
/* Points to the kept section if this section is a link-once section, |
1366 |
struct bfd_comdat_info *comdat; |
and is discarded. */ |
1367 |
|
struct bfd_section *kept_section; |
1368 |
|
|
1369 |
/* When a section is being output, this value changes as more |
/* When a section is being output, this value changes as more |
1370 |
linenumbers are written out. */ |
linenumbers are written out. */ |
1373 |
/* What the section number is in the target world. */ |
/* What the section number is in the target world. */ |
1374 |
int target_index; |
int target_index; |
1375 |
|
|
1376 |
PTR used_by_bfd; |
void *used_by_bfd; |
1377 |
|
|
1378 |
/* If this is a constructor section then here is a list of the |
/* If this is a constructor section then here is a list of the |
1379 |
relocations created to relocate items within it. */ |
relocations created to relocate items within it. */ |
1383 |
bfd *owner; |
bfd *owner; |
1384 |
|
|
1385 |
/* A symbol which points at this section only. */ |
/* A symbol which points at this section only. */ |
1386 |
struct symbol_cache_entry *symbol; |
struct bfd_symbol *symbol; |
1387 |
struct symbol_cache_entry **symbol_ptr_ptr; |
struct bfd_symbol **symbol_ptr_ptr; |
1388 |
|
|
1389 |
struct bfd_link_order *link_order_head; |
struct bfd_link_order *link_order_head; |
1390 |
struct bfd_link_order *link_order_tail; |
struct bfd_link_order *link_order_tail; |
1401 |
#define BFD_IND_SECTION_NAME "*IND*" |
#define BFD_IND_SECTION_NAME "*IND*" |
1402 |
|
|
1403 |
/* The absolute section. */ |
/* The absolute section. */ |
1404 |
extern const asection bfd_abs_section; |
extern asection bfd_abs_section; |
1405 |
#define bfd_abs_section_ptr ((asection *) &bfd_abs_section) |
#define bfd_abs_section_ptr ((asection *) &bfd_abs_section) |
1406 |
#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) |
#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) |
1407 |
/* Pointer to the undefined section. */ |
/* Pointer to the undefined section. */ |
1408 |
extern const asection bfd_und_section; |
extern asection bfd_und_section; |
1409 |
#define bfd_und_section_ptr ((asection *) &bfd_und_section) |
#define bfd_und_section_ptr ((asection *) &bfd_und_section) |
1410 |
#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) |
#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) |
1411 |
/* Pointer to the common section. */ |
/* Pointer to the common section. */ |
1412 |
extern const asection bfd_com_section; |
extern asection bfd_com_section; |
1413 |
#define bfd_com_section_ptr ((asection *) &bfd_com_section) |
#define bfd_com_section_ptr ((asection *) &bfd_com_section) |
1414 |
/* Pointer to the indirect section. */ |
/* Pointer to the indirect section. */ |
1415 |
extern const asection bfd_ind_section; |
extern asection bfd_ind_section; |
1416 |
#define bfd_ind_section_ptr ((asection *) &bfd_ind_section) |
#define bfd_ind_section_ptr ((asection *) &bfd_ind_section) |
1417 |
#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) |
#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) |
1418 |
|
|
1422 |
|| ((SEC) == bfd_com_section_ptr) \ |
|| ((SEC) == bfd_com_section_ptr) \ |
1423 |
|| ((SEC) == bfd_ind_section_ptr)) |
|| ((SEC) == bfd_ind_section_ptr)) |
1424 |
|
|
1425 |
extern const struct symbol_cache_entry * const bfd_abs_symbol; |
extern const struct bfd_symbol * const bfd_abs_symbol; |
1426 |
extern const struct symbol_cache_entry * const bfd_com_symbol; |
extern const struct bfd_symbol * const bfd_com_symbol; |
1427 |
extern const struct symbol_cache_entry * const bfd_und_symbol; |
extern const struct bfd_symbol * const bfd_und_symbol; |
1428 |
extern const struct symbol_cache_entry * const bfd_ind_symbol; |
extern const struct bfd_symbol * const bfd_ind_symbol; |
|
#define bfd_get_section_size_before_reloc(section) \ |
|
|
((section)->reloc_done ? (abort (), (bfd_size_type) 1) \ |
|
|
: (section)->_raw_size) |
|
|
#define bfd_get_section_size_after_reloc(section) \ |
|
|
((section)->reloc_done ? (section)->_cooked_size \ |
|
|
: (abort (), (bfd_size_type) 1)) |
|
1429 |
|
|
1430 |
/* Macros to handle insertion and deletion of a bfd's sections. These |
/* Macros to handle insertion and deletion of a bfd's sections. These |
1431 |
only handle the list pointers, ie. do not adjust section_count, |
only handle the list pointers, ie. do not adjust section_count, |
1452 |
} \ |
} \ |
1453 |
while (0) |
while (0) |
1454 |
|
|
1455 |
void |
void bfd_section_list_clear (bfd *); |
1456 |
bfd_section_list_clear PARAMS ((bfd *)); |
|
1457 |
|
asection *bfd_get_section_by_name (bfd *abfd, const char *name); |
1458 |
|
|
1459 |
|
asection *bfd_get_section_by_name_if |
1460 |
|
(bfd *abfd, |
1461 |
|
const char *name, |
1462 |
|
bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj), |
1463 |
|
void *obj); |
1464 |
|
|
1465 |
|
char *bfd_get_unique_section_name |
1466 |
|
(bfd *abfd, const char *templat, int *count); |
1467 |
|
|
1468 |
|
asection *bfd_make_section_old_way (bfd *abfd, const char *name); |
1469 |
|
|
1470 |
|
asection *bfd_make_section_anyway (bfd *abfd, const char *name); |
1471 |
|
|
1472 |
|
asection *bfd_make_section (bfd *, const char *name); |
1473 |
|
|
1474 |
|
bfd_boolean bfd_set_section_flags |
1475 |
|
(bfd *abfd, asection *sec, flagword flags); |
1476 |
|
|
1477 |
|
void bfd_map_over_sections |
1478 |
|
(bfd *abfd, |
1479 |
|
void (*func) (bfd *abfd, asection *sect, void *obj), |
1480 |
|
void *obj); |
1481 |
|
|
1482 |
asection * |
asection *bfd_sections_find_if |
1483 |
bfd_get_section_by_name PARAMS ((bfd *abfd, const char *name)); |
(bfd *abfd, |
1484 |
|
bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), |
1485 |
|
void *obj); |
1486 |
|
|
1487 |
char * |
bfd_boolean bfd_set_section_size |
1488 |
bfd_get_unique_section_name PARAMS ((bfd *abfd, |
(bfd *abfd, asection *sec, bfd_size_type val); |
1489 |
const char *templat, |
|
1490 |
int *count)); |
bfd_boolean bfd_set_section_contents |
1491 |
|
(bfd *abfd, asection *section, const void *data, |
1492 |
asection * |
file_ptr offset, bfd_size_type count); |
1493 |
bfd_make_section_old_way PARAMS ((bfd *abfd, const char *name)); |
|
1494 |
|
bfd_boolean bfd_get_section_contents |
1495 |
asection * |
(bfd *abfd, asection *section, void *location, file_ptr offset, |
1496 |
bfd_make_section_anyway PARAMS ((bfd *abfd, const char *name)); |
bfd_size_type count); |
1497 |
|
|
1498 |
asection * |
bfd_boolean bfd_malloc_and_get_section |
1499 |
bfd_make_section PARAMS ((bfd *, const char *name)); |
(bfd *abfd, asection *section, bfd_byte **buf); |
1500 |
|
|
1501 |
boolean |
bfd_boolean bfd_copy_private_section_data |
1502 |
bfd_set_section_flags PARAMS ((bfd *abfd, asection *sec, flagword flags)); |
(bfd *ibfd, asection *isec, bfd *obfd, asection *osec); |
|
|
|
|
void |
|
|
bfd_map_over_sections PARAMS ((bfd *abfd, |
|
|
void (*func) (bfd *abfd, |
|
|
asection *sect, |
|
|
PTR obj), |
|
|
PTR obj)); |
|
|
|
|
|
boolean |
|
|
bfd_set_section_size PARAMS ((bfd *abfd, asection *sec, bfd_size_type val)); |
|
|
|
|
|
boolean |
|
|
bfd_set_section_contents PARAMS ((bfd *abfd, asection *section, |
|
|
PTR data, file_ptr offset, |
|
|
bfd_size_type count)); |
|
|
|
|
|
boolean |
|
|
bfd_get_section_contents PARAMS ((bfd *abfd, asection *section, |
|
|
PTR location, file_ptr offset, |
|
|
bfd_size_type count)); |
|
|
|
|
|
boolean |
|
|
bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec, |
|
|
bfd *obfd, asection *osec)); |
|
1503 |
|
|
1504 |
#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ |
#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ |
1505 |
BFD_SEND (obfd, _bfd_copy_private_section_data, \ |
BFD_SEND (obfd, _bfd_copy_private_section_data, \ |
1506 |
(ibfd, isection, obfd, osection)) |
(ibfd, isection, obfd, osection)) |
1507 |
void |
void _bfd_strip_section_from_output |
1508 |
_bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section)); |
(struct bfd_link_info *info, asection *section); |
1509 |
|
|
1510 |
boolean |
bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); |
1511 |
bfd_generic_discard_group PARAMS ((bfd *abfd, asection *group)); |
|
1512 |
|
bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); |
1513 |
|
|
1514 |
/* Extracted from archures.c. */ |
/* Extracted from archures.c. */ |
1515 |
enum bfd_architecture |
enum bfd_architecture |
1529 |
#define bfd_mach_mcf5206e 10 |
#define bfd_mach_mcf5206e 10 |
1530 |
#define bfd_mach_mcf5307 11 |
#define bfd_mach_mcf5307 11 |
1531 |
#define bfd_mach_mcf5407 12 |
#define bfd_mach_mcf5407 12 |
1532 |
|
#define bfd_mach_mcf528x 13 |
1533 |
|
#define bfd_mach_mcfv4e 14 |
1534 |
|
#define bfd_mach_mcf521x 15 |
1535 |
|
#define bfd_mach_mcf5249 16 |
1536 |
|
#define bfd_mach_mcf547x 17 |
1537 |
|
#define bfd_mach_mcf548x 18 |
1538 |
bfd_arch_vax, /* DEC Vax */ |
bfd_arch_vax, /* DEC Vax */ |
1539 |
bfd_arch_i960, /* Intel 960 */ |
bfd_arch_i960, /* Intel 960 */ |
1540 |
/* The order of the following is important. |
/* The order of the following is important. |
1573 |
#define bfd_mach_sparc_v9_p(mach) \ |
#define bfd_mach_sparc_v9_p(mach) \ |
1574 |
((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \ |
((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \ |
1575 |
&& (mach) != bfd_mach_sparc_sparclite_le) |
&& (mach) != bfd_mach_sparc_sparclite_le) |
1576 |
|
/* Nonzero if MACH is a 64 bit sparc architecture. */ |
1577 |
|
#define bfd_mach_sparc_64bit_p(mach) \ |
1578 |
|
((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb) |
1579 |
bfd_arch_mips, /* MIPS Rxxxx */ |
bfd_arch_mips, /* MIPS Rxxxx */ |
1580 |
#define bfd_mach_mips3000 3000 |
#define bfd_mach_mips3000 3000 |
1581 |
#define bfd_mach_mips3900 3900 |
#define bfd_mach_mips3900 3900 |
1583 |
#define bfd_mach_mips4010 4010 |
#define bfd_mach_mips4010 4010 |
1584 |
#define bfd_mach_mips4100 4100 |
#define bfd_mach_mips4100 4100 |
1585 |
#define bfd_mach_mips4111 4111 |
#define bfd_mach_mips4111 4111 |
1586 |
|
#define bfd_mach_mips4120 4120 |
1587 |
#define bfd_mach_mips4300 4300 |
#define bfd_mach_mips4300 4300 |
1588 |
#define bfd_mach_mips4400 4400 |
#define bfd_mach_mips4400 4400 |
1589 |
#define bfd_mach_mips4600 4600 |
#define bfd_mach_mips4600 4600 |
1590 |
#define bfd_mach_mips4650 4650 |
#define bfd_mach_mips4650 4650 |
1591 |
#define bfd_mach_mips5000 5000 |
#define bfd_mach_mips5000 5000 |
1592 |
|
#define bfd_mach_mips5400 5400 |
1593 |
|
#define bfd_mach_mips5500 5500 |
1594 |
#define bfd_mach_mips6000 6000 |
#define bfd_mach_mips6000 6000 |
1595 |
|
#define bfd_mach_mips7000 7000 |
1596 |
#define bfd_mach_mips8000 8000 |
#define bfd_mach_mips8000 8000 |
1597 |
|
#define bfd_mach_mips9000 9000 |
1598 |
#define bfd_mach_mips10000 10000 |
#define bfd_mach_mips10000 10000 |
1599 |
#define bfd_mach_mips12000 12000 |
#define bfd_mach_mips12000 12000 |
1600 |
#define bfd_mach_mips16 16 |
#define bfd_mach_mips16 16 |
1601 |
#define bfd_mach_mips5 5 |
#define bfd_mach_mips5 5 |
1602 |
#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ |
#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ |
1603 |
#define bfd_mach_mipsisa32 32 |
#define bfd_mach_mipsisa32 32 |
1604 |
|
#define bfd_mach_mipsisa32r2 33 |
1605 |
#define bfd_mach_mipsisa64 64 |
#define bfd_mach_mipsisa64 64 |
1606 |
|
#define bfd_mach_mipsisa64r2 65 |
1607 |
bfd_arch_i386, /* Intel 386 */ |
bfd_arch_i386, /* Intel 386 */ |
1608 |
#define bfd_mach_i386_i386 0 |
#define bfd_mach_i386_i386 1 |
1609 |
#define bfd_mach_i386_i8086 1 |
#define bfd_mach_i386_i8086 2 |
1610 |
#define bfd_mach_i386_i386_intel_syntax 2 |
#define bfd_mach_i386_i386_intel_syntax 3 |
1611 |
#define bfd_mach_x86_64 3 |
#define bfd_mach_x86_64 64 |
1612 |
#define bfd_mach_x86_64_intel_syntax 4 |
#define bfd_mach_x86_64_intel_syntax 65 |
1613 |
bfd_arch_we32k, /* AT&T WE32xxx */ |
bfd_arch_we32k, /* AT&T WE32xxx */ |
1614 |
bfd_arch_tahoe, /* CCI/Harris Tahoe */ |
bfd_arch_tahoe, /* CCI/Harris Tahoe */ |
1615 |
bfd_arch_i860, /* Intel 860 */ |
bfd_arch_i860, /* Intel 860 */ |
1618 |
bfd_arch_alliant, /* Alliant */ |
bfd_arch_alliant, /* Alliant */ |
1619 |
bfd_arch_convex, /* Convex */ |
bfd_arch_convex, /* Convex */ |
1620 |
bfd_arch_m88k, /* Motorola 88xxx */ |
bfd_arch_m88k, /* Motorola 88xxx */ |
1621 |
|
bfd_arch_m98k, /* Motorola 98xxx */ |
1622 |
bfd_arch_pyramid, /* Pyramid Technology */ |
bfd_arch_pyramid, /* Pyramid Technology */ |
1623 |
bfd_arch_h8300, /* Hitachi H8/300 */ |
bfd_arch_h8300, /* Renesas H8/300 (formerly Hitachi H8/300) */ |
1624 |
#define bfd_mach_h8300 1 |
#define bfd_mach_h8300 1 |
1625 |
#define bfd_mach_h8300h 2 |
#define bfd_mach_h8300h 2 |
1626 |
#define bfd_mach_h8300s 3 |
#define bfd_mach_h8300s 3 |
1627 |
|
#define bfd_mach_h8300hn 4 |
1628 |
|
#define bfd_mach_h8300sn 5 |
1629 |
|
#define bfd_mach_h8300sx 6 |
1630 |
|
#define bfd_mach_h8300sxn 7 |
1631 |
bfd_arch_pdp11, /* DEC PDP-11 */ |
bfd_arch_pdp11, /* DEC PDP-11 */ |
1632 |
bfd_arch_powerpc, /* PowerPC */ |
bfd_arch_powerpc, /* PowerPC */ |
1633 |
#define bfd_mach_ppc 0 |
#define bfd_mach_ppc 32 |
1634 |
#define bfd_mach_ppc64 1 |
#define bfd_mach_ppc64 64 |
1635 |
#define bfd_mach_ppc_403 403 |
#define bfd_mach_ppc_403 403 |
1636 |
#define bfd_mach_ppc_403gc 4030 |
#define bfd_mach_ppc_403gc 4030 |
1637 |
#define bfd_mach_ppc_505 505 |
#define bfd_mach_ppc_505 505 |
1648 |
#define bfd_mach_ppc_rs64ii 642 |
#define bfd_mach_ppc_rs64ii 642 |
1649 |
#define bfd_mach_ppc_rs64iii 643 |
#define bfd_mach_ppc_rs64iii 643 |
1650 |
#define bfd_mach_ppc_7400 7400 |
#define bfd_mach_ppc_7400 7400 |
1651 |
|
#define bfd_mach_ppc_e500 500 |
1652 |
bfd_arch_rs6000, /* IBM RS/6000 */ |
bfd_arch_rs6000, /* IBM RS/6000 */ |
1653 |
#define bfd_mach_rs6k 0 |
#define bfd_mach_rs6k 6000 |
1654 |
#define bfd_mach_rs6k_rs1 6001 |
#define bfd_mach_rs6k_rs1 6001 |
1655 |
#define bfd_mach_rs6k_rsc 6003 |
#define bfd_mach_rs6k_rsc 6003 |
1656 |
#define bfd_mach_rs6k_rs2 6002 |
#define bfd_mach_rs6k_rs2 6002 |
1657 |
bfd_arch_hppa, /* HP PA RISC */ |
bfd_arch_hppa, /* HP PA RISC */ |
1658 |
|
#define bfd_mach_hppa10 10 |
1659 |
|
#define bfd_mach_hppa11 11 |
1660 |
|
#define bfd_mach_hppa20 20 |
1661 |
|
#define bfd_mach_hppa20w 25 |
1662 |
bfd_arch_d10v, /* Mitsubishi D10V */ |
bfd_arch_d10v, /* Mitsubishi D10V */ |
1663 |
#define bfd_mach_d10v 0 |
#define bfd_mach_d10v 1 |
1664 |
#define bfd_mach_d10v_ts2 2 |
#define bfd_mach_d10v_ts2 2 |
1665 |
#define bfd_mach_d10v_ts3 3 |
#define bfd_mach_d10v_ts3 3 |
1666 |
bfd_arch_d30v, /* Mitsubishi D30V */ |
bfd_arch_d30v, /* Mitsubishi D30V */ |
1667 |
bfd_arch_dlx, /* DLX */ |
bfd_arch_dlx, /* DLX */ |
1668 |
bfd_arch_m68hc11, /* Motorola 68HC11 */ |
bfd_arch_m68hc11, /* Motorola 68HC11 */ |
1669 |
bfd_arch_m68hc12, /* Motorola 68HC12 */ |
bfd_arch_m68hc12, /* Motorola 68HC12 */ |
1670 |
|
#define bfd_mach_m6812_default 0 |
1671 |
|
#define bfd_mach_m6812 1 |
1672 |
|
#define bfd_mach_m6812s 2 |
1673 |
bfd_arch_z8k, /* Zilog Z8000 */ |
bfd_arch_z8k, /* Zilog Z8000 */ |
1674 |
#define bfd_mach_z8001 1 |
#define bfd_mach_z8001 1 |
1675 |
#define bfd_mach_z8002 2 |
#define bfd_mach_z8002 2 |
1676 |
bfd_arch_h8500, /* Hitachi H8/500 */ |
bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ |
1677 |
bfd_arch_sh, /* Hitachi SH */ |
bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ |
1678 |
#define bfd_mach_sh 0 |
#define bfd_mach_sh 1 |
1679 |
#define bfd_mach_sh2 0x20 |
#define bfd_mach_sh2 0x20 |
1680 |
#define bfd_mach_sh_dsp 0x2d |
#define bfd_mach_sh_dsp 0x2d |
1681 |
|
#define bfd_mach_sh2a 0x2a |
1682 |
|
#define bfd_mach_sh2a_nofpu 0x2b |
1683 |
|
#define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 |
1684 |
|
#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 |
1685 |
|
#define bfd_mach_sh2a_or_sh4 0x2a3 |
1686 |
|
#define bfd_mach_sh2a_or_sh3e 0x2a4 |
1687 |
|
#define bfd_mach_sh2e 0x2e |
1688 |
#define bfd_mach_sh3 0x30 |
#define bfd_mach_sh3 0x30 |
1689 |
|
#define bfd_mach_sh3_nommu 0x31 |
1690 |
#define bfd_mach_sh3_dsp 0x3d |
#define bfd_mach_sh3_dsp 0x3d |
1691 |
#define bfd_mach_sh3e 0x3e |
#define bfd_mach_sh3e 0x3e |
1692 |
#define bfd_mach_sh4 0x40 |
#define bfd_mach_sh4 0x40 |
1693 |
|
#define bfd_mach_sh4_nofpu 0x41 |
1694 |
|
#define bfd_mach_sh4_nommu_nofpu 0x42 |
1695 |
|
#define bfd_mach_sh4a 0x4a |
1696 |
|
#define bfd_mach_sh4a_nofpu 0x4b |
1697 |
|
#define bfd_mach_sh4al_dsp 0x4d |
1698 |
#define bfd_mach_sh5 0x50 |
#define bfd_mach_sh5 0x50 |
1699 |
bfd_arch_alpha, /* Dec Alpha */ |
bfd_arch_alpha, /* Dec Alpha */ |
1700 |
#define bfd_mach_alpha_ev4 0x10 |
#define bfd_mach_alpha_ev4 0x10 |
1701 |
#define bfd_mach_alpha_ev5 0x20 |
#define bfd_mach_alpha_ev5 0x20 |
1702 |
#define bfd_mach_alpha_ev6 0x30 |
#define bfd_mach_alpha_ev6 0x30 |
1703 |
bfd_arch_arm, /* Advanced Risc Machines ARM. */ |
bfd_arch_arm, /* Advanced Risc Machines ARM. */ |
1704 |
|
#define bfd_mach_arm_unknown 0 |
1705 |
#define bfd_mach_arm_2 1 |
#define bfd_mach_arm_2 1 |
1706 |
#define bfd_mach_arm_2a 2 |
#define bfd_mach_arm_2a 2 |
1707 |
#define bfd_mach_arm_3 3 |
#define bfd_mach_arm_3 3 |
1712 |
#define bfd_mach_arm_5T 8 |
#define bfd_mach_arm_5T 8 |
1713 |
#define bfd_mach_arm_5TE 9 |
#define bfd_mach_arm_5TE 9 |
1714 |
#define bfd_mach_arm_XScale 10 |
#define bfd_mach_arm_XScale 10 |
1715 |
|
#define bfd_mach_arm_ep9312 11 |
1716 |
|
#define bfd_mach_arm_iWMMXt 12 |
1717 |
bfd_arch_ns32k, /* National Semiconductors ns32000 */ |
bfd_arch_ns32k, /* National Semiconductors ns32000 */ |
1718 |
bfd_arch_w65, /* WDC 65816 */ |
bfd_arch_w65, /* WDC 65816 */ |
1719 |
bfd_arch_tic30, /* Texas Instruments TMS320C30 */ |
bfd_arch_tic30, /* Texas Instruments TMS320C30 */ |
1720 |
|
bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ |
1721 |
|
#define bfd_mach_tic3x 30 |
1722 |
|
#define bfd_mach_tic4x 40 |
1723 |
bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ |
bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ |
1724 |
bfd_arch_tic80, /* TI TMS320c80 (MVP) */ |
bfd_arch_tic80, /* TI TMS320c80 (MVP) */ |
1725 |
bfd_arch_v850, /* NEC V850 */ |
bfd_arch_v850, /* NEC V850 */ |
1726 |
#define bfd_mach_v850 0 |
#define bfd_mach_v850 1 |
1727 |
#define bfd_mach_v850e 'E' |
#define bfd_mach_v850e 'E' |
1728 |
#define bfd_mach_v850ea 'A' |
#define bfd_mach_v850e1 '1' |
1729 |
bfd_arch_arc, /* ARC Cores */ |
bfd_arch_arc, /* ARC Cores */ |
1730 |
#define bfd_mach_arc_5 0 |
#define bfd_mach_arc_5 5 |
1731 |
#define bfd_mach_arc_6 1 |
#define bfd_mach_arc_6 6 |
1732 |
#define bfd_mach_arc_7 2 |
#define bfd_mach_arc_7 7 |
1733 |
#define bfd_mach_arc_8 3 |
#define bfd_mach_arc_8 8 |
1734 |
bfd_arch_m32r, /* Mitsubishi M32R/D */ |
bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ |
1735 |
#define bfd_mach_m32r 0 /* For backwards compatibility. */ |
#define bfd_mach_m32r 1 /* For backwards compatibility. */ |
1736 |
#define bfd_mach_m32rx 'x' |
#define bfd_mach_m32rx 'x' |
1737 |
|
#define bfd_mach_m32r2 '2' |
1738 |
bfd_arch_mn10200, /* Matsushita MN10200 */ |
bfd_arch_mn10200, /* Matsushita MN10200 */ |
1739 |
bfd_arch_mn10300, /* Matsushita MN10300 */ |
bfd_arch_mn10300, /* Matsushita MN10300 */ |
1740 |
#define bfd_mach_mn10300 300 |
#define bfd_mach_mn10300 300 |
1741 |
#define bfd_mach_am33 330 |
#define bfd_mach_am33 330 |
1742 |
|
#define bfd_mach_am33_2 332 |
1743 |
bfd_arch_fr30, |
bfd_arch_fr30, |
1744 |
#define bfd_mach_fr30 0x46523330 |
#define bfd_mach_fr30 0x46523330 |
1745 |
bfd_arch_frv, |
bfd_arch_frv, |
1746 |
#define bfd_mach_frv 0 |
#define bfd_mach_frv 1 |
1747 |
#define bfd_mach_frvsimple 1 |
#define bfd_mach_frvsimple 2 |
1748 |
#define bfd_mach_fr300 300 |
#define bfd_mach_fr300 300 |
1749 |
#define bfd_mach_fr400 400 |
#define bfd_mach_fr400 400 |
1750 |
|
#define bfd_mach_fr450 450 |
1751 |
#define bfd_mach_frvtomcat 499 /* fr500 prototype */ |
#define bfd_mach_frvtomcat 499 /* fr500 prototype */ |
1752 |
#define bfd_mach_fr500 500 |
#define bfd_mach_fr500 500 |
1753 |
|
#define bfd_mach_fr550 550 |
1754 |
bfd_arch_mcore, |
bfd_arch_mcore, |
1755 |
bfd_arch_ia64, /* HP/Intel ia64 */ |
bfd_arch_ia64, /* HP/Intel ia64 */ |
1756 |
#define bfd_mach_ia64_elf64 0 |
#define bfd_mach_ia64_elf64 64 |
1757 |
#define bfd_mach_ia64_elf32 1 |
#define bfd_mach_ia64_elf32 32 |
1758 |
bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ |
bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ |
1759 |
#define bfd_mach_ip2022 0 |
#define bfd_mach_ip2022 1 |
1760 |
#define bfd_mach_ip2022ext 1 |
#define bfd_mach_ip2022ext 2 |
1761 |
|
bfd_arch_iq2000, /* Vitesse IQ2000. */ |
1762 |
|
#define bfd_mach_iq2000 1 |
1763 |
|
#define bfd_mach_iq10 2 |
1764 |
bfd_arch_pj, |
bfd_arch_pj, |
1765 |
bfd_arch_avr, /* Atmel AVR microcontrollers. */ |
bfd_arch_avr, /* Atmel AVR microcontrollers. */ |
1766 |
#define bfd_mach_avr1 1 |
#define bfd_mach_avr1 1 |
1768 |
#define bfd_mach_avr3 3 |
#define bfd_mach_avr3 3 |
1769 |
#define bfd_mach_avr4 4 |
#define bfd_mach_avr4 4 |
1770 |
#define bfd_mach_avr5 5 |
#define bfd_mach_avr5 5 |
1771 |
|
bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ |
1772 |
|
#define bfd_mach_cr16c 1 |
1773 |
|
bfd_arch_crx, /* National Semiconductor CRX. */ |
1774 |
|
#define bfd_mach_crx 1 |
1775 |
bfd_arch_cris, /* Axis CRIS */ |
bfd_arch_cris, /* Axis CRIS */ |
1776 |
|
#define bfd_mach_cris_v0_v10 255 |
1777 |
|
#define bfd_mach_cris_v32 32 |
1778 |
|
#define bfd_mach_cris_v10_v32 1032 |
1779 |
bfd_arch_s390, /* IBM s390 */ |
bfd_arch_s390, /* IBM s390 */ |
1780 |
#define bfd_mach_s390_31 0 |
#define bfd_mach_s390_31 31 |
1781 |
#define bfd_mach_s390_64 1 |
#define bfd_mach_s390_64 64 |
1782 |
bfd_arch_openrisc, /* OpenRISC */ |
bfd_arch_openrisc, /* OpenRISC */ |
1783 |
bfd_arch_mmix, /* Donald Knuth's educational processor. */ |
bfd_arch_mmix, /* Donald Knuth's educational processor. */ |
1784 |
bfd_arch_xstormy16, |
bfd_arch_xstormy16, |
1785 |
#define bfd_mach_xstormy16 0 |
#define bfd_mach_xstormy16 1 |
1786 |
|
bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ |
1787 |
|
#define bfd_mach_msp11 11 |
1788 |
|
#define bfd_mach_msp110 110 |
1789 |
|
#define bfd_mach_msp12 12 |
1790 |
|
#define bfd_mach_msp13 13 |
1791 |
|
#define bfd_mach_msp14 14 |
1792 |
|
#define bfd_mach_msp15 15 |
1793 |
|
#define bfd_mach_msp16 16 |
1794 |
|
#define bfd_mach_msp31 31 |
1795 |
|
#define bfd_mach_msp32 32 |
1796 |
|
#define bfd_mach_msp33 33 |
1797 |
|
#define bfd_mach_msp41 41 |
1798 |
|
#define bfd_mach_msp42 42 |
1799 |
|
#define bfd_mach_msp43 43 |
1800 |
|
#define bfd_mach_msp44 44 |
1801 |
|
bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ |
1802 |
|
#define bfd_mach_xtensa 1 |
1803 |
|
bfd_arch_maxq, /* Dallas MAXQ 10/20 */ |
1804 |
|
#define bfd_mach_maxq10 10 |
1805 |
|
#define bfd_mach_maxq20 20 |
1806 |
bfd_arch_last |
bfd_arch_last |
1807 |
}; |
}; |
1808 |
|
|
1816 |
const char *arch_name; |
const char *arch_name; |
1817 |
const char *printable_name; |
const char *printable_name; |
1818 |
unsigned int section_align_power; |
unsigned int section_align_power; |
1819 |
/* True if this is the default machine for the architecture. |
/* TRUE if this is the default machine for the architecture. |
1820 |
The default arch should be the first entry for an arch so that |
The default arch should be the first entry for an arch so that |
1821 |
all the entries for that arch can be accessed via <<next>>. */ |
all the entries for that arch can be accessed via <<next>>. */ |
1822 |
boolean the_default; |
bfd_boolean the_default; |
1823 |
const struct bfd_arch_info * (*compatible) |
const struct bfd_arch_info * (*compatible) |
1824 |
PARAMS ((const struct bfd_arch_info *a, |
(const struct bfd_arch_info *a, const struct bfd_arch_info *b); |
|
const struct bfd_arch_info *b)); |
|
1825 |
|
|
1826 |
boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *)); |
bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); |
1827 |
|
|
1828 |
const struct bfd_arch_info *next; |
const struct bfd_arch_info *next; |
1829 |
} |
} |
1830 |
bfd_arch_info_type; |
bfd_arch_info_type; |
1831 |
|
|
1832 |
const char * |
const char *bfd_printable_name (bfd *abfd); |
|
bfd_printable_name PARAMS ((bfd *abfd)); |
|
1833 |
|
|
1834 |
const bfd_arch_info_type * |
const bfd_arch_info_type *bfd_scan_arch (const char *string); |
|
bfd_scan_arch PARAMS ((const char *string)); |
|
1835 |
|
|
1836 |
const char ** |
const char **bfd_arch_list (void); |
|
bfd_arch_list PARAMS ((void)); |
|
1837 |
|
|
1838 |
const bfd_arch_info_type * |
const bfd_arch_info_type *bfd_arch_get_compatible |
1839 |
bfd_arch_get_compatible PARAMS (( |
(const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns); |
|
const bfd *abfd, |
|
|
const bfd *bbfd)); |
|
1840 |
|
|
1841 |
void |
void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); |
|
bfd_set_arch_info PARAMS ((bfd *abfd, const bfd_arch_info_type *arg)); |
|
1842 |
|
|
1843 |
enum bfd_architecture |
enum bfd_architecture bfd_get_arch (bfd *abfd); |
|
bfd_get_arch PARAMS ((bfd *abfd)); |
|
1844 |
|
|
1845 |
unsigned long |
unsigned long bfd_get_mach (bfd *abfd); |
|
bfd_get_mach PARAMS ((bfd *abfd)); |
|
1846 |
|
|
1847 |
unsigned int |
unsigned int bfd_arch_bits_per_byte (bfd *abfd); |
|
bfd_arch_bits_per_byte PARAMS ((bfd *abfd)); |
|
1848 |
|
|
1849 |
unsigned int |
unsigned int bfd_arch_bits_per_address (bfd *abfd); |
|
bfd_arch_bits_per_address PARAMS ((bfd *abfd)); |
|
1850 |
|
|
1851 |
const bfd_arch_info_type * |
const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); |
|
bfd_get_arch_info PARAMS ((bfd *abfd)); |
|
1852 |
|
|
1853 |
const bfd_arch_info_type * |
const bfd_arch_info_type *bfd_lookup_arch |
1854 |
bfd_lookup_arch PARAMS ((enum bfd_architecture |
(enum bfd_architecture arch, unsigned long machine); |
|
arch, |
|
|
unsigned long machine)); |
|
1855 |
|
|
1856 |
const char * |
const char *bfd_printable_arch_mach |
1857 |
bfd_printable_arch_mach PARAMS ((enum bfd_architecture arch, unsigned long machine)); |
(enum bfd_architecture arch, unsigned long machine); |
1858 |
|
|
1859 |
unsigned int |
unsigned int bfd_octets_per_byte (bfd *abfd); |
|
bfd_octets_per_byte PARAMS ((bfd *abfd)); |
|
1860 |
|
|
1861 |
unsigned int |
unsigned int bfd_arch_mach_octets_per_byte |
1862 |
bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch, |
(enum bfd_architecture arch, unsigned long machine); |
|
unsigned long machine)); |
|
1863 |
|
|
1864 |
/* Extracted from reloc.c. */ |
/* Extracted from reloc.c. */ |
1865 |
typedef enum bfd_reloc_status |
typedef enum bfd_reloc_status |
1897 |
typedef struct reloc_cache_entry |
typedef struct reloc_cache_entry |
1898 |
{ |
{ |
1899 |
/* A pointer into the canonical table of pointers. */ |
/* A pointer into the canonical table of pointers. */ |
1900 |
struct symbol_cache_entry **sym_ptr_ptr; |
struct bfd_symbol **sym_ptr_ptr; |
1901 |
|
|
1902 |
/* offset in section. */ |
/* offset in section. */ |
1903 |
bfd_size_type address; |
bfd_size_type address; |
1956 |
data section of the addend. The relocation function will |
data section of the addend. The relocation function will |
1957 |
subtract from the relocation value the address of the location |
subtract from the relocation value the address of the location |
1958 |
being relocated. */ |
being relocated. */ |
1959 |
boolean pc_relative; |
bfd_boolean pc_relative; |
1960 |
|
|
1961 |
/* The bit position of the reloc value in the destination. |
/* The bit position of the reloc value in the destination. |
1962 |
The relocated value is left shifted by this amount. */ |
The relocated value is left shifted by this amount. */ |
1968 |
|
|
1969 |
/* If this field is non null, then the supplied function is |
/* If this field is non null, then the supplied function is |
1970 |
called rather than the normal function. This allows really |
called rather than the normal function. This allows really |
1971 |
strange relocation methods to be accomodated (e.g., i960 callj |
strange relocation methods to be accommodated (e.g., i960 callj |
1972 |
instructions). */ |
instructions). */ |
1973 |
bfd_reloc_status_type (*special_function) |
bfd_reloc_status_type (*special_function) |
1974 |
PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *, |
(bfd *, arelent *, struct bfd_symbol *, void *, asection *, |
1975 |
bfd *, char **)); |
bfd *, char **); |
1976 |
|
|
1977 |
/* The textual name of the relocation type. */ |
/* The textual name of the relocation type. */ |
1978 |
char *name; |
char *name; |
1992 |
USE_REL targets set this field to TRUE. Why this is so is peculiar |
USE_REL targets set this field to TRUE. Why this is so is peculiar |
1993 |
to each particular target. For relocs that aren't used in partial |
to each particular target. For relocs that aren't used in partial |
1994 |
links (e.g. GOT stuff) it doesn't matter what this is set to. */ |
links (e.g. GOT stuff) it doesn't matter what this is set to. */ |
1995 |
boolean partial_inplace; |
bfd_boolean partial_inplace; |
1996 |
|
|
1997 |
/* The src_mask selects which parts of the read in data |
/* src_mask selects the part of the instruction (or data) to be used |
1998 |
are to be used in the relocation sum. E.g., if this was an 8 bit |
in the relocation sum. If the target relocations don't have an |
1999 |
byte of data which we read and relocated, this would be |
addend in the reloc, eg. ELF USE_REL, src_mask will normally equal |
2000 |
0x000000ff. When we have relocs which have an addend, such as |
dst_mask to extract the addend from the section contents. If |
2001 |
sun4 extended relocs, the value in the offset part of a |
relocations do have an addend in the reloc, eg. ELF USE_RELA, this |
2002 |
relocating field is garbage so we never use it. In this case |
field should be zero. Non-zero values for ELF USE_RELA targets are |
2003 |
the mask would be 0x00000000. */ |
bogus as in those cases the value in the dst_mask part of the |
2004 |
|
section contents should be treated as garbage. */ |
2005 |
bfd_vma src_mask; |
bfd_vma src_mask; |
2006 |
|
|
2007 |
/* The dst_mask selects which parts of the instruction are replaced |
/* dst_mask selects which parts of the instruction (or data) are |
2008 |
into the instruction. In most cases src_mask == dst_mask, |
replaced with a relocated value. */ |
|
except in the above special case, where dst_mask would be |
|
|
0x000000ff, and src_mask would be 0x00000000. */ |
|
2009 |
bfd_vma dst_mask; |
bfd_vma dst_mask; |
2010 |
|
|
2011 |
/* When some formats create PC relative instructions, they leave |
/* When some formats create PC relative instructions, they leave |
2014 |
be made just by adding in an ordinary offset (e.g., sun3 a.out). |
be made just by adding in an ordinary offset (e.g., sun3 a.out). |
2015 |
Some formats leave the displacement part of an instruction |
Some formats leave the displacement part of an instruction |
2016 |
empty (e.g., m88k bcs); this flag signals the fact. */ |
empty (e.g., m88k bcs); this flag signals the fact. */ |
2017 |
boolean pcrel_offset; |
bfd_boolean pcrel_offset; |
2018 |
}; |
}; |
2019 |
|
|
2020 |
#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ |
#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ |
2021 |
{ (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } |
{ (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } |
2022 |
#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ |
#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ |
2023 |
HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ |
HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ |
2024 |
NAME, false, 0, 0, IN) |
NAME, FALSE, 0, 0, IN) |
2025 |
|
|
2026 |
#define EMPTY_HOWTO(C) \ |
#define EMPTY_HOWTO(C) \ |
2027 |
HOWTO ((C), 0, 0, 0, false, 0, complain_overflow_dont, NULL, \ |
HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ |
2028 |
NULL, false, 0, 0, false) |
NULL, FALSE, 0, 0, FALSE) |
2029 |
|
|
2030 |
#define HOWTO_PREPARE(relocation, symbol) \ |
#define HOWTO_PREPARE(relocation, symbol) \ |
2031 |
{ \ |
{ \ |
2032 |
if (symbol != (asymbol *) NULL) \ |
if (symbol != NULL) \ |
2033 |
{ \ |
{ \ |
2034 |
if (bfd_is_com_section (symbol->section)) \ |
if (bfd_is_com_section (symbol->section)) \ |
2035 |
{ \ |
{ \ |
2042 |
} \ |
} \ |
2043 |
} |
} |
2044 |
|
|
2045 |
unsigned int |
unsigned int bfd_get_reloc_size (reloc_howto_type *); |
|
bfd_get_reloc_size PARAMS ((reloc_howto_type *)); |
|
2046 |
|
|
2047 |
typedef struct relent_chain |
typedef struct relent_chain |
2048 |
{ |
{ |
2051 |
} |
} |
2052 |
arelent_chain; |
arelent_chain; |
2053 |
|
|
2054 |
bfd_reloc_status_type |
bfd_reloc_status_type bfd_check_overflow |
2055 |
bfd_check_overflow PARAMS ((enum complain_overflow how, |
(enum complain_overflow how, |
2056 |
unsigned int bitsize, |
unsigned int bitsize, |
2057 |
unsigned int rightshift, |
unsigned int rightshift, |
2058 |
unsigned int addrsize, |
unsigned int addrsize, |
2059 |
bfd_vma relocation)); |
bfd_vma relocation); |
2060 |
|
|
2061 |
bfd_reloc_status_type |
bfd_reloc_status_type bfd_perform_relocation |
2062 |
bfd_perform_relocation PARAMS ((bfd *abfd, |
(bfd *abfd, |
2063 |
arelent *reloc_entry, |
arelent *reloc_entry, |
2064 |
PTR data, |
void *data, |
2065 |
asection *input_section, |
asection *input_section, |
2066 |
bfd *output_bfd, |
bfd *output_bfd, |
2067 |
char **error_message)); |
char **error_message); |
2068 |
|
|
2069 |
bfd_reloc_status_type |
bfd_reloc_status_type bfd_install_relocation |
2070 |
bfd_install_relocation PARAMS ((bfd *abfd, |
(bfd *abfd, |
2071 |
arelent *reloc_entry, |
arelent *reloc_entry, |
2072 |
PTR data, bfd_vma data_start, |
void *data, bfd_vma data_start, |
2073 |
asection *input_section, |
asection *input_section, |
2074 |
char **error_message)); |
char **error_message); |
2075 |
|
|
2076 |
enum bfd_reloc_code_real { |
enum bfd_reloc_code_real { |
2077 |
_dummy_first_bfd_reloc_code_real, |
_dummy_first_bfd_reloc_code_real, |
2098 |
BFD_RELOC_12_PCREL, |
BFD_RELOC_12_PCREL, |
2099 |
BFD_RELOC_8_PCREL, |
BFD_RELOC_8_PCREL, |
2100 |
|
|
2101 |
|
/* Section relative relocations. Some targets need this for DWARF2. */ |
2102 |
|
BFD_RELOC_32_SECREL, |
2103 |
|
|
2104 |
/* For ELF. */ |
/* For ELF. */ |
2105 |
BFD_RELOC_32_GOT_PCREL, |
BFD_RELOC_32_GOT_PCREL, |
2106 |
BFD_RELOC_16_GOT_PCREL, |
BFD_RELOC_16_GOT_PCREL, |
2219 |
/* SPARC little endian relocation */ |
/* SPARC little endian relocation */ |
2220 |
BFD_RELOC_SPARC_REV32, |
BFD_RELOC_SPARC_REV32, |
2221 |
|
|
2222 |
|
/* SPARC TLS relocations */ |
2223 |
|
BFD_RELOC_SPARC_TLS_GD_HI22, |
2224 |
|
BFD_RELOC_SPARC_TLS_GD_LO10, |
2225 |
|
BFD_RELOC_SPARC_TLS_GD_ADD, |
2226 |
|
BFD_RELOC_SPARC_TLS_GD_CALL, |
2227 |
|
BFD_RELOC_SPARC_TLS_LDM_HI22, |
2228 |
|
BFD_RELOC_SPARC_TLS_LDM_LO10, |
2229 |
|
BFD_RELOC_SPARC_TLS_LDM_ADD, |
2230 |
|
BFD_RELOC_SPARC_TLS_LDM_CALL, |
2231 |
|
BFD_RELOC_SPARC_TLS_LDO_HIX22, |
2232 |
|
BFD_RELOC_SPARC_TLS_LDO_LOX10, |
2233 |
|
BFD_RELOC_SPARC_TLS_LDO_ADD, |
2234 |
|
BFD_RELOC_SPARC_TLS_IE_HI22, |
2235 |
|
BFD_RELOC_SPARC_TLS_IE_LO10, |
2236 |
|
BFD_RELOC_SPARC_TLS_IE_LD, |
2237 |
|
BFD_RELOC_SPARC_TLS_IE_LDX, |
2238 |
|
BFD_RELOC_SPARC_TLS_IE_ADD, |
2239 |
|
BFD_RELOC_SPARC_TLS_LE_HIX22, |
2240 |
|
BFD_RELOC_SPARC_TLS_LE_LOX10, |
2241 |
|
BFD_RELOC_SPARC_TLS_DTPMOD32, |
2242 |
|
BFD_RELOC_SPARC_TLS_DTPMOD64, |
2243 |
|
BFD_RELOC_SPARC_TLS_DTPOFF32, |
2244 |
|
BFD_RELOC_SPARC_TLS_DTPOFF64, |
2245 |
|
BFD_RELOC_SPARC_TLS_TPOFF32, |
2246 |
|
BFD_RELOC_SPARC_TLS_TPOFF64, |
2247 |
|
|
2248 |
/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or |
/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or |
2249 |
"addend" in some special way. |
"addend" in some special way. |
2250 |
For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when |
For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when |
2310 |
BFD_RELOC_ALPHA_GPREL_LO16, |
BFD_RELOC_ALPHA_GPREL_LO16, |
2311 |
|
|
2312 |
/* Like BFD_RELOC_23_PCREL_S2, except that the source and target must |
/* Like BFD_RELOC_23_PCREL_S2, except that the source and target must |
2313 |
share a common GP, and the target address is adjusted for |
share a common GP, and the target address is adjusted for |
2314 |
STO_ALPHA_STD_GPLOAD. */ |
STO_ALPHA_STD_GPLOAD. */ |
2315 |
BFD_RELOC_ALPHA_BRSGP, |
BFD_RELOC_ALPHA_BRSGP, |
2316 |
|
|
2351 |
/* Low 16 bits. */ |
/* Low 16 bits. */ |
2352 |
BFD_RELOC_LO16, |
BFD_RELOC_LO16, |
2353 |
|
|
2354 |
/* Like BFD_RELOC_HI16_S, but PC relative. */ |
/* MIPS16 high 16 bits of 32-bit value. */ |
2355 |
BFD_RELOC_PCREL_HI16_S, |
BFD_RELOC_MIPS16_HI16, |
2356 |
|
|
2357 |
/* Like BFD_RELOC_LO16, but PC relative. */ |
/* MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign |
2358 |
BFD_RELOC_PCREL_LO16, |
extended and added to form the final result. If the low 16 |
2359 |
|
bits form a negative number, we need to add one to the high value |
2360 |
|
to compensate for the borrow when the low bits are added. */ |
2361 |
|
BFD_RELOC_MIPS16_HI16_S, |
2362 |
|
|
2363 |
|
/* MIPS16 low 16 bits. */ |
2364 |
|
BFD_RELOC_MIPS16_LO16, |
2365 |
|
|
2366 |
/* Relocation against a MIPS literal section. */ |
/* Relocation against a MIPS literal section. */ |
2367 |
BFD_RELOC_MIPS_LITERAL, |
BFD_RELOC_MIPS_LITERAL, |
2388 |
BFD_RELOC_MIPS_REL16, |
BFD_RELOC_MIPS_REL16, |
2389 |
BFD_RELOC_MIPS_RELGOT, |
BFD_RELOC_MIPS_RELGOT, |
2390 |
BFD_RELOC_MIPS_JALR, |
BFD_RELOC_MIPS_JALR, |
2391 |
|
BFD_RELOC_MIPS_TLS_DTPMOD32, |
2392 |
|
BFD_RELOC_MIPS_TLS_DTPREL32, |
2393 |
|
BFD_RELOC_MIPS_TLS_DTPMOD64, |
2394 |
|
BFD_RELOC_MIPS_TLS_DTPREL64, |
2395 |
|
BFD_RELOC_MIPS_TLS_GD, |
2396 |
|
BFD_RELOC_MIPS_TLS_LDM, |
2397 |
|
BFD_RELOC_MIPS_TLS_DTPREL_HI16, |
2398 |
|
BFD_RELOC_MIPS_TLS_DTPREL_LO16, |
2399 |
|
BFD_RELOC_MIPS_TLS_GOTTPREL, |
2400 |
|
BFD_RELOC_MIPS_TLS_TPREL32, |
2401 |
|
BFD_RELOC_MIPS_TLS_TPREL64, |
2402 |
|
BFD_RELOC_MIPS_TLS_TPREL_HI16, |
2403 |
|
BFD_RELOC_MIPS_TLS_TPREL_LO16, |
2404 |
|
|
2405 |
|
|
2406 |
/* Fujitsu Frv Relocations. */ |
/* Fujitsu Frv Relocations. */ |
2407 |
BFD_RELOC_FRV_LABEL16, |
BFD_RELOC_FRV_LABEL16, |
2413 |
BFD_RELOC_FRV_GPREL32, |
BFD_RELOC_FRV_GPREL32, |
2414 |
BFD_RELOC_FRV_GPRELHI, |
BFD_RELOC_FRV_GPRELHI, |
2415 |
BFD_RELOC_FRV_GPRELLO, |
BFD_RELOC_FRV_GPRELLO, |
2416 |
|
BFD_RELOC_FRV_GOT12, |
2417 |
|
BFD_RELOC_FRV_GOTHI, |
2418 |
|
BFD_RELOC_FRV_GOTLO, |
2419 |
|
BFD_RELOC_FRV_FUNCDESC, |
2420 |
|
BFD_RELOC_FRV_FUNCDESC_GOT12, |
2421 |
|
BFD_RELOC_FRV_FUNCDESC_GOTHI, |
2422 |
|
BFD_RELOC_FRV_FUNCDESC_GOTLO, |
2423 |
|
BFD_RELOC_FRV_FUNCDESC_VALUE, |
2424 |
|
BFD_RELOC_FRV_FUNCDESC_GOTOFF12, |
2425 |
|
BFD_RELOC_FRV_FUNCDESC_GOTOFFHI, |
2426 |
|
BFD_RELOC_FRV_FUNCDESC_GOTOFFLO, |
2427 |
|
BFD_RELOC_FRV_GOTOFF12, |
2428 |
|
BFD_RELOC_FRV_GOTOFFHI, |
2429 |
|
BFD_RELOC_FRV_GOTOFFLO, |
2430 |
|
BFD_RELOC_FRV_GETTLSOFF, |
2431 |
|
BFD_RELOC_FRV_TLSDESC_VALUE, |
2432 |
|
BFD_RELOC_FRV_GOTTLSDESC12, |
2433 |
|
BFD_RELOC_FRV_GOTTLSDESCHI, |
2434 |
|
BFD_RELOC_FRV_GOTTLSDESCLO, |
2435 |
|
BFD_RELOC_FRV_TLSMOFF12, |
2436 |
|
BFD_RELOC_FRV_TLSMOFFHI, |
2437 |
|
BFD_RELOC_FRV_TLSMOFFLO, |
2438 |
|
BFD_RELOC_FRV_GOTTLSOFF12, |
2439 |
|
BFD_RELOC_FRV_GOTTLSOFFHI, |
2440 |
|
BFD_RELOC_FRV_GOTTLSOFFLO, |
2441 |
|
BFD_RELOC_FRV_TLSOFF, |
2442 |
|
BFD_RELOC_FRV_TLSDESC_RELAX, |
2443 |
|
BFD_RELOC_FRV_GETTLSOFF_RELAX, |
2444 |
|
BFD_RELOC_FRV_TLSOFF_RELAX, |
2445 |
|
BFD_RELOC_FRV_TLSMOFF, |
2446 |
|
|
2447 |
|
|
2448 |
|
/* This is a 24bit GOT-relative reloc for the mn10300. */ |
2449 |
|
BFD_RELOC_MN10300_GOTOFF24, |
2450 |
|
|
2451 |
|
/* This is a 32bit GOT-relative reloc for the mn10300, offset by two bytes |
2452 |
|
in the instruction. */ |
2453 |
|
BFD_RELOC_MN10300_GOT32, |
2454 |
|
|
2455 |
|
/* This is a 24bit GOT-relative reloc for the mn10300, offset by two bytes |
2456 |
|
in the instruction. */ |
2457 |
|
BFD_RELOC_MN10300_GOT24, |
2458 |
|
|
2459 |
|
/* This is a 16bit GOT-relative reloc for the mn10300, offset by two bytes |
2460 |
|
in the instruction. */ |
2461 |
|
BFD_RELOC_MN10300_GOT16, |
2462 |
|
|
2463 |
|
/* Copy symbol at runtime. */ |
2464 |
|
BFD_RELOC_MN10300_COPY, |
2465 |
|
|
2466 |
|
/* Create GOT entry. */ |
2467 |
|
BFD_RELOC_MN10300_GLOB_DAT, |
2468 |
|
|
2469 |
|
/* Create PLT entry. */ |
2470 |
|
BFD_RELOC_MN10300_JMP_SLOT, |
2471 |
|
|
2472 |
|
/* Adjust by program base. */ |
2473 |
|
BFD_RELOC_MN10300_RELATIVE, |
2474 |
|
|
2475 |
|
|
2476 |
/* i386/elf relocations */ |
/* i386/elf relocations */ |
2482 |
BFD_RELOC_386_RELATIVE, |
BFD_RELOC_386_RELATIVE, |
2483 |
BFD_RELOC_386_GOTOFF, |
BFD_RELOC_386_GOTOFF, |
2484 |
BFD_RELOC_386_GOTPC, |
BFD_RELOC_386_GOTPC, |
2485 |
|
BFD_RELOC_386_TLS_TPOFF, |
2486 |
|
BFD_RELOC_386_TLS_IE, |
2487 |
|
BFD_RELOC_386_TLS_GOTIE, |
2488 |
BFD_RELOC_386_TLS_LE, |
BFD_RELOC_386_TLS_LE, |
2489 |
BFD_RELOC_386_TLS_GD, |
BFD_RELOC_386_TLS_GD, |
2490 |
BFD_RELOC_386_TLS_LDM, |
BFD_RELOC_386_TLS_LDM, |
2504 |
BFD_RELOC_X86_64_RELATIVE, |
BFD_RELOC_X86_64_RELATIVE, |
2505 |
BFD_RELOC_X86_64_GOTPCREL, |
BFD_RELOC_X86_64_GOTPCREL, |
2506 |
BFD_RELOC_X86_64_32S, |
BFD_RELOC_X86_64_32S, |
2507 |
|
BFD_RELOC_X86_64_DTPMOD64, |
2508 |
|
BFD_RELOC_X86_64_DTPOFF64, |
2509 |
|
BFD_RELOC_X86_64_TPOFF64, |
2510 |
|
BFD_RELOC_X86_64_TLSGD, |
2511 |
|
BFD_RELOC_X86_64_TLSLD, |
2512 |
|
BFD_RELOC_X86_64_DTPOFF32, |
2513 |
|
BFD_RELOC_X86_64_GOTTPOFF, |
2514 |
|
BFD_RELOC_X86_64_TPOFF32, |
2515 |
|
|
2516 |
/* ns32k relocations */ |
/* ns32k relocations */ |
2517 |
BFD_RELOC_NS32K_IMM_8, |
BFD_RELOC_NS32K_IMM_8, |
2594 |
BFD_RELOC_PPC64_PLTGOT16_DS, |
BFD_RELOC_PPC64_PLTGOT16_DS, |
2595 |
BFD_RELOC_PPC64_PLTGOT16_LO_DS, |
BFD_RELOC_PPC64_PLTGOT16_LO_DS, |
2596 |
|
|
2597 |
|
/* PowerPC and PowerPC64 thread-local storage relocations. */ |
2598 |
|
BFD_RELOC_PPC_TLS, |
2599 |
|
BFD_RELOC_PPC_DTPMOD, |
2600 |
|
BFD_RELOC_PPC_TPREL16, |
2601 |
|
BFD_RELOC_PPC_TPREL16_LO, |
2602 |
|
BFD_RELOC_PPC_TPREL16_HI, |
2603 |
|
BFD_RELOC_PPC_TPREL16_HA, |
2604 |
|
BFD_RELOC_PPC_TPREL, |
2605 |
|
BFD_RELOC_PPC_DTPREL16, |
2606 |
|
BFD_RELOC_PPC_DTPREL16_LO, |
2607 |
|
BFD_RELOC_PPC_DTPREL16_HI, |
2608 |
|
BFD_RELOC_PPC_DTPREL16_HA, |
2609 |
|
BFD_RELOC_PPC_DTPREL, |
2610 |
|
BFD_RELOC_PPC_GOT_TLSGD16, |
2611 |
|
BFD_RELOC_PPC_GOT_TLSGD16_LO, |
2612 |
|
BFD_RELOC_PPC_GOT_TLSGD16_HI, |
2613 |
|
BFD_RELOC_PPC_GOT_TLSGD16_HA, |
2614 |
|
BFD_RELOC_PPC_GOT_TLSLD16, |
2615 |
|
BFD_RELOC_PPC_GOT_TLSLD16_LO, |
2616 |
|
BFD_RELOC_PPC_GOT_TLSLD16_HI, |
2617 |
|
BFD_RELOC_PPC_GOT_TLSLD16_HA, |
2618 |
|
BFD_RELOC_PPC_GOT_TPREL16, |
2619 |
|
BFD_RELOC_PPC_GOT_TPREL16_LO, |
2620 |
|
BFD_RELOC_PPC_GOT_TPREL16_HI, |
2621 |
|
BFD_RELOC_PPC_GOT_TPREL16_HA, |
2622 |
|
BFD_RELOC_PPC_GOT_DTPREL16, |
2623 |
|
BFD_RELOC_PPC_GOT_DTPREL16_LO, |
2624 |
|
BFD_RELOC_PPC_GOT_DTPREL16_HI, |
2625 |
|
BFD_RELOC_PPC_GOT_DTPREL16_HA, |
2626 |
|
BFD_RELOC_PPC64_TPREL16_DS, |
2627 |
|
BFD_RELOC_PPC64_TPREL16_LO_DS, |
2628 |
|
BFD_RELOC_PPC64_TPREL16_HIGHER, |
2629 |
|
BFD_RELOC_PPC64_TPREL16_HIGHERA, |
2630 |
|
BFD_RELOC_PPC64_TPREL16_HIGHEST, |
2631 |
|
BFD_RELOC_PPC64_TPREL16_HIGHESTA, |
2632 |
|
BFD_RELOC_PPC64_DTPREL16_DS, |
2633 |
|
BFD_RELOC_PPC64_DTPREL16_LO_DS, |
2634 |
|
BFD_RELOC_PPC64_DTPREL16_HIGHER, |
2635 |
|
BFD_RELOC_PPC64_DTPREL16_HIGHERA, |
2636 |
|
BFD_RELOC_PPC64_DTPREL16_HIGHEST, |
2637 |
|
BFD_RELOC_PPC64_DTPREL16_HIGHESTA, |
2638 |
|
|
2639 |
/* IBM 370/390 relocations */ |
/* IBM 370/390 relocations */ |
2640 |
BFD_RELOC_I370_D12, |
BFD_RELOC_I370_D12, |
2641 |
|
|
2642 |
/* The type of reloc used to build a contructor table - at the moment |
/* The type of reloc used to build a constructor table - at the moment |
2643 |
probably a 32 bit wide absolute relocation, but the target can choose. |
probably a 32 bit wide absolute relocation, but the target can choose. |
2644 |
It generally does map to one of the other relocation types. */ |
It generally does map to one of the other relocation types. */ |
2645 |
BFD_RELOC_CTOR, |
BFD_RELOC_CTOR, |
2664 |
BFD_RELOC_ARM_ADRL_IMMEDIATE, |
BFD_RELOC_ARM_ADRL_IMMEDIATE, |
2665 |
BFD_RELOC_ARM_OFFSET_IMM, |
BFD_RELOC_ARM_OFFSET_IMM, |
2666 |
BFD_RELOC_ARM_SHIFT_IMM, |
BFD_RELOC_ARM_SHIFT_IMM, |
2667 |
|
BFD_RELOC_ARM_SMI, |
2668 |
BFD_RELOC_ARM_SWI, |
BFD_RELOC_ARM_SWI, |
2669 |
BFD_RELOC_ARM_MULTI, |
BFD_RELOC_ARM_MULTI, |
2670 |
BFD_RELOC_ARM_CP_OFF_IMM, |
BFD_RELOC_ARM_CP_OFF_IMM, |
2671 |
|
BFD_RELOC_ARM_CP_OFF_IMM_S2, |
2672 |
BFD_RELOC_ARM_ADR_IMM, |
BFD_RELOC_ARM_ADR_IMM, |
2673 |
BFD_RELOC_ARM_LDR_IMM, |
BFD_RELOC_ARM_LDR_IMM, |
2674 |
BFD_RELOC_ARM_LITERAL, |
BFD_RELOC_ARM_LITERAL, |
2689 |
BFD_RELOC_ARM_GOTOFF, |
BFD_RELOC_ARM_GOTOFF, |
2690 |
BFD_RELOC_ARM_GOTPC, |
BFD_RELOC_ARM_GOTPC, |
2691 |
|
|
2692 |
/* Hitachi SH relocs. Not all of these appear in object files. */ |
/* Pc-relative or absolute relocation depending on target. Used for |
2693 |
|
entries in .init_array sections. */ |
2694 |
|
BFD_RELOC_ARM_TARGET1, |
2695 |
|
|
2696 |
|
/* Read-only segment base relative address. */ |
2697 |
|
BFD_RELOC_ARM_ROSEGREL32, |
2698 |
|
|
2699 |
|
/* Data segment base relative address. */ |
2700 |
|
BFD_RELOC_ARM_SBREL32, |
2701 |
|
|
2702 |
|
/* This reloc is used for References to RTTI dta from exception handling |
2703 |
|
tables. The actual definition depends on the target. It may be a |
2704 |
|
pc-relative or some form of GOT-indirect relocation. */ |
2705 |
|
BFD_RELOC_ARM_TARGET2, |
2706 |
|
|
2707 |
|
/* 31-bit PC relative address. */ |
2708 |
|
BFD_RELOC_ARM_PREL31, |
2709 |
|
|
2710 |
|
/* Renesas / SuperH SH relocs. Not all of these appear in object files. */ |
2711 |
BFD_RELOC_SH_PCDISP8BY2, |
BFD_RELOC_SH_PCDISP8BY2, |
2712 |
BFD_RELOC_SH_PCDISP12BY2, |
BFD_RELOC_SH_PCDISP12BY2, |
2713 |
|
BFD_RELOC_SH_IMM3, |
2714 |
|
BFD_RELOC_SH_IMM3U, |
2715 |
|
BFD_RELOC_SH_DISP12, |
2716 |
|
BFD_RELOC_SH_DISP12BY2, |
2717 |
|
BFD_RELOC_SH_DISP12BY4, |
2718 |
|
BFD_RELOC_SH_DISP12BY8, |
2719 |
|
BFD_RELOC_SH_DISP20, |
2720 |
|
BFD_RELOC_SH_DISP20BY8, |
2721 |
BFD_RELOC_SH_IMM4, |
BFD_RELOC_SH_IMM4, |
2722 |
BFD_RELOC_SH_IMM4BY2, |
BFD_RELOC_SH_IMM4BY2, |
2723 |
BFD_RELOC_SH_IMM4BY4, |
BFD_RELOC_SH_IMM4BY4, |
2790 |
BFD_RELOC_SH_IMM_HI16, |
BFD_RELOC_SH_IMM_HI16, |
2791 |
BFD_RELOC_SH_IMM_HI16_PCREL, |
BFD_RELOC_SH_IMM_HI16_PCREL, |
2792 |
BFD_RELOC_SH_PT_16, |
BFD_RELOC_SH_PT_16, |
2793 |
|
BFD_RELOC_SH_TLS_GD_32, |
2794 |
|
BFD_RELOC_SH_TLS_LD_32, |
2795 |
|
BFD_RELOC_SH_TLS_LDO_32, |
2796 |
|
BFD_RELOC_SH_TLS_IE_32, |
2797 |
|
BFD_RELOC_SH_TLS_LE_32, |
2798 |
|
BFD_RELOC_SH_TLS_DTPMOD32, |
2799 |
|
BFD_RELOC_SH_TLS_DTPOFF32, |
2800 |
|
BFD_RELOC_SH_TLS_TPOFF32, |
2801 |
|
|
2802 |
/* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must |
/* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must |
2803 |
be zero and is not stored in the instruction. */ |
be zero and is not stored in the instruction. */ |
2893 |
/* DLX relocs */ |
/* DLX relocs */ |
2894 |
BFD_RELOC_DLX_JMP26, |
BFD_RELOC_DLX_JMP26, |
2895 |
|
|
2896 |
/* Mitsubishi M32R relocs. |
/* Renesas M32R (formerly Mitsubishi M32R) relocs. |
2897 |
This is a 24 bit absolute address. */ |
This is a 24 bit absolute address. */ |
2898 |
BFD_RELOC_M32R_24, |
BFD_RELOC_M32R_24, |
2899 |
|
|
2921 |
add3, load, and store instructions. */ |
add3, load, and store instructions. */ |
2922 |
BFD_RELOC_M32R_SDA16, |
BFD_RELOC_M32R_SDA16, |
2923 |
|
|
2924 |
|
/* For PIC. */ |
2925 |
|
BFD_RELOC_M32R_GOT24, |
2926 |
|
BFD_RELOC_M32R_26_PLTREL, |
2927 |
|
BFD_RELOC_M32R_COPY, |
2928 |
|
BFD_RELOC_M32R_GLOB_DAT, |
2929 |
|
BFD_RELOC_M32R_JMP_SLOT, |
2930 |
|
BFD_RELOC_M32R_RELATIVE, |
2931 |
|
BFD_RELOC_M32R_GOTOFF, |
2932 |
|
BFD_RELOC_M32R_GOTOFF_HI_ULO, |
2933 |
|
BFD_RELOC_M32R_GOTOFF_HI_SLO, |
2934 |
|
BFD_RELOC_M32R_GOTOFF_LO, |
2935 |
|
BFD_RELOC_M32R_GOTPC24, |
2936 |
|
BFD_RELOC_M32R_GOT16_HI_ULO, |
2937 |
|
BFD_RELOC_M32R_GOT16_HI_SLO, |
2938 |
|
BFD_RELOC_M32R_GOT16_LO, |
2939 |
|
BFD_RELOC_M32R_GOTPC_HI_ULO, |
2940 |
|
BFD_RELOC_M32R_GOTPC_HI_SLO, |
2941 |
|
BFD_RELOC_M32R_GOTPC_LO, |
2942 |
|
|
2943 |
/* This is a 9-bit reloc */ |
/* This is a 9-bit reloc */ |
2944 |
BFD_RELOC_V850_9_PCREL, |
BFD_RELOC_V850_9_PCREL, |
2945 |
|
|
2982 |
BFD_RELOC_V850_TDA_4_4_OFFSET, |
BFD_RELOC_V850_TDA_4_4_OFFSET, |
2983 |
|
|
2984 |
/* This is a 16 bit offset from the short data area pointer, with the |
/* This is a 16 bit offset from the short data area pointer, with the |
2985 |
bits placed non-contigously in the instruction. */ |
bits placed non-contiguously in the instruction. */ |
2986 |
BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET, |
BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET, |
2987 |
|
|
2988 |
/* This is a 16 bit offset from the zero data area pointer, with the |
/* This is a 16 bit offset from the zero data area pointer, with the |
2989 |
bits placed non-contigously in the instruction. */ |
bits placed non-contiguously in the instruction. */ |
2990 |
BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET, |
BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET, |
2991 |
|
|
2992 |
/* This is a 6 bit offset from the call table base pointer. */ |
/* This is a 6 bit offset from the call table base pointer. */ |
2995 |
/* This is a 16 bit offset from the call table base pointer. */ |
/* This is a 16 bit offset from the call table base pointer. */ |
2996 |
BFD_RELOC_V850_CALLT_16_16_OFFSET, |
BFD_RELOC_V850_CALLT_16_16_OFFSET, |
2997 |
|
|
2998 |
|
/* Used for relaxing indirect function calls. */ |
2999 |
|
BFD_RELOC_V850_LONGCALL, |
3000 |
|
|
3001 |
|
/* Used for relaxing indirect jumps. */ |
3002 |
|
BFD_RELOC_V850_LONGJUMP, |
3003 |
|
|
3004 |
|
/* Used to maintain alignment whilst relaxing. */ |
3005 |
|
BFD_RELOC_V850_ALIGN, |
3006 |
|
|
3007 |
|
/* This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu |
3008 |
|
instructions. */ |
3009 |
|
BFD_RELOC_V850_LO16_SPLIT_OFFSET, |
3010 |
|
|
3011 |
/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the |
/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the |
3012 |
instruction. */ |
instruction. */ |
3101 |
BFD_RELOC_MMIX_PUSHJ_1, |
BFD_RELOC_MMIX_PUSHJ_1, |
3102 |
BFD_RELOC_MMIX_PUSHJ_2, |
BFD_RELOC_MMIX_PUSHJ_2, |
3103 |
BFD_RELOC_MMIX_PUSHJ_3, |
BFD_RELOC_MMIX_PUSHJ_3, |
3104 |
|
BFD_RELOC_MMIX_PUSHJ_STUBBABLE, |
3105 |
|
|
3106 |
/* These are relocations for the JMP instruction. */ |
/* These are relocations for the JMP instruction. */ |
3107 |
BFD_RELOC_MMIX_JMP, |
BFD_RELOC_MMIX_JMP, |
3200 |
into 22 bits. */ |
into 22 bits. */ |
3201 |
BFD_RELOC_AVR_CALL, |
BFD_RELOC_AVR_CALL, |
3202 |
|
|
3203 |
|
/* This is a 16 bit reloc for the AVR that stores all needed bits |
3204 |
|
for absolute addressing with ldi with overflow check to linktime */ |
3205 |
|
BFD_RELOC_AVR_LDI, |
3206 |
|
|
3207 |
|
/* This is a 6 bit reloc for the AVR that stores offset for ldd/std |
3208 |
|
instructions */ |
3209 |
|
BFD_RELOC_AVR_6, |
3210 |
|
|
3211 |
|
/* This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw |
3212 |
|
instructions */ |
3213 |
|
BFD_RELOC_AVR_6_ADIW, |
3214 |
|
|
3215 |
/* Direct 12 bit. */ |
/* Direct 12 bit. */ |
3216 |
BFD_RELOC_390_12, |
BFD_RELOC_390_12, |
3217 |
|
|
3263 |
/* 32 bit rel. offset to GOT entry. */ |
/* 32 bit rel. offset to GOT entry. */ |
3264 |
BFD_RELOC_390_GOTENT, |
BFD_RELOC_390_GOTENT, |
3265 |
|
|
3266 |
|
/* 64 bit offset to GOT. */ |
3267 |
|
BFD_RELOC_390_GOTOFF64, |
3268 |
|
|
3269 |
|
/* 12-bit offset to symbol-entry within GOT, with PLT handling. */ |
3270 |
|
BFD_RELOC_390_GOTPLT12, |
3271 |
|
|
3272 |
|
/* 16-bit offset to symbol-entry within GOT, with PLT handling. */ |
3273 |
|
BFD_RELOC_390_GOTPLT16, |
3274 |
|
|
3275 |
|
/* 32-bit offset to symbol-entry within GOT, with PLT handling. */ |
3276 |
|
BFD_RELOC_390_GOTPLT32, |
3277 |
|
|
3278 |
|
/* 64-bit offset to symbol-entry within GOT, with PLT handling. */ |
3279 |
|
BFD_RELOC_390_GOTPLT64, |
3280 |
|
|
3281 |
|
/* 32-bit rel. offset to symbol-entry within GOT, with PLT handling. */ |
3282 |
|
BFD_RELOC_390_GOTPLTENT, |
3283 |
|
|
3284 |
|
/* 16-bit rel. offset from the GOT to a PLT entry. */ |
3285 |
|
BFD_RELOC_390_PLTOFF16, |
3286 |
|
|
3287 |
|
/* 32-bit rel. offset from the GOT to a PLT entry. */ |
3288 |
|
BFD_RELOC_390_PLTOFF32, |
3289 |
|
|
3290 |
|
/* 64-bit rel. offset from the GOT to a PLT entry. */ |
3291 |
|
BFD_RELOC_390_PLTOFF64, |
3292 |
|
|
3293 |
|
/* s390 tls relocations. */ |
3294 |
|
BFD_RELOC_390_TLS_LOAD, |
3295 |
|
BFD_RELOC_390_TLS_GDCALL, |
3296 |
|
BFD_RELOC_390_TLS_LDCALL, |
3297 |
|
BFD_RELOC_390_TLS_GD32, |
3298 |
|
BFD_RELOC_390_TLS_GD64, |
3299 |
|
BFD_RELOC_390_TLS_GOTIE12, |
3300 |
|
BFD_RELOC_390_TLS_GOTIE32, |
3301 |
|
BFD_RELOC_390_TLS_GOTIE64, |
3302 |
|
BFD_RELOC_390_TLS_LDM32, |
3303 |
|
BFD_RELOC_390_TLS_LDM64, |
3304 |
|
BFD_RELOC_390_TLS_IE32, |
3305 |
|
BFD_RELOC_390_TLS_IE64, |
3306 |
|
BFD_RELOC_390_TLS_IEENT, |
3307 |
|
BFD_RELOC_390_TLS_LE32, |
3308 |
|
BFD_RELOC_390_TLS_LE64, |
3309 |
|
BFD_RELOC_390_TLS_LDO32, |
3310 |
|
BFD_RELOC_390_TLS_LDO64, |
3311 |
|
BFD_RELOC_390_TLS_DTPMOD, |
3312 |
|
BFD_RELOC_390_TLS_DTPOFF, |
3313 |
|
BFD_RELOC_390_TLS_TPOFF, |
3314 |
|
|
3315 |
|
/* Long displacement extension. */ |
3316 |
|
BFD_RELOC_390_20, |
3317 |
|
BFD_RELOC_390_GOT20, |
3318 |
|
BFD_RELOC_390_GOTPLT20, |
3319 |
|
BFD_RELOC_390_TLS_GOTIE20, |
3320 |
|
|
3321 |
/* Scenix IP2K - 9-bit register number / data address */ |
/* Scenix IP2K - 9-bit register number / data address */ |
3322 |
BFD_RELOC_IP2K_FR9, |
BFD_RELOC_IP2K_FR9, |
3323 |
|
|
3359 |
included in the output. |
included in the output. |
3360 |
|
|
3361 |
VTABLE_INHERIT is a zero-space relocation used to describe to the |
VTABLE_INHERIT is a zero-space relocation used to describe to the |
3362 |
linker the inheritence tree of a C++ virtual function table. The |
linker the inheritance tree of a C++ virtual function table. The |
3363 |
relocation's symbol should be the parent class' vtable, and the |
relocation's symbol should be the parent class' vtable, and the |
3364 |
relocation should be located at the child vtable. |
relocation should be located at the child vtable. |
3365 |
|
|
3454 |
BFD_RELOC_IA64_LTOFF_DTPREL22, |
BFD_RELOC_IA64_LTOFF_DTPREL22, |
3455 |
|
|
3456 |
/* Motorola 68HC11 reloc. |
/* Motorola 68HC11 reloc. |
3457 |
This is the 8 bits high part of an absolute address. */ |
This is the 8 bit high part of an absolute address. */ |
3458 |
BFD_RELOC_M68HC11_HI8, |
BFD_RELOC_M68HC11_HI8, |
3459 |
|
|
3460 |
/* Motorola 68HC11 reloc. |
/* Motorola 68HC11 reloc. |
3461 |
This is the 8 bits low part of an absolute address. */ |
This is the 8 bit low part of an absolute address. */ |
3462 |
BFD_RELOC_M68HC11_LO8, |
BFD_RELOC_M68HC11_LO8, |
3463 |
|
|
3464 |
/* Motorola 68HC11 reloc. |
/* Motorola 68HC11 reloc. |
3465 |
This is the 3 bits of a value. */ |
This is the 3 bit of a value. */ |
3466 |
BFD_RELOC_M68HC11_3B, |
BFD_RELOC_M68HC11_3B, |
3467 |
|
|
3468 |
|
/* Motorola 68HC11 reloc. |
3469 |
|
This reloc marks the beginning of a jump/call instruction. |
3470 |
|
It is used for linker relaxation to correctly identify beginning |
3471 |
|
of instruction and change some branches to use PC-relative |
3472 |
|
addressing mode. */ |
3473 |
|
BFD_RELOC_M68HC11_RL_JUMP, |
3474 |
|
|
3475 |
|
/* Motorola 68HC11 reloc. |
3476 |
|
This reloc marks a group of several instructions that gcc generates |
3477 |
|
and for which the linker relaxation pass can modify and/or remove |
3478 |
|
some of them. */ |
3479 |
|
BFD_RELOC_M68HC11_RL_GROUP, |
3480 |
|
|
3481 |
|
/* Motorola 68HC11 reloc. |
3482 |
|
This is the 16-bit lower part of an address. It is used for 'call' |
3483 |
|
instruction to specify the symbol address without any special |
3484 |
|
transformation (due to memory bank window). */ |
3485 |
|
BFD_RELOC_M68HC11_LO16, |
3486 |
|
|
3487 |
|
/* Motorola 68HC11 reloc. |
3488 |
|
This is a 8-bit reloc that specifies the page number of an address. |
3489 |
|
It is used by 'call' instruction to specify the page number of |
3490 |
|
the symbol. */ |
3491 |
|
BFD_RELOC_M68HC11_PAGE, |
3492 |
|
|
3493 |
|
/* Motorola 68HC11 reloc. |
3494 |
|
This is a 24-bit reloc that represents the address with a 16-bit |
3495 |
|
value and a 8-bit page number. The symbol address is transformed |
3496 |
|
to follow the 16K memory bank of 68HC12 (seen as mapped in the window). */ |
3497 |
|
BFD_RELOC_M68HC11_24, |
3498 |
|
|
3499 |
|
/* Motorola 68HC12 reloc. |
3500 |
|
This is the 5 bits of a value. */ |
3501 |
|
BFD_RELOC_M68HC12_5B, |
3502 |
|
|
3503 |
|
/* NS CR16C Relocations. */ |
3504 |
|
BFD_RELOC_16C_NUM08, |
3505 |
|
BFD_RELOC_16C_NUM08_C, |
3506 |
|
BFD_RELOC_16C_NUM16, |
3507 |
|
BFD_RELOC_16C_NUM16_C, |
3508 |
|
BFD_RELOC_16C_NUM32, |
3509 |
|
BFD_RELOC_16C_NUM32_C, |
3510 |
|
BFD_RELOC_16C_DISP04, |
3511 |
|
BFD_RELOC_16C_DISP04_C, |
3512 |
|
BFD_RELOC_16C_DISP08, |
3513 |
|
BFD_RELOC_16C_DISP08_C, |
3514 |
|
BFD_RELOC_16C_DISP16, |
3515 |
|
BFD_RELOC_16C_DISP16_C, |
3516 |
|
BFD_RELOC_16C_DISP24, |
3517 |
|
BFD_RELOC_16C_DISP24_C, |
3518 |
|
BFD_RELOC_16C_DISP24a, |
3519 |
|
BFD_RELOC_16C_DISP24a_C, |
3520 |
|
BFD_RELOC_16C_REG04, |
3521 |
|
BFD_RELOC_16C_REG04_C, |
3522 |
|
BFD_RELOC_16C_REG04a, |
3523 |
|
BFD_RELOC_16C_REG04a_C, |
3524 |
|
BFD_RELOC_16C_REG14, |
3525 |
|
BFD_RELOC_16C_REG14_C, |
3526 |
|
BFD_RELOC_16C_REG16, |
3527 |
|
BFD_RELOC_16C_REG16_C, |
3528 |
|
BFD_RELOC_16C_REG20, |
3529 |
|
BFD_RELOC_16C_REG20_C, |
3530 |
|
BFD_RELOC_16C_ABS20, |
3531 |
|
BFD_RELOC_16C_ABS20_C, |
3532 |
|
BFD_RELOC_16C_ABS24, |
3533 |
|
BFD_RELOC_16C_ABS24_C, |
3534 |
|
BFD_RELOC_16C_IMM04, |
3535 |
|
BFD_RELOC_16C_IMM04_C, |
3536 |
|
BFD_RELOC_16C_IMM16, |
3537 |
|
BFD_RELOC_16C_IMM16_C, |
3538 |
|
BFD_RELOC_16C_IMM20, |
3539 |
|
BFD_RELOC_16C_IMM20_C, |
3540 |
|
BFD_RELOC_16C_IMM24, |
3541 |
|
BFD_RELOC_16C_IMM24_C, |
3542 |
|
BFD_RELOC_16C_IMM32, |
3543 |
|
BFD_RELOC_16C_IMM32_C, |
3544 |
|
|
3545 |
|
/* NS CRX Relocations. */ |
3546 |
|
BFD_RELOC_CRX_REL4, |
3547 |
|
BFD_RELOC_CRX_REL8, |
3548 |
|
BFD_RELOC_CRX_REL8_CMP, |
3549 |
|
BFD_RELOC_CRX_REL16, |
3550 |
|
BFD_RELOC_CRX_REL24, |
3551 |
|
BFD_RELOC_CRX_REL32, |
3552 |
|
BFD_RELOC_CRX_REGREL12, |
3553 |
|
BFD_RELOC_CRX_REGREL22, |
3554 |
|
BFD_RELOC_CRX_REGREL28, |
3555 |
|
BFD_RELOC_CRX_REGREL32, |
3556 |
|
BFD_RELOC_CRX_ABS16, |
3557 |
|
BFD_RELOC_CRX_ABS32, |
3558 |
|
BFD_RELOC_CRX_NUM8, |
3559 |
|
BFD_RELOC_CRX_NUM16, |
3560 |
|
BFD_RELOC_CRX_NUM32, |
3561 |
|
BFD_RELOC_CRX_IMM16, |
3562 |
|
BFD_RELOC_CRX_IMM32, |
3563 |
|
BFD_RELOC_CRX_SWITCH8, |
3564 |
|
BFD_RELOC_CRX_SWITCH16, |
3565 |
|
BFD_RELOC_CRX_SWITCH32, |
3566 |
|
|
3567 |
/* These relocs are only used within the CRIS assembler. They are not |
/* These relocs are only used within the CRIS assembler. They are not |
3568 |
(at present) written to any object files. */ |
(at present) written to any object files. */ |
3569 |
BFD_RELOC_CRIS_BDISP8, |
BFD_RELOC_CRIS_BDISP8, |
3570 |
BFD_RELOC_CRIS_UNSIGNED_5, |
BFD_RELOC_CRIS_UNSIGNED_5, |
3571 |
BFD_RELOC_CRIS_SIGNED_6, |
BFD_RELOC_CRIS_SIGNED_6, |
3572 |
BFD_RELOC_CRIS_UNSIGNED_6, |
BFD_RELOC_CRIS_UNSIGNED_6, |
3573 |
|
BFD_RELOC_CRIS_SIGNED_8, |
3574 |
|
BFD_RELOC_CRIS_UNSIGNED_8, |
3575 |
|
BFD_RELOC_CRIS_SIGNED_16, |
3576 |
|
BFD_RELOC_CRIS_UNSIGNED_16, |
3577 |
|
BFD_RELOC_CRIS_LAPCQ_OFFSET, |
3578 |
BFD_RELOC_CRIS_UNSIGNED_4, |
BFD_RELOC_CRIS_UNSIGNED_4, |
3579 |
|
|
3580 |
/* Relocs used in ELF shared libraries for CRIS. */ |
/* Relocs used in ELF shared libraries for CRIS. */ |
3651 |
|
|
3652 |
/* Sony Xstormy16 Relocations. */ |
/* Sony Xstormy16 Relocations. */ |
3653 |
BFD_RELOC_XSTORMY16_REL_12, |
BFD_RELOC_XSTORMY16_REL_12, |
3654 |
|
BFD_RELOC_XSTORMY16_12, |
3655 |
BFD_RELOC_XSTORMY16_24, |
BFD_RELOC_XSTORMY16_24, |
3656 |
BFD_RELOC_XSTORMY16_FPTR16, |
BFD_RELOC_XSTORMY16_FPTR16, |
3657 |
|
|
3659 |
BFD_RELOC_VAX_GLOB_DAT, |
BFD_RELOC_VAX_GLOB_DAT, |
3660 |
BFD_RELOC_VAX_JMP_SLOT, |
BFD_RELOC_VAX_JMP_SLOT, |
3661 |
BFD_RELOC_VAX_RELATIVE, |
BFD_RELOC_VAX_RELATIVE, |
3662 |
|
|
3663 |
|
/* msp430 specific relocation codes */ |
3664 |
|
BFD_RELOC_MSP430_10_PCREL, |
3665 |
|
BFD_RELOC_MSP430_16_PCREL, |
3666 |
|
BFD_RELOC_MSP430_16, |
3667 |
|
BFD_RELOC_MSP430_16_PCREL_BYTE, |
3668 |
|
BFD_RELOC_MSP430_16_BYTE, |
3669 |
|
BFD_RELOC_MSP430_2X_PCREL, |
3670 |
|
BFD_RELOC_MSP430_RL_PCREL, |
3671 |
|
|
3672 |
|
/* IQ2000 Relocations. */ |
3673 |
|
BFD_RELOC_IQ2000_OFFSET_16, |
3674 |
|
BFD_RELOC_IQ2000_OFFSET_21, |
3675 |
|
BFD_RELOC_IQ2000_UHI16, |
3676 |
|
|
3677 |
|
/* Special Xtensa relocation used only by PLT entries in ELF shared |
3678 |
|
objects to indicate that the runtime linker should set the value |
3679 |
|
to one of its own internal functions or data structures. */ |
3680 |
|
BFD_RELOC_XTENSA_RTLD, |
3681 |
|
|
3682 |
|
/* Xtensa relocations for ELF shared objects. */ |
3683 |
|
BFD_RELOC_XTENSA_GLOB_DAT, |
3684 |
|
BFD_RELOC_XTENSA_JMP_SLOT, |
3685 |
|
BFD_RELOC_XTENSA_RELATIVE, |
3686 |
|
|
3687 |
|
/* Xtensa relocation used in ELF object files for symbols that may require |
3688 |
|
PLT entries. Otherwise, this is just a generic 32-bit relocation. */ |
3689 |
|
BFD_RELOC_XTENSA_PLT, |
3690 |
|
|
3691 |
|
/* Xtensa relocations to mark the difference of two local symbols. |
3692 |
|
These are only needed to support linker relaxation and can be ignored |
3693 |
|
when not relaxing. The field is set to the value of the difference |
3694 |
|
assuming no relaxation. The relocation encodes the position of the |
3695 |
|
first symbol so the linker can determine whether to adjust the field |
3696 |
|
value. */ |
3697 |
|
BFD_RELOC_XTENSA_DIFF8, |
3698 |
|
BFD_RELOC_XTENSA_DIFF16, |
3699 |
|
BFD_RELOC_XTENSA_DIFF32, |
3700 |
|
|
3701 |
|
/* Generic Xtensa relocations for instruction operands. Only the slot |
3702 |
|
number is encoded in the relocation. The relocation applies to the |
3703 |
|
last PC-relative immediate operand, or if there are no PC-relative |
3704 |
|
immediates, to the last immediate operand. */ |
3705 |
|
BFD_RELOC_XTENSA_SLOT0_OP, |
3706 |
|
BFD_RELOC_XTENSA_SLOT1_OP, |
3707 |
|
BFD_RELOC_XTENSA_SLOT2_OP, |
3708 |
|
BFD_RELOC_XTENSA_SLOT3_OP, |
3709 |
|
BFD_RELOC_XTENSA_SLOT4_OP, |
3710 |
|
BFD_RELOC_XTENSA_SLOT5_OP, |
3711 |
|
BFD_RELOC_XTENSA_SLOT6_OP, |
3712 |
|
BFD_RELOC_XTENSA_SLOT7_OP, |
3713 |
|
BFD_RELOC_XTENSA_SLOT8_OP, |
3714 |
|
BFD_RELOC_XTENSA_SLOT9_OP, |
3715 |
|
BFD_RELOC_XTENSA_SLOT10_OP, |
3716 |
|
BFD_RELOC_XTENSA_SLOT11_OP, |
3717 |
|
BFD_RELOC_XTENSA_SLOT12_OP, |
3718 |
|
BFD_RELOC_XTENSA_SLOT13_OP, |
3719 |
|
BFD_RELOC_XTENSA_SLOT14_OP, |
3720 |
|
|
3721 |
|
/* Alternate Xtensa relocations. Only the slot is encoded in the |
3722 |
|
relocation. The meaning of these relocations is opcode-specific. */ |
3723 |
|
BFD_RELOC_XTENSA_SLOT0_ALT, |
3724 |
|
BFD_RELOC_XTENSA_SLOT1_ALT, |
3725 |
|
BFD_RELOC_XTENSA_SLOT2_ALT, |
3726 |
|
BFD_RELOC_XTENSA_SLOT3_ALT, |
3727 |
|
BFD_RELOC_XTENSA_SLOT4_ALT, |
3728 |
|
BFD_RELOC_XTENSA_SLOT5_ALT, |
3729 |
|
BFD_RELOC_XTENSA_SLOT6_ALT, |
3730 |
|
BFD_RELOC_XTENSA_SLOT7_ALT, |
3731 |
|
BFD_RELOC_XTENSA_SLOT8_ALT, |
3732 |
|
BFD_RELOC_XTENSA_SLOT9_ALT, |
3733 |
|
BFD_RELOC_XTENSA_SLOT10_ALT, |
3734 |
|
BFD_RELOC_XTENSA_SLOT11_ALT, |
3735 |
|
BFD_RELOC_XTENSA_SLOT12_ALT, |
3736 |
|
BFD_RELOC_XTENSA_SLOT13_ALT, |
3737 |
|
BFD_RELOC_XTENSA_SLOT14_ALT, |
3738 |
|
|
3739 |
|
/* Xtensa relocations for backward compatibility. These have all been |
3740 |
|
replaced by BFD_RELOC_XTENSA_SLOT0_OP. */ |
3741 |
|
BFD_RELOC_XTENSA_OP0, |
3742 |
|
BFD_RELOC_XTENSA_OP1, |
3743 |
|
BFD_RELOC_XTENSA_OP2, |
3744 |
|
|
3745 |
|
/* Xtensa relocation to mark that the assembler expanded the |
3746 |
|
instructions from an original target. The expansion size is |
3747 |
|
encoded in the reloc size. */ |
3748 |
|
BFD_RELOC_XTENSA_ASM_EXPAND, |
3749 |
|
|
3750 |
|
/* Xtensa relocation to mark that the linker should simplify |
3751 |
|
assembler-expanded instructions. This is commonly used |
3752 |
|
internally by the linker after analysis of a |
3753 |
|
BFD_RELOC_XTENSA_ASM_EXPAND. */ |
3754 |
|
BFD_RELOC_XTENSA_ASM_SIMPLIFY, |
3755 |
BFD_RELOC_UNUSED }; |
BFD_RELOC_UNUSED }; |
3756 |
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; |
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; |
3757 |
reloc_howto_type * |
reloc_howto_type *bfd_reloc_type_lookup |
3758 |
bfd_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); |
(bfd *abfd, bfd_reloc_code_real_type code); |
3759 |
|
|
3760 |
const char * |
const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code); |
|
bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code)); |
|
3761 |
|
|
3762 |
/* Extracted from syms.c. */ |
/* Extracted from syms.c. */ |
3763 |
|
|
3764 |
typedef struct symbol_cache_entry |
typedef struct bfd_symbol |
3765 |
{ |
{ |
3766 |
/* A pointer to the BFD which owns the symbol. This information |
/* A pointer to the BFD which owns the symbol. This information |
3767 |
is necessary so that a back end can work out what additional |
is necessary so that a back end can work out what additional |
3772 |
instead, except that some symbols point to the global sections |
instead, except that some symbols point to the global sections |
3773 |
bfd_{abs,com,und}_section. This could be fixed by making |
bfd_{abs,com,und}_section. This could be fixed by making |
3774 |
these globals be per-bfd (or per-target-flavor). FIXME. */ |
these globals be per-bfd (or per-target-flavor). FIXME. */ |
3775 |
struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */ |
struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */ |
3776 |
|
|
3777 |
/* The text of the symbol. The name is left alone, and not copied; the |
/* The text of the symbol. The name is left alone, and not copied; the |
3778 |
application may not alter it. */ |
application may not alter it. */ |
3802 |
<<BSF_LOCAL>>, <<BSF_FORT_COMM>>, <<BSF_UNDEFINED>> or |
<<BSF_LOCAL>>, <<BSF_FORT_COMM>>, <<BSF_UNDEFINED>> or |
3803 |
<<BSF_GLOBAL>>. */ |
<<BSF_GLOBAL>>. */ |
3804 |
|
|
3805 |
/* The symbol is a debugging record. The value has an arbitary |
/* The symbol is a debugging record. The value has an arbitrary |
3806 |
meaning, unless BSF_DEBUGGING_RELOC is also set. */ |
meaning, unless BSF_DEBUGGING_RELOC is also set. */ |
3807 |
#define BSF_DEBUGGING 0x08 |
#define BSF_DEBUGGING 0x08 |
3808 |
|
|
3873 |
/* A pointer to the section to which this symbol is |
/* A pointer to the section to which this symbol is |
3874 |
relative. This will always be non NULL, there are special |
relative. This will always be non NULL, there are special |
3875 |
sections for undefined and absolute symbols. */ |
sections for undefined and absolute symbols. */ |
3876 |
struct sec *section; |
struct bfd_section *section; |
3877 |
|
|
3878 |
/* Back end special data. */ |
/* Back end special data. */ |
3879 |
union |
union |
3880 |
{ |
{ |
3881 |
PTR p; |
void *p; |
3882 |
bfd_vma i; |
bfd_vma i; |
3883 |
} |
} |
3884 |
udata; |
udata; |
3888 |
#define bfd_get_symtab_upper_bound(abfd) \ |
#define bfd_get_symtab_upper_bound(abfd) \ |
3889 |
BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) |
BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) |
3890 |
|
|
3891 |
boolean |
bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); |
|
bfd_is_local_label PARAMS ((bfd *abfd, asymbol *sym)); |
|
3892 |
|
|
3893 |
boolean |
bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); |
|
bfd_is_local_label_name PARAMS ((bfd *abfd, const char *name)); |
|
3894 |
|
|
3895 |
#define bfd_is_local_label_name(abfd, name) \ |
#define bfd_is_local_label_name(abfd, name) \ |
3896 |
BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) |
BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) |
3897 |
|
|
3898 |
|
bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym); |
3899 |
|
|
3900 |
|
#define bfd_is_target_special_symbol(abfd, sym) \ |
3901 |
|
BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) |
3902 |
|
|
3903 |
#define bfd_canonicalize_symtab(abfd, location) \ |
#define bfd_canonicalize_symtab(abfd, location) \ |
3904 |
BFD_SEND (abfd, _bfd_canonicalize_symtab,\ |
BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) |
|
(abfd, location)) |
|
3905 |
|
|
3906 |
boolean |
bfd_boolean bfd_set_symtab |
3907 |
bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count)); |
(bfd *abfd, asymbol **location, unsigned int count); |
3908 |
|
|
3909 |
void |
void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol); |
|
bfd_print_symbol_vandf PARAMS ((bfd *abfd, PTR file, asymbol *symbol)); |
|
3910 |
|
|
3911 |
#define bfd_make_empty_symbol(abfd) \ |
#define bfd_make_empty_symbol(abfd) \ |
3912 |
BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) |
BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) |
3913 |
|
|
3914 |
asymbol * |
asymbol *_bfd_generic_make_empty_symbol (bfd *); |
|
_bfd_generic_make_empty_symbol PARAMS ((bfd *)); |
|
3915 |
|
|
3916 |
#define bfd_make_debug_symbol(abfd,ptr,size) \ |
#define bfd_make_debug_symbol(abfd,ptr,size) \ |
3917 |
BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) |
BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) |
3918 |
|
|
3919 |
int |
int bfd_decode_symclass (asymbol *symbol); |
|
bfd_decode_symclass PARAMS ((asymbol *symbol)); |
|
3920 |
|
|
3921 |
boolean |
bfd_boolean bfd_is_undefined_symclass (int symclass); |
|
bfd_is_undefined_symclass PARAMS ((int symclass)); |
|
3922 |
|
|
3923 |
void |
void bfd_symbol_info (asymbol *symbol, symbol_info *ret); |
|
bfd_symbol_info PARAMS ((asymbol *symbol, symbol_info *ret)); |
|
3924 |
|
|
3925 |
boolean |
bfd_boolean bfd_copy_private_symbol_data |
3926 |
bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym)); |
(bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym); |
3927 |
|
|
3928 |
#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \ |
#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \ |
3929 |
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ |
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ |
3930 |
(ibfd, isymbol, obfd, osymbol)) |
(ibfd, isymbol, obfd, osymbol)) |
3931 |
|
|
3932 |
/* Extracted from bfd.c. */ |
/* Extracted from bfd.c. */ |
3933 |
struct _bfd |
struct bfd |
3934 |
{ |
{ |
3935 |
|
/* A unique identifier of the BFD */ |
3936 |
|
unsigned int id; |
3937 |
|
|
3938 |
/* The filename the application opened the BFD with. */ |
/* The filename the application opened the BFD with. */ |
3939 |
const char *filename; |
const char *filename; |
3940 |
|
|
3941 |
/* A pointer to the target jump table. */ |
/* A pointer to the target jump table. */ |
3942 |
const struct bfd_target *xvec; |
const struct bfd_target *xvec; |
3943 |
|
|
3944 |
/* To avoid dragging too many header files into every file that |
/* The IOSTREAM, and corresponding IO vector that provide access |
3945 |
includes `<<bfd.h>>', IOSTREAM has been declared as a "char *", |
to the file backing the BFD. */ |
3946 |
and MTIME as a "long". Their correct types, to which they |
void *iostream; |
3947 |
are cast when used, are "FILE *" and "time_t". The iostream |
const struct bfd_iovec *iovec; |
|
is the result of an fopen on the filename. However, if the |
|
|
BFD_IN_MEMORY flag is set, then iostream is actually a pointer |
|
|
to a bfd_in_memory struct. */ |
|
|
PTR iostream; |
|
3948 |
|
|
3949 |
/* Is the file descriptor being cached? That is, can it be closed as |
/* Is the file descriptor being cached? That is, can it be closed as |
3950 |
needed, and re-opened when accessed later? */ |
needed, and re-opened when accessed later? */ |
3951 |
boolean cacheable; |
bfd_boolean cacheable; |
3952 |
|
|
3953 |
/* Marks whether there was a default target specified when the |
/* Marks whether there was a default target specified when the |
3954 |
BFD was opened. This is used to select which matching algorithm |
BFD was opened. This is used to select which matching algorithm |
3955 |
to use to choose the back end. */ |
to use to choose the back end. */ |
3956 |
boolean target_defaulted; |
bfd_boolean target_defaulted; |
3957 |
|
|
3958 |
/* The caching routines use these to maintain a |
/* The caching routines use these to maintain a |
3959 |
least-recently-used list of BFDs. */ |
least-recently-used list of BFDs. */ |
3960 |
struct _bfd *lru_prev, *lru_next; |
struct bfd *lru_prev, *lru_next; |
3961 |
|
|
3962 |
/* When a file is closed by the caching routines, BFD retains |
/* When a file is closed by the caching routines, BFD retains |
3963 |
state information on the file here... */ |
state information on the file here... */ |
3964 |
ufile_ptr where; |
ufile_ptr where; |
3965 |
|
|
3966 |
/* ... and here: (``once'' means at least once). */ |
/* ... and here: (``once'' means at least once). */ |
3967 |
boolean opened_once; |
bfd_boolean opened_once; |
3968 |
|
|
3969 |
/* Set if we have a locally maintained mtime value, rather than |
/* Set if we have a locally maintained mtime value, rather than |
3970 |
getting it from the file each time. */ |
getting it from the file each time. */ |
3971 |
boolean mtime_set; |
bfd_boolean mtime_set; |
3972 |
|
|
3973 |
/* File modified time, if mtime_set is true. */ |
/* File modified time, if mtime_set is TRUE. */ |
3974 |
long mtime; |
long mtime; |
3975 |
|
|
3976 |
/* Reserved for an unimplemented file locking extension. */ |
/* Reserved for an unimplemented file locking extension. */ |
3999 |
|
|
4000 |
/* Remember when output has begun, to stop strange things |
/* Remember when output has begun, to stop strange things |
4001 |
from happening. */ |
from happening. */ |
4002 |
boolean output_has_begun; |
bfd_boolean output_has_begun; |
4003 |
|
|
4004 |
/* A hash table for section names. */ |
/* A hash table for section names. */ |
4005 |
struct bfd_hash_table section_htab; |
struct bfd_hash_table section_htab; |
4006 |
|
|
4007 |
/* Pointer to linked list of sections. */ |
/* Pointer to linked list of sections. */ |
4008 |
struct sec *sections; |
struct bfd_section *sections; |
4009 |
|
|
4010 |
/* The place where we add to the section list. */ |
/* The place where we add to the section list. */ |
4011 |
struct sec **section_tail; |
struct bfd_section **section_tail; |
4012 |
|
|
4013 |
/* The number of sections. */ |
/* The number of sections. */ |
4014 |
unsigned int section_count; |
unsigned int section_count; |
4021 |
unsigned int symcount; |
unsigned int symcount; |
4022 |
|
|
4023 |
/* Symbol table for output BFD (with symcount entries). */ |
/* Symbol table for output BFD (with symcount entries). */ |
4024 |
struct symbol_cache_entry **outsymbols; |
struct bfd_symbol **outsymbols; |
4025 |
|
|
4026 |
|
/* Used for slurped dynamic symbol tables. */ |
4027 |
|
unsigned int dynsymcount; |
4028 |
|
|
4029 |
/* Pointer to structure which contains architecture information. */ |
/* Pointer to structure which contains architecture information. */ |
4030 |
const struct bfd_arch_info *arch_info; |
const struct bfd_arch_info *arch_info; |
4031 |
|
|
4032 |
|
/* Flag set if symbols from this BFD should not be exported. */ |
4033 |
|
bfd_boolean no_export; |
4034 |
|
|
4035 |
/* Stuff only useful for archives. */ |
/* Stuff only useful for archives. */ |
4036 |
PTR arelt_data; |
void *arelt_data; |
4037 |
struct _bfd *my_archive; /* The containing archive BFD. */ |
struct bfd *my_archive; /* The containing archive BFD. */ |
4038 |
struct _bfd *next; /* The next BFD in the archive. */ |
struct bfd *next; /* The next BFD in the archive. */ |
4039 |
struct _bfd *archive_head; /* The first BFD in the archive. */ |
struct bfd *archive_head; /* The first BFD in the archive. */ |
4040 |
boolean has_armap; |
bfd_boolean has_armap; |
4041 |
|
|
4042 |
/* A chain of BFD structures involved in a link. */ |
/* A chain of BFD structures involved in a link. */ |
4043 |
struct _bfd *link_next; |
struct bfd *link_next; |
4044 |
|
|
4045 |
/* A field used by _bfd_generic_link_add_archive_symbols. This will |
/* A field used by _bfd_generic_link_add_archive_symbols. This will |
4046 |
be used only for archive elements. */ |
be used only for archive elements. */ |
4080 |
struct netbsd_core_struct *netbsd_core_data; |
struct netbsd_core_struct *netbsd_core_data; |
4081 |
struct mach_o_data_struct *mach_o_data; |
struct mach_o_data_struct *mach_o_data; |
4082 |
struct mach_o_fat_data_struct *mach_o_fat_data; |
struct mach_o_fat_data_struct *mach_o_fat_data; |
4083 |
PTR any; |
struct bfd_pef_data_struct *pef_data; |
4084 |
|
struct bfd_pef_xlib_data_struct *pef_xlib_data; |
4085 |
|
struct bfd_sym_data_struct *sym_data; |
4086 |
|
void *any; |
4087 |
} |
} |
4088 |
tdata; |
tdata; |
4089 |
|
|
4090 |
/* Used by the application to hold private data. */ |
/* Used by the application to hold private data. */ |
4091 |
PTR usrdata; |
void *usrdata; |
4092 |
|
|
4093 |
/* Where all the allocated stuff under this BFD goes. This is a |
/* Where all the allocated stuff under this BFD goes. This is a |
4094 |
struct objalloc *, but we use PTR to avoid requiring the inclusion of |
struct objalloc *, but we use void * to avoid requiring the inclusion |
4095 |
objalloc.h. */ |
of objalloc.h. */ |
4096 |
PTR memory; |
void *memory; |
4097 |
}; |
}; |
4098 |
|
|
4099 |
typedef enum bfd_error |
typedef enum bfd_error |
4121 |
} |
} |
4122 |
bfd_error_type; |
bfd_error_type; |
4123 |
|
|
4124 |
bfd_error_type |
bfd_error_type bfd_get_error (void); |
|
bfd_get_error PARAMS ((void)); |
|
|
|
|
|
void |
|
|
bfd_set_error PARAMS ((bfd_error_type error_tag)); |
|
4125 |
|
|
4126 |
const char * |
void bfd_set_error (bfd_error_type error_tag); |
|
bfd_errmsg PARAMS ((bfd_error_type error_tag)); |
|
4127 |
|
|
4128 |
void |
const char *bfd_errmsg (bfd_error_type error_tag); |
|
bfd_perror PARAMS ((const char *message)); |
|
4129 |
|
|
4130 |
typedef void (*bfd_error_handler_type) PARAMS ((const char *, ...)); |
void bfd_perror (const char *message); |
4131 |
|
|
4132 |
bfd_error_handler_type |
typedef void (*bfd_error_handler_type) (const char *, ...); |
|
bfd_set_error_handler PARAMS ((bfd_error_handler_type)); |
|
4133 |
|
|
4134 |
void |
bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); |
|
bfd_set_error_program_name PARAMS ((const char *)); |
|
4135 |
|
|
4136 |
bfd_error_handler_type |
void bfd_set_error_program_name (const char *); |
|
bfd_get_error_handler PARAMS ((void)); |
|
4137 |
|
|
4138 |
const char * |
bfd_error_handler_type bfd_get_error_handler (void); |
|
bfd_archive_filename PARAMS ((bfd *)); |
|
4139 |
|
|
4140 |
long |
long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); |
|
bfd_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect)); |
|
4141 |
|
|
4142 |
long |
long bfd_canonicalize_reloc |
4143 |
bfd_canonicalize_reloc PARAMS ((bfd *abfd, |
(bfd *abfd, asection *sec, arelent **loc, asymbol **syms); |
|
asection *sec, |
|
|
arelent **loc, |
|
|
asymbol **syms)); |
|
4144 |
|
|
4145 |
void |
void bfd_set_reloc |
4146 |
bfd_set_reloc PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count)); |
(bfd *abfd, asection *sec, arelent **rel, unsigned int count); |
4147 |
|
|
4148 |
boolean |
bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); |
|
bfd_set_file_flags PARAMS ((bfd *abfd, flagword flags)); |
|
4149 |
|
|
4150 |
int |
int bfd_get_arch_size (bfd *abfd); |
|
bfd_get_arch_size PARAMS ((bfd *abfd)); |
|
4151 |
|
|
4152 |
int |
int bfd_get_sign_extend_vma (bfd *abfd); |
|
bfd_get_sign_extend_vma PARAMS ((bfd *abfd)); |
|
4153 |
|
|
4154 |
boolean |
bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma); |
|
bfd_set_start_address PARAMS ((bfd *abfd, bfd_vma vma)); |
|
4155 |
|
|
4156 |
long |
unsigned int bfd_get_gp_size (bfd *abfd); |
|
bfd_get_mtime PARAMS ((bfd *abfd)); |
|
4157 |
|
|
4158 |
long |
void bfd_set_gp_size (bfd *abfd, unsigned int i); |
|
bfd_get_size PARAMS ((bfd *abfd)); |
|
4159 |
|
|
4160 |
unsigned int |
bfd_vma bfd_scan_vma (const char *string, const char **end, int base); |
|
bfd_get_gp_size PARAMS ((bfd *abfd)); |
|
4161 |
|
|
4162 |
void |
bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); |
|
bfd_set_gp_size PARAMS ((bfd *abfd, unsigned int i)); |
|
4163 |
|
|
4164 |
bfd_vma |
#define bfd_copy_private_header_data(ibfd, obfd) \ |
4165 |
bfd_scan_vma PARAMS ((const char *string, const char **end, int base)); |
BFD_SEND (obfd, _bfd_copy_private_header_data, \ |
4166 |
|
(ibfd, obfd)) |
4167 |
boolean |
bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); |
|
bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd)); |
|
4168 |
|
|
4169 |
#define bfd_copy_private_bfd_data(ibfd, obfd) \ |
#define bfd_copy_private_bfd_data(ibfd, obfd) \ |
4170 |
BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ |
BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ |
4171 |
(ibfd, obfd)) |
(ibfd, obfd)) |
4172 |
boolean |
bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); |
|
bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd)); |
|
4173 |
|
|
4174 |
#define bfd_merge_private_bfd_data(ibfd, obfd) \ |
#define bfd_merge_private_bfd_data(ibfd, obfd) \ |
4175 |
BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ |
BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ |
4176 |
(ibfd, obfd)) |
(ibfd, obfd)) |
4177 |
boolean |
bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); |
|
bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags)); |
|
4178 |
|
|
4179 |
#define bfd_set_private_flags(abfd, flags) \ |
#define bfd_set_private_flags(abfd, flags) \ |
4180 |
BFD_SEND (abfd, _bfd_set_private_flags, \ |
BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags)) |
|
(abfd, flags)) |
|
4181 |
#define bfd_sizeof_headers(abfd, reloc) \ |
#define bfd_sizeof_headers(abfd, reloc) \ |
4182 |
BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc)) |
BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc)) |
4183 |
|
|
4184 |
#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ |
#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ |
4185 |
BFD_SEND (abfd, _bfd_find_nearest_line, (abfd, sec, syms, off, file, func, line)) |
BFD_SEND (abfd, _bfd_find_nearest_line, \ |
4186 |
|
(abfd, sec, syms, off, file, func, line)) |
4187 |
|
|
|
/* Do these three do anything useful at all, for any back end? */ |
|
4188 |
#define bfd_debug_info_start(abfd) \ |
#define bfd_debug_info_start(abfd) \ |
4189 |
BFD_SEND (abfd, _bfd_debug_info_start, (abfd)) |
BFD_SEND (abfd, _bfd_debug_info_start, (abfd)) |
4190 |
|
|
4191 |
#define bfd_debug_info_end(abfd) \ |
#define bfd_debug_info_end(abfd) \ |
4192 |
BFD_SEND (abfd, _bfd_debug_info_end, (abfd)) |
BFD_SEND (abfd, _bfd_debug_info_end, (abfd)) |
4193 |
|
|
4194 |
#define bfd_debug_info_accumulate(abfd, section) \ |
#define bfd_debug_info_accumulate(abfd, section) \ |
4195 |
BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section)) |
BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section)) |
|
|
|
4196 |
|
|
4197 |
#define bfd_stat_arch_elt(abfd, stat) \ |
#define bfd_stat_arch_elt(abfd, stat) \ |
4198 |
BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat)) |
BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat)) |
4199 |
|
|
4200 |
#define bfd_update_armap_timestamp(abfd) \ |
#define bfd_update_armap_timestamp(abfd) \ |
4201 |
BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd)) |
BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd)) |
4202 |
|
|
4203 |
#define bfd_set_arch_mach(abfd, arch, mach)\ |
#define bfd_set_arch_mach(abfd, arch, mach)\ |
4204 |
BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach)) |
BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach)) |
4205 |
|
|
4206 |
#define bfd_relax_section(abfd, section, link_info, again) \ |
#define bfd_relax_section(abfd, section, link_info, again) \ |
4207 |
BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again)) |
BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again)) |
4212 |
#define bfd_merge_sections(abfd, link_info) \ |
#define bfd_merge_sections(abfd, link_info) \ |
4213 |
BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info)) |
BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info)) |
4214 |
|
|
4215 |
|
#define bfd_is_group_section(abfd, sec) \ |
4216 |
|
BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec)) |
4217 |
|
|
4218 |
#define bfd_discard_group(abfd, sec) \ |
#define bfd_discard_group(abfd, sec) \ |
4219 |
BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) |
BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) |
4220 |
|
|
4227 |
#define bfd_link_add_symbols(abfd, info) \ |
#define bfd_link_add_symbols(abfd, info) \ |
4228 |
BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) |
BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) |
4229 |
|
|
4230 |
#define bfd_link_just_syms(sec, info) \ |
#define bfd_link_just_syms(abfd, sec, info) \ |
4231 |
BFD_SEND (abfd, _bfd_link_just_syms, (sec, info)) |
BFD_SEND (abfd, _bfd_link_just_syms, (sec, info)) |
4232 |
|
|
4233 |
#define bfd_final_link(abfd, info) \ |
#define bfd_final_link(abfd, info) \ |
4245 |
#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \ |
#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \ |
4246 |
BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols)) |
BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols)) |
4247 |
|
|
4248 |
|
#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \ |
4249 |
|
BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \ |
4250 |
|
dyncount, dynsyms, ret)) |
4251 |
|
|
4252 |
#define bfd_get_dynamic_reloc_upper_bound(abfd) \ |
#define bfd_get_dynamic_reloc_upper_bound(abfd) \ |
4253 |
BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd)) |
BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd)) |
4254 |
|
|
4256 |
BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms)) |
BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms)) |
4257 |
|
|
4258 |
extern bfd_byte *bfd_get_relocated_section_contents |
extern bfd_byte *bfd_get_relocated_section_contents |
4259 |
PARAMS ((bfd *, struct bfd_link_info *, |
(bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, |
4260 |
struct bfd_link_order *, bfd_byte *, |
bfd_boolean, asymbol **); |
4261 |
boolean, asymbol **)); |
|
4262 |
|
bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); |
4263 |
|
|
4264 |
|
struct bfd_preserve |
4265 |
|
{ |
4266 |
|
void *marker; |
4267 |
|
void *tdata; |
4268 |
|
flagword flags; |
4269 |
|
const struct bfd_arch_info *arch_info; |
4270 |
|
struct bfd_section *sections; |
4271 |
|
struct bfd_section **section_tail; |
4272 |
|
unsigned int section_count; |
4273 |
|
struct bfd_hash_table section_htab; |
4274 |
|
}; |
4275 |
|
|
4276 |
|
bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); |
4277 |
|
|
4278 |
boolean |
void bfd_preserve_restore (bfd *, struct bfd_preserve *); |
4279 |
bfd_alt_mach_code PARAMS ((bfd *abfd, int index)); |
|
4280 |
|
void bfd_preserve_finish (bfd *, struct bfd_preserve *); |
4281 |
|
|
4282 |
/* Extracted from archive.c. */ |
/* Extracted from archive.c. */ |
4283 |
symindex |
symindex bfd_get_next_mapent |
4284 |
bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym)); |
(bfd *abfd, symindex previous, carsym **sym); |
4285 |
|
|
4286 |
boolean |
bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head); |
|
bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head)); |
|
4287 |
|
|
4288 |
bfd * |
bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous); |
|
bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous)); |
|
4289 |
|
|
4290 |
/* Extracted from corefile.c. */ |
/* Extracted from corefile.c. */ |
4291 |
const char * |
const char *bfd_core_file_failing_command (bfd *abfd); |
|
bfd_core_file_failing_command PARAMS ((bfd *abfd)); |
|
4292 |
|
|
4293 |
int |
int bfd_core_file_failing_signal (bfd *abfd); |
|
bfd_core_file_failing_signal PARAMS ((bfd *abfd)); |
|
4294 |
|
|
4295 |
boolean |
bfd_boolean core_file_matches_executable_p |
4296 |
core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd)); |
(bfd *core_bfd, bfd *exec_bfd); |
4297 |
|
|
4298 |
/* Extracted from targets.c. */ |
/* Extracted from targets.c. */ |
4299 |
#define BFD_SEND(bfd, message, arglist) \ |
#define BFD_SEND(bfd, message, arglist) \ |
4300 |
((*((bfd)->xvec->message)) arglist) |
((*((bfd)->xvec->message)) arglist) |
4301 |
|
|
4302 |
#ifdef DEBUG_BFD_SEND |
#ifdef DEBUG_BFD_SEND |
4303 |
#undef BFD_SEND |
#undef BFD_SEND |
4307 |
(bfd_assert (__FILE__,__LINE__), NULL)) |
(bfd_assert (__FILE__,__LINE__), NULL)) |
4308 |
#endif |
#endif |
4309 |
#define BFD_SEND_FMT(bfd, message, arglist) \ |
#define BFD_SEND_FMT(bfd, message, arglist) \ |
4310 |
(((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) |
(((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) |
4311 |
|
|
4312 |
#ifdef DEBUG_BFD_SEND |
#ifdef DEBUG_BFD_SEND |
4313 |
#undef BFD_SEND_FMT |
#undef BFD_SEND_FMT |
4338 |
bfd_target_ovax_flavour, |
bfd_target_ovax_flavour, |
4339 |
bfd_target_evax_flavour, |
bfd_target_evax_flavour, |
4340 |
bfd_target_mmo_flavour, |
bfd_target_mmo_flavour, |
4341 |
bfd_target_mach_o_flavour |
bfd_target_mach_o_flavour, |
4342 |
|
bfd_target_pef_flavour, |
4343 |
|
bfd_target_pef_xlib_flavour, |
4344 |
|
bfd_target_sym_flavour |
4345 |
}; |
}; |
4346 |
|
|
4347 |
enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN }; |
enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN }; |
4383 |
unsigned short ar_max_namelen; |
unsigned short ar_max_namelen; |
4384 |
|
|
4385 |
/* Entries for byte swapping for data. These are different from the |
/* Entries for byte swapping for data. These are different from the |
4386 |
other entry points, since they don't take a BFD asthe first argument. |
other entry points, since they don't take a BFD as the first argument. |
4387 |
Certain other handlers could do the same. */ |
Certain other handlers could do the same. */ |
4388 |
bfd_vma (*bfd_getx64) PARAMS ((const bfd_byte *)); |
bfd_uint64_t (*bfd_getx64) (const void *); |
4389 |
bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *)); |
bfd_int64_t (*bfd_getx_signed_64) (const void *); |
4390 |
void (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *)); |
void (*bfd_putx64) (bfd_uint64_t, void *); |
4391 |
bfd_vma (*bfd_getx32) PARAMS ((const bfd_byte *)); |
bfd_vma (*bfd_getx32) (const void *); |
4392 |
bfd_signed_vma (*bfd_getx_signed_32) PARAMS ((const bfd_byte *)); |
bfd_signed_vma (*bfd_getx_signed_32) (const void *); |
4393 |
void (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *)); |
void (*bfd_putx32) (bfd_vma, void *); |
4394 |
bfd_vma (*bfd_getx16) PARAMS ((const bfd_byte *)); |
bfd_vma (*bfd_getx16) (const void *); |
4395 |
bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *)); |
bfd_signed_vma (*bfd_getx_signed_16) (const void *); |
4396 |
void (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *)); |
void (*bfd_putx16) (bfd_vma, void *); |
4397 |
|
|
4398 |
/* Byte swapping for the headers. */ |
/* Byte swapping for the headers. */ |
4399 |
bfd_vma (*bfd_h_getx64) PARAMS ((const bfd_byte *)); |
bfd_uint64_t (*bfd_h_getx64) (const void *); |
4400 |
bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *)); |
bfd_int64_t (*bfd_h_getx_signed_64) (const void *); |
4401 |
void (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *)); |
void (*bfd_h_putx64) (bfd_uint64_t, void *); |
4402 |
bfd_vma (*bfd_h_getx32) PARAMS ((const bfd_byte *)); |
bfd_vma (*bfd_h_getx32) (const void *); |
4403 |
bfd_signed_vma (*bfd_h_getx_signed_32) PARAMS ((const bfd_byte *)); |
bfd_signed_vma (*bfd_h_getx_signed_32) (const void *); |
4404 |
void (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *)); |
void (*bfd_h_putx32) (bfd_vma, void *); |
4405 |
bfd_vma (*bfd_h_getx16) PARAMS ((const bfd_byte *)); |
bfd_vma (*bfd_h_getx16) (const void *); |
4406 |
bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *)); |
bfd_signed_vma (*bfd_h_getx_signed_16) (const void *); |
4407 |
void (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *)); |
void (*bfd_h_putx16) (bfd_vma, void *); |
4408 |
|
|
4409 |
/* Format dependent routines: these are vectors of entry points |
/* Format dependent routines: these are vectors of entry points |
4410 |
within the target vector structure, one for each format to check. */ |
within the target vector structure, one for each format to check. */ |
4411 |
|
|
4412 |
/* Check the format of a file being read. Return a <<bfd_target *>> or zero. */ |
/* Check the format of a file being read. Return a <<bfd_target *>> or zero. */ |
4413 |
const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *)); |
const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); |
4414 |
|
|
4415 |
/* Set the format of a file being written. */ |
/* Set the format of a file being written. */ |
4416 |
boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *)); |
bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); |
4417 |
|
|
4418 |
/* Write cached information into a file being written, at <<bfd_close>>. */ |
/* Write cached information into a file being written, at <<bfd_close>>. */ |
4419 |
boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *)); |
bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *); |
4420 |
|
|
4421 |
|
|
4422 |
/* Generic entry points. */ |
/* Generic entry points. */ |
4423 |
#define BFD_JUMP_TABLE_GENERIC(NAME) \ |
#define BFD_JUMP_TABLE_GENERIC(NAME) \ |
4424 |
CONCAT2 (NAME,_close_and_cleanup), \ |
NAME##_close_and_cleanup, \ |
4425 |
CONCAT2 (NAME,_bfd_free_cached_info), \ |
NAME##_bfd_free_cached_info, \ |
4426 |
CONCAT2 (NAME,_new_section_hook), \ |
NAME##_new_section_hook, \ |
4427 |
CONCAT2 (NAME,_get_section_contents), \ |
NAME##_get_section_contents, \ |
4428 |
CONCAT2 (NAME,_get_section_contents_in_window) |
NAME##_get_section_contents_in_window |
4429 |
|
|
4430 |
/* Called when the BFD is being closed to do any necessary cleanup. */ |
/* Called when the BFD is being closed to do any necessary cleanup. */ |
4431 |
boolean (*_close_and_cleanup) PARAMS ((bfd *)); |
bfd_boolean (*_close_and_cleanup) (bfd *); |
4432 |
/* Ask the BFD to free all cached information. */ |
/* Ask the BFD to free all cached information. */ |
4433 |
boolean (*_bfd_free_cached_info) PARAMS ((bfd *)); |
bfd_boolean (*_bfd_free_cached_info) (bfd *); |
4434 |
/* Called when a new section is created. */ |
/* Called when a new section is created. */ |
4435 |
boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr)); |
bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); |
4436 |
/* Read the contents of a section. */ |
/* Read the contents of a section. */ |
4437 |
boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR, |
bfd_boolean (*_bfd_get_section_contents) |
4438 |
file_ptr, bfd_size_type)); |
(bfd *, sec_ptr, void *, file_ptr, bfd_size_type); |
4439 |
boolean (*_bfd_get_section_contents_in_window) |
bfd_boolean (*_bfd_get_section_contents_in_window) |
4440 |
PARAMS ((bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type)); |
(bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); |
4441 |
|
|
4442 |
/* Entry points to copy private data. */ |
/* Entry points to copy private data. */ |
4443 |
#define BFD_JUMP_TABLE_COPY(NAME) \ |
#define BFD_JUMP_TABLE_COPY(NAME) \ |
4444 |
CONCAT2 (NAME,_bfd_copy_private_bfd_data), \ |
NAME##_bfd_copy_private_bfd_data, \ |
4445 |
CONCAT2 (NAME,_bfd_merge_private_bfd_data), \ |
NAME##_bfd_merge_private_bfd_data, \ |
4446 |
CONCAT2 (NAME,_bfd_copy_private_section_data), \ |
NAME##_bfd_copy_private_section_data, \ |
4447 |
CONCAT2 (NAME,_bfd_copy_private_symbol_data), \ |
NAME##_bfd_copy_private_symbol_data, \ |
4448 |
CONCAT2 (NAME,_bfd_set_private_flags), \ |
NAME##_bfd_copy_private_header_data, \ |
4449 |
CONCAT2 (NAME,_bfd_print_private_bfd_data) \ |
NAME##_bfd_set_private_flags, \ |
4450 |
|
NAME##_bfd_print_private_bfd_data |
4451 |
|
|
4452 |
/* Called to copy BFD general private data from one object file |
/* Called to copy BFD general private data from one object file |
4453 |
to another. */ |
to another. */ |
4454 |
boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *)); |
bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); |
4455 |
/* Called to merge BFD general private data from one object file |
/* Called to merge BFD general private data from one object file |
4456 |
to a common output file when linking. */ |
to a common output file when linking. */ |
4457 |
boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *)); |
bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); |
4458 |
/* Called to copy BFD private section data from one object file |
/* Called to copy BFD private section data from one object file |
4459 |
to another. */ |
to another. */ |
4460 |
boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr, |
bfd_boolean (*_bfd_copy_private_section_data) |
4461 |
bfd *, sec_ptr)); |
(bfd *, sec_ptr, bfd *, sec_ptr); |
4462 |
/* Called to copy BFD private symbol data from one symbol |
/* Called to copy BFD private symbol data from one symbol |
4463 |
to another. */ |
to another. */ |
4464 |
boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *, |
bfd_boolean (*_bfd_copy_private_symbol_data) |
4465 |
bfd *, asymbol *)); |
(bfd *, asymbol *, bfd *, asymbol *); |
4466 |
|
/* Called to copy BFD private header data from one object file |
4467 |
|
to another. */ |
4468 |
|
bfd_boolean (*_bfd_copy_private_header_data) |
4469 |
|
(bfd *, bfd *); |
4470 |
/* Called to set private backend flags. */ |
/* Called to set private backend flags. */ |
4471 |
boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword)); |
bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); |
4472 |
|
|
4473 |
/* Called to print private BFD data. */ |
/* Called to print private BFD data. */ |
4474 |
boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR)); |
bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *); |
4475 |
|
|
4476 |
/* Core file entry points. */ |
/* Core file entry points. */ |
4477 |
#define BFD_JUMP_TABLE_CORE(NAME) \ |
#define BFD_JUMP_TABLE_CORE(NAME) \ |
4478 |
CONCAT2 (NAME,_core_file_failing_command), \ |
NAME##_core_file_failing_command, \ |
4479 |
CONCAT2 (NAME,_core_file_failing_signal), \ |
NAME##_core_file_failing_signal, \ |
4480 |
CONCAT2 (NAME,_core_file_matches_executable_p) |
NAME##_core_file_matches_executable_p |
4481 |
char * (*_core_file_failing_command) PARAMS ((bfd *)); |
|
4482 |
int (*_core_file_failing_signal) PARAMS ((bfd *)); |
char * (*_core_file_failing_command) (bfd *); |
4483 |
boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *)); |
int (*_core_file_failing_signal) (bfd *); |
4484 |
|
bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *); |
4485 |
|
|
4486 |
/* Archive entry points. */ |
/* Archive entry points. */ |
4487 |
#define BFD_JUMP_TABLE_ARCHIVE(NAME) \ |
#define BFD_JUMP_TABLE_ARCHIVE(NAME) \ |
4488 |
CONCAT2 (NAME,_slurp_armap), \ |
NAME##_slurp_armap, \ |
4489 |
CONCAT2 (NAME,_slurp_extended_name_table), \ |
NAME##_slurp_extended_name_table, \ |
4490 |
CONCAT2 (NAME,_construct_extended_name_table), \ |
NAME##_construct_extended_name_table, \ |
4491 |
CONCAT2 (NAME,_truncate_arname), \ |
NAME##_truncate_arname, \ |
4492 |
CONCAT2 (NAME,_write_armap), \ |
NAME##_write_armap, \ |
4493 |
CONCAT2 (NAME,_read_ar_hdr), \ |
NAME##_read_ar_hdr, \ |
4494 |
CONCAT2 (NAME,_openr_next_archived_file), \ |
NAME##_openr_next_archived_file, \ |
4495 |
CONCAT2 (NAME,_get_elt_at_index), \ |
NAME##_get_elt_at_index, \ |
4496 |
CONCAT2 (NAME,_generic_stat_arch_elt), \ |
NAME##_generic_stat_arch_elt, \ |
4497 |
CONCAT2 (NAME,_update_armap_timestamp) |
NAME##_update_armap_timestamp |
4498 |
boolean (*_bfd_slurp_armap) PARAMS ((bfd *)); |
|
4499 |
boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *)); |
bfd_boolean (*_bfd_slurp_armap) (bfd *); |
4500 |
boolean (*_bfd_construct_extended_name_table) |
bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); |
4501 |
PARAMS ((bfd *, char **, bfd_size_type *, const char **)); |
bfd_boolean (*_bfd_construct_extended_name_table) |
4502 |
void (*_bfd_truncate_arname) PARAMS ((bfd *, const char *, char *)); |
(bfd *, char **, bfd_size_type *, const char **); |
4503 |
boolean (*write_armap) |
void (*_bfd_truncate_arname) (bfd *, const char *, char *); |
4504 |
PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int)); |
bfd_boolean (*write_armap) |
4505 |
PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *)); |
(bfd *, unsigned int, struct orl *, unsigned int, int); |
4506 |
bfd * (*openr_next_archived_file) PARAMS ((bfd *, bfd *)); |
void * (*_bfd_read_ar_hdr_fn) (bfd *); |
4507 |
#define bfd_get_elt_at_index(b,i) BFD_SEND(b, _bfd_get_elt_at_index, (b,i)) |
bfd * (*openr_next_archived_file) (bfd *, bfd *); |
4508 |
bfd * (*_bfd_get_elt_at_index) PARAMS ((bfd *, symindex)); |
#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) |
4509 |
int (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *)); |
bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); |
4510 |
boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *)); |
int (*_bfd_stat_arch_elt) (bfd *, struct stat *); |
4511 |
|
bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); |
4512 |
|
|
4513 |
/* Entry points used for symbols. */ |
/* Entry points used for symbols. */ |
4514 |
#define BFD_JUMP_TABLE_SYMBOLS(NAME) \ |
#define BFD_JUMP_TABLE_SYMBOLS(NAME) \ |
4515 |
CONCAT2 (NAME,_get_symtab_upper_bound), \ |
NAME##_get_symtab_upper_bound, \ |
4516 |
CONCAT2 (NAME,_get_symtab), \ |
NAME##_canonicalize_symtab, \ |
4517 |
CONCAT2 (NAME,_make_empty_symbol), \ |
NAME##_make_empty_symbol, \ |
4518 |
CONCAT2 (NAME,_print_symbol), \ |
NAME##_print_symbol, \ |
4519 |
CONCAT2 (NAME,_get_symbol_info), \ |
NAME##_get_symbol_info, \ |
4520 |
CONCAT2 (NAME,_bfd_is_local_label_name), \ |
NAME##_bfd_is_local_label_name, \ |
4521 |
CONCAT2 (NAME,_get_lineno), \ |
NAME##_bfd_is_target_special_symbol, \ |
4522 |
CONCAT2 (NAME,_find_nearest_line), \ |
NAME##_get_lineno, \ |
4523 |
CONCAT2 (NAME,_bfd_make_debug_symbol), \ |
NAME##_find_nearest_line, \ |
4524 |
CONCAT2 (NAME,_read_minisymbols), \ |
NAME##_bfd_make_debug_symbol, \ |
4525 |
CONCAT2 (NAME,_minisymbol_to_symbol) |
NAME##_read_minisymbols, \ |
4526 |
long (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *)); |
NAME##_minisymbol_to_symbol |
4527 |
long (*_bfd_canonicalize_symtab) PARAMS ((bfd *, |
|
4528 |
struct symbol_cache_entry **)); |
long (*_bfd_get_symtab_upper_bound) (bfd *); |
4529 |
struct symbol_cache_entry * |
long (*_bfd_canonicalize_symtab) |
4530 |
(*_bfd_make_empty_symbol) PARAMS ((bfd *)); |
(bfd *, struct bfd_symbol **); |
4531 |
void (*_bfd_print_symbol) PARAMS ((bfd *, PTR, |
struct bfd_symbol * |
4532 |
struct symbol_cache_entry *, |
(*_bfd_make_empty_symbol) (bfd *); |
4533 |
bfd_print_symbol_type)); |
void (*_bfd_print_symbol) |
4534 |
#define bfd_print_symbol(b,p,s,e) BFD_SEND(b, _bfd_print_symbol, (b,p,s,e)) |
(bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); |
4535 |
void (*_bfd_get_symbol_info) PARAMS ((bfd *, |
#define bfd_print_symbol(b,p,s,e) BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) |
4536 |
struct symbol_cache_entry *, |
void (*_bfd_get_symbol_info) |
4537 |
symbol_info *)); |
(bfd *, struct bfd_symbol *, symbol_info *); |
4538 |
#define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e)) |
#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) |
4539 |
boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *)); |
bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); |
4540 |
|
bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); |
4541 |
alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *)); |
alent * (*_get_lineno) (bfd *, struct bfd_symbol *); |
4542 |
boolean (*_bfd_find_nearest_line) |
bfd_boolean (*_bfd_find_nearest_line) |
4543 |
PARAMS ((bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma, |
(bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, |
4544 |
const char **, const char **, unsigned int *)); |
const char **, const char **, unsigned int *); |
4545 |
/* Back-door to allow format-aware applications to create debug symbols |
/* Back-door to allow format-aware applications to create debug symbols |
4546 |
while using BFD for everything else. Currently used by the assembler |
while using BFD for everything else. Currently used by the assembler |
4547 |
when creating COFF files. */ |
when creating COFF files. */ |
4548 |
asymbol *(*_bfd_make_debug_symbol) PARAMS ((bfd *, void *, |
asymbol * (*_bfd_make_debug_symbol) |
4549 |
unsigned long size)); |
(bfd *, void *, unsigned long size); |
4550 |
#define bfd_read_minisymbols(b, d, m, s) \ |
#define bfd_read_minisymbols(b, d, m, s) \ |
4551 |
BFD_SEND (b, _read_minisymbols, (b, d, m, s)) |
BFD_SEND (b, _read_minisymbols, (b, d, m, s)) |
4552 |
long (*_read_minisymbols) PARAMS ((bfd *, boolean, PTR *, |
long (*_read_minisymbols) |
4553 |
unsigned int *)); |
(bfd *, bfd_boolean, void **, unsigned int *); |
4554 |
#define bfd_minisymbol_to_symbol(b, d, m, f) \ |
#define bfd_minisymbol_to_symbol(b, d, m, f) \ |
4555 |
BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) |
BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) |
4556 |
asymbol *(*_minisymbol_to_symbol) PARAMS ((bfd *, boolean, const PTR, |
asymbol * (*_minisymbol_to_symbol) |
4557 |
asymbol *)); |
(bfd *, bfd_boolean, const void *, asymbol *); |
4558 |
|
|
4559 |
/* Routines for relocs. */ |
/* Routines for relocs. */ |
4560 |
#define BFD_JUMP_TABLE_RELOCS(NAME) \ |
#define BFD_JUMP_TABLE_RELOCS(NAME) \ |
4561 |
CONCAT2 (NAME,_get_reloc_upper_bound), \ |
NAME##_get_reloc_upper_bound, \ |
4562 |
CONCAT2 (NAME,_canonicalize_reloc), \ |
NAME##_canonicalize_reloc, \ |
4563 |
CONCAT2 (NAME,_bfd_reloc_type_lookup) |
NAME##_bfd_reloc_type_lookup |
4564 |
long (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr)); |
|
4565 |
long (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **, |
long (*_get_reloc_upper_bound) (bfd *, sec_ptr); |
4566 |
struct symbol_cache_entry **)); |
long (*_bfd_canonicalize_reloc) |
4567 |
|
(bfd *, sec_ptr, arelent **, struct bfd_symbol **); |
4568 |
/* See documentation on reloc types. */ |
/* See documentation on reloc types. */ |
4569 |
reloc_howto_type * |
reloc_howto_type * |
4570 |
(*reloc_type_lookup) PARAMS ((bfd *, bfd_reloc_code_real_type)); |
(*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); |
4571 |
|
|
4572 |
/* Routines used when writing an object file. */ |
/* Routines used when writing an object file. */ |
4573 |
#define BFD_JUMP_TABLE_WRITE(NAME) \ |
#define BFD_JUMP_TABLE_WRITE(NAME) \ |
4574 |
CONCAT2 (NAME,_set_arch_mach), \ |
NAME##_set_arch_mach, \ |
4575 |
CONCAT2 (NAME,_set_section_contents) |
NAME##_set_section_contents |
4576 |
boolean (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture, |
|
4577 |
unsigned long)); |
bfd_boolean (*_bfd_set_arch_mach) |
4578 |
boolean (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR, |
(bfd *, enum bfd_architecture, unsigned long); |
4579 |
file_ptr, bfd_size_type)); |
bfd_boolean (*_bfd_set_section_contents) |
4580 |
|
(bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); |
4581 |
|
|
4582 |
/* Routines used by the linker. */ |
/* Routines used by the linker. */ |
4583 |
#define BFD_JUMP_TABLE_LINK(NAME) \ |
#define BFD_JUMP_TABLE_LINK(NAME) \ |
4584 |
CONCAT2 (NAME,_sizeof_headers), \ |
NAME##_sizeof_headers, \ |
4585 |
CONCAT2 (NAME,_bfd_get_relocated_section_contents), \ |
NAME##_bfd_get_relocated_section_contents, \ |
4586 |
CONCAT2 (NAME,_bfd_relax_section), \ |
NAME##_bfd_relax_section, \ |
4587 |
CONCAT2 (NAME,_bfd_link_hash_table_create), \ |
NAME##_bfd_link_hash_table_create, \ |
4588 |
CONCAT2 (NAME,_bfd_link_hash_table_free), \ |
NAME##_bfd_link_hash_table_free, \ |
4589 |
CONCAT2 (NAME,_bfd_link_add_symbols), \ |
NAME##_bfd_link_add_symbols, \ |
4590 |
CONCAT2 (NAME,_bfd_link_just_syms), \ |
NAME##_bfd_link_just_syms, \ |
4591 |
CONCAT2 (NAME,_bfd_final_link), \ |
NAME##_bfd_final_link, \ |
4592 |
CONCAT2 (NAME,_bfd_link_split_section), \ |
NAME##_bfd_link_split_section, \ |
4593 |
CONCAT2 (NAME,_bfd_gc_sections), \ |
NAME##_bfd_gc_sections, \ |
4594 |
CONCAT2 (NAME,_bfd_merge_sections), \ |
NAME##_bfd_merge_sections, \ |
4595 |
CONCAT2 (NAME,_bfd_discard_group) |
NAME##_bfd_is_group_section, \ |
4596 |
int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean)); |
NAME##_bfd_discard_group, \ |
4597 |
bfd_byte *(*_bfd_get_relocated_section_contents) |
NAME##_section_already_linked \ |
4598 |
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, |
|
4599 |
bfd_byte *, boolean, struct symbol_cache_entry **)); |
int (*_bfd_sizeof_headers) (bfd *, bfd_boolean); |
4600 |
|
bfd_byte * (*_bfd_get_relocated_section_contents) |
4601 |
|
(bfd *, struct bfd_link_info *, struct bfd_link_order *, |
4602 |
|
bfd_byte *, bfd_boolean, struct bfd_symbol **); |
4603 |
|
|
4604 |
boolean (*_bfd_relax_section) |
bfd_boolean (*_bfd_relax_section) |
4605 |
PARAMS ((bfd *, struct sec *, struct bfd_link_info *, boolean *)); |
(bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); |
4606 |
|
|
4607 |
/* Create a hash table for the linker. Different backends store |
/* Create a hash table for the linker. Different backends store |
4608 |
different information in this table. */ |
different information in this table. */ |
4609 |
struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *)); |
struct bfd_link_hash_table * |
4610 |
|
(*_bfd_link_hash_table_create) (bfd *); |
4611 |
|
|
4612 |
/* Release the memory associated with the linker hash table. */ |
/* Release the memory associated with the linker hash table. */ |
4613 |
void (*_bfd_link_hash_table_free) PARAMS ((struct bfd_link_hash_table *)); |
void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); |
4614 |
|
|
4615 |
/* Add symbols from this object file into the hash table. */ |
/* Add symbols from this object file into the hash table. */ |
4616 |
boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *)); |
bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); |
4617 |
|
|
4618 |
/* Indicate that we are only retrieving symbol values from this section. */ |
/* Indicate that we are only retrieving symbol values from this section. */ |
4619 |
void (*_bfd_link_just_syms) PARAMS ((asection *, struct bfd_link_info *)); |
void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); |
4620 |
|
|
4621 |
/* Do a link based on the link_order structures attached to each |
/* Do a link based on the link_order structures attached to each |
4622 |
section of the BFD. */ |
section of the BFD. */ |
4623 |
boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *)); |
bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *); |
4624 |
|
|
4625 |
/* Should this section be split up into smaller pieces during linking. */ |
/* Should this section be split up into smaller pieces during linking. */ |
4626 |
boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *)); |
bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); |
4627 |
|
|
4628 |
/* Remove sections that are not referenced from the output. */ |
/* Remove sections that are not referenced from the output. */ |
4629 |
boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *)); |
bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); |
4630 |
|
|
4631 |
/* Attempt to merge SEC_MERGE sections. */ |
/* Attempt to merge SEC_MERGE sections. */ |
4632 |
boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *)); |
bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); |
4633 |
|
|
4634 |
|
/* Is this section a member of a group? */ |
4635 |
|
bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); |
4636 |
|
|
4637 |
/* Discard members of a group. */ |
/* Discard members of a group. */ |
4638 |
boolean (*_bfd_discard_group) PARAMS ((bfd *, struct sec *)); |
bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); |
4639 |
|
|
4640 |
|
/* Check if SEC has been already linked during a reloceatable or |
4641 |
|
final link. */ |
4642 |
|
void (*_section_already_linked) (bfd *, struct bfd_section *); |
4643 |
|
|
4644 |
/* Routines to handle dynamic symbols and relocs. */ |
/* Routines to handle dynamic symbols and relocs. */ |
4645 |
#define BFD_JUMP_TABLE_DYNAMIC(NAME) \ |
#define BFD_JUMP_TABLE_DYNAMIC(NAME) \ |
4646 |
CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \ |
NAME##_get_dynamic_symtab_upper_bound, \ |
4647 |
CONCAT2 (NAME,_canonicalize_dynamic_symtab), \ |
NAME##_canonicalize_dynamic_symtab, \ |
4648 |
CONCAT2 (NAME,_get_dynamic_reloc_upper_bound), \ |
NAME##_get_synthetic_symtab, \ |
4649 |
CONCAT2 (NAME,_canonicalize_dynamic_reloc) |
NAME##_get_dynamic_reloc_upper_bound, \ |
4650 |
|
NAME##_canonicalize_dynamic_reloc |
4651 |
|
|
4652 |
/* Get the amount of memory required to hold the dynamic symbols. */ |
/* Get the amount of memory required to hold the dynamic symbols. */ |
4653 |
long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *)); |
long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); |
4654 |
/* Read in the dynamic symbols. */ |
/* Read in the dynamic symbols. */ |
4655 |
long (*_bfd_canonicalize_dynamic_symtab) |
long (*_bfd_canonicalize_dynamic_symtab) |
4656 |
PARAMS ((bfd *, struct symbol_cache_entry **)); |
(bfd *, struct bfd_symbol **); |
4657 |
|
/* Create synthetized symbols. */ |
4658 |
|
long (*_bfd_get_synthetic_symtab) |
4659 |
|
(bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, |
4660 |
|
struct bfd_symbol **); |
4661 |
/* Get the amount of memory required to hold the dynamic relocs. */ |
/* Get the amount of memory required to hold the dynamic relocs. */ |
4662 |
long (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *)); |
long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); |
4663 |
/* Read in the dynamic relocs. */ |
/* Read in the dynamic relocs. */ |
4664 |
long (*_bfd_canonicalize_dynamic_reloc) |
long (*_bfd_canonicalize_dynamic_reloc) |
4665 |
PARAMS ((bfd *, arelent **, struct symbol_cache_entry **)); |
(bfd *, arelent **, struct bfd_symbol **); |
4666 |
|
|
4667 |
/* Opposite endian version of this target. */ |
/* Opposite endian version of this target. */ |
4668 |
const struct bfd_target * alternative_target; |
const struct bfd_target * alternative_target; |
4669 |
|
|
4670 |
/* Data for use by back-end routines, which isn't |
/* Data for use by back-end routines, which isn't |
4671 |
generic enough to belong in this structure. */ |
generic enough to belong in this structure. */ |
4672 |
PTR backend_data; |
const void *backend_data; |
4673 |
|
|
4674 |
} bfd_target; |
} bfd_target; |
4675 |
|
|
4676 |
boolean |
bfd_boolean bfd_set_default_target (const char *name); |
|
bfd_set_default_target PARAMS ((const char *name)); |
|
4677 |
|
|
4678 |
const bfd_target * |
const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); |
|
bfd_find_target PARAMS ((const char *target_name, bfd *abfd)); |
|
4679 |
|
|
4680 |
const char ** |
const char ** bfd_target_list (void); |
|
bfd_target_list PARAMS ((void)); |
|
4681 |
|
|
4682 |
const bfd_target * |
const bfd_target *bfd_search_for_target |
4683 |
bfd_search_for_target PARAMS ((int (* search_func) (const bfd_target *, void *), void *)); |
(int (*search_func) (const bfd_target *, void *), |
4684 |
|
void *); |
4685 |
|
|
4686 |
/* Extracted from format.c. */ |
/* Extracted from format.c. */ |
4687 |
boolean |
bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); |
4688 |
bfd_check_format PARAMS ((bfd *abfd, bfd_format format)); |
|
4689 |
|
bfd_boolean bfd_check_format_matches |
4690 |
|
(bfd *abfd, bfd_format format, char ***matching); |
4691 |
|
|
4692 |
|
bfd_boolean bfd_set_format (bfd *abfd, bfd_format format); |
4693 |
|
|
4694 |
|
const char *bfd_format_string (bfd_format format); |
4695 |
|
|
4696 |
|
/* Extracted from linker.c. */ |
4697 |
|
bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); |
4698 |
|
|
4699 |
|
#define bfd_link_split_section(abfd, sec) \ |
4700 |
|
BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec)) |
4701 |
|
|
4702 |
boolean |
void bfd_section_already_linked (bfd *abfd, asection *sec); |
|
bfd_check_format_matches PARAMS ((bfd *abfd, bfd_format format, char ***matching)); |
|
4703 |
|
|
4704 |
boolean |
#define bfd_section_already_linked(abfd, sec) \ |
4705 |
bfd_set_format PARAMS ((bfd *abfd, bfd_format format)); |
BFD_SEND (abfd, _section_already_linked, (abfd, sec)) |
4706 |
|
|
4707 |
const char * |
/* Extracted from simple.c. */ |
4708 |
bfd_format_string PARAMS ((bfd_format format)); |
bfd_byte *bfd_simple_get_relocated_section_contents |
4709 |
|
(bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table); |
4710 |
|
|
4711 |
#ifdef __cplusplus |
#ifdef __cplusplus |
4712 |
} |
} |