aboutsummaryrefslogtreecommitdiff
path: root/src/liblink/obj8.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-02-27 20:37:00 -0500
committerRuss Cox <rsc@golang.org>2014-02-27 20:37:00 -0500
commitd9c6ae6ae8359429a249b074b07baf5cbc894d7f (patch)
tree0a2882395bc78e5052e1e3b76bfe7c6704f15d7e /src/liblink/obj8.c
parent8d2465ab501eb186ffe869019f3d69b125954993 (diff)
downloadgo-d9c6ae6ae8359429a249b074b07baf5cbc894d7f.tar.xz
all: final merge of NaCl tree
This CL replays the following one CL from the rsc-go13nacl repo. This is the last replay CL: after this CL the main repo will have everything the rsc-go13nacl repo did. Changes made to the main repo after the rsc-go13nacl repo branched off probably mean that NaCl doesn't actually work after this CL, but all the code is now moved over and just needs to be redebugged. --- cmd/6l, cmd/8l, cmd/ld: support for Native Client See golang.org/s/go13nacl for design overview. This CL is publicly visible but not CC'ed to golang-dev, to avoid distracting from the preparation of the Go 1.2 release. This CL and the others will be checked into my rsc-go13nacl clone repo for now, and I will send CLs against the main repo early in the Go 1.3 development. R≡khr https://golang.org/cl/15750044 --- LGTM=bradfitz, dave, iant R=dave, bradfitz, iant CC=golang-codereviews https://golang.org/cl/69040044
Diffstat (limited to 'src/liblink/obj8.c')
-rw-r--r--src/liblink/obj8.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/liblink/obj8.c b/src/liblink/obj8.c
index f81ba03c6b..adee8c6c5b 100644
--- a/src/liblink/obj8.c
+++ b/src/liblink/obj8.c
@@ -124,7 +124,7 @@ progedit(Link *ctxt, Prog *p)
p->from.offset = 0x14;
}
}
- if(ctxt->headtype == Hlinux) {
+ if(ctxt->headtype == Hlinux || ctxt->headtype == Hnacl) {
// Running binaries under Xen requires using
// MOVL 0(GS), reg
// and then off(reg) instead of saying off(GS) directly
@@ -448,6 +448,7 @@ load_g_cx(Link *ctxt, Prog *p)
break;
case Hlinux:
+ case Hnacl:
if(ctxt->linkmode != LinkExternal) {
p->as = AMOVL;
p->from.type = D_INDIR+D_GS;
@@ -869,6 +870,7 @@ LinkArch link386 = {
.minlc = 1,
.ptrsize = 4,
+ .regsize = 4,
.D_ADDR = D_ADDR,
.D_BRANCH = D_BRANCH,