[all-commits] [llvm/llvm-project] 7f8c49: [llvm-objdump] Change symbol name/PLT decoding err...

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Aug 13 08:14:04 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7f8c49b016003a1a642235b14788648736809a58
      https://github.com/llvm/llvm-project/commit/7f8c49b016003a1a642235b14788648736809a58
  Author: Fangrui Song <i at maskray.me>
  Date:   2020-08-13 (Thu, 13 Aug 2020)

  Changed paths:
    M llvm/include/llvm/Object/ELFObjectFile.h
    M llvm/lib/Object/ELFObjectFile.cpp
    M llvm/test/tools/llvm-objdump/ELF/AArch64/plt.test
    M llvm/test/tools/llvm-objdump/MachO/malformed-machos.test
    M llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp
    M llvm/tools/llvm-objdump/llvm-objdump.cpp

  Log Message:
  -----------
  [llvm-objdump] Change symbol name/PLT decoding errors to warnings

If the referenced symbol of a J[U]MP_SLOT is invalid (e.g. symbol index 0), llvm-objdump -d will bail out:

```
error: 'a': st_name (0x326600) is past the end of the string table of size 0x7
```

where 0x326600 is the st_name field of the first entry past the end of .symtab

Change it to a warning to continue dumping.
`X86/plt.test` uses a prebuilt executable, so I pick `ELF/AArch64/plt.test`
which has a YAML input and can be easily modified.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D85623




More information about the All-commits mailing list