From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@nynexst.com (H.J. Lu) To: davem@caip.rutgers.edu (David S. Miller) Cc: ian@cygnus.com (Ian Lance Taylor), gas2@cygnus.com Subject: A bug fix for common symbol in the ELF linker? Date: Tue, 03 Oct 1995 19:26:00 -0000 Message-id: <9510040226.AA04911@nynexst.com> References: <199510031557.LAA00698@huahaga.rutgers.edu> X-SW-Source: 1995/msg00177.html Hi, This is the patch for the common symbol bug in ELF I reported earlier. I hope it won't break anything. Thanks. H.J. =================================================================== RCS file: /home/cvs/gnu/binutils/bfd/elflink.h,v retrieving revision 1.3 diff -c -r1.3 elflink.h *** 1.3 1995/08/24 01:32:34 --- elflink.h 1995/10/04 02:15:07 *************** *** 153,159 **** false, false, false); if (h == (struct elf_link_hash_entry *) NULL) continue; ! if (h->root.type != bfd_link_hash_undefined) { if (h->root.type != bfd_link_hash_undefweak) defined[i] = true; --- 153,161 ---- false, false, false); if (h == (struct elf_link_hash_entry *) NULL) continue; ! /* We should check both undef and common symbols. H.J. */ ! if (h->root.type != bfd_link_hash_undefined && ! h->root.type != bfd_link_hash_common) { if (h->root.type != bfd_link_hash_undefweak) defined[i] = true;