This is an archive of the discontinued LLVM Phabricator instance.

[yaml2obj] - Allow overriding sh_entsize for SHT_GNU_versym sections.
ClosedPublic

Authored by grimar on Jul 29 2019, 5:05 AM.

Details

Summary

This allows to write a test case for one of untested errors
in llvm/Object/ELF.h.

I did it in this patch to demonstrate.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar created this revision.Jul 29 2019, 5:05 AM
MaskRay added inline comments.Aug 3 2019, 6:36 PM
test/Object/invalid.test
610 ↗(On Diff #212150)

How about moving this yaml document to test/tools/yaml2obj/versym-section.yaml?

tools/yaml2obj/yaml2elf.cpp
800 ↗(On Diff #212150)

?: may be used here.

grimar updated this revision to Diff 213330.Aug 5 2019, 5:23 AM
grimar marked 3 inline comments as done.
  • Addressed review comments.
test/Object/invalid.test
610 ↗(On Diff #212150)

But we have test/Object/invalid.test exactly to check the errors reported in llvm/Object/ELF.h.

I.e. this test checks the functionality of lib/Object, just like the other 28 tests around.
Seems it is a proper place to have it?

tools/yaml2obj/yaml2elf.cpp
800 ↗(On Diff #212150)

Ok. Done.

MaskRay accepted this revision.Aug 5 2019, 6:01 AM
MaskRay added inline comments.
tools/yaml2obj/yaml2elf.cpp
800 ↗(On Diff #212150)

one pair of the parentheses can be deleted:)

This revision is now accepted and ready to land.Aug 5 2019, 6:01 AM
This revision was automatically updated to reflect the committed changes.
grimar marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2019, 6:56 AM