[ELF] Shared libraries should have entry point
authorPetr Hosek <phosek@chromium.org>
Wed, 7 Dec 2016 02:26:16 +0000 (02:26 +0000)
committerPetr Hosek <phosek@chromium.org>
Wed, 7 Dec 2016 02:26:16 +0000 (02:26 +0000)
commit2f50fef095298706e7dbe1f47b7d9421c74a790b
tree992913104cf42b3e7df59a4203455e2afa74723c
parent668bebed6d5abde6d21650fdc271ee887eb9a928
[ELF] Shared libraries should have entry point

Shared libraries should have entry set following the same rules as for
regular binaries. The only difference is that in case the default entry
point (_start or __start) isn't found (unless it was set explicitly), we
shouldn't give a warning as in case of regular binaries.

Differential Revision: https://reviews.llvm.org/D27497

llvm-svn: 288878
lld/ELF/Config.h
lld/ELF/Driver.cpp
lld/ELF/Writer.cpp
lld/test/ELF/gc-sections-keep-shared-start.s [new file with mode: 0644]