]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: attempt at fixing openbsd build
authorRuss Cox <rsc@golang.org>
Tue, 15 Apr 2014 19:52:23 +0000 (15:52 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 15 Apr 2014 19:52:23 +0000 (15:52 -0400)
OpenBSD is excluded from all the usual thread-local storage
code, not just emitting the tbss section in the external link .o
but emitting a PT_TLS section in an internally-linked executable.
I assume it just has no proper TLS support. Exclude it here too.

TBR=iant
CC=golang-codereviews
https://golang.org/cl/87900045

src/cmd/ld/data.c

index a39243c85a107b3287787437cea2b3451246bf4c..27779acc63c8f2aaa9b38ce6f21c8acfe710d3c2 100644 (file)
@@ -184,7 +184,7 @@ relocsym(LSym *s)
                                o = r->add;
                        break;
                case R_TLS_LE:
-                       if(linkmode == LinkExternal && iself) {
+                       if(linkmode == LinkExternal && iself && HEADTYPE != Hopenbsd) {
                                r->done = 0;
                                r->sym = ctxt->gmsym;
                                r->xsym = ctxt->gmsym;
@@ -198,7 +198,7 @@ relocsym(LSym *s)
                        break;
 
                case R_TLS_IE:
-                       if(linkmode == LinkExternal && iself) {
+                       if(linkmode == LinkExternal && iself && HEADTYPE != Hopenbsd) {
                                r->done = 0;
                                r->sym = ctxt->gmsym;
                                r->xsym = ctxt->gmsym;