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

Subversion Repositories openrisc_me

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

Show entire file | Details | Blame | View Log

Rev 157 Rev 225
Line 1... Line 1...
/* MMIX-specific support for 64-bit ELF.
/* MMIX-specific support for 64-bit ELF.
   Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007
   Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
   Contributed by Hans-Peter Nilsson <hp@bitrange.com>
   Contributed by Hans-Peter Nilsson <hp@bitrange.com>
 
 
   This file is part of BFD, the Binary File Descriptor library.
   This file is part of BFD, the Binary File Descriptor library.
 
 
Line 157... Line 157...
    /* An array of all relocations, with the "value" member filled in by
    /* An array of all relocations, with the "value" member filled in by
       the relaxation function.  */
       the relaxation function.  */
    struct bpo_reloc_request *reloc_request;
    struct bpo_reloc_request *reloc_request;
  };
  };
 
 
static bfd_boolean mmix_elf_link_output_symbol_hook
static int mmix_elf_link_output_symbol_hook
  PARAMS ((struct bfd_link_info *, const char *, Elf_Internal_Sym *,
  PARAMS ((struct bfd_link_info *, const char *, Elf_Internal_Sym *,
           asection *, struct elf_link_hash_entry *));
           asection *, struct elf_link_hash_entry *));
 
 
static bfd_reloc_status_type mmix_elf_reloc
static bfd_reloc_status_type mmix_elf_reloc
  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
Line 2080... Line 2080...


/* Change symbols relative to the reg contents section to instead be to
/* Change symbols relative to the reg contents section to instead be to
   the register section, and scale them down to correspond to the register
   the register section, and scale them down to correspond to the register
   number.  */
   number.  */
 
 
static bfd_boolean
static int
mmix_elf_link_output_symbol_hook (info, name, sym, input_sec, h)
mmix_elf_link_output_symbol_hook (info, name, sym, input_sec, h)
     struct bfd_link_info *info ATTRIBUTE_UNUSED;
     struct bfd_link_info *info ATTRIBUTE_UNUSED;
     const char *name ATTRIBUTE_UNUSED;
     const char *name ATTRIBUTE_UNUSED;
     Elf_Internal_Sym *sym;
     Elf_Internal_Sym *sym;
     asection *input_sec;
     asection *input_sec;
Line 2097... Line 2097...
    {
    {
      sym->st_value /= 8;
      sym->st_value /= 8;
      sym->st_shndx = SHN_REGISTER;
      sym->st_shndx = SHN_REGISTER;
    }
    }
 
 
  return TRUE;
  return 1;
}
}
 
 
/* We fake a register section that holds values that are register numbers.
/* We fake a register section that holds values that are register numbers.
   Having a SHN_REGISTER and register section translates better to other
   Having a SHN_REGISTER and register section translates better to other
   formats (e.g. mmo) than for example a STT_REGISTER attribute.
   formats (e.g. mmo) than for example a STT_REGISTER attribute.
Line 2555... Line 2555...
 
 
/* This links all R_MMIX_BASE_PLUS_OFFSET relocs into a special array, and
/* This links all R_MMIX_BASE_PLUS_OFFSET relocs into a special array, and
   when the last such reloc is done, an index-array is sorted according to
   when the last such reloc is done, an index-array is sorted according to
   the values and iterated over to produce register numbers (indexed by 0
   the values and iterated over to produce register numbers (indexed by 0
   from the first allocated register number) and offsets for use in real
   from the first allocated register number) and offsets for use in real
   relocation.
   relocation.  (N.B.: Relocatable runs are handled, not just punted.)
 
 
   PUSHJ stub accounting is also done here.
   PUSHJ stub accounting is also done here.
 
 
   Symbol- and reloc-reading infrastructure copied from elf-m10200.c.  */
   Symbol- and reloc-reading infrastructure copied from elf-m10200.c.  */
 
 

powered by: WebSVN 2.1.0

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