github.com/cloudwego/frugal@v0.1.15/internal/loader/moduledata_go120.go (about)

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