If no initial live symbols are set up, and deadStrip() == true, the Resolver ends up reclaiming all the symbols that aren't absolute. This is wrong.
This patch fixes the issue by setting entrySymbolName() as live, and this allows us to self-host lld when --gc-sections is enabled.
There are still quite a few problems with --gc-sections (quite a few tests failing), so the option can't be enabled by default.
P.S. This particular change depends on --gc-section so can't be tested easily. I would like to commit it as is and start looking at the test failures. I'll eventually add an unit test for this when --gc-sections will be enabled.
Remove this comment.