mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link,runtime/cgo: enable PT_TLS generation on OpenBSD
OpenBSD 6.0 and later have support for PT_TLS in ld.so(1). Now that OpenBSD 6.1 has been released, OpenBSD 5.9 is no longer officially supported and Go can start generating PT_TLS for OpenBSD cgo binaries. This also allows us to remove the workarounds in the OpenBSD cgo runtime. This change also removes the environ and progname exports - these are now provided directly by ld.so(1) itself. Fixes #19932 Change-Id: I42e75ef9feb5dcd4696add5233497e3cbc48ad52 Reviewed-on: https://go-review.googlesource.com/40331 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
2122fc6358
commit
9417c022c6
8 changed files with 25 additions and 380 deletions
|
|
@ -1971,7 +1971,7 @@ func genasmsym(ctxt *Link, put func(*Link, *Symbol, string, SymbolType, int64, *
|
|||
put(ctxt, s, s.Extname, UndefinedSym, 0, nil)
|
||||
|
||||
case obj.STLSBSS:
|
||||
if Linkmode == LinkExternal && Headtype != obj.Hopenbsd {
|
||||
if Linkmode == LinkExternal {
|
||||
put(ctxt, s, s.Name, TLSSym, Symaddr(s), s.Gotype)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue