[lld] r354666 - [ELF][test]Remove unnecessary empty symbol references in yaml/add missing symbols for relocs

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 22 03:22:39 PST 2019


Author: jhenderson
Date: Fri Feb 22 03:22:39 2019
New Revision: 354666

URL: http://llvm.org/viewvc/llvm-project?rev=354666&view=rev
Log:
[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

Modified:
    lld/trunk/test/ELF/arm-v4bx.test
    lld/trunk/test/ELF/icf10.test
    lld/trunk/test/ELF/icf11.test
    lld/trunk/test/ELF/invalid/reloc-section-reordered.test
    lld/trunk/test/ELF/relocation-dtrace.test
    lld/trunk/test/ELF/relocation-none-aarch64.test
    lld/trunk/test/ELF/relocation-none-i686.test
    lld/trunk/test/ELF/undef-broken-debug.test

Modified: lld/trunk/test/ELF/arm-v4bx.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/arm-v4bx.test?rev=354666&r1=354665&r2=354666&view=diff
==============================================================================
--- lld/trunk/test/ELF/arm-v4bx.test (original)
+++ lld/trunk/test/ELF/arm-v4bx.test Fri Feb 22 03:22:39 2019
@@ -27,7 +27,6 @@ Sections:
     Info:            .text
     Relocations:
       - Offset:          0x0000000000000000
-        Symbol:          ''
         Type:            R_ARM_V4BX
 Symbols:
   Global:

Modified: lld/trunk/test/ELF/icf10.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/icf10.test?rev=354666&r1=354665&r2=354666&view=diff
==============================================================================
--- lld/trunk/test/ELF/icf10.test (original)
+++ lld/trunk/test/ELF/icf10.test Fri Feb 22 03:22:39 2019
@@ -28,7 +28,6 @@ Sections:
     Info:            .text.foo
     Relocations:
       - Offset:          0x0000000000000000
-        Symbol:          ''
         Type:            R_X86_64_NONE
   - Name:            .rela.text.bar
     Type:            SHT_RELA
@@ -36,5 +35,4 @@ Sections:
     Info:            .text.bar
     Relocations:
       - Offset:          0x0000000000000001
-        Symbol:          ''
         Type:            R_X86_64_NONE

Modified: lld/trunk/test/ELF/icf11.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/icf11.test?rev=354666&r1=354665&r2=354666&view=diff
==============================================================================
--- lld/trunk/test/ELF/icf11.test (original)
+++ lld/trunk/test/ELF/icf11.test Fri Feb 22 03:22:39 2019
@@ -33,7 +33,6 @@ Sections:
     Info:            .text.foo
     Relocations:
       - Offset:          0x0000000000000000
-        Symbol:          ''
         Type:            R_X86_64_NONE
   - Name:            .rela.text.bar
     Type:            SHT_RELA

Modified: lld/trunk/test/ELF/invalid/reloc-section-reordered.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid/reloc-section-reordered.test?rev=354666&r1=354665&r2=354666&view=diff
==============================================================================
--- lld/trunk/test/ELF/invalid/reloc-section-reordered.test (original)
+++ lld/trunk/test/ELF/invalid/reloc-section-reordered.test Fri Feb 22 03:22:39 2019
@@ -28,3 +28,8 @@ Sections:
     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
     AddressAlign:    0x04
     Content:         "FFFFFFFFFFFFFFFF"
+Symbols:
+  Local:
+    - Name:    .text
+      Type:    STT_SECTION
+      Section: .text

Modified: lld/trunk/test/ELF/relocation-dtrace.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation-dtrace.test?rev=354666&r1=354665&r2=354666&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocation-dtrace.test (original)
+++ lld/trunk/test/ELF/relocation-dtrace.test Fri Feb 22 03:22:39 2019
@@ -20,5 +20,4 @@ Sections:
     Info:            .text
     Relocations:
       - Offset:          0x0000000000000000
-        Symbol:          ''
         Type:            R_X86_64_NONE

Modified: lld/trunk/test/ELF/relocation-none-aarch64.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation-none-aarch64.test?rev=354666&r1=354665&r2=354666&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocation-none-aarch64.test (original)
+++ lld/trunk/test/ELF/relocation-none-aarch64.test Fri Feb 22 03:22:39 2019
@@ -20,5 +20,4 @@ Sections:
     Info:            .text
     Relocations:
       - Offset:          0
-        Symbol:          ''
         Type:            R_AARCH64_NONE

Modified: lld/trunk/test/ELF/relocation-none-i686.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation-none-i686.test?rev=354666&r1=354665&r2=354666&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocation-none-i686.test (original)
+++ lld/trunk/test/ELF/relocation-none-i686.test Fri Feb 22 03:22:39 2019
@@ -19,5 +19,4 @@ Sections:
     Info:            .text
     Relocations:
       - Offset:          0x0000000000000000
-        Symbol:          ''
         Type:            R_386_NONE

Modified: lld/trunk/test/ELF/undef-broken-debug.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/undef-broken-debug.test?rev=354666&r1=354665&r2=354666&view=diff
==============================================================================
--- lld/trunk/test/ELF/undef-broken-debug.test (original)
+++ lld/trunk/test/ELF/undef-broken-debug.test Fri Feb 22 03:22:39 2019
@@ -62,6 +62,13 @@ Sections:
     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




More information about the llvm-commits mailing list