]> Cypherpunks repositories - gostls13.git/commit
cmd/link: refactor usage of SymLocalentry helper functions
authorPaul E. Murphy <murp@ibm.com>
Mon, 19 Sep 2022 21:48:49 +0000 (16:48 -0500)
committerPaul Murphy <murp@ibm.com>
Tue, 27 Sep 2022 17:29:05 +0000 (17:29 +0000)
commitedd1273b841050e96d9ddd937fc00c0eebe10f1b
treec2d924e3017b482bbd238f469f4b38b65123b4b1
parentff34676cdd5f2c318fa58e78c84a90b3e5a21b04
cmd/link: refactor usage of SymLocalentry helper functions

PPC64 ELFv2 uses the st_other field of a symbol to specify an offset
from the global entry point to its local entry point. Similarly, some
values (i.e 1) may also require additional linker support which is
missing today.

For now, generate an error if we encounter unsupported local entry
values on PPC64, and update the Localentry values to use bytes, not
32b instruction words.

Similarly, ELFv2 1.5 also updates the wording of values 2-6. They
now map to a specific number of bytes.

Change-Id: Id1b71c3b0fea982bdcfb7eac91d9f93e04ae43f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/431876
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/cmd/link/internal/loadelf/ldelf.go
src/cmd/link/internal/loader/loader.go
src/cmd/link/internal/ppc64/asm.go