llvm-objdump equivalent of aarch64-none-linux-gnu-objdump

  Kiến thức lập trình

Suppose I put four bytes into a file and then disassemble it using the GNU toolchain:

-bash$ echo -en 'x1fx20x03xd5' > ./myFile
-bash$ aarch64-none-linux-gnu-objdump -m AARCH64 -b binary -D ./myFile

./myFile:     file format binary

Disassembly of section .data:

0000000000000000 <.data>:
   0:   d503201f    nop

Note that myFile is not a proper ELF file or an object file, yet I can still disassemble it!

How can I do something similar with llvm-objdump?

-bash$ llvm-objdump --arch=arm64 -D x
.../llvm-16.0.4/bin/llvm-objdump: error: 'x': The file was not recognized as a valid object file

Is there a mechanism to do what I want using ARM’s armclang, armasm, or fromelf?

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT