diff --git a/test/DebugInfo/X86/xray-split-dwarf-interaction.ll b/test/DebugInfo/X86/xray-split-dwarf-interaction.ll index 84ceb5c1f81..558073a9801 100644 --- a/test/DebugInfo/X86/xray-split-dwarf-interaction.ll +++ b/test/DebugInfo/X86/xray-split-dwarf-interaction.ll @@ -7,7 +7,7 @@ ; RUN: -function-sections -data-sections \ ; RUN: -relocation-model=pic -filetype=obj \ ; RUN: -generate-type-units -o - %s | \ -; RUN: llvm-readelf -sections | \ +; RUN: llvm-readelf --sections | \ ; RUN: FileCheck %s --check-prefix=CHECK-ELF ; Created from `clang++ -fxray-instrument -gsplit-dwarf -fdebug-types-section ; -ffunction-sections -fdata-sections -emit-llvm -S input.cc`: diff --git a/test/DebugInfo/debuglineinfo-path.ll b/test/DebugInfo/debuglineinfo-path.ll index 88dd4824798..18f5aa7ba6c 100644 --- a/test/DebugInfo/debuglineinfo-path.ll +++ b/test/DebugInfo/debuglineinfo-path.ll @@ -5,9 +5,9 @@ ; It is not essential to DWARF path handling code we're testing here. ; UNSUPPORTED: powerpc ; RUN: %llc_dwarf -O0 -filetype=obj -o %t < %s -; RUN: llvm-nm -radix=o %t | grep posix_absolute_func > %t.posix_absolute_func -; RUN: llvm-nm -radix=o %t | grep posix_relative_func > %t.posix_relative_func -; RUN: llvm-nm -radix=o %t | grep win_func > %t.win_func +; RUN: llvm-nm --radix=o %t | grep posix_absolute_func > %t.posix_absolute_func +; RUN: llvm-nm --radix=o %t | grep posix_relative_func > %t.posix_relative_func +; RUN: llvm-nm --radix=o %t | grep win_func > %t.win_func ; RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false --obj %t < %t.posix_absolute_func | FileCheck %s --check-prefix=POSIX_A ; RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false --obj %t < %t.posix_relative_func | FileCheck %s --check-prefix=POSIX_R ; RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false --obj %t < %t.win_func | FileCheck %s --check-prefix=WIN diff --git a/test/LTO/X86/runtime-library.ll b/test/LTO/X86/runtime-library.ll index 76fc6f0cc47..0ffaa0996e8 100644 --- a/test/LTO/X86/runtime-library.ll +++ b/test/LTO/X86/runtime-library.ll @@ -1,7 +1,7 @@ ; runtime library implementations should be added to llvm.compiler.used ; RUN: llvm-as <%s >%t1 ; RUN: llvm-lto -o %t2 %t1 -; RUN: llvm-nm -no-sort %t2 | FileCheck %s -check-prefix=KEEP -check-prefix=LOSE +; RUN: llvm-nm --no-sort %t2 | FileCheck %s -check-prefix=KEEP -check-prefix=LOSE target triple = "x86_64-apple-darwin9" diff --git a/test/MC/Mips/tls-symbols.s b/test/MC/Mips/tls-symbols.s index d5a31b18950..7affb8c4405 100644 --- a/test/MC/Mips/tls-symbols.s +++ b/test/MC/Mips/tls-symbols.s @@ -1,7 +1,6 @@ # RUN: llvm-mc -arch=mips < %s -position-independent -filetype=obj \ -# RUN: | llvm-readelf -symbols | FileCheck %s -# RUN: llvm-mc -arch=mips < %s -filetype=obj | llvm-readelf -symbols \ -# RUN: | FileCheck %s +# RUN: | llvm-readelf -s | FileCheck %s +# RUN: llvm-mc -arch=mips < %s -filetype=obj | llvm-readelf -s | FileCheck %s # Test that TLS relocations cause symbols to be marked as TLS symbols. diff --git a/test/Other/llvm-nm-without-aliases.ll b/test/Other/llvm-nm-without-aliases.ll index 4df1a751a04..7962804f08e 100644 --- a/test/Other/llvm-nm-without-aliases.ll +++ b/test/Other/llvm-nm-without-aliases.ll @@ -1,6 +1,6 @@ -; RUN: llvm-as < %s > %t -; RUN: llvm-nm -without-aliases - < %t | FileCheck %s -; RUN: llvm-nm - < %t | FileCheck --check-prefix=WITH %s +; RUN: llvm-as %s -o %t +; RUN: llvm-nm --without-aliases %t | FileCheck %s +; RUN: llvm-nm %t | FileCheck --check-prefix=WITH %s ; CHECK-NOT: T a0bar ; CHECK-NOT: T a0foo diff --git a/test/ThinLTO/X86/cache-icall.ll b/test/ThinLTO/X86/cache-icall.ll index 034ff97cede..83b740de4d5 100644 --- a/test/ThinLTO/X86/cache-icall.ll +++ b/test/ThinLTO/X86/cache-icall.ll @@ -13,14 +13,14 @@ ; RUN: -r=%t.bc,_start,px \ ; RUN: -r=%t.bc,f, -; RUN: llvm-readelf -symbols %t-no.o.* | FileCheck %s --check-prefix=SYMBOLS-NO +; RUN: llvm-readelf -s %t-no.o.* | FileCheck %s --check-prefix=SYMBOLS-NO ; RUN: llvm-lto2 run -o %t-yes.o %t.bc %t2.bc -cache-dir %t.cache \ ; RUN: -r=%t.bc,_start,px \ ; RUN: -r=%t.bc,f, \ ; RUN: -r=%t2.bc,f,p -; RUN: llvm-readelf -symbols %t-yes.o.* | FileCheck %s --check-prefix=SYMBOLS-YES +; RUN: llvm-readelf -s %t-yes.o.* | FileCheck %s --check-prefix=SYMBOLS-YES ; SYMBOLS-NO-DAG: {{FUNC .* f.cfi_jt$}} ; SYMBOLS-NO-DAG: {{NOTYPE .* UND f.cfi_jt$}} diff --git a/test/tools/gold/X86/bcsection.ll b/test/tools/gold/X86/bcsection.ll index 6a7dd32fe04..6d3481f8f96 100644 --- a/test/tools/gold/X86/bcsection.ll +++ b/test/tools/gold/X86/bcsection.ll @@ -2,11 +2,11 @@ ; RUN: llvm-as -o %t/bcsection.bc %s ; RUN: llvm-mc -I=%t -filetype=obj -triple=x86_64-unknown-unknown -o %t/bcsection.bco %p/Inputs/bcsection.s -; RUN: llvm-nm -no-llvm-bc %t/bcsection.bco 2>&1 | FileCheck %s -check-prefix=NO-SYMBOLS +; RUN: llvm-nm --no-llvm-bc %t/bcsection.bco 2>&1 | FileCheck %s -check-prefix=NO-SYMBOLS ; NO-SYMBOLS: no symbols ; RUN: %gold -r -o %t/bcsection.o -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t/bcsection.bco -; RUN: llvm-nm -no-llvm-bc %t/bcsection.o | FileCheck %s +; RUN: llvm-nm --no-llvm-bc %t/bcsection.o | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-unknown" diff --git a/test/tools/llvm-ar/coff-weak.yaml b/test/tools/llvm-ar/coff-weak.yaml index c66271dc8a7..6643fbfd77b 100644 --- a/test/tools/llvm-ar/coff-weak.yaml +++ b/test/tools/llvm-ar/coff-weak.yaml @@ -2,7 +2,7 @@ # # RUN: rm -f %t.ar # RUN: llvm-ar crs %t.a %t.obj -# RUN: llvm-nm -print-armap %t.a | FileCheck %s +# RUN: llvm-nm --print-armap %t.a | FileCheck %s # CHECK: Archive map # CHECK-NEXT: WeakSearchAlias in coff-weak.yaml.tmp.obj diff --git a/test/tools/llvm-nm/X86/IRobj.test b/test/tools/llvm-nm/X86/IRobj.test index e6fa517d00e..9cead8e335c 100644 --- a/test/tools/llvm-nm/X86/IRobj.test +++ b/test/tools/llvm-nm/X86/IRobj.test @@ -1,4 +1,4 @@ -# RUN: llvm-nm -format darwin %p/Inputs/test.IRobj-x86_64 | FileCheck %s +# RUN: llvm-nm --format darwin %p/Inputs/test.IRobj-x86_64 | FileCheck %s # CHECK: ---------------- (LTO,RODATA) external _global_const # CHECK: ---------------- (LTO,DATA) external _global_data diff --git a/test/tools/llvm-nm/X86/dyldinfo.test b/test/tools/llvm-nm/X86/dyldinfo.test index 90e652f5831..d40148f4f79 100644 --- a/test/tools/llvm-nm/X86/dyldinfo.test +++ b/test/tools/llvm-nm/X86/dyldinfo.test @@ -1,6 +1,6 @@ # RUN: llvm-nm %p/Inputs/Strip-ST.dylib.macho-x86_64 | FileCheck --check-prefix=DEFAULT %s -# RUN: llvm-nm -no-dyldinfo %p/Inputs/Strip-ST.dylib.macho-x86_64 | FileCheck --check-prefix=NO-DYLDINFO %s -# RUN: llvm-nm -dyldinfo-only %p/Inputs/Strip-ST.dylib.macho-x86_64 | FileCheck --check-prefix=DYLDINFO-ONLY %s +# RUN: llvm-nm --no-dyldinfo %p/Inputs/Strip-ST.dylib.macho-x86_64 | FileCheck --check-prefix=NO-DYLDINFO %s +# RUN: llvm-nm --dyldinfo-only %p/Inputs/Strip-ST.dylib.macho-x86_64 | FileCheck --check-prefix=DYLDINFO-ONLY %s # RUN: llvm-nm %p/Inputs/Strip-N.hello.exe.macho-x86_64 | FileCheck --check-prefix=FUNC-STARTS %s # RUN: llvm-nm %p/Inputs/Strip-N.LC_MAIN.exe.macho-x86_64 | FileCheck --check-prefix=LC-MAIN %s diff --git a/test/tools/llvm-nm/X86/radix.s b/test/tools/llvm-nm/X86/radix.s index e6199e88fb3..1f05458ab32 100644 --- a/test/tools/llvm-nm/X86/radix.s +++ b/test/tools/llvm-nm/X86/radix.s @@ -1,8 +1,8 @@ -//#check radix formats of llvm-nm -//RUN: llvm-mc %s -filetype=obj -triple=x86_64-pc-linux -o %t.o -//RUN: llvm-nm -radix=d %t.o | FileCheck %s -//RUN: llvm-nm -radix=o %t.o | FileCheck --check-prefix="OCTAL" %s -//RUN: llvm-nm -t=x %t.o | FileCheck --check-prefix="HEX" %s +// #check radix formats of llvm-nm +// RUN: llvm-mc %s -filetype=obj -triple=x86_64-pc-linux -o %t.o +// RUN: llvm-nm --radix=d %t.o | FileCheck %s +// RUN: llvm-nm --radix=o %t.o | FileCheck --check-prefix=OCTAL %s +// RUN: llvm-nm -t=x %t.o | FileCheck --check-prefix=HEX %s .text .file "1.c" diff --git a/test/tools/llvm-readobj/elf-reloc-symbol-with-versioning.test b/test/tools/llvm-readobj/elf-reloc-symbol-with-versioning.test index 3d078d3cfb9..8fa191984d5 100644 --- a/test/tools/llvm-readobj/elf-reloc-symbol-with-versioning.test +++ b/test/tools/llvm-readobj/elf-reloc-symbol-with-versioning.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t.o -# RUN: llvm-readobj -demangle -r %t.o | FileCheck %s --check-prefix LLVM -# RUN: llvm-readelf -demangle -r %t.o | FileCheck %s --check-prefix GNU +# RUN: llvm-readobj --demangle -r %t.o | FileCheck %s --check-prefix LLVM +# RUN: llvm-readelf --demangle -r %t.o | FileCheck %s --check-prefix GNU # GNU: Relocation section '.rela.plt' at offset {{.*}} contains 5 entries: # GNU-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend diff --git a/test/tools/llvm-readobj/elf-versioninfo.test b/test/tools/llvm-readobj/elf-versioninfo.test index c5593a4166a..8138f09715f 100644 --- a/test/tools/llvm-readobj/elf-versioninfo.test +++ b/test/tools/llvm-readobj/elf-versioninfo.test @@ -1,7 +1,7 @@ // Test that llvm-readobj dumps version info tags correctly. -RUN: llvm-readobj -dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s --check-prefix=LLVM-VERDEF -RUN: llvm-readelf -dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s --check-prefix=GNU-VERDEF +RUN: llvm-readobj --dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s --check-prefix=LLVM-VERDEF +RUN: llvm-readelf --dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s --check-prefix=GNU-VERDEF LLVM-VERDEF: 0x000000006FFFFFF0 VERSYM 0x24C LLVM-VERDEF: 0x000000006FFFFFFC VERDEF 0x25C diff --git a/test/tools/lto/opt-level.ll b/test/tools/lto/opt-level.ll index 07bf48d6caf..b282679936a 100644 --- a/test/tools/lto/opt-level.ll +++ b/test/tools/lto/opt-level.ll @@ -1,8 +1,8 @@ ; RUN: llvm-as %s -o %t.o ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -O0 -o %t.dylib %t.o -; RUN: llvm-nm -no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O0 %s +; RUN: llvm-nm --no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O0 %s ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -O2 -o %t.dylib %t.o -; RUN: llvm-nm -no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O2 %s +; RUN: llvm-nm --no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O2 %s target triple = "x86_64-apple-macosx10.8.0" diff --git a/test/tools/yaml2obj/dynamic-symbols.yaml b/test/tools/yaml2obj/dynamic-symbols.yaml index 718b06d55c4..c4abc648880 100644 --- a/test/tools/yaml2obj/dynamic-symbols.yaml +++ b/test/tools/yaml2obj/dynamic-symbols.yaml @@ -1,7 +1,7 @@ # Ensures that implicitly added sections can be ordered within Sections. # RUN: yaml2obj %s -o %t # RUN: llvm-readobj -sections %t | FileCheck %s --check-prefix=SECTION -# RUN: llvm-nm -dynamic %t | FileCheck %s --check-prefix=SYMBOL +# RUN: llvm-nm --dynamic %t | FileCheck %s --check-prefix=SYMBOL !ELF FileHeader: diff --git a/test/tools/yaml2obj/symbol-index.yaml b/test/tools/yaml2obj/symbol-index.yaml index 980c70d52cc..0530fa43a39 100644 --- a/test/tools/yaml2obj/symbol-index.yaml +++ b/test/tools/yaml2obj/symbol-index.yaml @@ -1,5 +1,5 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-readelf -symbols %t | FileCheck %s +# RUN: llvm-readelf -s %t | FileCheck %s !ELF FileHeader: diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp index 86b7bf87a72..ebb2c3d06b9 100644 --- a/tools/llvm-nm/llvm-nm.cpp +++ b/tools/llvm-nm/llvm-nm.cpp @@ -934,10 +934,6 @@ static char getSymbolNMTypeChar(ELFObjectFileBase &Obj, return '?'; } - uint8_t Binding = SymI->getOther() >> 4; - if (Binding == ELF::STB_GNU_UNIQUE) - return 'u'; - elf_section_iterator SecI = *SecIOrErr; if (SecI != Obj.section_end()) { uint32_t Type = SecI->getType();