Reapply r360194 "[JITLink] Add support for MachO .alt_entry atoms." with fixes.
authorLang Hames <lhames@gmail.com>
Tue, 7 May 2019 22:56:40 +0000 (22:56 +0000)
committerLang Hames <lhames@gmail.com>
Tue, 7 May 2019 22:56:40 +0000 (22:56 +0000)
commit0d8ae1e3435accab5130d71dfc872507043ca4f1
tree5b60260266cc2e1932c210159c85f53bd7cc7547
parentd028a463d53a5c90bf1244f9c20a2e0439b7fd40
Reapply r360194 "[JITLink] Add support for MachO .alt_entry atoms." with fixes.

This patch modifies MachOAtomGraphBuilder to use setLayoutNext rather than
addEdge, and fixes a bug in the section layout algorithm that could result in
atoms appearing more than once in the section ordering (which resulted in those
atoms being assigned invalid addresses during layout).

llvm-svn: 360205
llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
llvm/lib/ExecutionEngine/JITLink/MachOAtomGraphBuilder.cpp
llvm/lib/ExecutionEngine/JITLink/MachOAtomGraphBuilder.h
llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
llvm/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s