{"action":"opened","issue":{"url":"https://api.github.com/repos/golang/go/issues/9652","labels_url":"https://api.github.com/repos/golang/go/issues/9652/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/9652/comments","events_url":"https://api.github.com/repos/golang/go/issues/9652/events","html_url":"https://github.com/golang/go/issues/9652","id":54970243,"number":9652,"title":"6l -shared generated invalid relocations","user":{"login":"mwhudson","id":672022,"avatar_url":"https://avatars.githubusercontent.com/u/672022?v=3","gravatar_id":"","url":"https://api.github.com/users/mwhudson","html_url":"https://github.com/mwhudson","followers_url":"https://api.github.com/users/mwhudson/followers","following_url":"https://api.github.com/users/mwhudson/following{/other_user}","gists_url":"https://api.github.com/users/mwhudson/gists{/gist_id}","starred_url":"https://api.github.com/users/mwhudson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwhudson/subscriptions","organizations_url":"https://api.github.com/users/mwhudson/orgs","repos_url":"https://api.github.com/users/mwhudson/repos","events_url":"https://api.github.com/users/mwhudson/events{/privacy}","received_events_url":"https://api.github.com/users/mwhudson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-21T02:38:27Z","updated_at":"2015-01-21T02:38:27Z","closed_at":null,"body":"I guess this falls into the category of things not really guaranteed to work, but:\r\n\r\n```shellsession\r\nmwhudson@narsil:shared-lib-stuff$ cat trivialmain.go \r\npackage main\r\n\r\nfunc main () {}\r\nmwhudson@narsil:shared-lib-stuff$ go build -ldflags -shared trivialmain.go\r\n# command-line-arguments\r\n/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\r\n/var/tmp/go-link-teMwJN/go.o: error adding symbols: Bad value\r\ncollect2: error: ld returned 1 exit status\r\n/opt/opensource/go/pkg/tool/linux_amd64/6l: running gcc failed: unsuccessful exit status 0x100\r\n```\r\n\r\nI think this was broken by 90093f0634d0143c6294e827e5c83fc0818ff8aa.  For ARM the roughly analogous change (b377c9c6a9b720d0897d298652bebd3887ceeb46) was fixed by  9ed5995cfe4c217c1291ced9c4a70334383df226."}}