github.com/cloudwego/frugal@v0.1.15/internal/loader/moduledata_go121.go (about) 1 //go:build go1.21 && !go1.23 2 // +build go1.21,!go1.23 3 4 /* 5 * Copyright 2023 ByteDance Inc. 6 * 7 * Licensed under the Apache License, Version 2.0 (the "License"); 8 * you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 */ 19 20 package loader 21 22 import ( 23 `unsafe` 24 25 `github.com/cloudwego/frugal/internal/rt` 26 ) 27 28 type _Func struct { 29 entryOff uint32 30 nameoff int32 31 args int32 32 deferreturn uint32 33 pcsp uint32 34 pcfile uint32 35 pcln uint32 36 npcdata uint32 37 cuOffset uint32 38 startLine int32 39 funcID uint8 40 flag uint8 41 _ [1]byte 42 nfuncdata uint8 43 pcdata [2]uint32 44 argptrs uint32 45 localptrs uint32 46 } 47 48 type _ModuleData struct { 49 pcHeader *_PCHeader 50 funcnametab []byte 51 cutab []uint32 52 filetab []byte 53 pctab []byte 54 pclntable []byte 55 ftab []_FuncTab 56 findfunctab uintptr 57 minpc, maxpc uintptr 58 text, etext uintptr 59 noptrdata, enoptrdata uintptr 60 data, edata uintptr 61 bss, ebss uintptr 62 noptrbss, enoptrbss uintptr 63 covctrs, ecovctrs uintptr 64 end, gcdata, gcbss uintptr 65 types, etypes uintptr 66 rodata uintptr 67 gofunc uintptr 68 textsectmap [][3]uintptr 69 typelinks []int32 70 itablinks []*rt.GoItab 71 ptab [][2]int32 72 pluginpath string 73 pkghashes []struct{} 74 // This slice records the initializing tasks that need to be 75 // done to start up the program. It is built by the linker. 76 inittasks []unsafe.Pointer 77 modulename string 78 modulehashes []struct{} 79 hasmain uint8 80 gcdatamask, gcbssmask _BitVector 81 typemap map[int32]*rt.GoType 82 bad bool 83 next *_ModuleData 84 } 85 86 const ( 87 _ModuleMagic = 0xfffffff1 88 )