mirror of
https://github.com/golang/go
synced 2024-11-27 01:01:21 -07:00
cmd/link: move declarations into loops
(Split out from CL 22205.) Change-Id: Id32698f48ce02b55c15b6f2842215e0ffdbf425b Reviewed-on: https://go-review.googlesource.com/22298 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
d8c9dd6048
commit
1dad218da1
@ -1692,8 +1692,6 @@ func elfrelocsect(sect *Section, first *LSym) {
|
||||
}
|
||||
|
||||
eaddr := int32(sect.Vaddr + sect.Length)
|
||||
var r *Reloc
|
||||
var ri int
|
||||
for ; sym != nil; sym = sym.Next {
|
||||
if !sym.Attr.Reachable() {
|
||||
continue
|
||||
@ -1703,8 +1701,8 @@ func elfrelocsect(sect *Section, first *LSym) {
|
||||
}
|
||||
Ctxt.Cursym = sym
|
||||
|
||||
for ri = 0; ri < len(sym.R); ri++ {
|
||||
r = &sym.R[ri]
|
||||
for ri := 0; ri < len(sym.R); ri++ {
|
||||
r := &sym.R[ri]
|
||||
if r.Done != 0 {
|
||||
continue
|
||||
}
|
||||
|
@ -824,8 +824,6 @@ func machorelocsect(sect *Section, first *LSym) {
|
||||
}
|
||||
|
||||
eaddr := int32(sect.Vaddr + sect.Length)
|
||||
var r *Reloc
|
||||
var ri int
|
||||
for ; sym != nil; sym = sym.Next {
|
||||
if !sym.Attr.Reachable() {
|
||||
continue
|
||||
@ -835,8 +833,8 @@ func machorelocsect(sect *Section, first *LSym) {
|
||||
}
|
||||
Ctxt.Cursym = sym
|
||||
|
||||
for ri = 0; ri < len(sym.R); ri++ {
|
||||
r = &sym.R[ri]
|
||||
for ri := 0; ri < len(sym.R); ri++ {
|
||||
r := &sym.R[ri]
|
||||
if r.Done != 0 {
|
||||
continue
|
||||
}
|
||||
|
@ -784,8 +784,6 @@ func perelocsect(sect *Section, first *LSym) int {
|
||||
}
|
||||
|
||||
eaddr := int32(sect.Vaddr + sect.Length)
|
||||
var r *Reloc
|
||||
var ri int
|
||||
for ; sym != nil; sym = sym.Next {
|
||||
if !sym.Attr.Reachable() {
|
||||
continue
|
||||
@ -795,8 +793,8 @@ func perelocsect(sect *Section, first *LSym) int {
|
||||
}
|
||||
Ctxt.Cursym = sym
|
||||
|
||||
for ri = 0; ri < len(sym.R); ri++ {
|
||||
r = &sym.R[ri]
|
||||
for ri := 0; ri < len(sym.R); ri++ {
|
||||
r := &sym.R[ri]
|
||||
if r.Done != 0 {
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user