github.com/eh-steve/goloader@v0.0.0-20240111193454-90ff3cfdae39/objabi/dataindex/dataindex.1.20.go (about) 1 //go:build go1.20 && !go1.23 2 // +build go1.20,!go1.23 3 4 package dataindex 5 6 // This file defines the IDs for PCDATA and FUNCDATA instructions 7 // in Go binaries. 8 // 9 // These must agree with ../../../runtime/funcdata.h and 10 // ../../../runtime/symtab.go. 11 12 const ( 13 PCDATA_UnsafePoint = 0 14 PCDATA_StackMapIndex = 1 15 PCDATA_InlTreeIndex = 2 16 PCDATA_ArgLiveIndex = 3 17 18 FUNCDATA_ArgsPointerMaps = 0 19 FUNCDATA_LocalsPointerMaps = 1 20 FUNCDATA_StackObjects = 2 21 FUNCDATA_InlTree = 3 22 FUNCDATA_OpenCodedDeferInfo = 4 23 FUNCDATA_ArgInfo = 5 24 FUNCDATA_ArgLiveInfo = 6 25 FUNCDATA_WrapInfo = 7 26 27 // ArgsSizeUnknown is set in Func.argsize to mark all functions 28 // whose argument size is unknown (C vararg functions, and 29 // assembly code without an explicit specification). 30 // This value is generated by the compiler, assembler, or linker. 31 ArgsSizeUnknown = -0x80000000 32 ) 33 34 // Special PCDATA values. 35 const ( 36 // PCDATA_UnsafePoint values. 37 PCDATA_UnsafePointSafe = -1 // Safe for async preemption 38 PCDATA_UnsafePointUnsafe = -2 // Unsafe for async preemption 39 40 // PCDATA_Restart1(2) apply on a sequence of instructions, within 41 // which if an async preemption happens, we should back off the PC 42 // to the start of the sequence when resuming. 43 // We need two so we can distinguish the start/end of the sequence 44 // in case that two sequences are next to each other. 45 PCDATA_Restart1 = -3 46 PCDATA_Restart2 = -4 47 48 // Like PCDATA_Restart1, but back to function entry if async preempted. 49 PCDATA_RestartAtEntry = -5 50 )