[PATCH] D105217: [LLD] Adding support for RELA for CG Profile.

Alexander Yermolovich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 30 12:35:01 PDT 2021


ayermolo added a comment.

In D105217#2850944 <https://reviews.llvm.org/D105217#2850944>, @MaskRay wrote:

> I feel uneasy with the additional complexity. I am not sure we want this just to make `strip -S` happy. Can you use `llvm-strip -S`?

Although llvm-strip does have the "correct/expected" behavior I think it's a too strict requirement on the users. Specifically I am thinking of large build systems with multiple projects. Right now it will be an assert

  if (obj->cgProfileRel.size() != obj->cgProfile.size() * 2)
     fatal("number of relocations doesn't match Weights");

Which in context is not a descriptive error message.
Owners of projects will need to dig in to LLD source code, and change their workflow.

Also strip and objcopy are standard GNU tools that I think used interchangeably with llvm tools, and it's worth for LLD to continue to support them, and not force users in to using llvm tools.

I understand that this ads complexity, but I think the benefit of enabling support for more tools and reducing work on users of lld out-weights it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105217/new/

https://reviews.llvm.org/D105217



More information about the llvm-commits mailing list