summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object
Commit message (Collapse)AuthorAgeFilesLines
...
* Add .ll as a valid test suffix for Object, this allows .ll -> objectEric Christopher2013-04-221-1/+1
| | | | | | and then dumping as tests. llvm-svn: 180010
* Only run the tests in test/Object/ARM if we have ARM support.Rafael Espindola2013-04-191-0/+3
| | | | llvm-svn: 179850
* Don't read one command past the end.Rafael Espindola2013-04-192-0/+4
| | | | | | | | | Thanks to Evgeniy Stepanov for reporting this. It might be a good idea to add a command iterator abstraction to MachO.h, but this fixes the bug for now. llvm-svn: 179848
* llvm-objdump: Don't print contents of BSS sections: it makes no sense and ↵Alexey Samsonov2013-04-161-0/+5
| | | | | | crashes llvm-objdump on relocated objects with large bss llvm-svn: 179589
* Add a test for obj2yaml in preparation for refactoring it.Rafael Espindola2013-04-051-0/+170
| | | | llvm-svn: 178829
* Add back parsing of header charactestics.Rafael Espindola2013-04-042-0/+6
| | | | | | | | It had been dropped during the switch to yaml::IO. Also add a test going from yaml2obj to llvm-readobj. It can be extended as we add more fields/formats to yaml2obj. llvm-svn: 178786
* Implement the "mips endian" for r_info.Rafael Espindola2013-04-032-0/+7
| | | | | | | | Normally r_info is just a 32 of 64 bit number matching the endian of the rest of the file. Unfortunately, mips 64 bit little endian is special: The top 32 bits are a little endian number and the following 32 are a big endian one. llvm-svn: 178694
* Implements low-level object file format specific output for COFF andEric Christopher2013-04-032-89/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELF with support for: - File headers - Section headers + data - Relocations - Symbols - Unwind data (only COFF/Win64) The output format follows a few rules: - Values are almost always output one per line (as elf-dump/coff-dump already do). - Many values are translated to something readable (like enum names), with the raw value in parentheses. - Hex numbers are output in uppercase, prefixed with "0x". - Flags are sorted alphabetically. - Lists and groups are always delimited. Example output: ---------- snip ---------- Sections [ Section { Index: 1 Name: .text (5) Type: SHT_PROGBITS (0x1) Flags [ (0x6) SHF_ALLOC (0x2) SHF_EXECINSTR (0x4) ] Address: 0x0 Offset: 0x40 Size: 33 Link: 0 Info: 0 AddressAlignment: 16 EntrySize: 0 Relocations [ 0x6 R_386_32 .rodata.str1.1 0x0 0xB R_386_PC32 puts 0x0 0x12 R_386_32 .rodata.str1.1 0x0 0x17 R_386_PC32 puts 0x0 ] SectionData ( 0000: 83EC04C7 04240000 0000E8FC FFFFFFC7 |.....$..........| 0010: 04240600 0000E8FC FFFFFF31 C083C404 |.$.........1....| 0020: C3 |.| ) } ] ---------- snip ---------- Relocations and symbols can be output standalone or together with the section header as displayed in the example. This feature set supports all tests in test/MC/COFF and test/MC/ELF (and I suspect all additional tests using elf-dump), making elf-dump and coff-dump deprecated. Patch by Nico Rieck! llvm-svn: 178679
* Implement sectionContainsSymbol for ELF.Eric Christopher2013-04-031-1/+3
| | | | | | Patch by Nico Rieck! llvm-svn: 178677
* When dumping clear the arm/thumb flag for now.Eric Christopher2013-04-031-0/+12
| | | | | | Patch by Nico Rieck! llvm-svn: 178676
* [tools][llvm-readobj] print the name of the section when iterating the ↵Shankar Easwaran2013-03-252-29/+29
| | | | | | symbol table / dynamic symbol table llvm-svn: 177873
* [llvm-readobj] Add ELF .dynamic table dumping.Michael J. Spencer2013-02-201-0/+13
| | | | llvm-svn: 175592
* [Object][ELF] Fix crash on no dynamic section.Michael J. Spencer2013-02-071-0/+2
| | | | llvm-svn: 174639
* [llvm-objdump] Emit addresses with the correct number of leading 0's.Michael J. Spencer2013-01-101-8/+8
| | | | llvm-svn: 172130
* [Object][ELF] Fix incorrect size of members for the 64 version of Elf_Phdr_Impl.Michael J. Spencer2013-01-062-0/+10
| | | | llvm-svn: 171650
* [objdump] Add --private-headers, -p.Michael J. Spencer2013-01-062-0/+8
| | | | | | This currently prints the ELF program headers. llvm-svn: 171649
* [Object][ELF] Add a maximum alignment. This is used by createELFObjectFile ↵Michael J. Spencer2013-01-042-0/+0
| | | | | | to create a properly aligned reader. llvm-svn: 171520
* [Object] Temporarily disable these tests.Michael J. Spencer2013-01-032-2/+2
| | | | | | | | They are failing because archives create unaligned ELF files. The recent Endian change added a __builtin_unreachable() when this happens. I will be committing a fix for this soon. llvm-svn: 171438
* Fix bits check in ELFObjectFile::isSectionZeroInit().Rafael Espindola2012-12-311-1/+1
| | | | | | | | Fixes PR14723. Patch by Sami Liedes! llvm-svn: 171309
* Dump sections. Extracted from a patch by Sami Liedes.Rafael Espindola2012-12-311-0/+18
| | | | llvm-svn: 171304
* Print a header above the symbols. Extracted from a patch by Sami Liedes.Rafael Espindola2012-12-311-0/+2
| | | | llvm-svn: 171302
* Teach MachO which sections contain codeTim Northover2012-12-172-0/+3
| | | | llvm-svn: 170349
* numerically sort the symbols, so that the testcase result is uniformShankar Easwaran2012-11-131-23/+23
| | | | llvm-svn: 167872
* llvm-nm: Make sort more stable when symbol names are equal.Daniel Dunbar2012-11-131-1/+1
| | | | llvm-svn: 167866
* Adding changes to support GNU style archive library readingShankar Easwaran2012-11-136-0/+277
| | | | llvm-svn: 167853
* Fix SymbolRef::getAddress implementation for ELF. The 'value' field in ↵Alexey Samsonov2012-09-212-9/+25
| | | | | | 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
* Add missing file for test.Nick Lewycky2012-09-051-0/+0
| | | | llvm-svn: 163272
* Teach libObject about some more ELF relocations. llvm-objdump -r now knowsNick Lewycky2012-09-051-0/+13
| | | | | | every relocation in C++ hello world built with debug info. llvm-svn: 163271
* Create llvm/test/Object/Mips/lit.local.cfg to check Mips in targets_to_build.NAKAMURA Takumi2012-08-291-0/+5
| | | | llvm-svn: 162819
* Moved input for objdump test from Mips to Inputs.Jack Carter2012-08-292-1/+1
| | | | llvm-svn: 162808
* Some of the instructions in the Mips instruction set are revisionJack Carter2012-08-282-0/+11
| | | | | | | | | | | | delimited. llvm-mc -disassemble access these through the -mattr option. llvm-objdump -disassemble had no such way to set the attribute so some instructions were just not recognized for disassembly. This patch accepts llvm-mc mechanism for specifying the attributes. llvm-svn: 162781
* Move test yaml files under Inputs until they are converted to be the actualMatt Beaumont-Gay2012-08-026-6/+8
| | | | | | test files. llvm-svn: 161219
* Add yaml2obj. A utility to convert YAML to binaries.Michael J. Spencer2012-08-027-13/+175
| | | | | | | | 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
* Add relocation types for Hexagon processor; patch by Sidney Manning ↵Marshall Clow2012-06-232-0/+10
| | | | | | <sidneym@codeaurora.org> llvm-svn: 159081
* Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnuEli Bendersky2012-03-251-8/+1
| | | | | | | | | | | | | | * Removed test/lib/llvm.exp - it is no longer needed * Deleted the dg.exp reading code from test/lit.cfg. There are no dg.exp files left in the test suite so this code is no longer required. test/lit.cfg is now much shorter and clearer * Removed a lot of duplicate code in lit.local.cfg files that need access to the root configuration, by adding a "root" attribute to the TestingConfig object. This attribute is dynamically computed to provide the same information as was previously provided by the custom getRoot functions. * Documented the config.root attribute in docs/CommandGuide/lit.pod llvm-svn: 153408
* Support reading GNU symbol versions in ELFObjectFileDavid Meyer2012-03-095-0/+56
| | | | | | | | | | * Add enums and structures for GNU version information. * Implement extraction of that information on a per-symbol basis (ELFObjectFile::getSymbolVersion). * Implement a generic interface, GetELFSymbolVersion(), for getting the symbol version from the ObjectFile (hides the templating). * Have llvm-readobj print out the version, when available. * Add a test for the new feature: readobj-elf-versioning.test llvm-svn: 152436
* [Object]David Meyer2012-03-011-0/+15
| | | | | | Add ObjectFile::getLoadName() for retrieving the soname/installname of a shared object. llvm-svn: 151845
* [Object]David Meyer2012-03-014-2/+48
| | | | | | | | | * Add begin_dynamic_table() / end_dynamic_table() private interface to ELFObjectFile. * Add begin_libraries_needed() / end_libraries_needed() interface to ObjectFile, for grabbing the list of needed libraries for a shared object or dynamic executable. * Implement this new interface completely for ELF, leave stubs for COFF and MachO. * Add 'llvm-readobj' tool for dumping ObjectFile information. llvm-svn: 151785
* [Object] Add {begin,end}_dynamic_symbols stubs and implementation for ELF.Michael J. Spencer2012-02-284-0/+46
| | | | | | | | Add -D option to llvm-nm to dump dynamic symbols. Patch by David Meyer. llvm-svn: 151600
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-164-8/+14
| | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. llvm-svn: 150664
* Fixed ObjectFile functions:Danil Malyshev2011-11-292-0/+22
| | | | | | | | | | | - 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
* Move x86-specific tests into X86 folder.Eli Friedman2011-11-013-6/+11
| | | | llvm-svn: 143424
* Change the actual tests to match the input directory rename (duh)Matt Beaumont-Gay2011-10-319-23/+23
| | | | llvm-svn: 143404
* Rename "TestObjectFiles" to "Inputs" (like the pattern for Clang tests)Matt Beaumont-Gay2011-10-318-0/+0
| | | | llvm-svn: 143400
* Object: change test to create archive.Michael J. Spencer2011-10-253-2/+15
| | | | llvm-svn: 142982
* llvm-objdump: Add static symbol table dumping.Michael J. Spencer2011-10-181-4/+2
| | | | llvm-svn: 142404
* Revert "llvm-objdump: Add static symbol table dumping."Michael J. Spencer2011-10-181-2/+4
| | | | | | This reverts commit 0c30d4e4f5f9110c5a67bd0ca84444dc58697596. llvm-svn: 142320
* llvm-objdump: Add static symbol table dumping.Michael J. Spencer2011-10-171-4/+2
| | | | llvm-svn: 142319
* llvm-objdump: Add -s, which prints the contents of each section.Michael J. Spencer2011-10-171-4/+2
| | | | llvm-svn: 142199
* llvm-objdump: Add tests.Michael J. Spencer2011-10-173-0/+67
| | | | llvm-svn: 142198
OpenPOWER on IntegriCloud