Fix pr24486.
[oota-llvm.git] / lib / Target / Hexagon / MCTargetDesc / HexagonMCELFStreamer.cpp
index bf51c3515e95116f8d01c5004bf9cf92091f8ab7..1bec375f33ee045425d56dadfb8720f00f6a392b 100644 (file)
@@ -114,7 +114,7 @@ void HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(MCSymbol *Symbol,
     MCSection *Section = getAssembler().getContext().getELFSection(
         SectionName, ELF::SHT_NOBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC);
     SwitchSection(Section);
-    AssignSection(Symbol, Section);
+    AssignFragment(Symbol, getCurrentFragment());
 
     MCELFStreamer::EmitCommonSymbol(Symbol, Size, ByteAlignment);
     SwitchSection(CrntSection);