flat assembler
Message board for the users of flat assembler.
Index
> Linux > Error when linking fasm.o to create fasm |
Author |
|
ACP 17 Oct 2015, 22:59
Aren't you using x64 gcc? The fasm.o file is 32-bit ELF. You may need to install gcc for x86.
|
|||
17 Oct 2015, 22:59 |
|
stevenyhw 17 Oct 2015, 23:31
Yes, I think the gcc bundled with CentOS is x64 gcc. Is there a way to generate an fasm.o in 64-bit ELF format? Thanks.
|
|||
17 Oct 2015, 23:31 |
|
revolution 18 Oct 2015, 00:01
Code: format elf64 ... |
|||
18 Oct 2015, 00:01 |
|
stevenyhw 18 Oct 2015, 01:00
Thanks. I changed that line and I also tried to convert "esp" to "rsp" and "ebp" to "rbp" in the file libc/fasm.asm, but then I got a further error "pushd arg error: illegal instruction". I have never learned assembly before, so this is really challenging for me. I guess I have to read the manual and figure what how to covert a 32-bit assembly code to the 64bit version.
|
|||
18 Oct 2015, 01:00 |
|
revolution 18 Oct 2015, 01:11
If you are trying to convert fasm (the entire source) to 64-bit then you are in for a lot of work.
Perhaps better if you can get your system to run 32-bit executables first. |
|||
18 Oct 2015, 01:11 |
|
stevenyhw 18 Oct 2015, 01:22
Okay. Thanks for the advice.
|
|||
18 Oct 2015, 01:22 |
|
JohnFound 18 Oct 2015, 07:32
revolution wrote: Perhaps better if you can get your system to run 32-bit executables first. AFAIK, every 64 bit Linux can run 32 bit executables. The problem is with the missing libraries. But FASM for Linux uses only system calls, so it should work like a charm. But yes, linking the libc version will need 32 bit compiler and 32 bit libraries. Anyway, it is very strange, why one will need to link FASM for libc on Linux? There is normally working version FASM for Linux. IMO, the libc version is only for systems different than Linux. A fall-back, that gives additional level of portability. _________________ Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9 |
|||
18 Oct 2015, 07:32 |
|
alkap 18 Oct 2015, 08:03
Do you have the package below installed?
Quote:
If not, you may want to try installing it. The folks on the CentOS forum suggest installing it. See the link below. https://www.centos.org/forums/viewtopic.php?t=14169 |
|||
18 Oct 2015, 08:03 |
|
Endre 18 Oct 2015, 15:49
After you have installed the i386 development environment just issue
Code: gcc -m32 fasm.o -o fasm Edit: I forgot to mention that although it works for me in this way, but I'm on Linux Mint 17.2. |
|||
18 Oct 2015, 15:49 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.