From 2ea995adf092bf0e5aa753843f1af45be68a945c Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Tue, 26 Sep 2017 22:44:01 +0000 Subject: [PATCH] Initialize the RelocationSectionBase::Section member. In r314227, it wasn't always, and would thus contain random garbage. llvm-svn: 314256 --- llvm/tools/llvm-objcopy/Object.cpp | 2 ++ 1 file changed, 2 insertions(+) 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 @@ void RelocationSectionBase::initialize(SectionTableRef SecTable) { setSection(SecTable.getSection(Info, "Info field value " + Twine(Info) + " in section " + Name + " is invalid")); + else + setSection(nullptr); } template void RelocationSectionBase::finalize() { -- 2.7.4