This is an archive of the discontinued LLVM Phabricator instance.

[ARM] [Windows] Use COFF stubs for calls to extern_weak functions
ClosedPublic

Authored by mstorsjo on Dec 19 2019, 11:12 AM.

Details

Summary

As the extern_weak target might be missing, resolving to the absolute address zero, we can't use the normal direct PC-relative branch instructions (as that would result in relocations out of range).

Instead check the shouldAssumeDSOLocal method and load the address from a COFF stub.

This matches what was done for X86 in 6bf108d77a3c.

Diff Detail

Event Timeline

mstorsjo created this revision.Dec 19 2019, 11:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 19 2019, 11:12 AM
rnk accepted this revision.Dec 22 2019, 7:30 PM

lgtm

This revision is now accepted and ready to land.Dec 22 2019, 7:30 PM
This revision was automatically updated to reflect the committed changes.