[PATCH] D93235: [obj2yaml][yaml2obj] - Add AArch64 STO_AARCH64_VARIANT_PCS support

Adhemerval Zanella via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 17 06:34:46 PST 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGef9dc51cd4af: [obj2yaml][yaml2obj] - Add AArch64 STO_AARCH64_VARIANT_PCS support (authored by zatrazz).

Changed prior to commit:
  https://reviews.llvm.org/D93235?vs=311641&id=312482#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93235/new/

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.312482.patch
Type: text/x-patch
Size: 1186 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201217/7564f73e/attachment.bin>


More information about the llvm-commits mailing list