[PATCH] D39769: [llvm-objcopy] Add --strip-all option to remove all non-allocated sections but keep section header table
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 8 03:09:06 PST 2017
jhenderson added a comment.
I took a look at GNU objcopy's --strip-all behaviour and it is slightly different to what you have implemented here. I haven't been able to pin down the exact semantics yet, but I noticed that it kept the .comment section, for example. My suspicion is that it explicitly only strips the .debug and .symtab sections, along with the symbol string table, if it is not shared as the section header table.
Otherwise, the code change looks fine to me.
================
Comment at: test/tools/llvm-objcopy/strip-all.test:1
+# RUN: yaml2obj %s > %t
+# RUN: llvm-objcopy --strip-all %t %t2
----------------
This test should really have some other sections in it. What sections are actually being stripped here (I assume the symbol table is)? What about debug sections, which are also stripped by GNU objcopy --strip-all?
Repository:
rL LLVM
https://reviews.llvm.org/D39769
More information about the llvm-commits
mailing list