Update for 2.13 10-Oct-2002 import.

This commit is contained in:
obrien 2002-10-11 06:28:05 +00:00
parent bd7ac0d55d
commit 9ec27cc871
9 changed files with 606 additions and 263 deletions

View File

@ -149,7 +149,7 @@
#define PACKAGE "gas"
/* Version number of package */
/* #define VERSION "2.12" */
/* #define VERSION "2.13" */
/* Define if defaulting to ELF on SCO 5. */
/* #undef SCO_ELF */
@ -163,9 +163,6 @@
/* Define as 1 if big endian. */
/* #undef TARGET_BYTES_BIG_ENDIAN */
/* Use ELF stabs for MIPS, not ECOFF stabs */
/* #undef MIPS_STABS_ELF */
/* Default architecture. */
/* #undef DEFAULT_ARCH */
@ -215,7 +212,7 @@
/* #undef USE_EMULATIONS */
/* Supported emulations. */
#define EMULATIONS
#define EMULATIONS
/* Default emulation. */
#define DEFAULT_EMULATION ""

View File

@ -149,7 +149,7 @@
#define PACKAGE "gas"
/* Version number of package */
/* #define VERSION "2.12" */
/* #define VERSION "2.13" */
/* Define if defaulting to ELF on SCO 5. */
/* #undef SCO_ELF */
@ -163,9 +163,6 @@
/* Define as 1 if big endian. */
/* #undef TARGET_BYTES_BIG_ENDIAN */
/* Use ELF stabs for MIPS, not ECOFF stabs */
/* #undef MIPS_STABS_ELF */
/* Default architecture. */
/* #define DEFAULT_ARCH "i386" */

View File

@ -149,7 +149,7 @@
#define PACKAGE "gas"
/* Version number of package */
/* #define VERSION "2.12" */
/* #define VERSION "2.13" */
/* Define if defaulting to ELF on SCO 5. */
/* #undef SCO_ELF */
@ -163,9 +163,6 @@
/* Define as 1 if big endian. */
/* #undef TARGET_BYTES_BIG_ENDIAN */
/* Use ELF stabs for MIPS, not ECOFF stabs */
/* #undef MIPS_STABS_ELF */
/* Default architecture. */
#define DEFAULT_ARCH "v9-64"
@ -215,7 +212,7 @@
/* #undef USE_EMULATIONS */
/* Supported emulations. */
#define EMULATIONS
#define EMULATIONS
/* Default emulation. */
#define DEFAULT_EMULATION ""

View File

