Skip to content

Commit

Permalink
check symbol.Func is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
pkujhd committed Jul 27, 2024
1 parent f5b4fbd commit b3420f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion obj/readobj.1.16.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (pkg *Pkg) AddCgoFuncs(cgoFuncs map[string]int) {
if index, ok := goArchive.symVersions[obj.ABI0][sym.Name]; ok {
nsym := goArchive.entries[index.entryIndex].syms[index.symbolIndex]
cgoFuncs[sym.Name] = nsym.Kind
if nsym.Func.FuncID == uint8(objabi.GetFuncID(``, true)) ||
if (nsym.Func != nil && nsym.Func.FuncID == uint8(objabi.GetFuncID(``, true))) ||
sym.Func.FuncID == uint8(objabi.GetFuncID(``, true)) {
sym.Name = sym.Name + ABIINTERNAL_SUFFIX
nsym.Name = nsym.Name + ABI0_SUFFIX
Expand Down

0 comments on commit b3420f1

Please sign in to comment.