This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [arnm-elf-objdump] Can't use two -M flags for disassembler (-Mforce-thumband -Mreg-names-raw)
- From: Vincent Rubiolo <vincent dot rubiolo at st dot com>
- To: binutils at sources dot redhat dot com
- Cc: nickc at redhat dot com
- Date: Tue, 15 Jul 2003 04:48:27 +0200
- Subject: Re: [arnm-elf-objdump] Can't use two -M flags for disassembler (-Mforce-thumband -Mreg-names-raw)
- References: <3F0E3141.4060706@st.com> <H0000cba18680191.1057939164.eux100.sgp.st.com@MHS>
Hello,
Sorry for the delay.
I am using binutils 2.14 and also a snapshot from the 19th of June.
The problem arises when I try to inspect THUMB code generated by ADS
(interworking enabled). I have to use -Mforce-thumb, otherwise everything is
seen as ARM code.
Here are the outputs (from a C file compiled as THUMB):
% arm-elf-objdump -d ADS_file -Mforce-thumb
1002444: b510 push {r4, lr}
% arm-elf-objdump -d ADS_file -Mforce-thumb -Mreg-names-raw
1002444: 2400b510 strcs r11, [r0], -#1296
The first one is correct.
Pb then, as it seems that the -Mreg-names-raw turned off the -Mforce-thumb
option on the second attempt.
Also, on ARM code, it works just as you stated:
% arm-elf-objdump -d ADS_file
1000150: e1a0f00c mov pc, ip
% arm-elf-objdump -d ADS_file -Mreg-names-raw
1000150: e1a0f00c mov r15, r12
% arm-elf-objdump -d ADS_file -Mreg-names-raw -Mforce-thumb
1000150: e1a0f00c blx 100c494 <$b+0x36>
Hope that clarify the situation. Thing is I am operating the opposite way
(looking at THUMB code).
Regards,
Vincent
nickc@redhat.com wrote:
Hi Vincent,
This may be very stupid but I am unable to use both flags
-Mreg-names-raw and -Mforce-thumb at the same time (arm-elf-objdump)
Which version of binutils are you using ?
It appears to work for me (using the current CVS sources and the 2.14
release):
% objdump -d mov.o
0: e1a0e00f mov lr, pc
% objdump -d -Mreg-names-raw nop.o
0: e1a0e00f mov r14, r15
% objdump -d -Mreg-names-raw -Mforce-thumb nop.o
0: e00f b 22 <fred+0x22>
2: e1a0 b 346 <fred+0x346>
Cheers
Nick