Slit lib/Linker in two.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 10 Dec 2015 14:19:35 +0000 (14:19 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 10 Dec 2015 14:19:35 +0000 (14:19 +0000)
commitda5132018f8f8648d88956ad18cc4dc10e0b5acb
tree1d2dd9bb9756bc7352da5d402ed67a183c454f82
parent079d48b39ea641d6f7dad6307de73ef51c7da1d8
Slit lib/Linker in two.

A linker normally has two stages: symbol resolution and "moving stuff".

In lib/Linker there is the complication of lazy linking some globals,
but it was still far more mixed than it needed to.

This splits the linker into a lower level IRMover and the linker proper.
The IRMover just takes a list of globals to move and a callback that
lets the user control what is lazy linked.

The main motivation is that now tools/gold (and soon lld) can use their
own symbol resolution to instruct IRMover what to do.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255254 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Linker/IRMover.h [new file with mode: 0644]
include/llvm/Linker/Linker.h
lib/Linker/CMakeLists.txt
lib/Linker/IRMover.cpp [new file with mode: 0644]
lib/Linker/LinkDiagnosticInfo.h [new file with mode: 0644]
lib/Linker/LinkModules.cpp
test/Linker/alias.ll
test/tools/gold/X86/drop-linkage.ll
tools/gold/gold-plugin.cpp