-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Milestone
Description
I guess this falls into the category of things not really guaranteed to work, but:
mwhudson@narsil:shared-lib-stuff$ cat trivialmain.go
package main
func main () {}
mwhudson@narsil:shared-lib-stuff$ go build -ldflags -shared trivialmain.go
# command-line-arguments
/usr/bin/ld: /var/tmp/go-link-teMwJN/go.o: relocation R_X86_64_TPOFF32 against `runtime.tlsg' can not be used when making a shared object; recompile with -fPIC
/var/tmp/go-link-teMwJN/go.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
/opt/opensource/go/pkg/tool/linux_amd64/6l: running gcc failed: unsuccessful exit status 0x100
I think this was broken by 90093f0. For ARM the roughly analogous change (b377c9c) was fixed by 9ed5995.