Skip to content

Commit 1044ee8

Browse files
committed
[ELF][test] Improve llvm-objdump -t tests
In many cases, llvm-nm or llvm-readelf is more suitable.
1 parent 38e5322 commit 1044ee8

16 files changed

+144
-160
lines changed

lld/test/ELF/end.s

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
// DEFAULT-NEXT: Value: 0x202161
2424
// DEFAULT: ]
2525

26-
// RUN: ld.lld -r %t.o -o %t2
27-
// RUN: llvm-objdump -t %t2 | FileCheck %s --check-prefix=RELOCATABLE
28-
// RELOCATABLE: 0000000000000000 *UND* 00000000 _end
26+
// RUN: ld.lld -r %t.o -o %t
27+
// RUN: llvm-readelf -s %t | FileCheck %s --check-prefix=RELOCATABLE
28+
// RELOCATABLE: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _end
2929

3030
.global _start,_end
3131
.text

lld/test/ELF/gnu-ifunc-empty.s

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55

66
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
77
// RUN: ld.lld -static %t.o -o %t.exe
8-
// RUN: llvm-objdump -syms %t.exe | FileCheck %s
8+
// RUN: llvm-readelf -S -s %t.exe | FileCheck %s
99

10-
// CHECK: 0000000000200000 .text 00000000 .hidden __rela_iplt_end
11-
// CHECK: 0000000000200000 .text 00000000 .hidden __rela_iplt_start
10+
// CHECK: Name Type Address Off
11+
// CHECK: .text PROGBITS 0000000000201120 000120
12+
// CHECK: Value Size Type Bind Vis Ndx Name
13+
// CHECK: 0000000000200000 0 NOTYPE LOCAL HIDDEN 1 __rela_iplt_end
14+
// CHECK: 0000000000200000 0 NOTYPE LOCAL HIDDEN 1 __rela_iplt_start
1215

1316
.globl _start
1417
_start:
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# REQUIRES: x86
2-
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/alignof.s -o %t
3-
# RUN: ld.lld -o %t1 --script %s %t
4-
# RUN: llvm-objdump -t %t1 | FileCheck %s
5-
# CHECK: SYMBOL TABLE:
6-
# CHECK: 0000000000000008 *ABS* 00000000 _aaa
7-
# CHECK-NEXT: 0000000000000010 *ABS* 00000000 _bbb
8-
# CHECK-NEXT: 0000000000000020 *ABS* 00000000 _ccc
2+
# RUN: llvm-mc -filetype=obj -triple=x86_64 %p/Inputs/alignof.s -o %t.o
3+
# RUN: ld.lld -o %t --script %s %t.o
4+
# RUN: llvm-readelf -s %t | FileCheck %s
5+
# CHECK: Value Size Type Bind Vis Ndx Name
6+
# CHECK: 0000000000000008 0 NOTYPE GLOBAL DEFAULT ABS _aaa
7+
# CHECK-NEXT: 0000000000000010 0 NOTYPE GLOBAL DEFAULT ABS _bbb
8+
# CHECK-NEXT: 0000000000000020 0 NOTYPE GLOBAL DEFAULT ABS _ccc
99

