1 // REQUIRES
: arm
, aarch64
3 // RUN
: llvm-mc
-filetype
=obj
-triple
=aarch64-none-linux-android
%s
-o
%t.o
4 // RUN
: ld.lld
-shared
%t.o
-o
%t.so
--pack-dyn-relocs
=android
-z norelro
-z separate-code
5 // RUN
: llvm-readobj
-S
%t.so | FileCheck
%s
7 // This test is making sure the Android packed relocation support doesn
't
8 // cause an infinite loop due to the size of the section oscillating
9 // (because the size of the section impacts the layout of the following
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)
19 // CHECK-NEXT
: Address
: 0x1D8
20 // CHECK-NEXT
: Offset
: 0x1D8
21 // CHECK-NEXT
: Size
: 21
23 // CHECK
: Name
: x
(43)
24 // CHECK-NEXT
: Type
: SHT_PROGBITS
(0x1)
25 // CHECK-NEXT
: Flags
[ (0x2)
26 // CHECK-NEXT
: SHF_ALLOC
(0x2)
28 // CHECK-NEXT
: Address
: 0x1ED
29 // CHECK-NEXT
: Offset
: 0x1ED
30 // CHECK-NEXT
: Size
: 65036
32 // CHECK
: Name
: barr
(45)
33 // CHECK-NEXT
: Type
: SHT_PROGBITS
(0x1)
34 // CHECK-NEXT
: Flags
[ (0x2)
35 // CHECK-NEXT
: SHF_ALLOC
(0x2)
37 // CHECK-NEXT
: Address
: 0xFFFA
38 // CHECK-NEXT
: Offset
: 0xFFFA
39 // CHECK-NEXT
: Size
: 0
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)
47 // CHECK-NEXT
: Address
: 0x10004
48 // CHECK-NEXT
: Offset
: 0x10004
49 // CHECK-NEXT
: Size
: 24