Code:
section .note.openbsd.ident
align 2
dd 8, 4, 1
db 'OpenBSD', 0
dd 0
align 2
extern SDL_Init
section .text
global _start
_start:
mov rdi, 0x20
call SDL_Init
xor eax, eax
inc al
syscall
i compile it like this
Code:
nasm -f elf64 main.asm -o main.o
ld -o main main.o -lc -m elf_x86_64_obsd -nopie -L/usr/local/lib -lSDL2 -L/usr/X11R6/lib -R/usr/X11/R6/lib
when i start it i get:
not really sure what i did wrong? can someone help?