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/asm.s | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/runtime/asm.s') diff --git a/src/runtime/asm.s b/src/runtime/asm.s index 0e14fcd3e6..84d56de7dd 100644 --- a/src/runtime/asm.s +++ b/src/runtime/asm.s @@ -4,14 +4,6 @@ #include "textflag.h" -// funcdata for functions with no local variables in frame. -// Define two zero-length bitmaps, because the same index is used -// for the local variables as for the argument frame, and assembly -// frames have two argument bitmaps, one without results and one with results. -DATA runtime·no_pointers_stackmap+0x00(SB)/4, $2 -DATA runtime·no_pointers_stackmap+0x04(SB)/4, $0 -GLOBL runtime·no_pointers_stackmap(SB),RODATA, $8 - #ifndef GOARCH_amd64 TEXT ·sigpanic0(SB),NOSPLIT,$0-0 JMP ·sigpanic(SB) -- cgit v1.3