Propagate section from base to derived symbol.
[oota-llvm.git] / test / MC / ELF / offset.s
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t - | FileCheck %s
2
3 // Test that a variable declared with "var = other_var + cst" is in the same
4 // section as other_var and its value is the value of other_var + cst.
5
6 sym_a:
7 sym_d = sym_a + 1
8
9
10 // CHECK:       Symbol {
11 // CHECK:         Name: sym_a
12 // CHECK-NEXT:    Value: 0x0
13 // CHECK-NEXT:    Size: 0
14 // CHECK-NEXT:    Binding: Local (0x0)
15 // CHECK-NEXT:    Type: None (0x0)
16 // CHECK-NEXT:    Other: 0
17 // CHECK-NEXT:    Section: .text (0x1)
18 // CHECK-NEXT:  }
19 // CHECK-NEXT:  Symbol {
20 // CHECK-NEXT:    Name: sym_d
21 // CHECK-NEXT:    Value: 0x1
22 // CHECK-NEXT:    Size: 0
23 // CHECK-NEXT:    Binding: Local (0x0)
24 // CHECK-NEXT:    Type: None (0x0)
25 // CHECK-NEXT:    Other: 0
26 // CHECK-NEXT:    Section: .text (0x1)
27 // CHECK-NEXT:  }