summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object/nm-shared-object.test
Commit message (Collapse)AuthorAgeFilesLines
* [test][tools] Add missing and improve testingJames Henderson2019-12-091-0/+4
| | | | | | | | | | | Mostly this adds testing for certain aliases in more explicit ways. There are also a few tidy-ups, and additions of missing testing, where the feature was either not tested at all, or not tested explicitly and sufficiently. Reviewed by: MaskRay, rupprecht, grimar Differential Revision: https://reviews.llvm.org/D71116
* [llvm\test\Object] - An initial step to cleanup the test cases.George Rimar2019-07-081-35/+46
| | | | | | | | | | | | This patch removes trivial-object-test.elf-i386, trivial-object-test.elf-x86-64 and trivial-object-test2.elf-x86-64 precompiled objects from test/Object/Inputs folder. I adjusted the existent test cases to use YAML instead. Differential revision: https://reviews.llvm.org/D64206 llvm-svn: 365348
* [llvm-nm] Write "no symbol" output to stderrPetr Hosek2018-10-051-1/+2
| | | | | | | | | | This matches the output of binutils' nm and ensures that any scripts or tools that use nm and expect empty output in case there no symbols don't break. Differential Revision: https://reviews.llvm.org/D52943 llvm-svn: 343887
* [llvm-nm] Print an explicit "no symbols" message when an object file has no ↵Jordan Rupprecht2018-10-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Object: Handle files without a dynamic symbol table.Peter Collingbourne2017-02-031-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D29482 llvm-svn: 294013
* Fix llvm-nm to print the full 64-bit address for symbols in 64-bit object files.Kevin Enderby2014-05-091-14/+14
| | | | | | | | | | | | | | The implementation might be better to have a method is64Bit() in the class SymbolicFile instead of having the static routine isSymbolList64Bit() in llvm-nm.cpp . But this is very much in the sprit of isObject() and getNMTypeChar() in llvm-nm.cpp that has a series of if else statements based on the specific class of the SymbolicFile. I can update this if folks would like. Also the tests were updated to be explicit about checking the address for 64-bits or 32-bits from object files. llvm-svn: 208463
* Mark the first dynamic elf symbol as SF_FormatSpecific.Rafael Espindola2014-01-311-0/+2
| | | | llvm-svn: 200578
* Only ELF has a dynamic symbol table. Remove it from ObjectFile.Rafael Espindola2014-01-301-2/+11
| | | | | | | | | COFF has only one symbol table. MachO has a LC_DYSYMTAB, but that is not a symbol table, just extra info about the one symbol table (LC_SYMTAB). IR (coming soon) also has only one table. llvm-svn: 200488
* This has been fixed.Rafael Espindola2014-01-301-3/+0
| | | | llvm-svn: 200487
* Fix TLS handling in ELF's getAddress and llvm-nm to print 'D' for it.Rafael Espindola2014-01-301-2/+2
| | | | llvm-svn: 200433
* Fix SymbolRef::getAddress implementation for ELF. The 'value' field in ↵Alexey Samsonov2012-09-211-9/+17
| | | | | | symbol table entry should be treated differently for relocatable and relocated files. This patch fixes symbol addresses printed by llvm-nm for executables and shared objects. llvm-svn: 164365
* [Object] Add {begin,end}_dynamic_symbols stubs and implementation for ELF.Michael J. Spencer2012-02-281-0/+15
Add -D option to llvm-nm to dump dynamic symbols. Patch by David Meyer. llvm-svn: 151600
OpenPOWER on IntegriCloud