flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > Characteristics field of MS64 COFF header |
Author |
|
system error 27 Apr 2017, 21:06
I checked this field against MS spec (Jan 2017) and the 2-byte Characteristic field generated by FASM's COFF object (0x0184) doesn't tally with any of the designated values of COFF header data structure. How so? I suspect it is supposed to be 0x0100?
The spec is attached.
|
|||||||||||
27 Apr 2017, 21:06 |
|
Tomasz Grysztar 27 Apr 2017, 22:28
If you look at the COFFMS.INC implementation that comes in fasmg package, which was made to produce the same output as fasm 1, you will find how is it defined:
Code: Characteristics dw IMAGE_FILE_32BIT_MACHINE + IMAGE_FILE_LINE_NUMS_STRIPPED + IMAGE_FILE_BYTES_REVERSED_LO Of course with fasmg macros you can easily tweak any features of the produced file if you need. |
|||
27 Apr 2017, 22:28 |
|
system error 28 Apr 2017, 12:46
Tomasz Grysztar wrote: In the PE macros the default choice of flags was already changed to more "modern" and I only made the "format" macro (which is there to emulate the namesake directive of fasm 1) to alter these settings in such way that the output is the same as of fasm 1. I think this was a good choice, so I'm now updating the COFF macros to work the same way. The COFFMS.INC by default no longer sets the deprecated flags, but "format" macro from FORMAT.INC does set the for compatibility. I understand it's not an easy decision to make. But I don't see how "modernizing" such deprecated flag will harm any compatibility either. Is there any dependency on this flag somewhere in the FASM's internal? I suspect there is. But anyway it's a relieve to know that it is, at least, a calculated value. |
|||
28 Apr 2017, 12:46 |
|
system error 28 Apr 2017, 13:03
You're right and correct. I think I got your point now. Thanks for clarification.
|
|||
28 Apr 2017, 13:03 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.