This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readobj]Add testing for ELF symbol and section table printing for a wider range of values
ClosedPublic

Authored by jhenderson on Feb 20 2019, 9:04 AM.

Details

Summary

The existing ELF symbol and section table testing doesn't test many of the corner-cases or valid values for various ELF properties, including things like binding, visibility, section type and so on. This patch adds a series of tests that test these and other related edge-cases.

Diff Detail

Repository
rL LLVM

Event Timeline

jhenderson created this revision.Feb 20 2019, 9:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 20 2019, 9:04 AM
Herald added a subscriber: srhines. · View Herald Transcript
jhenderson retitled this revision from [llvm-readobj]Add testing for ELF symbol table printing for a wider range of values to [llvm-readobj]Add testing for ELF symbol and section table printing for a wider range of values.Feb 20 2019, 9:06 AM
jhenderson edited the summary of this revision. (Show Details)

Test cases look fine to me, but I would add descriptions about what test is about (where missing), like you did for elf-section-types.test

test/tools/llvm-readobj/elf-symbol-shndx.test
2

I would add a test description at first. Because when you start the test from explaining the implementation
with "use --dyn-symbols because..." this raises a question in my head: "but what this test is about?"

MaskRay added inline comments.Feb 21 2019, 2:22 AM
test/tools/llvm-readobj/elf-machine-specific-section-types.test
95

SHT_MIPS_DWARF should be recognized now after rL354563. Hope nobody complains :)

  • Add more comments.
  • Rebase to remove FIXMEs relating to SHT_MIPS_DWARF.
  • Rebase to add required fields for verneed sections.
grimar accepted this revision.Feb 21 2019, 4:30 AM

LGTM

test/tools/llvm-readobj/elf-section-types.test
2

nit: all regular maybe? (since machine-specific are tested in elf-machine-specific-section-types.test)

This revision is now accepted and ready to land.Feb 21 2019, 4:30 AM

Update comment. Rebase for new yaml2obj support for SHT_GNU_verdef sections.

This revision was automatically updated to reflect the committed changes.