2015-09-02 07:12:52 +08:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/visibility.s -o %t2
|
2015-11-18 14:11:01 +08:00
|
|
|
// RUN: ld.lld -shared %t %t2 -o %t3
|
2015-10-05 23:24:04 +08:00
|
|
|
// RUN: llvm-readobj -t -dyn-symbols %t3 | FileCheck %s
|
2015-09-02 07:12:52 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
|
|
|
|
// CHECK: Symbols [
|
|
|
|
// CHECK-NEXT: Symbol {
|
|
|
|
// CHECK-NEXT: Name:
|
|
|
|
// CHECK-NEXT: Value: 0x0
|
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Local
|
|
|
|
// CHECK-NEXT: Type: None
|
|
|
|
// CHECK-NEXT: Other: 0
|
|
|
|
// CHECK-NEXT: Section: Undefined
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: Symbol {
|
2015-10-05 23:24:04 +08:00
|
|
|
// CHECK-NEXT: Name: hidden
|
|
|
|
// CHECK-NEXT: Value:
|
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Local
|
|
|
|
// CHECK-NEXT: Type: None
|
2016-03-25 00:30:20 +08:00
|
|
|
// CHECK-NEXT: Other [ (0x2)
|
|
|
|
// CHECK-NEXT: STV_HIDDEN
|
|
|
|
// CHECK-NEXT: ]
|
2015-10-05 23:24:04 +08:00
|
|
|
// CHECK-NEXT: Section: .text
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: Symbol {
|
|
|
|
// CHECK-NEXT: Name: internal
|
|
|
|
// CHECK-NEXT: Value:
|
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Local
|
|
|
|
// CHECK-NEXT: Type: None
|
2016-03-25 00:30:20 +08:00
|
|
|
// CHECK-NEXT: Other [ (0x1)
|
|
|
|
// CHECK-NEXT: STV_INTERNAL
|
|
|
|
// CHECK-NEXT: ]
|
2015-10-05 23:24:04 +08:00
|
|
|
// CHECK-NEXT: Section: .text
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: Symbol {
|
|
|
|
// CHECK-NEXT: Name: protected_with_hidden
|
|
|
|
// CHECK-NEXT: Value:
|
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Local
|
|
|
|
// CHECK-NEXT: Type: None
|
2016-03-25 00:30:20 +08:00
|
|
|
// CHECK-NEXT: Other [ (0x2)
|
|
|
|
// CHECK-NEXT: STV_HIDDEN
|
|
|
|
// CHECK-NEXT: ]
|
2015-10-05 23:24:04 +08:00
|
|
|
// CHECK-NEXT: Section: .text
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: Symbol {
|
2016-03-02 00:23:13 +08:00
|
|
|
// CHECK-NEXT: Name: _DYNAMIC
|
2016-04-30 08:49:10 +08:00
|
|
|
// CHECK-NEXT: Value:
|
2016-03-02 00:23:13 +08:00
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Local
|
|
|
|
// CHECK-NEXT: Type: None
|
2016-03-25 00:30:20 +08:00
|
|
|
// CHECK-NEXT: Other [ (0x2)
|
|
|
|
// CHECK-NEXT: STV_HIDDEN
|
|
|
|
// CHECK-NEXT: ]
|
2016-03-02 00:23:13 +08:00
|
|
|
// CHECK-NEXT: Section: .dynamic
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: Symbol {
|
2015-10-05 23:24:04 +08:00
|
|
|
// CHECK-NEXT: Name: default
|
|
|
|
// CHECK-NEXT: Value:
|
2015-09-02 07:12:52 +08:00
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Global
|
|
|
|
// CHECK-NEXT: Type: None
|
|
|
|
// CHECK-NEXT: Other: 0
|
|
|
|
// CHECK-NEXT: Section: .text
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: Symbol {
|
2015-10-05 23:24:04 +08:00
|
|
|
// CHECK-NEXT: Name: protected
|
|
|
|
// CHECK-NEXT: Value:
|
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Global
|
|
|
|
// CHECK-NEXT: Type: None
|
2016-03-25 00:30:20 +08:00
|
|
|
// CHECK-NEXT: Other [ (0x3)
|
|
|
|
// CHECK-NEXT: STV_PROTECTED
|
|
|
|
// CHECK-NEXT: ]
|
2015-10-05 23:24:04 +08:00
|
|
|
// CHECK-NEXT: Section: .text
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
|
|
|
|
// CHECK: DynamicSymbols [
|
|
|
|
// CHECK-NEXT: Symbol {
|
|
|
|
// CHECK-NEXT: Name: @ (0)
|
|
|
|
// CHECK-NEXT: Value: 0x0
|
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Local
|
|
|
|
// CHECK-NEXT: Type: None
|
|
|
|
// CHECK-NEXT: Other: 0
|
|
|
|
// CHECK-NEXT: Section: Undefined
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: Symbol {
|
2015-09-02 07:12:52 +08:00
|
|
|
// CHECK-NEXT: Name: default
|
2015-10-05 23:24:04 +08:00
|
|
|
// CHECK-NEXT: Value:
|
2015-09-02 07:12:52 +08:00
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Global
|
|
|
|
// CHECK-NEXT: Type: None
|
|
|
|
// CHECK-NEXT: Other: 0
|
|
|
|
// CHECK-NEXT: Section: .text
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: Symbol {
|
|
|
|
// CHECK-NEXT: Name: protected
|
2015-10-05 23:24:04 +08:00
|
|
|
// CHECK-NEXT: Value:
|
2015-09-02 07:12:52 +08:00
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Global
|
|
|
|
// CHECK-NEXT: Type: None
|
2016-03-25 00:30:20 +08:00
|
|
|
// CHECK-NEXT: Other [ (0x3)
|
|
|
|
// CHECK-NEXT: STV_PROTECTED
|
|
|
|
// CHECK-NEXT: ]
|
2015-09-02 07:12:52 +08:00
|
|
|
// CHECK-NEXT: Section: .text
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
|
|
|
|
.global default
|
|
|
|
default:
|
|
|
|
|
|
|
|
.global protected
|
|
|
|
protected:
|
|
|
|
|
|
|
|
.global hidden
|
|
|
|
hidden:
|
|
|
|
|
|
|
|
.global internal
|
|
|
|
internal:
|
|
|
|
|
|
|
|
.global protected_with_hidden
|
|
|
|
.protected
|
|
|
|
protected_with_hidden:
|