From c2483a5c034152fcdfbb2e6dbcf48b0103d8db6a Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Fri, 1 Oct 2021 16:25:32 -0700 Subject: cmd, runtime: eliminate runtime.no_pointers_stackmap runtime.no_pointers_stackmap is an odd beast. It is defined in a Go file, populated by assembly, used by the GC, and its address is magic used by async pre-emption to ascertain whether a routine was implemented in assembly. A subsequent change will force all GC data into the go.func.* linker symbol. runtime.no_pointers_stackmap is GC data, so it must go there. Yet it also needs to go into rodata, for the runtime address trick. This change eliminates it entirely. Replace the runtime address check with the newly introduced asm funcflag. Handle the assembly macro as magic, similarly to our handling of go_args_stackmap. This allows the no_pointers_stackmap to be identical in all ways to other gclocals stackmaps, including content-addressability. Change-Id: Id2f20a262cfab0719beb88e6342984ec4b196268 Reviewed-on: https://go-review.googlesource.com/c/go/+/353672 Trust: Josh Bleecher Snyder Reviewed-by: Cherry Mui --- src/runtime/funcdata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/funcdata.h') diff --git a/src/runtime/funcdata.h b/src/runtime/funcdata.h index 1002b181e4..15f1b5c9a1 100644 --- a/src/runtime/funcdata.h +++ b/src/runtime/funcdata.h @@ -44,7 +44,7 @@ // NO_LOCAL_POINTERS indicates that the assembly function stores // no pointers to heap objects in its local stack variables. -#define NO_LOCAL_POINTERS FUNCDATA $FUNCDATA_LocalsPointerMaps, runtime·no_pointers_stackmap(SB) +#define NO_LOCAL_POINTERS FUNCDATA $FUNCDATA_LocalsPointerMaps, no_pointers_stackmap(SB) // ArgsSizeUnknown is set in Func.argsize to mark all functions // whose argument size is unknown (C vararg functions, and -- cgit v1.3