This fixes breakage on Windows/ARM64 after D94355.
Modelled after the corresponding code for X86; not entirely familiar
with those aspects of that layer otherwise.
Paths
| Differential D99572
[AArch64] [COFF] Properly produce cross-section relative relocations ClosedPublic Authored by mstorsjo on Mar 30 2021, 3:26 AM.
Details Summary This fixes breakage on Windows/ARM64 after D94355. Modelled after the corresponding code for X86; not entirely familiar
Diff Detail
Unit TestsFailed
Event TimelineHerald added subscribers: danielkiss, pengfei, hiraditya, kristof.beyls. · View Herald TranscriptMar 30 2021, 3:26 AM This revision is now accepted and ready to land.Apr 13 2021, 1:52 PM Comment Actions
Yeah it's a bit nonobvious code, but at least it's essentially equivalent to what we have on X86 (which I'd assume has been a fair bit more battle tested than these arch/OS combos). Comment Actions
Just for reference, these codepaths seems to originate in ed16477cb9f907bd3525ae99d787c5d448f8dc0b, and was refactored into its current place in 1da4529b15ed80e5d6c0b21d3ac46538fbcad87f and touched a bit more in 58173b97209bfc907dd0b47ecfc5ab7c1fe1f036. This revision was landed with ongoing or failed builds.Apr 14 2021, 2:57 AM Closed by commit rGd5c5cf5ce8d9: [AArch64] [COFF] Properly produce cross-section relative relocations (authored by mstorsjo). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions Sounds like the commit that turned this on by default broke Edge on win/arm64: https://bugs.chromium.org/p/chromium/issues/detail?id=1204788 I'm guessing we'll get a standalone repro for that in time, but to save others time tracking down the bug from the enablement, maybe you want to undo it for now? (Not this change here, but https://github.com/llvm/llvm-project/commit/57b259a852a6383880f5d0875d848420bb3c2945 ) Comment Actions Bug opened to track the Windows arm64 thing (only a full reproducer available at the moment). https://bugs.llvm.org/show_bug.cgi?id=50227 Comment Actions
Ok, reverted it for now. I'd be interested to hear once you're able to pin down the issue closer, whether it's an issue with the relative relocations themselves, or with the rewrite done by the pass. Comment Actions
Also CC @gulfem regarding the pass itself.
Revision Contents
Diff 334097 llvm/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFObjectWriter.cpp
llvm/test/MC/AArch64/coff-relocations-diags.s
llvm/test/MC/AArch64/coff-relocations.s
|