llvm.org GIT mirror llvm / 89bcca2
[llvm-nm][llvm-readelf] Avoid single-dash -long-option in tests git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359383 91177308-0d34-0410-b5e6-96231b3b80d8 Fangrui Song 3 months ago
17 changed file(s) with 31 addition(s) and 36 deletion(s). Raw diff Collapse all Expand all
66 ; RUN: -function-sections -data-sections \
77 ; RUN: -relocation-model=pic -filetype=obj \
88 ; RUN: -generate-type-units -o - %s | \
9 ; RUN: llvm-readelf -sections | \
9 ; RUN: llvm-readelf --sections | \
1010 ; RUN: FileCheck %s --check-prefix=CHECK-ELF
1111 ; Created from `clang++ -fxray-instrument -gsplit-dwarf -fdebug-types-section
1212 ; -ffunction-sections -fdata-sections -emit-llvm -S input.cc`:
44 ; It is not essential to DWARF path handling code we're testing here.
55 ; UNSUPPORTED: powerpc
66 ; RUN: %llc_dwarf -O0 -filetype=obj -o %t < %s
7 ; RUN: llvm-nm -radix=o %t | grep posix_absolute_func > %t.posix_absolute_func
8 ; RUN: llvm-nm -radix=o %t | grep posix_relative_func > %t.posix_relative_func
9 ; RUN: llvm-nm -radix=o %t | grep win_func > %t.win_func
7 ; RUN: llvm-nm --radix=o %t | grep posix_absolute_func > %t.posix_absolute_func
8 ; RUN: llvm-nm --radix=o %t | grep posix_relative_func > %t.posix_relative_func
9 ; RUN: llvm-nm --radix=o %t | grep win_func > %t.win_func
1010 ; RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false --obj %t < %t.posix_absolute_func | FileCheck %s --check-prefix=POSIX_A
1111 ; RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false --obj %t < %t.posix_relative_func | FileCheck %s --check-prefix=POSIX_R
1212 ; RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false --obj %t < %t.win_func | FileCheck %s --check-prefix=WIN
0 ; runtime library implementations should be added to llvm.compiler.used
11 ; RUN: llvm-as <%s >%t1
22 ; RUN: llvm-lto -o %t2 %t1
3 ; RUN: llvm-nm -no-sort %t2 | FileCheck %s -check-prefix=KEEP -check-prefix=LOSE
3 ; RUN: llvm-nm --no-sort %t2 | FileCheck %s -check-prefix=KEEP -check-prefix=LOSE
44
55 target triple = "x86_64-apple-darwin9"
66
0 # RUN: llvm-mc -arch=mips < %s -position-independent -filetype=obj \
1 # RUN: | llvm-readelf -symbols | FileCheck %s
2 # RUN: llvm-mc -arch=mips < %s -filetype=obj | llvm-readelf -symbols \
3 # RUN: | FileCheck %s
1 # RUN: | llvm-readelf -s | FileCheck %s
2 # RUN: llvm-mc -arch=mips < %s -filetype=obj | llvm-readelf -s | FileCheck %s
43
54 # Test that TLS relocations cause symbols to be marked as TLS symbols.
65
None ; RUN: llvm-as < %s > %t
1 ; RUN: llvm-nm -without-aliases - < %t | FileCheck %s
2 ; RUN: llvm-nm - < %t | FileCheck --check-prefix=WITH %s
0 ; RUN: llvm-as %s -o %t
1 ; RUN: llvm-nm --without-aliases %t | FileCheck %s
2 ; RUN: llvm-nm %t | FileCheck --check-prefix=WITH %s
33
44 ; CHECK-NOT: T a0bar
55 ; CHECK-NOT: T a0foo
1212 ; RUN: -r=%t.bc,_start,px \
1313 ; RUN: -r=%t.bc,f,
1414
15 ; RUN: llvm-readelf -symbols %t-no.o.* | FileCheck %s --check-prefix=SYMBOLS-NO
15 ; RUN: llvm-readelf -s %t-no.o.* | FileCheck %s --check-prefix=SYMBOLS-NO
1616
1717 ; RUN: llvm-lto2 run -o %t-yes.o %t.bc %t2.bc -cache-dir %t.cache \
1818 ; RUN: -r=%t.bc,_start,px \
1919 ; RUN: -r=%t.bc,f, \
2020 ; RUN: -r=%t2.bc,f,p
2121
22 ; RUN: llvm-readelf -symbols %t-yes.o.* | FileCheck %s --check-prefix=SYMBOLS-YES
22 ; RUN: llvm-readelf -s %t-yes.o.* | FileCheck %s --check-prefix=SYMBOLS-YES
2323
2424 ; SYMBOLS-NO-DAG: {{FUNC .* f.cfi_jt$}}
2525 ; SYMBOLS-NO-DAG: {{NOTYPE .* UND f.cfi_jt$}}
11 ; RUN: llvm-as -o %t/bcsection.bc %s
22
33 ; RUN: llvm-mc -I=%t -filetype=obj -triple=x86_64-unknown-unknown -o %t/bcsection.bco %p/Inputs/bcsection.s
4 ; RUN: llvm-nm -no-llvm-bc %t/bcsection.bco 2>&1 | FileCheck %s -check-prefix=NO-SYMBOLS
4 ; RUN: llvm-nm --no-llvm-bc %t/bcsection.bco 2>&1 | FileCheck %s -check-prefix=NO-SYMBOLS
55 ; NO-SYMBOLS: no symbols
66
77 ; RUN: %gold -r -o %t/bcsection.o -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t/bcsection.bco
8 ; RUN: llvm-nm -no-llvm-bc %t/bcsection.o | FileCheck %s
8 ; RUN: llvm-nm --no-llvm-bc %t/bcsection.o | FileCheck %s
99
1010 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
1111 target triple = "x86_64-unknown-unknown"
11 #
22 # RUN: rm -f %t.ar
33 # RUN: llvm-ar crs %t.a %t.obj
4 # RUN: llvm-nm -print-armap %t.a | FileCheck %s
4 # RUN: llvm-nm --print-armap %t.a | FileCheck %s
55
66 # CHECK: Archive map
77 # CHECK-NEXT: WeakSearchAlias in coff-weak.yaml.tmp.obj
None # RUN: llvm-nm -format darwin %p/Inputs/test.IRobj-x86_64 | FileCheck %s
0 # RUN: llvm-nm --format darwin %p/Inputs/test.IRobj-x86_64 | FileCheck %s
11
22 # CHECK: ---------------- (LTO,RODATA) external _global_const
33 # CHECK: ---------------- (LTO,DATA) external _global_data
0 # RUN: llvm-nm %p/Inputs/Strip-ST.dylib.macho-x86_64 | FileCheck --check-prefix=DEFAULT %s
1 # RUN: llvm-nm -no-dyldinfo %p/Inputs/Strip-ST.dylib.macho-x86_64 | FileCheck --check-prefix=NO-DYLDINFO %s
2 # RUN: llvm-nm -dyldinfo-only %p/Inputs/Strip-ST.dylib.macho-x86_64 | FileCheck --check-prefix=DYLDINFO-ONLY %s
1 # RUN: llvm-nm --no-dyldinfo %p/Inputs/Strip-ST.dylib.macho-x86_64 | FileCheck --check-prefix=NO-DYLDINFO %s
2 # RUN: llvm-nm --dyldinfo-only %p/Inputs/Strip-ST.dylib.macho-x86_64 | FileCheck --check-prefix=DYLDINFO-ONLY %s
33 # RUN: llvm-nm %p/Inputs/Strip-N.hello.exe.macho-x86_64 | FileCheck --check-prefix=FUNC-STARTS %s
44 # RUN: llvm-nm %p/Inputs/Strip-N.LC_MAIN.exe.macho-x86_64 | FileCheck --check-prefix=LC-MAIN %s
55
None //#check radix formats of llvm-nm
1 //RUN: llvm-mc %s -filetype=obj -triple=x86_64-pc-linux -o %t.o
2 //RUN: llvm-nm -radix=d %t.o | FileCheck %s
3 //RUN: llvm-nm -radix=o %t.o | FileCheck --check-prefix="OCTAL" %s
4 //RUN: llvm-nm -t=x %t.o | FileCheck --check-prefix="HEX" %s
0 // #check radix formats of llvm-nm
1 // RUN: llvm-mc %s -filetype=obj -triple=x86_64-pc-linux -o %t.o
2 // RUN: llvm-nm --radix=d %t.o | FileCheck %s
3 // RUN: llvm-nm --radix=o %t.o | FileCheck --check-prefix=OCTAL %s
4 // RUN: llvm-nm -t=x %t.o | FileCheck --check-prefix=HEX %s
55
66 .text
77 .file "1.c"
0 # RUN: yaml2obj %s > %t.o
1 # RUN: llvm-readobj -demangle -r %t.o | FileCheck %s --check-prefix LLVM
2 # RUN: llvm-readelf -demangle -r %t.o | FileCheck %s --check-prefix GNU
1 # RUN: llvm-readobj --demangle -r %t.o | FileCheck %s --check-prefix LLVM
2 # RUN: llvm-readelf --demangle -r %t.o | FileCheck %s --check-prefix GNU
33
44 # GNU: Relocation section '.rela.plt' at offset {{.*}} contains 5 entries:
55 # GNU-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend
0 // Test that llvm-readobj dumps version info tags correctly.
11
2 RUN: llvm-readobj -dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s --check-prefix=LLVM-VERDEF
3 RUN: llvm-readelf -dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s --check-prefix=GNU-VERDEF
2 RUN: llvm-readobj --dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s --check-prefix=LLVM-VERDEF
3 RUN: llvm-readelf --dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s --check-prefix=GNU-VERDEF
44
55 LLVM-VERDEF: 0x000000006FFFFFF0 VERSYM 0x24C
66 LLVM-VERDEF: 0x000000006FFFFFFC VERDEF 0x25C
0 ; RUN: llvm-as %s -o %t.o
11 ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -O0 -o %t.dylib %t.o
2 ; RUN: llvm-nm -no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O0 %s
2 ; RUN: llvm-nm --no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O0 %s
33 ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -O2 -o %t.dylib %t.o
4 ; RUN: llvm-nm -no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O2 %s
4 ; RUN: llvm-nm --no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O2 %s
55
66 target triple = "x86_64-apple-macosx10.8.0"
77
0 # Ensures that implicitly added sections can be ordered within Sections.
11 # RUN: yaml2obj %s -o %t
22 # RUN: llvm-readobj -sections %t | FileCheck %s --check-prefix=SECTION
3 # RUN: llvm-nm -dynamic %t | FileCheck %s --check-prefix=SYMBOL
3 # RUN: llvm-nm --dynamic %t | FileCheck %s --check-prefix=SYMBOL
44
55 !ELF
66 FileHeader:
0 # RUN: yaml2obj %s > %t
1 # RUN: llvm-readelf -symbols %t | FileCheck %s
1 # RUN: llvm-readelf -s %t | FileCheck %s
22
33 !ELF
44 FileHeader:
932932 consumeError(SecIOrErr.takeError());
933933 return '?';
934934 }
935
936 uint8_t Binding = SymI->getOther() >> 4;
937 if (Binding == ELF::STB_GNU_UNIQUE)
938 return 'u';
939935
940936 elf_section_iterator SecI = *SecIOrErr;
941937 if (SecI != Obj.section_end()) {