This is an archive of the discontinued LLVM Phabricator instance.

[XCOFF] Adjust .rename emission sequence
ClosedPublic

Authored by jasonliu on Aug 5 2020, 8:17 AM.

Details

Summary

AIX assembler does not generate correct relocation when .rename appear between tc entry label and .tc directive.
So only emit .rename after .tc/.comm or other linkage is emitted.

Diff Detail

Event Timeline

jasonliu created this revision.Aug 5 2020, 8:17 AM
jasonliu requested review of this revision.Aug 5 2020, 8:17 AM

@jasonliu, I would expect that this affects labels in general and not just TOC entries.

jasonliu updated this revision to Diff 283332.Aug 5 2020, 12:26 PM
jasonliu retitled this revision from [XCOFF] Adjust .rename and .tc directive emission sequence to [XCOFF] Adjust .rename emission sequence.
jasonliu edited the summary of this revision. (Show Details)

Adjust all .rename emission sequence.

@jasonliu, I would expect that this affects labels in general and not just TOC entries.

I'm not sure if there is a way to trigger that in our assembly code generation. But I think it's still a good idea to emit .rename after something is "defined" consistently. So I reversed all the other .rename emission sequence.

daltenty accepted this revision.Aug 7 2020, 7:27 AM

LGTM, thanks!

This revision is now accepted and ready to land.Aug 7 2020, 7:27 AM
This revision was automatically updated to reflect the committed changes.