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

Subversion Repositories open8_urisc

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

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

Rev 14 Rev 148
Line 1... Line 1...
/* BFD back-end for HP PA-RISC ELF files.
/* BFD back-end for HP PA-RISC ELF files.
   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
 
 
   Original code by
   Original code by
        Center for Software Science
        Center for Software Science
        Department of Computer Science
        Department of Computer Science
Line 1936... Line 1936...
  asection *sec;
  asection *sec;
 
 
  if (eh->root.type == bfd_link_hash_indirect)
  if (eh->root.type == bfd_link_hash_indirect)
    return TRUE;
    return TRUE;
 
 
  if (eh->root.type == bfd_link_hash_warning)
 
    eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
 
 
 
  info = (struct bfd_link_info *) inf;
  info = (struct bfd_link_info *) inf;
  hh = hppa_elf_hash_entry (eh);
  hh = hppa_elf_hash_entry (eh);
  htab = hppa_link_hash_table (info);
  htab = hppa_link_hash_table (info);
  if (htab == NULL)
  if (htab == NULL)
    return FALSE;
    return FALSE;
Line 2006... Line 2003...
  struct elf32_hppa_dyn_reloc_entry *hdh_p;
  struct elf32_hppa_dyn_reloc_entry *hdh_p;
 
 
  if (eh->root.type == bfd_link_hash_indirect)
  if (eh->root.type == bfd_link_hash_indirect)
    return TRUE;
    return TRUE;
 
 
  if (eh->root.type == bfd_link_hash_warning)
 
    eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
 
 
 
  info = inf;
  info = inf;
  htab = hppa_link_hash_table (info);
  htab = hppa_link_hash_table (info);
  if (htab == NULL)
  if (htab == NULL)
    return FALSE;
    return FALSE;
 
 
Line 2168... Line 2162...
 
 
static bfd_boolean
static bfd_boolean
clobber_millicode_symbols (struct elf_link_hash_entry *eh,
clobber_millicode_symbols (struct elf_link_hash_entry *eh,
                           struct bfd_link_info *info)
                           struct bfd_link_info *info)
{
{
  if (eh->root.type == bfd_link_hash_warning)
 
    eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
 
 
 
  if (eh->type == STT_PARISC_MILLI
  if (eh->type == STT_PARISC_MILLI
      && !eh->forced_local)
      && !eh->forced_local)
    {
    {
      elf32_hppa_hide_symbol (info, eh, TRUE);
      elf32_hppa_hide_symbol (info, eh, TRUE);
    }
    }
Line 2187... Line 2178...
readonly_dynrelocs (struct elf_link_hash_entry *eh, void *inf)
readonly_dynrelocs (struct elf_link_hash_entry *eh, void *inf)
{
{
  struct elf32_hppa_link_hash_entry *hh;
  struct elf32_hppa_link_hash_entry *hh;
  struct elf32_hppa_dyn_reloc_entry *hdh_p;
  struct elf32_hppa_dyn_reloc_entry *hdh_p;
 
 
  if (eh->root.type == bfd_link_hash_warning)
 
    eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
 
 
 
  hh = hppa_elf_hash_entry (eh);
  hh = hppa_elf_hash_entry (eh);
  for (hdh_p = hh->dyn_relocs; hdh_p != NULL; hdh_p = hdh_p->hdh_next)
  for (hdh_p = hh->dyn_relocs; hdh_p != NULL; hdh_p = hdh_p->hdh_next)
    {
    {
      asection *sec = hdh_p->sec->output_section;
      asection *sec = hdh_p->sec->output_section;
 
 
Line 4496... Line 4484...
                                    struct bfd_link_info *info)
                                    struct bfd_link_info *info)
{
{
  bfd *dynobj;
  bfd *dynobj;
  struct elf32_hppa_link_hash_table *htab;
  struct elf32_hppa_link_hash_table *htab;
  asection *sdyn;
  asection *sdyn;
 
  asection * sgot;
 
 
  htab = hppa_link_hash_table (info);
  htab = hppa_link_hash_table (info);
  if (htab == NULL)
  if (htab == NULL)
    return FALSE;
    return FALSE;
 
 
  dynobj = htab->etab.dynobj;
  dynobj = htab->etab.dynobj;
 
 
 
  sgot = htab->sgot;
 
  /* A broken linker script might have discarded the dynamic sections.
 
     Catch this here so that we do not seg-fault later on.  */
 
  if (sgot != NULL && bfd_is_abs_section (sgot->output_section))
 
    return FALSE;
 
 
  sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
  sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
 
 
  if (htab->etab.dynamic_sections_created)
  if (htab->etab.dynamic_sections_created)
    {
    {
      Elf32_External_Dyn *dyncon, *dynconend;
      Elf32_External_Dyn *dyncon, *dynconend;
Line 4567... Line 4562...
 
 
          bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
          bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
        }
        }
    }
    }
 
 
  if (htab->sgot != NULL && htab->sgot->size != 0)
  if (sgot != NULL && sgot->size != 0)
    {
    {
      /* Fill in the first entry in the global offset table.
      /* Fill in the first entry in the global offset table.
         We use it to point to our dynamic section, if we have one.  */
         We use it to point to our dynamic section, if we have one.  */
      bfd_put_32 (output_bfd,
      bfd_put_32 (output_bfd,
                  sdyn ? sdyn->output_section->vma + sdyn->output_offset : 0,
                  sdyn ? sdyn->output_section->vma + sdyn->output_offset : 0,
                  htab->sgot->contents);
                  sgot->contents);
 
 
      /* The second entry is reserved for use by the dynamic linker.  */
      /* The second entry is reserved for use by the dynamic linker.  */
      memset (htab->sgot->contents + GOT_ENTRY_SIZE, 0, GOT_ENTRY_SIZE);
      memset (sgot->contents + GOT_ENTRY_SIZE, 0, GOT_ENTRY_SIZE);
 
 
      /* Set .got entry size.  */
      /* Set .got entry size.  */
      elf_section_data (htab->sgot->output_section)
      elf_section_data (sgot->output_section)
        ->this_hdr.sh_entsize = GOT_ENTRY_SIZE;
        ->this_hdr.sh_entsize = GOT_ENTRY_SIZE;
    }
    }
 
 
  if (htab->splt != NULL && htab->splt->size != 0)
  if (htab->splt != NULL && htab->splt->size != 0)
    {
    {
Line 4599... Line 4594...
                  plt_stub, sizeof (plt_stub));
                  plt_stub, sizeof (plt_stub));
 
 
          if ((htab->splt->output_offset
          if ((htab->splt->output_offset
               + htab->splt->output_section->vma
               + htab->splt->output_section->vma
               + htab->splt->size)
               + htab->splt->size)
              != (htab->sgot->output_offset
              != (sgot->output_offset
                  + htab->sgot->output_section->vma))
                  + sgot->output_section->vma))
            {
            {
              (*_bfd_error_handler)
              (*_bfd_error_handler)
                (_(".got section not immediately after .plt section"));
                (_(".got section not immediately after .plt section"));
              return FALSE;
              return FALSE;
            }
            }

powered by: WebSVN 2.1.0

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