mirror of https://github.com/golang/go.git
cmd/link: fix Codeblk printing when -a to use Textp as a slice
Does anyone actually pass -a to the linker? Change-Id: I1d31ea66aa5604b7fd42adf15bdab71e9f52d0ed Reviewed-on: https://go-review.googlesource.com/22356 Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
0ef041cfa5
commit
4b175fd23b
|
|
@ -798,19 +798,20 @@ func Codeblk(addr int64, size int64) {
|
|||
return
|
||||
}
|
||||
|
||||
var sym *LSym
|
||||
for _, sym = range Ctxt.Textp {
|
||||
syms := Ctxt.Textp
|
||||
for i, sym := range syms {
|
||||
if !sym.Attr.Reachable() {
|
||||
continue
|
||||
}
|
||||
if sym.Value >= addr {
|
||||
syms = syms[i:]
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
eaddr := addr + size
|
||||
var q []byte
|
||||
for ; sym != nil; sym = sym.Next {
|
||||
for _, sym := range syms {
|
||||
if !sym.Attr.Reachable() {
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue