llvm-project/lld/test/ELF/relocation-none-arm.s
Georgii Rymar 98a4289810 [llvm-readobj] - For SHT_REL relocations, don't display an addend.
This is https://bugs.llvm.org/show_bug.cgi?id=44257.

In LLVM style we always print `0` as addend when dumping
SHT_REL relocations. It is confusing, this patch stops
printing it as the first comment on the bug page suggests.

Differential revision: https://reviews.llvm.org/D93033
2020-12-14 12:03:00 +03:00

27 lines
585 B
ArmAsm

# 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
# RELOC-NEXT: }
.globl _start
_start:
nop
.reloc 0, R_ARM_NONE, .data
.data
.long 0