This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Shared libraries should have entry point
ClosedPublic

Authored by phosek on Dec 6 2016, 5:55 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

phosek updated this revision to Diff 80520.Dec 6 2016, 5:55 PM
phosek retitled this revision from to [ELF] Shared libraries should have entry point.
phosek updated this object.
phosek added a reviewer: ruiu.
phosek set the repository for this revision to rL LLVM.
phosek added a project: lld.
phosek added a subscriber: llvm-commits.

Ideally, Config->Entry would have 3 values: unset, set to default, set explicitly, but I don't know if there's a better way to achieve this than what I did in this patch.

ruiu accepted this revision.Dec 6 2016, 6:02 PM
ruiu edited edge metadata.

LGTM

Yeah, the entry point handling is becoming a bit messy because we have so many different ways to specify entry points. I'll try to simplify it.

This revision is now accepted and ready to land.Dec 6 2016, 6:02 PM
This revision was automatically updated to reflect the committed changes.