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 8f45d45d85..37a31950a2 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -3634,6 +3634,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