]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/internal/obj: flag init functions in object file
authorThan McIntosh <thanm@google.com>
Thu, 26 Jan 2023 20:12:00 +0000 (15:12 -0500)
committerThan McIntosh <thanm@google.com>
Mon, 6 Feb 2023 20:25:30 +0000 (20:25 +0000)
commit55bd193575152ea09db3a0bd33f9dda49725d8f4
treeacf08121305305be3b4368f88f72b5daa98ca8fe
parent8fd6cc8bb51ff09990ab13422ef66e18e9295911
cmd/internal/obj: flag init functions in object file

Introduce a flag in the object file indicating whether a given
function corresponds to a compiler-generated (not user-written) init
function, such as "os.init" or "syscall.init". Add code to the
compiler to fill in the correct value for the flag, and add support to
the loader package in the linker for testing the flag. The new loader
API is currently unused, but will be needed in the next CL in this
stack.

Updates #2559.
Updates #36021.
Updates #14840.

Change-Id: Iea7ad2adda487e4af7a44f062f9817977c53b394
Reviewed-on: https://go-review.googlesource.com/c/go/+/463855
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/ir/abi.go
src/cmd/compile/internal/ir/func.go
src/cmd/compile/internal/pkginit/init.go
src/cmd/internal/goobj/objfile.go
src/cmd/internal/obj/link.go
src/cmd/internal/obj/objfile.go
src/cmd/internal/obj/plist.go
src/cmd/internal/obj/textflag.go
src/cmd/link/internal/loader/loader.go