This is an archive of the discontinued LLVM Phabricator instance.

[llvm-objcopy] Strip debug sections when running with --strip-unneeded.
ClosedPublic

Authored by rupprecht on Aug 22 2019, 3:52 PM.

Details

Summary

GNU --strip-unneeded strips debugging sections as well. Do that for llvm-objcopy as well.

Additionally, add a test that verifies we keep the .gnu_debuglink section. This apparently was not always the case, and I'm not sure which commit fixed it, but there doesn't appear to be any test coverage to make sure we continue to do so.

This fixes PR41043.

Diff Detail

Event Timeline

rupprecht created this revision.Aug 22 2019, 3:52 PM
This revision is now accepted and ready to land.Aug 23 2019, 3:18 AM
MaskRay accepted this revision.Aug 23 2019, 3:42 AM
This revision was automatically updated to reflect the committed changes.