2018-03-09 16:46:37 +00:00
|
|
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
|
|
From: Fedora GDB patches <invalid@email.com>
|
|
|
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
|
|
Subject: 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.
|
|
|
|
|
|
|
|
diff --git a/gdb/symfile.c b/gdb/symfile.c
|
|
|
|
--- a/gdb/symfile.c
|
|
|
|
+++ b/gdb/symfile.c
|
2018-09-11 13:49:10 +00:00
|
|
|
@@ -3584,6 +3584,12 @@ default_symfile_relocate (struct objfile *objfile, asection *sectp,
|
2012-06-16 04:55:29 +00:00
|
|
|
DWO file. */
|
|
|
|
bfd *abfd = sectp->owner;
|
2010-04-16 16:29:50 +00:00
|
|
|
|
2009-05-04 16:53:01 +00:00
|
|
|
+ /* Executable files have all the relocations already resolved.
|
2012-06-16 04:55:29 +00:00
|
|
|
+ Handle files linked with --emit-relocs.
|
|
|
|
+ http://sources.redhat.com/ml/gdb/2006-08/msg00137.html */
|
2009-05-04 16:53:01 +00:00
|
|
|
+ if ((abfd->flags & EXEC_P) != 0)
|
|
|
|
+ return NULL;
|
|
|
|
+
|
2009-08-11 16:28:33 +00:00
|
|
|
/* We're only interested in sections with relocation
|
2009-05-04 16:53:01 +00:00
|
|
|
information. */
|
|
|
|
if ((sectp->flags & SEC_RELOC) == 0)
|