]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: support marking outer/sub for external loader.Sym
authorThan McIntosh <thanm@google.com>
Wed, 11 Dec 2019 19:17:14 +0000 (14:17 -0500)
committerThan McIntosh <thanm@google.com>
Wed, 18 Dec 2019 14:24:57 +0000 (14:24 +0000)
commit66c74b78caf1628f058bf92ccf13c1f2b4054cfd
tree8ee4fae5ec651327c63efd7910349991a21c84cf
parente6b044b20040f76a5602a7fe6fc3d6e994376df1
[dev.link] cmd/link: support marking outer/sub for external loader.Sym

Add a loader mechanism for recording outer/sub relationships between
symbols without falling back on sym.Symbol. Also includes a new
"PrependSub" method that provides a way to chain a sub-symbol only the
list of an outer symbol (a common operation when manipulating
outer/sub relationships in the linker).

Change-Id: I70c72356945ceec2bacdcdc25bcc352bfb6765a1
Reviewed-on: https://go-review.googlesource.com/c/go/+/210777
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/link/internal/loader/loader.go
src/cmd/link/internal/loader/loader_test.go