This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: HP-UX specific IA64 vector.



I sent a patch for HP-UX IA64 support in binutils back in July
(http://sources.redhat.com/ml/binutils/2001-07/msg00229.html).  It was
never approved, rejected, checked in or commented on.  Here is a subset
of that patch relative to the current sources.  I am breaking it up as
much as I can in the hopes that it might make it more likely that some
one will approve it and check it in if it is smaller.  If someone is
willing to approve it but doesn't want to check it in I can try to find
another person to do the checkin once it is approved.

I have a copyright assignment on record but no write permission to CVS.

The change is basically just adding a new vector for ia64*-*-hpux* and
involves bfd files only.

2001-12-11  Steve Ellcey  <sje@cup.hp.com>

	* config.bfd (bfd_elf32_ia64_hpux_big_vec, bfd_elf64_ia64_hpux_big_vec):
	  New Vectors for ia64*-*-hpux* target.
	* targets.c: Ditto.
	* configure.in: Ditto.
	* configure: Regenerate
	* elfxx-ia64.c: Include alloca.h when HAVE_ALLOCA_H is set.
	  Set hp-ux specific values for IA64 HP-UX vector.
	  (elfNN_hpux_post_process_headers): New function.
	

--- orig/src/bfd/config.bfd	Tue Dec 11 10:55:13 2001
+++ src/bfd/config.bfd	Tue Dec 11 10:58:42 2001
@@ -99,8 +99,8 @@ case "${targ}" in
     targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
     ;;
   ia64*-*-hpux*)
-    targ_defvec=bfd_elf64_ia64_big_vec
-    targ_selvecs="bfd_elf32_ia64_big_vec"
+    targ_defvec=bfd_elf32_ia64_hpux_big_vec
+    targ_selvecs="bfd_elf64_ia64_hpux_big_vec"
     ;;
   sparc64-*-freebsd* | sparc64-*-netbsd*)
     targ_defvec=bfd_elf64_sparc_vec
--- orig/src/bfd/configure.in	Tue Dec 11 10:55:13 2001
+++ src/bfd/configure.in	Tue Dec 11 11:00:36 2001
@@ -554,6 +554,7 @@ do
     bfd_elf32_i860_vec)		tb="$tb elf32-i860.lo elf32.lo $elf" ;;
     bfd_elf32_i960_vec)		tb="$tb elf32-i960.lo elf32.lo $elf" ;;
     bfd_elf32_ia64_big_vec)	tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
+    bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
     bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
     bfd_elf32_littlearc_vec)	tb="$tb elf32-arc.lo elf32.lo $elf" ;;
     bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
@@ -592,6 +593,7 @@ do
     bfd_elf64_ia64_aix_big_vec)	tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_ia64_aix_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_ia64_big_vec)	tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_ia64_little_vec)	tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_littlemips_vec) 	tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
--- orig/src/bfd/targets.c	Tue Dec 11 10:55:13 2001
+++ src/bfd/targets.c	Tue Dec 11 11:02:14 2001
@@ -525,6 +525,7 @@ extern const bfd_target bfd_elf32_i860_l
 extern const bfd_target bfd_elf32_i860_vec;
 extern const bfd_target bfd_elf32_i960_vec;
 extern const bfd_target bfd_elf32_ia64_big_vec;
+extern const bfd_target bfd_elf32_ia64_hpux_big_vec;
 extern const bfd_target bfd_elf32_little_generic_vec;
 extern const bfd_target bfd_elf32_littlearc_vec;
 extern const bfd_target bfd_elf32_littlearm_oabi_vec;
@@ -563,6 +564,7 @@ extern const bfd_target bfd_elf64_hppa_v
 extern const bfd_target bfd_elf64_ia64_aix_big_vec;
 extern const bfd_target bfd_elf64_ia64_aix_little_vec;
 extern const bfd_target bfd_elf64_ia64_big_vec;
+extern const bfd_target bfd_elf64_ia64_hpux_big_vec;
 extern const bfd_target bfd_elf64_ia64_little_vec;
 extern const bfd_target bfd_elf64_little_generic_vec;
 extern const bfd_target bfd_elf64_littlemips_vec;
--- orig/src/bfd/elfxx-ia64.c	Tue Dec 11 10:55:13 2001
+++ src/bfd/elfxx-ia64.c	Tue Dec 11 12:40:05 2001
@@ -24,6 +24,9 @@ Foundation, Inc., 59 Temple Place - Suit
 #include "elf-bfd.h"
 #include "opcode/ia64.h"
 #include "elf/ia64.h"
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
 
 /*
  * THE RULES for all the stuff the linker creates --
@@ -309,6 +312,8 @@ static boolean elfNN_ia64_print_private_
   PARAMS ((bfd *abfd, PTR ptr));
 static enum elf_reloc_type_class elfNN_ia64_reloc_type_class
   PARAMS ((const Elf_Internal_Rela *));
+static void elfNN_hpux_post_process_headers
+  PARAMS ((bfd *abfd, struct bfd_link_info *info));
 
 /* ia64-specific relocation */
 
@@ -4390,6 +4395,17 @@ elfNN_ia64_reloc_type_class (rela)
       return reloc_class_normal;
     }
 }
+
+static void
+elfNN_hpux_post_process_headers (abfd, info)
+	bfd *abfd;
+	struct bfd_link_info *info ATTRIBUTE_UNUSED;
+{
+  Elf_Internal_Ehdr *i_ehdrp = elf_elfheader (abfd);
+
+  i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_HPUX;
+  i_ehdrp->e_ident[EI_ABIVERSION] = 1;
+}
 
 #define TARGET_LITTLE_SYM		bfd_elfNN_ia64_little_vec
 #define TARGET_LITTLE_NAME		"elfNN-ia64-little"
@@ -4488,5 +4504,25 @@ elfNN_ia64_reloc_type_class (rela)
 #define bfd_elfNN_bfd_link_add_symbols 	elfNN_ia64_aix_link_add_symbols
 
 #define elfNN_bed elfNN_ia64_aix_bed
+
+#include "elfNN-target.h"
+
+/* HPUX-specific vectors.  */
+
+#undef  TARGET_LITTLE_SYM
+#undef  TARGET_LITTLE_NAME
+#undef  TARGET_BIG_SYM
+#define TARGET_BIG_SYM                  bfd_elfNN_ia64_hpux_big_vec
+#undef  TARGET_BIG_NAME
+#define TARGET_BIG_NAME                 "elfNN-ia64-hpux-big"
+
+#undef  elf_backend_post_process_headers
+#define elf_backend_post_process_headers elfNN_hpux_post_process_headers
+
+#undef  ELF_MAXPAGESIZE
+#define ELF_MAXPAGESIZE                 0x1000  /* 1K */
+
+#undef  elfNN_bed
+#define elfNN_bed elfNN_ia64_hpux_bed
 
 #include "elfNN-target.h"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]