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