This is an archive of the discontinued LLVM Phabricator instance.

[JITLink][COFF][x86_64] Implement remaining IMAGE_REL_AMD64_REL32_*.
ClosedPublic

Authored by sunho on Jul 24 2022, 7:08 PM.

Details

Summary

Implements remaining IMAGE_REL_AMD64_REL32_*. We only need IMAGE_REL_AMD64_REL32_4 for now but doing all remaining ones for completeness. (clang only uses IMAGE_REL_AMD64_REL32_1 and IMAGE_REL_AMD64_REL32)

Diff Detail

Event Timeline

sunho created this revision.Jul 24 2022, 7:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2022, 7:08 PM
sunho requested review of this revision.Jul 24 2022, 7:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2022, 7:08 PM
lhames accepted this revision.Jul 25 2022, 5:25 PM

Are there test cases for this already? Can some be added?

Otherwise LGTM.

This revision is now accepted and ready to land.Jul 25 2022, 5:25 PM
sunho updated this revision to Diff 448824.Jul 30 2022, 4:58 PM
sunho added a comment.Jul 30 2022, 5:01 PM

Are there test cases for this already? Can some be added?

Otherwise LGTM.

It's tricky to add testcases for all relocations as llvm-mc can only generate IMAGE_REL_AMD64_REL32 and IMAGE_REL_AMD64_REL32_1 afaik. I manually created a testcase for IMAGE_REL_AMD64_REL32_4 by extracting dump from msvc genrated obj file to cover at least one representitive one.

This revision was landed with ongoing or failed builds.Jul 30 2022, 5:03 PM
This revision was automatically updated to reflect the committed changes.