summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Y Knight <jyknight@google.com>2017-09-26 22:44:01 +0000
committerJames Y Knight <jyknight@google.com>2017-09-26 22:44:01 +0000
commit2ea995adf092bf0e5aa753843f1af45be68a945c (patch)
tree292b93ce94a0a1d2512d70f31b39e59aed170d9f
parent347ff633f72492f8a23cd638c4efcf62b06201d9 (diff)
downloadbcm5719-llvm-2ea995adf092bf0e5aa753843f1af45be68a945c.tar.gz
bcm5719-llvm-2ea995adf092bf0e5aa753843f1af45be68a945c.zip
Initialize the RelocationSectionBase::Section member.
In r314227, it wasn't always, and would thus contain random garbage. llvm-svn: 314256
-rw-r--r--llvm/tools/llvm-objcopy/Object.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/tools/llvm-objcopy/Object.cpp b/llvm/tools/llvm-objcopy/Object.cpp
index cb7fddeee77..103937eaac9 100644
--- a/llvm/tools/llvm-objcopy/Object.cpp
+++ b/llvm/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() {
OpenPOWER on IntegriCloud