]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Apply:
authorEric Christopher <echristo@gmail.com>
Wed, 8 Nov 2017 22:03:55 +0000 (14:03 -0800)
committerEric Christopher <echristo@gmail.com>
Wed, 4 Apr 2018 21:04:28 +0000 (14:04 -0700)
2017-11-08  Kyle Butt  <iteratee@google.com>

        * object.cc (do_find_special_sections): Fix a thinko with memmem return
        values and check for != NULL rather than == 0.

gold/ChangeLog
gold/object.cc

index b48c27913afd6bfc2070403060b448528df2540c..ddcc0d7fb5b8de64cdf37f1c16b74747375b29d7 100644 (file)
@@ -1,3 +1,11 @@
+2018-04-04  Eric Christopher  <echristo@gmail.com>
+
+       Apply from master:
+        2017-11-08  Kyle Butt  <iteratee@google.com>
+
+        * object.cc (do_find_special_sections): Fix a thinko with memmem return
+        values and check for !=        NULL rather than == 0.
+
 2018-03-20  Sriraman Tallam  <tmsriram@google.com>
 
        Apply from master:
index 4110686ff3146b6b655faee144cc486a159388e6..013565103c577c16e4a8c137f9672e4f58023c19 100644 (file)
@@ -816,9 +816,9 @@ Sized_relobj_file<size, big_endian>::do_find_special_sections(
   return (this->has_eh_frame_
          || (!parameters->options().relocatable()
              && parameters->options().gdb_index()
-             && (memmem(names, sd->section_names_size, "debug_info", 11) == 0
+             && (memmem(names, sd->section_names_size, "debug_info", 11) != NULL
                  || memmem(names, sd->section_names_size,
-                           "debug_types", 12) == 0)));
+                           "debug_types", 12) != NULL)));
 }
 
 // Read the sections and symbols from an object file.