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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [bfd/] [elf32-sh.c] - Diff between revs 163 and 166

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

Rev 163 Rev 166
Line 1... Line 1...
/* Renesas / SuperH SH specific support for 32-bit ELF
/* Renesas / SuperH SH specific support for 32-bit ELF
   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
   2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
   2006, 2007, 2008, 2009, 2010, 2011, 2012
 
   Free Software Foundation, Inc.
   Contributed by Ian Lance Taylor, Cygnus Support.
   Contributed by Ian Lance Taylor, Cygnus Support.
 
 
   This file is part of BFD, the Binary File Descriptor library.
   This file is part of BFD, the Binary File Descriptor library.
 
 
   This program is free software; you can redistribute it and/or modify
   This program is free software; you can redistribute it and/or modify
Line 3786... Line 3787...
   located.  */
   located.  */
 
 
static unsigned
static unsigned
sh_elf_osec_to_segment (bfd *output_bfd, asection *osec)
sh_elf_osec_to_segment (bfd *output_bfd, asection *osec)
{
{
  Elf_Internal_Phdr *p = _bfd_elf_find_segment_containing_section (output_bfd,
  Elf_Internal_Phdr *p = NULL;
                                                                   osec);
 
 
  if (output_bfd->xvec->flavour == bfd_target_elf_flavour)
 
    p = _bfd_elf_find_segment_containing_section (output_bfd, osec);
 
 
  /* FIXME: Nothing ever says what this index is relative to.  The kernel
  /* FIXME: Nothing ever says what this index is relative to.  The kernel
     supplies data in terms of the number of load segments but this is
     supplies data in terms of the number of load segments but this is
     a phdr index and the first phdr may not be a load segment.  */
     a phdr index and the first phdr may not be a load segment.  */
  return (p != NULL) ? p - elf_tdata (output_bfd)->phdr : -1;
  return (p != NULL) ? p - elf_tdata (output_bfd)->phdr : -1;
Line 3800... Line 3803...
static bfd_boolean
static bfd_boolean
sh_elf_osec_readonly_p (bfd *output_bfd, asection *osec)
sh_elf_osec_readonly_p (bfd *output_bfd, asection *osec)
{
{
  unsigned seg = sh_elf_osec_to_segment (output_bfd, osec);
  unsigned seg = sh_elf_osec_to_segment (output_bfd, osec);
 
 
  return ! (elf_tdata (output_bfd)->phdr[seg].p_flags & PF_W);
  return (seg != (unsigned) -1
 
          && ! (elf_tdata (output_bfd)->phdr[seg].p_flags & PF_W));
}
}
 
 
/* Generate the initial contents of a local function descriptor, along
/* Generate the initial contents of a local function descriptor, along
   with any relocations or fixups required.  */
   with any relocations or fixups required.  */
static bfd_boolean
static bfd_boolean

powered by: WebSVN 2.1.0

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