[dev.link] cmd/link: on AIX, use relocation to locate target symbol from TOC symbol
On AIX, a TOC symbol always has a relocation to its target symbol. Instead of using name lookup to locate the target symbol, we can just use the relocation. Using name lookup, besides being less efficient, needs to provide the right symbol version. In this particular case, we are looking for a data symbol so it is almost always version 0. But in case that it is a text symbol, we may get an ABIALIAS symbol, which does not have its Sect set. Change-Id: I1ecfd284b04a86bbbc450059ee89d99d40493e51 Reviewed-on: https://go-review.googlesource.com/c/go/+/201019Reviewed-by: Than McIntosh <thanm@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Showing
Please register or sign in to comment