Merge IAT and ILT.
authorRui Ueyama <ruiu@google.com>
Thu, 18 May 2017 19:59:22 +0000 (19:59 +0000)
committerRui Ueyama <ruiu@google.com>
Thu, 18 May 2017 19:59:22 +0000 (19:59 +0000)
commit9fbfd76fe3061d9e02aaed704b439dcff750af1d
treea304dc0633da0acbac8caa0186d35cc48d44822e
parentf4f62003f452ff49894fc9fa44b93d7a1b1a8b19
Merge IAT and ILT.

Previously, LLD-produced executables had IAT (Import Address Table) and
ILT (Import Lookup Table) as separate chunks of data, although their
contents are identical. My interpretation of the COFF spec when I wrote
the COFF linker is that they need to be separate tables even though they
are the same.

But Peter found that the Windows loader is fine with executables in
which IAT and ILT are merged. This is a patch to merge IAT and ILT.
I confirmed that an lld-link self-hosted with this patch works fine.

Fixes https://bugs.llvm.org/show_bug.cgi?id=33064

Differential Revision: https://reviews.llvm.org/D33326

llvm-svn: 303374
lld/COFF/DLL.cpp
lld/COFF/DLL.h
lld/test/COFF/armnt-imports.test
lld/test/COFF/hello32.test
lld/test/COFF/imports.test