Skip to content

Commit ff33972

Browse files
author
George Rimar
committed
[LLD] - Update the test cases after yaml2obj change.
https://reviews.llvm.org/D60122 (r357595) changed the symbols description format. This change updates the LLD tests. llvm-svn: 357596
1 parent 6da44ad commit ff33972

37 files changed

+281
-296
lines changed

lld/test/ELF/Inputs/bad-reloc-target.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ Sections:
1717
Symbol: foo
1818
Type: R_X86_64_64
1919
Symbols:
20-
Global:
21-
- Name: foo
20+
- Name: foo
21+
Binding: STB_GLOBAL

lld/test/ELF/Inputs/shf-info-link.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ Sections:
1717
Symbol: foo
1818
Type: R_X86_64_64
1919
Symbols:
20-
Global:
21-
- Name: foo
20+
- Name: foo
21+
Binding: STB_GLOBAL

lld/test/ELF/arm-thumb-undefined-weak-narrow.test

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,16 @@ Sections:
3333
Type: R_ARM_THM_JUMP11
3434

3535
Symbols:
36-
Global:
37-
- Type: STT_FUNC
38-
Name: _start
39-
Value: 1
40-
Section: .text
41-
Local:
42-
- Type: STT_NOTYPE
43-
Name: "$t"
44-
Section: .text
45-
Value: 0
46-
Weak:
47-
- Type: STT_NOTYPE
48-
Name: undefined_weak
49-
Value: 0
50-
36+
- Type: STT_NOTYPE
37+
Name: "$t"
38+
Section: .text
39+
Value: 0
40+
- Type: STT_FUNC
41+
Name: _start
42+
Value: 1
43+
Section: .text
44+
Binding: STB_GLOBAL
45+
- Type: STT_NOTYPE
46+
Name: undefined_weak
47+
Value: 0
48+
Binding: STB_WEAK

lld/test/ELF/arm-v4bx.test

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@ Sections:
2929
- Offset: 0x0000000000000000
3030
Type: R_ARM_V4BX
3131
Symbols:
32-
Global:
33-
- Name: _start
34-
Section: .text
35-
Local:
36-
- Name: .text
37-
Type: STT_SECTION
38-
Section: .text
39-
DynamicSymbols:
32+
- Name: .text
33+
Type: STT_SECTION
34+
Section: .text
35+
- Name: _start
36+
Section: .text
37+
Binding: STB_GLOBAL

lld/test/ELF/bad-reloc-target.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ Sections:
2525
Symbol: foo
2626
Type: R_X86_64_64
2727
Symbols:
28-
Global:
29-
- Name: foo
28+
- Name: foo
29+
Binding: STB_GLOBAL

lld/test/ELF/debug-relocation-none.test

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ Sections:
5252
Content: '0111001017000000'
5353

5454
Symbols:
55-
Global:
56-
- Name: _start
57-
Section: .text
58-
- Name: bar
55+
- Name: _start
56+
Section: .text
57+
Binding: STB_GLOBAL
58+
- Name: bar
59+
Binding: STB_GLOBAL

lld/test/ELF/i386-debug-noabs.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ Sections:
2929
Symbol: _GLOBAL_OFFSET_TABLE_
3030
Type: R_386_GOTPC
3131
Symbols:
32-
Global:
33-
- Name: _GLOBAL_OFFSET_TABLE_
32+
- Name: _GLOBAL_OFFSET_TABLE_
33+
Binding: STB_GLOBAL

lld/test/ELF/i386-pc16.test

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ Sections:
3232
Symbol: _start
3333
Type: R_386_PC16
3434
Symbols:
35-
Global:
36-
- Name: _start
37-
Type: STT_FUNC
38-
Section: .text
39-
Value: 0x1234
40-
Size: 4
35+
- Name: _start
36+
Type: STT_FUNC
37+
Section: .text
38+
Value: 0x1234
39+
Size: 4
40+
Binding: STB_GLOBAL

