[PATCH] D14382: [ELF2] - Basic implementation of -r/--relocatable

Ed Maste via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 14:47:16 PST 2015


On 18 November 2015 at 17:01, Rui Ueyama <ruiu at google.com> wrote:
>
> Thanks for the info. I saw some need for -r, and I agree that this is just
> one case and there would be other use cases in the wild. At the same time, I
> feel like they do that way since the linker supports that feature, which
> could have been done in a different way. They could update the code to
> remove dependency to the -r functionality. (I'm happy to contribute such
> patch to a project that uses -r.) It is much harder to remove a feature than
> adding, so I'd want to be conservative now.

Indeed. It will be some time before this is the only issue preventing
lld from being a viable linker to include with the FreeBSD base
system. Eventually we'll determine that there's enough demand for -r
in lld, or that we should look for a different way to approach this in
FreeBSD.

> It sounds like OpenPAM static build could be updated so that it does not use
> -r, couldn't it?

The linker set functionality is very convenient, but if I had to
implement it without -r I imagine I'd generate a file at build time
that references each of the individual modules, and #include it from
the C source.


More information about the llvm-commits mailing list