/******hello.s*******/ .global _start .text _start: movl $len,%edx movl $msg,%ecx movl $1,%ebx movl $4,%eax int $0x80 #print string movl $0,%ebx movl $1,%eax int $0x80 #exit .data msg: .string "Hello !\n" len = . - msg /*******ldscript********/ SECTIONS { .text 0x1000 : AT(0x3000000) { *(.text) } .data . : AT(LOADADDR(.text) + SIZEOF(.text) ) { *(.data) } }