[fpc-pascal]Strange compilation problems

Gabor DEAK JAHN djg at argus.vki.bke.hu
Fri Dec 29 23:33:27 CET 2000


At 12/29/2000 06:30, you wrote:

Dear Peter,

> It then uses GNU binutils as (called asw.exe for win32) assembler to create
the object
> file instead of the internal object writer
> But the code differences (except jmp labels and absolute offsets) shouldn't
be that much
> when you compare a dissamble (objdumpw.exe --disassemble) of the 2 object
files.

Good point, I forgot about OBJDUMPW. I checked the two EXEs and indeed the 
differences are minor (apart from the addresses, only a small but not 
important difference in setting up the jump tables for DLL-imported 
functions). Still, one program works, the other does not. This and the fact 
that adding and removing variables can make or break the program lead to a 
suspicion about variable alignment. And in my later checks, this proved true.

I tried to pad all my variables with additional ones to make sure that all 
of them fall on 8-byte or 16-byte boundaries and lo and behold, both 
versions (with and without -al) started to work all right. Now the remaining 
question is whether I can force FPC to align all (important) variables on 
such boundaries -- the real program would contain too many variables to make 
manual padding feasible.


Bye,
   Gábor

-------------------------------------------------------------------
Gabor DEAK JAHN -- Budapest, Hungary.
E-mail: djg at tramontana.co.hu, djg at argus.vki.bke.hu





More information about the fpc-pascal mailing list