[PATCH] D38335: [llvm-objcopy] Add support for --strip-sections to remove all section headers leaving only program headers and loadable segment data

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 15:07:40 PDT 2017


jakehehrlich created this revision.

elf utils implements a particularly extreme form of stripping that I'd like to support. eu-strip has an option called "strip-sections" that removes all section headers and leaves only program headers  and the segment data. I have implemented this option partly as a test and partly because in Fuchsia we would like to use this option to minimize the size of our executables. The other strip options that are on my list include --strip-all and --strip-debug. This is a preliminary implementation that I'd like to start using in Fuchsia builds if possible.


Repository:
  rL LLVM

https://reviews.llvm.org/D38335

Files:
  test/tools/llvm-objcopy/strip-sections.test
  tools/llvm-objcopy/Object.cpp
  tools/llvm-objcopy/llvm-objcopy.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38335.116889.patch
Type: text/x-patch
Size: 7258 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170927/e0b3f7ed/attachment.bin>


More information about the llvm-commits mailing list