This is an archive of the discontinued LLVM Phabricator instance.

[obj2yaml] - Better dumping for relocations without symbols associated.
ClosedPublic

Authored by grimar on Oct 21 2019, 6:15 AM.

Details

Summary

This just reorders the code and removes an assignment
of an empty string for the case when a relocation has
no symbol associated. With this our output becomes
cleaner and shorter.

Diff Detail

Event Timeline

grimar created this revision.Oct 21 2019, 6:15 AM

This is a reasonable change to eventually remove the implicit rule of .symtab definition.

tools/obj2yaml/elf2yaml.cpp
416 ↗(On Diff #225867)

R_X86_64_GOTPC32 and R_PPC64_TOC are examples that use 0 as the symbol index. We probably should not call them "edge cases".

grimar updated this revision to Diff 226006.Oct 22 2019, 1:46 AM
grimar marked an inline comment as done.
  • Addressed review comment.
MaskRay accepted this revision.Oct 24 2019, 11:08 PM
MaskRay added inline comments.
tools/obj2yaml/elf2yaml.cpp
413 ↗(On Diff #226006)

with symbol index 0.

This revision is now accepted and ready to land.Oct 24 2019, 11:08 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2019, 2:56 AM