Update for binutils_2_12_anoncvs_20020221.
This commit is contained in:
parent
1f85384086
commit
26830c9316
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=92307
@ -1,15 +1,14 @@
|
||||
/* $FreeBSD$ */
|
||||
|
||||
/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
|
||||
generated from "bfd-in.h", " ", "init.c", " ", "opncls.c",
|
||||
" ", "libbfd.c", " ", "section.c", " ", "archures.c ", "reloc.c ",
|
||||
"syms.c ", "bfd.c ", "archive.c ", "corefile.c ", "targets.c "
|
||||
and "format.c ".
|
||||
generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
|
||||
"section.c", "archures.c", "reloc.c", "syms.c", "bfd.c", "archive.c",
|
||||
"corefile.c", "targets.c" and "format.c".
|
||||
Run "make headers" in your build bfd/ to regenerate. */
|
||||
|
||||
/* Main header file for the bfd library -- portable access to object files.
|
||||
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
2000, 2001
|
||||
2000, 2001, 2002
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Support.
|
||||
|
||||
@ -36,9 +35,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* FreeBSD does not adhere to the System V 64-bit ABI. */
|
||||
#define ELF_DYNAMIC_INTERPRETER "/usr/libexec/ld-elf.so.1"
|
||||
|
||||
#include "ansidecl.h"
|
||||
#include "symcat.h"
|
||||
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
|
||||
@ -54,8 +50,8 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* #define BFD_VERSION 211930000 */
|
||||
/* #define BFD_VERSION_DATE 20020127 */
|
||||
/* #define BFD_VERSION_STRING "2.11.93 20020127" */
|
||||
/* #define BFD_VERSION_DATE 20020209 */
|
||||
/* #define BFD_VERSION_STRING "2.11.93 20020209" */
|
||||
|
||||
/* The word size used by BFD on the host. This may be 64 with a 32
|
||||
bit target if the host is 64 bit, or if other 64 bit targets have
|
||||
@ -65,11 +61,11 @@ extern "C" {
|
||||
/* The word size of the default bfd target. */
|
||||
#define BFD_DEFAULT_TARGET_SIZE 64
|
||||
|
||||
#if defined(__i386__)
|
||||
#if defined(__i386__) || defined(__powerpc__)
|
||||
#define BFD_HOST_64BIT_LONG 0
|
||||
#else
|
||||
#define BFD_HOST_64BIT_LONG 1
|
||||
#endif /* __i386__ */
|
||||
#endif /* 32-bit host */
|
||||
#if 0
|
||||
#define BFD_HOST_64_BIT
|
||||
#define BFD_HOST_U_64_BIT
|
||||
@ -87,7 +83,7 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* forward declaration */
|
||||
/* Forward declaration. */
|
||||
typedef struct _bfd bfd;
|
||||
|
||||
/* To squelch erroneous compiler warnings ("illegal pointer
|
||||
@ -104,8 +100,16 @@ typedef struct _bfd bfd;
|
||||
/* 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. */
|
||||
@ -207,14 +211,16 @@ extern void bfd_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma));
|
||||
typedef unsigned int flagword; /* 32 bits of flags */
|
||||
typedef unsigned char bfd_byte;
|
||||
|
||||
/** File formats */
|
||||
/* File formats. */
|
||||
|
||||
typedef enum bfd_format {
|
||||
bfd_unknown = 0, /* file format is unknown */
|
||||
bfd_object, /* linker/assember/compiler output */
|
||||
bfd_archive, /* object archive file */
|
||||
bfd_core, /* core dump */
|
||||
bfd_type_end} /* marks the end; don't use it! */
|
||||
typedef enum bfd_format
|
||||
{
|
||||
bfd_unknown = 0, /* File format is unknown. */
|
||||
bfd_object, /* Linker/assember/compiler output. */
|
||||
bfd_archive, /* Object archive file. */
|
||||
bfd_core, /* Core dump. */
|
||||
bfd_type_end /* Marks the end; don't use it! */
|
||||
}
|
||||
bfd_format;
|
||||
|
||||
/* Values that may appear in the flags field of a BFD. These also
|
||||
@ -274,7 +280,7 @@ typedef enum bfd_format {
|
||||
memory. If this is set, iostream points to a bfd_in_memory struct. */
|
||||
#define BFD_IN_MEMORY 0x800
|
||||
|
||||
/* symbols and relocation */
|
||||
/* Symbols and relocation. */
|
||||
|
||||
/* A count of carsyms (canonical archive symbols). */
|
||||
typedef unsigned long symindex;
|
||||
@ -299,32 +305,39 @@ typedef const struct reloc_howto_struct reloc_howto_type;
|
||||
|
||||
/* A canonical archive symbol. */
|
||||
/* This is a type pun with struct ranlib on purpose! */
|
||||
typedef struct carsym {
|
||||
typedef struct carsym
|
||||
{
|
||||
char *name;
|
||||
file_ptr file_offset; /* look here to find the file */
|
||||
} carsym; /* to make these you call a carsymogen */
|
||||
file_ptr file_offset; /* Look here to find the file. */
|
||||
}
|
||||
carsym; /* To make these you call a carsymogen. */
|
||||
|
||||
/* Used in generating armaps (archive tables of contents).
|
||||
Perhaps just a forward definition would do? */
|
||||
struct orl { /* output ranlib */
|
||||
char **name; /* symbol name */
|
||||
union {
|
||||
struct orl /* Output ranlib. */
|
||||
{
|
||||
char **name; /* Symbol name. */
|
||||
union
|
||||
{
|
||||
file_ptr pos;
|
||||
bfd *abfd;
|
||||
} u; /* bfd* or file position */
|
||||
int namidx; /* index into string table */
|
||||
} u; /* bfd* or file position. */
|
||||
int namidx; /* Index into string table. */
|
||||
};
|
||||
|
||||
/* Linenumber stuff */
|
||||
typedef struct lineno_cache_entry {
|
||||
unsigned int line_number; /* Linenumber from start of function*/
|
||||
union {
|
||||
struct symbol_cache_entry *sym; /* Function name */
|
||||
bfd_vma offset; /* Offset into section */
|
||||
/* Linenumber stuff. */
|
||||
typedef struct lineno_cache_entry
|
||||
{
|
||||
unsigned int line_number; /* Linenumber from start of function. */
|
||||
union
|
||||
{
|
||||
struct symbol_cache_entry *sym; /* Function name. */
|
||||
bfd_vma offset; /* Offset into section. */
|
||||
} u;
|
||||
} alent;
|
||||
}
|
||||
alent;
|
||||
|
||||
/* object and core file sections */
|
||||
/* Object and core file sections. */
|
||||
|
||||
#define align_power(addr, align) \
|
||||
( ((addr) + ((1<<(align))-1)) & (-1 << (align)))
|
||||
@ -463,7 +476,7 @@ extern void bfd_hash_traverse PARAMS ((struct bfd_hash_table *,
|
||||
|
||||
#define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table
|
||||
|
||||
/* User program access to BFD facilities */
|
||||
/* User program access to BFD facilities. */
|
||||
|
||||
/* Direct I/O routines, for programs which know more about the object
|
||||
file than BFD does. Use higher level routines if possible. */
|
||||
@ -679,6 +692,9 @@ extern int bfd_get_sign_extend_vma PARAMS ((bfd *));
|
||||
extern boolean bfd_m68k_elf32_create_embedded_relocs
|
||||
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
|
||||
char **));
|
||||
extern boolean bfd_mips_elf32_create_embedded_relocs
|
||||
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
|
||||
char **));
|
||||
|
||||
/* SunOS shared library support routines for the linker. */
|
||||
|
||||
@ -704,7 +720,8 @@ extern boolean bfd_sparclinux_size_dynamic_sections
|
||||
struct _bfd_window_internal;
|
||||
typedef struct _bfd_window_internal bfd_window_internal;
|
||||
|
||||
typedef struct _bfd_window {
|
||||
typedef struct _bfd_window
|
||||
{
|
||||
/* What the user asked for. */
|
||||
PTR data;
|
||||
bfd_size_type size;
|
||||
@ -715,7 +732,8 @@ typedef struct _bfd_window {
|
||||
application; don't want to give the same region back when the
|
||||
application wants two writable copies! */
|
||||
struct _bfd_window_internal *i;
|
||||
} bfd_window;
|
||||
}
|
||||
bfd_window;
|
||||
|
||||
extern void bfd_init_window PARAMS ((bfd_window *));
|
||||
extern void bfd_free_window PARAMS ((bfd_window *));
|
||||
@ -992,25 +1010,20 @@ typedef struct sec
|
||||
{
|
||||
/* The name of the section; the name isn't a copy, the pointer is
|
||||
the same as that passed to bfd_make_section. */
|
||||
|
||||
const char *name;
|
||||
|
||||
/* A unique sequence number. */
|
||||
|
||||
int id;
|
||||
|
||||
/* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
|
||||
|
||||
int index;
|
||||
|
||||
/* The next section in the list belonging to the BFD, or NULL. */
|
||||
|
||||
struct sec *next;
|
||||
|
||||
/* The field flags contains attributes of the section. Some
|
||||
flags are read in from the object file, and some are
|
||||
synthesized from other information. */
|
||||
|
||||
flagword flags;
|
||||
|
||||
#define SEC_NO_FLAGS 0x000
|
||||
@ -1219,25 +1232,21 @@ typedef struct sec
|
||||
backend can assign addresses (for example, in <<a.out>>, where
|
||||
the default address for <<.data>> is dependent on the specific
|
||||
target and various flags). */
|
||||
|
||||
bfd_vma vma;
|
||||
|
||||
/* The load address of the section - where it would be in a
|
||||
rom image; really only used for writing section header
|
||||
information. */
|
||||
|
||||
bfd_vma lma;
|
||||
|
||||
/* The size of the section in octets, as it will be output.
|
||||
Contains a value even if the section has no contents (e.g., the
|
||||
size of <<.bss>>). This will be filled in after relocation. */
|
||||
|
||||
bfd_size_type _cooked_size;
|
||||
|
||||
/* The original size on disk of the section, in octets. Normally this
|
||||
value is the same as the size, but if some relaxing has
|
||||
been done, then this value will be bigger. */
|
||||
|
||||
bfd_size_type _raw_size;
|
||||
|
||||
/* If this section is going to be output, then this value is the
|
||||
@ -1247,49 +1256,39 @@ typedef struct sec
|
||||
100th octet (8-bit quantity) in the output section, this value
|
||||
would be 100. However, if the target byte size is 16 bits
|
||||
(bfd_octets_per_byte is "2"), this value would be 50. */
|
||||
|
||||
bfd_vma output_offset;
|
||||
|
||||
/* The output section through which to map on output. */
|
||||
|
||||
struct sec *output_section;
|
||||
|
||||
/* The alignment requirement of the section, as an exponent of 2 -
|
||||
e.g., 3 aligns to 2^3 (or 8). */
|
||||
|
||||
unsigned int alignment_power;
|
||||
|
||||
/* If an input section, a pointer to a vector of relocation
|
||||
records for the data in this section. */
|
||||
|
||||
struct reloc_cache_entry *relocation;
|
||||
|
||||
/* If an output section, a pointer to a vector of pointers to
|
||||
relocation records for the data in this section. */
|
||||
|
||||
struct reloc_cache_entry **orelocation;
|
||||
|
||||
/* The number of relocation records in one of the above */
|
||||
|
||||
/* The number of relocation records in one of the above. */
|
||||
unsigned reloc_count;
|
||||
|
||||
/* Information below is back end specific - and not always used
|
||||
or updated. */
|
||||
|
||||
/* File position of section data. */
|
||||
|
||||
file_ptr filepos;
|
||||
|
||||
/* File position of relocation info. */
|
||||
|
||||
file_ptr rel_filepos;
|
||||
|
||||
/* File position of line data. */
|
||||
|
||||
file_ptr line_filepos;
|
||||
|
||||
/* Pointer to data for applications. */
|
||||
|
||||
PTR userdata;
|
||||
|
||||
/* If the SEC_IN_MEMORY flag is set, this points to the actual
|
||||
@ -1297,42 +1296,34 @@ typedef struct sec
|
||||
unsigned char *contents;
|
||||
|
||||
/* Attached line number information. */
|
||||
|
||||
alent *lineno;
|
||||
|
||||
/* Number of line number records. */
|
||||
|
||||
unsigned int lineno_count;
|
||||
|
||||
/* Entity size for merging purposes. */
|
||||
|
||||
unsigned int entsize;
|
||||
|
||||
/* Optional information about a COMDAT entry; NULL if not COMDAT. */
|
||||
|
||||
struct bfd_comdat_info *comdat;
|
||||
|
||||
/* When a section is being output, this value changes as more
|
||||
linenumbers are written out. */
|
||||
|
||||
file_ptr moving_line_filepos;
|
||||
|
||||
/* What the section number is in the target world. */
|
||||
|
||||
int target_index;
|
||||
|
||||
PTR used_by_bfd;
|
||||
|
||||
/* If this is a constructor section then here is a list of the
|
||||
relocations created to relocate items within it. */
|
||||
|
||||
struct relent_chain *constructor_chain;
|
||||
|
||||
/* The BFD which owns the section. */
|
||||
|
||||
bfd *owner;
|
||||
|
||||
/* A symbol which points at this section only */
|
||||
/* A symbol which points at this section only. */
|
||||
struct symbol_cache_entry *symbol;
|
||||
struct symbol_cache_entry **symbol_ptr_ptr;
|
||||
|
||||
@ -1350,18 +1341,18 @@ typedef struct sec
|
||||
#define BFD_COM_SECTION_NAME "*COM*"
|
||||
#define BFD_IND_SECTION_NAME "*IND*"
|
||||
|
||||
/* the absolute section */
|
||||
/* The absolute section. */
|
||||
extern const asection bfd_abs_section;
|
||||
#define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
|
||||
#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
|
||||
/* Pointer to the undefined section */
|
||||
/* Pointer to the undefined section. */
|
||||
extern const asection bfd_und_section;
|
||||
#define bfd_und_section_ptr ((asection *) &bfd_und_section)
|
||||
#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
|
||||
/* Pointer to the common section */
|
||||
/* Pointer to the common section. */
|
||||
extern const asection bfd_com_section;
|
||||
#define bfd_com_section_ptr ((asection *) &bfd_com_section)
|
||||
/* Pointer to the indirect section */
|
||||
/* Pointer to the indirect section. */
|
||||
extern const asection bfd_ind_section;
|
||||
#define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
|
||||
#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
|
||||
@ -1463,8 +1454,8 @@ _bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *se
|
||||
|
||||
enum bfd_architecture
|
||||
{
|
||||
bfd_arch_unknown, /* File arch not known */
|
||||
bfd_arch_obscure, /* Arch known, not one of these */
|
||||
bfd_arch_unknown, /* File arch not known. */
|
||||
bfd_arch_obscure, /* Arch known, not one of these. */
|
||||
bfd_arch_m68k, /* Motorola 68xxx */
|
||||
#define bfd_mach_m68000 1
|
||||
#define bfd_mach_m68008 2
|
||||
@ -1497,6 +1488,8 @@ enum bfd_architecture
|
||||
#define bfd_mach_i960_jx 7
|
||||
#define bfd_mach_i960_hx 8
|
||||
|
||||
bfd_arch_or32, /* OpenRISC 32 */
|
||||
|
||||
bfd_arch_a29k, /* AMD 29000 */
|
||||
bfd_arch_sparc, /* SPARC */
|
||||
#define bfd_mach_sparc 1
|
||||
@ -1504,12 +1497,12 @@ enum bfd_architecture
|
||||
#define bfd_mach_sparc_sparclet 2
|
||||
#define bfd_mach_sparc_sparclite 3
|
||||
#define bfd_mach_sparc_v8plus 4
|
||||
#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */
|
||||
#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */
|
||||
#define bfd_mach_sparc_sparclite_le 6
|
||||
#define bfd_mach_sparc_v9 7
|
||||
#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns */
|
||||
#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns */
|
||||
#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns */
|
||||
#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */
|
||||
#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */
|
||||
#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */
|
||||
/* Nonzero if MACH has the v9 instruction set. */
|
||||
#define bfd_mach_sparc_v9_p(mach) \
|
||||
((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
|
||||
@ -1557,6 +1550,7 @@ enum bfd_architecture
|
||||
bfd_arch_pdp11, /* DEC PDP-11 */
|
||||
bfd_arch_powerpc, /* PowerPC */
|
||||
#define bfd_mach_ppc 0
|
||||
#define bfd_mach_ppc64 1
|
||||
#define bfd_mach_ppc_403 403
|
||||
#define bfd_mach_ppc_403gc 4030
|
||||
#define bfd_mach_ppc_505 505
|
||||
@ -1598,11 +1592,12 @@ enum bfd_architecture
|
||||
#define bfd_mach_sh3_dsp 0x3d
|
||||
#define bfd_mach_sh3e 0x3e
|
||||
#define bfd_mach_sh4 0x40
|
||||
#define bfd_mach_sh5 0x50
|
||||
bfd_arch_alpha, /* Dec Alpha */
|
||||
#define bfd_mach_alpha_ev4 0x10
|
||||
#define bfd_mach_alpha_ev5 0x20
|
||||
#define bfd_mach_alpha_ev6 0x30
|
||||
bfd_arch_arm, /* Advanced Risc Machines ARM */
|
||||
bfd_arch_arm, /* Advanced Risc Machines ARM. */
|
||||
#define bfd_mach_arm_2 1
|
||||
#define bfd_mach_arm_2a 2
|
||||
#define bfd_mach_arm_3 3
|
||||
@ -1628,7 +1623,7 @@ enum bfd_architecture
|
||||
#define bfd_mach_arc_7 2
|
||||
#define bfd_mach_arc_8 3
|
||||
bfd_arch_m32r, /* Mitsubishi M32R/D */
|
||||
#define bfd_mach_m32r 0 /* backwards compatibility */
|
||||
#define bfd_mach_m32r 0 /* For backwards compatibility. */
|
||||
#define bfd_mach_m32rx 'x'
|
||||
bfd_arch_mn10200, /* Matsushita MN10200 */
|
||||
bfd_arch_mn10300, /* Matsushita MN10300 */
|
||||
@ -1641,7 +1636,7 @@ enum bfd_architecture
|
||||
#define bfd_mach_ia64_elf64 0
|
||||
#define bfd_mach_ia64_elf32 1
|
||||
bfd_arch_pj,
|
||||
bfd_arch_avr, /* Atmel AVR microcontrollers */
|
||||
bfd_arch_avr, /* Atmel AVR microcontrollers. */
|
||||
#define bfd_mach_avr1 1
|
||||
#define bfd_mach_avr2 2
|
||||
#define bfd_mach_avr3 3
|
||||
@ -1652,7 +1647,7 @@ enum bfd_architecture
|
||||
#define bfd_mach_s390_esa 0
|
||||
#define bfd_mach_s390_esame 1
|
||||
bfd_arch_openrisc, /* OpenRISC */
|
||||
bfd_arch_mmix, /* Donald Knuth's educational processor */
|
||||
bfd_arch_mmix, /* Donald Knuth's educational processor. */
|
||||
bfd_arch_xstormy16,
|
||||
#define bfd_mach_xstormy16 0
|
||||
bfd_arch_last
|
||||
@ -1677,7 +1672,9 @@ typedef struct bfd_arch_info
|
||||
boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
|
||||
|
||||
const struct bfd_arch_info *next;
|
||||
} bfd_arch_info_type;
|
||||
}
|
||||
bfd_arch_info_type;
|
||||
|
||||
const char *
|
||||
bfd_printable_name PARAMS ((bfd *abfd));
|
||||
|
||||
@ -1727,7 +1724,7 @@ bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
|
||||
|
||||
typedef enum bfd_reloc_status
|
||||
{
|
||||
/* No errors detected */
|
||||
/* No errors detected. */
|
||||
bfd_reloc_ok,
|
||||
|
||||
/* The relocation was performed, but there was an overflow. */
|
||||
@ -1736,13 +1733,13 @@ typedef enum bfd_reloc_status
|
||||
/* The address to relocate was not within the section supplied. */
|
||||
bfd_reloc_outofrange,
|
||||
|
||||
/* Used by special functions */
|
||||
/* Used by special functions. */
|
||||
bfd_reloc_continue,
|
||||
|
||||
/* Unsupported relocation size requested. */
|
||||
bfd_reloc_notsupported,
|
||||
|
||||
/* Unused */
|
||||
/* Unused. */
|
||||
bfd_reloc_other,
|
||||
|
||||
/* The symbol to relocate against was undefined. */
|
||||
@ -1759,19 +1756,21 @@ typedef enum bfd_reloc_status
|
||||
|
||||
typedef struct reloc_cache_entry
|
||||
{
|
||||
/* A pointer into the canonical table of pointers */
|
||||
/* A pointer into the canonical table of pointers. */
|
||||
struct symbol_cache_entry **sym_ptr_ptr;
|
||||
|
||||
/* offset in section */
|
||||
/* offset in section. */
|
||||
bfd_size_type address;
|
||||
|
||||
/* addend for relocation value */
|
||||
/* addend for relocation value. */
|
||||
bfd_vma addend;
|
||||
|
||||
/* Pointer to how to perform the required relocation */
|
||||
/* Pointer to how to perform the required relocation. */
|
||||
reloc_howto_type *howto;
|
||||
|
||||
} arelent;
|
||||
}
|
||||
arelent;
|
||||
|
||||
enum complain_overflow
|
||||
{
|
||||
/* Do not complain on overflow. */
|
||||
@ -1878,6 +1877,7 @@ struct reloc_howto_struct
|
||||
empty (e.g., m88k bcs); this flag signals the fact. */
|
||||
boolean pcrel_offset;
|
||||
};
|
||||
|
||||
#define HOWTO(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 }
|
||||
#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \
|
||||
@ -1902,6 +1902,7 @@ struct reloc_howto_struct
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
unsigned int
|
||||
bfd_get_reloc_size PARAMS ((reloc_howto_type *));
|
||||
|
||||
@ -1909,7 +1910,9 @@ typedef struct relent_chain
|
||||
{
|
||||
arelent relent;
|
||||
struct relent_chain *next;
|
||||
} arelent_chain;
|
||||
}
|
||||
arelent_chain;
|
||||
|
||||
bfd_reloc_status_type
|
||||
bfd_check_overflow PARAMS ((enum complain_overflow how,
|
||||
unsigned int bitsize,
|
||||
@ -2139,6 +2142,11 @@ GP register. */
|
||||
BFD_RELOC_ALPHA_GPREL_HI16,
|
||||
BFD_RELOC_ALPHA_GPREL_LO16,
|
||||
|
||||
/* Like BFD_RELOC_23_PCREL_S2, except that the source and target must
|
||||
share a common GP, and the target address is adjusted for
|
||||
STO_ALPHA_STD_GPLOAD. */
|
||||
BFD_RELOC_ALPHA_BRSGP,
|
||||
|
||||
/* Bits 27..2 of the relocation address shifted right 2 bits;
|
||||
simple reloc otherwise. */
|
||||
BFD_RELOC_MIPS_JMP,
|
||||
@ -2192,6 +2200,55 @@ to compensate for the borrow when the low bits are added. */
|
||||
BFD_RELOC_MIPS_REL16,
|
||||
BFD_RELOC_MIPS_RELGOT,
|
||||
BFD_RELOC_MIPS_JALR,
|
||||
BFD_RELOC_SH_GOT_LOW16,
|
||||
BFD_RELOC_SH_GOT_MEDLOW16,
|
||||
BFD_RELOC_SH_GOT_MEDHI16,
|
||||
BFD_RELOC_SH_GOT_HI16,
|
||||
BFD_RELOC_SH_GOTPLT_LOW16,
|
||||
BFD_RELOC_SH_GOTPLT_MEDLOW16,
|
||||
BFD_RELOC_SH_GOTPLT_MEDHI16,
|
||||
BFD_RELOC_SH_GOTPLT_HI16,
|
||||
BFD_RELOC_SH_PLT_LOW16,
|
||||
BFD_RELOC_SH_PLT_MEDLOW16,
|
||||
BFD_RELOC_SH_PLT_MEDHI16,
|
||||
BFD_RELOC_SH_PLT_HI16,
|
||||
BFD_RELOC_SH_GOTOFF_LOW16,
|
||||
BFD_RELOC_SH_GOTOFF_MEDLOW16,
|
||||
BFD_RELOC_SH_GOTOFF_MEDHI16,
|
||||
BFD_RELOC_SH_GOTOFF_HI16,
|
||||
BFD_RELOC_SH_GOTPC_LOW16,
|
||||
BFD_RELOC_SH_GOTPC_MEDLOW16,
|
||||
BFD_RELOC_SH_GOTPC_MEDHI16,
|
||||
BFD_RELOC_SH_GOTPC_HI16,
|
||||
BFD_RELOC_SH_COPY64,
|
||||
BFD_RELOC_SH_GLOB_DAT64,
|
||||
BFD_RELOC_SH_JMP_SLOT64,
|
||||
BFD_RELOC_SH_RELATIVE64,
|
||||
BFD_RELOC_SH_GOT10BY4,
|
||||
BFD_RELOC_SH_GOT10BY8,
|
||||
BFD_RELOC_SH_GOTPLT10BY4,
|
||||
BFD_RELOC_SH_GOTPLT10BY8,
|
||||
BFD_RELOC_SH_GOTPLT32,
|
||||
BFD_RELOC_SH_SHMEDIA_CODE,
|
||||
BFD_RELOC_SH_IMMU5,
|
||||
BFD_RELOC_SH_IMMS6,
|
||||
BFD_RELOC_SH_IMMS6BY32,
|
||||
BFD_RELOC_SH_IMMU6,
|
||||
BFD_RELOC_SH_IMMS10,
|
||||
BFD_RELOC_SH_IMMS10BY2,
|
||||
BFD_RELOC_SH_IMMS10BY4,
|
||||
BFD_RELOC_SH_IMMS10BY8,
|
||||
BFD_RELOC_SH_IMMS16,
|
||||
BFD_RELOC_SH_IMMU16,
|
||||
BFD_RELOC_SH_IMM_LOW16,
|
||||
BFD_RELOC_SH_IMM_LOW16_PCREL,
|
||||
BFD_RELOC_SH_IMM_MEDLOW16,
|
||||
BFD_RELOC_SH_IMM_MEDLOW16_PCREL,
|
||||
BFD_RELOC_SH_IMM_MEDHI16,
|
||||
BFD_RELOC_SH_IMM_MEDHI16_PCREL,
|
||||
BFD_RELOC_SH_IMM_HI16,
|
||||
BFD_RELOC_SH_IMM_HI16_PCREL,
|
||||
BFD_RELOC_SH_PT_16,
|
||||
|
||||
|
||||
/* i386/elf relocations */
|
||||
@ -2988,7 +3045,6 @@ typedef struct symbol_cache_entry
|
||||
instead, except that some symbols point to the global sections
|
||||
bfd_{abs,com,und}_section. This could be fixed by making
|
||||
these globals be per-bfd (or per-target-flavor). FIXME. */
|
||||
|
||||
struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
|
||||
|
||||
/* The text of the symbol. The name is left alone, and not copied; the
|
||||
@ -3000,8 +3056,7 @@ typedef struct symbol_cache_entry
|
||||
a pointer to another symbol is stored here. */
|
||||
symvalue value;
|
||||
|
||||
/* Attributes of a symbol: */
|
||||
|
||||
/* Attributes of a symbol. */
|
||||
#define BSF_NO_FLAGS 0x00
|
||||
|
||||
/* The symbol has local scope; <<static>> in <<C>>. The value
|
||||
@ -3014,11 +3069,11 @@ typedef struct symbol_cache_entry
|
||||
|
||||
/* The symbol has global scope and is exported. The value is
|
||||
the offset into the section of the data. */
|
||||
#define BSF_EXPORT BSF_GLOBAL /* no real difference */
|
||||
#define BSF_EXPORT BSF_GLOBAL /* No real difference. */
|
||||
|
||||
/* A normal C symbol would be one of:
|
||||
<<BSF_LOCAL>>, <<BSF_FORT_COMM>>, <<BSF_UNDEFINED>> or
|
||||
<<BSF_GLOBAL>> */
|
||||
<<BSF_GLOBAL>>. */
|
||||
|
||||
/* The symbol is a debugging record. The value has an arbitary
|
||||
meaning, unless BSF_DEBUGGING_RELOC is also set. */
|
||||
@ -3052,7 +3107,6 @@ typedef struct symbol_cache_entry
|
||||
which is also <<C_EXT>> symbol appears where it was
|
||||
declared and not at the end of a section. This bit is set
|
||||
by the target BFD part to convey this information. */
|
||||
|
||||
#define BSF_NOT_AT_END 0x400
|
||||
|
||||
/* Signal that the symbol is the label of constructor section. */
|
||||
@ -3096,11 +3150,14 @@ typedef struct symbol_cache_entry
|
||||
{
|
||||
PTR p;
|
||||
bfd_vma i;
|
||||
} udata;
|
||||
}
|
||||
udata;
|
||||
}
|
||||
asymbol;
|
||||
|
||||
} asymbol;
|
||||
#define bfd_get_symtab_upper_bound(abfd) \
|
||||
BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
|
||||
|
||||
boolean
|
||||
bfd_is_local_label PARAMS ((bfd *abfd, asymbol *sym));
|
||||
|
||||
@ -3109,9 +3166,11 @@ bfd_is_local_label_name PARAMS ((bfd *abfd, const char *name));
|
||||
|
||||
#define bfd_is_local_label_name(abfd, name) \
|
||||
BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
|
||||
|
||||
#define bfd_canonicalize_symtab(abfd, location) \
|
||||
BFD_SEND (abfd, _bfd_canonicalize_symtab,\
|
||||
(abfd, location))
|
||||
|
||||
boolean
|
||||
bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count));
|
||||
|
||||
@ -3120,11 +3179,13 @@ bfd_print_symbol_vandf PARAMS ((bfd *abfd, PTR file, asymbol *symbol));
|
||||
|
||||
#define bfd_make_empty_symbol(abfd) \
|
||||
BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
|
||||
|
||||
asymbol *
|
||||
_bfd_generic_make_empty_symbol PARAMS ((bfd *));
|
||||
|
||||
#define bfd_make_debug_symbol(abfd,ptr,size) \
|
||||
BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
|
||||
|
||||
int
|
||||
bfd_decode_symclass PARAMS ((asymbol *symbol));
|
||||
|
||||
@ -3140,6 +3201,7 @@ bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymb
|
||||
#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
|
||||
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
|
||||
(ibfd, isymbol, obfd, osymbol))
|
||||
|
||||
struct _bfd
|
||||
{
|
||||
/* The filename the application opened the BFD with. */
|
||||
@ -3149,8 +3211,8 @@ struct _bfd
|
||||
const struct bfd_target *xvec;
|
||||
|
||||
/* To avoid dragging too many header files into every file that
|
||||
includes `<<bfd.h>>', IOSTREAM has been declared as a "char
|
||||
*", and MTIME as a "long". Their correct types, to which they
|
||||
includes `<<bfd.h>>', IOSTREAM has been declared as a "char *",
|
||||
and MTIME as a "long". Their correct types, to which they
|
||||
are cast when used, are "FILE *" and "time_t". The iostream
|
||||
is the result of an fopen on the filename. However, if the
|
||||
BFD_IN_MEMORY flag is set, then iostream is actually a pointer
|
||||
@ -3159,61 +3221,53 @@ struct _bfd
|
||||
|
||||
/* Is the file descriptor being cached? That is, can it be closed as
|
||||
needed, and re-opened when accessed later? */
|
||||
|
||||
boolean cacheable;
|
||||
|
||||
/* Marks whether there was a default target specified when the
|
||||
BFD was opened. This is used to select which matching algorithm
|
||||
to use to choose the back end. */
|
||||
|
||||
boolean target_defaulted;
|
||||
|
||||
/* The caching routines use these to maintain a
|
||||
least-recently-used list of BFDs */
|
||||
|
||||
least-recently-used list of BFDs. */
|
||||
struct _bfd *lru_prev, *lru_next;
|
||||
|
||||
/* When a file is closed by the caching routines, BFD retains
|
||||
state information on the file here: */
|
||||
|
||||
state information on the file here... */
|
||||
ufile_ptr where;
|
||||
|
||||
/* and here: (``once'' means at least once) */
|
||||
|
||||
/* ... and here: (``once'' means at least once). */
|
||||
boolean opened_once;
|
||||
|
||||
/* Set if we have a locally maintained mtime value, rather than
|
||||
getting it from the file each time: */
|
||||
|
||||
getting it from the file each time. */
|
||||
boolean mtime_set;
|
||||
|
||||
/* File modified time, if mtime_set is true: */
|
||||
|
||||
/* File modified time, if mtime_set is true. */
|
||||
long mtime;
|
||||
|
||||
/* Reserved for an unimplemented file locking extension. */
|
||||
|
||||
int ifd;
|
||||
|
||||
/* The format which belongs to the BFD. (object, core, etc.) */
|
||||
|
||||
bfd_format format;
|
||||
|
||||
/* The direction the BFD was opened with*/
|
||||
|
||||
enum bfd_direction {no_direction = 0,
|
||||
/* The direction with which the BFD was opened. */
|
||||
enum bfd_direction
|
||||
{
|
||||
no_direction = 0,
|
||||
read_direction = 1,
|
||||
write_direction = 2,
|
||||
both_direction = 3} direction;
|
||||
|
||||
/* Format_specific flags*/
|
||||
both_direction = 3
|
||||
}
|
||||
direction;
|
||||
|
||||
/* Format_specific flags. */
|
||||
flagword flags;
|
||||
|
||||
/* Currently my_archive is tested before adding origin to
|
||||
anything. I believe that this can become always an add of
|
||||
origin, with origin set to 0 for non archive files. */
|
||||
|
||||
ufile_ptr origin;
|
||||
|
||||
/* Remember when output has begun, to stop strange things
|
||||
@ -3229,23 +3283,23 @@ struct _bfd
|
||||
/* The place where we add to the section list. */
|
||||
struct sec **section_tail;
|
||||
|
||||
/* The number of sections */
|
||||
/* The number of sections. */
|
||||
unsigned int section_count;
|
||||
|
||||
/* Stuff only useful for object files:
|
||||
The start address. */
|
||||
bfd_vma start_address;
|
||||
|
||||
/* Used for input and output*/
|
||||
/* Used for input and output. */
|
||||
unsigned int symcount;
|
||||
|
||||
/* Symbol table for output BFD (with symcount entries) */
|
||||
/* Symbol table for output BFD (with symcount entries). */
|
||||
struct symbol_cache_entry **outsymbols;
|
||||
|
||||
/* Pointer to structure which contains architecture information*/
|
||||
/* Pointer to structure which contains architecture information. */
|
||||
const struct bfd_arch_info *arch_info;
|
||||
|
||||
/* Stuff only useful for archives:*/
|
||||
/* Stuff only useful for archives. */
|
||||
PTR arelt_data;
|
||||
struct _bfd *my_archive; /* The containing archive BFD. */
|
||||
struct _bfd *next; /* The next BFD in the archive. */
|
||||
@ -3260,7 +3314,6 @@ struct _bfd
|
||||
int archive_pass;
|
||||
|
||||
/* Used by the back end to hold private data. */
|
||||
|
||||
union
|
||||
{
|
||||
struct aout_data_struct *aout_data;
|
||||
@ -3293,9 +3346,10 @@ struct _bfd
|
||||
struct versados_data_struct *versados_data;
|
||||
struct netbsd_core_struct *netbsd_core_data;
|
||||
PTR any;
|
||||
} tdata;
|
||||
}
|
||||
tdata;
|
||||
|
||||
/* Used by the application to hold private data*/
|
||||
/* Used by the application to hold private data. */
|
||||
PTR usrdata;
|
||||
|
||||
/* Where all the allocated stuff under this BFD goes. This is a
|
||||
@ -3326,7 +3380,8 @@ typedef enum bfd_error
|
||||
bfd_error_file_truncated,
|
||||
bfd_error_file_too_big,
|
||||
bfd_error_invalid_error_code
|
||||
} bfd_error_type;
|
||||
}
|
||||
bfd_error_type;
|
||||
|
||||
bfd_error_type
|
||||
bfd_get_error PARAMS ((void));
|
||||
@ -3364,9 +3419,7 @@ bfd_canonicalize_reloc PARAMS ((bfd *abfd,
|
||||
asymbol **syms));
|
||||
|
||||
void
|
||||
bfd_set_reloc PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count)
|
||||
|
||||
);
|
||||
bfd_set_reloc PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count));
|
||||
|
||||
boolean
|
||||
bfd_set_file_flags PARAMS ((bfd *abfd, flagword flags));
|
||||
@ -3521,7 +3574,9 @@ core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
|
||||
(((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
|
||||
(bfd_assert (__FILE__,__LINE__), NULL))
|
||||
#endif
|
||||
enum bfd_flavour {
|
||||
|
||||
enum bfd_flavour
|
||||
{
|
||||
bfd_target_unknown_flavour,
|
||||
bfd_target_aout_flavour,
|
||||
bfd_target_coff_flavour,
|
||||
@ -3550,15 +3605,40 @@ typedef struct bfd_link_info _bfd_link_info;
|
||||
|
||||
typedef struct bfd_target
|
||||
{
|
||||
/* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */
|
||||
char *name;
|
||||
|
||||
/* The "flavour" of a back end is a general indication about
|
||||
the contents of a file. */
|
||||
enum bfd_flavour flavour;
|
||||
|
||||
/* The order of bytes within the data area of a file. */
|
||||
enum bfd_endian byteorder;
|
||||
|
||||
/* The order of bytes within the header parts of a file. */
|
||||
enum bfd_endian header_byteorder;
|
||||
|
||||
/* A mask of all the flags which an executable may have set -
|
||||
from the set <<BFD_NO_FLAGS>>, <<HAS_RELOC>>, ...<<D_PAGED>>. */
|
||||
flagword object_flags;
|
||||
|
||||
/* A mask of all the flags which a section may have set - from
|
||||
the set <<SEC_NO_FLAGS>>, <<SEC_ALLOC>>, ...<<SET_NEVER_LOAD>>. */
|
||||
flagword section_flags;
|
||||
|
||||
/* The character normally found at the front of a symbol.
|
||||
(if any), perhaps `_'. */
|
||||
char symbol_leading_char;
|
||||
|
||||
/* The pad character for file names within an archive header. */
|
||||
char ar_pad_char;
|
||||
|
||||
/* The maximum number of characters in an archive header. */
|
||||
unsigned short ar_max_namelen;
|
||||
|
||||
/* Entries for byte swapping for data. These are different from the
|
||||
other entry points, since they don't take a BFD asthe first argument.
|
||||
Certain other handlers could do the same. */
|
||||
bfd_vma (*bfd_getx64) PARAMS ((const bfd_byte *));
|
||||
bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *));
|
||||
void (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
|
||||
@ -3568,6 +3648,8 @@ typedef struct bfd_target
|
||||
bfd_vma (*bfd_getx16) PARAMS ((const bfd_byte *));
|
||||
bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *));
|
||||
void (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
|
||||
|
||||
/* Byte swapping for the headers. */
|
||||
bfd_vma (*bfd_h_getx64) PARAMS ((const bfd_byte *));
|
||||
bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *));
|
||||
void (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
|
||||
@ -3577,10 +3659,20 @@ typedef struct bfd_target
|
||||
bfd_vma (*bfd_h_getx16) PARAMS ((const bfd_byte *));
|
||||
bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *));
|
||||
void (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
|
||||
|
||||
/* Format dependent routines: these are vectors of entry points
|
||||
within the target vector structure, one for each format to check. */
|
||||
|
||||
/* Check the format of a file being read. Return a <<bfd_target *>> or zero. */
|
||||
const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
|
||||
|
||||
/* Set the format of a file being written. */
|
||||
boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
|
||||
|
||||
/* Write cached information into a file being written, at <<bfd_close>>. */
|
||||
boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
|
||||
|
||||
|
||||
/* Generic entry points. */
|
||||
#define BFD_JUMP_TABLE_GENERIC(NAME) \
|
||||
CONCAT2 (NAME,_close_and_cleanup), \
|
||||
@ -3623,10 +3715,10 @@ CONCAT2 (NAME,_bfd_print_private_bfd_data) \
|
||||
to another. */
|
||||
boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
|
||||
bfd *, asymbol *));
|
||||
/* Called to set private backend flags */
|
||||
/* Called to set private backend flags. */
|
||||
boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
|
||||
|
||||
/* Called to print private BFD data */
|
||||
/* Called to print private BFD data. */
|
||||
boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
|
||||
|
||||
/* Core file entry points. */
|
||||
@ -3790,9 +3882,12 @@ CONCAT2 (NAME,_canonicalize_dynamic_reloc)
|
||||
/* Opposite endian version of this target. */
|
||||
const struct bfd_target * alternative_target;
|
||||
|
||||
/* Data for use by back-end routines, which isn't
|
||||
generic enough to belong in this structure. */
|
||||
PTR backend_data;
|
||||
|
||||
} bfd_target;
|
||||
|
||||
boolean
|
||||
bfd_set_default_target PARAMS ((const char *name));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user