]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: avoid allsyms loop in initarray setup
authorThan McIntosh <thanm@google.com>
Wed, 4 Dec 2019 14:47:22 +0000 (09:47 -0500)
committerThan McIntosh <thanm@google.com>
Wed, 4 Dec 2019 18:39:51 +0000 (18:39 +0000)
commit29f886e427c1686fd79fc4c4052b22634a5b13d8
treecd6bfe9c621790073fa8fd5bf6e3fe19dbbefc58
parentf7672d39ca9eeb05d0605348290335698da98ae8
[dev.link] cmd/link: avoid allsyms loop in initarray setup

In the linker's symtab() function, avoid looping over the context's
Syms.Allsyms array to locate the entry symbol when setting up the init
array section; do an explicit ABI0 symbol lookup instead. This is a
minor efficiency tweak / code cleanup.

Fixes #20205.

Change-Id: I2ebc17a3cb2cd63e9f5052bc80f1b0ac72c960e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/209838
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/link/internal/ld/symtab.go