elf: get object entry point

Entry point is set to a valid value iff shared object is in fact a PIE.
That can be determined by the presence of PT_INTERP segment.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
app: use object entry point if failed looking up main()

In case of PIEs it may be impossible to look up main() function and the
only way to start the executable is to jump to its entry point. In most
cases __libc_start_main() will be called soon thereafter to initialize
the environment in which the application is going to execute. However,
at this stage OSv had already called constructors of global objects and
initialized TLS, so all that __libc_start_main() does is prepare command
line and call main().

Fixes #350.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>