{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/9210","labels_url":"https://api.github.com/repos/golang/go/issues/9210/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/9210/comments","events_url":"https://api.github.com/repos/golang/go/issues/9210/events","html_url":"https://github.com/golang/go/issues/9210","id":51289240,"number":9210,"title":"cmd/link: remove text relocations from android libraries","user":{"login":"gopherbot","id":8566911,"avatar_url":"https://avatars.githubusercontent.com/u/8566911?v=3","gravatar_id":"","url":"https://api.github.com/users/gopherbot","html_url":"https://github.com/gopherbot","followers_url":"https://api.github.com/users/gopherbot/followers","following_url":"https://api.github.com/users/gopherbot/following{/other_user}","gists_url":"https://api.github.com/users/gopherbot/gists{/gist_id}","starred_url":"https://api.github.com/users/gopherbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gopherbot/subscriptions","organizations_url":"https://api.github.com/users/gopherbot/orgs","repos_url":"https://api.github.com/users/gopherbot/repos","events_url":"https://api.github.com/users/gopherbot/events{/privacy}","received_events_url":"https://api.github.com/users/gopherbot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/6","html_url":"https://github.com/golang/go/milestones/Unplanned","labels_url":"https://api.github.com/repos/golang/go/milestones/6/labels","id":1055141,"number":6,"title":"Unplanned","description":"No plan to fix in any specific release.\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":881,"closed_issues":48,"state":"open","created_at":"2015-04-06T20:47:19Z","updated_at":"2015-06-17T00:11:41Z","due_on":"2099-12-31T05:00:00Z","closed_at":null},"comments":25,"created_at":"2014-12-05T18:27:05Z","updated_at":"2015-06-17T08:50:04Z","closed_at":null,"body":"by **momchil.dev**:\n\n<pre>What does 'go version' print?\n\ngo version go1.4rc2 darwin/amd64\n\nWhat happened?\n\nI am compiling a shared library for android/arm. I then use this library from a\nJava-based android application. \n\nWhen I run the application on a Nexus 5 device with Lollipop, I get a\n&quot;libexample.so has text relocations. This is wasting memory and prevents security\nhardening. Please fix.&quot;\n\nIf I run the same application on an old Kitkat Asus Transformer Pad TF301T, I don't get\nany errors at all and everything works as expected.\n\nPlease provide any additional information below.\n\nI don't have much experience in developing native libraries but the fact that it works\non one device and not the other seems strange.\n\nYou can find the code for the library here:\n<a href=\"https://github.com/momchil-atanasov/go-android-lib\">https://github.com/momchil-atanasov/go-android-lib</a>\nYou can find the code for the android app here:\n<a href=\"https://github.com/momchil-atanasov/go-android-app\">https://github.com/momchil-atanasov/go-android-app</a>\n\nHope this helps! Can't wait for the official release of 1.4.</pre>"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/112723744","html_url":"https://github.com/golang/go/issues/9210#issuecomment-112723744","issue_url":"https://api.github.com/repos/golang/go/issues/9210","id":112723744,"user":{"login":"minux","id":135652,"avatar_url":"https://avatars.githubusercontent.com/u/135652?v=3","gravatar_id":"","url":"https://api.github.com/users/minux","html_url":"https://github.com/minux","followers_url":"https://api.github.com/users/minux/followers","following_url":"https://api.github.com/users/minux/following{/other_user}","gists_url":"https://api.github.com/users/minux/gists{/gist_id}","starred_url":"https://api.github.com/users/minux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minux/subscriptions","organizations_url":"https://api.github.com/users/minux/orgs","repos_url":"https://api.github.com/users/minux/repos","events_url":"https://api.github.com/users/minux/events{/privacy}","received_events_url":"https://api.github.com/users/minux/received_events","type":"User","site_admin":false},"created_at":"2015-06-17T08:50:04Z","updated_at":"2015-06-17T08:50:04Z","body":"We don't need to remove constant pools, we just need to remove\naddresses in constant pools, and yes, I believe you're right, one\nsolution is to introduce R_ADDRARM relocation type and use two\ninstructions to load (PIC) address directly into register.\n\nAnother possible way is to record PIC address in constant pool,\nand turn:\n   MOVW $name(SB), R0\ninto:\n   ldr [pc, #xxx], r11 ; load PIC address into r11\n   add pc, r11, r0\n\nBut we need to make sure that constant pool entries are not reused.\n"}}