OSDN Git Service

* objfiles.c (init_entry_point_info): Handle shared libraries.
authorDaniel Jacobowitz <dan@debian.org>
Fri, 2 May 2008 20:35:39 +0000 (20:35 +0000)
committerDaniel Jacobowitz <dan@debian.org>
Fri, 2 May 2008 20:35:39 +0000 (20:35 +0000)
gdb/ChangeLog
gdb/objfiles.c

index d3bdbcc..e349f77 100644 (file)
@@ -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.
 
index b7d578f..0234dce 100644 (file)
@@ -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.  */