diff options
| author | Russ Cox <rsc@golang.org> | 2014-09-16 20:53:38 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-09-16 20:53:38 -0400 |
| commit | cbf97d9103b2bbfb8c798f06c751e74093062b57 (patch) | |
| tree | 5efd46af66ea3c364354b8e5e010bd777ce4764d /src/liblink | |
| parent | da8cf5438aa676a99e8bb55c94011b2581743e1a (diff) | |
| download | go-cbf97d9103b2bbfb8c798f06c751e74093062b57.tar.xz | |
liblink, sync/atomic: fix arm build
The liblink code to insert the FUNCDATA for a stack map
from the Go prototype was not correct for ARM
(different data structure layout).
Also, sync/atomic was missing some Go prototypes
for ARM-specific functions.
TBR=r
CC=golang-codereviews
https://golang.org/cl/143160045
Diffstat (limited to 'src/liblink')
| -rw-r--r-- | src/liblink/obj5.c | 1 | ||||
| -rw-r--r-- | src/liblink/objfile.c | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/liblink/obj5.c b/src/liblink/obj5.c index a571d8f166..e192b082b5 100644 --- a/src/liblink/obj5.c +++ b/src/liblink/obj5.c @@ -1061,6 +1061,7 @@ LinkArch linkarm = { .D_PARAM = D_PARAM, .D_SCONST = D_SCONST, .D_STATIC = D_STATIC, + .D_OREG = D_OREG, .ACALL = ABL, .ADATA = ADATA, diff --git a/src/liblink/objfile.c b/src/liblink/objfile.c index 7d4b28c9ac..9b1e1b7a8f 100644 --- a/src/liblink/objfile.c +++ b/src/liblink/objfile.c @@ -268,7 +268,12 @@ writeobj(Link *ctxt, Biobuf *b) p->as = ctxt->arch->AFUNCDATA; p->from.type = ctxt->arch->D_CONST; p->from.offset = FUNCDATA_ArgsPointerMaps; - p->to.type = ctxt->arch->D_EXTERN; + if(ctxt->arch->thechar == '6' || ctxt->arch->thechar == '8') + p->to.type = ctxt->arch->D_EXTERN; + else { + p->to.type = ctxt->arch->D_OREG; + p->to.name = ctxt->arch->D_EXTERN; + } p->to.sym = linklookup(ctxt, smprint("%s.args_stackmap", s->name), s->version); } } |
