flat assembler
Message board for the users of flat assembler.
Index
> Windows > What's the actual difference between COFF and MS COFF? |
Author |
|
revolution 30 Jul 2024, 06:56
According to fasm just two bytes.
Code: ~ diff <(echo format coff > x ; fasm x ; hd x.obj) <(echo format ms coff > y ; fasm y ; hd y.obj) 4c4 < 00000010 00 00 04 01 2e 66 6c 61 74 00 00 00 00 00 00 00 |.....flat.......| --- > 00000010 00 00 84 01 2e 66 6c 61 74 00 00 00 00 00 00 00 |.....flat.......| 6c6 < 00000030 00 00 00 00 00 00 00 00 60 00 00 00 2e 66 6c 61 |........`....fla| --- > 00000030 00 00 00 00 00 00 00 00 60 00 00 e0 2e 66 6c 61 |........`....fla| ~ |
|||
30 Jul 2024, 06:56 |
|
Tomasz Grysztar 30 Jul 2024, 08:26
The most important one is that REL32 relocations are computed differently, compare the implementations in fasmg's coff.inc and coffms.inc.
Also, because Microsoft's variant has been developed further (and into 64-bit world), it has substantially more extensions, additional flags, etc. The basic variant follows the old DJGPP specification. |
|||
30 Jul 2024, 08:26 |
|
Ben321 02 Aug 2024, 20:56
Tomasz Grysztar wrote: The most important one is that REL32 relocations are computed differently, compare the implementations in fasmg's coff.inc and coffms.inc. Interesting. What does the $% token mean in that source code? |
|||
02 Aug 2024, 20:56 |
|
bitRAKE 02 Aug 2024, 22:06
These offsets occur in pairs and perhaps are understood better in the larger context presented in the manual:
Quote: The $% is a built-in symbol equal to the offset within the output file at which the initialized data would be generated if it was defined at this point. The $%% symbol is the current offset within the output file. These two values differ only when they are used after some data has been reserved - the $% is then larger than $%% by the length of uninitialized data which would be generated into output if it was to be followed by some initialized one. Code: start present* end address space $$ $@ $ output file 0 $%% $% _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
02 Aug 2024, 22:06 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.