1 # 1. Check handling of R_ARM_THM_MOVW_ABS_NC and R_THM_ARM_MOVT_ABS relocation pair.
2 # 2. Check that instructions are not cropped for symbols that address Thumb code.
3 # RUN: yaml2obj -format=elf %s > %t-o.o
4 # RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
5 # RUN: --noinhibit-exec %t-o.o -o %t
6 # RUN: llvm-objdump -s -t %t | FileCheck %s
7 # RUN: llvm-objdump -s -t %t | FileCheck -check-prefix=INSN-CROP %s
9 # CHECK: Contents of section .text:
10 # CHECK: 400074 {{[0-9a-f]+}} 41f20003 c0f24003 0a221a60
13 # addrH addrL _ZL5data1 addr
14 # (0x40 << 16) + 0x1000 = 0x401000
15 # CHECK: SYMBOL TABLE:
16 # CHECK: 00401000 l .bss 00000004 _ZL5data1
17 # CHECK: 00400074 g F .text {{[0-9a-f]+}} main
19 # INSN-CROP: Contents of section .text:
20 # INSN-CROP: 400074 80b400af
28 Flags: [ EF_ARM_EABI_VER5 ]
32 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
33 AddressAlign: 0x0000000000000004
34 Content: 80B400AF40F20003C0F200030A221A6000231846BD465DF8047B7047
38 AddressAlign: 0x0000000000000004
41 - Offset: 0x0000000000000004
43 Type: R_ARM_THM_MOVW_ABS_NC
45 - Offset: 0x0000000000000008
47 Type: R_ARM_THM_MOVT_ABS
51 Flags: [ SHF_WRITE, SHF_ALLOC ]
52 AddressAlign: 0x0000000000000001
56 Flags: [ SHF_WRITE, SHF_ALLOC ]
57 AddressAlign: 0x0000000000000004
64 Size: 0x0000000000000004
69 Value: 0x0000000000000001