summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/StubsPass.hpp
Commit message (Collapse)AuthorAgeFilesLines
* [mach-o] refactor KindHandler into ArchHandler and simplify passes.Nick Kledzik2014-07-161-173/+0
| | | | | | | | | | | All architecture specific handling is now done in the appropriate ArchHandler subclass. The StubsPass and GOTPass have been simplified. All architecture specific variations in stubs are now encoded in a table which is vended by the current ArchHandler. llvm-svn: 213187
* Move GOTPass and StubsPass from Core to MachONick Kledzik2014-07-091-0/+1
| | | | llvm-svn: 212652
* Move Simple.h and Alias.h to include/Core.Rui Ueyama2014-06-111-3/+3
| | | | | | | | Because the files in Core actually depend on these files. Differential Revision: http://reviews.llvm.org/D4000 llvm-svn: 210710
* [MachO] Remove "virtual" and add "override".Rui Ueyama2014-03-281-4/+4
| | | | llvm-svn: 205057
* Run clang-format on r197727.Rui Ueyama2013-12-201-3/+2
| | | | llvm-svn: 197788
* [lld] Introduce registry and Reference kind tupleNick Kledzik2013-12-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main changes are in: include/lld/Core/Reference.h include/lld/ReaderWriter/Reader.h Everything else is details to support the main change. 1) Registration based Readers Previously, lld had a tangled interdependency with all the Readers. It would have been impossible to make a streamlined linker (say for a JIT) which just supported one file format and one architecture (no yaml, no archives, etc). The old model also required a LinkingContext to read an object file, which would have made .o inspection tools awkward. The new model is that there is a global Registry object. You programmatically register the Readers you want with the registry object. Whenever you need to read/parse a file, you ask the registry to do it, and the registry tries each registered reader. For ease of use with the existing lld code base, there is one Registry object inside the LinkingContext object. 2) Changing kind value to be a tuple Beside Readers, the registry also keeps track of the mapping for Reference Kind values to and from strings. Along with that, this patch also fixes an ambiguity with the previous Reference::Kind values. The problem was that we wanted to reuse existing relocation type values as Reference::Kind values. But then how can the YAML write know how to convert a value to a string? The fix is to change the 32-bit Reference::Kind into a tuple with an 8-bit namespace (e.g. ELF, COFFF, etc), an 8-bit architecture (e.g. x86_64, PowerPC, etc), and a 16-bit value. This tuple system allows conversion to and from strings with no ambiguities. llvm-svn: 197727
* Fix include guards.Rui Ueyama2013-11-151-3/+3
| | | | llvm-svn: 194776
* 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
* Rename TargetInfo -> LinkingContext.Rui Ueyama2013-08-061-13/+13
| | | | | | | | | Also change some local variable names: "ti" -> "context" and "_targetInfo" -> "_context". Differential Revision: http://llvm-reviews.chandlerc.com/D1301 llvm-svn: 187823
* This is my Driver refactoring patch. Nick Kledzik2013-04-041-10/+11
| | | | | | | | | | | | | | | | | | | | | | | 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
* add elf targethandlerShankar Easwaran2013-01-251-7/+8
| | | | llvm-svn: 173430
* Move SimpleAtoms.h to ReaderWriter.Michael J. Spencer2013-01-241-1/+1
| | | | llvm-svn: 173380
* Add PassManager.Michael J. Spencer2013-01-231-0/+1
| | | | | | It owns and manages passes. llvm-svn: 173287
* Move everything over to TargetInfo.Michael J. Spencer2013-01-231-13/+12
| | | | | | | | I really would have liked to split this patch up, but it would greatly complicate the lld-core and lld drivers having to deal with both {Reader,Writer}Option and TargetInfo. llvm-svn: 173217
* Factor File::addAtom out to MutableFile::addAtom.Michael J. Spencer2013-01-121-1/+1
| | | | | | This removes a bunch of llvm_unreachables and makes a File's mutability part of the type system. llvm-svn: 172297
* [MachO] Fix uninitialized variables.Michael J. Spencer2012-11-011-1/+4
| | | | llvm-svn: 167244
* PR13467: Fix mach-o writer to handle case of zero stubs. Renumber ↵Nick Kledzik2012-07-301-0/+3
| | | | | | TestingHelpers kind values llvm-svn: 160982
* Move implementation of WriterOptionsMachO to its own file. Reduced redundantNick Kledzik2012-06-111-5/+25
| | | | | | | | ivars in WriterOptionsMachO instead have its methods compute ivar interactions. Refactor mach-o Reference Kinds and introduce abstract class KindHandler. Split up StubAtoms.hpp by architecture. Add support for 32-bit x86 stubs. llvm-svn: 158336
* Major refactoring: Remove Platform concept. In its place there are Nick Kledzik2012-05-311-0/+145
now Reader and Writer subclasses for each file format. Each Reader and Writer subclass defines an "options" class which controls how that Reader or Writer operates. llvm-svn: 157774
OpenPOWER on IntegriCloud