mirror of
https://github.com/golang/go
synced 2024-11-17 06:34:53 -07:00
cmd/internal/obj: remove ABI aliases from object file
Change-Id: I8a51f054e017e0116dee4e435b60c08d72e998e9 Reviewed-on: https://go-review.googlesource.com/c/go/+/351331 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
5ee32ff252
commit
a630783ba0
@ -902,16 +902,6 @@ type Link struct {
|
||||
Text []*LSym
|
||||
Data []*LSym
|
||||
|
||||
// ABIAliases are text symbols that should be aliased to all
|
||||
// ABIs. These symbols may only be referenced and not defined
|
||||
// by this object, since the need for an alias may appear in a
|
||||
// different object than the definition. Hence, this
|
||||
// information can't be carried in the symbol definition.
|
||||
//
|
||||
// TODO(austin): Replace this with ABI wrappers once the ABIs
|
||||
// actually diverge.
|
||||
ABIAliases []*LSym
|
||||
|
||||
// Constant symbols (e.g. $i64.*) are data symbols created late
|
||||
// in the concurrent phase. To ensure a deterministic order, we
|
||||
// add them to a separate list, sort at the end, and append it
|
||||
|
@ -330,7 +330,7 @@ const (
|
||||
|
||||
// Traverse symbols based on flag, call fn for each symbol.
|
||||
func (ctxt *Link) traverseSyms(flag traverseFlag, fn func(*LSym)) {
|
||||
lists := [][]*LSym{ctxt.Text, ctxt.Data, ctxt.ABIAliases}
|
||||
lists := [][]*LSym{ctxt.Text, ctxt.Data}
|
||||
for _, list := range lists {
|
||||
for _, s := range list {
|
||||
if flag&traverseDefs != 0 {
|
||||
@ -410,7 +410,7 @@ func (ctxt *Link) traverseFuncAux(flag traverseFlag, fsym *LSym, fn func(parent
|
||||
|
||||
// Traverse aux symbols, calling fn for each sym/aux pair.
|
||||
func (ctxt *Link) traverseAuxSyms(flag traverseFlag, fn func(parent *LSym, aux *LSym)) {
|
||||
lists := [][]*LSym{ctxt.Text, ctxt.Data, ctxt.ABIAliases}
|
||||
lists := [][]*LSym{ctxt.Text, ctxt.Data}
|
||||
for _, list := range lists {
|
||||
for _, s := range list {
|
||||
if s.Gotype != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user