2018-06-06 21:56:51 +08:00
|
|
|
// REQUIRES: x86
|
2015-10-06 00:25:43 +08:00
|
|
|
// 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 -o %t.so -shared -discard-none
|
2015-10-06 00:25:43 +08:00
|
|
|
// RUN: llvm-readobj -t %t.so | FileCheck %s
|
|
|
|
|
|
|
|
// Test that we don't include the section symbols from the .o in the .so
|
|
|
|
|
|
|
|
// CHECK: Symbols [
|
|
|
|
// 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 {
|
|
|
|
// CHECK-NEXT: Name: foo
|
|
|
|
// CHECK-NEXT: Value:
|
|
|
|
// CHECK-NEXT: Size: 0
|
|
|
|
// CHECK-NEXT: Binding: Local
|
|
|
|
// CHECK-NEXT: Type: None
|
|
|
|
// CHECK-NEXT: Other: 0
|
|
|
|
// CHECK-NEXT: Section: .text
|
|
|
|
// CHECK-NEXT: }
|
2016-03-02 00:23:13 +08:00
|
|
|
// CHECK-NEXT: Symbol {
|
|
|
|
// CHECK-NEXT: Name: _DYNAMIC
|
|
|
|
// 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: ]
|
2016-03-02 00:23:13 +08:00
|
|
|
// CHECK-NEXT: Section: .dynamic
|
|
|
|
// CHECK-NEXT: }
|
2015-10-06 00:25:43 +08:00
|
|
|
// CHECK-NEXT: ]
|
|
|
|
|
|
|
|
foo:
|
2016-05-05 04:25:19 +08:00
|
|
|
.quad foo - .
|