relocate the entry point address when used

This changes the entry point to be unrelocated in the objfile, and
instead applies the relocation when it is used.

2014-01-15  Tom Tromey  <tromey@redhat.com>

	* objfiles.c (entry_point_address_query): Relocate entry point
	address.
	(objfile_relocate1): Do not relocate entry point address.
	* objfiles.h (struct entry_info) <entry_point>: Update comment.
	<the_bfd_section_index>: New field.
	* symfile.c (init_entry_point_info): Find the entry point's
	section.
This commit is contained in:
Tom Tromey 2013-12-31 06:52:33 -07:00
parent d56e56aaa7
commit 53eddfa606
4 changed files with 38 additions and 18 deletions

View file

@ -101,9 +101,12 @@ struct objfile_data;
struct entry_info
{
/* The relocated value we should use for this objfile entry point. */
/* The unrelocated value we should use for this objfile entry point. */
CORE_ADDR entry_point;
/* The index of the section in which the entry point appears. */
int the_bfd_section_index;
/* Set to 1 iff ENTRY_POINT contains a valid value. */
unsigned entry_point_p : 1;
};