[ELF][test]Remove unnecessary empty symbol references in yaml/add missing symbols for relocs
yaml2obj used to require the Symbol field in relocations, but it hasn't
done so for a couple of years. Another change to yaml2obj will soon land
that will look up the symbol by name or index, if present, and emit an
error if not found. This will mean that an explicit symbol reference
(even to an empty-named symbol) that does not reference a symbol
declared in the yaml will result in an error.
This patch updates tests that would otherwise start emitting errors.
Reviewed by: ruiu, grimar
Differential Revision: https://reviews.llvm.org/D58508
llvm-svn: 354666
diff --git a/lld/test/ELF/arm-v4bx.test b/lld/test/ELF/arm-v4bx.test
index 1b39a43..9d9921d 100644
--- a/lld/test/ELF/arm-v4bx.test
+++ b/lld/test/ELF/arm-v4bx.test
@@ -27,7 +27,6 @@
Info: .text
Relocations:
- Offset: 0x0000000000000000
- Symbol: ''
Type: R_ARM_V4BX
Symbols:
Global:
diff --git a/lld/test/ELF/icf10.test b/lld/test/ELF/icf10.test
index 96b4caf2..20963b2 100644
--- a/lld/test/ELF/icf10.test
+++ b/lld/test/ELF/icf10.test
@@ -28,7 +28,6 @@
Info: .text.foo
Relocations:
- Offset: 0x0000000000000000
- Symbol: ''
Type: R_X86_64_NONE
- Name: .rela.text.bar
Type: SHT_RELA
@@ -36,5 +35,4 @@
Info: .text.bar
Relocations:
- Offset: 0x0000000000000001
- Symbol: ''
Type: R_X86_64_NONE
diff --git a/lld/test/ELF/icf11.test b/lld/test/ELF/icf11.test
index 8c3aa93..edda386 100644
--- a/lld/test/ELF/icf11.test
+++ b/lld/test/ELF/icf11.test
@@ -33,7 +33,6 @@
Info: .text.foo
Relocations:
- Offset: 0x0000000000000000
- Symbol: ''
Type: R_X86_64_NONE
- Name: .rela.text.bar
Type: SHT_RELA
diff --git a/lld/test/ELF/invalid/reloc-section-reordered.test b/lld/test/ELF/invalid/reloc-section-reordered.test
index 7ff4ed6..3de567f 100644
--- a/lld/test/ELF/invalid/reloc-section-reordered.test
+++ b/lld/test/ELF/invalid/reloc-section-reordered.test
@@ -28,3 +28,8 @@
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x04
Content: "FFFFFFFFFFFFFFFF"
+Symbols:
+ Local:
+ - Name: .text
+ Type: STT_SECTION
+ Section: .text
diff --git a/lld/test/ELF/relocation-dtrace.test b/lld/test/ELF/relocation-dtrace.test
index 9007a26..7f4d3ac 100644
--- a/lld/test/ELF/relocation-dtrace.test
+++ b/lld/test/ELF/relocation-dtrace.test
@@ -20,5 +20,4 @@
Info: .text
Relocations:
- Offset: 0x0000000000000000
- Symbol: ''
Type: R_X86_64_NONE
diff --git a/lld/test/ELF/relocation-none-aarch64.test b/lld/test/ELF/relocation-none-aarch64.test
index e77989a..bdf4cb1 100644
--- a/lld/test/ELF/relocation-none-aarch64.test
+++ b/lld/test/ELF/relocation-none-aarch64.test
@@ -20,5 +20,4 @@
Info: .text
Relocations:
- Offset: 0
- Symbol: ''
Type: R_AARCH64_NONE
diff --git a/lld/test/ELF/relocation-none-i686.test b/lld/test/ELF/relocation-none-i686.test
index 82dc4e6..5e98676 100644
--- a/lld/test/ELF/relocation-none-i686.test
+++ b/lld/test/ELF/relocation-none-i686.test
@@ -19,5 +19,4 @@
Info: .text
Relocations:
- Offset: 0x0000000000000000
- Symbol: ''
Type: R_386_NONE
diff --git a/lld/test/ELF/undef-broken-debug.test b/lld/test/ELF/undef-broken-debug.test
index c3405ad..3ed4c2b 100644
--- a/lld/test/ELF/undef-broken-debug.test
+++ b/lld/test/ELF/undef-broken-debug.test
@@ -62,6 +62,13 @@
Content: '0111001017000000'
Symbols:
+ Local:
+ - Name: .debug_abbrev
+ Type: STT_SECTION
+ Section: .debug_abbrev
+ - Name: .debug_line
+ Type: STT_SECTION
+ Section: .debug_line
Global:
- Name: _start
Section: .text