[llvm-dev] [LLD] Adding WebAssembly support to lld

Rafael Avila de Espindola via llvm-dev llvm-dev at lists.llvm.org
Mon Jul 3 11:12:41 PDT 2017


Sam Clegg via llvm-dev <llvm-dev at lists.llvm.org> writes:

>> Can you elaborate on semantically what the linker is actually doing for
>> wasm?
>
> You are correct that the wasm linker does have more work to do than a
> traditional linker.  There are more sections that the linker will need
> to re-construct fully.  This is because there is more high level
> information required in the wasm format.  For example, as you point
> out, the type of each function.   Functions also live in their own
> index space outside of the program's memory space.  This means that
> the simple approach of traditional linkers where almost everything can
> be boiled down to virtual addresses don't make as much sense here.
> This is part of the reason why early attempts to use ELF as the
> encapsulation format were abandoned:  wasm is different enough that is
> didn't make sense.

BTW, is that summarized somewhere?

I remember the discussion about having relocations that would resolve to
function numbers, but I don't remember where that failed.

Cheers,
Rafael


More information about the llvm-dev mailing list