2013-04-12 04:06:46 +00:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
|
2010-09-23 19:55:14 +00:00
|
|
|
|
|
|
|
// Test that this produces a weak undefined symbol.
|
|
|
|
|
|
|
|
.weak foo
|
|
|
|
.long foo
|
|
|
|
|
2013-12-05 05:44:44 +00:00
|
|
|
// And that bar is after all local symbols and has non-zero value.
|
2010-10-06 16:47:31 +00:00
|
|
|
.weak bar
|
|
|
|
bar:
|
|
|
|
|
2013-04-12 04:06:46 +00: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
|
2014-03-24 05:00:34 +00:00
|
|
|
// CHECK-NEXT: Section: Undefined (0x0)
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: ]
|