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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [bfd/] [archive.c] - Diff between revs 14 and 163

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

Rev 14 Rev 163
Line 341... Line 341...


static bfd *
static bfd *
_bfd_find_nested_archive (bfd *arch_bfd, const char *filename)
_bfd_find_nested_archive (bfd *arch_bfd, const char *filename)
{
{
  bfd *abfd;
  bfd *abfd;
 
  const char *target;
 
 
  for (abfd = arch_bfd->nested_archives;
  for (abfd = arch_bfd->nested_archives;
       abfd != NULL;
       abfd != NULL;
       abfd = abfd->archive_next)
       abfd = abfd->archive_next)
    {
    {
      if (filename_cmp (filename, abfd->filename) == 0)
      if (filename_cmp (filename, abfd->filename) == 0)
        return abfd;
        return abfd;
    }
    }
  abfd = bfd_openr (filename, NULL);
  target = NULL;
 
  if (!arch_bfd->target_defaulted)
 
    target = arch_bfd->xvec->name;
 
  abfd = bfd_openr (filename, target);
  if (abfd)
  if (abfd)
    {
    {
      abfd->archive_next = arch_bfd->nested_archives;
      abfd->archive_next = arch_bfd->nested_archives;
      arch_bfd->nested_archives = abfd;
      arch_bfd->nested_archives = abfd;
    }
    }
Line 595... Line 599...
 
 
  filename = new_areldata->filename;
  filename = new_areldata->filename;
 
 
  if (bfd_is_thin_archive (archive))
  if (bfd_is_thin_archive (archive))
    {
    {
 
      const char *target;
 
 
      /* This is a proxy entry for an external file.  */
      /* This is a proxy entry for an external file.  */
      if (! IS_ABSOLUTE_PATH (filename))
      if (! IS_ABSOLUTE_PATH (filename))
        {
        {
          filename = _bfd_append_relative_path (archive, filename);
          filename = _bfd_append_relative_path (archive, filename);
          if (filename == NULL)
          if (filename == NULL)
Line 626... Line 632...
          n_nfd->proxy_origin = bfd_tell (archive);
          n_nfd->proxy_origin = bfd_tell (archive);
          return n_nfd;
          return n_nfd;
        }
        }
      /* It's not an element of a nested archive;
      /* It's not an element of a nested archive;
         open the external file as a bfd.  */
         open the external file as a bfd.  */
      n_nfd = bfd_openr (filename, NULL);
      target = NULL;
 
      if (!archive->target_defaulted)
 
        target = archive->xvec->name;
 
      n_nfd = bfd_openr (filename, target);
      if (n_nfd == NULL)
      if (n_nfd == NULL)
        bfd_set_error (bfd_error_malformed_archive);
        bfd_set_error (bfd_error_malformed_archive);
    }
    }
  else
  else
    {
    {
Line 782... Line 791...
      bfd_release (abfd, bfd_ardata (abfd));
      bfd_release (abfd, bfd_ardata (abfd));
      bfd_ardata (abfd) = tdata_hold;
      bfd_ardata (abfd) = tdata_hold;
      return NULL;
      return NULL;
    }
    }
 
 
  if (bfd_has_map (abfd))
  if (abfd->target_defaulted && bfd_has_map (abfd))
    {
    {
      bfd *first;
      bfd *first;
 
 
      /* This archive has a map, so we may presume that the contents
      /* This archive has a map, so we may presume that the contents
         are object files.  Make sure that if the first file in the
         are object files.  Make sure that if the first file in the
Line 1501... Line 1510...
_bfd_construct_extended_name_table (bfd *abfd,
_bfd_construct_extended_name_table (bfd *abfd,
                                    bfd_boolean trailing_slash,
                                    bfd_boolean trailing_slash,
                                    char **tabloc,
                                    char **tabloc,
                                    bfd_size_type *tablen)
                                    bfd_size_type *tablen)
{
{
  unsigned int maxname = abfd->xvec->ar_max_namelen;
  unsigned int maxname = ar_maxnamelen (abfd);
  bfd_size_type total_namelen = 0;
  bfd_size_type total_namelen = 0;
  bfd *current;
  bfd *current;
  char *strptr;
  char *strptr;
  const char *last_filename;
  const char *last_filename;
  long last_stroff;
  long last_stroff;
Line 1696... Line 1705...
_bfd_archive_bsd44_construct_extended_name_table (bfd *abfd,
_bfd_archive_bsd44_construct_extended_name_table (bfd *abfd,
                                                  char **tabloc,
                                                  char **tabloc,
                                                  bfd_size_type *tablen,
                                                  bfd_size_type *tablen,
                                                  const char **name)
                                                  const char **name)
{
{
  unsigned int maxname = abfd->xvec->ar_max_namelen;
  unsigned int maxname = ar_maxnamelen (abfd);
  bfd *current;
  bfd *current;
 
 
  *tablen = 0;
  *tablen = 0;
  *tabloc = NULL;
  *tabloc = NULL;
  *name = NULL;
  *name = NULL;

powered by: WebSVN 2.1.0

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