]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/elf/ARM/rel-arm-jump24.test
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / elf / ARM / rel-arm-jump24.test
1 # Check handling of R_ARM_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: 400094 04b08de2 f5ffffea 0030a0e1 0300a0e1
9 #           offset = -0x2C  ^^
10 #               call site  offset  PC(arm) _Z1fv addr
11 #               0x400098 + (-0x2C) + 0x8 = 0x400074
12 # CHECK: SYMBOL TABLE:
13 # CHECK: 00400074 g     F .text  {{[0-9a-f]+}} _Z1fv
14 # CHECK: 00400090 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:         04B02DE500B08DE20030A0E30300A0E100D04BE204B09DE41EFF2FE100482DE904B08DE2FEFFFFEA0030A0E10300A0E10088BDE8
29   - Name:            .rel.text
30     Type:            SHT_REL
31     Link:            .symtab
32     AddressAlign:    0x0000000000000004
33     Info:            .text
34     Relocations:
35       - Offset:          0x0000000000000024
36         Symbol:          _Z1fv
37         Type:            R_ARM_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     - Name:            main
55       Type:            STT_FUNC
56       Section:         .text
57       Value:           0x000000000000001C
58 ...