mirror of
https://github.com/golang/go
synced 2024-10-05 21:31:21 -06:00
7cecac3cbb
Related changes included in this CL: - Add explicit start symbol to Prog. - Add omitRuntime bool to Prog. - Introduce p.Packages[""] to hold automatic symbols - Add SymOrder to Prog to preserve symbol order. - Add layout test (and fix bug that was putting everything in text section). R=iant CC=golang-codereviews https://golang.org/cl/51260045
15 lines
350 B
Go
15 lines
350 B
Go
// Copyright 2014 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Writing of executable and (for hostlink mode) object files.
|
|
|
|
package main
|
|
|
|
import "io"
|
|
|
|
func (p *Prog) write(w io.Writer) {
|
|
p.Entry = p.Syms[p.startSym].Addr
|
|
p.formatter.write(w, p)
|
|
}
|