forked from OSchip/llvm-project
[AARCH64][FIX] Emit data symbol for constant pool data
The ARM64 elf emitter would omit printing data symbol for zero filled constant data. This patch overrides the emitFill method as to enforce that the symbol is correctly printed. Differential revision: https://reviews.llvm.org/D53132 llvm-svn: 344248
This commit is contained in:
parent
6380d8976c
commit
352a2fa1e7
|
@ -154,6 +154,11 @@ public:
|
|||
MCELFStreamer::EmitValueImpl(Value, Size, Loc);
|
||||
}
|
||||
|
||||
void emitFill(const MCExpr &NumBytes, uint64_t FillValue,
|
||||
SMLoc Loc) override {
|
||||
EmitDataMappingSymbol();
|
||||
MCObjectStreamer::emitFill(NumBytes, FillValue, Loc);
|
||||
}
|
||||
private:
|
||||
enum ElfMappingSymbol {
|
||||
EMS_None,
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# RUN: llvm-mc -filetype=obj -assemble \
|
||||
# RUN: -triple=aarch64- %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
|
Loading…
Reference in New Issue