[PATCH] D56211: [llvm-objcopy][ELF] Implement a mutable section visitor that updates size-related fields (Size, EntrySize, Align) before layout.

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 2 11:43:11 PST 2019


rupprecht created this revision.
rupprecht added reviewers: jakehehrlich, jhenderson, alexshap.
Herald added subscribers: llvm-commits, arichardson, emaste.
Herald added a reviewer: espindola.

Fix EntrySize, Size, and Align before doing layout calculation.

As a side cleanup, this removes a dependence on sizeof(Elf_Sym) within BinaryReader, so we can untemplatize that.

This unblocks a cleaner implementation of handling the -O<format> flag. See D53667 <https://reviews.llvm.org/D53667> for a previous attempt. Actual implementation of the -O<format> flag will come in an upcoming commit, this is largely a NFC (although not _totally_ one, because alignment on binary input was actually wrong before).


Repository:
  rL LLVM

https://reviews.llvm.org/D56211

Files:
  test/tools/llvm-objcopy/ELF/binary-input.test
  tools/llvm-objcopy/ELF/Object.cpp
  tools/llvm-objcopy/ELF/Object.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56211.179906.patch
Type: text/x-patch
Size: 14978 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190102/d97b98a3/attachment.bin>


More information about the llvm-commits mailing list