[PATCH] D16540: Avoid almost duplication in .dynamic finalize and write.

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 09:54:53 PST 2016


rafael created this revision.
rafael added a reviewer: ruiu.
rafael added a subscriber: llvm-commits.
rafael set the repository for this revision to rL LLVM.

There are a few cases where we have almost duplicated code.

This patches fixes the simplest: the finalize and write of dynamic section. Right now they have to have exactly the same structure to decide if a DT_* entry is needed and then to actually write it.

We cannot just write it to a std::vector in the first pass since addresses have not been computed yet.

Repository:
  rL LLVM

http://reviews.llvm.org/D16540

Files:
  ELF/OutputSections.cpp
  ELF/OutputSections.h
  ELF/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16540.45875.patch
Type: text/x-patch
Size: 12283 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160125/923d298e/attachment.bin>


More information about the llvm-commits mailing list