1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/test/Object
Jordan Rupprecht d5effeb47c [llvm-nm] Print an explicit "no symbols" message when an object file has no symbols
Summary:
GNU nm (and other nm implementations, such as "go tool nm") prints an explicit "no symbols" message when an object file has no symbols. Currently llvm-nm just doesn't print anything. Adding an explicit "no symbols" message will allow llvm-nm to be used in place of nm: some scripts and build processes use `nm <file> | grep "no symbols"` as a test to see if a file has no symbols. It will also be more familiar to anyone used to nm.

That said, the format implemented here is slightly different, in that it doesn't print the tool name in the message (which IMHO is not useful to include).

Demo:
```
$ for nm in nm bin/llvm-nm ; do echo "nm implementation: $nm"; $nm /tmp/foo{1,2}.o; echo; done
nm implementation: nm

/tmp/foo1.o:
nm: /tmp/foo1.o: no symbols

/tmp/foo2.o:
0000000000000000 T foo2

nm implementation: bin/llvm-nm

/tmp/foo1.o:
no symbols

/tmp/foo2.o:
0000000000000000 T foo2
```

Reviewers: MaskRay

Reviewed By: MaskRay

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D52810

llvm-svn: 343742
2018-10-03 23:39:49 +00:00
..
AArch64
AMDGPU AMDGPU: Add Vega12 and Vega20 2018-04-30 19:08:16 +00:00
ARM
Inputs [WASM] Fix overflow when reading custom section 2018-08-08 16:34:03 +00:00
Lanai
Mips
RISCV
X86 Implemented sane default for llvm-objdump's relocation Value format 2018-06-01 05:31:58 +00:00
ar-create.test
ar-error.test
archive-delete.test
archive-error-tmp.txt
archive-extract-dir.test
archive-extract.test
archive-format.test
archive-GNU64-write.test Disable a test using environment variables that requires a real shell 2018-04-03 18:19:52 +00:00
archive-long-filenames-no-null-terminator.test Add a test for r331746. 2018-05-09 08:20:14 +00:00
archive-long-index.test
archive-move.test
archive-pad.test
archive-replace-pos.test
archive-symtab.test
archive-thin-create.test
archive-thin-paths.test
archive-thin-read.test
archive-toc.test
archive-update.test
check_binary_output.ll
coff-archive-short.test
coff-archive.test
coff-empty-drectve.test
coff-invalid.test
coff-weak-externals.test
corrupt.test
directory.ll
dllimport-globalref.ll
dllimport.ll
dyn-rel-relocation.test
dynamic-reloc.test
elf-invalid-phdr.test
elf-reloc-no-sym.test
elf-unknown-type.test
invalid-alignment.test Allow unaligned access to ELF file data structures. 2018-01-12 22:09:19 +00:00
invalid.test Allow unaligned access to ELF file data structures. 2018-01-12 22:09:19 +00:00
kext.test
lit.local.cfg
macho-invalid.test
mangle-ir.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
mri1.test
mri2.test
mri3.test
mri4.test
mri5.test
mri-addlib.test
mri-addmod.test
mri-crlf.test
multi-module.ll
nm-archive.test Convert two uses of ErrorOr to Expected. 2017-10-10 20:00:07 +00:00
nm-darwin-m.test
nm-error.test
nm-irix6.test
nm-pe-image.test
nm-shared-object.test [llvm-nm] Print an explicit "no symbols" message when an object file has no symbols 2018-10-03 23:39:49 +00:00
nm-trivial-object.test [WebAssembly] Add first claass symbol table to wasm objects 2018-02-23 05:08:34 +00:00
nm-universal-binary.test
nm-weak-global-macho.test
no-section-header-string-table.test
no-section-table.test
obj2yaml-coff-long-file-symbol.test
obj2yaml-coff-long-section-name.test
obj2yaml-coff-section-aux-symbol.test
obj2yaml-coff-weak-external.test
obj2yaml-invalid-reloc.test
obj2yaml-sectiongroup.test
obj2yaml.test [WebAssembly] Add version to object file metadata 2018-04-26 18:15:32 +00:00
objc-imageinfo-coff.ll
objc-imageinfo-elf.ll
objc-imageinfo-macho.ll
objdump-export-list.test
objdump-file-header.test
objdump-no-sectionheaders.test
objdump-private-headers.test
objdump-reloc-shared.test
objdump-relocations.test Implemented sane default for llvm-objdump's relocation Value format 2018-06-01 05:31:58 +00:00
objdump-section-content.test
objdump-sectionheaders.test [ELF] Change isSectionData to exclude SHF_EXECINSTR 2018-06-23 00:15:33 +00:00
objdump-shndx.test Implemented sane default for llvm-objdump's relocation Value format 2018-06-01 05:31:58 +00:00
objdump-symbol-table.test
pr25877.test
readobj-absent.test
readobj-elf-versioning.test
readobj-shared-object.test
readobj.test
relocation-executable.test
simple-archive.test
size-trivial-macho.test
stackmap-dump.test
wasm-bad-metadata-version.yaml [WebAssembly] Add version to object file metadata 2018-04-26 18:15:32 +00:00
wasm-duplicate-name.test [WebAssembly] Don't allow functions to be named twice 2018-01-12 02:11:31 +00:00
wasm-invalid-file.yaml Fix use of echo command in test script 2018-05-30 03:26:28 +00:00
wasm-invalid-start.test
wasm-missing-version.test
wasm-string-outside-section.test [WASM] Fix overflow when reading custom section 2018-08-08 16:34:03 +00:00
yaml2obj-coff-invalid-alignment.test
yaml2obj-coff-multi-doc.test
yaml2obj-elf-alignment.yaml
yaml2obj-elf-bits-endian.test
yaml2obj-elf-file-headers-with-e_flags.yaml
yaml2obj-elf-file-headers.yaml
yaml2obj-elf-multi-doc.test
yaml2obj-elf-rel-noref.yaml
yaml2obj-elf-rel.yaml
yaml2obj-elf-section-basic.yaml
yaml2obj-elf-section-invalid-size.yaml
yaml2obj-elf-symbol-basic.yaml
yaml2obj-elf-symbol-LocalGlobalWeak.yaml
yaml2obj-elf-symbol-visibility.yaml
yaml2obj-invalid.yaml
yaml2obj-readobj.test