mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link/internal/ld: move ld.Cpos to coutbuf.Offset
This change moves the ld.Cpos function to a method on coutbuf. This is part of a larger change that makes ld.outbuf look more like a bio.Buf in an effort to eventually replace the former with the latter. Change-Id: I506f7131935a2aa903fa302a0fab0c5be50220fd Reviewed-on: https://go-review.googlesource.com/27578 Run-TryBot: Dave Cheney <dave@cheney.net> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
61d5daea0a
commit
5f94ff4c87
5 changed files with 34 additions and 35 deletions
|
|
@ -746,7 +746,7 @@ func Codeblk(ctxt *Link, addr int64, size int64) {
|
|||
}
|
||||
func CodeblkPad(ctxt *Link, addr int64, size int64, pad []byte) {
|
||||
if *flagA {
|
||||
fmt.Fprintf(ctxt.Bso, "codeblk [%#x,%#x) at offset %#x\n", addr, addr+size, Cpos())
|
||||
fmt.Fprintf(ctxt.Bso, "codeblk [%#x,%#x) at offset %#x\n", addr, addr+size, coutbuf.Offset())
|
||||
}
|
||||
|
||||
blk(ctxt, ctxt.Textp, addr, size, pad)
|
||||
|
|
@ -857,7 +857,7 @@ func blk(ctxt *Link, syms []*Symbol, addr, size int64, pad []byte) {
|
|||
|
||||
func Datblk(ctxt *Link, addr int64, size int64) {
|
||||
if *flagA {
|
||||
fmt.Fprintf(ctxt.Bso, "datblk [%#x,%#x) at offset %#x\n", addr, addr+size, Cpos())
|
||||
fmt.Fprintf(ctxt.Bso, "datblk [%#x,%#x) at offset %#x\n", addr, addr+size, coutbuf.Offset())
|
||||
}
|
||||
|
||||
blk(ctxt, datap, addr, size, zeros[:])
|
||||
|
|
@ -928,7 +928,7 @@ func Datblk(ctxt *Link, addr int64, size int64) {
|
|||
|
||||
func Dwarfblk(ctxt *Link, addr int64, size int64) {
|
||||
if *flagA {
|
||||
fmt.Fprintf(ctxt.Bso, "dwarfblk [%#x,%#x) at offset %#x\n", addr, addr+size, Cpos())
|
||||
fmt.Fprintf(ctxt.Bso, "dwarfblk [%#x,%#x) at offset %#x\n", addr, addr+size, coutbuf.Offset())
|
||||
}
|
||||
|
||||
blk(ctxt, dwarfp, addr, size, zeros[:])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue