Add back commits r219835 and a fixed version of r219829.
[oota-llvm.git] / test / MC / ELF / section-sym2.s
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj  -t -r --expand-relocs | FileCheck %s
2
3 // Test that we can forward reference a section.
4
5 mov .rodata, %rsi
6 .section .rodata
7
8 // CHECK:Relocations [
9 // CHECK:  Section (2) .rela.text {
10 // CHECK:    Relocation {
11 // CHECK:      Offset: 0x4
12 // CHECK:      Type: R_X86_64_32S (11)
13 // CHECK:      Symbol: .rodata
14 // CHECK:      Addend: 0x0
15 // CHECK:    }
16 // CHECK:  }
17 // CHECK:]
18
19 // There is only one .rodata symbol
20
21 // CHECK:Symbols [
22 // CHECK-NOT:    Name: .rodata
23 // CHECK:        Name: .rodata
24 // CHECK-NEXT:   Value: 0x0
25 // CHECK-NEXT:   Size: 0
26 // CHECK-NEXT:   Binding: Local (0x0)
27 // CHECK-NEXT:   Type: Section (0x3)
28 // CHECK-NOT:    Name: .rodata