@ -12,21 +12,21 @@
Free Software Foundation, Inc.
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.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
@ -52,9 +52,9 @@ extern "C" {
#endif
#endif
/* #define BFD_VERSION 212000000 */
/* #define BFD_VERSION_DATE 20020309 */
/* #define BFD_VERSION_STRING "2.12" */
/* #define BFD_VERSION 213000000 */
/* #define BFD_VERSION_DATE 20021110 */
/* #define BFD_VERSION_STRING "2.13 20021110" */
/* 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
@ -349,6 +349,7 @@ 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))
@ -360,7 +361,7 @@ typedef struct sec *sec_ptr;
#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 = (boolean)true), true)
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (boolean)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)
@ -760,9 +761,12 @@ extern boolean bfd_xcoff_record_link_assignment
extern boolean bfd_xcoff_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *,
unsigned long, unsigned long, unsigned long, boolean,
int, boolean, boolean, struct sec **));
int, boolean, boolean, struct sec **, boolean));
extern boolean bfd_xcoff_link_generate_rtinit
PARAMS ((bfd *, const char *, const char *));
PARAMS ((bfd *, const char *, const char *, boolean));
/* XCOFF support routines for ar. */
extern boolean bfd_xcoff_ar_archive_set_magic PARAMS ((bfd *, char *));
/* Externally visible COFF routines. */
@ -814,6 +818,9 @@ extern boolean bfd_elf32_arm_process_before_allocation
extern boolean bfd_elf32_arm_get_bfd_for_interworking
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean bfd_elf32_arm_add_glue_sections_to_bfd
PARAMS ((bfd *, struct bfd_link_info *));
/* TI COFF load page support. */
extern void bfd_ticoff_set_section_load_page
PARAMS ((struct sec *, int));
@ -821,10 +828,11 @@ extern void bfd_ticoff_set_section_load_page
extern int bfd_ticoff_get_section_load_page
PARAMS ((struct sec *));
/* And more from the source. */
/* Extracted from init.c. */
void
bfd_init PARAMS ((void));
/* Extracted from opncls.c. */
bfd *
bfd_openr PARAMS ((const char *filename, const char *target));
@ -852,6 +860,7 @@ bfd_make_writable PARAMS ((bfd *abfd));
boolean
bfd_make_readable PARAMS ((bfd *abfd));
/* Extracted from libbfd.c. */
/* Byte swapping macros for user section data. */
@ -992,6 +1001,7 @@ bfd_make_readable PARAMS ((bfd *abfd));
#define H_GET_S8 bfd_h_get_signed_8
/* Extracted from section.c. */
/* This structure is used for a comdat section, as in PE. A comdat
section is associated with a particular symbol. When the linker
sees a comdat section, it keeps only one of the sections with a
@ -1073,12 +1083,6 @@ typedef struct sec
standard data. */
#define SEC_CONSTRUCTOR 0x100
/* The section is a constructor, and should be placed at the
end of the text, data, or bss section(?). */
#define SEC_CONSTRUCTOR_TEXT 0x1100
#define SEC_CONSTRUCTOR_DATA 0x2100
#define SEC_CONSTRUCTOR_BSS 0x3100
/* The section has contents - a data section could be
<<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
<<SEC_HAS_CONTENTS>> */
@ -1099,6 +1103,9 @@ typedef struct sec
sections. */
#define SEC_COFF_SHARED_LIBRARY 0x800
/* The section contains thread local data. */
#define SEC_THREAD_LOCAL 0x1000
/* The section has GOT references. This flag is only for the
linker, and is currently only used by the elf32-hppa back end.
It will be set if global offset table references were detected
@ -1455,6 +1462,10 @@ bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec,
void
_bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section));
boolean
bfd_generic_discard_group PARAMS ((bfd *abfd, asection *group));
/* Extracted from archures.c. */
enum bfd_architecture
{
bfd_arch_unknown, /* File arch not known. */
@ -1581,6 +1592,7 @@ enum bfd_architecture
#define bfd_mach_d10v_ts2 2
#define bfd_mach_d10v_ts3 3
bfd_arch_d30v, /* Mitsubishi D30V */
bfd_arch_dlx, /* DLX */
bfd_arch_m68hc11, /* Motorola 68HC11 */
bfd_arch_m68hc12, /* Motorola 68HC12 */
bfd_arch_z8k, /* Zilog Z8000 */
@ -1634,6 +1646,13 @@ enum bfd_architecture
#define bfd_mach_am33 330
bfd_arch_fr30,
#define bfd_mach_fr30 0x46523330
bfd_arch_frv,
#define bfd_mach_frv 0
#define bfd_mach_frvsimple 1
#define bfd_mach_fr300 300
#define bfd_mach_fr400 400
#define bfd_mach_frvtomcat 499 /* fr500 prototype */
#define bfd_mach_fr500 500
bfd_arch_mcore,
bfd_arch_ia64, /* HP/Intel ia64 */
#define bfd_mach_ia64_elf64 0
@ -1647,8 +1666,8 @@ enum bfd_architecture
#define bfd_mach_avr5 5
bfd_arch_cris, /* Axis CRIS */
bfd_arch_s390, /* IBM s390 */
#define bfd_mach_s390_esa 0
#define bfd_mach_s390_esame 1
#define bfd_mach_s390_31 0
#define bfd_mach_s390_64 1
bfd_arch_openrisc, /* OpenRISC */
bfd_arch_mmix, /* Donald Knuth's educational processor. */
bfd_arch_xstormy16,
@ -1666,7 +1685,9 @@ typedef struct bfd_arch_info
const char *arch_name;
const char *printable_name;
unsigned int section_align_power;
/* True if this is the default machine for the architecture. */
/* True if this is the default machine for the architecture.
The default arch should be the first entry for an arch so that
all the entries for that arch can be accessed via <<next>>. */
boolean the_default;
const struct bfd_arch_info * (*compatible)
PARAMS ((const struct bfd_arch_info *a,
@ -1725,6 +1746,7 @@ unsigned int
bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
unsigned long machine));
/* Extracted from reloc.c. */
typedef enum bfd_reloc_status
{
/* No errors detected. */
@ -2150,6 +2172,21 @@ share a common GP, and the target address is adjusted for
STO_ALPHA_STD_GPLOAD. */
BFD_RELOC_ALPHA_BRSGP,
/* Alpha thread-local storage relocations. */
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,
/* Bits 27..2 of the relocation address shifted right 2 bits;
simple reloc otherwise. */
BFD_RELOC_MIPS_JMP,
@ -2203,55 +2240,17 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_MIPS_REL16,
BFD_RELOC_MIPS_RELGOT,
BFD_RELOC_MIPS_JALR,
BFD_RELOC_SH_GOT_LOW16,
BFD_RELOC_SH_GOT_MEDLOW16,
BFD_RELOC_SH_GOT_MEDHI16,
BFD_RELOC_SH_GOT_HI16,
BFD_RELOC_SH_GOTPLT_LOW16,
BFD_RELOC_SH_GOTPLT_MEDLOW16,
BFD_RELOC_SH_GOTPLT_MEDHI16,
BFD_RELOC_SH_GOTPLT_HI16,
BFD_RELOC_SH_PLT_LOW16,
BFD_RELOC_SH_PLT_MEDLOW16,
BFD_RELOC_SH_PLT_MEDHI16,
BFD_RELOC_SH_PLT_HI16,
BFD_RELOC_SH_GOTOFF_LOW16,
BFD_RELOC_SH_GOTOFF_MEDLOW16,
BFD_RELOC_SH_GOTOFF_MEDHI16,
BFD_RELOC_SH_GOTOFF_HI16,
BFD_RELOC_SH_GOTPC_LOW16,
BFD_RELOC_SH_GOTPC_MEDLOW16,
BFD_RELOC_SH_GOTPC_MEDHI16,
BFD_RELOC_SH_GOTPC_HI16,
BFD_RELOC_SH_COPY64,
BFD_RELOC_SH_GLOB_DAT64,
BFD_RELOC_SH_JMP_SLOT64,
BFD_RELOC_SH_RELATIVE64,
BFD_RELOC_SH_GOT10BY4,
BFD_RELOC_SH_GOT10BY8,
BFD_RELOC_SH_GOTPLT10BY4,
BFD_RELOC_SH_GOTPLT10BY8,
BFD_RELOC_SH_GOTPLT32,
BFD_RELOC_SH_SHMEDIA_CODE,
BFD_RELOC_SH_IMMU5,
BFD_RELOC_SH_IMMS6,
BFD_RELOC_SH_IMMS6BY32,
BFD_RELOC_SH_IMMU6,
BFD_RELOC_SH_IMMS10,
BFD_RELOC_SH_IMMS10BY2,
BFD_RELOC_SH_IMMS10BY4,
BFD_RELOC_SH_IMMS10BY8,
BFD_RELOC_SH_IMMS16,
BFD_RELOC_SH_IMMU16,
BFD_RELOC_SH_IMM_LOW16,
BFD_RELOC_SH_IMM_LOW16_PCREL,
BFD_RELOC_SH_IMM_MEDLOW16,
BFD_RELOC_SH_IMM_MEDLOW16_PCREL,
BFD_RELOC_SH_IMM_MEDHI16,
BFD_RELOC_SH_IMM_MEDHI16_PCREL,
BFD_RELOC_SH_IMM_HI16,
BFD_RELOC_SH_IMM_HI16_PCREL,
BFD_RELOC_SH_PT_16,
/* Fujitsu Frv Relocations. */
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,
/* i386/elf relocations */
@ -2263,6 +2262,15 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_386_RELATIVE,
BFD_RELOC_386_GOTOFF,
BFD_RELOC_386_GOTPC,
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,
/* x86-64/elf relocations */
BFD_RELOC_X86_64_GOT32,
@ -2432,6 +2440,55 @@ field in the instruction. */
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,
/* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
be zero and is not stored in the instruction. */
@ -2518,6 +2575,15 @@ of the container. */
/* This is a 32-bit pc-relative reloc. */
BFD_RELOC_D30V_32_PCREL,
/* DLX relocs */
BFD_RELOC_DLX_HI16_S,
/* DLX relocs */
BFD_RELOC_DLX_LO16,
/* DLX relocs */
BFD_RELOC_DLX_JMP26,
/* Mitsubishi M32R relocs.
This is a 24 bit absolute address. */
BFD_RELOC_M32R_24,
@ -2925,12 +2991,25 @@ this offset in the reloc's section offset. */
BFD_RELOC_IA64_IPLTMSB,
BFD_RELOC_IA64_IPLTLSB,
BFD_RELOC_IA64_COPY,
BFD_RELOC_IA64_TPREL22,
BFD_RELOC_IA64_TPREL64MSB,
BFD_RELOC_IA64_TPREL64LSB,
BFD_RELOC_IA64_LTOFF_TP22,
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,
/* Motorola 68HC11 reloc.
This is the 8 bits high part of an absolute address. */
@ -3028,6 +3107,11 @@ This is the 3 bits of a value. */
BFD_RELOC_XSTORMY16_REL_12,
BFD_RELOC_XSTORMY16_24,
BFD_RELOC_XSTORMY16_FPTR16,
/* Relocations used by VAX ELF. */
BFD_RELOC_VAX_GLOB_DAT,
BFD_RELOC_VAX_JMP_SLOT,
BFD_RELOC_VAX_RELATIVE,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
reloc_howto_type *
@ -3036,6 +3120,7 @@ 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));
/* Extracted from syms.c. */
typedef struct symbol_cache_entry
{
@ -3141,6 +3226,9 @@ typedef struct symbol_cache_entry
as well. */
#define BSF_DEBUGGING_RELOC 0x20000
/* This symbol is thread local. Used in ELF. */
#define BSF_THREAD_LOCAL 0x40000
flagword flags;
/* A pointer to the section to which this symbol is
@ -3205,6 +3293,7 @@ bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymb
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
(ibfd, isymbol, obfd, osymbol))
/* Extracted from bfd.c. */
struct _bfd
{
/* The filename the application opened the BFD with. */
@ -3504,12 +3593,21 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
#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))
@ -3539,6 +3637,7 @@ extern bfd_byte *bfd_get_relocated_section_contents
boolean
bfd_alt_mach_code PARAMS ((bfd *abfd, int index));
/* Extracted from archive.c. */
symindex
bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
@ -3548,6 +3647,7 @@ bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head));
bfd *
bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous));
/* Extracted from corefile.c. */
const char *
bfd_core_file_failing_command PARAMS ((bfd *abfd));
@ -3557,6 +3657,7 @@ bfd_core_file_failing_signal PARAMS ((bfd *abfd));
boolean
core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
/* Extracted from targets.c. */
#define BFD_SEND(bfd, message, arglist) \
((*((bfd)->xvec->message)) arglist)
@ -3832,11 +3933,14 @@ 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_merge_sections), \
CONCAT2 (NAME,_bfd_discard_group)
int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
bfd_byte *(*_bfd_get_relocated_section_contents)
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
@ -3849,9 +3953,15 @@ CONCAT2 (NAME,_bfd_merge_sections)
different information in this table. */
struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *));
/* Release the memory associated with the linker hash table. */
void (*_bfd_link_hash_table_free) PARAMS ((struct bfd_link_hash_table *));
/* Add symbols from this object file into the hash table. */
boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
/* Indicate that we are only retrieving symbol values from this section. */
void (*_bfd_link_just_syms) PARAMS ((asection *, struct bfd_link_info *));
/* Do a link based on the link_order structures attached to each
section of the BFD. */
boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
@ -3865,6 +3975,9 @@ CONCAT2 (NAME,_bfd_merge_sections)
/* Attempt to merge SEC_MERGE sections. */
boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
/* Discard members of a group. */
boolean (*_bfd_discard_group) PARAMS ((bfd *, struct sec *));
/* Routines to handle dynamic symbols and relocs. */
#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
@ -3903,6 +4016,7 @@ bfd_target_list PARAMS ((void));
const bfd_target *
bfd_search_for_target PARAMS ((int (* search_func) (const bfd_target *, void *), void *));
/* Extracted from format.c. */
boolean
bfd_check_format PARAMS ((bfd *abfd, bfd_format format));

