revert last patch

This commit is contained in:
Ian Lance Taylor 1997-06-18 23:02:58 +00:00
parent 705ebd9239
commit c4badc83ec
2 changed files with 2 additions and 15 deletions

View file

@ -1,9 +1,3 @@
Wed Jun 18 11:35:42 1997 Ian Lance Taylor <ian@cygnus.com>
* elflink.h (elf_link_add_object_symbols): Don't let a common
symbol in a regular object override a common symbol in a shared
object if the latter was found via an indirect symbol.
Tue Jun 17 11:55:02 1997 Ian Lance Taylor <ian@cygnus.com> Tue Jun 17 11:55:02 1997 Ian Lance Taylor <ian@cygnus.com>
* cofflink.c (_bfd_coff_link_input_bfd): If stripping debugging * cofflink.c (_bfd_coff_link_input_bfd): If stripping debugging

View file

@ -741,7 +741,6 @@ elf_link_add_object_symbols (abfd, info)
{ {
Elf_Internal_Versym iver; Elf_Internal_Versym iver;
int vernum; int vernum;
boolean indirect;
boolean override; boolean override;
if (ever != NULL) if (ever != NULL)
@ -851,14 +850,9 @@ elf_link_add_object_symbols (abfd, info)
if (h->root.type == bfd_link_hash_new) if (h->root.type == bfd_link_hash_new)
h->elf_link_hash_flags &=~ ELF_LINK_NON_ELF; h->elf_link_hash_flags &=~ ELF_LINK_NON_ELF;
indirect = false;
while (h->root.type == bfd_link_hash_indirect while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning) || h->root.type == bfd_link_hash_warning)
{ h = (struct elf_link_hash_entry *) h->root.u.i.link;
if (h->root.type == bfd_link_hash_indirect)
indirect = true;
h = (struct elf_link_hash_entry *) h->root.u.i.link;
}
/* FIXME: There are too many cases here, and it's too /* FIXME: There are too many cases here, and it's too
confusing. This code needs to be reorganized somehow. */ confusing. This code needs to be reorganized somehow. */
@ -1014,8 +1008,7 @@ elf_link_add_object_symbols (abfd, info)
&& (h->root.u.def.section->flags & SEC_ALLOC) != 0 && (h->root.u.def.section->flags & SEC_ALLOC) != 0
&& (h->root.u.def.section->flags & SEC_LOAD) == 0 && (h->root.u.def.section->flags & SEC_LOAD) == 0
&& h->size > 0 && h->size > 0
&& h->type != STT_FUNC && h->type != STT_FUNC)
&& ! indirect)
{ {
/* It would be best if we could set the hash table entry /* It would be best if we could set the hash table entry
to a common symbol, but we don't know what to use for to a common symbol, but we don't know what to use for