DMD generated exes' size differ from PE headers

Walter Bright newshound1 at digitalmars.com
Tue Jan 26 10:47:13 PST 2010


bobef wrote:
> I'm walking the PE header sections to find out the file size. I find
> the maximum PointerToRawData and add SizeOfRawData of the section to
> find where the exe ends. It works with the files I've tested. When
> compiling exe file with DMD 1.055 and -g there are additional four
> bytes after the last section. Why is that? Is SizeOfRawData wrong or
> there is something else at the end?


I don't know. Could be alignment padding.



More information about the Digitalmars-d mailing list