Witam chciałem napisać funkcję strlen w asm i wykorzystac ją w c.

nasm -f elf asm_strlen.asm
gcc strlen.c asm_strlen.o
 

Ale, niestety dostaje coś takiego:

/usr/bin/ld: i386 architecture of input file `asm_strcpy.o' is incompatible with i386:x86-64 output
collect2: ld returned 1 exit status

Domyślam się, że trzeba przerobić program asm na 64 bit, tylko to troche klopotu.. Jak to inaczej skompilować ?