Rui Ueyama
25b87a4b5b
Remove include/lld/Core/Endian.h and use llvm/Support/Endian.h instead.
...
llvm-svn: 231005
2015-03-02 20:31:43 +00:00
Rui Ueyama
e088a0f989
Use read{le,be}{16,32}. NFC.
...
llvm-svn: 230728
2015-02-27 04:21:40 +00:00
Simon Atanasyan
55c2699d29
Follow-up to r221913. Fix some -Wcast-qual warning reasons.
...
llvm-svn: 221974
2014-11-14 07:15:43 +00:00
Tim Northover
cadb77a43e
[mach-o] explicitly cast little_n uses to ints to silence MSVC
...
Hopefully this'll fix the build failure in the bot.
llvm-svn: 221007
2014-10-31 22:12:20 +00:00
Tim Northover
40d3ad3319
TMP: fix readN & writeN to not encourage UB
...
llvm-svn: 220730
2014-10-27 22:48:35 +00:00
Artyom Skrobov
7a86a548b9
swapStruct extracted into include/llvm/Support/MachO.h (no functional change)
...
llvm-svn: 213362
2014-07-18 09:28:10 +00:00
Nick Kledzik
2458bec7e7
[mach-o] refactor KindHandler into ArchHandler and simplify passes.
...
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
2014-07-16 19:49:02 +00:00
Nick Kledzik
de0860aae4
[mach-o] add parsing of x86 relocations
...
llvm-svn: 212239
2014-07-02 23:52:22 +00:00
Artyom Skrobov
f8874b0a05
Using llvm::sys::swapByteOrder() for the common case of byte-swapping a value in place
...
llvm-svn: 210979
2014-06-14 13:26:14 +00:00
Artyom Skrobov
9b3f647bf3
llvm::sys::SwapByteOrder() renamed to llvm::sys::getSwappedBytes()
...
Further to this, llvm::sys::swapByteOrder() will be added, acting in-place
llvm-svn: 210974
2014-06-14 12:14:25 +00:00
Rafael Espindola
54427ccef3
include system_error directly.
...
llvm-svn: 210801
2014-06-12 17:15:58 +00:00
Rafael Espindola
1675d51eac
Run llvm/utils/sort_includes.py in a few files.
...
This will reduce the noise in a followup patch.
llvm-svn: 210800
2014-06-12 17:12:28 +00:00
Nick Kledzik
ec140834d4
[mach-o] refactor mach-o output section selection to be table driven.
...
In -r mode the sections use the table used to parse .o files. Otherwise
use final exectuable table. No functionality change.
llvm-svn: 210506
2014-06-10 01:50:00 +00:00
Shankar Easwaran
3d8de47f76
Fix trailing whitespace.
...
llvm-svn: 200182
2014-01-27 03:09:26 +00:00
Rui Ueyama
014192dbda
Fix include guards.
...
llvm-svn: 194776
2013-11-15 03:09:26 +00:00
Nick Kledzik
e34182f396
[mach-o] binary reader and writer
...
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
2013-11-06 21:36:55 +00:00