]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/elf/ARM/rel-tls-le32.test
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / elf / ARM / rel-tls-le32.test
1 # Check handling of R_ARM_TLS_LE32 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: 4000b4 {{[0-9a-f]+}} 08000000
9 #              tp_off = 0x000008 ^^
10 # CHECK: SYMBOL TABLE:
11 # CHECK: 00400094 g     F .text  {{[0-9a-f]+}} main
12 # CHECK: 00000000 g       .tdata 00000004 i
13
14 ---
15 FileHeader:
16   Class:           ELFCLASS32
17   Data:            ELFDATA2LSB
18   Type:            ET_REL
19   Machine:         EM_ARM
20   Flags:           [ EF_ARM_EABI_VER5 ]
21 Sections:
22   - Name:            .text
23     Type:            SHT_PROGBITS
24     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
25     AddressAlign:    0x0000000000000004
26     Content:         04B02DE500B08DE2703F1DEE10209FE5023093E70300A0E100D04BE204B09DE41EFF2FE100000000
27   - Name:            .rel.text
28     Type:            SHT_REL
29     Link:            .symtab
30     AddressAlign:    0x0000000000000004
31     Info:            .text
32     Relocations:
33       - Offset:          0x0000000000000024
34         Symbol:          i
35         Type:            R_ARM_TLS_LE32
36         Addend:          0
37   - Name:            .data
38     Type:            SHT_PROGBITS
39     Flags:           [ SHF_WRITE, SHF_ALLOC ]
40     AddressAlign:    0x0000000000000001
41     Content:         ''
42   - Name:            .bss
43     Type:            SHT_NOBITS
44     Flags:           [ SHF_WRITE, SHF_ALLOC ]
45     AddressAlign:    0x0000000000000001
46     Content:         ''
47   - Name:            .tdata
48     Type:            SHT_PROGBITS
49     Flags:           [ SHF_WRITE, SHF_ALLOC, SHF_TLS ]
50     AddressAlign:    0x0000000000000004
51     Content:         '05000000'
52 Symbols:
53   Global:
54     - Name:            i
55       Type:            STT_TLS
56       Section:         .tdata
57       Size:            0x0000000000000004
58     - Name:            main
59       Type:            STT_FUNC
60       Section:         .text
61 ...