1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/tools
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
..
bugpoint [bugpoint] Revert r318459 2018-09-18 18:39:27 +00:00
bugpoint-passes
dsymutil Use the container form llvm::sort(C, ...) 2018-09-30 22:31:29 +00:00
gold
llc
lli [ORC] Add convenience methods for creating DynamicLibraryFallbackGenerators for 2018-10-01 00:59:28 +00:00
llvm-ar [llvm-ar] Move a variable declaration closer to where it is needed. NFC. 2018-09-06 19:03:24 +00:00
llvm-as
llvm-as-fuzzer
llvm-bcanalyzer Fix some missing opcodes in bcanalyzer 2018-09-24 12:47:17 +00:00
llvm-c-test Emit template type and value parameter DIEs for template variables. 2018-10-03 18:44:53 +00:00
llvm-cat
llvm-cfi-verify Revert r342148 (and follow-on fix attempts r342154, r342180, r342182, r342193) 2018-09-15 19:04:27 +00:00
llvm-config llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
llvm-cov [Support] Listing a directory containing dangling symlinks is not an error. 2018-10-01 12:17:05 +00:00
llvm-cvtres
llvm-cxxdump
llvm-cxxfilt
llvm-cxxmap Add flag to llvm-profdata to allow symbols in profile data to be remapped, and 2018-09-13 20:22:02 +00:00
llvm-demangle-fuzzer
llvm-diff Fix llvm-diff anon-func.ll test 2018-09-24 08:34:17 +00:00
llvm-dis
llvm-dwarfdump Revert r343317 2018-09-28 17:01:50 +00:00
llvm-dwp Reland rL341509: "[llvm-dwp] Use buffer_stream if output file is not seekable (e.g. "-")" 2018-09-06 20:26:54 +00:00
llvm-exegesis [llvm-exegesis] Avoid yaml parser from calling sscanf for obvious non-matches (PR39102) 2018-10-03 14:51:09 +00:00
llvm-extract
llvm-go
llvm-isel-fuzzer
llvm-jitlistener
llvm-link
llvm-lto [ThinLTO]Expose cache entry expiration time option in llvm-lto and fix a test 2018-10-03 13:00:20 +00:00
llvm-lto2
llvm-mc
llvm-mc-assemble-fuzzer
llvm-mc-disassemble-fuzzer
llvm-mca [llvm-mca] Add support for move elimination in class RegisterFile. 2018-10-03 15:02:44 +00:00
llvm-modextract
llvm-mt
llvm-nm [llvm-nm] Print an explicit "no symbols" message when an object file has no symbols 2018-10-03 23:39:49 +00:00
llvm-objcopy [llvm-objcopy] Adding support for decompressing zlib compressed dwarf sections. 2018-10-01 10:29:41 +00:00
llvm-objdump llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
llvm-opt-fuzzer
llvm-opt-report
llvm-pdbutil [PDB] Add support for dumping Typedef records. 2018-10-01 17:55:38 +00:00
llvm-profdata Add flag to llvm-profdata to allow symbols in profile data to be remapped, and 2018-09-13 20:22:02 +00:00
llvm-rc
llvm-readobj Revert r343317 2018-09-28 17:01:50 +00:00
llvm-rtdyld
llvm-shlib
llvm-size [llvm-size] Berkeley formatting: use tabs instead of spaces as field delimeters. 2018-09-21 23:48:12 +00:00
llvm-special-case-list-fuzzer
llvm-split
llvm-stress
llvm-strings
llvm-symbolizer
llvm-undname
llvm-xray llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
llvm-yaml-numeric-parser-fuzzer
lto [libLTO] Expose LLVMCreateDisasmCPUFeatures from libLTO 2018-09-26 16:47:35 +00:00
msbuild Update Visual Studio Integration version number. 2018-08-29 16:57:37 +00:00
obj2yaml [WebAssembly] Refactor WasmSignature and use it for MCSymbolWasm 2018-10-03 22:22:48 +00:00
opt [New PM][PassInstrumentation] IR printing support for New Pass Manager 2018-09-24 16:08:15 +00:00
opt-viewer
sancov
sanstats
verify-uselistorder
xcode-toolchain Revert "[CMake] Use LLVM_ENABLE_IDE instead of CMAKE_CONFIGURATION_TYPES" 2018-08-30 09:32:09 +00:00
yaml2obj llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
CMakeLists.txt
LLVMBuild.txt