[PECOFF][Writer] Fix DLLCharacteristic flag in image header.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185102 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Writer] Templatize connectAtomsWithLayoutEdge()

Templatize connectAtomsWithLayoutEdge() so that it can handle other types of
defined atoms.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185125 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Writer] Use a constant instead of a magic number.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185128 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Writer] Skip ".debug$S" section in the input object file.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185129 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Writer] Fix a bug that the contents of .data and .rdata were swapped.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185130 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Writer] Support DIR32NB and REL32 relocation types.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185133 91177308-0d34-0410-b5e6-96231b3b80d8
Add include guard.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185134 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Writer] Define COFFBaseDefinedAtom as the base class of COFF defined atoms.

In order to support linking against DLL, the linker needs to create defined
atoms for jump tables and etc. Because such atoms are not read from a file,
they lack some information such as an ordinal. With this patch, COFFDefinedAtom
is split into two classes; one is the base class of all COFF defined atoms, and
another is a concrete class for atoms read from file. More classes inheriting
COFFBaseDefinedAtom will be added for jump tables and etc.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185195 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Writer] Remove duplicated code by moving it to parent class.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185200 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Writer] Fix wrong section header.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185205 91177308-0d34-0410-b5e6-96231b3b80d8
Remove extra ';'

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185247 91177308-0d34-0410-b5e6-96231b3b80d8
Move a function into assert() so that GCC won't complain that the
function is not used in release build.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185248 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Reader] Create a jump table for functions exported by DLL.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185283 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Writer] Fix buildbot failure on x86_64-win7.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185285 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Writer] Amend the comment about DLL linking.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185307 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Writer] Do not emit the empty section as Windows loader rejects such executable.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185308 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Writer] Add setter methods that sets the import address table location to file header.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185309 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Writer] Set SizeOfInitializedData file header.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185310 91177308-0d34-0410-b5e6-96231b3b80d8
Removed unused friend declaration.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@185420 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Writer] Simplifies the COFFBaseDefinedAtom ctor by defining a new class.

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