[mips] Use pristine object file while processing relocations.
authorAkira Hatanaka <ahatanaka@mips.com>
Wed, 24 Jul 2013 01:58:40 +0000 (01:58 +0000)
committerAkira Hatanaka <ahatanaka@mips.com>
Wed, 24 Jul 2013 01:58:40 +0000 (01:58 +0000)
commit3af1c9d3343357849f19f7467f9c16220ad37ca4
tree6b480c5a91cc4fc181d4a7b7b2031788cad64ddf
parente6f774e7ef1a11af39a6565465355db905f59d81
[mips] Use pristine object file while processing relocations.

    Similar to ARM change r182800, dynamic linker will read bits/addends from
    the original object rather than from the object that might have been patched
    previously. For the purpose of relocations for MCJIT stubs on MIPS, we
    internally use otherwise unused MIPS relocations.

    The change also enables MCJIT unit tests for MIPS (EL/BE), and the following
    two tests now pass:

    - MCJITTest.return_global and
    - MCJITTest.multiple_functions.

    These issues have been tracked as Bug 16250.

    Patch by Petar Jovanovic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187019 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/ELF.h
include/llvm/Support/ELF.h
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
unittests/ExecutionEngine/MCJIT/MCJITTestBase.h