[PECOFF][Writer] Implement the writer that can emit text section.

lld can now output a valid Windows executable with a text section that does nothing
but just returns immediately. It's not able to handle relocations, symbol tables,
data sections, etc, so it still can't do anything practical, though.

Reviewers: Bigcheese

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D892

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@183478 91177308-0d34-0410-b5e6-96231b3b80d8
[LayoutPass] Add a method to check the followon graph structure.

Found that having a method to check the strucutre of the followon graph makes
it easy to debug file readers. The method checks if there's no wrong edge in
followOnNexts and followOnRoots. It is called only when debuggging is enabled
for LayoutPass.

Reviewers: shankarke

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D922

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@183553 91177308-0d34-0410-b5e6-96231b3b80d8
Fix handling of files without a symbol table.

This fixes a recent regression (r183338). Stripped elf files (like installed
crtn.o for example), are not required to have a symbol table. Handle that
correctly.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@183573 91177308-0d34-0410-b5e6-96231b3b80d8
[WinLink] Fix use-after-return.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@183603 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Driver] Add -stack command line option.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@183604 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF][Driver] Add -heap command line option.

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