diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2013-07-24 01:58:40 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2013-07-24 01:58:40 +0000 |
commit | 3af1c9d3343357849f19f7467f9c16220ad37ca4 (patch) | |
tree | 6b480c5a91cc4fc181d4a7b7b2031788cad64ddf /include/llvm | |
parent | e6f774e7ef1a11af39a6565465355db905f59d81 (diff) | |
download | external_llvm-3af1c9d3343357849f19f7467f9c16220ad37ca4.zip external_llvm-3af1c9d3343357849f19f7467f9c16220ad37ca4.tar.gz external_llvm-3af1c9d3343357849f19f7467f9c16220ad37ca4.tar.bz2 |
[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
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Object/ELF.h | 2 | ||||
-rw-r--r-- | include/llvm/Support/ELF.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Object/ELF.h b/include/llvm/Object/ELF.h index c5c18a0..a14d168 100644 --- a/include/llvm/Object/ELF.h +++ b/include/llvm/Object/ELF.h @@ -1666,6 +1666,8 @@ StringRef ELFObjectFile<ELFT>::getRelocationTypeName(uint32_t Type) const { LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_MIPS_PC16); LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_MIPS_CALL16); LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_MIPS_GPREL32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_MIPS_UNUSED1); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_MIPS_UNUSED2); LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_MIPS_SHIFT5); LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_MIPS_SHIFT6); LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_MIPS_64); diff --git a/include/llvm/Support/ELF.h b/include/llvm/Support/ELF.h index d53ebdb..c327240 100644 --- a/include/llvm/Support/ELF.h +++ b/include/llvm/Support/ELF.h @@ -868,6 +868,8 @@ enum { R_MIPS_PC16 = 10, R_MIPS_CALL16 = 11, R_MIPS_GPREL32 = 12, + R_MIPS_UNUSED1 = 13, + R_MIPS_UNUSED2 = 14, R_MIPS_SHIFT5 = 16, R_MIPS_SHIFT6 = 17, R_MIPS_64 = 18, |