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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [bfd/] [mach-o-x86-64.c] - Diff between revs 161 and 166

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

Rev 161 Rev 166
Line 222... Line 222...
{
{
  rinfo->r_address = rel->address;
  rinfo->r_address = rel->address;
  rinfo->r_scattered = 0;
  rinfo->r_scattered = 0;
  switch (rel->howto->type)
  switch (rel->howto->type)
    {
    {
 
    case BFD_RELOC_32:
 
      rinfo->r_type = BFD_MACH_O_X86_64_RELOC_UNSIGNED;
 
      rinfo->r_pcrel = 0;
 
      rinfo->r_length = 2;
 
      break;
    case BFD_RELOC_64:
    case BFD_RELOC_64:
      rinfo->r_type = BFD_MACH_O_X86_64_RELOC_UNSIGNED;
      rinfo->r_type = BFD_MACH_O_X86_64_RELOC_UNSIGNED;
      rinfo->r_pcrel = 0;
      rinfo->r_pcrel = 0;
      rinfo->r_length = 3;
      rinfo->r_length = 3;
      break;
      break;
    case BFD_RELOC_32_PCREL:
    case BFD_RELOC_32_PCREL:
 
      rinfo->r_type = BFD_MACH_O_X86_64_RELOC_SIGNED;
 
      rinfo->r_pcrel = 1;
 
      rinfo->r_length = 2;
 
      break;
 
    case BFD_RELOC_MACH_O_X86_64_PCREL32_1:
 
      rinfo->r_type = BFD_MACH_O_X86_64_RELOC_SIGNED_1;
 
      rinfo->r_pcrel = 1;
 
      rinfo->r_length = 2;
 
      break;
 
    case BFD_RELOC_MACH_O_X86_64_PCREL32_2:
 
      rinfo->r_type = BFD_MACH_O_X86_64_RELOC_SIGNED_2;
 
      rinfo->r_pcrel = 1;
 
      rinfo->r_length = 2;
 
      break;
 
    case BFD_RELOC_MACH_O_X86_64_PCREL32_4:
 
      rinfo->r_type = BFD_MACH_O_X86_64_RELOC_SIGNED_4;
 
      rinfo->r_pcrel = 1;
 
      rinfo->r_length = 2;
 
      break;
 
    case BFD_RELOC_MACH_O_X86_64_BRANCH32:
      rinfo->r_type = BFD_MACH_O_X86_64_RELOC_BRANCH;
      rinfo->r_type = BFD_MACH_O_X86_64_RELOC_BRANCH;
      rinfo->r_pcrel = 1;
      rinfo->r_pcrel = 1;
      rinfo->r_length = 2;
      rinfo->r_length = 2;
      break;
      break;
 
    case BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32:
 
      rinfo->r_type = BFD_MACH_O_X86_64_RELOC_SUBTRACTOR;
 
      rinfo->r_pcrel = 0;
 
      rinfo->r_length = 2;
 
      break;
    case BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64:
    case BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64:
      rinfo->r_type = BFD_MACH_O_X86_64_RELOC_SUBTRACTOR;
      rinfo->r_type = BFD_MACH_O_X86_64_RELOC_SUBTRACTOR;
      rinfo->r_pcrel = 0;
      rinfo->r_pcrel = 0;
      rinfo->r_length = 3;
      rinfo->r_length = 3;
      break;
      break;
 
    case BFD_RELOC_MACH_O_X86_64_GOT:
 
      rinfo->r_type = BFD_MACH_O_X86_64_RELOC_GOT;
 
      rinfo->r_pcrel = 1;
 
      rinfo->r_length = 2;
 
      break;
    case BFD_RELOC_MACH_O_X86_64_GOT_LOAD:
    case BFD_RELOC_MACH_O_X86_64_GOT_LOAD:
      rinfo->r_type = BFD_MACH_O_X86_64_RELOC_GOT_LOAD;
      rinfo->r_type = BFD_MACH_O_X86_64_RELOC_GOT_LOAD;
      rinfo->r_pcrel = 1;
      rinfo->r_pcrel = 1;
      rinfo->r_length = 2;
      rinfo->r_length = 2;
      break;
      break;
Line 279... Line 314...
                                         const char *name ATTRIBUTE_UNUSED)
                                         const char *name ATTRIBUTE_UNUSED)
{
{
  return NULL;
  return NULL;
}
}
 
 
 
static bfd_boolean
 
bfd_mach_o_section_type_valid_for_x86_64 (unsigned long val)
 
{
 
  if (val == BFD_MACH_O_S_NON_LAZY_SYMBOL_POINTERS
 
      || val == BFD_MACH_O_S_LAZY_SYMBOL_POINTERS
 
      || val == BFD_MACH_O_S_SYMBOL_STUBS)
 
    return FALSE;
 
  return TRUE;
 
}
 
 
 
/* We want to bump the alignment of some sections.  */
 
static const mach_o_section_name_xlat text_section_names_xlat[] =
 
  {
 
    {   ".eh_frame",                            "__eh_frame",
 
        SEC_READONLY | SEC_DATA | SEC_LOAD,     BFD_MACH_O_S_COALESCED,
 
        BFD_MACH_O_S_ATTR_LIVE_SUPPORT
 
        | BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS
 
        | BFD_MACH_O_S_ATTR_NO_TOC,             3},
 
    { NULL, NULL, 0, 0, 0, 0}
 
  };
 
 
 
const mach_o_segment_name_xlat mach_o_x86_64_segsec_names_xlat[] =
 
  {
 
    { "__TEXT", text_section_names_xlat },
 
    { NULL, NULL }
 
  };
 
 
#define bfd_mach_o_swap_reloc_in bfd_mach_o_x86_64_swap_reloc_in
#define bfd_mach_o_swap_reloc_in bfd_mach_o_x86_64_swap_reloc_in
#define bfd_mach_o_swap_reloc_out bfd_mach_o_x86_64_swap_reloc_out
#define bfd_mach_o_swap_reloc_out bfd_mach_o_x86_64_swap_reloc_out
 
 
#define bfd_mach_o_bfd_reloc_type_lookup bfd_mach_o_x86_64_bfd_reloc_type_lookup
#define bfd_mach_o_bfd_reloc_type_lookup bfd_mach_o_x86_64_bfd_reloc_type_lookup
#define bfd_mach_o_bfd_reloc_name_lookup bfd_mach_o_x86_64_bfd_reloc_name_lookup
#define bfd_mach_o_bfd_reloc_name_lookup bfd_mach_o_x86_64_bfd_reloc_name_lookup
#define bfd_mach_o_print_thread NULL
#define bfd_mach_o_print_thread NULL
 
#define bfd_mach_o_tgt_seg_table mach_o_x86_64_segsec_names_xlat
 
#define bfd_mach_o_section_type_valid_for_tgt bfd_mach_o_section_type_valid_for_x86_64
 
 
#define TARGET_NAME             mach_o_x86_64_vec
#define TARGET_NAME             mach_o_x86_64_vec
#define TARGET_STRING           "mach-o-x86-64"
#define TARGET_STRING           "mach-o-x86-64"
#define TARGET_ARCHITECTURE     bfd_arch_i386
#define TARGET_ARCHITECTURE     bfd_arch_i386
#define TARGET_BIG_ENDIAN       0
#define TARGET_BIG_ENDIAN       0
#define TARGET_ARCHIVE          0
#define TARGET_ARCHIVE          0
 
#define TARGET_PRIORITY         0
#include "mach-o-target.c"
#include "mach-o-target.c"
 
 
 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.