[lld] 3c9d86f - [ELF][test] Avoid llvm-readelf/llvm-readobj one-dash long options

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 16 10:02:53 PDT 2021


Author: Fangrui Song
Date: 2021-07-16T10:02:47-07:00
New Revision: 3c9d86f9515e2cdc57dd76095ab9099aa399f652

URL: https://github.com/llvm/llvm-project/commit/3c9d86f9515e2cdc57dd76095ab9099aa399f652
DIFF: https://github.com/llvm/llvm-project/commit/3c9d86f9515e2cdc57dd76095ab9099aa399f652.diff

LOG: [ELF][test] Avoid llvm-readelf/llvm-readobj one-dash long options

Added: 
    

Modified: 
    lld/test/ELF/arm-v4bx.test
    lld/test/ELF/as-needed-weak.s
    lld/test/ELF/dynamic-list-archive.s
    lld/test/ELF/gdb-index.s
    lld/test/ELF/just-symbols.s
    lld/test/ELF/linkerscript/at3.test
    lld/test/ELF/linkerscript/at6.test
    lld/test/ELF/linkerscript/at7.test
    lld/test/ELF/linkerscript/at8.test
    lld/test/ELF/linkerscript/memory-loc-counter.test
    lld/test/ELF/linkerscript/merge-header-load.s
    lld/test/ELF/linkerscript/orphan-discard.s
    lld/test/ELF/linkerscript/target.s
    lld/test/ELF/ppc64-rel-so-local-calls.s
    lld/test/ELF/relocatable-many-sections.s
    lld/test/ELF/weak-shared-gc.s

Removed: 
    


################################################################################
diff  --git a/lld/test/ELF/arm-v4bx.test b/lld/test/ELF/arm-v4bx.test
index 109f975c95d3c..ff46727245a48 100644
--- a/lld/test/ELF/arm-v4bx.test
+++ b/lld/test/ELF/arm-v4bx.test
@@ -1,9 +1,9 @@
 # REQUIRES: arm
 # RUN: yaml2obj %s -o %t.o
 # RUN: ld.lld %t.o -o %t
-# RUN: llvm-readelf -sections %t | FileCheck %s
+# RUN: llvm-readelf -S %t | FileCheck %s
 # RUN: ld.lld -shared %t.o -o %t
-# RUN: llvm-readelf -sections %t | FileCheck %s
+# RUN: llvm-readelf -S %t | FileCheck %s
 
 # CHECK: .text
 

diff  --git a/lld/test/ELF/as-needed-weak.s b/lld/test/ELF/as-needed-weak.s
index 1c38fd2abf2b9..b2ff374e345aa 100644
--- a/lld/test/ELF/as-needed-weak.s
+++ b/lld/test/ELF/as-needed-weak.s
@@ -6,7 +6,7 @@
 
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t2.o
 # RUN: ld.lld -o %t.exe %t2.o --as-needed %t1.so
-# RUN: llvm-readelf -dynamic-table -dyn-symbols %t.exe | FileCheck %s
+# RUN: llvm-readelf -d --dyn-syms %t.exe | FileCheck %s
 
 # CHECK-NOT: libfoo
 

diff  --git a/lld/test/ELF/dynamic-list-archive.s b/lld/test/ELF/dynamic-list-archive.s
index 5879bf1b0a575..f690dccb58699 100644
--- a/lld/test/ELF/dynamic-list-archive.s
+++ b/lld/test/ELF/dynamic-list-archive.s
@@ -9,7 +9,7 @@
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t2.o
 # RUN: ld.lld -shared -o %t.so --dynamic-list %t.list %t.a %t2.o
 
-# RUN: llvm-readelf -dyn-symbols %t.so | FileCheck %s
+# RUN: llvm-readelf --dyn-syms %t.so | FileCheck %s
 # CHECK-NOT: foo
 
 .global _start

diff  --git a/lld/test/ELF/gdb-index.s b/lld/test/ELF/gdb-index.s
index 54a01a2c0d514..2b59956ed8b7a 100644
--- a/lld/test/ELF/gdb-index.s
+++ b/lld/test/ELF/gdb-index.s
@@ -20,7 +20,7 @@
 
 # RUN: llvm-objdump -d %t | FileCheck %s --check-prefix=DISASM
 # RUN: llvm-dwarfdump -gdb-index %t | FileCheck %s --check-prefix=DWARF
-# RUN: llvm-readelf -sections %t | FileCheck %s --check-prefix=SECTION
+# RUN: llvm-readelf -S %t | FileCheck %s --check-prefix=SECTION
 
 # DISASM:       Disassembly of section .text:
 # DISASM-EMPTY:

diff  --git a/lld/test/ELF/just-symbols.s b/lld/test/ELF/just-symbols.s
index 612243de29c0b..974358a00709c 100644
--- a/lld/test/ELF/just-symbols.s
+++ b/lld/test/ELF/just-symbols.s
@@ -4,7 +4,7 @@
 # RUN: ld.lld %t.o -o %t1.exe -Ttext=0x10000
 
 # RUN: ld.lld -just-symbols=%t1.exe -o %t2.exe
