Index: lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp =================================================================== --- lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp +++ lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp @@ -465,6 +465,11 @@ void emitPad(int64_t Offset); void emitRegSave(const SmallVectorImpl &RegList, bool isVector); void emitUnwindRaw(int64_t Offset, const SmallVectorImpl &Opcodes); + void emitFill(const MCExpr &NumBytes, uint64_t FillValue, + SMLoc Loc) override { + EmitDataMappingSymbol(); + MCObjectStreamer::emitFill(NumBytes, FillValue, Loc); + } void ChangeSection(MCSection *Section, const MCExpr *Subsection) override { LastMappingSymbols[getCurrentSection().first] = std::move(LastEMSInfo); Index: test/MC/ARM/CheckDataSymbol.s =================================================================== --- /dev/null +++ test/MC/ARM/CheckDataSymbol.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -filetype=obj -assemble -arm-implicit-it=thumb \ +# RUN: -triple=arm-arm-none-eabi -mcpu=cortex-a9 %s -o - \ +# RUN: | llvm-readobj -s -t - | FileCheck %s +# CHECK: Name: $d.1 ({{[1-9][0-9]+}}) +# CHECK-NEXT: Value: 0x4 +# CHECK-NEXT: Size: 0 +# CHECK-NEXT: Binding: Local (0x0) +# CHECK-NEXT: Type: None (0x0) +# CHECK-NEXT: Other: 0 +# CHECK-NEXT: Section: .text (0x2) +# CHECK-NEXT: } + +.text +nop +.zero 4