View File

@ -12,21 +12,21 @@
Free Software Foundation, Inc.
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.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
@ -52,9 +52,9 @@ extern "C" {
#endif
#endif
/* #define BFD_VERSION 212000000 */
/* #define BFD_VERSION_DATE 20020309 */
/* #define BFD_VERSION_STRING "2.12" */
/* #define BFD_VERSION 213000000 */
/* #define BFD_VERSION_DATE 20021110 */
/* #define BFD_VERSION_STRING "2.13 20021110" */
/* 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
@ -349,6 +349,7 @@ 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))
@ -360,7 +361,7 @@ typedef struct sec *sec_ptr;
#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 = (boolean)true), true)
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (boolean)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)
@ -760,9 +761,12 @@ extern boolean bfd_xcoff_record_link_assignment
extern boolean bfd_xcoff_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *,
unsigned long, unsigned long, unsigned long, boolean,
int, boolean, boolean, struct sec **));
int, boolean, boolean, struct sec **, boolean));
extern boolean bfd_xcoff_link_generate_rtinit
PARAMS ((bfd *, const char *, const char *));
PARAMS ((bfd *, const char *, const char *, boolean));
/* XCOFF support routines for ar. */
extern boolean bfd_xcoff_ar_archive_set_magic PARAMS ((bfd *, char *));
/* Externally visible COFF routines. */
@ -814,6 +818,9 @@ extern boolean bfd_elf32_arm_process_before_allocation
extern boolean bfd_elf32_arm_get_bfd_for_interworking
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean bfd_elf32_arm_add_glue_sections_to_bfd
PARAMS ((bfd *, struct bfd_link_info *));
/* TI COFF load page support. */
extern void bfd_ticoff_set_section_load_page
PARAMS ((struct sec *, int));
@ -821,10 +828,11 @@ extern void bfd_ticoff_set_section_load_page
extern int bfd_ticoff_get_section_load_page
PARAMS ((struct sec *));
/* And more from the source. */
/* Extracted from init.c. */
void
bfd_init PARAMS ((void));
/* Extracted from opncls.c. */
bfd *
bfd_openr PARAMS ((const char *filename, const char *target));
@ -852,6 +860,7 @@ bfd_make_writable PARAMS ((bfd *abfd));
boolean
bfd_make_readable PARAMS ((bfd *abfd));
/* Extracted from libbfd.c. */
/* Byte swapping macros for user section data. */
@ -992,6 +1001,7 @@ bfd_make_readable PARAMS ((bfd *abfd));
#define H_GET_S8 bfd_h_get_signed_8
/* Extracted from section.c. */
/* This structure is used for a comdat section, as in PE. A comdat
section is associated with a particular symbol. When the linker
sees a comdat section, it keeps only one of the sections with a
@ -1073,12 +1083,6 @@ typedef struct sec
standard data. */
#define SEC_CONSTRUCTOR 0x100
/* The section is a constructor, and should be placed at the
end of the text, data, or bss section(?). */
#define SEC_CONSTRUCTOR_TEXT 0x1100
#define SEC_CONSTRUCTOR_DATA 0x2100
#define SEC_CONSTRUCTOR_BSS 0x3100
/* The section has contents - a data section could be
<<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
<<SEC_HAS_CONTENTS>> */
@ -1099,6 +1103,9 @@ typedef struct sec
sections. */
#define SEC_COFF_SHARED_LIBRARY 0x800
/* The section contains thread local data. */
#define SEC_THREAD_LOCAL 0x1000
/* The section has GOT references. This flag is only for the
linker, and is currently only used by the elf32-hppa back end.
It will be set if global offset table references were detected
@ -1455,6 +1462,10 @@ bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec,
void
_bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section));
boolean
bfd_generic_discard_group PARAMS ((bfd *abfd, asection *group));
/* Extracted from archures.c. */
enum bfd_architecture
{
bfd_arch_unknown, /* File arch not known. */
@ -1581,6 +1592,7 @@ enum bfd_architecture
#define bfd_mach_d10v_ts2 2
#define bfd_mach_d10v_ts3 3
bfd_arch_d30v, /* Mitsubishi D30V */
bfd_arch_dlx, /* DLX */
bfd_arch_m68hc11, /* Motorola 68HC11 */
bfd_arch_m68hc12, /* Motorola 68HC12 */
bfd_arch_z8k, /* Zilog Z8000 */
@ -1634,6 +1646,13 @@ enum bfd_architecture
#define bfd_mach_am33 330
bfd_arch_fr30,
#define bfd_mach_fr30 0x46523330
bfd_arch_frv,
#define bfd_mach_frv 0
#define bfd_mach_frvsimple 1
#define bfd_mach_fr300 300
#define bfd_mach_fr400 400
#define bfd_mach_frvtomcat 499 /* fr500 prototype */
#define bfd_mach_fr500 500
bfd_arch_mcore,
bfd_arch_ia64, /* HP/Intel ia64 */
#define bfd_mach_ia64_elf64 0
@ -1647,8 +1666,8 @@ enum bfd_architecture
#define bfd_mach_avr5 5
bfd_arch_cris, /* Axis CRIS */
bfd_arch_s390, /* IBM s390 */
#define bfd_mach_s390_esa 0
#define bfd_mach_s390_esame 1
#define bfd_mach_s390_31 0
#define bfd_mach_s390_64 1
bfd_arch_openrisc, /* OpenRISC */
bfd_arch_mmix, /* Donald Knuth's educational processor. */
bfd_arch_xstormy16,
@ -1666,7 +1685,9 @@ typedef struct bfd_arch_info
const char *arch_name;
const char *printable_name;
unsigned int section_align_power;
/* True if this is the default machine for the architecture. */
/* True if this is the default machine for the architecture.
The default arch should be the first entry for an arch so that
all the entries for that arch can be accessed via <<next>>. */
boolean the_default;
const struct bfd_arch_info * (*compatible)
PARAMS ((const struct bfd_arch_info *a,
@ -1725,6 +1746,7 @@ unsigned int
bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
unsigned long machine));
/* Extracted from reloc.c. */
typedef enum bfd_reloc_status
{
/* No errors detected. */
@ -2150,6 +2172,21 @@ share a common GP, and the target address is adjusted for
STO_ALPHA_STD_GPLOAD. */
BFD_RELOC_ALPHA_BRSGP,
/* Alpha thread-local storage relocations. */
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,
/* Bits 27..2 of the relocation address shifted right 2 bits;
simple reloc otherwise. */
BFD_RELOC_MIPS_JMP,
@ -2203,55 +2240,17 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_MIPS_REL16,
BFD_RELOC_MIPS_RELGOT,
BFD_RELOC_MIPS_JALR,
BFD_RELOC_SH_GOT_LOW16,
BFD_RELOC_SH_GOT_MEDLOW16,
BFD_RELOC_SH_GOT_MEDHI16,
BFD_RELOC_SH_GOT_HI16,
BFD_RELOC_SH_GOTPLT_LOW16,
BFD_RELOC_SH_GOTPLT_MEDLOW16,
BFD_RELOC_SH_GOTPLT_MEDHI16,
BFD_RELOC_SH_GOTPLT_HI16,
BFD_RELOC_SH_PLT_LOW16,
BFD_RELOC_SH_PLT_MEDLOW16,
BFD_RELOC_SH_PLT_MEDHI16,
BFD_RELOC_SH_PLT_HI16,
BFD_RELOC_SH_GOTOFF_LOW16,
BFD_RELOC_SH_GOTOFF_MEDLOW16,
BFD_RELOC_SH_GOTOFF_MEDHI16,
BFD_RELOC_SH_GOTOFF_HI16,
BFD_RELOC_SH_GOTPC_LOW16,
BFD_RELOC_SH_GOTPC_MEDLOW16,
BFD_RELOC_SH_GOTPC_MEDHI16,
BFD_RELOC_SH_GOTPC_HI16,
BFD_RELOC_SH_COPY64,
BFD_RELOC_SH_GLOB_DAT64,
BFD_RELOC_SH_JMP_SLOT64,
BFD_RELOC_SH_RELATIVE64,
BFD_RELOC_SH_GOT10BY4,
BFD_RELOC_SH_GOT10BY8,
BFD_RELOC_SH_GOTPLT10BY4,
BFD_RELOC_SH_GOTPLT10BY8,
BFD_RELOC_SH_GOTPLT32,
BFD_RELOC_SH_SHMEDIA_CODE,
BFD_RELOC_SH_IMMU5,
BFD_RELOC_SH_IMMS6,
BFD_RELOC_SH_IMMS6BY32,
BFD_RELOC_SH_IMMU6,
BFD_RELOC_SH_IMMS10,
BFD_RELOC_SH_IMMS10BY2,
BFD_RELOC_SH_IMMS10BY4,
BFD_RELOC_SH_IMMS10BY8,
BFD_RELOC_SH_IMMS16,
BFD_RELOC_SH_IMMU16,
BFD_RELOC_SH_IMM_LOW16,
BFD_RELOC_SH_IMM_LOW16_PCREL,
BFD_RELOC_SH_IMM_MEDLOW16,
BFD_RELOC_SH_IMM_MEDLOW16_PCREL,
BFD_RELOC_SH_IMM_MEDHI16,
BFD_RELOC_SH_IMM_MEDHI16_PCREL,
BFD_RELOC_SH_IMM_HI16,
BFD_RELOC_SH_IMM_HI16_PCREL,
BFD_RELOC_SH_PT_16,
/* Fujitsu Frv Relocations. */
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,
/* i386/elf relocations */
@ -2263,6 +2262,15 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_386_RELATIVE,
BFD_RELOC_386_GOTOFF,
BFD_RELOC_386_GOTPC,
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,
/* x86-64/elf relocations */
BFD_RELOC_X86_64_GOT32,
@ -2432,6 +2440,55 @@ field in the instruction. */
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,
/* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
be zero and is not stored in the instruction. */
@ -2518,6 +2575,15 @@ of the container. */
/* This is a 32-bit pc-relative reloc. */
BFD_RELOC_D30V_32_PCREL,
/* DLX relocs */
BFD_RELOC_DLX_HI16_S,
/* DLX relocs */
BFD_RELOC_DLX_LO16,
/* DLX relocs */
BFD_RELOC_DLX_JMP26,
/* Mitsubishi M32R relocs.
This is a 24 bit absolute address. */
BFD_RELOC_M32R_24,
@ -2925,12 +2991,25 @@ this offset in the reloc's section offset. */
BFD_RELOC_IA64_IPLTMSB,
BFD_RELOC_IA64_IPLTLSB,
BFD_RELOC_IA64_COPY,
BFD_RELOC_IA64_TPREL22,
BFD_RELOC_IA64_TPREL64MSB,
BFD_RELOC_IA64_TPREL64LSB,
BFD_RELOC_IA64_LTOFF_TP22,
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,
/* Motorola 68HC11 reloc.
This is the 8 bits high part of an absolute address. */
@ -3028,6 +3107,11 @@ This is the 3 bits of a value. */
BFD_RELOC_XSTORMY16_REL_12,
BFD_RELOC_XSTORMY16_24,
BFD_RELOC_XSTORMY16_FPTR16,
/* Relocations used by VAX ELF. */
BFD_RELOC_VAX_GLOB_DAT,
BFD_RELOC_VAX_JMP_SLOT,
BFD_RELOC_VAX_RELATIVE,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
reloc_howto_type *
@ -3036,6 +3120,7 @@ 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));
/* Extracted from syms.c. */
typedef struct symbol_cache_entry
{
@ -3141,6 +3226,9 @@ typedef struct symbol_cache_entry
as well. */
#define BSF_DEBUGGING_RELOC 0x20000
/* This symbol is thread local. Used in ELF. */
#define BSF_THREAD_LOCAL 0x40000
flagword flags;
/* A pointer to the section to which this symbol is
@ -3205,6 +3293,7 @@ bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymb
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
(ibfd, isymbol, obfd, osymbol))
/* Extracted from bfd.c. */
struct _bfd
{
/* The filename the application opened the BFD with. */
@ -3504,12 +3593,21 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
#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))
@ -3539,6 +3637,7 @@ extern bfd_byte *bfd_get_relocated_section_contents
boolean
bfd_alt_mach_code PARAMS ((bfd *abfd, int index));
/* Extracted from archive.c. */
symindex
bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
@ -3548,6 +3647,7 @@ bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head));
bfd *
bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous));
/* Extracted from corefile.c. */
const char *
bfd_core_file_failing_command PARAMS ((bfd *abfd));
@ -3557,6 +3657,7 @@ bfd_core_file_failing_signal PARAMS ((bfd *abfd));
boolean
core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
/* Extracted from targets.c. */
#define BFD_SEND(bfd, message, arglist) \
((*((bfd)->xvec->message)) arglist)
@ -3832,11 +3933,14 @@ 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_merge_sections), \
CONCAT2 (NAME,_bfd_discard_group)
int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
bfd_byte *(*_bfd_get_relocated_section_contents)
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
@ -3849,9 +3953,15 @@ CONCAT2 (NAME,_bfd_merge_sections)
different information in this table. */
struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *));
/* Release the memory associated with the linker hash table. */
void (*_bfd_link_hash_table_free) PARAMS ((struct bfd_link_hash_table *));
/* Add symbols from this object file into the hash table. */
boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
/* Indicate that we are only retrieving symbol values from this section. */
void (*_bfd_link_just_syms) PARAMS ((asection *, struct bfd_link_info *));
/* Do a link based on the link_order structures attached to each
section of the BFD. */
boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
@ -3865,6 +3975,9 @@ CONCAT2 (NAME,_bfd_merge_sections)
/* Attempt to merge SEC_MERGE sections. */
boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
/* Discard members of a group. */
boolean (*_bfd_discard_group) PARAMS ((bfd *, struct sec *));
/* Routines to handle dynamic symbols and relocs. */
#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
@ -3903,6 +4016,7 @@ bfd_target_list PARAMS ((void));
const bfd_target *
bfd_search_for_target PARAMS ((int (* search_func) (const bfd_target *, void *), void *));
/* Extracted from format.c. */
boolean
bfd_check_format PARAMS ((bfd *abfd, bfd_format format));

