mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 18:34:09 +00:00
ARM: add support for R_ARM_ABS8 relocations
Add support for R_ARM_ABS8 relocation. Addresses PR22126. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225507 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c41acffe22
commit
ea4fe48b22
@ -148,6 +148,14 @@ unsigned ARMELFObjectWriter::GetRelocTypeInner(const MCValue &Target,
|
||||
} else {
|
||||
switch ((unsigned)Fixup.getKind()) {
|
||||
default: llvm_unreachable("invalid fixup kind!");
|
||||
case FK_Data_1:
|
||||
switch (Modifier) {
|
||||
default: llvm_unreachable("unsupported Modifier");
|
||||
case MCSymbolRefExpr::VK_None:
|
||||
Type = ELF::R_ARM_ABS8;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case FK_Data_4:
|
||||
switch (Modifier) {
|
||||
default: llvm_unreachable("Unsupported Modifier");
|
||||
|
10
test/MC/ARM/reloc-abs8.s
Normal file
10
test/MC/ARM/reloc-abs8.s
Normal file
@ -0,0 +1,10 @@
|
||||
@ RUN: llvm-mc -triple armv7-eabi -filetype obj -o - %s | llvm-objdump -r - \
|
||||
@ RUN: | FileCheck %s
|
||||
|
||||
.syntax unified
|
||||
|
||||
.byte abs8_0 -128
|
||||
.byte abs8_1 +255
|
||||
|
||||
@ CHECK: 0 R_ARM_ABS8 abs8_0
|
||||
@ CHECK: 1 R_ARM_ABS8 abs8_1
|
Loading…
x
Reference in New Issue
Block a user