[obj2yaml][yaml2obj] - Add AArch64 STO_AARCH64_VARIANT_PCS support

Reviewed By: grimar, MaskRay

Differential Revision: https://reviews.llvm.org/D93235
This commit is contained in:
Adhemerval Zanella 2020-12-14 17:24:53 +00:00
parent 64badecd44
commit ef9dc51cd4
2 changed files with 25 additions and 0 deletions

View File

@ -1040,6 +1040,9 @@ struct NormalizedOther {
Map["STO_MIPS_PLT"] = ELF::STO_MIPS_PLT;
Map["STO_MIPS_OPTIONAL"] = ELF::STO_MIPS_OPTIONAL;
}
if (EMachine == ELF::EM_AARCH64)
Map["STO_AARCH64_VARIANT_PCS"] = ELF::STO_AARCH64_VARIANT_PCS;
return Map;
}

View File

@ -0,0 +1,22 @@
## Check AArch64 st_other extension support.
# RUN: yaml2obj %s -o %t
# RUN: obj2yaml %t | FileCheck %s
# CHECK: Symbols:
# CHECK: - Name: foo1
# CHECK: Other: [ STO_AARCH64_VARIANT_PCS ]
# CHECK: - Name: foo2
# CHECK: Other: [ STO_AARCH64_VARIANT_PCS, 64 ]
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_AARCH64
Symbols:
- Name: foo1
Other: [ STO_AARCH64_VARIANT_PCS ]
- Name: foo2
Other: [ STO_AARCH64_VARIANT_PCS, 0x40 ]