DISASSEMBLING FILES

BASIC DISASSEMBLY: .TEXT (EXECUTABLE CODE)

root@sre:~$ objdump -M intel -d helloWorld
 helloWorld:     file format elf64-x86-64

 Disassembly of section .text:

 0000000000401000 <_start>:
  401000:	b8 01 00 00 00       	mov    eax,0x1
  401005:	bf 01 00 00 00       	mov    edi,0x1
  40100a:	48 be 00 20 40 00 00 	movabs rsi,0x402000
  401011:	00 00 00
  401014:	ba 12 00 00 00       	mov    edx,0x12
  401019:	0f 05                	syscall
  40101b:	b8 3c 00 00 00       	mov    eax,0x3c
  401020:	bf 00 00 00 00       	mov    edi,0x0
  401025:	0f 05                	syscall

 * the -M intel specifies to write the instructions in the Intel syntax
   instead of the default AT&T syntax
 * the -d option instructs objdump to disassemble all executable sections in the binary.
    -  this only disassemble the .text section of the code

BASIC DISASSEMBLY: STRING & .DATA (NON EXECUTABLE CODE)

DISPLAYING ASSEMBLY CODE W/O MACHINE CODE

Last updated