RUN: | FileCheck %s -check-prefix macho64
RUN: llvm-nm %p/Inputs/macho-text-data-bss.macho-x86_64 \
RUN: | FileCheck %s -check-prefix macho-tdb
+RUN: llvm-nm -j %p/Inputs/macho-text-data-bss.macho-x86_64 \
+RUN: | FileCheck %s -check-prefix macho-j
RUN: llvm-nm -r %p/Inputs/macho-text-data-bss.macho-x86_64 \
RUN: | FileCheck %s -check-prefix macho-r
RUN: llvm-nm %p/Inputs/common.coff-i386 \
macho-tdb: 0000000000000000 T _t
macho-tdb: 0000000000000048 S _t.eh
+macho-j: EH_frame0
+macho-j: _b
+macho-j: _d
+macho-j: _t
+macho-j: _t.eh
+
macho-r: 0000000000000048 S _t.eh
macho-r-NEXT: 0000000000000000 T _t
macho-r-NEXT: 000000000000000c D _d
cl::opt<bool> ArchiveMap("print-armap", cl::desc("Print the archive map"));
cl::alias ArchiveMaps("s", cl::desc("Alias for --print-armap"),
cl::aliasopt(ArchiveMap));
+
+cl::opt<bool> JustSymbolName("just-symbol-name",
+ cl::desc("Print just the symbol's name"));
+cl::alias JustSymbolNames("j", cl::desc("Alias for --just-symbol-name"),
+ cl::aliasopt(JustSymbolName));
bool PrintAddress = true;
bool MultipleFiles = false;
continue;
if (SizeSort && !PrintAddress && I->Size == UnknownAddressOrSize)
continue;
+ if (JustSymbolName) {
+ outs() << I->Name << "\n";
+ continue;
+ }
char SymbolAddrStr[18] = "";
char SymbolSizeStr[18] = "";