Skip to content

Commit 4672e52

Browse files
committed
[llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf
While updating the test, change -l -S to -S -l as the output of -S goes before -l. llvm-svn: 359653
1 parent 97c17e8 commit 4672e52

20 files changed

+27
-27
lines changed

lld/test/ELF/eh-frame-padding-no-rosegment.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ bar:
3535
// RUN: ld.lld --hash-style=sysv %t.o -no-rosegment -o %t -shared
3636

3737
// Check that .eh_frame is in the same segment as .text
38-
// RUN: llvm-readobj -l --elf-output-style=GNU %t | FileCheck --check-prefix=PHDR %s
38+
// RUN: llvm-readelf -l %t | FileCheck --check-prefix=PHDR %s
3939

4040
// PHDR: Segment Sections
4141
// PHDR: .eh_frame {{.*}}.text

lld/test/ELF/empty-pt-load.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: x86
22
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
33
// RUN: ld.lld %t.o -o %t.so -shared
4-
// RUN: llvm-readobj -l --elf-output-style=GNU %t.so | FileCheck %s
4+
// RUN: llvm-readelf -l %t.so | FileCheck %s
55

66
// Test that we don't create an empty executable PT_LOAD.
77

lld/test/ELF/gc-sections-keep-shared-start.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
44
# RUN: ld.lld -shared --gc-sections -o %t1 %t
5-
# RUN: llvm-readobj --elf-output-style=GNU --file-headers --symbols %t1
5+
# RUN: llvm-readelf --file-headers --symbols %t1
66
# | FileCheck %s
77
# CHECK: Entry point address: 0x1000
88
# CHECK: 0000000000001000 0 FUNC LOCAL HIDDEN 4 _start

lld/test/ELF/gc-sections-non-alloc-to-merge.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
44
# RUN: ld.lld %t.o -o %t --gc-sections
5-
# RUN: llvm-readobj -S --elf-output-style=GNU %t | FileCheck %s
5+
# RUN: llvm-readelf -S %t | FileCheck %s
66

77
# CHECK: .merge1 PROGBITS {{[0-9a-z]*}} {{[0-9a-z]*}} 000004
88

lld/test/ELF/linkerscript/extend-pt-load1.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# REQUIRES: x86
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/extend-pt-load.s -o %t.o
33
# RUN: ld.lld --hash-style=sysv -o %t1 --script %s %t.o -shared
4-
# RUN: llvm-readobj --elf-output-style=GNU -l -S %t1 | FileCheck %s
4+
# RUN: llvm-readelf -S -l %t1 | FileCheck %s
55

66
# This test demonstrates an odd consequence of the way we handle sections with just symbol
77
# assignments.

lld/test/ELF/linkerscript/extend-pt-load2.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# REQUIRES: x86
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/extend-pt-load.s -o %t.o
33
# RUN: ld.lld --hash-style=sysv -o %t2 --script %s %t.o -shared
4-
# RUN: llvm-readobj --elf-output-style=GNU -l -S %t2 | FileCheck %s
4+
# RUN: llvm-readelf -S -l %t2 | FileCheck %s
55

66
# Then add the section bar. Note how bar is given AX flags, which causes the PT_LOAD to now
77
# cover the padding bits created by ALIGN.

lld/test/ELF/linkerscript/extend-pt-load3.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# REQUIRES: x86
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/extend-pt-load.s -o %t.o
33
# RUN: ld.lld --hash-style=sysv -o %t3 --script %s %t.o -shared
4-
# RUN: llvm-readobj --elf-output-style=GNU -l -S %t3 | FileCheck --check-prefix=CHECK %s
4+
# RUN: llvm-readelf -S -l %t3 | FileCheck --check-prefix=CHECK %s
55

66
# If the current behavior becomes a problem we should consider just moving the commands out
77
# of the section. That is, handle the above like the following test.

lld/test/ELF/linkerscript/header-phdr.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# RUN: echo '.section .zed, "a"; .zero 4' \
33
# RUN: | llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t.o
44
# RUN: ld.lld --script %s %t.o -o %t
5-
# RUN: llvm-readelf -l -S -W %t | FileCheck %s
5+
# RUN: llvm-readelf -S -l -W %t | FileCheck %s
66

77
# CHECK: [ 1] .abc PROGBITS 0000000000001000 001000 000004 00 A 0 0 1
88
# CHECK: LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x001004 0x001004 R E 0x1000

lld/test/ELF/linkerscript/multiple-tbss.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
33
# RUN: echo "SECTIONS { }" > %t.script
44
# RUN: ld.lld -T %t.script %t.o -o %t
5-
# RUN: llvm-readobj -l -S %t | FileCheck %s
5+
# RUN: llvm-readobj -S -l %t | FileCheck %s
66

77
# CHECK: Name: .tbss
88
# CHECK-NEXT: Type: SHT_NOBITS

lld/test/ELF/linkerscript/overlapping-sections.s

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# Verify that the .sec2 was indeed placed in a PT_LOAD where the PhysAddr
1919
# overlaps with where .sec1 is loaded:
20-
# RUN: llvm-readobj --sections -l --elf-output-style=GNU %t.so | FileCheck %s -check-prefix BAD-LMA
20+
# RUN: llvm-readelf --sections -l %t.so | FileCheck %s -check-prefix BAD-LMA
2121
# BAD-LMA-LABEL: Section Headers:
2222
# BAD-LMA: .sec1 PROGBITS 0000000000008000 002000 000100 00 WA 0 0 1
2323
# BAD-LMA: .sec2 PROGBITS 0000000000008800 002800 000100 00 WA 0 0 1
@@ -43,7 +43,7 @@
4343

4444
# Check that the expected binary was created with --noinhibit-exec:
4545
# RUN: ld.lld -o %t.so --script %t-vaddr.script %t.o -shared --noinhibit-exec
46-
# RUN: llvm-readobj --sections -l --elf-output-style=GNU %t.so | FileCheck %s -check-prefix BAD-VADDR
46+
# RUN: llvm-readelf --sections -l %t.so | FileCheck %s -check-prefix BAD-VADDR
4747
# BAD-VADDR-LABEL: Section Headers:
4848
# BAD-VADDR: .sec1 PROGBITS 0000000000008000 002000 000100 00 WA 0 0 1
4949
# BAD-VADDR: .sec2 PROGBITS 0000000000008020 003020 000100 00 WA 0 0 1
@@ -91,7 +91,7 @@
9191
# Starting here the contents of .sec2 overwrites .sec1:
9292
# BROKEN-OUTPUT-FILE-NEXT: 8040 02020202 02020202 02020202 02020202
9393

94-
# RUN: llvm-readobj --sections -l --elf-output-style=GNU %t.so | FileCheck %s -check-prefix BAD-BOTH
94+
# RUN: llvm-readelf --sections -l %t.so | FileCheck %s -check-prefix BAD-BOTH
9595
# BAD-BOTH-LABEL: Section Headers:
9696
# BAD-BOTH: .sec1 PROGBITS 0000000000008000 002000 000100 00 WA 0 0 1
9797
# BAD-BOTH: .sec2 PROGBITS 0000000000008040 002040 000100 00 WA 0 0 1

lld/test/ELF/linkerscript/overlay.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ SECTIONS {
1616
## .text does not cause overlapping error and that
1717
## .text's VA is 0x1000 + max(sizeof(.out.big), sizeof(.out.small)).
1818

19-
# RUN: llvm-readobj --sections -l --elf-output-style=GNU %t | FileCheck %s
19+
# RUN: llvm-readelf --sections -l %t | FileCheck %s
2020

2121
# CHECK: Section Headers:
2222
# CHECK: Name Type Address Off Size

lld/test/ELF/linkerscript/symbol-only-align.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# RUN: echo '.text; ret; .data; .quad 0' > %t.s
33
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %t.s -o %t.o
44
# RUN: ld.lld -o %t --script %s %t.o -shared
5-
# RUN: llvm-readobj --elf-output-style=GNU -S --symbols -l %t | FileCheck %s
5+
# RUN: llvm-readelf -S --symbols -l %t | FileCheck %s
66

77
PHDRS {
88
text PT_LOAD FLAGS(0x5);

lld/test/ELF/linkerscript/ttext-script.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
33
# RUN: echo "SECTIONS { .text 0x200000 : { *(.text) } }" > %t.script
44
# RUN: ld.lld -T %t.script -Ttext 0x100000 %t.o -o %t
5-
# RUN: llvm-readobj --elf-output-style=GNU -S %t | FileCheck %s
5+
# RUN: llvm-readelf -S %t | FileCheck %s
66

77
# CHECK: .text PROGBITS 0000000000100000
88

lld/test/ELF/local-symbols-order.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
66

77
# RUN: ld.lld -o %t %t1.o %t2.o --emit-relocs
8-
# RUN: llvm-readobj --symbols --sections --elf-output-style=GNU %t | FileCheck %s
8+
# RUN: llvm-readelf --symbols --sections %t | FileCheck %s
99

1010
## Check we sort local symbols to match the following order:
1111
## file1, local1, section1, hidden1, file2, local2, section2, hidden2 ...

lld/test/ELF/pr36475.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# RUN: echo " .got.plt : { BYTE(42); *(.got); } : ph_data" >> %t.script
1111
# RUN: echo "}" >> %t.script
1212
# RUN: ld.lld -T %t.script %t.o -o %t.elf
13-
# RUN: llvm-readobj -l --elf-output-style=GNU %t.elf | FileCheck %s
13+
# RUN: llvm-readelf -l %t.elf | FileCheck %s
1414

1515
# CHECK: Section to Segment mapping:
1616
# CHECK-NEXT: Segment Sections...

lld/test/ELF/relocation-copy-relro.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/relocation-copy-relro.s -o %t2.o
44
// RUN: ld.lld -shared %t2.o -o %t.so
55
// RUN: ld.lld --hash-style=sysv %t.o %t.so -o %t3
6-
// RUN: llvm-readobj -l -S -r %t3 | FileCheck %s
6+
// RUN: llvm-readobj -S -l -r %t3 | FileCheck %s
77

88
// CHECK: Name: .bss.rel.ro (48)
99
// CHECK-NEXT: Type: SHT_NOBITS (0x8)

lld/test/ELF/relro.s

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
// RUN: ld.lld -shared %t2.o -o %t2.so
66

77
// RUN: ld.lld %t.o %t2.so -z now -z norelro -z relro -o %t
8-
// RUN: llvm-readobj -l --elf-output-style=GNU %t | FileCheck --check-prefix=CHECK --check-prefix=FULLRELRO %s
8+
// RUN: llvm-readelf -l %t | FileCheck --check-prefix=CHECK --check-prefix=FULLRELRO %s
99

1010
// RUN: ld.lld %t.o %t2.so -z norelro -z relro -o %t
11-
// RUN: llvm-readobj -l --elf-output-style=GNU %t | FileCheck --check-prefix=CHECK --check-prefix=PARTRELRO %s
11+
// RUN: llvm-readelf -l %t | FileCheck --check-prefix=CHECK --check-prefix=PARTRELRO %s
1212

1313
// RUN: ld.lld %t.o %t2.so -z norelro -o %t
14-
// RUN: llvm-readobj -l --elf-output-style=GNU %t | FileCheck --check-prefix=NORELRO %s
14+
// RUN: llvm-readelf -l %t | FileCheck --check-prefix=NORELRO %s
1515

1616
// CHECK: Program Headers:
1717
// CHECK-NEXT: Type

lld/test/ELF/ttext-tdata-tbss.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
## Show what regular output gives to us.
55
# RUN: ld.lld %t.o -o %t1
6-
# RUN: llvm-readobj --elf-output-style=GNU -l -S %t1 | FileCheck %s
6+
# RUN: llvm-readelf -S -l %t1 | FileCheck %s
77
# CHECK: .rodata PROGBITS 0000000000200158 000158 000008
88
# CHECK-NEXT: .text PROGBITS 0000000000201000 001000 000001
99
# CHECK-NEXT: .aw PROGBITS 0000000000202000 002000 000008
@@ -15,7 +15,7 @@
1515

1616
## With .text at 0 there is no space to allocate the headers.
1717
# RUN: ld.lld -Ttext 0x0 -Tdata 0x4000 -Tbss 0x8000 %t.o -o %t2
18-
# RUN: llvm-readobj --elf-output-style=GNU -l -S %t2 | FileCheck %s --check-prefix=USER1
18+
# RUN: llvm-readelf -S -l %t2 | FileCheck %s --check-prefix=USER1
1919
# USER1: .text PROGBITS 0000000000000000 001000 000001
2020
# USER1-NEXT: .data PROGBITS 0000000000004000 002000 000008
2121
# USER1-NEXT: .bss NOBITS 0000000000008000 002008 000008
@@ -26,7 +26,7 @@
2626

2727
## With .text at 0x1000 there is space to allocate the headers.
2828
# RUN: ld.lld -Ttext 0x1000 -Tdata 0x4000 -Tbss 0x8000 %t.o -o %t3
29-
# RUN: llvm-readobj --elf-output-style=GNU -l -S %t3 | FileCheck %s --check-prefix=USER2
29+
# RUN: llvm-readelf -S -l %t3 | FileCheck %s --check-prefix=USER2
3030
# USER2: .text PROGBITS 0000000000001000 001000 000001
3131
# USER2-NEXT: .data PROGBITS 0000000000004000 002000 000008
3232
# USER2-NEXT: .bss NOBITS 0000000000008000 002008 000008
@@ -38,7 +38,7 @@
3838

3939
## With .text well above 200000 we don't need to change the image base
4040
# RUN: ld.lld -Ttext 0x201000 %t.o -o %t4
41-
# RUN: llvm-readobj --elf-output-style=GNU -l -S %t4 | FileCheck %s --check-prefix=USER3
41+
# RUN: llvm-readelf -S -l %t4 | FileCheck %s --check-prefix=USER3
4242
# USER3: .text PROGBITS 0000000000201000 001000 000001
4343
# USER3-NEX: .rodata PROGBITS 0000000000202000 002000 000008
4444
# USER3-NEX: .aw PROGBITS 0000000000203000 003000 000008

lld/test/ELF/version-script-twice.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: echo "FBSD_1.1 {}; FBSD_1.2 {};" > %t.ver
44
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
55
# RUN: ld.lld -shared %t.o -o %t.so --version-script=%t.ver
6-
# RUN: llvm-readobj --dyn-symbols --elf-output-style=GNU %t.so | FileCheck %s
6+
# RUN: llvm-readelf --dyn-symbols %t.so | FileCheck %s
77

88
.weak openat
99
openat:

lld/test/ELF/wrap-dynamic-undef.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/wrap-dynamic-undef.s -o %t2.o
44
# RUN: ld.lld %t2.o -o %t2.so -shared
55
# RUN: ld.lld %t1.o %t2.so -o %t --wrap foo
6-
# RUN: llvm-readobj --dyn-syms --elf-output-style=GNU %t | FileCheck %s
6+
# RUN: llvm-readelf --dyn-syms %t | FileCheck %s
77

88
# Test that the dynamic relocation uses foo. We used to produce a
99
# relocation with __real_foo.

0 commit comments

Comments
 (0)