Skip to content

Commit 6684a35

Browse files
author
George Rimar
committedApr 23, 2019
[LLD][ELF] - Fix mips-invalid-options-descriptor.s test case and convert to YAML.
It was initially introduced in D25229 to report the "zero option descriptor size" error message. In following commits it was broken and did not report this error anymore. I think that happened because elf object was a result of fuzzing and it was broken in many ways. This patch converts this test to a YAML, removes a binary and hence fixes the original intention. llvm-svn: 358972
1 parent d2e2e20 commit 6684a35

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed
 
Binary file not shown.

‎lld/test/ELF/invalid/mips-invalid-options-descriptor.s

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# RUN: yaml2obj %s -o %t1.o
2+
# RUN: not ld.lld %t1.o -o %t 2>&1 | FileCheck %s
3+
# CHECK: error: {{.*}}1.o: zero option descriptor size
4+
5+
## YAML has a description of ODK_NULL (Undefined) MIPS option,
6+
## with a size of zero. We do not allow options with a zero size.
7+
## Check we report it.
8+
9+
--- !ELF
10+
FileHeader:
11+
Class: ELFCLASS64
12+
Data: ELFDATA2MSB
13+
Type: ET_REL
14+
Machine: EM_MIPS
15+
Flags: [ EF_MIPS_CPIC, EF_MIPS_ARCH_64 ]
16+
Sections:
17+
- Name: .MIPS.options
18+
Type: SHT_MIPS_OPTIONS
19+
Flags: [ SHF_ALLOC, SHF_MIPS_NOSTRIP ]
20+
AddressAlign: 0x0000000000000008
21+
Content: '0000000000000000'

0 commit comments

Comments
 (0)