Witam!
Otóż używam Linuxa Mint 18 x64. I napisałem sobię prosty programik w NASM'ie, lecz jest to program na architekturę x86. Oto kod:
[bits 32]
extern _puts
extern _exit
global main
section .data
hello:
db "Hello world!", 0x0A, 0
section .text
main:
push hello
call _puts
add esp, 4
push 0
call _exit
add esp, 4
Z samą kompilacją nie ma problemu. Jest problem z linkowaniem. Otóż gdy wpiszę:
nasm -f elf32 hello.asm
a następnie:
gcc -m32 hello.o -o out
Wywala mi taki błąd:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/5/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/5/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
Z góry dziękuję za pomoc