aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2008-05-02 20:35:39 +0000
committerDaniel Jacobowitz <drow@false.org>2008-05-02 20:35:39 +0000
commit574dffa2b953e04f57a359f0e19b2ba42fbcf2a6 (patch)
tree5089a18e1e82c8bcd3123c98eb9b54f5ba38bf5d /gdb
parent5ac016828d8af95585ed0d6a9623c04df98a7e8d (diff)
downloadgdb-574dffa2b953e04f57a359f0e19b2ba42fbcf2a6.zip
gdb-574dffa2b953e04f57a359f0e19b2ba42fbcf2a6.tar.gz
gdb-574dffa2b953e04f57a359f0e19b2ba42fbcf2a6.tar.bz2
* objfiles.c (init_entry_point_info): Handle shared libraries.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/objfiles.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d3bdbcc..e349f77 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2008-05-02 Daniel Jacobowitz <dan@codesourcery.com>
+ * objfiles.c (init_entry_point_info): Handle shared libraries.
+
+2008-05-02 Daniel Jacobowitz <dan@codesourcery.com>
+
* arm-tdep.c (arm_prologue_this_id): Compare pc, not func, to
lowest_pc.
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index b7d578f..0234dce 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -259,6 +259,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. */