[PATCH] D93235: [obj2yaml][yaml2obj] - Add AArch64 STO_AARCH64_VARIANT_PCS support
Adhemerval Zanella via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 14 10:03:11 PST 2020
zatrazz created this revision.
zatrazz added reviewers: grimar, jhenderson, MaskRay.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls, emaste.
Herald added a reviewer: espindola.
zatrazz requested review of this revision.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D93235
Files:
llvm/lib/ObjectYAML/ELFYAML.cpp
llvm/test/tools/obj2yaml/ELF/aarch64-sym-other.yaml
Index: llvm/test/tools/obj2yaml/ELF/aarch64-sym-other.yaml
===================================================================
--- /dev/null
+++ llvm/test/tools/obj2yaml/ELF/aarch64-sym-other.yaml
@@ -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 ]
Index: llvm/lib/ObjectYAML/ELFYAML.cpp
===================================================================
--- llvm/lib/ObjectYAML/ELFYAML.cpp
+++ llvm/lib/ObjectYAML/ELFYAML.cpp
@@ -1040,6 +1040,9 @@
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;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93235.311641.patch
Type: text/x-patch
Size: 1223 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201214/337a75ff/attachment.bin>
More information about the llvm-commits
mailing list