diff options
| author | Russ Cox <rsc@golang.org> | 2014-04-14 15:54:20 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-04-14 15:54:20 -0400 |
| commit | 8d39e55c6516be5ee3267b8ce101b324a4f09986 (patch) | |
| tree | acc342d354cf6456d4cf9b60afea3fc0a0547979 /include | |
| parent | b53bb2cae512ce4abbc1587a903171a9da6201cf (diff) | |
| download | go-8d39e55c6516be5ee3267b8ce101b324a4f09986.tar.xz | |
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://golang.org/cl/87670044
Diffstat (limited to 'include')
| -rw-r--r-- | include/link.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/include/link.h b/include/link.h index a762424d22..92b8b73b6b 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; |
