]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix snafu with booleans in readelf patch - lack of a program header is not a reason...
authorNick Clifton <nickc@redhat.com>
Fri, 24 Feb 2017 18:15:12 +0000 (18:15 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 24 Feb 2017 18:15:12 +0000 (18:15 +0000)
(process_program_headers): Fix snafu - if the program headers are
not available then this is not a cause to fail.
(process_corefile_note_segments): Likewise.

binutils/ChangeLog
binutils/readelf.c

index 40f58e451849eac5d3b50bbd271caa43f891d613..200490283bad634668651c1f5b85605620fef051 100644 (file)
@@ -73,6 +73,9 @@
        (process_object): Reverse the logic of the return value.
        (process_archive): Likewise.
        (process_file): Likewise.
+       (process_program_headers): Fix snafu - if the program headers are
+       not available then this is not a cause to fail.
+       (process_corefile_note_segments): Likewise.
 
 2017-02-24  Maciej W. Rozycki  <macro@imgtec.com>
 
index 3b60cf9ce572fdb840e2bbab1e212bc56a1f8737..60694ff724eef58a87fc04315891c089d52c9d73 100644 (file)
@@ -4813,7 +4813,7 @@ process_program_headers (FILE * file)
     }
 
   if (! get_program_headers (file))
-    return FALSE;
+    return TRUE;
 
   if (do_segments)
     {
@@ -16618,7 +16618,8 @@ process_notes_at (FILE *              file,
          inote.namedata = temp;
        }
 
-      res &= process_note (& inote, file, section);
+      if (! process_note (& inote, file, section))
+       res = FALSE;
 
       if (temp != NULL)
        {
@@ -16640,7 +16641,7 @@ process_corefile_note_segments (FILE * file)
   bfd_boolean res = TRUE;
 
   if (! get_program_headers (file))
-    return FALSE;
+    return TRUE;
 
   for (i = 0, segment = program_headers;
        i < elf_header.e_phnum;