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

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