[llvm-objcopy] Refactor code to include initialize method
authorJake Ehrlich <jakehehrlich@google.com>
Mon, 25 Sep 2017 20:37:28 +0000 (20:37 +0000)
committerJake Ehrlich <jakehehrlich@google.com>
Mon, 25 Sep 2017 20:37:28 +0000 (20:37 +0000)
commitf5a4377333d34240470a65928f5ad3ce06f5c28a
tree023aa4a5c798910d4b9662a51fe45033b85b8f8c
parentecb175608f2c26b4cf728d294ab642a0753e9b27
[llvm-objcopy] Refactor code to include initialize method

This change refactors some of the code to allow for some code
deduplication in later diffs as well as just to make adding a new
section type more self contained to the class itself. The idea for this
was first mentioned by James in D 37915 and will be used in that change
as recommended.

This change follows changes for dynamic sections but precedes support
for dynamic relocations.

Differential Revision: https://reviews.llvm.org/D38008

llvm-svn: 314148
llvm/tools/llvm-objcopy/Object.cpp
llvm/tools/llvm-objcopy/Object.h