#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
#ifdef __cplusplus
extern "C" {
#endif
#include "ansidecl.h"
#include "symcat.h"
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
#ifndef SABER
#undef CONCAT4
#define CONCAT4(a,b,c,d) XCONCAT2(CONCAT2(a,b),CONCAT2(c,d))
#endif
#endif
#define BFD_ARCH_SIZE @wordsize@
#define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@
#define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@
#if @BFD_HOST_64_BIT_DEFINED@
#define BFD_HOST_64_BIT @BFD_HOST_64_BIT@
#define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@
#endif
#if BFD_ARCH_SIZE >= 64
#define BFD64
#endif
#ifndef INLINE
#if __GNUC__ >= 2
#define INLINE __inline__
#else
#define INLINE
#endif
#endif
typedef struct _bfd bfd;
typedef int bfd_boolean;
#undef FALSE
#undef TRUE
#define FALSE 0
#define TRUE 1
#if 0
#undef false
#undef true
#define false dont_use_false_in_bfd
#define true dont_use_true_in_bfd
#endif
#ifndef BFD_HOST_64_BIT
# if BFD_HOST_64BIT_LONG
# define BFD_HOST_64_BIT long
# define BFD_HOST_U_64_BIT unsigned long
# else
# ifdef __GNUC__
# if __GNUC__ >= 2
# define BFD_HOST_64_BIT long long
# define BFD_HOST_U_64_BIT unsigned long long
# endif
# endif
# endif
#endif
#ifdef BFD64
#ifndef BFD_HOST_64_BIT
#error No 64 bit integer type available
#endif
typedef BFD_HOST_U_64_BIT bfd_vma;
typedef BFD_HOST_64_BIT bfd_signed_vma;
typedef BFD_HOST_U_64_BIT bfd_size_type;
typedef BFD_HOST_U_64_BIT symvalue;
#ifndef fprintf_vma
#if BFD_HOST_64BIT_LONG
#define sprintf_vma(s,x) sprintf (s, "%016lx", x)
#define fprintf_vma(f,x) fprintf (f, "%016lx", x)
#else
#define _bfd_int64_low(x) ((unsigned long) (((x) & 0xffffffff)))
#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
#else
typedef unsigned long bfd_vma;
typedef long bfd_signed_vma;
typedef unsigned long symvalue;
typedef unsigned long bfd_size_type;
#define fprintf_vma(s,x) fprintf (s, "%08lx", x)
#define sprintf_vma(s,x) sprintf (s, "%08lx", x)
#endif
typedef bfd_signed_vma file_ptr;
typedef bfd_vma ufile_ptr;
extern void bfd_sprintf_vma
PARAMS ((bfd *, char *, bfd_vma));
extern void bfd_fprintf_vma
PARAMS ((bfd *, PTR, bfd_vma));
#define printf_vma(x) fprintf_vma(stdout,x)
#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
typedef unsigned int flagword;
typedef unsigned char bfd_byte;
typedef enum bfd_format
{
bfd_unknown = 0,
bfd_object,
bfd_archive,
bfd_core,
bfd_type_end
}
bfd_format;
#define BFD_NO_FLAGS 0x00
#define HAS_RELOC 0x01
#define EXEC_P 0x02
#define HAS_LINENO 0x04
#define HAS_DEBUG 0x08
#define HAS_SYMS 0x10
#define HAS_LOCALS 0x20
#define DYNAMIC 0x40
#define WP_TEXT 0x80
#define D_PAGED 0x100
#define BFD_IS_RELAXABLE 0x200
#define BFD_TRADITIONAL_FORMAT 0x400
#define BFD_IN_MEMORY 0x800
#define HAS_LOAD_PAGE 0x1000
#define BFD_IO_FUNCS 0x2000
struct bfd_in_memory;
struct bfd_io_functions;
struct stat;
struct bfd_io_functions
{
bfd_size_type (* read_func) PARAMS ((PTR iodata, PTR, bfd_size_type size, bfd_size_type nitems, bfd *abfd, bfd_vma where));
bfd_size_type (* write_func) PARAMS ((PTR iodata, const PTR, bfd_size_type size, bfd_size_type nitems, bfd *abfd, bfd_vma where));
int (* flush_func) PARAMS ((PTR iodata, bfd *abfd));
bfd_boolean (* close_func) PARAMS ((PTR iodata, bfd *abfd));
int (* stat_func) PARAMS ((PTR iodata, bfd *abfd, struct stat *statbuf));
PTR iodata;
};
typedef unsigned long symindex;
typedef const struct reloc_howto_struct reloc_howto_type;
#define BFD_NO_MORE_SYMBOLS ((symindex) ~0)
#define bfd_get_section(x) ((x)->section)
#define bfd_get_output_section(x) ((x)->section->output_section)
#define bfd_set_section(x,y) ((x)->section) = (y)
#define bfd_asymbol_base(x) ((x)->section->vma)
#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value)
#define bfd_asymbol_name(x) ((x)->name)
#define bfd_asymbol_bfd(x) ((x)->the_bfd)
#define bfd_asymbol_flavour(x) (bfd_asymbol_bfd(x)->xvec->flavour)
typedef struct carsym
{
char *name;
file_ptr file_offset;
}
carsym;
struct orl
{
char **name;
union
{
file_ptr pos;
bfd *abfd;
} u;
int namidx;
};
typedef struct lineno_cache_entry
{
unsigned int line_number;
union
{
struct symbol_cache_entry *sym;
bfd_vma offset;
} u;
}
alent;
#define align_power(addr, align) \
(((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align)))
typedef struct sec *sec_ptr;
#define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0)
#define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0)
#define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0)
#define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0)
#define bfd_section_name(bfd, ptr) ((ptr)->name)
#define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr))
#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
#define bfd_get_section_flags(bfd, ptr) ((ptr)->flags + 0)
#define bfd_get_section_userdata(bfd, ptr) ((ptr)->userdata)
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
typedef struct stat stat_type;
typedef enum bfd_print_symbol
{
bfd_print_symbol_name,
bfd_print_symbol_more,
bfd_print_symbol_all
} bfd_print_symbol_type;
typedef struct _symbol_info
{
symvalue value;
char type;
const char *name;
unsigned char stab_type;
char stab_other;
short stab_desc;
const char *stab_name;
} symbol_info;
extern const char *bfd_get_stab_name
PARAMS ((int));
struct bfd_hash_entry
{
struct bfd_hash_entry *next;
const char *string;
unsigned long hash;
};
struct bfd_hash_table
{
struct bfd_hash_entry **table;
unsigned int size;
struct bfd_hash_entry *(*newfunc)
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
PTR memory;
};
extern bfd_boolean bfd_hash_table_init
PARAMS ((struct bfd_hash_table *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *,
const char *)));
extern bfd_boolean bfd_hash_table_init_n
PARAMS ((struct bfd_hash_table *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *,
const char *),
unsigned int size));
extern void bfd_hash_table_free
PARAMS ((struct bfd_hash_table *));
extern struct bfd_hash_entry *bfd_hash_lookup
PARAMS ((struct bfd_hash_table *, const char *, bfd_boolean create,
bfd_boolean copy));
extern void bfd_hash_replace
PARAMS ((struct bfd_hash_table *, struct bfd_hash_entry *old,
struct bfd_hash_entry *nw));
extern struct bfd_hash_entry *bfd_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
const char *));
extern PTR bfd_hash_allocate
PARAMS ((struct bfd_hash_table *, unsigned int));
extern void bfd_hash_traverse
PARAMS ((struct bfd_hash_table *,
bfd_boolean (*) (struct bfd_hash_entry *, PTR),
PTR info));
#define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table
extern bfd_size_type bfd_bread
PARAMS ((PTR, bfd_size_type, bfd *));
extern bfd_size_type bfd_bwrite
PARAMS ((const PTR, bfd_size_type, bfd *));
extern int bfd_seek
PARAMS ((bfd *, file_ptr, int));
extern ufile_ptr bfd_tell
PARAMS ((bfd *));
extern int bfd_flush
PARAMS ((bfd *));
extern int bfd_stat
PARAMS ((bfd *, struct stat *));
#if __GNUC__
#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
(warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \
bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
(warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \
bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
#else
#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
(warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
(warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
#endif
extern void warn_deprecated
PARAMS ((const char *, const char *, int, const char *));
#define bfd_get_filename(abfd) ((char *) (abfd)->filename)
#define bfd_get_cacheable(abfd) ((abfd)->cacheable)
#define bfd_get_format(abfd) ((abfd)->format)
#define bfd_get_target(abfd) ((abfd)->xvec->name)
#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
#define bfd_family_coff(abfd) \
(bfd_get_flavour (abfd) == bfd_target_coff_flavour || \
bfd_get_flavour (abfd) == bfd_target_xcoff_flavour)
#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
#define bfd_header_big_endian(abfd) \
((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG)
#define bfd_header_little_endian(abfd) \
((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE)
#define bfd_get_file_flags(abfd) ((abfd)->flags)
#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
#define bfd_my_archive(abfd) ((abfd)->my_archive)
#define bfd_has_map(abfd) ((abfd)->has_armap)
#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types)
#define bfd_usrdata(abfd) ((abfd)->usrdata)
#define bfd_get_start_address(abfd) ((abfd)->start_address)
#define bfd_get_symcount(abfd) ((abfd)->symcount)
#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols)
#define bfd_count_sections(abfd) ((abfd)->section_count)
#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount)
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
extern bfd_boolean bfd_cache_close
PARAMS ((bfd *abfd));
extern bfd_boolean bfd_record_phdr
PARAMS ((bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
bfd_boolean, bfd_boolean, unsigned int, struct sec **));
bfd_vma bfd_getb64
PARAMS ((const unsigned char *));
bfd_vma bfd_getl64
PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getb_signed_64
PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getl_signed_64
PARAMS ((const unsigned char *));
bfd_vma bfd_getb32
PARAMS ((const unsigned char *));
bfd_vma bfd_getl32
PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getb_signed_32
PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getl_signed_32
PARAMS ((const unsigned char *));
bfd_vma bfd_getb16
PARAMS ((const unsigned char *));
bfd_vma bfd_getl16
PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getb_signed_16
PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getl_signed_16
PARAMS ((const unsigned char *));
void bfd_putb64
PARAMS ((bfd_vma, unsigned char *));
void bfd_putl64
PARAMS ((bfd_vma, unsigned char *));
void bfd_putb32
PARAMS ((bfd_vma, unsigned char *));
void bfd_putl32
PARAMS ((bfd_vma, unsigned char *));
void bfd_putb16
PARAMS ((bfd_vma, unsigned char *));
void bfd_putl16
PARAMS ((bfd_vma, unsigned char *));
bfd_vma bfd_get_bits
PARAMS ((bfd_byte *, int, bfd_boolean));
void bfd_put_bits
PARAMS ((bfd_vma, bfd_byte *, int, bfd_boolean));
#if defined(__STDC__) || defined(ALMOST_STDC)
struct ecoff_debug_info;
struct ecoff_debug_swap;
struct ecoff_extr;
struct symbol_cache_entry;
struct bfd_link_info;
struct bfd_link_hash_entry;
struct bfd_elf_version_tree;
#endif
extern bfd_vma bfd_ecoff_get_gp_value
PARAMS ((bfd * abfd));
extern bfd_boolean bfd_ecoff_set_gp_value
PARAMS ((bfd *abfd, bfd_vma gp_value));
extern bfd_boolean bfd_ecoff_set_regmasks
PARAMS ((bfd *abfd, unsigned long gprmask, unsigned long fprmask,
unsigned long *cprmask));
extern PTR bfd_ecoff_debug_init
PARAMS ((bfd *output_bfd, struct ecoff_debug_info *output_debug,
const struct ecoff_debug_swap *output_swap,
struct bfd_link_info *));
extern void bfd_ecoff_debug_free
PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
const struct ecoff_debug_swap *output_swap,
struct bfd_link_info *));
extern bfd_boolean bfd_ecoff_debug_accumulate
PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
const struct ecoff_debug_swap *output_swap,
bfd *input_bfd, struct ecoff_debug_info *input_debug,
const struct ecoff_debug_swap *input_swap,
struct bfd_link_info *));
extern bfd_boolean bfd_ecoff_debug_accumulate_other
PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
struct bfd_link_info *));
extern bfd_boolean bfd_ecoff_debug_externals
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
bfd_boolean relocateable,
bfd_boolean (*get_extr) (struct symbol_cache_entry *,
struct ecoff_extr *),
void (*set_index) (struct symbol_cache_entry *,
bfd_size_type)));
extern bfd_boolean bfd_ecoff_debug_one_external
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
const char *name, struct ecoff_extr *esym));
extern bfd_size_type bfd_ecoff_debug_size
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap));
extern bfd_boolean bfd_ecoff_write_debug
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap, file_ptr where));
extern bfd_boolean bfd_ecoff_write_accumulated_debug
PARAMS ((PTR handle, bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
struct bfd_link_info *info, file_ptr where));
extern bfd_boolean bfd_mips_ecoff_create_embedded_relocs
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
char **));
struct bfd_link_needed_list
{
struct bfd_link_needed_list *next;
bfd *by;
const char *name;
};
extern bfd_boolean bfd_elf32_record_link_assignment
PARAMS ((bfd *, struct bfd_link_info *, const char *, bfd_boolean));
extern bfd_boolean bfd_elf64_record_link_assignment
PARAMS ((bfd *, struct bfd_link_info *, const char *, bfd_boolean));
extern struct bfd_link_needed_list *bfd_elf_get_needed_list
PARAMS ((bfd *, struct bfd_link_info *));
extern bfd_boolean bfd_elf_get_bfd_needed_list
PARAMS ((bfd *, struct bfd_link_needed_list **));
extern bfd_boolean bfd_elf32_size_dynamic_sections
PARAMS ((bfd *, const char *, const char *, const char *,
const char * const *, struct bfd_link_info *, struct sec **,
struct bfd_elf_version_tree *));
extern bfd_boolean bfd_elf64_size_dynamic_sections
PARAMS ((bfd *, const char *, const char *, const char *,
const char * const *, struct bfd_link_info *, struct sec **,
struct bfd_elf_version_tree *));
extern void bfd_elf_set_dt_needed_name
PARAMS ((bfd *, const char *));
extern void bfd_elf_set_dt_needed_soname
PARAMS ((bfd *, const char *));
extern const char *bfd_elf_get_dt_soname
PARAMS ((bfd *));
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
PARAMS ((bfd *, struct bfd_link_info *));
extern bfd_boolean bfd_elf32_discard_info
PARAMS ((bfd *, struct bfd_link_info *));
extern bfd_boolean bfd_elf64_discard_info
PARAMS ((bfd *, struct bfd_link_info *));
extern long bfd_get_elf_phdr_upper_bound
PARAMS ((bfd *abfd));
extern int bfd_get_elf_phdrs
PARAMS ((bfd *abfd, void *phdrs));
extern int bfd_get_arch_size
PARAMS ((bfd *));
extern int bfd_get_sign_extend_vma
PARAMS ((bfd *));
extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
char **));
extern bfd_boolean bfd_mips_elf32_create_embedded_relocs
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
char **));
extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
PARAMS ((bfd *, struct bfd_link_info *));
extern bfd_boolean bfd_sunos_record_link_assignment
PARAMS ((bfd *, struct bfd_link_info *, const char *));
extern bfd_boolean bfd_sunos_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *, struct sec **, struct sec **,
struct sec **));
extern bfd_boolean bfd_i386linux_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
extern bfd_boolean bfd_m68klinux_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
extern bfd_boolean bfd_sparclinux_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
struct _bfd_window_internal;
typedef struct _bfd_window_internal bfd_window_internal;
typedef struct _bfd_window
{
PTR data;
bfd_size_type size;
struct _bfd_window_internal *i;
}
bfd_window;
extern void bfd_init_window
PARAMS ((bfd_window *));
extern void bfd_free_window
PARAMS ((bfd_window *));
extern bfd_boolean bfd_get_file_window
PARAMS ((bfd *, ufile_ptr, bfd_size_type, bfd_window *, bfd_boolean));
extern bfd_boolean bfd_xcoff_link_record_set
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
bfd_size_type));
extern bfd_boolean bfd_xcoff_import_symbol
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
bfd_vma, const char *, const char *, const char *, unsigned int));
extern bfd_boolean bfd_xcoff_export_symbol
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *));
extern bfd_boolean bfd_xcoff_link_count_reloc
PARAMS ((bfd *, struct bfd_link_info *, const char *));
extern bfd_boolean bfd_xcoff_record_link_assignment
PARAMS ((bfd *, struct bfd_link_info *, const char *));
extern bfd_boolean bfd_xcoff_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *,
unsigned long, unsigned long, unsigned long, bfd_boolean,
int, bfd_boolean, bfd_boolean, struct sec **, bfd_boolean));
extern bfd_boolean bfd_xcoff_link_generate_rtinit
PARAMS ((bfd *, const char *, const char *, bfd_boolean));
extern bfd_boolean bfd_xcoff_ar_archive_set_magic
PARAMS ((bfd *, char *));
#if defined(__STDC__) || defined(ALMOST_STDC)
struct internal_syment;
union internal_auxent;
#endif
extern bfd_boolean bfd_coff_get_syment
PARAMS ((bfd *, struct symbol_cache_entry *, struct internal_syment *));
extern bfd_boolean bfd_coff_get_auxent
PARAMS ((bfd *, struct symbol_cache_entry *, int, union internal_auxent *));
extern bfd_boolean bfd_coff_set_symbol_class
PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int));
extern bfd_boolean bfd_m68k_coff_create_embedded_relocs
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
char **));
extern bfd_boolean bfd_arm_allocate_interworking_sections
PARAMS ((struct bfd_link_info *));
extern bfd_boolean bfd_arm_process_before_allocation
PARAMS ((bfd *, struct bfd_link_info *, int));
extern bfd_boolean bfd_arm_get_bfd_for_interworking
PARAMS ((bfd *, struct bfd_link_info *));
extern bfd_boolean bfd_arm_pe_allocate_interworking_sections
PARAMS ((struct bfd_link_info *));
extern bfd_boolean bfd_arm_pe_process_before_allocation
PARAMS ((bfd *, struct bfd_link_info *, int));
extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking
PARAMS ((bfd *, struct bfd_link_info *));
extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
PARAMS ((struct bfd_link_info *));
extern bfd_boolean bfd_elf32_arm_process_before_allocation
PARAMS ((bfd *, struct bfd_link_info *, int));
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
PARAMS ((bfd *, struct bfd_link_info *));
extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
PARAMS ((bfd *, struct bfd_link_info *));
extern void bfd_ticoff_set_section_load_page
PARAMS ((struct sec *, int));
extern int bfd_ticoff_get_section_load_page
PARAMS ((struct sec *));
void
bfd_init PARAMS ((void));
bfd *
bfd_openr PARAMS ((const char *filename, const char *target));
bfd_boolean
bfd_mmap_file PARAMS ((bfd *abfd, void *addr));
bfd *
bfd_funopenr PARAMS ((const char *filename, const char *target, struct bfd_io_functions *fdata));
bfd *
bfd_memopenr PARAMS ((const char *filename, const char *target, unsigned char *addr, bfd_size_type len));
bfd *
bfd_fdopenr PARAMS ((const char *filename, const char *target, int fd));
bfd *
bfd_openstreamr PARAMS ((const char *, const char *, PTR));
bfd *
bfd_openw PARAMS ((const char *filename, const char *target));
bfd_boolean
bfd_close PARAMS ((bfd *abfd));
bfd_boolean
bfd_close_all_done PARAMS ((bfd *));
bfd *
bfd_create PARAMS ((const char *filename, bfd *templ));
bfd_boolean
bfd_make_writable PARAMS ((bfd *abfd));
bfd_boolean
bfd_make_readable PARAMS ((bfd *abfd));
#define bfd_put_8(abfd, val, ptr) \
((void) (*((unsigned char *) (ptr)) = (unsigned char) (val)))
#define bfd_put_signed_8 \
bfd_put_8
#define bfd_get_8(abfd, ptr) \
(*(unsigned char *) (ptr) & 0xff)
#define bfd_get_signed_8(abfd, ptr) \
(((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
#define bfd_put_16(abfd, val, ptr) \
BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
#define bfd_put_signed_16 \
bfd_put_16
#define bfd_get_16(abfd, ptr) \
BFD_SEND(abfd, bfd_getx16, (ptr))
#define bfd_get_signed_16(abfd, ptr) \
BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
#define bfd_put_32(abfd, val, ptr) \
BFD_SEND(abfd, bfd_putx32, ((val),(ptr)))
#define bfd_put_signed_32 \
bfd_put_32
#define bfd_get_32(abfd, ptr) \
BFD_SEND(abfd, bfd_getx32, (ptr))
#define bfd_get_signed_32(abfd, ptr) \
BFD_SEND(abfd, bfd_getx_signed_32, (ptr))
#define bfd_put_64(abfd, val, ptr) \
BFD_SEND(abfd, bfd_putx64, ((val), (ptr)))
#define bfd_put_signed_64 \
bfd_put_64
#define bfd_get_64(abfd, ptr) \
BFD_SEND(abfd, bfd_getx64, (ptr))
#define bfd_get_signed_64(abfd, ptr) \
BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
#define bfd_get(bits, abfd, ptr) \
( (bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr) \
: (bits) == 16 ? bfd_get_16 (abfd, ptr) \
: (bits) == 32 ? bfd_get_32 (abfd, ptr) \
: (bits) == 64 ? bfd_get_64 (abfd, ptr) \
: (abort (), (bfd_vma) - 1))
#define bfd_put(bits, abfd, val, ptr) \
( (bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
: (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
: (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
: (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
: (abort (), (void) 0))
#define bfd_h_put_8(abfd, val, ptr) \
bfd_put_8 (abfd, val, ptr)
#define bfd_h_put_signed_8(abfd, val, ptr) \
bfd_put_8 (abfd, val, ptr)
#define bfd_h_get_8(abfd, ptr) \
bfd_get_8 (abfd, ptr)
#define bfd_h_get_signed_8(abfd, ptr) \
bfd_get_signed_8 (abfd, ptr)
#define bfd_h_put_16(abfd, val, ptr) \
BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
#define bfd_h_put_signed_16 \
bfd_h_put_16
#define bfd_h_get_16(abfd, ptr) \
BFD_SEND (abfd, bfd_h_getx16, (ptr))
#define bfd_h_get_signed_16(abfd, ptr) \
BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
#define bfd_h_put_32(abfd, val, ptr) \
BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
#define bfd_h_put_signed_32 \
bfd_h_put_32
#define bfd_h_get_32(abfd, ptr) \
BFD_SEND (abfd, bfd_h_getx32, (ptr))
#define bfd_h_get_signed_32(abfd, ptr) \
BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
#define bfd_h_put_64(abfd, val, ptr) \
BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
#define bfd_h_put_signed_64 \
bfd_h_put_64
#define bfd_h_get_64(abfd, ptr) \
BFD_SEND (abfd, bfd_h_getx64, (ptr))
#define bfd_h_get_signed_64(abfd, ptr) \
BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
#define H_PUT_64(abfd, val, where) \
bfd_h_put_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
#define H_PUT_32(abfd, val, where) \
bfd_h_put_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
#define H_PUT_16(abfd, val, where) \
bfd_h_put_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
#define H_PUT_8 bfd_h_put_8
#define H_PUT_S64(abfd, val, where) \
bfd_h_put_signed_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
#define H_PUT_S32(abfd, val, where) \
bfd_h_put_signed_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
#define H_PUT_S16(abfd, val, where) \
bfd_h_put_signed_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
#define H_PUT_S8 bfd_h_put_signed_8
#define H_GET_64(abfd, where) \
bfd_h_get_64 ((abfd), (bfd_byte *) (where))
#define H_GET_32(abfd, where) \
bfd_h_get_32 ((abfd), (bfd_byte *) (where))
#define H_GET_16(abfd, where) \
bfd_h_get_16 ((abfd), (bfd_byte *) (where))
#define H_GET_8 bfd_h_get_8
#define H_GET_S64(abfd, where) \
bfd_h_get_signed_64 ((abfd), (bfd_byte *) (where))
#define H_GET_S32(abfd, where) \
bfd_h_get_signed_32 ((abfd), (bfd_byte *) (where))
#define H_GET_S16(abfd, where) \
bfd_h_get_signed_16 ((abfd), (bfd_byte *) (where))
#define H_GET_S8 bfd_h_get_signed_8
long
bfd_get_mtime PARAMS ((bfd *abfd));
long
bfd_get_size PARAMS ((bfd *abfd));
struct bfd_comdat_info
{
const char *name;
long symbol;
};
typedef struct sec
{
const char *name;
int id;
int index;
struct sec *next;
flagword flags;
#define SEC_NO_FLAGS 0x000
#define SEC_ALLOC 0x001
#define SEC_LOAD 0x002
#define SEC_RELOC 0x004
#define SEC_ARCH_BIT_0 0x008
#define SEC_READONLY 0x010
#define SEC_CODE 0x020
#define SEC_DATA 0x040
#define SEC_ROM 0x080
#define SEC_CONSTRUCTOR 0x100
#define SEC_HAS_CONTENTS 0x200
#define SEC_NEVER_LOAD 0x400
#define SEC_COFF_SHARED_LIBRARY 0x800
#define SEC_THREAD_LOCAL 0x1000
#define SEC_HAS_GOT_REF 0x4000
#define SEC_IS_COMMON 0x8000
#define SEC_DEBUGGING 0x10000
#define SEC_IN_MEMORY 0x20000
#define SEC_EXCLUDE 0x40000
#define SEC_SORT_ENTRIES 0x80000
#define SEC_LINK_ONCE 0x100000
#define SEC_LINK_DUPLICATES 0x600000
#define SEC_LINK_DUPLICATES_DISCARD 0x0
#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000
#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000
#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000
#define SEC_LINKER_CREATED 0x800000
#define SEC_KEEP 0x1000000
#define SEC_SMALL_DATA 0x2000000
#define SEC_SHARED 0x4000000
#define SEC_BLOCK 0x8000000
#define SEC_CLINK 0x10000000
#define SEC_MERGE 0x20000000
#define SEC_STRINGS 0x40000000
#define SEC_GROUP 0x80000000
unsigned int user_set_vma : 1;
unsigned int reloc_done : 1;
unsigned int linker_mark : 1;
unsigned int linker_has_input : 1;
unsigned int gc_mark : 1;
unsigned int segment_mark : 1;
bfd_vma vma;
bfd_vma lma;
bfd_size_type _cooked_size;
bfd_size_type _raw_size;
bfd_vma output_offset;
struct sec *output_section;
unsigned int alignment_power;
struct reloc_cache_entry *relocation;
struct reloc_cache_entry **orelocation;
unsigned reloc_count;
file_ptr filepos;
file_ptr rel_filepos;
file_ptr line_filepos;
PTR userdata;
unsigned char *contents;
alent *lineno;
unsigned int lineno_count;
unsigned int entsize;
struct bfd_comdat_info *comdat;
file_ptr moving_line_filepos;
int target_index;
PTR used_by_bfd;
struct relent_chain *constructor_chain;
bfd *owner;
struct symbol_cache_entry *symbol;
struct symbol_cache_entry **symbol_ptr_ptr;
struct bfd_link_order *link_order_head;
struct bfd_link_order *link_order_tail;
} asection;
#define BFD_ABS_SECTION_NAME "*ABS*"
#define BFD_UND_SECTION_NAME "*UND*"
#define BFD_COM_SECTION_NAME "*COM*"
#define BFD_IND_SECTION_NAME "*IND*"
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)
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)
extern const asection bfd_com_section;
#define bfd_com_section_ptr ((asection *) &bfd_com_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)
#define bfd_is_const_section(SEC) \
( ((SEC) == bfd_abs_section_ptr) \
|| ((SEC) == bfd_und_section_ptr) \
|| ((SEC) == bfd_com_section_ptr) \
|| ((SEC) == bfd_ind_section_ptr))
extern const struct symbol_cache_entry * const bfd_abs_symbol;
extern const struct symbol_cache_entry * const bfd_com_symbol;
extern const struct symbol_cache_entry * const bfd_und_symbol;
extern const struct symbol_cache_entry * const bfd_ind_symbol;
#define bfd_get_section_size_before_reloc(section) \
((section)->reloc_done ? (abort (), (bfd_size_type) 1) \
: (section)->_raw_size)
#define bfd_get_section_size_after_reloc(section) \
((section)->reloc_done ? (section)->_cooked_size \
: (abort (), (bfd_size_type) 1))
#define bfd_section_list_remove(ABFD, PS) \
do \
{ \
asection **_ps = PS; \
asection *_s = *_ps; \
*_ps = _s->next; \
if (_s->next == NULL) \
(ABFD)->section_tail = _ps; \
} \
while (0)
#define bfd_section_list_insert(ABFD, PS, S) \
do \
{ \
asection **_ps = PS; \
asection *_s = S; \
_s->next = *_ps; \
*_ps = _s; \
if (_s->next == NULL) \
(ABFD)->section_tail = &_s->next; \
} \
while (0)
void
bfd_section_list_clear PARAMS ((bfd *));
asection *
bfd_get_section_by_name PARAMS ((bfd *abfd, const char *name));
char *
bfd_get_unique_section_name PARAMS ((bfd *abfd,
const char *templat,
int *count));
asection *
bfd_make_section_old_way PARAMS ((bfd *abfd, const char *name));
asection *
bfd_make_section_anyway PARAMS ((bfd *abfd, const char *name));
asection *
bfd_make_section PARAMS ((bfd *, const char *name));
bfd_boolean
bfd_set_section_flags PARAMS ((bfd *abfd, asection *sec, flagword flags));
void
bfd_map_over_sections PARAMS ((bfd *abfd,
void (*func) (bfd *abfd,
asection *sect,
PTR obj),
PTR obj));
bfd_boolean
bfd_set_section_size PARAMS ((bfd *abfd, asection *sec, bfd_size_type val));
bfd_boolean
bfd_set_section_contents PARAMS ((bfd *abfd, asection *section,
PTR data, file_ptr offset,
bfd_size_type count));
bfd_boolean
bfd_get_section_contents PARAMS ((bfd *abfd, asection *section,
PTR location, file_ptr offset,
bfd_size_type count));
bfd_boolean
bfd_get_section_contents_in_window PARAMS ((bfd *abfd, asection *section, bfd_window *window,
file_ptr offset, bfd_size_type count));
bfd_boolean
bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec,
bfd *obfd, asection *osec));
#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
BFD_SEND (obfd, _bfd_copy_private_section_data, \
(ibfd, isection, obfd, osection))
void
_bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section));
bfd_boolean
bfd_generic_discard_group PARAMS ((bfd *abfd, asection *group));
void
bfd_set_cache_max_open PARAMS ((unsigned int nmax));
enum bfd_architecture
{
bfd_arch_unknown,
bfd_arch_obscure,
bfd_arch_m68k,
#define bfd_mach_m68000 1
#define bfd_mach_m68008 2
#define bfd_mach_m68010 3
#define bfd_mach_m68020 4
#define bfd_mach_m68030 5
#define bfd_mach_m68040 6
#define bfd_mach_m68060 7
#define bfd_mach_cpu32 8
#define bfd_mach_mcf5200 9
#define bfd_mach_mcf5206e 10
#define bfd_mach_mcf5307 11
#define bfd_mach_mcf5407 12
bfd_arch_vax,
bfd_arch_i960,
#define bfd_mach_i960_core 1
#define bfd_mach_i960_ka_sa 2
#define bfd_mach_i960_kb_sb 3
#define bfd_mach_i960_mc 4
#define bfd_mach_i960_xa 5
#define bfd_mach_i960_ca 6
#define bfd_mach_i960_jx 7
#define bfd_mach_i960_hx 8
bfd_arch_or32,
bfd_arch_a29k,
bfd_arch_sparc,
#define bfd_mach_sparc 1
#define bfd_mach_sparc_sparclet 2
#define bfd_mach_sparc_sparclite 3
#define bfd_mach_sparc_v8plus 4
#define bfd_mach_sparc_v8plusa 5
#define bfd_mach_sparc_sparclite_le 6
#define bfd_mach_sparc_v9 7
#define bfd_mach_sparc_v9a 8
#define bfd_mach_sparc_v8plusb 9
#define bfd_mach_sparc_v9b 10
#define bfd_mach_sparc_v9_p(mach) \
((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
&& (mach) != bfd_mach_sparc_sparclite_le)
bfd_arch_mips,
#define bfd_mach_mips3000 3000
#define bfd_mach_mips3900 3900
#define bfd_mach_mips4000 4000
#define bfd_mach_mips4010 4010
#define bfd_mach_mips4100 4100
#define bfd_mach_mips4111 4111
#define bfd_mach_mips4120 4120
#define bfd_mach_mips4300 4300
#define bfd_mach_mips4400 4400
#define bfd_mach_mips4600 4600
#define bfd_mach_mips4650 4650
#define bfd_mach_mips5000 5000
#define bfd_mach_mips5400 5400
#define bfd_mach_mips5500 5500
#define bfd_mach_mips6000 6000
#define bfd_mach_mips8000 8000
#define bfd_mach_mips10000 10000
#define bfd_mach_mips12000 12000
#define bfd_mach_mips16 16
#define bfd_mach_mips5 5
#define bfd_mach_mips_sb1 12310201
#define bfd_mach_mipsisa32 32
#define bfd_mach_mipsisa32r2 33
#define bfd_mach_mipsisa64 64
bfd_arch_i386,
#define bfd_mach_i386_i386 1
#define bfd_mach_i386_i8086 2
#define bfd_mach_i386_i386_intel_syntax 3
#define bfd_mach_x86_64 64
#define bfd_mach_x86_64_intel_syntax 65
bfd_arch_we32k,
bfd_arch_tahoe,
bfd_arch_i860,
bfd_arch_i370,
bfd_arch_romp,
bfd_arch_alliant,
bfd_arch_convex,
bfd_arch_m88k,
bfd_arch_m98k,
bfd_arch_pyramid,
bfd_arch_h8300,
#define bfd_mach_h8300 1
#define bfd_mach_h8300h 2
#define bfd_mach_h8300s 3
bfd_arch_pdp11,
bfd_arch_powerpc,
#define bfd_mach_ppc 32
#define bfd_mach_ppc64 64
#define bfd_mach_ppc_403 403
#define bfd_mach_ppc_403gc 4030
#define bfd_mach_ppc_505 505
#define bfd_mach_ppc_601 601
#define bfd_mach_ppc_602 602
#define bfd_mach_ppc_603 603
#define bfd_mach_ppc_ec603e 6031
#define bfd_mach_ppc_604 604
#define bfd_mach_ppc_620 620
#define bfd_mach_ppc_630 630
#define bfd_mach_ppc_750 750
#define bfd_mach_ppc_860 860
#define bfd_mach_ppc_a35 35
#define bfd_mach_ppc_rs64ii 642
#define bfd_mach_ppc_rs64iii 643
#define bfd_mach_ppc_7400 7400
#define bfd_mach_ppc_e500 500
#define bfd_mach_ppc_970 970
bfd_arch_rs6000,
#define bfd_mach_rs6k 6000
#define bfd_mach_rs6k_rs1 6001
#define bfd_mach_rs6k_rsc 6003
#define bfd_mach_rs6k_rs2 6002
bfd_arch_hppa,
bfd_arch_d10v,
#define bfd_mach_d10v 1
#define bfd_mach_d10v_ts2 2
#define bfd_mach_d10v_ts3 3
bfd_arch_d30v,
bfd_arch_dlx,
bfd_arch_m68hc11,
bfd_arch_m68hc12,
#define bfd_mach_m6812_default 0
#define bfd_mach_m6812 1
#define bfd_mach_m6812s 2
bfd_arch_z8k,
#define bfd_mach_z8001 1
#define bfd_mach_z8002 2
bfd_arch_h8500,
bfd_arch_sh,
#define bfd_mach_sh 1
#define bfd_mach_sh2 0x20
#define bfd_mach_sh_dsp 0x2d
#define bfd_mach_sh2e 0x2e
#define bfd_mach_sh3 0x30
#define bfd_mach_sh3_dsp 0x3d
#define bfd_mach_sh3e 0x3e
#define bfd_mach_sh4 0x40
#define bfd_mach_sh5 0x50
bfd_arch_alpha,
#define bfd_mach_alpha_ev4 0x10
#define bfd_mach_alpha_ev5 0x20
#define bfd_mach_alpha_ev6 0x30
bfd_arch_arm,
#define bfd_mach_arm_2 1
#define bfd_mach_arm_2a 2
#define bfd_mach_arm_3 3
#define bfd_mach_arm_3M 4
#define bfd_mach_arm_4 5
#define bfd_mach_arm_4T 6
#define bfd_mach_arm_5 7
#define bfd_mach_arm_5T 8
#define bfd_mach_arm_5TE 9
#define bfd_mach_arm_XScale 10
bfd_arch_ns32k,
bfd_arch_w65,
bfd_arch_tic30,
bfd_arch_tic4x,
#define bfd_mach_c3x 30
#define bfd_mach_c4x 40
bfd_arch_tic54x,
bfd_arch_tic80,
bfd_arch_v850,
#define bfd_mach_v850 1
#define bfd_mach_v850e 'E'
bfd_arch_arc,
#define bfd_mach_arc_5 5
#define bfd_mach_arc_6 6
#define bfd_mach_arc_7 7
#define bfd_mach_arc_8 8
bfd_arch_m32r,
#define bfd_mach_m32r 1
#define bfd_mach_m32rx 'x'
bfd_arch_mn10200,
bfd_arch_mn10300,
#define bfd_mach_mn10300 300
#define bfd_mach_am33 330
bfd_arch_fr30,
#define bfd_mach_fr30 0x46523330
bfd_arch_frv,
#define bfd_mach_frv 1
#define bfd_mach_frvsimple 2
#define bfd_mach_fr300 300
#define bfd_mach_fr400 400
#define bfd_mach_frvtomcat 499
#define bfd_mach_fr500 500
bfd_arch_mcore,
bfd_arch_ia64,
#define bfd_mach_ia64_elf64 64
#define bfd_mach_ia64_elf32 32
bfd_arch_ip2k,
#define bfd_mach_ip2022 1
#define bfd_mach_ip2022ext 2
bfd_arch_iq2000,
#define bfd_mach_iq2000 1
#define bfd_mach_iq10 2
bfd_arch_pj,
bfd_arch_avr,
#define bfd_mach_avr1 1
#define bfd_mach_avr2 2
#define bfd_mach_avr3 3
#define bfd_mach_avr4 4
#define bfd_mach_avr5 5
bfd_arch_cris,
bfd_arch_s390,
#define bfd_mach_s390_31 31
#define bfd_mach_s390_64 64
bfd_arch_openrisc,
bfd_arch_mmix,
bfd_arch_xstormy16,
#define bfd_mach_xstormy16 1
bfd_arch_msp430,
#define bfd_mach_msp110 110
#define bfd_mach_msp11 11
#define bfd_mach_msp12 12
#define bfd_mach_msp13 13
#define bfd_mach_msp14 14
#define bfd_mach_msp41 41
#define bfd_mach_msp31 31
#define bfd_mach_msp32 32
#define bfd_mach_msp33 33
#define bfd_mach_msp43 43
#define bfd_mach_msp44 44
#define bfd_mach_msp15 15
#define bfd_mach_msp16 16
bfd_arch_last
};
typedef struct bfd_arch_info
{
int bits_per_word;
int bits_per_address;
int bits_per_byte;
enum bfd_architecture arch;
unsigned long mach;
const char *arch_name;
const char *printable_name;
unsigned int section_align_power;
bfd_boolean the_default;
const struct bfd_arch_info * (*compatible)
PARAMS ((const struct bfd_arch_info *a,
const struct bfd_arch_info *b));
bfd_boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
const struct bfd_arch_info *next;
}
bfd_arch_info_type;
const char *
bfd_printable_name PARAMS ((bfd *abfd));
const bfd_arch_info_type *
bfd_scan_arch PARAMS ((const char *string));
const char **
bfd_arch_list PARAMS ((void));
const bfd_arch_info_type *
bfd_arch_get_compatible PARAMS ((
const bfd *abfd,
const bfd *bbfd,
bfd_boolean accept_unknowns));
void
bfd_set_arch_info PARAMS ((bfd *abfd, const bfd_arch_info_type *arg));
enum bfd_architecture
bfd_get_arch PARAMS ((bfd *abfd));
unsigned long
bfd_get_mach PARAMS ((bfd *abfd));
unsigned int
bfd_arch_bits_per_byte PARAMS ((bfd *abfd));
unsigned int
bfd_arch_bits_per_address PARAMS ((bfd *abfd));
const bfd_arch_info_type *
bfd_get_arch_info PARAMS ((bfd *abfd));
const bfd_arch_info_type *
bfd_lookup_arch PARAMS ((enum bfd_architecture
arch,
unsigned long machine));
const char *
bfd_printable_arch_mach PARAMS ((enum bfd_architecture arch, unsigned long machine));
unsigned int
bfd_octets_per_byte PARAMS ((bfd *abfd));
unsigned int
bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
unsigned long machine));
typedef enum bfd_reloc_status
{
bfd_reloc_ok,
bfd_reloc_overflow,
bfd_reloc_outofrange,
bfd_reloc_continue,
bfd_reloc_notsupported,
bfd_reloc_other,
bfd_reloc_undefined,
bfd_reloc_dangerous
}
bfd_reloc_status_type;
typedef struct reloc_cache_entry
{
struct symbol_cache_entry **sym_ptr_ptr;
bfd_size_type address;
bfd_vma addend;
reloc_howto_type *howto;
}
arelent;
enum complain_overflow
{
complain_overflow_dont,
complain_overflow_bitfield,
complain_overflow_signed,
complain_overflow_unsigned
};
struct reloc_howto_struct
{
unsigned int type;
unsigned int rightshift;
int size;
unsigned int bitsize;
bfd_boolean pc_relative;
unsigned int bitpos;
enum complain_overflow complain_on_overflow;
bfd_reloc_status_type (*special_function)
PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
bfd *, char **));
char *name;
bfd_boolean partial_inplace;
bfd_vma src_mask;
bfd_vma dst_mask;
bfd_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) \
HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \
NAME, FALSE, 0, 0, IN)
#define EMPTY_HOWTO(C) \
HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \
NULL, FALSE, 0, 0, FALSE)
#define HOWTO_PREPARE(relocation, symbol) \
{ \
if (symbol != (asymbol *) NULL) \
{ \
if (bfd_is_com_section (symbol->section)) \
{ \
relocation = 0; \
} \
else \
{ \
relocation = symbol->value; \
} \
} \
}
unsigned int
bfd_get_reloc_size PARAMS ((reloc_howto_type *));
typedef struct relent_chain
{
arelent relent;
struct relent_chain *next;
}
arelent_chain;
bfd_reloc_status_type
bfd_check_overflow PARAMS ((enum complain_overflow how,
unsigned int bitsize,
unsigned int rightshift,
unsigned int addrsize,
bfd_vma relocation));
bfd_reloc_status_type
bfd_perform_relocation PARAMS ((bfd *abfd,
arelent *reloc_entry,
PTR data,
asection *input_section,
bfd *output_bfd,
char **error_message));
bfd_reloc_status_type
bfd_install_relocation PARAMS ((bfd *abfd,
arelent *reloc_entry,
PTR data, bfd_vma data_start,
asection *input_section,
char **error_message));
enum bfd_reloc_code_real {
_dummy_first_bfd_reloc_code_real,
BFD_RELOC_64,
BFD_RELOC_32,
BFD_RELOC_26,
BFD_RELOC_24,
BFD_RELOC_16,
BFD_RELOC_14,
BFD_RELOC_8,
BFD_RELOC_64_PCREL,
BFD_RELOC_32_PCREL,
BFD_RELOC_24_PCREL,
BFD_RELOC_16_PCREL,
BFD_RELOC_12_PCREL,
BFD_RELOC_8_PCREL,
BFD_RELOC_32_GOT_PCREL,
BFD_RELOC_16_GOT_PCREL,
BFD_RELOC_8_GOT_PCREL,
BFD_RELOC_32_GOTOFF,
BFD_RELOC_16_GOTOFF,
BFD_RELOC_LO16_GOTOFF,
BFD_RELOC_HI16_GOTOFF,
BFD_RELOC_HI16_S_GOTOFF,
BFD_RELOC_8_GOTOFF,
BFD_RELOC_64_PLT_PCREL,
BFD_RELOC_32_PLT_PCREL,
BFD_RELOC_24_PLT_PCREL,
BFD_RELOC_16_PLT_PCREL,
BFD_RELOC_8_PLT_PCREL,
BFD_RELOC_64_PLTOFF,
BFD_RELOC_32_PLTOFF,
BFD_RELOC_16_PLTOFF,
BFD_RELOC_LO16_PLTOFF,
BFD_RELOC_HI16_PLTOFF,
BFD_RELOC_HI16_S_PLTOFF,
BFD_RELOC_8_PLTOFF,
BFD_RELOC_68K_GLOB_DAT,
BFD_RELOC_68K_JMP_SLOT,
BFD_RELOC_68K_RELATIVE,
BFD_RELOC_32_BASEREL,
BFD_RELOC_16_BASEREL,
BFD_RELOC_LO16_BASEREL,
BFD_RELOC_HI16_BASEREL,
BFD_RELOC_HI16_S_BASEREL,
BFD_RELOC_8_BASEREL,
BFD_RELOC_RVA,
BFD_RELOC_8_FFnn,
BFD_RELOC_32_PCREL_S2,
BFD_RELOC_16_PCREL_S2,
BFD_RELOC_23_PCREL_S2,
BFD_RELOC_HI22,
BFD_RELOC_LO10,
BFD_RELOC_GPREL16,
BFD_RELOC_GPREL32,
BFD_RELOC_I960_CALLJ,
BFD_RELOC_NONE,
BFD_RELOC_SPARC_WDISP22,
BFD_RELOC_SPARC22,
BFD_RELOC_SPARC13,
BFD_RELOC_SPARC_GOT10,
BFD_RELOC_SPARC_GOT13,
BFD_RELOC_SPARC_GOT22,
BFD_RELOC_SPARC_PC10,
BFD_RELOC_SPARC_PC22,
BFD_RELOC_SPARC_WPLT30,
BFD_RELOC_SPARC_COPY,
BFD_RELOC_SPARC_GLOB_DAT,
BFD_RELOC_SPARC_JMP_SLOT,
BFD_RELOC_SPARC_RELATIVE,
BFD_RELOC_SPARC_UA16,
BFD_RELOC_SPARC_UA32,
BFD_RELOC_SPARC_UA64,
BFD_RELOC_SPARC_BASE13,
BFD_RELOC_SPARC_BASE22,
#define BFD_RELOC_SPARC_64 BFD_RELOC_64
BFD_RELOC_SPARC_10,
BFD_RELOC_SPARC_11,
BFD_RELOC_SPARC_OLO10,
BFD_RELOC_SPARC_HH22,
BFD_RELOC_SPARC_HM10,
BFD_RELOC_SPARC_LM22,
BFD_RELOC_SPARC_PC_HH22,
BFD_RELOC_SPARC_PC_HM10,
BFD_RELOC_SPARC_PC_LM22,
BFD_RELOC_SPARC_WDISP16,
BFD_RELOC_SPARC_WDISP19,
BFD_RELOC_SPARC_7,
BFD_RELOC_SPARC_6,
BFD_RELOC_SPARC_5,
#define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL
BFD_RELOC_SPARC_PLT32,
BFD_RELOC_SPARC_PLT64,
BFD_RELOC_SPARC_HIX22,
BFD_RELOC_SPARC_LOX10,
BFD_RELOC_SPARC_H44,
BFD_RELOC_SPARC_M44,
BFD_RELOC_SPARC_L44,
BFD_RELOC_SPARC_REGISTER,
BFD_RELOC_SPARC_REV32,
BFD_RELOC_SPARC_TLS_GD_HI22,
BFD_RELOC_SPARC_TLS_GD_LO10,
BFD_RELOC_SPARC_TLS_GD_ADD,
BFD_RELOC_SPARC_TLS_GD_CALL,
BFD_RELOC_SPARC_TLS_LDM_HI22,
BFD_RELOC_SPARC_TLS_LDM_LO10,
BFD_RELOC_SPARC_TLS_LDM_ADD,
BFD_RELOC_SPARC_TLS_LDM_CALL,
BFD_RELOC_SPARC_TLS_LDO_HIX22,
BFD_RELOC_SPARC_TLS_LDO_LOX10,
BFD_RELOC_SPARC_TLS_LDO_ADD,
BFD_RELOC_SPARC_TLS_IE_HI22,
BFD_RELOC_SPARC_TLS_IE_LO10,
BFD_RELOC_SPARC_TLS_IE_LD,
BFD_RELOC_SPARC_TLS_IE_LDX,
BFD_RELOC_SPARC_TLS_IE_ADD,
BFD_RELOC_SPARC_TLS_LE_HIX22,
BFD_RELOC_SPARC_TLS_LE_LOX10,
BFD_RELOC_SPARC_TLS_DTPMOD32,
BFD_RELOC_SPARC_TLS_DTPMOD64,
BFD_RELOC_SPARC_TLS_DTPOFF32,
BFD_RELOC_SPARC_TLS_DTPOFF64,
BFD_RELOC_SPARC_TLS_TPOFF32,
BFD_RELOC_SPARC_TLS_TPOFF64,
BFD_RELOC_ALPHA_GPDISP_HI16,
BFD_RELOC_ALPHA_GPDISP_LO16,
BFD_RELOC_ALPHA_GPDISP,
BFD_RELOC_ALPHA_LITERAL,
BFD_RELOC_ALPHA_ELF_LITERAL,
BFD_RELOC_ALPHA_LITUSE,
BFD_RELOC_ALPHA_HINT,
BFD_RELOC_ALPHA_LINKAGE,
BFD_RELOC_ALPHA_CODEADDR,
BFD_RELOC_ALPHA_GPREL_HI16,
BFD_RELOC_ALPHA_GPREL_LO16,
BFD_RELOC_ALPHA_BRSGP,
BFD_RELOC_ALPHA_TLSGD,
BFD_RELOC_ALPHA_TLSLDM,
BFD_RELOC_ALPHA_DTPMOD64,
BFD_RELOC_ALPHA_GOTDTPREL16,
BFD_RELOC_ALPHA_DTPREL64,
BFD_RELOC_ALPHA_DTPREL_HI16,
BFD_RELOC_ALPHA_DTPREL_LO16,
BFD_RELOC_ALPHA_DTPREL16,
BFD_RELOC_ALPHA_GOTTPREL16,
BFD_RELOC_ALPHA_TPREL64,
BFD_RELOC_ALPHA_TPREL_HI16,
BFD_RELOC_ALPHA_TPREL_LO16,
BFD_RELOC_ALPHA_TPREL16,
BFD_RELOC_MIPS_JMP,
BFD_RELOC_MIPS16_JMP,
BFD_RELOC_MIPS16_GPREL,
BFD_RELOC_HI16,
BFD_RELOC_HI16_S,
BFD_RELOC_LO16,
BFD_RELOC_PCREL_HI16_S,
BFD_RELOC_PCREL_LO16,
BFD_RELOC_MIPS_LITERAL,
BFD_RELOC_MIPS_GOT16,
BFD_RELOC_MIPS_CALL16,
BFD_RELOC_MIPS_GOT_HI16,
BFD_RELOC_MIPS_GOT_LO16,
BFD_RELOC_MIPS_CALL_HI16,
BFD_RELOC_MIPS_CALL_LO16,
BFD_RELOC_MIPS_SUB,
BFD_RELOC_MIPS_GOT_PAGE,
BFD_RELOC_MIPS_GOT_OFST,
BFD_RELOC_MIPS_GOT_DISP,
BFD_RELOC_MIPS_SHIFT5,
BFD_RELOC_MIPS_SHIFT6,
BFD_RELOC_MIPS_INSERT_A,
BFD_RELOC_MIPS_INSERT_B,
BFD_RELOC_MIPS_DELETE,
BFD_RELOC_MIPS_HIGHEST,
BFD_RELOC_MIPS_HIGHER,
BFD_RELOC_MIPS_SCN_DISP,
BFD_RELOC_MIPS_REL16,
BFD_RELOC_MIPS_RELGOT,
BFD_RELOC_MIPS_JALR,
BFD_RELOC_FRV_LABEL16,
BFD_RELOC_FRV_LABEL24,
BFD_RELOC_FRV_LO16,
BFD_RELOC_FRV_HI16,
BFD_RELOC_FRV_GPREL12,
BFD_RELOC_FRV_GPRELU12,
BFD_RELOC_FRV_GPREL32,
BFD_RELOC_FRV_GPRELHI,
BFD_RELOC_FRV_GPRELLO,
BFD_RELOC_386_GOT32,
BFD_RELOC_386_PLT32,
BFD_RELOC_386_COPY,
BFD_RELOC_386_GLOB_DAT,
BFD_RELOC_386_JUMP_SLOT,
BFD_RELOC_386_RELATIVE,
BFD_RELOC_386_GOTOFF,
BFD_RELOC_386_GOTPC,
BFD_RELOC_386_TLS_TPOFF,
BFD_RELOC_386_TLS_IE,
BFD_RELOC_386_TLS_GOTIE,
BFD_RELOC_386_TLS_LE,
BFD_RELOC_386_TLS_GD,
BFD_RELOC_386_TLS_LDM,
BFD_RELOC_386_TLS_LDO_32,
BFD_RELOC_386_TLS_IE_32,
BFD_RELOC_386_TLS_LE_32,
BFD_RELOC_386_TLS_DTPMOD32,
BFD_RELOC_386_TLS_DTPOFF32,
BFD_RELOC_386_TLS_TPOFF32,
BFD_RELOC_X86_64_GOT32,
BFD_RELOC_X86_64_PLT32,
BFD_RELOC_X86_64_COPY,
BFD_RELOC_X86_64_GLOB_DAT,
BFD_RELOC_X86_64_JUMP_SLOT,
BFD_RELOC_X86_64_RELATIVE,
BFD_RELOC_X86_64_GOTPCREL,
BFD_RELOC_X86_64_32S,
BFD_RELOC_X86_64_DTPMOD64,
BFD_RELOC_X86_64_DTPOFF64,
BFD_RELOC_X86_64_TPOFF64,
BFD_RELOC_X86_64_TLSGD,
BFD_RELOC_X86_64_TLSLD,
BFD_RELOC_X86_64_DTPOFF32,
BFD_RELOC_X86_64_GOTTPOFF,
BFD_RELOC_X86_64_TPOFF32,
BFD_RELOC_NS32K_IMM_8,
BFD_RELOC_NS32K_IMM_16,
BFD_RELOC_NS32K_IMM_32,
BFD_RELOC_NS32K_IMM_8_PCREL,
BFD_RELOC_NS32K_IMM_16_PCREL,
BFD_RELOC_NS32K_IMM_32_PCREL,
BFD_RELOC_NS32K_DISP_8,
BFD_RELOC_NS32K_DISP_16,
BFD_RELOC_NS32K_DISP_32,
BFD_RELOC_NS32K_DISP_8_PCREL,
BFD_RELOC_NS32K_DISP_16_PCREL,
BFD_RELOC_NS32K_DISP_32_PCREL,
BFD_RELOC_PDP11_DISP_8_PCREL,
BFD_RELOC_PDP11_DISP_6_PCREL,
BFD_RELOC_PJ_CODE_HI16,
BFD_RELOC_PJ_CODE_LO16,
BFD_RELOC_PJ_CODE_DIR16,
BFD_RELOC_PJ_CODE_DIR32,
BFD_RELOC_PJ_CODE_REL16,
BFD_RELOC_PJ_CODE_REL32,
BFD_RELOC_PPC_B26,
BFD_RELOC_PPC_BA26,
BFD_RELOC_PPC_TOC16,
BFD_RELOC_PPC_B16,
BFD_RELOC_PPC_B16_BRTAKEN,
BFD_RELOC_PPC_B16_BRNTAKEN,
BFD_RELOC_PPC_BA16,
BFD_RELOC_PPC_BA16_BRTAKEN,
BFD_RELOC_PPC_BA16_BRNTAKEN,
BFD_RELOC_PPC_COPY,
BFD_RELOC_PPC_GLOB_DAT,
BFD_RELOC_PPC_JMP_SLOT,
BFD_RELOC_PPC_RELATIVE,
BFD_RELOC_PPC_LOCAL24PC,
BFD_RELOC_PPC_EMB_NADDR32,
BFD_RELOC_PPC_EMB_NADDR16,
BFD_RELOC_PPC_EMB_NADDR16_LO,
BFD_RELOC_PPC_EMB_NADDR16_HI,
BFD_RELOC_PPC_EMB_NADDR16_HA,
BFD_RELOC_PPC_EMB_SDAI16,
BFD_RELOC_PPC_EMB_SDA2I16,
BFD_RELOC_PPC_EMB_SDA2REL,
BFD_RELOC_PPC_EMB_SDA21,
BFD_RELOC_PPC_EMB_MRKREF,
BFD_RELOC_PPC_EMB_RELSEC16,
BFD_RELOC_PPC_EMB_RELST_LO,
BFD_RELOC_PPC_EMB_RELST_HI,
BFD_RELOC_PPC_EMB_RELST_HA,
BFD_RELOC_PPC_EMB_BIT_FLD,
BFD_RELOC_PPC_EMB_RELSDA,
BFD_RELOC_PPC64_HIGHER,
BFD_RELOC_PPC64_HIGHER_S,
BFD_RELOC_PPC64_HIGHEST,
BFD_RELOC_PPC64_HIGHEST_S,
BFD_RELOC_PPC64_TOC16_LO,
BFD_RELOC_PPC64_TOC16_HI,
BFD_RELOC_PPC64_TOC16_HA,
BFD_RELOC_PPC64_TOC,
BFD_RELOC_PPC64_PLTGOT16,
BFD_RELOC_PPC64_PLTGOT16_LO,
BFD_RELOC_PPC64_PLTGOT16_HI,
BFD_RELOC_PPC64_PLTGOT16_HA,
BFD_RELOC_PPC64_ADDR16_DS,
BFD_RELOC_PPC64_ADDR16_LO_DS,
BFD_RELOC_PPC64_GOT16_DS,
BFD_RELOC_PPC64_GOT16_LO_DS,
BFD_RELOC_PPC64_PLT16_LO_DS,
BFD_RELOC_PPC64_SECTOFF_DS,
BFD_RELOC_PPC64_SECTOFF_LO_DS,
BFD_RELOC_PPC64_TOC16_DS,
BFD_RELOC_PPC64_TOC16_LO_DS,
BFD_RELOC_PPC64_PLTGOT16_DS,
BFD_RELOC_PPC64_PLTGOT16_LO_DS,
BFD_RELOC_I370_D12,
BFD_RELOC_CTOR,
BFD_RELOC_ARM_PCREL_BRANCH,
BFD_RELOC_ARM_PCREL_BLX,
BFD_RELOC_THUMB_PCREL_BLX,
BFD_RELOC_ARM_IMMEDIATE,
BFD_RELOC_ARM_ADRL_IMMEDIATE,
BFD_RELOC_ARM_OFFSET_IMM,
BFD_RELOC_ARM_SHIFT_IMM,
BFD_RELOC_ARM_SWI,
BFD_RELOC_ARM_MULTI,
BFD_RELOC_ARM_CP_OFF_IMM,
BFD_RELOC_ARM_ADR_IMM,
BFD_RELOC_ARM_LDR_IMM,
BFD_RELOC_ARM_LITERAL,
BFD_RELOC_ARM_IN_POOL,
BFD_RELOC_ARM_OFFSET_IMM8,
BFD_RELOC_ARM_HWLITERAL,
BFD_RELOC_ARM_THUMB_ADD,
BFD_RELOC_ARM_THUMB_IMM,
BFD_RELOC_ARM_THUMB_SHIFT,
BFD_RELOC_ARM_THUMB_OFFSET,
BFD_RELOC_ARM_GOT12,
BFD_RELOC_ARM_GOT32,
BFD_RELOC_ARM_JUMP_SLOT,
BFD_RELOC_ARM_COPY,
BFD_RELOC_ARM_GLOB_DAT,
BFD_RELOC_ARM_PLT32,
BFD_RELOC_ARM_RELATIVE,
BFD_RELOC_ARM_GOTOFF,
BFD_RELOC_ARM_GOTPC,
BFD_RELOC_SH_PCDISP8BY2,
BFD_RELOC_SH_PCDISP12BY2,
BFD_RELOC_SH_IMM4,
BFD_RELOC_SH_IMM4BY2,
BFD_RELOC_SH_IMM4BY4,
BFD_RELOC_SH_IMM8,
BFD_RELOC_SH_IMM8BY2,
BFD_RELOC_SH_IMM8BY4,
BFD_RELOC_SH_PCRELIMM8BY2,
BFD_RELOC_SH_PCRELIMM8BY4,
BFD_RELOC_SH_SWITCH16,
BFD_RELOC_SH_SWITCH32,
BFD_RELOC_SH_USES,
BFD_RELOC_SH_COUNT,
BFD_RELOC_SH_ALIGN,
BFD_RELOC_SH_CODE,
BFD_RELOC_SH_DATA,
BFD_RELOC_SH_LABEL,
BFD_RELOC_SH_LOOP_START,
BFD_RELOC_SH_LOOP_END,
BFD_RELOC_SH_COPY,
BFD_RELOC_SH_GLOB_DAT,
BFD_RELOC_SH_JMP_SLOT,
BFD_RELOC_SH_RELATIVE,
BFD_RELOC_SH_GOTPC,
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,
BFD_RELOC_SH_TLS_GD_32,
BFD_RELOC_SH_TLS_LD_32,
BFD_RELOC_SH_TLS_LDO_32,
BFD_RELOC_SH_TLS_IE_32,
BFD_RELOC_SH_TLS_LE_32,
BFD_RELOC_SH_TLS_DTPMOD32,
BFD_RELOC_SH_TLS_DTPOFF32,
BFD_RELOC_SH_TLS_TPOFF32,
BFD_RELOC_THUMB_PCREL_BRANCH9,
BFD_RELOC_THUMB_PCREL_BRANCH12,
BFD_RELOC_THUMB_PCREL_BRANCH23,
BFD_RELOC_ARC_B22_PCREL,
BFD_RELOC_ARC_B26,
BFD_RELOC_D10V_10_PCREL_R,
BFD_RELOC_D10V_10_PCREL_L,
BFD_RELOC_D10V_18,
BFD_RELOC_D10V_18_PCREL,
BFD_RELOC_D30V_6,
BFD_RELOC_D30V_9_PCREL,
BFD_RELOC_D30V_9_PCREL_R,
BFD_RELOC_D30V_15,
BFD_RELOC_D30V_15_PCREL,
BFD_RELOC_D30V_15_PCREL_R,
BFD_RELOC_D30V_21,
BFD_RELOC_D30V_21_PCREL,
BFD_RELOC_D30V_21_PCREL_R,
BFD_RELOC_D30V_32,
BFD_RELOC_D30V_32_PCREL,
BFD_RELOC_DLX_HI16_S,
BFD_RELOC_DLX_LO16,
BFD_RELOC_DLX_JMP26,
BFD_RELOC_M32R_24,
BFD_RELOC_M32R_10_PCREL,
BFD_RELOC_M32R_18_PCREL,
BFD_RELOC_M32R_26_PCREL,
BFD_RELOC_M32R_HI16_ULO,
BFD_RELOC_M32R_HI16_SLO,
BFD_RELOC_M32R_LO16,
BFD_RELOC_M32R_SDA16,
BFD_RELOC_V850_9_PCREL,
BFD_RELOC_V850_22_PCREL,
BFD_RELOC_V850_SDA_16_16_OFFSET,
BFD_RELOC_V850_SDA_15_16_OFFSET,
BFD_RELOC_V850_ZDA_16_16_OFFSET,
BFD_RELOC_V850_ZDA_15_16_OFFSET,
BFD_RELOC_V850_TDA_6_8_OFFSET,
BFD_RELOC_V850_TDA_7_8_OFFSET,
BFD_RELOC_V850_TDA_7_7_OFFSET,
BFD_RELOC_V850_TDA_16_16_OFFSET,
BFD_RELOC_V850_TDA_4_5_OFFSET,
BFD_RELOC_V850_TDA_4_4_OFFSET,
BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET,
BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET,
BFD_RELOC_V850_CALLT_6_7_OFFSET,
BFD_RELOC_V850_CALLT_16_16_OFFSET,
BFD_RELOC_V850_LONGCALL,
BFD_RELOC_V850_LONGJUMP,
BFD_RELOC_V850_ALIGN,
BFD_RELOC_MN10300_32_PCREL,
BFD_RELOC_MN10300_16_PCREL,
BFD_RELOC_TIC30_LDP,
BFD_RELOC_TIC54X_PARTLS7,
BFD_RELOC_TIC54X_PARTMS9,
BFD_RELOC_TIC54X_23,
BFD_RELOC_TIC54X_16_OF_23,
BFD_RELOC_TIC54X_MS7_OF_23,
BFD_RELOC_FR30_48,
BFD_RELOC_FR30_20,
BFD_RELOC_FR30_6_IN_4,
BFD_RELOC_FR30_8_IN_8,
BFD_RELOC_FR30_9_IN_8,
BFD_RELOC_FR30_10_IN_8,
BFD_RELOC_FR30_9_PCREL,
BFD_RELOC_FR30_12_PCREL,
BFD_RELOC_MCORE_PCREL_IMM8BY4,
BFD_RELOC_MCORE_PCREL_IMM11BY2,
BFD_RELOC_MCORE_PCREL_IMM4BY2,
BFD_RELOC_MCORE_PCREL_32,
BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2,
BFD_RELOC_MCORE_RVA,
BFD_RELOC_MMIX_GETA,
BFD_RELOC_MMIX_GETA_1,
BFD_RELOC_MMIX_GETA_2,
BFD_RELOC_MMIX_GETA_3,
BFD_RELOC_MMIX_CBRANCH,
BFD_RELOC_MMIX_CBRANCH_J,
BFD_RELOC_MMIX_CBRANCH_1,
BFD_RELOC_MMIX_CBRANCH_2,
BFD_RELOC_MMIX_CBRANCH_3,
BFD_RELOC_MMIX_PUSHJ,
BFD_RELOC_MMIX_PUSHJ_1,
BFD_RELOC_MMIX_PUSHJ_2,
BFD_RELOC_MMIX_PUSHJ_3,
BFD_RELOC_MMIX_JMP,
BFD_RELOC_MMIX_JMP_1,
BFD_RELOC_MMIX_JMP_2,
BFD_RELOC_MMIX_JMP_3,
BFD_RELOC_MMIX_ADDR19,
BFD_RELOC_MMIX_ADDR27,
BFD_RELOC_MMIX_REG_OR_BYTE,
BFD_RELOC_MMIX_REG,
BFD_RELOC_MMIX_BASE_PLUS_OFFSET,
BFD_RELOC_MMIX_LOCAL,
BFD_RELOC_AVR_7_PCREL,
BFD_RELOC_AVR_13_PCREL,
BFD_RELOC_AVR_16_PM,
BFD_RELOC_AVR_LO8_LDI,
BFD_RELOC_AVR_HI8_LDI,
BFD_RELOC_AVR_HH8_LDI,
BFD_RELOC_AVR_LO8_LDI_NEG,
BFD_RELOC_AVR_HI8_LDI_NEG,
BFD_RELOC_AVR_HH8_LDI_NEG,
BFD_RELOC_AVR_LO8_LDI_PM,
BFD_RELOC_AVR_HI8_LDI_PM,
BFD_RELOC_AVR_HH8_LDI_PM,
BFD_RELOC_AVR_LO8_LDI_PM_NEG,
BFD_RELOC_AVR_HI8_LDI_PM_NEG,
BFD_RELOC_AVR_HH8_LDI_PM_NEG,
BFD_RELOC_AVR_CALL,
BFD_RELOC_390_12,
BFD_RELOC_390_GOT12,
BFD_RELOC_390_PLT32,
BFD_RELOC_390_COPY,
BFD_RELOC_390_GLOB_DAT,
BFD_RELOC_390_JMP_SLOT,
BFD_RELOC_390_RELATIVE,
BFD_RELOC_390_GOTPC,
BFD_RELOC_390_GOT16,
BFD_RELOC_390_PC16DBL,
BFD_RELOC_390_PLT16DBL,
BFD_RELOC_390_PC32DBL,
BFD_RELOC_390_PLT32DBL,
BFD_RELOC_390_GOTPCDBL,
BFD_RELOC_390_GOT64,
BFD_RELOC_390_PLT64,
BFD_RELOC_390_GOTENT,
BFD_RELOC_390_GOTOFF64,
BFD_RELOC_390_GOTPLT12,
BFD_RELOC_390_GOTPLT16,
BFD_RELOC_390_GOTPLT32,
BFD_RELOC_390_GOTPLT64,
BFD_RELOC_390_GOTPLTENT,
BFD_RELOC_390_PLTOFF16,
BFD_RELOC_390_PLTOFF32,
BFD_RELOC_390_PLTOFF64,
BFD_RELOC_390_TLS_LOAD,
BFD_RELOC_390_TLS_GDCALL,
BFD_RELOC_390_TLS_LDCALL,
BFD_RELOC_390_TLS_GD32,
BFD_RELOC_390_TLS_GD64,
BFD_RELOC_390_TLS_GOTIE12,
BFD_RELOC_390_TLS_GOTIE32,
BFD_RELOC_390_TLS_GOTIE64,
BFD_RELOC_390_TLS_LDM32,
BFD_RELOC_390_TLS_LDM64,
BFD_RELOC_390_TLS_IE32,
BFD_RELOC_390_TLS_IE64,
BFD_RELOC_390_TLS_IEENT,
BFD_RELOC_390_TLS_LE32,
BFD_RELOC_390_TLS_LE64,
BFD_RELOC_390_TLS_LDO32,
BFD_RELOC_390_TLS_LDO64,
BFD_RELOC_390_TLS_DTPMOD,
BFD_RELOC_390_TLS_DTPOFF,
BFD_RELOC_390_TLS_TPOFF,
BFD_RELOC_IP2K_FR9,
BFD_RELOC_IP2K_BANK,
BFD_RELOC_IP2K_ADDR16CJP,
BFD_RELOC_IP2K_PAGE3,
BFD_RELOC_IP2K_LO8DATA,
BFD_RELOC_IP2K_HI8DATA,
BFD_RELOC_IP2K_EX8DATA,
BFD_RELOC_IP2K_LO8INSN,
BFD_RELOC_IP2K_HI8INSN,
BFD_RELOC_IP2K_PC_SKIP,
BFD_RELOC_IP2K_TEXT,
BFD_RELOC_IP2K_FR_OFFSET,
BFD_RELOC_VPE4KMATH_DATA,
BFD_RELOC_VPE4KMATH_INSN,
BFD_RELOC_VTABLE_INHERIT,
BFD_RELOC_VTABLE_ENTRY,
BFD_RELOC_IA64_IMM14,
BFD_RELOC_IA64_IMM22,
BFD_RELOC_IA64_IMM64,
BFD_RELOC_IA64_DIR32MSB,
BFD_RELOC_IA64_DIR32LSB,
BFD_RELOC_IA64_DIR64MSB,
BFD_RELOC_IA64_DIR64LSB,
BFD_RELOC_IA64_GPREL22,
BFD_RELOC_IA64_GPREL64I,
BFD_RELOC_IA64_GPREL32MSB,
BFD_RELOC_IA64_GPREL32LSB,
BFD_RELOC_IA64_GPREL64MSB,
BFD_RELOC_IA64_GPREL64LSB,
BFD_RELOC_IA64_LTOFF22,
BFD_RELOC_IA64_LTOFF64I,
BFD_RELOC_IA64_PLTOFF22,
BFD_RELOC_IA64_PLTOFF64I,
BFD_RELOC_IA64_PLTOFF64MSB,
BFD_RELOC_IA64_PLTOFF64LSB,
BFD_RELOC_IA64_FPTR64I,
BFD_RELOC_IA64_FPTR32MSB,
BFD_RELOC_IA64_FPTR32LSB,
BFD_RELOC_IA64_FPTR64MSB,
BFD_RELOC_IA64_FPTR64LSB,
BFD_RELOC_IA64_PCREL21B,
BFD_RELOC_IA64_PCREL21BI,
BFD_RELOC_IA64_PCREL21M,
BFD_RELOC_IA64_PCREL21F,
BFD_RELOC_IA64_PCREL22,
BFD_RELOC_IA64_PCREL60B,
BFD_RELOC_IA64_PCREL64I,
BFD_RELOC_IA64_PCREL32MSB,
BFD_RELOC_IA64_PCREL32LSB,
BFD_RELOC_IA64_PCREL64MSB,
BFD_RELOC_IA64_PCREL64LSB,
BFD_RELOC_IA64_LTOFF_FPTR22,
BFD_RELOC_IA64_LTOFF_FPTR64I,
BFD_RELOC_IA64_LTOFF_FPTR32MSB,
BFD_RELOC_IA64_LTOFF_FPTR32LSB,
BFD_RELOC_IA64_LTOFF_FPTR64MSB,
BFD_RELOC_IA64_LTOFF_FPTR64LSB,
BFD_RELOC_IA64_SEGREL32MSB,
BFD_RELOC_IA64_SEGREL32LSB,
BFD_RELOC_IA64_SEGREL64MSB,
BFD_RELOC_IA64_SEGREL64LSB,
BFD_RELOC_IA64_SECREL32MSB,
BFD_RELOC_IA64_SECREL32LSB,
BFD_RELOC_IA64_SECREL64MSB,
BFD_RELOC_IA64_SECREL64LSB,
BFD_RELOC_IA64_REL32MSB,
BFD_RELOC_IA64_REL32LSB,
BFD_RELOC_IA64_REL64MSB,
BFD_RELOC_IA64_REL64LSB,
BFD_RELOC_IA64_LTV32MSB,
BFD_RELOC_IA64_LTV32LSB,
BFD_RELOC_IA64_LTV64MSB,
BFD_RELOC_IA64_LTV64LSB,
BFD_RELOC_IA64_IPLTMSB,
BFD_RELOC_IA64_IPLTLSB,
BFD_RELOC_IA64_COPY,
BFD_RELOC_IA64_LTOFF22X,
BFD_RELOC_IA64_LDXMOV,
BFD_RELOC_IA64_TPREL14,
BFD_RELOC_IA64_TPREL22,
BFD_RELOC_IA64_TPREL64I,
BFD_RELOC_IA64_TPREL64MSB,
BFD_RELOC_IA64_TPREL64LSB,
BFD_RELOC_IA64_LTOFF_TPREL22,
BFD_RELOC_IA64_DTPMOD64MSB,
BFD_RELOC_IA64_DTPMOD64LSB,
BFD_RELOC_IA64_LTOFF_DTPMOD22,
BFD_RELOC_IA64_DTPREL14,
BFD_RELOC_IA64_DTPREL22,
BFD_RELOC_IA64_DTPREL64I,
BFD_RELOC_IA64_DTPREL32MSB,
BFD_RELOC_IA64_DTPREL32LSB,
BFD_RELOC_IA64_DTPREL64MSB,
BFD_RELOC_IA64_DTPREL64LSB,
BFD_RELOC_IA64_LTOFF_DTPREL22,
BFD_RELOC_M68HC11_HI8,
BFD_RELOC_M68HC11_LO8,
BFD_RELOC_M68HC11_3B,
BFD_RELOC_M68HC11_RL_JUMP,
BFD_RELOC_M68HC11_RL_GROUP,
BFD_RELOC_M68HC11_LO16,
BFD_RELOC_M68HC11_PAGE,
BFD_RELOC_M68HC11_24,
BFD_RELOC_CRIS_BDISP8,
BFD_RELOC_CRIS_UNSIGNED_5,
BFD_RELOC_CRIS_SIGNED_6,
BFD_RELOC_CRIS_UNSIGNED_6,
BFD_RELOC_CRIS_UNSIGNED_4,
BFD_RELOC_CRIS_COPY,
BFD_RELOC_CRIS_GLOB_DAT,
BFD_RELOC_CRIS_JUMP_SLOT,
BFD_RELOC_CRIS_RELATIVE,
BFD_RELOC_CRIS_32_GOT,
BFD_RELOC_CRIS_16_GOT,
BFD_RELOC_CRIS_32_GOTPLT,
BFD_RELOC_CRIS_16_GOTPLT,
BFD_RELOC_CRIS_32_GOTREL,
BFD_RELOC_CRIS_32_PLT_GOTREL,
BFD_RELOC_CRIS_32_PLT_PCREL,
BFD_RELOC_860_COPY,
BFD_RELOC_860_GLOB_DAT,
BFD_RELOC_860_JUMP_SLOT,
BFD_RELOC_860_RELATIVE,
BFD_RELOC_860_PC26,
BFD_RELOC_860_PLT26,
BFD_RELOC_860_PC16,
BFD_RELOC_860_LOW0,
BFD_RELOC_860_SPLIT0,
BFD_RELOC_860_LOW1,
BFD_RELOC_860_SPLIT1,
BFD_RELOC_860_LOW2,
BFD_RELOC_860_SPLIT2,
BFD_RELOC_860_LOW3,
BFD_RELOC_860_LOGOT0,
BFD_RELOC_860_SPGOT0,
BFD_RELOC_860_LOGOT1,
BFD_RELOC_860_SPGOT1,
BFD_RELOC_860_LOGOTOFF0,
BFD_RELOC_860_SPGOTOFF0,
BFD_RELOC_860_LOGOTOFF1,
BFD_RELOC_860_SPGOTOFF1,
BFD_RELOC_860_LOGOTOFF2,
BFD_RELOC_860_LOGOTOFF3,
BFD_RELOC_860_LOPC,
BFD_RELOC_860_HIGHADJ,
BFD_RELOC_860_HAGOT,
BFD_RELOC_860_HAGOTOFF,
BFD_RELOC_860_HAPC,
BFD_RELOC_860_HIGH,
BFD_RELOC_860_HIGOT,
BFD_RELOC_860_HIGOTOFF,
BFD_RELOC_OPENRISC_ABS_26,
BFD_RELOC_OPENRISC_REL_26,
BFD_RELOC_H8_DIR16A8,
BFD_RELOC_H8_DIR16R8,
BFD_RELOC_H8_DIR24A8,
BFD_RELOC_H8_DIR24R8,
BFD_RELOC_H8_DIR32A16,
BFD_RELOC_XSTORMY16_REL_12,
BFD_RELOC_XSTORMY16_12,
BFD_RELOC_XSTORMY16_24,
BFD_RELOC_XSTORMY16_FPTR16,
BFD_RELOC_VAX_GLOB_DAT,
BFD_RELOC_VAX_JMP_SLOT,
BFD_RELOC_VAX_RELATIVE,
BFD_RELOC_MSP430_10_PCREL,
BFD_RELOC_MSP430_16_PCREL,
BFD_RELOC_MSP430_16,
BFD_RELOC_MSP430_16_PCREL_BYTE,
BFD_RELOC_MSP430_16_BYTE,
BFD_RELOC_IQ2000_OFFSET_16,
BFD_RELOC_IQ2000_OFFSET_21,
BFD_RELOC_IQ2000_UHI16,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
reloc_howto_type *
bfd_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
const char *
bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code));
typedef struct symbol_cache_entry
{
struct _bfd *the_bfd;
const char *name;
symvalue value;
#define BSF_NO_FLAGS 0x00
#define BSF_LOCAL 0x01
#define BSF_GLOBAL 0x02
#define BSF_EXPORT BSF_GLOBAL
#define BSF_DEBUGGING 0x08
#define BSF_FUNCTION 0x10
#define BSF_KEEP 0x20
#define BSF_KEEP_G 0x40
#define BSF_WEAK 0x80
#define BSF_SECTION_SYM 0x100
#define BSF_OLD_COMMON 0x200
#define BFD_FORT_COMM_DEFAULT_VALUE 0
#define BSF_NOT_AT_END 0x400
#define BSF_CONSTRUCTOR 0x800
#define BSF_WARNING 0x1000
#define BSF_INDIRECT 0x2000
#define BSF_FILE 0x4000
#define BSF_DYNAMIC 0x8000
#define BSF_OBJECT 0x10000
#define BSF_DEBUGGING_RELOC 0x20000
#define BSF_THREAD_LOCAL 0x40000
flagword flags;
struct sec *section;
union
{
PTR p;
bfd_vma i;
}
udata;
}
asymbol;
#define bfd_get_symtab_upper_bound(abfd) \
BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
bfd_boolean
bfd_is_local_label PARAMS ((bfd *abfd, asymbol *sym));
bfd_boolean
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))
bfd_boolean
bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count));
void
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));
bfd_boolean
bfd_is_undefined_symclass PARAMS ((int symclass));
void
bfd_symbol_info PARAMS ((asymbol *symbol, symbol_info *ret));
bfd_boolean
bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym));
#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
(ibfd, isymbol, obfd, osymbol))
struct _bfd
{
unsigned int id;
const char *filename;
const struct bfd_target *xvec;
PTR iostream;
bfd_boolean cacheable;
bfd_boolean target_defaulted;
struct _bfd *lru_prev, *lru_next;
ufile_ptr where;
bfd_boolean opened_once;
bfd_boolean mtime_set;
long mtime;
int ifd;
bfd_format format;
enum bfd_direction
{
no_direction = 0,
read_direction = 1,
write_direction = 2,
both_direction = 3
}
direction;
flagword flags;
ufile_ptr origin;
bfd_boolean output_has_begun;
struct bfd_hash_table section_htab;
struct sec *sections;
struct sec **section_tail;
unsigned int section_count;
bfd_vma start_address;
unsigned int symcount;
struct symbol_cache_entry **outsymbols;
unsigned int dynsymcount;
const struct bfd_arch_info *arch_info;
PTR arelt_data;
struct _bfd *my_archive;
struct _bfd *next;
struct _bfd *archive_head;
bfd_boolean has_armap;
struct _bfd *link_next;
int archive_pass;
union
{
struct aout_data_struct *aout_data;
struct artdata *aout_ar_data;
struct _oasys_data *oasys_obj_data;
struct _oasys_ar_data *oasys_ar_data;
struct coff_tdata *coff_obj_data;
struct pe_tdata *pe_obj_data;
struct xcoff_tdata *xcoff_obj_data;
struct ecoff_tdata *ecoff_obj_data;
struct ieee_data_struct *ieee_data;
struct ieee_ar_data_struct *ieee_ar_data;
struct srec_data_struct *srec_data;
struct ihex_data_struct *ihex_data;
struct tekhex_data_struct *tekhex_data;
struct elf_obj_tdata *elf_obj_data;
struct nlm_obj_tdata *nlm_obj_data;
struct bout_data_struct *bout_data;
struct mmo_data_struct *mmo_data;
struct sun_core_struct *sun_core_data;
struct sco5_core_struct *sco5_core_data;
struct trad_core_struct *trad_core_data;
struct som_data_struct *som_data;
struct hpux_core_struct *hpux_core_data;
struct hppabsd_core_struct *hppabsd_core_data;
struct sgi_core_struct *sgi_core_data;
struct lynx_core_struct *lynx_core_data;
struct osf_core_struct *osf_core_data;
struct cisco_core_struct *cisco_core_data;
struct versados_data_struct *versados_data;
struct netbsd_core_struct *netbsd_core_data;
struct mach_o_data_struct *mach_o_data;
struct mach_o_fat_data_struct *mach_o_fat_data;
struct bfd_pef_data_struct *pef_data;
struct bfd_pef_xlib_data_struct *pef_xlib_data;
struct bfd_sym_data_struct *sym_data;
PTR any;
}
tdata;
PTR usrdata;
PTR memory;
};
typedef enum bfd_error
{
bfd_error_no_error = 0,
bfd_error_system_call,
bfd_error_invalid_target,
bfd_error_wrong_format,
bfd_error_wrong_object_format,
bfd_error_invalid_operation,
bfd_error_no_memory,
bfd_error_no_symbols,
bfd_error_no_armap,
bfd_error_no_more_archived_files,
bfd_error_malformed_archive,
bfd_error_file_not_recognized,
bfd_error_file_ambiguously_recognized,
bfd_error_no_contents,
bfd_error_nonrepresentable_section,
bfd_error_no_debug_section,
bfd_error_bad_value,
bfd_error_file_truncated,
bfd_error_file_too_big,
bfd_error_invalid_error_code
}
bfd_error_type;
bfd_error_type
bfd_get_error PARAMS ((void));
void
bfd_set_error PARAMS ((bfd_error_type error_tag));
const char *
bfd_errmsg PARAMS ((bfd_error_type error_tag));
void
bfd_perror PARAMS ((const char *message));
typedef void (*bfd_error_handler_type) PARAMS ((const char *, ...));
bfd_error_handler_type
bfd_set_error_handler PARAMS ((bfd_error_handler_type));
void
bfd_set_error_program_name PARAMS ((const char *));
bfd_error_handler_type
bfd_get_error_handler PARAMS ((void));
const char *
bfd_archive_filename PARAMS ((bfd *));
long
bfd_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect));
long
bfd_canonicalize_reloc PARAMS ((bfd *abfd,
asection *sec,
arelent **loc,
asymbol **syms));
void
bfd_set_reloc PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count));
bfd_boolean
bfd_set_file_flags PARAMS ((bfd *abfd, flagword flags));
int
bfd_get_arch_size PARAMS ((bfd *abfd));
int
bfd_get_sign_extend_vma PARAMS ((bfd *abfd));
bfd_boolean
bfd_set_start_address PARAMS ((bfd *abfd, bfd_vma vma));
unsigned int
bfd_get_gp_size PARAMS ((bfd *abfd));
void
bfd_set_gp_size PARAMS ((bfd *abfd, unsigned int i));
bfd_vma
bfd_scan_vma PARAMS ((const char *string, const char **end, int base));
bfd_boolean
bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
#define bfd_copy_private_bfd_data(ibfd, obfd) \
BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
(ibfd, obfd))
bfd_boolean
bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
#define bfd_merge_private_bfd_data(ibfd, obfd) \
BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
(ibfd, obfd))
bfd_boolean
bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
#define bfd_set_private_flags(abfd, flags) \
BFD_SEND (abfd, _bfd_set_private_flags, \
(abfd, flags))
#define bfd_sizeof_headers(abfd, reloc) \
BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
BFD_SEND (abfd, _bfd_find_nearest_line, (abfd, sec, syms, off, file, func, line))
#define bfd_debug_info_start(abfd) \
BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
#define bfd_debug_info_end(abfd) \
BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
#define bfd_debug_info_accumulate(abfd, section) \
BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
#define bfd_stat_arch_elt(abfd, stat) \
BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
#define bfd_update_armap_timestamp(abfd) \
BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
#define bfd_set_arch_mach(abfd, arch, mach)\
BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
#define bfd_relax_section(abfd, section, link_info, again) \
BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
#define bfd_gc_sections(abfd, link_info) \
BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
#define bfd_merge_sections(abfd, link_info) \
BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
#define bfd_discard_group(abfd, sec) \
BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
#define bfd_link_hash_table_create(abfd) \
BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
#define bfd_link_hash_table_free(abfd, hash) \
BFD_SEND (abfd, _bfd_link_hash_table_free, (hash))
#define bfd_link_add_symbols(abfd, info) \
BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
#define bfd_link_just_syms(sec, info) \
BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
#define bfd_final_link(abfd, info) \
BFD_SEND (abfd, _bfd_final_link, (abfd, info))
#define bfd_free_cached_info(abfd) \
BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
#define bfd_get_dynamic_symtab_upper_bound(abfd) \
BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
#define bfd_print_private_bfd_data(abfd, file)\
BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
#define bfd_get_dynamic_reloc_upper_bound(abfd) \
BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
extern bfd_byte *bfd_get_relocated_section_contents
PARAMS ((bfd *, struct bfd_link_info *,
struct bfd_link_order *, bfd_byte *,
bfd_boolean, asymbol **));
bfd_boolean
bfd_alt_mach_code PARAMS ((bfd *abfd, int alternative));
struct bfd_preserve
{
PTR marker;
PTR tdata;
flagword flags;
const struct bfd_arch_info *arch_info;
struct sec *sections;
struct sec **section_tail;
unsigned int section_count;
struct bfd_hash_table section_htab;
};
bfd_boolean
bfd_preserve_save PARAMS ((bfd *, struct bfd_preserve *));
void
bfd_preserve_restore PARAMS ((bfd *, struct bfd_preserve *));
void
bfd_preserve_finish PARAMS ((bfd *, struct bfd_preserve *));
symindex
bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
bfd_boolean
bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head));
bfd *
bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous));
const char *
bfd_core_file_failing_command PARAMS ((bfd *abfd));
int
bfd_core_file_failing_signal PARAMS ((bfd *abfd));
bfd_boolean
core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
#define BFD_SEND(bfd, message, arglist) \
((*((bfd)->xvec->message)) arglist)
#ifdef DEBUG_BFD_SEND
#undef BFD_SEND
#define BFD_SEND(bfd, message, arglist) \
(((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
((*((bfd)->xvec->message)) arglist) : \
(bfd_assert (__FILE__,__LINE__), NULL))
#endif
#define BFD_SEND_FMT(bfd, message, arglist) \
(((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
#ifdef DEBUG_BFD_SEND
#undef BFD_SEND_FMT
#define BFD_SEND_FMT(bfd, message, arglist) \
(((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
(((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
(bfd_assert (__FILE__,__LINE__), NULL))
#endif
enum bfd_flavour
{
bfd_target_unknown_flavour,
bfd_target_aout_flavour,
bfd_target_coff_flavour,
bfd_target_ecoff_flavour,
bfd_target_xcoff_flavour,
bfd_target_elf_flavour,
bfd_target_ieee_flavour,
bfd_target_nlm_flavour,
bfd_target_oasys_flavour,
bfd_target_tekhex_flavour,
bfd_target_srec_flavour,
bfd_target_ihex_flavour,
bfd_target_som_flavour,
bfd_target_os9k_flavour,
bfd_target_versados_flavour,
bfd_target_msdos_flavour,
bfd_target_ovax_flavour,
bfd_target_evax_flavour,
bfd_target_mmo_flavour,
bfd_target_mach_o_flavour,
bfd_target_pef_flavour,
bfd_target_pef_xlib_flavour,
bfd_target_sym_flavour
};
enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
typedef struct bfd_link_info _bfd_link_info;
typedef struct bfd_target
{
char *name;
enum bfd_flavour flavour;
enum bfd_endian byteorder;
enum bfd_endian header_byteorder;
flagword object_flags;
flagword section_flags;
char symbol_leading_char;
char ar_pad_char;
unsigned short ar_max_namelen;
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 *));
bfd_vma (*bfd_getx32) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_getx_signed_32) PARAMS ((const bfd_byte *));
void (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
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 *));
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 *));
bfd_vma (*bfd_h_getx32) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_h_getx_signed_32) PARAMS ((const bfd_byte *));
void (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
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 *));
const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
bfd_boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
bfd_boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
#define BFD_JUMP_TABLE_GENERIC(NAME) \
CONCAT2 (NAME,_close_and_cleanup), \
CONCAT2 (NAME,_bfd_free_cached_info), \
CONCAT2 (NAME,_new_section_hook), \
CONCAT2 (NAME,_get_section_contents), \
CONCAT2 (NAME,_get_section_contents_in_window)
bfd_boolean (*_close_and_cleanup) PARAMS ((bfd *));
bfd_boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
bfd_boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
bfd_boolean (*_bfd_get_section_contents)
PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
bfd_boolean (*_bfd_get_section_contents_in_window)
PARAMS ((bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type));
#define BFD_JUMP_TABLE_COPY(NAME) \
CONCAT2 (NAME,_bfd_copy_private_bfd_data), \
CONCAT2 (NAME,_bfd_merge_private_bfd_data), \
CONCAT2 (NAME,_bfd_copy_private_section_data), \
CONCAT2 (NAME,_bfd_copy_private_symbol_data), \
CONCAT2 (NAME,_bfd_set_private_flags), \
CONCAT2 (NAME,_bfd_print_private_bfd_data) \
bfd_boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
bfd_boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
bfd_boolean (*_bfd_copy_private_section_data)
PARAMS ((bfd *, sec_ptr, bfd *, sec_ptr));
bfd_boolean (*_bfd_copy_private_symbol_data)
PARAMS ((bfd *, asymbol *, bfd *, asymbol *));
bfd_boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
bfd_boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
#define BFD_JUMP_TABLE_CORE(NAME) \
CONCAT2 (NAME,_core_file_failing_command), \
CONCAT2 (NAME,_core_file_failing_signal), \
CONCAT2 (NAME,_core_file_matches_executable_p)
char * (*_core_file_failing_command) PARAMS ((bfd *));
int (*_core_file_failing_signal) PARAMS ((bfd *));
bfd_boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *));
#define BFD_JUMP_TABLE_ARCHIVE(NAME) \
CONCAT2 (NAME,_slurp_armap), \
CONCAT2 (NAME,_slurp_extended_name_table), \
CONCAT2 (NAME,_construct_extended_name_table), \
CONCAT2 (NAME,_truncate_arname), \
CONCAT2 (NAME,_write_armap), \
CONCAT2 (NAME,_read_ar_hdr), \
CONCAT2 (NAME,_openr_next_archived_file), \
CONCAT2 (NAME,_get_elt_at_index), \
CONCAT2 (NAME,_generic_stat_arch_elt), \
CONCAT2 (NAME,_update_armap_timestamp)
bfd_boolean (*_bfd_slurp_armap) PARAMS ((bfd *));
bfd_boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
bfd_boolean (*_bfd_construct_extended_name_table)
PARAMS ((bfd *, char **, bfd_size_type *, const char **));
void (*_bfd_truncate_arname) PARAMS ((bfd *, const char *, char *));
bfd_boolean (*write_armap)
PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
bfd * (*openr_next_archived_file) PARAMS ((bfd *, bfd *));
#define bfd_get_elt_at_index(b,i) BFD_SEND(b, _bfd_get_elt_at_index, (b,i))
bfd * (*_bfd_get_elt_at_index) PARAMS ((bfd *, symindex));
int (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
bfd_boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
CONCAT2 (NAME,_get_symtab_upper_bound), \
CONCAT2 (NAME,_get_symtab), \
CONCAT2 (NAME,_make_empty_symbol), \
CONCAT2 (NAME,_print_symbol), \
CONCAT2 (NAME,_get_symbol_info), \
CONCAT2 (NAME,_bfd_is_local_label_name), \
CONCAT2 (NAME,_get_lineno), \
CONCAT2 (NAME,_find_nearest_line), \
CONCAT2 (NAME,_bfd_make_debug_symbol), \
CONCAT2 (NAME,_read_minisymbols), \
CONCAT2 (NAME,_minisymbol_to_symbol)
long (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
long (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
struct symbol_cache_entry **));
struct symbol_cache_entry *
(*_bfd_make_empty_symbol) PARAMS ((bfd *));
void (*_bfd_print_symbol)
PARAMS ((bfd *, PTR, struct symbol_cache_entry *, bfd_print_symbol_type));
#define bfd_print_symbol(b,p,s,e) BFD_SEND(b, _bfd_print_symbol, (b,p,s,e))
void (*_bfd_get_symbol_info)
PARAMS ((bfd *, struct symbol_cache_entry *, symbol_info *));
#define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e))
bfd_boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
bfd_boolean (*_bfd_find_nearest_line)
PARAMS ((bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma,
const char **, const char **, unsigned int *));
asymbol * (*_bfd_make_debug_symbol)
PARAMS ((bfd *, void *, unsigned long size));
#define bfd_read_minisymbols(b, d, m, s) \
BFD_SEND (b, _read_minisymbols, (b, d, m, s))
long (*_read_minisymbols)
PARAMS ((bfd *, bfd_boolean, PTR *, unsigned int *));
#define bfd_minisymbol_to_symbol(b, d, m, f) \
BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
asymbol * (*_minisymbol_to_symbol)
PARAMS ((bfd *, bfd_boolean, const PTR, asymbol *));
#define BFD_JUMP_TABLE_RELOCS(NAME) \
CONCAT2 (NAME,_get_reloc_upper_bound), \
CONCAT2 (NAME,_canonicalize_reloc), \
CONCAT2 (NAME,_bfd_reloc_type_lookup)
long (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
long (*_bfd_canonicalize_reloc)
PARAMS ((bfd *, sec_ptr, arelent **, struct symbol_cache_entry **));
reloc_howto_type *
(*reloc_type_lookup) PARAMS ((bfd *, bfd_reloc_code_real_type));
#define BFD_JUMP_TABLE_WRITE(NAME) \
CONCAT2 (NAME,_set_arch_mach), \
CONCAT2 (NAME,_set_section_contents)
bfd_boolean (*_bfd_set_arch_mach)
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
bfd_boolean (*_bfd_set_section_contents)
PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
#define BFD_JUMP_TABLE_LINK(NAME) \
CONCAT2 (NAME,_sizeof_headers), \
CONCAT2 (NAME,_bfd_get_relocated_section_contents), \
CONCAT2 (NAME,_bfd_relax_section), \
CONCAT2 (NAME,_bfd_link_hash_table_create), \
CONCAT2 (NAME,_bfd_link_hash_table_free), \
CONCAT2 (NAME,_bfd_link_add_symbols), \
CONCAT2 (NAME,_bfd_link_just_syms), \
CONCAT2 (NAME,_bfd_final_link), \
CONCAT2 (NAME,_bfd_link_split_section), \
CONCAT2 (NAME,_bfd_gc_sections), \
CONCAT2 (NAME,_bfd_merge_sections), \
CONCAT2 (NAME,_bfd_discard_group)
int (*_bfd_sizeof_headers) PARAMS ((bfd *, bfd_boolean));
bfd_byte * (*_bfd_get_relocated_section_contents)
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
bfd_byte *, bfd_boolean, struct symbol_cache_entry **));
bfd_boolean (*_bfd_relax_section)
PARAMS ((bfd *, struct sec *, struct bfd_link_info *, bfd_boolean *));
struct bfd_link_hash_table *
(*_bfd_link_hash_table_create) PARAMS ((bfd *));
void (*_bfd_link_hash_table_free)
PARAMS ((struct bfd_link_hash_table *));
bfd_boolean (*_bfd_link_add_symbols)
PARAMS ((bfd *, struct bfd_link_info *));
void (*_bfd_link_just_syms)
PARAMS ((asection *, struct bfd_link_info *));
bfd_boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
bfd_boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
bfd_boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
bfd_boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
bfd_boolean (*_bfd_discard_group) PARAMS ((bfd *, struct sec *));
#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
CONCAT2 (NAME,_canonicalize_dynamic_symtab), \
CONCAT2 (NAME,_get_dynamic_reloc_upper_bound), \
CONCAT2 (NAME,_canonicalize_dynamic_reloc)
long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
long (*_bfd_canonicalize_dynamic_symtab)
PARAMS ((bfd *, struct symbol_cache_entry **));
long (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
long (*_bfd_canonicalize_dynamic_reloc)
PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
const struct bfd_target * alternative_target;
PTR backend_data;
} bfd_target;
bfd_boolean
bfd_set_default_target PARAMS ((const char *name));
const bfd_target *
bfd_find_target PARAMS ((const char *target_name, bfd *abfd));
const char **
bfd_target_list PARAMS ((void));
const bfd_target *
bfd_search_for_target PARAMS ((int (* search_func) (const bfd_target *, void *), void *));
bfd_boolean
bfd_check_format PARAMS ((bfd *abfd, bfd_format format));
bfd_boolean
bfd_check_format_matches PARAMS ((bfd *abfd, bfd_format format, char ***matching));
bfd_boolean
bfd_set_format PARAMS ((bfd *abfd, bfd_format format));
const char *
bfd_format_string PARAMS ((bfd_format format));
bfd_boolean
bfd_link_split_section PARAMS ((bfd *abfd, asection *sec));
#define bfd_link_split_section(abfd, sec) \
BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
bfd_byte *
bfd_simple_get_relocated_section_contents PARAMS ((bfd *abfd, asection *sec, bfd_byte *outbuf));
#ifdef __cplusplus
}
#endif
#endif