This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: binutils 2.11.92.0.6 (Re: binutils 2.11.92.0.5 is broken)


On Mon, Oct 15, 2001 at 06:24:41PM +0930, Alan Modra wrote:
> 
> Before I added the call to copy_indirect_symbol in elf_fix_symbol_flags,
> it was called from two other places in elflink.h, both of which have
> ind->root.type == bfd_link_hash_indirect.  The new call has an assert a
> few lines before that guarantees ind->root.type is bfd_link_hash_defined
> or bfd_link_hash_defweak, so it may be better to test
> 
> if (ind->root.type != bfd_link_hash_indirect)
>   return;

bfd/ChangeLog
	* elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
	rather than ind->weakdef.
	* elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
	* elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
	* elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
	* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
	* elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.

Committed.

-- 
Alan Modra

Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.100
diff -u -p -r1.100 elf.c
--- elf.c	2001/10/10 11:19:54	1.100
+++ elf.c	2001/10/15 09:22:43
@@ -1193,7 +1193,7 @@ _bfd_elf_link_hash_copy_indirect (dir, i
 	| ELF_LINK_HASH_REF_REGULAR_NONWEAK
 	| ELF_LINK_NON_GOT_REF));
 
-  if (dir == ind->weakdef)
+  if (ind->root.type != bfd_link_hash_indirect)
     return;
 
   /* Copy over the global and procedure linkage table refcount entries.
Index: bfd/elf32-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-hppa.c,v
retrieving revision 1.53
diff -u -p -r1.53 elf32-hppa.c
--- elf32-hppa.c	2001/10/15 07:28:44	1.53
+++ elf32-hppa.c	2001/10/15 09:22:48
@@ -1149,7 +1149,7 @@ elf32_hppa_copy_indirect_symbol (dir, in
 	  struct elf32_hppa_dyn_reloc_entry **pp;
 	  struct elf32_hppa_dyn_reloc_entry *p;
 
-	  if (dir != ind->weakdef)
+	  if (ind->root.type == bfd_link_hash_indirect)
 	    abort ();
 
 	  /* Add reloc counts against the weak sym to the strong sym
Index: bfd/elf32-i386.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i386.c,v
retrieving revision 1.55
diff -u -p -r1.55 elf32-i386.c
--- elf32-i386.c	2001/10/15 07:28:44	1.55
+++ elf32-i386.c	2001/10/15 09:22:50
@@ -644,7 +644,7 @@ elf_i386_copy_indirect_symbol (dir, ind)
 	  struct elf_i386_dyn_relocs **pp;
 	  struct elf_i386_dyn_relocs *p;
 
-	  if (dir != ind->weakdef)
+	  if (ind->root.type == bfd_link_hash_indirect)
 	    abort ();
 
 	  /* Add reloc counts against the weak sym to the strong sym
Index: bfd/elf32-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-mips.c,v
retrieving revision 1.119
diff -u -p -r1.119 elf32-mips.c
--- elf32-mips.c	2001/10/05 16:14:39	1.119
+++ elf32-mips.c	2001/10/15 09:22:57
@@ -8085,7 +8085,7 @@ _bfd_mips_elf_copy_indirect_symbol (dir,
 
   _bfd_elf_link_hash_copy_indirect (dir, ind);
 
-  if (dir == ind->weakdef)
+  if (ind->root.type != bfd_link_hash_indirect)
     return;
 
   dirmips = (struct mips_elf_link_hash_entry *) dir;
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.8
diff -u -p -r1.8 elf64-ppc.c
--- elf64-ppc.c	2001/10/15 07:28:45	1.8
+++ elf64-ppc.c	2001/10/15 09:23:00
@@ -1801,7 +1801,7 @@ ppc64_elf_copy_indirect_symbol (dir, ind
 	  struct ppc_dyn_relocs **pp;
 	  struct ppc_dyn_relocs *p;
 
-	  if (dir != ind->weakdef)
+	  if (ind->root.type == bfd_link_hash_indirect)
 	    abort ();
 
 	  /* Add reloc counts against the weak sym to the strong sym
Index: bfd/elfxx-ia64.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-ia64.c,v
retrieving revision 1.28
diff -u -p -r1.28 elfxx-ia64.c
--- elfxx-ia64.c	2001/10/03 13:16:18	1.28
+++ elfxx-ia64.c	2001/10/15 09:23:03
@@ -1524,7 +1524,7 @@ elfNN_ia64_hash_copy_indirect (xdir, xin
         | ELF_LINK_HASH_REF_REGULAR
         | ELF_LINK_HASH_REF_REGULAR_NONWEAK));
 
-  if (xdir == xind->weakdef)
+  if (ind->root.root.type != bfd_link_hash_indirect)
     return;
 
   /* Copy over the got and plt data.  This would have been done


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]