PR30521 was about linking shared library. After r282295 code when linking -shared produced
"entry symbol not found" warning, what in combination with --fatal-errors failed linkage.
Patch fixes logic (and adds testcases) to follow next rules:
- If entry was specified and not found report warning.
- If entry was not specified then:
- Emit warning if not -shared.
- Do not emit warning if -shared.