public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] bfd_is_const_section thinko
@ 2020-05-02 15:50 gdb-buildbot
  2020-05-02 15:50 ` Failures on Fedora-x86_64-cc-with-index, branch master gdb-buildbot
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: gdb-buildbot @ 2020-05-02 15:50 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 18f97353547b1a00d5840d2ad6e7e67f44488070 ***

commit 18f97353547b1a00d5840d2ad6e7e67f44488070
Author:     Alan Modra <amodra@gmail.com>
AuthorDate: Sat Apr 18 10:15:35 2020 +0930
Commit:     Alan Modra <amodra@gmail.com>
CommitDate: Sat Apr 18 10:24:17 2020 +0930

    bfd_is_const_section thinko
    
            * section.c (bfd_is_const_section): Correct test for special
            sections.
            * bfd-in2.h: Regenerate.

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b9ee79572a..9d5f1cb89e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2020-04-18  Alan Modra  <amodra@gmail.com>
+
+	* section.c (bfd_is_const_section): Correct test for special
+	sections.
+	* bfd-in2.h: Regenerate.
+
 2020-04-17  Alan Modra  <amodra@gmail.com>
 
 	PR 25842
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 7aa64556b8..8693f86dd4 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1329,7 +1329,9 @@ bfd_is_ind_section (const asection *sec)
 static inline bfd_boolean
 bfd_is_const_section (const asection *sec)
 {
-  return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr;
+  return (sec >= _bfd_std_section
+          && sec < _bfd_std_section + (sizeof (_bfd_std_section)
+                                       / sizeof (_bfd_std_section[0])));
 }
 
 /* Return TRUE if input section SEC has been discarded.  */
diff --git a/bfd/section.c b/bfd/section.c
index ecad4cd0b9..17f5b4c3d8 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -688,7 +688,9 @@ CODE_FRAGMENT
 .static inline bfd_boolean
 .bfd_is_const_section (const asection *sec)
 .{
-.  return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr;
+.  return (sec >= _bfd_std_section
+.          && sec < _bfd_std_section + (sizeof (_bfd_std_section)
+.                                       / sizeof (_bfd_std_section[0])));
 .}
 .
 .{* Return TRUE if input section SEC has been discarded.  *}


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-05-04 10:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-02 15:50 [binutils-gdb] bfd_is_const_section thinko gdb-buildbot
2020-05-02 15:50 ` Failures on Fedora-x86_64-cc-with-index, branch master gdb-buildbot
2020-05-02 16:15 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
2020-05-02 16:25 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2020-05-02 16:59 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
2020-05-02 17:09 ` *** COMPILATION FAILED *** Failures on Fedora-x86_64-w64-mingw32, branch master *** BREAKAGE *** gdb-buildbot
2020-05-02 17:11 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master gdb-buildbot
2020-05-03  5:35 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot
2020-05-04 10:29 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).