[PATCH] D38260: [llvm-objcopy] Add support for removing sections
Jake Ehrlich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 3 17:15:40 PDT 2017
jakehehrlich updated this revision to Diff 117603.
jakehehrlich added a comment.
1. PT_LOAD Segment data is now copied though regardless of section removal
2. Added checks for .shstrtab and .symtab to handle removal of those sections
I also think an error should be added if an allocated section is removed. It isn't clear to me what should happen in that case and the best thing I can come up with in that case is *very* different from what I think GNU objcopy would do. So until we know what should happen when an allocated section is removed I think would should throw an error saying that removing an allocated section isn't supported.
Repository:
rL LLVM
https://reviews.llvm.org/D38260
Files:
test/tools/llvm-objcopy/dynsym-error-remove-strtab.test
test/tools/llvm-objcopy/reloc-error-remove-symtab.test
test/tools/llvm-objcopy/remove-section-with-symbol.test
test/tools/llvm-objcopy/remove-section.test
test/tools/llvm-objcopy/segment-shift-section-remove.test
test/tools/llvm-objcopy/segment-test-remove-section.test
test/tools/llvm-objcopy/symtab-error-on-remove-strtab.test
tools/llvm-objcopy/Object.cpp
tools/llvm-objcopy/Object.h
tools/llvm-objcopy/llvm-objcopy.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38260.117603.patch
Type: text/x-patch
Size: 27415 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171004/225e4a55/attachment.bin>
More information about the llvm-commits
mailing list