[PATCH] D24913: [ELF] - Fix for: Bug 30521 - lld exits non-zero return value linking a library with no entry symbol
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 26 07:36:14 PDT 2016
grimar added a comment.
In https://reviews.llvm.org/D24913#552139, @emaste wrote:
> I'm not sure this is right: shared libraries normally don't use entry but they can in some cases - for example I think glibc's rtld is built with an entry point and can be executed directly. FreeBSD's rtld has some commented-out build infrastructure to build with entry but it is not used in the default case.
> My guess at the logic would be: not shared produces a warning for missing entry. Shared case never emits a warning. Set entry if specified, if not specified set to zero with no warning.
I am not sure we do not print something in case if entry was specified but not found then. That can hide a mistype for example.
So ideally behavior that seems to be the most correct is:
- If entry was specified and not found report warning.
- If entry was not specified then:
1. Emit warning if not -shared.
2. Do not emit warning if -shared.
More information about the llvm-commits