aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2005-11-23 11:46:01 +0000
committerAlan Modra <amodra@gmail.com>2005-11-23 11:46:01 +0000
commita14199dbd52888ecea9fc3d0e0f2c264c172f29c (patch)
tree033df1d71e2bec42f18a2ce8f61d224fff9098b7
parentaa2273ba99118d3cb08e8bdace72159cb1e0314e (diff)
downloadgdb-a14199dbd52888ecea9fc3d0e0f2c264c172f29c.zip
gdb-a14199dbd52888ecea9fc3d0e0f2c264c172f29c.tar.gz
gdb-a14199dbd52888ecea9fc3d0e0f2c264c172f29c.tar.bz2
* elfcode.h (elf_object_p): Delay the setting of start_address
until we're sure the backend matches the binary.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfcode.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 57ba88a..866466c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-23 Frederic Riss <frederic.riss@st.com>
+
+ * elfcode.h (elf_object_p): Delay the setting of start_address
+ until we're sure the backend matches the binary.
+
2005-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* som.c (som_decode_symclass): Decode BSF_WEAK symbols in the same
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 0ee50d7..f7f85ba 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -607,9 +607,6 @@ elf_object_p (bfd *abfd)
goto got_no_match;
}
- /* Remember the entry point specified in the ELF file header. */
- bfd_set_start_address (abfd, i_ehdrp->e_entry);
-
if (i_ehdrp->e_shoff != 0)
{
bfd_signed_vma where = i_ehdrp->e_shoff;
@@ -804,6 +801,9 @@ elf_object_p (bfd *abfd)
goto got_wrong_format_error;
}
+ /* Remember the entry point specified in the ELF file header. */
+ bfd_set_start_address (abfd, i_ehdrp->e_entry);
+
/* If we have created any reloc sections that are associated with
debugging sections, mark the reloc sections as debugging as well. */
for (s = abfd->sections; s != NULL; s = s->next)