diff options
author | Than McIntosh <thanm@google.com> | 2020-04-07 17:08:00 -0400 |
---|---|---|
committer | Than McIntosh <thanm@google.com> | 2020-04-10 16:35:02 +0000 |
commit | db48c404cf8dc955a07d3a110b8e7099055075b3 (patch) | |
tree | 0378f378b44ebcd2dae4bdbb381ab1342122f2e7 /src/cmd/link/internal/ld/lib.go | |
parent | c306fbaa1c0dc8be7d015d55db4ddd3253ccf98e (diff) | |
download | go-db48c404cf8dc955a07d3a110b8e7099055075b3.tar.gz go-db48c404cf8dc955a07d3a110b8e7099055075b3.zip |
[dev.link] cmd/link: convert pcln linker phase to use loader APIs
Rework the linker's pcln phase to work with the new loader. As part of
this set of changes the handling of "go.file..." symbols has been
revised somewhat -- previously they were treated as always live in the
loader, and now we no longer do this.
The original plan had been to have the new implementation generate
nameless "inltree" symbols, however the plan now is to keep them
named for now and convert them to nameless in a subsequent patch.
Change-Id: If71c93ff1f146dbb63b6ee2546308acdc94b643c
Reviewed-on: https://go-review.googlesource.com/c/go/+/227759
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>
Diffstat (limited to 'src/cmd/link/internal/ld/lib.go')
-rw-r--r-- | src/cmd/link/internal/ld/lib.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go index e560fea2f1..ebabc20378 100644 --- a/src/cmd/link/internal/ld/lib.go +++ b/src/cmd/link/internal/ld/lib.go @@ -2808,6 +2808,10 @@ func (ctxt *Link) loadlibfull() { // Set special global symbols. ctxt.setArchSyms(AfterLoadlibFull) + + // Convert special symbols created by pcln. + pclntabFirstFunc = ctxt.loader.Syms[pclntabFirstFunc2] + pclntabLastFunc = ctxt.loader.Syms[pclntabLastFunc2] } func (ctxt *Link) dumpsyms() { |