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:
parent
e7fc9a5c57
commit
8d4f381f5c
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user