Line 1... |
Line 1... |
/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
|
/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
|
generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
|
generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
|
"bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
|
"bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
|
"syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
|
"syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
|
"linker.c" and "simple.c".
|
"linker.c", "simple.c" and "compress.c".
|
Run "make headers" in your build bfd/ to regenerate. */
|
Run "make headers" in your build bfd/ to regenerate. */
|
|
|
/* Main header file for the bfd library -- portable access to object files.
|
/* Main header file for the bfd library -- portable access to object files.
|
|
|
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
|
|
Contributed by Cygnus Support.
|
Contributed by Cygnus Support.
|
|
|
This file is part of BFD, the Binary File Descriptor library.
|
This file is part of BFD, the Binary File Descriptor library.
|
Line 71... |
Line 71... |
can also save time if we do not need to copy the terminating NUL. */
|
can also save time if we do not need to copy the terminating NUL. */
|
#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
|
#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
|
#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
|
#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
|
|
|
|
|
|
#define BFD_SUPPORTS_PLUGINS @supports_plugins@
|
|
|
/* 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
|
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
|
been selected with --enable-targets, or if --enable-64-bit-bfd. */
|
been selected with --enable-targets, or if --enable-64-bit-bfd. */
|
#define BFD_ARCH_SIZE @wordsize@
|
#define BFD_ARCH_SIZE @wordsize@
|
|
|
Line 133... |
Line 135... |
typedef BFD_HOST_U_64_BIT bfd_vma;
|
typedef BFD_HOST_U_64_BIT bfd_vma;
|
typedef BFD_HOST_64_BIT bfd_signed_vma;
|
typedef BFD_HOST_64_BIT bfd_signed_vma;
|
typedef BFD_HOST_U_64_BIT bfd_size_type;
|
typedef BFD_HOST_U_64_BIT bfd_size_type;
|
typedef BFD_HOST_U_64_BIT symvalue;
|
typedef BFD_HOST_U_64_BIT symvalue;
|
|
|
#ifndef fprintf_vma
|
|
#if BFD_HOST_64BIT_LONG
|
#if BFD_HOST_64BIT_LONG
|
#define sprintf_vma(s,x) sprintf (s, "%016lx", x)
|
#define BFD_VMA_FMT "l"
|
#define fprintf_vma(f,x) fprintf (f, "%016lx", x)
|
#elif defined (__MSVCRT__)
|
#elif BFD_HOST_64BIT_LONG_LONG
|
#define BFD_VMA_FMT "I64"
|
#ifndef __MSVCRT__
|
|
#define sprintf_vma(s,x) sprintf (s, "%016llx", x)
|
|
#define fprintf_vma(f,x) fprintf (f, "%016llx", x)
|
|
#else
|
|
#define sprintf_vma(s,x) sprintf (s, "%016I64x", x)
|
|
#define fprintf_vma(f,x) fprintf (f, "%016I64x", x)
|
|
#endif
|
|
#else
|
#else
|
#define _bfd_int64_low(x) ((unsigned long) (((x) & 0xffffffff)))
|
#define BFD_VMA_FMT "ll"
|
#define _bfd_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff))
|
|
#define fprintf_vma(s,x) \
|
|
fprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x))
|
|
#define sprintf_vma(s,x) \
|
|
sprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x))
|
|
#endif
|
#endif
|
|
|
|
#ifndef fprintf_vma
|
|
#define sprintf_vma(s,x) sprintf (s, "%016" BFD_VMA_FMT "x", x)
|
|
#define fprintf_vma(f,x) fprintf (f, "%016" BFD_VMA_FMT "x", x)
|
#endif
|
#endif
|
|
|
#else /* not BFD64 */
|
#else /* not BFD64 */
|
|
|
/* Represent a target address. Also used as a generic unsigned type
|
/* Represent a target address. Also used as a generic unsigned type
|
Line 172... |
Line 165... |
|
|
typedef unsigned long symvalue;
|
typedef unsigned long symvalue;
|
typedef unsigned long bfd_size_type;
|
typedef unsigned long bfd_size_type;
|
|
|
/* Print a bfd_vma x on stream s. */
|
/* Print a bfd_vma x on stream s. */
|
#define fprintf_vma(s,x) fprintf (s, "%08lx", x)
|
#define BFD_VMA_FMT "l"
|
#define sprintf_vma(s,x) sprintf (s, "%08lx", x)
|
#define fprintf_vma(s,x) fprintf (s, "%08" BFD_VMA_FMT "x", x)
|
|
#define sprintf_vma(s,x) sprintf (s, "%08" BFD_VMA_FMT "x", x)
|
|
|
#endif /* not BFD64 */
|
#endif /* not BFD64 */
|
|
|
#define HALF_BFD_SIZE_TYPE \
|
#define HALF_BFD_SIZE_TYPE \
|
(((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2))
|
(((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2))
|
Line 214... |
Line 208... |
bfd_archive, /* Object archive file. */
|
bfd_archive, /* Object archive file. */
|
bfd_core, /* Core dump. */
|
bfd_core, /* Core dump. */
|
bfd_type_end /* Marks the end; don't use it! */
|
bfd_type_end /* Marks the end; don't use it! */
|
}
|
}
|
bfd_format;
|
bfd_format;
|
|
|
/* Values that may appear in the flags field of a BFD. These also
|
|
appear in the object_flags field of the bfd_target structure, where
|
|
they indicate the set of flags used by that backend (not all flags
|
|
are meaningful for all object file formats) (FIXME: at the moment,
|
|
the object_flags values have mostly just been copied from backend
|
|
to another, and are not necessarily correct). */
|
|
|
|
/* No flags. */
|
|
#define BFD_NO_FLAGS 0x00
|
|
|
|
/* BFD contains relocation entries. */
|
|
#define HAS_RELOC 0x01
|
|
|
|
/* BFD is directly executable. */
|
|
#define EXEC_P 0x02
|
|
|
|
/* BFD has line number information (basically used for F_LNNO in a
|
|
COFF header). */
|
|
#define HAS_LINENO 0x04
|
|
|
|
/* BFD has debugging information. */
|
|
#define HAS_DEBUG 0x08
|
|
|
|
/* BFD has symbols. */
|
|
#define HAS_SYMS 0x10
|
|
|
|
/* BFD has local symbols (basically used for F_LSYMS in a COFF
|
|
header). */
|
|
#define HAS_LOCALS 0x20
|
|
|
|
/* BFD is a dynamic object. */
|
|
#define DYNAMIC 0x40
|
|
|
|
/* Text section is write protected (if D_PAGED is not set, this is
|
|
like an a.out NMAGIC file) (the linker sets this by default, but
|
|
clears it for -r or -N). */
|
|
#define WP_TEXT 0x80
|
|
|
|
/* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the
|
|
linker sets this by default, but clears it for -r or -n or -N). */
|
|
#define D_PAGED 0x100
|
|
|
|
/* BFD is relaxable (this means that bfd_relax_section may be able to
|
|
do something) (sometimes bfd_relax_section can do something even if
|
|
this is not set). */
|
|
#define BFD_IS_RELAXABLE 0x200
|
|
|
|
/* This may be set before writing out a BFD to request using a
|
|
traditional format. For example, this is used to request that when
|
|
writing out an a.out object the symbols not be hashed to eliminate
|
|
duplicates. */
|
|
#define BFD_TRADITIONAL_FORMAT 0x400
|
|
|
|
/* This flag indicates that the BFD contents are actually cached in
|
|
memory. If this is set, iostream points to a bfd_in_memory struct. */
|
|
#define BFD_IN_MEMORY 0x800
|
|
|
|
/* The sections in this BFD specify a memory page. */
|
|
#define HAS_LOAD_PAGE 0x1000
|
|
|
|
/* This BFD has been created by the linker and doesn't correspond
|
|
to any input file. */
|
|
#define BFD_LINKER_CREATED 0x2000
|
|
|
|
/* Symbols and relocation. */
|
/* Symbols and relocation. */
|
|
|
/* A count of carsyms (canonical archive symbols). */
|
/* A count of carsyms (canonical archive symbols). */
|
typedef unsigned long symindex;
|
typedef unsigned long symindex;
|
Line 300... |
Line 230... |
#define bfd_asymbol_base(x) ((x)->section->vma)
|
#define bfd_asymbol_base(x) ((x)->section->vma)
|
#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value)
|
#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value)
|
#define bfd_asymbol_name(x) ((x)->name)
|
#define bfd_asymbol_name(x) ((x)->name)
|
/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/
|
/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/
|
#define bfd_asymbol_bfd(x) ((x)->the_bfd)
|
#define bfd_asymbol_bfd(x) ((x)->the_bfd)
|
#define bfd_asymbol_flavour(x) (bfd_asymbol_bfd(x)->xvec->flavour)
|
#define bfd_asymbol_flavour(x) \
|
|
(((x)->flags & BSF_SYNTHETIC) != 0 \
|
|
? bfd_target_unknown_flavour \
|
|
: bfd_asymbol_bfd (x)->xvec->flavour)
|
|
|
/* A canonical archive symbol. */
|
/* A canonical archive symbol. */
|
/* This is a type pun with struct ranlib on purpose! */
|
/* This is a type pun with struct ranlib on purpose! */
|
typedef struct carsym
|
typedef struct carsym
|
{
|
{
|
Line 568... |
Line 501... |
#define bfd_get_file_flags(abfd) ((abfd)->flags)
|
#define bfd_get_file_flags(abfd) ((abfd)->flags)
|
#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
|
#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
|
#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
|
#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
|
#define bfd_my_archive(abfd) ((abfd)->my_archive)
|
#define bfd_my_archive(abfd) ((abfd)->my_archive)
|
#define bfd_has_map(abfd) ((abfd)->has_armap)
|
#define bfd_has_map(abfd) ((abfd)->has_armap)
|
|
#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive)
|
|
|
#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types)
|
#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types)
|
#define bfd_usrdata(abfd) ((abfd)->usrdata)
|
#define bfd_usrdata(abfd) ((abfd)->usrdata)
|
|
|
#define bfd_get_start_address(abfd) ((abfd)->start_address)
|
#define bfd_get_start_address(abfd) ((abfd)->start_address)
|
Line 780... |
Line 714... |
|
|
extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
|
extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
|
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
|
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
|
char **);
|
char **);
|
|
|
|
extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int);
|
|
|
extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs
|
extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs
|
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
|
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
|
char **);
|
char **);
|
|
|
|
extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs
|
|
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
|
|
char **);
|
|
|
/* SunOS shared library support routines for the linker. */
|
/* SunOS shared library support routines for the linker. */
|
|
|
extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
|
extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
|
(bfd *, struct bfd_link_info *);
|
(bfd *, struct bfd_link_info *);
|
extern bfd_boolean bfd_sunos_record_link_assignment
|
extern bfd_boolean bfd_sunos_record_link_assignment
|
Line 832... |
Line 772... |
extern bfd_boolean bfd_get_file_window
|
extern bfd_boolean bfd_get_file_window
|
(bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean);
|
(bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean);
|
|
|
/* XCOFF support routines for the linker. */
|
/* XCOFF support routines for the linker. */
|
|
|
|
extern bfd_boolean bfd_xcoff_split_import_path
|
|
(bfd *, const char *, const char **, const char **);
|
|
extern bfd_boolean bfd_xcoff_set_archive_import_path
|
|
(struct bfd_link_info *, bfd *, const char *);
|
extern bfd_boolean bfd_xcoff_link_record_set
|
extern bfd_boolean bfd_xcoff_link_record_set
|
(bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
|
(bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
|
extern bfd_boolean bfd_xcoff_import_symbol
|
extern bfd_boolean bfd_xcoff_import_symbol
|
(bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
|
(bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
|
const char *, const char *, const char *, unsigned int);
|
const char *, const char *, const char *, unsigned int);
|
Line 846... |
Line 790... |
extern bfd_boolean bfd_xcoff_record_link_assignment
|
extern bfd_boolean bfd_xcoff_record_link_assignment
|
(bfd *, struct bfd_link_info *, const char *);
|
(bfd *, struct bfd_link_info *, const char *);
|
extern bfd_boolean bfd_xcoff_size_dynamic_sections
|
extern bfd_boolean bfd_xcoff_size_dynamic_sections
|
(bfd *, struct bfd_link_info *, const char *, const char *,
|
(bfd *, struct bfd_link_info *, const char *, const char *,
|
unsigned long, unsigned long, unsigned long, bfd_boolean,
|
unsigned long, unsigned long, unsigned long, bfd_boolean,
|
int, bfd_boolean, bfd_boolean, struct bfd_section **, bfd_boolean);
|
int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean);
|
extern bfd_boolean bfd_xcoff_link_generate_rtinit
|
extern bfd_boolean bfd_xcoff_link_generate_rtinit
|
(bfd *, const char *, const char *, bfd_boolean);
|
(bfd *, const char *, const char *, bfd_boolean);
|
|
|
/* XCOFF support routines for ar. */
|
/* XCOFF support routines for ar. */
|
extern bfd_boolean bfd_xcoff_ar_archive_set_magic
|
extern bfd_boolean bfd_xcoff_ar_archive_set_magic
|
Line 888... |
Line 832... |
(bfd *);
|
(bfd *);
|
|
|
extern void bfd_elf32_arm_set_vfp11_fix
|
extern void bfd_elf32_arm_set_vfp11_fix
|
(bfd *, struct bfd_link_info *);
|
(bfd *, struct bfd_link_info *);
|
|
|
|
extern void bfd_elf32_arm_set_cortex_a8_fix
|
|
(bfd *, struct bfd_link_info *);
|
|
|
extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
|
extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
|
(bfd *, struct bfd_link_info *);
|
(bfd *, struct bfd_link_info *);
|
|
|
extern void bfd_elf32_arm_vfp11_fix_veneer_locations
|
extern void bfd_elf32_arm_vfp11_fix_veneer_locations
|
(bfd *, struct bfd_link_info *);
|
(bfd *, struct bfd_link_info *);
|
Line 923... |
Line 870... |
extern bfd_boolean bfd_elf32_arm_process_before_allocation
|
extern bfd_boolean bfd_elf32_arm_process_before_allocation
|
(bfd *, struct bfd_link_info *);
|
(bfd *, struct bfd_link_info *);
|
|
|
void bfd_elf32_arm_set_target_relocs
|
void bfd_elf32_arm_set_target_relocs
|
(bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix,
|
(bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix,
|
int, int);
|
int, int, int, int);
|
|
|
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
|
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
|
(bfd *, struct bfd_link_info *);
|
(bfd *, struct bfd_link_info *);
|
|
|
extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
|
extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
|
Line 951... |
Line 898... |
(bfd *, const char *);
|
(bfd *, const char *);
|
|
|
extern unsigned int bfd_arm_get_mach_from_notes
|
extern unsigned int bfd_arm_get_mach_from_notes
|
(bfd *, const char *);
|
(bfd *, const char *);
|
|
|
|
/* ARM stub generation support. Called from the linker. */
|
|
extern int elf32_arm_setup_section_lists
|
|
(bfd *, struct bfd_link_info *);
|
|
extern void elf32_arm_next_input_section
|
|
(struct bfd_link_info *, struct bfd_section *);
|
|
extern bfd_boolean elf32_arm_size_stubs
|
|
(bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
|
|
struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void));
|
|
extern bfd_boolean elf32_arm_build_stubs
|
|
(struct bfd_link_info *);
|
|
|
|
/* ARM unwind section editing support. */
|
|
extern bfd_boolean elf32_arm_fix_exidx_coverage
|
|
(struct bfd_section **, unsigned int, struct bfd_link_info *);
|
|
|
|
/* PowerPC @tls opcode transform/validate. */
|
|
extern unsigned int _bfd_elf_ppc_at_tls_transform
|
|
(unsigned int, unsigned int);
|
|
/* PowerPC @tprel opcode transform/validate. */
|
|
extern unsigned int _bfd_elf_ppc_at_tprel_transform
|
|
(unsigned int, unsigned int);
|
|
|
/* TI COFF load page support. */
|
/* TI COFF load page support. */
|
extern void bfd_ticoff_set_section_load_page
|
extern void bfd_ticoff_set_section_load_page
|
(struct bfd_section *, int);
|
(struct bfd_section *, int);
|
|
|
extern int bfd_ticoff_get_section_load_page
|
extern int bfd_ticoff_get_section_load_page
|
Line 1158... |
Line 1127... |
/* Extracted from bfdio.c. */
|
/* Extracted from bfdio.c. */
|
long bfd_get_mtime (bfd *abfd);
|
long bfd_get_mtime (bfd *abfd);
|
|
|
file_ptr bfd_get_size (bfd *abfd);
|
file_ptr bfd_get_size (bfd *abfd);
|
|
|
|
void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
|
|
int prot, int flags, file_ptr offset);
|
|
|
/* Extracted from bfdwin.c. */
|
/* Extracted from bfdwin.c. */
|
/* Extracted from section.c. */
|
/* Extracted from section.c. */
|
typedef struct bfd_section
|
typedef struct bfd_section
|
{
|
{
|
/* 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
|
Line 1353... |
Line 1325... |
/* Conditionally link this section; do not link if there are no
|
/* Conditionally link this section; do not link if there are no
|
references found to any symbol in the section. This is for TI
|
references found to any symbol in the section. This is for TI
|
TMS320C54X only. */
|
TMS320C54X only. */
|
#define SEC_TIC54X_CLINK 0x20000000
|
#define SEC_TIC54X_CLINK 0x20000000
|
|
|
|
/* Indicate that section has the no read flag set. This happens
|
|
when memory read flag isn't set. */
|
|
#define SEC_COFF_NOREAD 0x40000000
|
|
|
/* End of section flags. */
|
/* End of section flags. */
|
|
|
/* Some internal packed boolean fields. */
|
/* Some internal packed boolean fields. */
|
|
|
/* See the vma field. */
|
/* See the vma field. */
|
Line 1392... |
Line 1368... |
these fields. */
|
these fields. */
|
|
|
/* Nonzero if this section has TLS related relocations. */
|
/* Nonzero if this section has TLS related relocations. */
|
unsigned int has_tls_reloc:1;
|
unsigned int has_tls_reloc:1;
|
|
|
|
/* Nonzero if this section has a call to __tls_get_addr. */
|
|
unsigned int has_tls_get_addr_call:1;
|
|
|
/* Nonzero if this section has a gp reloc. */
|
/* Nonzero if this section has a gp reloc. */
|
unsigned int has_gp_reloc:1;
|
unsigned int has_gp_reloc:1;
|
|
|
/* Nonzero if this section needs the relax finalize pass. */
|
/* Nonzero if this section needs the relax finalize pass. */
|
unsigned int need_finalize_relax:1;
|
unsigned int need_finalize_relax:1;
|
Line 1431... |
Line 1410... |
targets), and thus the original size needs to be kept to read the
|
targets), and thus the original size needs to be kept to read the
|
section multiple times. For output sections, rawsize holds the
|
section multiple times. For output sections, rawsize holds the
|
section size calculated on a previous linker relaxation pass. */
|
section size calculated on a previous linker relaxation pass. */
|
bfd_size_type rawsize;
|
bfd_size_type rawsize;
|
|
|
|
/* Relaxation table. */
|
|
struct relax_table *relax;
|
|
|
|
/* Count of used relaxation table entries. */
|
|
int relax_count;
|
|
|
|
|
/* 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
|
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
|
input section (byte ==> smallest addressable unit on the
|
input section (byte ==> smallest addressable unit on the
|
target). In most cases, if this was going to start at the
|
target). In most cases, if this was going to start at the
|
100th octet (8-bit quantity) in the output section, this value
|
100th octet (8-bit quantity) in the output section, this value
|
Line 1520... |
Line 1506... |
struct bfd_link_order *link_order;
|
struct bfd_link_order *link_order;
|
struct bfd_section *s;
|
struct bfd_section *s;
|
} map_head, map_tail;
|
} map_head, map_tail;
|
} asection;
|
} asection;
|
|
|
|
/* Relax table contains information about instructions which can
|
|
be removed by relaxation -- replacing a long address with a
|
|
short address. */
|
|
struct relax_table {
|
|
/* Address where bytes may be deleted. */
|
|
bfd_vma addr;
|
|
|
|
/* Number of bytes to be deleted. */
|
|
int size;
|
|
};
|
|
|
/* These sections are global, and are managed by BFD. The application
|
/* These sections are global, and are managed by BFD. The application
|
and target back end are not permitted to change the values in
|
and target back end are not permitted to change the values in
|
these sections. New code should use the section_ptr macros rather
|
these sections. New code should use the section_ptr macros rather
|
than referring directly to the const sections. The const sections
|
than referring directly to the const sections. The const sections
|
may eventually vanish. */
|
may eventually vanish. */
|
Line 1652... |
Line 1649... |
0, 0, 1, \
|
0, 0, 1, \
|
\
|
\
|
/* segment_mark, sec_info_type, use_rela_p, has_tls_reloc, */ \
|
/* segment_mark, sec_info_type, use_rela_p, has_tls_reloc, */ \
|
0, 0, 0, 0, \
|
0, 0, 0, 0, \
|
\
|
\
|
/* has_gp_reloc, need_finalize_relax, reloc_done, */ \
|
/* has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, */ \
|
0, 0, 0, \
|
0, 0, 0, \
|
\
|
\
|
/* vma, lma, size, rawsize */ \
|
/* reloc_done, vma, lma, size, rawsize, relax, relax_count, */ \
|
0, 0, 0, 0, \
|
0, 0, 0, 0, 0, 0, 0, \
|
\
|
\
|
/* output_offset, output_section, alignment_power, */ \
|
/* output_offset, output_section, alignment_power, */ \
|
0, (struct bfd_section *) &SEC, 0, \
|
0, (struct bfd_section *) &SEC, 0, \
|
\
|
\
|
/* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
|
/* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
|
Line 1842... |
Line 1839... |
#define bfd_mach_mips7000 7000
|
#define bfd_mach_mips7000 7000
|
#define bfd_mach_mips8000 8000
|
#define bfd_mach_mips8000 8000
|
#define bfd_mach_mips9000 9000
|
#define bfd_mach_mips9000 9000
|
#define bfd_mach_mips10000 10000
|
#define bfd_mach_mips10000 10000
|
#define bfd_mach_mips12000 12000
|
#define bfd_mach_mips12000 12000
|
|
#define bfd_mach_mips14000 14000
|
|
#define bfd_mach_mips16000 16000
|
#define bfd_mach_mips16 16
|
#define bfd_mach_mips16 16
|
#define bfd_mach_mips5 5
|
#define bfd_mach_mips5 5
|
#define bfd_mach_mips_loongson_2e 3001
|
#define bfd_mach_mips_loongson_2e 3001
|
#define bfd_mach_mips_loongson_2f 3002
|
#define bfd_mach_mips_loongson_2f 3002
|
#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */
|
#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */
|
#define bfd_mach_mips_octeon 6501
|
#define bfd_mach_mips_octeon 6501
|
|
#define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */
|
#define bfd_mach_mipsisa32 32
|
#define bfd_mach_mipsisa32 32
|
#define bfd_mach_mipsisa32r2 33
|
#define bfd_mach_mipsisa32r2 33
|
#define bfd_mach_mipsisa64 64
|
#define bfd_mach_mipsisa64 64
|
#define bfd_mach_mipsisa64r2 65
|
#define bfd_mach_mipsisa64r2 65
|
bfd_arch_i386, /* Intel 386 */
|
bfd_arch_i386, /* Intel 386 */
|
#define bfd_mach_i386_i386 1
|
#define bfd_mach_i386_i386 1
|
#define bfd_mach_i386_i8086 2
|
#define bfd_mach_i386_i8086 2
|
#define bfd_mach_i386_i386_intel_syntax 3
|
#define bfd_mach_i386_i386_intel_syntax 3
|
#define bfd_mach_x86_64 64
|
#define bfd_mach_x86_64 64
|
#define bfd_mach_x86_64_intel_syntax 65
|
#define bfd_mach_x86_64_intel_syntax 65
|
|
bfd_arch_l1om, /* Intel L1OM */
|
|
#define bfd_mach_l1om 66
|
|
#define bfd_mach_l1om_intel_syntax 67
|
bfd_arch_we32k, /* AT&T WE32xxx */
|
bfd_arch_we32k, /* AT&T WE32xxx */
|
bfd_arch_tahoe, /* CCI/Harris Tahoe */
|
bfd_arch_tahoe, /* CCI/Harris Tahoe */
|
bfd_arch_i860, /* Intel 860 */
|
bfd_arch_i860, /* Intel 860 */
|
bfd_arch_i370, /* IBM 360/370 Mainframes */
|
bfd_arch_i370, /* IBM 360/370 Mainframes */
|
bfd_arch_romp, /* IBM ROMP PC/RT */
|
bfd_arch_romp, /* IBM ROMP PC/RT */
|
Line 1876... |
Line 1879... |
#define bfd_mach_h8300hn 4
|
#define bfd_mach_h8300hn 4
|
#define bfd_mach_h8300sn 5
|
#define bfd_mach_h8300sn 5
|
#define bfd_mach_h8300sx 6
|
#define bfd_mach_h8300sx 6
|
#define bfd_mach_h8300sxn 7
|
#define bfd_mach_h8300sxn 7
|
bfd_arch_pdp11, /* DEC PDP-11 */
|
bfd_arch_pdp11, /* DEC PDP-11 */
|
|
bfd_arch_plugin,
|
bfd_arch_powerpc, /* PowerPC */
|
bfd_arch_powerpc, /* PowerPC */
|
#define bfd_mach_ppc 32
|
#define bfd_mach_ppc 32
|
#define bfd_mach_ppc64 64
|
#define bfd_mach_ppc64 64
|
#define bfd_mach_ppc_403 403
|
#define bfd_mach_ppc_403 403
|
#define bfd_mach_ppc_403gc 4030
|
#define bfd_mach_ppc_403gc 4030
|
|
#define bfd_mach_ppc_405 405
|
#define bfd_mach_ppc_505 505
|
#define bfd_mach_ppc_505 505
|
#define bfd_mach_ppc_601 601
|
#define bfd_mach_ppc_601 601
|
#define bfd_mach_ppc_602 602
|
#define bfd_mach_ppc_602 602
|
#define bfd_mach_ppc_603 603
|
#define bfd_mach_ppc_603 603
|
#define bfd_mach_ppc_ec603e 6031
|
#define bfd_mach_ppc_ec603e 6031
|
Line 1896... |
Line 1901... |
#define bfd_mach_ppc_a35 35
|
#define bfd_mach_ppc_a35 35
|
#define bfd_mach_ppc_rs64ii 642
|
#define bfd_mach_ppc_rs64ii 642
|
#define bfd_mach_ppc_rs64iii 643
|
#define bfd_mach_ppc_rs64iii 643
|
#define bfd_mach_ppc_7400 7400
|
#define bfd_mach_ppc_7400 7400
|
#define bfd_mach_ppc_e500 500
|
#define bfd_mach_ppc_e500 500
|
|
#define bfd_mach_ppc_e500mc 5001
|
bfd_arch_rs6000, /* IBM RS/6000 */
|
bfd_arch_rs6000, /* IBM RS/6000 */
|
#define bfd_mach_rs6k 6000
|
#define bfd_mach_rs6k 6000
|
#define bfd_mach_rs6k_rs1 6001
|
#define bfd_mach_rs6k_rs1 6001
|
#define bfd_mach_rs6k_rsc 6003
|
#define bfd_mach_rs6k_rsc 6003
|
#define bfd_mach_rs6k_rs2 6002
|
#define bfd_mach_rs6k_rs2 6002
|
Line 2002... |
Line 2008... |
#define bfd_mach_fr400 400
|
#define bfd_mach_fr400 400
|
#define bfd_mach_fr450 450
|
#define bfd_mach_fr450 450
|
#define bfd_mach_frvtomcat 499 /* fr500 prototype */
|
#define bfd_mach_frvtomcat 499 /* fr500 prototype */
|
#define bfd_mach_fr500 500
|
#define bfd_mach_fr500 500
|
#define bfd_mach_fr550 550
|
#define bfd_mach_fr550 550
|
|
bfd_arch_moxie, /* The moxie processor */
|
|
#define bfd_mach_moxie 1
|
bfd_arch_mcore,
|
bfd_arch_mcore,
|
bfd_arch_mep,
|
bfd_arch_mep,
|
#define bfd_mach_mep 1
|
#define bfd_mach_mep 1
|
#define bfd_mach_mep_h1 0x6831
|
#define bfd_mach_mep_h1 0x6831
|
|
#define bfd_mach_mep_c5 0x6335
|
bfd_arch_ia64, /* HP/Intel ia64 */
|
bfd_arch_ia64, /* HP/Intel ia64 */
|
#define bfd_mach_ia64_elf64 64
|
#define bfd_mach_ia64_elf64 64
|
#define bfd_mach_ia64_elf32 32
|
#define bfd_mach_ia64_elf32 32
|
bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */
|
bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */
|
#define bfd_mach_ip2022 1
|
#define bfd_mach_ip2022 1
|
Line 2023... |
Line 2032... |
#define bfd_mach_ms2 3
|
#define bfd_mach_ms2 3
|
bfd_arch_pj,
|
bfd_arch_pj,
|
bfd_arch_avr, /* Atmel AVR microcontrollers. */
|
bfd_arch_avr, /* Atmel AVR microcontrollers. */
|
#define bfd_mach_avr1 1
|
#define bfd_mach_avr1 1
|
#define bfd_mach_avr2 2
|
#define bfd_mach_avr2 2
|
|
#define bfd_mach_avr25 25
|
#define bfd_mach_avr3 3
|
#define bfd_mach_avr3 3
|
|
#define bfd_mach_avr31 31
|
|
#define bfd_mach_avr35 35
|
#define bfd_mach_avr4 4
|
#define bfd_mach_avr4 4
|
#define bfd_mach_avr5 5
|
#define bfd_mach_avr5 5
|
|
#define bfd_mach_avr51 51
|
#define bfd_mach_avr6 6
|
#define bfd_mach_avr6 6
|
bfd_arch_bfin, /* ADI Blackfin */
|
bfd_arch_bfin, /* ADI Blackfin */
|
#define bfd_mach_bfin 1
|
#define bfd_mach_bfin 1
|
bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */
|
bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */
|
#define bfd_mach_cr16 1
|
#define bfd_mach_cr16 1
|
Line 2043... |
Line 2056... |
#define bfd_mach_cris_v10_v32 1032
|
#define bfd_mach_cris_v10_v32 1032
|
bfd_arch_s390, /* IBM s390 */
|
bfd_arch_s390, /* IBM s390 */
|
#define bfd_mach_s390_31 31
|
#define bfd_mach_s390_31 31
|
#define bfd_mach_s390_64 64
|
#define bfd_mach_s390_64 64
|
bfd_arch_score, /* Sunplus score */
|
bfd_arch_score, /* Sunplus score */
|
|
#define bfd_mach_score3 3
|
|
#define bfd_mach_score7 7
|
bfd_arch_openrisc, /* OpenRISC */
|
bfd_arch_openrisc, /* OpenRISC */
|
bfd_arch_mmix, /* Donald Knuth's educational processor. */
|
bfd_arch_mmix, /* Donald Knuth's educational processor. */
|
bfd_arch_xstormy16,
|
bfd_arch_xstormy16,
|
#define bfd_mach_xstormy16 1
|
#define bfd_mach_xstormy16 1
|
bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */
|
bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */
|
Line 2077... |
Line 2092... |
bfd_arch_z80,
|
bfd_arch_z80,
|
#define bfd_mach_z80strict 1 /* No undocumented opcodes. */
|
#define bfd_mach_z80strict 1 /* No undocumented opcodes. */
|
#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */
|
#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */
|
#define bfd_mach_z80full 7 /* All undocumented instructions. */
|
#define bfd_mach_z80full 7 /* All undocumented instructions. */
|
#define bfd_mach_r800 11 /* R800: successor with multiplication. */
|
#define bfd_mach_r800 11 /* R800: successor with multiplication. */
|
|
bfd_arch_lm32, /* Lattice Mico32 */
|
|
#define bfd_mach_lm32 1
|
|
bfd_arch_microblaze,/* Xilinx MicroBlaze. */
|
bfd_arch_last
|
bfd_arch_last
|
};
|
};
|
|
|
typedef struct bfd_arch_info
|
typedef struct bfd_arch_info
|
{
|
{
|
Line 2403... |
Line 2421... |
|
|
/* Relocations used by 68K ELF. */
|
/* Relocations used by 68K ELF. */
|
BFD_RELOC_68K_GLOB_DAT,
|
BFD_RELOC_68K_GLOB_DAT,
|
BFD_RELOC_68K_JMP_SLOT,
|
BFD_RELOC_68K_JMP_SLOT,
|
BFD_RELOC_68K_RELATIVE,
|
BFD_RELOC_68K_RELATIVE,
|
|
BFD_RELOC_68K_TLS_GD32,
|
|
BFD_RELOC_68K_TLS_GD16,
|
|
BFD_RELOC_68K_TLS_GD8,
|
|
BFD_RELOC_68K_TLS_LDM32,
|
|
BFD_RELOC_68K_TLS_LDM16,
|
|
BFD_RELOC_68K_TLS_LDM8,
|
|
BFD_RELOC_68K_TLS_LDO32,
|
|
BFD_RELOC_68K_TLS_LDO16,
|
|
BFD_RELOC_68K_TLS_LDO8,
|
|
BFD_RELOC_68K_TLS_IE32,
|
|
BFD_RELOC_68K_TLS_IE16,
|
|
BFD_RELOC_68K_TLS_IE8,
|
|
BFD_RELOC_68K_TLS_LE32,
|
|
BFD_RELOC_68K_TLS_LE16,
|
|
BFD_RELOC_68K_TLS_LE8,
|
|
|
/* Linkage-table relative. */
|
/* Linkage-table relative. */
|
BFD_RELOC_32_BASEREL,
|
BFD_RELOC_32_BASEREL,
|
BFD_RELOC_16_BASEREL,
|
BFD_RELOC_16_BASEREL,
|
BFD_RELOC_LO16_BASEREL,
|
BFD_RELOC_LO16_BASEREL,
|
Line 2420... |
Line 2453... |
|
|
/* These PC-relative relocations are stored as word displacements --
|
/* These PC-relative relocations are stored as word displacements --
|
i.e., byte displacements shifted right two bits. The 30-bit word
|
i.e., byte displacements shifted right two bits. The 30-bit word
|
displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the
|
displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the
|
SPARC. (SPARC tools generally refer to this as <<WDISP30>>.) The
|
SPARC. (SPARC tools generally refer to this as <<WDISP30>>.) The
|
signed 16-bit displacement is used on the MIPS, and the 23-bit
|
signed 16-bit displacement is used on the MIPS, the 23-bit
|
displacement is used on the Alpha. */
|
displacement is used on the Alpha and the 28-bit displacement is used
|
|
on OpenRISC. */
|
BFD_RELOC_32_PCREL_S2,
|
BFD_RELOC_32_PCREL_S2,
|
BFD_RELOC_16_PCREL_S2,
|
BFD_RELOC_16_PCREL_S2,
|
BFD_RELOC_23_PCREL_S2,
|
BFD_RELOC_23_PCREL_S2,
|
|
BFD_RELOC_28_PCREL_S2,
|
|
|
/* High 22 bits and low 10 bits of 32-bit value, placed into lower bits of
|
/* High 22 bits and low 10 bits of 32-bit value, placed into lower bits of
|
the target word. These are used on the SPARC. */
|
the target word. These are used on the SPARC. */
|
BFD_RELOC_HI22,
|
BFD_RELOC_HI22,
|
BFD_RELOC_LO10,
|
BFD_RELOC_LO10,
|
Line 2460... |
Line 2495... |
BFD_RELOC_SPARC_JMP_SLOT,
|
BFD_RELOC_SPARC_JMP_SLOT,
|
BFD_RELOC_SPARC_RELATIVE,
|
BFD_RELOC_SPARC_RELATIVE,
|
BFD_RELOC_SPARC_UA16,
|
BFD_RELOC_SPARC_UA16,
|
BFD_RELOC_SPARC_UA32,
|
BFD_RELOC_SPARC_UA32,
|
BFD_RELOC_SPARC_UA64,
|
BFD_RELOC_SPARC_UA64,
|
|
BFD_RELOC_SPARC_GOTDATA_HIX22,
|
|
BFD_RELOC_SPARC_GOTDATA_LOX10,
|
|
BFD_RELOC_SPARC_GOTDATA_OP_HIX22,
|
|
BFD_RELOC_SPARC_GOTDATA_OP_LOX10,
|
|
BFD_RELOC_SPARC_GOTDATA_OP,
|
|
|
/* I think these are specific to SPARC a.out (e.g., Sun 4). */
|
/* I think these are specific to SPARC a.out (e.g., Sun 4). */
|
BFD_RELOC_SPARC_BASE13,
|
BFD_RELOC_SPARC_BASE13,
|
BFD_RELOC_SPARC_BASE22,
|
BFD_RELOC_SPARC_BASE22,
|
|
|
Line 2535... |
Line 2575... |
BFD_RELOC_SPU_PCREL16,
|
BFD_RELOC_SPU_PCREL16,
|
BFD_RELOC_SPU_LO16,
|
BFD_RELOC_SPU_LO16,
|
BFD_RELOC_SPU_HI16,
|
BFD_RELOC_SPU_HI16,
|
BFD_RELOC_SPU_PPU32,
|
BFD_RELOC_SPU_PPU32,
|
BFD_RELOC_SPU_PPU64,
|
BFD_RELOC_SPU_PPU64,
|
|
BFD_RELOC_SPU_ADD_PIC,
|
|
|
/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
|
/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
|
"addend" in some special way.
|
"addend" in some special way.
|
For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
|
For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
|
writing; when reading, it will be the absolute section symbol. The
|
writing; when reading, it will be the absolute section symbol. The
|
Line 2605... |
Line 2646... |
/* 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
|
share a common GP, and the target address is adjusted for
|
share a common GP, and the target address is adjusted for
|
STO_ALPHA_STD_GPLOAD. */
|
STO_ALPHA_STD_GPLOAD. */
|
BFD_RELOC_ALPHA_BRSGP,
|
BFD_RELOC_ALPHA_BRSGP,
|
|
|
|
/* The NOP relocation outputs a NOP if the longword displacement
|
|
between two procedure entry points is < 2^21. */
|
|
BFD_RELOC_ALPHA_NOP,
|
|
|
|
/* The BSR relocation outputs a BSR if the longword displacement
|
|
between two procedure entry points is < 2^21. */
|
|
BFD_RELOC_ALPHA_BSR,
|
|
|
|
/* The LDA relocation outputs a LDA if the longword displacement
|
|
between two procedure entry points is < 2^16. */
|
|
BFD_RELOC_ALPHA_LDA,
|
|
|
|
/* The BOH relocation outputs a BSR if the longword displacement
|
|
between two procedure entry points is < 2^21, or else a hint. */
|
|
BFD_RELOC_ALPHA_BOH,
|
|
|
/* Alpha thread-local storage relocations. */
|
/* Alpha thread-local storage relocations. */
|
BFD_RELOC_ALPHA_TLSGD,
|
BFD_RELOC_ALPHA_TLSGD,
|
BFD_RELOC_ALPHA_TLSLDM,
|
BFD_RELOC_ALPHA_TLSLDM,
|
BFD_RELOC_ALPHA_DTPMOD64,
|
BFD_RELOC_ALPHA_DTPMOD64,
|
BFD_RELOC_ALPHA_GOTDTPREL16,
|
BFD_RELOC_ALPHA_GOTDTPREL16,
|
Line 2651... |
Line 2708... |
BFD_RELOC_HI16_S_PCREL,
|
BFD_RELOC_HI16_S_PCREL,
|
|
|
/* Low 16 bits of pc-relative value */
|
/* Low 16 bits of pc-relative value */
|
BFD_RELOC_LO16_PCREL,
|
BFD_RELOC_LO16_PCREL,
|
|
|
|
/* Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of
|
|
16-bit immediate fields */
|
|
BFD_RELOC_MIPS16_GOT16,
|
|
BFD_RELOC_MIPS16_CALL16,
|
|
|
/* MIPS16 high 16 bits of 32-bit value. */
|
/* MIPS16 high 16 bits of 32-bit value. */
|
BFD_RELOC_MIPS16_HI16,
|
BFD_RELOC_MIPS16_HI16,
|
|
|
/* MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign
|
/* MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign
|
extended and added to form the final result. If the low 16
|
extended and added to form the final result. If the low 16
|
Line 2703... |
Line 2765... |
BFD_RELOC_MIPS_TLS_TPREL64,
|
BFD_RELOC_MIPS_TLS_TPREL64,
|
BFD_RELOC_MIPS_TLS_TPREL_HI16,
|
BFD_RELOC_MIPS_TLS_TPREL_HI16,
|
BFD_RELOC_MIPS_TLS_TPREL_LO16,
|
BFD_RELOC_MIPS_TLS_TPREL_LO16,
|
|
|
|
|
/* MIPS ELF relocations (VxWorks extensions). */
|
/* MIPS ELF relocations (VxWorks and PLT extensions). */
|
BFD_RELOC_MIPS_COPY,
|
BFD_RELOC_MIPS_COPY,
|
BFD_RELOC_MIPS_JUMP_SLOT,
|
BFD_RELOC_MIPS_JUMP_SLOT,
|
|
|
|
|
|
/* Moxie ELF relocations. */
|
|
BFD_RELOC_MOXIE_10_PCREL,
|
|
|
|
|
/* Fujitsu Frv Relocations. */
|
/* Fujitsu Frv Relocations. */
|
BFD_RELOC_FRV_LABEL16,
|
BFD_RELOC_FRV_LABEL16,
|
BFD_RELOC_FRV_LABEL24,
|
BFD_RELOC_FRV_LABEL24,
|
BFD_RELOC_FRV_LO16,
|
BFD_RELOC_FRV_LO16,
|
BFD_RELOC_FRV_HI16,
|
BFD_RELOC_FRV_HI16,
|
Line 2812... |
Line 2878... |
BFD_RELOC_386_TLS_DTPOFF32,
|
BFD_RELOC_386_TLS_DTPOFF32,
|
BFD_RELOC_386_TLS_TPOFF32,
|
BFD_RELOC_386_TLS_TPOFF32,
|
BFD_RELOC_386_TLS_GOTDESC,
|
BFD_RELOC_386_TLS_GOTDESC,
|
BFD_RELOC_386_TLS_DESC_CALL,
|
BFD_RELOC_386_TLS_DESC_CALL,
|
BFD_RELOC_386_TLS_DESC,
|
BFD_RELOC_386_TLS_DESC,
|
|
BFD_RELOC_386_IRELATIVE,
|
|
|
/* x86-64/elf relocations */
|
/* x86-64/elf relocations */
|
BFD_RELOC_X86_64_GOT32,
|
BFD_RELOC_X86_64_GOT32,
|
BFD_RELOC_X86_64_PLT32,
|
BFD_RELOC_X86_64_PLT32,
|
BFD_RELOC_X86_64_COPY,
|
BFD_RELOC_X86_64_COPY,
|
Line 2840... |
Line 2907... |
BFD_RELOC_X86_64_GOTPLT64,
|
BFD_RELOC_X86_64_GOTPLT64,
|
BFD_RELOC_X86_64_PLTOFF64,
|
BFD_RELOC_X86_64_PLTOFF64,
|
BFD_RELOC_X86_64_GOTPC32_TLSDESC,
|
BFD_RELOC_X86_64_GOTPC32_TLSDESC,
|
BFD_RELOC_X86_64_TLSDESC_CALL,
|
BFD_RELOC_X86_64_TLSDESC_CALL,
|
BFD_RELOC_X86_64_TLSDESC,
|
BFD_RELOC_X86_64_TLSDESC,
|
|
BFD_RELOC_X86_64_IRELATIVE,
|
|
|
/* ns32k relocations */
|
/* ns32k relocations */
|
BFD_RELOC_NS32K_IMM_8,
|
BFD_RELOC_NS32K_IMM_8,
|
BFD_RELOC_NS32K_IMM_16,
|
BFD_RELOC_NS32K_IMM_16,
|
BFD_RELOC_NS32K_IMM_32,
|
BFD_RELOC_NS32K_IMM_32,
|
Line 2924... |
Line 2992... |
BFD_RELOC_PPC64_PLTGOT16_DS,
|
BFD_RELOC_PPC64_PLTGOT16_DS,
|
BFD_RELOC_PPC64_PLTGOT16_LO_DS,
|
BFD_RELOC_PPC64_PLTGOT16_LO_DS,
|
|
|
/* PowerPC and PowerPC64 thread-local storage relocations. */
|
/* PowerPC and PowerPC64 thread-local storage relocations. */
|
BFD_RELOC_PPC_TLS,
|
BFD_RELOC_PPC_TLS,
|
|
BFD_RELOC_PPC_TLSGD,
|
|
BFD_RELOC_PPC_TLSLD,
|
BFD_RELOC_PPC_DTPMOD,
|
BFD_RELOC_PPC_DTPMOD,
|
BFD_RELOC_PPC_TPREL16,
|
BFD_RELOC_PPC_TPREL16,
|
BFD_RELOC_PPC_TPREL16_LO,
|
BFD_RELOC_PPC_TPREL16_LO,
|
BFD_RELOC_PPC_TPREL16_HI,
|
BFD_RELOC_PPC_TPREL16_HI,
|
BFD_RELOC_PPC_TPREL16_HA,
|
BFD_RELOC_PPC_TPREL16_HA,
|
Line 3887... |
Line 3957... |
BFD_RELOC_390_20,
|
BFD_RELOC_390_20,
|
BFD_RELOC_390_GOT20,
|
BFD_RELOC_390_GOT20,
|
BFD_RELOC_390_GOTPLT20,
|
BFD_RELOC_390_GOTPLT20,
|
BFD_RELOC_390_TLS_GOTIE20,
|
BFD_RELOC_390_TLS_GOTIE20,
|
|
|
/* Score relocations */
|
/* Score relocations
|
BFD_RELOC_SCORE_DUMMY1,
|
Low 16 bit for load/store */
|
|
|
/* Low 16 bit for load/store */
|
|
BFD_RELOC_SCORE_GPREL15,
|
BFD_RELOC_SCORE_GPREL15,
|
|
|
/* This is a 24-bit reloc with the right 1 bit assumed to be 0 */
|
/* This is a 24-bit reloc with the right 1 bit assumed to be 0 */
|
BFD_RELOC_SCORE_DUMMY2,
|
BFD_RELOC_SCORE_DUMMY2,
|
BFD_RELOC_SCORE_JMP,
|
BFD_RELOC_SCORE_JMP,
|
|
|
/* This is a 19-bit reloc with the right 1 bit assumed to be 0 */
|
/* This is a 19-bit reloc with the right 1 bit assumed to be 0 */
|
BFD_RELOC_SCORE_BRANCH,
|
BFD_RELOC_SCORE_BRANCH,
|
|
|
|
/* This is a 32-bit reloc for 48-bit instructions. */
|
|
BFD_RELOC_SCORE_IMM30,
|
|
|
|
/* This is a 32-bit reloc for 48-bit instructions. */
|
|
BFD_RELOC_SCORE_IMM32,
|
|
|
/* This is a 11-bit reloc with the right 1 bit assumed to be 0 */
|
/* This is a 11-bit reloc with the right 1 bit assumed to be 0 */
|
BFD_RELOC_SCORE16_JMP,
|
BFD_RELOC_SCORE16_JMP,
|
|
|
/* This is a 8-bit reloc with the right 1 bit assumed to be 0 */
|
/* This is a 8-bit reloc with the right 1 bit assumed to be 0 */
|
BFD_RELOC_SCORE16_BRANCH,
|
BFD_RELOC_SCORE16_BRANCH,
|
|
|
|
/* This is a 9-bit reloc with the right 1 bit assumed to be 0 */
|
|
BFD_RELOC_SCORE_BCMP,
|
|
|
/* Undocumented Score relocs */
|
/* Undocumented Score relocs */
|
BFD_RELOC_SCORE_GOT15,
|
BFD_RELOC_SCORE_GOT15,
|
BFD_RELOC_SCORE_GOT_LO16,
|
BFD_RELOC_SCORE_GOT_LO16,
|
BFD_RELOC_SCORE_CALL15,
|
BFD_RELOC_SCORE_CALL15,
|
BFD_RELOC_SCORE_DUMMY_HI16,
|
BFD_RELOC_SCORE_DUMMY_HI16,
|
Line 4167... |
Line 4244... |
BFD_RELOC_CR16_DISP24,
|
BFD_RELOC_CR16_DISP24,
|
BFD_RELOC_CR16_DISP24a,
|
BFD_RELOC_CR16_DISP24a,
|
BFD_RELOC_CR16_SWITCH8,
|
BFD_RELOC_CR16_SWITCH8,
|
BFD_RELOC_CR16_SWITCH16,
|
BFD_RELOC_CR16_SWITCH16,
|
BFD_RELOC_CR16_SWITCH32,
|
BFD_RELOC_CR16_SWITCH32,
|
|
BFD_RELOC_CR16_GOT_REGREL20,
|
|
BFD_RELOC_CR16_GOTC_REGREL20,
|
|
BFD_RELOC_CR16_GLOB_DAT,
|
|
|
/* NS CRX Relocations. */
|
/* NS CRX Relocations. */
|
BFD_RELOC_CRX_REL4,
|
BFD_RELOC_CRX_REL4,
|
BFD_RELOC_CRX_REL8,
|
BFD_RELOC_CRX_REL8,
|
BFD_RELOC_CRX_REL8_CMP,
|
BFD_RELOC_CRX_REL8_CMP,
|
Line 4230... |
Line 4310... |
BFD_RELOC_CRIS_32_PLT_GOTREL,
|
BFD_RELOC_CRIS_32_PLT_GOTREL,
|
|
|
/* 32-bit offset to symbol with PLT entry, relative to this relocation. */
|
/* 32-bit offset to symbol with PLT entry, relative to this relocation. */
|
BFD_RELOC_CRIS_32_PLT_PCREL,
|
BFD_RELOC_CRIS_32_PLT_PCREL,
|
|
|
|
/* Relocs used in TLS code for CRIS. */
|
|
BFD_RELOC_CRIS_32_GOT_GD,
|
|
BFD_RELOC_CRIS_16_GOT_GD,
|
|
BFD_RELOC_CRIS_32_GD,
|
|
BFD_RELOC_CRIS_DTP,
|
|
BFD_RELOC_CRIS_32_DTPREL,
|
|
BFD_RELOC_CRIS_16_DTPREL,
|
|
BFD_RELOC_CRIS_32_GOT_TPREL,
|
|
BFD_RELOC_CRIS_16_GOT_TPREL,
|
|
BFD_RELOC_CRIS_32_TPREL,
|
|
BFD_RELOC_CRIS_16_TPREL,
|
|
BFD_RELOC_CRIS_DTPMOD,
|
|
BFD_RELOC_CRIS_32_IE,
|
|
|
/* Intel i860 Relocations. */
|
/* Intel i860 Relocations. */
|
BFD_RELOC_860_COPY,
|
BFD_RELOC_860_COPY,
|
BFD_RELOC_860_GLOB_DAT,
|
BFD_RELOC_860_GLOB_DAT,
|
BFD_RELOC_860_JUMP_SLOT,
|
BFD_RELOC_860_JUMP_SLOT,
|
BFD_RELOC_860_RELATIVE,
|
BFD_RELOC_860_RELATIVE,
|
Line 4407... |
Line 4501... |
assembler-expanded instructions. This is commonly used
|
assembler-expanded instructions. This is commonly used
|
internally by the linker after analysis of a
|
internally by the linker after analysis of a
|
BFD_RELOC_XTENSA_ASM_EXPAND. */
|
BFD_RELOC_XTENSA_ASM_EXPAND. */
|
BFD_RELOC_XTENSA_ASM_SIMPLIFY,
|
BFD_RELOC_XTENSA_ASM_SIMPLIFY,
|
|
|
|
/* Xtensa TLS relocations. */
|
|
BFD_RELOC_XTENSA_TLSDESC_FN,
|
|
BFD_RELOC_XTENSA_TLSDESC_ARG,
|
|
BFD_RELOC_XTENSA_TLS_DTPOFF,
|
|
BFD_RELOC_XTENSA_TLS_TPOFF,
|
|
BFD_RELOC_XTENSA_TLS_FUNC,
|
|
BFD_RELOC_XTENSA_TLS_ARG,
|
|
BFD_RELOC_XTENSA_TLS_CALL,
|
|
|
/* 8 bit signed offset in (ix+d) or (iy+d). */
|
/* 8 bit signed offset in (ix+d) or (iy+d). */
|
BFD_RELOC_Z80_DISP8,
|
BFD_RELOC_Z80_DISP8,
|
|
|
/* DJNZ offset. */
|
/* DJNZ offset. */
|
BFD_RELOC_Z8K_DISP7,
|
BFD_RELOC_Z8K_DISP7,
|
Line 4418... |
Line 4521... |
/* CALR offset. */
|
/* CALR offset. */
|
BFD_RELOC_Z8K_CALLR,
|
BFD_RELOC_Z8K_CALLR,
|
|
|
/* 4 bit value. */
|
/* 4 bit value. */
|
BFD_RELOC_Z8K_IMM4L,
|
BFD_RELOC_Z8K_IMM4L,
|
|
|
|
/* Lattice Mico32 relocations. */
|
|
BFD_RELOC_LM32_CALL,
|
|
BFD_RELOC_LM32_BRANCH,
|
|
BFD_RELOC_LM32_16_GOT,
|
|
BFD_RELOC_LM32_GOTOFF_HI16,
|
|
BFD_RELOC_LM32_GOTOFF_LO16,
|
|
BFD_RELOC_LM32_COPY,
|
|
BFD_RELOC_LM32_GLOB_DAT,
|
|
BFD_RELOC_LM32_JMP_SLOT,
|
|
BFD_RELOC_LM32_RELATIVE,
|
|
|
|
/* Difference between two section addreses. Must be followed by a
|
|
BFD_RELOC_MACH_O_PAIR. */
|
|
BFD_RELOC_MACH_O_SECTDIFF,
|
|
|
|
/* Mach-O generic relocations. */
|
|
BFD_RELOC_MACH_O_PAIR,
|
|
|
|
/* This is a 32 bit reloc for the microblaze that stores the
|
|
low 16 bits of a value */
|
|
BFD_RELOC_MICROBLAZE_32_LO,
|
|
|
|
/* This is a 32 bit pc-relative reloc for the microblaze that
|
|
stores the low 16 bits of a value */
|
|
BFD_RELOC_MICROBLAZE_32_LO_PCREL,
|
|
|
|
/* This is a 32 bit reloc for the microblaze that stores a
|
|
value relative to the read-only small data area anchor */
|
|
BFD_RELOC_MICROBLAZE_32_ROSDA,
|
|
|
|
/* This is a 32 bit reloc for the microblaze that stores a
|
|
value relative to the read-write small data area anchor */
|
|
BFD_RELOC_MICROBLAZE_32_RWSDA,
|
|
|
|
/* This is a 32 bit reloc for the microblaze to handle
|
|
expressions of the form "Symbol Op Symbol" */
|
|
BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM,
|
|
|
|
/* This is a 64 bit reloc that stores the 32 bit pc relative
|
|
value in two words (with an imm instruction). No relocation is
|
|
done here - only used for relaxing */
|
|
BFD_RELOC_MICROBLAZE_64_NONE,
|
|
|
|
/* This is a 64 bit reloc that stores the 32 bit pc relative
|
|
value in two words (with an imm instruction). The relocation is
|
|
PC-relative GOT offset */
|
|
BFD_RELOC_MICROBLAZE_64_GOTPC,
|
|
|
|
/* This is a 64 bit reloc that stores the 32 bit pc relative
|
|
value in two words (with an imm instruction). The relocation is
|
|
GOT offset */
|
|
BFD_RELOC_MICROBLAZE_64_GOT,
|
|
|
|
/* This is a 64 bit reloc that stores the 32 bit pc relative
|
|
value in two words (with an imm instruction). The relocation is
|
|
PC-relative offset into PLT */
|
|
BFD_RELOC_MICROBLAZE_64_PLT,
|
|
|
|
/* This is a 64 bit reloc that stores the 32 bit GOT relative
|
|
value in two words (with an imm instruction). The relocation is
|
|
relative offset from _GLOBAL_OFFSET_TABLE_ */
|
|
BFD_RELOC_MICROBLAZE_64_GOTOFF,
|
|
|
|
/* This is a 32 bit reloc that stores the 32 bit GOT relative
|
|
value in a word. The relocation is relative offset from */
|
|
BFD_RELOC_MICROBLAZE_32_GOTOFF,
|
|
|
|
/* This is used to tell the dynamic linker to copy the value out of
|
|
the dynamic object into the runtime process image. */
|
|
BFD_RELOC_MICROBLAZE_COPY,
|
BFD_RELOC_UNUSED };
|
BFD_RELOC_UNUSED };
|
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
|
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
|
reloc_howto_type *bfd_reloc_type_lookup
|
reloc_howto_type *bfd_reloc_type_lookup
|
(bfd *abfd, bfd_reloc_code_real_type code);
|
(bfd *abfd, bfd_reloc_code_real_type code);
|
reloc_howto_type *bfd_reloc_name_lookup
|
reloc_howto_type *bfd_reloc_name_lookup
|
Line 4456... |
Line 4630... |
/* Attributes of a symbol. */
|
/* Attributes of a symbol. */
|
#define BSF_NO_FLAGS 0x00
|
#define BSF_NO_FLAGS 0x00
|
|
|
/* The symbol has local scope; <<static>> in <<C>>. The value
|
/* The symbol has local scope; <<static>> in <<C>>. The value
|
is the offset into the section of the data. */
|
is the offset into the section of the data. */
|
#define BSF_LOCAL 0x01
|
#define BSF_LOCAL (1 << 0)
|
|
|
/* The symbol has global scope; initialized data in <<C>>. The
|
/* The symbol has global scope; initialized data in <<C>>. The
|
value is the offset into the section of the data. */
|
value is the offset into the section of the data. */
|
#define BSF_GLOBAL 0x02
|
#define BSF_GLOBAL (1 << 1)
|
|
|
/* The symbol has global scope and is exported. The value is
|
/* The symbol has global scope and is exported. The value is
|
the offset into the section of the data. */
|
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:
|
/* A normal C symbol would be one of:
|
<<BSF_LOCAL>>, <<BSF_FORT_COMM>>, <<BSF_UNDEFINED>> or
|
<<BSF_LOCAL>>, <<BSF_COMMON>>, <<BSF_UNDEFINED>> or
|
<<BSF_GLOBAL>>. */
|
<<BSF_GLOBAL>>. */
|
|
|
/* The symbol is a debugging record. The value has an arbitrary
|
/* The symbol is a debugging record. The value has an arbitrary
|
meaning, unless BSF_DEBUGGING_RELOC is also set. */
|
meaning, unless BSF_DEBUGGING_RELOC is also set. */
|
#define BSF_DEBUGGING 0x08
|
#define BSF_DEBUGGING (1 << 2)
|
|
|
/* The symbol denotes a function entry point. Used in ELF,
|
/* The symbol denotes a function entry point. Used in ELF,
|
perhaps others someday. */
|
perhaps others someday. */
|
#define BSF_FUNCTION 0x10
|
#define BSF_FUNCTION (1 << 3)
|
|
|
/* Used by the linker. */
|
/* Used by the linker. */
|
#define BSF_KEEP 0x20
|
#define BSF_KEEP (1 << 5)
|
#define BSF_KEEP_G 0x40
|
#define BSF_KEEP_G (1 << 6)
|
|
|
/* A weak global symbol, overridable without warnings by
|
/* A weak global symbol, overridable without warnings by
|
a regular global symbol of the same name. */
|
a regular global symbol of the same name. */
|
#define BSF_WEAK 0x80
|
#define BSF_WEAK (1 << 7)
|
|
|
/* This symbol was created to point to a section, e.g. ELF's
|
/* This symbol was created to point to a section, e.g. ELF's
|
STT_SECTION symbols. */
|
STT_SECTION symbols. */
|
#define BSF_SECTION_SYM 0x100
|
#define BSF_SECTION_SYM (1 << 8)
|
|
|
/* The symbol used to be a common symbol, but now it is
|
/* The symbol used to be a common symbol, but now it is
|
allocated. */
|
allocated. */
|
#define BSF_OLD_COMMON 0x200
|
#define BSF_OLD_COMMON (1 << 9)
|
|
|
/* The default value for common data. */
|
|
#define BFD_FORT_COMM_DEFAULT_VALUE 0
|
|
|
|
/* In some files the type of a symbol sometimes alters its
|
/* In some files the type of a symbol sometimes alters its
|
location in an output file - ie in coff a <<ISFCN>> symbol
|
location in an output file - ie in coff a <<ISFCN>> symbol
|
which is also <<C_EXT>> symbol appears where it was
|
which is also <<C_EXT>> symbol appears where it was
|
declared and not at the end of a section. This bit is set
|
declared and not at the end of a section. This bit is set
|
by the target BFD part to convey this information. */
|
by the target BFD part to convey this information. */
|
#define BSF_NOT_AT_END 0x400
|
#define BSF_NOT_AT_END (1 << 10)
|
|
|
/* Signal that the symbol is the label of constructor section. */
|
/* Signal that the symbol is the label of constructor section. */
|
#define BSF_CONSTRUCTOR 0x800
|
#define BSF_CONSTRUCTOR (1 << 11)
|
|
|
/* Signal that the symbol is a warning symbol. The name is a
|
/* Signal that the symbol is a warning symbol. The name is a
|
warning. The name of the next symbol is the one to warn about;
|
warning. The name of the next symbol is the one to warn about;
|
if a reference is made to a symbol with the same name as the next
|
if a reference is made to a symbol with the same name as the next
|
symbol, a warning is issued by the linker. */
|
symbol, a warning is issued by the linker. */
|
#define BSF_WARNING 0x1000
|
#define BSF_WARNING (1 << 12)
|
|
|
/* Signal that the symbol is indirect. This symbol is an indirect
|
/* Signal that the symbol is indirect. This symbol is an indirect
|
pointer to the symbol with the same name as the next symbol. */
|
pointer to the symbol with the same name as the next symbol. */
|
#define BSF_INDIRECT 0x2000
|
#define BSF_INDIRECT (1 << 13)
|
|
|
/* BSF_FILE marks symbols that contain a file name. This is used
|
/* BSF_FILE marks symbols that contain a file name. This is used
|
for ELF STT_FILE symbols. */
|
for ELF STT_FILE symbols. */
|
#define BSF_FILE 0x4000
|
#define BSF_FILE (1 << 14)
|
|
|
/* Symbol is from dynamic linking information. */
|
/* Symbol is from dynamic linking information. */
|
#define BSF_DYNAMIC 0x8000
|
#define BSF_DYNAMIC (1 << 15)
|
|
|
/* The symbol denotes a data object. Used in ELF, and perhaps
|
/* The symbol denotes a data object. Used in ELF, and perhaps
|
others someday. */
|
others someday. */
|
#define BSF_OBJECT 0x10000
|
#define BSF_OBJECT (1 << 16)
|
|
|
/* This symbol is a debugging symbol. The value is the offset
|
/* This symbol is a debugging symbol. The value is the offset
|
into the section of the data. BSF_DEBUGGING should be set
|
into the section of the data. BSF_DEBUGGING should be set
|
as well. */
|
as well. */
|
#define BSF_DEBUGGING_RELOC 0x20000
|
#define BSF_DEBUGGING_RELOC (1 << 17)
|
|
|
/* This symbol is thread local. Used in ELF. */
|
/* This symbol is thread local. Used in ELF. */
|
#define BSF_THREAD_LOCAL 0x40000
|
#define BSF_THREAD_LOCAL (1 << 18)
|
|
|
/* This symbol represents a complex relocation expression,
|
/* This symbol represents a complex relocation expression,
|
with the expression tree serialized in the symbol name. */
|
with the expression tree serialized in the symbol name. */
|
#define BSF_RELC 0x80000
|
#define BSF_RELC (1 << 19)
|
|
|
/* This symbol represents a signed complex relocation expression,
|
/* This symbol represents a signed complex relocation expression,
|
with the expression tree serialized in the symbol name. */
|
with the expression tree serialized in the symbol name. */
|
#define BSF_SRELC 0x100000
|
#define BSF_SRELC (1 << 20)
|
|
|
|
/* This symbol was created by bfd_get_synthetic_symtab. */
|
|
#define BSF_SYNTHETIC (1 << 21)
|
|
|
|
/* This symbol is an indirect code object. Unrelated to BSF_INDIRECT.
|
|
The dynamic linker will compute the value of this symbol by
|
|
calling the function that it points to. BSF_FUNCTION must
|
|
also be also set. */
|
|
#define BSF_GNU_INDIRECT_FUNCTION (1 << 22)
|
|
/* This symbol is a globally unique data object. The dynamic linker
|
|
will make sure that in the entire process there is just one symbol
|
|
with this name and type in use. BSF_OBJECT must also be set. */
|
|
#define BSF_GNU_UNIQUE (1 << 23)
|
|
|
flagword flags;
|
flagword flags;
|
|
|
/* A pointer to the section to which this symbol is
|
/* A pointer to the section to which this symbol is
|
relative. This will always be non NULL, there are special
|
relative. This will always be non NULL, there are special
|
Line 4606... |
Line 4790... |
#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
|
#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
|
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
|
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
|
(ibfd, isymbol, obfd, osymbol))
|
(ibfd, isymbol, obfd, osymbol))
|
|
|
/* Extracted from bfd.c. */
|
/* Extracted from bfd.c. */
|
|
enum bfd_direction
|
|
{
|
|
no_direction = 0,
|
|
read_direction = 1,
|
|
write_direction = 2,
|
|
both_direction = 3
|
|
};
|
|
|
struct bfd
|
struct bfd
|
{
|
{
|
/* A unique identifier of the BFD */
|
/* A unique identifier of the BFD */
|
unsigned int id;
|
unsigned int id;
|
|
|
Line 4622... |
Line 4814... |
/* The IOSTREAM, and corresponding IO vector that provide access
|
/* The IOSTREAM, and corresponding IO vector that provide access
|
to the file backing the BFD. */
|
to the file backing the BFD. */
|
void *iostream;
|
void *iostream;
|
const struct bfd_iovec *iovec;
|
const struct bfd_iovec *iovec;
|
|
|
/* Is the file descriptor being cached? That is, can it be closed as
|
|
needed, and re-opened when accessed later? */
|
|
bfd_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. */
|
|
bfd_boolean target_defaulted;
|
|
|
|
/* The caching routines use these to maintain a
|
/* 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;
|
struct bfd *lru_prev, *lru_next;
|
|
|
/* When a file is closed by the caching routines, BFD retains
|
/* 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;
|
ufile_ptr where;
|
|
|
/* ... and here: (``once'' means at least once). */
|
|
bfd_boolean opened_once;
|
|
|
|
/* Set if we have a locally maintained mtime value, rather than
|
|
getting it from the file each time. */
|
|
bfd_boolean mtime_set;
|
|
|
|
/* File modified time, if mtime_set is TRUE. */
|
/* File modified time, if mtime_set is TRUE. */
|
long mtime;
|
long mtime;
|
|
|
/* Reserved for an unimplemented file locking extension. */
|
/* Reserved for an unimplemented file locking extension. */
|
int ifd;
|
int ifd;
|
|
|
/* The format which belongs to the BFD. (object, core, etc.) */
|
/* The format which belongs to the BFD. (object, core, etc.) */
|
bfd_format format;
|
bfd_format format;
|
|
|
/* The direction with which the BFD was opened. */
|
/* The direction with which the BFD was opened. */
|
enum bfd_direction
|
enum bfd_direction direction;
|
{
|
|
no_direction = 0,
|
|
read_direction = 1,
|
|
write_direction = 2,
|
|
both_direction = 3
|
|
}
|
|
direction;
|
|
|
|
/* Format_specific flags. */
|
/* Format_specific flags. */
|
flagword flags;
|
flagword flags;
|
|
|
|
/* Values that may appear in the flags field of a BFD. These also
|
|
appear in the object_flags field of the bfd_target structure, where
|
|
they indicate the set of flags used by that backend (not all flags
|
|
are meaningful for all object file formats) (FIXME: at the moment,
|
|
the object_flags values have mostly just been copied from backend
|
|
to another, and are not necessarily correct). */
|
|
|
|
#define BFD_NO_FLAGS 0x00
|
|
|
|
/* BFD contains relocation entries. */
|
|
#define HAS_RELOC 0x01
|
|
|
|
/* BFD is directly executable. */
|
|
#define EXEC_P 0x02
|
|
|
|
/* BFD has line number information (basically used for F_LNNO in a
|
|
COFF header). */
|
|
#define HAS_LINENO 0x04
|
|
|
|
/* BFD has debugging information. */
|
|
#define HAS_DEBUG 0x08
|
|
|
|
/* BFD has symbols. */
|
|
#define HAS_SYMS 0x10
|
|
|
|
/* BFD has local symbols (basically used for F_LSYMS in a COFF
|
|
header). */
|
|
#define HAS_LOCALS 0x20
|
|
|
|
/* BFD is a dynamic object. */
|
|
#define DYNAMIC 0x40
|
|
|
|
/* Text section is write protected (if D_PAGED is not set, this is
|
|
like an a.out NMAGIC file) (the linker sets this by default, but
|
|
clears it for -r or -N). */
|
|
#define WP_TEXT 0x80
|
|
|
|
/* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the
|
|
linker sets this by default, but clears it for -r or -n or -N). */
|
|
#define D_PAGED 0x100
|
|
|
|
/* BFD is relaxable (this means that bfd_relax_section may be able to
|
|
do something) (sometimes bfd_relax_section can do something even if
|
|
this is not set). */
|
|
#define BFD_IS_RELAXABLE 0x200
|
|
|
|
/* This may be set before writing out a BFD to request using a
|
|
traditional format. For example, this is used to request that when
|
|
writing out an a.out object the symbols not be hashed to eliminate
|
|
duplicates. */
|
|
#define BFD_TRADITIONAL_FORMAT 0x400
|
|
|
|
/* This flag indicates that the BFD contents are actually cached
|
|
in memory. If this is set, iostream points to a bfd_in_memory
|
|
struct. */
|
|
#define BFD_IN_MEMORY 0x800
|
|
|
|
/* The sections in this BFD specify a memory page. */
|
|
#define HAS_LOAD_PAGE 0x1000
|
|
|
|
/* This BFD has been created by the linker and doesn't correspond
|
|
to any input file. */
|
|
#define BFD_LINKER_CREATED 0x2000
|
|
|
|
/* This may be set before writing out a BFD to request that it
|
|
be written using values for UIDs, GIDs, timestamps, etc. that
|
|
will be consistent from run to run. */
|
|
#define BFD_DETERMINISTIC_OUTPUT 0x4000
|
|
|
/* Currently my_archive is tested before adding origin to
|
/* Currently my_archive is tested before adding origin to
|
anything. I believe that this can become always an add of
|
anything. I believe that this can become always an add of
|
origin, with origin set to 0 for non archive files. */
|
origin, with origin set to 0 for non archive files. */
|
ufile_ptr origin;
|
ufile_ptr origin;
|
|
|
/* Remember when output has begun, to stop strange things
|
/* The origin in the archive of the proxy entry. This will
|
from happening. */
|
normally be the same as origin, except for thin archives,
|
bfd_boolean output_has_begun;
|
when it will contain the current offset of the proxy in the
|
|
thin archive rather than the offset of the bfd in its actual
|
|
container. */
|
|
ufile_ptr proxy_origin;
|
|
|
/* A hash table for section names. */
|
/* A hash table for section names. */
|
struct bfd_hash_table section_htab;
|
struct bfd_hash_table section_htab;
|
|
|
/* Pointer to linked list of sections. */
|
/* Pointer to linked list of sections. */
|
Line 4696... |
Line 4937... |
bfd_vma start_address;
|
bfd_vma start_address;
|
|
|
/* Used for input and output. */
|
/* Used for input and output. */
|
unsigned int symcount;
|
unsigned int symcount;
|
|
|
/* Symbol table for output BFD (with symcount entries). */
|
/* Symbol table for output BFD (with symcount entries).
|
|
Also used by the linker to cache input BFD symbols. */
|
struct bfd_symbol **outsymbols;
|
struct bfd_symbol **outsymbols;
|
|
|
/* Used for slurped dynamic symbol tables. */
|
/* Used for slurped dynamic symbol tables. */
|
unsigned int dynsymcount;
|
unsigned int dynsymcount;
|
|
|
/* Pointer to structure which contains architecture information. */
|
/* Pointer to structure which contains architecture information. */
|
const struct bfd_arch_info *arch_info;
|
const struct bfd_arch_info *arch_info;
|
|
|
/* Flag set if symbols from this BFD should not be exported. */
|
|
bfd_boolean no_export;
|
|
|
|
/* Stuff only useful for archives. */
|
/* Stuff only useful for archives. */
|
void *arelt_data;
|
void *arelt_data;
|
struct bfd *my_archive; /* The containing archive BFD. */
|
struct bfd *my_archive; /* The containing archive BFD. */
|
struct bfd *archive_next; /* The next BFD in the archive. */
|
struct bfd *archive_next; /* The next BFD in the archive. */
|
struct bfd *archive_head; /* The first BFD in the archive. */
|
struct bfd *archive_head; /* The first BFD in the archive. */
|
bfd_boolean has_armap;
|
struct bfd *nested_archives; /* List of nested archive in a flattened
|
|
thin archive. */
|
|
|
/* A chain of BFD structures involved in a link. */
|
/* A chain of BFD structures involved in a link. */
|
struct bfd *link_next;
|
struct bfd *link_next;
|
|
|
/* A field used by _bfd_generic_link_add_archive_symbols. This will
|
/* A field used by _bfd_generic_link_add_archive_symbols. This will
|
Line 4736... |
Line 4976... |
struct xcoff_tdata *xcoff_obj_data;
|
struct xcoff_tdata *xcoff_obj_data;
|
struct ecoff_tdata *ecoff_obj_data;
|
struct ecoff_tdata *ecoff_obj_data;
|
struct ieee_data_struct *ieee_data;
|
struct ieee_data_struct *ieee_data;
|
struct ieee_ar_data_struct *ieee_ar_data;
|
struct ieee_ar_data_struct *ieee_ar_data;
|
struct srec_data_struct *srec_data;
|
struct srec_data_struct *srec_data;
|
|
struct verilog_data_struct *verilog_data;
|
struct ihex_data_struct *ihex_data;
|
struct ihex_data_struct *ihex_data;
|
struct tekhex_data_struct *tekhex_data;
|
struct tekhex_data_struct *tekhex_data;
|
struct elf_obj_tdata *elf_obj_data;
|
struct elf_obj_tdata *elf_obj_data;
|
struct nlm_obj_tdata *nlm_obj_data;
|
struct nlm_obj_tdata *nlm_obj_data;
|
struct bout_data_struct *bout_data;
|
struct bout_data_struct *bout_data;
|
Line 4756... |
Line 4997... |
struct cisco_core_struct *cisco_core_data;
|
struct cisco_core_struct *cisco_core_data;
|
struct versados_data_struct *versados_data;
|
struct versados_data_struct *versados_data;
|
struct netbsd_core_struct *netbsd_core_data;
|
struct netbsd_core_struct *netbsd_core_data;
|
struct mach_o_data_struct *mach_o_data;
|
struct mach_o_data_struct *mach_o_data;
|
struct mach_o_fat_data_struct *mach_o_fat_data;
|
struct mach_o_fat_data_struct *mach_o_fat_data;
|
|
struct plugin_data_struct *plugin_data;
|
struct bfd_pef_data_struct *pef_data;
|
struct bfd_pef_data_struct *pef_data;
|
struct bfd_pef_xlib_data_struct *pef_xlib_data;
|
struct bfd_pef_xlib_data_struct *pef_xlib_data;
|
struct bfd_sym_data_struct *sym_data;
|
struct bfd_sym_data_struct *sym_data;
|
void *any;
|
void *any;
|
}
|
}
|
Line 4770... |
Line 5012... |
|
|
/* Where all the allocated stuff under this BFD goes. This is a
|
/* Where all the allocated stuff under this BFD goes. This is a
|
struct objalloc *, but we use void * to avoid requiring the inclusion
|
struct objalloc *, but we use void * to avoid requiring the inclusion
|
of objalloc.h. */
|
of objalloc.h. */
|
void *memory;
|
void *memory;
|
|
|
|
/* Is the file descriptor being cached? That is, can it be closed as
|
|
needed, and re-opened when accessed later? */
|
|
unsigned int cacheable : 1;
|
|
|
|
/* 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. */
|
|
unsigned int target_defaulted : 1;
|
|
|
|
/* ... and here: (``once'' means at least once). */
|
|
unsigned int opened_once : 1;
|
|
|
|
/* Set if we have a locally maintained mtime value, rather than
|
|
getting it from the file each time. */
|
|
unsigned int mtime_set : 1;
|
|
|
|
/* Flag set if symbols from this BFD should not be exported. */
|
|
unsigned int no_export : 1;
|
|
|
|
/* Remember when output has begun, to stop strange things
|
|
from happening. */
|
|
unsigned int output_has_begun : 1;
|
|
|
|
/* Have archive map. */
|
|
unsigned int has_armap : 1;
|
|
|
|
/* Set if this is a thin archive. */
|
|
unsigned int is_thin_archive : 1;
|
};
|
};
|
|
|
typedef enum bfd_error
|
typedef enum bfd_error
|
{
|
{
|
bfd_error_no_error = 0,
|
bfd_error_no_error = 0,
|
Line 5028... |
Line 5299... |
bfd_target_ieee_flavour,
|
bfd_target_ieee_flavour,
|
bfd_target_nlm_flavour,
|
bfd_target_nlm_flavour,
|
bfd_target_oasys_flavour,
|
bfd_target_oasys_flavour,
|
bfd_target_tekhex_flavour,
|
bfd_target_tekhex_flavour,
|
bfd_target_srec_flavour,
|
bfd_target_srec_flavour,
|
|
bfd_target_verilog_flavour,
|
bfd_target_ihex_flavour,
|
bfd_target_ihex_flavour,
|
bfd_target_som_flavour,
|
bfd_target_som_flavour,
|
bfd_target_os9k_flavour,
|
bfd_target_os9k_flavour,
|
bfd_target_versados_flavour,
|
bfd_target_versados_flavour,
|
bfd_target_msdos_flavour,
|
bfd_target_msdos_flavour,
|
Line 5310... |
Line 5582... |
NAME##_bfd_link_split_section, \
|
NAME##_bfd_link_split_section, \
|
NAME##_bfd_gc_sections, \
|
NAME##_bfd_gc_sections, \
|
NAME##_bfd_merge_sections, \
|
NAME##_bfd_merge_sections, \
|
NAME##_bfd_is_group_section, \
|
NAME##_bfd_is_group_section, \
|
NAME##_bfd_discard_group, \
|
NAME##_bfd_discard_group, \
|
NAME##_section_already_linked \
|
NAME##_section_already_linked, \
|
|
NAME##_bfd_define_common_symbol
|
|
|
int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
|
int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
|
bfd_byte * (*_bfd_get_relocated_section_contents)
|
bfd_byte * (*_bfd_get_relocated_section_contents)
|
(bfd *, struct bfd_link_info *, struct bfd_link_order *,
|
(bfd *, struct bfd_link_info *, struct bfd_link_order *,
|
bfd_byte *, bfd_boolean, struct bfd_symbol **);
|
bfd_byte *, bfd_boolean, struct bfd_symbol **);
|
Line 5358... |
Line 5631... |
/* Check if SEC has been already linked during a reloceatable or
|
/* Check if SEC has been already linked during a reloceatable or
|
final link. */
|
final link. */
|
void (*_section_already_linked) (bfd *, struct bfd_section *,
|
void (*_section_already_linked) (bfd *, struct bfd_section *,
|
struct bfd_link_info *);
|
struct bfd_link_info *);
|
|
|
|
/* Define a common symbol. */
|
|
bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *,
|
|
struct bfd_link_hash_entry *);
|
|
|
/* Routines to handle dynamic symbols and relocs. */
|
/* Routines to handle dynamic symbols and relocs. */
|
#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
|
#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
|
NAME##_get_dynamic_symtab_upper_bound, \
|
NAME##_get_dynamic_symtab_upper_bound, \
|
NAME##_canonicalize_dynamic_symtab, \
|
NAME##_canonicalize_dynamic_symtab, \
|
NAME##_get_synthetic_symtab, \
|
NAME##_get_synthetic_symtab, \
|
Line 5422... |
Line 5699... |
struct bfd_link_info *info);
|
struct bfd_link_info *info);
|
|
|
#define bfd_section_already_linked(abfd, sec, info) \
|
#define bfd_section_already_linked(abfd, sec, info) \
|
BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
|
BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
|
|
|
|
bfd_boolean bfd_generic_define_common_symbol
|
|
(bfd *output_bfd, struct bfd_link_info *info,
|
|
struct bfd_link_hash_entry *h);
|
|
|
|
#define bfd_define_common_symbol(output_bfd, info, h) \
|
|
BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h))
|
|
|
|
struct bfd_elf_version_tree * bfd_find_version_for_sym
|
|
(struct bfd_elf_version_tree *verdefs,
|
|
const char *sym_name, bfd_boolean *hide);
|
|
|
/* Extracted from simple.c. */
|
/* Extracted from simple.c. */
|
bfd_byte *bfd_simple_get_relocated_section_contents
|
bfd_byte *bfd_simple_get_relocated_section_contents
|
(bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
|
(bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
|
|
|
|
/* Extracted from compress.c. */
|
|
bfd_boolean bfd_uncompress_section_contents
|
|
(bfd_byte **buffer, bfd_size_type *size);
|
|
|
#ifdef __cplusplus
|
#ifdef __cplusplus
|
}
|
}
|
#endif
|
#endif
|
#endif
|
#endif
|
|
|
No newline at end of file
|
No newline at end of file
|