Как переделать этот хелловорлд, используя 64-битность?
section .text
global _start
_start:
;write msg to standard output
mov edx,len
mov ecx,msg
mov ebx,1
mov eax,4
int 0x80
;exit from program
mov eax,1
int 0x80
section .data
msg db 'Hello, World!',0xa
len equ $ - msg
Ещё вопрос:
nasm -f elf hello.asm генерит вот такой файл:
hello.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
После ld -s -o hello hello.o
hello: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), statically linked, stripped
ld: warning: i386 architecture of input file `hello.o' is incompatible with i386:x86-64 output
Почему?