diff options
| author | James Henderson <jh7370@my.bristol.ac.uk> | 2019-11-04 12:00:39 +0000 |
|---|---|---|
| committer | James Henderson <jh7370@my.bristol.ac.uk> | 2019-11-04 12:04:04 +0000 |
| commit | ef85f47595a905475d3e7b8d1441ed69cb226d9c (patch) | |
| tree | f71a6b98acd2dc26b41339396b5f381c2fa8c79e /llvm/test/Object | |
| parent | 31ed36d0447def348af7b1d27daceb57d063382f (diff) | |
| download | bcm5719-llvm-ef85f47595a905475d3e7b8d1441ed69cb226d9c.tar.gz bcm5719-llvm-ef85f47595a905475d3e7b8d1441ed69cb226d9c.zip | |
[llvm-readobj] Change errors to warnings for symbol section name dumping
Also only print each such warning once.
LLVM-style output will now print "<?>" for sections it cannot identify,
e.g. because the section index is invalid. GNU output continues to print
the raw index. In both cases where the st_shndx value is SHN_XINDEX and
the index cannot be looked up in the SHT_SYMTAB_SHNDX section (e.g.
because it is missing), the symbol is printed like other symbols with
st_shndx >= SHN_LORESERVE.
Reviewed by: grimar, MaskRay
Differential Revision: https://reviews.llvm.org/D69671
Diffstat (limited to 'llvm/test/Object')
| -rw-r--r-- | llvm/test/Object/invalid.test | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/test/Object/invalid.test b/llvm/test/Object/invalid.test index 2c95eea74f2..ab498f237c9 100644 --- a/llvm/test/Object/invalid.test +++ b/llvm/test/Object/invalid.test @@ -235,13 +235,14 @@ Symbols: [] # INVALID-PH-ENTSIZE: error: '[[FILE]]': invalid e_phentsize: 12336 -## Check that llvm-readobj reports an error when we have no SHT_SYMTAB_SHNDX section, +## Check that llvm-readobj reports a warning when we have no SHT_SYMTAB_SHNDX section, ## but have a symbol referencing it. -# RUN: not llvm-readobj --symbols %p/Inputs/invalid-ext-symtab-index.elf-x86-64 2>&1 | \ +# RUN: llvm-readobj --symbols %p/Inputs/invalid-ext-symtab-index.elf-x86-64 2>&1 | \ # RUN: FileCheck -DFILE=%p/Inputs/invalid-ext-symtab-index.elf-x86-64 --check-prefix=INVALID-EXT-SYMTAB-INDEX %s -# INVALID-EXT-SYMTAB-INDEX: error: '[[FILE]]': extended symbol index (0) is past the end of the SHT_SYMTAB_SHNDX section of size 0 +# INVALID-EXT-SYMTAB-INDEX: warning: '[[FILE]]': extended symbol index (0) is past the end of the SHT_SYMTAB_SHNDX section of size 0 +# INVALID-EXT-SYMTAB-INDEX: Section: Reserved (0xFFFF) ## Check that llvm-readobj reports an error if a relocation section ## has a broken sh_offset (past the end of the file). |

