summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't use make_error_code from the llvm namespace.Rafael Espindola2014-06-121-8/+8
| | | | llvm-svn: 210741
* Use std::error_code instead of llvm::error_code.Rafael Espindola2014-06-111-8/+8
| | | | | | This is an update for a llvm api change. llvm-svn: 210689
* This lambda returns a boolean, update the return statements.Rafael Espindola2014-06-031-7/+7
| | | | llvm-svn: 210071
* Use error_code() instead of error_code::succes()Rafael Espindola2014-05-311-5/+5
| | | | | | | There is no std::error_code::success, so this removes much of the noise in transitioning to std::error_code. llvm-svn: 209948
* [mach-o] Wire up mach-o binary reader to reader registryNick Kledzik2014-05-301-0/+48
| | | | llvm-svn: 209868
* [mach-o] Support parsing of non-lazy-pointer sectionsNick Kledzik2014-05-281-4/+49
| | | | llvm-svn: 209704
* Fix trailing whitespace.Shankar Easwaran2014-01-271-29/+29
| | | | llvm-svn: 200182
* [MachO] Begin support for reading fat binaries.Joey Gouly2014-01-141-21/+57
| | | | llvm-svn: 199259
* [mach-o] enable mach-o and native yaml to be intermixedNick Kledzik2014-01-111-4/+6
| | | | | | | | | | | | | | | | | | The main goal of this patch is to allow "mach-o encoded as yaml" and "native encoded as yaml" documents to be intermixed. They are distinguished via yaml tags at the start of the document. This will enable all mach-o test cases to be written using yaml instead of checking in object files. The Registry was extend to allow yaml tag handlers to be registered. The mach-o Reader adds a yaml tag handler for the tag "!mach-o". Additionally, this patch fixes some buffer ownership issues. When parsing mach-o binaries, the mach-o atoms can have pointers back into the memory mapped .o file. But with yaml encoded mach-o, name and content are ephemeral, so a copyRefs parameter was added to cause the mach-o atoms to make their own copy. llvm-svn: 198986
* Run clang-format on r197727.Rui Ueyama2013-12-201-6/+3
| | | | llvm-svn: 197788
* [lld] Introduce registry and Reference kind tupleNick Kledzik2013-12-191-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [mach-o] binary reader and writer Nick Kledzik2013-11-061-0/+310
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
OpenPOWER on IntegriCloud