flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
baldr 19 Oct 2010, 18:08
b1528932,
Optional header can be present in COFF (MS PE/COFF spec contradicts itself on that matter: description for SizeOfOptionalHeader insists on value 0 for COFF, yet in the next subchapter it says "An object file can have an optional header, but generally this header has no function in an object file except to increase its size.") While it seems superfluous to have both SizeOfOptionalHeader and NumberOfRvaAndSizes, it allows COFF parser to successfully skip optional header without parsing it (PE32/PE32+/PE32++/etc.) |
|||
![]() |
|
f0dder 22 Oct 2010, 17:39
For information on ELF format, the wikipedia article is a starting point, with overview and links to multiple resources. If you're implementing ELF support, you might want to dive into GNU Binutils sources, and you'll likely want to use binutils to verify/examine your generated object files as you go.
Might also want to check out the BSD LibElf - I haven't had a look at it myself, but in general I find BSD code to be better written than a lot of GNU stuff. I messed around a bit with GNU binutils several years ago, and it wasn't exactly super pretty ![]() The Portable Executable format is a bit of a mess - not so much from it's specification, but more in that different versions of Windows have slightly different requirements for what it considers to be a well-formed executable - and then there's the issue of anti-malware software going apeshit heuristic crazy on "non-standard" files. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.