aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/objabi
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2021-04-05 19:13:34 +0000
committerMichael Knyszek <mknyszek@google.com>2021-04-06 03:31:26 +0000
commit298975c634758ee464dc0629402107bfc33c4b41 (patch)
tree56287ed3cdf8e56e7609ccd89c275ead5a669c81 /src/cmd/internal/objabi
parentb2389ad3ce7254784db5f4005805714e87ffab85 (diff)
downloadgo-298975c634758ee464dc0629402107bfc33c4b41.tar.xz
runtime: use funcID to identify abort in isAbortPC
This change eliminates the use of funcPC to determine if an PC is in abort. Using funcPC for this purpose is problematic when using plugins because symbols no longer have unique PCs. funcPC also grabs the wrapper for runtime.abort which isn't what we want for the new register ABI, so rather than mark runtime.abort as ABIInternal, use funcID. For #40724. Change-Id: I2730e99fe6f326d22d64a10384828b94f04d101a Reviewed-on: https://go-review.googlesource.com/c/go/+/307391 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/cmd/internal/objabi')
-rw-r--r--src/cmd/internal/objabi/funcid.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/internal/objabi/funcid.go b/src/cmd/internal/objabi/funcid.go
index fa28609e4d..4229ae2c02 100644
--- a/src/cmd/internal/objabi/funcid.go
+++ b/src/cmd/internal/objabi/funcid.go
@@ -24,6 +24,7 @@ type FuncID uint8
// Note: this list must match the list in runtime/symtab.go.
const (
FuncID_normal FuncID = iota // not a special function
+ FuncID_abort
FuncID_asmcgocall
FuncID_asyncPreempt
FuncID_cgocallback
@@ -49,6 +50,7 @@ const (
)
var funcIDs = map[string]FuncID{
+ "abort": FuncID_abort,
"asmcgocall": FuncID_asmcgocall,
"asyncPreempt": FuncID_asyncPreempt,
"cgocallback": FuncID_cgocallback,