From: James Y Knight Date: Tue, 26 Sep 2017 22:44:01 +0000 (+0000) Subject: Initialize the RelocationSectionBase::Section member. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d984b2cfdab2d2112ca416054ab46ea2e2371c9b;p=llvm 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 --- 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::initialize(SectionTableRef SecTable) { setSection(SecTable.getSection(Info, "Info field value " + Twine(Info) + " in section " + Name + " is invalid")); + else + setSection(nullptr); } template void RelocationSectionBase::finalize() {