Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / llvm-objdump / AArch64 / plt.test
blob5b3eff331d3c4b03615abea8ea4f217eac0c7bf8
1 # RUN: llvm-objdump -d %p/Inputs/cfi.elf-aarch64 | FileCheck %s
3 # CHECK: Disassembly of section .plt:
4 # CHECK: __cfi_slowpath@plt:
5 # CHECK-NEXT: adrp      x16, {{.*}}
6 # CHECK: bl {{.*}} <__cfi_slowpath@plt>
8 # RUN: yaml2obj %s -o %t.aarch64
9 # RUN: llvm-objdump -d -mattr=+bti %t.aarch64 | \
10 # RUN:   FileCheck --check-prefix=CHECK-BTI %s
11 # CHECK-BTI: bl {{.*}} <f1@plt>
12 # CHECK-BTI: bl {{.*}} <f2@plt>
13 # CHECK-BTI: Disassembly of section .plt:
14 # CHECK-BTI: f1@plt:
15 # CHECK-BTI-NEXT: bti   c
16 # CHECK-BTI-NEXT: adrp  x16, {{.*}}
17 # CHECK-BTI: f2@plt:
18 # CHECK-BTI-NEXT: bti   c
19 # CHECK-BTI-NEXT: adrp  x16, {{.*}}
21 --- !ELF
22 FileHeader:
23   Class:   ELFCLASS64
24   Data:    ELFDATA2LSB
25   Type:    ET_EXEC
26   Machine: EM_AARCH64
27 Sections:
28   - Name:    .rela.plt
29     Type:    SHT_RELA
30     Flags:   [ SHF_ALLOC ]
31     EntSize: 0x0000000000000018
32     Info:    .got.plt
33     Relocations:
34       - Offset: 0x0000000000230018
35         Symbol: f1
36         Type:   R_AARCH64_JUMP_SLOT
37       - Offset: 0x0000000000230020
38         Symbol: f2
39         Type:   R_AARCH64_JUMP_SLOT
40   - Name:    .text
41     Type:    SHT_PROGBITS
42     Flags:   [ SHF_ALLOC, SHF_EXECINSTR ]
43     Address: 0x0000000000210000
44     Content: 0C00009411000094C0035FD6
45   - Name:    .plt
46     Type:    SHT_PROGBITS
47     Flags:   [ SHF_ALLOC, SHF_EXECINSTR ]
48     Address: 0x0000000000210010
49     Content: 5F2403D5F07BBFA910010090110A40F91042009120021FD61F2003D51F2003D55F2403D510010090110E40F9106200919F2103D520021FD65F2403D510010090111240F9108200919F2103D520021FD6
50   - Name:    .got.plt
51     Type:    SHT_PROGBITS
52     Content: '000000000000000000000000000000000000000000000000100021000000000010002100000000001000210000000000'
53 Symbols:
54   - Name:    f1
55     Type:    STT_FUNC
56     Binding: STB_GLOBAL
57   - Name:    f2
58     Type:    STT_FUNC
59     Binding: STB_GLOBAL
60 ...