aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2014-12-16 14:59:59 -0500
committerAustin Clements <austin@google.com>2015-01-07 20:35:54 +0000
commitdb923390a01d4c992116161bed1328bd5bb32a24 (patch)
tree54daaefb538fec7d954849b2ab2c3659b2ad785b /include
parentac5a1ac318efb7890b25cf614a0cd5b3e52c74e3 (diff)
downloadgo-db923390a01d4c992116161bed1328bd5bb32a24.tar.xz
cmd/9l: support internal linking
This implements the ELF relocations and dynamic linking tables necessary to support internal linking on ppc64. It also marks ppc64le ELF files as ABI v2; failing to do this doesn't seem to confuse the loader, but it does confuse libbfd (and hence gdb, objdump, etc). Change-Id: I559dddf89b39052e1b6288a4dd5e72693b5355e4 Reviewed-on: https://go-review.googlesource.com/2006 Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'include')
-rw-r--r--include/link.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/link.h b/include/link.h
index bc163d6e4b..15a2878792 100644
--- a/include/link.h
+++ b/include/link.h
@@ -212,6 +212,7 @@ enum
SMACHO, /* Mach-O __nl_symbol_ptr */
SMACHOGOT,
SWINDOWS,
+ SELFGOT, /* also .toc in ppc64 ABI */
SNOPTRDATA,
SINITARR,
SDATA,
@@ -256,12 +257,20 @@ enum
R_PLT1,
R_PLT2,
R_USEFIELD,
+ R_POWER_TOC, // ELF R_PPC64_TOC16*
};
// Reloc.variant
enum
{
RV_NONE, // identity variant
+ RV_POWER_LO, // x & 0xFFFF
+ RV_POWER_HI, // x >> 16
+ RV_POWER_HA, // (x + 0x8000) >> 16
+ RV_POWER_DS, // x & 0xFFFC, check x&0x3 == 0
+
+ RV_CHECK_OVERFLOW = 1<<8, // check overflow flag
+ RV_TYPE_MASK = (RV_CHECK_OVERFLOW - 1),
};
// Auto.type