Fixed incorrect section offsets on Windows
This commit is contained in:
parent
f2f0624638
commit
e962ac379c
2 changed files with 5 additions and 4 deletions
|
@ -351,6 +351,11 @@ func (a Assembler) Finalize(dlls dll.List) ([]byte, []byte) {
|
|||
}
|
||||
|
||||
data, dataLabels = a.Data.Finalize()
|
||||
|
||||
if config.TargetOS == config.Windows && len(data) == 0 {
|
||||
data = []byte{0}
|
||||
}
|
||||
|
||||
code = a.resolvePointers(code, data, codeStart, codeLabels, codePointers, dataPointers, dllPointers)
|
||||
return code, data
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue