Jan Kratochvil f8eee05
Index: gdb-7.4.50.20120602/gdb/symfile.c
753f5e6
===================================================================
Jan Kratochvil f8eee05
--- gdb-7.4.50.20120602.orig/gdb/symfile.c	2012-06-02 18:25:20.000000000 +0200
Jan Kratochvil f8eee05
+++ gdb-7.4.50.20120602/gdb/symfile.c	2012-06-02 18:26:36.145232057 +0200
Jan Kratochvil f8eee05
@@ -3630,6 +3630,12 @@ default_symfile_relocate (struct objfile
Jan Kratochvil f8eee05
      DWO file.  */
Jan Kratochvil f8eee05
   bfd *abfd = sectp->owner;
ee681d3
 
753f5e6
+  /* Executable files have all the relocations already resolved.
Jan Kratochvil f8eee05
+     Handle files linked with --emit-relocs.
Jan Kratochvil f8eee05
+     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)