[PATCH] D123332: Fix two aarch64 tests
Vladislav Khmelevsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 7 11:57:55 PDT 2022
yota9 created this revision.
yota9 added reviewers: maksfb, rafauler, Amir.
Herald added subscribers: ayermolo, kristof.beyls.
Herald added a project: All.
yota9 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Pass -no-pie flag for plt-lld test, since in pie case we are not
addressing PLT entry, but the address stored in GOT.
Remove addresses in runtime_relocs test.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D123332
Files:
bolt/test/AArch64/plt-lld.test
bolt/test/runtime/AArch64/runtime_relocs.c
Index: bolt/test/runtime/AArch64/runtime_relocs.c
===================================================================
--- bolt/test/runtime/AArch64/runtime_relocs.c
+++ bolt/test/runtime/AArch64/runtime_relocs.c
@@ -12,17 +12,17 @@
//
// RUN: llvm-readelf -r %t.bolt.so | FileCheck %s -check-prefix=CHECKLIB
//
-// CHECKLIB: 0000000600000401 R_AARCH64_GLOB_DAT {{.*}} a + 0
-// CHECKLIB: 0000000700000407 R_AARCH64_TLSDESC {{.*}} t1 + 0
-// CHECKLIB: 0000000600000101 R_AARCH64_ABS64 {{.*}} a + 0
+// CHECKLIB: {{.*}} R_AARCH64_GLOB_DAT {{.*}} a + 0
+// CHECKLIB: {{.*}} R_AARCH64_TLSDESC {{.*}} t1 + 0
+// CHECKLIB: {{.*}} R_AARCH64_ABS64 {{.*}} a + 0
// Check relocations in executable:
//
// RUN: llvm-readelf -r %t.bolt.exe | FileCheck %s -check-prefix=CHECKEXE
//
-// CHECKEXE: 0000000600000406 R_AARCH64_TLS_TPREL64 {{.*}} t1 + 0
-// CHECKEXE: 0000000800000400 R_AARCH64_COPY {{.*}} a + 0
-// CHECKEXE: 0000000700000402 R_AARCH64_JUMP_SLOT {{.*}} inc + 0
+// CHECKEXE: {{.*}} R_AARCH64_TLS_TPREL64 {{.*}} t1 + 0
+// CHECKEXE: {{.*}} R_AARCH64_COPY {{.*}} a + 0
+// CHECKEXE: {{.*}} R_AARCH64_JUMP_SLOT {{.*}} inc + 0
// Check traditional TLS relocations R_AARCH64_TLS_DTPMOD64 and
// R_AARCH64_TLS_DTPREL64 emitted correctly after bolt. Since these
@@ -33,8 +33,8 @@
// RUN: llvm-bolt %t.trad.so -o %t.trad.bolt.so -use-old-text=0 -lite=0
// RUN: llvm-readelf -r %t.trad.so | FileCheck %s -check-prefix=CHECKTRAD
//
-// CHECKTRAD: 0000000100000404 R_AARCH64_TLS_DTPMOD64 {{.*}} t1 + 0
-// CHECKTRAD: 0000000100000405 R_AARCH64_TLS_DTPREL64 {{.*}} t1 + 0
+// CHECKTRAD: {{.*}} R_AARCH64_TLS_DTPMOD64 {{.*}} t1 + 0
+// CHECKTRAD: {{.*}} R_AARCH64_TLS_DTPREL64 {{.*}} t1 + 0
// The ld linker emits R_AARCH64_TLSDESC to .rela.plt section, check that
// it is emitted correctly.
@@ -43,7 +43,7 @@
// RUN: llvm-bolt %t.ld.so -o %t.ld.bolt.so -use-old-text=0 -lite=0
// RUN: llvm-readelf -r %t.ld.bolt.so | FileCheck %s -check-prefix=CHECKLD
//
-// CHECKLD: 0000000100000407 R_AARCH64_TLSDESC {{.*}} t1 + 0
+// CHECKLD: {{.*}} R_AARCH64_TLSDESC {{.*}} t1 + 0
extern int a; // R_*_COPY
Index: bolt/test/AArch64/plt-lld.test
===================================================================
--- bolt/test/AArch64/plt-lld.test
+++ bolt/test/AArch64/plt-lld.test
@@ -3,7 +3,7 @@
// RUN: %clang %cflags %p/../Inputs/stub.c -fuse-ld=lld -fPIC -pie -shared \
// RUN: -o %t.so
-// RUN: %clang %cflags %p/../Inputs/plt.c -fuse-ld=lld \
+// RUN: %clang %cflags -no-pie %p/../Inputs/plt.c -fuse-ld=lld \
// RUN: -o %t.lld.exe -Wl,-q %t.so
// RUN: llvm-bolt %t.lld.exe -o %t.lld.bolt.exe -use-old-text=0 -lite=0 \
// RUN: -print-cfg -print-only=main | FileCheck %s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123332.421307.patch
Type: text/x-patch
Size: 2766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220407/845ad850/attachment-0001.bin>
More information about the llvm-commits
mailing list