[Thumb1] Add relocations for fixups fixup_arm_thumb_{br,bcc}

These need to be mapped through to R_ARM_THM_JUMP{11,8} respectively.

Fixes PR30279.

llvm-svn: 280651
diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp
index fa468ea..6f19754 100644
--- a/llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp
+++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp
@@ -140,6 +140,12 @@
     case ARM::fixup_t2_movw_lo16:
       Type = ELF::R_ARM_THM_MOVW_PREL_NC;
       break;
+    case ARM::fixup_arm_thumb_br:
+      Type = ELF::R_ARM_THM_JUMP11;
+      break;
+    case ARM::fixup_arm_thumb_bcc:
+      Type = ELF::R_ARM_THM_JUMP8;
+      break;
     case ARM::fixup_arm_thumb_bl:
     case ARM::fixup_arm_thumb_blx:
       switch (Modifier) {
diff --git a/llvm/test/MC/ARM/thumb1-branch-reloc.s b/llvm/test/MC/ARM/thumb1-branch-reloc.s
new file mode 100644
index 0000000..c599389
--- /dev/null
+++ b/llvm/test/MC/ARM/thumb1-branch-reloc.s
@@ -0,0 +1,21 @@
+@ RUN: llvm-mc -triple thumbv6-eabi -filetype obj -o - %s | llvm-readobj -r - \
+@ RUN:     | FileCheck %s
+
+        .syntax unified
+
+        .extern h
+        .section .text.uncond
+
+        b h
+        
+@CHECK: Section {{.*}} .rel.text.uncond {
+@CHECK:   0x0 R_ARM_THM_JUMP11
+@CHECK: }
+        .section .text.cond
+
+        ble h
+
+@CHECK: Section {{.*}} .rel.text.cond {
+@CHECK:   0x0 R_ARM_THM_JUMP8
+@CHECK: }
+        
\ No newline at end of file