67 lines · plain
1// REQUIRES: arm, aarch642 3// RUN: llvm-mc -filetype=obj -triple=aarch64-linux-android %s -o %t.o4// RUN: ld.lld -shared %t.o -o %t.so --pack-dyn-relocs=android -z norelro -z separate-code5// RUN: llvm-readobj -S %t.so | FileCheck %s6 7// This test is making sure the Android packed relocation support doesn't8// cause an infinite loop due to the size of the section oscillating9// (because the size of the section impacts the layout of the following10// sections).11 12// This test is very sensitive to the exact section sizes and offsets,13// so check that they don't change.14// CHECK: Name: .rela.dyn (33)15// CHECK-NEXT: Type: SHT_ANDROID_RELA (0x60000002)16// CHECK-NEXT: Flags [ (0x2)17// CHECK-NEXT: SHF_ALLOC (0x2)18// CHECK-NEXT: ]19// CHECK-NEXT: Address: 0x1D820// CHECK-NEXT: Offset: 0x1D821// CHECK-NEXT: Size: 2122 23// CHECK: Name: x (43)24// CHECK-NEXT: Type: SHT_PROGBITS (0x1)25// CHECK-NEXT: Flags [ (0x2)26// CHECK-NEXT: SHF_ALLOC (0x2)27// CHECK-NEXT: ]28// CHECK-NEXT: Address: 0x1ED29// CHECK-NEXT: Offset: 0x1ED30// CHECK-NEXT: Size: 6503631 32// CHECK: Name: barr (45)33// CHECK-NEXT: Type: SHT_PROGBITS (0x1)34// CHECK-NEXT: Flags [ (0x2)35// CHECK-NEXT: SHF_ALLOC (0x2)36// CHECK-NEXT: ]37// CHECK-NEXT: Address: 0xFFFA38// CHECK-NEXT: Offset: 0xFFFA39// CHECK-NEXT: Size: 040 41// CHECK: Name: foo (62)42// CHECK-NEXT: Type: SHT_PROGBITS (0x1)43// CHECK-NEXT: Flags [ (0x3)44// CHECK-NEXT: SHF_ALLOC (0x2)45// CHECK-NEXT: SHF_WRITE (0x1)46// CHECK-NEXT: ]47// CHECK-NEXT: Address: 0x1000448// CHECK-NEXT: Offset: 0x1000449// CHECK-NEXT: Size: 2450 51 52.data53.long 054 55.section foo,"aw"56foof:57.quad foof58.quad bar-5359.quad bar60 61.section x,"a"62.zero 6503663 64.section barr,"a"65.p2align 166bar:67