[PATCH] D46896: [llvm-objcopy] Add --strip-unneeded option

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 16 01:23:40 PDT 2018


jhenderson added a comment.

ET_REL is different to ET_DYN/EXEC because the former is usually the input to a static linker, whereas the latter isn't (at least, not in the same sense). The difference is the use of static relocations versus dynamic relocations. llvm-objcopy already knows about the difference between these relocation sections, by using whether SHF_ALLOC has been set, and as far as I remember, it doesn't pay attention to the elf type at all (except to reflect it in the output file). I don't see why we should pay any more attention to the type in this case either.

In summary: like @jakehehrlich, I don't expect to see the ELF type check, nor do I think we need different tests for the different types.


Repository:
  rL LLVM

https://reviews.llvm.org/D46896





More information about the llvm-commits mailing list