This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: why does -mcfv4e work for gas but not objdump?
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Peter Barada <peter at the-baradas dot com>
- Cc: binutils at sources dot redhat dot com
- Date: 21 Apr 2004 13:13:52 -0400
- Subject: Re: why does -mcfv4e work for gas but not objdump?
- References: <20040421164823.77F1798C8A@baradas.org>
Peter Barada <peter@the-baradas.com> writes:
> I'm having trouble tryng to figure out why -mcfv4e works for gas, but
> I have to specify -mm68k:mcfv4e for objdump to select the ColdFire v4e
> version of the m68k tools.
The gas -mcfv4e option works out of the archs array in
gas/config/tc-m68k.c. The objdump -mm68k:mcfv4e option works off the
list found in bfd/cpu-m68k.c. So there is no special reason to expect
the options to be the same, except whatever effort we make to retain
consistency.
> In bfd/cpu-m68k.c I've added:
>
> N(bfd_mach_mcfv4e, "m68k:cfv4e", FALSE, 0),
>
> and am wondering if I add the following to get objdump to parse -m5407
> is the correct way to solve this:
>
> N(bfd_mach_mcfv4e, "cfv4e", FALSE, 0),
That would let objdump accept -mcfv4e, yes, though not -m5407.
See bfd_default_scan in bfd/archures.c for how the objdump -m option
is handled.
The other thing you can do is write an m68k specific scan routine, and
use it in cpu-m68k.c. That would let you strip some of the special
cases out of bfd_default_scan.
Ian