I am writing program in FASM assembler, and want to see what code is generated after all macro expansions. One usually can disasseble binary with objdump -d
, but for binary, generated by fasm, it outputs only following:
$ cat true.fasm
format ELF64 executable
sys_exit = 60
entry $
mov eax, sys_exit
xor edi, edi
syscall
$ fasm true.fasm
$ objdum -d ./true
out/true: file format elf64-x86-64
What I can do is to load binary into gdb
, start it with starti
and decode instructions with x/10i $rip
, which is sub-optimal. Is there non-interactive command that can do the same?