[JITLink][MachO][arm64] Build GOT entries for defined symbols too.
authorLang Hames <lhames@gmail.com>
Tue, 25 May 2021 17:58:21 +0000 (10:58 -0700)
committerLang Hames <lhames@gmail.com>
Tue, 25 May 2021 19:19:09 +0000 (12:19 -0700)
commit249cd9dd6002836b6d4b89a940149d518e8aa48b
treed538449feab4c9fb040ee78ff1b3866aafe088bb
parent2367a7bdab36cf9c51b4d2b1d726f46ed5b1a2c6
[JITLink][MachO][arm64] Build GOT entries for defined symbols too.

During the generic x86-64 support refactor in ecf6466f01c52 the implementation
of MachO_arm64_GOTAndStubsBuilder::isGOTEdgeToFix was altered to only return
true for external symbols. This behavior is incorrect: GOT entries may be
required for defined symbols (e.g. in the large code model).

This patch fixes the bug and adds a test case for it (renaming an old test
case to avoid any ambiguity).
llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
llvm/test/ExecutionEngine/JITLink/AArch64/MachO_arm64_relocations.s