From: Emmanuel Fleury <fleury@labri.fr>
To: binutils@sourceware.org
Subject: Re: [opcodes] bfd_flavour
Date: Wed, 08 Jun 2011 15:55:00 -0000 [thread overview]
Message-ID: <4DEF9B54.8050305@labri.fr> (raw)
In-Reply-To: <20110608142952.GE4172@bubble.grove.modra.org>
Hi,
On 06/08/2011 04:29 PM, Alan Modra wrote:
> 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)?
No, the flavour was more about the CPU sub-architecture and not about
the format of the binary. But, I think I got confused with some other
structure... Sorry for that, I need to take a second look at it.
> If not, you don't need to worry.
Excellent. Thanks a lot.
>> (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)
Ok.
Regards
--
Emmanuel Fleury
Before software should be reusable, it should be usable.
-- Ralph Johnson
prev parent reply other threads:[~2011-06-08 15:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-06 21:19 Emmanuel Fleury
2011-06-08 14:34 ` Alan Modra
2011-06-08 15:55 ` Emmanuel Fleury [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DEF9B54.8050305@labri.fr \
--to=fleury@labri.fr \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).