[PATCH] D46369: [llvm-objcopy] Add --strip-symbol (-N) option

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 3 17:26:07 PDT 2018


jakehehrlich added a comment.

Can you see what GNU objcopy does when the symbol is defined (both local and global cases)? Roland mentioned that in the defined case it might actually transform the relocation into a section relative relocation instead! That'd be pretty neat IMO but is likely out of the scope of this diff (even with added complexity already mentioned). If it turns out that GNU objcopy emits a section reletive relocation in that case then we can add a TODO there.

Roland also provided some thoughts on what to do with groups. I think I agree that for now should throw an error and make sure to mention all sections that would need to be removed via -R to make it go though. If someone ever submits a bug saying that removing the symbol for a group section doesn't remove the group we can change that behavior.


Repository:
  rL LLVM

https://reviews.llvm.org/D46369





More information about the llvm-commits mailing list