[lld] fcc761b - [ELF][test] Make tests less sensitive to addresses/number of sections
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 00:26:26 PDT 2023
Author: Fangrui Song
Date: 2023-09-11T00:26:22-07:00
New Revision: fcc761bd0e441c4b1a6e90b0a33565364a37e61d
URL: https://github.com/llvm/llvm-project/commit/fcc761bd0e441c4b1a6e90b0a33565364a37e61d
DIFF: https://github.com/llvm/llvm-project/commit/fcc761bd0e441c4b1a6e90b0a33565364a37e61d.diff
LOG: [ELF][test] Make tests less sensitive to addresses/number of sections
Added:
Modified:
lld/test/ELF/common-shared.s
lld/test/ELF/pr34660.s
lld/test/ELF/section-name.s
lld/test/ELF/synthetic-got.s
lld/test/ELF/tls.s
Removed:
################################################################################
diff --git a/lld/test/ELF/common-shared.s b/lld/test/ELF/common-shared.s
index c53c5bf0ef7dde2..22f0d99a7517a34 100644
--- a/lld/test/ELF/common-shared.s
+++ b/lld/test/ELF/common-shared.s
@@ -10,7 +10,7 @@
# RUN: ld.lld %t1.so %t.o -o %t
# RUN: llvm-readelf -s %t | FileCheck %s
-# CHECK: 16 OBJECT GLOBAL DEFAULT 7 com
+# CHECK: 16 OBJECT GLOBAL DEFAULT [[#]] com
.globl com
.comm com,1
diff --git a/lld/test/ELF/pr34660.s b/lld/test/ELF/pr34660.s
index d68824d67f64a77..f620aecbf2cba21 100644
--- a/lld/test/ELF/pr34660.s
+++ b/lld/test/ELF/pr34660.s
@@ -18,7 +18,7 @@
# DISASM-NEXT: 1022c: ldr x8, 0x30294
# SYM: Symbol table '.symtab'
-# SYM: 0000000000030294 0 NOTYPE LOCAL DEFAULT 6 patatino
+# SYM: 0000000000030294 0 NOTYPE LOCAL DEFAULT [[#]] patatino
ldr x8, patatino
.data
diff --git a/lld/test/ELF/section-name.s b/lld/test/ELF/section-name.s
index 0ca8a884fbb0bf9..fff3fc14f30246f 100644
--- a/lld/test/ELF/section-name.s
+++ b/lld/test/ELF/section-name.s
@@ -42,17 +42,17 @@ _start:
.section .tdata.foo,"aGwT", at progbits,foo,comdat
.byte 0
-// CHECK: 1 .rodata 00000002
-// CHECK: 2 .gcc_except_table 00000001
-// CHECK: 3 .text 00000002
-// CHECK: 4 .tdata 00000001
-// CHECK: 5 .tbss 00000001
-// CHECK: 6 .data.rel.ro 00000004
-// CHECK: 7 .data 00000002
-// CHECK: 8 .foo.a 00000001
-// CHECK: 9 .foo 00000001
-// CHECK: 10 .bss 00000002
-// CHECK: 11 .comment 00000008
-// CHECK: 12 .symtab 00000030
-// CHECK: 13 .shstrtab 00000075
-// CHECK: 14 .strtab 00000008
+// CHECK: .rodata 00000002
+// CHECK-NEXT: .gcc_except_table 00000001
+// CHECK-NEXT: .text 00000002
+// CHECK-NEXT: .tdata 00000001
+// CHECK-NEXT: .tbss 00000001
+// CHECK-NEXT: .data.rel.ro 00000004
+// CHECK-NEXT: .data 00000002
+// CHECK-NEXT: .foo.a 00000001
+// CHECK-NEXT: .foo 00000001
+// CHECK-NEXT: .bss 00000002
+// CHECK-NEXT: .comment 00000008
+// CHECK-NEXT: .symtab 00000030
+// CHECK-NEXT: .shstrtab 00000075
+// CHECK-NEXT: .strtab 00000008
diff --git a/lld/test/ELF/synthetic-got.s b/lld/test/ELF/synthetic-got.s
index fc68f0d649ac79f..89dc331e38bf45f 100644
--- a/lld/test/ELF/synthetic-got.s
+++ b/lld/test/ELF/synthetic-got.s
@@ -7,8 +7,8 @@
# RUN: | FileCheck %s --check-prefix=GOTDATA
# GOT: Sections:
-# GOT: 9 .got 00000008 00000000000001b0 DATA
-# GOT: 10 .got.plt 00000020 00000000000001b8 DATA
+# GOT: .got 00000008 00000000000001b0 DATA
+# GOT: .got.plt 00000020 00000000000001b8 DATA
# GOTDATA: Contents of section .got:
# GOTDATA-NEXT: 01b0 00000000 00000000
# GOTDATA-NEXT: Contents of section .got.plt:
diff --git a/lld/test/ELF/tls.s b/lld/test/ELF/tls.s
index 940ecf6ac0f0162..4f50e9d29c030f4 100644
--- a/lld/test/ELF/tls.s
+++ b/lld/test/ELF/tls.s
@@ -121,14 +121,12 @@ d:
// CHECK-NEXT: EntrySize:
// CHECK-NEXT: }
-// Check that the TLS NOBITS sections weren't added to the R/W PT_LOAD's size.
-
// CHECK: ProgramHeaders [
// CHECK: Type: PT_LOAD
// CHECK: Type: PT_LOAD
// CHECK: Type: PT_LOAD
// CHECK: FileSize: 8
-// CHECK-NEXT: MemSize: 8
+// CHECK-NEXT: MemSize: [[#]]
// CHECK-NEXT: Flags [
// CHECK-NEXT: PF_R
// CHECK-NEXT: PF_W
More information about the llvm-commits
mailing list