Commit ed890e74 authored by Russ Cox's avatar Russ Cox

cmd/ld: attempt at fixing openbsd build

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
parent 568e3526
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment