[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / arm-thumb-no-undefined-thunk.s
blobc84c16ec6904177bf3f99c61f521ae35fd92e7de
1 // REQUIRES: arm
2 // RUN: llvm-mc -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
3 // RUN: ld.lld %t -o %t2
4 // RUN: llvm-objdump --triple=thumbv7a-none-linux-gnueabi -d %t2 | FileCheck %s
6 // Check that no thunks are created for an undefined weak symbol
7 .syntax unified
9 .weak target
11 .section .text.thumb, "ax", %progbits
12 .thumb
13 .global
14 _start:
15 bl target
16 b target
17 b.w target
19 // CHECK: Disassembly of section .text:
20 // CHECK-EMPTY:
21 // CHECK-NEXT: <_start>:
22 // 0x200b8 = next instruction
23 // CHECK: 200b4: {{.*}} bl 0x200b8 <_start+0x4> @ imm = #0
24 // CHECK-NEXT: 200b8: {{.*}} b.w 0x200bc <_start+0x8> @ imm = #0
25 // CHECK-NEXT: 200bc: {{.*}} b.w 0x200c0 <_start+0xc> @ imm = #0