diff options
author | James Y Knight <jyknight@google.com> | 2017-09-26 22:44:01 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2017-09-26 22:44:01 +0000 |
commit | d984b2cfdab2d2112ca416054ab46ea2e2371c9b (patch) | |
tree | 99b153906facabc1dce934318eb9ec85db2ff81f /tools/llvm-objcopy | |
parent | 8610eddfd7dc11d149c068ec97adbd42b34f25d1 (diff) |
Initialize the RelocationSectionBase::Section member.
In r314227, it wasn't always, and would thus contain random garbage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314256 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-objcopy')
-rw-r--r-- | tools/llvm-objcopy/Object.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/llvm-objcopy/Object.cpp b/tools/llvm-objcopy/Object.cpp index cb7fddeee77..103937eaac9 100644 --- a/tools/llvm-objcopy/Object.cpp +++ b/tools/llvm-objcopy/Object.cpp @@ -218,6 +218,8 @@ void RelocationSectionBase<SymTabType>::initialize(SectionTableRef SecTable) { setSection(SecTable.getSection(Info, "Info field value " + Twine(Info) + " in section " + Name + " is invalid")); + else + setSection(nullptr); } template <class SymTabType> void RelocationSectionBase<SymTabType>::finalize() { |