Page MenuHomePhabricator

[PPC64] Fix RelType in checkInt and checkAlignment diagnsotics.
ClosedPublic

Authored by sfertile on Tue, Jan 8, 11:00 AM.

Details

Summary

In the PPC64 target we map toc-relative relocations, dynamic thread pointer relative relocations and got relocations into a corresponding ADDR16 relocation type for handling in relocateOne. This patch saves the orignal RelType before mapping to an ADDR16 relocation so that any diagnostic messages will not mistakenly use the mapped type.

Diff Detail

Repository
rL LLVM

Event Timeline

sfertile created this revision.Tue, Jan 8, 11:00 AM
ruiu added inline comments.Tue, Jan 8, 11:13 AM
ELF/Arch/PPC64.cpp
615–617 ↗(On Diff #180697)

Where are you using this variable to check whether toc-optimize should be done or not?

sfertile marked an inline comment as done.Tue, Jan 8, 11:41 AM
sfertile added inline comments.
ELF/Arch/PPC64.cpp
615–617 ↗(On Diff #180697)

I'm not using the new variable since the call to isTocOptType comes before we map the relocations to an addr16 type and Type is still the original type. With the comment I'm trying to convey there is an explicit dependency between isTocOptType and toAddr16Rel.

sfertile marked an inline comment as not done.Tue, Jan 8, 11:43 AM
ruiu accepted this revision.Tue, Jan 8, 1:59 PM

LGTM

This revision is now accepted and ready to land.Tue, Jan 8, 1:59 PM
grimar added inline comments.Wed, Jan 9, 7:23 AM
ELF/Arch/PPC64.cpp
614 ↗(On Diff #180697)

Please remove this excessive empty line.

This revision was automatically updated to reflect the committed changes.