This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [opcodes] bfd_flavour


On Mon, Jun 06, 2011 at 11:23:59PM +0200, Emmanuel Fleury wrote:
> My question is: What bad can happen if I omit to set the flavour of the
> binary that I'm disassembling when using the disassembler_fn of
> libopcodes ?

Is your target one of those that show up below (on the info->flavour
matches, not the bfd_asymbol_flavour matches)?  If not, you don't
need to worry.

> (and, subsequently, what is used the bfd_flavour for in
> libopcodes ?)

$ grep flavour *.[ch]
alpha-dis.c:  if (info->flavour == bfd_target_evax_flavour)
arm-dis.c:      && bfd_asymbol_flavour (*info->symtab) == bfd_target_elf_flavour)
arm-dis.c:      if (bfd_asymbol_flavour (*info->symbols) == bfd_target_coff_flavour)
arm-dis.c:      else if (bfd_asymbol_flavour (*info->symbols) == bfd_target_elf_flavour
arm-dis.c:  if (info->flavour == bfd_target_elf_flavour
dis-init.c:  info->flavour = bfd_target_unknown_flavour;
mips-dis.c:  if (info->flavour == bfd_target_elf_flavour && info->section != NULL)
mips-dis.c:	  if (info->flavour == bfd_target_unknown_flavour
mips-dis.c:		&& info->flavour == bfd_target_unknown_flavour)
mips-dis.c:	if (!jalx && info->flavour == bfd_target_unknown_flavour)
mips-dis.c:	  && bfd_asymbol_flavour (*info->symbols) == bfd_target_elf_flavour
sh64-dis.c:	  && bfd_asymbol_flavour (info->symbols[0]) == bfd_target_elf_flavour
sh64-dis.c:      && bfd_get_flavour (info->section->owner) == bfd_target_elf_flavour)
sh64-dis.c:      && bfd_asymbol_flavour (info->symbols[0]) == bfd_target_elf_flavour
sh64-dis.c:      && bfd_asymbol_flavour (info->symbols[0]) == bfd_target_elf_flavour
sh-dis.c:	  && bfd_asymbol_flavour(*info->symbols) == bfd_target_coff_flavour)


-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]