Skip to content

Commit

Permalink
Initialize the RelocationSectionBase::Section member.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jyknight committed Sep 26, 2017
1 parent 8610edd commit d984b2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/llvm-objcopy/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit d984b2c

Please sign in to comment.