summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* MachO: Change getString16() back to inline functionTom Stellard2018-09-071-1/+1
| | | | | | This was accidentally changed in r341670. llvm-svn: 341672
* MachO: Fix out-of-bounds memory access in getString16Tom Stellard2018-09-071-6/+5
| | | | | | | | | | | | | | | | | | Summary: This fixes the following tests when gcc is compiled with gcc8: lld :: mach-o/do-not-emit-unwind-fde-arm64.yaml lld :: mach-o/eh-frame-relocs-arm64.yaml llvm.org/PR38096 Reviewers: lhames, kledzik, javed.absar Subscribers: kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D51547 llvm-svn: 341670
* Move new lld's code to Common subdirectory.Rui Ueyama2017-10-021-1/+1
| | | | | | | | | | New lld's files are spread under lib subdirectory, and it isn't easy to find which files are actually maintained. This patch moves maintained files to Common subdirectory. Differential Revision: https://reviews.llvm.org/D37645 llvm-svn: 314719
* Move Object format code to lib/BinaryFormat.Zachary Turner2017-06-071-1/+1
| | | | | | | | | | | | This creates a new library called BinaryFormat that has all of the headers from llvm/Support containing structure and layout definitions for various types of binary formats like dwarf, coff, elf, etc as well as the code for identifying a file from its magic. Differential Revision: https://reviews.llvm.org/D33843 llvm-svn: 304864
* Retire llvm::alignOf in favor of C++11 alignof.Benjamin Kramer2016-10-201-6/+3
| | | | | | No functionality change intended. llvm-svn: 284734
* Generate LC_FUNCTION_STARTS load command.Pete Cooper2016-02-091-0/+41
| | | | | | | | | | | | | | This load command generates data in the LINKEDIT section which is a list of ULEB128 delta's to all of the functions in the __text section. It is then 0 terminated and pointer aligned to pad. ld64 exposes the -function-starts and no-function-starts cmdline options to override behaviour from the defaults based on file types. rdar://problem/24472630 llvm-svn: 260188
* Move includes inside guards. NFC.Pete Cooper2016-02-081-3/+2
| | | | | | | These includes were before the #ifndef/#define guards. Moving them to where they should be. llvm-svn: 260153
* Don't emit relocs for the __eh_frame section as they can be implicit.Pete Cooper2016-01-071-1/+2
| | | | | | | | | | | | | | The __eh_frame section contains relocations which can always be implicitly generated. This patch tracks whether sections have only implicitly relocations and skips emitting them to the object file if that is the case. The test case here ensures that this is the case for __eh_frame sections. Reviewed by Lang Hames. http://reviews.llvm.org/D15594 llvm-svn: 257099
* Remove include/lld/Core/Endian.h and use llvm/Support/Endian.h instead.Rui Ueyama2015-03-021-1/+2
| | | | llvm-svn: 231005
* Use read{le,be}{16,32}. NFC.Rui Ueyama2015-02-271-24/+10
| | | | llvm-svn: 230728
* Follow-up to r221913. Fix some -Wcast-qual warning reasons.Simon Atanasyan2014-11-141-6/+6
| | | | llvm-svn: 221974
* [mach-o] explicitly cast little_n uses to ints to silence MSVCTim Northover2014-10-311-3/+9
| | | | | | Hopefully this'll fix the build failure in the bot. llvm-svn: 221007
* TMP: fix readN & writeN to not encourage UBTim Northover2014-10-271-17/+43
| | | | llvm-svn: 220730
* swapStruct extracted into include/llvm/Support/MachO.h (no functional change)Artyom Skrobov2014-07-181-155/+0
| | | | llvm-svn: 213362
* [mach-o] refactor KindHandler into ArchHandler and simplify passes.Nick Kledzik2014-07-161-0/+10
| | | | | | | | | | | 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
* [mach-o] add parsing of x86 relocationsNick Kledzik2014-07-021-0/+3
| | | | llvm-svn: 212239
* Using llvm::sys::swapByteOrder() for the common case of byte-swapping a ↵Artyom Skrobov2014-06-141-106/+107
| | | | | | value in place llvm-svn: 210979
* llvm::sys::SwapByteOrder() renamed to llvm::sys::getSwappedBytes()Artyom Skrobov2014-06-141-111/+111
| | | | | | Further to this, llvm::sys::swapByteOrder() will be added, acting in-place llvm-svn: 210974
* include system_error directly.Rafael Espindola2014-06-121-1/+1
| | | | llvm-svn: 210801
* Run llvm/utils/sort_includes.py in a few files.Rafael Espindola2014-06-121-2/+0
| | | | | | This will reduce the noise in a followup patch. llvm-svn: 210800
* [mach-o] refactor mach-o output section selection to be table driven.Nick Kledzik2014-06-101-0/+8
| | | | | | | In -r mode the sections use the table used to parse .o files. Otherwise use final exectuable table. No functionality change. llvm-svn: 210506
* Fix trailing whitespace.Shankar Easwaran2014-01-271-14/+14
| | | | llvm-svn: 200182
* Fix include guards.Rui Ueyama2013-11-151-3/+3
| | | | llvm-svn: 194776
* [mach-o] binary reader and writer Nick Kledzik2013-11-061-0/+293
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