-/* Determines if a given section index is valid. */
-
-static inline bfd_boolean
-valid_section_index_p (unsigned index, unsigned num_sections)
-{
- /* Note: We allow SHN_UNDEF as a valid section index. */
- if (index < SHN_LORESERVE || index > SHN_HIRESERVE)
- return index < num_sections;
-
- /* We disallow the use of reserved indcies, except for those
- with OS or Application specific meaning. The test make use
- of the knowledge that:
- SHN_LORESERVE == SHN_LOPROC
- and
- SHN_HIPROC == SHN_LOOS - 1 */
- /* XXX - Should we allow SHN_XINDEX as a valid index here ? */
- return (index >= SHN_LOPROC && index <= SHN_HIOS);
-}
-