Commit 4b175fd2 authored by Michael Hudson-Doyle's avatar Michael Hudson-Doyle

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: 's avatarDavid Crawshaw <crawshaw@golang.org>
parent 0ef041cf
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment