Replace magic numbers with enums.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@200512 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Do not emit a section if it's empty.

The PE32+ loader does not seem to like an executable with an empty section, so
we should not emit a section if it's empty.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@200514 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Set the correct PE header field value.

The charcateristics field should not have IMAGE_FILE_32BIT_MACHINE bit but have
IMAGE_FILE_LARGE_ADDRESS_AWARE bit for PE32+.

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