summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "Remove makeArrayRef() calls."Rui Ueyama2013-12-102-14/+21
| | | | | | | This reverts commit r196475 because it made the build to fail with GCC 4.7/4.8/4.9. Reported by Mikael Lyngvig. llvm-svn: 196853
* Remove makeArrayRef() calls.Rui Ueyama2013-12-052-21/+14
| | | | | | | Because ArrayRef has implicit conversion from C arrays, we don't need makeArrayRef. llvm-svn: 196475
* Fix a variety of typos in function names and commentsAlp Toker2013-12-011-1/+1
| | | | | | No change in functionality. llvm-svn: 196053
* Fix include guards.Rui Ueyama2013-11-159-27/+27
| | | | llvm-svn: 194776
* Fix trailing whitespace and indentation.Rui Ueyama2013-11-141-53/+41
| | | | llvm-svn: 194722
* Use makeArrayRef(). No functionality change.Rui Ueyama2013-11-141-6/+7
| | | | llvm-svn: 194721
* Fix indentation and delete trailing whitespace.Rui Ueyama2013-11-141-47/+37
| | | | llvm-svn: 194677
* Use makeArrayRef() to make ArrayRef from C array.Rui Ueyama2013-11-141-6/+7
| | | | llvm-svn: 194675
* Re-submit r194551: Use empty() instead of size() == 0.Rui Ueyama2013-11-131-1/+1
| | | | llvm-svn: 194556
* Revert "Use empty() instead of size() == 0."Rui Ueyama2013-11-131-1/+1
| | | | | | This reverts commit r194551 because it broke the buildbot. llvm-svn: 194552
* Use empty() instead of size() == 0.Rui Ueyama2013-11-131-1/+1
| | | | llvm-svn: 194551
* [MachO] Simplify conditionals. No functionality change.Rui Ueyama2013-11-121-7/+5
| | | | llvm-svn: 194492
* [mach-o] Use LEB128 stuff from llvm/Support. No functionality change.Nick Kledzik2013-11-091-67/+29
| | | | llvm-svn: 194305
* [mach-o] reduce duplicate source code by using a templated method. No ↵Nick Kledzik2013-11-091-113/+43
| | | | | | functionality change. llvm-svn: 194299
* [mach-o] fix uninitialized variableNick Kledzik2013-11-081-0/+1
| | | | llvm-svn: 194290
* [mach-o] add llvm_unreachableNick Kledzik2013-11-061-0/+1
| | | | llvm-svn: 194172
* [mach-o] fix DEBUG_WITH_TYPE to compile without warnings in non-debug caseNick Kledzik2013-11-061-17/+15
| | | | llvm-svn: 194171
* [mach-o] binary reader and writer Nick Kledzik2013-11-068-1547/+2620
| | | | | | | | | | This patch adds support for converting normalized mach-o to and from binary mach-o. It also changes WriterMachO (which previously directly wrote a mach-o binary given a set of Atoms) to instead do it in two steps. The first step uses normalizedFromAtoms() to convert Atoms to normalized mach-o, and the second step uses writeBinary() which to generate the mach-o binary file. llvm-svn: 194167
* Remove unnecessary namespace qualifier.Rui Ueyama2013-11-052-3/+3
| | | | llvm-svn: 194037
* [MachO] Fix uninitialized field bug found on Windows.Rui Ueyama2013-11-021-0/+2
| | | | | | | | | | n_desc field in MachO string table was not initialized. On Unix, test/darwin/hello-world.objtxt did not fail because I think an nlist object is always allocated to a fresh heap initialized with zeros. On Windows, uninitialized fields are filled with 0xCC when compiled with /GZ. Because of that the test was failing on Windows. llvm-svn: 193909
* Remove duplicate calls of pm.add() for RoundTrip tests.Rui Ueyama2013-11-011-4/+0
| | | | llvm-svn: 193885
* [PassManager] add ReaderWriter{Native,YAML} to the Driver.Shankar Easwaran2013-10-291-1/+7
| | | | | | | | | | | | | Enable this for the following flavors a) core b) gnu c) darwin Its disabled for the flavor PECOFF. Convenient markers are added with FIXME comments in the Driver that would be removed and code removed from each flavor. llvm-svn: 193585
* [MachO] pointer align linker generated (non)lazy pointersNick Kledzik2013-10-282-1/+16
| | | | llvm-svn: 193551
* [Darwin] Fix Reference to nullptr.Shankar Easwaran2013-10-262-64/+64
| | | | | | | | | | | | | | | | | | On discussing this with Nick, it looks like the StubAtoms that contain a lazyImmediate reference kind should be null and the location needs to be fixed up later with some value that is an offset into the __LINKEDIT segment. The drawback is that it allows yaml files with references that expect a target to be considered without one. This results in bad yaml files that would need to be handled in the YAML Reader. Inorder to fix this, the Stub Atoms use a dummy target such as itself. llvm-svn: 193476
* Bug 17569: add namespaces to work with gcc-4.7Nick Kledzik2013-10-141-7/+17
| | | | llvm-svn: 192627
* Update error classes from all lowercase to camel case.Rui Ueyama2013-10-091-1/+1
| | | | llvm-svn: 192261
* fix typosNick Kledzik2013-10-082-2/+2
| | | | llvm-svn: 192154
* Supoort mach-o encoded in yaml.Nick Kledzik2013-10-084-6/+935
| | | | | | | | | | | | | | | | | | | | | This is the first step in how I plan to get mach-o object files support into lld. We need to be able to test the mach-o Reader and Write on systems without a mach-o tools. Therefore, we want to support a textual way (YAML) to represent mach-o files. MachONormalizedFile.h defines an in-memory abstraction of the content of mach-o files. The in-memory data structures are always native endianess and always use 64-bit sizes. That internal data structure can then be converted to or from three different formats: 1) yaml (text) encoded mach-o, 2) binary mach-o files, 3) lld Atoms. This patch defines the internal model and uses YAML I/O to implement the conversion to and from the model to yaml. The next patch will implement the conversion from normalized to binary mach-o. This patch includes unit tests to validate the yaml conversion APIs. llvm-svn: 192147
* [lld][InputGraph] Change the Resolver to use inputGraphShankar Easwaran2013-10-072-29/+17
| | | | | | | | | | | | Changes :- a) Functionality in InputGraph to insert Input elements at any position b) Functionality in the Resolver to use nextFile c) Move the functionality of assigning file ordinals to InputGraph d) Changes all inputs to MemoryBuffers e) Remove LinkerInput, InputFiles, ReaderArchive llvm-svn: 192081
* [mach-o] switch to use llvm::MachO:: constantsNick Kledzik2013-09-272-25/+26
| | | | | | Stop using some locally defined mach-o constants. llvm-svn: 191581
* [Core] Add type and size to SharedLibraryAtom.Michael J. Spencer2013-09-261-0/+8
| | | | llvm-svn: 191466
* Make Driver::link and LinkingContext::validate return true on success.Rui Ueyama2013-09-241-5/+5
| | | | | | | | | | | | | This patch inverts the return value of these functions, so that they return "true" on success and "false" on failure. The meaning of boolean return value was mixed in LLD; for example, InputGraph::validate() returns true on success. With this patch they'll become consistent. CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1748 llvm-svn: 191341
* Support darwin linker options: Nick Kledzik2013-09-101-1/+25
| | | | | | | | -current_version, -compatibility_version, and -install_name. Patch by Joe Ranieri llvm-svn: 190452
* Remove PackedVersion from MachOLinkingContext and replace with uint32_tNick Kledzik2013-09-101-35/+20
| | | | | | | | and a parsePackedVersion() utility. Patch by Joe Ranieri llvm-svn: 190451
* Change the parseFile argument from MemoryBuffer pointer to LinkerInputJoerg Sonnenberger2013-09-071-3/+3
| | | | | | reference. Move readFile logic into FileNode::createLinkerInput. llvm-svn: 190253
* add InputGraph functionalityShankar Easwaran2013-08-213-636/+5
| | | | llvm-svn: 188958
* Rename TargetInfo -> LinkingContext.Rui Ueyama2013-08-067-190/+164
| | | | | | | | | Also change some local variable names: "ti" -> "context" and "_targetInfo" -> "_context". Differential Revision: http://llvm-reviews.chandlerc.com/D1301 llvm-svn: 187823
* [mach-o] factor out all cputype <-> arch conversions to one table driven ↵Nick Kledzik2013-07-201-28/+63
| | | | | | location llvm-svn: 186755
* Add -help option to Darwin Driver. Use grouping in Options table to better ↵Nick Kledzik2013-07-191-0/+6
| | | | | | format help output llvm-svn: 186640
* Fix unused field warning.Rui Ueyama2013-06-221-21/+10
| | | | llvm-svn: 184651
* Removed unnecessary "class" keyword.Rui Ueyama2013-06-211-14/+17
| | | | llvm-svn: 184589
* Factor duplicated yamlReader creation.Rafael Espindola2013-06-111-3/+1
| | | | | | | | | | | The yaml reader is not specific to any file format. This patch moves it to TargetInfo and makes validate a non virtual interface so that it can be constructed from a single location. The same method will be used to create a reader for llvm bitcode files. llvm-svn: 183740
* Remove unreachable statement.Rui Ueyama2013-05-261-3/+0
| | | | llvm-svn: 182714
* Moved llvm_unreachable out of switch blocks to avoid the "control reaches ↵Andy Gibbs2013-04-161-2/+4
| | | | | | end of non-void function" warning. llvm-svn: 179590
* Revert "Correctly pass ownership of MemoryBuffers."Michael J. Spencer2013-04-051-4/+3
| | | | llvm-svn: 178918
* Correctly pass ownership of MemoryBuffers.Michael J. Spencer2013-04-051-6/+5
| | | | llvm-svn: 178914
* This is my Driver refactoring patch. Nick Kledzik2013-04-047-111/+261
| | | | | | | | | | | | | | | | | | | | | | | The major changes are: 1) LinkerOptions has been merged into TargetInfo 2) LinkerInvocation has been merged into Driver 3) Drivers no longer convert arguments into an intermediate (core) argument list, but instead create a TargetInfo object and call setter methods on it. This is only how in-process linking would work. That is, you can programmatically set up a TargetInfo object which controls the linking. 4) Lots of tweaks to test suite to work with driver changes 5) Add the DarwinDriver 6) I heavily doxygen commented TargetInfo.h Things to do after this patch is committed: a) Consider renaming TargetInfo, given its new roll. b) Consider pulling the list of input files out of TargetInfo. This will enable in-process clients to create one TargetInfo the re-use it with different input file lists. c) Work out a way for Drivers to format the warnings and error done in core linking. llvm-svn: 178776
* [lld] remove trailing whitespaceShankar Easwaran2013-03-143-68/+68
| | | | llvm-svn: 177079
* [Core,Driver,ELF] Differentiate static and dynamic executables.Michael J. Spencer2013-02-143-5/+13
| | | | | | | This also adds a simple relocation change for dynamic executables to x86-64 ELF. llvm-svn: 175208
* add changes for layoutafter/layoutbefore/ingroup/layoutpass and test casesShankar Easwaran2013-02-071-1/+2
| | | | llvm-svn: 174658
OpenPOWER on IntegriCloud