1
0
mirror of https://github.com/golang/go synced 2024-11-20 00:04:43 -07:00

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
This commit is contained in:
Ian Lance Taylor 2013-03-27 15:00:11 -07:00
parent e7fc9a5c57
commit 8d4f381f5c
3 changed files with 3 additions and 3 deletions

View File

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

View File

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

View File

@ -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");