#endif
#include "ansidecl.h"
-#include "obstack.h"
/* These two lines get substitutions done by commands in Makefile.in. */
#define BFD_VERSION "@VERSION@"
#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)
struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *,
struct bfd_hash_table *,
const char *));
- /* An obstack for this hash table. */
- struct obstack memory;
+ /* An objalloc for this hash table. This is a struct objalloc *,
+ but we use PTR to avoid requiring the inclusion of objalloc.h. */
+ PTR memory;
};
/* Initialize a hash table. */
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean bfd_m68klinux_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean bfd_sparclinux_size_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
/* mmap hacks */
bfd_fdopenr PARAMS ((CONST char *filename, CONST char *target, int fd));
bfd *
-bfd_openstreamr PARAMS (());
+bfd_openstreamr PARAMS ((const char *, const char *, PTR));
bfd *
bfd_openw PARAMS ((CONST char *filename, CONST char *target));
boolean
bfd_close_all_done PARAMS ((bfd *));
-bfd_size_type
-bfd_alloc_size PARAMS ((bfd *abfd));
-
bfd *
bfd_create PARAMS ((CONST char *filename, bfd *templ));
#define bfd_mach_z8002 2
bfd_arch_h8500, /* Hitachi H8/500 */
bfd_arch_sh, /* Hitachi SH */
+#define bfd_mach_sh 0
+#define bfd_mach_sh3 0x30
+#define bfd_mach_sh3e 0x3e
+ /* start-sanitize-sh4 */
+#define bfd_mach_sh4 0x40
+ /* end-sanitize-sh4 */
bfd_arch_alpha, /* Dec Alpha */
bfd_arch_arm, /* Advanced Risc Machines 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
bfd_arch_ns32k, /* National Semiconductors ns32000 */
bfd_arch_w65, /* WDC 65816 */
/* start-sanitize-tic80 */
/* end-sanitize-tic80 */
/* start-sanitize-v850 */
bfd_arch_v850, /* NEC V850 */
+#define bfd_mach_v850 0
+ /* start-sanitize-v850e */
+#define bfd_mach_v850e 'E'
+ /* end-sanitize-v850e */
+ /* start-sanitize-v850eq */
+#define bfd_mach_v850eq 'Q'
+ /* end-sanitize-v850eq */
/* end-sanitize-v850 */
- /* start-sanitize-arc */
bfd_arch_arc, /* Argonaut RISC Core */
#define bfd_mach_arc_base 0
-#define bfd_mach_arc_host 1
-#define bfd_mach_arc_graphics 2
-#define bfd_mach_arc_audio 3
- /* end-sanitize-arc */
- /* start-sanitize-m32r */
- bfd_arch_m32r, /* Mitsubishi M32R */
- /* end-sanitize-m32r */
+ bfd_arch_m32r, /* Mitsubishi M32R/D */
bfd_arch_mn10200, /* Matsushita MN10200 */
bfd_arch_mn10300, /* Matsushita MN10300 */
bfd_arch_last
BFD_RELOC_SH_CODE,
BFD_RELOC_SH_DATA,
BFD_RELOC_SH_LABEL,
-/* start-sanitize-arc */
+
+/* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
+be zero and is not stored in the instruction. */
+ BFD_RELOC_THUMB_PCREL_BRANCH9,
+ BFD_RELOC_THUMB_PCREL_BRANCH12,
+ BFD_RELOC_THUMB_PCREL_BRANCH23,
/* Argonaut RISC Core (ARC) relocs.
ARC 22 bit pc-relative branch. The lowest two bits must be zero and are
stored in the instruction. The high 24 bits are installed in bits 23
through 0. */
BFD_RELOC_ARC_B26,
-/* end-sanitize-arc */
-
/* Mitsubishi D10V relocs.
This is a 10-bit reloc with the right 2 bits
BFD_RELOC_D30V_32_PCREL,
/* end-sanitize-d30v */
-/* start-sanitize-m32r */
/* Mitsubishi M32R relocs.
This is a 24 bit absolute address. */
/* This is a 16-bit reloc containing the small data area offset for use in
add3, load, and store instructions. */
BFD_RELOC_M32R_SDA16,
-/* end-sanitize-m32r */
-
/* start-sanitize-v850 */
/* This is a 9-bit reloc */
BFD_RELOC_V850_9_PCREL,
+/* This is a 16-bit reloc */
+ BFD_RELOC_V850_16_PCREL,
+
/* This is a 22-bit reloc */
BFD_RELOC_V850_22_PCREL,
-/* This is an offset from the short data area pointer.. */
- BFD_RELOC_V850_SDA_OFFSET,
-
-/* This is an offset from the zero data area pointer.. */
- BFD_RELOC_V850_ZDA_OFFSET,
-
-/* This is an offset from the tiny data area pointer.. */
- BFD_RELOC_V850_TDA_OFFSET,
+ BFD_RELOC_V850_SDA_16_16_OFFSET, /* A 16 bit reloc in the small data area. */
+ BFD_RELOC_V850_SDA_15_16_OFFSET, /* A 16 bit reloc (of which only 15 bits are used) in the small data area. */
+ BFD_RELOC_V850_ZDA_16_16_OFFSET, /* A 16 bit reloc in the zero data area. */
+ BFD_RELOC_V850_ZDA_15_16_OFFSET, /* A 16 bit reloc (of which only 15 bits are used) in the zero data area. */
+ BFD_RELOC_V850_TDA_6_8_OFFSET, /* An 8 bit reloc (of which only 6 bits are used) in the tiny data area. */
+ BFD_RELOC_V850_TDA_7_8_OFFSET, /* An 8 bit reloc (of which only 7 bits are used) in the tiny data area. */
+ BFD_RELOC_V850_TDA_7_7_OFFSET, /* A 7 bit reloc in the tiny data area. */
+/* start-sanitize-v850e */
+ BFD_RELOC_V850_TDA_4_5_OFFSET, /* A 5 bit reloc (of which only 4 bits are used) in the tiny data area. */
+ BFD_RELOC_V850_TDA_4_4_OFFSET, /* A 4 bit reloc in the tiny data area. */
+ BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET, /* A 16 bit reloc (but the bits are not contiguous) in the small data area. */
+ BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET, /* A 16 bit reloc (but the bits are not contiguous) in the zero data area. */
+/* end-santize-v850e */
/* end-sanitize-v850 */
/* Used by the application to hold private data*/
PTR usrdata;
- /* Where all the allocated stuff under this BFD goes */
- struct obstack memory;
+ /* Where all the allocated stuff under this BFD goes. This is a
+ struct objalloc *, but we use PTR to avoid requiring the inclusion of
+ objalloc.h. */
+ PTR memory;
};
typedef enum bfd_error
PTR backend_data;
} bfd_target;
+boolean
+bfd_set_default_target PARAMS ((const char *name));
+
const bfd_target *
bfd_find_target PARAMS ((CONST char *target_name, bfd *abfd));