Stian Karlsen
2006-03-02 14:06:16 UTC
Hi.
I just got a new 64-bit computer and I'm working on moving my project
witch includes an Assembly library here. My previous PC were 32-bit..
When I try to compile the Assembly library with nasm everything is fine
(note that there is nothing 64-bit in the asm-code yet). However when I
link it to the rest of the project I get a warning:
"i386 arbitecture of input file 'asmlib.o' is incompatible with
i386:x86-64 output. "
I think I know what's wrong, but not how to fix it... I compile the
asmlib.asm as follows:
nasm -o asmlib.o -f elf asmlib.asm
If I've understood correct elf is a 32-bit thing. So, can I write
something else to get 64-bit? Or isn't Nasm compatible with 64-bit?
Is there some other Assembler for Linux witch I should use instead? I've
read that Yasm is a complete rewrite of Nasm and has AMD64 support,
witch sounds like a good sign for me. So, should I use Yasm? If so I'd
be glad if someone could give me an example of what I should write to
compile (for 64-bit Linux).
I'll start writing code for 64-bit soon, so if anyone has some good
startup-hints you're welcome to give me them as well :)
Best Regards,
Stian Karlsen
I just got a new 64-bit computer and I'm working on moving my project
witch includes an Assembly library here. My previous PC were 32-bit..
When I try to compile the Assembly library with nasm everything is fine
(note that there is nothing 64-bit in the asm-code yet). However when I
link it to the rest of the project I get a warning:
"i386 arbitecture of input file 'asmlib.o' is incompatible with
i386:x86-64 output. "
I think I know what's wrong, but not how to fix it... I compile the
asmlib.asm as follows:
nasm -o asmlib.o -f elf asmlib.asm
If I've understood correct elf is a 32-bit thing. So, can I write
something else to get 64-bit? Or isn't Nasm compatible with 64-bit?
Is there some other Assembler for Linux witch I should use instead? I've
read that Yasm is a complete rewrite of Nasm and has AMD64 support,
witch sounds like a good sign for me. So, should I use Yasm? If so I'd
be glad if someone could give me an example of what I should write to
compile (for 64-bit Linux).
I'll start writing code for 64-bit soon, so if anyone has some good
startup-hints you're welcome to give me them as well :)
Best Regards,
Stian Karlsen