mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
[yaml2obj] - Allow using an arbitrary value for OSABI.
There was no way to set an unsupported or unknown OS ABI. With this patch it is possible to use any numeric value. Differential revision: https://reviews.llvm.org/D71765
This commit is contained in:
parent
269a0dfaf6
commit
a6c442cb15
@ -275,6 +275,7 @@ void ScalarEnumerationTraits<ELFYAML::ELF_ELFOSABI>::enumeration(
|
||||
ECase(ELFOSABI_C6000_LINUX);
|
||||
ECase(ELFOSABI_STANDALONE);
|
||||
#undef ECase
|
||||
IO.enumFallback<Hex8>(Value);
|
||||
}
|
||||
|
||||
void ScalarBitSetTraits<ELFYAML::ELF_EF>::bitset(IO &IO,
|
||||
|
@ -325,3 +325,16 @@ FileHeader:
|
||||
Type: ET_REL
|
||||
Machine: EM_X86_64
|
||||
OSABI: ELFOSABI_STANDALONE
|
||||
|
||||
## Test we can use an arbitrary number for OSABI.
|
||||
# RUN: yaml2obj %s --docnum=27 -o %t.number
|
||||
# RUN: llvm-readobj --file-headers %t.number | FileCheck %s --check-prefix=OSABI-NUMBER
|
||||
# OSABI-NUMBER: OS/ABI: 0xFE
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_REL
|
||||
Machine: EM_X86_64
|
||||
OSABI: 0xFE
|
||||
|
Loading…
Reference in New Issue
Block a user