[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
Tue Oct 3 16:54:39 PDT 2017


jakehehrlich added a comment.

After some thought I agree. Here's the plan I propose

1. Update https://reviews.llvm.org/D38260 to add the supported features (including targeted tests that don't just remove everything)
2. rebase those changes into this change
3. Add a Boolean for weather or not to output a section table
4. Have --strip-sections remove all sections *and* set that boolean.

An interesting option from there might be to implement a flag to toggle weather or not the section table is output from there. "llvm-objcopy --strip-sections" would then become equivalent to "llvm-objcopy --no-section-headers -R *" if we were implement globs for section names in section removal.


Repository:
  rL LLVM

https://reviews.llvm.org/D38335





More information about the llvm-commits mailing list