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

Subversion Repositories open8_urisc

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

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

Rev 165 Rev 166
Line 476... Line 476...
  bfd_reloc_status_type r = bfd_reloc_ok;
  bfd_reloc_status_type r = bfd_reloc_ok;
  bfd_vma               x;
  bfd_vma               x;
  bfd_signed_vma        srel;
  bfd_signed_vma        srel;
  bfd_signed_vma        reloc_addr;
  bfd_signed_vma        reloc_addr;
 
 
  /* Absolute addr of the reloc in the final excecutable.  */
  /* Absolute addr of the reloc in the final executable.  */
  reloc_addr = rel->r_offset + input_section->output_section->vma
  reloc_addr = rel->r_offset + input_section->output_section->vma
    + input_section->output_offset;
    + input_section->output_offset;
 
 
  switch (howto->type)
  switch (howto->type)
    {
    {
    case R_OPEN8_PCREL:
    case R_OPEN8_PCREL:
      contents += rel->r_offset;
      contents += rel->r_offset;
      srel = rel->r_addend - reloc_addr;
      srel = rel->r_addend - (reloc_addr + 1);
 
 
      if (srel > ((1 << 8) - 1) || (srel < - (1 << 7)))
      if ((srel > 127) || (srel < -128))
        return bfd_reloc_overflow;
        return bfd_reloc_overflow;
      x = bfd_get_16 (input_bfd, contents);
      x = bfd_get_16 (input_bfd, contents);
      x = (x & 0xff00) | (srel & 0xff);
      x = (x & 0xff00) | (srel & 0xff);
      bfd_put_16 (input_bfd, x, contents);
      bfd_put_16 (input_bfd, x, contents);
      break;
      break;

powered by: WebSVN 2.1.0

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