gdb/gdb-6.5-bz203661-emit-relocs.patch

34 lines
1.0 KiB
Diff
Raw Normal View History

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
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 5a1447d9d5..0b82f8c6a0 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;
2010-07-11 18:06:33 +00:00
+ /* 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