Blame SOURCES/gdb-6.5-bz203661-emit-relocs.patch

f9426a
Index: gdb-7.4.50.20120602/gdb/symfile.c
f9426a
===================================================================
f9426a
--- gdb-7.4.50.20120602.orig/gdb/symfile.c	2012-06-02 18:25:20.000000000 +0200
f9426a
+++ gdb-7.4.50.20120602/gdb/symfile.c	2012-06-02 18:26:36.145232057 +0200
f9426a
@@ -3630,6 +3630,12 @@ default_symfile_relocate (struct objfile
f9426a
      DWO file.  */
f9426a
   bfd *abfd = sectp->owner;
f9426a
 
f9426a
+  /* Executable files have all the relocations already resolved.
f9426a
+     Handle files linked with --emit-relocs.
f9426a
+     http://sources.redhat.com/ml/gdb/2006-08/msg00137.html  */
f9426a
+  if ((abfd->flags & EXEC_P) != 0)
f9426a
+    return NULL;
f9426a
+
f9426a
   /* We're only interested in sections with relocation
f9426a
      information.  */
f9426a
   if ((sectp->flags & SEC_RELOC) == 0)