daily update
[deliverable/binutils-gdb.git] / bfd / elfxx-ia64.c
index e35fcbf8fe580871be1b452354d9387d0f892b45..c8588b97511f93600fb06da8387995269277aa39 100644 (file)
   MIN_PLT      Created by PLTOFF entries against dynamic symbols.  This
                does not require dynamic relocations.  */
 
+/* Only add code for vms when the vms target is enabled.  This is required
+   because it depends on vms-lib.c for its archive format and we don't want
+   to compile that code if it is not used.  */
+#if ARCH_SIZE == 64 && \
+  (defined (HAVE_bfd_elf64_ia64_vms_vec) || defined (HAVE_all_vecs))
+#define INCLUDE_IA64_VMS
+#endif
+
+
 #define NELEMS(a)      ((int) (sizeof (a) / sizeof ((a)[0])))
 
 typedef struct bfd_hash_entry *(*new_hash_entry_func)
@@ -755,8 +764,8 @@ elfNN_ia64_relax_brl (bfd_byte *contents, bfd_vma off)
 
 /* Rename some of the generic section flags to better document how they
    are used here.  */
-#define skip_relax_pass_0 need_finalize_relax
-#define skip_relax_pass_1 has_gp_reloc
+#define skip_relax_pass_0 sec_flg0
+#define skip_relax_pass_1 sec_flg1
 
 \f
 /* These functions do relaxation for IA-64 ELF.  */
@@ -1400,8 +1409,6 @@ elfNN_ia64_section_from_shdr (bfd *abfd,
                              const char *name,
                              int shindex)
 {
-  asection *newsect;
-
   /* There ought to be a place to keep ELF backend specific flags, but
      at the moment there isn't one.  We just keep track of the
      sections by their name, instead.  Fortunately, the ABI gives
@@ -1424,7 +1431,6 @@ elfNN_ia64_section_from_shdr (bfd *abfd,
 
   if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
     return FALSE;
-  newsect = hdr->bfd_section;
 
   return TRUE;
 }
@@ -5723,14 +5729,14 @@ elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
     }
 }
 
+#ifdef INCLUDE_IA64_VMS
+
 static bfd_boolean
 elfNN_vms_section_from_shdr (bfd *abfd,
                             Elf_Internal_Shdr *hdr,
                             const char *name,
                             int shindex)
 {
-  asection *newsect;
-
   switch (hdr->sh_type)
     {
     case SHT_IA_64_VMS_TRACE:
@@ -5744,7 +5750,6 @@ elfNN_vms_section_from_shdr (bfd *abfd,
 
   if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
     return FALSE;
-  newsect = hdr->bfd_section;
 
   return TRUE;
 }
@@ -5984,12 +5989,14 @@ elfNN_vms_close_and_cleanup (bfd *abfd)
 
   return _bfd_generic_close_and_cleanup (abfd);
 }
+#endif /* INCLUDE_IA64_VMS */
 \f
 #define TARGET_LITTLE_SYM              bfd_elfNN_ia64_little_vec
 #define TARGET_LITTLE_NAME             "elfNN-ia64-little"
 #define TARGET_BIG_SYM                 bfd_elfNN_ia64_big_vec
 #define TARGET_BIG_NAME                        "elfNN-ia64-big"
 #define ELF_ARCH                       bfd_arch_ia64
+#define ELF_TARGET_ID                  IA64_ELF_DATA
 #define ELF_MACHINE_CODE               EM_IA_64
 #define ELF_MACHINE_ALT1               1999    /* EAS2.3 */
 #define ELF_MACHINE_ALT2               1998    /* EAS2.2 */
@@ -6117,6 +6124,7 @@ elfNN_vms_close_and_cleanup (bfd *abfd)
 #include "elfNN-target.h"
 
 /* VMS-specific vectors.  */
+#ifdef INCLUDE_IA64_VMS
 
 #undef  TARGET_LITTLE_SYM
 #define TARGET_LITTLE_SYM              bfd_elfNN_ia64_vms_vec
@@ -6160,4 +6168,40 @@ elfNN_vms_close_and_cleanup (bfd *abfd)
 #undef  elfNN_bed
 #define elfNN_bed elfNN_ia64_vms_bed
 
+/* Use VMS-style archives (in particular, don't use the standard coff
+   archive format).  */
+#define bfd_elfNN_archive_functions
+
+#undef bfd_elfNN_archive_p
+#define bfd_elfNN_archive_p _bfd_vms_lib_ia64_archive_p
+#undef bfd_elfNN_write_archive_contents
+#define bfd_elfNN_write_archive_contents _bfd_vms_lib_write_archive_contents
+#undef bfd_elfNN_mkarchive
+#define bfd_elfNN_mkarchive _bfd_vms_lib_ia64_mkarchive
+
+#define bfd_elfNN_archive_slurp_armap \
+  _bfd_vms_lib_slurp_armap
+#define bfd_elfNN_archive_slurp_extended_name_table \
+  _bfd_vms_lib_slurp_extended_name_table
+#define bfd_elfNN_archive_construct_extended_name_table \
+  _bfd_vms_lib_construct_extended_name_table
+#define bfd_elfNN_archive_truncate_arname \
+  _bfd_vms_lib_truncate_arname
+#define bfd_elfNN_archive_write_armap \
+  _bfd_vms_lib_write_armap
+#define bfd_elfNN_archive_read_ar_hdr \
+  _bfd_vms_lib_read_ar_hdr
+#define bfd_elfNN_archive_write_ar_hdr \
+  _bfd_vms_lib_write_ar_hdr
+#define bfd_elfNN_archive_openr_next_archived_file \
+  _bfd_vms_lib_openr_next_archived_file
+#define bfd_elfNN_archive_get_elt_at_index \
+  _bfd_vms_lib_get_elt_at_index
+#define bfd_elfNN_archive_generic_stat_arch_elt \
+  _bfd_vms_lib_generic_stat_arch_elt
+#define bfd_elfNN_archive_update_armap_timestamp \
+  _bfd_vms_lib_update_armap_timestamp
+
 #include "elfNN-target.h"
+
+#endif /* INCLUDE_IA64_VMS */
This page took 0.025006 seconds and 4 git commands to generate.