* elfcode.h (elf_link_add_object_symbols): Permit common and

indirect symbols in weakdefs BFD_ASSERT.
	* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Simplify
	BFD_ASSERT to permit some legal, but odd, cases.
	* elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
	* elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
This commit is contained in:
Ian Lance Taylor
1995-07-03 17:57:25 +00:00
parent 6ff9c0519c
commit 3004a68c46
5 changed files with 52 additions and 72 deletions

View File

@@ -573,22 +573,14 @@ elf32_sparc_adjust_dynamic_symbol (info, h)
dynobj = elf_hash_table (info)->dynobj;
/* Make sure we know what is going on here. */
BFD_ASSERT (dynobj != NULL);
BFD_ASSERT ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
|| ((h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_DYNAMIC) != 0
&& (h->elf_link_hash_flags
& ELF_LINK_HASH_REF_REGULAR) != 0
&& (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0
&& (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
&& (h->root.u.def.section->owner == NULL
|| ((elf_elfheader (h->root.u.def.section->owner)->e_type
== ET_DYN)
&& (bfd_get_flavour (h->root.u.def.section->owner)
== bfd_target_elf_flavour)
&& h->root.u.def.section->output_section == NULL))));
BFD_ASSERT (dynobj != NULL
&& ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
|| ((h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_DYNAMIC) != 0
&& (h->elf_link_hash_flags
& ELF_LINK_HASH_REF_REGULAR) != 0
&& (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)));
/* If this is a function, put it in the procedure linkage table. We
will fill in the contents of the procedure linkage table later