2017-12-10 22:00:49 +00:00
|
|
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
2017-12-04 19:24:00 +00:00
|
|
|
From: Fedora GDB patches <invalid@email.com>
|
|
|
|
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
|
|
|
|
|
2017-12-08 04:31:26 +00:00
|
|
|
;; 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
|
2018-06-04 20:26:33 +00:00
|
|
|
index a57bd6a593..e9875a08de 100644
|
2017-12-08 04:31:26 +00:00
|
|
|
--- a/gdb/symfile.c
|
|
|
|
+++ b/gdb/symfile.c
|
2018-05-31 18:47:56 +00:00
|
|
|
@@ -3492,6 +3492,12 @@ default_symfile_relocate (struct objfile *objfile, asection *sectp,
|
2012-06-03 17:40:44 +00:00
|
|
|
DWO file. */
|
|
|
|
bfd *abfd = sectp->owner;
|
2010-07-11 18:06:33 +00:00
|
|
|
|
2006-08-24 06:18:06 +00:00
|
|
|
+ /* Executable files have all the relocations already resolved.
|
2012-06-03 17:40:44 +00:00
|
|
|
+ Handle files linked with --emit-relocs.
|
|
|
|
+ http://sources.redhat.com/ml/gdb/2006-08/msg00137.html */
|
2006-08-24 06:18:06 +00:00
|
|
|
+ if ((abfd->flags & EXEC_P) != 0)
|
|
|
|
+ return NULL;
|
|
|
|
+
|
2009-08-04 05:37:29 +00:00
|
|
|
/* We're only interested in sections with relocation
|
2006-08-24 06:18:06 +00:00
|
|
|
information. */
|
|
|
|
if ((sectp->flags & SEC_RELOC) == 0)
|