diff options
Diffstat (limited to 'llvm/test/tools')
96 files changed, 1104 insertions, 1015 deletions
diff --git a/llvm/test/tools/llvm-ar/Inputs/add-lib1.yaml b/llvm/test/tools/llvm-ar/Inputs/add-lib1.yaml index 7ae9fd95a62..9c75630a42f 100644 --- a/llvm/test/tools/llvm-ar/Inputs/add-lib1.yaml +++ b/llvm/test/tools/llvm-ar/Inputs/add-lib1.yaml @@ -20,11 +20,10 @@ Sections: AddressAlign: 0x0000000000000001 Content: '' Symbols: - Global: - - Name: lib1 - Index: SHN_ABS - Value: 0x1234 - Local: - - Name: '-' - Type: STT_FILE + - Name: '-' + Type: STT_FILE + - Name: lib1 + Index: SHN_ABS + Value: 0x1234 + Binding: STB_GLOBAL ... diff --git a/llvm/test/tools/llvm-ar/Inputs/add-lib2.yaml b/llvm/test/tools/llvm-ar/Inputs/add-lib2.yaml index 8d224b95a4d..8027fff4f44 100644 --- a/llvm/test/tools/llvm-ar/Inputs/add-lib2.yaml +++ b/llvm/test/tools/llvm-ar/Inputs/add-lib2.yaml @@ -20,11 +20,10 @@ Sections: AddressAlign: 0x0000000000000001 Content: '' Symbols: - Global: - - Name: lib2 - Index: SHN_ABS - Value: 0x1234 - Local: - - Name: '-' - Type: STT_FILE + - Name: '-' + Type: STT_FILE + - Name: lib2 + Index: SHN_ABS + Value: 0x1234 + Binding: STB_GLOBAL ... diff --git a/llvm/test/tools/llvm-ar/Inputs/add-lib3.yaml b/llvm/test/tools/llvm-ar/Inputs/add-lib3.yaml index 0f1cfe7d806..9cc9dba8850 100644 --- a/llvm/test/tools/llvm-ar/Inputs/add-lib3.yaml +++ b/llvm/test/tools/llvm-ar/Inputs/add-lib3.yaml @@ -20,11 +20,10 @@ Sections: AddressAlign: 0x0000000000000001 Content: '' Symbols: - Global: - - Name: lib3 - Index: SHN_ABS - Value: 0x1234 - Local: - - Name: '-' - Type: STT_FILE + - Name: '-' + Type: STT_FILE + - Name: lib3 + Index: SHN_ABS + Value: 0x1234 + Binding: STB_GLOBAL ... diff --git a/llvm/test/tools/llvm-ar/Inputs/elf.yaml b/llvm/test/tools/llvm-ar/Inputs/elf.yaml index 2651e68f78f..b124b295b8a 100644 --- a/llvm/test/tools/llvm-ar/Inputs/elf.yaml +++ b/llvm/test/tools/llvm-ar/Inputs/elf.yaml @@ -20,7 +20,6 @@ Sections: AddressAlign: 0x0000000000000001 Content: '' Symbols: - Local: - - Name: '-' - Type: STT_FILE + - Name: '-' + Type: STT_FILE ... diff --git a/llvm/test/tools/llvm-objcopy/ELF/Inputs/compress-debug-sections.yaml b/llvm/test/tools/llvm-objcopy/ELF/Inputs/compress-debug-sections.yaml index 8da77b36a37..04855e0d2f6 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/Inputs/compress-debug-sections.yaml +++ b/llvm/test/tools/llvm-objcopy/ELF/Inputs/compress-debug-sections.yaml @@ -44,15 +44,18 @@ Sections: Flags: [ SHF_GROUP ] Content: '00' Symbols: - Global: - - Name: .debug_foo - Type: STT_SECTION - Section: .debug_foo - - Name: .notdebug_foo - Type: STT_SECTION - Section: .notdebug_foo - - Name: .Linfo_string0 - Section: .debug_bar - - Name: groupname - Section: .group + - Name: .debug_foo + Type: STT_SECTION + Section: .debug_foo + Binding: STB_GLOBAL + - Name: .notdebug_foo + Type: STT_SECTION + Section: .notdebug_foo + Binding: STB_GLOBAL + - Name: .Linfo_string0 + Section: .debug_bar + Binding: STB_GLOBAL + - Name: groupname + Section: .group + Binding: STB_GLOBAL ... diff --git a/llvm/test/tools/llvm-objcopy/ELF/abs-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/abs-symbol.test index 5f2536d1df9..62c5873ba55 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/abs-symbol.test +++ b/llvm/test/tools/llvm-objcopy/ELF/abs-symbol.test @@ -9,10 +9,10 @@ FileHeader: Type: ET_EXEC Machine: EM_X86_64 Symbols: - Global: - - Name: test - Index: SHN_ABS - Value: 0x1234 + - Name: test + Index: SHN_ABS + Value: 0x1234 + Binding: STB_GLOBAL #CHECK: Symbols [ #CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/armexidx-link.test b/llvm/test/tools/llvm-objcopy/ELF/armexidx-link.test index 596a7807ee7..734f43632f8 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/armexidx-link.test +++ b/llvm/test/tools/llvm-objcopy/ELF/armexidx-link.test @@ -36,13 +36,12 @@ Sections: AddressAlign: 0x0000000000000004 Content: '' Symbols: - Local: - - Name: .text.bar - Type: STT_SECTION - Section: .text.bar - - Name: .text.foo - Type: STT_SECTION - Section: .text.foo - - Name: .ARM.exidx.text.foo - Type: STT_SECTION - Section: .ARM.exidx.text.foo + - Name: .text.bar + Type: STT_SECTION + Section: .text.bar + - Name: .text.foo + Type: STT_SECTION + Section: .text.foo + - Name: .ARM.exidx.text.foo + Type: STT_SECTION + Section: .ARM.exidx.text.foo diff --git a/llvm/test/tools/llvm-objcopy/ELF/basic-archive-copy.test b/llvm/test/tools/llvm-objcopy/ELF/basic-archive-copy.test index 6d7e86c7e99..ada141471fb 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/basic-archive-copy.test +++ b/llvm/test/tools/llvm-objcopy/ELF/basic-archive-copy.test @@ -47,11 +47,11 @@ Sections: AddressAlign: 0x0000000000000010 Content: "00000000" Symbols: - Global: - - Name: foo - Type: STT_FUNC - Section: .text - Value: 0x1004 + - Name: foo + Type: STT_FUNC + Section: .text + Value: 0x1004 + Binding: STB_GLOBAL # CHECK: Type: SHT_NULL diff --git a/llvm/test/tools/llvm-objcopy/ELF/basic-relocations.test b/llvm/test/tools/llvm-objcopy/ELF/basic-relocations.test index e043041ba5d..ac1831a23e1 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/basic-relocations.test +++ b/llvm/test/tools/llvm-objcopy/ELF/basic-relocations.test @@ -56,24 +56,28 @@ Sections: Type: R_X86_64_PC32 Addend: 0x13 Symbols: - Global: - - Name: _start - Type: STT_FUNC - Section: .text - Value: 0x1000 - Size: 4 - - Name: foo - Type: STT_FUNC - Size: 4 - - Name: fooA - Type: STT_FUNC - Size: 4 - - Name: bar - Type: STT_OBJECT - Size: 4 - - Name: barA - Type: STT_OBJECT - Size: 4 + - Name: _start + Type: STT_FUNC + Section: .text + Value: 0x1000 + Size: 4 + Binding: STB_GLOBAL + - Name: foo + Type: STT_FUNC + Size: 4 + Binding: STB_GLOBAL + - Name: fooA + Type: STT_FUNC + Size: 4 + Binding: STB_GLOBAL + - Name: bar + Type: STT_OBJECT + Size: 4 + Binding: STB_GLOBAL + - Name: barA + Type: STT_OBJECT + Size: 4 + Binding: STB_GLOBAL # CHECK: Relocations [ # CHECK-NEXT: Section (2) .rel.text { diff --git a/llvm/test/tools/llvm-objcopy/ELF/common-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/common-symbol.test index 9ec49c71165..42d563975d1 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/common-symbol.test +++ b/llvm/test/tools/llvm-objcopy/ELF/common-symbol.test @@ -9,22 +9,26 @@ FileHeader: Type: ET_EXEC Machine: EM_HEXAGON Symbols: - Global: - - Name: test - Index: SHN_COMMON - Value: 0x1234 - - Name: test2 - Index: SHN_HEXAGON_SCOMMON - Value: 0x1235 - - Name: test3 - Index: SHN_HEXAGON_SCOMMON_2 - Value: 0x1236 - - Name: test4 - Index: SHN_HEXAGON_SCOMMON_4 - Value: 0x1237 - - Name: test5 - Index: SHN_HEXAGON_SCOMMON_8 - Value: 0x1238 + - Name: test + Index: SHN_COMMON + Value: 0x1234 + Binding: STB_GLOBAL + - Name: test2 + Index: SHN_HEXAGON_SCOMMON + Value: 0x1235 + Binding: STB_GLOBAL + - Name: test3 + Index: SHN_HEXAGON_SCOMMON_2 + Value: 0x1236 + Binding: STB_GLOBAL + - Name: test4 + Index: SHN_HEXAGON_SCOMMON_4 + Value: 0x1237 + Binding: STB_GLOBAL + - Name: test5 + Index: SHN_HEXAGON_SCOMMON_8 + Value: 0x1238 + Binding: STB_GLOBAL #CHECK: Symbols [ #CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test b/llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test index feb532046f5..3cb0d4eab11 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test +++ b/llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test @@ -53,15 +53,16 @@ Sections: Type: SHT_PROGBITS Flags: [ SHF_ALLOC ] Symbols: - Global: - - Name: foo - Type: STT_FUNC - Section: .text - Value: 0x1234 - - Name: bar - Type: STT_OBJECT - Section: .data - Value: 0xabcd + - Name: foo + Type: STT_FUNC + Section: .text + Value: 0x1234 + Binding: STB_GLOBAL + - Name: bar + Type: STT_OBJECT + Section: .data + Value: 0xabcd + Binding: STB_GLOBAL # CHECK: Format: # 32-SAME: ELF32- diff --git a/llvm/test/tools/llvm-objcopy/ELF/cross-arch-sections-symbols.test b/llvm/test/tools/llvm-objcopy/ELF/cross-arch-sections-symbols.test index fa5832b9dfe..d2da14e60a4 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/cross-arch-sections-symbols.test +++ b/llvm/test/tools/llvm-objcopy/ELF/cross-arch-sections-symbols.test @@ -22,16 +22,17 @@ Sections: Content: DEADBEEF Size: 16 Symbols: - Global: - - Name: foo - Type: STT_FUNC - Section: .text - Value: 16 - Size: 8 - - Name: bar - Type: STT_OBJECT - Section: .data - Size: 16 + - Name: foo + Type: STT_FUNC + Section: .text + Value: 16 + Size: 8 + Binding: STB_GLOBAL + - Name: bar + Type: STT_OBJECT + Section: .data + Size: 16 + Binding: STB_GLOBAL # CHECK: Sections [ # CHECK-NEXT: Section { diff --git a/llvm/test/tools/llvm-objcopy/ELF/discard-all.test b/llvm/test/tools/llvm-objcopy/ELF/discard-all.test index cc676b59f59..f27c1617996 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/discard-all.test +++ b/llvm/test/tools/llvm-objcopy/ELF/discard-all.test @@ -33,29 +33,28 @@ Sections: AddressAlign: 0x0000000000000010 Size: 64 Symbols: - Local: - - Name: Local - Type: STT_FUNC - Section: .text - Value: 0x1000 - Size: 8 - - Name: LocalSection - Type: STT_SECTION - Section: .text - - Name: LocalFile - Type: STT_FILE - Weak: - - Name: Weak - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1008 - Global: - - Name: Global - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1010 + - Name: Local + Type: STT_FUNC + Section: .text + Value: 0x1000 + Size: 8 + - Name: LocalSection + Type: STT_SECTION + Section: .text + - Name: LocalFile + Type: STT_FILE + - Name: Global + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1010 + Binding: STB_GLOBAL + - Name: Weak + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1008 + Binding: STB_WEAK #CHECK: Symbols [ #CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test b/llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test index 05e1acf6b1d..8ae941faeea 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test +++ b/llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test @@ -19,9 +19,8 @@ Sections: Symbol: .L.rel Type: R_X86_64_PC32 Symbols: - Local: - - Name: .L.rel - Type: STT_FUNC - Section: .text + - Name: .L.rel + Type: STT_FUNC + Section: .text # CHECK: not stripping symbol '.L.rel' because it is named in a relocation. diff --git a/llvm/test/tools/llvm-objcopy/ELF/discard-locals.test b/llvm/test/tools/llvm-objcopy/ELF/discard-locals.test index be489a2f0de..ef8a293f0df 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/discard-locals.test +++ b/llvm/test/tools/llvm-objcopy/ELF/discard-locals.test @@ -32,27 +32,26 @@ Sections: - Name: .LLVM.Custom.Section Type: SHT_PROGBITS Symbols: - Local: - - Name: Local - Type: STT_FUNC - Section: .text - - Name: .L.LocalSection - Type: STT_SECTION - Section: .text - - Type: STT_SECTION - Section: .LLVM.Custom.Section - - Name: .L.LocalFile - Type: STT_FILE - - Name: .L.str - Type: STT_OBJECT - Section: .text - - Name: .L.undefined - - Name: .L.abs - Index: SHN_ABS - Global: - - Name: .L.Global - Type: STT_FUNC - Section: .text + - Name: Local + Type: STT_FUNC + Section: .text + - Name: .L.LocalSection + Type: STT_SECTION + Section: .text + - Type: STT_SECTION + Section: .LLVM.Custom.Section + - Name: .L.LocalFile + Type: STT_FILE + - Name: .L.str + Type: STT_OBJECT + Section: .text + - Name: .L.undefined + - Name: .L.abs + Index: SHN_ABS + - Name: .L.Global + Type: STT_FUNC + Section: .text + Binding: STB_GLOBAL # CHECK: Symbols [ # CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/discard-mix-local-and-all.test b/llvm/test/tools/llvm-objcopy/ELF/discard-mix-local-and-all.test index f9e0613eecf..8bb39f6a615 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/discard-mix-local-and-all.test +++ b/llvm/test/tools/llvm-objcopy/ELF/discard-mix-local-and-all.test @@ -55,17 +55,16 @@ Sections: - Name: .text Type: SHT_PROGBITS Symbols: - Local: - - Name: Local - Type: STT_FUNC - Section: .text - - Name: .L.str - Type: STT_OBJECT - Section: .text - Global: - - Name: Global - Type: STT_FUNC - Section: .text + - Name: Local + Type: STT_FUNC + Section: .text + - Name: .L.str + Type: STT_OBJECT + Section: .text + - Name: Global + Type: STT_FUNC + Section: .text + Binding: STB_GLOBAL # CHECK: Symbols [ # CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/globalize.test b/llvm/test/tools/llvm-objcopy/ELF/globalize.test index bd7f38ee52d..e1dcc04186f 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/globalize.test +++ b/llvm/test/tools/llvm-objcopy/ELF/globalize.test @@ -31,25 +31,25 @@ Sections: AddressAlign: 0x0000000000000010 Size: 64 Symbols: - Local: - - Name: Local - Type: STT_FUNC - Section: .text - Value: 0x1000 - Size: 8 - Weak: - - Name: Weak - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1008 - - Name: WeakUndef - Global: - - Name: Global - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1010 + - Name: Local + Type: STT_FUNC + Section: .text + Value: 0x1000 + Size: 8 + - Name: Global + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1010 + Binding: STB_GLOBAL + - Name: Weak + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1008 + Binding: STB_WEAK + - Name: WeakUndef + Binding: STB_WEAK #CHECK: Symbols [ #CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/group-addr-misaligned.test b/llvm/test/tools/llvm-objcopy/ELF/group-addr-misaligned.test index 43a6028ca67..a954e08194f 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/group-addr-misaligned.test +++ b/llvm/test/tools/llvm-objcopy/ELF/group-addr-misaligned.test @@ -33,6 +33,5 @@ Sections: Flags: [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ] AddressAlign: 0x0000000000000001 Symbols: - Local: - - Name: foo - Section: .group + - Name: foo + Section: .group diff --git a/llvm/test/tools/llvm-objcopy/ELF/group-big-endian.test b/llvm/test/tools/llvm-objcopy/ELF/group-big-endian.test index dd5ca88144b..e76e6e5d207 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/group-big-endian.test +++ b/llvm/test/tools/llvm-objcopy/ELF/group-big-endian.test @@ -38,19 +38,19 @@ Sections: Flags: [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ] AddressAlign: 0x0000000000000010 Symbols: - Local: - - Name: .text.bar - Type: STT_SECTION - Section: .text.bar - - Name: .text.foo - Type: STT_SECTION - Section: .text.foo - Weak: - - Name: bar - Type: STT_FUNC - Section: .text.bar - Size: 0x0000000000000000 - - Name: foo - Type: STT_FUNC - Section: .text.foo - Size: 0x0000000000000000 + - Name: .text.bar + Type: STT_SECTION + Section: .text.bar + - Name: .text.foo + Type: STT_SECTION + Section: .text.foo + - Name: bar + Type: STT_FUNC + Section: .text.bar + Size: 0x0000000000000000 + Binding: STB_WEAK + - Name: foo + Type: STT_FUNC + Section: .text.foo + Size: 0x0000000000000000 + Binding: STB_WEAK diff --git a/llvm/test/tools/llvm-objcopy/ELF/group-unchanged.test b/llvm/test/tools/llvm-objcopy/ELF/group-unchanged.test index 31fba11adca..f5f74b414bb 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/group-unchanged.test +++ b/llvm/test/tools/llvm-objcopy/ELF/group-unchanged.test @@ -38,19 +38,19 @@ Sections: Flags: [ SHF_ALLOC, SHF_EXECINSTR ] AddressAlign: 0x0000000000000010 Symbols: - Local: - - Name: .text.foo - Type: STT_SECTION - Section: .text.foo - - Name: .text.bar - Type: STT_SECTION - Section: .text.bar - Weak: - - Name: foo - Type: STT_FUNC - Section: .text.foo - Size: 0x0000000000000000 - - Name: bar - Type: STT_FUNC - Section: .text.bar - Size: 0x0000000000000000 + - Name: .text.foo + Type: STT_SECTION + Section: .text.foo + - Name: .text.bar + Type: STT_SECTION + Section: .text.bar + - Name: foo + Type: STT_FUNC + Section: .text.foo + Size: 0x0000000000000000 + Binding: STB_WEAK + - Name: bar + Type: STT_FUNC + Section: .text.bar + Size: 0x0000000000000000 + Binding: STB_WEAK diff --git a/llvm/test/tools/llvm-objcopy/ELF/group.test b/llvm/test/tools/llvm-objcopy/ELF/group.test index 2e058f5d6a5..ea84f25eb0f 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/group.test +++ b/llvm/test/tools/llvm-objcopy/ELF/group.test @@ -38,19 +38,19 @@ Sections: Flags: [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ] AddressAlign: 0x0000000000000010 Symbols: - Local: - - Name: .text.bar - Type: STT_SECTION - Section: .text.bar - - Name: .text.foo - Type: STT_SECTION - Section: .text.foo - Weak: - - Name: bar - Type: STT_FUNC - Section: .text.bar - Size: 0x0000000000000000 - - Name: foo - Type: STT_FUNC - Section: .text.foo - Size: 0x0000000000000000 + - Name: .text.bar + Type: STT_SECTION + Section: .text.bar + - Name: .text.foo + Type: STT_SECTION + Section: .text.foo + - Name: bar + Type: STT_FUNC + Section: .text.bar + Size: 0x0000000000000000 + Binding: STB_WEAK + - Name: foo + Type: STT_FUNC + Section: .text.foo + Size: 0x0000000000000000 + Binding: STB_WEAK diff --git a/llvm/test/tools/llvm-objcopy/ELF/hexagon-unsupported-on-x86.test b/llvm/test/tools/llvm-objcopy/ELF/hexagon-unsupported-on-x86.test index dab5eedf695..9787e6b6ab5 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/hexagon-unsupported-on-x86.test +++ b/llvm/test/tools/llvm-objcopy/ELF/hexagon-unsupported-on-x86.test @@ -8,8 +8,8 @@ FileHeader: Type: ET_EXEC Machine: EM_X86_64 Symbols: - Global: - - Name: test - Index: SHN_HEXAGON_SCOMMON + - Name: test + Index: SHN_HEXAGON_SCOMMON + Binding: STB_GLOBAL # CHECK: Symbol 'test' has unsupported value greater than or equal to SHN_LORESERVE: 65280 diff --git a/llvm/test/tools/llvm-objcopy/ELF/keep-file-symbols.test b/llvm/test/tools/llvm-objcopy/ELF/keep-file-symbols.test index 3655f39512d..86674f1eb2d 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/keep-file-symbols.test +++ b/llvm/test/tools/llvm-objcopy/ELF/keep-file-symbols.test @@ -23,14 +23,13 @@ Sections: AddressAlign: 0x0000000000000010 Size: 64 Symbols: - Local: - - Name: foo - Type: STT_FILE - Section: .text - Global: - - Name: bar - Type: STT_FUNC - Section: .text + - Name: foo + Type: STT_FILE + Section: .text + - Name: bar + Type: STT_FUNC + Section: .text + Binding: STB_GLOBAL #STRIPALL: Symbols [ #STRIPALL-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test b/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test index bc5cba6f921..b227407f414 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test +++ b/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test @@ -24,21 +24,22 @@ Sections: Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_EXECINSTR ] Symbols: - Local: - - Name: Local1 - Section: .text - - Name: Local2 - Section: .text - Weak: - - Name: Weak1 - Section: .text - - Name: Weak2 - Section: .text - Global: - - Name: Global1 - Section: .text - - Name: Global2 - Section: .text + - Name: Local1 + Section: .text + - Name: Local2 + Section: .text + - Name: Global1 + Section: .text + Binding: STB_GLOBAL + - Name: Global2 + Section: .text + Binding: STB_GLOBAL + - Name: Weak1 + Section: .text + Binding: STB_WEAK + - Name: Weak2 + Section: .text + Binding: STB_WEAK # CHECK: Symbol table '.symtab' contains 7 entries: # CHECK-NEXT: Num: Value Size Type Bind Vis Ndx Name diff --git a/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols.test b/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols.test index e0b36bad402..52707fc774f 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols.test +++ b/llvm/test/tools/llvm-objcopy/ELF/keep-global-symbols.test @@ -56,34 +56,42 @@ Sections: Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_EXECINSTR ] Symbols: - Local: - - Name: Local1 - Section: .text - - Name: Local2 - Section: .text - Weak: - - Name: Weak1 - Section: .text - - Name: Weak2 - Section: .text - - Name: Weak3 - Section: .text - Global: - - Name: Global1 - Section: .text - - Name: Global2 - Section: .text - - Name: Global3 - Section: .text - - Name: Global4 - Section: .text - - Name: Global5 - Section: .text - - Name: Global6 - Section: .text - - Name: "Global5 Global6" - Section: .text - - Name: Global7 + - Name: Local1 + Section: .text + - Name: Local2 + Section: .text + - Name: Global1 + Section: .text + Binding: STB_GLOBAL + - Name: Global2 + Section: .text + Binding: STB_GLOBAL + - Name: Global3 + Section: .text + Binding: STB_GLOBAL + - Name: Global4 + Section: .text + Binding: STB_GLOBAL + - Name: Global5 + Section: .text + Binding: STB_GLOBAL + - Name: Global6 + Section: .text + Binding: STB_GLOBAL + - Name: "Global5 Global6" + Section: .text + Binding: STB_GLOBAL + - Name: Global7 + Binding: STB_GLOBAL + - Name: Weak1 + Section: .text + Binding: STB_WEAK + - Name: Weak2 + Section: .text + Binding: STB_WEAK + - Name: Weak3 + Section: .text + Binding: STB_WEAK # CHECK: Symbol table '.symtab' contains 14 entries: # CHECK-NEXT: Num: Value Size Type Bind Vis Ndx Name diff --git a/llvm/test/tools/llvm-objcopy/ELF/keep-symbol-remove-section.test b/llvm/test/tools/llvm-objcopy/ELF/keep-symbol-remove-section.test index 2dbfb2c8c86..8b5fc970858 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/keep-symbol-remove-section.test +++ b/llvm/test/tools/llvm-objcopy/ELF/keep-symbol-remove-section.test @@ -16,12 +16,11 @@ Sections: AddressAlign: 0x0000000000000010 Size: 64 Symbols: - Local: - - Name: foo - Type: STT_FUNC - Section: .text - Value: 0x1000 - Size: 8 + - Name: foo + Type: STT_FUNC + Section: .text + Value: 0x1000 + Size: 8 #CHECK: Symbols [ #CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/keep-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/keep-symbol.test index 67b51872b4c..70a59fe1e4b 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/keep-symbol.test +++ b/llvm/test/tools/llvm-objcopy/ELF/keep-symbol.test @@ -27,22 +27,21 @@ Sections: AddressAlign: 0x0000000000000010 Size: 64 Symbols: - Local: - - Name: foo - Type: STT_FUNC - Section: .text - Value: 0x1000 - Size: 8 - - Name: bar - Type: STT_FUNC - Section: .text - Value: 0x1008 - Size: 8 - - Name: baz - Type: STT_FUNC - Section: .text - Value: 0x1010 - Size: 8 + - Name: foo + Type: STT_FUNC + Section: .text + Value: 0x1000 + Size: 8 + - Name: bar + Type: STT_FUNC + Section: .text + Value: 0x1008 + Size: 8 + - Name: baz + Type: STT_FUNC + Section: .text + Value: 0x1010 + Size: 8 #CHECK: Symbols [ #CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/localize-hidden.test b/llvm/test/tools/llvm-objcopy/ELF/localize-hidden.test index 41662003fe8..f30461b7c1a 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/localize-hidden.test +++ b/llvm/test/tools/llvm-objcopy/ELF/localize-hidden.test @@ -29,53 +29,57 @@ Sections: Symbol: undefGlobal Type: R_X86_64_PC32 Symbols: - Local: - - Name: hiddenLocal - Type: STT_FUNC - Section: .text - Value: 0x1008 - Size: 8 - Visibility: STV_HIDDEN - Weak: - - Name: hiddenWeak - Type: STT_FUNC - Section: .text - Value: 0x1010 - Size: 8 - Visibility: STV_HIDDEN - Global: - - Name: defaultGlobal - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1000 - - Name: hiddenGlobal - Type: STT_OBJECT - Section: .data - Value: 0x2006 - Size: 2 - Visibility: STV_HIDDEN - - Name: hiddenGlobalCommon - Type: STT_OBJECT - Index: SHN_COMMON - Value: 0x2006 - Size: 2 - Visibility: STV_HIDDEN - - Name: undefGlobal - Type: STT_FUNC - Size: 8 - - Name: internalGlobal - Type: STT_OBJECT - Section: .data - Value: 0x2002 - Size: 2 - Visibility: STV_INTERNAL - - Name: protectedGlobal - Type: STT_OBJECT - Section: .data - Value: 0x2000 - Size: 4 - Visibility: STV_PROTECTED + - Name: hiddenLocal + Type: STT_FUNC + Section: .text + Value: 0x1008 + Size: 8 + Visibility: STV_HIDDEN + - Name: defaultGlobal + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1000 + Binding: STB_GLOBAL + - Name: hiddenGlobal + Type: STT_OBJECT + Section: .data + Value: 0x2006 + Size: 2 + Visibility: STV_HIDDEN + Binding: STB_GLOBAL + - Name: hiddenGlobalCommon + Type: STT_OBJECT + Index: SHN_COMMON + Value: 0x2006 + Size: 2 + Visibility: STV_HIDDEN + Binding: STB_GLOBAL + - Name: undefGlobal + Type: STT_FUNC + Size: 8 + Binding: STB_GLOBAL + - Name: internalGlobal + Type: STT_OBJECT + Section: .data + Value: 0x2002 + Size: 2 + Visibility: STV_INTERNAL + Binding: STB_GLOBAL + - Name: protectedGlobal + Type: STT_OBJECT + Section: .data + Value: 0x2000 + Size: 4 + Visibility: STV_PROTECTED + Binding: STB_GLOBAL + - Name: hiddenWeak + Type: STT_FUNC + Section: .text + Value: 0x1010 + Size: 8 + Visibility: STV_HIDDEN + Binding: STB_WEAK #CHECK: Relocations [ #CHECK-NEXT: Section (3) .rel.text { diff --git a/llvm/test/tools/llvm-objcopy/ELF/localize.test b/llvm/test/tools/llvm-objcopy/ELF/localize.test index fb812317c8f..820ce1d5b60 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/localize.test +++ b/llvm/test/tools/llvm-objcopy/ELF/localize.test @@ -42,31 +42,32 @@ Sections: AddressAlign: 0x0000000000000010 Content: "0000000000000000" Symbols: - Local: - - Name: Local - Type: STT_FUNC - Section: .text - Value: 0x1000 - Size: 8 - Weak: - - Name: Weak - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1008 - Global: - - Name: Global - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1010 - - Name: GlobalUndef - Type: STT_FUNC - - Name: GlobalCommon - Type: STT_OBJECT - Index: SHN_COMMON - Value: 0x2006 - Size: 2 + - Name: Local + Type: STT_FUNC + Section: .text + Value: 0x1000 + Size: 8 + - Name: Global + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1010 + Binding: STB_GLOBAL + - Name: GlobalUndef + Type: STT_FUNC + Binding: STB_GLOBAL + - Name: GlobalCommon + Type: STT_OBJECT + Index: SHN_COMMON + Value: 0x2006 + Size: 2 + Binding: STB_GLOBAL + - Name: Weak + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1008 + Binding: STB_WEAK #CHECK: Symbols [ #CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/prefix-symbols.test b/llvm/test/tools/llvm-objcopy/ELF/prefix-symbols.test index 1e6a54a8cf8..b359e5ea754 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/prefix-symbols.test +++ b/llvm/test/tools/llvm-objcopy/ELF/prefix-symbols.test @@ -18,17 +18,16 @@ Sections: AddressAlign: 0x0000000000000010 Size: 64 Symbols: - Local: - - Name: foo - Type: STT_SECTION - Section: .text - - Name: bar - Type: STT_FILE - Section: .text - Global: - - Name: foobar - Type: STT_FUNC - Section: .text + - Name: foo + Type: STT_SECTION + Section: .text + - Name: bar + Type: STT_FILE + Section: .text + - Name: foobar + Type: STT_FUNC + Section: .text + Binding: STB_GLOBAL # COMMON: Symbols [ # COMMON-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/redefine-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/redefine-symbol.test index 8ed8c85e93d..78dd853787d 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/redefine-symbol.test +++ b/llvm/test/tools/llvm-objcopy/ELF/redefine-symbol.test @@ -33,20 +33,22 @@ Sections: AddressAlign: 0x0000000000000010 Content: "0000000000000000" Symbols: - Global: - - Name: foo - Type: STT_FUNC - Section: .text - Value: 0x1004 - - Name: bar - Type: STT_OBJECT - Section: .data - Value: 0x2000 - Size: 4 - - Name: empty - Type: STT_FUNC - Section: .text - Value: 0x1008 + - Name: foo + Type: STT_FUNC + Section: .text + Value: 0x1004 + Binding: STB_GLOBAL + - Name: bar + Type: STT_OBJECT + Section: .data + Value: 0x2000 + Size: 4 + Binding: STB_GLOBAL + - Name: empty + Type: STT_FUNC + Section: .text + Value: 0x1008 + Binding: STB_GLOBAL #CHECK: Symbols [ #CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/regex.test b/llvm/test/tools/llvm-objcopy/ELF/regex.test index 6fa590b5dc5..9baccb06483 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/regex.test +++ b/llvm/test/tools/llvm-objcopy/ELF/regex.test @@ -30,22 +30,21 @@ Sections: AddressAlign: 0x0000000000000010 Size: 64 Symbols: - Local: - - Name: foobaz - Type: STT_FUNC - Section: .text - Value: 0x1000 - Size: 8 - - Name: bar - Type: STT_FUNC - Section: .text - Value: 0x1008 - Size: 8 - - Name: rebar - Type: STT_FUNC - Section: .text - Value: 0x1010 - Size: 8 + - Name: foobaz + Type: STT_FUNC + Section: .text + Value: 0x1000 + Size: 8 + - Name: bar + Type: STT_FUNC + Section: .text + Value: 0x1008 + Size: 8 + - Name: rebar + Type: STT_FUNC + Section: .text + Value: 0x1010 + Size: 8 #REGEX1-NOT: foobaz #REGEX1-NOT: bar diff --git a/llvm/test/tools/llvm-objcopy/ELF/reloc-error-remove-symtab.test b/llvm/test/tools/llvm-objcopy/ELF/reloc-error-remove-symtab.test index 539e6ea1ce1..ff05778c6f3 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/reloc-error-remove-symtab.test +++ b/llvm/test/tools/llvm-objcopy/ELF/reloc-error-remove-symtab.test @@ -24,9 +24,9 @@ Sections: Type: R_X86_64_PC32 Symbols: - Global: - - Name: foo - Type: STT_FUNC - Size: 4 + - Name: foo + Type: STT_FUNC + Size: 4 + Binding: STB_GLOBAL # CHECK: Symbol table .symtab cannot be removed because it is referenced by the relocation section .rel.text. diff --git a/llvm/test/tools/llvm-objcopy/ELF/remove-section-with-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/remove-section-with-symbol.test index 949d34cd5e8..598da168426 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/remove-section-with-symbol.test +++ b/llvm/test/tools/llvm-objcopy/ELF/remove-section-with-symbol.test @@ -16,17 +16,18 @@ Sections: Type: SHT_PROGBITS Flags: [ SHF_ALLOC ] Symbols: - Global: - - Name: test - Type: STT_FUNC - Section: .test - Value: 0x1000 - Size: 4 - - Name: test2 - Type: STT_FUNC - Section: .test2 - Value: 0x1000 - Size: 4 + - Name: test + Type: STT_FUNC + Section: .test + Value: 0x1000 + Size: 4 + Binding: STB_GLOBAL + - Name: test2 + Type: STT_FUNC + Section: .test2 + Value: 0x1000 + Size: 4 + Binding: STB_GLOBAL # The sections counted here should be .test, .symtab, .strtab, and .shstrtab. # The 5th section is the null section. diff --git a/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag-preserved.test b/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag-preserved.test index 6c22eb892bf..2df9e3a039e 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag-preserved.test +++ b/llvm/test/tools/llvm-objcopy/ELF/rename-section-flag-preserved.test @@ -51,7 +51,6 @@ Sections: SHF_OS_NONCONFORMING, SHF_STRINGS, SHF_TLS, SHF_WRITE ] Content: "a4a4a4a4" Symbols: - Local: - Name: dummy Section: .group diff --git a/llvm/test/tools/llvm-objcopy/ELF/section-index-unsupported.test b/llvm/test/tools/llvm-objcopy/ELF/section-index-unsupported.test index 1a69757b4e8..f01fea893d2 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/section-index-unsupported.test +++ b/llvm/test/tools/llvm-objcopy/ELF/section-index-unsupported.test @@ -8,8 +8,8 @@ FileHeader: Type: ET_EXEC Machine: EM_X86_64 Symbols: - Global: - - Name: test - Index: 0xff05 + - Name: test + Index: 0xff05 + Binding: STB_GLOBAL # CHECK: Symbol 'test' has unsupported value greater than or equal to SHN_LORESERVE: 65285 diff --git a/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-keep-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-keep-symbol.test index 9892a126507..8ff1aa4a5e3 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-keep-symbol.test +++ b/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-keep-symbol.test @@ -32,22 +32,21 @@ Sections: - Name: .debug_bar Type: SHT_PROGBITS Symbols: - Local: - - Name: foo - Type: STT_FUNC - Section: .text - Value: 0x1000 - Size: 8 - - Name: bar - Type: STT_FUNC - Section: .text - Value: 0x1008 - Size: 8 - - Name: baz - Type: STT_FUNC - Section: .text - Value: 0x1010 - Size: 8 + - Name: foo + Type: STT_FUNC + Section: .text + Value: 0x1000 + Size: 8 + - Name: bar + Type: STT_FUNC + Section: .text + Value: 0x1008 + Size: 8 + - Name: baz + Type: STT_FUNC + Section: .text + Value: 0x1010 + Size: 8 # CHECK: Name: .text # CHECK: Name: .gnu.warning.foo diff --git a/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-remove.test b/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-remove.test index 5455c6bb7bc..15a6f4f7cca 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-remove.test +++ b/llvm/test/tools/llvm-objcopy/ELF/strip-all-and-remove.test @@ -28,14 +28,16 @@ Sections: AddressAlign: 0x0000000000000010 Content: "00000000" Symbols: - Global: - - Name: debugfoo - Section: .debug_foo - - Name: foo - Section: .text - - Name: bar - Section: .text.bar - + - Name: debugfoo + Section: .debug_foo + Binding: STB_GLOBAL + - Name: foo + Section: .text + Binding: STB_GLOBAL + - Name: bar + Section: .text.bar + Binding: STB_GLOBAL + # CHECK: SectionHeaderCount: 3 # CHECK: Name: .text diff --git a/llvm/test/tools/llvm-objcopy/ELF/strip-debug-and-remove.test b/llvm/test/tools/llvm-objcopy/ELF/strip-debug-and-remove.test index d2d0b34d976..da7659294b7 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/strip-debug-and-remove.test +++ b/llvm/test/tools/llvm-objcopy/ELF/strip-debug-and-remove.test @@ -28,14 +28,16 @@ Sections: AddressAlign: 0x0000000000000010 Content: "00000000" Symbols: - Global: - - Name: debugfoo - Section: .debug_foo - - Name: foo - Section: .text - - Name: bar - Section: .text.bar - + - Name: debugfoo + Section: .debug_foo + Binding: STB_GLOBAL + - Name: foo + Section: .text + Binding: STB_GLOBAL + - Name: bar + Section: .text.bar + Binding: STB_GLOBAL + # CHECK: SectionHeaderCount: 5 # CHECK: Name: .text diff --git a/llvm/test/tools/llvm-objcopy/ELF/strip-debug.test b/llvm/test/tools/llvm-objcopy/ELF/strip-debug.test index d7079f6abcb..c4440bf7eca 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/strip-debug.test +++ b/llvm/test/tools/llvm-objcopy/ELF/strip-debug.test @@ -110,11 +110,12 @@ Sections: AddressAlign: 0x0000000000000010 Content: "00000000" Symbols: - Global: - - Name: foo - Section: .text - - Name: debugfoo - Section: .debugfoo + - Name: foo + Section: .text + Binding: STB_GLOBAL + - Name: debugfoo + Section: .debugfoo + Binding: STB_GLOBAL # CHECK: SectionHeaderCount: 5 diff --git a/llvm/test/tools/llvm-objcopy/ELF/strip-group-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/strip-group-symbol.test index 0699a9f5476..d727ec6be08 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/strip-group-symbol.test +++ b/llvm/test/tools/llvm-objcopy/ELF/strip-group-symbol.test @@ -23,9 +23,9 @@ Sections: AddressAlign: 0x0000000000000010 Size: 64 Symbols: - Weak: - - Name: foo - Type: STT_FUNC - Section: .text + - Name: foo + Type: STT_FUNC + Section: .text + Binding: STB_WEAK #CHECK: Symbol foo cannot be removed because it is referenced by the section .group[1]. diff --git a/llvm/test/tools/llvm-objcopy/ELF/strip-multiple-files.test b/llvm/test/tools/llvm-objcopy/ELF/strip-multiple-files.test index dcbd57e1f3d..f2b6e56145d 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/strip-multiple-files.test +++ b/llvm/test/tools/llvm-objcopy/ELF/strip-multiple-files.test @@ -39,17 +39,16 @@ Sections: Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_EXECINSTR ] Symbols: - Local: - - Name: foo - Type: STT_FUNC - Section: .text - Value: 0x1234 - Size: 8 - - Name: bar - Type: STT_FUNC - Section: .text - Value: 0x5678 - Size: 8 + - Name: foo + Type: STT_FUNC + Section: .text + Value: 0x1234 + Size: 8 + - Name: bar + Type: STT_FUNC + Section: .text + Value: 0x5678 + Size: 8 # CHECK: Symbols [ # CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/strip-reloc-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/strip-reloc-symbol.test index b4924059ced..db1e46cf2a3 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/strip-reloc-symbol.test +++ b/llvm/test/tools/llvm-objcopy/ELF/strip-reloc-symbol.test @@ -22,11 +22,10 @@ Sections: Symbol: foo Type: R_X86_64_PC32 Symbols: - Local: - - Name: foo - Type: STT_FUNC - Section: .text - Value: 0x1000 - Size: 8 + - Name: foo + Type: STT_FUNC + Section: .text + Value: 0x1000 + Size: 8 #CHECK: not stripping symbol 'foo' because it is named in a relocation. diff --git a/llvm/test/tools/llvm-objcopy/ELF/strip-section-err.test b/llvm/test/tools/llvm-objcopy/ELF/strip-section-err.test index 9bcea100bb9..25e93aecccd 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/strip-section-err.test +++ b/llvm/test/tools/llvm-objcopy/ELF/strip-section-err.test @@ -43,9 +43,7 @@ Sections: AddressAlign: 0x0000000000000001 Content: '0102' Symbols: - Local: - - Name: foo - Section: .data - Value: 0x0000000000000001 -DynamicSymbols: {} + - Name: foo + Section: .data + Value: 0x0000000000000001 ... diff --git a/llvm/test/tools/llvm-objcopy/ELF/strip-symbol-and-relocation.test b/llvm/test/tools/llvm-objcopy/ELF/strip-symbol-and-relocation.test index dfe25984c6c..007acfbe3ac 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/strip-symbol-and-relocation.test +++ b/llvm/test/tools/llvm-objcopy/ELF/strip-symbol-and-relocation.test @@ -43,6 +43,6 @@ Sections: Symbol: bar Type: R_X86_64_32S Symbols: - Global: - - Name: bar - Section: .text + - Name: bar + Section: .text + Binding: STB_GLOBAL diff --git a/llvm/test/tools/llvm-objcopy/ELF/strip-symbol.test b/llvm/test/tools/llvm-objcopy/ELF/strip-symbol.test index 73d3c1cb392..e63aaae4028 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/strip-symbol.test +++ b/llvm/test/tools/llvm-objcopy/ELF/strip-symbol.test @@ -28,24 +28,23 @@ Sections: AddressAlign: 0x0000000000000010 Size: 64 Symbols: - Local: - - Name: foo - Type: STT_FUNC - Section: .text - Value: 0x1000 - Size: 8 - Weak: - - Name: bar - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1008 - Global: - - Name: baz - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1010 + - Name: foo + Type: STT_FUNC + Section: .text + Value: 0x1000 + Size: 8 + - Name: bar + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1008 + Binding: STB_WEAK + - Name: baz + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1010 + Binding: STB_GLOBAL #CHECK: Symbols [ #CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded.test b/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded.test index 60d83884715..db1ad31228a 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded.test +++ b/llvm/test/tools/llvm-objcopy/ELF/strip-unneeded.test @@ -57,42 +57,43 @@ Sections: Symbol: foo Type: R_X86_64_PC32 Symbols: - Local: - - Name: foo - Type: STT_FUNC - Section: .text - Value: 0x1000 - Size: 8 - - Name: bar - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1008 - - Name: barfoo - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1010 - - Name: fileSymbol - Type: STT_FILE - - Name: sectionSymbol - Type: STT_SECTION - Weak: - - Name: baz - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1018 - - Name: foobaz - Type: STT_FUNC - Global: - - Name: foobar - Type: STT_FUNC - - Name: barbaz - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1020 + - Name: foo + Type: STT_FUNC + Section: .text + Value: 0x1000 + Size: 8 + - Name: bar + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1008 + - Name: barfoo + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1010 + - Name: fileSymbol + Type: STT_FILE + - Name: sectionSymbol + Type: STT_SECTION + - Name: foobar + Type: STT_FUNC + Binding: STB_GLOBAL + - Name: barbaz + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1020 + Binding: STB_GLOBAL + - Name: baz + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1018 + Binding: STB_WEAK + - Name: foobaz + Type: STT_FUNC + Binding: STB_WEAK #CHECK: Symbols [ #CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/symbol-copy.test b/llvm/test/tools/llvm-objcopy/ELF/symbol-copy.test index 43328680adf..26408caf66b 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/symbol-copy.test +++ b/llvm/test/tools/llvm-objcopy/ELF/symbol-copy.test @@ -22,38 +22,43 @@ Sections: AddressAlign: 0x0000000000000010 Content: "0000000000000000" Symbols: - Global: - - Name: _start - Type: STT_FUNC - Section: .text - Value: 0x1000 - Size: 4 - - Name: bam - Type: STT_FUNC - Section: .text - Value: 0x1001 - Size: 4 - Visibility: STV_HIDDEN - - Name: foo - Type: STT_FUNC - Section: .text - Value: 0x1004 - - Name: faz - Type: STT_OBJECT - Section: .data - Value: 0x2002 - Size: 2 - Visibility: STV_INTERNAL - - Name: bar - Type: STT_OBJECT - Section: .data - Value: 0x2000 - Size: 4 - - Name: baz - Type: STT_OBJECT - Section: .data - Value: 0x2004 - Size: 4 + - Name: _start + Type: STT_FUNC + Section: .text + Value: 0x1000 + Size: 4 + Binding: STB_GLOBAL + - Name: bam + Type: STT_FUNC + Section: .text + Value: 0x1001 + Size: 4 + Visibility: STV_HIDDEN + Binding: STB_GLOBAL + - Name: foo + Type: STT_FUNC + Section: .text + Value: 0x1004 + Binding: STB_GLOBAL + - Name: faz + Type: STT_OBJECT + Section: .data + Value: 0x2002 + Size: 2 + Visibility: STV_INTERNAL + Binding: STB_GLOBAL + - Name: bar + Type: STT_OBJECT + Section: .data + Value: 0x2000 + Size: 4 + Binding: STB_GLOBAL + - Name: baz + Type: STT_OBJECT + Section: .data + Value: 0x2004 + Size: 4 + Binding: STB_GLOBAL #CHECK: Symbols [ #CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/symbol-empty-name.test b/llvm/test/tools/llvm-objcopy/ELF/symbol-empty-name.test index e378c2332ac..cc17b3ec526 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/symbol-empty-name.test +++ b/llvm/test/tools/llvm-objcopy/ELF/symbol-empty-name.test @@ -37,11 +37,10 @@ Sections: Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_EXECINSTR ] Symbols: - Local: - - Name: "" - Type: STT_SECTION - Section: .text - Global: - # We need to have a named symbol, otherwise the original - # issue that was fixed is not reproduced by this test. - - Name: foo + - Name: "" + Type: STT_SECTION + Section: .text +# We need to have a named symbol, otherwise the original +# issue that was fixed is not reproduced by this test. + - Name: foo + Binding: STB_GLOBAL diff --git a/llvm/test/tools/llvm-objcopy/ELF/weaken-all.test b/llvm/test/tools/llvm-objcopy/ELF/weaken-all.test index 6107d370adc..ab83c656562 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/weaken-all.test +++ b/llvm/test/tools/llvm-objcopy/ELF/weaken-all.test @@ -23,27 +23,27 @@ Sections: Symbol: undefGlobal Type: R_X86_64_PC32 Symbols: - Local: - - Name: Local - Type: STT_FUNC - Section: .text - Value: 0x1008 - Size: 8 - Weak: - - Name: Weak - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1010 - Global: - - Name: Global - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1018 - - Name: undefGlobal - Type: STT_FUNC - Size: 8 + - Name: Local + Type: STT_FUNC + Section: .text + Value: 0x1008 + Size: 8 + - Name: Global + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1018 + Binding: STB_GLOBAL + - Name: undefGlobal + Type: STT_FUNC + Size: 8 + Binding: STB_GLOBAL + - Name: Weak + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1010 + Binding: STB_WEAK #CHECK: Symbols [ #CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objcopy/ELF/weaken.test b/llvm/test/tools/llvm-objcopy/ELF/weaken.test index 01de61ab275..09f2476e0b2 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/weaken.test +++ b/llvm/test/tools/llvm-objcopy/ELF/weaken.test @@ -28,24 +28,23 @@ Sections: AddressAlign: 0x0000000000000010 Size: 64 Symbols: - Local: - - Name: Local - Type: STT_FUNC - Section: .text - Value: 0x1000 - Size: 8 - Weak: - - Name: Weak - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1008 - Global: - - Name: Global - Type: STT_FUNC - Size: 8 - Section: .text - Value: 0x1010 + - Name: Local + Type: STT_FUNC + Section: .text + Value: 0x1000 + Size: 8 + - Name: Global + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1010 + Binding: STB_GLOBAL + - Name: Weak + Type: STT_FUNC + Size: 8 + Section: .text + Value: 0x1008 + Binding: STB_WEAK #CHECK: Symbols [ #CHECK-NEXT: Symbol { diff --git a/llvm/test/tools/llvm-objdump/X86/Inputs/simple-executable-x86_64.yaml b/llvm/test/tools/llvm-objdump/X86/Inputs/simple-executable-x86_64.yaml index f6a1d18a0cd..a7ea4c8811e 100644 --- a/llvm/test/tools/llvm-objdump/X86/Inputs/simple-executable-x86_64.yaml +++ b/llvm/test/tools/llvm-objdump/X86/Inputs/simple-executable-x86_64.yaml @@ -33,41 +33,43 @@ Sections: Flags: [ SHF_MERGE, SHF_STRINGS ] AddressAlign: 0x0000000000000001 Content: 5562756E747520636C616E672076657273696F6E20332E352D317562756E74753120287472756E6B2920286261736564206F6E204C4C564D20332E352900 -Symbols: - Local: - - Type: STT_SECTION - Section: .text - - Type: STT_SECTION - Section: .anothertext - Value: 0x0000000000000010 - - Type: STT_SECTION - Section: .eh_frame - Value: 0x0000000000000050 - - Type: STT_SECTION - Section: .data - Value: 0x00000000000000A8 - - Type: STT_SECTION - Section: .comment - - Name: /tmp/a.c - Type: STT_FILE - - Type: STT_FILE - Global: - - Name: somedata - Type: STT_OBJECT - Section: .anothertext - Value: 0x0000000000000045 - - Name: main - Type: STT_FUNC - Section: .anothertext - Value: 0x0000000000000010 - Size: 0x000000000000003F - - Name: foo - Type: STT_FUNC - Section: .text - Size: 0x000000000000000D - - Name: a - Type: STT_OBJECT - Section: .data - Value: 0x00000000000000A8 - Size: 0x0000000000000004 +Symbols: + - Type: STT_SECTION + Section: .text + - Type: STT_SECTION + Section: .anothertext + Value: 0x0000000000000010 + - Type: STT_SECTION + Section: .eh_frame + Value: 0x0000000000000050 + - Type: STT_SECTION + Section: .data + Value: 0x00000000000000A8 + - Type: STT_SECTION + Section: .comment + - Name: /tmp/a.c + Type: STT_FILE + - Type: STT_FILE + - Name: somedata + Type: STT_OBJECT + Section: .anothertext + Value: 0x0000000000000045 + Binding: STB_GLOBAL + - Name: main + Type: STT_FUNC + Section: .anothertext + Value: 0x0000000000000010 + Size: 0x000000000000003F + Binding: STB_GLOBAL + - Name: foo + Type: STT_FUNC + Section: .text + Size: 0x000000000000000D + Binding: STB_GLOBAL + - Name: a + Type: STT_OBJECT + Section: .data + Value: 0x00000000000000A8 + Size: 0x0000000000000004 + Binding: STB_GLOBAL ... diff --git a/llvm/test/tools/llvm-objdump/X86/adjust-vma.test b/llvm/test/tools/llvm-objdump/X86/adjust-vma.test index 6b1a7c65c1a..b5439a54809 100644 --- a/llvm/test/tools/llvm-objdump/X86/adjust-vma.test +++ b/llvm/test/tools/llvm-objdump/X86/adjust-vma.test @@ -119,13 +119,12 @@ Sections: Symbol: .text Type: R_X86_64_32 Symbols: - Local: - - Name: func - Type: STT_FUNC - Section: .text - Value: 0x0000000000000001 - - Name: sym - Section: .text - - Name: .text - Type: STT_SECTION - Section: .text + - Name: func + Type: STT_FUNC + Section: .text + Value: 0x0000000000000001 + - Name: sym + Section: .text + - Name: .text + Type: STT_SECTION + Section: .text diff --git a/llvm/test/tools/llvm-objdump/X86/disasm-zeroes-relocations.test b/llvm/test/tools/llvm-objdump/X86/disasm-zeroes-relocations.test index ad8b025ab50..696a1057f07 100644 --- a/llvm/test/tools/llvm-objdump/X86/disasm-zeroes-relocations.test +++ b/llvm/test/tools/llvm-objdump/X86/disasm-zeroes-relocations.test @@ -51,5 +51,5 @@ Sections: Symbol: x Type: R_X86_64_64 Symbols: - Global: - - Name: x + - Name: x + Binding: STB_GLOBAL diff --git a/llvm/test/tools/llvm-objdump/X86/disassemble-demangle.test b/llvm/test/tools/llvm-objdump/X86/disassemble-demangle.test index 1232033a85c..74f2b94075e 100644 --- a/llvm/test/tools/llvm-objdump/X86/disassemble-demangle.test +++ b/llvm/test/tools/llvm-objdump/X86/disassemble-demangle.test @@ -23,15 +23,14 @@ Sections: AddressAlign: 0x0000000000000010 Content: "0000000000000000" Symbols: - Local: - - Name: _Z3fooi - Type: STT_FUNC - Section: .text1 - Value: 0x1000 - - Name: _Z3foov - Type: STT_FUNC - Section: .text2 - Value: 0x1010 + - Name: _Z3fooi + Type: STT_FUNC + Section: .text1 + Value: 0x1000 + - Name: _Z3foov + Type: STT_FUNC + Section: .text2 + Value: 0x1010 # We just want to check that the symbols are demangled # DEMANGLE: foo(int) diff --git a/llvm/test/tools/llvm-objdump/relocations-elf.test b/llvm/test/tools/llvm-objdump/relocations-elf.test index 4cbd85ca3f1..019dcc20208 100644 --- a/llvm/test/tools/llvm-objdump/relocations-elf.test +++ b/llvm/test/tools/llvm-objdump/relocations-elf.test @@ -63,13 +63,12 @@ Sections: Type: R_X86_64_64 Symbols: - Local: - - Name: loc1 - - Name: loc2 - Global: - - Name: glob1 - Section: .text - Value: 0x0 - Size: 4 - - Name: glob2 - + - Name: loc1 + - Name: loc2 + - Name: glob1 + Section: .text + Value: 0x0 + Size: 4 + Binding: STB_GLOBAL + - Name: glob2 + Binding: STB_GLOBAL diff --git a/llvm/test/tools/llvm-objdump/symbol-table-elf.test b/llvm/test/tools/llvm-objdump/symbol-table-elf.test index 649e54c99bf..a2a7f018618 100644 --- a/llvm/test/tools/llvm-objdump/symbol-table-elf.test +++ b/llvm/test/tools/llvm-objdump/symbol-table-elf.test @@ -28,22 +28,22 @@ Sections: AddressAlign: 0x0000000000000010 Content: "00000000" Symbols: - Global: - - Name: foo - Type: STT_FUNC - Section: .text - Value: 0x1004 - - Name: bar - Type: STT_OBJECT - Section: .text - Value: 0x1008 - Local: - - Name: lfoo - Type: STT_FUNC - Section: .text - Value: 0x1004 - - Name: lbar - Type: STT_OBJECT - Section: .text - Value: 0x1008 + - Name: lfoo + Type: STT_FUNC + Section: .text + Value: 0x1004 + - Name: lbar + Type: STT_OBJECT + Section: .text + Value: 0x1008 + - Name: foo + Type: STT_FUNC + Section: .text + Value: 0x1004 + Binding: STB_GLOBAL + - Name: bar + Type: STT_OBJECT + Section: .text + Value: 0x1008 + Binding: STB_GLOBAL diff --git a/llvm/test/tools/llvm-objdump/verdef-elf.test b/llvm/test/tools/llvm-objdump/verdef-elf.test index 1c542691bfe..3103bd527dd 100644 --- a/llvm/test/tools/llvm-objdump/verdef-elf.test +++ b/llvm/test/tools/llvm-objdump/verdef-elf.test @@ -36,6 +36,6 @@ Sections: - VERSION_1 - VERSION_2 DynamicSymbols: - Global: - - Name: bar + - Name: bar + Binding: STB_GLOBAL ... diff --git a/llvm/test/tools/llvm-objdump/verneed-elf.test b/llvm/test/tools/llvm-objdump/verneed-elf.test index 2468eaaf2df..799d2b2ed74 100644 --- a/llvm/test/tools/llvm-objdump/verneed-elf.test +++ b/llvm/test/tools/llvm-objdump/verneed-elf.test @@ -43,5 +43,5 @@ Sections: Flags: 12 Other: 2 DynamicSymbols: - Global: - - Name: f1 + - Name: f1 + Binding: STB_GLOBAL diff --git a/llvm/test/tools/llvm-objdump/verneed-wrong-info.test b/llvm/test/tools/llvm-objdump/verneed-wrong-info.test index b1593e960b3..9811564a16d 100644 --- a/llvm/test/tools/llvm-objdump/verneed-wrong-info.test +++ b/llvm/test/tools/llvm-objdump/verneed-wrong-info.test @@ -46,5 +46,5 @@ Sections: Flags: 12 Other: 2 DynamicSymbols: - Global: - - Name: f1 + - Name: f1 + Binding: STB_GLOBAL diff --git a/llvm/test/tools/llvm-readobj/Inputs/dwarf-exprs.exe-x86-64.yaml b/llvm/test/tools/llvm-readobj/Inputs/dwarf-exprs.exe-x86-64.yaml index 5b8f3671bc3..37b790d46c4 100644 --- a/llvm/test/tools/llvm-readobj/Inputs/dwarf-exprs.exe-x86-64.yaml +++ b/llvm/test/tools/llvm-readobj/Inputs/dwarf-exprs.exe-x86-64.yaml @@ -25,11 +25,11 @@ Sections: AddressAlign: 8 Content: 1400000000000000017A5200017810011B0C070890010710140000001C000000B0F0FFFF2A00000000000000000000001400000000000000017A5200017810011B0C070890010000240000001C00000050F0FFFF20000000000E10460E184A0F0B770880003F1A3B2A332422000000001C000000440000003EF1FFFF1000000000410E108602430D064B0C07080000002C0000006400000038F1FFFF7F0C000000450C0A00491006027600450F0376780603660C0C0A00450C070800000000002C0000009400000088FDFFFF6600000000410E108602430D06428F03458E04478D058C06488307024B0C07080000000014000000C4000000C8FDFFFF01000000000000000000000000000000 Symbols: - Global: - - Name: myfunc - Type: STT_FUNC - Section: .text - Value: 0x0000000000400000 + - Name: myfunc + Type: STT_FUNC + Section: .text + Value: 0x0000000000400000 + Binding: STB_GLOBAL ProgramHeaders: - Type: PT_LOAD Flags: [ PF_X, PF_R ] diff --git a/llvm/test/tools/llvm-readobj/broken-group.test b/llvm/test/tools/llvm-readobj/broken-group.test index c50a9ddee59..8b8989a182f 100644 --- a/llvm/test/tools/llvm-readobj/broken-group.test +++ b/llvm/test/tools/llvm-readobj/broken-group.test @@ -73,9 +73,8 @@ Sections: Members: - SectionOrType: GRP_COMDAT - SectionOrType: .foo -Symbols: - Local: - - Name: bar - Section: .group - - Name: zed - Section: .group1 +Symbols: + - Name: bar + Section: .group + - Name: zed + Section: .group1 diff --git a/llvm/test/tools/llvm-readobj/demangle.test b/llvm/test/tools/llvm-readobj/demangle.test index 809a7243edf..fb6c64b8e9a 100644 --- a/llvm/test/tools/llvm-readobj/demangle.test +++ b/llvm/test/tools/llvm-readobj/demangle.test @@ -210,13 +210,14 @@ Sections: Link: .symtab Content: "0102" Symbols: - Global: - - Name: _Z3fooc - Type: STT_FUNC - Section: .text.foo - - Name: _Z4blahf - Type: STT_FUNC - Section: .text.foo + - Name: _Z3fooc + Type: STT_FUNC + Section: .text.foo + Binding: STB_GLOBAL + - Name: _Z4blahf + Type: STT_FUNC + Section: .text.foo + Binding: STB_GLOBAL ProgramHeaders: - Type: PT_LOAD Flags: [ PF_R, PF_X ] diff --git a/llvm/test/tools/llvm-readobj/elf-no-shdrs.test b/llvm/test/tools/llvm-readobj/elf-no-shdrs.test index 38111bccf38..4e21ae70e4d 100644 --- a/llvm/test/tools/llvm-readobj/elf-no-shdrs.test +++ b/llvm/test/tools/llvm-readobj/elf-no-shdrs.test @@ -28,6 +28,6 @@ Sections: - Name: .text Type: SHT_PROGBITS Symbols: - Global: - - Name: foobar - Section: .text + - Name: foobar + Section: .text + Binding: STB_GLOBAL diff --git a/llvm/test/tools/llvm-readobj/elf-packed-relocs.test b/llvm/test/tools/llvm-readobj/elf-packed-relocs.test index 84acd06d822..8fa73c386a5 100644 --- a/llvm/test/tools/llvm-readobj/elf-packed-relocs.test +++ b/llvm/test/tools/llvm-readobj/elf-packed-relocs.test @@ -41,9 +41,10 @@ Sections: AddressAlign: 0x0000000000000001 Content: 41505332088020020108800280010202088180808010818080802002080181808080100802818080802004020C7E048180808010088180808020 Symbols: - Global: - - Name: sym1 - - Name: sym2 + - Name: sym1 + Binding: STB_GLOBAL + - Name: sym2 + Binding: STB_GLOBAL ... # RUN: yaml2obj -docnum 2 %s | llvm-readobj -elf-output-style=LLVM -relocations - | FileCheck --check-prefix=LLVM2 %s @@ -90,9 +91,10 @@ Sections: AddressAlign: 0x0000000000000001 Content: 415053320A80200202088102830408037C08 Symbols: - Global: - - Name: sym1 - - Name: sym2 + - Name: sym1 + Binding: STB_GLOBAL + - Name: sym2 + Binding: STB_GLOBAL ... # RUN: yaml2obj -docnum 3 %s | llvm-readobj -elf-output-style=LLVM -relocations - | FileCheck --check-prefix=LLVM3 %s @@ -132,7 +134,8 @@ Sections: AddressAlign: 0x0000000000000001 Content: 415053320680200208800208008001080802008001818080801008818080802002080881808080100008818080802008 Symbols: - Global: - - Name: sym1 - - Name: sym2 + - Name: sym1 + Binding: STB_GLOBAL + - Name: sym2 + Binding: STB_GLOBAL ... diff --git a/llvm/test/tools/llvm-readobj/elf-reloc-negative-addend-no-sym.test b/llvm/test/tools/llvm-readobj/elf-reloc-negative-addend-no-sym.test index 13e6a96cf3c..86ec658f19a 100644 --- a/llvm/test/tools/llvm-readobj/elf-reloc-negative-addend-no-sym.test +++ b/llvm/test/tools/llvm-readobj/elf-reloc-negative-addend-no-sym.test @@ -60,8 +60,8 @@ Sections: Type: R_X86_64_NONE Addend: -1 DynamicSymbols: - Global: - - Name: force_dynsym + - Name: force_dynsym + Binding: STB_GLOBAL ProgramHeaders: - Type: PT_LOAD VAddr: 0x1000 diff --git a/llvm/test/tools/llvm-readobj/elf-reloc-symbol-with-versioning.test b/llvm/test/tools/llvm-readobj/elf-reloc-symbol-with-versioning.test index c542b80f209..3d078d3cfb9 100644 --- a/llvm/test/tools/llvm-readobj/elf-reloc-symbol-with-versioning.test +++ b/llvm/test/tools/llvm-readobj/elf-reloc-symbol-with-versioning.test @@ -84,17 +84,25 @@ Sections: Symbol: f3 Type: R_X86_64_JUMP_SLOT Symbols: - Global: - - Name: f1 - - Name: f2 - - Name: g1 - - Name: _Z2f1v - - Name: f3 + - Name: f1 + Binding: STB_GLOBAL + - Name: f2 + Binding: STB_GLOBAL + - Name: g1 + Binding: STB_GLOBAL + - Name: _Z2f1v + Binding: STB_GLOBAL + - Name: f3 + Binding: STB_GLOBAL DynamicSymbols: - Global: - - Name: f1 - - Name: f2 - - Name: g1 - - Name: _Z2f1v - - Name: f3 + - Name: f1 + Binding: STB_GLOBAL + - Name: f2 + Binding: STB_GLOBAL + - Name: g1 + Binding: STB_GLOBAL + - Name: _Z2f1v + Binding: STB_GLOBAL + - Name: f3 + Binding: STB_GLOBAL ... diff --git a/llvm/test/tools/llvm-readobj/elf-reloc-zero-name-or-value.test b/llvm/test/tools/llvm-readobj/elf-reloc-zero-name-or-value.test index 7adc1ea6e65..6b1a41637b4 100644 --- a/llvm/test/tools/llvm-readobj/elf-reloc-zero-name-or-value.test +++ b/llvm/test/tools/llvm-readobj/elf-reloc-zero-name-or-value.test @@ -74,15 +74,15 @@ Sections: Addend: 1 Symbol: sym Symbols: - Global: - - Name: sym - Value: 0 - Section: .text + - Name: sym + Value: 0 + Section: .text + Binding: STB_GLOBAL DynamicSymbols: - Global: - - Name: sym - Value: 0 - Section: .text + - Name: sym + Value: 0 + Section: .text + Binding: STB_GLOBAL ProgramHeaders: - Type: PT_LOAD VAddr: 0x1000 diff --git a/llvm/test/tools/llvm-readobj/elf-section-types.test b/llvm/test/tools/llvm-readobj/elf-section-types.test index 66bfa8a4b93..f65655afbcc 100644 --- a/llvm/test/tools/llvm-readobj/elf-section-types.test +++ b/llvm/test/tools/llvm-readobj/elf-section-types.test @@ -218,5 +218,5 @@ Sections: - Name: hiuser Type: 0xffffffff Symbols: - Global: - - Name: foo + - Name: foo + Binding: STB_GLOBAL diff --git a/llvm/test/tools/llvm-readobj/elf-symbol-64bit.test b/llvm/test/tools/llvm-readobj/elf-symbol-64bit.test index 6c45374be5e..dbd8f0e54b6 100644 --- a/llvm/test/tools/llvm-readobj/elf-symbol-64bit.test +++ b/llvm/test/tools/llvm-readobj/elf-symbol-64bit.test @@ -18,7 +18,6 @@ FileHeader: Type: ET_REL Machine: EM_X86_64 Symbols: - Local: - - Name: a_sym - Value: 0xfedcba9876543210 - Size: 0x0123456789abcdef + - Name: a_sym + Value: 0xfedcba9876543210 + Size: 0x0123456789abcdef diff --git a/llvm/test/tools/llvm-readobj/elf-symbol-binding.test b/llvm/test/tools/llvm-readobj/elf-symbol-binding.test index 4813d75be82..9ca5142abae 100644 --- a/llvm/test/tools/llvm-readobj/elf-symbol-binding.test +++ b/llvm/test/tools/llvm-readobj/elf-symbol-binding.test @@ -52,9 +52,8 @@ Sections: # Symbol with st_name = 19, binding = 0xf Content: "0000000000000000000000000000000001000000000000000000000030000000090000000000000000000000a0000000100000000000000000000000b0000000130000000000000000000000f0000000" Symbols: - Local: - - Name: local - Global: - - Name: global - Weak: - - Name: weak + - Name: local + - Name: global + Binding: STB_GLOBAL + - Name: weak + Binding: STB_WEAK diff --git a/llvm/test/tools/llvm-readobj/elf-symbol-shndx.test b/llvm/test/tools/llvm-readobj/elf-symbol-shndx.test index 7f4a6c920c6..ad04be54262 100644 --- a/llvm/test/tools/llvm-readobj/elf-symbol-shndx.test +++ b/llvm/test/tools/llvm-readobj/elf-symbol-shndx.test @@ -75,20 +75,26 @@ Sections: EntSize: 4 Content: "0000000001000000" Symbols: - Global: - - Name: undef - - Name: normal - Section: .text - - Name: common - Index: SHN_COMMON - - Name: absolute - Index: SHN_ABS - - Name: proc - Index: 0xff01 - - Name: os - Index: 0xff21 - - Name: reserved - Index: 0xfffe + - Name: undef + Binding: STB_GLOBAL + - Name: normal + Section: .text + Binding: STB_GLOBAL + - Name: common + Index: SHN_COMMON + Binding: STB_GLOBAL + - Name: absolute + Index: SHN_ABS + Binding: STB_GLOBAL + - Name: proc + Index: 0xff01 + Binding: STB_GLOBAL + - Name: os + Index: 0xff21 + Binding: STB_GLOBAL + - Name: reserved + Index: 0xfffe + Binding: STB_GLOBAL --- !ELF FileHeader: @@ -97,6 +103,6 @@ FileHeader: Type: ET_REL Machine: EM_386 Symbols: - Global: - - Name: bad - Index: 0x42 + - Name: bad + Index: 0x42 + Binding: STB_GLOBAL diff --git a/llvm/test/tools/llvm-readobj/elf-symbol-types.test b/llvm/test/tools/llvm-readobj/elf-symbol-types.test index cf09a96b010..8d46b162476 100644 --- a/llvm/test/tools/llvm-readobj/elf-symbol-types.test +++ b/llvm/test/tools/llvm-readobj/elf-symbol-types.test @@ -51,27 +51,37 @@ Sections: - Name: .text Type: SHT_PROGBITS Symbols: - Global: - - Name: notype - Type: STT_NOTYPE - - Name: object - Type: STT_OBJECT - - Name: func - Type: STT_FUNC - - Name: .text - Type: STT_SECTION - Section: .text - - Name: file - Type: STT_FILE - - Name: common - Type: STT_COMMON - - Name: tls - Type: STT_TLS - - Name: gnu_ifunc - Type: STT_GNU_IFUNC - - Name: os_specific - Type: 11 - - Name: proc_specific - Type: 13 - - Name: unknown - Type: 7 + - Name: notype + Type: STT_NOTYPE + Binding: STB_GLOBAL + - Name: object + Type: STT_OBJECT + Binding: STB_GLOBAL + - Name: func + Type: STT_FUNC + Binding: STB_GLOBAL + - Name: .text + Type: STT_SECTION + Section: .text + Binding: STB_GLOBAL + - Name: file + Type: STT_FILE + Binding: STB_GLOBAL + - Name: common + Type: STT_COMMON + Binding: STB_GLOBAL + - Name: tls + Type: STT_TLS + Binding: STB_GLOBAL + - Name: gnu_ifunc + Type: STT_GNU_IFUNC + Binding: STB_GLOBAL + - Name: os_specific + Type: 11 + Binding: STB_GLOBAL + - Name: proc_specific + Type: 13 + Binding: STB_GLOBAL + - Name: unknown + Type: 7 + Binding: STB_GLOBAL diff --git a/llvm/test/tools/llvm-readobj/elf-symbol-visibility.test b/llvm/test/tools/llvm-readobj/elf-symbol-visibility.test index 7a25f87c193..f2e402004dc 100644 --- a/llvm/test/tools/llvm-readobj/elf-symbol-visibility.test +++ b/llvm/test/tools/llvm-readobj/elf-symbol-visibility.test @@ -52,12 +52,15 @@ Sections: # Symbol with st_name = 1, st_other = 0x4 Content: "0000000000000000000000000000000001000000000000000000000000040000" Symbols: - Global: - - Name: default - Visibility: STV_DEFAULT - - Name: internal - Visibility: STV_INTERNAL - - Name: hidden - Visibility: STV_HIDDEN - - Name: protected - Visibility: STV_PROTECTED + - Name: default + Visibility: STV_DEFAULT + Binding: STB_GLOBAL + - Name: internal + Visibility: STV_INTERNAL + Binding: STB_GLOBAL + - Name: hidden + Visibility: STV_HIDDEN + Binding: STB_GLOBAL + - Name: protected + Visibility: STV_PROTECTED + Binding: STB_GLOBAL diff --git a/llvm/test/tools/llvm-readobj/gnu-notes.test b/llvm/test/tools/llvm-readobj/gnu-notes.test index 21078231f19..ab7dcdeee90 100644 --- a/llvm/test/tools/llvm-readobj/gnu-notes.test +++ b/llvm/test/tools/llvm-readobj/gnu-notes.test @@ -101,20 +101,22 @@ Sections: AddressAlign: 0x0000000000000004 Content: 040000000900000004000000474E5500676F6C6420312E3131000000 Symbols: - Local: - - Name: reduced.c - Type: STT_FILE - - Type: STT_FILE - Global: - - Name: main - Type: STT_FUNC - Section: .text - Value: 0x0000000000400140 - Size: 0x0000000000000003 - - Name: _edata - Value: 0x0000000000401000 - - Name: __bss_start - Value: 0x0000000000401000 - - Name: _end - Value: 0x0000000000401000 + - Name: reduced.c + Type: STT_FILE + - Type: STT_FILE + - Name: main + Type: STT_FUNC + Section: .text + Value: 0x0000000000400140 + Size: 0x0000000000000003 + Binding: STB_GLOBAL + - Name: _edata + Value: 0x0000000000401000 + Binding: STB_GLOBAL + - Name: __bss_start + Value: 0x0000000000401000 + Binding: STB_GLOBAL + - Name: _end + Value: 0x0000000000401000 + Binding: STB_GLOBAL ... diff --git a/llvm/test/tools/obj2yaml/elf-gnu-unique-symbols.yaml b/llvm/test/tools/obj2yaml/elf-gnu-unique-symbols.yaml index fd29f30cc83..42925e1089a 100644 --- a/llvm/test/tools/obj2yaml/elf-gnu-unique-symbols.yaml +++ b/llvm/test/tools/obj2yaml/elf-gnu-unique-symbols.yaml @@ -11,10 +11,9 @@ # CHECK-NEXT: Type: ET_REL # CHECK-NEXT: Machine: EM_X86_64 # CHECK-NEXT: Symbols: -# CHECK-NEXT: GNUUnique: -# CHECK-NEXT: - Name: foo -# CHECK-NEXT: Type: STT_OBJECT -# CHECK-NEXT: DynamicSymbols: {} +# CHECK-NEXT: - Name: foo +# CHECK-NEXT: Type: STT_OBJECT +# CHECK-NEXT: Binding: STB_GNU_UNIQUE # CHECK-NEXT: ... --- !ELF @@ -25,6 +24,6 @@ FileHeader: Type: ET_REL Machine: EM_X86_64 Symbols: - GNUUnique: - - Name: foo - Type: STT_OBJECT + - Name: foo + Type: STT_OBJECT + Binding: STB_GNU_UNIQUE diff --git a/llvm/test/tools/obj2yaml/missing_symtab.test b/llvm/test/tools/obj2yaml/missing_symtab.test index b992931a0db..f61712c9b2a 100644 --- a/llvm/test/tools/obj2yaml/missing_symtab.test +++ b/llvm/test/tools/obj2yaml/missing_symtab.test @@ -2,4 +2,4 @@ # test that we don't crash when passed object files without a symbol table # CHECK-LABEL: FileHeader: # CHECK-LABEL: Sections: -# CHECK-LABEL: Symbols: +# CHECK-NOT: Symbols: diff --git a/llvm/test/tools/obj2yaml/special-symbol-indices.yaml b/llvm/test/tools/obj2yaml/special-symbol-indices.yaml index 127dc25a0df..25550c944f3 100644 --- a/llvm/test/tools/obj2yaml/special-symbol-indices.yaml +++ b/llvm/test/tools/obj2yaml/special-symbol-indices.yaml @@ -4,18 +4,22 @@ ## Test checks that we are able to handle symbols with special/reserved indices. # CHECK: Symbols: -# CHECK-NEXT: Global: -# CHECK-NEXT: - Name: absolute -# CHECK-NEXT: Index: SHN_ABS -# CHECK-NEXT: Value: 0x0000000000001234 -# CHECK-NEXT: - Name: common -# CHECK-NEXT: Index: SHN_COMMON -# CHECK-NEXT: - Name: valid_index -# CHECK-NEXT: Section: .text -# CHECK-NEXT: - Name: processor_specific_index -# CHECK-NEXT: Index: SHN_HEXAGON_SCOMMON_1 -# CHECK-NEXT: - Name: unknown_index -# CHECK-NEXT: Index: 0x0000FFFE +# CHECK-NEXT: - Name: absolute +# CHECK-NEXT: Index: SHN_ABS +# CHECK-NEXT: Binding: STB_GLOBAL +# CHECK-NEXT: Value: 0x0000000000001234 +# CHECK-NEXT: - Name: common +# CHECK-NEXT: Index: SHN_COMMON +# CHECK-NEXT: Binding: STB_GLOBAL +# CHECK-NEXT: - Name: valid_index +# CHECK-NEXT: Section: .text +# CHECK-NEXT: Binding: STB_GLOBAL +# CHECK-NEXT: - Name: processor_specific_index +# CHECK-NEXT: Index: SHN_HEXAGON_SCOMMON_1 +# CHECK-NEXT: Binding: STB_GLOBAL +# CHECK-NEXT: - Name: unknown_index +# CHECK-NEXT: Index: 0x0000FFFE +# CHECK-NEXT: Binding: STB_GLOBAL !ELF FileHeader: @@ -27,18 +31,22 @@ Sections: - Name: .text Type: SHT_PROGBITS Symbols: - Global: - - Name: absolute - Index: SHN_ABS - Value: 0x1234 - - Name: common - Index: SHN_COMMON - - Name: valid_index - Index: 0x1 - - Name: processor_specific_index - Index: SHN_HEXAGON_SCOMMON_1 - - Name: unknown_index - Index: 0xfffe + - Name: absolute + Index: SHN_ABS + Value: 0x1234 + Binding: STB_GLOBAL + - Name: common + Index: SHN_COMMON + Binding: STB_GLOBAL + - Name: valid_index + Index: 0x1 + Binding: STB_GLOBAL + - Name: processor_specific_index + Index: SHN_HEXAGON_SCOMMON_1 + Binding: STB_GLOBAL + - Name: unknown_index + Index: 0xfffe + Binding: STB_GLOBAL ## shn_xindex.o contains a symbol with st_shndx == SHN_XINDEX. ## We do not support it at this moment. diff --git a/llvm/test/tools/obj2yaml/symbol-type.yaml b/llvm/test/tools/obj2yaml/symbol-type.yaml index 8231990960d..8183143623f 100644 --- a/llvm/test/tools/obj2yaml/symbol-type.yaml +++ b/llvm/test/tools/obj2yaml/symbol-type.yaml @@ -2,11 +2,12 @@ # RUN: obj2yaml %t | FileCheck %s # CHECK: Symbols: -# CHECK-NEXT: Global: -# CHECK-NEXT: - Name: a_known_type -# CHECK-NEXT: Type: STT_OBJECT -# CHECK-NEXT: - Name: an_unknown_type -# CHECK-NEXT: Type: 0x07 +# CHECK-NEXT: - Name: a_known_type +# CHECK-NEXT: Type: STT_OBJECT +# CHECK-NEXT: Binding: STB_GLOBAL +# CHECK-NEXT: - Name: an_unknown_type +# CHECK-NEXT: Type: 0x07 +# CHECK-NEXT: Binding: STB_GLOBAL !ELF FileHeader: @@ -15,8 +16,9 @@ FileHeader: Type: ET_REL Machine: EM_X86_64 Symbols: - Global: - - Name: a_known_type - Type: STT_OBJECT - - Name: an_unknown_type - Type: 0x7 + - Name: a_known_type + Type: STT_OBJECT + Binding: STB_GLOBAL + - Name: an_unknown_type + Type: 0x7 + Binding: STB_GLOBAL diff --git a/llvm/test/tools/obj2yaml/verdef-section.yaml b/llvm/test/tools/obj2yaml/verdef-section.yaml index 87a283b32d5..29e492c0ad4 100644 --- a/llvm/test/tools/obj2yaml/verdef-section.yaml +++ b/llvm/test/tools/obj2yaml/verdef-section.yaml @@ -67,6 +67,6 @@ Sections: - VERSION_2 - VERSION_3 DynamicSymbols: - Global: - - Name: foo + - Name: foo + Binding: STB_GLOBAL ... diff --git a/llvm/test/tools/obj2yaml/verneed-section.yaml b/llvm/test/tools/obj2yaml/verneed-section.yaml index 6ca7cb2d88e..594757d4b64 100644 --- a/llvm/test/tools/obj2yaml/verneed-section.yaml +++ b/llvm/test/tools/obj2yaml/verneed-section.yaml @@ -65,5 +65,5 @@ Sections: Flags: 12 Other: 2 DynamicSymbols: - Global: - - Name: f1 + - Name: f1 + Binding: STB_GLOBAL diff --git a/llvm/test/tools/obj2yaml/versym-section.yaml b/llvm/test/tools/obj2yaml/versym-section.yaml index 5d69cb4fc94..38836960615 100644 --- a/llvm/test/tools/obj2yaml/versym-section.yaml +++ b/llvm/test/tools/obj2yaml/versym-section.yaml @@ -19,11 +19,11 @@ # CHECK-NEXT: AddressAlign: 0x0000000000000002 # CHECK-NEXT: EntSize: 0x0000000000000002 # CHECK-NEXT: Entries: [ 0, 3, 4 ] -# CHECK-NEXT: Symbols: {} # CHECK-NEXT: DynamicSymbols: -# CHECK-NEXT: Global: -# CHECK-NEXT: - Name: f1 -# CHECK-NEXT: - Name: f2 +# CHECK-NEXT: - Name: f1 +# CHECK-NEXT: Binding: STB_GLOBAL +# CHECK-NEXT: - Name: f2 +# CHECK-NEXT: Binding: STB_GLOBAL --- !ELF FileHeader: @@ -42,7 +42,8 @@ Sections: EntSize: 0x0000000000000002 Entries: [ 0, 3, 4 ] DynamicSymbols: - Global: - - Name: f1 - - Name: f2 + - Name: f1 + Binding: STB_GLOBAL + - Name: f2 + Binding: STB_GLOBAL ... diff --git a/llvm/test/tools/sanstats/elf.test b/llvm/test/tools/sanstats/elf.test index 67e6e4ae1c1..344384721e1 100644 --- a/llvm/test/tools/sanstats/elf.test +++ b/llvm/test/tools/sanstats/elf.test @@ -171,33 +171,34 @@ Sections: Relocations: - Offset: 0x0000000000000027 Type: R_X86_64_64 -Symbols: - Local: - - Name: f.c - Type: STT_FILE - - Type: STT_SECTION - Section: .text - - Type: STT_SECTION - Section: .debug_str - - Type: STT_SECTION - Section: .debug_abbrev - - Type: STT_SECTION - Section: .debug_info - - Type: STT_SECTION - Section: .debug_line - Global: - - Name: f1 - Type: STT_FUNC - Section: .text - Size: 0x0000000000000006 - - Name: f2 - Type: STT_FUNC - Section: .text - Value: 0x0000000000000010 - Size: 0x0000000000000006 - - Name: f3 - Type: STT_FUNC - Section: .text - Value: 0x0000000000000020 - Size: 0x0000000000000006 +Symbols: + - Name: f.c + Type: STT_FILE + - Type: STT_SECTION + Section: .text + - Type: STT_SECTION + Section: .debug_str + - Type: STT_SECTION + Section: .debug_abbrev + - Type: STT_SECTION + Section: .debug_info + - Type: STT_SECTION + Section: .debug_line + - Name: f1 + Type: STT_FUNC + Section: .text + Size: 0x0000000000000006 + Binding: STB_GLOBAL + - Name: f2 + Type: STT_FUNC + Section: .text + Value: 0x0000000000000010 + Size: 0x0000000000000006 + Binding: STB_GLOBAL + - Name: f3 + Type: STT_FUNC + Section: .text + Value: 0x0000000000000020 + Size: 0x0000000000000006 + Binding: STB_GLOBAL ... diff --git a/llvm/test/tools/yaml2obj/dynamic-symbols.yaml b/llvm/test/tools/yaml2obj/dynamic-symbols.yaml index c77f743e369..718b06d55c4 100644 --- a/llvm/test/tools/yaml2obj/dynamic-symbols.yaml +++ b/llvm/test/tools/yaml2obj/dynamic-symbols.yaml @@ -14,18 +14,18 @@ Sections: Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_WRITE ] DynamicSymbols: - Global: - - Name: dynglobal - Type: STT_OBJECT - Section: .data - Weak: - - Name: dynweak - Type: STT_OBJECT - Section: .data - Local: - - Name: dynlocal - Type: STT_OBJECT - Section: .data + - Name: dynglobal + Type: STT_OBJECT + Section: .data + Binding: STB_GLOBAL + - Name: dynweak + Type: STT_OBJECT + Section: .data + Binding: STB_WEAK + - Name: dynlocal + Type: STT_OBJECT + Section: .data + Binding: STB_LOCAL # SECTION: Name: .dynsym # SECTION-NEXT: Type: SHT_DYNSYM diff --git a/llvm/test/tools/yaml2obj/dynsym-dynstr-addr.yaml b/llvm/test/tools/yaml2obj/dynsym-dynstr-addr.yaml index c54787cf30e..e256fdc00e0 100644 --- a/llvm/test/tools/yaml2obj/dynsym-dynstr-addr.yaml +++ b/llvm/test/tools/yaml2obj/dynsym-dynstr-addr.yaml @@ -36,5 +36,5 @@ Sections: Address: 0x2000 EntSize: 0x18 DynamicSymbols: - Global: - - Name: foo + - Name: foo + Binding: STB_GLOBAL diff --git a/llvm/test/tools/yaml2obj/elf-comdat-broken.yaml b/llvm/test/tools/yaml2obj/elf-comdat-broken.yaml index 14b4d53eeeb..5ed7a56c9a6 100644 --- a/llvm/test/tools/yaml2obj/elf-comdat-broken.yaml +++ b/llvm/test/tools/yaml2obj/elf-comdat-broken.yaml @@ -16,8 +16,8 @@ Sections: - SectionOrType: 0xFF - SectionOrType: 3 Symbols: - Global: - - Name: foo + - Name: foo + - Binding: STB_GLOBAL ## Check we are able to produce SHT_GROUP section with a custom Type (0xFF). # CHECK: Groups { diff --git a/llvm/test/tools/yaml2obj/elf-gnu-unique-symbols.yaml b/llvm/test/tools/yaml2obj/elf-gnu-unique-symbols.yaml index 9872b5e76c4..06c504e65b3 100644 --- a/llvm/test/tools/yaml2obj/elf-gnu-unique-symbols.yaml +++ b/llvm/test/tools/yaml2obj/elf-gnu-unique-symbols.yaml @@ -16,6 +16,6 @@ FileHeader: Type: ET_REL Machine: EM_X86_64 Symbols: - GNUUnique: - - Name: foo - Type: STT_OBJECT + - Name: foo + Type: STT_OBJECT + Binding: STB_GNU_UNIQUE diff --git a/llvm/test/tools/yaml2obj/elf-symbols-binding-order.yaml b/llvm/test/tools/yaml2obj/elf-symbols-binding-order.yaml new file mode 100644 index 00000000000..1c9fbe30e4e --- /dev/null +++ b/llvm/test/tools/yaml2obj/elf-symbols-binding-order.yaml @@ -0,0 +1,18 @@ +## Check we restrict placing local symbols after global in .symtab +## We might want to change it later to allow doing that +## for producing broken outputs. + +# RUN: not yaml2obj %s -o %t 2>&1 | FileCheck %s +# CHECK: error: Local symbol 'bar' after global in Symbols list. + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Symbols: + - Name: foo + Binding: STB_GLOBAL + - Name: bar + Binding: STB_LOCAL diff --git a/llvm/test/tools/yaml2obj/elf-symtab-shinfo.yaml b/llvm/test/tools/yaml2obj/elf-symtab-shinfo.yaml index 649e5684f63..982c5d4efeb 100644 --- a/llvm/test/tools/yaml2obj/elf-symtab-shinfo.yaml +++ b/llvm/test/tools/yaml2obj/elf-symtab-shinfo.yaml @@ -36,8 +36,8 @@ Sections: Info: 26 Type: SHT_SYMTAB Symbols: - Global: - - Name: foo + - Name: foo + Binding: STB_GLOBAL DynamicSymbols: - Global: - - Name: bar + - Name: bar + Binding: STB_GLOBAL diff --git a/llvm/test/tools/yaml2obj/elf-symtab-shtype.yaml b/llvm/test/tools/yaml2obj/elf-symtab-shtype.yaml index cfa5cf427b7..143c0255b0e 100644 --- a/llvm/test/tools/yaml2obj/elf-symtab-shtype.yaml +++ b/llvm/test/tools/yaml2obj/elf-symtab-shtype.yaml @@ -17,5 +17,5 @@ Sections: - Name: .symtab Type: SHT_DYNAMIC Symbols: - Global: - - Name: foo + - Name: foo + Binding: STB_GLOBAL diff --git a/llvm/test/tools/yaml2obj/relocation-explicit-symbol-index.yaml b/llvm/test/tools/yaml2obj/relocation-explicit-symbol-index.yaml index ac16643b9b0..1a3470fe098 100644 --- a/llvm/test/tools/yaml2obj/relocation-explicit-symbol-index.yaml +++ b/llvm/test/tools/yaml2obj/relocation-explicit-symbol-index.yaml @@ -32,5 +32,5 @@ Sections: Offset: 0 Symbol: 0x1 Symbols: - Global: - - Name: foo + - Name: foo + Binding: STB_GLOBAL diff --git a/llvm/test/tools/yaml2obj/symbol-index.yaml b/llvm/test/tools/yaml2obj/symbol-index.yaml index e5c50735f4c..980c70d52cc 100644 --- a/llvm/test/tools/yaml2obj/symbol-index.yaml +++ b/llvm/test/tools/yaml2obj/symbol-index.yaml @@ -11,25 +11,32 @@ Sections: - Name: .text Type: SHT_PROGBITS Symbols: - Global: - - Name: absolute1 - Index: SHN_ABS - Value: 0x1234 - - Name: absolute2 - Index: 0xfff1 - Value: 0x4321 - - Name: common1 - Index: SHN_COMMON - - Name: common2 - Index: 0xfff2 - - Name: good - Index: 0x1 - - Name: bad - Index: 0x42 - - Name: undef1 - Index: SHN_UNDEF - - Name: undef2 - Index: 0 + - Name: absolute1 + Index: SHN_ABS + Value: 0x1234 + Binding: STB_GLOBAL + - Name: absolute2 + Index: 0xfff1 + Value: 0x4321 + Binding: STB_GLOBAL + - Name: common1 + Index: SHN_COMMON + Binding: STB_GLOBAL + - Name: common2 + Index: 0xfff2 + Binding: STB_GLOBAL + - Name: good + Index: 0x1 + Binding: STB_GLOBAL + - Name: bad + Index: 0x42 + Binding: STB_GLOBAL + - Name: undef1 + Index: SHN_UNDEF + Binding: STB_GLOBAL + - Name: undef2 + Index: 0 + Binding: STB_GLOBAL # CHECK: Symbol table '.symtab' contains 9 entries # CHECK-NEXT: Num: {{.*}} Ndx Name diff --git a/llvm/test/tools/yaml2obj/symbol-type.yaml b/llvm/test/tools/yaml2obj/symbol-type.yaml index 1bca0e41015..5b3bb73c43b 100644 --- a/llvm/test/tools/yaml2obj/symbol-type.yaml +++ b/llvm/test/tools/yaml2obj/symbol-type.yaml @@ -26,18 +26,24 @@ Sections: - Name: .text Type: SHT_PROGBITS Symbols: - Global: - - Name: notype - Type: STT_NOTYPE - - Name: normal_type - Type: STT_OBJECT - - Name: .text - Type: STT_SECTION - - Name: known_hex - Type: 0x1 - - Name: unknown_hex - Type: 0xb - - Name: known_int - Type: 1 - - Name: unknown_int - Type: 11 + - Name: notype + Type: STT_NOTYPE + Binding: STB_GLOBAL + - Name: normal_type + Type: STT_OBJECT + Binding: STB_GLOBAL + - Name: .text + Type: STT_SECTION + Binding: STB_GLOBAL + - Name: known_hex + Type: 0x1 + Binding: STB_GLOBAL + - Name: unknown_hex + Type: 0xb + Binding: STB_GLOBAL + - Name: known_int + Type: 1 + Binding: STB_GLOBAL + - Name: unknown_int + Type: 11 + Binding: STB_GLOBAL diff --git a/llvm/test/tools/yaml2obj/verdef-section.yaml b/llvm/test/tools/yaml2obj/verdef-section.yaml index deac6e736c0..582b8019266 100644 --- a/llvm/test/tools/yaml2obj/verdef-section.yaml +++ b/llvm/test/tools/yaml2obj/verdef-section.yaml @@ -64,6 +64,6 @@ Sections: - VERSION_2 - VERSION_3 DynamicSymbols: - Global: - - Name: foo + - Name: foo + Binding: STB_GLOBAL ... diff --git a/llvm/test/tools/yaml2obj/verneed-section.yaml b/llvm/test/tools/yaml2obj/verneed-section.yaml index 2fc58ad64f0..bdfddff9810 100644 --- a/llvm/test/tools/yaml2obj/verneed-section.yaml +++ b/llvm/test/tools/yaml2obj/verneed-section.yaml @@ -69,5 +69,5 @@ Sections: Flags: 12 Other: 2 DynamicSymbols: - Global: - - Name: f1 + - Name: f1 + Binding: STB_GLOBAL diff --git a/llvm/test/tools/yaml2obj/versym-section.yaml b/llvm/test/tools/yaml2obj/versym-section.yaml index 3c08ddd63d2..506e16cc5e1 100644 --- a/llvm/test/tools/yaml2obj/versym-section.yaml +++ b/llvm/test/tools/yaml2obj/versym-section.yaml @@ -82,7 +82,8 @@ Sections: Flags: 0 Other: 4 DynamicSymbols: - Global: - - Name: f1 - - Name: f2 + - Name: f1 + Binding: STB_GLOBAL + - Name: f2 + Binding: STB_GLOBAL ... |