2013-04-12 12:06:46 +08:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
|
2010-09-24 03:55:14 +08:00
|
|
|
|
|
|
|
// Test that this produces a weak undefined symbol.
|
|
|
|
|
|
|
|
.weak foo
|
|
|
|
.long foo
|
|
|
|
|
2010-10-29 03:39:57 +08:00
|
|
|
// And that bar is after all local symbols and has non zero value.
|
2010-10-07 00:47:31 +08:00
|
|
|
.weak bar
|
|
|
|
bar:
|
|
|
|
|
2013-04-12 12:06:46 +08:00
|
|
|
// CHECK: Symbol {
|
|
|
|
// CHECK: Name: bar
|
|
|
|
// CHECK-NEXT: Value: 0x4
|
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Weak
|
|
|
|
// CHECK-NEXT: Type: None
|
|
|
|
// CHECK-NEXT: Other: 0
|
|
|
|
// CHECK-NEXT: Section: .text
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK: Symbol {
|
|
|
|
// CHECK: Name: foo
|
|
|
|
// CHECK-NEXT: Value: 0x0
|
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Weak
|
|
|
|
// CHECK-NEXT: Type: None
|
|
|
|
// CHECK-NEXT: Other: 0
|
|
|
|
// CHECK-NEXT: Section: (0x0)
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: ]
|