2005-11-23 Frédéric Riss * elfcode.h: (elf_object_p): Delay the setting of start_address until we're sure the backend matches the binary. --- elfcode.h.orig 2005-11-23 09:35:53.000000000 +0100 +++ elfcode.h 2005-11-23 09:36:12.000000000 +0100 @@ -599,9 +599,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) { /* Seek to the section header table in the file. */ @@ -747,6 +744,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)