package staticdata
import "cmd/compile/internal/staticdata"
Index ¶
- func FuncLinksym(n *ir.Name) *obj.LSym
- func GlobalLinksym(n *ir.Name) *obj.LSym
- func InitAddr(n *ir.Name, noff int64, lsym *obj.LSym)
- func InitAddrOffset(n *ir.Name, noff int64, lsym *obj.LSym, off int64)
- func InitConst(n *ir.Name, noff int64, c ir.Node, wid int)
- func InitSlice(n *ir.Name, noff int64, lsym *obj.LSym, lencap int64)
- func InitSliceBytes(nam *ir.Name, off int64, s string)
- func NeedFuncSym(fn *ir.Func)
- func StringSym(pos src.XPos, s string) (data *obj.LSym)
- func WriteEmbed(v *ir.Name)
- func WriteFuncSyms()
Functions ¶
func FuncLinksym ¶
FuncLinksym returns n·f, the function value symbol for n.
func GlobalLinksym ¶
func InitAddr ¶
InitAddr is InitAddrOffset, with offset fixed to 0.
func InitAddrOffset ¶
InitAddrOffset writes the static name symbol lsym to n, it does not modify n. It's the caller responsibility to make sure lsym is from ONAME/PEXTERN node.
func InitConst ¶
InitConst writes the static literal c to n. Neither n nor c is modified.
func InitSlice ¶
InitSlice writes a static slice symbol {lsym, lencap, lencap} to n+noff, it does not modify n. It's the caller responsibility to make sure lsym is from ONAME node.
func InitSliceBytes ¶
func NeedFuncSym ¶
NeedFuncSym ensures that fn·f is exported, if needed. It is only used with -dynlink. When not compiling for dynamic linking, the funcsyms are created as needed by the packages that use them. Normally we emit the fn·f stubs as DUPOK syms, but DUPOK doesn't work across shared library boundaries. So instead, when dynamic linking, we only create the fn·f stubs in fn's package.
func StringSym ¶
StringSym returns a symbol containing the string s. The symbol contains the string data, not a string header.
func WriteEmbed ¶
WriteEmbed emits the init data for a //go:embed variable, which is either a string, a []byte, or an embed.FS.
func WriteFuncSyms ¶
func WriteFuncSyms()
Source Files ¶
- Version
- v1.17.12
- Published
- Jul 12, 2022
- Platform
- linux/amd64
- Imports
- 20 packages
- Last checked
- 25 seconds ago –
Tools for package owners.