]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/link: separate elf addend size from reloc size
authorPaul E. Murphy <murp@ibm.com>
Tue, 23 Mar 2021 14:51:43 +0000 (09:51 -0500)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Wed, 24 Mar 2021 14:52:14 +0000 (14:52 +0000)
commit975b097307621ad32217946f9732d17101d72aaf
treefe01e5918f1faa73339221d956d2990146e34083
parente8700f1ce6f4103207f470cce443f04377baa600
cmd/link: separate elf addend size from reloc size

The size of the field may be smaller than the addend,
such is the case with R_PPC64_TOC16_HA/LO and similar
relocations.

Add an extra return value to ldelf.relSize to account for
addend size which may be larger than the relocated field,
and fix the related ppc64 relocations.

Such relocs can be seen in large PIC blobs such
as the ppc64le race detector included with golang.

Change-Id: I457186fea5d0ec5572b9bbf79bb7fa21a36cc1b0
Reviewed-on: https://go-review.googlesource.com/c/go/+/303990
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Lynn Boger <laboger@linux.vnet.ibm.com>
src/cmd/link/internal/loadelf/ldelf.go