forked from OSchip/llvm-project
95 lines
2.5 KiB
ArmAsm
95 lines
2.5 KiB
ArmAsm
// Check that local symbols are not inserted into dynamic table.
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
|
|
// RUN: ld.lld %t -shared -o %t1.so
|
|
// RUN: llvm-readobj -t -dyn-symbols %t1.so | FileCheck %s
|
|
// 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 {
|
|
// CHECK-NEXT: Name: blah
|
|
// CHECK-NEXT: Value: 0x1000
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Local
|
|
// CHECK-NEXT: Type: None
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: .text
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: foo
|
|
// CHECK-NEXT: Value: 0x1000
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Local
|
|
// CHECK-NEXT: Type: None
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: .text
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: goo
|
|
// CHECK-NEXT: Value: 0x1000
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Local
|
|
// CHECK-NEXT: Type: None
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: .text
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: _DYNAMIC
|
|
// CHECK-NEXT: Value: 0x1000
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Local
|
|
// CHECK-NEXT: Type: None
|
|
// CHECK-NEXT: Other [ (0x2)
|
|
// CHECK-NEXT: STV_HIDDEN
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: Section: .dynamic
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: _start
|
|
// CHECK-NEXT: Value: 0x1000
|
|
// 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 {
|
|
// 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: _start@
|
|
// CHECK-NEXT: Value: 0x1000
|
|
// 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:
|
|
|
|
|