*** empty log message ***

This commit is contained in:
Alan Modra
2001-12-19 02:14:37 +00:00
parent c81122093f
commit fcf12726be
5 changed files with 83 additions and 21 deletions

View File

@ -99,8 +99,8 @@ case "${targ}" in
targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec" targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
;; ;;
ia64*-*-hpux*) ia64*-*-hpux*)
targ_defvec=bfd_elf64_ia64_big_vec targ_defvec=bfd_elf32_ia64_hpux_big_vec
targ_selvecs="bfd_elf32_ia64_big_vec" targ_selvecs="bfd_elf64_ia64_hpux_big_vec"
;; ;;
sparc64-*-freebsd* | sparc64-*-netbsd*) sparc64-*-freebsd* | sparc64-*-netbsd*)
targ_defvec=bfd_elf64_sparc_vec targ_defvec=bfd_elf64_sparc_vec

26
bfd/configure vendored
View File

@ -5961,6 +5961,7 @@ do
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; 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_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_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_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_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;; bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
@ -5999,6 +6000,7 @@ do
bfd_elf64_ia64_aix_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; 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_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_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_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_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 ;; bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
@ -6201,17 +6203,17 @@ for ac_hdr in unistd.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6205: checking for $ac_hdr" >&5 echo "configure:6207: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6210 "configure" #line 6212 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:6217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@ -6240,12 +6242,12 @@ done
for ac_func in getpagesize for ac_func in getpagesize
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6244: checking for $ac_func" >&5 echo "configure:6246: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6249 "configure" #line 6251 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
@ -6268,7 +6270,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
@ -6293,7 +6295,7 @@ fi
done done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
echo "configure:6297: checking for working mmap" >&5 echo "configure:6299: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -6301,7 +6303,7 @@ else
ac_cv_func_mmap_fixed_mapped=no ac_cv_func_mmap_fixed_mapped=no
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6305 "configure" #line 6307 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test. /* Thanks to Mike Haertel and Jim Avera for this test.
@ -6441,7 +6443,7 @@ main()
} }
EOF EOF
if { (eval echo configure:6445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:6447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
ac_cv_func_mmap_fixed_mapped=yes ac_cv_func_mmap_fixed_mapped=yes
else else
@ -6466,12 +6468,12 @@ fi
for ac_func in madvise mprotect for ac_func in madvise mprotect
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6470: checking for $ac_func" >&5 echo "configure:6472: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6475 "configure" #line 6477 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
@ -6494,7 +6496,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else

View File

@ -554,6 +554,7 @@ do
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; 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_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_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_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_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.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_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_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_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_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_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 ;; bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;

View File

@ -307,6 +307,8 @@ static boolean elfNN_ia64_print_private_bfd_data
PARAMS ((bfd *abfd, PTR ptr)); PARAMS ((bfd *abfd, PTR ptr));
static enum elf_reloc_type_class elfNN_ia64_reloc_type_class static enum elf_reloc_type_class elfNN_ia64_reloc_type_class
PARAMS ((const Elf_Internal_Rela *)); PARAMS ((const Elf_Internal_Rela *));
static void elfNN_hpux_post_process_headers
PARAMS ((bfd *abfd, struct bfd_link_info *info));
/* ia64-specific relocation */ /* ia64-specific relocation */
@ -1126,11 +1128,29 @@ elfNN_ia64_final_write_processing (abfd, linker)
{ {
/* .gnu.linkonce.ia64unw.FOO -> .gnu.linkonce.t.FOO */ /* .gnu.linkonce.ia64unw.FOO -> .gnu.linkonce.t.FOO */
size_t len2 = sizeof (".gnu.linkonce.t.") - 1; size_t len2 = sizeof (".gnu.linkonce.t.") - 1;
char *once_name = alloca (len2 + strlen (sname) - len + 1); char *once_name = bfd_malloc (len2 + strlen (sname + len) + 1);
if (once_name != NULL)
{
memcpy (once_name, ".gnu.linkonce.t.", len2); memcpy (once_name, ".gnu.linkonce.t.", len2);
strcpy (once_name + len2, sname + len); strcpy (once_name + len2, sname + len);
text_sect = bfd_get_section_by_name (abfd, once_name); text_sect = bfd_get_section_by_name (abfd, once_name);
free (once_name);
}
else
/* Should only happen if we run out of memory, in
which case we're probably toast anyway. Try to
cope by finding the section the slow way. */
for (text_sect = abfd->sections;
text_sect != NULL;
text_sect = text_sect->next)
{
if (strncmp (bfd_section_name (abfd, text_sect),
".gnu.linkonce.t.", len2) == 0
&& strcmp (bfd_section_name (abfd, text_sect) + len2,
sname + len) == 0)
break;
}
} }
else else
/* last resort: fall back on .text */ /* last resort: fall back on .text */
@ -1758,6 +1778,7 @@ get_local_sym_hash (ia64_info, abfd, rel, create)
{ {
char *addr_name; char *addr_name;
size_t len; size_t len;
struct elfNN_ia64_local_hash_entry *ret;
/* Construct a string for use in the elfNN_ia64_local_hash_table. /* Construct a string for use in the elfNN_ia64_local_hash_table.
name describes what was once anonymous memory. */ name describes what was once anonymous memory. */
@ -1765,13 +1786,17 @@ get_local_sym_hash (ia64_info, abfd, rel, create)
len = sizeof (void*)*2 + 1 + sizeof (bfd_vma)*4 + 1 + 1; len = sizeof (void*)*2 + 1 + sizeof (bfd_vma)*4 + 1 + 1;
len += 10; /* %p slop */ len += 10; /* %p slop */
addr_name = alloca (len); addr_name = bfd_malloc (len);
if (addr_name == NULL)
return 0;
sprintf (addr_name, "%p:%lx", sprintf (addr_name, "%p:%lx",
(void *) abfd, (unsigned long) ELFNN_R_SYM (rel->r_info)); (void *) abfd, (unsigned long) ELFNN_R_SYM (rel->r_info));
/* Collect the canonical entry data for this address. */ /* Collect the canonical entry data for this address. */
return elfNN_ia64_local_hash_lookup (&ia64_info->loc_hash_table, ret = elfNN_ia64_local_hash_lookup (&ia64_info->loc_hash_table,
addr_name, create, create); addr_name, create, create);
free (addr_name);
return ret;
} }
/* Find and/or create a descriptor for dynamic symbol info. This will /* Find and/or create a descriptor for dynamic symbol info. This will
@ -4395,6 +4420,17 @@ elfNN_ia64_reloc_type_class (rela)
return reloc_class_normal; 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_SYM bfd_elfNN_ia64_little_vec
#define TARGET_LITTLE_NAME "elfNN-ia64-little" #define TARGET_LITTLE_NAME "elfNN-ia64-little"
@ -4493,3 +4529,23 @@ elfNN_ia64_reloc_type_class (rela)
#define elfNN_bed elfNN_ia64_aix_bed #define elfNN_bed elfNN_ia64_aix_bed
#include "elfNN-target.h" #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"

View File

@ -525,6 +525,7 @@ extern const bfd_target bfd_elf32_i860_little_vec;
extern const bfd_target bfd_elf32_i860_vec; extern const bfd_target bfd_elf32_i860_vec;
extern const bfd_target bfd_elf32_i960_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_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_little_generic_vec;
extern const bfd_target bfd_elf32_littlearc_vec; extern const bfd_target bfd_elf32_littlearc_vec;
extern const bfd_target bfd_elf32_littlearm_oabi_vec; extern const bfd_target bfd_elf32_littlearm_oabi_vec;
@ -563,6 +564,7 @@ extern const bfd_target bfd_elf64_hppa_vec;
extern const bfd_target bfd_elf64_ia64_aix_big_vec; 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_aix_little_vec;
extern const bfd_target bfd_elf64_ia64_big_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_ia64_little_vec;
extern const bfd_target bfd_elf64_little_generic_vec; extern const bfd_target bfd_elf64_little_generic_vec;
extern const bfd_target bfd_elf64_littlemips_vec; extern const bfd_target bfd_elf64_littlemips_vec;