FreeBSD/contrib/binutils/gas/config/tc-arm.c
/* Start an exception table entry.  If idx is nonzero this is an index table
   entry.  */
Start an exception table entry.  If idx is nonzero this is an index table
entry.
Start an exception table entry . If idx is nonzero this is an index table entry .
static void
start_unwind_section (const segT text_seg, int idx)
{
  const char * text_name;
  const char * prefix;
  const char * prefix_once;
  const char * group_name;
  size_t prefix_len;
  size_t text_len;
  char * sec_name;
  size_t sec_name_len;
  int type;
  int flags;
  int linkonce;
  if (idx)
    {
      prefix = ELF_STRING_ARM_unwind;
      prefix_once = ELF_STRING_ARM_unwind_once;
      type = SHT_ARM_EXIDX;
    }
  else
    {
      prefix = ELF_STRING_ARM_unwind_info;
      prefix_once = ELF_STRING_ARM_unwind_info_once;
      type = SHT_PROGBITS;
    }
  text_name = segment_name (text_seg);
  if (streq (text_name, ".text"))
    text_name = "";
  if (strncmp (text_name, ".gnu.linkonce.t.",
	       strlen (".gnu.linkonce.t.")) == 0)
    {
      prefix = prefix_once;
      text_name += strlen (".gnu.linkonce.t.");
    }
  prefix_len = strlen (prefix);
  text_len = strlen (text_name);
  sec_name_len = prefix_len + text_len;
  sec_name = xmalloc (sec_name_len + 1);
  memcpy (sec_name, prefix, prefix_len);
  memcpy (sec_name + prefix_len, text_name, text_len);
  sec_name[prefix_len + text_len] = '\0';
  flags = SHF_ALLOC;
  linkonce = 0;
  group_name = 0;
  if (prefix != prefix_once && (text_seg->flags & SEC_LINK_ONCE) != 0)
    {
      group_name = elf_group_name (text_seg);
      if (group_name == NULL)
	{
	  as_bad ("Group section `%s' has no group signature",
		  segment_name (text_seg));
	  ignore_rest_of_line ();
	  return;
	}
      flags |= SHF_GROUP;
      linkonce = 1;
    }
  obj_elf_change_section (sec_name, type, flags, 0, group_name, linkonce, 0);
  if (idx)
    elf_linked_to_section (now_seg) = text_seg;
}
static void start_unwind_section ( const segT text_seg , int idx ) { const char * text_name ; const char * prefix ; const char * prefix_once ; const char * group_name ; size_t prefix_len ; size_t text_len ; char * sec_name ; size_t sec_name_len ; int type ; int flags ; int linkonce ; if ( idx ) { prefix = ELF_STRING_ARM_unwind ; prefix_once = ELF_STRING_ARM_unwind_once ; type = SHT_ARM_EXIDX ; } else { prefix = ELF_STRING_ARM_unwind_info ; prefix_once = ELF_STRING_ARM_unwind_info_once ; type = SHT_PROGBITS ; } text_name = segment_name ( text_seg ) ; if ( streq ( text_name , " " ) ) text_name = " " ; if ( strncmp ( text_name , " " , strlen ( " " ) ) == 0 ) { prefix = prefix_once ; text_name += strlen ( " " ) ; } prefix_len = strlen ( prefix ) ; text_len = strlen ( text_name ) ; sec_name_len = prefix_len + text_len ; sec_name = xmalloc ( sec_name_len + 1 ) ; memcpy ( sec_name , prefix , prefix_len ) ; memcpy ( sec_name + prefix_len , text_name , text_len ) ; sec_name [ prefix_len + text_len ] = ' \0 ' ; flags = SHF_ALLOC ; linkonce = 0 ; group_name = 0 ; if ( prefix != prefix_once && ( text_seg -> flags & SEC_LINK_ONCE ) != 0 ) { group_name = elf_group_name ( text_seg ) ; if ( group_name == NULL ) { as_bad ( " " , segment_name ( text_seg ) ) ; ignore_rest_of_line ( ) ; return ; } flags |= SHF_GROUP ; linkonce = 1 ; } obj_elf_change_section ( sec_name , type , flags , 0 , group_name , linkonce , 0 ) ; if ( idx ) elf_linked_to_section ( now_seg ) = text_seg ; }
Start an exception table entry.
Start an exception table entry .
/* Handle COMDAT group.  */ /* Set the setion link for index tables.  */