[PECOFF] Support delay-load import table for x86

This patch creates the import address table and sets its
address to the delay-load import table. This also creates
wrapper functions for __delayLoadHelper2.

x86 only for now.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@219948 91177308-0d34-0410-b5e6-96231b3b80d8
[mach-o] Add support for upward linking

To deal with cycles in shared library dependencies, the darwin linker supports
marking specific link dependencies as "upward".  An upward link is when a
lower level library links against a higher level library.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@219949 91177308-0d34-0410-b5e6-96231b3b80d8
[mach-o] update __eh_frame handling for Nick's suggestions

First, add a comment to support more variation in FDE formats. Second, refactor
fde -> function handling into a separate function living in the ArchHandler.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@219959 91177308-0d34-0410-b5e6-96231b3b80d8
[mach-o] Fix crash when -all_load used with dylibs

-all_load tells the darwin linker to immediately load all members of all
archives.  The code do that used reinterpret_cast<> instead of dyn_cast<>.
If the file was a dylib, the reinterpret_cast<> turned a pointer to a dylib
into a pointer to an archive...boom.

Added test case to reproduce the crash, simplified the code and used dyn_cast<>.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@219990 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] lld: Introduce ${cmake_2_8_12_INTERFACE} onto each target_link_libraries. [PR20254]

FIXME: Dependencies should be reorganized.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@220000 91177308-0d34-0410-b5e6-96231b3b80d8
lld/lib/Core/Error.cpp: Appease g++-4.7, corresponding to LLVM r210687.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@220039 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] check-lld: Prune llvm-mc. It is unused.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@220040 91177308-0d34-0410-b5e6-96231b3b80d8
temporary commit