1 // This test demonstrates that the alphabetical-order tie breaking between
2 // multiple symbols defined at the same address is based on the raw symbol
3 // name
, not its demangled version.
5 @ REQUIRES
: arm-registered-target
7 @ RUN
: llvm-mc
-triple armv8a-unknown-linux
-filetype
=obj
%s
-o
%t.o
9 // All the run lines below should generate some subset of this
10 // display
, with different parts included
:
12 @ COMMON
: Disassembly of section
.text:
14 @ RAW-
B: 00000000 <_Z4bbbbv
>:
15 @ NICE-
B: 00000000 <bbbb
()>:
18 @ COMMON
: 0: e0800080
add r0, r0, r0, lsl
#1
19 @ COMMON
: 4: e12fff1e bx
lr
21 // The default disassembly chooses just the alphabetically later symbol
, which
22 // is aaaa
, because the leading _ on
a mangled name sorts before lowercase
25 @ RUN
: llvm-objdump
--triple armv8a
-d
%t.o | FileCheck
--check-prefixes
=COMMON
,NO-
B,A %s
27 // With the
--show-all-symbols option
, bbbb is also shown
, in its raw form.
29 @ RUN
: llvm-objdump
--triple armv8a
--show-all-symbols
-d
%t.o | FileCheck
--check-prefixes
=COMMON
,RAW-
B,A %s
31 // With
--demangle as well
, bbbb is demangled
, but that doesn
't change its
32 // place in the sorting order.
34 @ RUN: llvm-objdump --triple armv8a --show-all-symbols --demangle -d %t.o | FileCheck --check-prefixes=COMMON,NICE-B,A %s
41 add r0, r0, r0, lsl #1