]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/elf/ARM/rel-thm-jump24.test
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / elf / ARM / rel-thm-jump24.test
1 # Check handling of R_ARM_THM_JUMP24 relocation.
2 # RUN: yaml2obj -format=elf %s > %t-o.o
3 # RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
4 # RUN: --noinhibit-exec %t-o.o -o %t
5 # RUN: llvm-objdump -s -t %t | FileCheck %s
6
7 # CHECK: Contents of section .text:
8 # CHECK: 400084 80b500af fff7f4bf 03461846 80bd00bf
9 #                           ^^ offset = -0x18
10 #               call site  offset  PC(thm) _Z1fv addr
11 #               0x400088 + (-0x18) + 0x4 = 0x400074
12 # CHECK: SYMBOL TABLE:
13 # CHECK: 00400074 g     F .text  {{[0-9a-f]+}} _Z1fv
14 # CHECK: 00400084 g     F .text  {{[0-9a-f]+}} main
15
16 ---
17 FileHeader:
18   Class:           ELFCLASS32
19   Data:            ELFDATA2LSB
20   Type:            ET_REL
21   Machine:         EM_ARM
22   Flags:           [ EF_ARM_EABI_VER5 ]
23 Sections:
24   - Name:            .text
25     Type:            SHT_PROGBITS
26     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
27     AddressAlign:    0x0000000000000004
28     Content:         80B400AF00231846BD465DF8047B704780B500AFFFF7FEBF0346184680BD00BF
29   - Name:            .rel.text
30     Type:            SHT_REL
31     Link:            .symtab
32     AddressAlign:    0x0000000000000004
33     Info:            .text
34     Relocations:
35       - Offset:          0x0000000000000014
36         Symbol:          _Z1fv
37         Type:            R_ARM_THM_JUMP24
38         Addend:          0
39   - Name:            .data
40     Type:            SHT_PROGBITS
41     Flags:           [ SHF_WRITE, SHF_ALLOC ]
42     AddressAlign:    0x0000000000000001
43     Content:         ''
44   - Name:            .bss
45     Type:            SHT_NOBITS
46     Flags:           [ SHF_WRITE, SHF_ALLOC ]
47     AddressAlign:    0x0000000000000001
48     Content:         ''
49 Symbols:
50   Global:
51     - Name:            _Z1fv
52       Type:            STT_FUNC
53       Section:         .text
54       Value:           0x0000000000000001
55     - Name:            main
56       Type:            STT_FUNC
57       Section:         .text
58       Value:           0x0000000000000011
59 ...