aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link/internal/loader/loader.go
diff options
context:
space:
mode:
authorThan McIntosh <thanm@google.com>2020-04-12 14:19:38 -0400
committerThan McIntosh <thanm@google.com>2020-04-13 00:37:19 +0000
commite488ade6dd029646d1374d1e0fcb74b501701e14 (patch)
tree8cd7b8ea95c501dadbc334257811e7c8e1caf4c4 /src/cmd/link/internal/loader/loader.go
parentad6fcf6993307fe1acdf07b5dc174d94b58615d0 (diff)
downloadgo-e488ade6dd029646d1374d1e0fcb74b501701e14.tar.gz
go-e488ade6dd029646d1374d1e0fcb74b501701e14.zip
[dev.link] cmd/link/internal/loader: get rid of the AttrContainer loader method
Remove the loader's AttrContainer method, since it is no longer needed. All of the code in the linker that used s.Attr.Container() is now upstream of loadlibfull(), and the code in question now uses local bitmaps to keep track of container text symbols as opposed to loader methods. Change-Id: Iae956d24bef2776e181c3b8208476dcb0b9a2916 Reviewed-on: https://go-review.googlesource.com/c/go/+/227959 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/link/internal/loader/loader.go')
-rw-r--r--src/cmd/link/internal/loader/loader.go18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/cmd/link/internal/loader/loader.go b/src/cmd/link/internal/loader/loader.go
index 7b82e532b9..7a5bd28da2 100644
--- a/src/cmd/link/internal/loader/loader.go
+++ b/src/cmd/link/internal/loader/loader.go
@@ -953,21 +953,9 @@ func (l *Loader) AttrSubSymbol(i Sym) bool {
return l.OuterSym(i) != 0
}
-// AttrContainer returns true for symbols that are listed as a
-// sub-symbol of some other outer symbol. The sub/outer mechanism is
-// used when loading host objects (sections from the host object
-// become regular linker symbols and symbols go on the Sub list of
-// their section) and for constructing the global offset table when
-// internally linking a dynamic executable.
-func (l *Loader) AttrContainer(i Sym) bool {
- // we don't explicitly store this attribute any more -- return
- // a value based on the sub-symbol setting.
- return l.SubSym(i) != 0
-}
-
-// Note that we don't have SetAttrSubSymbol' or 'SetAttrContainer' methods
-// in the loader; clients should just use methods like PrependSub
-// to establish these relationships
+// Note that we don't have a 'SetAttrSubSymbol' method in the loader;
+// clients should instead use the PrependSub method to establish
+// outer/sub relationships for host object symbols.
// Returns whether the i-th symbol has ReflectMethod attribute set.
func (l *Loader) IsReflectMethod(i Sym) bool {