1
0
mirror of https://github.com/golang/go synced 2024-11-19 23:14:47 -07:00

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
This commit is contained in:
Russ Cox 2014-04-15 15:52:23 -04:00
parent 568e3526b1
commit ed890e7414

View 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;