summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object/nm-trivial-object.test
Commit message (Collapse)AuthorAgeFilesLines
* Fix llvm-nm -S option.Rafael Espindola2015-05-221-16/+23
| | | | | | | It is explicitly documented to have no effect on object formats where symbols don't have sizes. llvm-svn: 238019
* Make this test stricter. NFC.Rafael Espindola2015-05-221-8/+16
| | | | llvm-svn: 238018
* lit: Add 'cd' support to the internal shell and port some testsReid Kleckner2015-03-021-1/+0
| | | | | | | | | | | The internal shell was already threading around a 'cwd' parameter. We just have to make it mutable so that we can update it as the test script executes. If the shell ever grows support for environment variable substitution, we could also implement support for export. llvm-svn: 231017
* Object, COFF: Infer symbol sizes from adjacent symbolsDavid Majnemer2014-11-061-6/+6
| | | | | | | | | Use the position of the subsequent symbol in the object file to infer the size of it's predecessor. I hope to eventually remove whatever COFF specific details from this little algorithm so that we can unify this logic with what Mach-O does. llvm-svn: 221444
* Object, COFF: Cleanup symbol type code, improve binutils compatibilityDavid Majnemer2014-10-311-3/+3
| | | | | | | Do a better job classifying symbols. This increases the consistency between the COFF handling code and the ELF side of things. llvm-svn: 220952
* Correctly compute the size of common symbols in COFF.Rafael Espindola2014-10-081-1/+1
| | | | llvm-svn: 219324
* Print symbol sizes in this test in preparation for fixing COFF common sizes.Rafael Espindola2014-10-081-7/+7
| | | | llvm-svn: 219320
* Tweak llvm-nm’s -undefined-only (aka -u) printing for Mach-O filesKevin Enderby2014-07-281-0/+10
| | | | | | to just print the symbol name. So it matches darwin’s nm(1) -u option. llvm-svn: 214143
* Add an implementation for llvm-nm’s -print-file-name option (aka -o and -A).Kevin Enderby2014-07-241-0/+15
| | | | | | | | The -print-file-name option in llvm-nm is to precede each symbol with the object file it came from. While code for the parsing of this option and its aliases existed there was no code to implement it. llvm-svn: 213906
* Add printing of Mach-O stabs in llvm-nm.Kevin Enderby2014-07-171-0/+15
| | | | llvm-svn: 213327
* Add the "-x" flag to llvm-nm for Mach-O files that prints the fields of a ↵Kevin Enderby2014-07-161-0/+8
| | | | | | | | | symbol in hex. (generally use for debugging the tools).  This is same functionality as darwin’s nm(1) "-x" flag. llvm-svn: 213176
* Add the "-s" flag to llvm-nm for Mach-O files that prints symbols only inKevin Enderby2014-07-111-0/+8
| | | | | | | | | | | | | the specified section. This is same functionality as darwin’s nm(1) "-s" flag. There is one FIXME in the code and I’m all ears to anyone that can help me with that. This option takes exactly two strings and should be allowed anywhere on the command line. Such that "llvm-nm -s __TEXT __text foo.o" would work. But that does not as the CommandLine Library does not have a way to make this work as far as I can tell. For now the "-s __TEXT __text" has to be last on the command line. llvm-svn: 212842
* Add the -just-symbol-name (aka -j) flag to llvm-nm to just print theKevin Enderby2014-07-031-0/+8
| | | | | | | | symbol’s name. On darwin the -j flag is used (often in combinations with other flags) to produce a complete list of symbol names which than can then be reorder and used with ld(1)’s -order_file. llvm-svn: 212294
* Add the -U flag to llvm-nm as an alias to -defined-onlyKevin Enderby2014-07-031-0/+6
| | | | | | as darwin’s nm(1) uses -U for this functionality. llvm-svn: 212280
* Add the -reverse-sort flag (aka -r) to llvm-nmKevin Enderby2014-07-021-0/+8
| | | | | | which exists in other Unix nm(1)’s. llvm-svn: 212235
* nm-trivial-object.test requires shell since Lit internal runner isn't ↵NAKAMURA Takumi2014-06-231-0/+1
| | | | | | capable of chdir. llvm-svn: 211537
* Change the default input for llvm-nm to be a.out instead of standard inputKevin Enderby2014-06-231-2/+10
| | | | | | | | | to match llvm-size and other UNIX systems for their nm(1). Tweak test cases that used llvm-nm with standard input to add a "-" to indicate that and add a test case to check the default of a.out for llvm-nm. llvm-svn: 211529
* Fix the output of llvm-nm for Mach-O files to use the characters ‘d’ and ↵Kevin Enderby2014-06-191-0/+7
| | | | | | | | ‘b’ for data and bss symbols instead of the generic ’s’ for a symbol in a section. llvm-svn: 211321
* Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSizeKevin Enderby2014-05-201-4/+4
| | | | | | | | | | | | for undefined symbols, so it matches what COFFObjectFile::getSymbolAddress does. This allows llvm-nm to print spaces instead of 0’s for the value of undefined symbols in Mach-O files. To make this change other uses of MachOObjectFile::getSymbolAddress are updated to handle when the Value is returned as UnknownAddressOrSize. Which is needed to keep two of the ExecutionEngine tests working for example. llvm-svn: 209253
* Revert r209235 as it broke two tests:Kevin Enderby2014-05-201-4/+4
| | | | | | | | Failing Tests (2): LLVM :: ExecutionEngine/MCJIT/stubs-sm-pic.ll LLVM :: ExecutionEngine/MCJIT/stubs.ll llvm-svn: 209236
* Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSizeKevin Enderby2014-05-201-4/+4
| | | | | | | for undefined symbols. Allowing llvm-nm to print spaces instead of 0’s for the value of undefined symbols in Mach-O files. llvm-svn: 209235
* Fix llvm-nm to print the full 64-bit address for symbols in 64-bit object files.Kevin Enderby2014-05-091-19/+23
| | | | | | | | | | | | | | 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
* Only clear the thumb bit from function addresses.Rafael Espindola2014-04-031-0/+8
| | | | llvm-svn: 205500
* Revert "Fix a nomenclature error in llvm-nm."Rafael Espindola2014-04-031-0/+10
| | | | | | | | | | | | | | | | This reverts commit r205479. It turns out that nm does use addresses, it is just that every reasonable relocatable ELF object has sections with address 0. I have no idea if those exist in reality, but it at least it shows that llvm-nm should use the name address. The added test was includes an unusual .o file with non 0 section addresses. I created it by hacking ELFObjectWriter.cpp. Really sorry for the churn. llvm-svn: 205493
* Add a test for printing absolute symbols in ELF.Rafael Espindola2014-02-051-0/+5
| | | | llvm-svn: 200818
* Small fix for llvm-nm handling of weak symbols on ELF (print 'v').Rafael Espindola2014-02-041-0/+6
| | | | llvm-svn: 200808
* Add a test for common symbols in coff.Rafael Espindola2014-02-041-0/+11
| | | | llvm-svn: 200803
* Fix llvm-nm to mach OS X's nm on some tests.Rafael Espindola2013-11-021-4/+4
| | | | | | | There is still a long way to go for llvm-nm, but at least we now match nm's letter output in the cases we test for. llvm-svn: 193912
* Mark ELF's first symbol as format specific so that llvm-nm ignores it.Rafael Espindola2013-07-221-0/+1
| | | | llvm-svn: 186860
* Add missing ':'.Rafael Espindola2013-04-261-1/+1
| | | | llvm-svn: 180616
* Move test yaml files under Inputs until they are converted to be the actualMatt Beaumont-Gay2012-08-021-2/+4
| | | | | | test files. llvm-svn: 161219
* Add yaml2obj. A utility to convert YAML to binaries.Michael J. Spencer2012-08-021-5/+3
| | | | | | | | yaml2obj takes a textual description of an object file in YAML format and outputs the binary equivalent. This greatly simplifies writing tests that take binary object files as input. llvm-svn: 161205
* Fixed ObjectFile functions:Danil Malyshev2011-11-291-0/+14
| | | | | | | | | | | - getSymbolOffset() renamed as getSymbolFileOffset() - getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile. - added getRelocationOffset() - fixed MachOObjectFile::getSymbolSize() - fixed MachOObjectFile::getSymbolSection() - fixed MachOObjectFile::getSymbolOffset() for symbols without section data. llvm-svn: 145408
* Change the actual tests to match the input directory rename (duh)Matt Beaumont-Gay2011-10-311-4/+4
| | | | llvm-svn: 143404
* Unbreak tests.Michael J. Spencer2011-09-271-0/+19
| | | | llvm-svn: 140622
* Revert "Object: Renable the tests now that none of the build bots complain ↵Michael J. Spencer2011-01-211-19/+0
| | | | | | | | about aliasing." This reverts commit 281f3901b7b0869929caf8946c1ad1228bc38922. llvm-svn: 123972
* Object: Renable the tests now that none of the build bots complain about ↵Michael J. Spencer2011-01-211-0/+19
| | | | | | aliasing. llvm-svn: 123964
* Disable this test until I can figure out why it's broken. Not xfailed because itMichael J. Spencer2011-01-201-19/+0
| | | | | | usese 100% CPU and times out, so it's annoying to run it. llvm-svn: 123915
* Object: Add some tests!Michael J. Spencer2011-01-201-0/+19
llvm-svn: 123899
OpenPOWER on IntegriCloud