Source File
symtab.go
Belonging Package
internal/abi
// Copyright 2023 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.package abi// A FuncFlag records bits about a function, passed to the runtime.type FuncFlag uint8const (// FuncFlagTopFrame indicates a function that appears at the top of its stack.// The traceback routine stop at such a function and consider that a// successful, complete traversal of the stack.// Examples of TopFrame functions include goexit, which appears// at the top of a user goroutine stack, and mstart, which appears// at the top of a system goroutine stack.FuncFlagTopFrame FuncFlag = 1 << iota// FuncFlagSPWrite indicates a function that writes an arbitrary value to SP// (any write other than adding or subtracting a constant amount).// The traceback routines cannot encode such changes into the// pcsp tables, so the function traceback cannot safely unwind past// SPWrite functions. Stopping at an SPWrite function is considered// to be an incomplete unwinding of the stack. In certain contexts// (in particular garbage collector stack scans) that is a fatal error.FuncFlagSPWrite// FuncFlagAsm indicates that a function was implemented in assembly.FuncFlagAsm)// A FuncID identifies particular functions that need to be treated// specially by the runtime.// Note that in some situations involving plugins, there may be multiple// copies of a particular special runtime function.type FuncID uint8const (// If you add a FuncID, you probably also want to add an entry to the map in// ../../cmd/internal/objabi/funcid.goFuncIDNormal FuncID = iota // not a special functionFuncID_abortFuncID_asmcgocallFuncID_asyncPreemptFuncID_cgocallbackFuncID_debugCallV2FuncID_gcBgMarkWorkerFuncID_goexitFuncID_gogoFuncID_gopanicFuncID_handleAsyncEventFuncID_mcallFuncID_morestackFuncID_mstartFuncID_panicwrapFuncID_rt0_goFuncID_runfinqFuncID_runtime_mainFuncID_sigpanicFuncID_systemstackFuncID_systemstack_switchFuncIDWrapper // any autogenerated code (hash/eq algorithms, method wrappers, etc.))// ArgsSizeUnknown is set in Func.argsize to mark all functions// whose argument size is unknown (C vararg functions, and// assembly code without an explicit specification).// This value is generated by the compiler, assembler, or linker.const ArgsSizeUnknown = -0x80000000// IDs for PCDATA and FUNCDATA tables in Go binaries.//// These must agree with ../../../runtime/funcdata.h.const (PCDATA_UnsafePoint = 0PCDATA_StackMapIndex = 1PCDATA_InlTreeIndex = 2PCDATA_ArgLiveIndex = 3FUNCDATA_ArgsPointerMaps = 0FUNCDATA_LocalsPointerMaps = 1FUNCDATA_StackObjects = 2FUNCDATA_InlTree = 3FUNCDATA_OpenCodedDeferInfo = 4FUNCDATA_ArgInfo = 5FUNCDATA_ArgLiveInfo = 6FUNCDATA_WrapInfo = 7)// Special values for the PCDATA_UnsafePoint table.const (UnsafePointSafe = -1 // Safe for async preemptionUnsafePointUnsafe = -2 // Unsafe for async preemption// UnsafePointRestart1(2) apply on a sequence of instructions, within// which if an async preemption happens, we should back off the PC// to the start of the sequence when resuming.// We need two so we can distinguish the start/end of the sequence// in case that two sequences are next to each other.UnsafePointRestart1 = -3UnsafePointRestart2 = -4// Like UnsafePointRestart1, but back to function entry if async preempted.UnsafePointRestartAtEntry = -5)
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |