Author Topic: I'm trying to make my own Compiler+Linker, but need something MS won't tell me.  (Read 3798 times)

Offline ben321

  • Full Member
  • **
  • Posts: 121
This is a bit off topic, because it isn't strictly about NASM.
I'm making my own just for the challenge. I need to know something that Microsoft doesn't tell me on this webpage https://msdn.microsoft.com/en-us/library/windows/desktop/ms680305%28v=vs.85%29.aspx

What are the BARE MINIMUM requirements for an EXE file's Data Directory section? The compiler+linker (yep, I'm putting them together in the same program, so no need for 2 programs, or intermediate OBJ files) will generate a VERY SIMPLE EXE file. It won't have a DOS program to remind you that it can't run in DOS. If it's run in DOS it will probably crash. It won't have any exports. It won't have any imports. It won't have any .data or .bss section. It will only have executable code (a .text section). So I need to know what the bare minimum requirements are for the Data Directory section that appears at the end of the "Optional PE Header" section. Please let me know. Thanks.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2563
  • Country: us
http://home.myfairpoint.net/fbkotler/nagoa20120202.zip

This is an "%include" file for NaGoA - an IDE using Nasm, Gorc, and Alink (apparently pretty much abandoned?). Among other things, it includes a macro set which allows a PE to be produced from Nasm's "-f bin" format - filling in the required header parts "by hand". You might find a clue as to what goes where, although I make no guarantee that it's the "bare minimum".

Best,
Frank


 

SMF spam blocked by CleanTalk