2016-04-15 20:22:22 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/abs-hidden.s -o %t2.o
|
2017-10-06 17:37:44 +08:00
|
|
|
// RUN: ld.lld --hash-style=sysv %t.o %t2.o -o %t.so -shared
|
2016-04-15 20:22:22 +08:00
|
|
|
// RUN: llvm-readobj -r -s -section-data %t.so | FileCheck %s
|
|
|
|
|
|
|
|
.quad foo
|
2016-04-15 20:44:43 +08:00
|
|
|
.long foo@gotpcrel
|
2016-04-15 20:22:22 +08:00
|
|
|
|
|
|
|
// CHECK: Name: .text
|
|
|
|
// CHECK-NEXT: Type: SHT_PROGBITS
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: SHF_ALLOC
|
|
|
|
// CHECK-NEXT: SHF_EXECINSTR
|
|
|
|
// CHECK-NEXT: ]
|
2016-04-15 20:44:43 +08:00
|
|
|
// CHECK-NEXT: Address: 0x1000
|
2016-04-15 20:22:22 +08:00
|
|
|
// CHECK-NEXT: Offset:
|
2016-04-15 20:44:43 +08:00
|
|
|
// CHECK-NEXT: Size: 12
|
2016-04-15 20:22:22 +08:00
|
|
|
// CHECK-NEXT: Link: 0
|
|
|
|
// CHECK-NEXT: Info: 0
|
|
|
|
// CHECK-NEXT: AddressAlignment: 4
|
|
|
|
// CHECK-NEXT: EntrySize: 0
|
|
|
|
// CHECK-NEXT: SectionData (
|
2016-04-15 20:44:43 +08:00
|
|
|
// CHECK-NEXT: 0000: 42000000 00000000 58100000
|
|
|
|
// 0x2060 - (0x1000 + 8) = 1058
|
|
|
|
// CHECK-NEXT: )
|
|
|
|
|
2016-11-02 05:26:28 +08:00
|
|
|
// CHECK: Name: .got
|
2016-04-15 20:44:43 +08:00
|
|
|
// CHECK-NEXT: Type: SHT_PROGBITS
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: SHF_ALLOC
|
|
|
|
// CHECK-NEXT: SHF_WRITE
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: Address: 0x2060
|
|
|
|
// CHECK-NEXT: Offset:
|
|
|
|
// CHECK-NEXT: Size: 8
|
|
|
|
// CHECK-NEXT: Link: 0
|
|
|
|
// CHECK-NEXT: Info: 0
|
|
|
|
// CHECK-NEXT: AddressAlignment: 8
|
|
|
|
// CHECK-NEXT: EntrySize: 0
|
|
|
|
// CHECK-NEXT: SectionData (
|
2016-04-15 20:22:22 +08:00
|
|
|
// CHECK-NEXT: 0000: 42000000 00000000
|
|
|
|
// CHECK-NEXT: )
|
|
|
|
|
|
|
|
// CHECK: Relocations [
|
|
|
|
// CHECK-NEXT: ]
|