[PATCH] D98803: [llvm-symbolizer][llvm-nm] Fix AArch64 and ARM mapping symbols handling.

Yvan Roux via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 23 02:33:02 PDT 2021


yroux added inline comments.


================
Comment at: llvm/test/DebugInfo/Symbolize/ELF/aarch64-mapping-symbol.s:3
+## Ignore AArch64 mapping symbols (with a prefix of $d or $x).
+# RUN: llvm-mc -filetype=obj -triple=aarch64-- %s -o %t
+# RUN: llvm-nm --special-syms %t | FileCheck %s -check-prefix MAPPING_SYM
----------------
jhenderson wrote:
> I have this vague, and quite possibly incorrect, idea that you can just omit the "--" part of the triple completely (i.e. `-triple=aarch64`).
Ah yes that's correct, I think I'm use to write it that way because I saw that in other tests, but I'll change that


================
Comment at: llvm/test/DebugInfo/Symbolize/ELF/aarch64-mapping-symbol.s:4
+# RUN: llvm-mc -filetype=obj -triple=aarch64-- %s -o %t
+# RUN: llvm-nm --special-syms %t | FileCheck %s -check-prefix MAPPING_SYM
+
----------------
jhenderson wrote:
> Add a comment explaining why the llvm-nm line is useful. Ditto for the ARM case.
OK


================
Comment at: llvm/test/tools/llvm-nm/debug-syms.test:2
 # RUN: yaml2obj %s -o %t.o
-# RUN: llvm-nm --special-syms --debug-syms %t.o | FileCheck %s --implicit-check-not {{.}} --check-prefix SYMBOL
-# RUN: llvm-nm --special-syms -a %t.o | FileCheck %s --implicit-check-not {{.}} --check-prefix SYMBOL
+# RUN: llvm-nm --debug-syms %t.o | FileCheck %s --implicit-check-not {{.}} --check-prefix SYMBOL
+# RUN: llvm-nm -a %t.o | FileCheck %s --implicit-check-not {{.}} --check-prefix SYMBOL
----------------
jhenderson wrote:
> Does this behaviour (that mapping symbols are printed with --debug-syms and not --special-syms) match GNU nm behaviour?
Yes with that change llvm-nm will match nm behaviour w/r to --special-syms and --debug-syms


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98803



More information about the llvm-commits mailing list