[ORC][JITLink] Fix MachO absolute symbol handling, add test case.
authorLang Hames <lhames@gmail.com>
Tue, 8 Mar 2022 04:37:33 +0000 (20:37 -0800)
committerLang Hames <lhames@gmail.com>
Tue, 8 Mar 2022 04:54:55 +0000 (20:54 -0800)
commit36f0dfd07a77fc801e3b54af66442778a4728868
treede95e442ef8ec8f5e0734b7786ca4a8ab1f95872
parent0d849b8249e8d25484cab3e6aaba3cbcddc408dd
[ORC][JITLink] Fix MachO absolute symbol handling, add test case.

This patch removes the unintended resolution of locally scoped absolute symbols
(which was causing unexpected definition errors).

It stops using the JITSymbolFlags::Absolute flag (it isn't set or used elsewhere,
and causes mismatch-flags asserts), and adds JITSymbolFlags::Exported to default
scoped absolute symbols.

Finally, we now set the scope of absolute symbols correctly in
MachOLinkGraphBuilder.
llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
llvm/test/ExecutionEngine/JITLink/X86/Inputs/MachO_global_absolute_def.s [new file with mode: 0644]
llvm/test/ExecutionEngine/JITLink/X86/Inputs/MachO_local_absolute_def.s [new file with mode: 0644]
llvm/test/ExecutionEngine/JITLink/X86/MachO_absolute_symbols.s [new file with mode: 0644]