The following code requests 64-bit PC-relative relocations unsupported
by MIPS ABI. Now it triggers an assertion. It's better to show an error
message.
```
foo:
.quad bar - foo
```
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350152
91177308-0d34-0410-b5e6-
96231b3b80d8
if (IsPCRel) {
switch (Kind) {
+ case FK_Data_8:
+ Ctx.reportError(Fixup.getLoc(),
+ "MIPS does not support 64-bit PC-relative relocations");
+ return ELF::R_MIPS_NONE;
case Mips::fixup_Mips_Branch_PCRel:
case Mips::fixup_Mips_PC16:
return ELF::R_MIPS_PC16;
# CHECK: :[[@LINE-1]]:17: error: MIPS does not support one byte relocations
.byte x+1
# CHECK: :[[@LINE-1]]:17: error: MIPS does not support one byte relocations
+ .quad x-foo
+# CHECK: :[[@LINE-1]]:17: error: MIPS does not support 64-bit PC-relative relocations