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

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