aboutsummaryrefslogtreecommitdiff
path: root/gold/object.cc
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2017-11-08 14:03:55 -0800
committerEric Christopher <echristo@gmail.com>2017-11-08 14:03:55 -0800
commit08228b11557016f6f12d537ebff5f169fdf9bc6c (patch)
treec60ea753d1cc1c3f6cd8146d92e660c1fadac7dc /gold/object.cc
parent280ca31f4d608082e1b61cd0b6d90fdc3450b9f3 (diff)
downloadfsf-binutils-gdb-08228b11557016f6f12d537ebff5f169fdf9bc6c.zip
fsf-binutils-gdb-08228b11557016f6f12d537ebff5f169fdf9bc6c.tar.gz
fsf-binutils-gdb-08228b11557016f6f12d537ebff5f169fdf9bc6c.tar.bz2
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.
Diffstat (limited to 'gold/object.cc')
-rw-r--r--gold/object.cc4
1 files changed, 2 insertions, 2 deletions
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.