llvm-project/llvm/test/tools/yaml2obj
James Henderson 9bc817a0ae [yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad names
Prior to this change, the "Symbol" field of a relocation would always be
assumed to be a symbol name, and if no such symbol existed, the
relocation would reference index 0. This confused me when I tried to use
a literal symbol index in the field: since "0x1" was not a known symbol
name, the symbol index was set as 0. This change falls back to treating
unknown symbol names as integers, and emits an error if the name is not
found and the string is not an integer.

Note that the Symbol field is optional, so if a relocation doesn't
reference a symbol, it shouldn't be specified. The new error required a
number of test updates.

Reviewed by: grimar, ruiu
Differential Revision: https://reviews.llvm.org/D58510

llvm-svn: 355938
2019-03-12 17:00:25 +00:00
..
coff-arm64.yaml [obj2yaml] [COFF] Write RVA instead of VA for sections, fix roundtripping executables 2018-11-29 20:53:57 +00:00
coff-symbol-index.yaml [ObjectYAML] [COFF] Support multiple symbols with the same name 2019-01-07 20:55:33 +00:00
dynamic-section-i386.test [yaml2obj] - Fix .dynamic section entries writing for 32bit targets. 2019-02-10 08:35:38 +00:00
dynamic-section-raw-content.yaml [yaml2obj]Re-allow dynamic sections to have raw content 2019-02-25 11:02:24 +00:00
dynamic-section.yaml
dynamic-symbols.yaml
dynsym-dynstr-addr.yaml [yaml2obj] - Do not ignore explicit addresses for .dynsym and .dynstr 2019-02-19 12:15:04 +00:00
elf-abiversion.yaml [yaml2obj/obj2yaml] - Support dumping/parsing ABI version. 2018-12-20 10:43:49 +00:00
elf-comdat-broken-info.yaml [yaml2obj] - Teach yaml2obj to produce SHT_GROUP section with a custom Info field. 2018-08-15 13:55:22 +00:00
elf-comdat-broken.yaml [yaml2obj] - Teach tool to produce SHT_GROUP section with a custom type. 2018-08-15 11:43:00 +00:00
elf-ent-size.yaml
elf-header-elfdatanone.yaml [yaml2obj] - Allow producing ELFDATANONE ELFs 2019-03-07 12:09:19 +00:00
elf-symtab-shinfo.yaml [yaml2obj] - Allow setting custom sh_info for RawContentSection sections. 2019-03-01 10:18:16 +00:00
elf-symtab-shtype.yaml [yaml2obj] - Allow setting custom sh_info for RawContentSection sections. 2019-03-01 10:18:16 +00:00
empty-symbols.yaml
invalid-symboless-relocation.yaml
invalid_output_file.test
lit.local.cfg [obj2yaml][yaml2obj]Locate all .yaml and .test tests 2019-02-20 15:13:44 +00:00
missing_document_tag.yaml
program-header-align.yaml
program-header-nobits.yaml
program-header.yaml
reloc-sec-info.yaml [yaml2elf] - Use check-next in test. 2018-08-16 12:40:27 +00:00
relocation-explicit-symbol-index.yaml [yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad names 2019-03-12 17:00:25 +00:00
relocation-missing-symbol.yaml [yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad names 2019-03-12 17:00:25 +00:00
section-link.yaml [yaml2obj] - Allow to use numeric sh_link (Link) value for sections. 2018-08-16 12:44:17 +00:00
section-ordering.yaml
section-type.yaml [yaml2obj][obj2yaml] Remove section type range markers from allowed mappings and support hex values 2019-02-19 16:22:21 +00:00
symbol-index-invalid.yaml
symbol-index.yaml [yaml2obj]Allow symbol Index field to take values lower than SHN_LORESERVE 2019-02-21 10:57:15 +00:00
symbol-type.yaml [yaml2obj]Allow number for ELF symbol type 2019-02-06 17:16:33 +00:00
symboless-relocation.yaml
unnamed-section.yaml
unsupported_document_tag.yaml
verdef-section.yaml [yaml2obj][obj2yaml] - Support SHT_GNU_verdef (.gnu.version_d) section. 2019-02-21 12:21:43 +00:00
verneed-section.yaml Recommit r354328, r354329 "[obj2yaml][yaml2obj] - Add support of parsing/dumping of the .gnu.version_r section." 2019-02-19 14:53:48 +00:00
versym-section.yaml [yaml2obj][obj2yaml] - Support SHT_GNU_versym (.gnu.version) section. 2019-02-19 15:29:07 +00:00