summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO
Commit message (Collapse)AuthorAgeFilesLines
...
* [mach-o] parse multiple symbols on same address into aliasesNick Kledzik2014-06-091-2/+11
| | | | llvm-svn: 210502
* Initial set of MakefilesIain Sandoe2014-06-041-0/+14
| | | | | | | | This provides support for the autoconfing & make build style. The format, style and implementation follows that used within the llvm and clang projects. TODO: implement out-of-source documentation builds. llvm-svn: 210177
* [mach-o] Make anonymous atom out of section content before any symbolNick Kledzik2014-06-041-16/+20
| | | | | | | | In sections that are broken into atoms at symbols, if the first symbol in the section is not at the start of the section, then make an anonymous atom for the section content that is before the first symbol. llvm-svn: 210142
* [mach-o] Refactor sections -> atoms to be table driven.Nick Kledzik2014-06-031-373/+312
| | | | | | | | | | | | Previously each section kind had its own code to loop over the section and parse it into atoms. This refactoring has two tables. The first maps sections to ContentType. The second maps ContentType to information on how to find the atom boundaries. A few bugs in test cases were discovered as part of the refactoring. No change in functionality intended. llvm-svn: 210138
* 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-314-16/+16
| | | | | | | 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] Add support for custom sectionsNick Kledzik2014-05-304-12/+111
| | | | llvm-svn: 209928
* [mach-o] Wire up mach-o binary reader to reader registryNick Kledzik2014-05-301-0/+48
| | | | llvm-svn: 209868
* [mach-0] Add support for parsing compact unwind info sectionNick Kledzik2014-05-292-0/+28
| | | | llvm-svn: 209865
* [mach-o] Add support for parsing __eh_frame section. Generalize support for ↵Nick Kledzik2014-05-292-21/+107
| | | | | | whether symbols in a section are ignored or illegal llvm-svn: 209858
* [mach-o] Add support for parsing CFString sectionsNick Kledzik2014-05-292-25/+67
| | | | llvm-svn: 209844
* [mach-o] Add support for parsing of weak-def symbolsNick Kledzik2014-05-281-2/+4
| | | | llvm-svn: 209707
* [mach-o] Support parsing of non-lazy-pointer sectionsNick Kledzik2014-05-284-19/+97
| | | | llvm-svn: 209704
* [mach-o] Add support for initializers and terminators in object filesNick Kledzik2014-05-273-2/+52
| | | | llvm-svn: 209700
* [mach-o] Add checks that string literals in object files are zero terminatedNick Kledzik2014-05-271-0/+15
| | | | llvm-svn: 209685
* [mach-o] Add support for reading utf16 string literal sectionsNick Kledzik2014-05-272-0/+20
| | | | llvm-svn: 209684
* Add make_dynamic_error_code().Nick Kledzik2014-05-271-3/+16
| | | | | | | | | | | This is a short-term fix to allow lld Readers to return error messages with dynamic content. The long term fix will be to enhance ErrorOr<> to work with errors other than error_code. Or to change the interface to Readers to pass down a diagnostics object through which all error messages are written. llvm-svn: 209681
* [mach-o] Fix so that mach-o semantic errors return an error rather than assertNick Kledzik2014-05-222-8/+15
| | | | llvm-svn: 209469
* [mach-o] parse literal sections into atomsNick Kledzik2014-05-222-3/+69
| | | | llvm-svn: 209379
* [mach-o] Add support for zero-fill sections.Nick Kledzik2014-05-154-14/+58
| | | | llvm-svn: 208928
* [mach-o] Add support and test cases for parsing tentative definitionsNick Kledzik2014-05-156-4/+76
| | | | llvm-svn: 208919
* Add -print_atoms options to DarwinLdDriver which dumps final state of all ↵Nick Kledzik2014-05-142-3/+7
| | | | | | atoms in yaml llvm-svn: 208813
* Update to match changes made in r205955David Majnemer2014-04-101-0/+1
| | | | llvm-svn: 205956
* s/llvm::dyn_cast/dyn_cast/Rui Ueyama2014-04-022-2/+0
| | | | llvm-svn: 205404
* [MachO] Remove "virtual" and add "override".Rui Ueyama2014-03-288-85/+81
| | | | llvm-svn: 205057
* Remove extra semicolon for -WpedanticAlexey Samsonov2014-03-191-6/+6
| | | | llvm-svn: 204219
* Remove redundant "virtual" keyword.Rui Ueyama2014-03-141-1/+1
| | | | llvm-svn: 203903
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-131-1/+1
| | | | | | | | This results in some simplifications to the code where an OwningPtr had to be used with the previous api and then ownership moved to a unique_ptr for the rest of lld. llvm-svn: 203809
* Add "override" and remove "virtual" where appropriate.Rui Ueyama2014-03-061-2/+2
| | | | | | | For the record, I used clang-modernize to add "override" and perl to remove "virtual". llvm-svn: 203164
* [C++11] Replace LLVM_OVERRIDE with just "override" now that we're allChandler Carruth2014-03-021-1/+1
| | | | | | using MSVC 2012 or newer. llvm-svn: 202627
* [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
* [mach-o] use new way to copy StringRefsNick Kledzik2014-02-061-10/+4
| | | | llvm-svn: 200956
* [MachO] Add undefined atoms.Joey Gouly2014-02-022-2/+15
| | | | llvm-svn: 200649
* Fix trailing whitespace.Shankar Easwaran2014-01-279-288/+288
| | | | llvm-svn: 200182
* [MachO] Begin support for reading fat binaries.Joey Gouly2014-01-142-23/+60
| | | | llvm-svn: 199259
* [MachO] Add basic support for local symbols.Joey Gouly2014-01-133-9/+34
| | | | llvm-svn: 199155
* Factor the symbol handling in normalizedToAtoms into a separate function.Joey Gouly2014-01-121-7/+12
| | | | | | No functionality change. llvm-svn: 199066
* [mach-o] enable mach-o and native yaml to be intermixedNick Kledzik2014-01-116-35/+92
| | | | | | | | | | | | | | | | | | 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
* Use getError instead of the error_code operator.Rafael Espindola2014-01-081-2/+2
| | | | llvm-svn: 198797
* [mach-o] properly extract atom content from subrange of section contentNick Kledzik2014-01-081-3/+28
| | | | llvm-svn: 198728
* Use the mach-o MH_* name for file types in yamlNick Kledzik2014-01-081-4/+4
| | | | llvm-svn: 198725
* [MachO] Add some missing NListTypes.Joey Gouly2014-01-041-0/+2
| | | | llvm-svn: 198468
* [MachO] Begin to add some MachO specific File/Atoms, and add the start ofJoey Gouly2014-01-037-7/+172
| | | | | | normalizedToAtoms. llvm-svn: 198459
* Fix a gcc-4.8 warning, about extraneous semicolons.Joey Gouly2013-12-281-6/+6
| | | | llvm-svn: 198091
* Fix some indentation issues, I saw while reading this file.Joey Gouly2013-12-251-6/+6
| | | | llvm-svn: 198024
* Fix indentation in the MachO writer.Joey Gouly2013-12-231-3/+3
| | | | llvm-svn: 197925
* [mach-o] add MachOLinkingContext::configure(type, arch, os)Nick Kledzik2013-12-211-30/+41
| | | | | | | | | It will configure resonable defaults for other settings in the MachOLinkingContext object based on the parameters. Patch by Joe Ranieri llvm-svn: 197851
* Restore vertical alignment lost by clang-formatNick Kledzik2013-12-201-12/+12
| | | | llvm-svn: 197834
* Run clang-format on r197727.Rui Ueyama2013-12-2012-220/+195
| | | | llvm-svn: 197788
* [lld] Introduce registry and Reference kind tupleNick Kledzik2013-12-1912-355/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud