0
, 내가 노력하고있어 간단한 응용 프로그램을 컴파일 할 수 없습니다 :나는 리눅스 아치 64이 컴파일하기 위해 노력하고있어
section .text
global _start
_start:
mov edx, len
mov ecx, msg
mov ebx, 1
mov eax, 4
int 0x80
mov eax, 1
int 0x80
section .data
msg db 'hi123', 0xa
len equ $ - msg
그리고
$ nasm -f elf test1.asm
$ ld -s -o test1 test1.o
그러나 오류 :
/usr/bin/ld: i386 architecture of input file `test1.o' is incompatible with i386:x86-64 output
을
가능한 중복 http://stackoverflow.com/questions/30184929/use-ld-on -64 비트 플랫폼에서 32 비트 실행 가능) –
링커에서 64 비트 바이너리를 생성하도록 지시했지만 어셈블리 코드가 32 비트 용으로 어셈블되었습니다. '-m elf_i386' 플래그를 링커에 전달하십시오. –
여기에도 중복 됨 http://stackoverflow.com/questions/19200333/architecture-of-i386-input-file-is-incompatible-with-i386x86-64 –