diff options
| author | Jeremy Faller <jeremy@golang.org> | 2020-06-19 15:35:28 -0400 |
|---|---|---|
| committer | Jeremy Faller <jeremy@golang.org> | 2020-06-25 18:42:27 +0000 |
| commit | f033e23414f82c37fe200a5de6e5eb9a0bccaf7c (patch) | |
| tree | 56f9cce1773e1354b5aa3e1734d33983f9845945 /src/cmd/link/internal/ld/sym.go | |
| parent | cbfced7415f6b0ac0be0182cb929e336d5d33ea3 (diff) | |
| download | go-git-f033e23414f82c37fe200a5de6e5eb9a0bccaf7c.tar.gz | |
[dev.link] cmd/link: add generator symbols
Create a new class of symbols internal to the linker. These symbols live
in the Loader, and are real smybols, but have no data, only size. After
symbols are allocated in the binary in asmb() a function is called that
is responsible for filling in the data.
This allows the linker to create large symbols, but not pay the price on
the heap memory.
Change-Id: Ib4291fc6e578478057ed2ec163d7b27426f1d5ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/239280
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/link/internal/ld/sym.go')
| -rw-r--r-- | src/cmd/link/internal/ld/sym.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/link/internal/ld/sym.go b/src/cmd/link/internal/ld/sym.go index 3f269453c0..75489720cc 100644 --- a/src/cmd/link/internal/ld/sym.go +++ b/src/cmd/link/internal/ld/sym.go @@ -50,6 +50,7 @@ func linknew(arch *sys.Arch) *Link { LibraryByPkg: make(map[string]*sym.Library), numelfsym: 1, ErrorReporter: ErrorReporter{ErrorReporter: ler}, + generatorSyms: make(map[loader.Sym]generatorFunc), } if objabi.GOARCH != arch.Name { |
