2 // RUN
: llvm-mc
-filetype
=obj
-triple
=armv7a-none-linux-gnueabi
%s
-o
%t.o
3 // RUN
: ld.lld
%t.o
-o
%t
4 // RUN
: llvm-objdump
-s
--triple
=armv7a-none-linux-gnueabi
%t | FileCheck
%s
5 // RUN
: ld.lld
%t.o
--target2
=got-rel
-o
%t2
6 // RUN
: llvm-objdump
-s
--triple
=armv7a-none-linux-gnueabi
%t2 | FileCheck
%s
7 // RUN
: ld.lld
%t.o
--target2
=abs -o
%t3
8 // RUN
: llvm-objdump
-s
--triple
=armv7a-none-linux-gnueabi
%t3 | FileCheck
--check-prefix
=CHECK-
ABS %s
9 // RUN
: ld.lld
%t.o
--target2
=rel
-o
%t4
10 // RUN
: llvm-objdump
-s
--triple
=armv7a-none-linux-gnueabi
%t4 | FileCheck
--check-prefix
=CHECK-REL
%s
12 // The R_ARM_TARGET2 is present in
.ARM.extab sections. It can be handled as
13 // either R_ARM_ABS32
, R_ARM_REL32
or R_ARM_GOT_PREL. For ARM linux the default
14 // is R_ARM_GOT_PREL. The other two options are primarily used for bare-metal
,
15 // they can
be selected with the
--target2
=abs or --target2
=rel option.
21 .type function, %function
24 .personality __gxx_personality_v0
29 .global __gxx_personality_v0
30 .type function, %function
37 // CHECK
: Contents of section
.ARM.extab:
38 // 0x1012c + 0x2010 = 0x1213c = .got
39 // CHECK-NEXT
: 10124 14000100 b0b0b000
10000200
41 // CHECK-
ABS: Contents of section
.ARM.extab:
43 // CHECK-ABS-NEXT
: 100e4
14000100 b0b0b000 f0000100
45 // CHECK-REL
: Contents of section
.ARM.extab:
46 // 0x100ec + 4 = 0x100f0 = .rodata
47 // CHECK-REL-NEXT
: 100e4
14000100 b0b0b000
04000000
49 // CHECK
: Contents of section
.rodata:
50 // CHECK-NEXT
: 10130 00000000
52 // CHECK-
ABS: Contents of section
.rodata:
53 // CHECK-ABS-NEXT
: 100f0 00000000
55 // CHECK-REL
: Contents of section
.rodata:
56 // CHECK-REL-NEXT
: 100f0 00000000
58 // CHECK
: Contents of section
.got:
60 // CHECK-NEXT
: 3013c
30010100