Open potatopublic opened 3 months ago
@llvm/issue-subscribers-tools-llvm-objdump
Author: YooSeok (potatopublic)
@llvm/issue-subscribers-lldb
Author: YooSeok (potatopublic)
Which compiler and what command line are you using to compile the example?
I suspect that .byte
may be marked as data in the object file and that could cause dissemblers to ignore it. That's what I saw with gcc and its objdump.
Usually raw encodings are written with .instr
.
Not .instr
, .inst
with no r: https://sourceware.org/binutils/docs/as/AArch64-Directives.html
My environment.
CPU: Apple M1 OS: ventura 13.0 llvm version: 18.1.8 lldb version: 18.1.8
I attempted disassembly with lldb and llvm-objdump for only 4 bytes of code. However, even though they are clearly the same version, the disassembly results of lldb and llvm-objdump were different. Can anyone explain this phenomenon?
Below is the source code I targeted and the disassembly results.
Additionally, I wrote disassembly code for 4 bytes with the llvm-c header file, and when disassembly was attempted, disassembly failed for 4 bytes targets like lldb.