Line 557... |
Line 557... |
/* Byte swapping routines which take size and endiannes as arguments. */
|
/* Byte swapping routines which take size and endiannes as arguments. */
|
|
|
bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
|
bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
|
void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
|
void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
|
|
|
extern bfd_boolean bfd_section_already_linked_table_init (void);
|
|
extern void bfd_section_already_linked_table_free (void);
|
|
|
|
/* Externally visible ECOFF routines. */
|
|
|
|
#if defined(__STDC__) || defined(ALMOST_STDC)
|
#if defined(__STDC__) || defined(ALMOST_STDC)
|
struct ecoff_debug_info;
|
struct ecoff_debug_info;
|
struct ecoff_debug_swap;
|
struct ecoff_debug_swap;
|
struct ecoff_extr;
|
struct ecoff_extr;
|
struct bfd_symbol;
|
struct bfd_symbol;
|
struct bfd_link_info;
|
struct bfd_link_info;
|
struct bfd_link_hash_entry;
|
struct bfd_link_hash_entry;
|
|
struct bfd_section_already_linked;
|
struct bfd_elf_version_tree;
|
struct bfd_elf_version_tree;
|
#endif
|
#endif
|
|
|
|
extern bfd_boolean bfd_section_already_linked_table_init (void);
|
|
extern void bfd_section_already_linked_table_free (void);
|
|
extern bfd_boolean _bfd_handle_already_linked
|
|
(struct bfd_section *, struct bfd_section_already_linked *,
|
|
struct bfd_link_info *);
|
|
|
|
/* Externally visible ECOFF routines. */
|
|
|
extern bfd_vma bfd_ecoff_get_gp_value
|
extern bfd_vma bfd_ecoff_get_gp_value
|
(bfd * abfd);
|
(bfd * abfd);
|
extern bfd_boolean bfd_ecoff_set_gp_value
|
extern bfd_boolean bfd_ecoff_set_gp_value
|
(bfd *abfd, bfd_vma gp_value);
|
(bfd *abfd, bfd_vma gp_value);
|
extern bfd_boolean bfd_ecoff_set_regmasks
|
extern bfd_boolean bfd_ecoff_set_regmasks
|
Line 874... |
Line 879... |
extern bfd_boolean bfd_elf32_arm_process_before_allocation
|
extern bfd_boolean bfd_elf32_arm_process_before_allocation
|
(bfd *, struct bfd_link_info *);
|
(bfd *, struct bfd_link_info *);
|
|
|
void bfd_elf32_arm_set_target_relocs
|
void bfd_elf32_arm_set_target_relocs
|
(bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix,
|
(bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix,
|
int, int, int, int);
|
int, int, int, int, int);
|
|
|
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
|
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
|
(bfd *, struct bfd_link_info *);
|
(bfd *, struct bfd_link_info *);
|
|
|
extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
|
extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
|
Line 1141... |
Line 1146... |
long bfd_get_mtime (bfd *abfd);
|
long bfd_get_mtime (bfd *abfd);
|
|
|
file_ptr bfd_get_size (bfd *abfd);
|
file_ptr bfd_get_size (bfd *abfd);
|
|
|
void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
|
void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
|
int prot, int flags, file_ptr offset);
|
int prot, int flags, file_ptr offset,
|
|
void **map_addr, bfd_size_type *map_len);
|
|
|
/* Extracted from bfdwin.c. */
|
/* Extracted from bfdwin.c. */
|
/* Extracted from section.c. */
|
/* Extracted from section.c. */
|
typedef struct bfd_section
|
typedef struct bfd_section
|
{
|
{
|
Line 1511... |
Line 1517... |
struct relent_chain *constructor_chain;
|
struct relent_chain *constructor_chain;
|
|
|
/* The BFD which owns the section. */
|
/* The BFD which owns the section. */
|
bfd *owner;
|
bfd *owner;
|
|
|
|
/* INPUT_SECTION_FLAGS if specified in the linker script. */
|
|
struct flag_info *section_flag_info;
|
|
|
/* A symbol which points at this section only. */
|
/* A symbol which points at this section only. */
|
struct bfd_symbol *symbol;
|
struct bfd_symbol *symbol;
|
struct bfd_symbol **symbol_ptr_ptr;
|
struct bfd_symbol **symbol_ptr_ptr;
|
|
|
/* Early in the link process, map_head and map_tail are used to build
|
/* Early in the link process, map_head and map_tail are used to build
|
Line 1689... |
Line 1698... |
0, NULL, 0, \
|
0, NULL, 0, \
|
\
|
\
|
/* target_index, used_by_bfd, constructor_chain, owner, */ \
|
/* target_index, used_by_bfd, constructor_chain, owner, */ \
|
0, NULL, NULL, NULL, \
|
0, NULL, NULL, NULL, \
|
\
|
\
|
|
/* flag_info, */ \
|
|
NULL, \
|
|
\
|
/* symbol, symbol_ptr_ptr, */ \
|
/* symbol, symbol_ptr_ptr, */ \
|
(struct bfd_symbol *) SYM, &SEC.symbol, \
|
(struct bfd_symbol *) SYM, &SEC.symbol, \
|
\
|
\
|
/* map_head, map_tail */ \
|
/* map_head, map_tail */ \
|
{ NULL }, { NULL } \
|
{ NULL }, { NULL } \
|
Line 1875... |
Line 1887... |
#define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */
|
#define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */
|
#define bfd_mach_mipsisa32 32
|
#define bfd_mach_mipsisa32 32
|
#define bfd_mach_mipsisa32r2 33
|
#define bfd_mach_mipsisa32r2 33
|
#define bfd_mach_mipsisa64 64
|
#define bfd_mach_mipsisa64 64
|
#define bfd_mach_mipsisa64r2 65
|
#define bfd_mach_mipsisa64r2 65
|
|
#define bfd_mach_mips_micromips 96
|
bfd_arch_i386, /* Intel 386 */
|
bfd_arch_i386, /* Intel 386 */
|
#define bfd_mach_i386_i386 1
|
#define bfd_mach_i386_intel_syntax (1 << 0)
|
#define bfd_mach_i386_i8086 2
|
#define bfd_mach_i386_i8086 (1 << 1)
|
#define bfd_mach_i386_i386_intel_syntax 3
|
#define bfd_mach_i386_i386 (1 << 2)
|
#define bfd_mach_x64_32 32
|
#define bfd_mach_x86_64 (1 << 3)
|
#define bfd_mach_x64_32_intel_syntax 33
|
#define bfd_mach_x64_32 (1 << 4)
|
#define bfd_mach_x86_64 64
|
#define bfd_mach_i386_i386_intel_syntax (bfd_mach_i386_i386 | bfd_mach_i386_intel_syntax)
|
#define bfd_mach_x86_64_intel_syntax 65
|
#define bfd_mach_x86_64_intel_syntax (bfd_mach_x86_64 | bfd_mach_i386_intel_syntax)
|
|
#define bfd_mach_x64_32_intel_syntax (bfd_mach_x64_32 | bfd_mach_i386_intel_syntax)
|
bfd_arch_l1om, /* Intel L1OM */
|
bfd_arch_l1om, /* Intel L1OM */
|
#define bfd_mach_l1om 66
|
#define bfd_mach_l1om (1 << 5)
|
#define bfd_mach_l1om_intel_syntax 67
|
#define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax)
|
|
bfd_arch_k1om, /* Intel K1OM */
|
|
#define bfd_mach_k1om (1 << 6)
|
|
#define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax)
|
bfd_arch_we32k, /* AT&T WE32xxx */
|
bfd_arch_we32k, /* AT&T WE32xxx */
|
bfd_arch_tahoe, /* CCI/Harris Tahoe */
|
bfd_arch_tahoe, /* CCI/Harris Tahoe */
|
bfd_arch_i860, /* Intel 860 */
|
bfd_arch_i860, /* Intel 860 */
|
bfd_arch_i370, /* IBM 360/370 Mainframes */
|
bfd_arch_i370, /* IBM 360/370 Mainframes */
|
bfd_arch_romp, /* IBM ROMP PC/RT */
|
bfd_arch_romp, /* IBM ROMP PC/RT */
|
Line 2716... |
Line 2733... |
BFD_RELOC_ALPHA_TPREL64,
|
BFD_RELOC_ALPHA_TPREL64,
|
BFD_RELOC_ALPHA_TPREL_HI16,
|
BFD_RELOC_ALPHA_TPREL_HI16,
|
BFD_RELOC_ALPHA_TPREL_LO16,
|
BFD_RELOC_ALPHA_TPREL_LO16,
|
BFD_RELOC_ALPHA_TPREL16,
|
BFD_RELOC_ALPHA_TPREL16,
|
|
|
/* Bits 27..2 of the relocation address shifted right 2 bits;
|
/* The MIPS jump instruction. */
|
simple reloc otherwise. */
|
|
BFD_RELOC_MIPS_JMP,
|
BFD_RELOC_MIPS_JMP,
|
|
BFD_RELOC_MICROMIPS_JMP,
|
|
|
/* The MIPS16 jump instruction. */
|
/* The MIPS16 jump instruction. */
|
BFD_RELOC_MIPS16_JMP,
|
BFD_RELOC_MIPS16_JMP,
|
|
|
/* MIPS16 GP relative reloc. */
|
/* MIPS16 GP relative reloc. */
|
Line 2766... |
Line 2783... |
/* MIPS16 low 16 bits. */
|
/* MIPS16 low 16 bits. */
|
BFD_RELOC_MIPS16_LO16,
|
BFD_RELOC_MIPS16_LO16,
|
|
|
/* Relocation against a MIPS literal section. */
|
/* Relocation against a MIPS literal section. */
|
BFD_RELOC_MIPS_LITERAL,
|
BFD_RELOC_MIPS_LITERAL,
|
|
BFD_RELOC_MICROMIPS_LITERAL,
|
|
|
|
/* microMIPS PC-relative relocations. */
|
|
BFD_RELOC_MICROMIPS_7_PCREL_S1,
|
|
BFD_RELOC_MICROMIPS_10_PCREL_S1,
|
|
BFD_RELOC_MICROMIPS_16_PCREL_S1,
|
|
|
|
/* microMIPS versions of generic BFD relocs. */
|
|
BFD_RELOC_MICROMIPS_GPREL16,
|
|
BFD_RELOC_MICROMIPS_HI16,
|
|
BFD_RELOC_MICROMIPS_HI16_S,
|
|
BFD_RELOC_MICROMIPS_LO16,
|
|
|
/* MIPS ELF relocations. */
|
/* MIPS ELF relocations. */
|
BFD_RELOC_MIPS_GOT16,
|
BFD_RELOC_MIPS_GOT16,
|
|
BFD_RELOC_MICROMIPS_GOT16,
|
BFD_RELOC_MIPS_CALL16,
|
BFD_RELOC_MIPS_CALL16,
|
|
BFD_RELOC_MICROMIPS_CALL16,
|
BFD_RELOC_MIPS_GOT_HI16,
|
BFD_RELOC_MIPS_GOT_HI16,
|
|
BFD_RELOC_MICROMIPS_GOT_HI16,
|
BFD_RELOC_MIPS_GOT_LO16,
|
BFD_RELOC_MIPS_GOT_LO16,
|
|
BFD_RELOC_MICROMIPS_GOT_LO16,
|
BFD_RELOC_MIPS_CALL_HI16,
|
BFD_RELOC_MIPS_CALL_HI16,
|
|
BFD_RELOC_MICROMIPS_CALL_HI16,
|
BFD_RELOC_MIPS_CALL_LO16,
|
BFD_RELOC_MIPS_CALL_LO16,
|
|
BFD_RELOC_MICROMIPS_CALL_LO16,
|
BFD_RELOC_MIPS_SUB,
|
BFD_RELOC_MIPS_SUB,
|
|
BFD_RELOC_MICROMIPS_SUB,
|
BFD_RELOC_MIPS_GOT_PAGE,
|
BFD_RELOC_MIPS_GOT_PAGE,
|
|
BFD_RELOC_MICROMIPS_GOT_PAGE,
|
BFD_RELOC_MIPS_GOT_OFST,
|
BFD_RELOC_MIPS_GOT_OFST,
|
|
BFD_RELOC_MICROMIPS_GOT_OFST,
|
BFD_RELOC_MIPS_GOT_DISP,
|
BFD_RELOC_MIPS_GOT_DISP,
|
|
BFD_RELOC_MICROMIPS_GOT_DISP,
|
BFD_RELOC_MIPS_SHIFT5,
|
BFD_RELOC_MIPS_SHIFT5,
|
BFD_RELOC_MIPS_SHIFT6,
|
BFD_RELOC_MIPS_SHIFT6,
|
BFD_RELOC_MIPS_INSERT_A,
|
BFD_RELOC_MIPS_INSERT_A,
|
BFD_RELOC_MIPS_INSERT_B,
|
BFD_RELOC_MIPS_INSERT_B,
|
BFD_RELOC_MIPS_DELETE,
|
BFD_RELOC_MIPS_DELETE,
|
BFD_RELOC_MIPS_HIGHEST,
|
BFD_RELOC_MIPS_HIGHEST,
|
|
BFD_RELOC_MICROMIPS_HIGHEST,
|
BFD_RELOC_MIPS_HIGHER,
|
BFD_RELOC_MIPS_HIGHER,
|
|
BFD_RELOC_MICROMIPS_HIGHER,
|
BFD_RELOC_MIPS_SCN_DISP,
|
BFD_RELOC_MIPS_SCN_DISP,
|
|
BFD_RELOC_MICROMIPS_SCN_DISP,
|
BFD_RELOC_MIPS_REL16,
|
BFD_RELOC_MIPS_REL16,
|
BFD_RELOC_MIPS_RELGOT,
|
BFD_RELOC_MIPS_RELGOT,
|
BFD_RELOC_MIPS_JALR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|
|
|
/* MIPS ELF relocations (VxWorks and PLT extensions). */
|
/* MIPS ELF relocations (VxWorks and PLT extensions). */
|
BFD_RELOC_MIPS_COPY,
|
BFD_RELOC_MIPS_COPY,
|
BFD_RELOC_MIPS_JUMP_SLOT,
|
BFD_RELOC_MIPS_JUMP_SLOT,
|
Line 5596... |
Line 5646... |
BFD_SEND (abfd, _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) \
|
#define bfd_gc_sections(abfd, link_info) \
|
BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
|
BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
|
|
|
|
#define bfd_lookup_section_flags(link_info, flag_info) \
|
|
BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info))
|
|
|
#define bfd_merge_sections(abfd, link_info) \
|
#define bfd_merge_sections(abfd, link_info) \
|
BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
|
BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
|
|
|
#define bfd_is_group_section(abfd, sec) \
|
#define bfd_is_group_section(abfd, sec) \
|
BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
|
BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
|
Line 5752... |
Line 5805... |
enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
|
enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
|
|
|
/* Forward declaration. */
|
/* Forward declaration. */
|
typedef struct bfd_link_info _bfd_link_info;
|
typedef struct bfd_link_info _bfd_link_info;
|
|
|
|
/* Forward declaration. */
|
|
typedef struct flag_info flag_info;
|
|
|
typedef struct bfd_target
|
typedef struct bfd_target
|
{
|
{
|
/* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */
|
/* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */
|
char *name;
|
char *name;
|
|
|
Line 6021... |
Line 6077... |
NAME##_bfd_link_just_syms, \
|
NAME##_bfd_link_just_syms, \
|
NAME##_bfd_copy_link_hash_symbol_type, \
|
NAME##_bfd_copy_link_hash_symbol_type, \
|
NAME##_bfd_final_link, \
|
NAME##_bfd_final_link, \
|
NAME##_bfd_link_split_section, \
|
NAME##_bfd_link_split_section, \
|
NAME##_bfd_gc_sections, \
|
NAME##_bfd_gc_sections, \
|
|
NAME##_bfd_lookup_section_flags, \
|
NAME##_bfd_merge_sections, \
|
NAME##_bfd_merge_sections, \
|
NAME##_bfd_is_group_section, \
|
NAME##_bfd_is_group_section, \
|
NAME##_bfd_discard_group, \
|
NAME##_bfd_discard_group, \
|
NAME##_section_already_linked, \
|
NAME##_section_already_linked, \
|
NAME##_bfd_define_common_symbol
|
NAME##_bfd_define_common_symbol
|
Line 6065... |
Line 6122... |
bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
|
bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
|
|
|
/* Remove sections that are not referenced from the output. */
|
/* Remove sections that are not referenced from the output. */
|
bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
|
bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
|
|
|
|
/* Sets the bitmask of allowed and disallowed section flags. */
|
|
void (*_bfd_lookup_section_flags) (struct bfd_link_info *,
|
|
struct flag_info *);
|
|
|
/* Attempt to merge SEC_MERGE sections. */
|
/* Attempt to merge SEC_MERGE sections. */
|
bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
|
bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
|
|
|
/* Is this section a member of a group? */
|
/* Is this section a member of a group? */
|
bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
|
bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
|
Line 6076... |
Line 6137... |
/* Discard members of a group. */
|
/* Discard members of a group. */
|
bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
|
bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
|
|
|
/* Check if SEC has been already linked during a reloceatable or
|
/* Check if SEC has been already linked during a reloceatable or
|
final link. */
|
final link. */
|
void (*_section_already_linked) (bfd *, struct bfd_section *,
|
bfd_boolean (*_section_already_linked) (bfd *, asection *,
|
struct bfd_link_info *);
|
struct bfd_link_info *);
|
|
|
/* Define a common symbol. */
|
/* Define a common symbol. */
|
bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *,
|
bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *,
|
struct bfd_link_hash_entry *);
|
struct bfd_link_hash_entry *);
|
Line 6146... |
Line 6207... |
bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
|
bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
|
|
|
#define bfd_link_split_section(abfd, sec) \
|
#define bfd_link_split_section(abfd, sec) \
|
BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
|
BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
|
|
|
void bfd_section_already_linked (bfd *abfd, asection *sec,
|
bfd_boolean bfd_section_already_linked (bfd *abfd,
|
|
asection *sec,
|
struct bfd_link_info *info);
|
struct bfd_link_info *info);
|
|
|
#define bfd_section_already_linked(abfd, sec, info) \
|
#define bfd_section_already_linked(abfd, sec, info) \
|
BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
|
BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
|
|
|