mirror of
https://github.com/golang/go.git
synced 2026-02-07 02:09:55 +00:00
debug/pe: permit symbols with no name
They are reportedly generated by llvm-mingw clang21. Fixes #75219 Change-Id: I7fa7e13039bc7eee826cc19826985ca0e357a9ff Reviewed-on: https://go-review.googlesource.com/c/go/+/700137 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Quim Muntal <quimmuntal@gmail.com> Auto-Submit: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
4cc7cc74c3
commit
ea00650784
1 changed files with 6 additions and 1 deletions
|
|
@ -98,7 +98,12 @@ func readCOFFSymbols(fh *FileHeader, r io.ReadSeeker) ([]COFFSymbol, error) {
|
|||
// isSymNameOffset checks symbol name if it is encoded as offset into string table.
|
||||
func isSymNameOffset(name [8]byte) (bool, uint32) {
|
||||
if name[0] == 0 && name[1] == 0 && name[2] == 0 && name[3] == 0 {
|
||||
return true, binary.LittleEndian.Uint32(name[4:])
|
||||
offset := binary.LittleEndian.Uint32(name[4:])
|
||||
if offset == 0 {
|
||||
// symbol has no name
|
||||
return false, 0
|
||||
}
|
||||
return true, offset
|
||||
}
|
||||
return false, 0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue