Mini hello world (x64 Linux)
BITS 64 ORG 0x400000 elf64_header: db 0x7f, 0x45, 0x4c, 0x46, 0x02, 0x01, 0x01, 0x00 ; e_ident db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ; e_ident dw 0x2 ; e_type dw 0x3e ; e_machine dd 0x1 ; e_version dq entry_point ; e_entry dq ph - $$ ; e_phoff dq 0x0 ; e_shoff dd 0x0 ; e_flags dw end_header - elf64_header ; e_ehsize dw end_ph - ph ; e_phentsize dw 0x1 ; e_phnum dw 0x0 ; e_shentsize dw 0x0 ; e_shnum dw 0x0 ; e_shstrndx end_header: ph: ; first segment dd 0x1 ; p_type (loadable segment) dd 0x5 ; p_flags (R-X) dq entry_point - $$ ; p_offset dq entry_point ; p_vaddr dq entry_point ; p_paddr dq end - entry_point ; p_filesz dq end - entry_point ; p_memsz dq 0x200000 ; p_align; end_ph: entry_point: mov rax, 1 mov rdi, 1 mov rsi, str mov rdx, end - str syscall mov rax, 60 xor rdi, rdi syscall str: db "hello world !", 0xa end:










