{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/27510","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/27510/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/27510/comments","events_url":"https://api.github.com/repos/golang/go/issues/27510/events","html_url":"https://github.com/golang/go/issues/27510","id":357218818,"node_id":"MDU6SXNzdWUzNTcyMTg4MTg=","number":27510,"title":"cmd/link: regression on some distros for ppc64le with CL 130316","user":{"login":"laboger","id":9433228,"node_id":"MDQ6VXNlcjk0MzMyMjg=","avatar_url":"https://avatars1.githubusercontent.com/u/9433228?v=4","gravatar_id":"","url":"https://api.github.com/users/laboger","html_url":"https://github.com/laboger","followers_url":"https://api.github.com/users/laboger/followers","following_url":"https://api.github.com/users/laboger/following{/other_user}","gists_url":"https://api.github.com/users/laboger/gists{/gist_id}","starred_url":"https://api.github.com/users/laboger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laboger/subscriptions","organizations_url":"https://api.github.com/users/laboger/orgs","repos_url":"https://api.github.com/users/laboger/repos","events_url":"https://api.github.com/users/laboger/events{/privacy}","received_events_url":"https://api.github.com/users/laboger/received_events","type":"User","site_admin":false},"labels":[{"id":373402289,"node_id":"MDU6TGFiZWwzNzM0MDIyODk=","url":"https://api.github.com/repos/golang/go/labels/NeedsInvestigation","name":"NeedsInvestigation","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/6","html_url":"https://github.com/golang/go/milestone/6","labels_url":"https://api.github.com/repos/golang/go/milestones/6/labels","id":1055141,"node_id":"MDk6TWlsZXN0b25lMTA1NTE0MQ==","number":6,"title":"Unplanned","description":"No plan to fix in any specific release.\r\n","creator":{"login":"rsc","id":104030,"node_id":"MDQ6VXNlcjEwNDAzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/104030?v=4","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":1756,"closed_issues":1174,"state":"open","created_at":"2015-04-06T20:47:19Z","updated_at":"2018-09-05T20:55:43Z","due_on":"2099-12-31T08:00:00Z","closed_at":null},"comments":5,"created_at":"2018-09-05T13:02:13Z","updated_at":"2018-09-06T13:36:39Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n\r\n### What version of Go are you using (`go version`)?\r\nupstream tip\r\n\r\n### Does this issue reproduce with the latest release?\r\nyes\r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\nppc64le Debian 9\r\n\r\n### What did you do?\r\nBuilt golang using all.bash\r\n\r\n\r\n### What did you expect to see?\r\nAll tests passed\r\n\r\n### What did you see instead?\r\n~/golang/test/go/src$ go tool dist test testso\r\n\r\n##### ../misc/cgo/testso\r\n./main.exe: error while loading shared libraries: R_PPC64_ADDR16_HA re113298fa4 for symbol `' out of range\r\n2018/09/04 19:10:02 Failed: exit status 127\r\n\r\nThis does not fail in the go 1.11 branch, and I tracked it down the commit 6417e91.\r\n\r\nThe commit mentioned above is dropping the -no-pie option, which is the cause of the failure.\r\n\r\ncommit 247b034:\r\n```\r\ngo tool dist test testso\r\n\r\n##### ../misc/cgo/testso\r\n# command-line-arguments\r\nHEADER = -H5 -T0x11000 -D0x0 -R0x10000\r\n 0.00 deadcode\r\n 0.01 pclntab=247478 bytes, funcdata total 46718 bytes\r\n 0.01 dodata\r\n 0.01 dwarf\r\n 0.02 symsize = 0\r\n 0.03 reloc\r\n 0.04 asmb\r\n 0.04 datblk\r\n 0.05 sym\r\n 0.05 elfsym\r\n 0.05 symsize = 32880\r\n 0.05 symsize = 33312\r\n 0.06 header\r\n 0.17 host link: \"gcc\" \"-m64\" \"-o\" \"/tmp/go-build620912334/b001/exe/a.out\" \"-rdynamic\" \"-Wl,--compress-debug-sections=zlib-gnu\" \"/tmp/go-link-627000385/go.o\" \"/tmp/go-link-627000385/000000.o\" \"/tmp/go-link-627000385/000001.o\" \"/tmp/go-link-627000385/000002.o\" \"/tmp/go-link-627000385/000003.o\" \"/tmp/go-link-627000385/000004.o\" \"/tmp/go-link-627000385/000005.o\" \"/tmp/go-link-627000385/000006.o\" \"/tmp/go-link-627000385/000007.o\" \"/tmp/go-link-627000385/000008.o\" \"/tmp/go-link-627000385/000009.o\" \"/tmp/go-link-627000385/000010.o\" \"/tmp/go-link-627000385/000011.o\" \"/tmp/go-link-627000385/000012.o\" \"/tmp/go-link-627000385/000013.o\" \"-g\" \"-O2\" \"-L/home/boger/golang/test/go/misc/cgo/testso\" \"-lcgosotest\" \"-g\" \"-O2\" \"-lpthread\" \"-no-pie\"\r\n 0.27 cpu time\r\n23451 symbols\r\n26908 liveness data\r\n\r\nALL TESTS PASSED (some were excluded)\r\n```\r\ncommit 6417e91:\r\n```\r\ngo tool dist test testso\r\n\r\n##### ../misc/cgo/testso\r\n# command-line-arguments\r\nHEADER = -H5 -T0x11000 -D0x0 -R0x10000\r\n 0.00 deadcode\r\n 0.01 pclntab=247478 bytes, funcdata total 46718 bytes\r\n 0.01 dodata\r\n 0.01 dwarf\r\n 0.02 symsize = 0\r\n 0.05 reloc\r\n 0.05 asmb\r\n 0.05 datblk\r\n 0.06 sym\r\n 0.06 elfsym\r\n 0.06 symsize = 32880\r\n 0.06 symsize = 33312\r\n 0.07 header\r\n 0.22 host link: \"gcc\" \"-m64\" \"-o\" \"/tmp/go-build377553058/b001/exe/a.out\" \"-rdynamic\" \"/tmp/go-link-215391806/go.o\" \"/tmp/go-link-215391806/000000.o\" \"/tmp/go-link-215391806/000001.o\" \"/tmp/go-link-215391806/000002.o\" \"/tmp/go-link-215391806/000003.o\" \"/tmp/go-link-215391806/000004.o\" \"/tmp/go-link-215391806/000005.o\" \"/tmp/go-link-215391806/000006.o\" \"/tmp/go-link-215391806/000007.o\" \"/tmp/go-link-215391806/000008.o\" \"/tmp/go-link-215391806/000009.o\" \"/tmp/go-link-215391806/000010.o\" \"/tmp/go-link-215391806/000011.o\" \"/tmp/go-link-215391806/000012.o\" \"/tmp/go-link-215391806/000013.o\" \"-g\" \"-O2\" \"-L/home/boger/golang/test/go/misc/cgo/testso\" \"-lcgosotest\" \"-g\" \"-O2\" \"-lpthread\"\r\n 0.29 cpu time\r\n23451 symbols\r\n26908 liveness data\r\n./main.exe: error while loading shared libraries: R_PPC64_ADDR16_HA re10f2f8fa4 for symbol `' out of range\r\n2018/09/05 09:53:14 Failed: exit status 127\r\n```\r\nWe've seen similar problems in the past related to the use of the -pie option. In some distros, gcc uses -pie by default, so golang should be passing -no-pie to the external linker.\r\n\r\nThere were similar error messages with issue #21954."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/419095909","html_url":"https://github.com/golang/go/issues/27510#issuecomment-419095909","issue_url":"https://api.github.com/repos/golang/go/issues/27510","id":419095909,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTA5NTkwOQ==","user":{"login":"ianlancetaylor","id":3194333,"node_id":"MDQ6VXNlcjMxOTQzMzM=","avatar_url":"https://avatars2.githubusercontent.com/u/3194333?v=4","gravatar_id":"","url":"https://api.github.com/users/ianlancetaylor","html_url":"https://github.com/ianlancetaylor","followers_url":"https://api.github.com/users/ianlancetaylor/followers","following_url":"https://api.github.com/users/ianlancetaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianlancetaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianlancetaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianlancetaylor/subscriptions","organizations_url":"https://api.github.com/users/ianlancetaylor/orgs","repos_url":"https://api.github.com/users/ianlancetaylor/repos","events_url":"https://api.github.com/users/ianlancetaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianlancetaylor/received_events","type":"User","site_admin":false},"created_at":"2018-09-06T13:36:39Z","updated_at":"2018-09-06T13:36:39Z","author_association":"CONTRIBUTOR","body":"Please use the go tool's `-x` option so that we can see exactly how cmd/link is being invoked, specifically so that we can see what the `-extldflags` option is.\r\n\r\nCL 130316 was not supposed to change whether we pass `-no-pie` or not, it was just supposed to do a more accurate test of whether the external linker supports the option.  Clearly that is breaking something for you, but we need to find out what is breaking and why."}}
{"actor":{"display_login":"ianlancetaylor"}}