View File

@ -12,21 +12,21 @@
Free Software Foundation, Inc.
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.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
@ -49,9 +49,9 @@ extern "C" {
#endif
#endif
/* #define BFD_VERSION 212000000 */
/* #define BFD_VERSION_DATE 20020309 */
/* #define BFD_VERSION_STRING "2.12" */
/* #define BFD_VERSION 213000000 */
/* #define BFD_VERSION_DATE 20021110 */
/* #define BFD_VERSION_STRING "2.13 20021110" */
/* 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
@ -346,6 +346,7 @@ 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))
@ -357,7 +358,7 @@ typedef struct sec *sec_ptr;
#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 = (boolean)true), true)
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (boolean)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)
@ -757,9 +758,12 @@ extern boolean bfd_xcoff_record_link_assignment
extern boolean bfd_xcoff_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *,
unsigned long, unsigned long, unsigned long, boolean,
int, boolean, boolean, struct sec **));
int, boolean, boolean, struct sec **, boolean));
extern boolean bfd_xcoff_link_generate_rtinit
PARAMS ((bfd *, const char *, const char *));
PARAMS ((bfd *, const char *, const char *, boolean));
/* XCOFF support routines for ar. */
extern boolean bfd_xcoff_ar_archive_set_magic PARAMS ((bfd *, char *));
/* Externally visible COFF routines. */
@ -811,6 +815,9 @@ extern boolean bfd_elf32_arm_process_before_allocation
extern boolean bfd_elf32_arm_get_bfd_for_interworking
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean bfd_elf32_arm_add_glue_sections_to_bfd
PARAMS ((bfd *, struct bfd_link_info *));
/* TI COFF load page support. */
extern void bfd_ticoff_set_section_load_page
PARAMS ((struct sec *, int));
@ -818,10 +825,11 @@ extern void bfd_ticoff_set_section_load_page
extern int bfd_ticoff_get_section_load_page
PARAMS ((struct sec *));
/* And more from the source. */
/* Extracted from init.c. */
void
bfd_init PARAMS ((void));
/* Extracted from opncls.c. */
bfd *
bfd_openr PARAMS ((const char *filename, const char *target));
@ -849,6 +857,7 @@ bfd_make_writable PARAMS ((bfd *abfd));
boolean
bfd_make_readable PARAMS ((bfd *abfd));
/* Extracted from libbfd.c. */
/* Byte swapping macros for user section data. */
@ -989,6 +998,7 @@ bfd_make_readable PARAMS ((bfd *abfd));
#define H_GET_S8 bfd_h_get_signed_8
/* Extracted from section.c. */
/* This structure is used for a comdat section, as in PE. A comdat
section is associated with a particular symbol. When the linker
sees a comdat section, it keeps only one of the sections with a
@ -1070,12 +1080,6 @@ typedef struct sec
standard data. */
#define SEC_CONSTRUCTOR 0x100
/* The section is a constructor, and should be placed at the
end of the text, data, or bss section(?). */
#define SEC_CONSTRUCTOR_TEXT 0x1100
#define SEC_CONSTRUCTOR_DATA 0x2100
#define SEC_CONSTRUCTOR_BSS 0x3100
/* The section has contents - a data section could be
<<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
<<SEC_HAS_CONTENTS>> */
@ -1096,6 +1100,9 @@ typedef struct sec
sections. */
#define SEC_COFF_SHARED_LIBRARY 0x800
/* The section contains thread local data. */
#define SEC_THREAD_LOCAL 0x1000
/* The section has GOT references. This flag is only for the
linker, and is currently only used by the elf32-hppa back end.
It will be set if global offset table references were detected
@ -1452,6 +1459,10 @@ bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec,
void
_bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section));
boolean
bfd_generic_discard_group PARAMS ((bfd *abfd, asection *group));
/* Extracted from archures.c. */
enum bfd_architecture
{
bfd_arch_unknown, /* File arch not known. */
@ -1578,6 +1589,7 @@ enum bfd_architecture
#define bfd_mach_d10v_ts2 2
#define bfd_mach_d10v_ts3 3
bfd_arch_d30v, /* Mitsubishi D30V */
bfd_arch_dlx, /* DLX */
bfd_arch_m68hc11, /* Motorola 68HC11 */
bfd_arch_m68hc12, /* Motorola 68HC12 */
bfd_arch_z8k, /* Zilog Z8000 */
@ -1631,6 +1643,13 @@ enum bfd_architecture
#define bfd_mach_am33 330
bfd_arch_fr30,
#define bfd_mach_fr30 0x46523330
bfd_arch_frv,
#define bfd_mach_frv 0
#define bfd_mach_frvsimple 1
#define bfd_mach_fr300 300
#define bfd_mach_fr400 400
#define bfd_mach_frvtomcat 499 /* fr500 prototype */
#define bfd_mach_fr500 500
bfd_arch_mcore,
bfd_arch_ia64, /* HP/Intel ia64 */
#define bfd_mach_ia64_elf64 0
@ -1644,8 +1663,8 @@ enum bfd_architecture
#define bfd_mach_avr5 5
bfd_arch_cris, /* Axis CRIS */
bfd_arch_s390, /* IBM s390 */
#define bfd_mach_s390_esa 0
#define bfd_mach_s390_esame 1
#define bfd_mach_s390_31 0
#define bfd_mach_s390_64 1
bfd_arch_openrisc, /* OpenRISC */
bfd_arch_mmix, /* Donald Knuth's educational processor. */
bfd_arch_xstormy16,
@ -1663,7 +1682,9 @@ typedef struct bfd_arch_info
const char *arch_name;
const char *printable_name;
unsigned int section_align_power;
/* True if this is the default machine for the architecture. */
/* True if this is the default machine for the architecture.
The default arch should be the first entry for an arch so that
all the entries for that arch can be accessed via <<next>>. */
boolean the_default;
const struct bfd_arch_info * (*compatible)
PARAMS ((const struct bfd_arch_info *a,
@ -1722,6 +1743,7 @@ unsigned int
bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
unsigned long machine));
/* Extracted from reloc.c. */
typedef enum bfd_reloc_status
{
/* No errors detected. */
@ -2147,6 +2169,21 @@ share a common GP, and the target address is adjusted for
STO_ALPHA_STD_GPLOAD. */
BFD_RELOC_ALPHA_BRSGP,
/* Alpha thread-local storage relocations. */
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,
/* Bits 27..2 of the relocation address shifted right 2 bits;
simple reloc otherwise. */
BFD_RELOC_MIPS_JMP,
@ -2200,55 +2237,17 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_MIPS_REL16,
BFD_RELOC_MIPS_RELGOT,
BFD_RELOC_MIPS_JALR,
BFD_RELOC_SH_GOT_LOW16,
BFD_RELOC_SH_GOT_MEDLOW16,
BFD_RELOC_SH_GOT_MEDHI16,
BFD_RELOC_SH_GOT_HI16,
BFD_RELOC_SH_GOTPLT_LOW16,
BFD_RELOC_SH_GOTPLT_MEDLOW16,
BFD_RELOC_SH_GOTPLT_MEDHI16,
BFD_RELOC_SH_GOTPLT_HI16,
BFD_RELOC_SH_PLT_LOW16,
BFD_RELOC_SH_PLT_MEDLOW16,
BFD_RELOC_SH_PLT_MEDHI16,
BFD_RELOC_SH_PLT_HI16,
BFD_RELOC_SH_GOTOFF_LOW16,
BFD_RELOC_SH_GOTOFF_MEDLOW16,
BFD_RELOC_SH_GOTOFF_MEDHI16,
BFD_RELOC_SH_GOTOFF_HI16,
BFD_RELOC_SH_GOTPC_LOW16,
BFD_RELOC_SH_GOTPC_MEDLOW16,
BFD_RELOC_SH_GOTPC_MEDHI16,
BFD_RELOC_SH_GOTPC_HI16,
BFD_RELOC_SH_COPY64,
BFD_RELOC_SH_GLOB_DAT64,
BFD_RELOC_SH_JMP_SLOT64,
BFD_RELOC_SH_RELATIVE64,
BFD_RELOC_SH_GOT10BY4,
BFD_RELOC_SH_GOT10BY8,
BFD_RELOC_SH_GOTPLT10BY4,
BFD_RELOC_SH_GOTPLT10BY8,
BFD_RELOC_SH_GOTPLT32,
BFD_RELOC_SH_SHMEDIA_CODE,
BFD_RELOC_SH_IMMU5,
BFD_RELOC_SH_IMMS6,
BFD_RELOC_SH_IMMS6BY32,
BFD_RELOC_SH_IMMU6,
BFD_RELOC_SH_IMMS10,
BFD_RELOC_SH_IMMS10BY2,
BFD_RELOC_SH_IMMS10BY4,
BFD_RELOC_SH_IMMS10BY8,
BFD_RELOC_SH_IMMS16,
BFD_RELOC_SH_IMMU16,
BFD_RELOC_SH_IMM_LOW16,
BFD_RELOC_SH_IMM_LOW16_PCREL,
BFD_RELOC_SH_IMM_MEDLOW16,
BFD_RELOC_SH_IMM_MEDLOW16_PCREL,
BFD_RELOC_SH_IMM_MEDHI16,
BFD_RELOC_SH_IMM_MEDHI16_PCREL,
BFD_RELOC_SH_IMM_HI16,
BFD_RELOC_SH_IMM_HI16_PCREL,
BFD_RELOC_SH_PT_16,
/* Fujitsu Frv Relocations. */
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,
/* i386/elf relocations */
@ -2260,6 +2259,15 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_386_RELATIVE,
BFD_RELOC_386_GOTOFF,
BFD_RELOC_386_GOTPC,
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,
/* x86-64/elf relocations */
BFD_RELOC_X86_64_GOT32,
@ -2429,6 +2437,55 @@ field in the instruction. */
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,
/* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
be zero and is not stored in the instruction. */
@ -2515,6 +2572,15 @@ of the container. */
/* This is a 32-bit pc-relative reloc. */
BFD_RELOC_D30V_32_PCREL,
/* DLX relocs */
BFD_RELOC_DLX_HI16_S,
/* DLX relocs */
BFD_RELOC_DLX_LO16,
/* DLX relocs */
BFD_RELOC_DLX_JMP26,
/* Mitsubishi M32R relocs.
This is a 24 bit absolute address. */
BFD_RELOC_M32R_24,
@ -2922,12 +2988,25 @@ this offset in the reloc's section offset. */
BFD_RELOC_IA64_IPLTMSB,
BFD_RELOC_IA64_IPLTLSB,
BFD_RELOC_IA64_COPY,
BFD_RELOC_IA64_TPREL22,
BFD_RELOC_IA64_TPREL64MSB,
BFD_RELOC_IA64_TPREL64LSB,
BFD_RELOC_IA64_LTOFF_TP22,
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,
/* Motorola 68HC11 reloc.
This is the 8 bits high part of an absolute address. */
@ -3025,6 +3104,11 @@ This is the 3 bits of a value. */
BFD_RELOC_XSTORMY16_REL_12,
BFD_RELOC_XSTORMY16_24,
BFD_RELOC_XSTORMY16_FPTR16,
/* Relocations used by VAX ELF. */
BFD_RELOC_VAX_GLOB_DAT,
BFD_RELOC_VAX_JMP_SLOT,
BFD_RELOC_VAX_RELATIVE,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
reloc_howto_type *
@ -3033,6 +3117,7 @@ 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));
/* Extracted from syms.c. */
typedef struct symbol_cache_entry
{
@ -3138,6 +3223,9 @@ typedef struct symbol_cache_entry
as well. */
#define BSF_DEBUGGING_RELOC 0x20000
/* This symbol is thread local. Used in ELF. */
#define BSF_THREAD_LOCAL 0x40000
flagword flags;
/* A pointer to the section to which this symbol is
@ -3202,6 +3290,7 @@ bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymb
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
(ibfd, isymbol, obfd, osymbol))
/* Extracted from bfd.c. */
struct _bfd
{
/* The filename the application opened the BFD with. */
@ -3501,12 +3590,21 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
#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))
@ -3536,6 +3634,7 @@ extern bfd_byte *bfd_get_relocated_section_contents
boolean
bfd_alt_mach_code PARAMS ((bfd *abfd, int index));
/* Extracted from archive.c. */
symindex
bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
@ -3545,6 +3644,7 @@ bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head));
bfd *
bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous));
/* Extracted from corefile.c. */
const char *
bfd_core_file_failing_command PARAMS ((bfd *abfd));
@ -3554,6 +3654,7 @@ bfd_core_file_failing_signal PARAMS ((bfd *abfd));
boolean
core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
/* Extracted from targets.c. */
#define BFD_SEND(bfd, message, arglist) \
((*((bfd)->xvec->message)) arglist)
@ -3829,11 +3930,14 @@ 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_merge_sections), \
CONCAT2 (NAME,_bfd_discard_group)
int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
bfd_byte *(*_bfd_get_relocated_section_contents)
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
@ -3846,9 +3950,15 @@ CONCAT2 (NAME,_bfd_merge_sections)
different information in this table. */
struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *));
/* Release the memory associated with the linker hash table. */
void (*_bfd_link_hash_table_free) PARAMS ((struct bfd_link_hash_table *));
/* Add symbols from this object file into the hash table. */
boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
/* Indicate that we are only retrieving symbol values from this section. */
void (*_bfd_link_just_syms) PARAMS ((asection *, struct bfd_link_info *));
/* Do a link based on the link_order structures attached to each
section of the BFD. */
boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
@ -3862,6 +3972,9 @@ CONCAT2 (NAME,_bfd_merge_sections)
/* Attempt to merge SEC_MERGE sections. */
boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
/* Discard members of a group. */
boolean (*_bfd_discard_group) PARAMS ((bfd *, struct sec *));
/* Routines to handle dynamic symbols and relocs. */
#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
@ -3900,6 +4013,7 @@ bfd_target_list PARAMS ((void));
const bfd_target *
bfd_search_for_target PARAMS ((int (* search_func) (const bfd_target *, void *), void *));
/* Extracted from format.c. */
boolean
bfd_check_format PARAMS ((bfd *abfd, bfd_format format));

