diff options
-rw-r--r-- | bolt/lib/Core/BinarySection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bolt/lib/Core/BinarySection.cpp b/bolt/lib/Core/BinarySection.cpp index a8fc4f0..97bc251 100644 --- a/bolt/lib/Core/BinarySection.cpp +++ b/bolt/lib/Core/BinarySection.cpp @@ -72,7 +72,8 @@ BinarySection::hash(const BinaryData &BD, void BinarySection::emitAsData(MCStreamer &Streamer, const Twine &SectionName) const { - StringRef SectionContents = getContents(); + StringRef SectionContents = + isFinalized() ? getOutputContents() : getContents(); MCSectionELF *ELFSection = BC.Ctx->getELFSection(SectionName, getELFType(), getELFFlags()); |