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

This commit is contained in:
Fangrui Song 2021-07-16 10:02:47 -07:00
parent 6c40abb6fe
commit 3c9d86f951
16 changed files with 18 additions and 18 deletions

View File

@ -1,9 +1,9 @@
# REQUIRES: arm # REQUIRES: arm
# RUN: yaml2obj %s -o %t.o # RUN: yaml2obj %s -o %t.o
# RUN: ld.lld %t.o -o %t # 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: ld.lld -shared %t.o -o %t
# RUN: llvm-readelf -sections %t | FileCheck %s # RUN: llvm-readelf -S %t | FileCheck %s
# CHECK: .text # CHECK: .text

View File

@ -6,7 +6,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t2.o # 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: 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 # CHECK-NOT: libfoo

View File

@ -9,7 +9,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t2.o # 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: 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 # CHECK-NOT: foo
.global _start .global _start

View File

@ -20,7 +20,7 @@
# RUN: llvm-objdump -d %t | FileCheck %s --check-prefix=DISASM # RUN: llvm-objdump -d %t | FileCheck %s --check-prefix=DISASM
# RUN: llvm-dwarfdump -gdb-index %t | FileCheck %s --check-prefix=DWARF # 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: Disassembly of section .text:
# DISASM-EMPTY: # DISASM-EMPTY:

View File

@ -4,7 +4,7 @@
# RUN: ld.lld %t.o -o %t1.exe -Ttext=0x10000 # RUN: ld.lld %t.o -o %t1.exe -Ttext=0x10000
# RUN: ld.lld -just-symbols=%t1.exe -o %t2.exe # 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: 0000000000010000 0 NOTYPE GLOBAL DEFAULT ABS foo
# CHECK: 0000000000011001 40 OBJECT GLOBAL DEFAULT ABS bar # CHECK: 0000000000011001 40 OBJECT GLOBAL DEFAULT ABS bar

View File

@ -1,7 +1,7 @@
# REQUIRES: x86 # REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/at3.s -o %t.o # 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: 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 { MEMORY {
FOO (ax) : ORIGIN = 0x1000, LENGTH = 0x100 FOO (ax) : ORIGIN = 0x1000, LENGTH = 0x100

View File

@ -1,7 +1,7 @@
# REQUIRES: x86 # REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/at6.s -o %t.o # 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: 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 { MEMORY {
FLASH : ORIGIN = 0x08000000, LENGTH = 0x100 FLASH : ORIGIN = 0x08000000, LENGTH = 0x100

View File

@ -1,7 +1,7 @@
# REQUIRES: x86 # REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/at7.s -o %t.o # 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: 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 { MEMORY {
RAM : ORIGIN = 0x20000000, LENGTH = 0x200 RAM : ORIGIN = 0x20000000, LENGTH = 0x200

View File

@ -1,7 +1,7 @@
# REQUIRES: x86 # REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/at8.s -o %t.o # 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: 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 { MEMORY {
FLASH : ORIGIN = 0x08000000, LENGTH = 0x100 FLASH : ORIGIN = 0x08000000, LENGTH = 0x100

View File

@ -7,7 +7,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %t.s -o %t.o # 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: 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, ## Check that we can produce output without errors,
## and .foo section has proper size. ## and .foo section has proper size.

View File

@ -5,7 +5,7 @@
# RUN: .text : AT (0x4200) { *(.text) } \ # RUN: .text : AT (0x4200) { *(.text) } \
# RUN: }" > %t.script # RUN: }" > %t.script
# RUN: ld.lld %t.o --script %t.script -o %t # 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 # 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 different virtual to physical address delta. # just for it and it would have a different virtual to physical address delta.

View File

@ -10,7 +10,7 @@
# RUN: /DISCARD/ : { *(.comment) } \ # RUN: /DISCARD/ : { *(.comment) } \
# RUN: }" > %t.script # RUN: }" > %t.script
# RUN: ld.lld -o %t --script %t.script %t.o # 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: .bss NOBITS ffffffff80002000 002008 000002 00 WA 0 0 4096
# CHECK: ffffffff80003000 0 NOTYPE GLOBAL DEFAULT 3 _end # CHECK: ffffffff80003000 0 NOTYPE GLOBAL DEFAULT 3 _end

View File

@ -3,7 +3,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o # 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: 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: 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: _binary_
# CHECK: foobar # CHECK: foobar

View File

@ -2,11 +2,11 @@
// RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o // RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o
// RUN: ld.lld -shared %t.o -o %t.so // 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: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o
// RUN: ld.lld -shared %t.o -o %t.so // 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 .text
.abiversion 2 .abiversion 2

View File

@ -19,7 +19,7 @@
## 4) .symtab_shndx has size equal to ## 4) .symtab_shndx has size equal to
## (sizeof(.symtab) / entsize(.symtab)) * entsize(.symtab_shndx) = 0x4 * 0x180078 / 0x18 == 0x040014 ## (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 # [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: [65539] .note.GNU-stack PROGBITS 0000000000000000 000040 000000 00 0 0 1
# CHECK: [65540] .symtab SYMTAB 0000000000000000 000040 180078 18 65543 65539 8 # CHECK: [65540] .symtab SYMTAB 0000000000000000 000040 180078 18 65543 65539 8

View File

@ -4,7 +4,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %t2.o # 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 %t2.o -o %t2.so -shared
# RUN: ld.lld %t1.o --as-needed --gc-sections %t2.so -o %t # 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 # The crt files on linux have a weak reference to __cxa_finalize. It
# is important that a weak undefined reference is produced. Like # is important that a weak undefined reference is produced. Like