]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/elf/AArch64/rel-bad.test
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / elf / AArch64 / rel-bad.test
1 # Check handling of a bad relocation (in this case dynamic in a static object).
2 # RUN: yaml2obj -format=elf %s > %t-obj
3 # RUN: not lld -flavor gnu -target arm64 -o %t-exe %t-obj 2>&1 | FileCheck %s
4
5 # CHECK: Unhandled reference type in file {{.*}}: reference from data1+4 to data1+0 of type 1024 (R_AARCH64_COPY)
6
7 !ELF
8 FileHeader: !FileHeader
9   Class: ELFCLASS64
10   Data: ELFDATA2LSB
11   Type: ET_REL
12   Machine: EM_AARCH64
13
14 Sections:
15 - Name: .text
16   Type: SHT_PROGBITS
17   Content: "00000000"
18   AddressAlign: 16
19   Flags: [SHF_ALLOC, SHF_EXECINSTR]
20 - Name: .data
21   Type: SHT_PROGBITS
22   Content: "0000000000000000"
23   AddressAlign: 16
24   Flags: [SHF_ALLOC, SHF_WRITE]
25
26 - Name: .rela.data
27   Type: SHT_RELA
28   Info: .data
29   AddressAlign: 8
30   Relocations:
31     - Offset: 0x4
32       Symbol: data1
33       Type: R_AARCH64_COPY
34       Addend: 0
35
36 Symbols:
37   Global:
38     - Name: _start
39       Section: .text
40       Value: 0x0
41       Size: 4
42     - Name: data1
43       Section: .data
44       Size: 8