]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.link] cmd/link/internal/loader: support 'variant' relocations
authorThan McIntosh <thanm@google.com>
Wed, 1 Apr 2020 19:57:46 +0000 (15:57 -0400)
committerThan McIntosh <thanm@google.com>
Mon, 6 Apr 2020 14:56:21 +0000 (14:56 +0000)
commit6636b3f2fc87f33d46d80d1e4611b44fd4b31180
tree13434c8c724b46af8f50723e68d42493936395ad
parent8e457c865d980b37d8becd6aaaf658c633b0b9de
[dev.link] cmd/link/internal/loader: support 'variant' relocations

Add support to the loader for getting/setting the 'variant' property
of a symbol relocation. The variant property handles unusual or
infrequently used relocations that have both a type and a variant of
that type (this is needed for S390).

In the sym.Symbol world, a relocation variant is a field on the
'relocExt' extension that is part of sym.Reloc. In this new
implementation for the loader, reloc variants are stored in a side
table (a map) in the loader, and accessed via loader methods.

Change-Id: I62bf54ae7ff6d500c0ea8d2dbe759b2431087378
Reviewed-on: https://go-review.googlesource.com/c/go/+/227018
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/link/internal/loader/loader.go
src/cmd/link/internal/loader/symbolbuilder.go