[PATCH] D42222: [llvm-objcopy] Refactor llvm-objcopy to use reader and writer objects

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 15:01:49 PST 2018


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

Added test to check one of the error messages that BianrySectionWriter can generate. I only test the symtab case. The other two cases are hard to test without a way to edit the sections after they've been read in (with like --set-section-flags or something). Relocations are read in as DynamicRelocationSections when allocated so this whole issue is bypassed. Since GnuDebuglinkSection is never read in, only added, there isn't a way to make a binary that will trigger that code path. Once --set-section-flags exists it will be able to dynamically change these values and trigger these cases.


Repository:
  rL LLVM

https://reviews.llvm.org/D42222

Files:
  test/tools/llvm-objcopy/Inputs/alloc-symtab.o
  test/tools/llvm-objcopy/binary-out-error.test
  test/tools/llvm-objcopy/remove-shstrtab-error.test
  tools/llvm-objcopy/Object.cpp
  tools/llvm-objcopy/Object.h
  tools/llvm-objcopy/llvm-objcopy.cpp
  tools/llvm-objcopy/llvm-objcopy.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42222.131149.patch
Type: text/x-patch
Size: 59828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180123/ce38e547/attachment.bin>


More information about the llvm-commits mailing list