summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/invalid/reloc-section-reordered.test
blob: 286d6612b76846b18e6d7a8fc40840b68fd065ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# REQUIRES: x86

# RUN: yaml2obj %s -o %t.o
# RUN: not ld.lld %t.o -o %t.exe 2>&1 | FileCheck %s
# CHECK: unsupported relocation reference

## YAML below lists .rela.text before .text, we do not support it.

!ELF
FileHeader:
  Class:           ELFCLASS64
  Data:            ELFDATA2LSB
  OSABI:           ELFOSABI_FREEBSD
  Type:            ET_REL
  Machine:         EM_X86_64
Sections:
  - Type:            SHT_REL
    Name:            .rela.text
    Link:            .symtab
    Info:            .text
    AddressAlign:    0x04
    Relocations:
      - Offset:          0
        Symbol:          .text
        Type:            R_X86_64_NONE
  - Type:            SHT_PROGBITS
    Name:            .text
    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
    AddressAlign:    0x04
    Content:         "FFFFFFFFFFFFFFFF"
Symbols:
  - Name:    .text
    Type:    STT_SECTION
    Section: .text
OpenPOWER on IntegriCloud