]> Cypherpunks repositories - gostls13.git/commit
cmd, runtime: eliminate runtime.no_pointers_stackmap
authorJosh Bleecher Snyder <josharian@gmail.com>
Fri, 1 Oct 2021 23:25:32 +0000 (16:25 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 4 Oct 2021 22:45:17 +0000 (22:45 +0000)
commitc2483a5c034152fcdfbb2e6dbcf48b0103d8db6a
tree1130f6445995ef8a7915c252cd88fb392cb4be9e
parenta8d78fae95d5a8a09e248ce4d26f04b38791a7b6
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 <josharian@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/internal/obj/plist.go
src/runtime/asm.s
src/runtime/funcdata.h
src/runtime/preempt.go