[PATCH] D87763: [llvm-readelf/obj][test] - Document what we print in various places for unnamed section symbols.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 07:40:36 PDT 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: rupprecht, atanasyan, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
grimar requested review of this revision.

We have an issue with `ELFDumper<ELFT>::getSymbolSectionName`:

1. It is used deeply for both LLVM/GNU styles and might return LLVM-style only values to describe symbols: "Undefined", "Processor Specific", "Absolute", etc.

2. `getSymbolSectionName` is used by `getFullSymbolName` and these special values might appear in instead of symbol names in many places. This occurs for unnamed section symbols.

It was not noticed because for most cases I've found it is unexpected to have an
unnamed section symbol. This patch documents the existent behavior, adds tests and FIXMEs.

These FIXMEs are fixed by a follow-up patch that I'll post shortly.


https://reviews.llvm.org/D87763

Files:
  llvm/test/tools/llvm-readobj/ELF/dyn-symbols.test
  llvm/test/tools/llvm-readobj/ELF/hash-symbols.test
  llvm/test/tools/llvm-readobj/ELF/mips-got.test
  llvm/test/tools/llvm-readobj/ELF/mips-plt.test
  llvm/test/tools/llvm-readobj/ELF/symbol-shndx.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87763.292215.patch
Type: text/x-patch
Size: 12698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200916/3532021d/attachment.bin>


More information about the llvm-commits mailing list