mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
ARM: add support for R_ARM_ABS16
Add support for R_ARM_ABS16 relocation mapping. Addresses PR22156. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225510 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
466a7dea9b
commit
c2a1df7125
@ -156,6 +156,14 @@ unsigned ARMELFObjectWriter::GetRelocTypeInner(const MCValue &Target,
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case FK_Data_2:
|
||||
switch (Modifier) {
|
||||
default: llvm_unreachable("unsupported modifier");
|
||||
case MCSymbolRefExpr::VK_None:
|
||||
Type = ELF::R_ARM_ABS16;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case FK_Data_4:
|
||||
switch (Modifier) {
|
||||
default: llvm_unreachable("Unsupported Modifier");
|
||||
|
13
test/MC/ARM/reloc-abs16.s
Normal file
13
test/MC/ARM/reloc-abs16.s
Normal file
@ -0,0 +1,13 @@
|
||||
@ RUN: llvm-mc -triple armv7-eabi -filetype obj -o - %s | llvm-objdump -r - \
|
||||
@ RUN: | FileCheck %s
|
||||
@ RUN: llvm-mc -triple thumbv7-eabi -filetype obj -o - %s | llvm-objdump -r - \
|
||||
@ RUN: | FileCheck %s
|
||||
|
||||
.syntax unified
|
||||
|
||||
.short abs16_0 -32768
|
||||
.short abs16_1 +65535
|
||||
|
||||
@ CHECK: 0 R_ARM_ABS16 abs16_0
|
||||
@ CHECK: 2 R_ARM_ABS16 abs16_1
|
||||
|
Loading…
Reference in New Issue
Block a user