This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [opcodes] bfd_flavour
- From: Alan Modra <amodra at gmail dot com>
- To: Emmanuel Fleury <fleury at labri dot fr>
- Cc: binutils at sourceware dot org
- Date: Wed, 8 Jun 2011 23:59:52 +0930
- Subject: Re: [opcodes] bfd_flavour
- References: <4DED456F.2000408@labri.fr>
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