HomePhabricator

[llvm-readobj][test] - Improve section-symbols.test

Authored by grimar on Sep 14 2020, 6:38 AM.

Description

[llvm-readobj][test] - Improve section-symbols.test

section-symbols.test tests how we print section symbols in
different situations.

We might have 2 different cases:

  1. A named STT_SECTION symbol.
  2. An unnamed STT_SECTION symbol.

Usually section symbols have no name and then --symbols uses their
section names when prints them. If symbol has a name, then it is used.

For --relocations we also want to have this logic probably,
but currently we always ignore symbol names and always use section names.
It is not consistent with GNU readelf and with our logic for --symbols.

This patch refines testing to document the existent behavior and improve
coverage.

Differential revision: https://reviews.llvm.org/D87612

Details