Source file src/cmd/compile/internal/noder/reloc.go

     1  // UNREVIEWED
     2  
     3  // Copyright 2021 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  package noder
     8  
     9  // A reloc indicates a particular section within a unified IR export.
    10  //
    11  // TODO(mdempsky): Rename to "section" or something similar?
    12  type reloc int
    13  
    14  // A relocEnt (relocation entry) is an entry in an atom's local
    15  // reference table.
    16  //
    17  // TODO(mdempsky): Rename this too.
    18  type relocEnt struct {
    19  	kind reloc
    20  	idx  int
    21  }
    22  
    23  // Reserved indices within the meta relocation section.
    24  const (
    25  	publicRootIdx  = 0
    26  	privateRootIdx = 1
    27  )
    28  
    29  const (
    30  	relocString reloc = iota
    31  	relocMeta
    32  	relocPosBase
    33  	relocPkg
    34  	relocName
    35  	relocType
    36  	relocObj
    37  	relocObjExt
    38  	relocObjDict
    39  	relocBody
    40  
    41  	numRelocs = iota
    42  )
    43  

View as plain text