From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 From: Fedora GDB patches Date: Fri, 27 Oct 2017 21:07:50 +0200 Subject: gdb-6.5-bz203661-emit-relocs.patch FileName: gdb-6.5-bz203661-emit-relocs.patch ;; Fix debuginfo addresses resolving for --emit-relocs Linux kernels (BZ 203661). ;;=push+jan: There was some mail thread about it, this patch may be a hack. --- gdb/symfile.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gdb/symfile.c b/gdb/symfile.c index f7f75b05d3..7cda615e74 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -3629,6 +3629,12 @@ default_symfile_relocate (struct objfile *objfile, asection *sectp, DWO file. */ bfd *abfd = sectp->owner; + /* 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 sections with relocation information. */ if ((sectp->flags & SEC_RELOC) == 0) -- 2.14.3