[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / ELF / weak.s
blobd7750545cae3de5067825814981ffdb7889d59da
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols - | FileCheck %s
3 // Test that this produces a weak undefined symbol.
5 .weak foo
6 .long foo
8 // And that bar is after all local symbols and has non-zero value.
9 .weak bar
10 bar:
12 // CHECK: Symbol {
13 // CHECK: Name: foo
14 // CHECK-NEXT: Value: 0x0
15 // CHECK-NEXT: Size: 0
16 // CHECK-NEXT: Binding: Weak
17 // CHECK-NEXT: Type: None
18 // CHECK-NEXT: Other: 0
19 // CHECK-NEXT: Section: Undefined (0x0)
20 // CHECK-NEXT: }
21 // CHECK-NEXT: Symbol {
22 // CHECK-NEXT: Name: bar
23 // CHECK-NEXT: Value: 0x4
24 // CHECK-NEXT: Size: 0
25 // CHECK-NEXT: Binding: Weak
26 // CHECK-NEXT: Type: None
27 // CHECK-NEXT: Other: 0
28 // CHECK-NEXT: Section: .text
29 // CHECK-NEXT: }
30 // CHECK-NEXT: ]