Index: test/ELF/arm-thumb-undefined-weak-narrow.s =================================================================== --- /dev/null +++ test/ELF/arm-thumb-undefined-weak-narrow.s @@ -0,0 +1,19 @@ +// REQUIRES: arm +// RUN: ld.lld %S/Inputs/arm-thumb-narrow-undefined-weak.o -o %t +// RUN: llvm-objdump -triple=thumbv7a-linux-gnueabi -d %t | FileCheck %s + +// CHECK: Disassembly of section .text: +// CHECK-NEXT: __start: +// CHECK-NEXT: 11000: ff e7 b #-2 + +// llvm-mc relaxes the b.n to a b.w as undefined_weak is external to the +// section so we must use a binary object produced by GNU as using the +// following assembly + +// .thumb +// .syntax unified +// +// .weak undefined_weak +// .globl _start +// .type _start, %function +// __start: b.n undefine_weak