This is an archive of the discontinued LLVM Phabricator instance.

[llvm-objcopy] Add --only-keep-alloc option to remove all non-allocated sections
ClosedPublic

Authored by jakehehrlich on Nov 10 2017, 3:02 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

jakehehrlich created this revision.Nov 10 2017, 3:02 PM
jakehehrlich added a subscriber: llvm-commits.
jhenderson edited edge metadata.Nov 13 2017, 3:20 AM

Test case?

tools/llvm-objcopy/llvm-objcopy.cpp
86 ↗(On Diff #122536)

I feel like "strip-nonalloc" (or "strip-non-alloc") would be a better option name, personally, as it's more consistent with other options.

  1. Added test (derp, it turns out I wrote it but didn't run git add on it so it didn't make it into the diff)
  2. renamed "only-keep-alloc" with "strip-non-alloc" everywhere.
This revision is now accepted and ready to land.Nov 14 2017, 2:26 AM
This revision was automatically updated to reflect the committed changes.

--strip-non-alloc keeps .strtab but --strip-sections does not. Is this the only difference of them?