-# RUN: llvm-readelf -symbols %t2.exe | FileCheck %s
+# RUN: llvm-readelf -s %t2.exe | FileCheck %s
 
 # CHECK: 0000000000010000     0 NOTYPE  GLOBAL DEFAULT  ABS foo
 # CHECK: 0000000000011001    40 OBJECT  GLOBAL DEFAULT  ABS bar

diff  --git a/lld/test/ELF/linkerscript/at3.test b/lld/test/ELF/linkerscript/at3.test
index 6344f38b304dc..1e7f970c63ef3 100644
--- a/lld/test/ELF/linkerscript/at3.test
+++ b/lld/test/ELF/linkerscript/at3.test
@@ -1,7 +1,7 @@
 # REQUIRES: x86
 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/at3.s -o %t.o
 # RUN: ld.lld %t.o --script %s -o %t
-# RUN: llvm-readelf -sections -program-headers %t | FileCheck %s
+# RUN: llvm-readelf -S -l %t | FileCheck %s
 
 MEMORY {
   FOO   (ax) : ORIGIN = 0x1000, LENGTH = 0x100

diff  --git a/lld/test/ELF/linkerscript/at6.test b/lld/test/ELF/linkerscript/at6.test
index 498c0ef14f34d..63ffbb8737e49 100644
--- a/lld/test/ELF/linkerscript/at6.test
+++ b/lld/test/ELF/linkerscript/at6.test
@@ -1,7 +1,7 @@
 # REQUIRES: x86
 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/at6.s -o %t.o
 # RUN: ld.lld %t.o --script %s -o %t
-# RUN: llvm-readelf -sections -program-headers %t | FileCheck %s
+# RUN: llvm-readelf -S -l %t | FileCheck %s
 
 MEMORY {
   FLASH : ORIGIN = 0x08000000, LENGTH = 0x100

diff  --git a/lld/test/ELF/linkerscript/at7.test b/lld/test/ELF/linkerscript/at7.test
index 1f67df29fdcd4..6a1a43599e441 100644
--- a/lld/test/ELF/linkerscript/at7.test
+++ b/lld/test/ELF/linkerscript/at7.test
@@ -1,7 +1,7 @@
 # REQUIRES: x86
 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/at7.s -o %t.o
 # RUN: ld.lld %t.o --script %s -o %t
-# RUN: llvm-readelf -sections -program-headers %t | FileCheck %s
+# RUN: llvm-readelf -S -l %t | FileCheck %s
 
 MEMORY {
   RAM    : ORIGIN = 0x20000000, LENGTH = 0x200

diff  --git a/lld/test/ELF/linkerscript/at8.test b/lld/test/ELF/linkerscript/at8.test
index c611c2e244040..db2bc55187ae6 100644
--- a/lld/test/ELF/linkerscript/at8.test
+++ b/lld/test/ELF/linkerscript/at8.test
@@ -1,7 +1,7 @@
 # REQUIRES: x86
 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/at8.s -o %t.o
 # RUN: ld.lld %t.o --script %s -o %t
-# RUN: llvm-readelf -sections -program-headers %t | FileCheck %s
+# RUN: llvm-readelf -S -l %t | FileCheck %s
 
 MEMORY {
   FLASH  : ORIGIN = 0x08000000, LENGTH = 0x100

diff  --git a/lld/test/ELF/linkerscript/memory-loc-counter.test b/lld/test/ELF/linkerscript/memory-loc-counter.test
index 3ca9a2cf6caad..2aa712282e09f 100644
--- a/lld/test/ELF/linkerscript/memory-loc-counter.test
+++ b/lld/test/ELF/linkerscript/memory-loc-counter.test
@@ -7,7 +7,7 @@
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %t.s -o %t.o
 
 # RUN: ld.lld -o %t %t.o --script %s
-# RUN: llvm-readelf -sections -program-headers %t | FileCheck %s
+# RUN: llvm-readelf -S -l %t | FileCheck %s
 
 ## Check that we can produce output without errors,
 ## and .foo section has proper size.

diff  --git a/lld/test/ELF/linkerscript/merge-header-load.s b/lld/test/ELF/linkerscript/merge-header-load.s
index d067c40d67ab3..2f22477c6538b 100644
--- a/lld/test/ELF/linkerscript/merge-header-load.s
+++ b/lld/test/ELF/linkerscript/merge-header-load.s
@@ -5,7 +5,7 @@
 # RUN:  .text : AT (0x4200) { *(.text) } \
 # RUN: }" > %t.script
 # RUN: ld.lld %t.o --script %t.script -o %t
-# RUN: llvm-readelf -program-headers %t | FileCheck %s
+# RUN: llvm-readelf -l %t | FileCheck %s
 
 # Test that we put the header in the first PT_LOAD. We used to create a PT_LOAD
 # just for it and it would have a 
diff erent virtual to physical address delta.

diff  --git a/lld/test/ELF/linkerscript/orphan-discard.s b/lld/test/ELF/linkerscript/orphan-discard.s
index 4549c3bc2b9e4..2f1c427dda54a 100644
--- a/lld/test/ELF/linkerscript/orphan-discard.s
+++ b/lld/test/ELF/linkerscript/orphan-discard.s
@@ -10,7 +10,7 @@
 # RUN:  /DISCARD/ : { *(.comment) } \
 # RUN: }" > %t.script
 # RUN: ld.lld -o %t --script %t.script %t.o
-# RUN: llvm-readelf -S -symbols %t | FileCheck %s
+# RUN: llvm-readelf -S -s %t | FileCheck %s
 
 # CHECK: .bss NOBITS ffffffff80002000 002008 000002 00 WA 0 0 4096
 # CHECK: ffffffff80003000 0 NOTYPE GLOBAL DEFAULT 3 _end

diff  --git a/lld/test/ELF/linkerscript/target.s b/lld/test/ELF/linkerscript/target.s
index 32db5b7866c2a..783bb8f90e701 100644
--- a/lld/test/ELF/linkerscript/target.s
+++ b/lld/test/ELF/linkerscript/target.s
@@ -3,7 +3,7 @@
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
 # RUN: echo "TARGET(binary) INPUT(\"%t.o\") TARGET(elf64-x86-64) INPUT(\"%t.o\")" > %t.script
 # RUN: ld.lld --script %t.script -o %t.exe
-# RUN: llvm-readelf -symbols %t.exe | FileCheck %s
+# RUN: llvm-readelf -s %t.exe | FileCheck %s
 
 # CHECK: _binary_
 # CHECK: foobar

diff  --git a/lld/test/ELF/ppc64-rel-so-local-calls.s b/lld/test/ELF/ppc64-rel-so-local-calls.s
index 3d2e0673c3a74..0be0d294deec3 100644
--- a/lld/test/ELF/ppc64-rel-so-local-calls.s
+++ b/lld/test/ELF/ppc64-rel-so-local-calls.s
@@ -2,11 +2,11 @@
 
 // RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o
 // RUN: ld.lld -shared %t.o -o %t.so
-// RUN: llvm-readelf -dyn-relocations %t.so | FileCheck %s -allow-empty --implicit-check-not={{.}}
+// RUN: llvm-readelf --dyn-relocations %t.so | FileCheck %s -allow-empty --implicit-check-not={{.}}
 
 // RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o
 // RUN: ld.lld -shared %t.o -o %t.so
-// RUN: llvm-readelf -dyn-relocations %t.so | FileCheck %s -allow-empty --implicit-check-not={{.}}
+// RUN: llvm-readelf --dyn-relocations %t.so | FileCheck %s -allow-empty --implicit-check-not={{.}}
 
 	.text
 	.abiversion 2

diff  --git a/lld/test/ELF/relocatable-many-sections.s b/lld/test/ELF/relocatable-many-sections.s
index 9abefd47254b5..acbbf2a3b098d 100644
--- a/lld/test/ELF/relocatable-many-sections.s
+++ b/lld/test/ELF/relocatable-many-sections.s
@@ -19,7 +19,7 @@
 ## 4) .symtab_shndx has size equal to
 ##    (sizeof(.symtab) / entsize(.symtab)) * entsize(.symtab_shndx) = 0x4 * 0x180078 / 0x18 == 0x040014
 
-# RUN: llvm-readelf -sections -symbols %t | FileCheck %s
+# RUN: llvm-readelf -S -s %t | FileCheck %s
 #        [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
 # CHECK: [65539] .note.GNU-stack PROGBITS       0000000000000000 000040 000000 00      0   0  1
 # CHECK: [65540] .symtab        SYMTAB          0000000000000000 000040 180078 18     65543 65539  8

diff  --git a/lld/test/ELF/weak-shared-gc.s b/lld/test/ELF/weak-shared-gc.s
index 2cafbe8dbb088..833d7b7ab4095 100644
--- a/lld/test/ELF/weak-shared-gc.s
+++ b/lld/test/ELF/weak-shared-gc.s
@@ -4,7 +4,7 @@
 # RUN:   llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %t2.o
 # RUN: ld.lld %t2.o -o %t2.so -shared
 # RUN: ld.lld %t1.o --as-needed --gc-sections %t2.so -o %t
-# RUN: llvm-readelf -dynamic-table -dyn-symbols %t | FileCheck %s
+# RUN: llvm-readelf -d --dyn-syms %t | FileCheck %s
 
 # The crt files on linux have a weak reference to __cxa_finalize. It
 # is important that a weak undefined reference is produced. Like


        


More information about the llvm-commits mailing list