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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [bfd/] [elf64-alpha.c] - Diff between revs 157 and 225

Show entire file | Details | Blame | View Log

Rev 157 Rev 225
Line 1746... Line 1746...
elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info,
elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info,
                          asection *sec, const Elf_Internal_Rela *relocs)
                          asection *sec, const Elf_Internal_Rela *relocs)
{
{
  bfd *dynobj;
  bfd *dynobj;
  asection *sreloc;
  asection *sreloc;
  const char *rel_sec_name;
 
  Elf_Internal_Shdr *symtab_hdr;
  Elf_Internal_Shdr *symtab_hdr;
  struct alpha_elf_link_hash_entry **sym_hashes;
  struct alpha_elf_link_hash_entry **sym_hashes;
  const Elf_Internal_Rela *rel, *relend;
  const Elf_Internal_Rela *rel, *relend;
  bfd_size_type amt;
  bfd_size_type amt;
 
 
Line 1771... Line 1770...
  dynobj = elf_hash_table (info)->dynobj;
  dynobj = elf_hash_table (info)->dynobj;
  if (dynobj == NULL)
  if (dynobj == NULL)
    elf_hash_table (info)->dynobj = dynobj = abfd;
    elf_hash_table (info)->dynobj = dynobj = abfd;
 
 
  sreloc = NULL;
  sreloc = NULL;
  rel_sec_name = NULL;
 
  symtab_hdr = &elf_symtab_hdr (abfd);
  symtab_hdr = &elf_symtab_hdr (abfd);
  sym_hashes = alpha_elf_sym_hashes (abfd);
  sym_hashes = alpha_elf_sym_hashes (abfd);
 
 
  relend = relocs + sec->reloc_count;
  relend = relocs + sec->reloc_count;
  for (rel = relocs; rel < relend; ++rel)
  for (rel = relocs; rel < relend; ++rel)
Line 1921... Line 1919...
            }
            }
        }
        }
 
 
      if (need & NEED_DYNREL)
      if (need & NEED_DYNREL)
        {
        {
          if (rel_sec_name == NULL)
 
            {
 
              rel_sec_name = (bfd_elf_string_from_elf_section
 
                              (abfd, elf_elfheader(abfd)->e_shstrndx,
 
                               elf_section_data(sec)->rel_hdr.sh_name));
 
              if (rel_sec_name == NULL)
 
                return FALSE;
 
 
 
              BFD_ASSERT (CONST_STRNEQ (rel_sec_name, ".rela")
 
                          && strcmp (bfd_get_section_name (abfd, sec),
 
                                     rel_sec_name+5) == 0);
 
            }
 
 
 
          /* We need to create the section here now whether we eventually
          /* We need to create the section here now whether we eventually
             use it or not so that it gets mapped to an output section by
             use it or not so that it gets mapped to an output section by
             the linker.  If not used, we'll kill it in
             the linker.  If not used, we'll kill it in size_dynamic_sections.  */
             size_dynamic_sections.  */
 
          if (sreloc == NULL)
          if (sreloc == NULL)
            {
            {
              sreloc = bfd_get_section_by_name (dynobj, rel_sec_name);
              sreloc = _bfd_elf_make_dynamic_reloc_section
              if (sreloc == NULL)
                (sec, dynobj, 3, abfd, /*rela?*/ TRUE);
                {
 
                  flagword flags;
 
 
 
                  flags = (SEC_HAS_CONTENTS | SEC_IN_MEMORY
              if (sreloc == NULL)
                           | SEC_LINKER_CREATED | SEC_READONLY);
 
                  if (sec->flags & SEC_ALLOC)
 
                    flags |= SEC_ALLOC | SEC_LOAD;
 
                  sreloc = bfd_make_section_with_flags (dynobj,
 
                                                        rel_sec_name,
 
                                                        flags);
 
                  if (sreloc == NULL
 
                      || !bfd_set_section_alignment (dynobj, sreloc, 3))
 
                    return FALSE;
                    return FALSE;
                }
                }
            }
 
 
 
          if (h)
          if (h)
            {
            {
              /* Since we havn't seen all of the input symbols yet, we
              /* Since we havn't seen all of the input symbols yet, we
                 don't know whether we'll actually need a dynamic relocation
                 don't know whether we'll actually need a dynamic relocation

powered by: WebSVN 2.1.0

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