OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [bfd/] [mach-o.c] - Diff between revs 161 and 163

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 161 Rev 163
Line 181... Line 181...
          return;
          return;
        }
        }
    }
    }
}
}
 
 
 
/* Convert Mach-O section name to BFD.  Try to use standard names, otherwise
 
   forge a new name.  SEGNAME and SECTNAME are 16 bytes strings.  */
 
 
static void
static void
bfd_mach_o_convert_section_name_to_bfd
bfd_mach_o_convert_section_name_to_bfd
  (bfd *abfd, const char *segname, const char *sectname,
  (bfd *abfd, const char *segname, const char *sectname,
   const char **name, flagword *flags)
   const char **name, flagword *flags)
{
{
Line 197... Line 200...
 
 
  /* Return now if found.  */
  /* Return now if found.  */
  if (*name)
  if (*name)
    return;
    return;
 
 
  len = strlen (segname) + 1 + strlen (sectname) + 1;
  len = 16 + 1 + 16 + 1;
 
 
  /* Put "LC_SEGMENT." prefix if the segment name is weird (ie doesn't start
  /* Put "LC_SEGMENT." prefix if the segment name is weird (ie doesn't start
     with an underscore.  */
     with an underscore.  */
  if (segname[0] != '_')
  if (segname[0] != '_')
    {
    {
Line 212... Line 215...
    }
    }
 
 
  res = bfd_alloc (abfd, len);
  res = bfd_alloc (abfd, len);
  if (res == NULL)
  if (res == NULL)
    return;
    return;
  snprintf (res, len, "%s%s.%s", pfx, segname, sectname);
  snprintf (res, len, "%s%.16s.%.16s", pfx, segname, sectname);
  *name = res;
  *name = res;
  *flags = SEC_NO_FLAGS;
  *flags = SEC_NO_FLAGS;
}
}
 
 
/* Convert a bfd section name to a Mach-O segment + section name.  */
/* Convert a bfd section name to a Mach-O segment + section name.  */
Line 1404... Line 1407...
  seg->filesize = 0;
  seg->filesize = 0;
  seg->maxprot = BFD_MACH_O_PROT_READ | BFD_MACH_O_PROT_WRITE
  seg->maxprot = BFD_MACH_O_PROT_READ | BFD_MACH_O_PROT_WRITE
    | BFD_MACH_O_PROT_EXECUTE;
    | BFD_MACH_O_PROT_EXECUTE;
  seg->initprot = seg->maxprot;
  seg->initprot = seg->maxprot;
  seg->flags = 0;
  seg->flags = 0;
 
  seg->sect_head = NULL;
 
  seg->sect_tail = NULL;
 
 
  /* Create Mach-O sections.  */
  /* Create Mach-O sections.  */
  target_index = 0;
  target_index = 0;
  for (sec = abfd->sections; sec; sec = sec->next)
  for (sec = abfd->sections; sec; sec = sec->next)
    {
    {

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.