Renames.count(&Symbol)))
continue;
+ if (Symbol.isTemporary() && Symbol.isUndefined())
+ Ctx.reportFatalError(SMLoc(), "Undefined temporary");
+
ELFSymbolData MSD;
MSD.Symbol = cast<MCSymbolELF>(&Symbol);
bool Local = Symbol.getBinding() == ELF::STB_LOCAL;
+ assert(Local || !Symbol.isTemporary());
+
if (Symbol.isAbsolute()) {
MSD.SectionIndex = ELF::SHN_ABS;
} else if (Symbol.isCommon()) {
.long .L.debug_abbrev_begin # Offset Into Abbrev. Section
.byte 8 # Address Size (in bytes)
.byte 1 # Abbrev [1] 0xb:0x1b DW_TAG_compile_unit
- .long .Linfo_string0 # DW_AT_producer
+ .long info_string0 # DW_AT_producer
.short 12 # DW_AT_language
- .long .Linfo_string1 # DW_AT_name
+ .long info_string1 # DW_AT_name
.quad 0 # DW_AT_low_pc
.long 0 # DW_AT_stmt_list
- .long .Linfo_string2 # DW_AT_comp_dir
+ .long info_string2 # DW_AT_comp_dir
# DW_AT_APPLE_optimized
.section .debug_abbrev,"",@progbits
.L.debug_abbrev_begin:
--- /dev/null
+// RUN: not llvm-mc -filetype=obj -triple x86_64-pc-linux %s -o - 2>&1 | FileCheck %s
+
+// CHECK: Undefined temporary
+ .long .Lfoo
// Test which symbols should be in the symbol table
- .long .Lsym1
.Lsym2:
.Lsym3:
.Lsym4 = .Lsym2 - .Lsym3
// CHECK-NEXT: Section: .rodata.str1.1
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
-// CHECK-NEXT: Name: .Lsym1
-// CHECK-NEXT: Value: 0x0
-// CHECK-NEXT: Size: 0
-// CHECK-NEXT: Binding: Global
-// CHECK-NEXT: Type: None
-// CHECK-NEXT: Other: 0
-// CHECK-NEXT: Section: Undefined
-// CHECK-NEXT: }
-// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: sym6
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
+++ /dev/null
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -t | FileCheck %s
-
-// Test that this produces an undefined reference to .Lfoo
-
- je .Lfoo
-
-// CHECK: Section {
-// CHECK: Name: .strtab
-
-// CHECK: Symbol {
-// CHECK: Name: .Lfoo
-// CHECK-NEXT: Value:
-// CHECK-NEXT: Size:
-// CHECK-NEXT: Binding: Global
-// CHECK-NEXT: Type:
-// CHECK-NEXT: Other:
-// CHECK-NEXT: Section:
-// CHECK-NEXT: }