/* Disassembler code for Renesas RL78.
- Copyright (C) 2011-2021 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
Contributed by Red Hat.
Written by DJ Delorie.
#endif
struct private priv;
- dis->private_data = (PTR) &priv;
+ dis->private_data = &priv;
rl78_data.pc = addr;
rl78_data.dis = dis;
{
int cpu = E_FLAG_RL78_ANY_CPU;
- if (abfd != NULL)
+ if (abfd != NULL && bfd_get_flavour (abfd) == bfd_target_elf_flavour)
cpu = abfd->tdata.elf_obj_data->elf_header->e_flags & E_FLAG_RL78_CPU_MASK;
switch (cpu)