This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Apply:
- From: Eric Christopher <echristo at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 8 Nov 2017 22:12:06 -0000
- Subject: [binutils-gdb] Apply:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=08228b11557016f6f12d537ebff5f169fdf9bc6c
commit 08228b11557016f6f12d537ebff5f169fdf9bc6c
Author: Eric Christopher <echristo@gmail.com>
Date: Wed Nov 8 14:03:55 2017 -0800
Apply:
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.
Diff:
---
gold/ChangeLog | 5 +++++
gold/object.cc | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 2d0ae45..737e3af 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2017-11-07 Alan Modra <amodra@gmail.com>
* system.h (textdomain, bindtextdomain): Use safer "do nothing".
diff --git a/gold/object.cc b/gold/object.cc
index 4110686..0135651 100644
--- a/gold/object.cc
+++ b/gold/object.cc
@@ -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.