[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 03:02:22 PST 2019


jhenderson added inline comments.


================
Comment at: test/tools/llvm-objcopy/COFF/strip-unneeded.yaml:8-9
+
+# Despite the name, --discard-all (-x) also only removes unreferenced
+# local symbols.
+
----------------
mstorsjo wrote:
> jhenderson wrote:
> > Just to confirm, this is what GNU objcopy does? The ELF side attempts to strip local symbols in this case whether they're referenced or not.
> > 
> > Another difference between the two is that undefined locals are stripped by strip-unneeded, but not discard-all.
> GNU objcopy doesn't strip referenced local symbols, but undefined locals (which I wasn't even aware of being a thing) does indeed seem to have the difference you mention. I'll implement that.
Okay, as there's now a behaviour difference, please split discard-all into a separate test.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56480/new/

https://reviews.llvm.org/D56480





More information about the llvm-commits mailing list