llvm/test/tools/yaml2obj/symbol-index-invalid.yaml
Petr Hosek 746c778562 [yaml2obj][ELF] Add support for symbol indexes greater than SHN_LORESERVE
Right now Symbols must be either undefined or defined in a specific
section. Some symbols have section indexes like SHN_ABS however. This
change adds support for outputting symbols that have such section
indexes.

Patch by Jake Ehrlich

Differential Revision: https://reviews.llvm.org/D37391

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312745 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-07 20:44:16 +00:00

22 lines
556 B
YAML

# This test insures that the user cannot have both an Index and a Section field.
# RUN: not yaml2obj %s
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Address: 0x1000
AddressAlign: 0x0000000000000010
Content: "0000000000000000"
Symbols:
Global:
- Name: _start
Section: .text
Index: SHN_ABS