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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [bfd/] [vms-lib.c] - Diff between revs 161 and 166

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

Rev 161 Rev 166
Line 275... Line 275...
 
 
      /* Illegal value.  */
      /* Illegal value.  */
      if (idx_vbn == 0)
      if (idx_vbn == 0)
        return FALSE;
        return FALSE;
 
 
 
      /* Point to the next index entry.  */
 
      p = keyname + keylen;
 
 
      if (idx_off == RFADEF__C_INDEX)
      if (idx_off == RFADEF__C_INDEX)
        {
        {
          /* Indirect entry.  Recurse.  */
          /* Indirect entry.  Recurse.  */
          if (!vms_traverse_index (abfd, idx_vbn, cs))
          if (!vms_traverse_index (abfd, idx_vbn, cs))
            return FALSE;
            return FALSE;
Line 366... Line 369...
            {
            {
              if (!vms_add_index (cs, name, idx_vbn, idx_off))
              if (!vms_add_index (cs, name, idx_vbn, idx_off))
                return FALSE;
                return FALSE;
            }
            }
        }
        }
 
 
      /* Point to the next index entry.  */
 
      p = keyname + keylen;
 
    }
    }
 
 
  return TRUE;
  return TRUE;
}
}
 
 
Line 1540... Line 1540...
static unsigned int
static unsigned int
get_idxlen (struct lib_index *idx, bfd_boolean is_elfidx)
get_idxlen (struct lib_index *idx, bfd_boolean is_elfidx)
{
{
  if (is_elfidx)
  if (is_elfidx)
    {
    {
 
      /* 9 is the size of struct vms_elfidx without keyname.  */
      if (idx->namlen > MAX_KEYLEN)
      if (idx->namlen > MAX_KEYLEN)
        return 9 + sizeof (struct vms_rfa);
        return 9 + sizeof (struct vms_kbn);
      else
      else
        return 9 + idx->namlen;
        return 9 + idx->namlen;
    }
    }
  else
  else
 
    {
 
      /* 7 is the size of struct vms_idx without keyname.  */
    return 7 + idx->namlen;
    return 7 + idx->namlen;
}
}
 
}
 
 
/* Write the index.  VBN is the first vbn to be used, and will contain
/* Write the index composed by NBR symbols contained in IDX.
   on return the last vbn.
   VBN is the first vbn to be used, and will contain on return the last vbn.
   Can be called with ABFD set to NULL just to size the index.
   Can be called with ABFD set to NULL just to size the index.
 
   If not null, TOPVBN will be assigned to the vbn of the root index tree.
 
   IS_ELFIDX is true for elfidx (ie ia64) indexes layout.
   Return TRUE on success.  */
   Return TRUE on success.  */
 
 
static bfd_boolean
static bfd_boolean
vms_write_index (bfd *abfd,
vms_write_index (bfd *abfd,
                 struct lib_index *idx, unsigned int nbr, unsigned int *vbn,
                 struct lib_index *idx, unsigned int nbr, unsigned int *vbn,
Line 1635... Line 1641...
                          if (kbn_blk == NULL)
                          if (kbn_blk == NULL)
                            return FALSE;
                            return FALSE;
                        }
                        }
                      *(unsigned short *)kbn_blk = 0;
                      *(unsigned short *)kbn_blk = 0;
                    }
                    }
 
                  /* Allocate a new block for the keys.  */
                  kbn_vbn = (*vbn)++;
                  kbn_vbn = (*vbn)++;
                  kbn_sz = VMS_BLOCK_SIZE - 2;
                  kbn_sz = VMS_BLOCK_SIZE - 2;
                }
                }
 
              /* Size of the chunk written to the current key block.  */
              if (kl + sizeof (struct vms_kbn) > kbn_sz)
              if (kl + sizeof (struct vms_kbn) > kbn_sz)
                kl_chunk = kbn_sz - sizeof (struct vms_kbn);
                kl_chunk = kbn_sz - sizeof (struct vms_kbn);
              else
              else
                kl_chunk = kl;
                kl_chunk = kl;
 
 

powered by: WebSVN 2.1.0

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