2015-10-03 00:21:30 +08:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %p/Inputs/shared.s -o %t2.o
|
2015-11-18 14:11:01 +08:00
|
|
|
// RUN: ld.lld -shared %t2.o -o %t2.so
|
|
|
|
// RUN: ld.lld -dynamic-linker /lib64/ld64.so.1 -rpath foo -rpath bar --export-dynamic %t.o %t2.so -o %t
|
2015-10-03 01:57:29 +08:00
|
|
|
// RUN: llvm-readobj --dynamic-table -s %t | FileCheck %s
|
2015-10-03 00:21:30 +08:00
|
|
|
// REQUIRES: ppc
|
|
|
|
|
|
|
|
// CHECK: Name: .rela.dyn
|
|
|
|
// CHECK-NEXT: Type: SHT_REL
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: SHF_ALLOC
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: Address: [[RELADDR:.*]]
|
|
|
|
// CHECK-NEXT: Offset:
|
|
|
|
// CHECK-NEXT: Size: [[RELSIZE:.*]]
|
|
|
|
// CHECK-NEXT: Link:
|
|
|
|
// CHECK-NEXT: Info:
|
|
|
|
// CHECK-NEXT: AddressAlignment:
|
|
|
|
// CHECK-NEXT: EntrySize: [[RELENT:.*]]
|
|
|
|
|
|
|
|
// CHECK: DynamicSection [
|
|
|
|
// CHECK-NEXT: Tag Type Name/Value
|
2016-01-29 09:24:25 +08:00
|
|
|
// CHECK-NEXT: 0x000000000000001D RUNPATH foo:bar
|
|
|
|
// CHECK-NEXT: 0x0000000000000001 NEEDED SharedLibrary ({{.*}}2.so)
|
2015-10-03 00:21:30 +08:00
|
|
|
// CHECK-NEXT: 0x0000000000000007 RELA [[RELADDR]]
|
|
|
|
// CHECK-NEXT: 0x0000000000000008 RELASZ [[RELSIZE]] (bytes)
|
|
|
|
// CHECK-NEXT: 0x0000000000000009 RELAENT [[RELENT]] (bytes)
|
2016-01-29 09:24:25 +08:00
|
|
|
// CHECK: 0x0000000000000015 DEBUG 0x0
|
2015-10-03 00:21:30 +08:00
|
|
|
// CHECK-NEXT: 0x0000000000000000 NULL 0x0
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
|
|
|
|
.global _start
|
|
|
|
_start:
|
2016-04-30 08:49:10 +08:00
|
|
|
.data
|
2015-10-03 00:21:30 +08:00
|
|
|
.long bar
|
|
|
|
.long zed
|
|
|
|
|