]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/link/internal/loadpe: allocate comdat definitions map lazily
authorThan McIntosh <thanm@google.com>
Mon, 6 Nov 2023 19:18:43 +0000 (14:18 -0500)
committerThan McIntosh <thanm@google.com>
Mon, 6 Nov 2023 20:59:48 +0000 (20:59 +0000)
commit17211b64b6a601ff14cb714362c054434aa86f5a
treede1e3e08dab01f0acda0d1000103cf7b50660ffc
parent36f3ec59122136d5664fd4c5524b8d0370edffdf
cmd/link/internal/loadpe: allocate comdat definitions map lazily

Switch the "comdatDefinitions" map to lazy allocation; we only need it
for loading PE objects, no point doing an allocation during package
init if we don't need it.

Change-Id: Ie33f2c56e964f35ac2e137840ac021cfaaa897c6
Reviewed-on: https://go-review.googlesource.com/c/go/+/540255
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
src/cmd/link/internal/loadpe/ldpe.go