View File

@ -7,7 +7,7 @@
LIB= binutils
SRCS+= arlex.l arparse.y arsup.c bucomm.c debug.c filemode.c \
ieee.c rdcoff.c rddbg.c rename.c stabs.c unwind-ia64.c \
wrstabs.c version.c
wrstabs.c version.c binemul.c budemang.c emul_vanilla.c
WARNS= 0
CFLAGS+= -DTARGET=\"${TARGET_ARCH}-unknown-freebsd\"
CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\"

View File

@ -1,5 +1,8 @@
/* $FreeBSD$ */
/* FreeBSD isn't any form of AIX. */
#define bin_dummy_emulation bin_vanilla_emulation
/* config.h. Generated automatically by configure. */
/* config.in. Generated automatically from configure.in by autoheader. */
@ -31,6 +34,9 @@
/* Define to `long' if <sys/types.h> doesn't define. */
/* #undef off_t */
/* Define if you need to in order for stat and other things to work. */
/* #undef _POSIX_SOURCE */
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
@ -97,6 +103,9 @@
/* Define if you have the strchr function. */
#define HAVE_STRCHR 1
/* Define if you have the strcoll function. */
#define HAVE_STRCOLL 1
/* Define if you have the utimes function. */
#define HAVE_UTIMES 1
@ -149,7 +158,7 @@
#define PACKAGE "binutils"
/* Version number of package */
/* #define VERSION "2.12" */
/* #define VERSION "2.13" */
/* Define if you have the stpcpy function */
/* #undef HAVE_STPCPY */
@ -203,5 +212,5 @@
/* #undef USE_BINARY_FOPEN */
/* Configured target name. */
/* #define TARGET "alpha-unknown-freebsd5.0" */
/* #define TARGET "alpha-obrien-freebsd5.0" */

View File

@ -8,6 +8,7 @@ PROG= nm
SRCS= nm.c
WARNS= 2
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
CFLAGS+= -I${SRCDIR}/bfd
CFLAGS+= -I${SRCDIR}/binutils
DPADD= ${RELTOP}/libbinutils/libbinutils.a
DPADD+= ${RELTOP}/libbfd/libbfd.a