This is the mail archive of the
mailing list for the binutils project.
Re: objdump of binary for micromips.
- From: "Maciej W. Rozycki" <macro at imgtec dot com>
- To: Kenneth Johansson <kenneth dot johansson at inteno dot se>
- Cc: <binutils at sourceware dot org>
- Date: Wed, 11 Jan 2017 18:55:50 +0000
- Subject: Re: objdump of binary for micromips.
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com> <20161223175720.GL9608@vapier.lan> <firstname.lastname@example.org>
On Tue, 27 Dec 2016, Kenneth Johansson wrote:
> > you specified the arch as mips, so you'll get mips32. if you run
> > `objdump -h`, you'll see a huge list of other arch values. you
> > probably want to use something like "mips:micromips".
> > -mike
> tanks I did not understand the syntax but it did still not work out. the
> lauterbach trace32 debug understands the code but objdump gets confused.
The `-M mips:micromips' option is only really there for binaries with no
symbol information available, so that you can manually choose the correct
disassembly mode, e.g. for the binary or SREC BFD. If the binary you
examine does have symbol information, then the ISA mode will be determined
on a function by function basis according to ISA annotation recorded with
individual symbols in the symbol table, ignoring any `-M mips:micromips'
(or `-M mips:16') override. So either your code is really made of regular
MIPS instructions or you have got symbol annotation wrong in your binary
-- which sometimes happens in handcoded assembly that hasn't been written
correctly (GCC is supposed to get it right for generated code).
If you think the binary has been or should have been annotated correctly
and believe this is a toolchain bug, then please provide us with a test
case and we will investigate.