[PATCH] D38260: [llvm-objcopy] Add support for removing sections

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 5 18:23:16 PDT 2017


jakehehrlich updated this revision to Diff 117948.
jakehehrlich added a comment.

1. Removed data-kept test because a) it was a bit redundant as James pointed out and b) I no longer think that is correct functionality as I explained. Basically I wasn't sure what correct functionality was and after talking with Roland McGrath and reading what James wrote I think I'm convinced that overwriting with zeros by default is better than keeping segment data.
2. I made Object::writeSegmentData just behave like it used to which will mimic what GNU objcopy does when an allocated section is removed.


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/remove-shstrtab-error.test
  test/tools/llvm-objcopy/remove-symtab.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.117948.patch
Type: text/x-patch
Size: 29742 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171006/a77a6663/attachment.bin>


More information about the llvm-commits mailing list