cmd/internal/obj/mips, cmd/link: add support TLS relocation for mips64x

a new relocation R_ADDRMIPSTLS is added, which resolves to 16-bit offset
of a TLS address on mips64x.

Change-Id: Ic60d0e1ba49ff1c433cead242f5884677ab227a5
Reviewed-on: https://go-review.googlesource.com/19804
Reviewed-by: Minux Ma <minux@golang.org>
This commit is contained in:
Cherry Zhang 2016-04-27 22:18:14 -04:00 committed by Minux Ma
parent 77c7f12438
commit 3b0b30727c
5 changed files with 74 additions and 1 deletions

View file

@ -585,6 +585,9 @@ const (
// R_ADDRMIPSU (only used on mips64) resolves to the sign-adjusted "upper" 16
// bits (bit 16-31) of an external address, by encoding it into the instruction.
R_ADDRMIPSU
// R_ADDRMIPSTLS (only used on mips64) resolves to the low 16 bits of a TLS
// address (offset from thread pointer), by encoding it into the instruction.
R_ADDRMIPSTLS
)
type Auto struct {