[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / relocation-none-aarch64.s
blob7783c127cf867a6a10939c552fe1ab3fe9e61664
1 # REQUIRES: aarch64
3 # RUN: llvm-mc -filetype=obj -triple=aarch64-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_AARCH64_NONE, but respect the references it creates
8 # among 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 ({{.*}}) .rela.text {
17 # RELOC-NEXT: 0x0 R_AARCH64_NONE .data 0x0
18 # RELOC-NEXT: }
20 .globl _start
21 _start:
22 ret
23 .reloc 0, R_AARCH64_NONE, .data
25 .data
26 .long 0