e5611bf
Index: gdb-6.8.50.20090802/gdb/symfile.c
753f5e6
===================================================================
e5611bf
--- gdb-6.8.50.20090802.orig/gdb/symfile.c	2009-08-03 12:29:58.000000000 +0200
e5611bf
+++ gdb-6.8.50.20090802/gdb/symfile.c	2009-08-03 12:40:58.000000000 +0200
e5611bf
@@ -4012,6 +4012,12 @@ symfile_dummy_outputs (bfd *abfd, asecti
753f5e6
 bfd_byte *
753f5e6
 symfile_relocate_debug_section (bfd *abfd, asection *sectp, bfd_byte *buf)
753f5e6
 {
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)