mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link: do not directly embed Symbols in Link
Mostly done with sed. Change-Id: Ic8c534a3fdd332b5420d062ee85bb77a30ad1efb Reviewed-on: https://go-review.googlesource.com/29346 Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
d284d4ff92
commit
d41a7f77c5
16 changed files with 32 additions and 32 deletions
|
|
@ -461,7 +461,7 @@ func (ctxt *Link) loadlib() {
|
|||
if Linkmode == LinkInternal {
|
||||
// Drop all the cgo_import_static declarations.
|
||||
// Turns out we won't be needing them.
|
||||
for _, s := range ctxt.Allsym {
|
||||
for _, s := range ctxt.Syms.Allsym {
|
||||
if s.Type == obj.SHOSTOBJ {
|
||||
// If a symbol was marked both
|
||||
// cgo_import_static and cgo_import_dynamic,
|
||||
|
|
@ -553,7 +553,7 @@ func (ctxt *Link) loadlib() {
|
|||
// If we have any undefined symbols in external
|
||||
// objects, try to read them from the libgcc file.
|
||||
any := false
|
||||
for _, s := range ctxt.Allsym {
|
||||
for _, s := range ctxt.Syms.Allsym {
|
||||
for _, r := range s.R {
|
||||
if r.Sym != nil && r.Sym.Type&obj.SMASK == obj.SXREF && r.Sym.Name != ".got" {
|
||||
any = true
|
||||
|
|
@ -1817,7 +1817,7 @@ func genasmsym(ctxt *Link, put func(*Link, *Symbol, string, SymbolType, int64, *
|
|||
put(ctxt, s, s.Name, TextSym, s.Value, nil)
|
||||
}
|
||||
|
||||
for _, s := range ctxt.Allsym {
|
||||
for _, s := range ctxt.Syms.Allsym {
|
||||
if s.Attr.Hidden() {
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue