Automatic date update in version.in
[platform/upstream/binutils.git] / bfd / mach-o-i386.c
index e7688ab..a7d3a11 100644 (file)
@@ -1,6 +1,5 @@
 /* Intel i386 Mach-O support for BFD.
-   Copyright 2009
-   Free Software Foundation, Inc.
+   Copyright (C) 2009-2014 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -211,7 +210,8 @@ bfd_mach_o_i386_swap_reloc_out (arelent *rel, bfd_mach_o_reloc_info *rinfo)
       if ((*rel->sym_ptr_ptr)->flags & BSF_SECTION_SYM)
         {
           rinfo->r_extern = 0;
-          rinfo->r_value = (*rel->sym_ptr_ptr)->section->target_index;
+          rinfo->r_value =
+           (*rel->sym_ptr_ptr)->section->output_section->target_index;
         }
       else
         {
@@ -367,7 +367,7 @@ static const mach_o_section_name_xlat import_section_names_xlat[] =
   {
     {  ".picsymbol_stub3",             "__jump_table",
        SEC_CODE | SEC_LOAD,            BFD_MACH_O_S_SYMBOL_STUBS,
-       BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS 
+       BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS
        | BFD_MACH_O_S_SELF_MODIFYING_CODE,
                                        6},
     {  ".non_lazy_symbol_pointer_x86", "__pointers",
@@ -391,12 +391,13 @@ const mach_o_segment_name_xlat mach_o_i386_segsec_names_xlat[] =
 #define bfd_mach_o_tgt_seg_table mach_o_i386_segsec_names_xlat
 #define bfd_mach_o_section_type_valid_for_tgt NULL
 
-#define bfd_mach_o_bfd_reloc_type_lookup bfd_mach_o_i386_bfd_reloc_type_lookup 
+#define bfd_mach_o_bfd_reloc_type_lookup bfd_mach_o_i386_bfd_reloc_type_lookup
 #define bfd_mach_o_bfd_reloc_name_lookup bfd_mach_o_i386_bfd_reloc_name_lookup
 
-#define TARGET_NAME            mach_o_i386_vec
+#define TARGET_NAME            i386_mach_o_vec
 #define TARGET_STRING          "mach-o-i386"
 #define TARGET_ARCHITECTURE    bfd_arch_i386
+#define TARGET_PAGESIZE                4096
 #define TARGET_BIG_ENDIAN      0
 #define TARGET_ARCHIVE                 0
 #define TARGET_PRIORITY                0