.#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_boolean code);
.
. const struct bfd_arch_info *next;
+.
+. {* On some architectures the offset for a relocation can point into
+. the middle of an instruction. This field specifies the maximum
+. offset such a relocation can have (in octets). This affects the
+. behaviour of the disassembler, since a value greater than zero
+. means that it may need to disassemble an instruction twice, once
+. to get its length and then a second time to display it. If the
+. value is negative then this has to be done for every single
+. instruction, regardless of the offset of the reloc. *}
+. signed int max_reloc_offset_into_insn;
.}
.bfd_arch_info_type;
.
extern const bfd_arch_info_type bfd_avr_arch;
extern const bfd_arch_info_type bfd_bfin_arch;
extern const bfd_arch_info_type bfd_cr16_arch;
-extern const bfd_arch_info_type bfd_cr16c_arch;
extern const bfd_arch_info_type bfd_cris_arch;
extern const bfd_arch_info_type bfd_crx_arch;
extern const bfd_arch_info_type bfd_csky_arch;
&bfd_avr_arch,
&bfd_bfin_arch,
&bfd_cr16_arch,
- &bfd_cr16c_arch,
&bfd_cris_arch,
&bfd_crx_arch,
&bfd_csky_arch,
.extern const bfd_arch_info_type bfd_default_arch_struct;
*/
-const bfd_arch_info_type bfd_default_arch_struct = {
+const bfd_arch_info_type bfd_default_arch_struct =
+{
32, 32, 8, bfd_arch_unknown, 0, "unknown", "unknown", 2, TRUE,
bfd_default_compatible,
bfd_default_scan,
bfd_arch_default_fill,
- 0,
+ 0, 0
};
/*
bfd_get_arch
SYNOPSIS
- enum bfd_architecture bfd_get_arch (bfd *abfd);
+ enum bfd_architecture bfd_get_arch (const bfd *abfd);
DESCRIPTION
Return the enumerated type which describes the BFD @var{abfd}'s
*/
enum bfd_architecture
-bfd_get_arch (bfd *abfd)
+bfd_get_arch (const bfd *abfd)
{
return abfd->arch_info->arch;
}
bfd_get_mach
SYNOPSIS
- unsigned long bfd_get_mach (bfd *abfd);
+ unsigned long bfd_get_mach (const bfd *abfd);
DESCRIPTION
Return the long type which describes the BFD @var{abfd}'s
*/
unsigned long
-bfd_get_mach (bfd *abfd)
+bfd_get_mach (const bfd *abfd)
{
return abfd->arch_info->mach;
}
bfd_arch_bits_per_byte
SYNOPSIS
- unsigned int bfd_arch_bits_per_byte (bfd *abfd);
+ unsigned int bfd_arch_bits_per_byte (const bfd *abfd);
DESCRIPTION
Return the number of bits in one of the BFD @var{abfd}'s
*/
unsigned int
-bfd_arch_bits_per_byte (bfd *abfd)
+bfd_arch_bits_per_byte (const bfd *abfd)
{
return abfd->arch_info->bits_per_byte;
}
bfd_arch_bits_per_address
SYNOPSIS
- unsigned int bfd_arch_bits_per_address (bfd *abfd);
+ unsigned int bfd_arch_bits_per_address (const bfd *abfd);
DESCRIPTION
Return the number of bits in one of the BFD @var{abfd}'s
*/
unsigned int
-bfd_arch_bits_per_address (bfd *abfd)
+bfd_arch_bits_per_address (const bfd *abfd)
{
return abfd->arch_info->bits_per_address;
}
bfd_octets_per_byte
SYNOPSIS
- unsigned int bfd_octets_per_byte (bfd *abfd);
+ unsigned int bfd_octets_per_byte (const bfd *abfd,
+ const asection *sec);
DESCRIPTION
Return the number of octets (8-bit quantities) per target byte
*/
unsigned int
-bfd_octets_per_byte (bfd *abfd)
+bfd_octets_per_byte (const bfd *abfd, const asection *sec)
{
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
+ && sec != NULL
+ && (sec->flags & SEC_ELF_OCTETS) != 0)
+ return 1;
+
return bfd_arch_mach_octets_per_byte (bfd_get_arch (abfd),
bfd_get_mach (abfd));
}