llvm.org GIT mirror llvm / b6730a3
[llvm-nm] Add --special-syms no-op flag Differential revision: https://reviews.llvm.org/D60502 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359563 91177308-0d34-0410-b5e6-96231b3b80d8 Eugene Leviant 1 year, 5 months ago
2 changed file(s) with 35 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 # RUN: yaml2obj %s > %t
1 # Test --special-syms flag. Currently this flag is a no-op, so outputs with and without
2 # this flag should be identical. GNU nm doesn't show ARM and AArch64 special symbols
3 # without --special-syms, so this test is to be changed when/if we decide to implement
4 # GNU nm-like behavior in llvm-nm
5
6 # RUN: llvm-nm %t | FileCheck %s
7 # RUN: llvm-nm %t --special-syms | FileCheck %s
8
9 !ELF
10 FileHeader:
11 Class: ELFCLASS64
12 Data: ELFDATA2LSB
13 Type: ET_REL
14 Machine: EM_AARCH64
15 Sections:
16 - Name: .text
17 Type: SHT_PROGBITS
18 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
19 Address: 0x1000
20 - Name: .data
21 Type: SHT_PROGBITS
22 Flags: [ SHF_ALLOC, SHF_WRITE ]
23 Address: 0x2000
24 Symbols:
25 - Name: $x.1
26 Section: .text
27 - Name: $d.1
28 Section: .data
29
30 # CHECK: 2000 d $d.1
31 # CHECK-NEXT: 1000 t $x.1
178178 cl::cat(NMCat));
179179 cl::alias JustSymbolNames("j", cl::desc("Alias for --just-symbol-name"),
180180 cl::aliasopt(JustSymbolName), cl::Grouping);
181
182 cl::opt SpecialSyms("special-syms",
183 cl::desc("No-op. Used for GNU compatibility only"));
181184
182185 // FIXME: This option takes exactly two strings and should be allowed anywhere
183186 // on the command line. Such that "llvm-nm -s __TEXT __text foo.o" would work.