1010
SECTIONS {
1111
.aaa : { *(.aaa) }
@@ -19,6 +19,6 @@ SECTIONS {
1919
## Check that we error out if trying to get alignment of
2020
## section that does not exist.
2121
# RUN: echo "SECTIONS { _aaa = ALIGNOF(.foo); }" > %t.script
22-
# RUN: not ld.lld -o /dev/null --script %t.script %t 2>&1 \
22+
# RUN: not ld.lld -o /dev/null --script %t.script %t.o 2>&1 \
2323
# RUN: | FileCheck -check-prefix=ERR %s
2424
# ERR: {{.*}}.script:1: undefined section .foo

lld/test/ELF/linkerscript/early-assign-symbol.s

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@
66

77
# RUN: echo "SECTIONS { aaa = foo | 1; .text : { *(.text*) } }" > %t3.script
88
# RUN: ld.lld -o %t --script %t3.script %t.o
9-
# RUN: llvm-objdump -t %t | FileCheck --check-prefix=VAL1 %s
9+
# RUN: llvm-nm -p %t | FileCheck --check-prefix=VAL1 %s
1010

11-
# VAL1: 0000000000000000 .text 00000000 foo
12-
# VAL1: 0000000000000001 .text 00000000 aaa
11+
# VAL1: 0000000000000000 T foo
12+
# VAL1: 0000000000000001 T aaa
1313

1414
# RUN: echo "SECTIONS { aaa = ABSOLUTE(foo - 1) + 1; .text : { *(.text*) } }" > %t.script
1515
# RUN: ld.lld -o %t --script %t.script %t.o
16-
# RUN: llvm-objdump -t %t | FileCheck --check-prefix=VAL %s
16+
# RUN: llvm-nm -p %t | FileCheck --check-prefix=VAL %s
1717

1818
# RUN: echo "SECTIONS { aaa = 1 + ABSOLUTE(foo - 1); .text : { *(.text*) } }" > %t.script
1919
# RUN: ld.lld -o %t --script %t.script %t.o
20-
# RUN: llvm-objdump -t %t | FileCheck --check-prefix=VAL %s
20+
# RUN: llvm-nm -p %t | FileCheck --check-prefix=VAL %s
2121

2222
# RUN: echo "SECTIONS { aaa = ABSOLUTE(foo); .text : { *(.text*) } }" > %t4.script
2323
# RUN: ld.lld -o %t --script %t4.script %t.o
24-
# RUN: llvm-objdump -t %t | FileCheck --check-prefix=VAL %s
24+
# RUN: llvm-nm -p %t | FileCheck --check-prefix=VAL %s
2525

26-
# VAL: 0000000000000000 .text 00000000 foo
27-
# VAL: 0000000000000000 *ABS* 00000000 aaa
26+
# VAL: 0000000000000000 T foo
27+
# VAL: 0000000000000000 A aaa
2828

2929
.section .text
3030
.globl foo
Lines changed: 9 additions & 8 deletions
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 /dev/null -o %t.o
33
# RUN: ld.lld -o %t.so --script %s %t.o -shared
4-
# RUN: llvm-objdump -t -h %t.so | FileCheck %s
4+
# RUN: llvm-readelf -S -s %t.so | FileCheck %s
55

66
SECTIONS {
77
. = . + 4;
@@ -13,11 +13,12 @@ SECTIONS {
1313
}
1414
};
1515

16-
# CHECK: 5 .text 00000000 000000000000014c
16+
# CHECK: [ 5] .text PROGBITS 000000000000014c
1717

18-
# CHECK: 000000000000014d .text 00000000 foo1
19-
# CHECK: 000000000000014d .text 00000000 bar1
20-
# CHECK: 0000000000000000 .text 00000000 foo2
21-
# CHECK: 0000000000000000 .text 00000000 bar2
22-
# CHECK: 000000000000014d .text 00000000 foo3
23-
# CHECK: 000000000000014d .text 00000000 bar3
18+
# CHECK: Value Size Type Bind Vis Ndx Name
19+
# CHECK: 000000000000014d 0 NOTYPE GLOBAL DEFAULT 5 foo1
20+
# CHECK: 000000000000014d 0 NOTYPE GLOBAL DEFAULT 5 bar1
21+
# CHECK: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 5 foo2
22+
# CHECK: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 5 bar2
23+
# CHECK: 000000000000014d 0 NOTYPE GLOBAL DEFAULT 5 foo3
24+
# CHECK: 000000000000014d 0 NOTYPE GLOBAL DEFAULT 5 bar3
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
# REQUIRES: x86
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux /dev/null -o %t1.o
33
# RUN: ld.lld -shared %t1.o --script %s -o %t
4-
# RUN: llvm-objdump -section-headers -t %t | FileCheck %s
4+
# RUN: llvm-readelf -s %t | FileCheck %s
55

66
SECTIONS {
77
A = . + 0x1;
88
. += 0x1000;
99
}
1010

11-
# CHECK: Sections:
12-
# CHECK-NEXT: Idx Name Size VMA
13-
# CHECK-NEXT: 0 00000000 0000000000000000
14-
# CHECK-NEXT: 1 .dynsym 00000030 0000000000001000
15-
# CHECK: 5 .text 00000000 000000000000106c
16-
17-
# CHECK: 0000000000000001 .dynsym 00000000 A
11+
# CHECK: Value Size Type Bind Vis Ndx Name
12+
# CHECK: 0000000000000001 0 NOTYPE GLOBAL DEFAULT 1 A
Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# REQUIRES: x86
2-
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t
3-
# RUN: ld.lld %t --script %s -o %t2
4-
# RUN: llvm-objdump -t %t2 | FileCheck %s
2+
# RUN: llvm-mc -filetype=obj -triple=x86_64 /dev/null -o %t.o
3+
# RUN: ld.lld %t.o -T %s -o %t
4+
# RUN: llvm-nm -p %t | FileCheck %s
55

66
SECTIONS {
77
_start = .;
@@ -48,83 +48,83 @@ SECTIONS {
4848
logicalor4 = 1 || 1;
4949
}
5050

51-
# CHECK: 00000000000006 *ABS* 00000000 plus
52-
# CHECK: 00000000000004 *ABS* 00000000 minus
53-
# CHECK: 00000000000003 *ABS* 00000000 div
54-
# CHECK: 00000000000006 *ABS* 00000000 mod
55-
# CHECK: 00000000000007 *ABS* 00000000 mul
56-
# CHECK: 00000000000005 *ABS* 00000000 nospace
57-
# CHECK: 00000000000015 *ABS* 00000000 braces
58-
# CHECK: 000000000000aa *ABS* 00000000 and
59-
# CHECK: 00000000000001 *ABS* 00000000 ternary1
60-
# CHECK: 00000000000002 *ABS* 00000000 ternary2
61-
# CHECK: 00000000000002 *ABS* 00000000 less
62-
# CHECK: 00000000000001 *ABS* 00000000 lesseq
63-
# CHECK: 00000000000002 *ABS* 00000000 greater
64-
# CHECK: 00000000000001 *ABS* 00000000 greatereq
65-
# CHECK: 00000000000001 *ABS* 00000000 eq
66-
# CHECK: 00000000000002 *ABS* 00000000 neq
67-
# CHECK: 00000000000003 *ABS* 00000000 plusassign
68-
# CHECK: 00000000000002 *ABS* 00000000 unary
69-
# CHECK: 00000000000020 *ABS* 00000000 lshift
70-
# CHECK: 0000000000001f *ABS* 00000000 rshift
71-
# CHECK: 00000000000009 *ABS* 00000000 precedence1
72-
# CHECK: 00000000000009 *ABS* 00000000 precedence2
73-
# CHECK: 00000000001000 *ABS* 00000000 maxpagesize
74-
# CHECK: 00000000001000 *ABS* 00000000 commonpagesize
75-
# CHECK: 0000000000ffff *ABS* 00000000 datasegmentalign
76-
# CHECK: 0000000000fff0 *ABS* 00000000 datasegmentalign2
77-
# CHECK: 0000000000ffe0 .text 00000000 minus_rel
78-
# CHECK: 0000000000fff0 *ABS* 00000000 minus_abs
79-
# CHECK: 00000000000016 *ABS* 00000000 max
80-
# CHECK: 0000000000000b *ABS* 00000000 min
81-
# CHECK: 00000000000000 *ABS* 00000000 logicaland1
82-
# CHECK: 00000000000000 *ABS* 00000000 logicaland2
83-
# CHECK: 00000000000000 *ABS* 00000000 logicaland3
84-
# CHECK: 00000000000001 *ABS* 00000000 logicaland4
85-
# CHECK: 00000000000000 *ABS* 00000000 logicalor1
86-
# CHECK: 00000000000001 *ABS* 00000000 logicalor2
87-
# CHECK: 00000000000001 *ABS* 00000000 logicalor3
88-
# CHECK: 00000000000001 *ABS* 00000000 logicalor4
51+
# CHECK: 00000000000006 A plus
52+
# CHECK-NEXT: 00000000000004 A minus
53+
# CHECK-NEXT: 00000000000003 A div
54+
# CHECK-NEXT: 00000000000006 A mod
55+
# CHECK-NEXT: 00000000000007 A mul
56+
# CHECK-NEXT: 00000000000005 A nospace
57+
# CHECK-NEXT: 00000000000015 A braces
58+
# CHECK-NEXT: 000000000000aa A and
59+
# CHECK-NEXT: 00000000000001 A ternary1
60+
# CHECK-NEXT: 00000000000002 A ternary2
61+
# CHECK-NEXT: 00000000000002 A less
62+
# CHECK-NEXT: 00000000000001 A lesseq
63+
# CHECK-NEXT: 00000000000002 A greater
64+
# CHECK-NEXT: 00000000000001 A greatereq
65+
# CHECK-NEXT: 00000000000001 A eq
66+
# CHECK-NEXT: 00000000000002 A neq
67+
# CHECK-NEXT: 00000000000003 A plusassign
68+
# CHECK-NEXT: 00000000000002 A unary
69+
# CHECK-NEXT: 00000000000020 A lshift
70+
# CHECK-NEXT: 0000000000001f A rshift
71+
# CHECK-NEXT: 00000000000009 A precedence1
72+
# CHECK-NEXT: 00000000000009 A precedence2
73+
# CHECK-NEXT: 00000000001000 A maxpagesize
74+
# CHECK-NEXT: 00000000001000 A commonpagesize
75+
# CHECK-NEXT: 0000000000ffff A datasegmentalign
76+
# CHECK-NEXT: 0000000000fff0 A datasegmentalign2
77+
# CHECK-NEXT: 0000000000ffe0 T minus_rel
78+
# CHECK-NEXT: 0000000000fff0 A minus_abs
79+
# CHECK-NEXT: 00000000000016 A max
80+
# CHECK-NEXT: 0000000000000b A min
81+
# CHECK-NEXT: 00000000000000 A logicaland1
82+
# CHECK-NEXT: 00000000000000 A logicaland2
83+
# CHECK-NEXT: 00000000000000 A logicaland3
84+
# CHECK-NEXT: 00000000000001 A logicaland4
85+
# CHECK-NEXT: 00000000000000 A logicalor1
86+
# CHECK-NEXT: 00000000000001 A logicalor2
87+
# CHECK-NEXT: 00000000000001 A logicalor3
88+
# CHECK-NEXT: 00000000000001 A logicalor4
8989

9090
## Mailformed number error.
9191
# RUN: echo "SECTIONS { . = 0x12Q41; }" > %t.script
92-
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
92+
# RUN: not ld.lld %t.o -T %t.script -o /dev/null 2>&1 | \
9393
# RUN: FileCheck --check-prefix=NUMERR %s
9494
# NUMERR: malformed number: 0x12Q41
9595

9696
## Missing closing bracket.
9797
# RUN: echo "SECTIONS { . = (1; }" > %t.script
98-
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
98+
# RUN: not ld.lld %t.o -T %t.script -o /dev/null 2>&1 | \
9999
# RUN: FileCheck --check-prefix=BRACKETERR %s
100100
# BRACKETERR: ) expected, but got ;
101101

102102
## Missing opening bracket.
103103
# RUN: echo "SECTIONS { . = 1); }" > %t.script
104-
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
104+
# RUN: not ld.lld %t.o -T %t.script -o /dev/null 2>&1 | \
105105
# RUN: FileCheck --check-prefix=BRACKETERR2 %s
106106
# BRACKETERR2: ; expected, but got )
107107

108108
## Empty expression.
109109
# RUN: echo "SECTIONS { . = ; }" > %t.script
110-
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
110+
# RUN: not ld.lld %t.o -T %t.script -o /dev/null 2>&1 | \
111111
# RUN: FileCheck --check-prefix=ERREXPR %s
112112
# ERREXPR: malformed number: ;
113113

114114
## Div by zero error.
115115
# RUN: echo "SECTIONS { . = 1 / 0; }" > %t.script
116-
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
116+
# RUN: not ld.lld %t.o -T %t.script -o /dev/null 2>&1 | \
117117
# RUN: FileCheck --check-prefix=DIVZERO %s
118118
# DIVZERO: {{.*}}.script:1: division by zero
119119

120120
## Mod by zero error.
121121
# RUN: echo "SECTIONS { . = 1 % 0; }" > %t.script
122-
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
122+
# RUN: not ld.lld %t.o -T %t.script -o /dev/null 2>&1 | \
123123
# RUN: FileCheck --check-prefix=MODZERO %s
124124
# MODZERO: {{.*}}.script:1: modulo by zero
125125

126126
## Broken ternary operator expression.
127127
# RUN: echo "SECTIONS { . = 1 ? 2; }" > %t.script
128-
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
128+
# RUN: not ld.lld %t.o -T %t.script -o /dev/null 2>&1 | \
129129
# RUN: FileCheck --check-prefix=TERNERR %s
130130
# TERNERR: : expected, but got ;

lld/test/ELF/linkerscript/page-size.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646

4747
# RUN: echo "SECTIONS { symbol = CONSTANT(MAXPAGESIZE); }" > %t.script
4848
# RUN: ld.lld -z max-page-size=0x4000 -o %t1 --script %t.script %t
49-
# RUN: llvm-objdump -t %t1 | FileCheck -check-prefix CHECK-SCRIPT %s
49+
# RUN: llvm-readelf -s %t1 | FileCheck -check-prefix CHECK-SCRIPT %s
5050

51-
# CHECK-SCRIPT: 0000000000004000 *ABS* 00000000 symbol
51+
# CHECK-SCRIPT: 0000000000004000 0 NOTYPE GLOBAL DEFAULT ABS symbol
5252

5353
# RUN: not ld.lld -z max-page-size=0x1001 -o /dev/null --script %t.script %t 2>&1 \
5454
# RUN: | FileCheck -check-prefix=ERR1 %s

lld/test/ELF/linkerscript/provide-shared.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# RUN: ld.lld %t2.o -o %t2.so -shared
55
# RUN: echo "SECTIONS { . = . + SIZEOF_HEADERS; PROVIDE(foo = 42);}" > %t.script
66
# RUN: ld.lld -o %t --script %t.script %t.o %t2.so
7-
# RUN: llvm-objdump -t %t | FileCheck %s
7+
# RUN: llvm-readelf -s %t | FileCheck %s
88

9-
# CHECK: 000000000000002a *ABS* 00000000 foo
9+
# CHECK: 000000000000002a 0 NOTYPE GLOBAL DEFAULT ABS foo
1010

1111
.global _start
1212
_start:

lld/test/ELF/linkerscript/sizeof.s

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# REQUIRES: x86
2-
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
2+
# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
33

44
# RUN: echo "SECTIONS { \
55
# RUN: .aaa : { *(.aaa) } \
@@ -8,32 +8,22 @@
88
# RUN: _aaa = SIZEOF(.aaa); \
99
# RUN: _bbb = SIZEOF(.bbb); \
1010
# RUN: _ccc = SIZEOF(.ccc); \
11+
# RUN: _ddd = SIZEOF(.not_exist); \
1112
# RUN: }" > %t.script
12-
# RUN: ld.lld -o %t1 --script %t.script %t
13-
# RUN: llvm-objdump -t -section-headers %t1 | FileCheck %s
14-
# CHECK: Sections:
15-
# CHECK-NEXT: Idx Name Size
16-
# CHECK-NEXT: 0 00000000
17-
# CHECK-NEXT: 1 .aaa 00000008
18-
# CHECK-NEXT: 2 .bbb 00000010
19-
# CHECK-NEXT: 3 .ccc 00000018
20-
# CHECK: SYMBOL TABLE:
21-
# CHECK-NEXT: .text 00000000 _start
22-
# CHECK-NEXT: 0000000000000008 *ABS* 00000000 _aaa
23-
# CHECK-NEXT: 0000000000000010 *ABS* 00000000 _bbb
24-
# CHECK-NEXT: 0000000000000018 *ABS* 00000000 _ccc
13+
# RUN: ld.lld -T %t.script %t.o -o %t
14+
# RUN: llvm-readelf -S -s %t | FileCheck %s
2515

26-
## SIZEOF(.nonexistent_section) should return 0.
27-
# RUN: echo "SECTIONS { \
28-
# RUN: .aaa : { *(.aaa) } \
29-
# RUN: .bbb : { *(.bbb) } \
30-
# RUN: .ccc : { *(.ccc) } \
31-
# RUN: _aaa = SIZEOF(.foo); \
32-
# RUN: }" > %t.script
33-
# RUN: ld.lld -o %t1 --script %t.script %t
34-
# RUN: llvm-objdump -t -section-headers %t1 | FileCheck -check-prefix=CHECK2 %s
16+
# CHECK: Name Type Address Off Size
17+
# CHECK: .aaa PROGBITS 0000000000000000 001000 000008
18+
# CHECK-NEXT: .bbb PROGBITS 0000000000000008 001008 000010
19+
# CHECK-NEXT: .ccc PROGBITS 0000000000000018 001018 000018
3520

36-
# CHECK2: 0000000000000000 *ABS* 00000000 _aaa
21+
# CHECK: Value Size Type Bind Vis Ndx Name
22+
# CHECK: 0000000000000008 0 NOTYPE GLOBAL DEFAULT ABS _aaa
23+
# CHECK-NEXT: 0000000000000010 0 NOTYPE GLOBAL DEFAULT ABS _bbb
24+
# CHECK-NEXT: 0000000000000018 0 NOTYPE GLOBAL DEFAULT ABS _ccc
25+
## SIZEOF(.not_exist) has a value of 0.
26+
# CHECK-NEXT: 0000000000000000 0 NOTYPE GLOBAL DEFAULT ABS _ddd
3727

3828
.global _start
3929
_start:

lld/test/ELF/linkerscript/sizeofheaders.s

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# REQUIRES: x86
2-
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
2+
# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
33
# RUN: echo " SECTIONS { \
44
# RUN: . = SIZEOF_HEADERS; \
55
# RUN: _size = SIZEOF_HEADERS; \
66
# RUN: .text : {*(.text*)} \
77
# RUN: }" > %t.script
8-
# RUN: ld.lld -o %t1 --script %t.script %t
9-
# RUN: llvm-objdump -t %t1 | FileCheck %s
8+
# RUN: ld.lld -o %t --script %t.script %t.o
9+
# RUN: llvm-readelf -s %t | FileCheck %s
1010

11-
#CHECK: SYMBOL TABLE:
12-
#CHECK-NEXT: 00000000000000e8 .text 00000000 _start
13-
#CHECK-NEXT: 00000000000000e8 *ABS* 00000000 _size
11+
# CHECK: Value Size Type Bind Vis Ndx Name
12+
# CHECK: 00000000000000e8 0 NOTYPE GLOBAL DEFAULT 1 _start
13+
# CHECK-NEXT: 00000000000000e8 0 NOTYPE GLOBAL DEFAULT ABS _size
1414

1515
.global _start
1616
_start:

0 commit comments

Comments
 (0)