flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Chewy509 18 Jan 2008, 04:07
Hi Guys,
In working on the b0 compiler, I've noticed that the Linux build no longer assemblies using fasm. Since the Linux port doesn't use ld/gcc for the final executable (unlike all the other OSes), it's the only port effected by this. The error is that a symbol is out of range when using the following instructions: eg: lea rax, [_B0_argp] (the b0.asm is roughly 1.5MB, executable around 200KB, and in memory size around 500MB). If I build using: format ELF64 executable, fasm stops. format ELF64, fasm assemblies the source file fine, however I suspect this is due to the GOT. Now I could understand if the variable was outside 2GB of the point that was needed (due to offsets being limited to 32bit when using 'lea', even on 64bit systems), however the total object size in memory is a tad under 500MB. (That's code, pre-defined data, and pre-defined BSS space). So my question is, how does fasm calculate the segment offsets in memory for ELF64 executables, and is there any way to control those offsets? (It appears that the segments are being spaced too far apart when dealing with larger asm files). Or does fasm request that the executable by placed in memory above the 4GB mark? PS. On smaller test files, the 'lea' instructions works fine in both 'ELF64' and 'ELF64 executable' formats, it's just when the source and executables get bigger... PPS. Source files attached.
|
|||||||||||
![]() |
|
LocoDelAssembly 18 Jan 2008, 23:23
fasm 1.66 assembles it without tweaking anything in b0_elf_executable.asm.
|
|||
![]() |
|
Tomasz Grysztar 19 Jan 2008, 14:42
There was a small bug in resolving - it's enough to change this kind of error to be of "recoverable" type (not signalized unless happened in the final pass) to fix this - 1.67.26 is going to have this fix included.
|
|||
![]() |
|
Chewy509 21 Jan 2008, 00:59
@Tomasz: Cool, just glad I wasn't missing something. (I hope you're glad I'm finding these problems on larger source files?)
@Loco: I was getting the error on a 'lea' just before that one you indicated. I hadn't thought to try an earlier fasm version, so thanks for checking. |
|||
![]() |
|
Raedwulf 06 Feb 2008, 08:13
I don't know if this has been resolved - I tried compiling the latest b0 and got this:
Code: Cheers xD _________________ Raedwulf |
|||
![]() |
|
Chewy509 07 Feb 2008, 01:12
Raedwulf wrote: I don't know if this has been resolved - I tried compiling the latest b0 and got this: I've tried the latest build on mine, and got the same error, so it doesn't look like it's been resolved? PS. I took it for granted that the issue had been solved, and didn't retest it when the new FASM release came out. |
|||
![]() |
|
Tomasz Grysztar 12 Feb 2008, 06:48
Right, the bug was in two places and I fixed only one of them.
Will get fixed completely in 1.67.27 |
|||
![]() |
|
Raedwulf 12 Feb 2008, 08:12
Wooohooo!
_________________ Raedwulf |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.