summaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2008-05-02 20:35:39 +0000
committerDaniel Jacobowitz <dan@debian.org>2008-05-02 20:35:39 +0000
commit8c9295063c4a47839762d77e505fe7c4a4397e10 (patch)
treee086313f1ac7e6a7fe5654ce23bbc84a9fd23439 /gdb/objfiles.c
parent649f40be4a9a8de2f7b40ad8582c9ea49c455fcf (diff)
downloadgdb-8c9295063c4a47839762d77e505fe7c4a4397e10.tar.gz
* objfiles.c (init_entry_point_info): Handle shared libraries.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index b7d578f956d..0234dcec7d4 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. */