styp_flags = STYP_LIT;
#endif /* _LIT */
}
- else if (CONST_STRNEQ (sec_name, DOT_DEBUG)
- || CONST_STRNEQ (sec_name, DOT_ZDEBUG))
+ else if (startswith (sec_name, DOT_DEBUG)
+ || startswith (sec_name, DOT_ZDEBUG))
{
/* Handle the XCOFF debug section and DWARF2 debug sections. */
if (!sec_name[6])
else
styp_flags = STYP_DEBUG_INFO;
}
- else if (CONST_STRNEQ (sec_name, ".stab"))
+ else if (startswith (sec_name, ".stab"))
{
styp_flags = STYP_DEBUG_INFO;
}
#ifdef COFF_LONG_SECTION_NAMES
- else if (CONST_STRNEQ (sec_name, GNU_LINKONCE_WI)
- || CONST_STRNEQ (sec_name, GNU_LINKONCE_WT))
+ else if (startswith (sec_name, GNU_LINKONCE_WI)
+ || startswith (sec_name, GNU_LINKONCE_WT))
{
styp_flags = STYP_DEBUG_INFO;
}
long styp_flags = 0;
bfd_boolean is_dbg = FALSE;
- if (CONST_STRNEQ (sec_name, DOT_DEBUG)
- || CONST_STRNEQ (sec_name, DOT_ZDEBUG)
+ if (startswith (sec_name, DOT_DEBUG)
+ || startswith (sec_name, DOT_ZDEBUG)
#ifdef COFF_LONG_SECTION_NAMES
- || CONST_STRNEQ (sec_name, GNU_LINKONCE_WI)
- || CONST_STRNEQ (sec_name, GNU_LINKONCE_WT)
+ || startswith (sec_name, GNU_LINKONCE_WI)
+ || startswith (sec_name, GNU_LINKONCE_WT)
#endif
- || CONST_STRNEQ (sec_name, ".stab"))
+ || startswith (sec_name, ".stab"))
is_dbg = TRUE;
/* caution: there are at least three groups of symbols that have
#endif
sec_flags |= SEC_ALLOC;
}
- else if (CONST_STRNEQ (name, DOT_DEBUG)
- || CONST_STRNEQ (name, DOT_ZDEBUG)
+ else if (startswith (name, DOT_DEBUG)
+ || startswith (name, DOT_ZDEBUG)
#ifdef _COMMENT
|| strcmp (name, _COMMENT) == 0
#endif
#ifdef COFF_LONG_SECTION_NAMES
- || CONST_STRNEQ (name, GNU_LINKONCE_WI)
- || CONST_STRNEQ (name, GNU_LINKONCE_WT)
+ || startswith (name, GNU_LINKONCE_WI)
+ || startswith (name, GNU_LINKONCE_WT)
#endif
- || CONST_STRNEQ (name, ".stab"))
+ || startswith (name, ".stab"))
{
#ifdef COFF_PAGE_SIZE
sec_flags |= SEC_DEBUGGING;
#endif /* STYP_SDATA */
if ((bfd_applicable_section_flags (abfd) & SEC_SMALL_DATA) != 0
- && (CONST_STRNEQ (name, ".sbss")
- || CONST_STRNEQ (name, ".sdata")))
+ && (startswith (name, ".sbss")
+ || startswith (name, ".sdata")))
sec_flags |= SEC_SMALL_DATA;
#if defined (COFF_LONG_SECTION_NAMES) && defined (COFF_SUPPORT_GNU_LINKONCE)
The symbols will be defined as weak, so that multiple definitions
are permitted. The GNU linker extension is to actually discard
all but one of the sections. */
- if (CONST_STRNEQ (name, ".gnu.linkonce"))
+ if (startswith (name, ".gnu.linkonce"))
sec_flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
#endif
bfd_boolean result = TRUE;
bfd_boolean is_dbg = FALSE;
- if (CONST_STRNEQ (name, DOT_DEBUG)
- || CONST_STRNEQ (name, DOT_ZDEBUG)
+ if (startswith (name, DOT_DEBUG)
+ || startswith (name, DOT_ZDEBUG)
#ifdef COFF_LONG_SECTION_NAMES
- || CONST_STRNEQ (name, GNU_LINKONCE_WI)
- || CONST_STRNEQ (name, GNU_LINKONCE_WT)
+ || startswith (name, GNU_LINKONCE_WI)
+ || startswith (name, GNU_LINKONCE_WT)
/* FIXME: These definitions ought to be in a header file. */
#define GNU_DEBUGLINK ".gnu_debuglink"
#define GNU_DEBUGALTLINK ".gnu_debugaltlink"
- || CONST_STRNEQ (name, GNU_DEBUGLINK)
- || CONST_STRNEQ (name, GNU_DEBUGALTLINK)
+ || startswith (name, GNU_DEBUGLINK)
+ || startswith (name, GNU_DEBUGALTLINK)
#endif
- || CONST_STRNEQ (name, ".stab"))
+ || startswith (name, ".stab"))
is_dbg = TRUE;
/* Assume read only unless IMAGE_SCN_MEM_WRITE is specified. */
sec_flags = SEC_READONLY;
}
if ((bfd_applicable_section_flags (abfd) & SEC_SMALL_DATA) != 0
- && (CONST_STRNEQ (name, ".sbss")
- || CONST_STRNEQ (name, ".sdata")))
+ && (startswith (name, ".sbss")
+ || startswith (name, ".sdata")))
sec_flags |= SEC_SMALL_DATA;
#if defined (COFF_LONG_SECTION_NAMES) && defined (COFF_SUPPORT_GNU_LINKONCE)
The symbols will be defined as weak, so that multiple definitions
are permitted. The GNU linker extension is to actually discard
all but one of the sections. */
- if (CONST_STRNEQ (name, ".gnu.linkonce"))
+ if (startswith (name, ".gnu.linkonce"))
sec_flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
#endif
.{* Macro: Returns true if the bfd is a PE executable as opposed to a
. PE object file. *}
.#define bfd_pei_p(abfd) \
-. (CONST_STRNEQ ((abfd)->xvec->name, "pei-"))
+. (startswith ((abfd)->xvec->name, "pei-"))
*/
/* See whether the magic number matches. */