OSDN Git Service

Re-commit r238838, r238844 with fix for host/target endian mismatch and windows buildbot.
authorDaniel Sanders <daniel.sanders@imgtec.com>
Wed, 3 Jun 2015 10:27:28 +0000 (10:27 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Wed, 3 Jun 2015 10:27:28 +0000 (10:27 +0000)
commit682b194cd6ea55891caa17ae4b8fafe809453d11
tree34d8fe9e3bd9d8e1ca3657c1d1218573d1ab2d6b
parentaa17b5dd2d63a28604cac8a03dc639b38ef8e606
Re-commit r238838, r238844 with fix for host/target endian mismatch and windows buildbot.

The windows buildbot originally failed because the check expressions are
evaluated as 64-bit values, even for 32-bit symbols. Fixed this by comparing
bottom 32-bits of the expressions.

The host/target endian mismatch issue is that it's invalid to read/write target
values using a host pointer without taking care of endian differences between
the target and host. Most (if not all) instances of
reinterpret_cast<uint32_t*>() in the RuntimeDyld are examples of this bug.
This has been fixed for Mips using the endian aware read/write functions.

The original commits were:
r238838:
[mips] Add RuntimeDyld tests for currently supported O32 relocations.

Reviewers: petarj, vkalintiris

Reviewed By: vkalintiris

Subscribers: vkalintiris, llvm-commits

Differential Revision: http://reviews.llvm.org/D10126

r238844:
[mips][mcjit] Add support for R_MIPS_PC32.

Summary:
This allows us to resolve relocations for DW_EH_PE_pcrel TType encodings
in the exception handling LSDA.

Also fixed a nearby typo.

Reviewers: petarj, vkalintiris

Reviewed By: vkalintiris

Subscribers: vkalintiris, llvm-commits

Differential Revision: http://reviews.llvm.org/D10127

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238915 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
test/ExecutionEngine/RuntimeDyld/Mips/ELF_O32_PIC_relocations.s [new file with mode: 0644]