summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object
Commit message (Collapse)AuthorAgeFilesLines
* Add missing test fileJean-Daniel Dupas2014-12-041-0/+0
| | | | llvm-svn: 223346
* Add mach-o LC_RPATH support to llvm-objdumpJean-Daniel Dupas2014-12-041-0/+7
| | | | | | | | | | Summary: Add rpath load command support in Mach-O object and update llvm-objdump to use it. Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6512 llvm-svn: 223343
* Widen ELFYAML relocation type to 32 bitsWill Newton2014-11-271-1/+9
| | | | | | | The current 8 bits is sufficient for ELF32 targets but ELF64 requires 32 bits. Add a test for AArch64 that exposes the issue. llvm-svn: 222898
* [Object][Mips] Return address of MIPS symbol with cleared microMIPS ↵Simon Atanasyan2014-11-252-0/+12
| | | | | | indicator bit llvm-svn: 222726
* Object, support both mach-o archive t.o.c file namesNick Kledzik2014-11-122-0/+1
| | | | | | | | | | For historical reasons archives on mach-o have two possible names for the file containing the table of contents for the archive: "__.SYMDEF SORTED" and "__.SYMDEF". But the libObject archive reader only supported the former. This patch fixes llvm::object::Archive to support both names. llvm-svn: 221747
* [yaml2obj] Support AArch64 relocations.Chad Rosier2014-11-101-0/+47
| | | | | | | Patch by Daniel Stewart <stewartd@codeaurora.org>! Phabricator Revision: http://reviews.llvm.org/D6192 llvm-svn: 221639
* [ELF][yaml2obj] Handle additional MIPS specific st_other field flagsSimon Atanasyan2014-11-061-1/+3
| | | | | | | | The ELF symbol `st_other` field might contain additional flags besides visibility ones. This patch implements support for some MIPS specific flags. llvm-svn: 221491
* Plumb in the ARM thumb symbolizer in llvm-objdump’s Mach-O disassembler andKevin Enderby2014-11-061-1/+1
| | | | | | | | | | | | add the code and test cases for 32-bit ARM symbolizer. Also fixed the printing of data in code as it was not using the table correctly and needed to fix one of the test cases too. This will break lld’s test/mach-o/arm-interworking-movw.yaml till the tweak for that is made. Which I’ll be committing immediately after this commit. llvm-svn: 221470
* 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
* Remove "REQUIRES:shell" from tests. They work for me.NAKAMURA Takumi2014-11-041-2/+0
| | | | llvm-svn: 221269
* [yaml2obj] Allow yaml2obj tool to recognize EF_MIPS_NAN2008 flagSimon Atanasyan2014-11-041-2/+4
| | | | llvm-svn: 221268
* Re-enable tests in llvm/test/Object, corresponding to line_iterator'sNAKAMURA Takumi2014-11-045-15/+0
| | | | | | change in r221153. llvm-svn: 221265
* Add CRLF support to LineIterator.Rafael Espindola2014-11-032-0/+3
| | | | | | | The MRI scripts have to work with CRLF, and in general it is probably a good idea to support this in a core utility like LineIterator. llvm-svn: 221153
* Object, COFF: Cleanup symbol type code, improve binutils compatibilityDavid Majnemer2014-10-314-7/+7
| | | | | | | Do a better job classifying symbols. This increases the consistency between the COFF handling code and the ELF side of things. llvm-svn: 220952
* Fix getRelocationValueString to return the symbol name for EM_386.Jan Wen Voung2014-10-292-6/+6
| | | | | | | | | | | | | | Summary: This helps llvm-objdump -r to print out the symbol name along with the relocation type on x86. Adjust existing tests from checking for "Unknown" to check for the symbol now. Test Plan: Adjusted test/Object tests. Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5987 llvm-svn: 220866
* Handle spaces and quotes in file names in MRI scripts.Rafael Espindola2014-10-221-1/+1
| | | | llvm-svn: 220364
* MRI scripts: Add addlib support.Rafael Espindola2014-10-211-0/+17
| | | | llvm-svn: 220346
* Overwrite instead of adding to archives when creating them in mri scripts.Rafael Espindola2014-10-211-0/+18
| | | | | | | This matches the behavior of GNU ar and also makes it easier to implemnt support for the addlib command. llvm-svn: 220336
* Add support for addmod to mri scripts.Rafael Espindola2014-10-211-0/+18
| | | | llvm-svn: 220294
* Suppress llvm-ar's MRI tests for now on win32, since line_iterator is ↵NAKAMURA Takumi2014-10-113-0/+9
| | | | | | incompatible to CRLF. llvm-svn: 219579
* llvm-ar: Start adding support for mri scripts.Rafael Espindola2014-10-105-0/+25
| | | | | | | | | | | | | | | | | | | | | | I was quiet surprised to find this feature being used. Fortunately the uses I found look fairly simple. In fact, they are just a very verbose version of the regular ar commands. Start implementing it then by parsing the script and setting the command variables as if we had a regular command line. This patch adds just enough support to create an empty archive and do a bit of error checking. In followup patches I will implement at least addmod and addlib. From the description in the manual, even the more general case should not be too hard to implement if needed. The features that don't map 1:1 to the simple command line are * Reading from multiple archives. * Creating multiple archives. llvm-svn: 219521
* Add tests for r219479.David Majnemer2014-10-102-0/+263
| | | | llvm-svn: 219480
* obj2yaml, COFF: Handle long section namesDavid Majnemer2014-10-102-0/+14
| | | | | | | | | | | | | Long section names are represented as a slash followed by a numeric ASCII string. This number is an offset into a string table. Print the appropriate entry in the string table instead of the less enlightening /4. N.B. yaml2obj already does the right thing, this test exercises both sides of the (de-)serialization. llvm-svn: 219458
* 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
* Nuke MCAnalysis.Sean Silva2014-09-024-251/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code is buggy and barely tested. It is also mostly boilerplate. (This includes MCObjectDisassembler, which is the interface to that functionality) Following an IRC discussion with Jim Grosbach, it seems sensible to just nuke the whole lot of functionality, and dig it up from VCS if necessary (I hope not!). All of this stuff appears to have been added in a huge patch dump (look at the timeframe surrounding e.g. r182628) where almost every patch seemed to be untested and not reviewed before being committed. Post-review responses to the patches were never addressed. I don't think any of it would have passed pre-commit review. I doubt anyone is depending on this, since this code appears to be extremely buggy. In limited testing that Michael Spencer and I did, we couldn't find a single real-world object file that wouldn't crash the CFG reconstruction stuff. The symbolizer stuff has O(n^2) behavior and so is not much use to anyone anyway. It seemed simpler to remove them as a whole. Most of this code is boilerplate, which is the only way it was able to scrape by 60% coverage. HEADSUP: Modules folks, some files I nuked were referenced from include/llvm/module.modulemap; I just deleted the references. Hopefully that is the right fix (one was a FIXME though!). llvm-svn: 216983
* llvm-objdump: don't print relocations in non-relocatable files.Rafael Espindola2014-08-171-0/+5
| | | | | | This matches the behavior of GNU objdump. llvm-svn: 215844
* Fix an off-by-one bug in the target independent llvm-objdump.Rafael Espindola2014-08-172-0/+10
| | | | | | | | It would prevent the display of a single byte instruction before a label. Patch by Steve King! llvm-svn: 215837
* pr20589: Fix duplicated arch flag.Rafael Espindola2014-08-081-0/+10
| | | | llvm-svn: 215216
* Use "weak alias" instead of "alias weak"Rafael Espindola2014-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | Before this patch we had @a = weak global ... but @b = alias weak ... The patch changes aliases to look more like global variables. Looking at some really old code suggests that the reason was that the old bison based parser had a reduction for alias linkages and another one for global variable linkages. Putting the alias first avoided the reduce/reduce conflict. The days of the old .ll parser are long gone. The new one parses just "linkage" and a later check is responsible for deciding if a linkage is valid in a given context. llvm-svn: 214355
* 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-243-0/+34
| | | | | | | | 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-172-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
* [Mips] Support SHT_MIPS_ABIFLAGS section type flag in the llvm-readobj,Simon Atanasyan2014-07-132-1/+21
| | | | | | obj2yaml and yaml2obj tools. llvm-svn: 212908
* [ELFYAML] Group ELF section type flags to target specific blocks.Simon Atanasyan2014-07-122-0/+8
| | | | | | Recognize only flags which correspond to the current target. llvm-svn: 212880
* 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
* Changed the lvm-nm alias "-s" for -print-armap to "-M".Kevin Enderby2014-07-087-14/+14
| | | | | | | | | | This will allow the "-s" flag to implemented in the future as it is in darwin’s nm(1) to list symbols only in the specified section. Given a LGTM by Shankar Easwaran who originally implemented the support for lvm-nm’s -print-armap and archive map symbols. llvm-svn: 212576
* Add support for BSD format Archive map symbols (aka the table of contentsKevin Enderby2014-07-081-0/+6
| | | | | | from a __.SYMDEF or "__.SYMDEF SORTED" archive member). llvm-svn: 212568
* Ignore llvm.* globals.Rafael Espindola2014-07-041-0/+1
| | | | | | | It is not clear if llvm.global_ctors should or should not be in llvm.metadata, but in practice it is not and we need to ignore it for LTO. llvm-svn: 212351
* Mark intrinsic functions as llvm-specific.Rafael Espindola2014-07-041-0/+6
| | | | llvm-svn: 212347
* Don't include llvm.metadata variables in archive symbol tables.Rafael Espindola2014-07-042-0/+4
| | | | llvm-svn: 212344
* 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
* Move test since it now depends on the x86 backend.Rafael Espindola2014-07-031-0/+0
| | | | llvm-svn: 212289
* Add support for inline asm symbols in llvm-ar.Rafael Espindola2014-07-031-0/+20
| | | | | | | This should allow llvm-ar to be used instead of gnu ar + plugin in a LTO build. I will add a release note about it once I finish a LTO bootstrap with it. llvm-svn: 212287
* Add support for inline asm symbols to IRObjectFile.Rafael Espindola2014-07-031-0/+11
| | | | | | This also enables it in llvm-nm so that it can be tested. llvm-svn: 212282
* 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
* Add the -arch flag support to llvm-size like what was done to llvm-nmKevin Enderby2014-07-011-2/+12
| | | | | | | | | to select the slice out of a Mach-O universal file. This also includes support for -arch all, selecting the host architecture by default from a universal file and checking if -arch is used with a standard Mach-O it matches that architecture. llvm-svn: 212108
* objdump: Add test for ELF file with no section tableEd Maste2014-06-302-0/+6
| | | | | | | | This is a test for the fix in r211904. Differential Revision: http://reviews.llvm.org/D4349 llvm-svn: 212059
OpenPOWER on IntegriCloud