aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/invalid/invalid-e_shnum.test
blob: 7c04c105d2920c75e82027f5eceeba6645de4b02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
## Spec says that "If a file has no section header table, e_shnum holds the value zero.", though
## in this test case it holds non-zero and lld used to crash.

# RUN: yaml2obj %s -o %t
# RUN: ld.lld %t -o /dev/null

--- !ELF
FileHeader:
  Class:     ELFCLASS64
  Data:      ELFDATA2LSB
  Type:      ET_REL
  Machine:   EM_X86_64
  SHOff:     0
  SHNum:     0x1
  SHStrNdx:  0