/* Main header file for the bfd library -- portable access to object files.
==> The bfd.h file is generated from bfd-in.h and various .c files; if you
==> change it, your changes will probably be lost.
- Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
#include "ansidecl.h"
#include "obstack.h"
-#define BFD_VERSION "2.0"
+#define BFD_VERSION "2.1"
/* forward declaration */
typedef struct _bfd bfd;
#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 = (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)
CAT(NAME,_bfd_debug_info_accumulate),\
CAT(NAME,_bfd_get_relocated_section_contents),\
CAT(NAME,_bfd_relax_section),\
-CAT(NAME,_bfd_seclet_link)
+CAT(NAME,_bfd_seclet_link),\
+CAT(NAME,_bfd_reloc_type_lookup),\
+CAT(NAME,_bfd_make_debug_symbol)
#define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table
/* The section is a constuctor, and should be placed at the
end of the . */
-
#define SEC_CONSTRUCTOR_TEXT 0x1100
#define SEC_CONSTRUCTOR_DATA 0x2100
#define SEC_CONSTRUCTOR_BSS 0x3100
-
- /* The section has contents - a bss section could be
+ /* The section has contents - a data section could be
<<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>, a debug section could be
<<SEC_HAS_CONTENTS>> */
#define SEC_SHARED_LIBRARY 0x800
+ /* The section is a common section (symbols may be defined
+ multiple times, the value of a symbol is the amount of
+ space it requires, and the largest symbol value is the one
+ used). Most targets have exactly one of these (.bss), but
+ ECOFF has two. */
+
+#define SEC_IS_COMMON 0x8000
bfd_vma vma;
boolean user_set_vma;
#define BFD_ABS_SECTION_NAME "*ABS*"
#define BFD_UND_SECTION_NAME "*UND*"
#define BFD_COM_SECTION_NAME "*COM*"
+#define BFD_IND_SECTION_NAME "*IND*"
/* the absolute section */
extern asection bfd_abs_section;
extern asection bfd_und_section;
/* Pointer to the common section */
extern asection bfd_com_section;
+ /* Pointer to the indirect section */
+ extern asection bfd_ind_section;
extern struct symbol_cache_entry *bfd_abs_symbol;
extern struct symbol_cache_entry *bfd_com_symbol;
extern struct symbol_cache_entry *bfd_und_symbol;
+ extern struct symbol_cache_entry *bfd_ind_symbol;
#define bfd_get_section_size_before_reloc(section) \
(section->reloc_done ? (abort(),1): (section)->_raw_size)
#define bfd_get_section_size_after_reloc(section) \
bfd_arch_z8k, /* Zilog Z8000 */
#define bfd_mach_z8001 1
#define bfd_mach_z8002 2
+ bfd_arch_h8500, /* Hitachi H8/500 */
bfd_arch_last
};
unsigned int rightshift;
/* The size of the item to be relocated - 0, is one byte, 1 is 2
- bytes, 3 is four bytes. A negative value indicates that the
+ bytes, 2 is four bytes. A negative value indicates that the
result is to be subtracted from the data. */
int size;
#define HOWTO_PREPARE(relocation, symbol) \
{ \
if (symbol != (asymbol *)NULL) { \
- if (symbol->section == &bfd_com_section) { \
+ if (bfd_is_com_section (symbol->section)) { \
relocation = 0; \
} \
else { \
/* this one is a.out specific? */
BFD_RELOC_SPARC_BASE22,
+ /* Bits 27..2 of the relocation address shifted right 2 bits;
+ simple reloc otherwise. */
+ BFD_RELOC_MIPS_JMP,
+
+ /* signed 16-bit pc-relative, shifted right 2 bits (e.g. for MIPS) */
+ BFD_RELOC_16_PCREL_S2,
+
+ /* High 16 bits of 32-bit value; simple reloc. */
+ BFD_RELOC_HI16,
+ /* High 16 bits of 32-bit value but the low 16 bits will be sign
+ extended and added to form the final result. If the low 16
+ bits form a negative number, we need to add one to the high value
+ to compensate for the borrow when the low bits are added. */
+ BFD_RELOC_HI16_S,
+ /* Low 16 bits. */
+ BFD_RELOC_LO16,
+
/* this must be the highest numeric value */
BFD_RELOC_UNUSED
} bfd_reloc_code_real_type;