view lld/test/ELF/relocation-none-arm.s @ 192:d7606dcf6fce

Added tag llvm10 for changeset 0572611fdcc8
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 14 Dec 2020 18:01:34 +0900
parents 1d019706d866
children 2e18cbf3894f
line wrap: on
line source

# REQUIRES: arm

# RUN: llvm-mc -filetype=obj -triple=armv7-linux-musl %s -o %t.o
# RUN: ld.lld --gc-sections %t.o -o %t
# RUN: llvm-readelf -S -r %t | FileCheck %s

# Test that we discard R_ARM_NONE, but respect the references it creates among
# sections.

# CHECK: .data
# CHECK: There are no relocations in this file.

# RUN: ld.lld -r %t.o -o %t
# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s

# RELOC:      Section ({{.*}}) .rel.text {
# RELOC-NEXT:   0x0 R_ARM_NONE .data 0x0
# RELOC-NEXT: }

.globl _start
_start:
  nop
  .reloc 0, R_ARM_NONE, .data

.data
  .long 0