llvm.org GIT mirror llvm / edc4595
Parse and create GOT_PREL relocations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207526 91177308-0d34-0410-b5e6-96231b3b80d8 Joerg Sonnenberger 6 years ago
3 changed file(s) with 14 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
284284 .Case("gotoff", VK_GOTOFF)
285285 .Case("GOTPCREL", VK_GOTPCREL)
286286 .Case("gotpcrel", VK_GOTPCREL)
287 .Case("GOT_PREL", VK_GOTPCREL)
288 .Case("got_prel", VK_GOTPCREL)
287289 .Case("GOTTPOFF", VK_GOTTPOFF)
288290 .Case("gottpoff", VK_GOTTPOFF)
289291 .Case("INDNTPOFF", VK_INDNTPOFF)
9090 case MCSymbolRefExpr::VK_GOTTPOFF:
9191 Type = ELF::R_ARM_TLS_IE32;
9292 break;
93 case MCSymbolRefExpr::VK_GOTPCREL:
94 Type = ELF::R_ARM_GOT_PREL;
95 break;
9396 }
9497 break;
9598 case ARM::fixup_arm_blx:
165168 break;
166169 case MCSymbolRefExpr::VK_GOTOFF:
167170 Type = ELF::R_ARM_GOTOFF32;
171 break;
172 case MCSymbolRefExpr::VK_GOTPCREL:
173 Type = ELF::R_ARM_GOT_PREL;
168174 break;
169175 case MCSymbolRefExpr::VK_ARM_TARGET1:
170176 Type = ELF::R_ARM_TARGET1;
11 @ 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
22
33 @ CHECK-LABEL: RELOCATION RECORDS FOR [.rel.text]
4 .Lsym:
45
56 @ empty
67 .word f00
8283 @ CHECK: 60 R_ARM_TLS_GOTDESC f24
8384 @ CHECK: 64 R_ARM_TLS_GOTDESC f25
8485
86 @ got_prel
87 .word f26(GOT_PREL) + (. - .Lsym)
88 ldr r3, =f27(GOT_PREL)
89 @ CHECK: 68 R_ARM_GOT_PREL f26
90 @ CHECK: 70 R_ARM_GOT_PREL f27