mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Parse and create GOT_PREL relocations.
llvm-svn: 207526
This commit is contained in:
parent
abb97916be
commit
2978bd4236
@ -285,6 +285,8 @@ MCSymbolRefExpr::getVariantKindForName(StringRef Name) {
|
||||
.Case("gotoff", VK_GOTOFF)
|
||||
.Case("GOTPCREL", VK_GOTPCREL)
|
||||
.Case("gotpcrel", VK_GOTPCREL)
|
||||
.Case("GOT_PREL", VK_GOTPCREL)
|
||||
.Case("got_prel", VK_GOTPCREL)
|
||||
.Case("GOTTPOFF", VK_GOTTPOFF)
|
||||
.Case("gottpoff", VK_GOTTPOFF)
|
||||
.Case("INDNTPOFF", VK_INDNTPOFF)
|
||||
|
@ -91,6 +91,9 @@ unsigned ARMELFObjectWriter::GetRelocTypeInner(const MCValue &Target,
|
||||
case MCSymbolRefExpr::VK_GOTTPOFF:
|
||||
Type = ELF::R_ARM_TLS_IE32;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_GOTPCREL:
|
||||
Type = ELF::R_ARM_GOT_PREL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ARM::fixup_arm_blx:
|
||||
@ -167,6 +170,9 @@ unsigned ARMELFObjectWriter::GetRelocTypeInner(const MCValue &Target,
|
||||
case MCSymbolRefExpr::VK_GOTOFF:
|
||||
Type = ELF::R_ARM_GOTOFF32;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_GOTPCREL:
|
||||
Type = ELF::R_ARM_GOT_PREL;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_ARM_TARGET1:
|
||||
Type = ELF::R_ARM_TARGET1;
|
||||
break;
|
||||
|
@ -2,6 +2,7 @@
|
||||
@ RUN: llvm-mc < %s -triple thumbv7-none-linux-gnueabi -filetype=obj | llvm-objdump -triple thumbv7-none-linux-gnueabi -r - | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB
|
||||
|
||||
@ CHECK-LABEL: RELOCATION RECORDS FOR [.rel.text]
|
||||
.Lsym:
|
||||
|
||||
@ empty
|
||||
.word f00
|
||||
@ -83,3 +84,8 @@ bl f05(plt)
|
||||
@ CHECK: 60 R_ARM_TLS_GOTDESC f24
|
||||
@ CHECK: 64 R_ARM_TLS_GOTDESC f25
|
||||
|
||||
@ got_prel
|
||||
.word f26(GOT_PREL) + (. - .Lsym)
|
||||
ldr r3, =f27(GOT_PREL)
|
||||
@ CHECK: 68 R_ARM_GOT_PREL f26
|
||||
@ CHECK: 70 R_ARM_GOT_PREL f27
|
||||
|
Loading…
Reference in New Issue
Block a user