[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / relocation-none-arm.s
bloba3ebc3189b34eed365986b8e8d16ee4731a154d0
1 # REQUIRES: arm
3 # RUN: llvm-mc -filetype=obj -triple=armv7-linux-musl %s -o %t.o
4 # RUN: ld.lld --gc-sections %t.o -o %t
5 # RUN: llvm-readelf -S -r %t | FileCheck %s
7 # Test that we discard R_ARM_NONE, but respect the references it creates among
8 # sections.
10 # CHECK: .data
11 # CHECK: There are no relocations in this file.
13 # RUN: ld.lld -r %t.o -o %t
14 # RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
16 # RELOC: Section ({{.*}}) .rel.text {
17 # RELOC-NEXT: 0x0 R_ARM_NONE .data
18 # RELOC-NEXT: }
20 .globl _start
21 _start:
22 nop
23 .reloc 0, R_ARM_NONE, .data
25 .data
26 .long 0