]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/elf/Mips/invalid-reginfo.test
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / elf / Mips / invalid-reginfo.test
1 # Check that LLD shows an error if .reginfo section has invalid size
2
3 # RUN: yaml2obj -format=elf %s > %t.o
4 # RUN: not lld -flavor gnu -target mipsel -o %t.exe %t.o 2>&1 | FileCheck %s
5
6 # CHECK: Invalid size of MIPS_REGINFO section
7
8 FileHeader:
9   Class:           ELFCLASS32
10   Data:            ELFDATA2LSB
11   Type:            ET_REL
12   Machine:         EM_MIPS
13   Flags:           [ EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ]
14 Sections:
15   - Name:          .text
16     Type:          SHT_PROGBITS
17     Flags:         [ SHF_ALLOC, SHF_EXECINSTR ]
18     AddressAlign:  0x04
19     Size:          0x04
20   - Name:          .reginfo
21     Type:          SHT_MIPS_REGINFO
22     Flags:         [ SHF_ALLOC ]
23     AddressAlign:  0x01
24     Size:          0x25
25 Symbols:
26   Global:
27     - Name:        main
28       Section:     .text