[PATCH] D93044: [llvm-readobj/elf] - AArch64: Handle AARCH64_VARIANT_PCS for GNUStyle
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 14 07:43:57 PST 2020
grimar added inline comments.
================
Comment at: llvm/lib/ObjectYAML/ELFYAML.cpp:1045
+ if (EMachine == ELF::EM_AARCH64)
+ Map["STO_AARCH64_VARIANT_PCS"] = ELF::STO_AARCH64_VARIANT_PCS;
+
----------------
This belongs to yaml2obj functionality, not to llvm-readelf/obj and can be fixed separatelly.
I'd suggest either
a) split this to a separate yaml2obj patch and then rebase this one on top
b) just remove this for now and use a numeric unnamed constants (0x80) in the YAML (with a TODO/FIXME note about yaml2obj).
================
Comment at: llvm/test/tools/llvm-readobj/ELF/aarch64-symbols-stother.test:12
+# LLVM: Other [ (0xC0)
+# LLVM-NEXT: ]
+
----------------
This output looks a bit wrong.
See the output from `mips-symbols-stother.test`:
```
# MIPS-LLVM:Name: foo
# MIPS-LLVM:Other [
# MIPS-LLVM-NEXT: STO_MIPS_MICROMIPS (0x80)
# MIPS-LLVM-NEXT: STO_MIPS_OPTIONAL (0x4)
# MIPS-LLVM-NEXT: STO_MIPS_PIC (0x20)
# MIPS-LLVM-NEXT: STO_MIPS_PLT (0x8)
# MIPS-LLVM-NEXT:]
# MIPS-LLVM:Name: bar
# MIPS-LLVM:Other [
# MIPS-LLVM-NEXT: STO_MIPS_MIPS16 (0xF0)
# MIPS-LLVM-NEXT:]
```
I think you need to update `LLVMStyle<ELFT>::printSymbol` too.
================
Comment at: llvm/test/tools/llvm-readobj/ELF/aarch64-symbols-stother.test:16
+# GNU: 1: 0000000000000000 0 NOTYPE LOCAL DEFAULT [VARIANT_PCS] UND foo1
+# GNU-NEXT: 2: 0000000000000000 0 NOTYPE LOCAL DEFAULT [VARIANT_PCS | 40] UND foo2
+
----------------
Please align.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93044/new/
https://reviews.llvm.org/D93044
More information about the llvm-commits
mailing list