[ELF][MIPS] Enumerate absolute MIPS relocations in the isRelRelative
This commit does two related thing. At first, it enumerates supported absolute MIPS relocations in the `MipsTargetInfo<ELFT>::isRelRelative` method. In that case the code is shorter and the case switch does not tend to grow. At second, it prevents R_MIPS_COPY and PLT creation for relative relocations. For almost all relative MIPS relocations like R_MIPS_PC19_S2, R_MIPS_PCHI16 etc it does not have a sence. The only exception is R_MIPS_PC32. GNU linker creates a copy relocation or PLT entry for it. But I could not find any real test case uses R_MIPS_PC32 with DSO defined symbol as a target. So for now I prefer to skip this case to simplify the LLD code. llvm-svn: 261822
Loading
Please sign in to comment