[PATCH] D46819: [llvm-objcopy] Add --keep-symbol (-K) option

Paul Semel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 14 02:52:24 PDT 2018


paulsemel added a comment.

In https://reviews.llvm.org/D46819#1097538, @jhenderson wrote:

> Code change looks fine to me. However, what is the GNU objcopy behaviour for doing --strip-symbol/--keep-symbol in the same command-line? Does last win, or is the symbol always kept, or is the symbol always discarded? Please also add a test for our behaviour for this pair of switches, as it is an interesting edge case.


So, for --strip-symbol as for --discard options, the --keep-symbol option win on the previous ones, that's why I didn't add a second test, but I can do it for sure :)

> Also, I know that at this stage the behaviour of --keep-symbol doesn't affect symbols in discarded sections (e.g. due to --remove-section), but could you add a test for attempting to keep a symbol in such a section anyway, please, to document the behaviour, in case we decide to refactor things later.

Sure, I will add a test for this behavior !


Repository:
  rL LLVM

https://reviews.llvm.org/D46819





More information about the llvm-commits mailing list