keiths / rpms / gdb

Forked from rpms/gdb 3 hours ago
Clone
03de720
Index: gdb-7.0.90.20100306/gdb/symfile.c
753f5e6
===================================================================
03de720
--- gdb-7.0.90.20100306.orig/gdb/symfile.c	2010-03-06 23:20:35.000000000 +0100
03de720
+++ gdb-7.0.90.20100306/gdb/symfile.c	2010-03-06 23:26:25.000000000 +0100
03de720
@@ -3642,6 +3642,12 @@ default_symfile_relocate (struct objfile
753f5e6
 {
03de720
   bfd *abfd = objfile->obfd;
03de720
 
753f5e6
+  /* Executable files have all the relocations already resolved.
753f5e6
+   * Handle files linked with --emit-relocs.
753f5e6
+   * http://sources.redhat.com/ml/gdb/2006-08/msg00137.html  */
753f5e6
+  if ((abfd->flags & EXEC_P) != 0)
753f5e6
+    return NULL;
753f5e6
+
e5611bf
   /* We're only interested in sections with relocation
753f5e6
      information.  */
753f5e6
   if ((sectp->flags & SEC_RELOC) == 0)