summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix llvm-nm to mach OS X's nm on some tests.Rafael Espindola2013-11-021-6/+17
| | | | | | | 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
* Support for microMIPS jump instructionsZoran Jovanovic2013-10-291-0/+1
| | | | llvm-svn: 193623
* Support for microMIPS relocations 1.Zoran Jovanovic2013-10-231-0/+11
| | | | llvm-svn: 193247
* Path: Recognize Windows compiled resource file.Rui Ueyama2013-10-152-1/+3
| | | | | | | | | | | | | | Some background: One can pass compiled resource files (.res files) directly to the linker on Windows. If a resource file is given, the linker will run "cvtres" command in background to convert the resource file to a COFF file to link it. What I'm trying to do with this patch is to make the linker to recognize the resource file by file magic, so that it can run cvtres command. Differential Revision: http://llvm-reviews.chandlerc.com/D1943 llvm-svn: 192742
* Add missing #include's to cctype when using isdigit/alpha/etc.Will Dietz2013-10-122-0/+2
| | | | llvm-svn: 192519
* Object/COFF: Rename getXXX{Begin,End} -> xxx_{begin,end}.Rui Ueyama2013-09-272-10/+10
| | | | | | | It is mentioned in the LLVM coding standard that _begin() and _end() suffixes should be used. llvm-svn: 191569
* Re-submit r191472 with a fix for big endian.Rui Ueyama2013-09-271-30/+166
| | | | | llvm-objdump: Dump COFF import table if -private-headers option is given. llvm-svn: 191557
* Revert "llvm-objdump: Dump COFF import table if -private-headers option is ↵Rui Ueyama2013-09-271-166/+30
| | | | | | | | given." This reverts commit r191472 because it's failing on BE machine. llvm-svn: 191480
* llvm-objdump: Dump COFF import table if -private-headers option is given.Rui Ueyama2013-09-271-30/+166
| | | | | | | | | | | | | | | | This is a patch to add capability to llvm-objdump to dump COFF Import Table entries, so that we can write tests for LLD checking Import Table contents. llvm-objdump did not print anything but just file name if the format is COFF and -private-headers option is given. This is a patch adds capability for dumping DLL Import Table, which is specific to the COFF format. In this patch I defined a new iterator to iterate over import table entries. Also added a few functions to COFFObjectFile.cpp to access fields of the entry. Differential Revision: http://llvm-reviews.chandlerc.com/D1719 llvm-svn: 191472
* ELF: Add support for the exclude section bit for gas compat.Benjamin Kramer2013-09-151-0/+1
| | | | llvm-svn: 190769
* Move everything depending on Object/MachOFormat.h over to Support/MachO.h.Charles Davis2013-09-012-395/+401
| | | | llvm-svn: 189728
* Revert "Fix the build broken by r189315." and "Move everything depending on ↵Charles Davis2013-08-272-403/+397
| | | | | | | | | Object/MachOFormat.h over to Support/MachO.h." This reverts commits r189319 and r189315. r189315 broke some tests on what I believe are big-endian platforms. llvm-svn: 189321
* Move everything depending on Object/MachOFormat.h over to Support/MachO.h.Charles Davis2013-08-272-397/+403
| | | | llvm-svn: 189315
* Support/MachO: Add a bunch of defines.Charles Davis2013-08-271-26/+26
| | | | | | | | Right now we have two headers for the Mach-O format. I'd like to get rid of one. Since the other object formats are all in Support, I chose to keep the Mach-O header in Support, and discard the other one. llvm-svn: 189314
* Move #includes from .h to .cpp file.Jakub Staszak2013-08-211-0/+2
| | | | llvm-svn: 188852
* Add back missing PPC relocation types.Ulrich Weigand2013-08-091-0/+36
| | | | llvm-svn: 188064
* Add missing PPC64 relocation types.Michael J. Spencer2013-08-081-0/+42
| | | | llvm-svn: 188031
* [Object] Split the ELF interface into 3 parts.Michael J. Spencer2013-08-083-2/+625
| | | | | | | | * 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
* initial draft of PPCMachObjectWriter.cppDavid Fang2013-08-081-3/+4
| | | | | | | | this records relocation entries in the mach-o object file for PIC code generation. tested on powerpc-darwin8, validated against darwin otool -rvV llvm-svn: 188004
* YAMLTraits.h: replace DenseMap that used a bad implementation of DenseMapInfoDmitri Gribenko2013-08-071-0/+1
| | | | | | | | | | for StringRef with a StringMap The bug is that the empty key compares equal to the tombstone key. Also added an assertion to DenseMap to catch similar bugs in future. llvm-svn: 187866
* MachObjectFile: Don't leak on error.Benjamin Kramer2013-08-031-7/+9
| | | | llvm-svn: 187698
* Add support for the 's' operation to llvm-ar.Rafael Espindola2013-07-291-2/+6
| | | | | | | | | | | | 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
* Remove the mblaze backend from llvm.Rafael Espindola2013-07-251-2/+0
| | | | | | Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html llvm-svn: 187145
* Delete the buffer in createObjectFile if it fails.Rafael Espindola2013-07-241-1/+4
| | | | | | | | | | The Binary constructor takes ownership of the memory buffer. This is a fairly unfortunate interface, but for now make createObjectFile consistent with it by also deleting the buffer if it fails. Fixes a leak in llvm-ar found by the valgrind bots. llvm-svn: 187039
* Typo.Eric Christopher2013-07-221-1/+1
| | | | llvm-svn: 186886
* 80-column tidying. Formatting choices by clang-format.Eric Christopher2013-07-221-14/+16
| | | | llvm-svn: 186885
* Retry submitting r186623: COFFDumper: Dump data directory entries.Rui Ueyama2013-07-191-37/+49
| | | | | | | | The original change was rolled back in r186627 because of test failures on the big endian machine. I believe I fixed the issue so re-submitting. llvm-svn: 186734
* Revert "COFFDumper: Dump data directory entries."Rui Ueyama2013-07-181-46/+36
| | | | | | Because it broke s390x and ppc64-linux buildbots. This reverts commit r186623. llvm-svn: 186627
* COFFDumper: Dump data directory entries.Rui Ueyama2013-07-181-36/+46
| | | | | | | | | | | | | | | | | Summary: Dump optional data directory entries in the PE/COFF header, so that we can test the output of LLD linker. This patch updates the test binary file, but the source of the binary is the same. I just re-linked the file. I don't know how the previous file was linked, but the previous file did not have any data directory entries for some reason. Reviewers: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1148 llvm-svn: 186623
* Add 'const' qualifiers to static const char* variables.Craig Topper2013-07-161-1/+1
| | | | llvm-svn: 186371
* Change llvm-ar to use lib/Object.Rafael Espindola2013-07-121-26/+23
| | | | | | | | | | | | | | | | | | | | | | This fixes two bugs is lib/Object that the use in llvm-ar found: * In OS X created archives, the name can be padded with nulls. Strip them. * In the constructor, remember the first non special member and use that in begin_children. This makes sure we skip all special members, not just the first one. The change to llvm-ar itself consist of * Using lib/Object for reading archives instead of ArchiveReader.cpp. * Writing the modified archive directly, instead of creating an in memory representation. The old Archive library was way more general than what is needed, as can be seen by the diffstat of this patch. Having llvm-ar using lib/Object now opens the way for creating regular symbol tables for both native objects and bitcode files so that we can use those archives for LTO. llvm-svn: 186197
* Don't reject an empty archive.Rafael Espindola2013-07-121-4/+6
| | | | llvm-svn: 186159
* Find the symbol table on archives created on OS X.Rafael Espindola2013-07-101-3/+14
| | | | llvm-svn: 186041
* Don't crash in 'llvm -s' when an archive has no symtab.Rafael Espindola2013-07-101-1/+7
| | | | llvm-svn: 186029
* Add missing getters. They will be used in llvm-ar.Rafael Espindola2013-07-091-0/+32
| | | | llvm-svn: 185937
* Archive members cannot be larger than 4GB. Return a uint32_t.Rafael Espindola2013-07-091-5/+5
| | | | llvm-svn: 185936
* Add getHeader helper and move ToHeader to the cpp file.Rafael Espindola2013-07-091-2/+6
| | | | llvm-svn: 185933
* Compute the size of an archive member in the constructor.Rafael Espindola2013-07-091-14/+13
| | | | | | | It is always computed the same way (by parsing the header). Doing it in the constructor simplifies the callers a bit. llvm-svn: 185905
* Move some code out of line. No functionality change.Rafael Espindola2013-07-091-0/+70
| | | | llvm-svn: 185901
* Make BinaryRef output correctly in case of empty data.Sean Silva2013-07-091-0/+4
| | | | | | | Previously, it would simply output nothing, but it should output an empty string `""`. llvm-svn: 185894
* Remove a useless declarations (found by scan-build)Sylvestre Ledru2013-07-051-1/+0
| | | | llvm-svn: 185709
* Use the raw member names in Archive::Archive.Rafael Espindola2013-07-051-15/+10
| | | | | | | This a bit more efficient and avoids having a function that uses the string table being called by a function that searches for it. llvm-svn: 185680
* Add support for archives with no symbol table or string table.Rafael Espindola2013-07-041-1/+1
| | | | llvm-svn: 185664
* Add support for gnu archives with a string table and no symtab.Rafael Espindola2013-07-031-27/+52
| | | | | | While there, use early returns to reduce nesting. llvm-svn: 185547
* Make a switch in createBinary fully-covered. Add forgotten ↵Alexey Samsonov2013-06-281-2/+7
| | | | | | macho_dsym_companion case. llvm-svn: 185139
* [yaml2obj][ELF] Make symbol table top-level key.Sean Silva2013-06-221-7/+3
| | | | | | | | | Although in reality the symbol table in ELF resides in a section, the standard requires that there be no more than one SHT_SYMTAB. To enforce this constraint, it is cleaner to group all the symbols under a top-level `Symbols` key on the object file. llvm-svn: 184627
* [yaml2obj][ELF] Don't explicitly set `Binding` with STB_*Sean Silva2013-06-211-10/+7
| | | | | | | | | | | | | | | Instead, just have 3 sub-lists, one for each of {STB_LOCAL,STB_GLOBAL,STB_WEAK}. This allows us to be a lot more explicit w.r.t. the symbol ordering in the object file, because if we allowed explicitly setting the STB_* `Binding` key for the symbol, then we might have ended up having to shuffle STB_LOCAL symbols to the front of the list, which is likely to cause confusion and potential for error. Also, this new approach is simpler ;) llvm-svn: 184506
* [yaml2obj][ELF] Add support for st_value and st_size.Sean Silva2013-06-201-0/+2
| | | | | | | | | After this patch, the ELF file produced by `yaml2obj-elf-symbol-basic.yaml`, when linked and executed on x86_64 (under SysV ABI, obviously; I tested on Linux), produces a working executable that goes into an infinite loop! llvm-svn: 184469
* [yaml2obj][ELF] Allow symbols to reference sections.Sean Silva2013-06-201-0/+1
| | | | llvm-svn: 184468
* MachOUniversal.cpp: Fix abuse of Twine. It would be sufficient to use ↵NAKAMURA Takumi2013-06-191-3/+3
| | | | | | std::string instead. llvm-svn: 184291
OpenPOWER on IntegriCloud