[PATCH] D61117: Fix Bug 41353 - unique symbols printed as D instead of u
Jordan Rupprecht via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 2 16:36:31 PDT 2019
rupprecht added a subscriber: MaskRay.
rupprecht added a reviewer: grimar.
rupprecht added a comment.
Looks like support was recently added in rL359380 <https://reviews.llvm.org/rL359380>, though without any tests, and was accidentally reverted.
The approach there (checking `SymI->getOther() >> 4 == ELF::STB_GNU_UNIQUE`) is a bit opaque, but I think with a comment might look better than the `dyn_cast` chain. Can you see if that works?
Also +grimar who has been adding GNU_UNIQUE support elsewhere
================
Comment at: llvm/test/tools/llvm-nm/X86/Inputs/unique.s:1
+ .data
+ .type foo,%gnu_unique_object
----------------
For simple cases like this, you can embed the assembly directly into the test file. See `llvm-nm/X86/radix.s` for an example test that does this.
================
Comment at: llvm/test/tools/llvm-nm/X86/unique.test:1
+# RUN: clang -c %p/Inputs/unique.s -o %t
+# RUN: llvm-nm %t | FileCheck %s
----------------
Instead of clang, use `llvm-mc -filetype=obj -triple=x86_64-pc-linux` to directly handle the assembly
Actually, yaml2obj might be even better, now that it can handle unique symbols.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61117/new/
https://reviews.llvm.org/D61117
More information about the llvm-commits
mailing list