flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > MS COFF characteristics

Author
Thread Post new topic Reply to topic
SFeLi



Joined: 03 Nov 2004
Posts: 138
SFeLi 19 Oct 2009, 13:41
In MS COFF output files fasm sets IMAGE_FILE_HEADER.Characteristics to 0x00000184 (IMAGE_FILE_32BIT_MACHINE or IMAGE_FILE_BYTES_REVERSED_LO or IMAGE_FILE_LINE_NUMS_STRIPPED). Is this correct?

  • Specification deprecates IMAGE_FILE_BYTES_REVERSED_LO and IMAGE_FILE_LINE_NUMS_STRIPPED and says both of them should be 0
  • Microsoft C Compiler (from MSVS 6.0) doesn’t even set IMAGE_FILE_32BIT_MACHINE (IMAGE_FILE_HEADER.Machine = IMAGE_FILE_MACHINE_I386 implies this, doesn’t it?)
  • Pelles C sets only IMAGE_FILE_32BIT_MACHINE

What about the other compilers and assemblers? Which combination of characteristics is correct? Shouldn’t fasm set only IMAGE_FILE_32BIT_MACHINE or even 0?
Post 19 Oct 2009, 13:41
View user's profile Send private message Reply with quote
SFeLi



Joined: 03 Nov 2004
Posts: 138
SFeLi 02 Nov 2009, 16:35
No ideas?
Post 02 Nov 2009, 16:35
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 02 Nov 2009, 22:23
If the specification says they are deprecated, FASM IMO shouldn't set them, even though it isn't such a big deal. Let's wait for tomasz's attention.
Post 02 Nov 2009, 22:23
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan 03 Nov 2009, 12:42
Waiting FASM to allow these in future:
DllCharacteristics
IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE - however dunno why this should/can be set instead of IMAGE_FILE_RELOCS_STRIPPED flag
IMAGE_DLL_CHARACTERISTICS_NX_COMPAT - for native DEP support by image
Post 03 Nov 2009, 12:42
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 03 Nov 2009, 23:04
vid, everything is deprecated, esp. when the original programmers are nowhere to be found! So I wouldn't worry too much about that. (Besides, even standard COFF used by DJGPP differs in many ways, so there is no agreed upon settings anyways.)
Post 03 Nov 2009, 23:04
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8354
Location: Kraków, Poland
Tomasz Grysztar 03 Nov 2009, 23:14
Nevertheless, fasm generated the standard COFF only when "format COFF" is specified, while "format MS COFF" should conform to Microsoft specification.
Therefore this should be fixed - please wait for the next release.
Post 03 Nov 2009, 23:14
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.