summaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2002-04-26 12:59:23 +0000
committerAlan Modra <amodra@bigpond.net.au>2002-04-26 12:59:23 +0000
commit2f21ac631547dfe4b44af05d0bc567d9a93a82fd (patch)
treefec76d221bf26f712aa6d6a788146d33d50f2aa1 /bfd/elflink.h
parent66ae223a575ced93b202a1ca5c0934420bc59c23 (diff)
downloadgdb-2f21ac631547dfe4b44af05d0bc567d9a93a82fd.tar.gz
* elflink.h (elf_bfd_final_link): Ensure input bfd class is the
same as the output before calling elf_link_input_bfd.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index d43d8612d15..06035b31bee 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -5347,21 +5347,11 @@ elf_bfd_final_link (abfd, info)
{
for (p = o->link_order_head; p != NULL; p = p->next)
{
- Elf_Internal_Shdr *rhdr;
-
if (p->type == bfd_indirect_link_order
- && (bfd_get_flavour (p->u.indirect.section->owner)
+ && (bfd_get_flavour ((sub = p->u.indirect.section->owner))
== bfd_target_elf_flavour)
- && (((rhdr = &elf_section_data (p->u.indirect.section)->rel_hdr)
- ->sh_entsize == 0)
- || rhdr->sh_entsize == sizeof (Elf_External_Rel)
- || rhdr->sh_entsize == sizeof (Elf_External_Rela))
- && (((rhdr = elf_section_data (p->u.indirect.section)->rel_hdr2)
- == NULL)
- || rhdr->sh_entsize == sizeof (Elf_External_Rel)
- || rhdr->sh_entsize == sizeof (Elf_External_Rela)))
+ && elf_elfheader (sub)->e_ident[EI_CLASS] == bed->s->elfclass)
{
- sub = p->u.indirect.section->owner;
if (! sub->output_has_begun)
{
if (! elf_link_input_bfd (&finfo, sub))