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

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 14 02:41:01 PDT 2018


jhenderson added a comment.

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.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D46819





More information about the llvm-commits mailing list