Skip to content

Commit

Permalink
register read-only data symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
pkujhd committed Jan 4, 2025
1 parent c2ffc2e commit 2874cbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion register.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func regSymbol(symPtr map[string]uintptr, path string) error {
if code == "B" || code == "D" {
symPtr[sym.Name] = uintptr(int64(sym.Addr) + addroff)
}
if strings.HasPrefix(sym.Name, constants.ItabPrefix) {
if code == "R" && !strings.HasPrefix(sym.Name, DefaultPkgPath) {
symPtr[sym.Name] = uintptr(int64(sym.Addr) + addroff)
}
}
Expand Down

0 comments on commit 2874cbb

Please sign in to comment.