mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] cmd/link: convert doxcoff to new style
Change-Id: Ic1e4ed6c14e049b1ba2f7c00f986433ab7ebe932 Reviewed-on: https://go-review.googlesource.com/c/go/+/225202 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
651e950fc9
commit
b1a19f3cc7
7 changed files with 120 additions and 83 deletions
|
|
@ -904,6 +904,10 @@ func (l *Loader) SetAttrCgoExportStatic(i Sym, v bool) {
|
|||
}
|
||||
}
|
||||
|
||||
func (l *Loader) AttrCgoExport(i Sym) bool {
|
||||
return l.AttrCgoExportDynamic(i) || l.AttrCgoExportStatic(i)
|
||||
}
|
||||
|
||||
// AttrReadOnly returns true for a symbol whose underlying data
|
||||
// is stored via a read-only mmap.
|
||||
func (l *Loader) AttrReadOnly(i Sym) bool {
|
||||
|
|
@ -2351,8 +2355,8 @@ func (l *Loader) migrateAttributes(src Sym, dst *sym.Symbol) {
|
|||
dst.Attr.Set(sym.AttrSubSymbol, dst.Outer != nil)
|
||||
|
||||
// Copy over dynimplib, dynimpvers, extname.
|
||||
if l.SymExtname(src) != "" {
|
||||
dst.SetExtname(l.SymExtname(src))
|
||||
if name, ok := l.extname[src]; ok {
|
||||
dst.SetExtname(name)
|
||||
}
|
||||
if l.SymDynimplib(src) != "" {
|
||||
dst.SetDynimplib(l.SymDynimplib(src))
|
||||
|
|
@ -2377,7 +2381,13 @@ func (l *Loader) migrateAttributes(src Sym, dst *sym.Symbol) {
|
|||
|
||||
// CreateExtSym creates a new external symbol with the specified name
|
||||
// without adding it to any lookup tables, returning a Sym index for it.
|
||||
func (l *Loader) CreateExtSym(name string) Sym {
|
||||
func (l *Loader) CreateExtSym(name string, ver int) Sym {
|
||||
return l.newExtSym(name, ver)
|
||||
}
|
||||
|
||||
// CreateStaticSym creates a new static symbol with the specified name
|
||||
// without adding it to any lookup tables, returning a Sym index for it.
|
||||
func (l *Loader) CreateStaticSym(name string) Sym {
|
||||
// Assign a new unique negative version -- this is to mark the
|
||||
// symbol so that it can be skipped when ExtractSymbols is adding
|
||||
// ext syms to the sym.Symbols hash.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue