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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [bfd/] [elf32-tilepro.c] - Diff between revs 148 and 161

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

Rev 148 Rev 161
Line 1967... Line 1967...
 
 
/* Allocate space in .plt, .got and associated reloc sections for
/* Allocate space in .plt, .got and associated reloc sections for
   dynamic relocs.  */
   dynamic relocs.  */
 
 
static bfd_boolean
static bfd_boolean
allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
{
  struct bfd_link_info *info;
  struct bfd_link_info *info;
  struct tilepro_elf_link_hash_table *htab;
  struct tilepro_elf_link_hash_table *htab;
  struct tilepro_elf_link_hash_entry *eh;
  struct tilepro_elf_link_hash_entry *eh;
  struct tilepro_elf_dyn_relocs *p;
  struct tilepro_elf_dyn_relocs *p;
 
 
  if (h->root.type == bfd_link_hash_indirect)
  if (h->root.type == bfd_link_hash_indirect)
    return TRUE;
    return TRUE;
 
 
  if (h->root.type == bfd_link_hash_warning)
 
    /* When warning symbols are created, they **replace** the "real"
 
       entry in the hash table, thus we never get to see the real
 
       symbol in a hash traversal.  So look at it now.  */
 
    h = (struct elf_link_hash_entry *) h->root.u.i.link;
 
 
 
  info = (struct bfd_link_info *) inf;
  info = (struct bfd_link_info *) inf;
  htab = tilepro_elf_hash_table (info);
  htab = tilepro_elf_hash_table (info);
  BFD_ASSERT (htab != NULL);
  BFD_ASSERT (htab != NULL);
 
 
  if (htab->elf.dynamic_sections_created
  if (htab->elf.dynamic_sections_created
Line 2168... Line 2162...
}
}
 
 
/* Find any dynamic relocs that apply to read-only sections.  */
/* Find any dynamic relocs that apply to read-only sections.  */
 
 
static bfd_boolean
static bfd_boolean
readonly_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
{
  struct tilepro_elf_link_hash_entry *eh;
  struct tilepro_elf_link_hash_entry *eh;
  struct tilepro_elf_dyn_relocs *p;
  struct tilepro_elf_dyn_relocs *p;
 
 
  if (h->root.type == bfd_link_hash_warning)
 
    h = (struct elf_link_hash_entry *) h->root.u.i.link;
 
 
 
  eh = (struct tilepro_elf_link_hash_entry *) h;
  eh = (struct tilepro_elf_link_hash_entry *) h;
  for (p = eh->dyn_relocs; p != NULL; p = p->next)
  for (p = eh->dyn_relocs; p != NULL; p = p->next)
    {
    {
      asection *s = p->sec->output_section;
      asection *s = p->sec->output_section;
 
 
Line 2311... Line 2302...
        }
        }
    }
    }
 
 
  /* Allocate global sym .plt and .got entries, and space for global
  /* Allocate global sym .plt and .got entries, and space for global
     sym dynamic relocs.  */
     sym dynamic relocs.  */
  elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
  elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, info);
 
 
  if (elf_hash_table (info)->dynamic_sections_created)
  if (elf_hash_table (info)->dynamic_sections_created)
    {
    {
      /* If the .got section is more than 0x8000 bytes, we add
      /* If the .got section is more than 0x8000 bytes, we add
         0x8000 to the value of _GLOBAL_OFFSET_TABLE_, so that 16
         0x8000 to the value of _GLOBAL_OFFSET_TABLE_, so that 16
Line 2434... Line 2425...
        return FALSE;
        return FALSE;
 
 
      /* If any dynamic relocs apply to a read-only section,
      /* If any dynamic relocs apply to a read-only section,
         then we need a DT_TEXTREL entry.  */
         then we need a DT_TEXTREL entry.  */
      if ((info->flags & DF_TEXTREL) == 0)
      if ((info->flags & DF_TEXTREL) == 0)
        elf_link_hash_traverse (&htab->elf, readonly_dynrelocs,
        elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, info);
                                (PTR) info);
 
 
 
      if (info->flags & DF_TEXTREL)
      if (info->flags & DF_TEXTREL)
        {
        {
          if (!add_dynamic_entry (DT_TEXTREL, 0))
          if (!add_dynamic_entry (DT_TEXTREL, 0))
            return FALSE;
            return FALSE;

powered by: WebSVN 2.1.0

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