public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@bigpond.net.au>
To: "H . J . Lu" <hjl@lucon.org>, binutils@sourceware.cygnus.com
Subject: Re: binutils 2.11.92.0.6 (Re: binutils 2.11.92.0.5 is broken)
Date: Mon, 15 Oct 2001 02:47:00 -0000	[thread overview]
Message-ID: <20011015191709.K1015@bubble.sa.bigpond.net.au> (raw)
In-Reply-To: <20011015182441.J1015@bubble.sa.bigpond.net.au>

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

      reply	other threads:[~2001-10-15  2:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200110131452.f9DEq7Q0032358@dandelion.com>
2001-10-13 19:01 ` binutils 2.11.92.0.5 is broke (Re: Binutils Bug) H . J . Lu
2001-10-13 23:58   ` binutils 2.11.92.0.6 (Re: binutils 2.11.92.0.5 is broken) H . J . Lu
2001-10-14  0:00     ` H . J . Lu
2001-10-14 17:03     ` Alan Modra
2001-10-14 22:42       ` H . J . Lu
2001-10-15  0:15       ` Alan Modra
2001-10-15  0:50         ` H . J . Lu
2001-10-15  1:54           ` Alan Modra
2001-10-15  2:47             ` Alan Modra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011015191709.K1015@bubble.sa.bigpond.net.au \
    --to=amodra@bigpond.net.au \
    --cc=binutils@sourceware.cygnus.com \
    --cc=hjl@lucon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).