[PATCH] D64684: ELF: Simplify test. NFCI.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 12 18:40:09 PDT 2019
pcc created this revision.
pcc added reviewers: ruiu, peter.smith, grimar.
Herald added subscribers: MaskRay, arichardson, javed.absar, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
Avoid splitting the test into multiple files and use zero for the value of
the symbol with addends at relocations so that it's clear what value is
being used at relocations.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D64684
Files:
lld/test/ELF/Inputs/uabs_label.s
lld/test/ELF/aarch64-relocs.s
Index: lld/test/ELF/aarch64-relocs.s
===================================================================
--- lld/test/ELF/aarch64-relocs.s
+++ lld/test/ELF/aarch64-relocs.s
@@ -1,6 +1,6 @@
# REQUIRES: aarch64
# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %t
-# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %p/Inputs/uabs_label.s -o %t2.o
+# RUN: echo '.globl zero; zero = 0' | llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd -o %t2.o
# RUN: ld.lld %t %t2.o -o %t2
# RUN: llvm-objdump -d %t2 | FileCheck %s
@@ -169,11 +169,11 @@
.section .R_AARCH64_MOVW_UABS,"ax", at progbits
movz1:
- movk x12, #:abs_g0_nc:uabs_label
- movk x13, #:abs_g1_nc:uabs_label
- movk x14, #:abs_g2_nc:uabs_label
- movz x15, #:abs_g3:uabs_label
- movk x16, #:abs_g3:uabs_label
+ movk x12, #:abs_g0_nc:zero+0xF000E000D000C
+ movk x13, #:abs_g1_nc:zero+0xF000E000D000C
+ movk x14, #:abs_g2_nc:zero+0xF000E000D000C
+ movz x15, #:abs_g3:zero+0xF000E000D000C
+ movk x16, #:abs_g3:zero+0xF000E000D000C
## 4222124650659840 == (0xF << 48)
# CHECK: Disassembly of section .R_AARCH64_MOVW_UABS:
Index: lld/test/ELF/Inputs/uabs_label.s
===================================================================
--- lld/test/ELF/Inputs/uabs_label.s
+++ /dev/null
@@ -1,4 +0,0 @@
-# Sample label to test R_AARCH64_MOVW_UABS relocations
-
-.globl uabs_label
-uabs_label = 0xF000E000D000C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64684.209661.patch
Type: text/x-patch
Size: 1414 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190713/8641729d/attachment.bin>
More information about the llvm-commits
mailing list