github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/link/internal/sym/compilation_unit.go (about)

     1  // Copyright 2019 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package sym
     6  
     7  import "github.com/gagliardetto/golang-go/cmd/internal/dwarf"
     8  
     9  // CompilationUnit is an abstraction used by DWARF to represent a chunk of
    10  // debug-related data. We create a CompilationUnit per Object file in a
    11  // library (so, one for all the Go code, one for each assembly file, etc.).
    12  type CompilationUnit struct {
    13  	Pkg            string        // The package name, eg ("fmt", or "runtime")
    14  	Lib            *Library      // Our library
    15  	Consts         *Symbol       // Package constants DIEs
    16  	PCs            []dwarf.Range // PC ranges, relative to Textp[0]
    17  	DWInfo         *dwarf.DWDie  // CU root DIE
    18  	FuncDIEs       []*Symbol     // Function DIE subtrees
    19  	AbsFnDIEs      []*Symbol     // Abstract function DIE subtrees
    20  	RangeSyms      []*Symbol     // Symbols for debug_range
    21  	Textp          []*Symbol     // Text symbols in this CU
    22  	DWARFFileTable []string      // The file table used to generate the .debug_lines
    23  }