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

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 5 11:02:55 PST 2015


> I guess my point is that, if -r offers no real value to users, we may not
> want to support that and instead recommend users use ar.

Fair enough. I don't know how many users there are.

I just tested with gold and bfd. All the relocation are still in the output.

So I think I agree. We should delay this until either

* There is evidence that there are lots of ld -r users.
* We implement relocation resolution as an optimization and it is profitable.

Now that I look at it, -r is pretty odd, it combines the sections with
the same name. So it is not good for fast linking (same relocs) and it
is not good for optimizations (--gc-sections can't do much).

Cheers,
Rafael


More information about the llvm-commits mailing list