mirror of
https://github.com/golang/go
synced 2024-09-29 14:24:32 -06:00
debug: fix missing C style error handling in xcoffExe.DataStart
I've made it return 0 following what the other DataStart implementation do when they do not found the section. Fixes #52718
This commit is contained in:
parent
e1e056fa6a
commit
081a35ebec
@ -393,5 +393,8 @@ func (x *xcoffExe) ReadData(addr, size uint64) ([]byte, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (x *xcoffExe) DataStart() uint64 {
|
func (x *xcoffExe) DataStart() uint64 {
|
||||||
return x.f.SectionByType(xcoff.STYP_DATA).VirtualAddress
|
if s := x.f.SectionByType(xcoff.STYP_DATA); s != nil {
|
||||||
|
return s.VirtualAddress
|
||||||
|
}
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user