[ELF][MIPS] Revert r264761 and add test case to demonstrate the problem
If we make R_MIPS_LO16 a relative relocation, linker:
- never creates R_MIPS_COPY relocation for it
- attempts to create R_MIPS_REL32 dynamic relocation if R_MIPS_LO16's
target is a preemptible symbol
Differential Revision: http://reviews.llvm.org/D18607
llvm-svn: 264956
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp
index c075c8d..09e3ee6 100644
--- a/lld/ELF/Target.cpp
+++ b/lld/ELF/Target.cpp
@@ -1844,6 +1844,7 @@
case R_MIPS_32:
case R_MIPS_64:
case R_MIPS_HI16:
+ case R_MIPS_LO16:
case R_MIPS_TLS_DTPREL_HI16:
case R_MIPS_TLS_DTPREL_LO16:
case R_MIPS_TLS_TPREL_HI16: