summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [mach-o] refactor mach-o output section selection to be table driven.Nick Kledzik2014-06-101-68/+93
| | | | | | | In -r mode the sections use the table used to parse .o files. Otherwise use final exectuable table. No functionality change. llvm-svn: 210506
* [mach-o] Add support for custom sectionsNick Kledzik2014-05-301-8/+43
| | | | llvm-svn: 209928
* [mach-0] Add support for parsing compact unwind info sectionNick Kledzik2014-05-291-0/+3
| | | | llvm-svn: 209865
* [mach-o] Add support for parsing __eh_frame section. Generalize support for ↵Nick Kledzik2014-05-291-0/+3
| | | | | | whether symbols in a section are ignored or illegal llvm-svn: 209858
* [mach-o] Add support for parsing CFString sectionsNick Kledzik2014-05-291-0/+3
| | | | llvm-svn: 209844
* [mach-o] Add support for initializers and terminators in object filesNick Kledzik2014-05-271-0/+6
| | | | llvm-svn: 209700
* [mach-o] Add support for reading utf16 string literal sectionsNick Kledzik2014-05-271-0/+3
| | | | llvm-svn: 209684
* [mach-o] parse literal sections into atomsNick Kledzik2014-05-221-0/+9
| | | | llvm-svn: 209379
* [mach-o] Add support and test cases for parsing tentative definitionsNick Kledzik2014-05-151-1/+5
| | | | llvm-svn: 208919
* s/llvm::dyn_cast/dyn_cast/Rui Ueyama2014-04-021-1/+0
| | | | llvm-svn: 205404
* Fix trailing whitespace.Shankar Easwaran2014-01-271-47/+47
| | | | llvm-svn: 200182
* [mach-o] enable mach-o and native yaml to be intermixedNick Kledzik2014-01-111-2/+2
| | | | | | | | | | | | | | | | | | 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
* [MachO] Begin to add some MachO specific File/Atoms, and add the start ofJoey Gouly2014-01-031-1/+1
| | | | | | normalizedToAtoms. llvm-svn: 198459
* Fix some indentation issues, I saw while reading this file.Joey Gouly2013-12-251-6/+6
| | | | llvm-svn: 198024
* Run clang-format on r197727.Rui Ueyama2013-12-201-4/+3
| | | | llvm-svn: 197788
* [lld] Introduce registry and Reference kind tupleNick Kledzik2013-12-191-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] 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-061-0/+821
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