switch (Kind) {
default:
- Ctx.reportError(Fixup.getLoc(), "bad relocation fixup type");
return 0;
case FK_Data_1:
case FK_Data_2:
if (IsPCRel) {
switch (Fixup.getTargetKind()) {
default:
- Ctx.reportError(Fixup.getLoc(), "unsupported relocation on symbol");
+ Ctx.reportError(Fixup.getLoc(), "unsupported relocation type");
return ELF::R_ARM_NONE;
case FK_Data_4:
switch (Modifier) {
}
switch (Kind) {
default:
- Ctx.reportError(Fixup.getLoc(), "unsupported relocation on symbol");
+ Ctx.reportError(Fixup.getLoc(), "unsupported relocation type");
return ELF::R_ARM_NONE;
case FK_Data_1:
switch (Modifier) {
return true;
case FK_Data_8:
Log2Size = llvm::Log2_32(8);
- return true;
+ return false;
// These fixups are expected to always be resolvable at assembly time and
// have no relocations supported.
// relocation type for the fixup kind. This happens when it's a fixup that's
// expected to always be resolvable at assembly time and not have any
// relocations needed.
- Asm.getContext().reportError(Fixup.getLoc(),
- "unsupported relocation on symbol");
+ Asm.getContext().reportError(Fixup.getLoc(), "unsupported relocation type");
return;
}
// CHECK-NEXT: strb r0, [r1, #1024]
.ifdef ERR
str r0, [r1, 1b]
-// ERR:[[#@LINE-1]]:5: error: unsupported relocation on symbol
+// ERR:[[#@LINE-1]]:5: error: unsupported relocation type
.endif
-@ RUN: not llvm-mc -triple arm-arm-none-eabi -filetype obj < %s -o /dev/null 2>&1 | FileCheck %s
+@ RUN: not llvm-mc -triple=arm -filetype=obj %s -o /dev/null 2>&1 | FileCheck %s --implicit-check-not=error:
+@ RUN: not llvm-mc -triple=arm-apple-darwin -filetype=obj %s -o /dev/null 2>&1 | FileCheck %s --implicit-check-not=error:
.align 3
symbol:
- .quad(symbol)
-
-@ CHECK: error: unsupported relocation on symbol
-@ CHECK-NEXT: .quad(symbol)
-@ CHECK-NEXT: ^
+@ CHECK: :[[#@LINE+1]]:6: error: unsupported relocation type
+.quad(symbol)
+@ CHECK: :[[#@LINE+1]]:8: error: unsupported relocation type
+.8byte symbol
.equ sym0, 0x01abcdef
.L2:
mov r0, .L2
-@ CHECK: error: unsupported relocation on symbol
+@ CHECK: :[[#@LINE-1]]:5: error: unsupported relocation type
.global func1
_func1:
adr r0, _func2
-@ CHECK-ERROR: unsupported relocation on symbol
+@ CHECK-ERROR: :[[#@LINE-1]]:9: error: unsupported relocation type
.global func1
_func1:
-@ CHECK-ERROR: :[[#@LINE+1]]:9: error: unsupported relocation on symbol
+@ CHECK-ERROR: :[[#@LINE+1]]:9: error: unsupported relocation type
bne _func2
@ CHECK-ELF: f47f affe bne.w {{.+}} @ imm = #-4
@ There is no MachO relocation for Thumb1's unconditional branch, so
@ this is unrepresentable. FIXME: I think ELF could represent this.
b _func2
-
-@ CHECK-ERROR: unsupported relocation on symbol
+@ CHECK-ERROR: :[[#@LINE-1]]:9: error: unsupported relocation type
@ CHECK-MACHO: f7ff bffe b.w {{.+}} @ imm = #-4
@ CHECK-MACHO-NEXT: ARM_THUMB_RELOC_BR22
.global func1
_func1:
-@ CHECK-ERROR: :[[#@LINE+1]]:9: error: unsupported relocation on symbol
+@ CHECK-ERROR: :[[#@LINE+1]]:9: error: unsupported relocation type
ldr r0, _func2