[LLVMdev] llvm-link as an extension

hdwivedi at codeaurora.org hdwivedi at codeaurora.org
Wed Dec 3 21:11:24 PST 2014


Hi all,

I understood that llvm-link's capabilities are going to be merged in lld
sometime in the future. However, would it be beneficial to make llvm-link
itself a pluggable library which can be used by any linker?

So say a linker, can have a flag like Wlinker=-enable-llvm-link, which
uses a llvm-link library, like LD_LIBRARY_PATH=/path/to/llvm-link.so, that
way llvm-link can use the symbol resolution table of this linker to link
the IR code (so llvm-link doesn't have to have linker's logic).

This will help extend the capability to have the full program IR, even
when using other linkers other than lld and potentially simpler because
llvm-link can use the linker's symbol resolution table for linker logic.

One potential issue that I see with this approach, is when linking
precompiled libraries which may not have any IR, in which case some
annotation in the final IR could indicate that there is linkage with an
object file.

Also, I don't have a very clear idea if this would be an extremely heavy
undertaking :)

Sorry if this has been answered in the past, I just wondered what
downsides might be to this possible approach?

Regards,

Harsh

Qualcomm Innovation Center, Inc.

The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
Linux Foundation Collaborative Project







More information about the llvm-dev mailing list