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]

PATCH: elf32-arm.c fix (committed)


This patch corrects a bug where iterating over a list (in_list), we
break after the first element, warning only if that element is
erroneous.  I suspect the correct behaviour is to examine all list
elements, but only issue one warning.

Committed as obvious; feel free to grill me if I am wrong!

2006-03-15  Ben Elliston  <bje@au.ibm.com>

	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Iterate over all
	in_list elements, not just the first.

Index: elf32-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.c,v
retrieving revision 1.68
diff -u -p -r1.68 elf32-arm.c
--- elf32-arm.c 10 Mar 2006 17:20:28 -0000      1.68
+++ elf32-arm.c 14 Mar 2006 23:49:43 -0000
@@ -5146,10 +5146,12 @@ elf32_arm_merge_eabi_attributes (bfd *ib
   for (; in_list; in_list = in_list->next)
     {
       if ((in_list->tag & 128) < 64)
-       _bfd_error_handler
-         (_("Warning: %B: Unknown EABI object attribute %d"),
-          ibfd, in_list->tag);
-      break;
+       {
+         _bfd_error_handler
+           (_("Warning: %B: Unknown EABI object attribute %d"),
+            ibfd, in_list->tag);
+         break;
+       }
     }
   return TRUE;
 }


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