[PATCH] D153260: [RISCV][MC] Implement mapping symbols

Job Noorman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 01:07:43 PDT 2023


jobnoorman added inline comments.


================
Comment at: llvm/test/MC/RISCV/mapping-across-sections.s:1
+# RUN: llvm-mc -triple=riscv32 -filetype=obj < %s | llvm-objdump -t - | FileCheck %s
+# RUN: llvm-mc -triple=riscv64 -filetype=obj < %s | llvm-objdump -t - | FileCheck %s
----------------
MaskRay wrote:
> Ideally use llvm-readelf for testing, which retains all `Elf*_Sym` information. llvm-objdump -t output losses some information e.g. certain ELF symbol types are not distinguishable.
Good point. One slight annoyance with implementing this is that `llvm-readelf` doesn't show section names, only indices. I would ideally like to avoid having to hard code indices. This could in principle be done using `--elf-output-style=LLVM` but this makes the `CHECK`s very verbose.

So before implementing this, I wanted to ask your opinion. Do you prefer hard coding indices or more verbosity in the tests (or stick with the current version)?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153260



More information about the llvm-commits mailing list