mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
liblink, cmd/6l: re-enable -shared on amd64
The creation of liblink and subsequent introduction of more explicit TLS handling broke 6l's (unsupported) -shared flag. This change adds -shared flags to cmd/asm and 6g and changes liblink to generate shared- library compatible instruction sequences when they are passed, and changes 6l to emit the appropriate ELF relocation. A proper fix probably also requires go tool changes. Fixes #9652. Change-Id: I7b7718fe7305c802ac994f4a5c8de68cfbe6c76b Reviewed-on: https://go-review.googlesource.com/4321 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
671472c1c9
commit
09d9520be9
6 changed files with 41 additions and 4 deletions
|
|
@ -41,6 +41,9 @@ func main() {
|
|||
ctxt.Debugasm = 1
|
||||
}
|
||||
ctxt.Trimpath = *flags.TrimPath
|
||||
if *flags.Shared {
|
||||
ctxt.Flag_shared = 1
|
||||
}
|
||||
ctxt.Bso = obj.Binitw(os.Stdout)
|
||||
defer obj.Bflush(ctxt.Bso)
|
||||
ctxt.Diag = log.Fatalf
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue