/* Main header file for the bfd library -- portable access to object files.
- Copyright (C) 1990-2019 Free Software Foundation, Inc.
+ Copyright (C) 1990-2020 Free Software Foundation, Inc.
Contributed by Cygnus Support.
#define bfd_put_signed_8 \
bfd_put_8
#define bfd_get_8(abfd, ptr) \
- (*(const unsigned char *) (ptr) & 0xff)
+ ((bfd_vma) *(const unsigned char *) (ptr) & 0xff)
#define bfd_get_signed_8(abfd, ptr) \
- (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
+ ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
#define bfd_put_16(abfd, val, ptr) \
BFD_SEND (abfd, bfd_putx16, ((val),(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) == 8 ? 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) \
/* This section contains vliw code. This is for Toshiba MeP only. */
#define SEC_MEP_VLIW 0x20000000
+ /* All symbols, sizes and relocations in this section are octets
+ instead of bytes. Required for DWARF debug sections as DWARF
+ information is organized in octets, not bytes. */
+#define SEC_ELF_OCTETS 0x40000000
+
/* Indicate that section has the no read flag set. This happens
when memory read flag isn't set. */
#define SEC_COFF_NOREAD 0x40000000
#define bfd_mach_tic4x 40
bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */
bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */
- bfd_arch_tic80, /* TI TMS320c80 (MVP). */
bfd_arch_v850, /* NEC V850. */
bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */
#define bfd_mach_v850 1
#define bfd_mach_bfin 1
bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */
#define bfd_mach_cr16 1
- bfd_arch_cr16c, /* National Semiconductor CompactRISC. */
-#define bfd_mach_cr16c 1
bfd_arch_crx, /* National Semiconductor CRX. */
#define bfd_mach_crx 1
bfd_arch_cris, /* Axis CRIS. */
bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
#define bfd_mach_xtensa 1
bfd_arch_z80,
-#define bfd_mach_z80strict 1 /* No undocumented opcodes. */
-#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */
-#define bfd_mach_z80full 7 /* All undocumented instructions. */
+#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */
+#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */
+#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */
+#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */
+#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */
+#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */
+#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */
#define bfd_mach_r800 11 /* R800: successor with multiplication. */
bfd_arch_lm32, /* Lattice Mico32. */
#define bfd_mach_lm32 1
const char *bfd_printable_arch_mach
(enum bfd_architecture arch, unsigned long machine);
-unsigned int bfd_octets_per_byte (const bfd *abfd);
+unsigned int bfd_octets_per_byte (const bfd *abfd,
+ const asection *sec);
unsigned int bfd_arch_mach_octets_per_byte
(enum bfd_architecture arch, unsigned long machine);
then it may be truncated to 8 bits. */
BFD_RELOC_S12Z_15_PCREL,
-/* NS CR16C Relocations. */
- BFD_RELOC_16C_NUM08,
- BFD_RELOC_16C_NUM08_C,
- BFD_RELOC_16C_NUM16,
- BFD_RELOC_16C_NUM16_C,
- BFD_RELOC_16C_NUM32,
- BFD_RELOC_16C_NUM32_C,
- BFD_RELOC_16C_DISP04,
- BFD_RELOC_16C_DISP04_C,
- BFD_RELOC_16C_DISP08,
- BFD_RELOC_16C_DISP08_C,
- BFD_RELOC_16C_DISP16,
- BFD_RELOC_16C_DISP16_C,
- BFD_RELOC_16C_DISP24,
- BFD_RELOC_16C_DISP24_C,
- BFD_RELOC_16C_DISP24a,
- BFD_RELOC_16C_DISP24a_C,
- BFD_RELOC_16C_REG04,
- BFD_RELOC_16C_REG04_C,
- BFD_RELOC_16C_REG04a,
- BFD_RELOC_16C_REG04a_C,
- BFD_RELOC_16C_REG14,
- BFD_RELOC_16C_REG14_C,
- BFD_RELOC_16C_REG16,
- BFD_RELOC_16C_REG16_C,
- BFD_RELOC_16C_REG20,
- BFD_RELOC_16C_REG20_C,
- BFD_RELOC_16C_ABS20,
- BFD_RELOC_16C_ABS20_C,
- BFD_RELOC_16C_ABS24,
- BFD_RELOC_16C_ABS24_C,
- BFD_RELOC_16C_IMM04,
- BFD_RELOC_16C_IMM04_C,
- BFD_RELOC_16C_IMM16,
- BFD_RELOC_16C_IMM16_C,
- BFD_RELOC_16C_IMM20,
- BFD_RELOC_16C_IMM20_C,
- BFD_RELOC_16C_IMM24,
- BFD_RELOC_16C_IMM24_C,
- BFD_RELOC_16C_IMM32,
- BFD_RELOC_16C_IMM32_C,
-
/* NS CR16 Relocations. */
BFD_RELOC_CR16_NUM8,
BFD_RELOC_CR16_NUM16,
/* 8 bit signed offset in (ix+d) or (iy+d). */
BFD_RELOC_Z80_DISP8,
+/* First 8 bits of multibyte (32, 24 or 16 bit) value. */
+ BFD_RELOC_Z80_BYTE0,
+
+/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */
+ BFD_RELOC_Z80_BYTE1,
+
+/* Third 8 bits of multibyte (32 or 24 bit) value. */
+ BFD_RELOC_Z80_BYTE2,
+
+/* Fourth 8 bits of multibyte (32 bit) value. */
+ BFD_RELOC_Z80_BYTE3,
+
+/* Lowest 16 bits of multibyte (32 or 24 bit) value. */
+ BFD_RELOC_Z80_WORD0,
+
+/* Highest 16 bits of multibyte (32 or 24 bit) value. */
+ BFD_RELOC_Z80_WORD1,
+
/* DJNZ offset. */
BFD_RELOC_Z8K_DISP7,
ENUM_BITFIELD (bfd_direction) direction : 2;
/* Format_specific flags. */
- flagword flags : 20;
+ flagword flags;
/* Values that may appear in the flags field of a BFD. These also
appear in the object_flags field of the bfd_target structure, where
/* Use the ELF STT_COMMON type in this BFD. */
#define BFD_USE_ELF_STT_COMMON 0x80000
+ /* Put pathnames into archives (non-POSIX). */
+#define BFD_ARCHIVE_FULL_PATH 0x100000
+
/* Flags bits to be saved in bfd_preserve_save. */
#define BFD_FLAGS_SAVED \
(BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
static inline bfd_size_type
bfd_get_section_limit (const bfd *abfd, const asection *sec)
{
- return bfd_get_section_limit_octets (abfd, sec) / bfd_octets_per_byte (abfd);
+ return (bfd_get_section_limit_octets (abfd, sec)
+ / bfd_octets_per_byte (abfd, sec));
}
/* Functions to handle insertion and deletion of a bfd's sections. These
bfd_error_bad_value,
bfd_error_file_truncated,
bfd_error_file_too_big,
+ bfd_error_sorry,
bfd_error_on_input,
bfd_error_invalid_error_code
}