This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Find the entry point even in a shared library
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Fri, 2 May 2008 16:37:03 -0400
- Subject: [commit] Find the entry point even in a shared library
The comment speaks for itself. Symbian executables are position
independent and linked as shared objects; I noticed that we were not
setting the entry point (which breaks e.g. dummy calls). Tested
on arm-symbianelf, arm-eabi, x86_64-linux. Checked in.
--
Daniel Jacobowitz
CodeSourcery
2008-05-02 Daniel Jacobowitz <dan@codesourcery.com>
* objfiles.c (init_entry_point_info): Handle shared libraries.
--- gdb/objfiles.c (revision 197177)
+++ gdb/objfiles.c (revision 197186)
@@ -248,6 +249,12 @@ init_entry_point_info (struct objfile *o
the startup file because it contains the entry point. */
objfile->ei.entry_point = bfd_get_start_address (objfile->obfd);
}
+ else if (bfd_get_file_flags (objfile->obfd) & DYNAMIC
+ && bfd_get_start_address (objfile->obfd) != 0)
+ /* Some shared libraries may have entry points set and be
+ runnable. There's no clear way to indicate this, so just check
+ for values other than zero. */
+ objfile->ei.entry_point = bfd_get_start_address (objfile->obfd);
else
{
/* Examination of non-executable.o files. Short-circuit this stuff. */