<div dir="ltr">Yes, I think I agree with you. Since wasm doesn't allow multiple text or data sections in an executable, the notion of section name might useless for text/data sections in the first place. Sam, why do we need that?<div><br><div class="gmail_quote"><div dir="ltr">On Wed, Feb 28, 2018 at 10:38 AM Rafael Avila de Espindola <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Rui Ueyama via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> writes:<br>
<br>
> Author: ruiu<br>
> Date: Tue Feb 27 16:57:28 2018<br>
> New Revision: 326289<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=326289&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=326289&view=rev</a><br>
> Log:<br>
> [WebAssembly] Remove ELF-ness.<br>
><br>
> These output section names are ELF-specific. We shouldn't have this rule<br>
> for WebAssembly.<br>
><br>
> Differential Revision: <a href="https://reviews.llvm.org/D43712" rel="noreferrer" target="_blank">https://reviews.llvm.org/D43712</a><br>
><br>
> Modified:<br>
>     lld/trunk/wasm/Writer.cpp<br>
><br>
> Modified: lld/trunk/wasm/Writer.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/Writer.cpp?rev=326289&r1=326288&r2=326289&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/Writer.cpp?rev=326289&r1=326288&r2=326289&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/wasm/Writer.cpp (original)<br>
> +++ lld/trunk/wasm/Writer.cpp Tue Feb 27 16:57:28 2018<br>
> @@ -839,16 +839,12 @@ void Writer::assignIndexes() {<br>
>  static StringRef getOutputDataSegmentName(StringRef Name) {<br>
>    if (Config->Relocatable)<br>
>      return Name;<br>
> -<br>
> -  for (StringRef V :<br>
> -       {".text.", ".rodata.", ".<a href="http://data.rel.ro" rel="noreferrer" target="_blank">data.rel.ro</a>.", ".data.", ".<a href="http://bss.rel.ro" rel="noreferrer" target="_blank">bss.rel.ro</a>.",<br>
> -        ".bss.", ".init_array.", ".fini_array.", ".ctors.", ".dtors.", ".tbss.",<br>
> -        ".gcc_except_table.", ".tdata.", ".ARM.exidx.", ".ARM.extab."}) {<br>
> -    StringRef Prefix = V.drop_back();<br>
> -    if (Name.startswith(V) || Name == Prefix)<br>
> -      return Prefix;<br>
> -  }<br>
> -<br>
> +  if (Name.startswith(".text."))<br>
> +    return ".text";<br>
> +  if (Name.startswith(".data."))<br>
> +    return ".data";<br>
> +  if (Name.startswith(".bss."))<br>
> +    return ".bss";<br>
<br>
Why do you need even that? Given that it is a new file format it could<br>
always use the equivalent of -fno-unique-section-names, no?<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div></div></div>