This is an archive of the discontinued LLVM Phabricator instance.

[LoongArch] Define the new-style reloc types
ClosedPublic

Authored by xen0n on Aug 8 2022, 11:01 PM.

Diff Detail

Event Timeline

xen0n created this revision.Aug 8 2022, 11:01 PM
Herald added a project: Restricted Project. · View Herald Transcript
xen0n requested review of this revision.Aug 8 2022, 11:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2022, 11:01 PM
SixWeining added inline comments.Aug 8 2022, 11:18 PM
llvm/include/llvm/BinaryFormat/ELFRelocs/LoongArch.def
104
xen0n added inline comments.Aug 8 2022, 11:47 PM
llvm/include/llvm/BinaryFormat/ELFRelocs/LoongArch.def
104

I have to self-censor a few swear words. They added this R_LARCH_32_PCREL in a later commit but with irrelevant commit message subject, so I ignored it.

I'll fix shortly.

jhenderson added inline comments.Aug 9 2022, 12:55 AM
llvm/include/llvm/BinaryFormat/ELFRelocs/LoongArch.def
64–65

The "And finally" risks more relocs being added in the future, thus meaning this set is no longer the final set, and the comment going stale. Similarly, in 10+ years time, "new-style" may not sound particularly right. I'd probably just go simply with "Relocs whose processing do not require a stack machine."

xen0n updated this revision to Diff 451130.Aug 9 2022, 6:18 AM

Address @SixWeining and @jhenderson's comments.

Seems good to me, but please wait for @SixWeining (I don't know anything about LoongArch).

xen0n marked 2 inline comments as done.Aug 9 2022, 6:26 AM
xen0n added inline comments.
llvm/include/llvm/BinaryFormat/ELFRelocs/LoongArch.def
64–65

Fair point. I was thinking by the time a third batch of reloc types are added the maintainer could adjust the comment while at it, but of course the previous wording is a bit biased (the LoongArch open-source community almost unanimously hated the previous reloc design with a passion, including me of course).

Adjusted.

104

Done

SixWeining accepted this revision.Aug 9 2022, 6:53 AM

LGTM. Thanks.

This revision is now accepted and ready to land.Aug 9 2022, 6:53 AM
MaskRay accepted this revision.Aug 9 2022, 11:15 AM
This revision was landed with ongoing or failed builds.Aug 10 2022, 7:46 PM
This revision was automatically updated to reflect the committed changes.