This code, for example :
global _start
section .text
mov ecx, 1
mov eax, 1
int 0x80
section .data
dd 0xCAFECAFE
dd 0xDEADBEEF
section .data
dd 0xDEADCAFE
When I generate a pure binary file with nasm -f bin, the file looks like this :
66 B9 01 00 00 00 66 B8 01 00 00 00 CD 80 00 00 FE CA FE CA EF BE AD DE FE CA AD DE
Unlike ELF files, there is no indication about where is the .text, .data and .bss section. Despite this, is there any way to disassemble this kind of files ? The problem is that the disassembler could confuse data with instructions.
User contributions licensed under CC BY-SA 3.0