Implemented dynamic section alignment
This commit is contained in:
parent
4faab9606c
commit
c010a81ac6
9 changed files with 35 additions and 23 deletions
|
@ -73,8 +73,8 @@ func Write(writer io.Writer, codeBytes []byte, dataBytes []byte, dlls dll.List)
|
|||
AddressOfEntryPoint: uint32(code.MemoryOffset),
|
||||
BaseOfCode: uint32(code.MemoryOffset),
|
||||
ImageBase: config.BaseAddress,
|
||||
SectionAlignment: config.MemoryAlign, // power of 2, must be greater than or equal to FileAlignment
|
||||
FileAlignment: config.FileAlign, // power of 2
|
||||
SectionAlignment: uint32(config.MemoryAlign), // power of 2, must be greater than or equal to FileAlignment
|
||||
FileAlignment: uint32(config.FileAlign), // power of 2
|
||||
MajorOperatingSystemVersion: 0x06,
|
||||
MinorOperatingSystemVersion: 0,
|
||||
MajorImageVersion: 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue