summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2006-08-17 14:45:29 +0000
committerDaniel Jacobowitz <dan@debian.org>2006-08-17 14:45:29 +0000
commit3411f689cad92bd8d2e577a026a01a5d8d3ae5ef (patch)
tree8c902451862fc84cff59ae008505782a10f98722
parente50b6b094cb2b262cf4d09d5a5da6f39970ddf56 (diff)
downloadgdb-3411f689cad92bd8d2e577a026a01a5d8d3ae5ef.tar.gz
* objfiles.c (init_entry_point_info): Handle shared objects
with entry points.
-rw-r--r--ChangeLog.csl6
-rw-r--r--gdb/objfiles.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl
index c892b22aa41..0a1425cca3a 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,3 +1,9 @@
+2006-08-17 Daniel Jacobowitz <dan@codesourcery.com>
+
+ gdb/
+ * objfiles.c (init_entry_point_info): Handle shared objects
+ with entry points.
+
2006-07-11 Daniel Jacobowitz <dan@codesourcery.com>
gdb/
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index bee81a695b6..fb1821186d5 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -247,6 +247,12 @@ init_entry_point_info (struct objfile *objfile)
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. */