Initialize the RelocationSectionBase::Section member.
In r314227, it wasn't always, and would thus contain random garbage.
llvm-svn: 314256
diff --git a/llvm/tools/llvm-objcopy/Object.cpp b/llvm/tools/llvm-objcopy/Object.cpp
index cb7fdde..103937e 100644
--- a/llvm/tools/llvm-objcopy/Object.cpp
+++ b/llvm/tools/llvm-objcopy/Object.cpp
@@ -218,6 +218,8 @@
setSection(SecTable.getSection(Info,
"Info field value " + Twine(Info) +
" in section " + Name + " is invalid"));
+ else
+ setSection(nullptr);
}
template <class SymTabType> void RelocationSectionBase<SymTabType>::finalize() {