Index: ELF/Target.cpp =================================================================== --- ELF/Target.cpp +++ ELF/Target.cpp @@ -2028,7 +2028,18 @@ if (ELFT::Is64Bits || Config->MipsN32Abi) Type &= 0xff; switch (Type) { - default: + case R_MIPS_32: + case R_MIPS_64: + case R_MIPS_SUB: + // FIXME: are all these really R_ABS and not R_TLS*? + case R_MIPS_TLS_DTPREL64: + case R_MIPS_TLS_DTPREL32: + case R_MIPS_TLS_DTPREL_HI16: + case R_MIPS_TLS_DTPREL_LO16: + case R_MIPS_TLS_TPREL64: + case R_MIPS_TLS_TPREL32: + case R_MIPS_TLS_TPREL_HI16: + case R_MIPS_TLS_TPREL_LO16: return R_ABS; case R_MIPS_JALR: return R_HINT; @@ -2037,6 +2048,8 @@ return R_MIPS_GOTREL; case R_MIPS_26: return R_PLT; + case R_MIPS_HIGHEST: + case R_MIPS_HIGHER: case R_MIPS_HI16: case R_MIPS_LO16: case R_MIPS_GOT_OFST: @@ -2074,6 +2087,10 @@ return R_MIPS_TLSGD; case R_MIPS_TLS_LDM: return R_MIPS_TLSLD; + default: + error("do not know how to handle relocation '" + toString(Type) + "' (" + + Twine(Type) + ")"); + return R_HINT; } } @@ -2355,7 +2372,7 @@ applyMipsPcReloc(Loc, Type, Val); break; default: - error(getErrorLocation(Loc) + "unrecognized reloc " + Twine(Type)); + llvm_unreachable("unexpected relocation"); } }