| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch MCDisassembler::getInstruction takes an ArrayRef<uint8_t>
instead of a MemoryObject.
Even on X86 there is a maximum size an instruction can have. Given
that, it seems way simpler and more efficient to just pass an ArrayRef
to the disassembler instead of a MemoryObject and have it do a virtual
call every time it wants some extra bytes.
llvm-svn: 221751
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mips stub functions, and ARM target in general)
Summary:
Fixed all of the missing endian conversions that Lang Hames and I identified in
RuntimeDyldMachOARM.h.
Fixed the opcode emission in RuntimeDyldImpl::createStubFunction() for AArch64,
ARM, Mips when the host endian doesn't match the target endian.
PowerPC will need changing if it's opcodes are affected by endianness but I've
left this for now since I'm unsure if this is the case and it's the only path
that specifies the target endian.
This patch fixes MachO_ARM_PIC_relocations.s on a big-endian Mips host. This
is the last of the known issues on this host.
Reviewers: lhames
Reviewed By: lhames
Subscribers: aemerson, llvm-commits
Differential Revision: http://reviews.llvm.org/D6130
llvm-svn: 221446
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This fixes MachO_i386_eh_frame.s on a big-endian Mips host.
Reviewers: lhames
Reviewed By: lhames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6019
llvm-svn: 221047
|
|
|
|
|
|
|
|
|
|
| |
On AArch64, GOT references are page relative (ADRP + LDR), so they can't be
applied until we know exactly where, within a page, the GOT entry will be in
the target address space.
Fixes <rdar://problem/18693976>.
llvm-svn: 220347
|
|
|
|
|
|
| |
(See e.g. http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/17653)
llvm-svn: 220249
|
|
|
|
|
|
|
|
| |
symbol table.
Patch by Anthony Pesch. Thanks Anthony!
llvm-svn: 220245
|
|
|
|
|
|
|
| |
This should fix the failures of the MachO_i386_DynNoPIC_relocations.s test case
on MIPS hosts.
llvm-svn: 219543
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two methods in SectionRef that can fail:
* getName: The index into the string table can be invalid.
* getContents: The section might point to invalid contents.
Every other method will always succeed and returning and std::error_code just
complicates the code. For example, a section can have an invalid alignment,
but if we are able to get to the section structure at all and create a
SectionRef, we will always be able to read that invalid alignment.
llvm-svn: 219314
|
|
|
|
| |
llvm-svn: 219312
|
|
|
|
| |
llvm-svn: 218836
|
|
|
|
| |
llvm-svn: 218328
|
|
|
|
|
|
| |
constructor and destructor.
llvm-svn: 218154
|
|
|
|
|
|
|
| |
The mismatched mask (7 vs (ColsPerRow-1)) could lead to partial lines being
printed out of place.
llvm-svn: 218061
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A "stub found found" diagnostic is emitted when RuntimeDyldChecker's stub lookup
logic fails to find the requested stub. The obvious reason for the failure is
that no such stub has been created, but it can also fail for internal symbols if
the symbol offset is not computed correctly (E.g. due to a mangled relocation
addend). This patch adds a comment about the latter case so that it's not
overlooked.
Inspired by confusion experienced during test case construction for r217635.
llvm-svn: 217643
|
|
|
|
|
|
| |
Fixes <rdar://problem/18297804>.
llvm-svn: 217620
|
|
|
|
|
|
|
|
| |
and BR24 relocations.
<rdar://problem/18296496>
llvm-svn: 217605
|
|
|
|
| |
llvm-svn: 217470
|
|
|
|
|
|
| |
r217328.
llvm-svn: 217329
|
|
|
|
|
|
|
|
|
|
| |
field of RelocationValueRef, rather than the 'Addend' field.
This is consistent with RuntimeDyldELF's use of RelocationValueRef, and more
consistent with the semantics of the data being stored (the offset from the
start of a section or symbol).
llvm-svn: 217328
|
|
|
|
|
|
|
|
|
| |
The previous implementation was writing to the high-bytes of integers on BE
targets (when run on LE hosts).
http://llvm.org/PR20640
llvm-svn: 217325
|
|
|
|
| |
llvm-svn: 217263
|
|
|
|
| |
llvm-svn: 217180
|
|
|
|
|
|
|
| |
If the wrong pointer type is used it can cause corruption of the frame
description entries.
llvm-svn: 217124
|
|
|
|
|
|
|
|
|
| |
sections.
This allows fine-grained control of the memory layout of hypothetical target
processes for testing purposes.
llvm-svn: 217122
|
|
|
|
|
|
|
|
|
|
| |
I'm not sure this is a particularly helpful API (to pass ownership and
then return it unconditionally) rather than just pass the underlying
object by non-const reference, but this was the original API so I'll
just make it more safe/stable and anyone else is free to adjust that at
their whim, of course.
llvm-svn: 217081
|
|
|
|
| |
llvm-svn: 217065
|
|
|
|
|
|
| |
No functionality change. Changes made by clang-tidy + some manual cleanup.
llvm-svn: 217028
|
|
|
|
|
|
|
|
| |
left out of r217010).
Also remove a crufty debugging output statement that was accidentally left in.
llvm-svn: 217011
|
|
|
|
|
|
|
|
|
|
| |
The syntax of the new builtin is 'section_addr(<filename>, <section-name>)'
(similar to the stub_addr builtin, but without a symbol name). It returns the
base address of the given section in the given object file. This builtin makes
it possible to refer to the contents of sections that cannot contain symbols,
e.g. sections added by the linker itself, like __eh_frame.
llvm-svn: 217010
|
|
|
|
|
|
|
|
|
| |
RuntimeDyldImpl.
These are platform independent, and moving them to the base class allows
RuntimeDyldChecker to use them too.
llvm-svn: 216801
|
|
|
|
|
|
| |
More work on http://llvm.org/PR20640
llvm-svn: 216648
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Introduce support::ulittleX_t::ref type to Support/Endian.h and use it in x86 JIT
to enforce correct endianness and fix unaligned accesses.
Test Plan: regression test suite
Reviewers: lhames
Subscribers: ributzka, llvm-commits
Differential Revision: http://reviews.llvm.org/D5011
llvm-svn: 216631
|
|
|
|
| |
llvm-svn: 216568
|
|
|
|
|
|
| |
http://llvm.org/PR20640
llvm-svn: 216567
|
|
|
|
| |
llvm-svn: 216458
|
|
|
|
|
|
|
|
| |
The expressions 'Reloc.Addend - Addend' and 'Reloc.Offset' should always be
equal in this context. The latter is prefered - we want to remove the
RelocationValueRef::Addend field in the future.
llvm-svn: 216418
|
|
|
|
|
|
| |
Also switch section memory dump format from 8 to 16 columns.
llvm-svn: 216413
|
|
|
|
| |
llvm-svn: 216400
|
|
|
|
| |
llvm-svn: 216017
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Owning the buffer is somewhat inflexible. Some Binaries have sub Binaries
(like Archive) and we had to create dummy buffers just to handle that. It is
also a bad fit for IRObjectFile where the Module wants to own the buffer too.
Keeping this ownership would make supporting IR inside native objects
particularly painful.
This patch focuses in lib/Object. If something elsewhere used to own an Binary,
now it also owns a MemoryBuffer.
This patch introduces a few new types.
* MemoryBufferRef. This is just a pair of StringRefs for the data and name.
This is to MemoryBuffer as StringRef is to std::string.
* OwningBinary. A combination of Binary and a MemoryBuffer. This is needed
for convenience functions that take a filename and return both the
buffer and the Binary using that buffer.
The C api now uses OwningBinary to avoid any change in semantics. I will start
a new thread to see if we want to change it and how.
llvm-svn: 216002
|
|
|
|
|
|
| |
This patch may address some of the issues described in http://llvm.org/PR20640.
llvm-svn: 215938
|
|
|
|
|
|
| |
Thanks to David Blaikie for the suggestion.
llvm-svn: 215867
|
|
|
|
|
|
|
|
|
|
| |
Add header guards to files that were missing guards. Remove #endif comments
as they don't seem common in LLVM (we can easily add them back if we decide
they're useful)
Changes made by clang-tidy with minor tweaks.
llvm-svn: 215558
|
|
|
|
|
|
|
|
|
|
|
| |
Cleanup only: no functional change.
This patch makes RuntimeDyldMachO targets directly responsible for decoding
immediates, rather than letting them implement catch a callback from generic
code. Since this is a very target specific operation, it makes sense to let the
target-specific code drive it.
llvm-svn: 215255
|
|
|
|
|
|
|
|
|
|
| |
C-style casts (and reinterpret_casts) result in implementation defined
values when a pointer is cast to a larger integer type. On some platforms
this was leading to bogus address computations in RuntimeDyldMachOAArch64.
This should fix http://llvm.org/PR20501.
llvm-svn: 215143
|
|
|
|
|
|
|
| |
This should fix the MachO_ARM_PIC_relocations.s test failures on some 32-bit
testers.
llvm-svn: 214613
|
|
|
|
| |
llvm-svn: 214377
|
|
|
|
|
|
|
|
|
|
| |
We now (1) correctly decode the branch immediate, (2) modify the immediate to
corretly treat it as PC-rel, and (3) properly populate the stub entry.
Previously we had been doing each of these wrong.
<rdar://problem/17750739>
llvm-svn: 214285
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
use in -verify mode.
This patch adds three hidden command line options to llvm-rtdyld:
-target-addr-start <start-addr> : Specify the start of the virtual address
space on the phony target.
-target-addr-end <end-addr> : Specify the end of the virtual address space
on the phony target.
-target-section-sep <sep> : Specify the separation (in bytes) between the
end of one section and the start of the next.
These options automatically default to sane values for the target platform. In
particular, they allow narrow (e.g. 32-bit, 16-bit) targets to be tested from
wider (e.g. 64-bit, 32-bit) hosts without overflowing pointers.
The section separation option defaults to zero, but can be set to a large number
(e.g. 1 << 32) to force large separations between sections in order to
stress-test large-code-model code.
llvm-svn: 214255
|
|
|
|
|
|
| |
RuntimeDyldChecker.
llvm-svn: 214227
|