From 8c9295063c4a47839762d77e505fe7c4a4397e10 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 2 May 2008 20:35:39 +0000 Subject: [PATCH] * objfiles.c (init_entry_point_info): Handle shared libraries. --- gdb/ChangeLog | 4 ++++ gdb/objfiles.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d3bdbccff3..e349f77951 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2008-05-02 Daniel Jacobowitz + * objfiles.c (init_entry_point_info): Handle shared libraries. + +2008-05-02 Daniel Jacobowitz + * 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 b7d578f956..0234dcec7d 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. */ -- 2.11.0