diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3fb1a51feb..5d4e202826 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,19 @@ 2001-01-14 Alan Modra + * config.bfd: Add linux target variant for elfxx-hppa. + * configure.in: Recognize bfd_elf32_hppa_linux_vec and + bfd_elf64_hppa_linux_vec. + * configure: Regenerate. + * elf64-hppa.c: Include elf64-target.h again to support linux + target variant. + (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux. + * elf32-hppa.c: Include elf32-target.h again to support linux + target variant. + (elf32_hppa_post_process_headers): New function. + (elf_backend_post_process_headers): Define. + * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and + bfd_elf32_hppa_linux_vec. + * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base, and data_segment_base fields. (elf32_hppa_link_hash_table_create ): Init them. @@ -226,8 +240,8 @@ 2000-12-10 Fred Fish - * elflink.h (elf_link_output_extsym): Don't complain about undefined - symbols in shared objects if allow_shlib_undefined is true. + * elflink.h (elf_link_output_extsym): Don't complain about undefined + symbols in shared objects if allow_shlib_undefined is true. 2000-12-12 Nick Clifton @@ -257,7 +271,7 @@ * configure: Regenerate. * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info. * libcoff.h: Regenerate. - * coffgen.c (coff_find_nearest_line): Call + * coffgen.c (coff_find_nearest_line): Call _bfd_dwarf2_find_nearest_line. * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update accordingly. @@ -277,7 +291,7 @@ to _bfd_find_nearest_line. * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to call to _bfd_find_nearest_line. - + 2000-12-08 Kazu Hirata * coffgen.c: Fix formatting. @@ -340,75 +354,75 @@ 2000-12-01 Chris Demetriou - * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and - bfd_mach_mips32_4k. Update FIXME comment. - * archures.c (bfd_mach_mips32): New constant. - (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to - the latter, renumber it. - * bfd-in2.h (bfd_mach_mips32): New constant. - (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to - the latter, renumber it. - * cpu-mips.c (I_mips32): New constant. - (I_mips4K, I_mips32_4k): Rename the former to the latter. - (arch_info_struct): Add bfd_mach_mips32 entry, replace - bfd_mach_mips4K entry with bfd_mach_mips32_4k entry. - * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case. - (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32 - with E_MIPS_MACH_MIPS32_4K. - (_bfd_mips_elf_final_write_processing): Replace - bfd_mach_mips4K with bfd_mach_mips32_4k case, add - bfd_mach_mips32 case. - (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing - comparison with support for MIPS32. - (_bfd_mips_elf_print_private_bfd_data): Print ISA name for - MIPS32. + * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and + bfd_mach_mips32_4k. Update FIXME comment. + * archures.c (bfd_mach_mips32): New constant. + (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to + the latter, renumber it. + * bfd-in2.h (bfd_mach_mips32): New constant. + (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to + the latter, renumber it. + * cpu-mips.c (I_mips32): New constant. + (I_mips4K, I_mips32_4k): Rename the former to the latter. + (arch_info_struct): Add bfd_mach_mips32 entry, replace + bfd_mach_mips4K entry with bfd_mach_mips32_4k entry. + * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case. + (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32 + with E_MIPS_MACH_MIPS32_4K. + (_bfd_mips_elf_final_write_processing): Replace + bfd_mach_mips4K with bfd_mach_mips32_4k case, add + bfd_mach_mips32 case. + (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing + comparison with support for MIPS32. + (_bfd_mips_elf_print_private_bfd_data): Print ISA name for + MIPS32. - * aoutx.h (NAME(aout,machine_type)): Add cases for - bfd_mach_mips5 and bfd_mach_mips64. - * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants. - * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise. - * cpu_mips.c (I_mips5, I_mips64): New definitions. - (arch_info_struct): Add entries for bfd_mach_mips5 and - bfd_mach_mips64. - * elf32-mips.c (elf_mips_isa, elf_mips_mach, - _bfd_mips_elf_print_private_bfd_data): Add cases for - E_MIPS_ARCH_5 and E_MIPS_ARCH_64. - (_bfd_mips_elf_final_write_processing): Add cases for - bfd_mach_mips5 and bfd_mach_mips64. + * aoutx.h (NAME(aout,machine_type)): Add cases for + bfd_mach_mips5 and bfd_mach_mips64. + * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants. + * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise. + * cpu_mips.c (I_mips5, I_mips64): New definitions. + (arch_info_struct): Add entries for bfd_mach_mips5 and + bfd_mach_mips64. + * elf32-mips.c (elf_mips_isa, elf_mips_mach, + _bfd_mips_elf_print_private_bfd_data): Add cases for + E_MIPS_ARCH_5 and E_MIPS_ARCH_64. + (_bfd_mips_elf_final_write_processing): Add cases for + bfd_mach_mips5 and bfd_mach_mips64. - * bfd/aoutx.h (NAME(aout,machine_type)): Add a - bfd_mach_mips_sb1 case. - * bfd/archures.c (bfd_mach_mips_sb1): New constant. - * bfd/bfd-in2.h (bfd_mach_mips_sb1): New constant. - * bfd/cpu-mips.c (I_sb1): New constant. - (arch_info_struct): Add entry for bfd_mach_mips_sb1. - * bfd/elf32-mips.c (elf_mips_mach): Add case for - E_MIPS_MACH_SB1. - (_bfd_mips_elf_final_write_processing): Add case for - bfd_mach_mips_sb1. + * bfd/aoutx.h (NAME(aout,machine_type)): Add a + bfd_mach_mips_sb1 case. + * bfd/archures.c (bfd_mach_mips_sb1): New constant. + * bfd/bfd-in2.h (bfd_mach_mips_sb1): New constant. + * bfd/cpu-mips.c (I_sb1): New constant. + (arch_info_struct): Add entry for bfd_mach_mips_sb1. + * bfd/elf32-mips.c (elf_mips_mach): Add case for + E_MIPS_MACH_SB1. + (_bfd_mips_elf_final_write_processing): Add case for + bfd_mach_mips_sb1. -2000-12-01 Joel Sherrill +2000-12-01 Joel Sherrill * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets. (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets. (sparc*-*-rtems*): Switched from a.out to ELF. 2000-11-30 Jan Hubicka - - * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo - BFD64_BACKENDS_CFILES): Add elf64-x86-64.c - (elf64-x86-64.lo): Add dependencies. - * archures.c (DESCRIPTION): Add bfd_mach_x86_64, - bfd_mach_x86_64_intel_syntax. - * elf.c (prep_headers): Use EM_x86_64 for 64bit output. - * config.bfd (x86_64): Add. - * configure.in: Add support for bfd_elf64_x86_64_vec. - * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add. - (bfd_i386_arch, i8086_ar): Link in. - * elf64-x86-64.c: New file. - * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*. - * targets.c (bfd_elf64_x86_64_vec): Add. - (bfd_target_vect): Add bfd_elf64_x86_64_vec. + + * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo + BFD64_BACKENDS_CFILES): Add elf64-x86-64.c + (elf64-x86-64.lo): Add dependencies. + * archures.c (DESCRIPTION): Add bfd_mach_x86_64, + bfd_mach_x86_64_intel_syntax. + * elf.c (prep_headers): Use EM_x86_64 for 64bit output. + * config.bfd (x86_64): Add. + * configure.in: Add support for bfd_elf64_x86_64_vec. + * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add. + (bfd_i386_arch, i8086_ar): Link in. + * elf64-x86-64.c: New file. + * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*. + * targets.c (bfd_elf64_x86_64_vec): Add. + (bfd_target_vect): Add bfd_elf64_x86_64_vec. 2000-11-30 Kazu Hirata @@ -446,7 +460,7 @@ 2000-11-22 Philip Blundell - * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to + * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to weak undefined symbols. 2000-11-24 Nick Clifton @@ -491,7 +505,7 @@ (get_got): Delete unused local srel. (elfNN_ia64_check_relocs): Initialize dynrel_type when declared. (elfNN_ia64_relocate_section): Delete unused local dynindx. - + 2000-11-21 Kazu Hirata * coff-a29k.c: Fix formatting. @@ -727,7 +741,7 @@ * configure.in: Recognize alpha-*-freebsd*. * configure: Regenerate. -2000-11-02 Luciano Gemme +2000-11-02 Luciano Gemme * srec.c (CHUNK): Rename to DEFAULT_CHUNK. (Chunk): New global variable set by a parameter in objcopy.c. @@ -744,7 +758,7 @@ * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * po/bfd.pot: Regenerate. - + 2000-10-31 Philip Blundell * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle @@ -755,10 +769,10 @@ * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse attempts to mix PIC code with non-PIC, just mark the output as being position dependent. - (elf32_arm_merge_private_bfd_data): Likewise. Print an error - message for EF_SOFT_FLOAT mismatches. Display diagnostics for + (elf32_arm_merge_private_bfd_data): Likewise. Print an error + message for EF_SOFT_FLOAT mismatches. Display diagnostics for all mismatches, not just the first one. - + 2000-10-25 Chris Demetriou * ieee.c (ieee_archive_p): Plug one of many possible @@ -803,7 +817,7 @@ local_p. Add symbol value only for non-R_MIPS_REL32 relocations against local symbols. (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01. - + 2000-10-12 Alan Modra * section.c (struct sec): Add kept_section. @@ -814,7 +828,7 @@ * bfd-in2.h: Regenerate. * elflink.h (elf_link_add_object_symbols): Remove unnecessary - zeroing of `flags'. + zeroing of `flags'. (elf_link_input_bfd): Set all asection->symbol->value's here, and fudge values for discarded link-once section symbols. @@ -832,7 +846,7 @@ 2000-10-10 Tom Rix - * section.c (bfd_make_section_anyway): Release newsect ptr when + * section.c (bfd_make_section_anyway): Release newsect ptr when newsect->symbol fails to alloc. Use bfd_release instead of free. 2000-10-09 Richard Henderson * elfcode.h (elf_object_p): Preserve and clear abfd section - information. Restore at error. + information. Restore at error. 2000-09-26 Paul Sokolovsky @@ -1168,10 +1182,10 @@ 2000-09-13 Anders Norlander - * cpu-mips.c (arch_info_struct): Add mips:4K - * bfd-in2.h (bfd_mach_mips4K): New define. - * archures.c: Add bfd_mach_mips4K to comment. - * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return + * cpu-mips.c (arch_info_struct): Add mips:4K + * bfd-in2.h (bfd_mach_mips4K): New define. + * archures.c: Add bfd_mach_mips4K to comment. + * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return E_MIPS_ARCH_2 for bfd_mach_mips4K. 2000-09-13 Marco Franzen @@ -4003,7 +4017,7 @@ Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com) * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx = scnhsz, filhsz, relsz, aoutsz, etc) - * coffswap.h: Ditto. + * coffswap.h: Ditto. 2000-01-13 Nick Clifton diff --git a/bfd/config.bfd b/bfd/config.bfd index f420b7e564..ed55107635 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -257,16 +257,23 @@ case "${targ}" in #ifdef BFD64 hppa*64*-*-linux-gnu*) - targ_defvec=bfd_elf64_hppa_vec + targ_defvec=bfd_elf64_hppa_linux_vec + targ_selvecs=bfd_elf64_hppa_vec ;; hppa*64*-*-hpux11*) targ_defvec=bfd_elf64_hppa_vec + targ_selvecs=bfd_elf64_hppa_linux_vec targ_cflags=-DHPUX_LARGE_AR_IDS ;; #endif - hppa*-*-*elf* | hppa*-*-linux-gnu* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-rtems*) + hppa*-*-linux-gnu*) + targ_defvec=bfd_elf32_hppa_linux_vec + targ_selvecs=bfd_elf32_hppa_vec + ;; + hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-rtems*) targ_defvec=bfd_elf32_hppa_vec + targ_selvecs=bfd_elf32_hppa_linux_vec ;; #if defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF) || defined (HOST_HPPAMPEIX) diff --git a/bfd/configure b/bfd/configure index 7092544f95..d65a37821b 100755 --- a/bfd/configure +++ b/bfd/configure @@ -5932,7 +5932,8 @@ do target64=true ;; bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf" target64=true ;; - bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf" + bfd_elf64_hppa_vec | bfd_elf64_hppa_linux_vec) + tb="$tb elf64-hppa.lo elf64.lo $elf" target64=true ;; bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf" target64=true ;; @@ -5955,7 +5956,8 @@ do bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;; bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; - bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; + bfd_elf32_hppa_vec | bfd_elf32_hppa_linux_vec) + tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf" @@ -6177,17 +6179,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6181: checking for $ac_hdr" >&5 +echo "configure:6183: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6216,12 +6218,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6220: checking for $ac_func" >&5 +echo "configure:6222: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6269,7 +6271,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:6273: checking for working mmap" >&5 +echo "configure:6275: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6277,7 +6279,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -6442,12 +6444,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6446: checking for $ac_func" >&5 +echo "configure:6448: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else diff --git a/bfd/configure.in b/bfd/configure.in index 0cdf53917d..d643b973ae 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -481,7 +481,8 @@ do target64=true ;; bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf" target64=true ;; - bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf" + bfd_elf64_hppa_vec | bfd_elf64_hppa_linux_vec) + tb="$tb elf64-hppa.lo elf64.lo $elf" target64=true ;; bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf" target64=true ;; @@ -504,7 +505,8 @@ do bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;; bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; - bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; + bfd_elf32_hppa_vec | bfd_elf32_hppa_linux_vec) + tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf" diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 10253fef71..13f1e5a37d 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -399,6 +399,9 @@ static boolean elf32_hppa_finish_dynamic_symbol static boolean elf32_hppa_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); +static void elf32_hppa_post_process_headers + PARAMS ((bfd *, struct bfd_link_info *)); + static int elf32_hppa_elf_get_symbol_type PARAMS ((Elf_Internal_Sym *, int)); @@ -4233,6 +4236,27 @@ elf32_hppa_finish_dynamic_sections (output_bfd, info) return true; } +/* Tweak the OSABI field of the elf header. */ + +static void +elf32_hppa_post_process_headers (abfd, link_info) + bfd *abfd; + struct bfd_link_info *link_info ATTRIBUTE_UNUSED; +{ + Elf_Internal_Ehdr * i_ehdrp; + + i_ehdrp = elf_elfheader (abfd); + + if (strcmp (bfd_get_target (abfd), "elf32-hppa-linux") == 0) + { + i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_LINUX; + } + else + { + i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_HPUX; + } +} + /* Called when writing out an object file to decide the type of a symbol. */ static int @@ -4269,6 +4293,7 @@ elf32_hppa_elf_get_symbol_type (elf_sym, type) #define elf_backend_gc_sweep_hook elf32_hppa_gc_sweep_hook #define elf_backend_object_p elf32_hppa_object_p #define elf_backend_final_write_processing elf_hppa_final_write_processing +#define elf_backend_post_process_headers elf32_hppa_post_process_headers #define elf_backend_get_symbol_type elf32_hppa_elf_get_symbol_type #define elf_backend_can_gc_sections 1 @@ -4285,3 +4310,11 @@ elf32_hppa_elf_get_symbol_type (elf_sym, type) #define ELF_MAXPAGESIZE 0x1000 #include "elf32-target.h" + +#undef TARGET_BIG_SYM +#define TARGET_BIG_SYM bfd_elf32_hppa_linux_vec +#undef TARGET_BIG_NAME +#define TARGET_BIG_NAME "elf32-hppa-linux" + +#define INCLUDED_TARGET_FILE 1 +#include "elf32-target.h" diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c index 42dbf60602..465a2db40a 100644 --- a/bfd/elf64-hppa.c +++ b/bfd/elf64-hppa.c @@ -1166,8 +1166,15 @@ elf64_hppa_post_process_headers (abfd, link_info) i_ehdrp = elf_elfheader (abfd); - i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_HPUX; - i_ehdrp->e_ident[EI_ABIVERSION] = 1; + if (strcmp (bfd_get_target (abfd), "elf64-hppa-linux") == 0) + { + i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_LINUX; + } + else + { + i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_HPUX; + i_ehdrp->e_ident[EI_ABIVERSION] = 1; + } } /* Create function descriptor section (.opd). This section is called .opd @@ -2657,3 +2664,11 @@ const struct elf_size_info hppa64_elf_size_info = #define elf_backend_type_change_ok true #include "elf64-target.h" + +#undef TARGET_BIG_SYM +#define TARGET_BIG_SYM bfd_elf64_hppa_linux_vec +#undef TARGET_BIG_NAME +#define TARGET_BIG_NAME "elf64-hppa-linux" + +#define INCLUDED_TARGET_FILE 1 +#include "elf64-target.h" diff --git a/bfd/targets.c b/bfd/targets.c index 589ba23641..dac9ce671d 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -1,5 +1,5 @@ /* Generic target-file-type support for the BFD library. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -508,6 +508,7 @@ extern const bfd_target bfd_efi_app_ia32_vec; extern const bfd_target bfd_efi_app_ia64_vec; extern const bfd_target bfd_elf64_alpha_vec; extern const bfd_target bfd_elf64_hppa_vec; +extern const bfd_target bfd_elf64_hppa_linux_vec; extern const bfd_target bfd_elf64_ia64_little_vec; extern const bfd_target bfd_elf64_ia64_big_vec; extern const bfd_target bfd_elf32_ia64_big_vec; @@ -526,6 +527,7 @@ extern const bfd_target bfd_elf32_us_cris_vec; extern const bfd_target bfd_elf32_d10v_vec; extern const bfd_target bfd_elf32_d30v_vec; extern const bfd_target bfd_elf32_hppa_vec; +extern const bfd_target bfd_elf32_hppa_linux_vec; extern const bfd_target bfd_elf32_i370_vec; extern const bfd_target bfd_elf32_i386_vec; extern const bfd_target bfd_elf32_i860_vec; @@ -719,6 +721,7 @@ const bfd_target * const bfd_target_vector[] = { #ifdef BFD64 &bfd_elf64_alpha_vec, &bfd_elf64_hppa_vec, + &bfd_elf64_hppa_linux_vec, &bfd_elf64_ia64_little_vec, &bfd_elf64_ia64_big_vec, #endif @@ -735,6 +738,7 @@ const bfd_target * const bfd_target_vector[] = { &bfd_elf32_d10v_vec, &bfd_elf32_d30v_vec, &bfd_elf32_hppa_vec, + &bfd_elf32_hppa_linux_vec, &bfd_elf32_i370_vec, &bfd_elf32_i386_vec, #ifdef BFD64 diff --git a/ld/ChangeLog b/ld/ChangeLog index e244b8a506..9215103e3b 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,7 @@ 2001-01-14 Alan Modra + * emulparams/hppalinux.sh (OUTPUT_FORMAT): Set to elf32-hppa-linux. + * emultempl/hppaelf.em (hppaelf_after_parse): New function, enabling search for libmilli. On a relocatable link, make .text sections unique. @@ -109,7 +111,7 @@ * ldmain.c (main): Initialize link_info.allow_shlib_undefined to false. * ld.texinfo: Document new command line switch. - + 2000-12-12 Geoffrey Keating * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): @@ -129,7 +131,7 @@ Mon Dec 11 14:50:33 MET 2000 Jan Hubicka 2000-12-01 Joel Sherrill - * configure.tgt (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*): + * configure.tgt (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*): New targets. (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets. (sparc*-*-rtems*): Switched from a.out to ELF. @@ -174,8 +176,8 @@ Mon Dec 11 14:50:33 MET 2000 Jan Hubicka 2000-11-24 Fred Fish - * ldmain.c (main): Remove redundant init of config.make_executable - to true. + * ldmain.c (main): Remove redundant init of config.make_executable + to true. 2000-11-15 Richard Henderson @@ -253,9 +255,9 @@ Tue Nov 14 00:59:19 2000 Denis Chertykov 2000-10-17 Chandrakala Chavva - * lexsup.c: New option OPTION_TARGET_HELP. Prints all target specific - options. - * ld.texinfo: Added notes about this new option. + * lexsup.c: New option OPTION_TARGET_HELP. Prints all target specific + options. + * ld.texinfo: Added notes about this new option. 2000-10-16 Nick Clifton @@ -271,7 +273,7 @@ Tue Nov 14 00:59:19 2000 Denis Chertykov pe_dll_search_prefix. 2000-10-12 Charles Wilson - + * emultempl/pe.em (pe_dll_search_prefix): New variable, (longopts): New --dll-search-prefix option. (gld_${EMULATION_NAME}_list_options): Document. @@ -379,7 +381,7 @@ Tue Nov 14 00:59:19 2000 Denis Chertykov * pe-dll.c (process_def_file): Uninitialized data wasn't exported with --export-all-symbols switch. - + 2000-09-28 DJ Delorie * pe-dll.c (fill_edata): rearrange the data so that ordinals and @@ -847,7 +849,7 @@ Tue Nov 14 00:59:19 2000 Denis Chertykov 2000-07-12 Mark Elbrecht * scripttempl/i386go32.sc: Support the g++ attribute init_priority in - gcc 2.95.2 and later. + gcc 2.95.2 and later. 2000-07-11 Kazu Hirata @@ -1097,9 +1099,9 @@ Tue Nov 14 00:59:19 2000 Denis Chertykov 2000-06-05 Michael Matz * ldgram.y (vers_defns): Handle 'extern "C++" { ... }' in - version scripts. + version scripts. - * ldlex.l (V_IDENTIFIER): Accept `::' in symbols. + * ldlex.l (V_IDENTIFIER): Accept `::' in symbols. 2000-05-23 Marek Michalkiewicz diff --git a/ld/emulparams/hppalinux.sh b/ld/emulparams/hppalinux.sh index f87471d39b..30e5732bbc 100644 --- a/ld/emulparams/hppalinux.sh +++ b/ld/emulparams/hppalinux.sh @@ -1,6 +1,6 @@ SCRIPT_NAME=elf ELFSIZE=32 -OUTPUT_FORMAT="elf32-hppa" +OUTPUT_FORMAT="elf32-hppa-linux" TEXT_START_ADDR=0x1000 TARGET_PAGE_SIZE=0x1000 MAXPAGESIZE=0x1000