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

Subversion Repositories openrisc_me

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

Show entire file | Details | Blame | View Log

Rev 157 Rev 225
Line 1... Line 1...
/* i370-specific support for 32-bit ELF
/* i370-specific support for 32-bit ELF
   Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
   Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
   2005, 2006, 2007 Free Software Foundation, Inc.
   2005, 2006, 2007, 2008  Free Software Foundation, Inc.
   Written by Ian Lance Taylor, Cygnus Support.
   Written by Ian Lance Taylor, Cygnus Support.
   Hacked by Linas Vepstas for i370 linas@linas.org
   Hacked by Linas Vepstas for i370 linas@linas.org
 
 
   This file is part of BFD, the Binary File Descriptor library.
   This file is part of BFD, the Binary File Descriptor library.
 
 
Line 850... Line 850...
                   (h && h->root.root.string)
                   (h && h->root.root.string)
                   ? h->root.root.string : "<unknown>");
                   ? h->root.root.string : "<unknown>");
#endif
#endif
          if (sreloc == NULL)
          if (sreloc == NULL)
            {
            {
              const char *name;
              sreloc = _bfd_elf_make_dynamic_reloc_section
 
                (sec, dynobj, 2, abfd, /*rela?*/ TRUE);
              name = (bfd_elf_string_from_elf_section
 
                      (abfd,
 
                       elf_elfheader (abfd)->e_shstrndx,
 
                       elf_section_data (sec)->rel_hdr.sh_name));
 
              if (name == NULL)
 
                return FALSE;
 
 
 
              BFD_ASSERT (CONST_STRNEQ (name, ".rela")
 
                          && strcmp (bfd_get_section_name (abfd, sec), name + 5) == 0);
 
 
 
              sreloc = bfd_get_section_by_name (dynobj, name);
 
              if (sreloc == NULL)
              if (sreloc == NULL)
                {
 
                  flagword flags;
 
 
 
                  flags = (SEC_HAS_CONTENTS | SEC_READONLY
 
                           | SEC_IN_MEMORY | SEC_LINKER_CREATED);
 
                  if ((sec->flags & SEC_ALLOC) != 0)
 
                    flags |= SEC_ALLOC | SEC_LOAD;
 
                  sreloc = bfd_make_section_with_flags (dynobj, name,
 
                                                        flags);
 
                  if (sreloc == NULL
 
                      || ! bfd_set_section_alignment (dynobj, sreloc, 2))
 
                    return FALSE;
                    return FALSE;
                }
                }
            }
 
 
 
          sreloc->size += sizeof (Elf32_External_Rela);
          sreloc->size += sizeof (Elf32_External_Rela);
 
 
          /* FIXME: We should here do what the m68k and i386
          /* FIXME: We should here do what the m68k and i386
             backends do: if the reloc is pc-relative, record it
             backends do: if the reloc is pc-relative, record it
Line 1062... Line 1040...
                           Elf_Internal_Sym *local_syms,
                           Elf_Internal_Sym *local_syms,
                           asection **local_sections)
                           asection **local_sections)
{
{
  Elf_Internal_Shdr *symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
  Elf_Internal_Shdr *symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
  struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
  struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
  bfd *dynobj = elf_hash_table (info)->dynobj;
 
  Elf_Internal_Rela *rel = relocs;
  Elf_Internal_Rela *rel = relocs;
  Elf_Internal_Rela *relend = relocs + input_section->reloc_count;
  Elf_Internal_Rela *relend = relocs + input_section->reloc_count;
  asection *sreloc = NULL;
  asection *sreloc = NULL;
  bfd_vma *local_got_offsets;
  bfd_vma *local_got_offsets;
  bfd_boolean ret = TRUE;
  bfd_boolean ret = TRUE;
Line 1230... Line 1207...
                 are copied into the output file to be resolved at run
                 are copied into the output file to be resolved at run
                 time.  */
                 time.  */
 
 
              if (sreloc == NULL)
              if (sreloc == NULL)
                {
                {
                  const char *name;
                  sreloc = _bfd_elf_get_dynamic_reloc_section
 
                    (input_bfd, input_section, /*rela?*/ TRUE);
                  name = (bfd_elf_string_from_elf_section
                  if (sreloc == NULL)
                          (input_bfd,
 
                           elf_elfheader (input_bfd)->e_shstrndx,
 
                           elf_section_data (input_section)->rel_hdr.sh_name));
 
                  if (name == NULL)
 
                    return FALSE;
                    return FALSE;
 
 
                  BFD_ASSERT (CONST_STRNEQ (name, ".rela")
 
                              && strcmp (bfd_get_section_name (input_bfd,
 
                                                               input_section),
 
                                         name + 5) == 0);
 
 
 
                  sreloc = bfd_get_section_by_name (dynobj, name);
 
                  BFD_ASSERT (sreloc != NULL);
 
                }
                }
 
 
              skip = 0;
              skip = 0;
 
 
              outrel.r_offset =
              outrel.r_offset =

powered by: WebSVN 2.1.0

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