ID photo of Ciro Santilli taken in 2013 right eyeCiro Santilli OurBigBook logoOurBigBook.com  Sponsor 中国独裁统治 China Dictatorship 新疆改造中心、六四事件、法轮功、郝海东、709大抓捕、2015巴拿马文件 邓家贵、低端人口、西藏骚乱
Let's break down a minimal runnable Linux x86-64 example:
hello_world.asm
section .data
    hello_world db "Hello world!", 10
    hello_world_len  equ $ - hello_world
section .text
    global _start
    _start:
        mov rax, 1
        mov rdi, 1
        mov rsi, hello_world
        mov rdx, hello_world_len
        syscall
        mov rax, 60
        mov rdi, 0
        syscall
Compiled with:
nasm -w+all -f elf64 -o 'hello_world.o' 'hello_world.asm'
ld -o 'hello_world.out' 'hello_world.o'
TODO: use a minimal linker script with -T to be more precise and minimal.
Versions:
  • NASM 2.10.09
  • Binutils version 2.24 (contains ld)
  • Ubuntu 14.04
We don't use a C program as that would complicate the analysis, that will be level 2 :-)

Ancestors (10)

  1. ELF Hello World Tutorial
  2. Executable and Linkable Format
  3. Executable file format
  4. Systems programming
  5. Software
  6. Computer
  7. Information technology
  8. Area of technology
  9. Technology
  10. Home