2018-06-27 06:20:04 +08:00
|
|
|
// REQUIRES: x86
|
2015-09-17 04:45:57 +08:00
|
|
|
// Check that local symbols are not inserted into dynamic table.
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
|
2015-11-18 14:11:01 +08:00
|
|
|
// RUN: ld.lld %t -shared -o %t1.so
|
2019-05-01 13:49:01 +08:00
|
|
|
// RUN: llvm-readobj --symbols --dyn-syms %t1.so | FileCheck %s
|
2015-09-17 04:45:57 +08:00
|
|
|
|
|
|
|
// 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 {
|
|
|
|
// CHECK-NEXT: Name: blah
|
2016-12-06 04:53:11 +08:00
|
|
|
// CHECK-NEXT: Value:
|
2015-09-17 04:45:57 +08:00
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Local
|
|
|
|
// CHECK-NEXT: Type: None
|
|
|
|
// CHECK-NEXT: Other: 0
|
2015-09-18 09:08:17 +08:00
|
|
|
// CHECK-NEXT: Section: .text
|
2015-09-17 04:45:57 +08:00
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: Symbol {
|
|
|
|
// CHECK-NEXT: Name: foo
|
2016-12-06 04:53:11 +08:00
|
|
|
// CHECK-NEXT: Value:
|
2015-09-17 04:45:57 +08:00
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Local
|
|
|
|
// CHECK-NEXT: Type: None
|
|
|
|
// CHECK-NEXT: Other: 0
|
2015-09-18 09:08:17 +08:00
|
|
|
// CHECK-NEXT: Section: .text
|
2015-09-17 04:45:57 +08:00
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: Symbol {
|
|
|
|
// CHECK-NEXT: Name: goo
|
2016-12-06 04:53:11 +08:00
|
|
|
// CHECK-NEXT: Value:
|
2015-09-17 04:45:57 +08:00
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Local
|
|
|
|
// CHECK-NEXT: Type: None
|
|
|
|
// CHECK-NEXT: Other: 0
|
2015-09-18 09:08:17 +08:00
|
|
|
// CHECK-NEXT: Section: .text
|
2015-09-17 04:45:57 +08:00
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: Symbol {
|
2016-03-02 00:23:13 +08:00
|
|
|
// CHECK-NEXT: Name: _DYNAMIC
|
2016-12-06 04:53:11 +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-09-17 04:45:57 +08:00
|
|
|
// CHECK-NEXT: Name: _start
|
2016-12-06 04:53:11 +08:00
|
|
|
// CHECK-NEXT: Value:
|
2015-09-17 04:45:57 +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: ]
|
|
|
|
|
|
|
|
// CHECK: DynamicSymbols [
|
|
|
|
// CHECK-NEXT: Symbol {
|
2019-01-08 18:50:59 +08:00
|
|
|
// CHECK-NEXT: Name:
|
2015-09-17 04:45:57 +08:00
|
|
|
// 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 {
|
2019-01-08 18:50:59 +08:00
|
|
|
// CHECK-NEXT: Name: _start
|
2016-12-06 04:53:11 +08:00
|
|
|
// CHECK-NEXT: Value:
|
2015-09-17 04:45:57 +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: ]
|
|
|
|
|
|
|
|
.global _start
|
|
|
|
_start:
|
|
|
|
|
|
|
|
blah:
|
|
|
|
foo:
|
|
|
|
goo:
|
|
|
|
|
|
|
|
|