summaryrefslogtreecommitdiff
path: root/src/liblink/obj8.c
diff options
context:
space:
mode:
authorAram H?v?rneanu <aram@mgk.ro>2014-07-02 21:04:10 +1000
committerAram H?v?rneanu <aram@mgk.ro>2014-07-02 21:04:10 +1000
commit3d9435eece80a6811eac36716fdee006e64e1e39 (patch)
treeb191584807212265c9f7d5d21c4667d9f484f794 /src/liblink/obj8.c
parentb4eb43d41eb0e161b0b77e21e44f8788a6c85207 (diff)
downloadgo-3d9435eece80a6811eac36716fdee006e64e1e39.tar.gz
liblink, runtime: preliminary support for plan9/amd64
A TLS slot is reserved by _rt0_.*_plan9 as an automatic and its address (which is static on Plan 9) is saved in the global _privates symbol. The startup linkage now is exactly like that from Plan 9 libc, and the way we access g is exactly as if we'd have used privalloc(2). Aside from making the code more standard, this change drastically simplifies it, both for 386 and for amd64, and makes the Plan 9 code in liblink common for both 386 and amd64. The amd64 runtime code was cleared of nxm assumptions, and now runs on the standard Plan 9 kernel. Note handling fixes will follow in a separate CL. LGTM=rsc R=golang-codereviews, rsc, bradfitz, dave CC=0intro, ality, golang-codereviews, jas, minux.ma, mischief https://codereview.appspot.com/101510049 Committer: Dave Cheney <dave@cheney.net>
Diffstat (limited to 'src/liblink/obj8.c')
-rw-r--r--src/liblink/obj8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liblink/obj8.c b/src/liblink/obj8.c
index 72934c149..6f96ebae9 100644
--- a/src/liblink/obj8.c
+++ b/src/liblink/obj8.c
@@ -270,8 +270,8 @@ addstacksplit(Link *ctxt, LSym *cursym)
ctxt->symmorestack[1] = linklookup(ctxt, "runtime.morestack_noctxt", 0);
}
- if(ctxt->headtype == Hplan9 && ctxt->plan9tos == nil)
- ctxt->plan9tos = linklookup(ctxt, "_tos", 0);
+ if(ctxt->headtype == Hplan9 && ctxt->plan9privates == nil)
+ ctxt->plan9privates = linklookup(ctxt, "_privates", 0);
ctxt->cursym = cursym;