[PATCH] D56480: [llvm-objcopy] [COFF] Implmement --strip-unneeded and -x/--discard-all for symbols
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 11 05:35:12 PST 2019
jhenderson added inline comments.
================
Comment at: test/tools/llvm-objcopy/COFF/Inputs/discard-locals.yaml:15
+symbols:
+ - Name: external
+ Value: 0
----------------
Thinking about it, it's probably worth having an undefined external too.
================
Comment at: tools/llvm-objcopy/COFF/COFFObjcopy.cpp:53-54
+ return true;
+ // GNU objcopy keeps referenced local symbols and external symbols
+ // if Config.DiscaredAll is set, similar to what StripUnneeded does,
+ // but undefined local symbols are kept when DiscardAll is set.
----------------
GNU objcopy (probably) doesn't have a "Config.DiscardAll" member. Change this and the StripUnneeded reference to switch names (i.e. --discard-all/--strip-unneeded).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56480/new/
https://reviews.llvm.org/D56480
More information about the llvm-commits
mailing list