Commit 8d4f381f authored by Ian Lance Taylor's avatar Ian Lance Taylor

cmd/ld, cmd/8l: Fix OpenBSD build.

Don't generate TLS sections on OpenBSD.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8059043
parent e7fc9a5c
......@@ -689,7 +689,7 @@ putrelv:
r = addrel(cursym);
*r = rel;
r->off = curp->pc + andptr - and;
} else if(iself && linkmode == LinkExternal && istls(a)) {
} else if(iself && linkmode == LinkExternal && istls(a) && HEADTYPE != Hopenbsd) {
Reloc *r;
Sym *s;
......
......@@ -1206,7 +1206,7 @@ dodata(void)
sect->len = datsize - sect->vaddr;
lookup("end", 0)->sect = sect;
if(iself && linkmode == LinkExternal && s != nil && s->type == STLSBSS) {
if(iself && linkmode == LinkExternal && s != nil && s->type == STLSBSS && HEADTYPE != Hopenbsd) {
sect = addsection(&segdata, ".tbss", 06);
sect->align = PtrSize;
sect->vaddr = 0;
......
......@@ -887,7 +887,7 @@ doelf(void)
addstring(shstrtab, ".data");
addstring(shstrtab, ".bss");
addstring(shstrtab, ".noptrbss");
if(linkmode == LinkExternal)
if(linkmode == LinkExternal && HEADTYPE != Hopenbsd)
addstring(shstrtab, ".tbss");
if(HEADTYPE == Hnetbsd)
addstring(shstrtab, ".note.netbsd.ident");
......
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