[lld] adding new lld target to the backend

Hello developers,

I am currently working on llvm version 3.8, which will be updated to the new version in the future. But for now I want to add a new lld target (SIMD) to the backend. I`d like to know it that is possible. If yes, where should I start? Is there any menu or tutorial that I can follow? Thanks!

kind regards,
Xianglong

Hi Meng,

I’m a developer of LLD. I cannot say if it is doable without knowing more about the processor and the ABI, but if the file format is ELF and it doesn’t require any crazy stuff beyond what the normal ELF format requires, then the answer is probably yes.

Could you tell me more about the target you want to add?

The first document you want to read to understand the whole picture of the linker design is http://lld.llvm.org/NewLLD.html. If you haven’t read that, please read. Almost all target-dependent code is in ELF/Target.cpp, so that is probably the next file you want to read after the NewLLD document.

There is some content here: http://jonathan2251.github.io/lbt/lld.html#create-cpu0-backend-under-lld

– Sean Silva