Joined: 16 Jun 2003
Location: Kraków, Poland
Re: PE HEADER differences fasmg vs fasm
Note that this is not fasmg that causes the differences, only the PE.INC macros. It is very much possible to write macros that would generate everything the same as fasm, up to the last bit (in fact, the ELF macros do it).
Why 2 of characteristics gone? Or why in fasm they present?
I have cleaned up the default choice of flags when writing the macros, because fasm's choices were a bit unusual. You can change these flags by altering this setting:
If you used PE.INC directly, you could just put this setting into your source. When you use "format" macro, it sets it up automatically - but I think I should add these two flags to the "format" macro - this way the "format" would be more compatible with fasm, while PE.INC would remain unchanged with its plain defaults.
Why not calculated sizes & bases of code & data?
This is another thing that I got rid of when cleaning up. These values were always very meaningless and to my knowledge they were not used anywhere. In case of assembly program, where code and data may be intermixed or overlapped in any order, computing these values makes no sense.
If you need to set them up, you can alter the section macros (or determine the values in some other way) and write them directly to the header with instructions like:
Why checksum does not realized?
As you can see in the "format" macro, the checksum computation is enabled only for "PE native", because only there it used to be absolutely needed. It is turned off otherwise to save on the processing time, but you can enable it for any PE by adding this line to the source:
PE.Settings.ComputeCheckSum = 1
Even when you use "format", you can still add this line to the source and it should enable checksum computation in case when "format" did not enable it. I may consider enabling it always by the "format" macro that comes with fasm compatiblity headers.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum