This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readobj][llvm-readelf][test] - Add a few more dynamic section tests.
ClosedPublic

Authored by grimar on Dec 26 2019, 4:12 AM.

Details

Summary

This adds a few more tests for dynamic section.

We only had tests for simple unknown values for 64-bits target,
in this patch I've added OS specific and processor specific tags.
Also it tests both 32 and 64-bits targets now.

It will help to fix the formatting issues we have and diagnose a possible new ones.

Diff Detail

Event Timeline

grimar created this revision.Dec 26 2019, 4:12 AM
Herald added a project: Restricted Project. · View Herald Transcript
grimar updated this revision to Diff 235394.EditedDec 27 2019, 1:08 AM
  • Rebase.

What are the formatting issues you are referring to in your description?

It might be worth updating the description to enumerate the new test cases (i.e. 32-bit and proc/os-specific values).

llvm/test/tools/llvm-objdump/elf-dynamic-section.test
1–2

Maybe -o, since you're changing this line.

195–299

un-marked -> unmarked

Same in other places.

What are the formatting issues you are referring to in your description?

Things like below in ELF/dynamic-tags.test:

# GNU64-NEXT:  0x000000007fffffff (FILTER)             Filter library: [U]
# GNU64-NEXT:  0x0000000012345678 (<unknown:>0x12345678) 0x8765432187654321
# GNU64-NEXT:  0x000000006abcdef0 (<unknown:>0x6abcdef0) 0x9988776655443322
# GNU64-NEXT:  0x0000000076543210 (<unknown:>0x76543210) 0x5555666677778888
# GNU64-NEXT:  0x0000000000000000 (NULL)               0x0

I.e. we need to have tests for both 32 and 64 bits I think to document the formatting we have.

(I'll address the other comments and update this patch soon.)

grimar edited the summary of this revision. (Show Details)Jan 14 2020, 5:10 AM
grimar updated this revision to Diff 237947.Jan 14 2020, 5:14 AM
grimar marked 2 inline comments as done.
  • Addressed review comments.
This revision is now accepted and ready to land.Jan 14 2020, 5:34 AM
This revision was automatically updated to reflect the committed changes.