FreeBSD/contrib/gcc/varasm.c
/* Emit assembly code to switch to section NEW_SECTION.  Do nothing if
   the current section is NEW_SECTION.  */
Emit assembly code to switch to section NEW_SECTION.  Do nothing if
the current section is NEW_SECTION.
Emit assembly code to switch to section NEW_SECTION . Do nothing if the current section is NEW_SECTION .
void
switch_to_section (section *new_section)
{
  if (in_section == new_section)
    return;
  if (new_section->common.flags & SECTION_FORGET)
    in_section = NULL;
  else
    in_section = new_section;
  switch (SECTION_STYLE (new_section))
    {
    case SECTION_NAMED:
      if (cfun
	  && !cfun->unlikely_text_section_name
	  && strcmp (new_section->named.name,
		     UNLIKELY_EXECUTED_TEXT_SECTION_NAME) == 0)
	cfun->unlikely_text_section_name = UNLIKELY_EXECUTED_TEXT_SECTION_NAME;
      targetm.asm_out.named_section (new_section->named.name,
				     new_section->named.common.flags,
				     new_section->named.decl);
      break;
    case SECTION_UNNAMED:
      new_section->unnamed.callback (new_section->unnamed.data);
      break;
    case SECTION_NOSWITCH:
      gcc_unreachable ();
      break;
    }
  new_section->common.flags |= SECTION_DECLARED;
}
void switch_to_section ( section * new_section ) { if ( in_section == new_section ) return ; if ( new_section -> common . flags & SECTION_FORGET ) in_section = NULL ; else in_section = new_section ; switch ( SECTION_STYLE ( new_section ) ) { case SECTION_NAMED : if ( cfun && ! cfun -> unlikely_text_section_name && strcmp ( new_section -> named . name , UNLIKELY_EXECUTED_TEXT_SECTION_NAME ) == 0 ) cfun -> unlikely_text_section_name = UNLIKELY_EXECUTED_TEXT_SECTION_NAME ; targetm . asm_out . named_section ( new_section -> named . name , new_section -> named . common . flags , new_section -> named . decl ) ; break ; case SECTION_UNNAMED : new_section -> unnamed . callback ( new_section -> unnamed . data ) ; break ; case SECTION_NOSWITCH : gcc_unreachable ( ) ; break ; } new_section -> common . flags |= SECTION_DECLARED ; }
Emit assembly code to switch to section NEW_SECTION.
Emit assembly code to switch to section NEW_SECTION .