From ed890e7414c1aa7040a5ff6bef6dffa2767b6df5 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 15 Apr 2014 15:52:23 -0400 Subject: [PATCH] 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 --- src/cmd/ld/data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/ld/data.c b/src/cmd/ld/data.c index a39243c85a..27779acc63 100644 --- a/src/cmd/ld/data.c +++ b/src/cmd/ld/data.c @@ -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; -- 2.50.0