Fixed incorrect section offsets on Windows
This commit is contained in:
parent
cb6b3a4cd0
commit
6af02d8fa3
@ -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
|
||||
}
|
||||
|
@ -86,10 +86,6 @@ restart:
|
||||
}
|
||||
|
||||
if config.TargetOS == config.Windows {
|
||||
if len(data) == 0 {
|
||||
data = []byte{0}
|
||||
}
|
||||
|
||||
importsStart, _ := fs.Align(dataStart+Address(len(data)), config.Align)
|
||||
|
||||
for _, pointer := range dllPointers {
|
||||
|
Loading…
x
Reference in New Issue
Block a user