.#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. *}
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,
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));
}