[PATCH] D34447: [ARM] Create relocations for beq.w branches to ARM function syms.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 22 08:33:24 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL306009: [ARM] Create relocations for beq.w branches to ARM function syms. (authored by fhahn).
Changed prior to commit:
https://reviews.llvm.org/D34447?vs=103367&id=103581#toc
Repository:
rL LLVM
https://reviews.llvm.org/D34447
Files:
llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
llvm/trunk/test/MC/ARM/thumb2-beq-fixup.s
Index: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
===================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
@@ -759,6 +759,7 @@
IsResolved = false;
if (!Asm.isThumbFunc(Sym) && (FixupKind == ARM::fixup_arm_thumb_br ||
FixupKind == ARM::fixup_arm_thumb_bl ||
+ FixupKind == ARM::fixup_t2_condbranch ||
FixupKind == ARM::fixup_t2_uncondbranch))
IsResolved = false;
}
Index: llvm/trunk/test/MC/ARM/thumb2-beq-fixup.s
===================================================================
--- llvm/trunk/test/MC/ARM/thumb2-beq-fixup.s
+++ llvm/trunk/test/MC/ARM/thumb2-beq-fixup.s
@@ -0,0 +1,39 @@
+@ RUN: llvm-mc < %s -triple armv7-linux-gnueabi -filetype=obj -o - \
+@ RUN: | llvm-readobj -r | FileCheck %s
+
+ .code 16
+ .thumb_func
+thumb_caller:
+ beq.w internal_arm_fn
+ beq.w global_arm_fn
+ beq.w global_thumb_fn
+ beq.w internal_thumb_fn
+
+ .type internal_arm_fn,%function
+ .code 32
+internal_arm_fn:
+ bx lr
+
+ .globl global_arm_fn
+ .type global_arm_fn,%function
+ .code 32
+global_arm_fn:
+ bx lr
+
+ .type internal_thumb_fn,%function
+ .code 16
+ .thumb_func
+internal_thumb_fn:
+ bx lr
+
+ .globl global_thumb_fn
+ .type global_thumb_fn,%function
+ .code 16
+ .thumb_func
+global_thumb_fn:
+ bx lr
+
+@ CHECK: Section (3) .rel.text
+@ CHECK-NEXT: 0x0 R_ARM_THM_JUMP19 internal_arm_fn 0x0
+@ CHECK-NEXT: 0x4 R_ARM_THM_JUMP19 global_arm_fn 0x0
+@ CHECK-NEXT: }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34447.103581.patch
Type: text/x-patch
Size: 1693 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170622/0fc4d46f/attachment.bin>
More information about the llvm-commits
mailing list