{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/37530","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/37530/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/37530/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/37530/events","html_url":"https://github.com/rust-lang/rust/issues/37530","id":186714856,"number":37530,"title":"stop exporting every symbol","user":{"login":"m4b","id":1920204,"avatar_url":"https://avatars.githubusercontent.com/u/1920204?v=3","gravatar_id":"","url":"https://api.github.com/users/m4b","html_url":"https://github.com/m4b","followers_url":"https://api.github.com/users/m4b/followers","following_url":"https://api.github.com/users/m4b/following{/other_user}","gists_url":"https://api.github.com/users/m4b/gists{/gist_id}","starred_url":"https://api.github.com/users/m4b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m4b/subscriptions","organizations_url":"https://api.github.com/users/m4b/orgs","repos_url":"https://api.github.com/users/m4b/repos","events_url":"https://api.github.com/users/m4b/events{/privacy}","received_events_url":"https://api.github.com/users/m4b/received_events","type":"User","site_admin":false},"labels":[{"id":285350740,"url":"https://api.github.com/repos/rust-lang/rust/labels/A-compiler","name":"A-compiler","color":"d7e102","default":false},{"id":37547,"url":"https://api.github.com/repos/rust-lang/rust/labels/A-linkage","name":"A-linkage","color":"d7e102","default":false},{"id":211668100,"url":"https://api.github.com/repos/rust-lang/rust/labels/T-compiler","name":"T-compiler","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":32,"created_at":"2016-11-02T05:21:54Z","updated_at":"2016-11-23T22:23:18Z","closed_at":null,"body":"On Linux, a typical rust ELF dynamic library will export every symbol on earth, e.g.:\r\n\r\n```\r\nobjdump -T ~/projects/goblin/target/debug/libgoblin.so | wc -l\r\n2558\r\n```\r\n\r\nwhich looks like most of `core` and `std`, e.g.:\r\n\r\n```\r\n107680 _ZN4core3num52_$LT$impl$u20$core..str..FromStr$u20$for$u20$u16$GT$8from_str17he60266b17184e647E (114)\r\n```\r\n\r\nWhy not do this?  Well, it's just The Right Thing To Do :tm: but also, technically it unnecessarily increases the size of the binary by adding dynamic symbol entries + string table entires, in addition to bloom filter words.\r\n\r\nIt might slightly increase dynamic loading time but I'm probably lying now to increase bullet points for why we shouldn't export all the symbols.\r\n\r\nI suspect this may have come up already but I can't seem to find it, but I recall perhaps it had something to do with a requirement of std to make all their symbols public and this is somehow reflected in the binary? or perhaps it was something to do with more 3rd party linker nonsense.\r\n\r\nAnyway, if there's a technical possibility to stop it, we should try and be good binary citizens."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/262644610","html_url":"https://github.com/rust-lang/rust/issues/37530#issuecomment-262644610","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/37530","id":262644610,"user":{"login":"michaelwoerister","id":1825894,"avatar_url":"https://avatars.githubusercontent.com/u/1825894?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelwoerister","html_url":"https://github.com/michaelwoerister","followers_url":"https://api.github.com/users/michaelwoerister/followers","following_url":"https://api.github.com/users/michaelwoerister/following{/other_user}","gists_url":"https://api.github.com/users/michaelwoerister/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelwoerister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelwoerister/subscriptions","organizations_url":"https://api.github.com/users/michaelwoerister/orgs","repos_url":"https://api.github.com/users/michaelwoerister/repos","events_url":"https://api.github.com/users/michaelwoerister/events{/privacy}","received_events_url":"https://api.github.com/users/michaelwoerister/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T22:23:18Z","updated_at":"2016-11-23T22:23:18Z","body":"I pushed a fix for the problem mentioned above. It now seems to work for me (tested with `objdump -T`)"}}
{"actor":{"display_login":"michaelwoerister"}}