[PATCH] D43940: [WebAssembly] Reorder reloc sections to come between symtab and name

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 2 10:25:58 PST 2018


sbc100 added inline comments.


================
Comment at: tools/yaml2obj/yaml2wasm.cpp:545
+  }
+
   return 0;
----------------
ncw wrote:
> sbc100 wrote:
> > I thought we decided this didn't need to change?  i.e. we don't care about relative ordering of name vs reloc or linking sections.  At least this change relates to reloc vs linking sections, so I'm not sure why the name section moved too.   
> I think it would be nice to have "name" come after "linking" at least. (Since we set the name for inputchunks based on the first symbol that references them or the name from the name section, with the name section "winning".)
> 
> I'd still personally prefer to nail down the order of the sections, so that compat between tools is guaranteed and no-one needs to try to handle different orderings for the sections; I haven't quite been convinced on the benefits being lenient in section ordering.
> 
> This change does exactly what the PR title says: moves reloc to come between linking/symtab and name sections. So in that sense, I've done a matching change in yaml2wasm and WasmObjectWriter.
But we are not the only consumer or producer or wasm files, so we need to as flexible as the spec allows.

I you revert this file this change still does what you want for now, doesn't it?    If you don't mind doing that then this LGTM and we can discuss moving the name section separately.


Repository:
  rL LLVM

https://reviews.llvm.org/D43940





More information about the llvm-commits mailing list