bfd_is_const_section thinko

* section.c (bfd_is_const_section): Correct test for special
	sections.
	* bfd-in2.h: Regenerate.
This commit is contained in:
Alan Modra
2020-04-18 10:15:35 +09:30
parent 41937b52d8
commit 18f9735354
3 changed files with 12 additions and 2 deletions

View File

@@ -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. *}