Page MenuHomePhabricator

[XCOFF] [llvm-readobj] improve the relocation output.

Authored by Esme on Oct 13 2021, 2:50 AM.


  1. implemented the unexpanded relocations output.
  2. modified the expanded output format to align.

Diff Detail

Event Timeline

Esme created this revision.Oct 13 2021, 2:50 AM
Esme requested review of this revision.Oct 13 2021, 2:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2021, 2:50 AM
Higuoxing added inline comments.Oct 13 2021, 6:42 PM

I think we can simplify it by using index to iterate the relocation entries.

Esme updated this revision to Diff 379590.Oct 13 2021, 7:58 PM

Address comment.

Esme updated this revision to Diff 379591.Oct 13 2021, 8:00 PM
shchenz added inline comments.Oct 13 2021, 8:01 PM

Unexpanded relocation entries should have 4 fields: vaddr/symndx(SymbolName)/rsize/rtype.

Expanded relocation entries should have 6fields: vaddr/symndx(SymbolName)/sign/fixup/len/type.

Maybe we should also contain rsize(which contains info for sign/fixup/len) in the unexpanded relocation info?

Esme updated this revision to Diff 379592.Oct 13 2021, 8:02 PM
Esme updated this revision to Diff 379594.Oct 13 2021, 8:11 PM
Esme updated this revision to Diff 379604.Oct 13 2021, 8:49 PM

Dump Info for unexpended relocations.

Higuoxing added inline comments.Oct 24 2021, 10:02 PM

Since you're fixing the indention issue, let's add --strict-whitespace to FileCheck

Esme updated this revision to Diff 383742.Nov 1 2021, 2:11 AM

Rebase and address comments.

Generally looks fine to me, but best wait for someone with XCOFF knowledge to approve.


See my comment in D111699 for explanation (you could fix the above check similarly in this patch, if you wanted to match).

shchenz accepted this revision.Tue, Nov 2, 7:10 PM

The relocation info looks good to me. I am going to approve this since @jhenderson now has a minor comment related to the test checks.

This revision is now accepted and ready to land.Tue, Nov 2, 7:10 PM
This revision was landed with ongoing or failed builds.Sun, Nov 7, 7:16 PM
This revision was automatically updated to reflect the committed changes.