summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/CoreLinkingContext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove remaining files of Core.Rui Ueyama2016-03-021-50/+0
| | | | llvm-svn: 262435
* Fix no-asserts build failure due to unused variable, and cleanup some ↵David Blaikie2015-06-191-1/+3
| | | | | | unique_ptr usage while I'm here llvm-svn: 240169
* Simplify Pass::perform to take a SimpleFile& instead of unique_ptr<SimpleFile>&David Blaikie2015-06-191-6/+4
| | | | | | | | None of the implementations replace the SimpleFile with some other file, they just modify the SimpleFile in-place, so a direct reference to the file is sufficient. llvm-svn: 240167
* [lld] Allow LLD passes to return error codes.Lang Hames2015-06-191-1/+2
| | | | llvm-svn: 240147
* Delete dead code (again).Rui Ueyama2015-04-171-61/+0
| | | | llvm-svn: 235217
* Delete dead code.Rui Ueyama2015-04-171-61/+0
| | | | llvm-svn: 235216
* Merge MutableFile with SimpleFile.Rui Ueyama2015-04-071-2/+2
| | | | | | | | SimpleFile is the only derived class of MutableFile. This patch reduces the height of class hierarchy by removing MutableFile class. llvm-svn: 234354
* Use alignment values everywhere instead of log2.Rui Ueyama2015-03-261-2/+2
| | | | | | | | This patch defines implicit conversion between integers and PowerOf2 instances, so uses of the classes is now implicit and look like regular integers. Now we are ready to remove the scaffolding. llvm-svn: 233245
* Remove sectionPosition attribute.Rui Ueyama2015-03-081-4/+0
| | | | | | | | This code is simply dead. No one is using it. http://reviews.llvm.org/D8125 llvm-svn: 231583
* Remove YAML/Native round-trip passes.Rui Ueyama2015-02-201-1/+0
| | | | | | | | | | | | | | | | | | | | The round-trip passes were introduced in r193300. The intention of the change was to make sure that LLD is capable of reading end writing such file formats. But that turned out to be yet another over-designed stuff that had been slowing down everyday development. The passes ran after the core linker and before the writer. If you had an additional piece of information that needs to be passed from front-end to the writer, you had to invent a way to save the data to YAML/Native. These passes forced us to do that even if that data was not needed to be represented neither in an object file nor in an executable/DSO. It doesn't make sense. We don't need these passes. http://reviews.llvm.org/D7480 llvm-svn: 230069
* MachO: Move LayoutPass to MachO directory.Rui Ueyama2015-02-051-4/+14
| | | | | | | | | | | | | | | | | | | | | | The real user of the LayoutPass is now only Mach-O, so move that pass out of the common directory to Mach-O directory. "Core" architecture were using the LayoutPass. I modified that to use a simple OrderPass. I think no one actually have authority what feature should be in Core and what's not, but I believe the LayoutPass is not very suitable for Core. Before more code starts depending on the complex pass, it's better to remove that from Core. I could have simplified that pass because Mach-O is the only user of the LayoutPass. For example, the second parameter of the LayoutPass constructor can be converted from optional to mandatory. I didn't do that in this patch to keep it simple. I'll do in a followup patch. http://reviews.llvm.org/D7311 llvm-svn: 228341
* Remove dead code.Rui Ueyama2015-01-311-12/+0
| | | | llvm-svn: 227671
* Remove duplication code.Rui Ueyama2015-01-161-26/+0
| | | | llvm-svn: 226321
* Sort include files according to convention.Shankar Easwaran2014-10-181-2/+0
| | | | llvm-svn: 220131
* Move GOTPass and StubsPass from Core to MachONick Kledzik2014-07-091-65/+0
| | | | llvm-svn: 212652
* Move Simple.h and Alias.h to include/Core.Rui Ueyama2014-06-111-1/+1
| | | | | | | | Because the files in Core actually depend on these files. Differential Revision: http://reviews.llvm.org/D4000 llvm-svn: 210710
* [ReaderWriter] Simplify initialization of class fields.Simon Atanasyan2014-06-101-2/+2
| | | | | | No functional changes. llvm-svn: 210532
* Re-submit r207884: Remove dead codeRui Ueyama2014-05-051-5/+0
| | | | | | Differential Revision: http://reviews.llvm.org/D3599 llvm-svn: 207989
* Revert "Remove dead code."Rui Ueyama2014-05-021-0/+5
| | | | | | This reverts commit r207884 which was prematurely committed by accident. llvm-svn: 207886
* Remove dead code.Rui Ueyama2014-05-021-5/+0
| | | | | | | | | | | | | | | isAlias always returns false and no one is using it. It was originally added Atom to query if an atom is an alias for another atom, assuming that alias atoms are different from normal atoms. We now support atom aliasing, but the way that's implemented is in a different way than what isAlias assumed. An alias atom is just a regular defined atom with no content, and it has a layout- before edge to alias-to atom so that they are layed out at the same location in the result. So this is dead code, and it doesn't make much sense to keep it. llvm-svn: 207884
* Add "override" and remove "virtual" where appropriate.Rui Ueyama2014-03-061-54/+54
| | | | | | | For the record, I used clang-modernize to add "override" and perl to remove "virtual". llvm-svn: 203164
* [lld] Include reference kind in cycle detector debug outputNico Rieck2014-02-241-1/+1
| | | | | | | | This restores the debug output to how it was before r197727 broke it. This went undetected because the corresponding test was never run due to broken feature detection. llvm-svn: 202079
* Run clang-format on r197727.Rui Ueyama2013-12-201-6/+5
| | | | llvm-svn: 197788
* [lld] Introduce registry and Reference kind tupleNick Kledzik2013-12-191-56/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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-3/+10
| | | | | | | | | | | | | 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
* Revert "r193300 - [PassManager] add ReaderWriter{Native, YAML} to the Driver"Rui Ueyama2013-10-241-3/+2
| | | | | | | The patch have completely broken COFF port and disabled many tests. This also reverts r193302 (comment fix). llvm-svn: 193362
* [PassManager] add ReaderWriter{Native,YAML} to the Driver.Shankar Easwaran2013-10-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable tests to be run with REQUIRES: disable. Note disable is not added to the config by the test runner Mkaefiles, so essentially disables the test. Code changes would be required to fix these tests :- test/darwin/hello-world.objtxt test/elf/check.test test/elf/phdr.test test/elf/ppc.test test/elf/undef-from-main-dso.test test/elf/X86_64/note-sections-ro_plus_rw.test test/pecoff/alignment.test test/pecoff/base-reloc.test test/pecoff/bss-section.test test/pecoff/drectve.test test/pecoff/dynamic.test test/pecoff/dynamicbase.test test/pecoff/entry.test test/pecoff/hello.test test/pecoff/imagebase.test test/pecoff/importlib.test test/pecoff/lib.test test/pecoff/multi.test test/pecoff/reloc.test test/pecoff/weak-external.test llvm-svn: 193300
* Update error classes from all lowercase to camel case.Rui Ueyama2013-10-091-2/+2
| | | | llvm-svn: 192261
* [LinkingContext] make LinkingContext non-constShankar Easwaran2013-10-081-6/+3
| | | | llvm-svn: 192183
* [lld][InputGraph] Change the Resolver to use inputGraphShankar Easwaran2013-10-071-7/+1
| | | | | | | | | | | | 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
* Make Driver::link and LinkingContext::validate return true on success.Rui Ueyama2013-09-241-1/+1
| | | | | | | | | | | | | 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
* Change the parseFile argument from MemoryBuffer pointer to LinkerInputJoerg Sonnenberger2013-09-071-3/+2
| | | | | | reference. Move readFile logic into FileNode::createLinkerInput. llvm-svn: 190253
* Rename ti -> ctx.Rui Ueyama2013-08-271-3/+4
| | | | | | | This should have been done in r187823 when I renamed LinkingContext from TargetInfo. I missed a few files. llvm-svn: 189298
* Rename TargetInfo -> LinkingContext.Rui Ueyama2013-08-061-0/+320
Also change some local variable names: "ti" -> "context" and "_targetInfo" -> "_context". Differential Revision: http://llvm-reviews.chandlerc.com/D1301 llvm-svn: 187823
OpenPOWER on IntegriCloud