* elf-attrs.c (_bfd_elf_merge_unknown_attribute_low,
authorJoseph Myers <joseph@codesourcery.com>
Fri, 5 Nov 2010 13:02:09 +0000 (13:02 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 5 Nov 2010 13:02:09 +0000 (13:02 +0000)
_bfd_elf_merge_unknown_attribute_list): Correct test for matching
string attributes.

bfd/ChangeLog
bfd/elf-attrs.c

index ff4b979310018a560af8c4115a6c0307ad07e4e6..22dd1909ab84c95a3e9ec819d1f5bd2ff839dd8a 100644 (file)
@@ -1,3 +1,9 @@
+2010-11-05  Joseph Myers  <joseph@codesourcery.com>
+
+       * elf-attrs.c (_bfd_elf_merge_unknown_attribute_low,
+       _bfd_elf_merge_unknown_attribute_list): Correct test for matching
+       string attributes.
+
 2010-11-05  Tristan Gingold  <gingold@adacore.com>
 
        * po/bfd.pot: Regenerate
index e1893d38d94d1f7a8a91c1a9a7de8fe9cf392c08..569e846cc5474605fdcc5b941d1ecd994e8ca605 100644 (file)
@@ -613,7 +613,7 @@ _bfd_elf_merge_unknown_attribute_low (bfd *ibfd, bfd *obfd, int tag)
 
   /* Only pass on attributes that match in both inputs.  */
   if (in_attr[tag].i != out_attr[tag].i
-      || in_attr[tag].s != out_attr[tag].s
+      || (in_attr[tag].s == NULL) != (out_attr[tag].s == NULL)
       || (in_attr[tag].s != NULL && out_attr[tag].s != NULL
          && strcmp (in_attr[tag].s, out_attr[tag].s) != 0))
     {
@@ -673,7 +673,7 @@ _bfd_elf_merge_unknown_attribute_list (bfd *ibfd, bfd *obfd)
 
          /*  Only pass on attributes that match in both inputs.  */
          if (in_list->attr.i != out_list->attr.i
-             || in_list->attr.s != out_list->attr.s
+             || (in_list->attr.s == NULL) != (out_list->attr.s == NULL)
              || (in_list->attr.s && out_list->attr.s
                  && strcmp (in_list->attr.s, out_list->attr.s) != 0))
            {
This page took 0.026155 seconds and 4 git commands to generate.