<div dir="ltr">(one option to allow faster progress without solving all issues in the linker space up-front, especially when starting with an implementation in LLD anyway, would be to make the format only compatible with lld and potentially only compatible with a matching lld version (I don't in general like this idea, and for example, pushed back recently on work related to linker ODR checking that would create such a dependence for that feature - but I think as a short/intermediate term, with the goal to working towards a more stable/portable format it might be worth considering) - that way there's no baked in, backwards compatible format, and you can iterate, fix issues in the format that lead to performance issues in the linker, etc, and then when it's baked enough, declare it to be the format that shall be supported/portable/etc)</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 3, 2017 at 11:13 AM Rafael Avila de Espindola via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sam Clegg via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> writes:<br>
<br>
>> Can you elaborate on semantically what the linker is actually doing for<br>
>> wasm?<br>
><br>
> You are correct that the wasm linker does have more work to do than a<br>
> traditional linker.  There are more sections that the linker will need<br>
> to re-construct fully.  This is because there is more high level<br>
> information required in the wasm format.  For example, as you point<br>
> out, the type of each function.   Functions also live in their own<br>
> index space outside of the program's memory space.  This means that<br>
> the simple approach of traditional linkers where almost everything can<br>
> be boiled down to virtual addresses don't make as much sense here.<br>
> This is part of the reason why early attempts to use ELF as the<br>
> encapsulation format were abandoned:  wasm is different enough that is<br>
> didn't make sense.<br>
<br>
BTW, is that summarized somewhere?<br>
<br>
I remember the discussion about having relocations that would resolve to<br>
function numbers, but I don't remember where that failed.<br>
<br>
Cheers,<br>
Rafael<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>