]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* objfiles.c (init_entry_point_info): Handle shared objects
authorDaniel Jacobowitz <drow@false.org>
Thu, 17 Aug 2006 14:45:29 +0000 (14:45 +0000)
committerDaniel Jacobowitz <drow@false.org>
Thu, 17 Aug 2006 14:45:29 +0000 (14:45 +0000)
with entry points.

ChangeLog.csl
gdb/objfiles.c

index c892b22aa41e10ae6ddcfbe93a1a59b06badbe03..0a1425cca3a363b6bd45206b9fc558ae131d15c3 100644 (file)
@@ -1,3 +1,9 @@
+2006-08-17  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       gdb/
+       * objfiles.c (init_entry_point_info): Handle shared objects
+       with entry points.
+
 2006-07-11  Daniel Jacobowitz  <dan@codesourcery.com>
 
        gdb/
index bee81a695b6306a9e890b5653b8ab88a5bfae437..fb1821186d59c3c75d6fdea40d4a2b0bff9e650a 100644 (file)
@@ -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.  */