how to use aarch64-linux-gnu-objdump to disassemble V7 mode instructions (A32,T32)
Asked Answered
O

1

4

Im using aarch64-linux-gnu-objdump to disassemble part of a program for ARM v8. It works well for V8 64 bit instructions, but fails when the mode is changed to V7 instruction set(A32) - the code starts as V8 instruction set, switches to A32 ( AArch32 execution state) and than to T32 - thumb instruction set. how can I disassemble the A32 and T32 instructions? Do I need to break the code to parts when the mode switches, so that i have separate instruction mode blocks?

any help would be appreciated Weselfox

Omnipresent answered 4/2, 2014 at 15:8 Comment(0)
T
6

Unlike for A32 ("ARM") and T32 ("Thumb") within a 32-bit toolchain, there is no cross-instruction-set support between 32-bit and 64-bit ARM architectures. A64 really is a completely new instruction set.

Since interworking does not exist between the 64-bit and 32-bit states (you can only change 'width' on taking an exception) this is not an issue in normal usage. But when building a standalone image containing code for several exception levels I can imagine it will get a bit tedious.

You need to use aarch64-linux-gnu- for A64 portions and arm-linux-gnueabihf- for A32/T32 portions.

Throaty answered 4/2, 2014 at 18:42 Comment(1)
I see. I thought since register width and thumb instructions are part of the arm v8 64 bit architecture there will be a disassemble option for them in the linaro toolchain, but I will try to go the way you suggest. It is a standalone image with different exception levels BTW.ThanksOmnipresent

© 2022 - 2024 — McMap. All rights reserved.