github.com/yanyiwu/go@v0.0.0-20150106053140-03d6637dbb7f/src/cmd/link/runtime.go (about)

     1  // Copyright 2014 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  // Generation of runtime-accessible data structures.
     6  // See also debug.go.
     7  
     8  package main
     9  
    10  import "cmd/internal/goobj"
    11  
    12  func (p *Prog) runtime() {
    13  	p.pclntab()
    14  
    15  	// TODO: Implement garbage collection data.
    16  	p.addSym(&Sym{
    17  		Sym: &goobj.Sym{
    18  			SymID: goobj.SymID{Name: "runtime.gcdata"},
    19  			Kind:  goobj.SRODATA,
    20  		},
    21  	})
    22  	p.addSym(&Sym{
    23  		Sym: &goobj.Sym{
    24  			SymID: goobj.SymID{Name: "runtime.gcbss"},
    25  			Kind:  goobj.SRODATA,
    26  		},
    27  	})
    28  }