summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-04-14 15:54:20 -0400
committerRuss Cox <rsc@golang.org>2014-04-14 15:54:20 -0400
commite8f7d40d36ebd0302f979efce335b531d67c7f3d (patch)
tree5c77311f9f013dcd93f6e07e7ced2b13ee2aab03 /include
parentea39a747252398dd95baa554526c3801e928d075 (diff)
downloadgo-e8f7d40d36ebd0302f979efce335b531d67c7f3d.tar.gz
liblink: remove arch-specific constants from file format
The relocation and automatic variable types were using arch-specific numbers. Introduce portable enumerations instead. To the best of my knowledge, these are the only arch-specific bits left in the new object file format. Remove now, before Go 1.3, because file formats are forever. LGTM=iant R=iant CC=golang-codereviews https://codereview.appspot.com/87670044
Diffstat (limited to 'include')
-rw-r--r--include/link.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/include/link.h b/include/link.h
index a762424d2..92b8b73b6 100644
--- a/include/link.h
+++ b/include/link.h
@@ -223,6 +223,28 @@ enum
SHIDDEN = 1<<9, // hidden or local symbol
};
+// Reloc.type
+enum
+{
+ R_ADDR = 1,
+ R_SIZE,
+ R_CALL,
+ R_CONST,
+ R_PCREL,
+ R_TLS,
+ R_GOTOFF,
+ R_PLT0,
+ R_PLT1,
+ R_PLT2,
+};
+
+// Auto.type
+enum
+{
+ A_AUTO = 1,
+ A_PARAM,
+};
+
struct Auto
{
LSym* asym;
@@ -420,14 +442,14 @@ struct LinkArch
// TODO: Give these the same values on all systems.
int D_ADDR;
+ int D_AUTO;
int D_BRANCH;
int D_CONST;
int D_EXTERN;
int D_FCONST;
int D_NONE;
- int D_PCREL;
+ int D_PARAM;
int D_SCONST;
- int D_SIZE;
int D_STATIC;
int ACALL;