{"action":"created","issue":{"url":"https://api.github.com/repos/WebAssembly/tool-conventions/issues/52","repository_url":"https://api.github.com/repos/WebAssembly/tool-conventions","labels_url":"https://api.github.com/repos/WebAssembly/tool-conventions/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/WebAssembly/tool-conventions/issues/52/comments","events_url":"https://api.github.com/repos/WebAssembly/tool-conventions/issues/52/events","html_url":"https://github.com/WebAssembly/tool-conventions/issues/52","id":315668446,"number":52,"title":"Referring to other sections in linking metadata","user":{"login":"sbc100","id":515813,"avatar_url":"https://avatars2.githubusercontent.com/u/515813?v=4","gravatar_id":"","url":"https://api.github.com/users/sbc100","html_url":"https://github.com/sbc100","followers_url":"https://api.github.com/users/sbc100/followers","following_url":"https://api.github.com/users/sbc100/following{/other_user}","gists_url":"https://api.github.com/users/sbc100/gists{/gist_id}","starred_url":"https://api.github.com/users/sbc100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbc100/subscriptions","organizations_url":"https://api.github.com/users/sbc100/orgs","repos_url":"https://api.github.com/users/sbc100/repos","events_url":"https://api.github.com/users/sbc100/events{/privacy}","received_events_url":"https://api.github.com/users/sbc100/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-18T22:48:46Z","updated_at":"2018-04-23T22:18:30Z","closed_at":null,"author_association":"MEMBER","body":"There is currently only one place where we need to do this:  In the reloc sections when we specify the section to which the relocations are to be applied: https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md#relocation-sections\r\n\r\nBut we are about to add another for WASM_SYMBOL_TYPE_SECTION: https://reviews.llvm.org/D44184\r\n\r\nIn the existing code the method used to refer to another sections is by \"section code + optional string if code is 0\".   This has several downsides:\r\n\r\n- it means you can't have multiple custom sections with the same name\r\n- it makes the code and API messy/complex\r\n- its a waste of space to duplicate these strings in the binary\r\n\r\nTo see how to makes the code complex look at the proposed to change WasmSymbolInfo.  It would be much nicer to simpy reuse the existing ElementIndex field here.\r\n\r\nSo I propose that we refer to sections instead by their index within the module.  This would be a new index space used only my the linking metadata fields.\r\n\r\nThe only downside to doing this AFAICT is that it would mean tools that blindly insert/remove sections in the middle of the file would break that metadata sections.  Looks at the ELF spec, they already have this problem and the tools are built to rewrite index when they do that kind of thing.\r\n"},"comment":{"url":"https://api.github.com/repos/WebAssembly/tool-conventions/issues/comments/383740968","html_url":"https://github.com/WebAssembly/tool-conventions/issues/52#issuecomment-383740968","issue_url":"https://api.github.com/repos/WebAssembly/tool-conventions/issues/52","id":383740968,"user":{"login":"sbc100","id":515813,"avatar_url":"https://avatars2.githubusercontent.com/u/515813?v=4","gravatar_id":"","url":"https://api.github.com/users/sbc100","html_url":"https://github.com/sbc100","followers_url":"https://api.github.com/users/sbc100/followers","following_url":"https://api.github.com/users/sbc100/following{/other_user}","gists_url":"https://api.github.com/users/sbc100/gists{/gist_id}","starred_url":"https://api.github.com/users/sbc100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbc100/subscriptions","organizations_url":"https://api.github.com/users/sbc100/orgs","repos_url":"https://api.github.com/users/sbc100/repos","events_url":"https://api.github.com/users/sbc100/events{/privacy}","received_events_url":"https://api.github.com/users/sbc100/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T22:18:30Z","updated_at":"2018-04-23T22:18:30Z","author_association":"MEMBER","body":" https://reviews.llvm.org/D45980\r\n"}}
{"actor":{"display_login":"sbc100"}}