summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object/Inputs
Commit message (Collapse)AuthorAgeFilesLines
...
* [ELFYAML] Group ELF section type flags to target specific blocks.Simon Atanasyan2014-07-121-0/+0
| | | | | | Recognize only flags which correspond to the current target. llvm-svn: 212880
* 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
* Don't include llvm.metadata variables in archive symbol tables.Rafael Espindola2014-07-041-0/+3
| | | | llvm-svn: 212344
* objdump: Add test for ELF file with no section tableEd Maste2014-06-301-0/+0
| | | | | | | | This is a test for the fix in r211904. Differential Revision: http://reviews.llvm.org/D4349 llvm-svn: 212059
* [ELF][Mips] Fix recognition of MIPS 64-bit arch in the ↵Simon Atanasyan2014-06-271-0/+0
| | | | | | ELFObjectFile:getArch() method. llvm-svn: 211891
* Add "-format darwin" to llvm-size to be like darwin's size(1) -m output, andKevin Enderby2014-06-172-0/+0
| | | | | | | | | | | | | | | and the -l option for the long format. Also when the object is a Mach-O file and the format is berkeley produce output like darwin’s default size(1) summary berkeley derived output. Like System V format, there are also some small changes in how and where the file names and archive member names are printed for darwin and Mach-O. Like the changes to llvm-nm these are the first steps in seeing if it is possible to make llvm-size produce the same output as darwin's size(1). llvm-svn: 211117
* Fix pr17056.Rafael Espindola2014-06-161-0/+0
| | | | | | | | | | | | | This makes llvm-nm ignore members that are not sufficiently aligned for lib/Object to handle. These archives are invalid. GNU AR is able to handle this, but in general just warns about broken archive members. We should probably start warning too, but for now just make sure llvm-nm exits with an 0. llvm-svn: 211036
* Add "-format darwin" to llvm-nm to be like darwin's nm(1) -m output.Kevin Enderby2014-06-053-0/+0
| | | | | | | | | | | | | | | This is a first step in seeing if it is possible to make llvm-nm produce the same output as darwin's nm(1). Darwin's default format is bsd but its -m output prints the longer Mach-O specific details. For now I added the "-format darwin" to do this (whos name may need to change in the future). As there are other Mach-O specific flags to nm(1) which I'm hoping to add some how in the future. But I wanted to see if I could get the correct output for -m flag using llvm-nm and the libObject interfaces. I got this working but would love to hear what others think about this approach to getting object/format specific details printed with llvm-nm. llvm-svn: 210285
* Implement MachOObjectFile::isSectionData() and MachOObjectFile::isSectionBSSKevin Enderby2014-05-191-0/+0
| | | | | | | | so that llvm-size will total up all the sections in the Berkeley format. This allows for rough categorizations for Mach-O sections. And allows the total of llvm-size’s Berkeley and System V formats to be the same. llvm-svn: 209158
* Teach llvm-nm to know about fat archives (aka MachOUniversal filesKevin Enderby2014-05-141-0/+0
| | | | | | containing archives). First step as other tools will be updated next. llvm-svn: 208812
* obj2yaml: Don't crash if the characteristics field is zeroDavid Majnemer2014-04-091-0/+43
| | | | | | | | | obj2yaml would fail when seeing a Weak External auxiliary record with a characteristics field holding zero instead of one of IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY, IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY, or IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY. llvm-svn: 205911
* obj2yaml: Use the correct relocation type for different machine typesDavid Majnemer2014-04-072-0/+17
| | | | | | | | | | | | | The IO normalizer would essentially lump I386 and AMD64 relocations together. Relocation types with the same numeric value would then get mapped in appropriately. For example: IMAGE_REL_AMD64_ADDR64 and IMAGE_REL_I386_DIR16 both have a numeric value of one. We would see IMAGE_REL_I386_DIR16 in obj2yaml conversions of object files with a machine type of IMAGE_FILE_MACHINE_AMD64. llvm-svn: 205746
* Implement getRelocationAddress for MachO and ET_REL elf files.Rafael Espindola2014-04-032-0/+0
| | | | | | With that, fix the symbolizer to work with any ELF file. llvm-svn: 205588
* Only clear the thumb bit from function addresses.Rafael Espindola2014-04-031-0/+0
| | | | llvm-svn: 205500
* Revert "Fix a nomenclature error in llvm-nm."Rafael Espindola2014-04-031-0/+0
| | | | | | | | | | | | | | | | 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
* Object: Output .file symbols properlyDavid Majnemer2014-03-201-0/+14
| | | | | | | obj2yaml would emit the NUL bytes padding the auxiliary file symbol records. Trimming them looks nicer. llvm-svn: 204314
* Object: Provide a richer means of describing auxiliary symbolsDavid Majnemer2014-03-192-8/+24
| | | | | | | | | | | | | | | | The current state of affairs has auxiliary symbols described as a big bag of bytes. This is less than satisfying, it detracts from the YAML file as being human readable. Instead, allow for symbols to optionally contain their auxiliary data. This allows us to have a much higher level way of describing things like weak symbols, function definitions and section definitions. This depends on D3105. Differential Revision: http://llvm-reviews.chandlerc.com/D3092 llvm-svn: 204214
* Add a test for printing absolute symbols in ELF.Rafael Espindola2014-02-051-0/+0
| | | | llvm-svn: 200818
* Small fix for llvm-nm handling of weak symbols on ELF (print 'v').Rafael Espindola2014-02-041-0/+0
| | | | llvm-svn: 200808
* Add a test for common symbols in coff.Rafael Espindola2014-02-041-0/+0
| | | | llvm-svn: 200803
* [Object][ELF][Mips] Print symbol name for MIPS ELF relocations.Simon Atanasyan2014-01-231-0/+0
| | | | llvm-svn: 199898
* Fix llvm-nm to mach OS X's nm on some tests.Rafael Espindola2013-11-021-0/+0
| | | | | | | 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
* [Mips] Teach llvm-readobj to print MIPS-specific ELF program headers.Simon Atanasyan2013-10-071-0/+0
| | | | | | | The patch reviewed by Michael Spencer. http://llvm-reviews.chandlerc.com/D1846 llvm-svn: 192093
* MC: ObjectSymbolizer can now recognize external function stubs.Ahmed Bougacha2013-08-211-0/+0
| | | | | | | Only implemented in the Mach-O ObjectSymbolizer. The testcase sadly introduces a new binary. llvm-svn: 188879
* [Object] Split the ELF interface into 3 parts.Michael J. Spencer2013-08-082-0/+0
| | | | | | | | * ELFTypes.h contains template magic for defining types based on endianess, size, and alignment. * ELFFile.h defines the ELFFile class which provides low level ELF specific access. * ELFObjectFile.h contains ELFObjectFile which uses ELFFile to implement the ObjectFile interface. llvm-svn: 188022
* Add support for the 's' operation to llvm-ar.Rafael Espindola2013-07-291-0/+0
| | | | | | | | | | | | If no other operation is specified, 's' becomes an operation instead of an modifier. The s operation just creates a symbol table. It is the same as running ranlib. We assume the archive was created by a sane ar (like llvm-ar or gnu ar) and if the symbol table is present, then it is current. We use that to optimize the most common case: a broken build system that thinks it has to run ranlib. llvm-svn: 187353
* Add an initial implementation of archive symbol table generation.Rafael Espindola2013-07-231-0/+0
| | | | | | | | | | | The symbol table has forward references in the file. Instead of allocating a temporary buffer or counting the size and then writing, this implementation writes a dummy value first and patches it once the final value is known. There is room for performance improvement. I will implement them as soon as I get some other features (like a ranlib mode) in. llvm-svn: 186934
* Change archive-update.test to create a new file on the fly.Rafael Espindola2013-07-121-1/+0
| | | | llvm-svn: 186206
* Rename directory to avoid problems on windows.Rafael Espindola2013-07-121-0/+0
| | | | llvm-svn: 186202
* Add a test for llvm-ar's u option.Rafael Espindola2013-07-121-0/+1
| | | | llvm-svn: 186192
* Don't reject an empty archive.Rafael Espindola2013-07-121-0/+1
| | | | llvm-svn: 186159
* Move tests from test/Archive to test/Object.Rafael Espindola2013-07-108-0/+2
| | | | | | | | There is no lib/Archive anymore and some archive tests were in test/Archive and others in test/Object. Since archive is just one of the formats supported by lib/Object, test/Object is probably the best location. llvm-svn: 186038
* Add support for archives with no symbol table or string table.Rafael Espindola2013-07-041-0/+2
| | | | llvm-svn: 185664
* Add support for gnu archives with a string table and no symtab.Rafael Espindola2013-07-031-0/+5
| | | | | | While there, use early returns to reduce nesting. llvm-svn: 185547
* Basic support for parsing Mach-O universal binaries in LLVMObject libraryAlexey Samsonov2013-06-181-0/+0
| | | | llvm-svn: 184191
* [yaml2obj] Remove fragile test case.Sean Silva2013-06-121-7/+0
| | | | | | | | | | This test case was a "sanity check"/"breathing" test case at first, but is really fragile, which impairs changes to yaml2obj. `test/Object/yaml2obj-elf-bits-endian.test` is much more robust and serves as an adequate sanity check. llvm-svn: 183811
* Fix dubious type name similar to member name.Sean Silva2013-06-115-5/+5
| | | | | | Should bring bots back to life. llvm-svn: 183715
* [yaml2obj] Initial ELF support.Sean Silva2013-06-105-0/+31
| | | | | | | | | Currently, only emitting the ELF header is supported (no sections or segments). The ELFYAML code organization is broadly similar to the COFFYAML code. llvm-svn: 183711
* Teach llvm-objdump with the -macho parser how to use the data in code tableKevin Enderby2013-06-061-0/+0
| | | | | | | | | | | | | | | from the LC_DATA_IN_CODE load command. And when disassembling print the data in code formatted for the kind of data it and not disassemble those bytes. I added the format specific functionality to the derived class MachOObjectFile since these tables only appears in Mach-O object files. This is my first attempt to modify the libObject stuff so if folks have better suggestions how to fit this in or suggestions on the implementation please let me know. rdar://11791371 llvm-svn: 183424
* Print symbol names in relocations when dumping COFF as YAML.Rafael Espindola2013-06-062-6/+6
| | | | llvm-svn: 183403
* Handle relocations that don't point to symbols.Rafael Espindola2013-06-051-0/+0
| | | | | | | | In ELF (as in MachO), not all relocations point to symbols. Represent this properly by using a symbol_iterator instead of a SymbolRef. Update llvm-readobj ELF's dumper to handle relocatios without symbols. llvm-svn: 183284
* [Object/COFF] Fix Windows .lib name handling.Rui Ueyama2013-06-032-0/+0
| | | | llvm-svn: 183091
* Split Alignment out of the Section Characteristics.Rafael Espindola2013-05-062-4/+8
| | | | | | | | The alignment is just a byte in the middle of Characteristics, not an independent flag. Making it an independent field in the yaml representation makes it more yamlio friendly. llvm-svn: 181243
* Revert r181009.Amara Emerson2013-05-032-0/+0
| | | | llvm-svn: 181079
* Add support for reading ARM ELF build attributes.Amara Emerson2013-05-032-0/+0
| | | | | | | | | | | Build attribute sections can now be read if they exist via ELFObjectFile, and the llvm-readobj tool has been extended with an option to dump this information if requested. Regression tests are also included which exercise these features. Also update the docs with a fixed ARM ABI link and a new link to the Addenda which provides the build attributes specification. llvm-svn: 181009
* Clarify getRelocationAddress x getRelocationOffset a bit.Rafael Espindola2013-04-251-0/+0
| | | | | | | | | | getRelocationAddress is for dynamic libraries and executables, getRelocationOffset for relocatable objects. Mark the getRelocationAddress of COFF and MachO as not implemented yet. Add a test of ELF's. llvm-readobj -r now prints the same values as readelf -r. llvm-svn: 180259
* Fix typo.Rafael Espindola2013-04-232-4/+4
| | | | llvm-svn: 180137
* Don't read one command past the end.Rafael Espindola2013-04-191-0/+0
| | | | | | | | | 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
* Add back parsing of header charactestics.Rafael Espindola2013-04-041-0/+1
| | | | | | | | 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-031-0/+0
| | | | | | | | 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
OpenPOWER on IntegriCloud