COFF: Fix base relocations for __imp_ symbols on x86.
authorRui Ueyama <ruiu@google.com>
Wed, 15 Jul 2015 00:25:38 +0000 (00:25 +0000)
committerRui Ueyama <ruiu@google.com>
Wed, 15 Jul 2015 00:25:38 +0000 (00:25 +0000)
commit33fb2cb11b7d2454bd2d97fe95c11ed38679327b
tree7b3b8348cbd1dff17236dd1affa15ff89d7f6fb4
parentf8749430f2fb6375e4918e957955e5e2816a00b7
COFF: Fix base relocations for __imp_ symbols on x86.

Because thunks for dllimported symbols contain absolute addresses on x86,
they need to be relocated at load-time. This bug was a cause of crashes
in DLL initialization routines.

llvm-svn: 242259
lld/COFF/Chunks.cpp
lld/COFF/Chunks.h
lld/test/COFF/hello32.test