From 9d4215311ba573a5b676de85b053eec03e577478 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Wed, 14 Mar 2018 15:21:37 -0700 Subject: runtime: identify special functions by flag instead of address When there are plugins, there may not be a unique copy of runtime functions like goexit, mcall, etc. So identifying them by entry address is problematic. Instead, keep track of each special function using a field in the symbol table. That way, multiple copies of the same runtime function will be treated identically. Fixes #24351 Fixes #23133 Change-Id: Iea3232df8a6af68509769d9ca618f530cc0f84fd Reviewed-on: https://go-review.googlesource.com/100739 Run-TryBot: Keith Randall TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- src/runtime/runtime2.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/runtime/runtime2.go') diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index e6808ac023..059e14e002 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -638,8 +638,8 @@ type _func struct { entry uintptr // start pc nameoff int32 // function name - args int32 // in/out args size - _ int32 // previously legacy frame size; kept for layout compatibility + args int32 // in/out args size + funcID funcID // set for certain special runtime functions pcsp int32 pcfile int32 -- cgit v1.3-5-g9baa