--- sources-clean/gdb/symfile.c 2006-08-23 09:22:21.000000000 +0200 +++ sources-custom/gdb/symfile.c 2006-08-23 09:54:24.000000000 +0200 @@ -3713,6 +3713,12 @@ bfd_byte * symfile_relocate_debug_section (bfd *abfd, asection *sectp, bfd_byte *buf) { + /* Executable files have all the relocations already resolved. + * Handle files linked with --emit-relocs. + * http://sources.redhat.com/ml/gdb/2006-08/msg00137.html */ + if ((abfd->flags & EXEC_P) != 0) + return NULL; + /* We're only interested in debugging sections with relocation information. */ if ((sectp->flags & SEC_RELOC) == 0)