| // REQUIRES: x86 |
| // RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux |
| // RUN: ld.lld %t.o -o %t.so -shared |
| // RUN: llvm-readobj -s -section-data %t.so | FileCheck %s |
| |
| call foo@plt |
| |
| // Check that the first .got.plt entry has the address of the dynamic table. |
| |
| // CHECK: Name: .got.plt |
| // CHECK-NEXT: Type: SHT_PROGBITS |
| // CHECK-NEXT: Flags [ |
| // CHECK-NEXT: SHF_ALLOC |
| // CHECK-NEXT: SHF_WRITE |
| // CHECK-NEXT: ] |
| // CHECK-NEXT: Address: 0x2000 |
| // CHECK-NEXT: Offset: 0x2000 |
| // CHECK-NEXT: Size: 32 |
| // CHECK-NEXT: Link: 0 |
| // CHECK-NEXT: Info: 0 |
| // CHECK-NEXT: AddressAlignment: 8 |
| // CHECK-NEXT: EntrySize: 0 |
| // CHECK-NEXT: SectionData ( |
| // CHECK-NEXT: 0000: 00300000 00000000 00000000 00000000 |
| |
| // CHECK: Type: SHT_DYNAMIC |
| // CHECK-NEXT: Flags [ |
| // CHECK-NEXT: SHF_ALLOC |
| // CHECK-NEXT: SHF_WRITE |
| // CHECK-NEXT: ] |
| // CHECK-NEXT: Address: 0x3000 |