.section .note.openbsd.ident, "a" | |
.p2align 2 | |
.long 8 # Name length | |
.long 4 # Description length | |
.long 1 # Type | |
.string "OpenBSD\0" # Name | |
.string "\0\0\0\0" # Description | |
.section .rodata | |
helloworld: | |
.string "Hello world\n" | |
.text | |
.global _start | |
_start: | |
call start | |
start: | |
popl %eax | |
pushl $12 | |
addl $(helloworld - start), %eax | |
pushl %eax | |
pushl $1 | |
subl $4, %esp | |
movl $4, %eax | |
int $0x80 | |
addl $16, %esp | |
xorl %eax, %eax | |
pushl %eax | |
subl $4, %esp | |
movl $302, %eax | |
int $0x80 |