lld/test/ELF/icf11.test

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ Sections:
4343
Symbol: zed
4444
Type: R_X86_64_64
4545
Symbols:
46-
Global:
47-
- Name: zed
48-
Type: STT_FUNC
49-
Section: .text
50-
Value: 0x0
51-
Size: 8
46+
- Name: zed
47+
Type: STT_FUNC
48+
Section: .text
49+
Value: 0x0
50+
Size: 8
51+
Binding: STB_GLOBAL

lld/test/ELF/invalid-relocations.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Sections:
1717
Symbol: lulz
1818
Type: R_X86_64_PC32
1919
Symbols:
20-
Global:
21-
- Name: lulz
20+
- Name: lulz
21+
Binding: STB_GLOBAL
2222

2323
# CHECK: invalid relocated section index

lld/test/ELF/invalid-undef-section-symbol.test

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@ Sections:
2222
Symbol: .text
2323
Type: R_X86_64_NONE
2424
Symbols:
25-
Local:
26-
- Name: .text
27-
Type: STT_SECTION
25+
- Name: .text
26+
Type: STT_SECTION

lld/test/ELF/invalid/broken-relaxation-x64.test

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ Sections:
3838
Symbol: foo
3939
Type: R_X86_64_GOTTPOFF
4040
Symbols:
41-
Global:
42-
- Name: foo
43-
Type: STT_TLS
44-
Section: .text
45-
Value: 0x12345
46-
Size: 4
41+
- Name: foo
42+
Type: STT_TLS
43+
Section: .text
44+
Value: 0x12345
45+
Size: 4
46+
Binding: STB_GLOBAL
47+

lld/test/ELF/invalid/comdat-broken.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ Sections:
2121
- SectionOrType: 0xFF
2222
- SectionOrType: 3
2323
Symbols:
24-
Global:
25-
- Name: foo
24+
- Name: foo
25+
Binding: STB_GLOBAL

lld/test/ELF/invalid/common-symbol-alignment.test

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ FileHeader:
1111
Type: ET_REL
1212
Machine: EM_X86_64
1313
Symbols:
14-
Global:
15-
- Name: bar
16-
Type: STT_FUNC
17-
Index: SHN_COMMON
14+
- Name: bar
15+
Type: STT_FUNC
16+
Index: SHN_COMMON
17+
Binding: STB_GLOBAL
1818

1919
## If an object contains a common symbol with alignment greater
2020
## than UINT32_MAX, check we report it.
@@ -29,8 +29,8 @@ FileHeader:
2929
Type: ET_REL
3030
Machine: EM_X86_64
3131
Symbols:
32-
Global:
33-
- Name: bar
34-
Type: STT_FUNC
35-
Index: SHN_COMMON
36-
Value: 0x0000003F3F3F3F3F
32+
- Name: bar
33+
Type: STT_FUNC
34+
Index: SHN_COMMON
35+
Value: 0x0000003F3F3F3F3F
36+
Binding: STB_GLOBAL

lld/test/ELF/invalid/ehframe-broken-relocation.test

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ Sections:
2323
Symbol: zed
2424
Type: R_X86_64_64
2525
Symbols:
26-
Global:
27-
- Name: zed
28-
Type: STT_FUNC
29-
Section: .eh_frame
30-
Value: 0x0
31-
Size: 8
26+
- Name: zed
27+
Type: STT_FUNC
28+
Section: .eh_frame
29+
Value: 0x0
30+
Size: 8
31+
Binding: STB_GLOBAL

lld/test/ELF/invalid/invalid-debug-relocations.test

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ Sections:
3333
Symbol: _start
3434
Type: 0xFF
3535
Symbols:
36-
Global:
37-
- Name: _start
38-
Type: STT_FUNC
39-
Section: .text
40-
Value: 0x0
36+
- Name: _start
37+
Type: STT_FUNC
38+
Section: .text
39+
Value: 0x0
40+
Binding: STB_GLOBAL

lld/test/ELF/invalid/invalid-relocation-x64.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ Sections:
2929
Symbol: foo
3030
Type: 0x99
3131
Symbols:
32-
Global:
33-
- Name: foo
32+
- Name: foo
33+
Binding: STB_GLOBAL

