43 lines · plain
1// This test demonstrates that the alphabetical-order tie breaking between2// multiple symbols defined at the same address is based on the raw symbol3// name, not its demangled version.4 5@ REQUIRES: arm-registered-target6 7@ RUN: llvm-mc -triple armv8a-unknown-linux -filetype=obj %s -o %t.o8 9// All the run lines below should generate some subset of this10// display, with different parts included:11 12@ COMMON: Disassembly of section .text:13@14@ RAW-B: 00000000 <_Z4bbbbv>:15@ NICE-B: 00000000 <bbbb()>:16@ NO-B-NOT: bbbb17@ A: 00000000 <aaaa>:18@ COMMON: 0: e0800080 add r0, r0, r0, lsl #119@ COMMON: 4: e12fff1e bx lr20 21// The default disassembly chooses just the alphabetically later symbol, which22// is aaaa, because the leading _ on a mangled name sorts before lowercase23// ASCII.24 25@ RUN: llvm-objdump --triple armv8a -d %t.o | FileCheck --check-prefixes=COMMON,NO-B,A %s26 27// With the --show-all-symbols option, bbbb is also shown, in its raw form.28 29@ RUN: llvm-objdump --triple armv8a --show-all-symbols -d %t.o | FileCheck --check-prefixes=COMMON,RAW-B,A %s30 31// With --demangle as well, bbbb is demangled, but that doesn't change its32// place in the sorting order.33 34@ RUN: llvm-objdump --triple armv8a --show-all-symbols --demangle -d %t.o | FileCheck --check-prefixes=COMMON,NICE-B,A %s35 36.text37.globl aaaa38.globl _Z4bbbv39aaaa:40_Z4bbbbv:41 add r0, r0, r0, lsl #142 bx lr43