llvm-project/llvm/test/Object
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
..
AArch64 [obj2yaml] - Dump the sh_entsize section field. 2019-01-28 15:05:10 +00:00
AMDGPU [yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad names 2019-03-12 17:00:25 +00:00
ARM Reland r298901 with modifications (reverted in r298932) 2017-04-03 21:50:04 +00:00
Inputs Limit dyld image suffixes guessed by guessLibraryShortName() 2019-01-24 20:59:44 +00:00
Lanai [yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad names 2019-03-12 17:00:25 +00:00
Mips [obj2yaml] - Dump the sh_entsize section field. 2019-01-28 15:05:10 +00:00
RISCV [llvm-readobj][RISCV] Pretty-print RISCV e_flags 2017-10-03 08:41:59 +00:00
X86 [yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad names 2019-03-12 17:00:25 +00:00
ar-create.test [libObject] Tweak expected error output from llvm-ar 2019-01-15 22:03:08 +00:00
ar-error.test [libObject] Tweak expected error output from llvm-ar 2019-01-15 22:03:08 +00:00
archive-darwin-duplicates.test Give same-named members unique timestamps on Darwin in llvm-ar. 2018-10-04 18:49:21 +00:00
archive-delete.test Remove uses of "%T" from test/Object/archive-* tests. 2017-08-20 18:18:44 +00:00
archive-error-tmp.txt
archive-extract-dir.test
archive-extract.test [libObject] Tweak expected error output from llvm-ar 2019-01-15 22:03:08 +00:00
archive-format.test [Object] Deduplicate long archive member names 2018-12-19 16:15:05 +00:00
archive-long-filenames-no-null-terminator.test Add a test for r331746. 2018-05-09 08:20:14 +00:00
archive-long-index.test
archive-move.test Remove uses of "%T" from test/Object/archive-* tests. 2017-08-20 18:18:44 +00:00
archive-pad.test Write to a temporary file in test instead of random file in the test directory. 2017-02-22 09:02:27 +00:00
archive-replace-pos.test
archive-symtab.test llvm-ar: Darwin archive format fixes. 2018-10-10 21:07:02 +00:00
archive-thin-create.test llvm/test/Object/archive-thin-create.test: Make sure that %t is empty to stabilize the test. 2016-12-09 11:44:57 +00:00
archive-thin-paths.test Remove uses of "%T" from test/Object/archive-* tests. 2017-08-20 18:18:44 +00:00
archive-thin-read.test
archive-toc.test [llvm-ar] Use POSIX-specified timestamps for 'tv'. 2018-10-05 23:25:39 +00:00
archive-update.test Fix archive-update.test after r311296. 2017-08-20 18:31:30 +00:00
check_binary_output.ll
coff-archive-short.test
coff-archive.test
coff-empty-drectve.test [COFF] Gracefully handle empty .drectve sections 2017-05-14 18:34:56 +00:00
coff-invalid.test
coff-weak-externals.test
corrupt.test [ELF] Convert ELF.h to Expected<T>. 2016-11-16 05:10:28 +00:00
directory.ll [llvm] Get rid of "%T" expansions 2017-08-15 20:29:24 +00:00
dllimport-globalref.ll
dllimport.ll
dyn-rel-relocation.test
dynamic-reloc.test
elf-invalid-phdr.test Added phdr upper bound checks to ElfObject. 2017-10-05 20:01:32 +00:00
elf-reloc-no-sym.test
elf-unknown-type.test [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
invalid-alignment.test Allow unaligned access to ELF file data structures. 2018-01-12 22:09:19 +00:00
invalid.test Allow unaligned access to ELF file data structures. 2018-01-12 22:09:19 +00:00
kext.test
lit.local.cfg
macho-invalid.test [MachO] Prevent heap overflow when load command extends past EOF 2017-09-13 13:43:01 +00:00
mangle-ir.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
mri-addlib.test
mri-addmod.test
mri-crlf.test
mri1.test
mri2.test
mri3.test
mri4.test
mri5.test
multi-module.ll Object: Make IRObjectFile own multiple modules and enumerate symbols from all modules. 2016-12-13 20:20:17 +00:00
nm-archive.test Convert two uses of ErrorOr to Expected. 2017-10-10 20:00:07 +00:00
nm-darwin-m.test Limit dyld image suffixes guessed by guessLibraryShortName() 2019-01-24 20:59:44 +00:00
nm-error.test
nm-irix6.test
nm-pe-image.test
nm-shared-object.test [llvm-nm] Write "no symbol" output to stderr 2018-10-05 21:10:03 +00:00
nm-trivial-object.test [llvm-nm] Report '.comment' ELF sections as 'n' instead of '?' 2019-02-01 17:38:08 +00:00
nm-universal-binary.test
nm-weak-global-macho.test
no-section-header-string-table.test
no-section-table.test [llvm-readobj] - Teach readobj to print DT_FILTER dynamic tag in human readable form. 2017-07-14 16:00:16 +00:00
obj2yaml-coff-long-file-symbol.test
obj2yaml-coff-long-section-name.test
obj2yaml-coff-section-aux-symbol.test
obj2yaml-coff-weak-external.test
obj2yaml-invalid-reloc.test Fix BB after r354661 2019-02-22 08:58:23 +00:00
obj2yaml-sectiongroup.test [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
obj2yaml.test Fix BB after r354661 2019-02-22 08:58:23 +00:00
objc-imageinfo-coff.ll test: fix hexagon build 2017-06-05 21:45:25 +00:00
objc-imageinfo-elf.ll test: fix hexagon build 2017-06-05 21:45:25 +00:00
objc-imageinfo-macho.ll test: fix hexagon build 2017-06-05 21:45:25 +00:00
objdump-export-list.test
objdump-file-header.test
objdump-no-sectionheaders.test [llvm-objdump] - Print LMAs when dumping section headers. 2019-01-28 14:11:35 +00:00
objdump-private-headers.test
objdump-reloc-shared.test
objdump-relocations.test [WebAssembly] Rename relocations from R_WEBASSEMBLY_ to R_WASM_ 2019-02-04 17:28:46 +00:00
objdump-section-content.test
objdump-sectionheaders.test [llvm-objdump] - Print LMAs when dumping section headers. 2019-01-28 14:11:35 +00:00
objdump-shndx.test Implemented sane default for llvm-objdump's relocation Value format 2018-06-01 05:31:58 +00:00
objdump-symbol-table.test [llvm][test] Update tests using objdump 2018-11-11 18:40:33 +00:00
pr25877.test
readobj-absent.test
readobj-elf-versioning.test
readobj-shared-object.test [llvm-readobj] Display section names for STT_SECTION symbols. 2019-03-01 17:31:32 +00:00
readobj.test
relocation-executable.test
simple-archive.test
size-trivial-macho.test
stackmap-dump.test [Stackmap] Added callsite counts to emitted function information. 2016-09-14 20:22:03 +00:00
wasm-bad-metadata-version.yaml [WebAssembly] Store section alignment as a power of 2 2019-01-16 01:34:48 +00:00
wasm-duplicate-name.test [WebAssembly] Don't allow functions to be named twice 2018-01-12 02:11:31 +00:00
wasm-invalid-file.yaml Fix use of `echo` command in test script 2018-05-30 03:26:28 +00:00
wasm-invalid-section-order.test [WebAssembly] Check if the section order is correct 2018-12-15 00:58:12 +00:00
wasm-invalid-start.test [WebAssembly] Fix validation of start function 2017-05-09 17:51:38 +00:00
wasm-missing-version.test [WebAssembly] Fix overflow for input with missing version 2017-08-23 21:36:04 +00:00
wasm-relocs-and-producers.yaml [WebAssembly] Generalize section ordering constraints 2019-02-20 02:22:36 +00:00
wasm-string-outside-section.test [WASM] Fix overflow when reading custom section 2018-08-08 16:34:03 +00:00
yaml2obj-coff-invalid-alignment.test [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
yaml2obj-coff-multi-doc.test [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
yaml2obj-elf-alignment.yaml [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
yaml2obj-elf-bits-endian.test [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
yaml2obj-elf-file-headers-with-e_flags.yaml [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
yaml2obj-elf-file-headers.yaml [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
yaml2obj-elf-multi-doc.test [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
yaml2obj-elf-rel-noref.yaml [yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad names 2019-03-12 17:00:25 +00:00
yaml2obj-elf-rel.yaml [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
yaml2obj-elf-section-basic.yaml [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
yaml2obj-elf-section-invalid-size.yaml [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
yaml2obj-elf-symbol-LocalGlobalWeak.yaml [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
yaml2obj-elf-symbol-basic.yaml [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
yaml2obj-elf-symbol-visibility.yaml [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
yaml2obj-invalid.yaml [yaml2obj] - Don't crash on one more invalid document. 2017-09-21 08:25:59 +00:00
yaml2obj-readobj.test [llvm-readobj] [COFF] Print the symbol index for relocations 2019-01-03 08:08:23 +00:00