gdb/gdb-6.5-bz203661-emit-relocs.patch
OBS User autobuild d30d33dd0d Accepting request 38053 from devel:gcc
Copy from devel:gcc/gdb based on submit request 38053 from user rguenther

OBS-URL: https://build.opensuse.org/request/show/38053
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=72
2010-04-16 16:29:50 +00:00

18 lines
713 B
Diff

Index: gdb-7.0.90.20100306/gdb/symfile.c
===================================================================
--- gdb-7.0.90.20100306.orig/gdb/symfile.c 2010-03-06 23:20:35.000000000 +0100
+++ gdb-7.0.90.20100306/gdb/symfile.c 2010-03-06 23:26:25.000000000 +0100
@@ -3642,6 +3642,12 @@ default_symfile_relocate (struct objfile
{
bfd *abfd = objfile->obfd;
+ /* 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)