This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Apply PR12339 fixes


Committed.

bfd/
	PR ld/12339
	* elf32-arm.c (allocate_dynrelocs): Don't set up eh before
	following bfd_link_hash_warning symbol link.
ld/
	PR ld/12339
	* ldlang.c (sort_def_symbol): Handle bfd_link_hash_warning symbols.

Index: bfd/elf32-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.c,v
retrieving revision 1.253
diff -u -p -r1.253 elf32-arm.c
--- bfd/elf32-arm.c	11 Jan 2011 09:06:04 -0000	1.253
+++ bfd/elf32-arm.c	14 Jan 2011 01:42:32 -0000
@@ -12007,8 +12007,6 @@ allocate_dynrelocs (struct elf_link_hash
   struct elf_dyn_relocs *p;
   bfd_signed_vma thumb_refs;
 
-  eh = (struct elf32_arm_link_hash_entry *) h;
-
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
@@ -12018,6 +12016,8 @@ allocate_dynrelocs (struct elf_link_hash
        symbol in a hash traversal.  So look at it now.  */
     h = (struct elf_link_hash_entry *) h->root.u.i.link;
 
+  eh = (struct elf32_arm_link_hash_entry *) h;
+
   info = (struct bfd_link_info *) inf;
   htab = elf32_arm_hash_table (info);
   if (htab == NULL)
Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.359
diff -u -p -r1.359 ldlang.c
--- ld/ldlang.c	13 Jan 2011 13:29:55 -0000	1.359
+++ ld/ldlang.c	14 Jan 2011 01:43:30 -0000
@@ -2089,6 +2089,9 @@ static bfd_boolean
 sort_def_symbol (struct bfd_link_hash_entry *hash_entry,
 		 void *info ATTRIBUTE_UNUSED)
 {
+  if (hash_entry->type == bfd_link_hash_warning)
+    hash_entry = (struct bfd_link_hash_entry *) hash_entry->u.i.link;
+
   if (hash_entry->type == bfd_link_hash_defined
       || hash_entry->type == bfd_link_hash_defweak)
     {

-- 
Alan Modra
Australia Development Lab, IBM


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