lld/test/ELF/invalid/reloc-section-reordered.test

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Sections:
2929
AddressAlign: 0x04
3030
Content: "FFFFFFFFFFFFFFFF"
3131
Symbols:
32-
Local:
33-
- Name: .text
34-
Type: STT_SECTION
35-
Section: .text
32+
- Name: .text
33+
Type: STT_SECTION
34+
Section: .text

lld/test/ELF/invalid/sht-group-wrong-section.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ Sections:
1818
- SectionOrType: GRP_COMDAT
1919
- SectionOrType: 12345
2020
Symbols:
21-
Global:
22-
- Name: foo
21+
- Name: foo
22+
Binding: STB_GLOBAL

lld/test/ELF/invalid/symtab-sh-info.s

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Sections:
1616
Info: 0
1717
Type: SHT_SYMTAB
1818
Symbols:
19-
Global:
20-
- Name: foo
19+
- Name: foo
20+
Binding: STB_GLOBAL
2121

2222
## sh_info has value 2 what says that non-local symbol `foo` is local.
2323
## Check we report this case.
@@ -36,8 +36,8 @@ Sections:
3636
Info: 2
3737
Type: SHT_SYMTAB
3838
Symbols:
39-
Global:
40-
- Name: foo
39+
- Name: foo
40+
Binding: STB_GLOBAL
4141

4242
## sh_info has value 0xff what is larger than number of symbols in a .symtab.
4343
## Check we report this case.
@@ -55,5 +55,5 @@ Sections:
5555
Info: 0xff
5656
Type: SHT_SYMTAB
5757
Symbols:
58-
Global:
59-
- Name: foo
58+
- Name: foo
59+
Binding: STB_GLOBAL

lld/test/ELF/invalid/symtab-symbols.test

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@ Sections:
2020
AddressAlign: 0x0000000000000010
2121
Content: "00000000"
2222
Symbols:
23-
Local:
24-
- Type: STT_NOTYPE
25-
Section: .symtab
23+
- Type: STT_NOTYPE
24+
Section: .symtab

lld/test/ELF/invalid/tls-symbol.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Sections:
1818
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
1919
Content: ''
2020
Symbols:
21-
Global:
22-
- Name: bar
23-
Type: STT_TLS
24-
Section: .text
21+
- Name: bar
22+
Type: STT_TLS
23+
Section: .text
24+
Binding: STB_GLOBAL

lld/test/ELF/invalid/undefined-local-symbol-in-dso.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ Sections:
2323
Info: 1
2424
Type: SHT_SYMTAB
2525
DynamicSymbols:
26-
Local:
27-
- Name: foo
26+
- Name: foo

lld/test/ELF/mips-jalr.test

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,14 @@ Sections:
3838
Type: R_MIPS_JALR
3939

4040
Symbols:
41-
Local:
42-
- Name: T1
43-
Type: STT_FUNC
44-
Section: .text
45-
Value: 0
46-
Size: 4
47-
Global:
48-
- Name: __start
49-
Type: STT_FUNC
50-
Section: .text
51-
Value: 0
52-
Size: 4
41+
- Name: T1
42+
Type: STT_FUNC
43+
Section: .text
44+
Value: 0
45+
Size: 4
46+
- Name: __start
47+
Type: STT_FUNC
48+
Section: .text
49+
Value: 0
50+
Size: 4
51+
Binding: STB_GLOBAL

lld/test/ELF/relocation-b-aarch64.test

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,11 @@ Sections:
3737
Type: R_AARCH64_JUMP26
3838

3939
Symbols:
40-
Local:
41-
- Type: STT_FUNC
42-
Section: .text
43-
Name: foo
44-
Value: 0
45-
- Type: STT_FUNC
46-
Section: .text
47-
Name: bar
48-
Value: 4
40+
- Type: STT_FUNC
41+
Section: .text
42+
Name: foo
43+
Value: 0
44+
- Type: STT_FUNC
45+
Section: .text
46+
Name: bar
47+
Value: 4

lld/test/ELF/relocation-group.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ Sections:
3939
Symbol: foo
4040
Type: R_X86_64_64
4141
Symbols:
42-
Global:
43-
- Name: foo
42+
- Name: foo
43+
Binding: STB_GLOBAL

0 commit comments

Comments
 (0)