OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

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

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

Rev 157 Rev 225
Line 1... Line 1...
/* Renesas / SuperH specific support for Symbian 32-bit ELF files
/* Renesas / SuperH specific support for Symbian 32-bit ELF files
   Copyright 2004, 2005, 2006, 2007
   Copyright 2004, 2005, 2006, 2007, 2008
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
   Contributed by Red Hat
   Contributed by Red Hat
 
 
   This file is part of BFD, the Binary File Descriptor library.
   This file is part of BFD, the Binary File Descriptor library.
 
 
Line 390... Line 390...
}
}
 
 
 
 
/* Scan a bfd for a .directive section, and if found process it.
/* Scan a bfd for a .directive section, and if found process it.
   Returns TRUE upon success, FALSE otherwise.  */
   Returns TRUE upon success, FALSE otherwise.  */
bfd_boolean bfd_elf32_sh_symbian_process_directives (struct bfd_link_info *info, bfd * abfd);
 
 
 
bfd_boolean
static bfd_boolean
bfd_elf32_sh_symbian_process_directives (struct bfd_link_info *info, bfd * abfd)
sh_symbian_process_directives (bfd *abfd, struct bfd_link_info *info)
{
{
  bfd_boolean result = FALSE;
  bfd_boolean result = FALSE;
  bfd_byte *  contents;
  bfd_byte *  contents;
  asection *  sec = bfd_get_section_by_name (abfd, ".directive");
  asection *  sec = bfd_get_section_by_name (abfd, ".directive");
  bfd_size_type sz;
  bfd_size_type sz;
Line 603... Line 602...
            if (h == ptr->current_hash)
            if (h == ptr->current_hash)
              {
              {
                BFD_ASSERT (ptr->new_symndx);
                BFD_ASSERT (ptr->new_symndx);
                if (SYMBIAN_DEBUG)
                if (SYMBIAN_DEBUG)
                  fprintf (stderr, "convert reloc %lx from using index %ld to using index %ld\n",
                  fprintf (stderr, "convert reloc %lx from using index %ld to using index %ld\n",
                           (long) rel->r_info, (long) ELF32_R_SYM (rel->r_info), ptr->new_symndx);
                           (unsigned long) rel->r_info,
 
                           (long) ELF32_R_SYM (rel->r_info), ptr->new_symndx);
                rel->r_info = ELF32_R_INFO (ptr->new_symndx, r_type);
                rel->r_info = ELF32_R_INFO (ptr->new_symndx, r_type);
                break;
                break;
              }
              }
        }
        }
    }
    }
 
 
  return sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
  return sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
                                  contents, relocs, local_syms, local_sections);
                                  contents, relocs, local_syms, local_sections);
}
}
 
 
static bfd_boolean
 
sh_symbian_check_directives (bfd *abfd, struct bfd_link_info *info)
 
{
 
  return bfd_elf32_sh_symbian_process_directives (info, abfd);
 
}
 
 
 
#define TARGET_LITTLE_SYM       bfd_elf32_shl_symbian_vec
#define TARGET_LITTLE_SYM       bfd_elf32_shl_symbian_vec
#define TARGET_LITTLE_NAME      "elf32-shl-symbian"
#define TARGET_LITTLE_NAME      "elf32-shl-symbian"
 
 
#undef  elf_backend_relocate_section
#undef  elf_backend_relocate_section
#define elf_backend_relocate_section    sh_symbian_relocate_section
#define elf_backend_relocate_section    sh_symbian_relocate_section
#undef  elf_backend_check_directives
#undef  elf_backend_check_directives
#define elf_backend_check_directives    sh_symbian_check_directives
#define elf_backend_check_directives    sh_symbian_process_directives
 
 
#include "elf32-target.h"
#include "elf32-target.h"
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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