Skip to content

Commit

Permalink
[ELF][test]Remove unnecessary empty symbol references in yaml/add mis…
Browse files Browse the repository at this point in the history
…sing 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
  • Loading branch information
jh7370 committed Feb 22, 2019
1 parent 35e1c66 commit 0cc32dd
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 7 deletions.
1 change: 0 additions & 1 deletion lld/test/ELF/arm-v4bx.test
Expand Up @@ -27,7 +27,6 @@ Sections:
Info: .text
Relocations:
- Offset: 0x0000000000000000
Symbol: ''
Type: R_ARM_V4BX
Symbols:
Global:
Expand Down
2 changes: 0 additions & 2 deletions lld/test/ELF/icf10.test
Expand Up @@ -28,13 +28,11 @@ Sections:
Info: .text.foo
Relocations:
- Offset: 0x0000000000000000
Symbol: ''
Type: R_X86_64_NONE
- Name: .rela.text.bar
Type: SHT_RELA
Link: .symtab
Info: .text.bar
Relocations:
- Offset: 0x0000000000000001
Symbol: ''
Type: R_X86_64_NONE
1 change: 0 additions & 1 deletion lld/test/ELF/icf11.test
Expand Up @@ -33,7 +33,6 @@ Sections:
Info: .text.foo
Relocations:
- Offset: 0x0000000000000000
Symbol: ''
Type: R_X86_64_NONE
- Name: .rela.text.bar
Type: SHT_RELA
Expand Down
5 changes: 5 additions & 0 deletions lld/test/ELF/invalid/reloc-section-reordered.test
Expand Up @@ -28,3 +28,8 @@ Sections:
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x04
Content: "FFFFFFFFFFFFFFFF"
Symbols:
Local:
- Name: .text
Type: STT_SECTION
Section: .text
1 change: 0 additions & 1 deletion lld/test/ELF/relocation-dtrace.test
Expand Up @@ -20,5 +20,4 @@ Sections:
Info: .text
Relocations:
- Offset: 0x0000000000000000
Symbol: ''
Type: R_X86_64_NONE
1 change: 0 additions & 1 deletion lld/test/ELF/relocation-none-aarch64.test
Expand Up @@ -20,5 +20,4 @@ Sections:
Info: .text
Relocations:
- Offset: 0
Symbol: ''
Type: R_AARCH64_NONE
1 change: 0 additions & 1 deletion lld/test/ELF/relocation-none-i686.test
Expand Up @@ -19,5 +19,4 @@ Sections:
Info: .text
Relocations:
- Offset: 0x0000000000000000
Symbol: ''
Type: R_386_NONE
7 changes: 7 additions & 0 deletions lld/test/ELF/undef-broken-debug.test
Expand Up @@ -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
Expand Down

0 comments on commit 0cc32dd

Please sign in to comment.