COFF: Infer entry symbol name if /entry is not given.
authorRui Ueyama <ruiu@google.com>
Sun, 31 May 2015 03:34:08 +0000 (03:34 +0000)
committerRui Ueyama <ruiu@google.com>
Sun, 31 May 2015 03:34:08 +0000 (03:34 +0000)
commit5cff68599d6140194bf8efdd68896d2c35b4062f
treea00b18ac276076f19a9b2b9a0f70cb7b8b24139f
parent87601bef58c4410989a1010f6ac550f84421653a
COFF: Infer entry symbol name if /entry is not given.

`main` is not the only main function in Windows. You can choose one
from these four -- {w,}{WinMain,main}. There are four different entry
point functions for them, {w,}{WinMain,main}CRTStartup, respectively.
The linker needs to choose the right one depending on which `main`
function is defined.

llvm-svn: 238667
lld/COFF/Config.h
lld/COFF/Driver.cpp
lld/COFF/SymbolTable.cpp
lld/COFF/SymbolTable.h
lld/test/COFF/entry-inference.test [new file with mode: 0644]