1// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols - | FileCheck %s 2 3// Test that this produces a weak undefined symbol. 4 5 .weak foo 6 .long foo 7 8// And that bar is after all local symbols and has non-zero value. 9 .weak bar 10bar: 11 12// CHECK: Symbol { 13// CHECK: Name: bar 14// CHECK-NEXT: Value: 0x4 15// CHECK-NEXT: Size: 0 16// CHECK-NEXT: Binding: Weak 17// CHECK-NEXT: Type: None 18// CHECK-NEXT: Other: 0 19// CHECK-NEXT: Section: .text 20// CHECK-NEXT: } 21// CHECK: Symbol { 22// CHECK: Name: foo 23// CHECK-NEXT: Value: 0x0 24// CHECK-NEXT: Size: 0 25// CHECK-NEXT: Binding: Weak 26// CHECK-NEXT: Type: None 27// CHECK-NEXT: Other: 0 28// CHECK-NEXT: Section: Undefined (0x0) 29// CHECK-NEXT: } 30// CHECK-NEXT: ] 31