{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/11184","labels_url":"https://api.github.com/repos/golang/go/issues/11184/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/11184/comments","events_url":"https://api.github.com/repos/golang/go/issues/11184/events","html_url":"https://github.com/golang/go/issues/11184","id":87759563,"number":11184,"title":"cmd/link: external linking for ppc64le doesn't work","user":{"login":"laboger","id":9433228,"avatar_url":"https://avatars.githubusercontent.com/u/9433228?v=3","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":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/25","html_url":"https://github.com/golang/go/milestones/Go1.6Early","labels_url":"https://api.github.com/repos/golang/go/milestones/25/labels","id":1182837,"number":25,"title":"Go1.6Early","description":"Go 1.6 issues that need to be fixed before the code freeze.\r\n","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","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":93,"closed_issues":31,"state":"open","created_at":"2015-06-26T15:47:06Z","updated_at":"2015-09-30T00:59:30Z","due_on":"2015-10-31T04:00:00Z","closed_at":null},"comments":13,"created_at":"2015-06-12T15:19:16Z","updated_at":"2015-10-02T12:35:51Z","closed_at":null,"body":"Currently external linking is not enabled for ppc64le in golang master probably because it doesn't work as is, but there are some existing CLs that mostly provide the support needed to make external linking work with some minor modifications.  I'm using Ubuntu 14.04 and 14.10.\r\n\r\nFollowing are the list of errors that occur.  I've noted the files from existing CLs that were used to resolve the errors.\r\n\r\n#1 is needed to enable external linking with ppc64le, otherwise an error occurs at link time.\r\n#2 is needed to enabled base support for Power relocations, otherwise errors occur concerning undefined relocations\r\n#3 is needed for cgo to work\r\n#4 is needed to correctly handle the runtime.tlsg symbol which appears in tls_ppc64x.s.  Otherwise runtime segv's occur when running programs built with external linking.\r\n\r\nHere are the files from the CLs with notes on what needs changing.\r\n\r\n1) https://go-review.googlesource.com/#/c/9673/3/src/cmd/9l/obj.go\r\nChange the compare string from \"ppc64le\" to \"ppc\" to enable external linking for ppc64le.  Without this external linking on ppc64le is not enabled.  File is now in a different directory cmd/link/internal/ppc64.\r\n2) https://go-review.googlesource.com/#/c/9673/3/src/cmd/9l/asm.go\r\nBase support for Power specific relocations.  This file has been moved to a different directory so the patches need to be applied to the new file in cmd/link/internal/ppc64\r\n3) https://go-review.googlesource.com/#/c/9676/4/src/runtime/cgo.go\r\nNeeded\r\n4) https://go-review.googlesource.com/#/c/9677/4/src/cmd/9l/asm.go\r\nNew file asm.go is in cmd/link/internal/ppc64/\r\nAdditional support needed for Tlsg symbol.  When the TPREL relocation is used then 0x7000 must be added to the offset since the TPREL relocation subtracts off that amount and the tls_ppc64x.s code also subtracts off 0x7000.\r\n\r\nI don't understand the status of these CLs, especially those that cannot be merged anymore because the files are in different directories.  Can someone clarify?  It was be good if we could get these changes in so external linking for ppc64le can be enabled and made to work."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/145005086","html_url":"https://github.com/golang/go/issues/11184#issuecomment-145005086","issue_url":"https://api.github.com/repos/golang/go/issues/11184","id":145005086,"user":{"login":"laboger","id":9433228,"avatar_url":"https://avatars.githubusercontent.com/u/9433228?v=3","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},"created_at":"2015-10-02T12:35:51Z","updated_at":"2015-10-02T12:35:51Z","body":"I might have made a mistake in my previous testing, I am no longer able to pull your CLs and build a toolchain that works for ppc64le.  There are multiple dependent CLs and I'm not sure how to get all the right code.  Any suggestions on how to do that would be helpful, or maybe they need to be rebased.\r\n\r\nThese CLs haven't been looked at for over two weeks.  "}}