From 3411f689cad92bd8d2e577a026a01a5d8d3ae5ef Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 17 Aug 2006 14:45:29 +0000 Subject: * objfiles.c (init_entry_point_info): Handle shared objects with entry points. --- ChangeLog.csl | 6 ++++++ gdb/objfiles.c | 6 ++++++ 2 files changed, 12 insertions(+) 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 + + gdb/ + * objfiles.c (init_entry_point_info): Handle shared objects + with entry points. + 2006-07-11 Daniel Jacobowitz 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. */ -- cgit v1.2.1