This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

src/gdb ChangeLog gdb_bfd.c gdb_bfd.h objfiles.c


CVSROOT:	/cvs/src
Module name:	src
Changes by:	tromey@sourceware.org	2013-10-07 19:31:13

Modified files:
	gdb            : ChangeLog gdb_bfd.c gdb_bfd.h objfiles.c 

Log message:
	don't share per-BFD data if relocations are needed
	
	Right now we always share per-BFD data across objfiles, if there is a
	BFD.  This works fine.  However, we're going to start sharing more
	data, and sometimes this data will come directly from sections of the
	BFD.  If such a section has SEC_RELOC set, then the data coming from
	that section will not be truly sharable -- the section will be
	program-space-dependent, and re-read by gdb for each objfile.
	
	This patch disallows per-BFD sharing in this case.  This is a bit
	"heavy" in that we could in theory examine each bit of shared data for
	suitability.  However, that is more complicated, and SEC_RELOC is rare
	enough that I think we needn't bother.
	
	Note that the "no sharing" case is equivalent to "gdb works as it
	historically did".  That is, the sharing is a new(-ish) optimization.
	
	Built and regtested on x86-64 Fedora 18.
	
	* gdb_bfd.c (struct gdb_bfd_data) <relocation_computed,
	needs_relocations>: New fields.
	(gdb_bfd_requires_relocations): New function.
	* gdb_bfd.h (gdb_bfd_requires_relocations): Declare.
	* objfiles.c (get_objfile_bfd_data): Disallow sharing if
	the BFD needs relocations applied.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.16079&r2=1.16080
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdb_bfd.c.diff?cvsroot=src&r1=1.19&r2=1.20
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdb_bfd.h.diff?cvsroot=src&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/objfiles.c.diff?cvsroot=src&r1=1.168&r2=1.169


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]