summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/bfd
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1998-09-06 22:57:45 +0000
committerjdp <jdp@FreeBSD.org>1998-09-06 22:57:45 +0000
commit088484c9efa7b42bc7fcc180fd78fed96df31c63 (patch)
tree6c09c852a9bb7a6de448bb31aefcc26282130456 /contrib/binutils/bfd
parent857a03a573e70a598db37cc5e2751f5a6b09c020 (diff)
parenteffee09f856ecc81feb91290459a2cda49d20287 (diff)
downloadFreeBSD-src-088484c9efa7b42bc7fcc180fd78fed96df31c63.zip
FreeBSD-src-088484c9efa7b42bc7fcc180fd78fed96df31c63.tar.gz
This commit was generated by cvs2svn to compensate for changes in r38889,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/binutils/bfd')
-rw-r--r--contrib/binutils/bfd/ChangeLog2401
-rw-r--r--contrib/binutils/bfd/Makefile.am977
-rw-r--r--contrib/binutils/bfd/Makefile.in1561
-rw-r--r--contrib/binutils/bfd/README4
-rw-r--r--contrib/binutils/bfd/acconfig.h6
-rw-r--r--contrib/binutils/bfd/acinclude.m467
-rw-r--r--contrib/binutils/bfd/aclocal.m4481
-rw-r--r--contrib/binutils/bfd/aout-target.h2
-rw-r--r--contrib/binutils/bfd/aout-tic30.c1062
-rw-r--r--contrib/binutils/bfd/aoutf1.h15
-rw-r--r--contrib/binutils/bfd/aoutx.h40
-rw-r--r--contrib/binutils/bfd/archive.c17
-rw-r--r--contrib/binutils/bfd/archures.c219
-rw-r--r--contrib/binutils/bfd/bfd-in.h6
-rw-r--r--contrib/binutils/bfd/bfd-in2.h466
-rw-r--r--contrib/binutils/bfd/bfd.c30
-rw-r--r--contrib/binutils/bfd/binary.c6
-rw-r--r--contrib/binutils/bfd/coff-i386.c185
-rw-r--r--contrib/binutils/bfd/coff-sh.c244
-rw-r--r--contrib/binutils/bfd/coff-tic30.c206
-rw-r--r--contrib/binutils/bfd/coffcode.h358
-rw-r--r--contrib/binutils/bfd/coffgen.c49
-rw-r--r--contrib/binutils/bfd/cofflink.c241
-rw-r--r--contrib/binutils/bfd/coffswap.h100
-rwxr-xr-xcontrib/binutils/bfd/config.bfd108
-rw-r--r--contrib/binutils/bfd/config.in9
-rwxr-xr-xcontrib/binutils/bfd/configure1578
-rw-r--r--contrib/binutils/bfd/configure.host106
-rw-r--r--contrib/binutils/bfd/configure.in459
-rw-r--r--contrib/binutils/bfd/cpu-arc.c70
-rw-r--r--contrib/binutils/bfd/cpu-sh.c61
-rw-r--r--contrib/binutils/bfd/cpu-tic30.c39
-rw-r--r--contrib/binutils/bfd/cpu-v850.c94
-rw-r--r--contrib/binutils/bfd/dep-in.sed1
-rw-r--r--contrib/binutils/bfd/doc/ChangeLog75
-rw-r--r--contrib/binutils/bfd/doc/Makefile.am248
-rw-r--r--contrib/binutils/bfd/doc/Makefile.in614
-rw-r--r--contrib/binutils/bfd/doc/aoutx.texi60
-rw-r--r--contrib/binutils/bfd/doc/archive.texi10
-rw-r--r--contrib/binutils/bfd/doc/archures.texi115
-rw-r--r--contrib/binutils/bfd/doc/bfd.texinfo6
-rw-r--r--contrib/binutils/bfd/doc/bfdt.texi597
-rw-r--r--contrib/binutils/bfd/doc/cache.texi18
-rw-r--r--contrib/binutils/bfd/doc/chew.c82
-rw-r--r--contrib/binutils/bfd/doc/coffcode.texi84
-rw-r--r--contrib/binutils/bfd/doc/core.texi10
-rw-r--r--contrib/binutils/bfd/doc/doc.str2
-rw-r--r--contrib/binutils/bfd/doc/elf.texi4
-rw-r--r--contrib/binutils/bfd/doc/format.texi10
-rw-r--r--contrib/binutils/bfd/doc/hash.texi25
-rw-r--r--contrib/binutils/bfd/doc/init.texi4
-rw-r--r--contrib/binutils/bfd/doc/libbfd.texi48
-rw-r--r--contrib/binutils/bfd/doc/linker.texi24
-rw-r--r--contrib/binutils/bfd/doc/opncls.texi22
-rw-r--r--contrib/binutils/bfd/doc/reloc.texi170
-rw-r--r--contrib/binutils/bfd/doc/section.texi133
-rw-r--r--contrib/binutils/bfd/doc/syms.texi231
-rw-r--r--contrib/binutils/bfd/doc/targets.texi24
-rw-r--r--contrib/binutils/bfd/dwarf2.c1457
-rw-r--r--contrib/binutils/bfd/ecoff.c5
-rw-r--r--contrib/binutils/bfd/ecofflink.c13
-rw-r--r--contrib/binutils/bfd/elf-bfd.h19
-rw-r--r--contrib/binutils/bfd/elf32-arc.c213
-rw-r--r--contrib/binutils/bfd/elf32-sh.c56
-rw-r--r--contrib/binutils/bfd/elf32-v850.c1785
-rw-r--r--contrib/binutils/bfd/elf64-alpha.c312
-rw-r--r--contrib/binutils/bfd/elfcode.h14
-rw-r--r--contrib/binutils/bfd/elfcore.h5
-rw-r--r--contrib/binutils/bfd/elflink.c50
-rw-r--r--contrib/binutils/bfd/elflink.h1216
-rw-r--r--contrib/binutils/bfd/elfxx-target.h16
-rw-r--r--contrib/binutils/bfd/i386netbsd.c4
-rw-r--r--contrib/binutils/bfd/ieee.c17
-rw-r--r--contrib/binutils/bfd/ihex.c45
-rw-r--r--contrib/binutils/bfd/libaout.h6
-rw-r--r--contrib/binutils/bfd/libbfd-in.h17
-rw-r--r--contrib/binutils/bfd/libbfd.c16
-rw-r--r--contrib/binutils/bfd/libbfd.h43
-rw-r--r--contrib/binutils/bfd/libcoff-in.h13
-rw-r--r--contrib/binutils/bfd/libcoff.h70
-rw-r--r--contrib/binutils/bfd/linker.c16
-rw-r--r--contrib/binutils/bfd/netbsd-core.c90
-rw-r--r--contrib/binutils/bfd/netbsd.h28
-rw-r--r--contrib/binutils/bfd/opncls.c17
-rw-r--r--contrib/binutils/bfd/reloc.c361
-rw-r--r--contrib/binutils/bfd/reloc16.c12
-rw-r--r--contrib/binutils/bfd/srec.c5
-rw-r--r--contrib/binutils/bfd/stabs.c4
-rw-r--r--contrib/binutils/bfd/stamp-h.in1
-rw-r--r--contrib/binutils/bfd/syms.c451
-rw-r--r--contrib/binutils/bfd/targets.c27
-rw-r--r--contrib/binutils/bfd/tekhex.c83
92 files changed, 16608 insertions, 3763 deletions
diff --git a/contrib/binutils/bfd/ChangeLog b/contrib/binutils/bfd/ChangeLog
index f2f04ae..557679d 100644
--- a/contrib/binutils/bfd/ChangeLog
+++ b/contrib/binutils/bfd/ChangeLog
@@ -1,27 +1,2124 @@
+Mon Apr 27 11:49:55 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Set version number to 2.9.1.
+ * configure: Rebuild.
+
+ Based on patch from H.J. Lu <hjl@gnu.org>:
+ * elf.c (bfd_elf_get_bfd_needed_list): New function.
+ * bfd-in.h (bfd_elf_get_bfd_needed_list): Declare.
+ * bfd-in2.h: Rebuild.
+
+Fri Apr 24 12:09:18 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * syms.c (struct indexentry): Change directory_name, file_name,
+ and function_name fields to char *.
+ (struct stab_find_info): Change cached_file_name field to char *.
+
+Thu Apr 16 11:43:33 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * archive.c (bfd_generic_archive_p): If a slurp subroutine returns
+ an error other than bfd_error_system_call, set the error to
+ bfd_error_wrong_format.
+
+ * targets.c (bfd_target_vector) [SELECT_VECS not defined]: Add
+ bfd_elf32_powerpcle_vec.
+
+ * elf.c (copy_private_bfd_data): If all the p_paddr fields in the
+ program segments are zero, don't set p_paddr_valid.
+
+Fri Apr 10 13:44:27 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (coff_write_object_contents): Move a PE COMDAT symbol
+ before any other symbols in the same section.
+
+Tue Apr 7 12:35:18 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * archures.c (bfd_default_scan): Add m68k cases back to default
+ switch, reverting patch of March 25, since IEEE support depends
+ upon them.
+
+Mon Apr 6 14:06:40 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (diststuff): New target.
+ * Makefile.in: Rebuild.
+
+Sun Apr 5 16:21:44 1998 Jeffrey A Law (law@cygnus.com)
+
+ * som.c (som_bfd_ar_write_symbol_stuff): Fix computation of
+ som_offset when we have an extended name table.
+
+Sun Apr 5 16:04:39 1998 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (stamp-lib): Check that .libs/libbfd.a exists before
+ trying to copy it.
+ * Makefile.in: Rebuild.
+
+Fri Apr 3 11:09:42 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * elf32-m68k.c (elf_m68k_size_dynamic_sections): Generate section
+ symbols when creating a shared library.
+ (elf_m68k_adjust_dynindx): New function, used by above code.
+ (elf_m68k_finish_dynamic_sections): Initialize the section
+ symbols.
+ (elf_m68k_relocate_section): Change abort to BFD_ASSERT.
+
+Wed Apr 1 13:36:58 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * elf32-m68k.c (elf_m68k_relocate_section, case R_68K_PLT*O): Fix
+ assertion.
+
+Tue Mar 31 16:25:45 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am: Rebuild dependencies.
+ * Makefile.in: Rebuild.
+
+Mon Mar 30 16:12:17 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Set version number to 2.9.
+ * configure: Rebuild.
+
+Mon Mar 30 12:20:50 1998 Brent Baccala <baccala@freesoft.org>
+
+ * syms.c (ENABLE_CACHING): Define.
+ (struct indexentry): Define.
+ (struct stab_cache): Remove.
+ (cmpindexentry): New static function.
+ (struct stab_find_info): Add new fields: indextable,
+ indextablesize, cached_indexentry, cached_offset, cached_stab, and
+ cached_file_name. Remove fields: file_cache, function_cache, and
+ line_cache.
+ (_bfd_stab_section_find_nearest_line): Rewrite to build a sorted
+ index table and search it.
+
+Mon Mar 30 10:39:34 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (_bfd_elf_copy_private_section_data): Call
+ copy_private_bfd_data once we've seen the last SEC_ALLOC section.
+
+ * cpu-mips.c: Remove trailing comma at end of enumeration list.
+
+Sat Mar 28 16:33:02 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-arm.c: Define all globally visible variables and functions
+ only when COFF_WITH_PE is not defined.
+ * configure.in (armpe_little_vec, armpe_big_vec): Add
+ coff-arm.lo.
+ * configure: Rebuild.
+
+Fri Mar 27 16:06:02 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ Fix some gcc -Wall warnings:
+ * aout-arm.c (MY(fix_pcrel_26)): Add casts to avoid warnings.
+ * archive.c (_bfd_generic_read_ar_hdr_mag): Likewise.
+ * archures.c (bfd_default_scan): Likewise.
+ * bfd.c (bfd_scan_vma): Likewise.
+ * binary.c (mangle_name): Likewise
+ * coff-arm.c (aoutarm_fix_pcrel_26): Likewise.
+ * coff-sh.c (sh_relocate_section): Likewise.
+ * coff-stgo32.c (create_go32_stub): Likewise.
+ * coffcode.h (coff_slurp_line_table): Likewise.
+ * ecoff.c (_bfd_ecoff_write_armap): Likewise.
+ * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
+ (assign_file_positions_for_segments): Likewise.
+ * elf32-mips.c (mips_elf_relocate_section): Likewise.
+ * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
+ * oasys.c (oasys_write_sections): Likewise.
+ * ppcboot.c (ppcboot_object_p): Likewise.
+ (mangle_name): Likewise.
+ * riscix.c (riscix_fix_pcrel_26): Likewise.
+ * srec.c (srec_scan): Likewise.
+ * stabs.c (_bfd_write_section_stabs): Likewise.
+ * sunos.c (sunos_add_dynamic_symbols): Likewise.
+ * aout-ns32k.c (_bfd_ns32k_relocate_contents): Add default case to
+ switch. Declare parameters for function pointers.
+ * archures.c (bfd_default_scan): Add braces to avoid ambiguous if
+ warning.
+ * elf.c (elf_sort_sections): Likewise.
+ * coff-arm.c (coff_thumb_pcrel_common): Initialize relocation.
+ Add default cases to switches.
+ (coff_arm_relocate_section): Remove unused local variables.
+ Always set rstat.
+ (coff_arm_bfd_set_private_flags): Change flag variable to type
+ flagword.
+ * coff-mips.c (mips_relocate_section): Initialize use_lo.
+ * coff-ppc.c (ppc_record_toc_entry): Change i to unsigned int.
+ (dump_toc): Change cat to const, and initialize it.
+ * coff-sh.c (sh_relax_delete_bytes): Initialize start and voff.
+ * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
+ (sh_elf_relocate_section): Initialize r_symndx.
+ * coffcode.h (coff_compute_section_file_positions): Only declare
+ old_sofar if ALIGN_SECTIONS_IN_FILE.
+ (coff_write_object_contents): Initialize csym.
+ * coffgen.c (coff_pointerize_aux): Make type and class unsigned.
+ * cpu-ns32k.c (_bfd_ns32k_get_displacement): Add default case to
+ switch.
+ * dwarf2.c: Include libiberty.h.
+ (read_2_signed_bytes, read_4_signed_bytes): Comment out.
+ (decode_line_info): Remove unused local variables.
+ * elf32-m32r.c (m32r_elf_sda16_reloc): Likewise.
+ (m32r_elf_relocate_section): Likewise.
+ * elf32-v850.c (v850_elf_store_addend_in_insn): Likewise.
+ (v850_elf_reloc): Likewise.
+ * elf-bfd.h (elf_linker_section_t): Make alignment unsigned.
+ (struct elf_obj_tdata): Make cverdefs and cverrefs unsigned.
+ * elf.c (assign_file_positions_for_segments): Always set adjust.
+ * elf32-d30v.c (bfd_elf_d30v_reloc): Initialize tmp_addr. Fully
+ parenthesize expression.
+ * elf32-m32r.c (m32r_elf_relocate_section): Always initialize h.
+ (m32r_elf_object_p): Return a value.
+ (m32r_elf_print_private_bfd_data): Change fprintf format string.
+ * elf32-mips.c (mips_elf_final_link): Initialize last.
+ (mips_elf_finish_dynamic_sections): Initialize last and dindx.
+ * elf32-v850.c (v850_elf_object_p): Return a value.
+ (v850_elf_print_private_bfd_data): Change fprintf format string.
+ * elfcode.h (elf_slurp_symbol_table): Change symcount and i to
+ unsigned long.
+ * elflink.h (elf_link_add_object_symbols): Change vernum to
+ unsigned int, and initialize it. Change fprintf format string.
+ (NAME(bfd_elf,size_dynamic_sections)): Cast -1 to bfd_size_type
+ when setting or comparing to soname_indx.
+ (elf_create_pointer_linker_section): Change num_symbols to
+ unsigned int.
+ * libcoff-in.h (coff_data_type): Change flags to flagword.
+ * peicode.h (pe_print_idata): Initialize idx. Change j to
+ bfd_size_type. Initialize hint_member. Remove useless test to
+ time_stamp.
+ (pe_print_edata): Change num_functions and num_names in struct
+ EDT_type to unsigned long. Remove cast. Change fprintf format
+ string.
+ * ppcboot.c (ppcboot_object_p): Change i to size_t.
+ * reloc.c (bfd_get_reloc_size): Change return type to unsigned
+ int.
+ * reloc16.c (bfd_coff_reloc16_relax_section): Change shrinks to
+ int *. Update uses. Change j to long.
+ * bfd-in2.h, libcoff.h: Rebuild.
+
+Thu Mar 26 13:32:17 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (coff_new_section_hook): Set the type and storage
+ class in the native symbol information allocated for a new section
+ symbol.
+
+Thu Mar 26 10:13:41 1998 Nick Clifton <nickc@cygnus.com>
+
+ * peicode.h: Chain together calls to
+ coff_bfd_copy_private_bfd_data and
+ coff_bfd_print_private_bfd_data.
+
+ * coff-arm.c: Add prototypes for
+ coff_arm_bfd_print_private_bfd_data and
+ coff_arm_bfd_copy_private_bfd_data.
+
+Wed Mar 25 15:45:55 1998 Nick Clifton <nickc@cygnus.com>
+
+ * coffcode.h (coff_mkobject_hook): Set private falgs even for a PE
+ build.
+
+ * peicode.h: Call arm-coff private data functions after handling
+ pe private data.
+
+ * coff-arm.c: Turn statics into globals so that they can be shared
+ both pe and pei backends.
+
+Wed Mar 25 15:19:38 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutf1.h (sunos_set_arch_mach): Use bfd_mach_m68* rather than
+ plain numbers.
+ (sunos_write_object_contents): Likewise.
+ * aoutx.h (NAME(aout,machine_type)): Likewise.
+ * coffcode.h (coff_set_arch_mach_hook): Likewise.
+
+Wed Mar 25 13:59:24 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * archures.c (bfd_mach_m68*): Add definitions for various m68k
+ variants.
+ (bfd_default_scan): Remove m68k special cases.
+ * bfd-in2.h: Rebuild.
+ * mipsbsd.c (MY(write_object_contents)): Use bfd_mach_m68* rather
+ than plain numbers.
+ * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
+ * cpu-m68k.c (arch_info_struct): Likewise. Add entry for
+ m68k:68000.
+ (bfd_m68k_arch): Set mach field to zero to signal no explicit
+ selection, change printable_name to just "m68k" and make that the
+ default instead of m68k:68020.
+
+ * aout-tic30.c (NAME): Define this to avoid multiple definitions
+ from aoutx.h.
+ (MY_get_section_contents): Define as aout_32_get_section_contents
+ rather than NAME(aout,get_section_contents).
+
+ * elf-m10300.c (elf32_mn10300_link_hash_table_create): Fix cast.
+
+ * evax-alpha.c (evax_set_arch_mach): Only accept bfd_arch_alpha
+ and call bfd_default_set_arch_mach to do the real work.
+
+Wed Mar 25 10:41:35 1998 Richard Henderson <rth@cygnus.com>
+
+ * bout.c (BALX): Include return register g14 as part of the insn.
+ (BALX_MASK): New.
+ (calljx_callback): Use it.
+
+Wed Mar 25 11:19:28 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * libbfd-in.h (BFD_ALIGN): Cast this parameter to bfd_vma.
+ * libbfd.h: Rebuild.
+
+ * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Change
+ byte_count to unsigned int.
+ (mn10300_elf_relax_section): Initialize internal_relocs. Remove
+ unused local variables.
+
+ * evax-alpha.c (evax_close_and_cleanup): Remove unused local
+ variables er and er1.
+
+ * cpu-v850.c: Include <ctype.h>.
+ (scan): Case isdigit argument to unsigned char.
+
+ From Yan Meroth <YAN.MEROTH@st.com>:
+ * ihex.c (ihex_scan): Add extbase variable so that getting an
+ extended linear address record does not ignore any previous
+ extended address.
+ (ihex_write_object_contents): When writing out an extended linear
+ address record, zero out any previous extended address.
+
+Tue Mar 24 16:09:43 1998 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * ieee.c (do_one): Check section before dereferencing it.
+ (ieee_canonicalize_reloc): Likewise with src->relent.sym_ptr_ptr.
+ (ieee_generic_stat_arch_elt): Likewise with abfd->my_archive.
+
+Mon Mar 23 18:51:47 1998 Joel Sherrill <joel@OARcorp.com>
+
+ * config.bfd: (sh*-*-rtems*): Switched from ELF to COFF.
+
+Mon Mar 23 14:23:36 1998 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c: Add interworking functions to pe backends.
+
+Fri Mar 20 18:47:20 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Use AM_DISABLE_SHARED.
+ * aclocal.m4, configure: Rebuild with libtool 1.2.
+
+Fri Mar 20 11:25:41 1998 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (coff_arm_relocate_section): Better error messages
+ when interowrking conflucts occur. Courtesy of Jonathan Walton
+ and Tony Thompson. PR 15357.
+ (aoutarm_std_reloc_howto): Fixed bitsize fields of rightshifted
+ relocations. Patch courtesy of Jonathan Walton and Tony
+ Thompson. PR 15373.
+
+Fri Mar 20 02:26:43 1998 Richard Henderson <rth@cygnus.com>
+
+ * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Revert
+ part of Feb 22 change controling when to override the existing
+ symbol with the .plt entry.
+
+Wed Mar 18 09:26:25 1998 Nick Clifton <nickc@cygnus.com>
+
+ * config.bfd (targ_cpu): Add thumb-pe target.
+
+ * coffcode.h (OTHER_GLOBAL_CLASS): Support thumb external
+ functions in PE build.
+
+Sun Mar 8 23:37:26 1998 Stan Cox <scox@equinox.cygnus.com>
+
+ * config.bfd (sparclite-*-elf*): Added.
+
+Mon Feb 23 19:31:19 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Add elf.lo to elf shell variable.
+ * Makefile.am (BFD_LIBS): Remove elf.lo.
+ (BFD_LIBS_CFILES): Remove elf.c.
+ (BFD32_BACKENDS): Add elf.lo.
+ (BFD32_BACKENDS_CFILES): Add elf.c.
+ * configure, Makefile.in: Rebuild.
+
+1998-02-23 15:53 Richard Henderson <rth@cygnus.com>
+
+ * elf32-i386.c (elf_i386_relocate_section): A pc-relative
+ relocation against a now-local symbol should not have a dynamic
+ relocation.
+
+Mon Feb 23 16:17:08 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * peicode.h (coff_swap_filehdr_in): Don't set BFD flag HAS_SYMS in
+ COFF filehdr flags.
+ (pe_print_private_bfd_data): Print PE flags. From Mikey
+ <jeffdb@netzone.com>.
+
+Sun Feb 22 20:39:00 1998 Richard Henderson <rth@cygnus.com>
+
+ * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Don't create
+ a plt entry when we can determine that we authoritatively define
+ the symbol.
+
+Sun Feb 22 20:33:05 1998 Richard Henderson <rth@cygnus.com>
+
+ * configure.in (COREFILE selection): Remove sparc-*-linux*. They
+ don't actually use trad-core, but a SunOS-style core file handled
+ by gdb directly.
+ * hosts/sparclinux.h: Remove.
+
+Wed Feb 18 15:31:06 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * peicode.h (pe_print_idata): If there is no .idata section, look
+ for the import tables in some other section. Make the initial
+ label line up better with the data. Print the import address
+ table even if there is no import name table. If the import
+ address table holds actual addresses, print them.
+
+Tue Feb 17 12:58:34 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * libbfd.c (bfd_seek): If fseek fails, save errno around call to
+ bfd_tell. If errno is EINVAL, set bfd_error_file_truncated, not
+ bfd_error_system_call.
+
+Fri Feb 13 13:11:33 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Define.
+ * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
+
+ From H.J. Lu <hjl@gnu.org>:
+ * Makefile.am (libbfd_la_LDFLAGS): Define.
+ * Makefile.in: Rebuild.
+
+Thu Feb 12 17:31:11 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ NetBSD patches from Gordon W. Ross <gwr@mc.com>:
+ * netbsd.h (MACHTYPE_OK): Define.
+ (MY(write_object_contents)): Use DEFAULT_ARCH and DEFAULT_MID when
+ calling N_SET_MACHTYPE, rather than having a switch.
+ * libaout.h (enum machine_type): Add M_PMAX_NETBSD, M_VAX_NETBSD,
+ and M_ALPHA_NETBSD.
+ * i386netbsd.c (MACHTYPE_OK): Don't define.
+ (DEFAULT_MID): Define.
+ * m68k4knetbsd.c (SEGMENT_SIZE): Don't define.
+ (MACHTYPE_OK): Don't define.
+ (DEFAULT_MID): Define.
+ * m68knetbsd.c: (MACHTYPE_OK): Don't define.
+ (DEFAULT_MID): Define.
+ * ns32knetbsd.c (MACHTYPE_OK): Don't define.
+ (DEFAULT_MID): Define.
+ * sparcnetbsd.c (MACHTYPE_OK): Don't define.
+ (DEFAULT_MID): Define.
+
+ NetBSD patches from Gordon W. Ross <gwr@mc.com>:
+ * vaxnetbsd.c: New file.
+ * netbsd-core.c: Clean up. Remove unused macros. Use netbsd
+ rather than netbsd_core.
+ * targets.c (vaxnetbsd_vec): Declare.
+ (bfd_target_vector): Add vaxnetbsd_vec. If NETBSD_CORE is
+ defined, add netbsd_core_vec.
+ * configure.in: Set COREFILE for alpha*-*-netbsd* and
+ powerpc-*-netbsd* to netbsd-core.lo. If COREFILE is
+ netbsd-core.lo, set COREFLAG to -DNETBSD_CORE.
+ * config.bfd (alpha*-*-netbsd*): New target.
+ * Makefile.am: Rebuild dependencies.
+ (BFD32_BACKENDS): Add vaxnetbsd.lo.
+ (BFD32_BACKENDS_CFILES): Add vaxnetbsd.c.
+ * configure, Makefile.in: Rebuild.
+
+ * configure.host: Remove the old shared library build stuff. We
+ now use libtool instead.
+
+Wed Feb 11 17:13:09 1998 Richard Henderson <rth@cygnus.com>
+
+ * tekhex.c (tekhex_write_object_contents): Call tekhex_init.
+
+Tue Feb 10 19:23:28 1998 H.J. Lu <hjl@gnu.org>
+
+ * configure.in: Take stab-syms.lo out of sparclinux_vec list.
+ * configure: Rebuild.
+
+Tue Feb 10 15:16:38 1998 Nick Clifton <nickc@cygnus.com>
+ * elf32-v850.c (remember_hi16s_reloc): New function.
+ (find_remembered_hi16s_reloc): New function.
+ (v850_elf_store_addend_in_insn): Use the above new functions to
+ match up HI6S relocs with LO16 relocs.
+
+Tue Feb 10 15:01:39 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Change -linux* to -linux-gnu*.
+ * config.bfd, configure.host: Likewise.
+ * configure: Rebuild.
+
+Mon Feb 9 19:40:59 1998 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_store_addend_in_insn): Fix another
+ LO16/HI16S bug and improve comments about what is going on.
+
+Sat Feb 7 15:27:03 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure, aclocal.m4: Rebuild with new libtool.
+
+Fri Feb 6 11:50:22 1998 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): For BFD_RELOC_CTOR
+ get the size from bfd_arch_bits_per_address instead of directly
+ from the isa.
+
+Thu Feb 5 14:21:34 1998 Michael Meissner <meissner@cygnus.com>
+
+ * libbfd-in.h (BFD_ALIGN): If rounding up would cause the address
+ to wrap, just return all 1's bits instead.
+ * libbfd.h: Regenerate.
+
+Thu Feb 5 11:51:05 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-i386.c (coff_pe_i386_relocate_section): New static function
+ if COFF_WITH_PE.
+ (coff_relocate_section): If COFF_WITH_PE, define as
+ coff_pe_i386_relocate_section.
+ * coffcode.h (coff_write_object_contents): If COFF_IMAGE_WITH_PE,
+ skip empty sections, to match coff_write_object_contents.
+
+ * elf64-mips.c (mips_elf64_swap_reloca_out): Swap out r_addend,
+ rather than swapping out r_offset twice. From Luke Deller
+ <luked@cse.unsw.edu.au>.
+
+Wed Feb 4 19:11:28 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Set libtool_enable_shared rather than
+ libtool_shared. Remove diversion hack.
+ * configure, Makefile.in, doc/Makefile.in, aclocal.m4: Rebuild
+ with new libtool.
+
+Wed Feb 4 16:10:21 1998 Brent Baccala <baccala@freesoft.org>
+
+ * syms.c (struct stab_cache): Define.
+ (struct stab_find_info): Remove cached_offset, cached_stab,
+ cached_str, and cached_stroff fields. Add file_cache,
+ function_cache, and line_cache fields.
+ (_bfd_stab_section_find_nearest_line): Use extensive caching to
+ speed up searches.
+
+Wed Feb 4 13:34:22 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * peicode.h (pe_print_idata): Check for import of ordinal rather
+ than name.
+ (pe_print_edata): If there is no .edata section, look for the
+ export data in some other section.
+
+Mon Feb 2 20:05:42 1998 Jason Molenda (crash@bugshack.cygnus.com)
+
+ * configure.in: Change version to 2.8.4.
+ * configure: Regenerated.
+
+Mon Feb 2 17:39:39 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
+
+ Add tms320c30 support:
+ * cpu-tic30.c: New file.
+ * aout-tic30.c: New file.
+ * coff-tic30.c: New file.
+ * archures.c (bfd_arch_tic30): Define.
+ (bfd_tic30_arch): Declare.
+ (bfd_archures_list): Add bfd_tic30_arch.
+ * targets.c (bfd_target_vector): Add tic30_aout_vec and
+ tic30_coff_vec.
+ * reloc.c (BFD_RELOC_TIC30_LDP): Define.
+ * coffcode.h (coff_set_arch_mach_hook): Add tic30 case.
+ (coff_set_flags): Likewise.
+ * config.bfd (tic30-*-*aout*, tic30-*-*coff*): New targets.
+ * configure.in (tic30_aout_vec, tic30_coff_vec): New vectors.
+ * Makefile.am: Rebuild dependencies.
+ (ALL_MACHINES): Add cpu-tic30.lo.
+ (ALL_MACHINES_CFILES): Add cpu-tic30.c.
+ (BFD32_BACKENDS): Add aout-tic30.lo and coff-tic30.lo.
+ (BFD32_BACKENDS_CFILES): Add aout-tic30.c and coff-tic30.c.
+ * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
+
+Mon Feb 2 12:25:12 1998 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_store_addend_in_insn): Allow HI16_S reloc
+ to lag behind LO16 reloc by a couple of instructions.
+
+Mon Feb 2 14:09:46 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am ($(srcdir)/bfd-in2.h): Add dummy command to force
+ make to reexamine the file timestamp.
+ ($(srcdir)/libbfd.h, $(srcddir)/libcoff.h): Likewise.
+
+ * elf64-alpha.c (ELF_MAXPAGESIZE): Change to 0x10000 from
+ 0x100000.
+
+Fri Jan 30 19:07:07 1998 Geoff Keating <geoffk@ozemail.com.au>
+
+ * elf32-ppc.c (ppc_elf_create_dynamic_sections): New procedure
+ to create .dynsbss and .rela.sbss sections.
+ (ppc_elf_adjust_dynamic_symbol): Put space for small data to be
+ copied from dynamic objects into .sbss.
+ (ppc_elf_size_dynamic_sections): Strip .rela.sbss if we don't
+ use it. Correct typo of .rela.sdata2.
+ (ppc_elf_finish_dynamic_symbol): Generate reloc to where we
+ put the data, which may now be in .sbss.
+ (ppc_elf_relocate_section): A SDAREL16 reloc can be in dynsbss.
+ (elf_backend_create_dynamic_sections): Define as
+ ppc_elf_create_dynamic_sections.
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Don't emit R_PPC_REL* relocs
+ against _GLOBAL_OFFSET_TABLE_.
+ (ppc_elf_relocate_section): Don't emit R_PPC_REL32 relocs in
+ shared libraries which refer to local symbols. Make sure that the
+ test for allocating space for a reloc in a shared object is the
+ same as the test for emitting a reloc.
+
+Thu Jan 29 15:55:35 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
+
+ * config.bfd (i[3456]-*-mingw32*): New target.
+ * acinclude.m4 (BFD_BINARY_OPEN): Check for mingw32.
+ * aclocal.m4, configure: Rebuild.
+
+Wed Jan 28 13:41:26 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we
+ have a bfd_object.
+
+Tue Jan 27 21:43:55 1998 Richard Henderson <rth@cygnus.com>
+
+ Sparc v9 ABI compliant PLT:
+ * elf64-sparc.c (PLT_HEADER_SIZE): V9 ABI uses 4 entries.
+ (plt_templates, sparc64_elf_build_plt_entry): Delete.
+ (LARGE_PLT_THRESHOLD): New define.
+ (GOT_RESERVED_ENTRIES): V9 ABI only uses 1.
+ (sparc64_elf_build_plt): New function.
+ (sparc64_elf_plt_entry_offset): Likewise.
+ (sparc64_elf_plt_ptr_offset): Likewise.
+ (sparc64_elf_adjust_dynamic_symbol): Change h->plt_offset to
+ contain the index for convenience. Skip the initial entries
+ in .rela.plt.
+ (sparc64_elf_size_dynamic_sections): Zero the allocated contents
+ memory for the benefit of .rela.plt.
+ (sparc64_elf_relocate_section): Call sparc64_elf_plt_entry_offset.
+ (sparc64_elf_finish_dynamic_symbol): Kill template stuff. Use
+ sparc64_elf_plt_entry_offset & sparc64_elf_plt_ptr_offset for reloc.
+ (sparc64_elf_finish_dynamic_sections): DT_PLTGOT points to .plt.
+ Call sparc64_elf_build_plt.
+ (elf_backend_want_got_plt): No.
+ (elf_backend_plt_readonly): No.
+ (elf_backend_plt_alignment): 8.
+
+ * elf.c (_bfd_elf_close_and_cleanup): New function; free the shstrtab.
+ * elf-bfd.h (_bfd_elf_close_and_cleanup): Declare it.
+ * elfxx-target.h (bfd_elfNN_close_and_cleanup): Arrange for it
+ to be called.
+
+Tue Jan 27 21:45:15 1998 Jeffrey A Law (law@cygnus.com)
+
+ * archures.c (bfd_mach_mips*): Add definitions for various MIPS
+ processors.
+ * cpu-mips.c (arch_info_struct): Add mips variants.
+ * bfd-in2.h: Rebuilt.
+
+Tue Jan 27 15:06:04 1998 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (coff_arm_relocate_section): Fix for PR14752 by
+ preserving the contents of t2a3_b_insn.
+
+Tue Jan 27 12:47:27 1998 Robert Lipe <robertl@dgii.com>
+
+ * config.bfd (i[3456]86-sco3.2v5*): ELF now the default.
+ (i[3456]86sco3.2v5*coff): New target.
+
+Mon Jan 26 15:41:30 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * bfd-in2.h: Rebuild with changes to chew--tab expansion.
+
+Thu Jan 22 21:26:48 1998 Richard Henderson <rth@cygnus.com>
+
+ * bfd.c (bfd_get_error_handler): Add orthogonal function.
+ * bfd-in2.h: Regenerate.
+
+Thu Jan 22 21:13:39 1998 Richard Henderson <rth@cygnus.com>
+
+ * tekhex.c (tekhex_write_object_contents): Check for no symbols.
+
+Wed Jan 21 21:19:03 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-i386.c (coff_i386_rtype_to_howto): If COFF_WITH_PE, don't
+ adjust addend for an output common symbol (from Jimmy Blair
+ <jimmyb@wrs.com>). If COFF_WITH_PE, adjust addend for PC relative
+ defined symbol to counteract adjustment made in generic relocation
+ code.
+
+ * dwarf2.c: Include sysdep.h, not stdio.h and stdlib.h.
+
+Wed Jan 21 21:16:06 1998 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * coff-m88k.c (GET_SCNDHR_NRELOC): Fix typo in macro name.
+ (GET_SCNDHR_NLNNO): Likewise.
+
+Mon Jan 19 12:49:52 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * cpu-sh.c (arch_info_struct): Correct next field of sh3e.
+
+Wed Jan 14 17:23:27 1998 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-m32r.c: Add macros to handle NOP insertion.
+
+Wed Jan 14 16:15:22 1998 Richard Henderson <rth@cygnus.com>
+
+ * xcofflink.c (xcoff_mark_symbol): Don't mark the absolute section.
+ (xcoff_mark): Likewise.
+ (xcoff_build_ldsyms): Mark absolute symbols.
+
+Wed Jan 14 16:03:11 1998 Richard Henderson <rth@cygnus.com>
+
+ * bout.c (b_out_write_object_contents): Sort symbols before output
+ to keep {CALL,BAL}NAME symbols adjacent.
+ (b_out_symbol_cmp): New function.
+
+Tue Dec 30 12:45:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-sparc.c (elf32_sparc_check_relocs): If -Bsymbolic, don't
+ allocate space for a PC relative reloc against a symbol which is
+ defined in a regular file.
+ (elf32_sparc_relocate_section): If -Bsymbolic, don't copy a PC
+ relative reloc against a symbol which is defined in a regular
+ file.
+
+Mon Dec 29 18:02:28 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ From Jonathan Stone <jonathan@DSG.Stanford.EDU>:
+ * config.bfd (mips-dec-netbsd*): Add ECOFF vectors to
+ targ_selvecs.
+ (mips*el-*-netbsd*): Like mips-dec-netbsd*.
+ (mips*-*-netbsd*): New target.
+
+Mon Dec 29 17:13:28 1997 H.J. Lu (hjl@gnu.org)
+
+ * elflink.h (elf_link_assign_sym_version): Change error message
+ from "undefined version name" to "undefined versioned symbol
+ name".
+
+Mon Dec 29 11:41:16 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (coff_arm_relocate_section): Fix typo from previous
+ delta.
+
+Tue Dec 23 17:01:10 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Declare.
+ * libbfd.h: Rebuild.
+
+ * peicode.h (coff_swap_scnhdr_out): Set .reloc section to be
+ shared. Set stab* sections to be shared and read. Set .rsrc
+ section to be read and shared.
+
+Mon Dec 22 13:20:57 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am: Rebuild dependencies.
+ (ALL_MACHINES_CFILES): Add dwarf2.lo.
+ (ALL_MACHINES_CFILES): Add dwarf2.c.
+ * Makefile.in: Rebuild.
+
+ * coff-arm.c: Don't include obstack.h.
+
+Mon Dec 22 13:04:33 1997 Joel Sherrill <joel@oarcorp.com>
+
+ * config.bfd (i[3456]86*-go32-rtems*): Fix to be the same as
+ i[3456]86-go32.
+
+Thu Dec 18 16:01:25 1997 Doug Evans <devans@canuck.cygnus.com>
+
+ * configure: Regenerate to get @SHELL@ substituted.
+
+Wed Dec 17 09:45:09 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (coff_arm_relocate_section): Only look at section
+ owner if there is one.
+
+ * elf.c (assign_file_positions_for_segments): Fail if there is not
+ enough room for the program headers. (PR14186)
+
+Tue Dec 16 08:09:56 1997 Gavin Koch <gavin@cygnus.com>
+
+ * elf.c (_bfd_elf_find_nearest_line): Call
+ _bfd_dwarf2_find_nearest_line first.
+ * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Same.
+ * dwarf2.c: New file; implement _bfd_dwarf2_find_nearest_line.
+
+Mon Dec 15 16:08:52 1997 Nick Clifton <nickc@cygnus.com>
+
+ * archures.c: Add bfd_mach_m32r.
+
+Mon Dec 15 16:11:22 1997 Fred Fish <fnf@cygnus.com>
+
+ * coffcode.h (ALIGN_SECTIONS_IN_FILE): Define if I960 not defined.
+ (coff_compute_section_file_positions): Use ALIGN_SECTIONS_IN_FILE
+ to decide when to align the file sections for paging.
+
+Mon Dec 15 15:01:15 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-m32r.c (m32r_elf_object_p): New Function.
+ (m32r_elf_final_write_processing): New Function.
+ (m32r_elf_set_private_flags): New Function.
+ (m32r_elf_copy_private_bfd_data): New Function.
+ (m32r_elf_merge_private_bfd_data): New Function.
+ (m32r_elf_print_private_bfd_data): New Function.
+ (elf_backend_object_p): Point to m32r_object_p.
+ (elf_backend_final_write_processing): Point to
+ m32r_elf_final_write_processing.
+ (bfd_elf32_bfd_copy_private_bfd_data): Point to
+ m32r_elf_copy_private_bfd_data.
+ (bfd_elf32_bfd_merge_private_bfd_data): Point to
+ m32r_elf_merge_private_bfd_data.
+ (bfd_elf32_bfd_set_private_flags): Point to
+ m32r_elf_set_private_bfd_data.
+ (bfd_elf32_bfd_print_private_bfd_data): Point to
+ m32r_elf_print_private_bfd_data.
+
+
+ * bfd-in2.h (bfd_mach_m32r): Add identifier for M32R architecture
+ machines.
+
+Fri Dec 12 11:30:28 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
+
+ * configure: Only build libbfd shared if --enable-shared's value
+ was `yes', or was set to `*bfd*'.
+ * aclocal.m4: Likewise.
+ * NOTE: this really needs to be fixed in libtool/libtool.m4, the
+ original source of this bit of code. It's not clear what the best fix
+ would be, though.
+
+Thu Dec 11 17:48:11 1997 Richard Henderson <rth@cygnus.com>
+
+ * linker.c (generic_link_add_symbol_list): Always init udata.p so
+ that the generic relaxation code can function when input and output
+ file formats are mismatched.
+
+Thu Dec 11 01:02:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-sh.c (bfd_coff_small_swap_table): Initialize new fields.
+
+ * elf.c (assign_file_positions_for_segments): For a loadable
+ section, make sure that the load address is correct relative to
+ the load address of the segment plus the size of the segment so
+ far.
+
+ * coffcode.h (_coff_link_output_has_begun): Make static.
+ (_coff_final_link_postscript): Likewise.
+
+Wed Dec 10 23:37:11 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_input_bfd): Handle a relocateable link in
+ which a relocation refers to an indirect or warning symbol.
+
+Wed Dec 10 11:15:55 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (bfd_arm_coff_final_link): Function deleted.
+ (coff_arm_final_link_postscript): New function.
+ (coff_arm_link_output_has_begun): New function.
+
+ * libcoff.h (struct bfd_coff_backend_data): Add new fields:
+ _bfd_coff_link_output_has_begun and
+ _bfd_coff_final_link_postscript. Add new macros:
+ bfd_coff_link_output_has_begun() and
+ bfd_coff_final_link_postscript().
+
+ * cofflink.c (_bfd_coff_final_link): Insert calls to
+ bfd_coff_link_output_has_begun() and
+ bfd_coff_final_link_postscript().
+
+ * coffcode.h: Add two new fields to bfd_coff_backend_data
+ structure: _bfd_coff_link_output_has_begun and
+ _bfd_coff_final_link_postscript. Add default initialisers for
+ these fields. Add overridable aliases for the coff swap functions
+ in the backend data structure.
+
+ * elf32-v850.c: Update with patches from the branch to fix
+ HI16_S/LO16 reloc pairs.
+
+Tue Dec 9 11:37:53 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * archures.c (bfd_mach_mips*): Define.
+ (bfd_default_scan): For 3000 and 4000 replace magic constant with
+ macro.
+
+ * cpu-mips.c (N): Define.
+ (bfd_mips_arch, arch_info_struct): Re-write using macro N, replace
+ numbers with bfd_mach_mips* macros.
+
+Fri Dec 5 11:13:46 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_reloc, v850_elf_store_addend_in_insn,
+ v850_elf_relocate_section): Fix PR2 14180 and 14181
+ (v850_elf_section_from_bfd_section, v850_elf_symbol_processing,
+ v850_elf_add_symbol_hook, v850_elf_link_output_symbol_hook,
+ v850_elf_section_from_shdr, v850_elf_fake_sections): New functions
+ (for PR14180) to create and handle special common sections.
+ (v850_elf_final_link_relocate): Fix HI16 and HI16_S relocations
+ which have data stored in the instructions. PR14258.
+
+Tue Dec 2 10:26:16 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (TARGET_UNDERSCORE): Revert back to '_'
+ (USER_LABEL_PREFIX): Revert back to '_'
+
+ * config.bfd (targ_cpu): Add support for Thumb target.
+
+Mon Dec 1 20:24:18 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * coff-sh.c (sh_coff_howtos): Add R_SH_SWITCH8 entry.
+ (get_symbol_value): Handle R_SH_SWITCH8.
+ (sh_relax_delete_bytes): Likewise.
+
+Wed Nov 26 14:13:34 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (TARGET_UNDERSCORE): Changed to match definition in
+ gcc/config/arm/semi.h
+
+ * coffcode.h (coff_slurp_symbol_table): Add ARM and Thumb symbol
+ classes.
+
+Sun Nov 23 16:02:58 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * freebsd.h (SWAP_MAGIC): Read magic number little and not big
+ endian.
+
+Wed Nov 26 09:30:37 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coffcode.h (coff_mkobject_hook): Only set private flags for non
+ PE ARM ports.
+
+Tue Nov 25 15:33:23 1997 Richard Henderson <rth@cygnus.com>
+
+ * binary.c (binary_set_section_contents): Also ignore NEVER_LOAD
+ sections.
+
+Tue Nov 25 10:55:36 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): Do not
+ complain if inout and output formats differ.
+
+Tue Nov 25 11:26:27 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (BFD32_BACKENDS): Remove tekhex.lo.
+ (BFD32_BACKENDS_CFILES): Remove tekhex.c.
+ * Makefile.in: Rebuild.
+ * aclocal.m4, configure, src/Makefile.in: Rebuild with current
+ automake and autoconf.
+
+ * coff-arm.c (arm_allocate_interworking_sections): Fix typo
+ (COFF_WITH_PR to COFF_WITH_PE).
+
+Mon Nov 24 15:47:49 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c: Make variables and some functions static, so that
+ this file can be included in multiple object files.
+ (coff_arm_bfd_final_link): Fix minor bug.
+
+Sat Nov 22 15:16:00 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c: Add support for PIC and APCS-FLOAT type binaries.
+
+ * coffcode.h: Add support for PIC and APCS-FLOAT type binaries.
+
+Sat Nov 22 16:06:56 1997 Klaus Kaempf <kkaempf@progis.de>
+
+ * evax-emh.c (_bfd_evax_write_emh): Use alloca instead of strdup.
+
+Sat Nov 22 12:29:30 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * sunos.c (sunos_add_one_symbol): When overriding a defined
+ symbol, set it to undefined, not new.
+
+ * elf32-sh.c (sh_elf_relax_delete_bytes): Don't kill LABEL
+ relocs.
+
+Fri Nov 21 14:14:22 1997 Richard Henderson <rth@cygnus.com>
+
+ * coff-sh.c (sh_relax_section): Force sign extention of USES r_offset.
+ (sh_relax_delete_bytes): Don't kill LABEL relocs.
+
+Mon Nov 17 15:08:38 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Fix typo.
+ (mn10300_elf_relax_section): Likewise.
+
+Sat Nov 15 15:36:07 1997 Fred Fish <fnf@cygnus.com>
+
+ * peicode.h (coff_swap_aouthdr_in): Cast second arg of
+ bfd_h_get_* calls to "bfd_byte *".
+
+Tue Nov 11 10:37:23 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field
+ "movm_stack_size".
+ (mn10300_elf_relax_section): Include stack space for register saves
+ in the imm8 field of a "call" instruction.
+ (compute_function_info): Determine how much stack is allocated by
+ the movm instruction. Fix typo.
+ (elf32_mn10300_link_hash_newfunc): Initialize movm_stack_size.
+
+Mon Nov 10 14:32:40 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't crash if
+ a version dependency could not be found.
+
+Tue Nov 4 12:05:56 1997 Klaus K"ampf <kkaempf@progis.de>
+
+ * configure.com: Get version info from configure.in
+
+Fri Oct 24 11:15:58 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz>
+
+ * elf64-sparc.c (sparc64_elf_merge_private_bfd_data):
+ New function. Avoid mixing US1 and HAL R1 code.
+ Set resulting memory ordering to the strongest one used.
+ (sparc64_elf_object_p): Set bfd_mach correctly.
+
+Thu Oct 23 14:09:33 1997 Richard Henderson <rth@cygnus.com>
+
+ * elf64-sparc.c (sparc64_elf_howto_table): Add UA64 & UA16.
+ (sparc64_elf_check_relocs): Handle them.
+ (sparc64_elf_relocate_section): Likewise. Before emitting a dyn reloc,
+ check alignment and transmute R_SPARC_x<->R_SPARC_UAx.
+
+Thu Oct 23 00:53:14 1997 Richard Henderson <rth@dot.cygnus.com>
+
+ * configure.in (sparc*-*-linux*): Use trad-core and ...
+ * hosts/sparclinux.h: New file.
+
+Thu Oct 23 00:25:29 1997 Richard Henderson <rth@dot.cygnus.com>
+
+ * config.bfd (sparc64-*-linux*): New target.
+
+ * elf-bfd.h (struct elf_backend_data): Add plt_alignment member.
+ * elflink.c (_bfd_elf_create_got_section): Set .got alignment based
+ on arch_size.
+ (_bfd_elf_create_dynamic_sections): Likewise for .rel* sections.
+ Set .plt alignment from new plt_alignment.
+ * elflink.h (elf_link_create_dynamic_sections): Set version section
+ alignment to LOG_FILE_ALIGN.
+ * elfxx-target.h (elf_backend_plt_alignment): Provide default.
+ (elfXX_bed): Init plt_alignment.
+
+ * elf64-sparc.c (sparc64_elf_check_relocs,
+ sparc64_elf_adjust_dynamic_symbol, sparc64_elf_size_dynamic_sections,
+ sparc64_elf_adjust_dynindx, sparc64_elf_finish_dynamic_symbol,
+ sparc64_elf_finish_dynamic_sections): New functions.
+ (sparc64_elf_howto_table): Fix a few name strings.
+ (ELF_DYNAMIC_INTERPRETER): New definition.
+ (sparc64_elf_relocate_section): Handle shared libraries.
+
+ * elf64-sparc.c (struct plt_template, plt_*_header, plt_*_entry,
+ sparc64_elf_build_plt_entry, sparc64_elf_finish_dynamic_symbol):
+ PLT definitions sparc64-linux originally choose. These will go
+ away soon in favour of the official abi definitions.
+
+Wed Oct 22 16:08:45 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-sh.c (coff_small_object_p): New static function.
+ (coff_small_new_section_hook): New static function.
+ (bfd_coff_small_swap_table): New static const structure.
+ (coff_small_close_and_cleanup): Define.
+ (coff_small_bfd_free_cached_info): Define.
+ (coff_small_get_section_contents): Define.
+ (coff_small_get_section_contents_in_window): Define.
+ (shcoff_small_vec): New static structure.
+ (shlcoff_small_vec): New static structure.
+ * targets.c (bfd_target_vector): Add shcoff_small_vec and
+ shlcoff_small_vec.
+ * config.bfd (sh-*-elf*): Add shcoff_small_vec and
+ shlcoff_small_vec to targ_selvecs.
+ (sh-*-*): Likewise.
+ * configure.in: Add shcoff_small_vec and shlcoff_small_vec cases.
+ * configure: Rebuild.
+
+Mon Oct 20 15:01:27 1997 Klaus K"ampf <kkaempf@progis.de>
+
+ * evax-egsd.c: Weak symbols are global.
+
+ * evax-emh.c: Use proper casts.
+
+ * evax-egsd.c (_bfd_evax_write_egsd): Remove unneeded uname.
+
+ * evax-egsd.c: Section names and symbols have different
+ length restrictions. Add length parameter to
+ _bfd_evax_length_hash_symbol.
+ * evax-etir.c: Likewise.
+ * evax-misc.c (_bfd_evax_length_hash_symbol): Add length
+ parameter.
+ * evax.h (EOBJ_S_C_SECSIZ): Define.
+
+ * evax-alpha.c: Remove duplicate test.
+
+ * evax-emh.c: SYS$ functions are upper-case.
+
+ * evax-egsd.c: Create separate sections for common symbols.
+ * evax-etir.c: Don't output common section.
+ * evax.h: Bump up section count.
+
+ * configure.com: Use 64bit integers with DEC C.
+
+ * evax-egsd.c: Make section flags dec c compatible.
+
+Mon Oct 20 09:38:31 1997 Jeffrey A Law (law@cygnus.com)
+
+ * som.c (normalize): Delete function.
+ (som_bfd_ar_write_symbol_stuff): New parameter elength. All callers
+ changed. Use passed in elength to determine size of the extended
+ name table instead of computing it again.
+
+Sun Oct 19 23:36:21 1997 Jim Wilson <wilson@cygnus.com>
+
+ * peicode.h (coff_swap_scnhdr_out): Use |= not = to set
+ IMAGE_SCN_MEM_READ for an unrecognized section.
+
+Sun Oct 19 21:04:56 1997 Jeffrey A Law (law@cygnus.com)
+
+ * som.c (som_bfd_ar_write_symbol_stuff): Account for trailing
+ '/' in the extended name table.
+
+Fri Oct 17 00:04:13 1997 Richard Henderson <rth@cygnus.com>
+
+ * elflink.h (elf_link_assign_sym_version): For explicitly versioned
+ symbols, check globals list before matching on locals.
+
+Thu Oct 16 08:17:06 1997 Michael Meissner <meissner@cygnus.com>
+
+ * peicode.h (coff_swap_scnhdr_out,pe_print_idata): Fix mangled
+ patch.
+
+Wed Oct 15 13:45:10 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * peicode.h (pe_mkobject_hook): Set DLL flag.
+ (pe_bfd_copy_private_bfd_data): Copy DLL flag.
+
+ * peicode.h (coff_swap_scnhdr_out): Set IMAGE_SCN_MEM_DISCARDABLE
+ for .stab* sections. Replace strlen of constant strings with
+ number.
+
+Tue Oct 14 15:42:45 1997 Richard Henderson <rth@cygnus.com>
+
+ * elf64-alpha.c (elf64_alpha_merge_ind_symbols): New function to
+ merge got and reloc entries from ind syms to their target.
+ (elf64_alpha_always_size_sections): Call it.
+ (elf64_alpha_check_relocs): Operate on the target of indirect symbols.
+ (elf64_alpha_can_merge_gots): Likewise.
+ (elf64_alpha_merge_gots): Likewise.
+
+ * elf64-alpha.c (elf64_alpha_relocate_section): Back out HJ's change,
+ as it is insufficient to handle the relocation changes as well.
+
+Mon Oct 13 23:10:08 1997 Richard Henderson <rth@cygnus.com>
+
+ * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Allow for RELATIVE
+ relocs for symbols in shlibs that have been forced local.
+ (elf64_alpha_relocate_section): Output RELATIVEs in .got for same.
+
+Mon Oct 13 21:24:04 1997 Richard Henderson <rth@cygnus.com>
+
+ * elf64-alpha.c (elf64_alpha_relocate_section): Use the
+ got_enties of the default symbol for the default versioned
+ symbol. Patch from hjl@gnu.ai.mit.edu, modified not to use
+ alloca in the loop.
+
+Mon Oct 13 17:37:37 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_final_link_relocate): Only use the bottom
+ 24 bits of the PC when computing a PC relative relocation.
+
+Fri Oct 10 16:01:30 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_reloc, v850_elf_final_link_relocate):
+ Correct value for maximum positive 22 bit PC relative relocation.
+ (v850_elf_final_link_relocate): Prevent overflow from HI16_S and
+ HI_16 relocations. Correct bit adjustment in TDA offsets.
+
+Thu Oct 9 16:43:39 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * elf64-sparc.c (sparc_elf_{hix22,lox10}_reloc): New functions.
+ (sparc64_elf_howto_table): Use them for HIX22,LOX10 relocs.
+
+Wed Oct 8 11:38:45 1997 Richard Henderson <rth@cygnus.com>
+
+ * elfcore.h (bfd_prstatus): Pedanticly, alignment_power should
+ be LOG_FILE_ALIGN.
+
+Wed Oct 8 11:36:00 1997 Richard Henderson <rth@cygnus.com>
+
+ * config.bfd: Missed one alpha* change.
+
+Tue Oct 7 13:00:17 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove BFD64 support.
+ * elf64-sparc.c (SPARC64_OLD_RELOCS): Undef.
+ (MINUS_ONE): New macro.
+ (sparc_elf_notsup_reloc): New function.
+ (sparc64_elf_howto_table): Add entries for DISP64,PLT64,HIX22,LOX10,
+ H44,M44,L44,REGISTER.
+ (sparc_reloc_map): Likewise. Map BFD_RELOC_CTOR to R_SPARC_64.
+ (init_insn_reloc): New function.
+ (sparc_elf_wdisp16_reloc): Use it.
+ (sparc64_elf_relocate_section): Add entries for OLO10,HIX22,LOX10.
+
+Tue Oct 7 11:40:37 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * som.c (som_construct_extended_name_table): Remove static
+ function, and define as macro instead.
+
+Fri Oct 3 14:02:17 1997 Richard Henderson <rth@cygnus.com>
+
+ * config.bfd: Change alpha-*-* to alpha*-*-*; config.guess now
+ recognizes alphaev5 etc.
+ * configure.host: Likewise.
+
+Fri Oct 3 11:23:47 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ Make ld -s work on AIX:
+ * xcofflink.c (xcoff_link_add_symbols): Don't create the .debug
+ section if we are stripping.
+ (bfd_xcoff_size_dynamic_sections): Don't set the .debug section
+ size if we are stripping.
+ (_bfd_xcoff_bfd_final_link): Don't set SEC_RELOC or rel_filepos,
+ and don't write out relocs, if we are stripping.
+ (xcoff_link_input_bfd): Don't set up reloc if we are stripping.
+ (xcoff_write_global_symbol): Don't write out symbol or reloc if we
+ are stripping.
+
+ * configure.in: Don't include elf.lo again for ELF targets; it's
+ always in the library anyhow.
+ * configure: Rebuild.
+
+ * bfd-in2.h: Rebuild.
+
+ * elf32-sparc.c (sparc_elf_wdisp16_reloc): Cast to bfd_byte *, not
+ char *, when calling bfd_get_32 and bfd_put_32.
+ * sunos.c (sunos_scan_dynamic_symbol): Cast contents to char *
+ when calling strcpy.
+
+Thu Oct 2 16:15:50 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * reloc.c (bfd_check_overflow): New function.
+ (bfd_perform_relocation, bfd_install_relocation): Use it.
+ (BFD_RELOC_SPARC_{DISP64,PLT64}): New relocs.
+ (BFD_RELOC_SPARC_{HIX22,LOX10,H44,M44,L44,REGISTER}): New relocs.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+Thu Oct 2 13:17:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * peicode.h (coff_swap_scnhdr_out): Set IMAGE_SCN_MEM_READ for an
+ unrecognized section. From Jon Thackray <jont@harlequin.co.uk>.
+
+Wed Oct 1 14:03:44 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am ($(BFD_H)): Change stmp-bfd.h to stmp-bfd-h.
+ (stmp-bfd-h): Rename from stmp-bfd.h.
+ (BFD_H_FILES, LIBBFD_H_FILES, LIBCOFF_H_FILES): New variables.
+ ($(srcdir)/bfd-in2.h): Just depend upon stmp-bin2-h.
+ (stmp-bin2-h): New target.
+ ($(srcdir)/libbfd.h): Just depend upon stmp-lbfd-h.
+ (stmp-lbfd-h): New target.
+ ($(srcdir)/libcoff.h): Just depend upon stmp-lcoff-h.
+ (stmp-lcoff-h): New target.
+ (CLEANFILES): Change stmp-bfd.h to stmp-bfd-h. Add stmp-bin2.h,
+ stmp-lbfd-h, and stmp-lcoff-h.
+ * Makefile.in: Rebuild.
+
+ * configure.in: Use a diversion to set enable_shared before the
+ arguments are parsed.
+ * configure: Rebuild.
+
+Tue Sep 30 14:18:32 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * elf32-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
+ renamed to R_SPARC_UNUSED_42.
+ (sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
+ * elf64-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
+ renamed to R_SPARC_UNUSED_42.
+ (sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
+ * reloc.c (BFD_RELOC_SPARC_GLOB_JMP): Delete.
+ * bfd-in2.h: Regenerated.
+ * libbfd.h: Regenerated.
+
+Thu Sep 25 12:15:02 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_merge_symbol): Don't check the hash creator until
+ after we have set *sym_hash.
+
+Wed Sep 24 16:52:28 1997 Joel Sherrill <joel@oarcorp.com>
+
+ * config.bfd (sh*-*-rtems*): New target, like sh-*-*elf*.
+
+Wed Sep 24 11:27:23 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (libbfd_a_SOURCES): Define.
+ * Makefile.in: Rebuild.
+
+ * configure.in: Call AC_CHECK_TOOL before AM_PROG_LIBTOOL.
+ * aclocal.m4: Rebuild with new libtool.
+ * configure: Rebuild.
+
+Tue Sep 23 19:03:13 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (map_sections_to_segments): Even if we are not demand
+ paged, don't put a loadable section after a nonloadable section.
+ (assign_file_positions_for_segments): Increment the file offset
+ for a section with contents, even if it is not loadable.
+
+Thu Sep 18 15:04:57 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_check_relocs): Improve error message.
+
+Wed Sep 17 09:54:51 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_final_link_relocate): Add checks to catch
+ relocations against non-existant symbols.
+
+Tue Sep 16 14:20:27 1997 Nick Clifton <nickc@cygnus.com>
+
+ * reloc.c: Add BFR_RELOC_V850_TDA_16_16_OFFSET.
+
+ * elf32-v850.c (v850_elf_reloc, v850_elf_final_link_relocate,
+ v850_elf_howto_table, v850_elf_reloc_map): Add support for a 16
+ bit reloc in the tiny data area.
+
+Wed Sep 10 15:17:25 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_reloc): Remove spurious error message.
+
+Wed Sep 10 11:17:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * archures.c (bfd_default_scan): Use strcasecmp.
+ (bfd_default_scan): Test for match with arch_name + ":" +
+ printable_name.
+ (bfd_default_scan): Test for match with printable_name - ":".
+ (bfd_default_scan): Delete w65, h8300, h8500, z8k, i960 special
+ cases. Each implements their own scan function.
+ (bfd_default_scan): Delete 386, 2900, 860, mips 2000, mips 4400
+ special cases. Since info->mach == 0. The test mach == number
+ fails.
+ (bfd_arch_list): New function, return name of all the supported
+ architectures.
+
+Tue Sep 9 10:21:56 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_print_private_bfd_data): Break after
+ decoding architecture.
+ (v850_elf_reloc): Do not complain if a R_V850_LO16 reloc has bit
+ 15 set.
+
+Sun Sep 7 12:25:22 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
+
+ * bfd/elf64-alpha.c (reloc_howto_type): Fix the howto table.
+
+Thu Sep 4 09:44:10 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am: Rebuild dependencies.
+ (ALL_MACHINES_CFILES): Add cpu-v850.c.
+ (ALL_MACHINES_CFILES): Add elf32-v850.c.
+ * Makefile.in: Rebuild.
+
+ * reloc.c: Remove extraneous commas from relocation entries.
+ Remove BFD_RELOC_V850_16_PCREL.
+ * bfd-in2.h: Rebuild.
+
+ * xcofflink.c (xcoff_link_add_symbols): Put XTY_CM/XMC_TD symbols
+ in sections named .tocbss rather than .bss.
+
+Wed Sep 3 11:23:23 1997 Nick Clifton <nickc@cygnus.com>
+
+ * libbfd.h, bfd-in2.h, elf32-v850.c: Removed
+ BFD_RELOC_V850_16_PCREL.
+
+Tue Sep 2 20:44:10 1997 Fred Fish <fnf@cygnus.com>
+
+ * cofflink.c (coff_link_check_ar_symbols): Handle C_SYSTEM syms
+ the same as C_EXT syms.
+ (coff_link_add_symbols): Ditto.
+ (_bfd_coff_link_input_bfd): Ditto.
+ (_bfd_coff_write_task_globals): Add save_global_to_static. Use
+ it to preserve and restore state of global_to_static flag.
+
+Tue Sep 2 17:45:22 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_object_p): Set machine number based on
+ bits in e_flags field rather than magic numbers.
+ (v850_elf_final_write_processing, v850_elf_set_private_flags,
+ v850_elf_copy_private_bfd_data, v850_elf_merge_private_bfd_data,
+ v850_elf_print_private_bfd_data): New functions.
+
+
+Tue Sep 2 17:35:05 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * cpu-arc.c (arc_get_mach): Properly scan defined mach entries.
+
+Tue Sep 2 18:29:37 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf-m10200.c (mn10200_elf_final_link_relocate): PC relative
+ instructions are relative to the next instruction, not the
+ current instruction.
+ (mn10200_elf_relax_section): Similarly.
+
+Tue Sep 2 15:45:45 1997 Nick Clifton <nickc@cygnus.com>
+
+ * cpu-v850.c: Use a macro to construct bfd_arch_info_type
+ entries.
+
+ * reloc.c, libbfd.h, bfd-in2.h, elf32-v850.c: Replace
+ BFD_RELOC_V850_{SDA/TDA/ZDA}_OFFSET relocs with new bit pattern
+ specific versions: BFD_RELOC_V850_{area}_{bits}_OFFSET.
+
+Thu Aug 28 17:01:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * cpu-v850.c: Remove "plain" from v850 printable name.
+ (scan): Use strcasecmp.
+
+ * archures.c (bfd_mach_v850): Define.
+
+ * cpu-sh.c (scan_mach): Compare with table instead of hardwired to
+ just sh/SH, use strcasecmp.
+ (arch_info_struct): Add entries for sh3 et.al.
+
+ * archures.c (bfd_mach_sh, ...): Define.
+
+Wed Aug 27 17:33:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * archures.c (bfd_archures_list): Always NULL terminate the list.
+
+Tue Aug 26 17:26:51 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am: Rebuild dependencies.
+ (ALL_MACHINES_CFILES): Add cpu-arc.c.
+ (ALL_MACHINES_CFILES): Add elf32-arc.c.
+ (elf32-arc.lo): Remove explicit dependency.
+ * Makefile.in: Rebuild.
+
+ * acinclude.m4 (BFD_CC_FOR_BUILD): Set EXEEXT_FOR_BUILD.
+ * doc/Makefile.am (MKDOC): Use EXEEXT_FOR_BUILD, not EXEEXT.
+ * aclocal.m4, configure, Makefile.in, doc/Makefile.in: Rebuild.
+
+Mon Aug 25 16:14:34 1997 Christopher Provenzano <proven@cygnus.com>
+
+ * configure: Rebuild with latest devo autoconf for NT support
+
+Mon Aug 25 16:11:04 1997 Nick Clifton <nickc@cygnus.com>
+
+ * cpu-arm.c (compatible): If B is a default type, return A.
+
+Mon Aug 25 15:35:46 1997 Nick Clifton <nickc@cygnus.com>
+
+ * cpu-v850.c (scan): New function.
+ (arch_info_struct): New structure.
+ (bfd_v850_arch): Add link into arch_info_structure.
+
+ * config.bfd (targ_cpu): All v850 variants use the bfd_arch_v850
+ architecture.
+
+ * elf32-v850.c (v850_elf_object_p): New function.
+
+
+Mon Aug 25 14:07:33 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * syms.c (_bfd_stab_section_find_nearest_line): Clear the
+ cached_stab field if the offset prevents us from using the cache.
+
+Mon Aug 25 12:08:13 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * aout-target.h (MY(vec)): Add SEC_CODE and SEC_DATA to section
+ flags.
+ * aout-arm.c (aout_arm_little_vec): Likewise.
+ (aout_arm_big_vec): Likewise.
+ * bout.c (b_out_vec_big_host): Likewise.
+ (b_out_vec_little_host): Likewise.
+ * mipsbsd.c (aout_mips_little_vec): Likewise.
+ (aout_mips_big_vec): Likewise.
+
+Tue Aug 19 08:47:17 1997 Fred Fish <fnf@cygnus.com>
+
+ * coff-i960.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
+ (GET_SCNHDR_ALIGN, PUT_SCNHDR_ALIGN): Define.
+ * coff-m88k.c (GET_SCNHDR_NRELOC, GET_SCNHDR_NLNNO): Define.
+ * coffcode.h (coff_set_alignment_hook): Conditionally compile in if
+ COFF_ALIGN_IN_SECTION_HEADER is defined. Convert alignment to power
+ of two for I960 only.
+ * coffswap.h (GET_SCNHDR_NRELOC, PUT_SCNHDR_NRELOC, GET_SCNDHR_NLNNO,
+ PUT_SCNHDR_NLNNO, GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Provide
+ default definitions.
+ (coff_swap_scnhdr_in): Use GET_SCNHDR_FLAGS, GET_SCNHDR_NRELOC,
+ GET_SCNHDR_NLNNO, and GET_SCNHDR_ALIGN.
+ (coff_swap_scnhdr_out): Use PUT_SCNHDR_FLAGS, PUT_SCNHDR_ALIGN.
+
+Mon Aug 18 11:36:19 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_howto_table, v850_elf_reloc_map,
+ v850_elf_check_relocs, v850_elf_reloc,
+ v850_elf_final_link_relocate): Add support for
+ BFD_RELOC_V850_16_PCREL relocation.
+
+ * reloc.c (COMMENT): Add suuport for BFD_RELOC_V850_16_PCREL
+ relocation.
+
+ * libbfd.h: Add support for BFD_RELOC_V850_16_PCREL relocation.
+
+ * bfd-in2.h: Add support for BFD_RELOC_V850_16_PCREL relocation.
+
+
+Fri Aug 15 12:01:28 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffgen.c (coff_find_nearest_line): Correctly handle the offset
+ argument as section relative, rather than an absolute address.
+ From Jan Hoogenraad <hoogenrd@natlab.research.philips.com>.
+
+Fri Aug 15 04:58:02 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * config.bfd (arc-*-elf*): Add.
+ * configure.in (bfd_elf32_{little,big}arc_vec): Add.
+ * configure: Rebuild.
+ * Makefile.am (ALL_MACHINES): Add cpu-arc.lo.
+ (BFD32_BACKENDS): Add elf32-arc.lo.
+ (cpu-arc.lo,elf32-arc.lo): Add rules for.
+ * Makefile.in: Rebuild.
+ * archures.c (architecture list): Add bfd_arch_arc.
+ (bfd_archures_list): Add bfd_arc_arch.
+ (bfd_mach_arc_base): Define.
+ * reloc.c (BFD_RELOC_ARC_B22_PCREL,BFD_RELOC_ARC_B26): Add.
+ * targets.c (bfd_elf32_{little,big}arc_vec): Declare.
+ (bfd_target_vect): Add them.
+ * bfd-in2.h, libbfd.h: Rebuild.
+ * cpu-arc.c, elf32-arc.c: New files.
+ * elf.c (pre_headers): Recognize bfd_arch_arc.
+
+Tue Aug 12 11:45:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (NAME(aout,final_link)): If no symbols, make sure the
+ data section is correctly rounded to a page in the file.
+
+Mon Aug 11 12:45:43 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (NAME(aout,final_link)): Don't emit the string table if
+ there are no symbols.
+
+Sun Aug 10 14:45:56 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-stgo32.c: Rename from coff-stubgo32.c to avoid old System V
+ file system 14 character limit.
+ * Makefile.am, configure.in: Corresponding changes.
+ * Makefile.in, configure: Rebuild.
+
+Fri Aug 8 18:34:36 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am: (ALL_MACHINES_CFILES): Add elf32-d10v.c.
+ Rebuild dependencies.
+ * Makefile.in: Rebuild.
+
+Wed Aug 6 18:56:51 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (docdir): Define.
+ * Makefile.in: Rebuild.
+
+Tue Aug 5 23:05:03 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Rebuild with autoconf 2.12.1.
+
+Mon Aug 4 12:00:35 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * aclocal.m4, configure: Rebuild with new automake patches.
+
+Sun Aug 3 08:15:12 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * rs6000-core.c (make_bfd_asection): New function to add a section
+ to the core file bfd.
+ (rs6000coff_core_p): Use make_bfd_asection to add the core file
+ sections.
+ Use BFD routines to seek, read and stat the core file.
+ Handle .data sections from loaded objects and anonymously mmapped
+ regions, these are available in AIX 4 core files.
+
+Fri Aug 1 12:58:32 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Set enable_shared before AM_PROG_LIBTOOL.
+ * acinclude.m4: Move acmacros.m4 in here. Remove AM_PROG_LIBTOOL
+ copy; use a patches libtool instead.
+ * acmacros.m4: Remove.
+ * Makefile.in, aclocal.m4, configure: Rebuild.
+
+Thu Jul 31 19:55:36 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am: New file, based on old Makefile.in.
+ * acmacros.m4: New file, copied from old aclocal.m4.
+ * acinclude.m4: New file.
+ * configure.in: Call AM_PROG_LIBTOOL. Remove shared library
+ handling; now handled by libtool. Replace AC_CONFIG_HEADER with
+ AM_CONFIG_HEADER. Replace AC_PROG_INSTALL with AM_PROG_INSTALL.
+ Call AM_MAINTAINER_MODE, AM_CYGWIN32, and AM_EXEEXT. Change all
+ .o files to .lo. Remove stamp-h handling in AC_OUTPUT.
+ * acconfig.h: Mention PACKAGE and VERSION.
+ * stamp-h.in: New file.
+ * dep-in.sed: Change .o to .lo.
+ * Makefile.in: Now built with automake.
+ * aclocal.m4: Now built with aclocal.
+ * config.in, configure: Rebuild.
+ * VERSION: Remove.
+
+Thu Jul 31 12:09:20 1997 Geoff Keating <geoffk@ozemail.com.au>
+
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Don't set TEXTREL
+ if there is only a relocation to a read-only but not allocatable
+ section (like .stab).
+ * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
+ * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
+ * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
+ * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
+
+ * elf32-ppc.c (ppc_elf_howto_raw): Correct various comments.
+ (ppc_elf_create_linker_section): These sections are not
+ created by the linker (that is, they are created by the user
+ putting data in them). In particular, they can be the source
+ and target of relocations.
+ (ppc_elf_adjust_dynamic_symbol): Check postcondition of
+ bfd_elf32_link_record_dynamic_symbol. Align 16-byte common
+ objects (for instance, 'long double') to 16-byte boundaries.
+ (ppc_elf_size_dynamic_sections): Make the code that generates
+ section symbols exactly the same as for sparc, reducing the
+ number of section symbols output.
+ (ppc_elf_check_relocs): Check postcondition of
+ bfd_elf32_link_record_dynamic_symbol. Make default case the
+ same as corresponding code for sparc, fixing bug involving
+ .rela.stabs.
+ (ppc_elf_finish_dynamic_symbol): Fix case involving GOT symbols
+ forced to be local because of versioning (by replicating
+ corresponding change in sparc). Treat R_PPC_RELATIVE RELA relocs
+ as usual in ELF, not as pseudo-REL relocs (as the sparc linker
+ does).
+ (ppc_elf_relocate_section): Add handy debugging code for when
+ assertion fails. Add some more 'symbol made local because of
+ versioning' cases.
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Cope with addend when
+ processing a GOT relocation as required by ABI.
+
+Wed Jul 30 21:30:35 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * elflink.h (NAME(bfd_elf,record_link_assignment)): Remove any
+ version info if this symbol came from a dynamic object.
+ (elf_link_add_object_symbols): Set the version info of a symbol
+ only if the object actually contains version definitions and
+ defines this symbol.
+
+Mon Jul 28 18:07:43 1997 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * aclocal.m4: Add CYGWIN and EXEEXT autoconf macros.
+ * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
+ win32 dependencies.
+ * configure: Regenerated with autoconf 2.12.
+ * doc/Makefile.in: Add $(EXEEXT) to chew executable.
+
+Mon Jul 28 02:50:29 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * rs6000-core.c (rs6000coff_core_p): If CORE_TRUNC is set, print
+ a warning rather than returning an error.
+
+Sun Jul 27 19:54:14 1997 Felix Lee <flee@cygnus.com>
+
+ * coffswap.h (coff_swap_aux_in): add semicolon to make MSVC happy.
+
+Fri Jul 25 14:50:08 1997 Felix Lee <flee@cygnus.com>
+
+ * cisco-core.c: define signals for wingdb.
+
+Fri Jul 25 16:27:07 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecofflink.c (bfd_ecoff_debug_accumulate): Only merge files with
+ the same number of aux entries.
+
+Fri Jul 25 08:22:15 1997 Jeffrey A Law (law@cygnus.com)
+
+ * som.c (hppa_som_gen_reloc_type): Use R_DATA_EXPR for the
+ difference of two symbols if the relocation size is 32 bits.
+ (som_write_fixups): Handle R_DATA_EXPR.
+
+Wed Jul 23 16:08:02 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-i386.c (coff_i386_reloc): Don't offset a common symbol by
+ its value if COFF_WITH_PE is defined.
+
+Tue Jul 22 17:19:45 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
+
+ * coff-stubgo32.c: New file.
+ * go32stub.h: New file.
+ * coff-i386.c: If COFF_GO32_EXE, include coff/go32exe.h.
+ * coffswap.h (coff_swap_filehdr_in): Invoke
+ COFF_ADJUST_FILEHDR_IN_PRE and COFF_ADJUST_FILEHDR_IN_POST if they
+ are defined.
+ (coff_swap_filehdr_out): Invoke COFF_ADJUST_FILEHDR_OUT_PRE and
+ COFF_ADJUST_FILEHDR_OUT_POST if they are defined.
+ (coff_swap_aux_in): Invoke COFF_ADJUST_AUX_IN_PRE and
+ COFF_ADJUST_AUX_IN_POST if they are defined.
+ (coff_swap_aux_out): Invoke COFF_ADJUST_AUX_OUT_PRE and
+ COFF_ADJUST_AUX_OUT_POST if they are defined.
+ (coff_swap_scnhdr_in): Invoke COFF_ADJUST_SCNHDR_IN_PRE and
+ COFF_ADJUST_SCNHDR_IN_POST if they are defined.
+ (coff_swap_scnhdr_out): Invoke COFF_ADJUST_SCNHDR_OUT_PRE and
+ COFF_ADJUST_SCNHDR_OUT_POST if they are defined.
+ * targets.c (go32stubbedcoff_vec): Declare.
+ (bfd_target_vector): Add go32stubbedcoff_vec.
+ * configure.in (go32coff_vec): New target vector.
+ (go32stubbedcoff_vec): Likewise.
+ * config.bfd (i[3456]86-*-msdosdjgpp*): New target.
+ (i[3456]86-*-go32*): Change to be like new msdosdjgpp*.
+ * Makefile.in: Rebuild dependencies.
+ (BFD32_BACKENDS): Add coff-stubgo32.o.
+ (BFD32_BACKENDS_CFILES): Add coff-stubgo32.c.
+ (HFILES): Add go32stub.h.
+
+Tue Jul 22 15:09:12 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Check for fdopen.
+ * configure, config.in: Rebuild.
+ * opncls.c (bfd_fdopenr): Check HAVE_FDOPEN rather than VMS or
+ __GO32__. Reindent a bit.
+
+Sun Jul 20 20:05:20 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * sunos.c (sunos_create_dynamic_sections): Set SEC_LINKER_CREATED
+ flag for newly created sections.
+ (sunos_add_dynamic_symbols): Don't discard newly created sections
+ if shared library is dynobj.
+
+Mon Jul 14 15:33:55 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (map_sections_to_segments): When checking whether
+ including a section in a segment would force us to skip a page,
+ align the address of the next segment to avoid wraparound
+ problems.
+
+Mon Jul 7 16:41:20 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-i386.c (coff_i386_is_local_label_name): New static function
+ if TARGET_UNDERSCORE.
+ (coff_bfd_is_local_label_name): Define if TARGET_UNDERSCORE.
+ (i386coff_vec): Add SEC_CODE and SEC_DATA to section_flags.
+
+Mon Jun 30 14:29:26 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-m68k.c (howto_table): Use complain_overflow_bitfield, not
+ complain_overflow_signed, for 32 bit PC relative relocations.
+
+Thu Jun 26 01:26:31 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): When a version
+ indirection symbol is overridden, make the original symbol point
+ at the real overriding symbol.
+
+ * elf.c (bfd_elf_string_from_elf_section): Check for an invalid
+ string index.
+
+ * elflink.h (elf_link_output_extsym): Use the right section for a
+ common symbol.
+ * elf32-mips.c (mips_elf_link_output_symbol_hook): If a common
+ symbol was in .scommon, mark it as SHN_MIPS_SCOMMON.
+
+Wed Jun 25 12:43:10 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * elflink.h (elf_merge_symbols): Resolve indirect and warning
+ symbols before checking for new symbols.
+
+ * elfcore.h (elf_corefile_note): Move out of HAVE_SYS_PROCFS_H.
+
+Tue Jun 24 11:20:43 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffgen.c (coff_object_p): Read the f_opthdr bytes from the
+ file, not aoutsz bytes (they are different in XCOFF .o files).
+
+ * xcofflink.c (xcoff_link_add_symbols): Permit symbols to be
+ redefined by objects included from archives.
+
+Mon Jun 23 18:03:27 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_merge_symbol): In the case of a new defined
+ symbol overriding an old defined symbol, return the hash table
+ entry which we modify, even if it is the target of an
+ indirection.
+ (elf_link_add_object_symbols): If the real name of the symbol gets
+ overridden, convert the versioned symbol into an indirect symbol
+ to the real symbol.
+
+ * elflink.h (elf_merge_symbol): New static function, broken out of
+ elf_link_add_object_symbols.
+ (elf_link_add_object_symbols): Call it.
+
+Sun Jun 22 19:40:57 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-i386.c (i3coff_object_p): If COFF_IMAGE_WITH_PE, hack to
+ handle case where COFF filehdr does not immediately follow PE
+ header.
+ * coffgen.c (coff_object_p): Remove useless seek to current
+ location.
+
+Wed Jun 18 19:03:38 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * linker.c (link_action): Change COMMON_ROW/indr to from CREF to
+ REFC.
+
+Tue Jun 17 11:55:02 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * cofflink.c (_bfd_coff_link_input_bfd): If stripping debugging
+ symbols, skip N_ABS symbols with debugging storage classes.
+
+Mon Jun 16 18:56:27 1997 Geoff Keating <geoffk@ozemail.com.au>
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Don't emit R_PPC_REL*
+ relocs in shared libraries which refer to local symbols. Cope
+ with addend when processing a GOT relocation.
+
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Only create symbols
+ for sections that the linker didn't create.
+ (ppc_elf_finish_dynamic_sections): Only try to write out a section
+ symbol if it was created in ppc_elf_size_dynamic_sections.
+ (ppc_elf_relocate_section): Complain if we have to generate a reloc
+ relative to a section for which we didn't output a symbol.
+
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Clean up. PLT
+ relocs are 'rela' relocs, like everything else. .rela.plt is not
+ a read-only section, so we don't have to special-case it.
+
+ * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Entries in the
+ .rela.bss section are (of course) 'rela' relocs not 'rel' relocs.
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Initialise srelgot.
+ (ppc_elf_relocate_section): @got offsets are 4 from start of the
+ actual .got section.
+ * elflink.c (_bfd_elf_create_got_section): The three reserved
+ words start from the symbol '_GLOBAL_OFFSET_TABLE_'.
+
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): '.rela' is 5
+ characters, not 4.
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Use
+ _bfd_elf_create_got_section to create the GOT rather than
+ ppc_elf_create_linker_section. Create the '.rela.got' section
+ ourselves.
+ (ppc_elf_finish_dynamic_symbol): Set up GOT relocations when a
+ symbol has a GOT entry.
+ (ppc_elf_relocate_section): Record when a symbol is used through
+ the GOT, and allocate space in the GOT for each such symbol.
+ (ppc_elf_adjust_dynamic_symbol): Delete unused .got.plt stuff.
+ (ppc_elf_create_linker_section): Delete unused LINKER_SECTION_GOT
+ stuff.
+
+ * elf32-ppc.c (ppc_elf_howto_raw): GOT16_HA relocs should be
+ treated in a similar way to ADDR16_HA relocs.
+ (ppc_elf_relocate_section): PLTREL24 relocs do not get copied into
+ shared objects; the linker must deal with them.
+ (ppc_elf_create_linker_section): Stop setting
+ _GLOBAL_OFFSET_TABLE_ to the wrong value; delete unused
+ LINKER_SECTION_PLT stuff.
+ (ppc_elf_check_relocs): Delete unused LINKER_SECTION_PLT stuff.
+ (ppc_elf_finish_dynamic_sections): Use BFD calls to get GOT
+ section, not ELF-specific calls.
+ (elf_backend_plt_not_loaded): Set to 1.
+ (elf_backend_got_symbol_offset): Set to 4.
+ * elf-bfd.h (elf_backend_data): Add 'plt_not_loaded' member
+ for when ld.so fills in the PLT; and 'got_symbol_offset' member.
+ * elflink.c (_bfd_elf_create_dynamic_sections): Apply
+ plt_not_loaded member.
+ (_bfd_elf_create_got_section): Apply got_symbol_offset.
+ * elfxx-target.h (elf_backend_plt_not_loaded): Set default to
+ 'loaded'.
+ (elf_backend_G_O_T_offset): Set default to 0.
+ (elfNN_bed): Set added fields.
+
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Was setting
+ DT_RELENT in shared objects; should be DT_RELAENT.
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Propagate
+ R_PPC_ADDR16_HA relocs to shared objects. Cope with case where
+ such a reloc (in a non-shared object) refers to a symbol that's
+ not defined.
+
+Mon Jun 16 14:42:14 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * elfcode.h (put_signed_word): Define.
+ (get_signed_word): Define.
+ (elf_swap_reloca_in): Use get_signed_word for the r_addend field.
+ (elf_swap_reloca_out): Use put_signed_word for the r_addend
+ field.
+ * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Use
+ bfd_get_signed_32 to set the r_addend field.
+ * elf64-mips.c (mips_elf64_swap_reloca_in): Use
+ bfd_h_get_signed_64 to set the r_addend field.
+
+Mon Jun 16 12:31:29 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-i386.c (elf_i386_relocate_section): When generating a
+ shared library, do the relocation if the input section is not
+ allocated in memory.
+
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Call
+ elf_link_assign_sym_version before elf_adjust_dynamic_symbol.
+ (elf_fix_symbol_flags): New static function, broken out of
+ elf_adjust_dynamic_symbol.
+ (elf_adjust_dynamic_symbol): Call elf_fix_symbol_flags.
+ (elf_link_assign_sym_version): Likewise. Permit a symbol to be
+ forced local even if NEEDS_PLT is set. When forcing a symbol to
+ be local, clear NEEDS_PLT.
+ (elf_link_output_extsym): Remove unused local bed.
+
+Wed Jun 11 22:44:20 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-mn10300.c (elf32_mn10300_link_hash_entry): New structure
+ for derived elf linker hash table entries. References to
+ elf_link_hash_entry changed appropriately.
+ (elf32_mn10300_link_hash_table): New structure for derived elf
+ linker hash table.
+ (elf32_mn10300_hash_table): Define.
+ (elf32_mn10300_link_hash_traverse): Likewise.
+ (elf32_mn10300_link_hash_newfunc): New function.
+ (elf32_mn10300_link_hash_table_create): Likewise.
+ (elf32_mn10300_finish_hash_table_entry): Likewise.
+ (mn10300_elf_relax_section): Handle "call" -> "calls", removal
+ of prologue code, and call:32->call:16 relaxing.
+ (compute_function_info: New function.
+ (bfd_elf32_bfd_ilink_hash_table_create): Define.
+
+Wed Jun 11 00:00:07 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_output_extsym): Call finish_dynamic_symbol
+ for a symbol which is being forced to be local.
+ * elf32-i386.c (elf_i386_relocate_section): Write out the
+ relocation value for a GOT reloc for a symbol which is turning
+ into a local symbol.
+ (elf_i386_finish_dynamic_symbol): If a symbol is turning into a
+ local symbol, write out a RELATIVE reloc rather than a GLOB_DAT
+ reloc.
+ * elf32-m68k.c, elf32-sparc.c: Corresponding changes.
+
+ * elf32-i386.c (elf_i386_relocate_section): Get the relocation
+ value if the symbol is turning into a local symbol.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+
+1997-06-10 22:58 Ulrich Drepper <drepper@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Also read verneed
+ information by calling `_bfd_elf_slurp_version_tables'.
+ (elf_link_add_object_symbols): For undefined symbols look for
+ version information in the verneed records.
+ (elf_link_add_object_symbols): Use soname of shared object
+ for verneed record if it is available.
+
+Tue Jun 10 11:13:03 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * cpu-arm.c: Add prototypes for compatible and scan.
+ * cofflink.c: Add prototype for mark_relocs.
+
+ * archive.c (bfd_special_undocumented_glue): Change filename to
+ const pointer. Add prototype.
+
+Mon Jun 9 12:34:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * elflink.h (elf_link_add_object_symbols): Ignore relocations of
+ sections that will be discarded.
+
+1997-06-06 22:58 Ulrich Drepper <drepper@cygnus.com>
+
+ * elflink.h (elf_link_find_version_dependencies): When searching
+ for known version symbol skip non-matching verdef records, not
+ matching records.
+
+Thu Jun 5 15:52:45 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * cofflink.c (_bfd_coff_generic_relocate_section): Write a long,
+ not a bfd_vma, to the base file, to match how dlltool reads it.
+
+Tue Jun 3 16:57:45 1997 Nick Clifton <nickc@cygnus.com>
+
+ * reloc.c: Add thumb relocations.
+
+ * bfd-in2.h: Add Thumb relocations.
+
+ * libbfd.h: Add Thumb relocations.
+
+Mon Jun 2 10:41:52 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * cpu-m68k.c (arch_info_struct): Fix 68060 cpu name.
+
+Fri May 30 12:46:27 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Set dynindx
+ for a section even if it is not loaded.
+
+ * cofflink.c (coff_link_add_symbols): If PE file, don't subtract
+ section VMA.
+ (_bfd_coff_link_input_bfd): Separate section VMA handling for
+ input and output files.
+ (_bfd_coff_generic_relocate_section): Check whether input file,
+ not output file, is a PE file.
+
+Wed May 28 15:48:43 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c: (coff_arm_bfd_set_private_flags): Make static.
+
+Wed May 28 16:16:04 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-i386.c (coff_i386_reloc): Don't just exit if we see an
+ R_IMAGEBASE reloc.
+
+Wed May 28 09:48:43 1997 Nick Clifton <nickc@cygnus.com>
+
+ * cpu-arm.c (compatible): Add test for supersets of ARM
+ architectures.
+
+Tue May 27 19:42:03 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * cofflink.c (_bfd_coff_final_link): Initialize global_to_static
+ member.
+
+Tue May 27 14:34:08 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (coff_arm_bfd_set_private_flags): Make global. It is
+ called directly by gas/config/tc-arm.c.
+
+Tue May 27 15:58:53 1997 Richard Henderson <rth@tamu.edu>
+
+ * elf64-alpha.c (PLT_ENTRY_*): Use a new thread-safe format.
+ (elf64_alpha_finish_dynamic_symbol): Fill it in properly.
+
+Mon May 26 14:05:13 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-ppc.c (coff_ppc_relocate_section): If PE file, don't add
+ section VMA.
+
+Mon May 26 10:57:48 1997 Fred Fish <fnf@cygnus.com>
+
+ * peicode.h (coff_bfd_print_private_bfd_data): #undef before #define.
+ (coff_bfd_copy_private_bfd_data): Ditto.
+ * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): Make static.
+ (coff_arm_bfd_print_private_bfd_data): Ditto.
+ (coff_arm_bfd_set_private_flags): Ditto.
+ (coff_arm_bfd_copy_private_bfd_data): Ditto.
+
+Fri May 23 15:14:58 1997 Fred Fish <fnf@cygnus.com>
+
+ * libcoff-in.h (struct coff_final_link_info): Add boolean
+ global_to_static member for support of task linking.
+ (_bfd_coff_write_task_globals): Add prototype.
+ * libcoff.h: Regenerate.
+ * coffcode.h (coff_write_object_contents): Use #ifdef to
+ check RS6000COFF_C, to be consistent with all other uses
+ in this file.
+ * cofflink.c (_bfd_coff_final_link): If doing task linking,
+ call _bfd_coff_write_task_globals.
+ (_bfd_coff_link_input_bfd): If doing task linking, convert
+ global functions to static.
+ (_bfd_coff_write_global_sym): If doing task linking, convert
+ global variables to static.
+ (_bfd_coff_write_task_globals): New function.
+
+Wed May 21 17:15:50 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE or
+ COFF_IMAGE_WITH_PE, don't subtract the section VMA from the symbol
+ value.
+ * coffgen.c (fixup_symbol_value): Add abfd parameter. Change all
+ callers. If PE file, don't add section VMA.
+ (coff_write_alien_symbol): If PE file, don't add section VMA.
+ * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
+ (_bfd_coff_write_global_sym): Likewise.
+ (_bfd_coff_generic_relocate_section): Likewise.
+
+ * peicode.h: Add & 0xffffffff when using ImageBase in case bfd_vma
+ is 64 bits.
+
+Wed May 21 09:58:10 1997 Nick Clifton <nickc@cygnus.com>
+
+ * cofflink.c (mark_relocs): Add new function to mark symbols which
+ are used by relocations.
+ (_bfd_coff_link_input_bfd): Add call to mark_relocs() and code to
+ suppress the skipping of symbols that have thus been marked.
+
+Tue May 20 18:45:26 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-sh.c (sh_merge_private_data): New static function.
+ (coff_bfd_merge_private_bfd_data): Define.
+
+Fri May 16 10:23:03 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf-m10300.c (elf32_mn10300_relax_section): Read in all
+ the symbols associated with each BFD.
+ (mn10300_elf_relax_delete_bytes): Don't adjust the same symbol
+ more than once.
+ * elf-m10200.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * elf32-sh.c: Likewise.
+
Fri May 16 12:10:52 1997 Ian Lance Taylor <ian@cygnus.com>
* elflink.h (elf_link_add_object_symbols): Don't decrease the
- alignment of a common symbol. If two symbols that look like
- common symbols are found in two shared libraries, and the size is
- different, use the larger size, and warn if --warn-common. If a
+ alignment of a common symbol. If two symbols that look like
+ common symbols are found in two shared libraries, and the size is
+ different, use the larger size, and warn if --warn-common. If a
common symbol overrides a definition in a shared library, set the
size to the larger size, and warn if --warn-common.
+Thu May 15 14:31:28 1997 Nick Clifton <nickc@cygnus.com>
+
+ * cpu-arm.c (compatible): Allow default machine to be polymorphed
+ into any other machine type.
+
+ * coffcode.h (coff_set_flags): Initialise flags variable to 0.
+
+ * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): When merging
+ data into an unitialised destination set its machine type as well.
+
Thu May 15 16:40:20 1997 Ian Lance Taylor <ian@cygnus.com>
* elflink.h (elf_link_add_object_symbols): Force ELF symbol size
to common symbol size. Consistently treat uninitialized symbols
in shared objects as common symbols.
-Tue May 13 10:42:41 1997 Ian Lance Taylor <ian@cygnus.com>
+Fri May 9 10:15:27 1997 Nick Clifton <nickc@cygnus.com>
+
+ * archures.c (constants): Added new constants to identify the
+ type of the ARM architecture: bfd_mach_arm_2, bfd_mach_arm_2a,
+ bfd_mach_arm_3, bfd_mach_arm_3M, bfd_mach_arm_4 and bfd_mach_arm_4T.
+
+ * bfd-in2.h (constants): Added new constants to identify
+ the type of the ARM architecture: bfd_mach_arm_2, bfd_mach_arm_2a,
+ bfd_mach_arm_3, bfd_mach_arm_3M, bfd_mach_arm_4 and
+ bfd_mach_arm_4T. This file is auto-magically generated from the
+ archures.c file. This update is just to save work.
+
+ * coff-arm.c (coff_arm_bfd_merge_private_bfd_data,
+ coff_arm_bfd_print_private_bfd_data,
+ coff_arm_bfd_set_private_flags,
+ coff_arm_bfd_copy_private_bfd_data): Added these new functions.
+ (global): Macro redefinitions set up to use these new functions.
+
+ * coffcode.h (coff_mkobject_hook): Added call to
+ coff_arm_bfd_set_private_flags().
+ (coff_set_arch_mach_hook): Added code to set machine type based on
+ bits stored in internal flags.
+ (coff_set_flags): Added code to set the new bits in the flags
+ field based on the machine number.
+ (function definition macros): Made all function definition macros
+ conditional so that they can be overridden by target specific
+ files.
- * VERSION: Set to 2.8.1.
+ * cpu-arm.c (compatible): Added this function. (arch_info_struct):
+ Structure extended to include new types, one each for ARMv2,
+ ARMv2a, ARMv3, ARMv3M, ARMv4 and ARMv4T.
+
+ * libcoff-in.h (struct coff_tdata): Added flags field.
Fri May 9 17:40:02 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config.bfd (i[3456]86-*-gnu*): Don't include Mach support.
+
* config.bfd: Change #if 0 around uses of host_aout_vec to #if
HAVE_host_aout_vec.
+Mon May 5 13:57:32 1997 Mike Meissner <meissner@cygnus.com>
+
+ * coffgen.c (coff_find_nearest_line): If there are no syments,
+ just return false.
+
Mon May 5 18:18:45 1997 Philip Blundell <pjb27@cam.ac.uk>
* config.bfd: cope with '*-*-linux-gnuaout' targets.
@@ -61,9 +2158,13 @@ Sat Apr 19 22:50:14 1997 Ian Lance Taylor <ian@cygnus.com>
* elf32-i386.c (elf_i386_check_relocs): Only count PC relative
relocs. From Jamie Lokier <jamie@rebellion.co.uk>.
+ * coffcode.h (coff_compute_section_file_positions): Force the
+ potential last byte in the file to be written out when
+ COFF_IMAGE_WITH_PE.
+
Thu Apr 17 13:46:56 1997 Per Fogelstrom <pefo@openbsd.org>
- * configure.host (mips*-*-openbsd*): New target.
+ * configure.host (mips*-*-openbsd*): New host.
Thu Apr 17 11:10:54 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -110,6 +2211,10 @@ Tue Apr 15 11:50:37 1997 Ian Lance Taylor <ian@cygnus.com>
whenever entry is larger than text address, but only by whole
pages. From Gordon W. Ross <gwr@mc.com>.
+ * Makefile.in (install): Depend upon installdirs. Use
+ mkinstalldirs to build $(oldincludedir).
+ (installdirs): New target.
+
* elflink.h (elf_link_add_object_symbols): Don't call check_relocs
if this is a debugging section which we are stripping.
@@ -150,6 +2255,9 @@ Fri Apr 11 15:43:24 1997 Ian Lance Taylor <ian@cygnus.com>
(MY_entry_is_text_address): Define.
* m68knetbsd.c (SEGMENT_SIZE): Define as 0x20000.
+ * xcofflink.c (bfd_xcoff_import_symbol): Handle importing a symbol
+ whose name starts with `.'.
+
Fri Apr 11 11:57:15 1997 Niklas Hallqvist <niklas@appli.se>
* config.bfd: (i[3456]86-*-openbsd*, m68*-*-openbsd*,
@@ -168,6 +2276,21 @@ Tue Apr 8 18:09:29 1997 Jamie Lokier <jamie@rebellion.co.uk>
(_bfd_stab_section_offset): Use `cumulative_skips' to
speed up offset calculation.
+Tue Apr 8 00:01:31 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf-mn10300.c (mn10300_elf_relax_section): Don't forget the
+ addend for non pc-relative relocations.
+
+ * elf-m10300.c (bfd_elf32_mn10300_reloc): Remove prototype
+ for non-existent function.
+
+ * elf-m10300.c (mn10300_elf_relax_section): New function.
+ (mn10300_elf_relax_delete_bytes): Likewise.
+ (mn10300_elf_symbol_address_p): Likewise.
+ (mn10300_elf_get_relocated_section_contents): Likewise.
+ (bfd_elf32_bfd_relax_section): Define.
+ (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
+
Mon Apr 7 16:47:09 1997 Ian Lance Taylor <ian@cygnus.com>
* configure.host: Set SHLIB_LIBS.
@@ -176,6 +2299,11 @@ Mon Apr 7 16:47:09 1997 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in (SHLIB_LIBS): New variable.
($(SHLIB)): Use $(SHLIB_LIBS).
+Mon Apr 7 10:53:52 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * bfd-in.h bfd-in2.h: add bfd_section_lma macro to correspond
+ with bfd_section_vma.
+
Fri Apr 4 11:37:15 1997 Ian Lance Taylor <ian@cygnus.com>
* configure.in: Update file names for bfd_elf32_mn10[23]00_vec.
@@ -185,12 +2313,29 @@ Fri Apr 4 11:37:15 1997 Ian Lance Taylor <ian@cygnus.com>
* bfd.c (bfd_record_phdr): Cast count to size_t before
subtraction.
+ * coff-ppc.c (dump_toc): Add cast to avoid warning from SunOS cc.
+ * coff-rs6000.c (xcoff_read_ar_hdr): Likewise.
+ (xcoff_write_archive_contents): LIkewise.
+ * elf32-mips.c (_bfd_mips_elf_set_section_contents): Likewise.
+ (mips_elf_create_procedure_table): Likewise.
+ * peicode.h (pe_print_idata): Likewise.
+ (pe_print_edata, pe_print_pdata, pe_print_reloc): Likewise.
+ * xcofflink.c (xcoff_get_section_contents): Likewise.
+ (_bfd_xcoff_canonicalize_dynamic_symtab): Likewise.
+ (xcoff_link_add_symbols): Likewise.
+ (xcoff_link_add_symbols): Likewise.
+
* ppcboot.c (ppcboot_set_arch_mach): Make static.
(ppcboot_bfd_print_private_bfd_data): Likewise.
+ * elf32-mips.c (elf_mips_ctor64_howto): Set complain_on_overflow
+ to complain_overflow_signed.
+
Thu Apr 3 11:51:54 1997 Ian Lance Taylor <ian@cygnus.com>
- * VERSION: Set to 2.8.
+ * VERSION: Set to 2.8.1.
+
+ * Branched binutils 2.8.
* elf32-ppc.c (ppc_elf_check_relocs): Don't check SEC_ALLOC when
deciding whether to copy a reloc into a shared object.
@@ -629,7 +2774,7 @@ Thu Mar 6 12:19:59 1997 Fred Fish <fnf@cygnus.com>
* coff-h8500.c: Ditto.
* coff-w65.c: Ditto
* coff-z8k.c: Ditto.
-
+
Wed Mar 5 13:59:09 1997 Doug Evans <dje@seba.cygnus.com>
* elf32-m32r.c (m32r_elf_do_10_pcrel_reloc): Fix overflow calc.
@@ -697,7 +2842,7 @@ Thu Feb 27 18:36:23 1997 Ian Lance Taylor <ian@cygnus.com>
* coffgen.c (_bfd_coff_is_local_label_name): New function.
* libcoff-in.h (_bfd_coff_is_local_label_name): Declare.
* libcoff.h: Rebuild.
-
+
* targets.c (BFD_JUMP_TABLE_SYMBOLS): Change _bfd_is_local_label
to _bfd_is_local_label_name.
(bfd_target): Likewise.
@@ -847,11 +2992,16 @@ Tue Feb 18 15:31:48 1997 Fred Fish <fnf@cygnus.com>
* reloc.c (struct reloc_howto_struct): Fix typo in comment.
* bfd-in2.h: Regenerated.
-
+
Tue Feb 18 11:41:00 1996 Dawn Perchik <dawn@cygnus.com>
* sysdep.h: Don't define errno in MSVC if error.h is included.
+Tue Feb 18 10:04:13 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (v850_elf_relocate_section): Make sure r_symndx
+ is initialized before it is used.
+
Mon Feb 17 11:28:40 1997 Ian Lance Taylor <ian@cygnus.com>
* hp300hpux.c (convert_sym_type): Don't convert a secondary common
@@ -915,7 +3065,7 @@ Tue Feb 11 15:27:32 1997 Ian Lance Taylor <ian@cygnus.com>
* reloc.c (BFD_RELOC_MIPS16_GPREL): Define.
* bfd-in2.h, libbfd.h: Rebuild.
-Mon Feb 10 23:25:00 1997 Doug Evans <dje@seba.ricochet.net>
+Mon Feb 10 23:25:00 1997 Doug Evans <dje@seba.cygnus.com>
* elf32-m32r.c (elf_m32r_howto_table): Change partial_inplace to true
for R_M32R_{16,32,24,HI16_ULO,HI16_SLO,LO16}.
@@ -988,6 +3138,8 @@ Mon Jan 27 12:25:02 1997 Ian Lance Taylor <ian@cygnus.com>
* aout-arm.c (MY_swap_std_reloc_in): Remove unused r_length.
* elf32-ppc.c (ppc_elf_check_relocs): Remove unused plt.
+ * elf32-v850.c (v850_elf_final_link_relocate): Remove used
+ r_format and r_pcrel. Always return a value.
* riscix.c (MY_final_link_callback): Define to dummy value.
* elf32-i386.c (elf_i386_size_dynamic_sections): When checking for
@@ -1020,6 +3172,16 @@ Tue Jan 14 08:46:33 1997 Doug Evans <dje@canuck.cygnus.com>
* libaout.h (machine_type): Reserve several values for sparclet.
+Mon Jan 13 19:36:25 1997 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-v850.c (v850_elf_howto_table): Set the special_function
+ table to v850_elf_reloc for all non-standard relocations.
+ (v850_elf_check_relocs): Add check for h being non-null.
+ (v850_elf_reloc): Add R_V850_ZDA_OFFSET support. Use switch
+ statement instead of multiple ifs.
+ (v850_elf_relocate_section): Fix up error message, don't just call
+ abort.
+
Mon Jan 6 13:28:35 1997 Jeffrey A Law (law@cygnus.com)
* elf32-mn10200.c (elf_mn10200_howto): Don't ever set partial-inplace.
@@ -1044,7 +3206,7 @@ Fri Jan 3 16:58:31 1997 Richard Henderson <rth@tamu.edu>
(bfd_elf*_mkobject): Don't define here ...
* elfxx-target.h: ... but rather here. Default always_size_sections
hook to NULL.
- * elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was
+ * elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was
what the #defines in elf-bfd.h transmuted it to anyway.
* section.c: Add SEC_LINKER_CREATED flag.
@@ -1062,7 +3224,7 @@ Fri Jan 3 16:58:31 1997 Richard Henderson <rth@tamu.edu>
ppc_elf_size_dynamic_sections): Likewise.
* elf32-sparc.c (elf32_sparc_check_relocs,
elf32_sparc_size_dynamic_sections): Likewise.
- * elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to
+ * elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to
section flags.
(_bfd_elf_create_dynamic_sections): Likewise.
(_bfd_elf_make_linker_section_rela): Likewise.
@@ -1074,6 +3236,21 @@ Fri Jan 3 16:58:31 1997 Richard Henderson <rth@tamu.edu>
* elf64-alpha.c: Rewrite everything touching relocations.
+Fri Jan 3 11:42:53 1997 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-v850.c (all functions and static variables): Go through
+ and regularize names to be of the form v850_elf_<xxx>.
+ (toplevel): Include <elf/v850.h>.
+ (enum reloc_type): Move to include/elf/v850.h.
+ (v850_elf_check_relocs): For common variables, if the variable is
+ referenced by a R_V850_{SDA,ZDA,TDA} relocation, put the variable
+ into the appropriate section.
+ (elf_backend_check_relocs): Define.
+
+Tue Dec 31 15:15:28 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-v850.c (elf_v850_howto_table): Fix some spacing.
+
Tue Dec 31 14:44:50 1996 Ian Lance Taylor <ian@cygnus.com>
* config.bfd (mips*el-*-linux*): New target.
@@ -1201,7 +3378,7 @@ Tue Dec 10 23:23:52 1996 Jeffrey A Law (law@cygnus.com)
* bfd-in2.h, libbfd.h: Rebuilt.
* elf32-mn10200.c: Update from elf32-mn10300.c.
-
+
Fri Dec 6 15:18:05 1996 Jeffrey A Law (law@cygnus.com)
* elf32-mn10300.c (elf_symbol_leading_char): Define.
@@ -1307,7 +3484,7 @@ Mon Nov 25 08:52:29 1996 Jeffrey A Law (law@cygnus.com)
(elf32_mn10300_reloc_map): Update for new reloc types.
* reloc.c: Add some new relocs for the mn10300 series.
* bfd-in2.h, libbfd.h: Rebuilt.
-
+
Sat Nov 23 13:26:18 1996 Jeffrey A Law (law@cygnus.com)
* som.c (setup_sections): Don't lose for a space which has
@@ -1331,7 +3508,7 @@ Fri Nov 22 11:32:13 1996 Ian Lance Taylor <ian@cygnus.com>
dynamic linking information if needed.
Thu Nov 21 10:31:31 1996 Rob Savoye (rob@cygnus.com)
-
+
* config.bfd: Added VersaDOS format to the Ericsson configuration.
Wed Nov 20 16:31:31 1996 Jeffrey A Law (law@cygnus.com)
@@ -1379,10 +3556,26 @@ Fri Oct 25 16:56:40 1996 Ian Lance Taylor <ian@cygnus.com>
* ieee.c (ieee_write_external_part): Correctly record whether
there is an external part.
+Thu Oct 24 14:32:52 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (elf32_v850_bfd_final_link_relocate): Correctly
+ handle tda offsets for sld.w and sst.w instructions.
+ Fix alignment check in sld.w and sst.w tda reloc handling.
+
Thu Oct 24 09:08:47 1996 Stu Grossman (grossman@critters.cygnus.com)
* aclocal.m4, configure: Set USE_BINARY_FOPEN for *-*-windows.
+Wed Oct 23 00:53:16 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c: Add comments about assumptions about
+ char, short & long sizes.
+ (elf32_v850_bfd_final_link_relocate): Fix sign extension
+ problems for several relocs.
+
+ * elf32-v850.c (elf32_v850_howto_table): Fix typo in
+ R_V850_SDA_OFFSET entry.
+
Wed Oct 23 00:20:34 1996 Ian Lance Taylor <ian@cygnus.com>
* xcofflink.c (bfd_xcoff_import_symbol): Don't allocate ldsym.
@@ -1390,6 +3583,22 @@ Wed Oct 23 00:20:34 1996 Ian Lance Taylor <ian@cygnus.com>
(xcoff_build_ldsyms): Assume that ldsym was not previously
allocated. For an imported symbol, copy ldindx into l_ifile.
+Tue Oct 22 19:20:38 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (elf_v850_howto_table): Fix ordering of
+ R_V850_ZDA_OFFSET and R_V850_TDA_OFFSET. Fix various
+ fields in R_V850_TDA_OFFSET.
+ (elf32_v850_bfd_final_link_relocate): Tweak pc-relative
+ relocs to work more like other relocs. Handle R_V850_TDA_OFFSET
+ relocations.
+
+ * elf32-v850.c: Include bfdlink.h.
+ (bfd_elf32_v850_reloc): Return an error if we get a reloc
+ we can't handle.
+ (elf32_v850_bfd_final_link_relocate): New function.
+ (v850_elf_relocation_section): Likewise.
+ (elf_backend_relocate_section): Define.
+
Tue Oct 22 17:22:43 1996 Ian Lance Taylor <ian@cygnus.com>
* binary.c (binary_set_section_contents): Ignore sections which
@@ -1426,6 +3635,24 @@ Wed Oct 16 11:24:35 1996 Jeffrey A Law (law@cygnus.com)
all sections that will be included in the output file.
(_bfd_generic_link_output_symbols): Discard symbols in sections
which are being discarded.
+ * elf32-v850.c (enum reloc_type): Add R_V850_SDA_OFFSET,
+ R_V850_TDA_OFFSET and R_V850_ZDA_OFFSET.
+ (elf_v850_howto_table): Corresponding changes.
+ (elf_v850_reloc_map): Corresponding changes.
+ * reloc.c: Add additional V850 relocations.
+ * bfd-in2.h, libbfd.h: Rebuilt.
+
+ * elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
+ no longer want in pc-relative relocs.
+
+Tue Oct 15 22:17:37 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (bfd_elf32_v850_reloc): Don't silently
+ accept a reloc against an undefined sybmol!
+
+Tue Oct 15 16:17:28 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * elf32-v850.c: Define elf_symbol_leading_char to be '_'.
Tue Oct 15 12:40:41 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -1441,7 +3668,7 @@ Mon Oct 14 12:37:26 1996 Ian Lance Taylor <ian@cygnus.com>
Mon Oct 14 11:17:24 1996 Richard Henderson <rth@tamu.edu>
- * reloc.c: Create a new BFD_RELOC_ALPHA_ELF_LITERAL. It was a
+ * reloc.c: Create a new BFD_RELOC_ALPHA_ELF_LITERAL. It was a
mistake to have reused the ECOFF LITERAL for ELF since they have
different semantics.
* elf64-alpha.c (elf_reloc_map): Map from ELF_LITERAL.
@@ -1582,7 +3809,7 @@ Wed Oct 2 21:40:55 1996 Jeffrey A Law (law@cygnus.com)
* targets.c (bfd_elf32_mn10x00_vec): Declare.
(bfd_target_vector): Add bfd_elf32_mn10x00_vec.
* bfd-in2.h, configure: Rebuilt.
-
+
Wed Oct 2 15:46:45 1996 Klaus Kaempf <kkaempf@progis.de>
openVMS/Alpha: Provide filename and case_hack flags via
@@ -1632,6 +3859,11 @@ Tue Oct 1 12:31:39 1996 Ian Lance Taylor <ian@cygnus.com>
a dynamic object in the dynamic symbol table if it is referenced
or defined by a regular object.
+Fri Sep 27 18:41:07 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * elf32-v850.c (bfd_elf32_v850_is_local_label): New function to
+ remove dwarf local labels. Shrinks binaries by a factor of 3!
+
Mon Sep 23 13:33:00 1996 Ian Lance Taylor <ian@cygnus.com>
* elf32-ppc.c (ppc_elf_add_symbol_hook): Create the .sbss section
@@ -1813,7 +4045,7 @@ Tue Sep 10 16:18:30 1996 Fred Fish <fnf@cygnus.com>
(build_debug_section): Ditto.
(copy_name): Ditto.
* syms.c (coff_section_type): Ditto.
-
+
Mon Sep 9 22:36:01 1996 Jeffrey A Law (law@cygnus.com)
* bfd-in2.h: Rebuilt after m32r changes.
@@ -1824,6 +4056,12 @@ Mon Sep 9 12:31:22 1996 Doug Evans <dje@canuck.cygnus.com>
* Makefile.in,archures.c,elf.c,targets.c: Likewise.
* config.bfd: Keep target list alphabetically sorted.
+Mon Sep 9 11:48:41 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
+ to add in the constant part found in the instruction itself.
+ (case R_V850_HI16_S): Likewise.
+
Fri Sep 6 17:04:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
@@ -1846,6 +4084,17 @@ Tue Sep 3 12:16:20 1996 Doug Evans <dje@canuck.cygnus.com>
(bfd_target_vector): Add sparcle_aout_vec.
* aout-sparcle.c: New file.
+Tue Sep 3 00:57:02 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
+ low order sign bit propogation for R_V850_HI16_S.
+
+ * elf32-v850.c (bfd_elf32_v850_reloc): New function for
+ handling V850 specific relocs.
+ (elf_v850_howto_table): Use the new function for some
+ relocations. Twiddle masks & shifts for some relocs.
+ Set partial_inplace where needed.
+
Mon Sep 2 12:12:34 1996 Ian Lance Taylor <ian@cygnus.com>
* cpu-mips.c: Add an explicit mips:3000 entry, and change the
@@ -1855,12 +4104,36 @@ Mon Sep 2 12:12:34 1996 Ian Lance Taylor <ian@cygnus.com>
(_bfd_mips_elf_merge_private_bfd_data): If the machine number of
the output BFD is the default, set it from the first input BFD.
+Sun Sep 1 18:38:01 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (elf_v850_howto_table): All the 16bit relocs
+ insert at bitpos zero. The HI16 relocs are shifted right
+ by 16 bits. Fix src_mask for all relocs.
+ (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define. The V850 is
+ little endian!
+ (TARGET_BIG_SYM, TARGET_BIG_NAME): Remove. The V850 is little
+ endian!
+
Sun Sep 1 15:41:08 1996 Ian Lance Taylor <ian@cygnus.com>
* rs6000-core.c (rs6000coff_core_file_matches_executable_p):
Rewrite to use BFD file read routines and to avoid using a fixed
length for the file name.
+Sat Aug 31 10:22:25 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
+ (elf_v850_howto_table): Add support for R_V850_{32,16,8}.
+ (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
+ to R_V850_{32,16,8}.
+
+Fri Aug 30 18:06:04 1996 J.T. Conklin <jtc@hippo.cygnus.com>
+
+ * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
+ (elf_v850_howto_table): Add info for HI16_S reloc.
+ (v850_reloc_map): Add HI_16_S reloc.
+ * reloc.c: Define BFD_RELOC_V850_* relocs.
+
Fri Aug 30 11:49:19 1996 Ian Lance Taylor <ian@cygnus.com>
Add SH ELF support.
@@ -1949,6 +4222,20 @@ Thu Aug 22 10:54:38 1996 Ian Lance Taylor <ian@cygnus.com>
undefined symbol merely because we are generating a shared
library.
+Tue Aug 20 15:06:05 1996 J.T. Conklin <jtc@hippo.cygnus.com>
+
+ * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
+ (BFD32_BACKENDS) Add elf32-v850.o.
+ * archures.c: Add bfd_v850_arch.
+ * bfd-in2.h: Add bfd_v850_arch.
+ * config.bfd (v850-*-*): New target.
+ * configure: (bfd_elf32_v850_vec) New vector.
+ * configure.in: (bfd_elf32_v850_vec) New vector.
+ * cpu-v850.c: New file.
+ * elf.c (prep_headers): Added case bfd_arch_v850.
+ * elf32-v850.c: New file.
+ * targets.c (bfd_elf32_v850_vec): New vector.
+
Fri Aug 16 16:25:35 1996 Ian Lance Taylor <ian@cygnus.com>
* xcofflink.c (xcoff_link_add_dynamic_symbols): Create and define
@@ -2274,7 +4561,7 @@ Wed Jul 17 14:51:52 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L,
BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define.
* targets.c (bfd_elf32_d10v_vec): New vector.
-
+
Wed Jul 17 10:58:55 1996 Kim Knuttila <krk@cygnus.com>
* coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
@@ -2458,16 +4745,16 @@ Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
.rela.plt offset directly rather than calculating it.
Mon Jun 24 17:15:10 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
+
+ * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
Use autoconf-set values.
- * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
- includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
+ * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
+ includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
values.
(docdir): Deleted.
* configure.in (AC_PREREQ): autoconf v2.5 or higher.
* configure: Rebuilt.
-
+
Mon Jun 24 22:50:35 1996 Jeffrey A Law (law@cygnus.com)
* som.c (som_write_fixups): Fix typo in R_END_TRY for exception
@@ -2496,7 +4783,7 @@ Sun Jun 23 20:42:51 1996 Doug Evans <dje@canuck.cygnus.com>
Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
* config.bfd: Add support for *-*-rtems* configurations.
-
+
Fri Jun 21 15:19:59 1996 Ian Lance Taylor <ian@cygnus.com>
* elf.c (prep_headers): Add bfd_arch_alpha case.
@@ -2550,7 +4837,7 @@ Tue Jun 18 15:17:36 1996 Jeffrey A. Law <law@rtl.cygnus.com>
* coff-h8300.c: Remove #if 0 code.
(compatable): Don't allow mixing/matching of different architectures.
-
+
* archures.c (bfd_mach_h8300s): Add.
* bfd-in2.h: Rebuilt.
* coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
@@ -2907,7 +5194,7 @@ Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
(bfd_elf64_littlemips_vec): Declare.
(bfd_target_vector): Add bfd_elf64_bigmips_vec and
bfd_elf64_littlemips_vec if BFD64 is defined.
-
+
* libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -2997,7 +5284,7 @@ Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
* config{ure.in,.bfd}: Add support for ppcboot target.
* targets.c: Ditto.
* configure: Regenerate.
-
+
Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
* coff-h8300.c (howto_table): Update names to match recent
@@ -3158,7 +5445,7 @@ Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
(xcoff_dynamic_reloc): New static variable.
(_bfd_xcoff_canonicalize_dynamic_reloc): New function.
(xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
-
+
Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
* coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
@@ -3356,7 +5643,7 @@ Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
* sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
to control what combination of <time> and <sys/time.h>
get included.
-
+
Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
* aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
@@ -3408,7 +5695,7 @@ Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
* peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
* coffcode.h (coff_compute_section_file_positions): Likewise.
(coff_write_object_contents): Likewise.
-
+
Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
* section.c (SEC_LINK_ONCE): Define.
@@ -3449,7 +5736,7 @@ Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
the function vector as needed. Place the address of the function
vector entry in the location specified by the R_MEM_INDIRECT reloc.
Rewrite the vectors section contents as necessary.
- (h8300_bfd_link_add_symbols): New function for the h8300 linker.
+ (h8300_bfd_link_add_symbols): New function for the h8300 linker.
(coff_bfd_link_add_symbols): Define to use h8300 specific version.
(coff_bfd_link_hash_table_create): Likewise.
@@ -3615,7 +5902,7 @@ Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
(rtype2howto): Support R_MEM_INDIRECT.
(h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
for now.
-
+
Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
* coff-alpha.c (alpha_relocate_section): Use
@@ -3639,7 +5926,7 @@ Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
* cofflink.c (_bfd_coff_reloc_link_order): Likewise.
* ecoff.c (ecoff_reloc_link_order): Likewise.
* elflink.h (elf_link_add_object_symbols): Likewise.
- (elf_reloc_link_order): Likewise.
+ (elf_reloc_link_order): Likewise.
* linker.c (_bfd_generic_link_output_symbols): Likewise.
(_bfd_generic_reloc_link_order): Likewise.
(default_indirect_link_order): Likewise.
@@ -4269,7 +6556,7 @@ Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
- * libcoff-in.h: aligned newly exported names with bfd naming
+ * libcoff-in.h: aligned newly exported names with bfd naming
conventions. Removed an erroneous define of POWERPC_LE_PE.
* libcoff.h: Rebuild.
* cofflink.c, coff-ppc.c: the above function name changes
@@ -4312,10 +6599,10 @@ Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
* libcoff-in.h: promoted the following from cofflink.c to allow
_bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
- coff_debug_merge_element, struct coff_debug_merge_type,
+ coff_debug_merge_element, struct coff_debug_merge_type,
coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
- coff_debug_merge_hash_lookup, coff_link_section_info,
+ coff_debug_merge_hash_lookup, coff_link_section_info,
coff_final_link_info, coff_debug_merge_hash_newfunc,
coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
@@ -4525,13 +6812,13 @@ Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
(dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
Also begin the toc at 4 as an eye catcher ('31313131' marks the first
toc entry in an objdump) for now.
- (ppc_do_last, ppc_get_last): New function - needed to save processing
+ (ppc_do_last, ppc_get_last): New function - needed to save processing
the toc owner to the end.
- (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
+ (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
toc owner last.
- * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
- toc owner from being done till last. Must define POWERPC_LE_PC
+ * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
+ toc owner from being done till last. Must define POWERPC_LE_PC
to enable it.
* coffcode.h (coff_set_alignment_hook): alignment setting for .stab
@@ -4647,7 +6934,7 @@ Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
* xcofflink.c (xcoff_link_add_symbols): Create the special
sections if we see a DYNAMIC object, in case that is the only
XCOFF input object we see.
-
+
* elf32-mips.c: Extensive changes for a start at dynamic linking
support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -4793,7 +7080,7 @@ Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
(bfd_target_vector): Add i386freebsd_vec.
* i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
* i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
-
+
Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
* ieee.c (ieee_slurp_debug): New static function.
@@ -5037,7 +7324,7 @@ Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
* coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
- uses as well. Added a new howto to deal with TOCREL16 relocs that
+ uses as well. Added a new howto to deal with TOCREL16 relocs that
are TOCDEFN as well.
(coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
to handle RVA relocs from dlltool.
@@ -5045,7 +7332,7 @@ Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
(coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
(ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
- * coffcode.h (coff_set_alignment_hook): check idata$X sections
+ * coffcode.h (coff_set_alignment_hook): check idata$X sections
to get the right section alignment.
Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
@@ -5264,7 +7551,7 @@ Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
(BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
BFD64_BACKENDS_CFILES): New variables.
(CFILES): Use them.
-
+
Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
* peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
@@ -5551,7 +7838,7 @@ Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
(BFD32_BACKENDS): Add coff-i860.o.
(CFILES): Add cpu-i860.c and coff-i860.c.
* targets.c (i860coff_vec): Declare.
- (bfd_target_vector): Add &i860coff_vec.
+ (bfd_target_vector): Add &i860coff_vec.
* archures.c (bfd_i860_arch): Declare.
(bfd_archures_list): Add &bfd_i860_arch.
* coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
@@ -5616,7 +7903,7 @@ Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
* core.c: Renamed to corefile.c
* makefile.dos (OBJS): Change core.o to corefile.o
* Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
-
+
Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
* xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
@@ -5792,14 +8079,14 @@ Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
* libaout.h: Added M_68K4K_NETBSD magic.
* m68k4knetbsd.c: New file.
-
+
* hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
* hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
<machine/endian.h>.
* hosts/mipsnbsd.h: New file.
-
+
Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
* xcofflink.c: Numerous changes to get closer to a working XCOFF
@@ -5820,7 +8107,7 @@ Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
(rs6000coff_vec): Set symbol_leading_char to '.'.
* coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
value stored in ret rather than returning a pointer value.
-
+
Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
* config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
@@ -5872,7 +8159,7 @@ Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
* xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
* mpw-make.sed: Generalize subdir_do edit.
-
+
Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
* hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
@@ -5896,7 +8183,7 @@ Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
calc correct.
* peicode.h (add_data_entry): Use _cooked_size of data directory.
(coff_swap_outhdr_out): Hardwire in version number.
-
+
Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
* sunos.c (sunos_add_dynamic_symbols): Rename local variables
@@ -6395,13 +8682,13 @@ Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
- * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
+ * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
support on powerpc.
* Makefile.in: added *-ppc files
* coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
allow pe based .o's to be shared with other tools on ppc/NT
* config.bfd: added powerpc[le]-[pe|winnt] config support
- * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
+ * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
* peicode.h: Added more section flags for PE on ppc
Added coff_swap_filehdr_out to allow peicode.h to be
used for non-image PE files on ppc.
@@ -6661,7 +8948,7 @@ Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
* coffcode.h (coff_compute_section_file_positions): Keep the
- raw size safe.
+ raw size safe.
(coff_write_object_contents): Remember if it's a relocatable
file.
* libcoff-in.h (pe_data_type): New member 'has_reloc_section'
diff --git a/contrib/binutils/bfd/Makefile.am b/contrib/binutils/bfd/Makefile.am
new file mode 100644
index 0000000..b8e5544
--- /dev/null
+++ b/contrib/binutils/bfd/Makefile.am
@@ -0,0 +1,977 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+INCDIR = $(srcdir)/../include
+CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
+DEP = mkdep
+
+SUBDIRS = doc
+
+docdir = doc
+
+lib_LTLIBRARIES = libbfd.la
+
+# bfd.h goes here, for now
+BFD_H = bfd.h
+
+# Jim Kingdon notes:
+# Writing S-records should be included in all (or at least most)
+# *-*-coff, *-*-aout, etc., configurations, because people will want to
+# be able to use objcopy to create S-records. (S-records are not useful
+# for the debugger, so if you are downloading things as S-records you
+# need two copies of the executable, one to download and one for the
+# debugger).
+BFD_LIBS = \
+ archive.lo archures.lo bfd.lo cache.lo coffgen.lo corefile.lo \
+ format.lo init.lo libbfd.lo opncls.lo reloc.lo \
+ section.lo syms.lo targets.lo hash.lo linker.lo \
+ srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo
+
+BFD_LIBS_CFILES = \
+ archive.c archures.c bfd.c cache.c coffgen.c corefile.c \
+ format.c init.c libbfd.c opncls.c reloc.c \
+ section.c syms.c targets.c hash.c linker.c \
+ srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c
+
+# This list is alphabetized to make it easier to keep in sync
+# with the decls and initializer in archures.c.
+ALL_MACHINES = \
+ cpu-a29k.lo \
+ cpu-alpha.lo \
+ cpu-arc.lo \
+ cpu-arm.lo \
+ cpu-d10v.lo \
+ cpu-h8300.lo \
+ cpu-h8500.lo \
+ cpu-hppa.lo \
+ cpu-i386.lo \
+ cpu-i860.lo \
+ cpu-i960.lo \
+ cpu-m32r.lo \
+ cpu-m68k.lo \
+ cpu-m88k.lo \
+ cpu-mips.lo \
+ cpu-m10200.lo \
+ cpu-m10300.lo \
+ cpu-ns32k.lo \
+ cpu-powerpc.lo \
+ cpu-rs6000.lo \
+ cpu-sh.lo \
+ cpu-sparc.lo \
+ cpu-tic30.lo \
+ cpu-v850.lo \
+ cpu-vax.lo \
+ cpu-we32k.lo \
+ cpu-w65.lo \
+ cpu-z8k.lo
+
+ALL_MACHINES_CFILES = \
+ cpu-a29k.c \
+ cpu-alpha.c \
+ cpu-arc.c \
+ cpu-arm.c \
+ cpu-h8300.c \
+ cpu-h8500.c \
+ cpu-hppa.c \
+ cpu-i386.c \
+ cpu-i860.c \
+ cpu-i960.c \
+ cpu-m32r.c \
+ cpu-m68k.c \
+ cpu-m88k.c \
+ cpu-mips.c \
+ cpu-m10200.c \
+ cpu-m10300.c \
+ cpu-ns32k.c \
+ cpu-powerpc.c \
+ cpu-rs6000.c \
+ cpu-sh.c \
+ cpu-sparc.c \
+ cpu-tic30.c \
+ cpu-v850.c \
+ cpu-vax.c \
+ cpu-we32k.c \
+ cpu-w65.c \
+ cpu-z8k.c
+
+# The .o files needed by all of the 32 bit vectors that are configured into
+# target_vector in targets.c if configured with --enable-targets=all.
+BFD32_BACKENDS = \
+ aout-adobe.lo \
+ aout-arm.lo \
+ aout-ns32k.lo \
+ aout-sparcle.lo \
+ aout-tic30.lo \
+ aout0.lo \
+ aout32.lo \
+ bout.lo \
+ cf-i386lynx.lo \
+ cf-m68klynx.lo \
+ cf-sparclynx.lo \
+ coff-a29k.lo \
+ coff-apollo.lo \
+ coff-arm.lo \
+ coff-aux.lo \
+ coff-h8300.lo \
+ coff-h8500.lo \
+ coff-i386.lo \
+ coff-go32.lo \
+ coff-i860.lo \
+ coff-i960.lo \
+ coff-m68k.lo \
+ coff-m88k.lo \
+ coff-mips.lo \
+ coff-pmac.lo \
+ coff-rs6000.lo \
+ coff-sh.lo \
+ coff-sparc.lo \
+ coff-stgo32.lo \
+ coff-svm68k.lo \
+ coff-tic30.lo \
+ coff-u68k.lo \
+ coff-we32k.lo \
+ coff-w65.lo \
+ coff-z8k.lo \
+ cofflink.lo \
+ dwarf2.lo \
+ ecoff.lo \
+ ecofflink.lo \
+ elf.lo \
+ elf32-arc.lo \
+ elf32-d10v.lo \
+ elf32-gen.lo \
+ elf32-hppa.lo \
+ elf32-i386.lo \
+ elf32-i860.lo \
+ elf32-m32r.lo \
+ elf32-m68k.lo \
+ elf32-m88k.lo \
+ elf32-mips.lo \
+ elf-m10200.lo \
+ elf-m10300.lo \
+ elf32-ppc.lo \
+ elf32-sh.lo \
+ elf32-sparc.lo \
+ elf32-v850.lo \
+ elf32.lo \
+ elflink.lo \
+ hp300bsd.lo \
+ hp300hpux.lo \
+ som.lo \
+ i386aout.lo \
+ i386bsd.lo \
+ i386dynix.lo \
+ i386freebsd.lo \
+ i386linux.lo \
+ i386lynx.lo \
+ i386msdos.lo \
+ i386netbsd.lo \
+ i386mach3.lo \
+ i386os9k.lo \
+ ieee.lo \
+ m68k4knetbsd.lo \
+ m68klinux.lo \
+ m68klynx.lo \
+ m68knetbsd.lo \
+ m88kmach3.lo \
+ mipsbsd.lo \
+ newsos3.lo \
+ nlm.lo \
+ nlm32-i386.lo \
+ nlm32-sparc.lo \
+ nlm32-ppc.lo \
+ nlm32.lo \
+ ns32knetbsd.lo \
+ oasys.lo \
+ pc532-mach.lo \
+ pe-arm.lo \
+ pei-arm.lo \
+ pe-i386.lo \
+ pei-i386.lo \
+ pe-ppc.lo \
+ pei-ppc.lo \
+ ppcboot.lo \
+ reloc16.lo \
+ riscix.lo \
+ sparclinux.lo \
+ sparclynx.lo \
+ sparcnetbsd.lo \
+ sunos.lo \
+ vaxnetbsd.lo \
+ versados.lo \
+ xcofflink.lo
+
+BFD32_BACKENDS_CFILES = \
+ aout-adobe.c \
+ aout-arm.c \
+ aout-ns32k.c \
+ aout-sparcle.c \
+ aout-tic30.c \
+ aout0.c \
+ aout32.c \
+ bout.c \
+ cf-i386lynx.c \
+ cf-m68klynx.c \
+ cf-sparclynx.c \
+ coff-a29k.c \
+ coff-apollo.c \
+ coff-arm.c \
+ coff-aux.c \
+ coff-h8300.c \
+ coff-h8500.c \
+ coff-i386.c \
+ coff-i860.c \
+ coff-go32.c \
+ coff-i960.c \
+ coff-m68k.c \
+ coff-m88k.c \
+ coff-mips.c \
+ coff-pmac.c \
+ coff-rs6000.c \
+ coff-sh.c \
+ coff-sparc.c \
+ coff-stgo32.c \
+ coff-svm68k.c \
+ coff-tic30.c \
+ coff-u68k.c \
+ coff-we32k.c \
+ coff-w65.c \
+ coff-z8k.c \
+ cofflink.c \
+ dwarf2.c \
+ ecoff.c \
+ ecofflink.c \
+ elf.c \
+ elf32-arc.c \
+ elf32-d10v.c \
+ elf32-gen.c \
+ elf32-hppa.c \
+ elf32-i386.c \
+ elf32-i860.c \
+ elf32-m32r.c \
+ elf32-m68k.c \
+ elf32-m88k.c \
+ elf32-mips.c \
+ elf-m10200.c \
+ elf-m10300.c \
+ elf32-ppc.c \
+ elf32-sh.c \
+ elf32-sparc.c \
+ elf32-v850.c \
+ elf32.c \
+ elflink.c \
+ hp300bsd.c \
+ hp300hpux.c \
+ som.c \
+ i386aout.c \
+ i386bsd.c \
+ i386dynix.c \
+ i386freebsd.c \
+ i386linux.c \
+ i386lynx.c \
+ i386msdos.c \
+ i386netbsd.c \
+ i386mach3.c \
+ i386os9k.c \
+ ieee.c \
+ m68k4knetbsd.c \
+ m68klinux.c \
+ m68klynx.c \
+ m68knetbsd.c \
+ m88kmach3.c \
+ mipsbsd.c \
+ newsos3.c \
+ nlm.c \
+ nlm32-i386.c \
+ nlm32-sparc.c \
+ nlm32-ppc.c \
+ nlm32.c \
+ ns32knetbsd.c \
+ oasys.c \
+ pc532-mach.c \
+ pe-arm.c \
+ pei-arm.c \
+ pe-i386.c \
+ pei-i386.c \
+ pe-ppc.c \
+ pei-ppc.c \
+ ppcboot.c \
+ reloc16.c \
+ riscix.c \
+ sparclinux.c \
+ sparclynx.c \
+ sparcnetbsd.c \
+ sunos.c \
+ vaxnetbsd.c \
+ versados.c \
+ xcofflink.c
+
+# The .o files needed by all of the 64 bit vectors that are configured into
+# target_vector in targets.c if configured with --enable-targets=all
+# and --enable-64-bit-bfd.
+BFD64_BACKENDS = \
+ aout64.lo \
+ coff-alpha.lo \
+ demo64.lo \
+ elf64-alpha.lo \
+ elf64-gen.lo \
+ elf64-mips.lo \
+ elf64-sparc.lo \
+ elf64.lo \
+ evax-alpha.lo \
+ evax-egsd.lo \
+ evax-etir.lo \
+ evax-emh.lo \
+ evax-misc.lo \
+ nlm32-alpha.lo \
+ nlm64.lo
+
+BFD64_BACKENDS_CFILES = \
+ aout64.c \
+ coff-alpha.c \
+ demo64.c \
+ elf64-alpha.c \
+ elf64-gen.c \
+ elf64-mips.c \
+ elf64-sparc.c \
+ elf64.c \
+ evax-alpha.c \
+ evax-egsd.c \
+ evax-etir.c \
+ evax-emh.c \
+ evax-misc.c \
+ nlm32-alpha.c \
+ nlm64.c
+
+OPTIONAL_BACKENDS = \
+ aix386-core.lo \
+ hpux-core.lo \
+ irix-core.lo \
+ lynx-core.lo \
+ osf-core.lo \
+ trad-core.lo \
+ cisco-core.lo
+
+OPTIONAL_BACKENDS_CFILES = \
+ aix386-core.c \
+ hpux-core.c \
+ irix-core.c \
+ lynx-core.c \
+ osf-core.c \
+ trad-core.c \
+ cisco-core.c
+
+# These are defined by configure.in:
+WORDSIZE = @wordsize@
+ALL_BACKENDS = @all_backends@
+BFD_BACKENDS = @bfd_backends@
+BFD_MACHINES = @bfd_machines@
+TDEFAULTS = @tdefaults@
+
+INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES)
+
+# C source files that correspond to .o's.
+CFILES = \
+ $(BFD_LIBS_CFILES) \
+ $(ALL_MACHINES_CFILES) \
+ $(BFD32_BACKENDS_CFILES) \
+ $(BFD64_BACKENDS_CFILES) \
+ $(OPTIONAL_BACKENDS_CFILES)
+
+HFILES = \
+ aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h \
+ ecoffswap.h elf32-hppa.h elf32-target.h elf64-target.h \
+ elfcode.h evax.h genlink.h go32stub.h hppa_stubs.h libaout.h \
+ libbfd.h libcoff.h libecoff.h elf-bfd.h libhppa.h libieee.h \
+ libnlm.h liboasys.h netbsd.h nlm-target.h nlmcode.h ns32k.h som.h \
+ targmatch.h
+
+diststuff: info
+
+# Various kinds of .o files to put in libbfd.a:
+# BFD_BACKENDS Routines the configured targets need.
+# BFD_MACHINES Architecture-specific routines the configured targets need.
+# COREFILE Core file routines for a native configuration
+OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@
+
+stamp-ofiles: Makefile
+ rm -f tofiles
+ f=""; \
+ for i in $(OFILES) ; do \
+ case " $$f " in \
+ *" $$i "*) ;; \
+ *) f="$$f $$i" ;; \
+ esac ; \
+ done ; \
+ echo $$f > tofiles
+ $(SHELL) $(srcdir)/../move-if-change tofiles ofiles
+ touch stamp-ofiles
+
+ofiles: stamp-ofiles ; @true
+
+libbfd_la_SOURCES = $(BFD_LIBS_CFILES)
+libbfd_la_DEPENDENCIES = $(OFILES) ofiles
+libbfd_la_LIBADD = `cat ofiles`
+libbfd_la_LDFLAGS = -release $(VERSION)
+
+# libtool will build .libs/libbfd.a. We create libbfd.a in the build
+# directory so that we don't have to convert all the programs that use
+# libbfd.a simultaneously. This is a hack which should be removed if
+# everything else starts using libtool. FIXME.
+
+noinst_LIBRARIES = libbfd.a
+libbfd_a_SOURCES =
+
+stamp-lib: libbfd.la
+ if [ -f .libs/libbfd.a ]; then \
+ cp .libs/libbfd.a libbfd.tmp; \
+ $(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \
+ else true; fi
+ touch stamp-lib
+
+libbfd.a: stamp-lib ; @true
+
+# This file holds an array associating configuration triplets and
+# vector names. It is built from config.bfd. It is not compiled by
+# itself, but is included by targets.c.
+targmatch.h: config.bfd targmatch.sed
+ rm -f targmatch.h
+ sed -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new
+ mv -f targmatch.new targmatch.h
+
+# When compiling archures.c and targets.c, supply the default target
+# info from configure.
+
+targets.lo: targets.c config.status
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/targets.c
+
+archures.lo: archures.c config.status
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/archures.c
+
+elf32-target.h : elfxx-target.h
+ rm -f elf32-target.h
+ sed -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new
+ mv -f elf32-target.new elf32-target.h
+
+elf64-target.h : elfxx-target.h
+ rm -f elf64-target.h
+ sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
+ mv -f elf64-target.new elf64-target.h
+
+BFD_H_DEPS= $(INCDIR)/ansidecl.h
+LOCAL_H_DEPS= libbfd.h sysdep.h config.h
+$(BFD_LIBS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
+$(BFD_MACHINES): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
+$(BFD_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
+$(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
+
+# Install BFD include file, and others that it needs.
+install-data-local: $(BFD_H)
+ $(INSTALL_DATA) $(BFD_H) $(includedir)/bfd.h
+ $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(includedir)/ansidecl.h
+ $(INSTALL_DATA) $(INCDIR)/bfdlink.h $(includedir)/bfdlink.h
+
+# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
+.dep: dep.sed $(CFILES) $(HFILES) bfd.h
+ rm -f .dep1
+ $(MAKE) DEP=$(DEP) .dep1
+ sed -f dep.sed <.dep1 >.dep
+
+# This rule really wants a mkdep that runs "gcc -MM".
+# The NetBSD mkdep overwrites any existing file contents, and doesn't insert
+# the "DO NOT DELETE" line.
+# Other mkdep versions require a file that already exists, and do insert it.
+# Hence the weirdness....
+.dep1: $(CFILES)
+ rm -f .dep2 .dep2a
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
+ echo > .dep2a
+ $(DEP) -f .dep2a $(INCLUDES) $(CFLAGS) $?
+ sed -e '/DO NOT DELETE/d' -e '/^$$/d' < .dep2a >> .dep2
+ rm -f .dep2a
+ $(SHELL) $(srcdir)/../move-if-change .dep2 .dep1
+
+dep.sed: dep-in.sed config.status
+ sed <$(srcdir)/dep-in.sed >dep.sed \
+ -e 's!@BFD_H@!$(BFD_H)!' \
+ -e 's!@INCDIR@!$(INCDIR)!' \
+ -e 's!@SRCDIR@!$(srcdir)!'
+
+dep: .dep
+ sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
+ cat .dep >> tmp-Makefile
+ $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
+
+dep-in: .dep
+ sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
+ cat .dep >> tmp-Makefile.in
+ $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
+
+dep-am: .dep
+ sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
+ cat .dep >> tmp-Makefile.am
+ $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
+
+host-aout.lo: Makefile
+
+# The following program can be used to generate a simple config file
+# which can be folded into an h-XXX file for a new host, with some editing.
+aout-params.h: gen-aout
+ ./gen-aout host > aout-params.h
+gen-aout: $(srcdir)/gen-aout.c Makefile
+ $(CC) -o gen-aout $(CFLAGS) $(LFLAGS) $(srcdir)/gen-aout.c
+
+$(BFD_H): stmp-bfd-h ; @true
+
+stmp-bfd-h: bfd-in3.h
+ rm -f bfd-tmp.h
+ cp bfd-in3.h bfd-tmp.h
+ $(SHELL) $(srcdir)/../move-if-change bfd-tmp.h $(BFD_H)
+ rm -f bfd-tmp.h
+ touch stmp-bfd-h
+
+BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
+ reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c
+LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c cache.c reloc.c archures.c elf.c
+LIBCOFF_H_FILES = libcoff-in.h coffcode.h
+
+# Could really use a "copy-if-change"...
+headers:
+ (cd $(docdir); $(MAKE) protos $(FLAGS_TO_PASS))
+ cp $(docdir)/bfd.h bfd-in2.h-new
+ $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
+ cp $(docdir)/libbfd.h libbfd.h-new
+ $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
+ cp $(docdir)/libcoff.h libcoff.h-new
+ $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
+
+# We only rebuild the header files automatically if we have been
+# configured with --enable-maintainer-mode.
+
+$(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h ; @true
+stmp-bin2-h: $(BFD_H_FILES)
+ (cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h)
+ cp $(docdir)/bfd.h bfd-in2.h-new
+ $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
+ touch stmp-bin2-h
+
+$(srcdir)/libbfd.h: @MAINT@ stmp-lbfd-h ; @true
+stmp-lbfd-h: $(LIBBFD_H_FILES)
+ (cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) libbfd.h)
+ cp $(docdir)/libbfd.h libbfd.h-new
+ $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
+ touch stmp-lbfd-h
+
+$(srcdir)/libcoff.h: @MAINT@ stmp-lcoff-h ; @true
+stmp-lcoff-h: $(LIBCOFF_H_FILES)
+ (cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) libcoff.h)
+ cp $(docdir)/libcoff.h libcoff.h-new
+ $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
+ touch stmp-lcoff-h
+
+MOSTLYCLEANFILES = elf32-target.h elf64-target.h ofiles stamp-ofiles \
+ targmatch.h
+
+CLEANFILES = bfd.h dep.sed stmp-bfd-h .dep .dep1 libbfd.a stamp-lib \
+ stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
+
+
+
+# What appears below is generated by a hacked mkdep using gcc -MM.
+
+# DO NOT DELETE THIS LINE -- mkdep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
+archive.lo: archive.c $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h
+archures.lo: archures.c
+bfd.lo: bfd.c $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h libcoff.h \
+ libecoff.h $(INCDIR)/coff/ecoff.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
+cache.lo: cache.c
+coffgen.lo: coffgen.c $(INCDIR)/coff/internal.h libcoff.h \
+ $(INCDIR)/bfdlink.h
+corefile.lo: corefile.c
+format.lo: format.c
+init.lo: init.c
+libbfd.lo: libbfd.c
+opncls.lo: opncls.c $(INCDIR)/objalloc.h
+reloc.lo: reloc.c $(INCDIR)/bfdlink.h
+section.lo: section.c
+syms.lo: syms.c $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def
+targets.lo: targets.c $(INCDIR)/fnmatch.h targmatch.h
+hash.lo: hash.c $(INCDIR)/objalloc.h
+linker.lo: linker.c $(INCDIR)/bfdlink.h genlink.h
+srec.lo: srec.c $(INCDIR)/libiberty.h
+binary.lo: binary.c
+tekhex.lo: tekhex.c $(INCDIR)/libiberty.h
+ihex.lo: ihex.c $(INCDIR)/libiberty.h
+stabs.lo: stabs.c $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
+stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def
+cpu-a29k.lo: cpu-a29k.c
+cpu-alpha.lo: cpu-alpha.c
+cpu-arc.lo: cpu-arc.c
+cpu-arm.lo: cpu-arm.c
+cpu-h8300.lo: cpu-h8300.c
+cpu-h8500.lo: cpu-h8500.c
+cpu-hppa.lo: cpu-hppa.c
+cpu-i386.lo: cpu-i386.c
+cpu-i860.lo: cpu-i860.c
+cpu-i960.lo: cpu-i960.c
+cpu-m32r.lo: cpu-m32r.c
+cpu-m68k.lo: cpu-m68k.c
+cpu-m88k.lo: cpu-m88k.c
+cpu-mips.lo: cpu-mips.c
+cpu-m10200.lo: cpu-m10200.c
+cpu-m10300.lo: cpu-m10300.c
+cpu-ns32k.lo: cpu-ns32k.c ns32k.h
+cpu-powerpc.lo: cpu-powerpc.c
+cpu-rs6000.lo: cpu-rs6000.c
+cpu-sh.lo: cpu-sh.c
+cpu-sparc.lo: cpu-sparc.c
+cpu-tic30.lo: cpu-tic30.c
+cpu-v850.lo: cpu-v850.c
+cpu-vax.lo: cpu-vax.c
+cpu-we32k.lo: cpu-we32k.c
+cpu-w65.lo: cpu-w65.c
+cpu-z8k.lo: cpu-z8k.c
+aout-adobe.lo: aout-adobe.c $(INCDIR)/aout/adobe.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \
+ $(INCDIR)/bfdlink.h
+aout-arm.lo: aout-arm.c libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h aoutx.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
+aout-ns32k.lo: aout-ns32k.c $(INCDIR)/aout/aout64.h \
+ ns32k.h libaout.h $(INCDIR)/bfdlink.h
+aout-sparcle.lo: aout-sparcle.c $(INCDIR)/bfdlink.h \
+ libaout.h aoutf1.h $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
+ aout-target.h
+aout-tic30.lo: aout-tic30.c libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h aoutx.h
+aout0.lo: aout0.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
+aout32.lo: aout32.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h
+bout.lo: bout.c $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/bout.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h
+cf-i386lynx.lo: cf-i386lynx.c coff-i386.c $(INCDIR)/coff/i386.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+cf-m68klynx.lo: cf-m68klynx.c coff-m68k.c $(INCDIR)/coff/m68k.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/coff/sparc.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-a29k.lo: coff-a29k.c $(INCDIR)/coff/a29k.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-apollo.lo: coff-apollo.c $(INCDIR)/coff/apollo.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-arm.lo: coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-aux.lo: coff-aux.c $(INCDIR)/coff/aux-coff.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/m68k.h coff-m68k.c libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-h8300.lo: coff-h8300.c $(INCDIR)/bfdlink.h genlink.h \
+ $(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h libcoff.h \
+ coffcode.h coffswap.h
+coff-h8500.lo: coff-h8500.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/h8500.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+coff-i386.lo: coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-i860.lo: coff-i860.c $(INCDIR)/coff/i860.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-go32.lo: coff-go32.c coff-i386.c $(INCDIR)/coff/i386.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-i960.lo: coff-i960.c $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-m68k.lo: coff-m68k.c $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-m88k.lo: coff-m88k.c $(INCDIR)/coff/m88k.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-mips.lo: coff-mips.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
+ $(INCDIR)/coff/mips.h libcoff.h libecoff.h coffswap.h \
+ ecoffswap.h
+coff-pmac.lo: coff-pmac.c coff-rs6000.c $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/rs6000.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-rs6000.lo: coff-rs6000.c $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/rs6000.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-sh.lo: coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+coff-sparc.lo: coff-sparc.c $(INCDIR)/coff/sparc.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/coff/i386.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/go32exe.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h \
+ go32stub.h
+coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-tic30.lo: coff-tic30.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic30.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-we32k.lo: coff-we32k.c $(INCDIR)/coff/we32k.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-w65.lo: coff-w65.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/w65.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+coff-z8k.lo: coff-z8k.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/z8k.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+cofflink.lo: cofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
+ libcoff.h
+dwarf2.lo: dwarf2.c $(INCDIR)/libiberty.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
+ecoff.lo: ecoff.c $(INCDIR)/bfdlink.h $(INCDIR)/aout/ar.h \
+ $(INCDIR)/aout/ranlib.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
+ libcoff.h libecoff.h
+ecofflink.lo: ecofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/objalloc.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
+ libcoff.h libecoff.h
+elf.lo: elf.c $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
+elf32-arc.lo: elf32-arc.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/arc.h elf32-target.h
+elf32-d10v.lo: elf32-d10v.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ elf32-target.h
+elf32-gen.lo: elf32-gen.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ elf32-target.h
+elf32-hppa.lo: elf32-hppa.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ elf32-hppa.h libhppa.h $(INCDIR)/elf/hppa.h hppa_stubs.h \
+ elf32-target.h
+elf32-i386.lo: elf32-i386.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ elf32-target.h
+elf32-i860.lo: elf32-i860.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ elf32-target.h
+elf32-m32r.lo: elf32-m32r.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/m32r.h elf32-target.h
+elf32-m68k.lo: elf32-m68k.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ elf32-target.h
+elf32-m88k.lo: elf32-m88k.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ elf32-target.h
+elf32-mips.lo: elf32-mips.c $(INCDIR)/bfdlink.h genlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h ecoffswap.h \
+ elf32-target.h
+elf-m10200.lo: elf-m10200.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ elf32-target.h
+elf-m10300.lo: elf-m10300.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ elf32-target.h
+elf32-ppc.lo: elf32-ppc.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/elf/ppc.h elf32-target.h
+elf32-sh.lo: elf32-sh.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ elf32-target.h
+elf32-sparc.lo: elf32-sparc.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/elf/sparc.h elf32-target.h
+elf32-v850.lo: elf32-v850.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/elf/v850.h elf32-target.h
+elf32.lo: elf32.c elfcode.h $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/fnmatch.h elfcore.h elflink.h
+elflink.lo: elflink.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
+hp300bsd.lo: hp300bsd.c libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+hp300hpux.lo: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \
+ aoutx.h $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
+ aout-target.h
+som.lo: som.c
+i386aout.lo: i386aout.c $(INCDIR)/aout/aout64.h libaout.h \
+ $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+i386bsd.lo: i386bsd.c libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+i386dynix.lo: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \
+ $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
+ aout-target.h
+i386freebsd.lo: i386freebsd.c freebsd.h libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+i386linux.lo: i386linux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
+ $(INCDIR)/bfdlink.h aout-target.h
+i386lynx.lo: i386lynx.c libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+i386msdos.lo: i386msdos.c libaout.h $(INCDIR)/bfdlink.h
+i386netbsd.lo: i386netbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+i386mach3.lo: i386mach3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
+ $(INCDIR)/bfdlink.h aout-target.h
+i386os9k.lo: i386os9k.c $(INCDIR)/bfdlink.h libaout.h \
+ $(INCDIR)/os9k.h
+ieee.lo: ieee.c $(INCDIR)/ieee.h libieee.h
+m68k4knetbsd.lo: m68k4knetbsd.c netbsd.h libaout.h \
+ $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+m68klinux.lo: m68klinux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
+ $(INCDIR)/bfdlink.h aout-target.h
+m68klynx.lo: m68klynx.c libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+m68knetbsd.lo: m68knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+m88kmach3.lo: m88kmach3.c libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+mipsbsd.lo: mipsbsd.c libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+newsos3.lo: newsos3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
+ $(INCDIR)/bfdlink.h aout-target.h
+nlm.lo: nlm.c libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
+ $(INCDIR)/nlm/external.h
+nlm32-i386.lo: nlm32-i386.c $(INCDIR)/nlm/i386-ext.h \
+ libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
+ $(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
+nlm32-sparc.lo: nlm32-sparc.c $(INCDIR)/nlm/sparc32-ext.h \
+ libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
+ $(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
+nlm32-ppc.lo: nlm32-ppc.c $(INCDIR)/nlm/ppc-ext.h libnlm.h \
+ $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \
+ nlmswap.h nlm-target.h
+nlm32.lo: nlm32.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \
+ $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
+ns32knetbsd.lo: ns32knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+oasys.lo: oasys.c $(INCDIR)/oasys.h liboasys.h
+pc532-mach.lo: pc532-mach.c libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+pe-arm.lo: pe-arm.c coff-arm.c $(INCDIR)/coff/arm.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h
+pei-arm.lo: pei-arm.c coff-arm.c $(INCDIR)/coff/arm.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h
+pe-i386.lo: pe-i386.c coff-i386.c $(INCDIR)/coff/i386.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h
+pei-i386.lo: pei-i386.c coff-i386.c $(INCDIR)/coff/i386.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h
+pe-ppc.lo: pe-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h
+pei-ppc.lo: pei-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h
+ppcboot.lo: ppcboot.c
+reloc16.lo: reloc16.c $(INCDIR)/bfdlink.h genlink.h \
+ $(INCDIR)/coff/internal.h libcoff.h
+riscix.lo: riscix.c libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h
+sparclinux.lo: sparclinux.c $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h
+sparclynx.lo: sparclynx.c $(INCDIR)/aout/sun4.h libaout.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
+sparcnetbsd.lo: sparcnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \
+ $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
+vaxnetbsd.lo: vaxnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+versados.lo: versados.c $(INCDIR)/libiberty.h
+xcofflink.lo: xcofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
+ libcoff.h
+aout64.lo: aout64.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h
+coff-alpha.lo: coff-alpha.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
+ $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \
+ libecoff.h coffswap.h ecoffswap.h
+demo64.lo: demo64.c aoutf1.h $(INCDIR)/aout/sun4.h \
+ libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
+ aout-target.h
+elf64-alpha.lo: elf64-alpha.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/alpha.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \
+ $(INCDIR)/aout/ar.h libcoff.h libecoff.h ecoffswap.h \
+ elf64-target.h
+elf64-gen.lo: elf64-gen.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ elf64-target.h
+elf64-mips.lo: elf64-mips.c $(INCDIR)/aout/ar.h $(INCDIR)/bfdlink.h \
+ genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h ecoffswap.h \
+ elf64-target.h
+elf64-sparc.lo: elf64-sparc.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/sparc.h elf64-target.h
+elf64.lo: elf64.c elfcode.h $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/fnmatch.h elfcore.h elflink.h
+evax-alpha.lo: evax-alpha.c $(INCDIR)/bfdlink.h evax.h
+evax-egsd.lo: evax-egsd.c $(INCDIR)/bfdlink.h evax.h
+evax-etir.lo: evax-etir.c $(INCDIR)/bfdlink.h evax.h
+evax-emh.lo: evax-emh.c $(INCDIR)/bfdlink.h evax.h
+evax-misc.lo: evax-misc.c $(INCDIR)/bfdlink.h evax.h
+nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/nlm/alpha-ext.h \
+ libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
+ $(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
+nlm64.lo: nlm64.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \
+ $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
+aix386-core.lo: aix386-core.c $(INCDIR)/coff/i386.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h
+hpux-core.lo: hpux-core.c
+irix-core.lo: irix-core.c
+lynx-core.lo: lynx-core.c
+osf-core.lo: osf-core.c
+trad-core.lo: trad-core.c libaout.h $(INCDIR)/bfdlink.h
+cisco-core.lo: cisco-core.c
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/contrib/binutils/bfd/Makefile.in b/contrib/binutils/bfd/Makefile.in
index e9233cf..d8249a4 100644
--- a/contrib/binutils/bfd/Makefile.in
+++ b/contrib/binutils/bfd/Makefile.in
@@ -1,76 +1,95 @@
-# Makefile template for Configure for the BFD library.
-# Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
-# Free Software Foundation, Inc.
-# Written by Cygnus Support.
-#
-# This file is part of BFD, the Binary File Descriptor library.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
+# Makefile.in generated automatically by automake 1.2e from Makefile.am
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
-VPATH = @srcdir@
-srcdir = @srcdir@
-prefix = @prefix@
+SHELL = @SHELL@
-program_transform_name = @program_transform_name@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
exec_prefix = @exec_prefix@
-bindir = @bindir@
-libdir = @libdir@
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
datadir = @datadir@
-mandir = @mandir@
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
infodir = @infodir@
+mandir = @mandir@
includedir = @includedir@
-oldincludedir =
-docdir = doc
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
-SHELL = /bin/sh
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
-
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
AR = @AR@
-AR_FLAGS = rc
+BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@
+BFD_HOST_64_BIT = @BFD_HOST_64_BIT@
+BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@
+BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@
CC = @CC@
-CFLAGS = @CFLAGS@
-MAKEINFO = makeinfo
+CC_FOR_BUILD = @CC_FOR_BUILD@
+COREFILE = @COREFILE@
+COREFLAG = @COREFLAG@
+EXEEXT = @EXEEXT@
+EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
+HDEFINES = @HDEFINES@
+LD = @LD@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NM = @NM@
+PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
+TDEFINES = @TDEFINES@
+VERSION = @VERSION@
+all_backends = @all_backends@
+bfd_backends = @bfd_backends@
+bfd_machines = @bfd_machines@
+tdefaults = @tdefaults@
+wordsize = @wordsize@
-ALLLIBS = @ALLLIBS@
-
-PICFLAG = @PICFLAG@
-SHLIB = @SHLIB@
-SHLIB_CC = @SHLIB_CC@
-SHLIB_CFLAGS = @SHLIB_CFLAGS@
-SHLIB_LIBS = @SHLIB_LIBS@
-COMMON_SHLIB = @COMMON_SHLIB@
-SHLINK = @SHLINK@
-
-SONAME = lib`echo $(SHLIB) | sed -e 's/^lib//' | sed '$(program_transform_name)'`
-
-CC_FOR_BUILD = @CC_FOR_BUILD@
+AUTOMAKE_OPTIONS = cygnus
INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
@@ -78,18 +97,14 @@ DEP = mkdep
SUBDIRS = doc
-TARGETLIB = libbfd.a
+docdir = doc
+
+lib_LTLIBRARIES = libbfd.la
# bfd.h goes here, for now
BFD_H = bfd.h
-# Some of these files should be in BFD*_BACKENDS below, but some programs
-# won't link without them. So, in order for some of the minimal-bfd
-# hacks to work, they're also included here for now.
-# gdb: elf.o
-# objdump: elf.o
-#
-# Also, Jim Kingdon notes:
+# Jim Kingdon notes:
# Writing S-records should be included in all (or at least most)
# *-*-coff, *-*-aout, etc., configurations, because people will want to
# be able to use objcopy to create S-records. (S-records are not useful
@@ -97,49 +112,53 @@ BFD_H = bfd.h
# need two copies of the executable, one to download and one for the
# debugger).
BFD_LIBS = \
- archive.o archures.o bfd.o cache.o coffgen.o corefile.o \
- format.o init.o libbfd.o opncls.o reloc.o \
- section.o syms.o targets.o hash.o linker.o \
- elf.o srec.o binary.o tekhex.o ihex.o stabs.o stab-syms.o
+ archive.lo archures.lo bfd.lo cache.lo coffgen.lo corefile.lo \
+ format.lo init.lo libbfd.lo opncls.lo reloc.lo \
+ section.lo syms.lo targets.lo hash.lo linker.lo \
+ srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo
BFD_LIBS_CFILES = \
archive.c archures.c bfd.c cache.c coffgen.c corefile.c \
format.c init.c libbfd.c opncls.c reloc.c \
section.c syms.c targets.c hash.c linker.c \
- elf.c srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c
+ srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c
# This list is alphabetized to make it easier to keep in sync
# with the decls and initializer in archures.c.
ALL_MACHINES = \
- cpu-a29k.o \
- cpu-alpha.o \
- cpu-arm.o \
- cpu-d10v.o \
- cpu-h8300.o \
- cpu-h8500.o \
- cpu-hppa.o \
- cpu-i386.o \
- cpu-i860.o \
- cpu-i960.o \
- cpu-m32r.o \
- cpu-m68k.o \
- cpu-m88k.o \
- cpu-mips.o \
- cpu-m10200.o \
- cpu-m10300.o \
- cpu-ns32k.o \
- cpu-powerpc.o \
- cpu-rs6000.o \
- cpu-sh.o \
- cpu-sparc.o \
- cpu-vax.o \
- cpu-we32k.o \
- cpu-w65.o \
- cpu-z8k.o
+ cpu-a29k.lo \
+ cpu-alpha.lo \
+ cpu-arc.lo \
+ cpu-arm.lo \
+ cpu-d10v.lo \
+ cpu-h8300.lo \
+ cpu-h8500.lo \
+ cpu-hppa.lo \
+ cpu-i386.lo \
+ cpu-i860.lo \
+ cpu-i960.lo \
+ cpu-m32r.lo \
+ cpu-m68k.lo \
+ cpu-m88k.lo \
+ cpu-mips.lo \
+ cpu-m10200.lo \
+ cpu-m10300.lo \
+ cpu-ns32k.lo \
+ cpu-powerpc.lo \
+ cpu-rs6000.lo \
+ cpu-sh.lo \
+ cpu-sparc.lo \
+ cpu-tic30.lo \
+ cpu-v850.lo \
+ cpu-vax.lo \
+ cpu-we32k.lo \
+ cpu-w65.lo \
+ cpu-z8k.lo
ALL_MACHINES_CFILES = \
cpu-a29k.c \
cpu-alpha.c \
+ cpu-arc.c \
cpu-arm.c \
cpu-h8300.c \
cpu-h8500.c \
@@ -158,6 +177,8 @@ ALL_MACHINES_CFILES = \
cpu-rs6000.c \
cpu-sh.c \
cpu-sparc.c \
+ cpu-tic30.c \
+ cpu-v850.c \
cpu-vax.c \
cpu-we32k.c \
cpu-w65.c \
@@ -166,108 +187,116 @@ ALL_MACHINES_CFILES = \
# The .o files needed by all of the 32 bit vectors that are configured into
# target_vector in targets.c if configured with --enable-targets=all.
BFD32_BACKENDS = \
- aout-adobe.o \
- aout-arm.o \
- aout-ns32k.o \
- aout-sparcle.o \
- aout0.o \
- aout32.o \
- bout.o \
- cf-i386lynx.o \
- cf-m68klynx.o \
- cf-sparclynx.o \
- coff-a29k.o \
- coff-apollo.o \
- coff-arm.o \
- coff-aux.o \
- coff-h8300.o \
- coff-h8500.o \
- coff-i386.o \
- coff-go32.o \
- coff-i860.o \
- coff-i960.o \
- coff-m68k.o \
- coff-m88k.o \
- coff-mips.o \
- coff-pmac.o \
- coff-rs6000.o \
- coff-sh.o \
- coff-sparc.o \
- coff-svm68k.o \
- coff-u68k.o \
- coff-we32k.o \
- coff-w65.o \
- coff-z8k.o \
- cofflink.o \
- ecoff.o \
- ecofflink.o \
- elf32-d10v.o \
- elf32-gen.o \
- elf32-hppa.o \
- elf32-i386.o \
- elf32-i860.o \
- elf32-m32r.o \
- elf32-m68k.o \
- elf32-m88k.o \
- elf32-mips.o \
- elf-m10200.o \
- elf-m10300.o \
- elf32-ppc.o \
- elf32-sh.o \
- elf32-sparc.o \
- elf32.o \
- elflink.o \
- hp300bsd.o \
- hp300hpux.o \
- som.o \
- i386aout.o \
- i386bsd.o \
- i386dynix.o \
- i386freebsd.o \
- i386linux.o \
- i386lynx.o \
- i386msdos.o \
- i386netbsd.o \
- i386mach3.o \
- i386os9k.o \
- ieee.o \
- m68k4knetbsd.o \
- m68klinux.o \
- m68klynx.o \
- m68knetbsd.o \
- m88kmach3.o \
- mipsbsd.o \
- newsos3.o \
- nlm.o \
- nlm32-i386.o \
- nlm32-sparc.o \
- nlm32-ppc.o \
- nlm32.o \
- ns32knetbsd.o \
- oasys.o \
- pc532-mach.o \
- pe-arm.o \
- pei-arm.o \
- pe-i386.o \
- pei-i386.o \
- pe-ppc.o \
- pei-ppc.o \
- ppcboot.o \
- reloc16.o \
- riscix.o \
- sparclinux.o \
- sparclynx.o \
- sparcnetbsd.o \
- sunos.o \
- tekhex.o \
- versados.o \
- xcofflink.o
+ aout-adobe.lo \
+ aout-arm.lo \
+ aout-ns32k.lo \
+ aout-sparcle.lo \
+ aout-tic30.lo \
+ aout0.lo \
+ aout32.lo \
+ bout.lo \
+ cf-i386lynx.lo \
+ cf-m68klynx.lo \
+ cf-sparclynx.lo \
+ coff-a29k.lo \
+ coff-apollo.lo \
+ coff-arm.lo \
+ coff-aux.lo \
+ coff-h8300.lo \
+ coff-h8500.lo \
+ coff-i386.lo \
+ coff-go32.lo \
+ coff-i860.lo \
+ coff-i960.lo \
+ coff-m68k.lo \
+ coff-m88k.lo \
+ coff-mips.lo \
+ coff-pmac.lo \
+ coff-rs6000.lo \
+ coff-sh.lo \
+ coff-sparc.lo \
+ coff-stgo32.lo \
+ coff-svm68k.lo \
+ coff-tic30.lo \
+ coff-u68k.lo \
+ coff-we32k.lo \
+ coff-w65.lo \
+ coff-z8k.lo \
+ cofflink.lo \
+ dwarf2.lo \
+ ecoff.lo \
+ ecofflink.lo \
+ elf.lo \
+ elf32-arc.lo \
+ elf32-d10v.lo \
+ elf32-gen.lo \
+ elf32-hppa.lo \
+ elf32-i386.lo \
+ elf32-i860.lo \
+ elf32-m32r.lo \
+ elf32-m68k.lo \
+ elf32-m88k.lo \
+ elf32-mips.lo \
+ elf-m10200.lo \
+ elf-m10300.lo \
+ elf32-ppc.lo \
+ elf32-sh.lo \
+ elf32-sparc.lo \
+ elf32-v850.lo \
+ elf32.lo \
+ elflink.lo \
+ hp300bsd.lo \
+ hp300hpux.lo \
+ som.lo \
+ i386aout.lo \
+ i386bsd.lo \
+ i386dynix.lo \
+ i386freebsd.lo \
+ i386linux.lo \
+ i386lynx.lo \
+ i386msdos.lo \
+ i386netbsd.lo \
+ i386mach3.lo \
+ i386os9k.lo \
+ ieee.lo \
+ m68k4knetbsd.lo \
+ m68klinux.lo \
+ m68klynx.lo \
+ m68knetbsd.lo \
+ m88kmach3.lo \
+ mipsbsd.lo \
+ newsos3.lo \
+ nlm.lo \
+ nlm32-i386.lo \
+ nlm32-sparc.lo \
+ nlm32-ppc.lo \
+ nlm32.lo \
+ ns32knetbsd.lo \
+ oasys.lo \
+ pc532-mach.lo \
+ pe-arm.lo \
+ pei-arm.lo \
+ pe-i386.lo \
+ pei-i386.lo \
+ pe-ppc.lo \
+ pei-ppc.lo \
+ ppcboot.lo \
+ reloc16.lo \
+ riscix.lo \
+ sparclinux.lo \
+ sparclynx.lo \
+ sparcnetbsd.lo \
+ sunos.lo \
+ vaxnetbsd.lo \
+ versados.lo \
+ xcofflink.lo
BFD32_BACKENDS_CFILES = \
aout-adobe.c \
aout-arm.c \
aout-ns32k.c \
aout-sparcle.c \
+ aout-tic30.c \
aout0.c \
aout32.c \
bout.c \
@@ -291,14 +320,20 @@ BFD32_BACKENDS_CFILES = \
coff-rs6000.c \
coff-sh.c \
coff-sparc.c \
+ coff-stgo32.c \
coff-svm68k.c \
+ coff-tic30.c \
coff-u68k.c \
coff-we32k.c \
coff-w65.c \
coff-z8k.c \
cofflink.c \
+ dwarf2.c \
ecoff.c \
ecofflink.c \
+ elf.c \
+ elf32-arc.c \
+ elf32-d10v.c \
elf32-gen.c \
elf32-hppa.c \
elf32-i386.c \
@@ -312,6 +347,7 @@ BFD32_BACKENDS_CFILES = \
elf32-ppc.c \
elf32-sh.c \
elf32-sparc.c \
+ elf32-v850.c \
elf32.c \
elflink.c \
hp300bsd.c \
@@ -356,7 +392,7 @@ BFD32_BACKENDS_CFILES = \
sparclynx.c \
sparcnetbsd.c \
sunos.c \
- tekhex.c \
+ vaxnetbsd.c \
versados.c \
xcofflink.c
@@ -364,21 +400,21 @@ BFD32_BACKENDS_CFILES = \
# target_vector in targets.c if configured with --enable-targets=all
# and --enable-64-bit-bfd.
BFD64_BACKENDS = \
- aout64.o \
- coff-alpha.o \
- demo64.o \
- elf64-alpha.o \
- elf64-gen.o \
- elf64-mips.o \
- elf64-sparc.o \
- elf64.o \
- evax-alpha.o \
- evax-egsd.o \
- evax-etir.o \
- evax-emh.o \
- evax-misc.o \
- nlm32-alpha.o \
- nlm64.o
+ aout64.lo \
+ coff-alpha.lo \
+ demo64.lo \
+ elf64-alpha.lo \
+ elf64-gen.lo \
+ elf64-mips.lo \
+ elf64-sparc.lo \
+ elf64.lo \
+ evax-alpha.lo \
+ evax-egsd.lo \
+ evax-etir.lo \
+ evax-emh.lo \
+ evax-misc.lo \
+ nlm32-alpha.lo \
+ nlm64.lo
BFD64_BACKENDS_CFILES = \
aout64.c \
@@ -398,13 +434,13 @@ BFD64_BACKENDS_CFILES = \
nlm64.c
OPTIONAL_BACKENDS = \
- aix386-core.o \
- hpux-core.o \
- irix-core.o \
- lynx-core.o \
- osf-core.o \
- trad-core.o \
- cisco-core.o
+ aix386-core.lo \
+ hpux-core.lo \
+ irix-core.lo \
+ lynx-core.lo \
+ osf-core.lo \
+ trad-core.lo \
+ cisco-core.lo
OPTIONAL_BACKENDS_CFILES = \
aix386-core.c \
@@ -422,35 +458,7 @@ BFD_BACKENDS = @bfd_backends@
BFD_MACHINES = @bfd_machines@
TDEFAULTS = @tdefaults@
-all:
-
-FLAGS_TO_PASS = \
- "prefix=$(prefix)" \
- "exec_prefix=$(exec_prefix)" \
- "against=$(against)" \
- "AR=$(AR)" \
- "AR_FLAGS=$(AR_FLAGS)" \
- "CC=$(CC)" \
- "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
- "CFLAGS=$(CFLAGS)" \
- "RANLIB=$(RANLIB)" \
- "MAKEINFO=$(MAKEINFO)" \
- "INSTALL=$(INSTALL)" \
- "INSTALL_DATA=$(INSTALL_DATA)" \
- "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
-
-ALL_CFLAGS=-D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) $(CFLAGS)
-.c.o:
- if [ -n "$(PICFLAG)" ]; then \
- $(CC) -c $(PICFLAG) $(ALL_CFLAGS) $< -o pic/$@; \
- else true; fi
- $(CC) -c $(ALL_CFLAGS) $<
-
-bfd_libs_here =
-all_machines_here =
-bfd32_backends_here =
-core_files_here =
-configs_not_included_in_all_targets_option_here =
+INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES)
# C source files that correspond to .o's.
CFILES = \
@@ -463,41 +471,415 @@ CFILES = \
HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h \
ecoffswap.h elf32-hppa.h elf32-target.h elf64-target.h \
- elfcode.h evax.h genlink.h hppa_stubs.h libaout.h libbfd.h \
- libcoff.h libecoff.h elf-bfd.h libhppa.h libieee.h libnlm.h \
- liboasys.h netbsd.h nlm-target.h nlmcode.h ns32k.h som.h \
+ elfcode.h evax.h genlink.h go32stub.h hppa_stubs.h libaout.h \
+ libbfd.h libcoff.h libecoff.h elf-bfd.h libhppa.h libieee.h \
+ libnlm.h liboasys.h netbsd.h nlm-target.h nlmcode.h ns32k.h som.h \
targmatch.h
-all: Makefile $(ALLLIBS) @PICLIST@
- @$(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
+# Various kinds of .o files to put in libbfd.a:
+# BFD_BACKENDS Routines the configured targets need.
+# BFD_MACHINES Architecture-specific routines the configured targets need.
+# COREFILE Core file routines for a native configuration
+OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@
+
+libbfd_la_SOURCES = $(BFD_LIBS_CFILES)
+libbfd_la_DEPENDENCIES = $(OFILES) ofiles
+libbfd_la_LIBADD = `cat ofiles`
+libbfd_la_LDFLAGS = -release $(VERSION)
-.NOEXPORT:
-MAKEOVERRIDES=
+# libtool will build .libs/libbfd.a. We create libbfd.a in the build
+# directory so that we don't have to convert all the programs that use
+# libbfd.a simultaneously. This is a hack which should be removed if
+# everything else starts using libtool. FIXME.
+
+noinst_LIBRARIES = libbfd.a
+libbfd_a_SOURCES =
+
+BFD_H_DEPS= $(INCDIR)/ansidecl.h
+LOCAL_H_DEPS= libbfd.h sysdep.h config.h
+
+BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
+ reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c
+LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c cache.c reloc.c archures.c elf.c
+LIBCOFF_H_FILES = libcoff-in.h coffcode.h
+
+MOSTLYCLEANFILES = elf32-target.h elf64-target.h ofiles stamp-ofiles \
+ targmatch.h
+
+CLEANFILES = bfd.h dep.sed stmp-bfd-h .dep .dep1 libbfd.a stamp-lib \
+ stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = bfd-in3.h
+LIBRARIES = $(noinst_LIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I.
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+libbfd_a_LIBADD =
+libbfd_a_OBJECTS =
+LTLIBRARIES = $(lib_LTLIBRARIES)
+
+libbfd_la_OBJECTS = archive.lo archures.lo bfd.lo cache.lo coffgen.lo \
+corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo \
+syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo \
+ihex.lo stabs.lo stab-syms.lo
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = README COPYING ChangeLog Makefile.am Makefile.in TODO \
+acconfig.h acinclude.m4 aclocal.m4 bfd-in2.h config.in configure \
+configure.in stamp-h.in
-.PHONY: check installcheck
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP = --best
+SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
+OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS)
+
+default: all
+
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .s
+$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): @MAINT@ configure.in acinclude.m4
+ cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+config.h: stamp-h
+ @:
+stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
+ $(SHELL) ./config.status
+ @echo timestamp > stamp-h
+$(srcdir)/config.in: @MAINT@$(srcdir)/stamp-h.in
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+ cd $(top_srcdir) && $(AUTOHEADER)
+ @echo timestamp > $(srcdir)/stamp-h.in
+
+mostlyclean-hdr:
+
+clean-hdr:
+
+distclean-hdr:
+ -rm -f config.h
+
+maintainer-clean-hdr:
+bfd-in3.h: $(top_builddir)/config.status bfd-in2.h
+ cd $(top_builddir) && CONFIG_FILES=$@:bfd-in2.h CONFIG_HEADERS= ./config.status
+
+mostlyclean-noinstLIBRARIES:
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+distclean-noinstLIBRARIES:
+
+maintainer-clean-noinstLIBRARIES:
+
+.c.o:
+ $(COMPILE) -c $<
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+mostlyclean-libLTLIBRARIES:
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+
+distclean-libLTLIBRARIES:
+
+maintainer-clean-libLTLIBRARIES:
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(libdir)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo "$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p"; \
+ $(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ $(NORMAL_UNINSTALL)
+ list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ $(LIBTOOL) --mode=uninstall rm -f $(libdir)/$$p; \
+ done
+
+libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES)
+ $(LINK) -rpath $(libdir) $(libbfd_la_LDFLAGS) $(libbfd_la_OBJECTS) $(libbfd_la_LIBADD) $(LIBS)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ target=`echo $@ | sed s/-recursive//`; \
+ echo "Making $$target in $$subdir"; \
+ (cd $$subdir && $(MAKE) $$target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
+ done; \
+ for subdir in $$rev; do \
+ target=`echo $@ | sed s/-recursive//`; \
+ echo "Making $$target in $$subdir"; \
+ (cd $$subdir && $(MAKE) $$target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ (cd $$subdir && $(MAKE) tags); \
+ done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ done; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)config.in$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ -rm -rf $(distdir)
+ GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ dc_install_base=`cd $(distdir)/=inst && pwd`; \
+ cd $(distdir)/=build \
+ && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) \
+ && $(MAKE) dvi \
+ && $(MAKE) check \
+ && $(MAKE) install \
+ && $(MAKE) installcheck \
+ && $(MAKE) dist
+ -rm -rf $(distdir)
+ @echo "========================"; \
+ echo "$(distdir).tar.gz is ready for distribution"; \
+ echo "========================"
+dist: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+dist-all: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+distdir: $(DISTFILES)
+ -rm -rf $(distdir)
+ mkdir $(distdir)
+ -chmod 777 $(distdir)
+ @for file in $(DISTFILES); do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
+ done
+ for subdir in $(SUBDIRS); do \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ done
+info: info-recursive
+dvi: dvi-recursive
check:
- @echo No testsuites exist for the BFD library. Nothing to check.
+ $(MAKE) check-recursive
+installcheck: installcheck-recursive
+install-info: install-info-recursive
+all-recursive-am: config.h
+ $(MAKE) all-recursive
-installcheck:
- @echo No testsuites exist for the BFD library. Nothing to check.
+all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h
-info dvi : force
- @$(MAKE) subdir_do DO=$@ "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
+install-exec-am: install-libLTLIBRARIES
-clean-info:
- @$(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
+install-data-am: install-data-local
-install-info: force
- @$(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
+uninstall-am: uninstall-libLTLIBRARIES
-diststuff: info
+install-exec: install-exec-recursive install-exec-am
+ @$(NORMAL_INSTALL)
-# Various kinds of .o files to put in libbfd.a:
-# BFD_LIBS Generic routines, always needed.
-# BFD_BACKENDS Routines the configured targets need.
-# BFD_MACHINES Architecture-specific routines the configured targets need.
-# COREFILE Core file routines for a native configuration
-OFILES = $(BFD_LIBS) $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@
+install-data: install-data-recursive install-data-am
+ @$(NORMAL_INSTALL)
+
+install: install-recursive install-exec-am install-data-am
+ @:
+
+uninstall: uninstall-recursive uninstall-am
+
+all: all-recursive-am all-am
+
+install-strip:
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+installdirs: installdirs-recursive
+ $(mkinstalldirs) $(libdir)
+
+
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean-am: mostlyclean-hdr mostlyclean-noinstLIBRARIES \
+ mostlyclean-compile mostlyclean-libtool \
+ mostlyclean-libLTLIBRARIES mostlyclean-tags \
+ mostlyclean-generic
+
+clean-am: clean-hdr clean-noinstLIBRARIES clean-compile clean-libtool \
+ clean-libLTLIBRARIES clean-tags clean-generic \
+ mostlyclean-am
+
+distclean-am: distclean-hdr distclean-noinstLIBRARIES distclean-compile \
+ distclean-libtool distclean-libLTLIBRARIES \
+ distclean-tags distclean-generic clean-am
+
+maintainer-clean-am: maintainer-clean-hdr \
+ maintainer-clean-noinstLIBRARIES \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-libLTLIBRARIES maintainer-clean-tags \
+ maintainer-clean-generic distclean-am
+
+mostlyclean: mostlyclean-recursive mostlyclean-am
+
+clean: clean-recursive clean-am
+
+distclean: distclean-recursive distclean-am
+ -rm -f config.status
+ -rm -f libtool
+
+maintainer-clean: maintainer-clean-recursive maintainer-clean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f config.status
+
+.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
+maintainer-clean-hdr mostlyclean-noinstLIBRARIES \
+distclean-noinstLIBRARIES clean-noinstLIBRARIES \
+maintainer-clean-noinstLIBRARIES mostlyclean-compile distclean-compile \
+clean-compile maintainer-clean-compile mostlyclean-libtool \
+distclean-libtool clean-libtool maintainer-clean-libtool \
+mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
+clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
+uninstall-libLTLIBRARIES install-libLTLIBRARIES install-data-recursive \
+uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info dvi \
+installcheck install-info all-recursive-am all-am install-exec-am \
+install-data-am uninstall-am install-exec install-data install \
+uninstall all installdirs mostlyclean-generic distclean-generic \
+clean-generic maintainer-clean-generic clean mostlyclean distclean \
+maintainer-clean
+
+
+diststuff: info
stamp-ofiles: Makefile
rm -f tofiles
@@ -514,48 +896,14 @@ stamp-ofiles: Makefile
ofiles: stamp-ofiles ; @true
-$(TARGETLIB): $(OFILES) ofiles
- rm -f $(TARGETLIB)
- @echo ofiles = `cat ofiles`
- $(AR) $(AR_FLAGS) $(TARGETLIB) `cat ofiles`
- $(RANLIB) $(TARGETLIB)
-
-stamp-piclist: ofiles
- rm -f tpiclist
- if [ -n "$(PICFLAG)" ]; then \
- sed -e 's,\([^ ][^ ]*\),pic/\1,g' ofiles > tpiclist; \
- else \
- cp ofiles tpiclist; \
- fi
- $(SHELL) $(srcdir)/../move-if-change tpiclist piclist
- touch stamp-piclist
-
-piclist: stamp-piclist ; @true
-
-$(SHLIB): stamp-picdir $(OFILES) piclist
- rm -f $(SHLIB)
- $(SHLIB_CC) $(SHLIB_CFLAGS) -o $(SHLIB) `cat piclist` $(SHLIB_LIBS)
-
-# We make a link from libbfd.so to libbfd.so.VERSION for linking, and
-# also a link from libTARGET-bfd.so.VERSION for running.
-$(SHLINK): $(SHLIB)
- ts=lib`echo $(SHLIB) | sed -e 's/^lib//' | sed -e '$(program_transform_name)'`; \
- if [ "$$ts" != "$(SHLIB)" ]; then \
- rm -f $$ts; \
- ln -s $(SHLIB) $$ts; \
- else true; fi
- rm -f $(SHLINK)
- ln -s $(SHLIB) $(SHLINK)
-
-# This target creates libTARGET-bfd.so.VERSION as a symlink to
-# libbfd.so.VERSION. It is used on SunOS, which does not have SONAME.
-stamp-tshlink: $(SHLIB)
- tf=lib`echo $(SHLIB) | sed -e 's/^lib//' | sed '$(program_transform_name)'`; \
- if [ "$$tf" != "$(SHLIB)" ]; then \
- rm -f $$tf; \
- ln -s $(SHLIB) $$tf; \
+stamp-lib: libbfd.la
+ if [ -f .libs/libbfd.a ]; then \
+ cp .libs/libbfd.a libbfd.tmp; \
+ $(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \
else true; fi
- touch stamp-tshlink
+ touch stamp-lib
+
+libbfd.a: stamp-lib ; @true
# This file holds an array associating configuration triplets and
# vector names. It is built from config.bfd. It is not compiled by
@@ -568,17 +916,11 @@ targmatch.h: config.bfd targmatch.sed
# When compiling archures.c and targets.c, supply the default target
# info from configure.
-targets.o: targets.c Makefile
- if [ -n "$(PICFLAG)" ]; then \
- $(CC) -c $(PICFLAG) $(TDEFAULTS) $(ALL_CFLAGS) $(srcdir)/targets.c -o pic/targets.o; \
- else true; fi
- $(CC) -c $(TDEFAULTS) $(ALL_CFLAGS) $(srcdir)/targets.c
+targets.lo: targets.c config.status
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/targets.c
-archures.o: archures.c Makefile
- if [ -n "$(PICFLAG)" ]; then \
- $(CC) -c $(PICFLAG) $(TDEFAULTS) $(ALL_CFLAGS) $(srcdir)/archures.c -o pic/archures.o; \
- else true; fi
- $(CC) -c $(TDEFAULTS) $(ALL_CFLAGS) $(srcdir)/archures.c
+archures.lo: archures.c config.status
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/archures.c
elf32-target.h : elfxx-target.h
rm -f elf32-target.h
@@ -589,152 +931,16 @@ elf64-target.h : elfxx-target.h
rm -f elf64-target.h
sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
mv -f elf64-target.new elf64-target.h
-
-subdir_do: force
- @for i in $(DODIRS); do \
- if [ -d ./$$i ] ; then \
- if (cd ./$$i; \
- $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
- else exit 1 ; fi ; \
- else true ; fi ; \
- done
-
-tags etags: TAGS
-
-TAGS: force
- etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
-
-do_mostlyclean:
- rm -f *.o *~ core *.E *.p *.ip aout-params.h gen-aout pic/*.o
-do_clean: do_mostlyclean
- rm -f libbfd.a TAGS bfd.h stmp-bfd.h bfd-tmp.h ofiles stamp-ofiles \
- elf32-target.h elf64-target.h $(SHLIB) $(SHLINK) \
- piclist stamp-piclist targmatch.h
-do_distclean: do_clean
- rm -f Makefile config.status config.cache config.h config.log \
- stamp-h bfd-in3.h
- rm -rf pic stamp-picdir
-
-# do_maintainer_clean really should remove bfd-in2.h, since it is a
-# generated file. However, the GNU standards say that
-# maintainer-clean should not delete anything which needs to exist in
-# order to run configure, and bfd-in2.h is used by configure.
-do_maintainer_clean: do_distclean
- rm -f $(srcdir)/libbfd.h $(srcdir)/libcoff.h
-
-mostlyclean: do_mostlyclean
- $(MAKE) subdir_do DO=mostlyclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
-clean: do_clean
- $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
-distclean:
- $(MAKE) subdir_do DO=distclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
- $(MAKE) do_distclean
-clobber maintainer-clean realclean:
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
- $(MAKE) subdir_do DO=maintainer-clean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
- $(MAKE) do_maintainer_clean
-
-BFD_H_DEPS= $(INCDIR)/ansidecl.h
-LOCAL_H_DEPS= libbfd.h sysdep.h config.h
$(BFD_LIBS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
$(BFD_MACHINES): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
$(BFD_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
$(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
-# Get around a Sun Make bug in SunOS 4.1.1 with VPATH
-cpu-i386.o:cpu-i386.c
-cpu-z8k.o: cpu-z8k.c
-cpu-h8500.o: cpu-h8500.c
-cpu-we32k.o: cpu-we32k.c
-
-saber:
- #suppress 65 on bfd_map_over_sections
- #suppress 66 on bfd_map_over_sections
- #suppress 67 on bfd_map_over_sections
- #suppress 68 on bfd_map_over_sections
- #suppress 69 on bfd_map_over_sections
- #suppress 70 on bfd_map_over_sections
- #suppress 110 in bfd_map_over_sections
- #suppress 112 in bfd_map_over_sections
- #suppress 530
- #suppress 590 in swap_exec_header
- #suppress 590 in _bfd_dummy_core_file_matches_executable_p
- #suppress 590 in bfd_dont_truncate_arname
- #suppress 590 on ignore
- #suppress 590 on abfd
- #setopt load_flags $(CFLAGS)
- #load $(CFILES)
-
-
-#-----------------------------------------------------------------------------
-# 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
-#
-# 'VERSION' file must be present and contain a string of the form "x.y"
-#-----------------------------------------------------------------------------
-
-ver960.c: FORCE
- rm -f ver960.c
- echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
-
-
-# This target should be invoked before building a new release.
-# 'VERSION' file must be present and contain a string of the form "x.y"
-#
-roll:
- @V=`cat VERSION` ; \
- MAJ=`sed 's/\..*//' VERSION` ; \
- MIN=`sed 's/.*\.//' VERSION` ; \
- V=$$MAJ.`expr $$MIN + 1` ; \
- rm -f VERSION ; \
- echo $$V >VERSION ; \
- echo Version $$V
-
-# Dummy target to force execution of dependent targets.
-#
-force:
-
-install: $(ALLLIBS)
- for f in $(ALLLIBS); do \
- if [ "$$f" = "stamp-tshlink" ]; then \
- continue; \
- fi; \
- tf=lib`echo $$f | sed -e 's/^lib//' | sed '$(program_transform_name)'`; \
- rm -f $(libdir)/$$tf; \
- if [ "$$f" = "$(SHLINK)" ]; then \
- ts=lib`echo $(SHLIB) | sed -e 's/^lib//' | sed '$(program_transform_name)'`; \
- ln -s $$ts $(libdir)/$$tf; \
- elif [ "$$f" = "$(SHLIB)" ]; then \
- @INSTALL_SHLIB@ \
- else \
- $(INSTALL_DATA) $$f $(libdir)/$$tf; \
- $(RANLIB) $(libdir)/$$tf; \
- chmod a-x $(libdir)/$$tf; \
- fi; \
- done
-# Install BFD include file, and others that it needs. Install them
-# both in GCC's include directory, and in the system include dir
-# if configured as $(oldincludedir) -- which it usually isnt.
+# Install BFD include file, and others that it needs.
+install-data-local: $(BFD_H)
$(INSTALL_DATA) $(BFD_H) $(includedir)/bfd.h
$(INSTALL_DATA) $(INCDIR)/ansidecl.h $(includedir)/ansidecl.h
$(INSTALL_DATA) $(INCDIR)/bfdlink.h $(includedir)/bfdlink.h
- -if test -z "$(oldincludedir)"; then true; else \
- test -d $(oldincludedir) || mkdir $(oldincludedir); \
- $(INSTALL_DATA) $(BFD_H) $(oldincludedir)/bfd.h; \
- $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(oldincludedir)/ansidecl.h; \
- $(INSTALL_DATA) $(INCDIR)/bfdlink.h $(oldincludedir)/bfdlink.h; \
- fi
- $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
-
-Makefile: Makefile.in config.status
- CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
-
-config.h: stamp-h ; @true
-stamp-h: config.in config.status
- CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
-
-config.status: configure configure.host config.bfd VERSION
- $(SHELL) config.status --recheck
# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
.dep: dep.sed $(CFILES) $(HFILES) bfd.h
@@ -751,7 +957,7 @@ config.status: configure configure.host config.bfd VERSION
rm -f .dep2 .dep2a
echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
echo > .dep2a
- $(DEP) -f .dep2a $(ALL_CFLAGS) $?
+ $(DEP) -f .dep2a $(INCLUDES) $(CFLAGS) $?
sed -e '/DO NOT DELETE/d' -e '/^$$/d' < .dep2a >> .dep2
rm -f .dep2a
$(SHELL) $(srcdir)/../move-if-change .dep2 .dep1
@@ -772,7 +978,12 @@ dep-in: .dep
cat .dep >> tmp-Makefile.in
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-host-aout.o: Makefile
+dep-am: .dep
+ sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
+ cat .dep >> tmp-Makefile.am
+ $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
+
+host-aout.lo: Makefile
# The following program can be used to generate a simple config file
# which can be folded into an h-XXX file for a new host, with some editing.
@@ -781,19 +992,14 @@ aout-params.h: gen-aout
gen-aout: $(srcdir)/gen-aout.c Makefile
$(CC) -o gen-aout $(CFLAGS) $(LFLAGS) $(srcdir)/gen-aout.c
-BFDIN_H= $(srcdir)/bfd-in2.h
-
-$(BFD_H): stmp-bfd.h ; @true
+$(BFD_H): stmp-bfd-h ; @true
-stmp-bfd.h: bfd-in3.h
+stmp-bfd-h: bfd-in3.h
rm -f bfd-tmp.h
cp bfd-in3.h bfd-tmp.h
$(SHELL) $(srcdir)/../move-if-change bfd-tmp.h $(BFD_H)
rm -f bfd-tmp.h
- touch stmp-bfd.h
-
-bfd-in3.h: bfd-in2.h config.status
- CONFIG_FILES=bfd-in3.h:bfd-in2.h CONFIG_HEADERS= $(SHELL) ./config.status
+ touch stmp-bfd-h
# Could really use a "copy-if-change"...
headers:
@@ -805,409 +1011,428 @@ headers:
cp $(docdir)/libcoff.h libcoff.h-new
$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
-# The rules for the generated header files are here so that people can
-# type `make bfd-in2.h' if they remove it. They are not run by default.
-$(srcdir)/bfd-in2.h:
- (cd $(docdir); $(MAKE) bfd.h $(FLAGS_TO_PASS))
+# We only rebuild the header files automatically if we have been
+# configured with --enable-maintainer-mode.
+
+$(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h ; @true
+stmp-bin2-h: $(BFD_H_FILES)
+ (cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h)
cp $(docdir)/bfd.h bfd-in2.h-new
$(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
-$(srcdir)/libbfd.h:
- (cd $(docdir); $(MAKE) libbfd.h $(FLAGS_TO_PASS))
+ touch stmp-bin2-h
+
+$(srcdir)/libbfd.h: @MAINT@ stmp-lbfd-h ; @true
+stmp-lbfd-h: $(LIBBFD_H_FILES)
+ (cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) libbfd.h)
cp $(docdir)/libbfd.h libbfd.h-new
$(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
-$(srcdir)/libcoff.h:
- (cd $(docdir); $(MAKE) libcoff.h $(FLAGS_TO_PASS))
+ touch stmp-lbfd-h
+
+$(srcdir)/libcoff.h: @MAINT@ stmp-lcoff-h ; @true
+stmp-lcoff-h: $(LIBCOFF_H_FILES)
+ (cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) libcoff.h)
cp $(docdir)/libcoff.h libcoff.h-new
$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
-
-bfd.info:
- (cd $(docdir); $(MAKE) bfd.info $(FLAGS_TO_PASS))
-
-bfd.dvi:
- (cd $(docdir); $(MAKE) bfd.dvi $(FLAGS_TO_PASS))
-
-bfd.ps:
- (cd $(docdir); $(MAKE) bfd.ps $(FLAGS_TO_PASS))
-
-
-elf32-d10v.o: elf32-d10v.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- elf32-target.h
-
-
-
-
-$(OFILES): stamp-picdir
-
-stamp-picdir:
- if [ -n "$(PICFLAG)" ] && [ ! -d pic ]; then \
- mkdir pic; \
- else true; fi
- touch stamp-picdir
+ touch stmp-lcoff-h
# What appears below is generated by a hacked mkdep using gcc -MM.
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-archive.o: archive.c $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h
-archures.o: archures.c
-bfd.o: bfd.c $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h \
+archive.lo: archive.c $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h
+archures.lo: archures.c
+bfd.lo: bfd.c $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h libcoff.h \
libecoff.h $(INCDIR)/coff/ecoff.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
-cache.o: cache.c
-coffgen.o: coffgen.c $(INCDIR)/coff/internal.h libcoff.h \
+cache.lo: cache.c
+coffgen.lo: coffgen.c $(INCDIR)/coff/internal.h libcoff.h \
$(INCDIR)/bfdlink.h
-corefile.o: corefile.c
-format.o: format.c
-init.o: init.c
-libbfd.o: libbfd.c
-opncls.o: opncls.c $(INCDIR)/objalloc.h
-reloc.o: reloc.c $(INCDIR)/bfdlink.h
-section.o: section.c
-syms.o: syms.c $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h \
+corefile.lo: corefile.c
+format.lo: format.c
+init.lo: init.c
+libbfd.lo: libbfd.c
+opncls.lo: opncls.c $(INCDIR)/objalloc.h
+reloc.lo: reloc.c $(INCDIR)/bfdlink.h
+section.lo: section.c
+syms.lo: syms.c $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def
-targets.o: targets.c $(INCDIR)/fnmatch.h targmatch.h
-hash.o: hash.c $(INCDIR)/objalloc.h
-linker.o: linker.c $(INCDIR)/bfdlink.h genlink.h
-elf.o: elf.c $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
-srec.o: srec.c $(INCDIR)/libiberty.h
-binary.o: binary.c
-tekhex.o: tekhex.c $(INCDIR)/libiberty.h
-ihex.o: ihex.c $(INCDIR)/libiberty.h
-stabs.o: stabs.c $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
-stab-syms.o: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \
+targets.lo: targets.c $(INCDIR)/fnmatch.h targmatch.h
+hash.lo: hash.c $(INCDIR)/objalloc.h
+linker.lo: linker.c $(INCDIR)/bfdlink.h genlink.h
+srec.lo: srec.c $(INCDIR)/libiberty.h
+binary.lo: binary.c
+tekhex.lo: tekhex.c $(INCDIR)/libiberty.h
+ihex.lo: ihex.c $(INCDIR)/libiberty.h
+stabs.lo: stabs.c $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
+stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def
-cpu-a29k.o: cpu-a29k.c
-cpu-alpha.o: cpu-alpha.c
-cpu-arm.o: cpu-arm.c
-cpu-h8300.o: cpu-h8300.c
-cpu-h8500.o: cpu-h8500.c
-cpu-hppa.o: cpu-hppa.c
-cpu-i386.o: cpu-i386.c
-cpu-i860.o: cpu-i860.c
-cpu-i960.o: cpu-i960.c
-cpu-m32r.o: cpu-m32r.c
-cpu-m68k.o: cpu-m68k.c
-cpu-m88k.o: cpu-m88k.c
-cpu-mips.o: cpu-mips.c
-cpu-m10200.o: cpu-m10200.c
-cpu-m10300.o: cpu-m10300.c
-cpu-ns32k.o: cpu-ns32k.c ns32k.h
-cpu-powerpc.o: cpu-powerpc.c
-cpu-rs6000.o: cpu-rs6000.c
-cpu-sh.o: cpu-sh.c
-cpu-sparc.o: cpu-sparc.c
-cpu-vax.o: cpu-vax.c
-cpu-we32k.o: cpu-we32k.c
-cpu-w65.o: cpu-w65.c
-cpu-z8k.o: cpu-z8k.c
-aout-adobe.o: aout-adobe.c $(INCDIR)/aout/adobe.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def libaout.h $(INCDIR)/bfdlink.h
-aout-arm.o: aout-arm.c libaout.h $(INCDIR)/bfdlink.h \
+cpu-a29k.lo: cpu-a29k.c
+cpu-alpha.lo: cpu-alpha.c
+cpu-arc.lo: cpu-arc.c
+cpu-arm.lo: cpu-arm.c
+cpu-h8300.lo: cpu-h8300.c
+cpu-h8500.lo: cpu-h8500.c
+cpu-hppa.lo: cpu-hppa.c
+cpu-i386.lo: cpu-i386.c
+cpu-i860.lo: cpu-i860.c
+cpu-i960.lo: cpu-i960.c
+cpu-m32r.lo: cpu-m32r.c
+cpu-m68k.lo: cpu-m68k.c
+cpu-m88k.lo: cpu-m88k.c
+cpu-mips.lo: cpu-mips.c
+cpu-m10200.lo: cpu-m10200.c
+cpu-m10300.lo: cpu-m10300.c
+cpu-ns32k.lo: cpu-ns32k.c ns32k.h
+cpu-powerpc.lo: cpu-powerpc.c
+cpu-rs6000.lo: cpu-rs6000.c
+cpu-sh.lo: cpu-sh.c
+cpu-sparc.lo: cpu-sparc.c
+cpu-tic30.lo: cpu-tic30.c
+cpu-v850.lo: cpu-v850.c
+cpu-vax.lo: cpu-vax.c
+cpu-we32k.lo: cpu-we32k.c
+cpu-w65.lo: cpu-w65.c
+cpu-z8k.lo: cpu-z8k.c
+aout-adobe.lo: aout-adobe.c $(INCDIR)/aout/adobe.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \
+ $(INCDIR)/bfdlink.h
+aout-arm.lo: aout-arm.c libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h aoutx.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
-aout-ns32k.o: aout-ns32k.c $(INCDIR)/aout/aout64.h \
+aout-ns32k.lo: aout-ns32k.c $(INCDIR)/aout/aout64.h \
ns32k.h libaout.h $(INCDIR)/bfdlink.h
-aout-sparcle.o: aout-sparcle.c $(INCDIR)/bfdlink.h \
+aout-sparcle.lo: aout-sparcle.c $(INCDIR)/bfdlink.h \
libaout.h aoutf1.h $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
aout-target.h
-aout0.o: aout0.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.h \
+aout-tic30.lo: aout-tic30.c libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h aoutx.h
+aout0.lo: aout0.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
-aout32.o: aout32.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \
+aout32.lo: aout32.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
$(INCDIR)/aout/ar.h
-bout.o: bout.c $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/bout.h \
+bout.lo: bout.c $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/bout.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h
-cf-i386lynx.o: cf-i386lynx.c coff-i386.c $(INCDIR)/coff/i386.h \
+cf-i386lynx.lo: cf-i386lynx.c coff-i386.c $(INCDIR)/coff/i386.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-cf-m68klynx.o: cf-m68klynx.c coff-m68k.c $(INCDIR)/coff/m68k.h \
+cf-m68klynx.lo: cf-m68klynx.c coff-m68k.c $(INCDIR)/coff/m68k.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-cf-sparclynx.o: cf-sparclynx.c coff-sparc.c $(INCDIR)/coff/sparc.h \
+cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/coff/sparc.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-a29k.o: coff-a29k.c $(INCDIR)/coff/a29k.h $(INCDIR)/coff/internal.h \
+coff-a29k.lo: coff-a29k.c $(INCDIR)/coff/a29k.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-apollo.o: coff-apollo.c $(INCDIR)/coff/apollo.h \
+coff-apollo.lo: coff-apollo.c $(INCDIR)/coff/apollo.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-arm.o: coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \
+coff-arm.lo: coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-aux.o: coff-aux.c $(INCDIR)/coff/aux-coff.h $(INCDIR)/coff/internal.h \
+coff-aux.lo: coff-aux.c $(INCDIR)/coff/aux-coff.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/m68k.h coff-m68k.c libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-h8300.o: coff-h8300.c $(INCDIR)/bfdlink.h genlink.h \
+coff-h8300.lo: coff-h8300.c $(INCDIR)/bfdlink.h genlink.h \
$(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h libcoff.h \
coffcode.h coffswap.h
-coff-h8500.o: coff-h8500.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/h8500.h \
+coff-h8500.lo: coff-h8500.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/h8500.h \
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
-coff-i386.o: coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \
+coff-i386.lo: coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-i860.o: coff-i860.c $(INCDIR)/coff/i860.h $(INCDIR)/coff/internal.h \
+coff-i860.lo: coff-i860.c $(INCDIR)/coff/i860.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-go32.o: coff-go32.c coff-i386.c $(INCDIR)/coff/i386.h \
+coff-go32.lo: coff-go32.c coff-i386.c $(INCDIR)/coff/i386.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-i960.o: coff-i960.c $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h \
+coff-i960.lo: coff-i960.c $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-m68k.o: coff-m68k.c $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h \
+coff-m68k.lo: coff-m68k.c $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-m88k.o: coff-m88k.c $(INCDIR)/coff/m88k.h $(INCDIR)/coff/internal.h \
+coff-m88k.lo: coff-m88k.c $(INCDIR)/coff/m88k.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-mips.o: coff-mips.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
+coff-mips.lo: coff-mips.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
$(INCDIR)/coff/mips.h libcoff.h libecoff.h coffswap.h \
ecoffswap.h
-coff-pmac.o: coff-pmac.c coff-rs6000.c $(INCDIR)/coff/internal.h \
+coff-pmac.lo: coff-pmac.c coff-rs6000.c $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/rs6000.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-rs6000.o: coff-rs6000.c $(INCDIR)/coff/internal.h \
+coff-rs6000.lo: coff-rs6000.c $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/rs6000.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-sh.o: coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
+coff-sh.lo: coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
-coff-sparc.o: coff-sparc.c $(INCDIR)/coff/sparc.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-svm68k.o: coff-svm68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
+coff-sparc.lo: coff-sparc.c $(INCDIR)/coff/sparc.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-u68k.o: coff-u68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
+coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/coff/i386.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/go32exe.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h \
+ go32stub.h
+coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-we32k.o: coff-we32k.c $(INCDIR)/coff/we32k.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-w65.o: coff-w65.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/w65.h \
+coff-tic30.lo: coff-tic30.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic30.h \
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
-coff-z8k.o: coff-z8k.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/z8k.h \
+coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-we32k.lo: coff-we32k.c $(INCDIR)/coff/we32k.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-w65.lo: coff-w65.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/w65.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+coff-z8k.lo: coff-z8k.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/z8k.h \
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
-cofflink.o: cofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
+cofflink.lo: cofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
libcoff.h
-ecoff.o: ecoff.c $(INCDIR)/bfdlink.h $(INCDIR)/aout/ar.h \
+dwarf2.lo: dwarf2.c $(INCDIR)/libiberty.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
+ecoff.lo: ecoff.c $(INCDIR)/bfdlink.h $(INCDIR)/aout/ar.h \
$(INCDIR)/aout/ranlib.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
libcoff.h libecoff.h
-ecofflink.o: ecofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/objalloc.h \
+ecofflink.lo: ecofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/objalloc.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
libcoff.h libecoff.h
-elf32-gen.o: elf32-gen.c elf-bfd.h $(INCDIR)/elf/common.h \
+elf.lo: elf.c $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
+elf32-arc.lo: elf32-arc.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/arc.h elf32-target.h
+elf32-d10v.lo: elf32-d10v.c elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf32-target.h
-elf32-hppa.o: elf32-hppa.c $(INCDIR)/bfdlink.h elf-bfd.h \
+elf32-gen.lo: elf32-gen.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ elf32-target.h
+elf32-hppa.lo: elf32-hppa.c $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
elf32-hppa.h libhppa.h $(INCDIR)/elf/hppa.h hppa_stubs.h \
elf32-target.h
-elf32-i386.o: elf32-i386.c $(INCDIR)/bfdlink.h elf-bfd.h \
+elf32-i386.lo: elf32-i386.c $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
elf32-target.h
-elf32-i860.o: elf32-i860.c elf-bfd.h $(INCDIR)/elf/common.h \
+elf32-i860.lo: elf32-i860.c elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf32-target.h
-elf32-m32r.o: elf32-m32r.c elf-bfd.h $(INCDIR)/elf/common.h \
+elf32-m32r.lo: elf32-m32r.c elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
$(INCDIR)/elf/m32r.h elf32-target.h
-elf32-m68k.o: elf32-m68k.c $(INCDIR)/bfdlink.h elf-bfd.h \
+elf32-m68k.lo: elf32-m68k.c $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
elf32-target.h
-elf32-m88k.o: elf32-m88k.c elf-bfd.h $(INCDIR)/elf/common.h \
+elf32-m88k.lo: elf32-m88k.c elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf32-target.h
-elf32-mips.o: elf32-mips.c $(INCDIR)/bfdlink.h genlink.h \
+elf32-mips.lo: elf32-mips.c $(INCDIR)/bfdlink.h genlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/coff/sym.h \
$(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h ecoffswap.h \
elf32-target.h
-elf-m10200.o: elf-m10200.c elf-bfd.h $(INCDIR)/elf/common.h \
+elf-m10200.lo: elf-m10200.c elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf32-target.h
-elf-m10300.o: elf-m10300.c elf-bfd.h $(INCDIR)/elf/common.h \
+elf-m10300.lo: elf-m10300.c elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf32-target.h
-elf32-ppc.o: elf32-ppc.c $(INCDIR)/bfdlink.h elf-bfd.h \
+elf32-ppc.lo: elf32-ppc.c $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/elf/ppc.h elf32-target.h
-elf32-sh.o: elf32-sh.c $(INCDIR)/bfdlink.h elf-bfd.h \
+elf32-sh.lo: elf32-sh.c $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
elf32-target.h
-elf32-sparc.o: elf32-sparc.c $(INCDIR)/bfdlink.h elf-bfd.h \
+elf32-sparc.lo: elf32-sparc.c $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/elf/sparc.h elf32-target.h
-elf32.o: elf32.c elfcode.h $(INCDIR)/bfdlink.h elf-bfd.h \
+elf32-v850.lo: elf32-v850.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/elf/v850.h elf32-target.h
+elf32.lo: elf32.c elfcode.h $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/fnmatch.h elfcore.h elflink.h
-elflink.o: elflink.c $(INCDIR)/bfdlink.h elf-bfd.h \
+elflink.lo: elflink.c $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
-hp300bsd.o: hp300bsd.c libaout.h $(INCDIR)/bfdlink.h \
+hp300bsd.lo: hp300bsd.c libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-hp300hpux.o: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \
+hp300hpux.lo: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \
aoutx.h $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
aout-target.h
-som.o: som.c
-i386aout.o: i386aout.c $(INCDIR)/aout/aout64.h libaout.h \
+som.lo: som.c
+i386aout.lo: i386aout.c $(INCDIR)/aout/aout64.h libaout.h \
$(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386bsd.o: i386bsd.c libaout.h $(INCDIR)/bfdlink.h \
+i386bsd.lo: i386bsd.c libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386dynix.o: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \
+i386dynix.lo: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \
$(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
aout-target.h
-i386freebsd.o: i386freebsd.c freebsd.h libaout.h $(INCDIR)/bfdlink.h \
+i386freebsd.lo: i386freebsd.c freebsd.h libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386linux.o: i386linux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+i386linux.lo: i386linux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
$(INCDIR)/bfdlink.h aout-target.h
-i386lynx.o: i386lynx.c libaout.h $(INCDIR)/bfdlink.h \
+i386lynx.lo: i386lynx.c libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386msdos.o: i386msdos.c libaout.h $(INCDIR)/bfdlink.h
-i386netbsd.o: i386netbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
+i386msdos.lo: i386msdos.c libaout.h $(INCDIR)/bfdlink.h
+i386netbsd.lo: i386netbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386mach3.o: i386mach3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+i386mach3.lo: i386mach3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
$(INCDIR)/bfdlink.h aout-target.h
-i386os9k.o: i386os9k.c $(INCDIR)/bfdlink.h libaout.h \
+i386os9k.lo: i386os9k.c $(INCDIR)/bfdlink.h libaout.h \
$(INCDIR)/os9k.h
-ieee.o: ieee.c $(INCDIR)/ieee.h libieee.h
-m68k4knetbsd.o: m68k4knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
- aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-m68klinux.o: m68klinux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ieee.lo: ieee.c $(INCDIR)/ieee.h libieee.h
+m68k4knetbsd.lo: m68k4knetbsd.c netbsd.h libaout.h \
+ $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+m68klinux.lo: m68klinux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
$(INCDIR)/bfdlink.h aout-target.h
-m68klynx.o: m68klynx.c libaout.h $(INCDIR)/bfdlink.h \
+m68klynx.lo: m68klynx.c libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-m68knetbsd.o: m68knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
+m68knetbsd.lo: m68knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-m88kmach3.o: m88kmach3.c libaout.h $(INCDIR)/bfdlink.h \
+m88kmach3.lo: m88kmach3.c libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-mipsbsd.o: mipsbsd.c libaout.h $(INCDIR)/bfdlink.h \
+mipsbsd.lo: mipsbsd.c libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-newsos3.o: newsos3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+newsos3.lo: newsos3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
$(INCDIR)/bfdlink.h aout-target.h
-nlm.o: nlm.c libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
+nlm.lo: nlm.c libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
$(INCDIR)/nlm/external.h
-nlm32-i386.o: nlm32-i386.c $(INCDIR)/nlm/i386-ext.h \
+nlm32-i386.lo: nlm32-i386.c $(INCDIR)/nlm/i386-ext.h \
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
$(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
-nlm32-sparc.o: nlm32-sparc.c $(INCDIR)/nlm/sparc32-ext.h \
+nlm32-sparc.lo: nlm32-sparc.c $(INCDIR)/nlm/sparc32-ext.h \
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
$(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
-nlm32-ppc.o: nlm32-ppc.c $(INCDIR)/nlm/ppc-ext.h libnlm.h \
+nlm32-ppc.lo: nlm32-ppc.c $(INCDIR)/nlm/ppc-ext.h libnlm.h \
$(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \
nlmswap.h nlm-target.h
-nlm32.o: nlm32.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \
+nlm32.lo: nlm32.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \
$(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
-ns32knetbsd.o: ns32knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
+ns32knetbsd.lo: ns32knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-oasys.o: oasys.c $(INCDIR)/oasys.h liboasys.h
-pc532-mach.o: pc532-mach.c libaout.h $(INCDIR)/bfdlink.h \
+oasys.lo: oasys.c $(INCDIR)/oasys.h liboasys.h
+pc532-mach.lo: pc532-mach.c libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-pe-arm.o: pe-arm.c coff-arm.c $(INCDIR)/coff/arm.h \
+pe-arm.lo: pe-arm.c coff-arm.c $(INCDIR)/coff/arm.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h
-pei-arm.o: pei-arm.c coff-arm.c $(INCDIR)/coff/arm.h \
+pei-arm.lo: pei-arm.c coff-arm.c $(INCDIR)/coff/arm.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h
-pe-i386.o: pe-i386.c coff-i386.c $(INCDIR)/coff/i386.h \
+pe-i386.lo: pe-i386.c coff-i386.c $(INCDIR)/coff/i386.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h
-pei-i386.o: pei-i386.c coff-i386.c $(INCDIR)/coff/i386.h \
+pei-i386.lo: pei-i386.c coff-i386.c $(INCDIR)/coff/i386.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h
-pe-ppc.o: pe-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \
+pe-ppc.lo: pe-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h
-pei-ppc.o: pei-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \
+pei-ppc.lo: pei-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h
-ppcboot.o: ppcboot.c
-reloc16.o: reloc16.c $(INCDIR)/bfdlink.h genlink.h \
+ppcboot.lo: ppcboot.c
+reloc16.lo: reloc16.c $(INCDIR)/bfdlink.h genlink.h \
$(INCDIR)/coff/internal.h libcoff.h
-riscix.o: riscix.c libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+riscix.lo: riscix.c libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
$(INCDIR)/aout/ar.h
-sparclinux.o: sparclinux.c $(INCDIR)/aout/aout64.h \
+sparclinux.lo: sparclinux.c $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h
-sparclynx.o: sparclynx.c $(INCDIR)/aout/sun4.h libaout.h \
+sparclynx.lo: sparclynx.c $(INCDIR)/aout/sun4.h libaout.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
-sparcnetbsd.o: sparcnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
+sparcnetbsd.lo: sparcnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-sunos.o: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \
+sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \
$(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
-versados.o: versados.c $(INCDIR)/libiberty.h
-xcofflink.o: xcofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
+vaxnetbsd.lo: vaxnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+versados.lo: versados.c $(INCDIR)/libiberty.h
+xcofflink.lo: xcofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
libcoff.h
-aout64.o: aout64.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \
+aout64.lo: aout64.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
$(INCDIR)/aout/ar.h
-coff-alpha.o: coff-alpha.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
+coff-alpha.lo: coff-alpha.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
$(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \
libecoff.h coffswap.h ecoffswap.h
-demo64.o: demo64.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
-elf64-alpha.o: elf64-alpha.c elf-bfd.h $(INCDIR)/elf/common.h \
+demo64.lo: demo64.c aoutf1.h $(INCDIR)/aout/sun4.h \
+ libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
+ aout-target.h
+elf64-alpha.lo: elf64-alpha.c elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
$(INCDIR)/elf/alpha.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
$(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \
$(INCDIR)/aout/ar.h libcoff.h libecoff.h ecoffswap.h \
elf64-target.h
-elf64-gen.o: elf64-gen.c elf-bfd.h $(INCDIR)/elf/common.h \
+elf64-gen.lo: elf64-gen.c elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf64-target.h
-elf64-mips.o: elf64-mips.c $(INCDIR)/aout/ar.h $(INCDIR)/bfdlink.h \
+elf64-mips.lo: elf64-mips.c $(INCDIR)/aout/ar.h $(INCDIR)/bfdlink.h \
genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/coff/sym.h \
$(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h ecoffswap.h \
elf64-target.h
-elf64-sparc.o: elf64-sparc.c elf-bfd.h $(INCDIR)/elf/common.h \
+elf64-sparc.lo: elf64-sparc.c elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
$(INCDIR)/elf/sparc.h elf64-target.h
-elf64.o: elf64.c elfcode.h $(INCDIR)/bfdlink.h elf-bfd.h \
+elf64.lo: elf64.c elfcode.h $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/fnmatch.h elfcore.h elflink.h
-evax-alpha.o: evax-alpha.c $(INCDIR)/bfdlink.h evax.h
-evax-egsd.o: evax-egsd.c $(INCDIR)/bfdlink.h evax.h
-evax-etir.o: evax-etir.c $(INCDIR)/bfdlink.h evax.h
-evax-emh.o: evax-emh.c $(INCDIR)/bfdlink.h evax.h
-evax-misc.o: evax-misc.c $(INCDIR)/bfdlink.h evax.h
-nlm32-alpha.o: nlm32-alpha.c $(INCDIR)/nlm/alpha-ext.h \
+evax-alpha.lo: evax-alpha.c $(INCDIR)/bfdlink.h evax.h
+evax-egsd.lo: evax-egsd.c $(INCDIR)/bfdlink.h evax.h
+evax-etir.lo: evax-etir.c $(INCDIR)/bfdlink.h evax.h
+evax-emh.lo: evax-emh.c $(INCDIR)/bfdlink.h evax.h
+evax-misc.lo: evax-misc.c $(INCDIR)/bfdlink.h evax.h
+nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/nlm/alpha-ext.h \
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
$(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
-nlm64.o: nlm64.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \
+nlm64.lo: nlm64.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \
$(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
-aix386-core.o: aix386-core.c $(INCDIR)/coff/i386.h \
+aix386-core.lo: aix386-core.c $(INCDIR)/coff/i386.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h
-hpux-core.o: hpux-core.c
-irix-core.o: irix-core.c
-lynx-core.o: lynx-core.c
-osf-core.o: osf-core.c
-trad-core.o: trad-core.c libaout.h $(INCDIR)/bfdlink.h
-cisco-core.o: cisco-core.c
+hpux-core.lo: hpux-core.c
+irix-core.lo: irix-core.c
+lynx-core.lo: lynx-core.c
+osf-core.lo: osf-core.c
+trad-core.lo: trad-core.c libaout.h $(INCDIR)/bfdlink.h
+cisco-core.lo: cisco-core.c
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/binutils/bfd/README b/contrib/binutils/bfd/README
index 0daf3af..a9232bc 100644
--- a/contrib/binutils/bfd/README
+++ b/contrib/binutils/bfd/README
@@ -27,13 +27,11 @@ BFD supports the following configure options:
bit integer type, such as gcc.
--enable-shared
Build BFD as a shared library.
- --enable-commonbfdlib
- Build BFD, opcodes, and libiberty as a single shared library.
--with-mmap
Use mmap when accessing files. This is faster on some hosts,
but slower on others. It may not work on all hosts.
-Report bugs with BFD to bug-gnu-utils@prep.ai.mit.edu.
+Report bugs with BFD to bug-gnu-utils@gnu.org.
Patches are encouraged. When sending patches, always send the output
of diff -u or diff -c from the original file to the new file. Do not
diff --git a/contrib/binutils/bfd/acconfig.h b/contrib/binutils/bfd/acconfig.h
index f3c4e99..1d5e819 100644
--- a/contrib/binutils/bfd/acconfig.h
+++ b/contrib/binutils/bfd/acconfig.h
@@ -1,4 +1,10 @@
+/* Name of package. */
+#undef PACKAGE
+
+/* Version of package. */
+#undef VERSION
+
/* Whether strstr must be declared even if <string.h> is included. */
#undef NEED_DECLARATION_STRSTR
diff --git a/contrib/binutils/bfd/acinclude.m4 b/contrib/binutils/bfd/acinclude.m4
new file mode 100644
index 0000000..6bd25ab
--- /dev/null
+++ b/contrib/binutils/bfd/acinclude.m4
@@ -0,0 +1,67 @@
+dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
+AC_DEFUN(BFD_BINARY_FOPEN,
+[AC_REQUIRE([AC_CANONICAL_SYSTEM])
+case "${host}" in
+changequote(,)dnl
+i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
+changequote([,])dnl
+ AC_DEFINE(USE_BINARY_FOPEN) ;;
+esac])dnl
+
+dnl Get a default for CC_FOR_BUILD to put into Makefile.
+AC_DEFUN(BFD_CC_FOR_BUILD,
+[# Put a plausible default for CC_FOR_BUILD in Makefile.
+if test -z "$CC_FOR_BUILD"; then
+ if test "x$cross_compiling" = "xno"; then
+ CC_FOR_BUILD='$(CC)'
+ else
+ CC_FOR_BUILD=gcc
+ fi
+fi
+AC_SUBST(CC_FOR_BUILD)
+# Also set EXEEXT_FOR_BUILD.
+if test "x$cross_compiling" = "xno"; then
+ EXEEXT_FOR_BUILD='$(EXEEXT)'
+else
+ AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
+ [cat > ac_c_test.c << 'EOF'
+int main() {
+/* Nothing needed here */
+}
+EOF
+ ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
+ bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
+ rm -f ac_c_test*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
+ EXEEXT_FOR_BUILD=""
+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
+fi
+AC_SUBST(EXEEXT_FOR_BUILD)])dnl
+
+dnl See whether we need a declaration for a function.
+AC_DEFUN(BFD_NEED_DECLARATION,
+[AC_MSG_CHECKING([whether $1 must be declared])
+AC_CACHE_VAL(bfd_cv_decl_needed_$1,
+[AC_TRY_COMPILE([
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif],
+[char *(*pfn) = (char *(*)) $1],
+bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)])
+AC_MSG_RESULT($bfd_cv_decl_needed_$1)
+if test $bfd_cv_decl_needed_$1 = yes; then
+ bfd_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ AC_DEFINE_UNQUOTED($bfd_tr_decl)
+fi
+])dnl
diff --git a/contrib/binutils/bfd/aclocal.m4 b/contrib/binutils/bfd/aclocal.m4
index ecb4c79..9d84a59 100644
--- a/contrib/binutils/bfd/aclocal.m4
+++ b/contrib/binutils/bfd/aclocal.m4
@@ -1,9 +1,21 @@
+dnl aclocal.m4 generated automatically by aclocal 1.2e
+
+dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+dnl This Makefile.in is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
AC_DEFUN(BFD_BINARY_FOPEN,
[AC_REQUIRE([AC_CANONICAL_SYSTEM])
case "${host}" in
changequote(,)dnl
-i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32 | *-*-windows)
+i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
changequote([,])dnl
AC_DEFINE(USE_BINARY_FOPEN) ;;
esac])dnl
@@ -18,7 +30,25 @@ if test -z "$CC_FOR_BUILD"; then
CC_FOR_BUILD=gcc
fi
fi
-AC_SUBST(CC_FOR_BUILD)])dnl
+AC_SUBST(CC_FOR_BUILD)
+# Also set EXEEXT_FOR_BUILD.
+if test "x$cross_compiling" = "xno"; then
+ EXEEXT_FOR_BUILD='$(EXEEXT)'
+else
+ AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
+ [cat > ac_c_test.c << 'EOF'
+int main() {
+/* Nothing needed here */
+}
+EOF
+ ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
+ bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
+ rm -f ac_c_test*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
+ EXEEXT_FOR_BUILD=""
+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
+fi
+AC_SUBST(EXEEXT_FOR_BUILD)])dnl
dnl See whether we need a declaration for a function.
AC_DEFUN(BFD_NEED_DECLARATION,
@@ -47,3 +77,450 @@ if test $bfd_cv_decl_needed_$1 = yes; then
AC_DEFINE_UNQUOTED($bfd_tr_decl)
fi
])dnl
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN(AM_INIT_AUTOMAKE,
+[AC_REQUIRE([AM_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+
+# serial 1
+
+AC_DEFUN(AM_PROG_INSTALL,
+[AC_REQUIRE([AC_PROG_INSTALL])
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+AC_SUBST(INSTALL_SCRIPT)dnl
+])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN(AM_SANITY_CHECK,
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "[$]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "[$]*" != "X $srcdir/configure conftestfile" \
+ && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "[$]2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN(AM_MISSING_PROG,
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+ $1=$2
+ AC_MSG_RESULT(found)
+else
+ $1="$3/missing $2"
+ AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+
+# serial 24 AM_PROG_LIBTOOL
+AC_DEFUN(AM_PROG_LIBTOOL,
+[AC_REQUIRE([AM_ENABLE_SHARED])dnl
+AC_REQUIRE([AM_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_RANLIB])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AM_PROG_LD])dnl
+AC_REQUIRE([AM_PROG_NM])dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+dnl
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Check for any special flags to pass to ltconfig.
+libtool_flags=
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$silent" = yes && libtool_flags="$libtool_flags --silent"
+test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$host" in
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ CFLAGS="$CFLAGS -belf"
+ ;;
+esac
+
+# Actually configure libtool. ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+|| AC_MSG_ERROR([libtool configure failed])
+])
+
+# AM_ENABLE_SHARED - implement the --enable-shared flag
+# Usage: AM_ENABLE_SHARED[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AM_ENABLE_SHARED,
+[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(shared,
+changequote(<<, >>)dnl
+<< --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
+changequote([, ])dnl
+[ --enable-shared=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list],
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac],
+enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
+])
+
+# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
+AC_DEFUN(AM_DISABLE_SHARED,
+[AM_ENABLE_SHARED(no)])
+
+# AM_DISABLE_STATIC - set the default static flag to --disable-static
+AC_DEFUN(AM_DISABLE_STATIC,
+[AM_ENABLE_STATIC(no)])
+
+# AM_ENABLE_STATIC - implement the --enable-static flag
+# Usage: AM_ENABLE_STATIC[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AM_ENABLE_STATIC,
+[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(static,
+changequote(<<, >>)dnl
+<< --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
+changequote([, ])dnl
+[ --enable-static=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list],
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac],
+enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
+])
+
+
+# AM_PROG_LD - find the path to the GNU or non-GNU linker
+AC_DEFUN(AM_PROG_LD,
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
+ case "$ac_prog" in
+ # Accept absolute paths.
+changequote(,)dnl
+ /* | [A-Za-z]:\\*)
+changequote([,])dnl
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(ac_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog"; then
+ ac_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_SUBST(LD)
+AM_PROG_LD_GNU
+])
+
+AC_DEFUN(AM_PROG_LD_GNU,
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ ac_cv_prog_gnu_ld=yes
+else
+ ac_cv_prog_gnu_ld=no
+fi])
+])
+
+# AM_PROG_NM - find the path to a BSD-compatible name lister
+AC_DEFUN(AM_PROG_NM,
+[AC_MSG_CHECKING([for BSD-compatible nm])
+AC_CACHE_VAL(ac_cv_path_NM,
+[case "$NM" in
+changequote(,)dnl
+/* | [A-Za-z]:\\*)
+changequote([,])dnl
+ ac_cv_path_NM="$NM" # Let the user override the test with a path.
+ ;;
+*)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -B"
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -p"
+ else
+ ac_cv_path_NM="$ac_dir/nm"
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+ ;;
+esac])
+NM="$ac_cv_path_NM"
+AC_MSG_RESULT([$NM])
+AC_SUBST(NM)
+])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+AC_DEFUN(AM_CONFIG_HEADER,
+[AC_PREREQ([2.12])
+AC_CONFIG_HEADER([$1])
+dnl When config.status generates a header, we must update the stamp-h file.
+dnl This file resides in the same directory as the config header
+dnl that is generated. We must strip everything past the first ":",
+dnl and everything past the last "/".
+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+<<am_indx=1
+for am_file in <<$1>>; do
+ case " <<$>>CONFIG_HEADERS " in
+ *" <<$>>am_file "*<<)>>
+ echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+ ;;
+ esac
+ am_indx=`expr "<<$>>am_indx" + 1`
+done<<>>dnl>>)
+changequote([,]))])
+
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# serial 1
+
+AC_DEFUN(AM_MAINTAINER_MODE,
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT($USE_MAINTAINER_MODE)
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINT=
+ else
+ MAINT='#M#'
+ fi
+ AC_SUBST(MAINT)dnl
+]
+)
+
+# Check to see if we're running under Cygwin32, without using
+# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
+# Otherwise set it to "no".
+
+dnl AM_CYGWIN32()
+AC_DEFUN(AM_CYGWIN32,
+[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
+[AC_TRY_COMPILE(,[return __CYGWIN32__;],
+am_cv_cygwin32=yes, am_cv_cygwin32=no)
+rm -f conftest*])
+CYGWIN32=
+test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
+
+# Check to see if we're running under Win32, without using
+# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
+# Otherwise set it to "".
+
+dnl AM_EXEEXT()
+dnl This knows we add .exe if we're building in the Cygwin32
+dnl environment. But if we're not, then it compiles a test program
+dnl to see if there is a suffix for executables.
+AC_DEFUN(AM_EXEEXT,
+[AC_REQUIRE([AM_CYGWIN32])
+AC_REQUIRE([AM_MINGW32])
+AC_MSG_CHECKING([for executable suffix])
+AC_CACHE_VAL(am_cv_exeext,
+[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
+am_cv_exeext=.exe
+else
+cat > am_c_test.c << 'EOF'
+int main() {
+/* Nothing needed here */
+}
+EOF
+${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
+am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
+rm -f am_c_test*])
+test x"${am_cv_exeext}" = x && am_cv_exeext=no
+fi
+EXEEXT=""
+test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
+AC_MSG_RESULT(${am_cv_exeext})
+AC_SUBST(EXEEXT)])
+
+# Check to see if we're running under Mingw, without using
+# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
+# Otherwise set it to "no".
+
+dnl AM_MINGW32()
+AC_DEFUN(AM_MINGW32,
+[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
+[AC_TRY_COMPILE(,[return __MINGW32__;],
+am_cv_mingw32=yes, am_cv_mingw32=no)
+rm -f conftest*])
+MINGW32=
+test "$am_cv_mingw32" = yes && MINGW32=yes])
+
diff --git a/contrib/binutils/bfd/aout-target.h b/contrib/binutils/bfd/aout-target.h
index 011b18f..4e0fc9b 100644
--- a/contrib/binutils/bfd/aout-target.h
+++ b/contrib/binutils/bfd/aout-target.h
@@ -606,7 +606,7 @@ const bfd_target MY(vec) =
(HAS_RELOC | EXEC_P | /* object flags */
HAS_LINENO | HAS_DEBUG |
HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
MY_symbol_leading_char,
AR_PAD_CHAR, /* ar_pad_char */
15, /* ar_max_namelen */
diff --git a/contrib/binutils/bfd/aout-tic30.c b/contrib/binutils/bfd/aout-tic30.c
new file mode 100644
index 0000000..cb7314e
--- /dev/null
+++ b/contrib/binutils/bfd/aout-tic30.c
@@ -0,0 +1,1062 @@
+/* BFD back-end for TMS320C30 a.out binaries.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#define TARGET_IS_BIG_ENDIAN_P
+#define N_HEADER_IN_TEXT(x) 1
+#define BYTES_IN_WORD 4
+#define TEXT_START_ADDR 1024
+#define TARGET_PAGE_SIZE 128
+#define SEGMENT_SIZE TARGET_PAGE_SIZE
+#define DEFAULT_ARCH bfd_arch_tic30
+#define ARCH_SIZE 32
+
+#define MY(OP) CAT(tic30_aout_,OP)
+#define TARGETNAME "a.out-tic30"
+#define NAME(x,y) CAT3(tic30_aout,_32_,y)
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libaout.h"
+
+#include "aout/aout64.h"
+#include "aout/stab_gnu.h"
+#include "aout/ar.h"
+
+static bfd_reloc_status_type tic30_aout_fix_16
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type tic30_aout_fix_32
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type tic30_aout_fix_pcrel_16
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static reloc_howto_type *tic30_aout_reloc_howto
+ PARAMS ((bfd *, struct reloc_std_external *, int *, int *, int *));
+static bfd_reloc_status_type tic30_aout_relocate_contents
+ PARAMS ((reloc_howto_type *, bfd *, bfd_vma, bfd_byte *));
+static bfd_reloc_status_type tic30_aout_final_link_relocate
+ PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *, bfd_vma,
+ bfd_vma, bfd_vma));
+static const bfd_target *tic30_aout_object_p PARAMS ((bfd *));
+static boolean tic30_aout_write_object_contents PARAMS ((bfd *));
+static boolean tic30_aout_set_sizes PARAMS ((bfd *));
+
+#define MY_reloc_howto(BFD,REL,IN,EX,PC) tic30_aout_reloc_howto(BFD,REL,&IN,&EX,&PC)
+#define MY_final_link_relocate tic30_aout_final_link_relocate
+#define MY_object_p tic30_aout_object_p
+#define MY_mkobject NAME(aout,mkobject)
+#define MY_write_object_contents tic30_aout_write_object_contents
+#define MY_set_sizes tic30_aout_set_sizes
+
+#ifndef MY_exec_hdr_flags
+#define MY_exec_hdr_flags 1
+#endif
+
+#ifndef MY_backend_data
+
+#ifndef MY_zmagic_contiguous
+#define MY_zmagic_contiguous 0
+#endif
+#ifndef MY_text_includes_header
+#define MY_text_includes_header 0
+#endif
+#ifndef MY_entry_is_text_address
+#define MY_entry_is_text_address 0
+#endif
+#ifndef MY_exec_header_not_counted
+#define MY_exec_header_not_counted 1
+#endif
+#ifndef MY_add_dynamic_symbols
+#define MY_add_dynamic_symbols 0
+#endif
+#ifndef MY_add_one_symbol
+#define MY_add_one_symbol 0
+#endif
+#ifndef MY_link_dynamic_object
+#define MY_link_dynamic_object 0
+#endif
+#ifndef MY_write_dynamic_symbol
+#define MY_write_dynamic_symbol 0
+#endif
+#ifndef MY_check_dynamic_reloc
+#define MY_check_dynamic_reloc 0
+#endif
+#ifndef MY_finish_dynamic_link
+#define MY_finish_dynamic_link 0
+#endif
+
+static CONST struct aout_backend_data tic30_aout_backend_data =
+{
+ MY_zmagic_contiguous,
+ MY_text_includes_header,
+ MY_entry_is_text_address,
+ MY_exec_hdr_flags,
+ 0, /* text vma? */
+ MY_set_sizes,
+ MY_exec_header_not_counted,
+ MY_add_dynamic_symbols,
+ MY_add_one_symbol,
+ MY_link_dynamic_object,
+ MY_write_dynamic_symbol,
+ MY_check_dynamic_reloc,
+ MY_finish_dynamic_link
+};
+#define MY_backend_data &tic30_aout_backend_data
+#endif
+
+/* FIXME: This is wrong. aoutx.h should really only be included by
+ aout32.c. */
+
+#include "aoutx.h"
+
+/* This table lists the relocation types for the TMS320C30. There are
+ only a few relocations required, and all must be divided by 4 (>>
+ 2) to get the 32-bit addresses in the format the TMS320C30 likes
+ it. */
+reloc_howto_type tic30_aout_howto_table[] =
+{
+ {-1},
+ HOWTO (1, 2, 1, 16, false, 0, 0, tic30_aout_fix_16,
+ "16", false, 0x0000FFFF, 0x0000FFFF, false),
+ HOWTO (2, 2, 2, 24, false, 0, complain_overflow_bitfield, NULL,
+ "24", false, 0x00FFFFFF, 0x00FFFFFF, false),
+ HOWTO (3, 18, 3, 24, false, 0, complain_overflow_bitfield, NULL,
+ "LDP", false, 0x00FF0000, 0x000000FF, false),
+ HOWTO (4, 2, 4, 32, false, 0, complain_overflow_bitfield, tic30_aout_fix_32,
+ "32", false, 0xFFFFFFFF, 0xFFFFFFFF, false),
+ HOWTO (5, 2, 1, 16, true, 0, complain_overflow_signed,
+ tic30_aout_fix_pcrel_16, "PCREL", true, 0x0000FFFF, 0x0000FFFF, true),
+ {-1},
+ {-1},
+ {-1},
+ {-1},
+ {-1}
+};
+
+extern reloc_howto_type *NAME (aout, reloc_type_lookup) ();
+
+reloc_howto_type *
+tic30_aout_reloc_type_lookup (abfd, code)
+ bfd *abfd;
+ bfd_reloc_code_real_type code;
+{
+ switch (code)
+ {
+ case BFD_RELOC_8:
+ case BFD_RELOC_TIC30_LDP:
+ return &tic30_aout_howto_table[3];
+ case BFD_RELOC_16:
+ return &tic30_aout_howto_table[1];
+ case BFD_RELOC_24:
+ return &tic30_aout_howto_table[2];
+ case BFD_RELOC_16_PCREL:
+ return &tic30_aout_howto_table[5];
+ case BFD_RELOC_32:
+ return &tic30_aout_howto_table[4];
+ default:
+ return (reloc_howto_type *) NULL;
+ }
+}
+
+static reloc_howto_type *
+tic30_aout_reloc_howto (abfd, relocs, r_index, r_extern, r_pcrel)
+ bfd *abfd;
+ struct reloc_std_external *relocs;
+ int *r_index;
+ int *r_extern;
+ int *r_pcrel;
+{
+ unsigned int r_length;
+ unsigned int r_pcrel_done;
+ int index;
+
+ *r_pcrel = 0;
+ if (bfd_header_big_endian (abfd))
+ {
+ *r_index = ((relocs->r_index[0] << 16) | (relocs->r_index[1] << 8) | relocs->r_index[2]);
+ *r_extern = (0 != (relocs->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
+ r_pcrel_done = (0 != (relocs->r_type[0] & RELOC_STD_BITS_PCREL_BIG));
+ r_length = ((relocs->r_type[0] & RELOC_STD_BITS_LENGTH_BIG) >> RELOC_STD_BITS_LENGTH_SH_BIG);
+ }
+ else
+ {
+ *r_index = ((relocs->r_index[2] << 16) | (relocs->r_index[1] << 8) | relocs->r_index[0]);
+ *r_extern = (0 != (relocs->r_type[0] & RELOC_STD_BITS_EXTERN_LITTLE));
+ r_pcrel_done = (0 != (relocs->r_type[0] & RELOC_STD_BITS_PCREL_LITTLE));
+ r_length = ((relocs->r_type[0] & RELOC_STD_BITS_LENGTH_LITTLE) >> RELOC_STD_BITS_LENGTH_SH_LITTLE);
+ }
+ index = r_length + 4 * r_pcrel_done;
+ return tic30_aout_howto_table + index;
+}
+
+/* This function is used as a callback for 16-bit relocs. This is
+ required for relocations between segments. A line in aoutx.h
+ requires that any relocations for the data section should point to
+ the end of the aligned text section, plus an offset. By default,
+ this does not happen, therefore this function takes care of
+ that. */
+
+static bfd_reloc_status_type
+tic30_aout_fix_16 (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message;
+{
+ bfd_vma relocation;
+
+ /* Make sure that the symbol's section is defined. */
+ if (symbol->section == &bfd_und_section && (symbol->flags & BSF_WEAK) == 0)
+ return output_bfd ? bfd_reloc_ok : bfd_reloc_undefined;
+ /* Get the size of the input section and turn it into the TMS320C30
+ 32-bit address format. */
+ relocation = (symbol->section->vma >> 2);
+ relocation += bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
+ bfd_put_16 (abfd, relocation, (bfd_byte *) data + reloc_entry->address);
+ return bfd_reloc_ok;
+}
+
+/* This function does the same thing as tic30_aout_fix_16 except for 32
+ bit relocations. */
+
+static bfd_reloc_status_type
+tic30_aout_fix_32 (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message;
+{
+ bfd_vma relocation;
+
+ /* Make sure that the symbol's section is defined. */
+ if (symbol->section == &bfd_und_section && (symbol->flags & BSF_WEAK) == 0)
+ return output_bfd ? bfd_reloc_ok : bfd_reloc_undefined;
+ /* Get the size of the input section and turn it into the TMS320C30
+ 32-bit address format. */
+ relocation = (symbol->section->vma >> 2);
+ relocation += bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+ bfd_put_32 (abfd, relocation, (bfd_byte *) data + reloc_entry->address);
+ return bfd_reloc_ok;
+}
+
+/* This function is used to work out pc-relative offsets for the
+ TMS320C30. The data already placed by md_pcrel_from within gas is
+ useless for a relocation, so we just get the offset value and place
+ a version of this within the object code.
+ tic30_aout_final_link_relocate will then calculate the required
+ relocation to add on to the value in the object code. */
+
+static bfd_reloc_status_type
+tic30_aout_fix_pcrel_16 (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message;
+{
+ bfd_vma relocation = 1;
+ bfd_byte offset_data = bfd_get_8 (abfd, (bfd_byte *) data + reloc_entry->address - 1);
+
+ /* The byte before the location of the fix contains bits 23-16 of
+ the pcrel instruction. Bit 21 is set for a delayed instruction
+ which requires on offset of 3 instead of 1. */
+ if (offset_data & 0x20)
+ relocation -= 3;
+ else
+ relocation -= 1;
+ bfd_put_16 (abfd, relocation, (bfd_byte *) data + reloc_entry->address);
+ return bfd_reloc_ok;
+}
+
+/* These macros will get 24-bit values from the bfd definition.
+ Big-endian only. */
+#define bfd_getb_24(BFD,ADDR) (bfd_get_8(BFD,ADDR) << 16) | \
+ (bfd_get_8(BFD,ADDR+1) << 8) | \
+ (bfd_get_8(BFD,ADDR+2))
+
+#define bfd_putb_24(BFD,DATA,ADDR) bfd_put_8(BFD,(bfd_byte)((DATA >> 16) & 0xFF),ADDR); \
+ bfd_put_8(BFD,(bfd_byte)((DATA >> 8) & 0xFF),ADDR+1); \
+ bfd_put_8(BFD,(bfd_byte)(DATA & 0xFF),ADDR+2)
+
+/* Set parameters about this a.out file that are machine-dependent.
+ This routine is called from some_aout_object_p just before it returns. */
+
+static const bfd_target *
+tic30_aout_callback (abfd)
+ bfd *abfd;
+{
+ struct internal_exec *execp = exec_hdr (abfd);
+ unsigned int arch_align_power;
+ unsigned long arch_align;
+
+ /* Calculate the file positions of the parts of a newly read aout header */
+ obj_textsec (abfd)->_raw_size = N_TXTSIZE (*execp);
+
+ /* The virtual memory addresses of the sections */
+ obj_textsec (abfd)->vma = N_TXTADDR (*execp);
+ obj_datasec (abfd)->vma = N_DATADDR (*execp);
+ obj_bsssec (abfd)->vma = N_BSSADDR (*execp);
+
+ obj_textsec (abfd)->lma = obj_textsec (abfd)->vma;
+ obj_datasec (abfd)->lma = obj_datasec (abfd)->vma;
+ obj_bsssec (abfd)->lma = obj_bsssec (abfd)->vma;
+
+ /* The file offsets of the sections */
+ obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
+ obj_datasec (abfd)->filepos = N_DATOFF (*execp);
+
+ /* The file offsets of the relocation info */
+ obj_textsec (abfd)->rel_filepos = N_TRELOFF (*execp);
+ obj_datasec (abfd)->rel_filepos = N_DRELOFF (*execp);
+
+ /* The file offsets of the string table and symbol table. */
+ obj_sym_filepos (abfd) = N_SYMOFF (*execp);
+ obj_str_filepos (abfd) = N_STROFF (*execp);
+
+ /* Determine the architecture and machine type of the object file. */
+#ifdef SET_ARCH_MACH
+ SET_ARCH_MACH (abfd, *execp);
+#else
+ bfd_default_set_arch_mach (abfd, DEFAULT_ARCH, 0);
+#endif
+
+ /* Now that we know the architecture, set the alignments of the
+ sections. This is normally done by NAME(aout,new_section_hook),
+ but when the initial sections were created the architecture had
+ not yet been set. However, for backward compatibility, we don't
+ set the alignment power any higher than as required by the size
+ of the section. */
+ arch_align_power = bfd_get_arch_info (abfd)->section_align_power;
+ arch_align = 1 << arch_align_power;
+ if ((BFD_ALIGN (obj_textsec (abfd)->_raw_size, arch_align)
+ == obj_textsec (abfd)->_raw_size)
+ && (BFD_ALIGN (obj_datasec (abfd)->_raw_size, arch_align)
+ == obj_datasec (abfd)->_raw_size)
+ && (BFD_ALIGN (obj_bsssec (abfd)->_raw_size, arch_align)
+ == obj_bsssec (abfd)->_raw_size))
+ {
+ obj_textsec (abfd)->alignment_power = arch_align_power;
+ obj_datasec (abfd)->alignment_power = arch_align_power;
+ obj_bsssec (abfd)->alignment_power = arch_align_power;
+ }
+ return abfd->xvec;
+}
+
+static bfd_reloc_status_type
+tic30_aout_final_link_relocate (howto, input_bfd, input_section, contents,
+ address, value, addend)
+ reloc_howto_type *howto;
+ bfd *input_bfd;
+ asection *input_section;
+ bfd_byte *contents;
+ bfd_vma address;
+ bfd_vma value;
+ bfd_vma addend;
+{
+ bfd_vma relocation;
+
+ if (address > input_section->_raw_size)
+ return bfd_reloc_outofrange;
+
+ relocation = value + addend;
+ if (howto->pc_relative)
+ {
+ relocation -= (input_section->output_section->vma + input_section->output_offset);
+ if (howto->pcrel_offset)
+ relocation -= address;
+ }
+ return tic30_aout_relocate_contents (howto, input_bfd, relocation,
+ contents + address);
+}
+
+bfd_reloc_status_type
+tic30_aout_relocate_contents (howto, input_bfd, relocation, location)
+ reloc_howto_type *howto;
+ bfd *input_bfd;
+ bfd_vma relocation;
+ bfd_byte *location;
+{
+ bfd_vma x;
+ boolean overflow;
+
+ if (howto->size < 0)
+ relocation = -relocation;
+
+ switch (howto->size)
+ {
+ default:
+ case 0:
+ abort ();
+ break;
+ case 1:
+ x = bfd_get_16 (input_bfd, location);
+ break;
+ case 2:
+ x = bfd_getb_24 (input_bfd, location);
+ break;
+ case 3:
+ x = bfd_get_8 (input_bfd, location);
+ break;
+ case 4:
+ x = bfd_get_32 (input_bfd, location);
+ break;
+ }
+ overflow = false;
+ if (howto->complain_on_overflow != complain_overflow_dont)
+ {
+ bfd_vma check;
+ bfd_signed_vma signed_check;
+ bfd_vma add;
+ bfd_signed_vma signed_add;
+
+ if (howto->rightshift == 0)
+ {
+ check = relocation;
+ signed_check = (bfd_signed_vma) relocation;
+ }
+ else
+ {
+ check = relocation >> howto->rightshift;
+ if ((bfd_signed_vma) relocation >= 0)
+ signed_check = check;
+ else
+ signed_check = (check | ((bfd_vma) - 1 & ~((bfd_vma) - 1 >> howto->rightshift)));
+ }
+ add = x & howto->src_mask;
+ signed_add = add;
+ if ((add & (((~howto->src_mask) >> 1) & howto->src_mask)) != 0)
+ signed_add -= (((~howto->src_mask) >> 1) & howto->src_mask) << 1;
+ if (howto->bitpos == 0)
+ {
+ check += add;
+ signed_check += signed_add;
+ }
+ else
+ {
+ check += add >> howto->bitpos;
+ if (signed_add >= 0)
+ signed_check += add >> howto->bitpos;
+ else
+ signed_check += ((add >> howto->bitpos) | ((bfd_vma) - 1 & ~((bfd_vma) - 1 >> howto->bitpos)));
+ }
+ switch (howto->complain_on_overflow)
+ {
+ case complain_overflow_signed:
+ {
+ bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1;
+ bfd_signed_vma reloc_signed_min = ~reloc_signed_max;
+ if (signed_check > reloc_signed_max || signed_check < reloc_signed_min)
+ overflow = true;
+ }
+ break;
+ case complain_overflow_unsigned:
+ {
+ bfd_vma reloc_unsigned_max = (((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
+ if (check > reloc_unsigned_max)
+ overflow = true;
+ }
+ break;
+ case complain_overflow_bitfield:
+ {
+ bfd_vma reloc_bits = (((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
+ if ((check & ~reloc_bits) != 0 && (((bfd_vma) signed_check & ~reloc_bits) != (-1 & ~reloc_bits)))
+ overflow = true;
+ }
+ break;
+ default:
+ abort ();
+ }
+ }
+ relocation >>= (bfd_vma) howto->rightshift;
+ relocation <<= (bfd_vma) howto->bitpos;
+ x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + relocation) & howto->dst_mask));
+ switch (howto->size)
+ {
+ default:
+ case 0:
+ abort ();
+ break;
+ case 1:
+ bfd_put_16 (input_bfd, x, location);
+ break;
+ case 2:
+ bfd_putb_24 (input_bfd, x, location);
+ break;
+ case 3:
+ bfd_put_8 (input_bfd, x, location);
+ break;
+ case 4:
+ bfd_put_32 (input_bfd, x, location);
+ break;
+ }
+ return overflow ? bfd_reloc_overflow : bfd_reloc_ok;
+}
+
+/* Finish up the reading of an a.out file header */
+
+static const bfd_target *
+tic30_aout_object_p (abfd)
+ bfd *abfd;
+{
+ struct external_exec exec_bytes; /* Raw exec header from file */
+ struct internal_exec exec; /* Cleaned-up exec header */
+ const bfd_target *target;
+
+ if (bfd_read ((PTR) & exec_bytes, 1, EXEC_BYTES_SIZE, abfd)
+ != EXEC_BYTES_SIZE)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
+ return 0;
+ }
+
+#ifdef SWAP_MAGIC
+ exec.a_info = SWAP_MAGIC (exec_bytes.e_info);
+#else
+ exec.a_info = bfd_h_get_32 (abfd, exec_bytes.e_info);
+#endif /* SWAP_MAGIC */
+
+ if (N_BADMAG (exec))
+ return 0;
+#ifdef MACHTYPE_OK
+ if (!(MACHTYPE_OK (N_MACHTYPE (exec))))
+ return 0;
+#endif
+
+ NAME (aout, swap_exec_header_in) (abfd, &exec_bytes, &exec);
+
+#ifdef SWAP_MAGIC
+ /* swap_exec_header_in read in a_info with the wrong byte order */
+ exec.a_info = SWAP_MAGIC (exec_bytes.e_info);
+#endif /* SWAP_MAGIC */
+
+ target = NAME (aout, some_aout_object_p) (abfd, &exec, tic30_aout_callback);
+
+#ifdef ENTRY_CAN_BE_ZERO
+ /* The NEWSOS3 entry-point is/was 0, which (amongst other lossage)
+ * means that it isn't obvious if EXEC_P should be set.
+ * All of the following must be true for an executable:
+ * There must be no relocations, the bfd can be neither an
+ * archive nor an archive element, and the file must be executable. */
+
+ if (exec.a_trsize + exec.a_drsize == 0
+ && bfd_get_format (abfd) == bfd_object && abfd->my_archive == NULL)
+ {
+ struct stat buf;
+#ifndef S_IXUSR
+#define S_IXUSR 0100 /* Execute by owner. */
+#endif
+ if (stat (abfd->filename, &buf) == 0 && (buf.st_mode & S_IXUSR))
+ abfd->flags |= EXEC_P;
+ }
+#endif /* ENTRY_CAN_BE_ZERO */
+
+ return target;
+}
+
+/* Copy private section data. This actually does nothing with the
+ sections. It copies the subformat field. We copy it here, because
+ we need to know whether this is a QMAGIC file before we set the
+ section contents, and copy_private_bfd_data is not called until
+ after the section contents have been set. */
+
+/*ARGSUSED */
+static boolean
+MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
+ bfd *ibfd;
+ asection *isec;
+ bfd *obfd;
+ asection *osec;
+{
+ if (bfd_get_flavour (obfd) == bfd_target_aout_flavour)
+ obj_aout_subformat (obfd) = obj_aout_subformat (ibfd);
+ return true;
+}
+
+/* Write an object file.
+ Section contents have already been written. We write the
+ file header, symbols, and relocation. */
+
+static boolean
+tic30_aout_write_object_contents (abfd)
+ bfd *abfd;
+{
+ struct external_exec exec_bytes;
+ struct internal_exec *execp = exec_hdr (abfd);
+
+#if CHOOSE_RELOC_SIZE
+ CHOOSE_RELOC_SIZE (abfd);
+#else
+ obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
+#endif
+ {
+ bfd_size_type text_size; /* dummy vars */
+ file_ptr text_end;
+ if (adata (abfd).magic == undecided_magic)
+ NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end);
+
+ execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;
+ execp->a_entry = bfd_get_start_address (abfd);
+
+ execp->a_trsize = ((obj_textsec (abfd)->reloc_count) * obj_reloc_entry_size (abfd));
+ execp->a_drsize = ((obj_datasec (abfd)->reloc_count) * obj_reloc_entry_size (abfd));
+ NAME (aout, swap_exec_header_out) (abfd, execp, &exec_bytes);
+
+ if (adata (abfd).exec_bytes_size > 0)
+ {
+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
+ return false;
+ if (bfd_write ((PTR) & exec_bytes, 1, adata (abfd).exec_bytes_size, abfd) != adata (abfd).exec_bytes_size)
+ return false;
+ }
+ /* Now write out reloc info, followed by syms and strings */
+
+ if (bfd_get_outsymbols (abfd) != (asymbol **) NULL
+ && bfd_get_symcount (abfd) != 0)
+ {
+ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (*execp)), SEEK_SET) != 0)
+ return false;
+
+ if (!NAME (aout, write_syms) (abfd))
+ return false;
+ }
+
+ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*execp)), SEEK_SET) != 0)
+ return false;
+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd)))
+ return false;
+
+ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp)), SEEK_SET) != 0)
+ return false;
+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd)))
+ return false;
+ }
+
+ return true;
+}
+
+static boolean
+tic30_aout_set_sizes (abfd)
+ bfd *abfd;
+{
+ adata (abfd).page_size = TARGET_PAGE_SIZE;
+
+#ifdef SEGMENT_SIZE
+ adata (abfd).segment_size = SEGMENT_SIZE;
+#else
+ adata (abfd).segment_size = TARGET_PAGE_SIZE;
+#endif
+
+#ifdef ZMAGIC_DISK_BLOCK_SIZE
+ adata (abfd).zmagic_disk_block_size = ZMAGIC_DISK_BLOCK_SIZE;
+#else
+ adata (abfd).zmagic_disk_block_size = TARGET_PAGE_SIZE;
+#endif
+
+ adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE;
+
+ return true;
+}
+
+#ifndef MY_final_link_callback
+
+/* Callback for the final_link routine to set the section offsets. */
+
+static void MY_final_link_callback
+ PARAMS ((bfd *, file_ptr *, file_ptr *, file_ptr *));
+
+static void
+MY_final_link_callback (abfd, ptreloff, pdreloff, psymoff)
+ bfd *abfd;
+ file_ptr *ptreloff;
+ file_ptr *pdreloff;
+ file_ptr *psymoff;
+{
+ struct internal_exec *execp = exec_hdr (abfd);
+
+ *ptreloff = obj_datasec (abfd)->filepos + execp->a_data;
+ *pdreloff = *ptreloff + execp->a_trsize;
+ *psymoff = *pdreloff + execp->a_drsize;;
+}
+
+#endif
+
+#ifndef MY_bfd_final_link
+
+/* Final link routine. We need to use a call back to get the correct
+ offsets in the output file. */
+
+static boolean
+MY_bfd_final_link (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ struct internal_exec *execp = exec_hdr (abfd);
+ file_ptr pos;
+ bfd_vma vma = 0;
+ int pad;
+
+ /* Set the executable header size to 0, as we don't want one for an
+ output. */
+ adata (abfd).exec_bytes_size = 0;
+ pos = adata (abfd).exec_bytes_size;
+ /* Text. */
+ vma = info->create_object_symbols_section->vma;
+ pos += vma;
+ obj_textsec (abfd)->filepos = pos;
+ obj_textsec (abfd)->vma = vma;
+ obj_textsec (abfd)->user_set_vma = 1;
+ pos += obj_textsec (abfd)->_raw_size;
+ vma += obj_textsec (abfd)->_raw_size;
+
+ /* Data. */
+ if (abfd->flags & D_PAGED)
+ {
+ if (info->create_object_symbols_section->next->vma > 0)
+ obj_datasec (abfd)->vma = info->create_object_symbols_section->next->vma;
+ else
+ obj_datasec (abfd)->vma = BFD_ALIGN (vma, adata (abfd).segment_size);
+ }
+ else
+ {
+ obj_datasec (abfd)->vma = BFD_ALIGN (vma, 4);
+ }
+ if (obj_datasec (abfd)->vma < vma)
+ {
+ obj_datasec (abfd)->vma = BFD_ALIGN (vma, 4);
+ }
+ obj_datasec (abfd)->user_set_vma = 1;
+ vma = obj_datasec (abfd)->vma;
+ obj_datasec (abfd)->filepos = vma + adata (abfd).exec_bytes_size;
+ execp->a_text = vma - obj_textsec (abfd)->vma;
+ obj_textsec (abfd)->_raw_size = execp->a_text;
+
+ /* Since BSS follows data immediately, see if it needs alignment. */
+ vma += obj_datasec (abfd)->_raw_size;
+ pad = align_power (vma, obj_bsssec (abfd)->alignment_power) - vma;
+ obj_datasec (abfd)->_raw_size += pad;
+ pos += obj_datasec (abfd)->_raw_size;
+ execp->a_data = obj_datasec (abfd)->_raw_size;
+
+ /* BSS. */
+ obj_bsssec (abfd)->vma = vma;
+ obj_bsssec (abfd)->user_set_vma = 1;
+
+ /* We are fully resized, so don't readjust in final_link. */
+ adata (abfd).magic = z_magic;
+
+ return NAME (aout, final_link) (abfd, info, MY_final_link_callback);
+}
+
+#endif
+
+enum machine_type
+tic30_aout_machine_type (arch, machine, unknown)
+ enum bfd_architecture arch;
+ unsigned long machine;
+ boolean *unknown;
+{
+ enum machine_type arch_flags;
+
+ arch_flags = M_UNKNOWN;
+ *unknown = true;
+
+ switch (arch)
+ {
+ case bfd_arch_tic30:
+ *unknown = false;
+ break;
+ default:
+ arch_flags = M_UNKNOWN;
+ }
+ if (arch_flags != M_UNKNOWN)
+ *unknown = false;
+ return arch_flags;
+}
+
+boolean
+tic30_aout_set_arch_mach (abfd, arch, machine)
+ bfd *abfd;
+ enum bfd_architecture arch;
+ unsigned long machine;
+{
+ if (!bfd_default_set_arch_mach (abfd, arch, machine))
+ return false;
+ if (arch != bfd_arch_unknown)
+ {
+ boolean unknown;
+ tic30_aout_machine_type (arch, machine, &unknown);
+ if (unknown)
+ return false;
+ }
+ obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
+ return (*aout_backend_info (abfd)->set_sizes) (abfd);
+}
+
+/* We assume BFD generic archive files. */
+#ifndef MY_openr_next_archived_file
+#define MY_openr_next_archived_file bfd_generic_openr_next_archived_file
+#endif
+#ifndef MY_get_elt_at_index
+#define MY_get_elt_at_index _bfd_generic_get_elt_at_index
+#endif
+#ifndef MY_generic_stat_arch_elt
+#define MY_generic_stat_arch_elt bfd_generic_stat_arch_elt
+#endif
+#ifndef MY_slurp_armap
+#define MY_slurp_armap bfd_slurp_bsd_armap
+#endif
+#ifndef MY_slurp_extended_name_table
+#define MY_slurp_extended_name_table _bfd_slurp_extended_name_table
+#endif
+#ifndef MY_construct_extended_name_table
+#define MY_construct_extended_name_table \
+ _bfd_archive_bsd_construct_extended_name_table
+#endif
+#ifndef MY_write_armap
+#define MY_write_armap bsd_write_armap
+#endif
+#ifndef MY_read_ar_hdr
+#define MY_read_ar_hdr _bfd_generic_read_ar_hdr
+#endif
+#ifndef MY_truncate_arname
+#define MY_truncate_arname bfd_bsd_truncate_arname
+#endif
+#ifndef MY_update_armap_timestamp
+#define MY_update_armap_timestamp _bfd_archive_bsd_update_armap_timestamp
+#endif
+
+/* No core file defined here -- configure in trad-core.c separately. */
+#ifndef MY_core_file_failing_command
+#define MY_core_file_failing_command _bfd_nocore_core_file_failing_command
+#endif
+#ifndef MY_core_file_failing_signal
+#define MY_core_file_failing_signal _bfd_nocore_core_file_failing_signal
+#endif
+#ifndef MY_core_file_matches_executable_p
+#define MY_core_file_matches_executable_p \
+ _bfd_nocore_core_file_matches_executable_p
+#endif
+#ifndef MY_core_file_p
+#define MY_core_file_p _bfd_dummy_target
+#endif
+
+#ifndef MY_bfd_debug_info_start
+#define MY_bfd_debug_info_start bfd_void
+#endif
+#ifndef MY_bfd_debug_info_end
+#define MY_bfd_debug_info_end bfd_void
+#endif
+#ifndef MY_bfd_debug_info_accumulate
+#define MY_bfd_debug_info_accumulate \
+ (void (*) PARAMS ((bfd*, struct sec *))) bfd_void
+#endif
+
+#ifndef MY_core_file_failing_command
+#define MY_core_file_failing_command NAME(aout,core_file_failing_command)
+#endif
+#ifndef MY_core_file_failing_signal
+#define MY_core_file_failing_signal NAME(aout,core_file_failing_signal)
+#endif
+#ifndef MY_core_file_matches_executable_p
+#define MY_core_file_matches_executable_p NAME(aout,core_file_matches_executable_p)
+#endif
+#ifndef MY_set_section_contents
+#define MY_set_section_contents NAME(aout,set_section_contents)
+#endif
+#ifndef MY_get_section_contents
+#define MY_get_section_contents aout_32_get_section_contents
+#endif
+#ifndef MY_get_section_contents_in_window
+#define MY_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
+#endif
+#ifndef MY_new_section_hook
+#define MY_new_section_hook NAME(aout,new_section_hook)
+#endif
+#ifndef MY_get_symtab_upper_bound
+#define MY_get_symtab_upper_bound NAME(aout,get_symtab_upper_bound)
+#endif
+#ifndef MY_get_symtab
+#define MY_get_symtab NAME(aout,get_symtab)
+#endif
+#ifndef MY_get_reloc_upper_bound
+#define MY_get_reloc_upper_bound NAME(aout,get_reloc_upper_bound)
+#endif
+#ifndef MY_canonicalize_reloc
+#define MY_canonicalize_reloc NAME(aout,canonicalize_reloc)
+#endif
+#ifndef MY_make_empty_symbol
+#define MY_make_empty_symbol NAME(aout,make_empty_symbol)
+#endif
+#ifndef MY_print_symbol
+#define MY_print_symbol NAME(aout,print_symbol)
+#endif
+#ifndef MY_get_symbol_info
+#define MY_get_symbol_info NAME(aout,get_symbol_info)
+#endif
+#ifndef MY_get_lineno
+#define MY_get_lineno NAME(aout,get_lineno)
+#endif
+#ifndef MY_set_arch_mach
+#define MY_set_arch_mach tic30_aout_set_arch_mach
+#endif
+#ifndef MY_find_nearest_line
+#define MY_find_nearest_line NAME(aout,find_nearest_line)
+#endif
+#ifndef MY_sizeof_headers
+#define MY_sizeof_headers NAME(aout,sizeof_headers)
+#endif
+#ifndef MY_bfd_get_relocated_section_contents
+#define MY_bfd_get_relocated_section_contents \
+ bfd_generic_get_relocated_section_contents
+#endif
+#ifndef MY_bfd_relax_section
+#define MY_bfd_relax_section bfd_generic_relax_section
+#endif
+#ifndef MY_bfd_reloc_type_lookup
+#define MY_bfd_reloc_type_lookup tic30_aout_reloc_type_lookup
+#endif
+#ifndef MY_bfd_make_debug_symbol
+#define MY_bfd_make_debug_symbol 0
+#endif
+#ifndef MY_read_minisymbols
+#define MY_read_minisymbols NAME(aout,read_minisymbols)
+#endif
+#ifndef MY_minisymbol_to_symbol
+#define MY_minisymbol_to_symbol NAME(aout,minisymbol_to_symbol)
+#endif
+#ifndef MY_bfd_link_hash_table_create
+#define MY_bfd_link_hash_table_create NAME(aout,link_hash_table_create)
+#endif
+#ifndef MY_bfd_link_add_symbols
+#define MY_bfd_link_add_symbols NAME(aout,link_add_symbols)
+#endif
+#ifndef MY_bfd_link_split_section
+#define MY_bfd_link_split_section _bfd_generic_link_split_section
+#endif
+
+
+#ifndef MY_bfd_copy_private_bfd_data
+#define MY_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
+#endif
+
+#ifndef MY_bfd_merge_private_bfd_data
+#define MY_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
+#endif
+
+#ifndef MY_bfd_copy_private_symbol_data
+#define MY_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
+#endif
+
+#ifndef MY_bfd_print_private_bfd_data
+#define MY_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
+#endif
+
+#ifndef MY_bfd_set_private_flags
+#define MY_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
+#endif
+
+#ifndef MY_bfd_is_local_label_name
+#define MY_bfd_is_local_label_name bfd_generic_is_local_label_name
+#endif
+
+#ifndef MY_bfd_free_cached_info
+#define MY_bfd_free_cached_info NAME(aout,bfd_free_cached_info)
+#endif
+
+#ifndef MY_close_and_cleanup
+#define MY_close_and_cleanup MY_bfd_free_cached_info
+#endif
+
+#ifndef MY_get_dynamic_symtab_upper_bound
+#define MY_get_dynamic_symtab_upper_bound \
+ _bfd_nodynamic_get_dynamic_symtab_upper_bound
+#endif
+#ifndef MY_canonicalize_dynamic_symtab
+#define MY_canonicalize_dynamic_symtab \
+ _bfd_nodynamic_canonicalize_dynamic_symtab
+#endif
+#ifndef MY_get_dynamic_reloc_upper_bound
+#define MY_get_dynamic_reloc_upper_bound \
+ _bfd_nodynamic_get_dynamic_reloc_upper_bound
+#endif
+#ifndef MY_canonicalize_dynamic_reloc
+#define MY_canonicalize_dynamic_reloc \
+ _bfd_nodynamic_canonicalize_dynamic_reloc
+#endif
+
+/* Aout symbols normally have leading underscores */
+#ifndef MY_symbol_leading_char
+#define MY_symbol_leading_char '_'
+#endif
+
+/* Aout archives normally use spaces for padding */
+#ifndef AR_PAD_CHAR
+#define AR_PAD_CHAR ' '
+#endif
+
+#ifndef MY_BFD_TARGET
+const bfd_target tic30_aout_vec =
+{
+ TARGETNAME, /* name */
+ bfd_target_aout_flavour,
+ BFD_ENDIAN_BIG, /* target byte order (big) */
+ BFD_ENDIAN_BIG, /* target headers byte order (big) */
+ (HAS_RELOC | /* object flags */
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
+ MY_symbol_leading_char,
+ AR_PAD_CHAR, /* ar_pad_char */
+ 15, /* ar_max_namelen */
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
+ {_bfd_dummy_target, MY_object_p, /* bfd_check_format */
+ bfd_generic_archive_p, MY_core_file_p},
+ {bfd_false, MY_mkobject, /* bfd_set_format */
+ _bfd_generic_mkarchive, bfd_false},
+ {bfd_false, MY_write_object_contents, /* bfd_write_contents */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (MY),
+ BFD_JUMP_TABLE_COPY (MY),
+ BFD_JUMP_TABLE_CORE (MY),
+ BFD_JUMP_TABLE_ARCHIVE (MY),
+ BFD_JUMP_TABLE_SYMBOLS (MY),
+ BFD_JUMP_TABLE_RELOCS (MY),
+ BFD_JUMP_TABLE_WRITE (MY),
+ BFD_JUMP_TABLE_LINK (MY),
+ BFD_JUMP_TABLE_DYNAMIC (MY),
+
+ (PTR) MY_backend_data,
+};
+#endif /* MY_BFD_TARGET */
diff --git a/contrib/binutils/bfd/aoutf1.h b/contrib/binutils/bfd/aoutf1.h
index 2851117..0446c5d 100644
--- a/contrib/binutils/bfd/aoutf1.h
+++ b/contrib/binutils/bfd/aoutf1.h
@@ -1,5 +1,6 @@
/* A.out "format 1" file handling code for BFD.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -124,19 +125,19 @@ sunos_set_arch_mach (abfd, machtype)
/* Some Sun3s make magic numbers without cpu types in them, so
we'll default to the 68000. */
arch = bfd_arch_m68k;
- machine = 68000;
+ machine = bfd_mach_m68000;
break;
case M_68010:
case M_HP200:
arch = bfd_arch_m68k;
- machine = 68010;
+ machine = bfd_mach_m68010;
break;
case M_68020:
case M_HP300:
arch = bfd_arch_m68k;
- machine = 68020;
+ machine = bfd_mach_m68020;
break;
case M_SPARC:
@@ -213,14 +214,14 @@ sunos_write_object_contents (abfd)
case bfd_arch_m68k:
switch (bfd_get_mach (abfd))
{
- case 68000:
+ case bfd_mach_m68000:
N_SET_MACHTYPE (*execp, M_UNKNOWN);
break;
- case 68010:
+ case bfd_mach_m68010:
N_SET_MACHTYPE (*execp, M_68010);
break;
default:
- case 68020:
+ case bfd_mach_m68020:
N_SET_MACHTYPE (*execp, M_68020);
break;
}
diff --git a/contrib/binutils/bfd/aoutx.h b/contrib/binutils/bfd/aoutx.h
index c6a482f..ff1cdd2 100644
--- a/contrib/binutils/bfd/aoutx.h
+++ b/contrib/binutils/bfd/aoutx.h
@@ -1,5 +1,6 @@
/* BFD semi-generic back-end for a.out binaries.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -715,11 +716,11 @@ NAME(aout,machine_type) (arch, machine, unknown)
case bfd_arch_m68k:
switch (machine) {
- case 0: arch_flags = M_68010; break;
- case 68000: arch_flags = M_UNKNOWN; *unknown = false; break;
- case 68010: arch_flags = M_68010; break;
- case 68020: arch_flags = M_68020; break;
- default: arch_flags = M_UNKNOWN; break;
+ case 0: arch_flags = M_68010; break;
+ case bfd_mach_m68000: arch_flags = M_UNKNOWN; *unknown = false; break;
+ case bfd_mach_m68010: arch_flags = M_68010; break;
+ case bfd_mach_m68020: arch_flags = M_68020; break;
+ default: arch_flags = M_UNKNOWN; break;
}
break;
@@ -3880,10 +3881,29 @@ NAME(aout,final_link) (abfd, info, callback)
obj_datasec (abfd)->reloc_count =
exec_hdr (abfd)->a_drsize / obj_reloc_entry_size (abfd);
- /* Write out the string table. */
- if (bfd_seek (abfd, obj_str_filepos (abfd), SEEK_SET) != 0)
- goto error_return;
- return emit_stringtab (abfd, aout_info.strtab);
+ /* Write out the string table, unless there are no symbols. */
+ if (abfd->symcount > 0)
+ {
+ if (bfd_seek (abfd, obj_str_filepos (abfd), SEEK_SET) != 0
+ || ! emit_stringtab (abfd, aout_info.strtab))
+ goto error_return;
+ }
+ else if (obj_textsec (abfd)->reloc_count == 0
+ && obj_datasec (abfd)->reloc_count == 0)
+ {
+ bfd_byte b;
+
+ b = 0;
+ if (bfd_seek (abfd,
+ (obj_datasec (abfd)->filepos
+ + exec_hdr (abfd)->a_data
+ - 1),
+ SEEK_SET) != 0
+ || bfd_write (&b, 1, 1, abfd) != 1)
+ goto error_return;
+ }
+
+ return true;
error_return:
if (aout_info.contents != NULL)
diff --git a/contrib/binutils/bfd/archive.c b/contrib/binutils/bfd/archive.c
index 5c81dbd..6b9dbbc 100644
--- a/contrib/binutils/bfd/archive.c
+++ b/contrib/binutils/bfd/archive.c
@@ -1,5 +1,6 @@
/* BFD back-end for archive files (libraries).
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault.
This file is part of BFD, the Binary File Descriptor library.
@@ -412,8 +413,10 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
}
/* BSD4.4-style long filename.
Only implemented for reading, so far! */
- else if (hdr.ar_name[0] == '#' && hdr.ar_name[1] == '1'
- && hdr.ar_name[2] == '/' && isdigit (hdr.ar_name[3]))
+ else if (hdr.ar_name[0] == '#'
+ && hdr.ar_name[1] == '1'
+ && hdr.ar_name[2] == '/'
+ && isdigit ((unsigned char) hdr.ar_name[3]))
{
/* BSD-4.4 extended name */
namelen = atoi (&hdr.ar_name[3]);
@@ -643,6 +646,8 @@ bfd_generic_archive_p (abfd)
{
bfd_release (abfd, bfd_ardata (abfd));
abfd->tdata.aout_ar_data = tdata_hold;
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
return NULL;
}
@@ -650,6 +655,8 @@ bfd_generic_archive_p (abfd)
{
bfd_release (abfd, bfd_ardata (abfd));
abfd->tdata.aout_ar_data = tdata_hold;
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
return NULL;
}
@@ -1390,10 +1397,12 @@ bfd_ar_hdr_from_filesystem (abfd, filename)
a strong stomach to write this, and it does, but it takes even a
stronger stomach to try to code around such a thing! */
+struct ar_hdr *bfd_special_undocumented_glue PARAMS ((bfd *, const char *));
+
struct ar_hdr *
bfd_special_undocumented_glue (abfd, filename)
bfd *abfd;
- char *filename;
+ const char *filename;
{
struct areltdata *ar_elt = bfd_ar_hdr_from_filesystem (abfd, filename);
if (ar_elt == NULL)
diff --git a/contrib/binutils/bfd/archures.c b/contrib/binutils/bfd/archures.c
index 1b2f4d9..fa6c7cc 100644
--- a/contrib/binutils/bfd/archures.c
+++ b/contrib/binutils/bfd/archures.c
@@ -1,5 +1,5 @@
/* BFD library support routines for architectures.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1990, 91-97, 1998 Free Software Foundation, Inc.
Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -70,6 +70,13 @@ DESCRIPTION
. bfd_arch_unknown, {* File arch not known *}
. bfd_arch_obscure, {* Arch known, not one of these *}
. bfd_arch_m68k, {* Motorola 68xxx *}
+.#define bfd_mach_m68000 1
+.#define bfd_mach_m68008 2
+.#define bfd_mach_m68010 3
+.#define bfd_mach_m68020 4
+.#define bfd_mach_m68030 5
+.#define bfd_mach_m68040 6
+.#define bfd_mach_m68060 7
. bfd_arch_vax, {* DEC Vax *}
. bfd_arch_i960, {* Intel 960 *}
. {* The order of the following is important.
@@ -103,6 +110,20 @@ DESCRIPTION
.#define bfd_mach_sparc_v9_p(mach) \
. ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a)
. bfd_arch_mips, {* MIPS Rxxxx *}
+.#define bfd_mach_mips3000 3000
+.#define bfd_mach_mips3900 3900
+.#define bfd_mach_mips4000 4000
+.#define bfd_mach_mips4010 4010
+.#define bfd_mach_mips4100 4100
+.#define bfd_mach_mips4300 4300
+.#define bfd_mach_mips4400 4400
+.#define bfd_mach_mips4600 4600
+.#define bfd_mach_mips4650 4650
+.#define bfd_mach_mips5000 5000
+.#define bfd_mach_mips6000 6000
+.#define bfd_mach_mips8000 8000
+.#define bfd_mach_mips10000 10000
+.#define bfd_mach_mips16 16
. bfd_arch_i386, {* Intel 386 *}
.#define bfd_mach_i386_i386 0
.#define bfd_mach_i386_i8086 1
@@ -127,11 +148,27 @@ DESCRIPTION
.#define bfd_mach_z8002 2
. bfd_arch_h8500, {* Hitachi H8/500 *}
. bfd_arch_sh, {* Hitachi SH *}
+.#define bfd_mach_sh 0
+.#define bfd_mach_sh3 0x30
+.#define bfd_mach_sh3e 0x3e
+.#define bfd_mach_sh4 0x40
. bfd_arch_alpha, {* Dec Alpha *}
. bfd_arch_arm, {* Advanced Risc Machines ARM *}
+.#define bfd_mach_arm_2 1
+.#define bfd_mach_arm_2a 2
+.#define bfd_mach_arm_3 3
+.#define bfd_mach_arm_3M 4
+.#define bfd_mach_arm_4 5
+.#define bfd_mach_arm_4T 6
. bfd_arch_ns32k, {* National Semiconductors ns32000 *}
. bfd_arch_w65, {* WDC 65816 *}
+. bfd_arch_tic30, {* Texas Instruments TMS320C30 *}
+. bfd_arch_v850, {* NEC V850 *}
+.#define bfd_mach_v850 0
+. bfd_arch_arc, {* Argonaut RISC Core *}
+.#define bfd_mach_arc_base 0
. bfd_arch_m32r, {* Mitsubishi M32R/D *}
+.#define bfd_mach_m32r 0 {* backwards compatibility *}
. bfd_arch_mn10200, {* Matsushita MN10200 *}
. bfd_arch_mn10300, {* Matsushita MN10300 *}
. bfd_arch_last
@@ -174,6 +211,7 @@ DESCRIPTION
extern const bfd_arch_info_type bfd_a29k_arch;
extern const bfd_arch_info_type bfd_alpha_arch;
+extern const bfd_arch_info_type bfd_arc_arch;
extern const bfd_arch_info_type bfd_arm_arch;
extern const bfd_arch_info_type bfd_d10v_arch;
extern const bfd_arch_info_type bfd_h8300_arch;
@@ -192,11 +230,13 @@ extern const bfd_arch_info_type bfd_powerpc_arch;
extern const bfd_arch_info_type bfd_rs6000_arch;
extern const bfd_arch_info_type bfd_sh_arch;
extern const bfd_arch_info_type bfd_sparc_arch;
+extern const bfd_arch_info_type bfd_tic30_arch;
extern const bfd_arch_info_type bfd_vax_arch;
extern const bfd_arch_info_type bfd_we32k_arch;
extern const bfd_arch_info_type bfd_z8k_arch;
extern const bfd_arch_info_type bfd_ns32k_arch;
extern const bfd_arch_info_type bfd_w65_arch;
+extern const bfd_arch_info_type bfd_v850_arch;
static const bfd_arch_info_type * const bfd_archures_list[] =
{
@@ -205,6 +245,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
#else
&bfd_a29k_arch,
&bfd_alpha_arch,
+ &bfd_arc_arch,
&bfd_arm_arch,
&bfd_d10v_arch,
&bfd_h8300_arch,
@@ -223,11 +264,13 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_rs6000_arch,
&bfd_sh_arch,
&bfd_sparc_arch,
+ &bfd_tic30_arch,
&bfd_vax_arch,
&bfd_we32k_arch,
&bfd_z8k_arch,
&bfd_ns32k_arch,
&bfd_w65_arch,
+ &bfd_v850_arch,
#endif
0
};
@@ -291,6 +334,61 @@ bfd_scan_arch (string)
/*
FUNCTION
+ bfd_arch_list
+
+SYNOPSIS
+ const char **bfd_arch_list(void);
+
+DESCRIPTION
+ Return a freshly malloced NULL-terminated vector of the names
+ of all the valid BFD architectures. Do not modify the names.
+
+*/
+
+const char **
+bfd_arch_list ()
+{
+ int vec_length = 0;
+ const char **name_ptr;
+ const char **name_list;
+ const bfd_arch_info_type * const *app;
+
+ /* Determine the number of architectures */
+ vec_length = 0;
+ for (app = bfd_archures_list; *app != NULL; app++)
+ {
+ const bfd_arch_info_type *ap;
+ for (ap = *app; ap != NULL; ap = ap->next)
+ {
+ vec_length++;
+ }
+ }
+
+ name_list = (CONST char **)
+ bfd_malloc ((vec_length + 1) * sizeof (char **));
+ if (name_list == NULL)
+ return NULL;
+
+ /* Point the list at each of the names */
+ name_ptr = name_list;
+ for (app = bfd_archures_list; *app != NULL; app++)
+ {
+ const bfd_arch_info_type *ap;
+ for (ap = *app; ap != NULL; ap = ap->next)
+ {
+ *name_ptr = ap->printable_name;
+ name_ptr++;
+ }
+ }
+ *name_ptr = NULL;
+
+ return name_list;
+}
+
+
+
+/*
+FUNCTION
bfd_arch_get_compatible
SYNOPSIS
@@ -540,10 +638,58 @@ bfd_default_scan (info, string)
const char *ptr_tst;
unsigned long number;
enum bfd_architecture arch;
+ const char *printable_name_colon;
+
+ /* Exact match of the architecture name (ARCH_NAME) and also the
+ default architecture? */
+ if (strcasecmp (string, info->arch_name) == 0
+ && info->the_default)
+ return true;
- /* First test for an exact match */
- if (strcmp (string, info->printable_name) == 0)
+ /* Exact match of the machine name (PRINTABLE_NAME)? */
+ if (strcasecmp (string, info->printable_name) == 0)
return true;
+
+ /* Given that printable_name contains no colon, attempt to match:
+ ARCH_NAME [ ":" ] PRINTABLE_NAME? */
+ printable_name_colon = strchr (info->printable_name, ':');
+ if (printable_name_colon == NULL)
+ {
+ int strlen_arch_name = strlen (info->arch_name);
+ if (strncasecmp (string, info->arch_name, strlen_arch_name) == 0)
+ {
+ if (string[strlen_arch_name] == ':')
+ {
+ if (strcasecmp (string + strlen_arch_name + 1,
+ info->printable_name) == 0)
+ return true;
+ }
+ else
+ {
+ if (strcasecmp (string + strlen_arch_name,
+ info->printable_name) == 0)
+ return true;
+ }
+ }
+ }
+
+ /* Given that PRINTABLE_NAME has the form: <arch> ":" <mach>;
+ Attempt to match: <arch> <mach>? */
+ if (printable_name_colon != NULL)
+ {
+ int colon_index = printable_name_colon - info->printable_name;
+ if (strncasecmp (string, info->printable_name, colon_index) == 0
+ && strcasecmp (string + colon_index,
+ info->printable_name + colon_index + 1) == 0)
+ return true;
+ }
+
+ /* Given that PRINTABLE_NAME has the form: <arch> ":" <mach>; Do not
+ attempt to match just <mach>, it could be ambigious. This test
+ is left until later. */
+
+ /* NOTE: The below is retained for compatibility only. Please do not
+ add to this code */
/* See how much of the supplied string matches with the
architecture, eg the string m68k:68020 would match the 68k entry
@@ -569,69 +715,56 @@ bfd_default_scan (info, string)
}
number = 0;
- while (isdigit(*ptr_src))
+ while (isdigit ((unsigned char) *ptr_src))
{
number = number * 10 + *ptr_src - '0';
ptr_src++;
}
+ /* NOTE: The below is retained for compatibility only.
+ PLEASE DO NOT ADD TO THIS CODE. */
+
switch (number)
{
- case 65:
- arch = bfd_arch_w65;
- break;
-
- case 300:
- arch = bfd_arch_h8300;
- break;
-
- case 500:
- arch = bfd_arch_h8500;
+ /* FIXME: These are needed to parse IEEE objects. */
+ case 68000:
+ arch = bfd_arch_m68k;
+ number = bfd_mach_m68000;
break;
-
case 68010:
+ arch = bfd_arch_m68k;
+ number = bfd_mach_m68010;
+ break;
case 68020:
- case 68030:
- case 68040:
- case 68332:
- case 68050:
- case 68000:
- arch = bfd_arch_m68k;
+ arch = bfd_arch_m68k;
+ number = bfd_mach_m68020;
break;
-
- case 386:
- case 80386:
- case 486:
- case 80486:
- arch = bfd_arch_i386;
+ case 68030:
+ arch = bfd_arch_m68k;
+ number = bfd_mach_m68030;
break;
-
- case 29000:
- arch = bfd_arch_a29k;
+ case 68040:
+ arch = bfd_arch_m68k;
+ number = bfd_mach_m68040;
break;
-
- case 8000:
- arch = bfd_arch_z8k;
+ case 68332:
+ arch = bfd_arch_m68k;
+ /* FIXME: This should be cpu32. */
+ number = bfd_mach_m68020;
break;
case 32000:
arch = bfd_arch_we32k;
break;
- case 860:
- case 80860:
- arch = bfd_arch_i860;
- break;
- case 960:
- case 80960:
- arch = bfd_arch_i960;
+ case 3000:
+ arch = bfd_arch_mips;
+ number = bfd_mach_mips3000;
break;
- case 2000:
- case 3000:
case 4000:
- case 4400:
arch = bfd_arch_mips;
+ number = bfd_mach_mips4000;
break;
case 6000:
diff --git a/contrib/binutils/bfd/bfd-in.h b/contrib/binutils/bfd/bfd-in.h
index 3ce24e7..e2ed936 100644
--- a/contrib/binutils/bfd/bfd-in.h
+++ b/contrib/binutils/bfd/bfd-in.h
@@ -1,5 +1,6 @@
/* Main header file for the bfd library -- portable access to object files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
** NOTE: bfd.h and bfd-in2.h are GENERATED files. Don't change them;
@@ -309,6 +310,7 @@ typedef struct sec *sec_ptr;
#define bfd_section_name(bfd, ptr) ((ptr)->name)
#define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr))
#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
+#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
#define bfd_get_section_flags(bfd, ptr) ((ptr)->flags + 0)
#define bfd_get_section_userdata(bfd, ptr) ((ptr)->userdata)
@@ -605,6 +607,8 @@ extern boolean bfd_elf64_record_link_assignment
PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean));
extern struct bfd_link_needed_list *bfd_elf_get_needed_list
PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean bfd_elf_get_bfd_needed_list
+ PARAMS ((bfd *, struct bfd_link_needed_list **));
extern boolean bfd_elf32_size_dynamic_sections
PARAMS ((bfd *, const char *, const char *, boolean, const char *,
const char * const *, struct bfd_link_info *, struct sec **,
diff --git a/contrib/binutils/bfd/bfd-in2.h b/contrib/binutils/bfd/bfd-in2.h
index f2d857a..9137998 100644
--- a/contrib/binutils/bfd/bfd-in2.h
+++ b/contrib/binutils/bfd/bfd-in2.h
@@ -1,5 +1,6 @@
/* Main header file for the bfd library -- portable access to object files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
** NOTE: bfd.h and bfd-in2.h are GENERATED files. Don't change them;
@@ -309,6 +310,7 @@ typedef struct sec *sec_ptr;
#define bfd_section_name(bfd, ptr) ((ptr)->name)
#define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr))
#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
+#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
#define bfd_get_section_flags(bfd, ptr) ((ptr)->flags + 0)
#define bfd_get_section_userdata(bfd, ptr) ((ptr)->userdata)
@@ -605,6 +607,8 @@ extern boolean bfd_elf64_record_link_assignment
PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean));
extern struct bfd_link_needed_list *bfd_elf_get_needed_list
PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean bfd_elf_get_bfd_needed_list
+ PARAMS ((bfd *, struct bfd_link_needed_list **));
extern boolean bfd_elf32_size_dynamic_sections
PARAMS ((bfd *, const char *, const char *, boolean, const char *,
const char * const *, struct bfd_link_info *, struct sec **,
@@ -721,77 +725,77 @@ bfd_create PARAMS ((CONST char *filename, bfd *templ));
#define bfd_put_8(abfd, val, ptr) \
(*((unsigned char *)(ptr)) = (unsigned char)(val))
#define bfd_put_signed_8 \
- bfd_put_8
+ bfd_put_8
#define bfd_get_8(abfd, ptr) \
(*(unsigned char *)(ptr))
#define bfd_get_signed_8(abfd, ptr) \
- ((*(unsigned char *)(ptr) ^ 0x80) - 0x80)
+ ((*(unsigned char *)(ptr) ^ 0x80) - 0x80)
#define bfd_put_16(abfd, val, ptr) \
BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
#define bfd_put_signed_16 \
- bfd_put_16
+ bfd_put_16
#define bfd_get_16(abfd, ptr) \
BFD_SEND(abfd, bfd_getx16, (ptr))
#define bfd_get_signed_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
+ BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
#define bfd_put_32(abfd, val, ptr) \
BFD_SEND(abfd, bfd_putx32, ((val),(ptr)))
#define bfd_put_signed_32 \
- bfd_put_32
+ bfd_put_32
#define bfd_get_32(abfd, ptr) \
BFD_SEND(abfd, bfd_getx32, (ptr))
#define bfd_get_signed_32(abfd, ptr) \
- BFD_SEND(abfd, bfd_getx_signed_32, (ptr))
+ BFD_SEND(abfd, bfd_getx_signed_32, (ptr))
#define bfd_put_64(abfd, val, ptr) \
BFD_SEND(abfd, bfd_putx64, ((val), (ptr)))
#define bfd_put_signed_64 \
- bfd_put_64
+ bfd_put_64
#define bfd_get_64(abfd, ptr) \
BFD_SEND(abfd, bfd_getx64, (ptr))
#define bfd_get_signed_64(abfd, ptr) \
- BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
+ BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
/* Byte swapping macros for file header data. */
#define bfd_h_put_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
+ bfd_put_8 (abfd, val, ptr)
#define bfd_h_put_signed_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
+ bfd_put_8 (abfd, val, ptr)
#define bfd_h_get_8(abfd, ptr) \
- bfd_get_8 (abfd, ptr)
+ bfd_get_8 (abfd, ptr)
#define bfd_h_get_signed_8(abfd, ptr) \
- bfd_get_signed_8 (abfd, ptr)
+ bfd_get_signed_8 (abfd, ptr)
#define bfd_h_put_16(abfd, val, ptr) \
BFD_SEND(abfd, bfd_h_putx16,(val,ptr))
#define bfd_h_put_signed_16 \
- bfd_h_put_16
+ bfd_h_put_16
#define bfd_h_get_16(abfd, ptr) \
BFD_SEND(abfd, bfd_h_getx16,(ptr))
#define bfd_h_get_signed_16(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr))
+ BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr))
#define bfd_h_put_32(abfd, val, ptr) \
BFD_SEND(abfd, bfd_h_putx32,(val,ptr))
#define bfd_h_put_signed_32 \
- bfd_h_put_32
+ bfd_h_put_32
#define bfd_h_get_32(abfd, ptr) \
BFD_SEND(abfd, bfd_h_getx32,(ptr))
#define bfd_h_get_signed_32(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr))
+ BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr))
#define bfd_h_put_64(abfd, val, ptr) \
BFD_SEND(abfd, bfd_h_putx64,(val, ptr))
#define bfd_h_put_signed_64 \
- bfd_h_put_64
+ bfd_h_put_64
#define bfd_h_get_64(abfd, ptr) \
BFD_SEND(abfd, bfd_h_getx64,(ptr))
#define bfd_h_get_signed_64(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
+ BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
typedef struct sec
{
@@ -888,7 +892,7 @@ typedef struct sec
multiple times, the value of a symbol is the amount of
space it requires, and the largest symbol value is the one
used). Most targets have exactly one of these (which we
- translate to bfd_com_section_ptr), but ECOFF has two. */
+ translate to bfd_com_section_ptr), but ECOFF has two. */
#define SEC_IS_COMMON 0x8000
/* The section contains only debugging information. For
@@ -904,76 +908,76 @@ typedef struct sec
#define SEC_IN_MEMORY 0x20000
/* The contents of this section are to be excluded by the
- linker for executable and shared objects unless those
- objects are to be further relocated. */
+ linker for executable and shared objects unless those
+ objects are to be further relocated. */
#define SEC_EXCLUDE 0x40000
- /* The contents of this section are to be sorted by the
- based on the address specified in the associated symbol
- table. */
+ /* The contents of this section are to be sorted by the
+ based on the address specified in the associated symbol
+ table. */
#define SEC_SORT_ENTRIES 0x80000
- /* When linking, duplicate sections of the same name should be
- discarded, rather than being combined into a single section as
- is usually done. This is similar to how common symbols are
- handled. See SEC_LINK_DUPLICATES below. */
+ /* When linking, duplicate sections of the same name should be
+ discarded, rather than being combined into a single section as
+ is usually done. This is similar to how common symbols are
+ handled. See SEC_LINK_DUPLICATES below. */
#define SEC_LINK_ONCE 0x100000
- /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
- should handle duplicate sections. */
+ /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
+ should handle duplicate sections. */
#define SEC_LINK_DUPLICATES 0x600000
- /* This value for SEC_LINK_DUPLICATES means that duplicate
- sections with the same name should simply be discarded. */
+ /* This value for SEC_LINK_DUPLICATES means that duplicate
+ sections with the same name should simply be discarded. */
#define SEC_LINK_DUPLICATES_DISCARD 0x0
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if there are any duplicate sections, although
- it should still only link one copy. */
+ /* This value for SEC_LINK_DUPLICATES means that the linker
+ should warn if there are any duplicate sections, although
+ it should still only link one copy. */
#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections are a different size. */
+ /* This value for SEC_LINK_DUPLICATES means that the linker
+ should warn if any duplicate sections are a different size. */
#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections contain different
- contents. */
+ /* This value for SEC_LINK_DUPLICATES means that the linker
+ should warn if any duplicate sections contain different
+ contents. */
#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000
- /* This section was created by the linker as part of dynamic
- relocation or other arcane processing. It is skipped when
- going through the first-pass output, trusting that someone
- else up the line will take care of it later. */
+ /* This section was created by the linker as part of dynamic
+ relocation or other arcane processing. It is skipped when
+ going through the first-pass output, trusting that someone
+ else up the line will take care of it later. */
#define SEC_LINKER_CREATED 0x800000
- /* End of section flags. */
+ /* End of section flags. */
- /* Some internal packed boolean fields. */
+ /* Some internal packed boolean fields. */
- /* See the vma field. */
- unsigned int user_set_vma : 1;
+ /* See the vma field. */
+ unsigned int user_set_vma : 1;
- /* Whether relocations have been processed. */
- unsigned int reloc_done : 1;
+ /* Whether relocations have been processed. */
+ unsigned int reloc_done : 1;
- /* A mark flag used by some of the linker backends. */
- unsigned int linker_mark : 1;
+ /* A mark flag used by some of the linker backends. */
+ unsigned int linker_mark : 1;
- /* End of internal packed boolean fields. */
+ /* End of internal packed boolean fields. */
/* The virtual memory address of the section - where it will be
at run time. The symbols are relocated against this. The
- user_set_vma flag is maintained by bfd; if it's not set, the
- backend can assign addresses (for example, in <<a.out>>, where
- the default address for <<.data>> is dependent on the specific
- target and various flags). */
+ user_set_vma flag is maintained by bfd; if it's not set, the
+ backend can assign addresses (for example, in <<a.out>>, where
+ the default address for <<.data>> is dependent on the specific
+ target and various flags). */
bfd_vma vma;
/* The load address of the section - where it would be in a
rom image; really only used for writing section header
- information. */
+ information. */
bfd_vma lma;
@@ -984,8 +988,8 @@ typedef struct sec
bfd_size_type _cooked_size;
/* The original size on disk of the section, in bytes. Normally this
- value is the same as the size, but if some relaxing has
- been done, then this value will be bigger. */
+ value is the same as the size, but if some relaxing has
+ been done, then this value will be bigger. */
bfd_size_type _raw_size;
@@ -1070,7 +1074,7 @@ typedef struct sec
bfd *owner;
- /* A symbol which points at this section only */
+ /* A symbol which points at this section only */
struct symbol_cache_entry *symbol;
struct symbol_cache_entry **symbol_ptr_ptr;
@@ -1080,7 +1084,7 @@ typedef struct sec
/* These sections are global, and are managed by BFD. The application
and target back end are not permitted to change the values in
- these sections. New code should use the section_ptr macros rather
+ these sections. New code should use the section_ptr macros rather
than referring directly to the const sections. The const sections
may eventually vanish. */
#define BFD_ABS_SECTION_NAME "*ABS*"
@@ -1155,12 +1159,19 @@ bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec, bfd *obfd, ase
#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
BFD_SEND (obfd, _bfd_copy_private_section_data, \
- (ibfd, isection, obfd, osection))
+ (ibfd, isection, obfd, osection))
enum bfd_architecture
{
bfd_arch_unknown, /* File arch not known */
bfd_arch_obscure, /* Arch known, not one of these */
bfd_arch_m68k, /* Motorola 68xxx */
+#define bfd_mach_m68000 1
+#define bfd_mach_m68008 2
+#define bfd_mach_m68010 3
+#define bfd_mach_m68020 4
+#define bfd_mach_m68030 5
+#define bfd_mach_m68040 6
+#define bfd_mach_m68060 7
bfd_arch_vax, /* DEC Vax */
bfd_arch_i960, /* Intel 960 */
/* The order of the following is important.
@@ -1177,23 +1188,37 @@ enum bfd_architecture
#define bfd_mach_i960_mc 4
#define bfd_mach_i960_xa 5
#define bfd_mach_i960_ca 6
-#define bfd_mach_i960_jx 7
+#define bfd_mach_i960_jx 7
#define bfd_mach_i960_hx 8
bfd_arch_a29k, /* AMD 29000 */
bfd_arch_sparc, /* SPARC */
-#define bfd_mach_sparc 1
+#define bfd_mach_sparc 1
/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
-#define bfd_mach_sparc_sparclet 2
-#define bfd_mach_sparc_sparclite 3
-#define bfd_mach_sparc_v8plus 4
-#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */
-#define bfd_mach_sparc_v9 6
-#define bfd_mach_sparc_v9a 7 /* with ultrasparc add'ns */
+#define bfd_mach_sparc_sparclet 2
+#define bfd_mach_sparc_sparclite 3
+#define bfd_mach_sparc_v8plus 4
+#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */
+#define bfd_mach_sparc_v9 6
+#define bfd_mach_sparc_v9a 7 /* with ultrasparc add'ns */
/* Nonzero if MACH has the v9 instruction set. */
#define bfd_mach_sparc_v9_p(mach) \
((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a)
bfd_arch_mips, /* MIPS Rxxxx */
+#define bfd_mach_mips3000 3000
+#define bfd_mach_mips3900 3900
+#define bfd_mach_mips4000 4000
+#define bfd_mach_mips4010 4010
+#define bfd_mach_mips4100 4100
+#define bfd_mach_mips4300 4300
+#define bfd_mach_mips4400 4400
+#define bfd_mach_mips4600 4600
+#define bfd_mach_mips4650 4650
+#define bfd_mach_mips5000 5000
+#define bfd_mach_mips6000 6000
+#define bfd_mach_mips8000 8000
+#define bfd_mach_mips10000 10000
+#define bfd_mach_mips16 16
bfd_arch_i386, /* Intel 386 */
#define bfd_mach_i386_i386 0
#define bfd_mach_i386_i8086 1
@@ -1214,15 +1239,31 @@ enum bfd_architecture
bfd_arch_hppa, /* HP PA RISC */
bfd_arch_d10v, /* Mitsubishi D10V */
bfd_arch_z8k, /* Zilog Z8000 */
-#define bfd_mach_z8001 1
-#define bfd_mach_z8002 2
+#define bfd_mach_z8001 1
+#define bfd_mach_z8002 2
bfd_arch_h8500, /* Hitachi H8/500 */
bfd_arch_sh, /* Hitachi SH */
+#define bfd_mach_sh 0
+#define bfd_mach_sh3 0x30
+#define bfd_mach_sh3e 0x3e
+#define bfd_mach_sh4 0x40
bfd_arch_alpha, /* Dec Alpha */
bfd_arch_arm, /* Advanced Risc Machines ARM */
+#define bfd_mach_arm_2 1
+#define bfd_mach_arm_2a 2
+#define bfd_mach_arm_3 3
+#define bfd_mach_arm_3M 4
+#define bfd_mach_arm_4 5
+#define bfd_mach_arm_4T 6
bfd_arch_ns32k, /* National Semiconductors ns32000 */
bfd_arch_w65, /* WDC 65816 */
+ bfd_arch_tic30, /* Texas Instruments TMS320C30 */
+ bfd_arch_v850, /* NEC V850 */
+#define bfd_mach_v850 0
+ bfd_arch_arc, /* Argonaut RISC Core */
+#define bfd_mach_arc_base 0
bfd_arch_m32r, /* Mitsubishi M32R/D */
+#define bfd_mach_m32r 0 /* backwards compatibility */
bfd_arch_mn10200, /* Matsushita MN10200 */
bfd_arch_mn10300, /* Matsushita MN10300 */
bfd_arch_last
@@ -1239,10 +1280,10 @@ typedef struct bfd_arch_info
const char *printable_name;
unsigned int section_align_power;
/* true if this is the default machine for the architecture */
- boolean the_default;
+ boolean the_default;
const struct bfd_arch_info * (*compatible)
- PARAMS ((const struct bfd_arch_info *a,
- const struct bfd_arch_info *b));
+ PARAMS ((const struct bfd_arch_info *a,
+ const struct bfd_arch_info *b));
boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
@@ -1254,6 +1295,9 @@ bfd_printable_name PARAMS ((bfd *abfd));
const bfd_arch_info_type *
bfd_scan_arch PARAMS ((const char *string));
+const char **
+bfd_arch_list PARAMS ((void));
+
const bfd_arch_info_type *
bfd_arch_get_compatible PARAMS ((
const bfd *abfd,
@@ -1336,19 +1380,19 @@ typedef struct reloc_cache_entry
} arelent;
enum complain_overflow
{
- /* Do not complain on overflow. */
+ /* Do not complain on overflow. */
complain_overflow_dont,
- /* Complain if the bitfield overflows, whether it is considered
- as signed or unsigned. */
+ /* Complain if the bitfield overflows, whether it is considered
+ as signed or unsigned. */
complain_overflow_bitfield,
- /* Complain if the value overflows when considered as signed
- number. */
+ /* Complain if the value overflows when considered as signed
+ number. */
complain_overflow_signed,
- /* Complain if the value overflows when considered as an
- unsigned number. */
+ /* Complain if the value overflows when considered as an
+ unsigned number. */
complain_overflow_unsigned
};
@@ -1366,13 +1410,13 @@ struct reloc_howto_struct
unwanted data from the relocation. */
unsigned int rightshift;
- /* The size of the item to be relocated. This is *not* a
- power-of-two measure. To get the number of bytes operated
- on by a type of relocation, use bfd_get_reloc_size. */
+ /* The size of the item to be relocated. This is *not* a
+ power-of-two measure. To get the number of bytes operated
+ on by a type of relocation, use bfd_get_reloc_size. */
int size;
/* The number of bits in the item to be relocated. This is used
- when doing overflow checking. */
+ when doing overflow checking. */
unsigned int bitsize;
/* Notes that the relocation is relative to the location in the
@@ -1381,12 +1425,12 @@ struct reloc_howto_struct
being relocated. */
boolean pc_relative;
- /* The bit position of the reloc value in the destination.
- The relocated value is left shifted by this amount. */
+ /* The bit position of the reloc value in the destination.
+ The relocated value is left shifted by this amount. */
unsigned int bitpos;
- /* What type of overflow error should be checked for when
- relocating. */
+ /* What type of overflow error should be checked for when
+ relocating. */
enum complain_overflow complain_on_overflow;
/* If this field is non null, then the supplied function is
@@ -1394,8 +1438,8 @@ struct reloc_howto_struct
strange relocation methods to be accomodated (e.g., i960 callj
instructions). */
bfd_reloc_status_type (*special_function)
- PARAMS ((bfd *abfd,
- arelent *reloc_entry,
+ PARAMS ((bfd *abfd,
+ arelent *reloc_entry,
struct symbol_cache_entry *symbol,
PTR data,
asection *input_section,
@@ -1448,7 +1492,7 @@ struct reloc_howto_struct
} \
} \
}
-int
+unsigned int
bfd_get_reloc_size PARAMS ((reloc_howto_type *));
typedef struct relent_chain {
@@ -1457,6 +1501,14 @@ typedef struct relent_chain {
} arelent_chain;
bfd_reloc_status_type
+bfd_check_overflow
+ PARAMS ((enum complain_overflow how,
+ unsigned int bitsize,
+ unsigned int rightshift,
+ bfd_vma relocation));
+
+bfd_reloc_status_type
+
bfd_perform_relocation
PARAMS ((bfd *abfd,
arelent *reloc_entry,
@@ -1584,7 +1636,7 @@ relocation types already defined. */
BFD_RELOC_SPARC_BASE13,
BFD_RELOC_SPARC_BASE22,
-/* Some relocations we're using for SPARC V9 -- subject to change. */
+/* SPARC64 relocations */
#define BFD_RELOC_SPARC_64 BFD_RELOC_64
BFD_RELOC_SPARC_10,
BFD_RELOC_SPARC_11,
@@ -1597,10 +1649,17 @@ relocation types already defined. */
BFD_RELOC_SPARC_PC_LM22,
BFD_RELOC_SPARC_WDISP16,
BFD_RELOC_SPARC_WDISP19,
- BFD_RELOC_SPARC_GLOB_JMP,
BFD_RELOC_SPARC_7,
BFD_RELOC_SPARC_6,
BFD_RELOC_SPARC_5,
+#define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL
+ BFD_RELOC_SPARC_PLT64,
+ BFD_RELOC_SPARC_HIX22,
+ BFD_RELOC_SPARC_LOX10,
+ BFD_RELOC_SPARC_H44,
+ BFD_RELOC_SPARC_M44,
+ BFD_RELOC_SPARC_L44,
+ BFD_RELOC_SPARC_REGISTER,
/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
"addend" in some special way.
@@ -1706,6 +1765,7 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_MIPS_CALL_HI16,
BFD_RELOC_MIPS_CALL_LO16,
+
/* i386/elf relocations */
BFD_RELOC_386_GOT32,
BFD_RELOC_386_PLT32,
@@ -1810,6 +1870,22 @@ not stored in the instruction. */
BFD_RELOC_SH_DATA,
BFD_RELOC_SH_LABEL,
+/* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
+be zero and is not stored in the instruction. */
+ BFD_RELOC_THUMB_PCREL_BRANCH9,
+ BFD_RELOC_THUMB_PCREL_BRANCH12,
+ BFD_RELOC_THUMB_PCREL_BRANCH23,
+
+/* Argonaut RISC Core (ARC) relocs.
+ARC 22 bit pc-relative branch. The lowest two bits must be zero and are
+not stored in the instruction. The high 20 bits are installed in bits 26
+through 7 of the instruction. */
+ BFD_RELOC_ARC_B22_PCREL,
+
+/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not
+stored in the instruction. The high 24 bits are installed in bits 23
+through 0. */
+ BFD_RELOC_ARC_B26,
/* Mitsubishi D10V relocs.
This is a 10-bit reloc with the right 2 bits
@@ -1861,6 +1937,40 @@ used when the lower 16 bits are treated as signed. */
add3, load, and store instructions. */
BFD_RELOC_M32R_SDA16,
+/* This is a 9-bit reloc */
+ BFD_RELOC_V850_9_PCREL,
+
+/* This is a 22-bit reloc */
+ BFD_RELOC_V850_22_PCREL,
+
+/* This is a 16 bit offset from the short data area pointer. */
+ BFD_RELOC_V850_SDA_16_16_OFFSET,
+
+/* This is a 16 bit offset (of which only 15 bits are used) from the
+short data area pointer. */
+ BFD_RELOC_V850_SDA_15_16_OFFSET,
+
+/* This is a 16 bit offset from the zero data area pointer. */
+ BFD_RELOC_V850_ZDA_16_16_OFFSET,
+
+/* This is a 16 bit offset (of which only 15 bits are used) from the
+zero data area pointer. */
+ BFD_RELOC_V850_ZDA_15_16_OFFSET,
+
+/* This is an 8 bit offset (of which only 6 bits are used) from the
+tiny data area pointer. */
+ BFD_RELOC_V850_TDA_6_8_OFFSET,
+
+/* This is an 8bit offset (of which only 7 bits are used) from the tiny
+data area pointer. */
+ BFD_RELOC_V850_TDA_7_8_OFFSET,
+
+/* This is a 7 bit offset from the tiny data area pointer. */
+ BFD_RELOC_V850_TDA_7_7_OFFSET,
+
+/* This is a 16 bit offset from the tiny data area pointer. */
+ BFD_RELOC_V850_TDA_16_16_OFFSET,
+
/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
instruction. */
@@ -1869,6 +1979,11 @@ instruction. */
/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
instruction. */
BFD_RELOC_MN10300_16_PCREL,
+
+/* This is a 8bit DP reloc for the tms320c30, where the most
+significant 8 bits of a 24 bit word are placed into the least
+significant 8 bits of the opcode. */
+ BFD_RELOC_TIC30_LDP,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
reloc_howto_type *
@@ -1881,114 +1996,114 @@ bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code));
typedef struct symbol_cache_entry
{
- /* A pointer to the BFD which owns the symbol. This information
- is necessary so that a back end can work out what additional
- information (invisible to the application writer) is carried
- with the symbol.
+ /* A pointer to the BFD which owns the symbol. This information
+ is necessary so that a back end can work out what additional
+ information (invisible to the application writer) is carried
+ with the symbol.
- This field is *almost* redundant, since you can use section->owner
- instead, except that some symbols point to the global sections
- bfd_{abs,com,und}_section. This could be fixed by making
- these globals be per-bfd (or per-target-flavor). FIXME. */
+ This field is *almost* redundant, since you can use section->owner
+ instead, except that some symbols point to the global sections
+ bfd_{abs,com,und}_section. This could be fixed by making
+ these globals be per-bfd (or per-target-flavor). FIXME. */
struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
- /* The text of the symbol. The name is left alone, and not copied; the
- application may not alter it. */
+ /* The text of the symbol. The name is left alone, and not copied; the
+ application may not alter it. */
CONST char *name;
- /* The value of the symbol. This really should be a union of a
+ /* The value of the symbol. This really should be a union of a
numeric value with a pointer, since some flags indicate that
a pointer to another symbol is stored here. */
symvalue value;
- /* Attributes of a symbol: */
+ /* Attributes of a symbol: */
#define BSF_NO_FLAGS 0x00
- /* The symbol has local scope; <<static>> in <<C>>. The value
- is the offset into the section of the data. */
-#define BSF_LOCAL 0x01
+ /* The symbol has local scope; <<static>> in <<C>>. The value
+ is the offset into the section of the data. */
+#define BSF_LOCAL 0x01
- /* The symbol has global scope; initialized data in <<C>>. The
- value is the offset into the section of the data. */
-#define BSF_GLOBAL 0x02
+ /* The symbol has global scope; initialized data in <<C>>. The
+ value is the offset into the section of the data. */
+#define BSF_GLOBAL 0x02
- /* The symbol has global scope and is exported. The value is
- the offset into the section of the data. */
-#define BSF_EXPORT BSF_GLOBAL /* no real difference */
+ /* The symbol has global scope and is exported. The value is
+ the offset into the section of the data. */
+#define BSF_EXPORT BSF_GLOBAL /* no real difference */
- /* A normal C symbol would be one of:
- <<BSF_LOCAL>>, <<BSF_FORT_COMM>>, <<BSF_UNDEFINED>> or
- <<BSF_GLOBAL>> */
+ /* A normal C symbol would be one of:
+ <<BSF_LOCAL>>, <<BSF_FORT_COMM>>, <<BSF_UNDEFINED>> or
+ <<BSF_GLOBAL>> */
- /* The symbol is a debugging record. The value has an arbitary
- meaning. */
-#define BSF_DEBUGGING 0x08
+ /* The symbol is a debugging record. The value has an arbitary
+ meaning. */
+#define BSF_DEBUGGING 0x08
- /* The symbol denotes a function entry point. Used in ELF,
- perhaps others someday. */
+ /* The symbol denotes a function entry point. Used in ELF,
+ perhaps others someday. */
#define BSF_FUNCTION 0x10
- /* Used by the linker. */
+ /* Used by the linker. */
#define BSF_KEEP 0x20
#define BSF_KEEP_G 0x40
- /* A weak global symbol, overridable without warnings by
- a regular global symbol of the same name. */
+ /* A weak global symbol, overridable without warnings by
+ a regular global symbol of the same name. */
#define BSF_WEAK 0x80
/* This symbol was created to point to a section, e.g. ELF's
- STT_SECTION symbols. */
+ STT_SECTION symbols. */
#define BSF_SECTION_SYM 0x100
- /* The symbol used to be a common symbol, but now it is
- allocated. */
+ /* The symbol used to be a common symbol, but now it is
+ allocated. */
#define BSF_OLD_COMMON 0x200
- /* The default value for common data. */
+ /* The default value for common data. */
#define BFD_FORT_COMM_DEFAULT_VALUE 0
- /* In some files the type of a symbol sometimes alters its
- location in an output file - ie in coff a <<ISFCN>> symbol
- which is also <<C_EXT>> symbol appears where it was
- declared and not at the end of a section. This bit is set
- by the target BFD part to convey this information. */
+ /* In some files the type of a symbol sometimes alters its
+ location in an output file - ie in coff a <<ISFCN>> symbol
+ which is also <<C_EXT>> symbol appears where it was
+ declared and not at the end of a section. This bit is set
+ by the target BFD part to convey this information. */
#define BSF_NOT_AT_END 0x400
- /* Signal that the symbol is the label of constructor section. */
+ /* Signal that the symbol is the label of constructor section. */
#define BSF_CONSTRUCTOR 0x800
- /* Signal that the symbol is a warning symbol. The name is a
- warning. The name of the next symbol is the one to warn about;
- if a reference is made to a symbol with the same name as the next
- symbol, a warning is issued by the linker. */
+ /* Signal that the symbol is a warning symbol. The name is a
+ warning. The name of the next symbol is the one to warn about;
+ if a reference is made to a symbol with the same name as the next
+ symbol, a warning is issued by the linker. */
#define BSF_WARNING 0x1000
- /* Signal that the symbol is indirect. This symbol is an indirect
- pointer to the symbol with the same name as the next symbol. */
+ /* Signal that the symbol is indirect. This symbol is an indirect
+ pointer to the symbol with the same name as the next symbol. */
#define BSF_INDIRECT 0x2000
- /* BSF_FILE marks symbols that contain a file name. This is used
- for ELF STT_FILE symbols. */
+ /* BSF_FILE marks symbols that contain a file name. This is used
+ for ELF STT_FILE symbols. */
#define BSF_FILE 0x4000
- /* Symbol is from dynamic linking information. */
-#define BSF_DYNAMIC 0x8000
+ /* Symbol is from dynamic linking information. */
+#define BSF_DYNAMIC 0x8000
/* The symbol denotes a data object. Used in ELF, and perhaps
others someday. */
-#define BSF_OBJECT 0x10000
+#define BSF_OBJECT 0x10000
flagword flags;
- /* A pointer to the section to which this symbol is
- relative. This will always be non NULL, there are special
+ /* A pointer to the section to which this symbol is
+ relative. This will always be non NULL, there are special
sections for undefined and absolute symbols. */
struct sec *section;
- /* Back end special data. */
+ /* Back end special data. */
union
{
PTR p;
@@ -2030,7 +2145,7 @@ bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymb
#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
- (ibfd, isymbol, obfd, osymbol))
+ (ibfd, isymbol, obfd, osymbol))
struct _bfd
{
/* The filename the application opened the BFD with. */
@@ -2230,6 +2345,9 @@ bfd_set_error_handler PARAMS ((bfd_error_handler_type));
void
bfd_set_error_program_name PARAMS ((const char *));
+bfd_error_handler_type
+bfd_get_error_handler PARAMS ((void));
+
long
bfd_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect));
@@ -2238,7 +2356,7 @@ bfd_canonicalize_reloc
PARAMS ((bfd *abfd,
asection *sec,
arelent **loc,
- asymbol **syms));
+ asymbol **syms));
void
bfd_set_reloc
@@ -2272,19 +2390,19 @@ bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
#define bfd_copy_private_bfd_data(ibfd, obfd) \
BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
- (ibfd, obfd))
+ (ibfd, obfd))
boolean
bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
#define bfd_merge_private_bfd_data(ibfd, obfd) \
BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
- (ibfd, obfd))
+ (ibfd, obfd))
boolean
bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
#define bfd_set_private_flags(abfd, flags) \
BFD_SEND (abfd, _bfd_set_private_flags, \
- (abfd, flags))
+ (abfd, flags))
#define bfd_sizeof_headers(abfd, reloc) \
BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
@@ -2315,36 +2433,36 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
#define bfd_link_hash_table_create(abfd) \
- BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
+ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
#define bfd_link_add_symbols(abfd, info) \
- BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
+ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
#define bfd_final_link(abfd, info) \
- BFD_SEND (abfd, _bfd_final_link, (abfd, info))
+ BFD_SEND (abfd, _bfd_final_link, (abfd, info))
#define bfd_free_cached_info(abfd) \
BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
#define bfd_get_dynamic_symtab_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
+ BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
#define bfd_print_private_bfd_data(abfd, file)\
- BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
+ BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
- BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
+ BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
#define bfd_get_dynamic_reloc_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
+ BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
- BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
+ BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
extern bfd_byte *bfd_get_relocated_section_contents
- PARAMS ((bfd *, struct bfd_link_info *,
- struct bfd_link_order *, bfd_byte *,
- boolean, asymbol **));
+ PARAMS ((bfd *, struct bfd_link_info *,
+ struct bfd_link_order *, bfd_byte *,
+ boolean, asymbol **));
symindex
bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
@@ -2473,10 +2591,10 @@ CAT(NAME,_bfd_set_private_flags),\
CAT(NAME,_bfd_print_private_bfd_data)\
/* Called to copy BFD general private data from one object file
to another. */
- boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
+ boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
/* Called to merge BFD general private data from one object file
to a common output file when linking. */
- boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
+ boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
/* Called to copy BFD private section data from one object file
to another. */
boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
@@ -2484,9 +2602,9 @@ CAT(NAME,_bfd_print_private_bfd_data)\
/* Called to copy BFD private symbol data from one symbol
to another. */
boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
- bfd *, asymbol *));
+ bfd *, asymbol *));
/* Called to set private backend flags */
- boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
+ boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
/* Called to print private BFD data */
boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
@@ -2555,7 +2673,7 @@ CAT(NAME,_minisymbol_to_symbol)
struct symbol_cache_entry *,
symbol_info *));
#define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e))
- boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
+ boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
boolean (*_bfd_find_nearest_line) PARAMS ((bfd *abfd,
diff --git a/contrib/binutils/bfd/bfd.c b/contrib/binutils/bfd/bfd.c
index a64a2d5..8293a72 100644
--- a/contrib/binutils/bfd/bfd.c
+++ b/contrib/binutils/bfd/bfd.c
@@ -1,5 +1,5 @@
/* Generic BFD library interface and support routines.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -508,6 +508,24 @@ bfd_set_error_program_name (name)
{
_bfd_error_program_name = name;
}
+
+
+/*
+FUNCTION
+ bfd_get_error_handler
+
+SYNOPSIS
+ bfd_error_handler_type bfd_get_error_handler (void);
+
+DESCRIPTION
+ Return the BFD error handler function.
+*/
+
+bfd_error_handler_type
+bfd_get_error_handler ()
+{
+ return _bfd_error_handler;
+}
/*
SECTION
@@ -910,11 +928,11 @@ bfd_scan_vma (string, end, base)
/* Speed could be improved with a table like hex_value[] in gas. */
#define HEX_VALUE(c) \
- (isxdigit(c) ? \
- (isdigit(c) ? \
- (c - '0') : \
- (10 + c - (islower(c) ? 'a' : 'A'))) : \
- 42)
+ (isxdigit ((unsigned char) c) \
+ ? (isdigit ((unsigned char) c) \
+ ? (c - '0') \
+ : (10 + c - (islower ((unsigned char) c) ? 'a' : 'A'))) \
+ : 42)
for (value = 0; (digit = HEX_VALUE(*string)) < base; string++)
{
diff --git a/contrib/binutils/bfd/binary.c b/contrib/binutils/bfd/binary.c
index c42f143..8fcbadc 100644
--- a/contrib/binutils/bfd/binary.c
+++ b/contrib/binutils/bfd/binary.c
@@ -1,5 +1,5 @@
/* BFD back-end for binary objects.
- Copyright 1994, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1994, 95, 96, 97, 1998 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -155,7 +155,7 @@ mangle_name (abfd, suffix)
/* Change any non-alphanumeric characters to underscores. */
for (p = buf; *p; p++)
- if (! isalnum (*p))
+ if (! isalnum ((unsigned char) *p))
*p = '_';
return buf;
@@ -260,6 +260,8 @@ binary_set_section_contents (abfd, sec, data, offset, size)
meaningful in the binary format. */
if ((sec->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
return true;
+ if ((sec->flags & SEC_NEVER_LOAD) != 0)
+ return true;
if (! abfd->output_has_begun)
{
diff --git a/contrib/binutils/bfd/coff-i386.c b/contrib/binutils/bfd/coff-i386.c
index d459303..7898cc1 100644
--- a/contrib/binutils/bfd/coff-i386.c
+++ b/contrib/binutils/bfd/coff-i386.c
@@ -1,5 +1,6 @@
/* BFD back-end for Intel 386 COFF files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -30,6 +31,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "coff/pe.h"
#endif
+#ifdef COFF_GO32_EXE
+#include "coff/go32exe.h"
+#endif
+
#include "libcoff.h"
static bfd_reloc_status_type coff_i386_reloc
@@ -70,9 +75,9 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
if (output_bfd == (bfd *) NULL)
return bfd_reloc_continue;
-
if (bfd_is_com_section (symbol->section))
{
+#ifndef COFF_WITH_PE
/* We are relocating a common symbol. The current value in the
object file is ORIG + OFFSET, where ORIG is the value of the
common symbol as seen by the object file when it was compiled
@@ -85,6 +90,10 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
the common symbol which we are going to put in the final
object file. NEW is symbol->value. */
diff = symbol->value + reloc_entry->addend;
+#else
+ /* In PE mode, we do not offset the common symbol. */
+ diff = reloc_entry->addend;
+#endif
}
else
{
@@ -95,13 +104,10 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
diff = reloc_entry->addend;
}
-
#ifdef COFF_WITH_PE
- if (reloc_entry->howto->type == 7)
- {
-/* diff -= coff_data(output_bfd)->link_info->pe_info.image_base.value;*/
- exit(1);
- }
+ /* FIXME: How should this case be handled? */
+ if (reloc_entry->howto->type == R_IMAGEBASE && diff != 0)
+ abort ();
#endif
#define DOIT(x) \
@@ -332,9 +338,51 @@ static reloc_howto_type howto_table[] =
cache_ptr->addend += asect->vma; \
}
-/* We use the special COFF backend linker. */
+/* We use the special COFF backend linker. For normal i386 COFF, we
+ can use the generic relocate_section routine. For PE, we need our
+ own routine. */
+
+#ifndef COFF_WITH_PE
+
#define coff_relocate_section _bfd_coff_generic_relocate_section
+#else /* COFF_WITH_PE */
+
+/* The PE relocate section routine. The only difference between this
+ and the regular routine is that we don't want to do anything for a
+ relocateable link. */
+
+static boolean coff_pe_i386_relocate_section
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ struct internal_reloc *, struct internal_syment *, asection **));
+
+static boolean
+coff_pe_i386_relocate_section (output_bfd, info, input_bfd,
+ input_section, contents, relocs, syms,
+ sections)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+ bfd *input_bfd;
+ asection *input_section;
+ bfd_byte *contents;
+ struct internal_reloc *relocs;
+ struct internal_syment *syms;
+ asection **sections;
+{
+ if (info->relocateable)
+ return true;
+
+ return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
+ input_section, contents,
+ relocs, syms, sections);
+}
+
+#define coff_relocate_section coff_pe_i386_relocate_section
+
+#endif /* COFF_WITH_PE */
+
+/* Convert an rtype to howto for the COFF backend linker. */
+
static reloc_howto_type *
coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
bfd *abfd;
@@ -366,28 +414,40 @@ coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
BFD_ASSERT (h != NULL);
-
#ifndef COFF_WITH_PE
- /* I think we *do* want to bypass this. If we don't, I have seen some data
- parameters get the wrong relcation address. If I link two versions
- with and without this section bypassed and then do a binary comparison,
- the addresses which are different can be looked up in the map. The
- case in which this section has been bypassed has addresses which correspond
- to values I can find in the map */
+ /* I think we *do* want to bypass this. If we don't, I have
+ seen some data parameters get the wrong relocation address.
+ If I link two versions with and without this section bypassed
+ and then do a binary comparison, the addresses which are
+ different can be looked up in the map. The case in which
+ this section has been bypassed has addresses which correspond
+ to values I can find in the map. */
*addendp -= sym->n_value;
#endif
}
+#ifndef COFF_WITH_PE
/* If the output symbol is common (in which case this must be a
relocateable link), we need to add in the final size of the
common symbol. */
if (h != NULL && h->root.type == bfd_link_hash_common)
*addendp += h->root.u.c.size;
-
+#endif
#ifdef COFF_WITH_PE
if (howto->pc_relative)
- *addendp -= 4;
+ {
+ *addendp -= 4;
+
+ /* If the symbol is defined, then the generic code is going to
+ add back the symbol value in order to cancel out an
+ adjustment it made to the addend. However, we set the addend
+ to 0 at the start of this function. We need to adjust here,
+ to avoid the adjustment the generic code will make. FIXME:
+ This is getting a bit hackish. */
+ if (sym != NULL && sym->n_scnum != 0)
+ *addendp -= sym->n_value;
+ }
if (rel->r_type == R_IMAGEBASE)
{
@@ -421,17 +481,94 @@ coff_i386_reloc_type_lookup (abfd, code)
}
}
+#define coff_rtype_to_howto coff_i386_rtype_to_howto
+
+#ifdef TARGET_UNDERSCORE
+/* If i386 gcc uses underscores for symbol names, then it does not use
+ a leading dot for local labels, so if TARGET_UNDERSCORE is defined
+ we treat all symbols starting with L as local. */
-#define coff_rtype_to_howto coff_i386_rtype_to_howto
+static boolean coff_i386_is_local_label_name PARAMS ((bfd *, const char *));
+
+static boolean
+coff_i386_is_local_label_name (abfd, name)
+ bfd *abfd;
+ const char *name;
+{
+ if (name[0] == 'L')
+ return true;
+
+ return _bfd_coff_is_local_label_name (abfd, name);
+}
+
+#define coff_bfd_is_local_label_name coff_i386_is_local_label_name
+
+#endif /* TARGET_UNDERSCORE */
#include "coffcode.h"
static const bfd_target *
-i3coff_object_p(a)
- bfd *a;
+i3coff_object_p (abfd)
+ bfd *abfd;
{
- return coff_object_p(a);
+#ifdef COFF_IMAGE_WITH_PE
+ /* We need to hack badly to handle a PE image correctly. In PE
+ images created by the GNU linker, the offset to the COFF header
+ is always the size. However, this is not the case in images
+ generated by other PE linkers. The PE format stores a four byte
+ offset to the PE signature just before the COFF header at
+ location 0x3c of the file. We pick up that offset, verify that
+ the PE signature is there, and then set ourselves up to read in
+ the COFF header. */
+ {
+ bfd_byte ext_offset[4];
+ file_ptr offset;
+ bfd_byte ext_signature[4];
+ unsigned long signature;
+
+ if (bfd_seek (abfd, 0x3c, SEEK_SET) != 0
+ || bfd_read (ext_offset, 1, 4, abfd) != 4)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+ offset = bfd_h_get_32 (abfd, ext_offset);
+ if (bfd_seek (abfd, offset, SEEK_SET) != 0
+ || bfd_read (ext_signature, 1, 4, abfd) != 4)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+ signature = bfd_h_get_32 (abfd, ext_signature);
+
+ if (signature != 0x4550)
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+
+ /* Here is the hack. coff_object_p wants to read filhsz bytes to
+ pick up the COFF header. We adjust so that that will work. 20
+ is the size of the i386 COFF filehdr. */
+
+ if (bfd_seek (abfd,
+ (bfd_tell (abfd)
+ - bfd_coff_filhsz (abfd)
+ + 20),
+ SEEK_SET)
+ != 0)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+ }
+#endif
+
+ return coff_object_p (abfd);
}
const bfd_target
@@ -455,9 +592,11 @@ const bfd_target
HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
#ifndef COFF_WITH_PE
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
+ | SEC_CODE | SEC_DATA),
#else
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
+ | SEC_CODE | SEC_DATA
| SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
#endif
diff --git a/contrib/binutils/bfd/coff-sh.c b/contrib/binutils/bfd/coff-sh.c
index cf8c2e6..fd4f218 100644
--- a/contrib/binutils/bfd/coff-sh.c
+++ b/contrib/binutils/bfd/coff-sh.c
@@ -1,5 +1,5 @@
/* BFD back-end for Hitachi Super-H COFF binaries.
- Copyright 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Steve Chamberlain, <sac@cygnus.com>.
Relaxing code written by Ian Lance Taylor, <ian@cygnus.com>.
@@ -32,6 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static bfd_reloc_status_type sh_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static long get_symbol_value PARAMS ((asymbol *));
+static boolean sh_merge_private_data PARAMS ((bfd *, bfd *));
static boolean sh_relax_section
PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
static boolean sh_relax_delete_bytes
@@ -275,6 +276,20 @@ static reloc_howto_type sh_coff_howtos[] =
true, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_SH_SWITCH8, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ sh_reloc, /* special_function */
+ "r_switch8", /* name */
+ true, /* partial_inplace */
+ 0xff, /* src_mask */
+ 0xff, /* dst_mask */
false) /* pcrel_offset */
};
@@ -347,7 +362,8 @@ get_symbol_value (symbol)
cache_ptr->addend = - (ptr->section->vma + ptr->value); \
else \
cache_ptr->addend = 0; \
- if ((reloc).r_type == R_SH_SWITCH16 \
+ if ((reloc).r_type == R_SH_SWITCH8 \
+ || (reloc).r_type == R_SH_SWITCH16 \
|| (reloc).r_type == R_SH_SWITCH32 \
|| (reloc).r_type == R_SH_USES \
|| (reloc).r_type == R_SH_COUNT \
@@ -426,6 +442,32 @@ sh_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
return bfd_reloc_ok;
}
+/* This routine checks for linking big and little endian objects
+ together. */
+
+static boolean
+sh_merge_private_data (ibfd, obfd)
+ bfd *ibfd;
+ bfd *obfd;
+{
+ if (ibfd->xvec->byteorder != obfd->xvec->byteorder
+ && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
+ {
+ (*_bfd_error_handler)
+ ("%s: compiled for a %s endian system and target is %s endian",
+ bfd_get_filename (ibfd),
+ bfd_big_endian (ibfd) ? "big" : "little",
+ bfd_big_endian (obfd) ? "big" : "little");
+
+ bfd_set_error (bfd_error_wrong_format);
+ return false;
+ }
+
+ return true;
+}
+
+#define coff_bfd_merge_private_bfd_data sh_merge_private_data
+
/* We can do relaxing. */
#define coff_bfd_relax_section sh_relax_section
@@ -557,7 +599,9 @@ sh_relax_section (abfd, sec, link_info, again)
the register load. The 4 is because the r_offset field is
computed as though it were a jump offset, which are based
from 4 bytes after the jump instruction. */
- laddr = irel->r_vaddr - sec->vma + 4 + irel->r_offset;
+ laddr = irel->r_vaddr - sec->vma + 4;
+ /* Careful to sign extend the 32-bit offset. */
+ laddr += ((irel->r_offset & 0xffffffff) ^ 0x80000000) - 0x80000000;
if (laddr >= sec->_raw_size)
{
(*_bfd_error_handler) ("%s: 0x%lx: warning: bad R_SH_USES offset",
@@ -567,8 +611,7 @@ sh_relax_section (abfd, sec, link_info, again)
}
insn = bfd_get_16 (abfd, contents + laddr);
- /* If the instruction is not mov.l NN,rN, we don't know what to
- do. */
+ /* If the instruction is not mov.l NN,rN, we don't know what to do. */
if ((insn & 0xf000) != 0xd000)
{
((*_bfd_error_handler)
@@ -928,11 +971,12 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
/* Adjust all the relocs. */
for (irel = coff_section_data (abfd, sec)->relocs; irel < irelend; irel++)
{
- bfd_vma nraddr, start, stop;
+ bfd_vma nraddr, stop;
+ bfd_vma start = 0;
int insn = 0;
struct internal_syment sym;
int off, adjust, oinsn;
- bfd_signed_vma voff;
+ bfd_signed_vma voff = 0;
boolean overflow;
/* Get the new reloc address. */
@@ -950,7 +994,8 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
&& irel->r_vaddr - sec->vma < addr + count
&& irel->r_type != R_SH_ALIGN
&& irel->r_type != R_SH_CODE
- && irel->r_type != R_SH_DATA)
+ && irel->r_type != R_SH_DATA
+ && irel->r_type != R_SH_LABEL)
irel->r_type = R_SH_UNUSED;
/* If this is a PC relative reloc, see if the range it covers
@@ -1034,6 +1079,7 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
stop = (start &~ (bfd_vma) 3) + 4 + off * 4;
break;
+ case R_SH_SWITCH8:
case R_SH_SWITCH16:
case R_SH_SWITCH32:
/* These relocs types represent
@@ -1059,6 +1105,8 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
if (irel->r_type == R_SH_SWITCH16)
voff = bfd_get_signed_16 (abfd, contents + nraddr);
+ else if (irel->r_type == R_SH_SWITCH8)
+ voff = bfd_get_8 (abfd, contents + nraddr);
else
voff = bfd_get_signed_32 (abfd, contents + nraddr);
stop = (bfd_vma) ((bfd_signed_vma) start + voff);
@@ -1123,6 +1171,13 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
bfd_put_16 (abfd, insn, contents + nraddr);
break;
+ case R_SH_SWITCH8:
+ voff += adjust;
+ if (voff < 0 || voff >= 0xff)
+ overflow = true;
+ bfd_put_8 (abfd, voff, contents + nraddr);
+ break;
+
case R_SH_SWITCH16:
voff += adjust;
if (voff < - 0x8000 || voff >= 0x8000)
@@ -2406,7 +2461,8 @@ sh_relocate_section (output_bfd, info, input_bfd, input_section, contents,
}
else
{
- if (symndx < 0 || symndx >= obj_raw_syment_count (input_bfd))
+ if (symndx < 0
+ || (unsigned long) symndx >= obj_raw_syment_count (input_bfd))
{
(*_bfd_error_handler)
("%s: illegal symbol index %ld in relocs",
@@ -2716,3 +2772,173 @@ const bfd_target shlcoff_vec =
COFF_SWAP_TABLE,
};
+
+/* Some people want versions of the SH COFF target which do not align
+ to 16 byte boundaries. We implement that by adding a couple of new
+ target vectors. These are just like the ones above, but they
+ change the default section alignment. To generate them in the
+ assembler, use -small. To use them in the linker, use -b
+ coff-sh{l}-small and -oformat coff-sh{l}-small.
+
+ Yes, this is a horrible hack. A general solution for setting
+ section alignment in COFF is rather complex. ELF handles this
+ correctly. */
+
+/* Only recognize the small versions if the target was not defaulted.
+ Otherwise we won't recognize the non default endianness. */
+
+static const bfd_target *
+coff_small_object_p (abfd)
+ bfd *abfd;
+{
+ if (abfd->target_defaulted)
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+ return coff_object_p (abfd);
+}
+
+/* Set the section alignment for the small versions. */
+
+static boolean
+coff_small_new_section_hook (abfd, section)
+ bfd *abfd;
+ asection *section;
+{
+ if (! coff_new_section_hook (abfd, section))
+ return false;
+
+ /* We must align to at least a four byte boundary, because longword
+ accesses must be on a four byte boundary. */
+ if (section->alignment_power == COFF_DEFAULT_SECTION_ALIGNMENT_POWER)
+ section->alignment_power = 2;
+
+ return true;
+}
+
+/* This is copied from bfd_coff_std_swap_table so that we can change
+ the default section alignment power. */
+
+static const bfd_coff_backend_data bfd_coff_small_swap_table =
+{
+ coff_swap_aux_in, coff_swap_sym_in, coff_swap_lineno_in,
+ coff_swap_aux_out, coff_swap_sym_out,
+ coff_swap_lineno_out, coff_swap_reloc_out,
+ coff_swap_filehdr_out, coff_swap_aouthdr_out,
+ coff_swap_scnhdr_out,
+ FILHSZ, AOUTSZ, SCNHSZ, SYMESZ, AUXESZ, RELSZ, LINESZ,
+#ifdef COFF_LONG_FILENAMES
+ true,
+#else
+ false,
+#endif
+#ifdef COFF_LONG_SECTION_NAMES
+ true,
+#else
+ false,
+#endif
+ 2,
+ coff_swap_filehdr_in, coff_swap_aouthdr_in, coff_swap_scnhdr_in,
+ coff_swap_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook,
+ coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
+ coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
+ coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
+ coff_sym_is_global, coff_compute_section_file_positions,
+ coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
+ coff_adjust_symndx, coff_link_add_one_symbol,
+ coff_link_output_has_begun, coff_final_link_postscript
+};
+
+#define coff_small_close_and_cleanup \
+ coff_close_and_cleanup
+#define coff_small_bfd_free_cached_info \
+ coff_bfd_free_cached_info
+#define coff_small_get_section_contents \
+ coff_get_section_contents
+#define coff_small_get_section_contents_in_window \
+ coff_get_section_contents_in_window
+
+const bfd_target shcoff_small_vec =
+{
+ "coff-sh-small", /* name */
+ bfd_target_coff_flavour,
+ BFD_ENDIAN_BIG, /* data byte order is big */
+ BFD_ENDIAN_BIG, /* header byte order is big */
+
+ (HAS_RELOC | EXEC_P | /* object flags */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | BFD_IS_RELAXABLE),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC),
+ '_', /* leading symbol underscore */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen */
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
+
+ {_bfd_dummy_target, coff_small_object_p, /* bfd_check_format */
+ bfd_generic_archive_p, _bfd_dummy_target},
+ {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
+ bfd_false},
+ {bfd_false, coff_write_object_contents, /* bfd_write_contents */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (coff_small),
+ BFD_JUMP_TABLE_COPY (coff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ (PTR) &bfd_coff_small_swap_table
+};
+
+const bfd_target shlcoff_small_vec =
+{
+ "coff-shl-small", /* name */
+ bfd_target_coff_flavour,
+ BFD_ENDIAN_LITTLE, /* data byte order is little */
+ BFD_ENDIAN_LITTLE, /* header byte order is little endian too*/
+
+ (HAS_RELOC | EXEC_P | /* object flags */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | BFD_IS_RELAXABLE),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC),
+ '_', /* leading symbol underscore */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
+
+ {_bfd_dummy_target, coff_small_object_p, /* bfd_check_format */
+ bfd_generic_archive_p, _bfd_dummy_target},
+ {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
+ bfd_false},
+ {bfd_false, coff_write_object_contents, /* bfd_write_contents */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (coff_small),
+ BFD_JUMP_TABLE_COPY (coff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ (PTR) &bfd_coff_small_swap_table
+};
diff --git a/contrib/binutils/bfd/coff-tic30.c b/contrib/binutils/bfd/coff-tic30.c
new file mode 100644
index 0000000..3ff8c59
--- /dev/null
+++ b/contrib/binutils/bfd/coff-tic30.c
@@ -0,0 +1,206 @@
+/* BFD back-end for TMS320C30 coff binaries.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "bfdlink.h"
+#include "coff/tic30.h"
+#include "coff/internal.h"
+#include "libcoff.h"
+
+#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1)
+
+reloc_howto_type tic30_coff_howto_table[] =
+{
+ HOWTO (R_TIC30_ABS16, 2, 1, 16, false, 0, 0, NULL,
+ "16", false, 0x0000FFFF, 0x0000FFFF, false),
+ HOWTO (R_TIC30_ABS24, 2, 2, 24, false, 8, complain_overflow_bitfield, NULL,
+ "24", false, 0xFFFFFF00, 0xFFFFFF00, false),
+ HOWTO (R_TIC30_LDP, 18, 0, 24, false, 0, complain_overflow_bitfield, NULL,
+ "LDP", false, 0x00FF0000, 0x000000FF, false),
+ HOWTO (R_TIC30_ABS32, 2, 2, 32, false, 0, complain_overflow_bitfield, NULL,
+ "32", false, 0xFFFFFFFF, 0xFFFFFFFF, false),
+ HOWTO (R_TIC30_PC16, 2, 1, 16, true, 0, complain_overflow_signed, NULL,
+ "PCREL", false, 0x0000FFFF, 0x0000FFFF, false),
+ {-1}
+};
+
+#ifndef coff_bfd_reloc_type_lookup
+#define coff_bfd_reloc_type_lookup tic30_coff_reloc_type_lookup
+
+/* For the case statement use the code values used in tc_gen_reloc to
+ map to the howto table entries that match those in both the aout
+ and coff implementations. */
+reloc_howto_type *
+tic30_coff_reloc_type_lookup (abfd, code)
+ bfd *abfd;
+ bfd_reloc_code_real_type code;
+{
+ switch (code)
+ {
+ case BFD_RELOC_8:
+ case BFD_RELOC_TIC30_LDP:
+ return &tic30_coff_howto_table[2];
+ case BFD_RELOC_16:
+ return &tic30_coff_howto_table[0];
+ case BFD_RELOC_24:
+ return &tic30_coff_howto_table[1];
+ case BFD_RELOC_16_PCREL:
+ return &tic30_coff_howto_table[4];
+ case BFD_RELOC_32:
+ return &tic30_coff_howto_table[3];
+ default:
+ return (reloc_howto_type *) NULL;
+ }
+}
+
+#endif
+
+/* Turn a howto into a reloc number */
+
+static int
+coff_tic30_select_reloc (howto)
+ reloc_howto_type *howto;
+{
+ return howto->type;
+}
+
+#define SELECT_RELOC(x,howto) x.r_type = coff_tic30_select_reloc(howto)
+
+
+#define BADMAG(x) TIC30BADMAG(x)
+#define TIC30 1 /* Customize coffcode.h */
+#define __A_MAGIC_SET__
+
+/* Code to swap in the reloc */
+#define SWAP_IN_RELOC_OFFSET bfd_h_get_32
+#define SWAP_OUT_RELOC_OFFSET bfd_h_put_32
+#define SWAP_OUT_RELOC_EXTRA(abfd, src, dst) dst->r_stuff[0] = 'S'; \
+dst->r_stuff[1] = 'C';
+
+/* Code to turn a r_type into a howto ptr, uses the above howto table. */
+
+static void
+rtype2howto (internal, dst)
+ arelent *internal;
+ struct internal_reloc *dst;
+{
+ switch (dst->r_type)
+ {
+ case R_TIC30_ABS16:
+ internal->howto = &tic30_coff_howto_table[0];
+ break;
+ case R_TIC30_ABS24:
+ internal->howto = &tic30_coff_howto_table[1];
+ break;
+ case R_TIC30_ABS32:
+ internal->howto = &tic30_coff_howto_table[3];
+ break;
+ case R_TIC30_LDP:
+ internal->howto = &tic30_coff_howto_table[2];
+ break;
+ case R_TIC30_PC16:
+ internal->howto = &tic30_coff_howto_table[4];
+ break;
+ default:
+ abort ();
+ break;
+ }
+}
+
+#define RTYPE2HOWTO(internal, relocentry) rtype2howto(internal,relocentry)
+
+/* Perform any necessary magic to the addend in a reloc entry */
+
+#define CALC_ADDEND(abfd, symbol, ext_reloc, cache_ptr) \
+ cache_ptr->addend = ext_reloc.r_offset;
+
+
+#define RELOC_PROCESSING(relent,reloc,symbols,abfd,section) \
+ reloc_processing(relent, reloc, symbols, abfd, section)
+
+static void
+reloc_processing (relent, reloc, symbols, abfd, section)
+ arelent *relent;
+ struct internal_reloc *reloc;
+ asymbol **symbols;
+ bfd *abfd;
+ asection *section;
+{
+ relent->address = reloc->r_vaddr;
+ rtype2howto (relent, reloc);
+
+ if (reloc->r_symndx > 0)
+ {
+ relent->sym_ptr_ptr = symbols + obj_convert (abfd)[reloc->r_symndx];
+ }
+ else
+ {
+ relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
+ }
+ relent->addend = reloc->r_offset;
+ relent->address -= section->vma;
+}
+
+#include "coffcode.h"
+
+const bfd_target tic30_coff_vec =
+{
+ "coff-tic30", /* name */
+ bfd_target_coff_flavour,
+ BFD_ENDIAN_BIG, /* data byte order is big */
+ BFD_ENDIAN_LITTLE, /* header byte order is little */
+
+ (HAS_RELOC | EXEC_P | /* object flags */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | WP_TEXT),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
+ '_', /* leading symbol underscore */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen */
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
+
+ {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
+ bfd_generic_archive_p, _bfd_dummy_target},
+ {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
+ bfd_false},
+ {bfd_false, coff_write_object_contents, /* bfd_write_contents */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (coff),
+ BFD_JUMP_TABLE_COPY (coff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ COFF_SWAP_TABLE
+};
diff --git a/contrib/binutils/bfd/coffcode.h b/contrib/binutils/bfd/coffcode.h
index dd01cb8..f0514c4 100644
--- a/contrib/binutils/bfd/coffcode.h
+++ b/contrib/binutils/bfd/coffcode.h
@@ -1,5 +1,6 @@
/* Support for the generic parts of most COFF variants, for BFD.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -503,7 +504,7 @@ styp_to_sec_flags (abfd, hdr, name)
section VMA and the file offset match. If we don't know
COFF_PAGE_SIZE, we can't ensure the correct correspondence,
and demand page loading of the file will fail. */
-#ifdef COFF_PAGE_SIZE
+#if defined (COFF_PAGE_SIZE) && !defined (COFF_ALIGN_IN_S_FLAGS)
sec_flags |= SEC_DEBUGGING;
#endif
}
@@ -861,6 +862,12 @@ dependent COFF routines:
. boolean collect,
. struct bfd_link_hash_entry **hashp));
.
+. boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
+. bfd * abfd ));
+. boolean (*_bfd_coff_final_link_postscript) PARAMS ((
+. bfd * abfd,
+. struct coff_final_link_info * pfinfo));
+.
.} bfd_coff_backend_data;
.
.#define coff_backend_info(abfd) ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
@@ -975,6 +982,11 @@ dependent COFF routines:
. ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
. (info, abfd, name, flags, section, value, string, cp, coll, hashp))
.
+.#define bfd_coff_link_output_has_begun(a) \
+. ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a))
+.#define bfd_coff_final_link_postscript(a,p) \
+. ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
+.
*/
/* See whether the magic number matches. */
@@ -1016,6 +1028,8 @@ coff_new_section_hook (abfd, section)
bfd * abfd;
asection * section;
{
+ combined_entry_type *native;
+
section->alignment_power = COFF_DEFAULT_SECTION_ALIGNMENT_POWER;
#ifdef RS6000COFF_C
@@ -1032,9 +1046,21 @@ coff_new_section_hook (abfd, section)
@@ The 10 is a guess at a plausible maximum number of aux entries
(but shouldn't be a constant). */
- coffsymbol (section->symbol)->native =
- (combined_entry_type *) bfd_zalloc (abfd,
- sizeof (combined_entry_type) * 10);
+ native = ((combined_entry_type *)
+ bfd_zalloc (abfd, sizeof (combined_entry_type) * 10));
+ if (native == NULL)
+ return false;
+
+ /* We don't need to set up n_name, n_value, or n_scnum in the native
+ symbol information, since they'll be overriden by the BFD symbol
+ anyhow. However, we do need to set the type and storage class,
+ in case this symbol winds up getting written out. The value 0
+ for n_numaux is already correct. */
+
+ native->u.syment.n_type = T_NULL;
+ native->u.syment.n_sclass = C_STAT;
+
+ coffsymbol (section->symbol)->native = native;
/* The .stab section must be aligned to 2**2 at most, because
otherwise there may be gaps in the section which gdb will not
@@ -1056,7 +1082,7 @@ coff_new_section_hook (abfd, section)
return true;
}
-#ifdef I960
+#ifdef COFF_ALIGN_IN_SECTION_HEADER
/* Set the alignment of a BFD section. */
@@ -1071,13 +1097,16 @@ coff_set_alignment_hook (abfd, section, scnhdr)
struct internal_scnhdr *hdr = (struct internal_scnhdr *) scnhdr;
unsigned int i;
+#ifdef I960
+ /* Extract ALIGN from 2**ALIGN stored in section header */
for (i = 0; i < 32; i++)
if ((1 << i) >= hdr->s_align)
break;
+#endif
section->alignment_power = i;
}
-#else /* ! I960 */
+#else /* ! COFF_ALIGN_IN_SECTION_HEADER */
#ifdef COFF_WITH_PE
/* a couple of macros to help setting the alignment power field */
@@ -1222,7 +1251,7 @@ coff_set_alignment_hook (abfd, section, scnhdr)
#endif /* ! RS6000COFF_C */
#endif /* ! COFF_WITH_PE */
-#endif /* ! I960 */
+#endif /* ! COFF_ALIGN_IN_SECTION_HEADER */
#ifndef coff_mkobject
@@ -1306,6 +1335,12 @@ coff_mkobject_hook (abfd, filehdr, aouthdr)
}
#endif
+#ifdef ARM
+ /* Set the flags field from the COFF header read in */
+ if (! coff_arm_bfd_set_private_flags (abfd, internal_f->f_flags))
+ coff->flags = 0;
+#endif
+
return (PTR) coff;
}
#endif
@@ -1354,7 +1389,16 @@ coff_set_arch_mach_hook (abfd, filehdr)
#ifdef ARMMAGIC
case ARMMAGIC:
arch = bfd_arch_arm;
- machine =0;
+ switch (internal_f->f_flags & F_ARM_ARCHITECTURE_MASK)
+ {
+ case F_ARM_2: machine = bfd_mach_arm_2; break;
+ case F_ARM_2a: machine = bfd_mach_arm_2a; break;
+ case F_ARM_3: machine = bfd_mach_arm_3; break;
+ default:
+ case F_ARM_3M: machine = bfd_mach_arm_3M; break;
+ case F_ARM_4: machine = bfd_mach_arm_4; break;
+ case F_ARM_4T: machine = bfd_mach_arm_4T; break;
+ }
break;
#endif
#ifdef MC68MAGIC
@@ -1370,7 +1414,7 @@ coff_set_arch_mach_hook (abfd, filehdr)
case LYNXCOFFMAGIC:
#endif
arch = bfd_arch_m68k;
- machine = 68020;
+ machine = bfd_mach_m68020;
break;
#endif
#ifdef MC88MAGIC
@@ -1569,12 +1613,13 @@ coff_set_arch_mach_hook (abfd, filehdr)
break;
#endif
-#ifdef TIC80_ARCH_MAGIC
- case TIC80_ARCH_MAGIC:
- arch = bfd_arch_tic80;
+#ifdef TIC30MAGIC
+ case TIC30MAGIC:
+ arch = bfd_arch_tic30;
break;
#endif
+
default: /* Unreadable input file type */
arch = bfd_arch_obscure;
break;
@@ -1945,9 +1990,38 @@ coff_set_flags (abfd, magicp, flagsp)
}
break;
#endif
+
+#ifdef TIC30MAGIC
+ case bfd_arch_tic30:
+ *magicp = TIC30MAGIC;
+ return true;
+#endif
#ifdef ARMMAGIC
case bfd_arch_arm:
- *magicp = ARMMAGIC;
+ * magicp = ARMMAGIC;
+ * flagsp = 0;
+ if (APCS_SET (abfd))
+ {
+ if (APCS_26_FLAG (abfd))
+ * flagsp |= F_APCS26;
+
+ if (APCS_FLOAT_FLAG (abfd))
+ * flagsp |= F_APCS_FLOAT;
+
+ if (PIC_FLAG (abfd))
+ * flagsp |= F_PIC;
+ }
+ if (INTERWORK_SET (abfd) && INTERWORK_FLAG (abfd))
+ * flagsp |= F_INTERWORK;
+ switch (bfd_get_mach (abfd))
+ {
+ case bfd_mach_arm_2: * flagsp |= F_ARM_2; break;
+ case bfd_mach_arm_2a: * flagsp |= F_ARM_2a; break;
+ case bfd_mach_arm_3: * flagsp |= F_ARM_3; break;
+ case bfd_mach_arm_3M: * flagsp |= F_ARM_3M; break;
+ case bfd_mach_arm_4: * flagsp |= F_ARM_4; break;
+ case bfd_mach_arm_4T: * flagsp |= F_ARM_4T; break;
+ }
return true;
#endif
#ifdef PPCMAGIC
@@ -2101,6 +2175,10 @@ coff_set_arch_mach (abfd, arch, machine)
/* Calculate the file position for each section. */
+#ifndef I960
+#define ALIGN_SECTIONS_IN_FILE
+#endif
+
static boolean
coff_compute_section_file_positions (abfd)
bfd * abfd;
@@ -2109,11 +2187,10 @@ coff_compute_section_file_positions (abfd)
asection *previous = (asection *) NULL;
file_ptr sofar = FILHSZ;
boolean align_adjust;
-
-#ifndef I960
+ unsigned int count;
+#ifdef ALIGN_SECTIONS_IN_FILE
file_ptr old_sofar;
#endif
- unsigned int count;
#ifdef RS6000COFF_C
/* On XCOFF, if we have symbols, set up the .debug section. */
@@ -2199,6 +2276,19 @@ coff_compute_section_file_positions (abfd)
current != (asection *) NULL;
current = current->next, ++count)
{
+#ifdef COFF_IMAGE_WITH_PE
+ /* The NT loader does not want empty section headers, so we omit
+ them. We don't actually remove the section from the BFD,
+ although we probably should. This matches code in
+ coff_write_object_contents. */
+ if (current->_raw_size == 0)
+ {
+ current->target_index = -1;
+ --count;
+ continue;
+ }
+#endif
+
current->target_index = count;
/* Only deal with sections which have contents */
@@ -2209,7 +2299,7 @@ coff_compute_section_file_positions (abfd)
which they are aligned in virtual memory. I960 doesn't
do this (FIXME) so we can stay in sync with Intel. 960
doesn't yet page from files... */
-#ifndef I960
+#ifdef ALIGN_SECTIONS_IN_FILE
if ((abfd->flags & EXEC_P) != 0)
{
/* make sure this section is aligned on the right boundary - by
@@ -2260,7 +2350,7 @@ coff_compute_section_file_positions (abfd)
sofar += current->_raw_size;
-#ifndef I960
+#ifdef ALIGN_SECTIONS_IN_FILE
/* make sure that this section is of the right size too */
if ((abfd->flags & EXEC_P) == 0)
{
@@ -2281,6 +2371,14 @@ coff_compute_section_file_positions (abfd)
}
#endif
+#ifdef COFF_IMAGE_WITH_PE
+ /* For PE we need to make sure we pad out to the aligned
+ _raw_size, in case the caller only writes out data to the
+ unaligned _raw_size. */
+ if (pei_section_data (abfd, current)->virt_size < current->_raw_size)
+ align_adjust = true;
+#endif
+
#ifdef _LIB
/* Force .lib sections to start at zero. The vma is then
incremented in coff_set_section_contents. This is right for
@@ -2599,7 +2697,6 @@ coff_write_object_contents (abfd)
section.s_align = (current->alignment_power
? 1 << current->alignment_power
: 0);
-
#endif
#ifdef COFF_IMAGE_WITH_PE
@@ -2626,13 +2723,22 @@ coff_write_object_contents (abfd)
{
unsigned int i, count;
asymbol **psym;
- coff_symbol_type *csym;
+ coff_symbol_type *csym = NULL;
+ asymbol **psymsec;
+ psymsec = NULL;
count = bfd_get_symcount (abfd);
for (i = 0, psym = abfd->outsymbols; i < count; i++, psym++)
{
- /* Here *PSYM is the section symbol for CURRENT. */
+ if ((*psym)->section != current)
+ continue;
+ /* Remember the location of the first symbol in this
+ section. */
+ if (psymsec == NULL)
+ psymsec = psym;
+
+ /* See if this is the section symbol. */
if (strcmp ((*psym)->name, current->name) == 0)
{
csym = coff_symbol_from (abfd, *psym);
@@ -2642,6 +2748,9 @@ coff_write_object_contents (abfd)
|| csym->native->u.syment.n_sclass != C_STAT
|| csym->native->u.syment.n_type != T_NULL)
continue;
+
+ /* Here *PSYM is the section symbol for CURRENT. */
+
break;
}
}
@@ -2678,6 +2787,24 @@ coff_write_object_contents (abfd)
IMAGE_COMDAT_SELECT_EXACT_MATCH;
break;
}
+
+ /* The COMDAT symbol must be the first symbol from this
+ section in the symbol table. In order to make this
+ work, we move the COMDAT symbol before the first
+ symbol we found in the search above. It's OK to
+ rearrange the symbol table at this point, because
+ coff_renumber_symbols is going to rearrange it
+ further and fix up all the aux entries. */
+ if (psym != psymsec)
+ {
+ asymbol *hold;
+ asymbol **pcopy;
+
+ hold = *psym;
+ for (pcopy = psym; pcopy > psymsec; pcopy--)
+ pcopy[0] = pcopy[-1];
+ *psymsec = hold;
+ }
}
}
#endif /* COFF_WITH_PE */
@@ -2751,6 +2878,7 @@ coff_write_object_contents (abfd)
else
internal_f.f_flags |= F_AR32W;
+
/*
FIXME, should do something about the other byte orders and
architectures.
@@ -2788,10 +2916,6 @@ coff_write_object_contents (abfd)
internal_a.magic = NMAGIC; /* Assume separate i/d */
#define __A_MAGIC_SET__
#endif /* A29K */
-#ifdef TIC80
- internal_a.magic = TIC80_ARCH_MAGIC;
-#define __A_MAGIC_SET__
-#endif /* TIC80 */
#ifdef I860
/* FIXME: What are the a.out magic numbers for the i860? */
internal_a.magic = 0;
@@ -2832,10 +2956,12 @@ coff_write_object_contents (abfd)
#define __A_MAGIC_SET__
internal_a.magic = ZMAGIC;
#endif
+
#if defined(PPC_PE)
#define __A_MAGIC_SET__
internal_a.magic = IMAGE_NT_OPTIONAL_HDR_MAGIC;
#endif
+
#if defined(I386)
#define __A_MAGIC_SET__
#if defined(LYNXOS)
@@ -2852,7 +2978,7 @@ coff_write_object_contents (abfd)
#endif /* LYNXOS */
#endif /* SPARC */
-#if RS6000COFF_C
+#ifdef RS6000COFF_C
#define __A_MAGIC_SET__
internal_a.magic = (abfd->flags & D_PAGED) ? RS6K_AOUTHDR_ZMAGIC :
(abfd->flags & WP_TEXT) ? RS6K_AOUTHDR_NMAGIC :
@@ -3228,7 +3354,8 @@ coff_slurp_line_table (abfd, asect)
warned = false;
symndx = dst.l_addr.l_symndx;
- if (symndx < 0 || symndx >= obj_raw_syment_count (abfd))
+ if (symndx < 0
+ || (unsigned long) symndx >= obj_raw_syment_count (abfd))
{
(*_bfd_error_handler)
("%s: warning: illegal symbol index %ld in line numbers",
@@ -3336,9 +3463,16 @@ coff_slurp_symbol_table (abfd)
#endif
case C_EXT:
+#if defined ARM
+ case C_THUMBEXT:
+ case C_THUMBEXTFUNC:
+#endif
#ifdef RS6000COFF_C
case C_HIDEXT:
#endif
+#ifdef C_SYSTEM
+ case C_SYSTEM: /* System Wide variable */
+#endif
#ifdef COFF_WITH_PE
/* PE uses storage class 0x68 to denote a section symbol */
case C_SECTION:
@@ -3364,8 +3498,15 @@ coff_slurp_symbol_table (abfd)
section */
dst->symbol.flags = BSF_EXPORT | BSF_GLOBAL;
+
+#if defined COFF_WITH_PE
+ /* PE sets the symbol to a value relative to the
+ start of the section. */
+ dst->symbol.value = src->u.syment.n_value;
+#else
dst->symbol.value = (src->u.syment.n_value
- dst->symbol.section->vma);
+#endif
if (ISFCN ((src->u.syment.n_type)))
{
@@ -3395,6 +3536,11 @@ coff_slurp_symbol_table (abfd)
#ifdef I960
case C_LEAFSTAT: /* static leaf procedure */
#endif
+#if defined ARM
+ case C_THUMBSTAT: /* Thumb static */
+ case C_THUMBLABEL: /* Thumb label */
+ case C_THUMBSTATFUNC:/* Thumb static function */
+#endif
case C_LABEL: /* label */
if (src->u.syment.n_scnum == -2)
dst->symbol.flags = BSF_DEBUGGING;
@@ -3404,8 +3550,16 @@ coff_slurp_symbol_table (abfd)
/* Base the value as an index from the base of the
section, if there is one. */
if (dst->symbol.section)
- dst->symbol.value = (src->u.syment.n_value
- - dst->symbol.section->vma);
+ {
+#if defined COFF_WITH_PE
+ /* PE sets the symbol to a value relative to the
+ start of the section. */
+ dst->symbol.value = src->u.syment.n_value;
+#else
+ dst->symbol.value = (src->u.syment.n_value
+ - dst->symbol.section->vma);
+#endif
+ }
else
dst->symbol.value = src->u.syment.n_value;
break;
@@ -3501,10 +3655,16 @@ coff_slurp_symbol_table (abfd)
case C_FCN: /* ".bf" or ".ef" */
case C_EFCN: /* physical end of function */
dst->symbol.flags = BSF_LOCAL;
+#if defined COFF_WITH_PE
+ /* PE sets the symbol to a value relative to the start
+ of the section. */
+ dst->symbol.value = src->u.syment.n_value;
+#else
/* Base the value as an index from the base of the
section. */
dst->symbol.value = (src->u.syment.n_value
- dst->symbol.section->vma);
+#endif
break;
case C_NULL:
@@ -3570,9 +3730,13 @@ coff_slurp_symbol_table (abfd)
#define OTHER_GLOBAL_CLASS C_LEAFEXT
#endif
+#ifdef COFFARM
+#define OTHER_GLOBAL_CLASS C_THUMBEXT || syment->n_sclass == C_THUMBEXTFUNC
+#else
#ifdef COFF_WITH_PE
#define OTHER_GLOBAL_CLASS C_SECTION
#endif
+#endif
#ifdef OTHER_GLOBAL_CLASS
@@ -3580,12 +3744,10 @@ static boolean coff_sym_is_global PARAMS ((bfd *, struct internal_syment *));
static boolean
coff_sym_is_global (abfd, syment)
- bfd *abfd;
- struct internal_syment *syment;
+ bfd * abfd;
+ struct internal_syment * syment;
{
- if (syment->n_sclass == OTHER_GLOBAL_CLASS)
- return true;
- return false;
+ return (syment->n_sclass == OTHER_GLOBAL_CLASS);
}
#undef OTHER_GLOBAL_CLASS
@@ -3906,6 +4068,7 @@ dummy_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
#endif
#define coff_bfd_final_link _bfd_generic_final_link
#endif /* ! defined (coff_relocate_section) */
+
#define coff_bfd_link_split_section _bfd_generic_link_split_section
#ifndef coff_start_final_link
@@ -3920,13 +4083,79 @@ dummy_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
#define coff_link_add_one_symbol _bfd_generic_link_add_one_symbol
#endif
+#ifndef coff_link_output_has_begun
+#define coff_link_output_has_begun _coff_link_output_has_begun
+static boolean
+_coff_link_output_has_begun (abfd)
+ bfd * abfd;
+{
+ return abfd->output_has_begun;
+}
+#endif
+
+#ifndef coff_final_link_postscript
+#define coff_final_link_postscript _coff_final_link_postscript
+static boolean
+_coff_final_link_postscript (abfd, pfinfo)
+ bfd * abfd;
+ struct coff_final_link_info * pfinfo;
+{
+ return true;
+}
+#endif
+
+#ifndef coff_SWAP_aux_in
+#define coff_SWAP_aux_in coff_swap_aux_in
+#endif
+#ifndef coff_SWAP_sym_in
+#define coff_SWAP_sym_in coff_swap_sym_in
+#endif
+#ifndef coff_SWAP_lineno_in
+#define coff_SWAP_lineno_in coff_swap_lineno_in
+#endif
+#ifndef coff_SWAP_aux_out
+#define coff_SWAP_aux_out coff_swap_aux_out
+#endif
+#ifndef coff_SWAP_sym_out
+#define coff_SWAP_sym_out coff_swap_sym_out
+#endif
+#ifndef coff_SWAP_lineno_out
+#define coff_SWAP_lineno_out coff_swap_lineno_out
+#endif
+#ifndef coff_SWAP_reloc_out
+#define coff_SWAP_reloc_out coff_swap_reloc_out
+#endif
+#ifndef coff_SWAP_filehdr_out
+#define coff_SWAP_filehdr_out coff_swap_filehdr_out
+#endif
+#ifndef coff_SWAP_aouthdr_out
+#define coff_SWAP_aouthdr_out coff_swap_aouthdr_out
+#endif
+#ifndef coff_SWAP_scnhdr_out
+#define coff_SWAP_scnhdr_out coff_swap_scnhdr_out
+#endif
+#ifndef coff_SWAP_reloc_in
+#define coff_SWAP_reloc_in coff_swap_reloc_in
+#endif
+#ifndef coff_SWAP_filehdr_in
+#define coff_SWAP_filehdr_in coff_swap_filehdr_in
+#endif
+#ifndef coff_SWAP_aouthdr_in
+#define coff_SWAP_aouthdr_in coff_swap_aouthdr_in
+#endif
+#ifndef coff_SWAP_scnhdr_in
+#define coff_SWAP_scnhdr_in coff_swap_scnhdr_in
+#endif
+
+
+
static CONST bfd_coff_backend_data bfd_coff_std_swap_table =
{
- coff_swap_aux_in, coff_swap_sym_in, coff_swap_lineno_in,
- coff_swap_aux_out, coff_swap_sym_out,
- coff_swap_lineno_out, coff_swap_reloc_out,
- coff_swap_filehdr_out, coff_swap_aouthdr_out,
- coff_swap_scnhdr_out,
+ coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
+ coff_SWAP_aux_out, coff_SWAP_sym_out,
+ coff_SWAP_lineno_out, coff_SWAP_reloc_out,
+ coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
+ coff_SWAP_scnhdr_out,
FILHSZ, AOUTSZ, SCNHSZ, SYMESZ, AUXESZ, RELSZ, LINESZ,
#ifdef COFF_LONG_FILENAMES
true,
@@ -3939,22 +4168,31 @@ static CONST bfd_coff_backend_data bfd_coff_std_swap_table =
false,
#endif
COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
- coff_swap_filehdr_in, coff_swap_aouthdr_in, coff_swap_scnhdr_in,
- coff_swap_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook,
+ coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
+ coff_SWAP_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook,
coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
coff_sym_is_global, coff_compute_section_file_positions,
coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
- coff_adjust_symndx, coff_link_add_one_symbol
+ coff_adjust_symndx, coff_link_add_one_symbol,
+ coff_link_output_has_begun, coff_final_link_postscript
};
-#define coff_close_and_cleanup _bfd_generic_close_and_cleanup
-#define coff_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
-#define coff_get_section_contents _bfd_generic_get_section_contents
+#ifndef coff_close_and_cleanup
+#define coff_close_and_cleanup _bfd_generic_close_and_cleanup
+#endif
+
+#ifndef coff_bfd_free_cached_info
+#define coff_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
+#endif
+
+#ifndef coff_get_section_contents
+#define coff_get_section_contents _bfd_generic_get_section_contents
+#endif
#ifndef coff_bfd_copy_private_symbol_data
-#define coff_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
+#define coff_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
#endif
#ifndef coff_bfd_copy_private_section_data
@@ -3962,36 +4200,44 @@ static CONST bfd_coff_backend_data bfd_coff_std_swap_table =
#endif
#ifndef coff_bfd_copy_private_bfd_data
-#define coff_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
+#define coff_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
+#endif
+
+#ifndef coff_bfd_merge_private_bfd_data
+#define coff_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
#endif
-#define coff_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
-#define coff_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
+#ifndef coff_bfd_set_private_flags
+#define coff_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
+#endif
#ifndef coff_bfd_print_private_bfd_data
-#define coff_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
+#define coff_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
#endif
#ifndef coff_bfd_is_local_label_name
-#define coff_bfd_is_local_label_name _bfd_coff_is_local_label_name
+#define coff_bfd_is_local_label_name _bfd_coff_is_local_label_name
#endif
+
#ifndef coff_read_minisymbols
-#define coff_read_minisymbols _bfd_generic_read_minisymbols
+#define coff_read_minisymbols _bfd_generic_read_minisymbols
#endif
+
#ifndef coff_minisymbol_to_symbol
-#define coff_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
+#define coff_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
#endif
/* The reloc lookup routine must be supplied by each individual COFF
backend. */
#ifndef coff_bfd_reloc_type_lookup
-#define coff_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
+#define coff_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
#endif
#ifndef coff_bfd_get_relocated_section_contents
#define coff_bfd_get_relocated_section_contents \
bfd_generic_get_relocated_section_contents
#endif
+
#ifndef coff_bfd_relax_section
-#define coff_bfd_relax_section bfd_generic_relax_section
+#define coff_bfd_relax_section bfd_generic_relax_section
#endif
diff --git a/contrib/binutils/bfd/coffgen.c b/contrib/binutils/bfd/coffgen.c
index dfcf02a..b5ecbc9 100644
--- a/contrib/binutils/bfd/coffgen.c
+++ b/contrib/binutils/bfd/coffgen.c
@@ -1,5 +1,6 @@
/* Support for the generic parts of COFF, for BFD.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -62,7 +63,7 @@ static const bfd_target *coff_real_object_p
PARAMS ((bfd *, unsigned, struct internal_filehdr *,
struct internal_aouthdr *));
static void fixup_symbol_value
- PARAMS ((coff_symbol_type *, struct internal_syment *));
+ PARAMS ((bfd *, coff_symbol_type *, struct internal_syment *));
static char *build_debug_section
PARAMS ((bfd *));
static char *copy_name
@@ -283,18 +284,14 @@ coff_object_p (abfd)
opthdr = bfd_alloc (abfd, aoutsz);
if (opthdr == NULL)
return 0;;
- if (bfd_read (opthdr, 1, aoutsz, abfd) != aoutsz)
+ if (bfd_read (opthdr, 1, internal_f.f_opthdr, abfd)
+ != internal_f.f_opthdr)
{
return 0;
}
- bfd_coff_swap_aouthdr_in (abfd, opthdr, (PTR) & internal_a);
+ bfd_coff_swap_aouthdr_in (abfd, opthdr, (PTR) &internal_a);
}
- /* Seek past the opt hdr stuff */
- if (bfd_seek (abfd, (file_ptr) (internal_f.f_opthdr + filhsz), SEEK_SET)
- != 0)
- return NULL;
-
return coff_real_object_p (abfd, nscns, &internal_f,
(internal_f.f_opthdr != 0
? &internal_a
@@ -575,7 +572,8 @@ coff_symbol_from (ignore_abfd, symbol)
}
static void
-fixup_symbol_value (coff_symbol_ptr, syment)
+fixup_symbol_value (abfd, coff_symbol_ptr, syment)
+ bfd *abfd;
coff_symbol_type *coff_symbol_ptr;
struct internal_syment *syment;
{
@@ -603,10 +601,11 @@ fixup_symbol_value (coff_symbol_ptr, syment)
syment->n_scnum =
coff_symbol_ptr->symbol.section->output_section->target_index;
- syment->n_value =
- coff_symbol_ptr->symbol.value +
- coff_symbol_ptr->symbol.section->output_offset +
- coff_symbol_ptr->symbol.section->output_section->vma;
+ syment->n_value = (coff_symbol_ptr->symbol.value
+ + coff_symbol_ptr->symbol.section->output_offset);
+ if (! obj_pe (abfd))
+ syment->n_value +=
+ coff_symbol_ptr->symbol.section->output_section->vma;
}
else
{
@@ -702,7 +701,7 @@ coff_renumber_symbols (bfd_ptr, first_undef)
/* Modify the symbol values according to their section and
type */
- fixup_symbol_value (coff_symbol_ptr, &(s->u.syment));
+ fixup_symbol_value (bfd_ptr, coff_symbol_ptr, &(s->u.syment));
}
for (i = 0; i < s->u.syment.n_numaux + 1; i++)
s[i].offset = native_index++;
@@ -1017,8 +1016,9 @@ coff_write_alien_symbol (abfd, symbol, written, string_size_p,
native->u.syment.n_scnum =
symbol->section->output_section->target_index;
native->u.syment.n_value = (symbol->value
- + symbol->section->output_section->vma
+ symbol->section->output_offset);
+ if (! obj_pe (abfd))
+ native->u.syment.n_value += symbol->section->output_section->vma;
/* Copy the any flags from the the file header into the symbol.
FIXME: Why? */
@@ -1417,8 +1417,8 @@ coff_pointerize_aux (abfd, table_base, symbol, indaux, auxent)
unsigned int indaux;
combined_entry_type *auxent;
{
- int type = symbol->u.syment.n_type;
- int class = symbol->u.syment.n_sclass;
+ unsigned int type = symbol->u.syment.n_type;
+ unsigned int class = symbol->u.syment.n_sclass;
if (coff_backend_info (abfd)->_bfd_coff_pointerize_aux_hook)
{
@@ -2146,6 +2146,9 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
/* Find the first C_FILE symbol. */
p = cof->raw_syments;
+ if (!p)
+ return false;
+
pend = p + cof->raw_syment_count;
while (p < pend)
{
@@ -2156,9 +2159,11 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
if (p < pend)
{
+ bfd_vma sec_vma;
bfd_vma maxdiff;
/* Look through the C_FILE symbols to find the best one. */
+ sec_vma = bfd_get_section_vma (abfd, section);
*filename_ptr = (char *) p->u.syment._n._n_n._n_offset;
maxdiff = (bfd_vma) 0 - (bfd_vma) 1;
while (1)
@@ -2182,11 +2187,11 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
}
if (p2 < pend
- && offset >= (bfd_vma) p2->u.syment.n_value
- && offset - (bfd_vma) p2->u.syment.n_value < maxdiff)
+ && offset + sec_vma >= (bfd_vma) p2->u.syment.n_value
+ && offset + sec_vma - (bfd_vma) p2->u.syment.n_value < maxdiff)
{
*filename_ptr = (char *) p->u.syment._n._n_n._n_offset;
- maxdiff = offset - p2->u.syment.n_value;
+ maxdiff = offset + sec_vma - p2->u.syment.n_value;
}
/* Avoid endless loops on erroneous files by ensuring that
@@ -2253,7 +2258,7 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
}
else
{
- if (l->u.offset + bfd_get_section_vma (abfd, section) > offset)
+ if (l->u.offset > offset)
break;
*line_ptr = l->line_number + line_base - 1;
}
diff --git a/contrib/binutils/bfd/cofflink.c b/contrib/binutils/bfd/cofflink.c
index f824158..7b2b830 100644
--- a/contrib/binutils/bfd/cofflink.c
+++ b/contrib/binutils/bfd/cofflink.c
@@ -38,6 +38,7 @@ static char *dores_com PARAMS ((char *, bfd *, int));
static char *get_name PARAMS ((char *, char **));
static int process_embedded_commands
PARAMS ((bfd *, struct bfd_link_info *, bfd *));
+static void mark_relocs PARAMS ((struct coff_final_link_info *, bfd *));
/* Create an entry in a COFF linker hash table. */
@@ -243,6 +244,9 @@ coff_link_check_ar_symbols (abfd, info, pneeded)
bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &sym);
if ((sym.n_sclass == C_EXT
+#ifdef C_SYSTEM
+ || sym.n_sclass == C_SYSTEM
+#endif
|| (sym_is_global && (*sym_is_global) (abfd, &sym)))
&& (sym.n_scnum != 0 || sym.n_value != 0))
{
@@ -333,6 +337,9 @@ coff_link_add_symbols (abfd, info)
bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &sym);
if (sym.n_sclass == C_EXT
+#ifdef C_SYSTEM
+ || sym.n_sclass == C_SYSTEM
+#endif
|| (sym_is_global && (*sym_is_global) (abfd, &sym)))
{
const char *name;
@@ -373,7 +380,8 @@ coff_link_add_symbols (abfd, info)
{
flags = BSF_EXPORT | BSF_GLOBAL;
section = coff_section_from_bfd_index (abfd, sym.n_scnum);
- value -= section->vma;
+ if (! obj_pe (abfd))
+ value -= section->vma;
}
if (! (bfd_coff_link_add_one_symbol
@@ -530,6 +538,7 @@ _bfd_coff_final_link (abfd, info)
finfo.contents = NULL;
finfo.external_relocs = NULL;
finfo.internal_relocs = NULL;
+ finfo.global_to_static = false;
debug_merge_allocated = false;
coff_data (abfd)->link_info = info;
@@ -759,7 +768,7 @@ _bfd_coff_final_link (abfd, info)
== bfd_target_coff_flavour))
{
sub = p->u.indirect.section->owner;
- if (! sub->output_has_begun)
+ if (! bfd_coff_link_output_has_begun (sub))
{
if (! _bfd_coff_link_input_bfd (&finfo, sub))
goto error_return;
@@ -780,6 +789,9 @@ _bfd_coff_final_link (abfd, info)
}
}
+ if (! bfd_coff_final_link_postscript (abfd, & finfo))
+ goto error_return;
+
/* Free up the buffers used by _bfd_coff_link_input_bfd. */
coff_debug_merge_hash_table_free (&finfo.debug_merge);
@@ -838,6 +850,18 @@ _bfd_coff_final_link (abfd, info)
return false;
}
+ /* If doing task linking (ld --task-link) then make a pass through the
+ global symbols, writing out any that are defined, and making them
+ static. */
+ if (info->task_link)
+ {
+ finfo.failed = false;
+ coff_link_hash_traverse (coff_hash_table (info), _bfd_coff_write_task_globals,
+ (PTR) &finfo);
+ if (finfo.failed)
+ goto error_return;
+ }
+
/* Write out the global symbols. */
finfo.failed = false;
coff_link_hash_traverse (coff_hash_table (info), _bfd_coff_write_global_sym,
@@ -1117,6 +1141,60 @@ process_embedded_commands (output_bfd, info, abfd)
return 1;
}
+/* Place a marker against all symbols which are used by relocations.
+ This marker can be picked up by the 'do we skip this symbol ?'
+ loop in _bfd_coff_link_input_bfd() and used to prevent skipping
+ that symbol.
+ */
+
+static void
+mark_relocs (finfo, input_bfd)
+ struct coff_final_link_info * finfo;
+ bfd * input_bfd;
+{
+ asection * a;
+
+ if ((bfd_get_file_flags (input_bfd) & HAS_SYMS) == 0)
+ return;
+
+ for (a = input_bfd->sections; a != (asection *) NULL; a = a->next)
+ {
+ struct internal_reloc * internal_relocs;
+ struct internal_reloc * irel;
+ struct internal_reloc * irelend;
+
+
+ if ((a->flags & SEC_RELOC) == 0 || a->reloc_count < 1)
+ continue;
+
+ /* Read in the relocs. */
+ internal_relocs = _bfd_coff_read_internal_relocs
+ (input_bfd, a, false,
+ finfo->external_relocs,
+ finfo->info->relocateable,
+ (finfo->info->relocateable
+ ? (finfo->section_info[ a->output_section->target_index ].relocs + a->output_section->reloc_count)
+ : finfo->internal_relocs)
+ );
+
+ if (internal_relocs == NULL)
+ continue;
+
+ irel = internal_relocs;
+ irelend = irel + a->reloc_count;
+
+ /* Place a mark in the sym_indices array (whose entries have
+ been initialised to 0) for all of the symbols that are used
+ in the relocation table. This will then be picked up in the
+ skip/don't pass */
+
+ for (; irel < irelend; irel++)
+ {
+ finfo->sym_indices[ irel->r_symndx ] = -1;
+ }
+ }
+}
+
/* Link an input file into the linker output file. This function
handles all the sections and relocations of the input file at once. */
@@ -1190,11 +1268,25 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
return false;
}
+ /* If we are going to perform relocations and also strip/discard some symbols
+ then we must make sure that we do not strip/discard those symbols that are
+ going to be involved in the relocations */
+ if (( finfo->info->strip != strip_none
+ || finfo->info->discard != discard_none)
+ && finfo->info->relocateable)
+ {
+ /* mark the symbol array as 'not-used' */
+ memset (indexp, 0, obj_raw_syment_count (input_bfd) * sizeof * indexp);
+
+ mark_relocs (finfo, input_bfd);
+ }
+
while (esym < esym_end)
{
struct internal_syment isym;
boolean skip;
boolean global;
+ boolean dont_skip_symbol;
int add;
bfd_coff_swap_sym_in (input_bfd, (PTR) esym, (PTR) isymp);
@@ -1215,6 +1307,15 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
*secpp = bfd_com_section_ptr;
}
+ /* Extract the flag indicating if this symbol is used by a
+ relocation. */
+ if ((finfo->info->strip != strip_none
+ || finfo->info->discard != discard_none)
+ && finfo->info->relocateable)
+ dont_skip_symbol = *indexp;
+ else
+ dont_skip_symbol = false;
+
*indexp = -1;
skip = false;
@@ -1222,12 +1323,15 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
add = 1 + isym.n_numaux;
/* If we are stripping all symbols, we want to skip this one. */
- if (finfo->info->strip == strip_all)
+ if (finfo->info->strip == strip_all && ! dont_skip_symbol)
skip = true;
if (! skip)
{
if (isym.n_sclass == C_EXT
+#ifdef C_SYSTEM
+ || isym.n_sclass == C_SYSTEM
+#endif
|| (sym_is_global && (*sym_is_global) (input_bfd, &isym)))
{
/* This is a global symbol. Global symbols come at the
@@ -1242,16 +1346,29 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
{
/* This is a local symbol. Skip it if we are discarding
local symbols. */
- if (finfo->info->discard == discard_all)
+ if (finfo->info->discard == discard_all && ! dont_skip_symbol)
skip = true;
}
}
/* If we stripping debugging symbols, and this is a debugging
- symbol, then skip it. */
+ symbol, then skip it. FIXME: gas sets the section to N_ABS
+ for some types of debugging symbols; I don't know if this is
+ a bug or not. In any case, we handle it here. */
if (! skip
&& finfo->info->strip == strip_debugger
- && isym.n_scnum == N_DEBUG)
+ && ! dont_skip_symbol
+ && (isym.n_scnum == N_DEBUG
+ || (isym.n_scnum == N_ABS
+ && (isym.n_sclass == C_AUTO
+ || isym.n_sclass == C_REG
+ || isym.n_sclass == C_MOS
+ || isym.n_sclass == C_MOE
+ || isym.n_sclass == C_MOU
+ || isym.n_sclass == C_ARG
+ || isym.n_sclass == C_REGPARM
+ || isym.n_sclass == C_FIELD
+ || isym.n_sclass == C_EOS))))
skip = true;
/* If some symbols are stripped based on the name, work out the
@@ -1267,12 +1384,13 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
if (name == NULL)
return false;
- if ((finfo->info->strip == strip_some
- && (bfd_hash_lookup (finfo->info->keep_hash, name, false,
+ if (! dont_skip_symbol
+ && ((finfo->info->strip == strip_some
+ && (bfd_hash_lookup (finfo->info->keep_hash, name, false,
false) == NULL))
- || (! global
- && finfo->info->discard == discard_l
- && bfd_is_local_label_name (input_bfd, name)))
+ || (! global
+ && finfo->info->discard == discard_l
+ && bfd_is_local_label_name (input_bfd, name))))
skip = true;
}
@@ -1472,9 +1590,11 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
if (isym.n_scnum > 0)
{
isym.n_scnum = (*secpp)->output_section->target_index;
- isym.n_value += ((*secpp)->output_section->vma
- + (*secpp)->output_offset
- - (*secpp)->vma);
+ isym.n_value += (*secpp)->output_offset;
+ if (! obj_pe (input_bfd))
+ isym.n_value -= (*secpp)->vma;
+ if (! obj_pe (finfo->output_bfd))
+ isym.n_value += (*secpp)->output_section->vma;
}
/* The value of a C_FILE symbol is the symbol index of the
@@ -1525,6 +1645,12 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
finfo->last_file = isym;
}
+ /* If doing task linking, convert normal global function symbols to
+ static functions. */
+
+ if (finfo->info->task_link && isym.n_sclass == C_EXT)
+ isym.n_sclass = C_STAT;
+
/* Output the symbol. */
bfd_coff_swap_sym_out (output_bfd, (PTR) &isym, (PTR) outsym);
@@ -2066,9 +2192,10 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
char buf[SYMNMLEN + 1];
/* This reloc is against a symbol we are
- stripping. It would be possible to
- handle this case, but I don't think it's
- worth it. */
+ stripping. This should have been handled
+ by the 'dont_skip_symbol' code in the while
+ loop at the top of this function. */
+
is = finfo->internal_syms + irel->r_symndx;
name = (_bfd_coff_internal_syment_name
@@ -2166,8 +2293,9 @@ _bfd_coff_write_global_sym (h, data)
else
isym.n_scnum = sec->target_index;
isym.n_value = (h->root.u.def.value
- + sec->vma
+ h->root.u.def.section->output_offset);
+ if (! obj_pe (finfo->output_bfd))
+ isym.n_value += sec->vma;
}
break;
@@ -2209,6 +2337,18 @@ _bfd_coff_write_global_sym (h, data)
if (isym.n_sclass == C_NULL)
isym.n_sclass = C_EXT;
+ /* If doing task linking and this is the pass where we convert defined globals to
+ statics, then do that conversion now. If the symbol is not being converted,
+ just ignore it and it will be output during a later pass. */
+ if (finfo->global_to_static)
+ {
+ if (isym.n_sclass != C_EXT)
+ {
+ return true;
+ }
+ isym.n_sclass = C_STAT;
+ }
+
isym.n_numaux = h->numaux;
bfd_coff_swap_sym_out (output_bfd, (PTR) &isym, (PTR) finfo->outsyms);
@@ -2247,6 +2387,37 @@ _bfd_coff_write_global_sym (h, data)
return true;
}
+/* Write out task global symbols, converting them to statics. Called
+ via coff_link_hash_traverse. Calls bfd_coff_write_global_sym to do
+ the dirty work, if the symbol we are processing needs conversion. */
+
+boolean
+_bfd_coff_write_task_globals (h, data)
+ struct coff_link_hash_entry *h;
+ PTR data;
+{
+ struct coff_final_link_info *finfo = (struct coff_final_link_info *) data;
+ boolean rtnval = true;
+ boolean save_global_to_static;
+
+ if (h->indx < 0)
+ {
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ save_global_to_static = finfo->global_to_static;
+ finfo->global_to_static = true;
+ rtnval = _bfd_coff_write_global_sym (h, data);
+ finfo->global_to_static = save_global_to_static;
+ break;
+ default:
+ break;
+ }
+ }
+ return (rtnval);
+}
+
/* Handle a link order which is supposed to generate a reloc. */
boolean
@@ -2465,8 +2636,9 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
sec = sections[symndx];
val = (sec->output_section->vma
+ sec->output_offset
- + sym->n_value
- - sec->vma);
+ + sym->n_value);
+ if (! obj_pe (input_bfd))
+ val -= sec->vma;
}
}
else
@@ -2494,19 +2666,26 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
if (info->base_file)
{
/* Emit a reloc if the backend thinks it needs it. */
- if (sym && pe_data(output_bfd)->in_reloc_p(output_bfd, howto))
+ if (sym && pe_data (output_bfd)->in_reloc_p (output_bfd, howto))
{
- /* relocation to a symbol in a section which
- isn't absolute - we output the address here
- to a file */
- bfd_vma addr = rel->r_vaddr
- - input_section->vma
- + input_section->output_offset
- + input_section->output_section->vma;
- if (coff_data(output_bfd)->pe)
+ /* Relocation to a symbol in a section which isn't
+ absolute. We output the address here to a file.
+ This file is then read by dlltool when generating the
+ reloc section. Note that the base file is not
+ portable between systems. We write out a long here,
+ and dlltool reads in a long. */
+ long addr = (rel->r_vaddr
+ - input_section->vma
+ + input_section->output_offset
+ + input_section->output_section->vma);
+ if (coff_data (output_bfd)->pe)
addr -= pe_data(output_bfd)->pe_opthdr.ImageBase;
- /* FIXME: Shouldn't 4 be sizeof (addr)? */
- fwrite (&addr, 1,4, (FILE *) info->base_file);
+ if (fwrite (&addr, 1, sizeof (long), (FILE *) info->base_file)
+ != sizeof (long))
+ {
+ bfd_set_error (bfd_error_system_call);
+ return false;
+ }
}
}
diff --git a/contrib/binutils/bfd/coffswap.h b/contrib/binutils/bfd/coffswap.h
index 616bdcf..ff76e9e 100644
--- a/contrib/binutils/bfd/coffswap.h
+++ b/contrib/binutils/bfd/coffswap.h
@@ -1,5 +1,5 @@
/* Generic COFF swapping routines, for BFD.
- Copyright 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -168,6 +168,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef PUT_SCNHDR_LNNOPTR
#define PUT_SCNHDR_LNNOPTR bfd_h_put_32
#endif
+#ifndef GET_SCNHDR_NRELOC
+#define GET_SCNHDR_NRELOC bfd_h_get_16
+#endif
+#ifndef PUT_SCNHDR_NRELOC
+#define PUT_SCNHDR_NRELOC bfd_h_put_16
+#endif
+#ifndef GET_SCNHDR_NLNNO
+#define GET_SCNHDR_NLNNO bfd_h_get_16
+#endif
+#ifndef PUT_SCNHDR_NLNNO
+#define PUT_SCNHDR_NLNNO bfd_h_put_16
+#endif
+#ifndef GET_SCNHDR_FLAGS
+#define GET_SCNHDR_FLAGS bfd_h_get_32
+#endif
+#ifndef PUT_SCNHDR_FLAGS
+#define PUT_SCNHDR_FLAGS bfd_h_put_32
+#endif
+
static void coff_swap_aouthdr_in PARAMS ((bfd *, PTR, PTR));
static unsigned int coff_swap_aouthdr_out PARAMS ((bfd *, PTR, PTR));
@@ -258,6 +277,9 @@ coff_swap_filehdr_in (abfd, src, dst)
{
FILHDR *filehdr_src = (FILHDR *) src;
struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
+#ifdef COFF_ADJUST_FILEHDR_IN_PRE
+ COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
+#endif
filehdr_dst->f_magic = bfd_h_get_16(abfd, (bfd_byte *) filehdr_src->f_magic);
filehdr_dst->f_nscns = bfd_h_get_16(abfd, (bfd_byte *)filehdr_src-> f_nscns);
filehdr_dst->f_timdat = bfd_h_get_32(abfd, (bfd_byte *)filehdr_src-> f_timdat);
@@ -266,6 +288,10 @@ coff_swap_filehdr_in (abfd, src, dst)
filehdr_dst->f_nsyms = bfd_h_get_32(abfd, (bfd_byte *)filehdr_src-> f_nsyms);
filehdr_dst->f_opthdr = bfd_h_get_16(abfd, (bfd_byte *)filehdr_src-> f_opthdr);
filehdr_dst->f_flags = bfd_h_get_16(abfd, (bfd_byte *)filehdr_src-> f_flags);
+
+#ifdef COFF_ADJUST_FILEHDR_IN_POST
+ COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
+#endif
}
static unsigned int
@@ -277,6 +303,9 @@ coff_swap_filehdr_out (abfd, in, out)
struct internal_filehdr *filehdr_in = (struct internal_filehdr *)in;
FILHDR *filehdr_out = (FILHDR *)out;
+#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
+ COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
+#endif
bfd_h_put_16(abfd, filehdr_in->f_magic, (bfd_byte *) filehdr_out->f_magic);
bfd_h_put_16(abfd, filehdr_in->f_nscns, (bfd_byte *) filehdr_out->f_nscns);
bfd_h_put_32(abfd, filehdr_in->f_timdat, (bfd_byte *) filehdr_out->f_timdat);
@@ -286,6 +315,9 @@ coff_swap_filehdr_out (abfd, in, out)
bfd_h_put_16(abfd, filehdr_in->f_opthdr, (bfd_byte *) filehdr_out->f_opthdr);
bfd_h_put_16(abfd, filehdr_in->f_flags, (bfd_byte *) filehdr_out->f_flags);
+#ifdef COFF_ADJUST_FILEHDR_OUT_POST
+ COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
+#endif
return FILHSZ;
}
@@ -371,6 +403,9 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
AUXENT *ext = (AUXENT *)ext1;
union internal_auxent *in = (union internal_auxent *)in1;
+#ifdef COFF_ADJUST_AUX_IN_PRE
+ COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, class, indx, numaux, in1);
+#endif
switch (class) {
case C_FILE:
if (ext->x_file.x_fname[0] == 0) {
@@ -384,7 +419,7 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
#endif
}
- return;
+ goto end;
/* RS/6000 "csect" auxents */
#ifdef RS6000COFF_C
@@ -403,7 +438,7 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
in->x_csect.x_smclas = bfd_h_get_8 (abfd, ext->x_csect.x_smclas);
in->x_csect.x_stab = bfd_h_get_32 (abfd, ext->x_csect.x_stab);
in->x_csect.x_snstab = bfd_h_get_16 (abfd, ext->x_csect.x_snstab);
- return;
+ goto end;
}
break;
#endif
@@ -424,7 +459,7 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
in->x_scn.x_associated = 0;
in->x_scn.x_comdat = 0;
- return;
+ goto end;
}
break;
}
@@ -461,6 +496,14 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO(abfd, ext);
in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE(abfd, ext);
}
+
+end: ;
+ /* the semicolon is because MSVC doesn't like labels at
+ end of block. */
+
+#ifdef COFF_ADJUST_AUX_IN_POST
+ COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, class, indx, numaux, in1);
+#endif
}
static unsigned int
@@ -476,6 +519,9 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
union internal_auxent *in = (union internal_auxent *)inp;
AUXENT *ext = (AUXENT *)extp;
+#ifdef COFF_ADJUST_AUX_OUT_PRE
+ COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, class, indx, numaux, extp);
+#endif
memset((PTR)ext, 0, AUXESZ);
switch (class) {
case C_FILE:
@@ -492,7 +538,7 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
#endif
}
- return AUXESZ;
+ goto end;
#ifdef RS6000COFF_C
/* RS/6000 "csect" auxents */
@@ -510,7 +556,7 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
PUTBYTE (abfd, in->x_csect.x_smclas, ext->x_csect.x_smclas);
PUTWORD (abfd, in->x_csect.x_stab, ext->x_csect.x_stab);
PUTHALF (abfd, in->x_csect.x_snstab, ext->x_csect.x_snstab);
- return AUXESZ;
+ goto end;
}
break;
#endif
@@ -524,7 +570,7 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
PUT_SCN_SCNLEN(abfd, in->x_scn.x_scnlen, ext);
PUT_SCN_NRELOC(abfd, in->x_scn.x_nreloc, ext);
PUT_SCN_NLINNO(abfd, in->x_scn.x_nlinno, ext);
- return AUXESZ;
+ goto end;
}
break;
}
@@ -563,6 +609,10 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
}
+end:
+#ifdef COFF_ADJUST_AUX_OUT_POST
+ COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, class, indx, numaux, extp);
+#endif
return AUXESZ;
}
@@ -743,6 +793,9 @@ coff_swap_scnhdr_in (abfd, ext, in)
SCNHDR *scnhdr_ext = (SCNHDR *) ext;
struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
+#ifdef COFF_ADJUST_SCNHDR_IN_PRE
+ COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
+#endif
memcpy(scnhdr_int->s_name, scnhdr_ext->s_name, sizeof(scnhdr_int->s_name));
scnhdr_int->s_vaddr =
GET_SCNHDR_VADDR (abfd, (bfd_byte *) scnhdr_ext->s_vaddr);
@@ -757,16 +810,18 @@ coff_swap_scnhdr_in (abfd, ext, in)
GET_SCNHDR_RELPTR (abfd, (bfd_byte *) scnhdr_ext->s_relptr);
scnhdr_int->s_lnnoptr =
GET_SCNHDR_LNNOPTR (abfd, (bfd_byte *) scnhdr_ext->s_lnnoptr);
- scnhdr_int->s_flags = bfd_h_get_32(abfd, (bfd_byte *) scnhdr_ext->s_flags);
-#if defined(M88)
- scnhdr_int->s_nreloc = bfd_h_get_32(abfd, (bfd_byte *) scnhdr_ext->s_nreloc);
- scnhdr_int->s_nlnno = bfd_h_get_32(abfd, (bfd_byte *) scnhdr_ext->s_nlnno);
-#else
- scnhdr_int->s_nreloc = bfd_h_get_16(abfd, (bfd_byte *) scnhdr_ext->s_nreloc);
- scnhdr_int->s_nlnno = bfd_h_get_16(abfd, (bfd_byte *) scnhdr_ext->s_nlnno);
-#endif
+ scnhdr_int->s_flags =
+ GET_SCNHDR_FLAGS (abfd, (bfd_byte *) scnhdr_ext->s_flags);
+ scnhdr_int->s_nreloc =
+ GET_SCNHDR_NRELOC (abfd, (bfd_byte *) scnhdr_ext->s_nreloc);
+ scnhdr_int->s_nlnno =
+ GET_SCNHDR_NLNNO (abfd, (bfd_byte *) scnhdr_ext->s_nlnno);
#ifdef I960
- scnhdr_int->s_align = bfd_h_get_32(abfd, (bfd_byte *) scnhdr_ext->s_align);
+ scnhdr_int->s_align =
+ GET_SCNHDR_ALIGN (abfd, (bfd_byte *) scnhdr_ext->s_align);
+#endif
+#ifdef COFF_ADJUST_SCNHDR_IN_POST
+ COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
#endif
}
@@ -780,6 +835,9 @@ coff_swap_scnhdr_out (abfd, in, out)
SCNHDR *scnhdr_ext = (SCNHDR *)out;
unsigned int ret = SCNHSZ;
+#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
+ COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
+#endif
memcpy(scnhdr_ext->s_name, scnhdr_int->s_name, sizeof(scnhdr_int->s_name));
PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr,
@@ -797,7 +855,8 @@ coff_swap_scnhdr_out (abfd, in, out)
(bfd_byte *) scnhdr_ext->s_relptr);
PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr,
(bfd_byte *) scnhdr_ext->s_lnnoptr);
- PUTWORD(abfd, scnhdr_int->s_flags, (bfd_byte *) scnhdr_ext->s_flags);
+ PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags,
+ (bfd_byte *) scnhdr_ext->s_flags);
#if defined(M88)
PUTWORD(abfd, scnhdr_int->s_nlnno, (bfd_byte *) scnhdr_ext->s_nlnno);
PUTWORD(abfd, scnhdr_int->s_nreloc, (bfd_byte *) scnhdr_ext->s_nreloc);
@@ -833,8 +892,11 @@ coff_swap_scnhdr_out (abfd, in, out)
}
#endif
-#if defined(I960)
- PUTWORD(abfd, scnhdr_int->s_align, (bfd_byte *) scnhdr_ext->s_align);
+#ifdef I960
+ PUT_SCNHDR_ALIGN (abfd, scnhdr_int->s_align, (bfd_byte *) scnhdr_ext->s_align);
+#endif
+#ifdef COFF_ADJUST_SCNHDR_OUT_POST
+ COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
#endif
return ret;
}
diff --git a/contrib/binutils/bfd/config.bfd b/contrib/binutils/bfd/config.bfd
index 477c9b3..589bb8f 100755
--- a/contrib/binutils/bfd/config.bfd
+++ b/contrib/binutils/bfd/config.bfd
@@ -28,7 +28,10 @@ targ_underscore=no
targ_cpu=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
case "${targ_cpu}" in
+alpha*) targ_archs=bfd_alpha_arch ;;
arm*) targ_archs=bfd_arm_arch ;;
+c30*) targ_archs=bfd_tic30_arch ;;
+thumb*) targ_archs=bfd_arm_arch ;;
hppa*) targ_archs=bfd_hppa_arch ;;
i[3456]86) targ_archs=bfd_i386_arch ;;
m68*) targ_archs=bfd_m68k_arch ;;
@@ -37,10 +40,12 @@ mips*) targ_archs=bfd_mips_arch ;;
powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
sparc*) targ_archs=bfd_sparc_arch ;;
+v850*) targ_archs=bfd_v850_arch ;;
z8k*) targ_archs=bfd_z8k_arch ;;
*) targ_archs=bfd_${targ_cpu}_arch ;;
esac
+
# WHEN ADDING ENTRIES TO THIS MATRIX:
# Make sure that the left side always has two dashes. Otherwise you
# can get spurious matches. Even for unambiguous cases, do this as a
@@ -49,26 +54,35 @@ esac
case "${targ}" in
# START OF targmatch.h
#ifdef BFD64
- alpha-*-netware*)
+ alpha*-*-netbsd*)
+ targ_defvec=bfd_elf64_alpha_vec
+ targ_selvecs=ecoffalpha_little_vec
+ ;;
+ alpha*-*-netware*)
targ_defvec=ecoffalpha_little_vec
targ_selvecs=nlm32_alpha_vec
;;
- alpha-*-linuxecoff*)
+ alpha*-*-linuxecoff*)
targ_defvec=ecoffalpha_little_vec
targ_selvecs=bfd_elf64_alpha_vec
;;
- alpha-*-linux* | alpha-*-elf*)
+ alpha*-*-linux-gnu* | alpha*-*-elf*)
targ_defvec=bfd_elf64_alpha_vec
targ_selvecs=ecoffalpha_little_vec
;;
- alpha-*-*vms*)
+ alpha*-*-*vms*)
targ_defvec=evax_alpha_vec
;;
- alpha-*-*)
+ alpha*-*-*)
targ_defvec=ecoffalpha_little_vec
;;
#endif /* BFD64 */
+ arc-*-elf*)
+ targ_defvec=bfd_elf32_littlearc_vec
+ targ_selvecs=bfd_elf32_bigarc_vec
+ ;;
+
arm-*-riscix*)
targ_defvec=riscix_vec
;;
@@ -90,7 +104,16 @@ case "${targ}" in
targ_selvecs=armcoff_big_vec
targ_underscore=yes
;;
-
+ thumb-*-coff)
+ targ_defvec=armcoff_little_vec
+ targ_selvecs=armcoff_big_vec
+ targ_underscore=yes
+ ;;
+ thumb-*-pe*)
+ targ_defvec=armpe_little_vec
+ targ_selvecs="armpe_little_vec armpe_big_vec armpei_little_vec armpei_big_vec"
+ targ_underscore=yes
+ ;;
a29k-*-ebmon* | a29k-*-udi* | a29k-*-coff* | a29k-*-sym1* | \
a29k-*-vxworks* | a29k-*-sysv*)
targ_defvec=a29kcoff_big_vec
@@ -102,11 +125,19 @@ case "${targ}" in
targ_underscore=yes
;;
+ c30-*-*aout* | tic30-*-*aout*)
+ targ_defvec=tic30_aout_vec
+ ;;
+ c30-*-*coff* | tic30-*-*coff*)
+ targ_defvec=tic30_coff_vec
+ ;;
+
d10v-*-*)
targ_defvec=bfd_elf32_d10v_vec
;;
+
h8300*-*-*)
targ_defvec=h8300coff_vec
targ_underscore=yes
@@ -134,14 +165,21 @@ case "${targ}" in
;;
#endif /* defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF) */
+ i[3456]86-*-sco3.2v5*coff)
+ targ_defvec=i386coff_vec
+ ;;
i[3456]86-*-sysv4* | i[3456]86-*-unixware | i[3456]86-*-solaris2* | \
- i[3456]86-*-elf | i[3456]86-*-sco*elf* | i[3456]86-*-freebsdelf* | \
+ i[3456]86-*-elf | i[3456]86-*-sco3.2v5* | i[3456]86-*-freebsdelf* | \
i[3456]86-*-dgux*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386coff_vec
;;
+ i[3456]86-*-msdosdjgpp* | i[3456]*-*-go32* | i[3456]86-go32-rtems* )
+ targ_defvec=go32coff_vec
+ targ_selvecs="go32stubbedcoff_vec i386aout_vec"
+ ;;
i[3456]86-*-sysv* | i[3456]86-*-isc* | i[3456]86-*-sco* | i[3456]86-*-coff | \
- i[3456]86-*-aix* | i[3456]86-*-go32* | i[3456]86*-*-rtems*)
+ i[3456]86-*-aix* | i[3456]86*-*-rtems*)
targ_defvec=i386coff_vec
;;
i[3456]86-sequent-bsd*)
@@ -171,7 +209,7 @@ case "${targ}" in
targ_selvecs=bfd_elf32_i386_vec
targ_underscore=yes
;;
- i[3456]86-*-linux*)
+ i[3456]86-*-linux-gnu*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386linux_vec
;;
@@ -181,8 +219,6 @@ case "${targ}" in
;;
i[3456]86-*-gnu*)
targ_defvec=bfd_elf32_i386_vec
- targ_selvecs=i386mach3_vec
- targ_cflags=-DSTAT_FOR_EXEC
;;
i[3456]86-*-mach* | i[3456]86-*-osf1mk*)
targ_defvec=i386mach3_vec
@@ -200,7 +236,7 @@ case "${targ}" in
targ_defvec=bfd_elf32_i386_vec
targ_selvecs="i386msdos_vec i386aout_vec"
;;
- i[3456]86-*-cygwin32 | i[3456]86-*-winnt | i[3456]86-*-pe)
+ i[3456]86-*-mingw32* | i[3456]86-*-cygwin32* | i[3456]86-*-winnt | i[3456]86-*-pe)
targ_defvec=i386pe_vec
targ_selvecs="i386pe_vec i386pei_vec"
;;
@@ -277,7 +313,7 @@ case "${targ}" in
targ_selvecs=bfd_elf32_m68k_vec
targ_underscore=yes
;;
- m68*-*-linux*)
+ m68*-*-linux-gnu*)
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs=m68klinux_vec
;;
@@ -335,9 +371,13 @@ case "${targ}" in
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
;;
- mips-dec-netbsd*)
+ mips-dec-netbsd* | mips*el*-*-netbsd*)
targ_defvec=bfd_elf32_littlemips_vec
- targ_selvecs=bfd_elf32_bigmips_vec
+ targ_selvecs="bfd_elf32_bigmips_vec ecoff_little_vec ecoff_big_vec"
+ ;;
+ mips*-*-netbsd*)
+ targ_defvec=bfd_elf32_bigmips_vec
+ targ_selvecs="bfd_elf32_littlemips_vec ecoff_big_vec ecoff_little_vec"
;;
mips*-dec-bsd*)
targ_defvec=aout_mips_little_vec
@@ -395,11 +435,11 @@ case "${targ}" in
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
;;
- mips*el*-*-linux* | mips*el*-*-openbsd*)
+ mips*el*-*-linux-gnu* | mips*el*-*-openbsd*)
targ_defvec=bfd_elf32_littlemips_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec"
;;
- mips*-*-linux* | mips*-*-openbsd*)
+ mips*-*-linux-gnu* | mips*-*-openbsd*)
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec"
;;
@@ -425,7 +465,7 @@ case "${targ}" in
targ_defvec=rs6000coff_vec
;;
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
- powerpc-*-solaris2* | powerpc-*-linux* | powerpc-*-rtems*)
+ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems*)
targ_defvec=bfd_elf32_powerpc_vec
targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec ppcboot_vec"
;;
@@ -437,12 +477,12 @@ case "${targ}" in
targ_selvecs="nlm32_powerpc_vec rs6000coff_vec"
;;
powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
- powerpcle-*-solaris2* | powerpcle-*-linux*)
+ powerpcle-*-solaris2* | powerpcle-*-linux-gnu*)
targ_defvec=bfd_elf32_powerpcle_vec
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec ppcboot_vec"
;;
- powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin32)
+ powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin32*)
targ_defvec=bfd_powerpcle_pe_vec
targ_selvecs="bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec"
;;
@@ -453,12 +493,12 @@ case "${targ}" in
sh-*-elf*)
targ_defvec=bfd_elf32_sh_vec
- targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec"
+ targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
targ_underscore=yes
;;
- sh-*-*)
+ sh-*-* | sh-*-rtems*)
targ_defvec=shcoff_vec
- targ_selvecs="shcoff_vec shlcoff_vec"
+ targ_selvecs="shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
targ_underscore=yes
;;
@@ -467,12 +507,15 @@ case "${targ}" in
targ_selvecs=sparcle_aout_vec
targ_underscore=yes
;;
+ sparclite-*-elf*)
+ targ_defvec=bfd_elf32_sparc_vec
+ ;;
sparc-*-linux*aout*)
targ_defvec=sparclinux_vec
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
targ_underscore=yes
;;
- sparc-*-linux*)
+ sparc-*-linux-gnu*)
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs="sparclinux_vec sunos_big_vec"
;;
@@ -491,20 +534,24 @@ case "${targ}" in
sparc-*-sysv4*)
targ_defvec=bfd_elf32_sparc_vec
;;
+ sparc-*-netware*)
+ targ_defvec=bfd_elf32_sparc_vec
+ targ_selvecs="nlm32_sparc_vec sunos_big_vec"
+ ;;
+#ifdef BFD64
sparc64-*-aout*)
targ_defvec=sunos_big_vec
targ_underscore=yes
;;
-#ifdef BFD64
+ sparc64-*-linux-gnu*)
+ targ_defvec=bfd_elf64_sparc_vec
+ targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
+ ;;
sparc64-*-elf*)
targ_defvec=bfd_elf64_sparc_vec
targ_selvecs=bfd_elf32_sparc_vec
;;
#endif /* BFD64 */
- sparc-*-netware*)
- targ_defvec=bfd_elf32_sparc_vec
- targ_selvecs="nlm32_sparc_vec sunos_big_vec"
- ;;
sparc*-*-coff*)
targ_defvec=sparccoff_vec
;;
@@ -520,6 +567,9 @@ case "${targ}" in
;;
#endif
+ v850-*-*)
+ targ_defvec=bfd_elf32_v850_vec
+ ;;
#if HAVE_host_aout_vec
vax-*-bsd* | vax-*-ultrix*)
targ_defvec=host_aout_vec
diff --git a/contrib/binutils/bfd/config.in b/contrib/binutils/bfd/config.in
index 183c23e..8df4887 100644
--- a/contrib/binutils/bfd/config.in
+++ b/contrib/binutils/bfd/config.in
@@ -1,5 +1,11 @@
/* config.in. Generated automatically from configure.in by autoheader. */
+/* Name of package. */
+#undef PACKAGE
+
+/* Version of package. */
+#undef VERSION
+
/* Whether strstr must be declared even if <string.h> is included. */
#undef NEED_DECLARATION_STRSTR
@@ -39,6 +45,9 @@
/* Define if you have the fcntl function. */
#undef HAVE_FCNTL
+/* Define if you have the fdopen function. */
+#undef HAVE_FDOPEN
+
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
diff --git a/contrib/binutils/bfd/configure b/contrib/binutils/bfd/configure
index 5e1e301..a0643a7 100755
--- a/contrib/binutils/bfd/configure
+++ b/contrib/binutils/bfd/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12
+# Generated automatically using autoconf version 2.12.1
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -12,15 +12,26 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
+ --enable-shared build shared libraries [default=no]
+ --enable-shared=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list"
+ac_help="$ac_help
+ --enable-static build static libraries [default=yes]
+ --enable-static=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list"
+ac_help="$ac_help
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
+ac_help="$ac_help
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
ac_help="$ac_help
--enable-targets alternative target configurations"
ac_help="$ac_help
- --enable-shared build shared BFD library"
-ac_help="$ac_help
--enable-commonbfdlib build shared BFD/opcodes/libiberty library"
ac_help="$ac_help
--with-mmap try using mmap for BFD input files if available"
+ac_help="$ac_help
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -59,6 +70,7 @@ mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
@@ -342,7 +354,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12"
+ echo "configure generated by autoconf version 2.12.1"
exit 0 ;;
-with-* | --with-*)
@@ -529,62 +541,8 @@ fi
-# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
-if test "${enable_64_bit_bfd+set}" = set; then
- enableval="$enable_64_bit_bfd"
- case "${enableval}" in
- yes) want64=true ;;
- no) want64=false ;;
- *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
-esac
-else
- want64=false
-fi
-# Check whether --enable-targets or --disable-targets was given.
-if test "${enable_targets+set}" = set; then
- enableval="$enable_targets"
- case "${enableval}" in
- yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
- ;;
- no) enable_targets= ;;
- *) enable_targets=$enableval ;;
-esac
-fi
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- case "${enableval}" in
- yes) shared=true ;;
- no) shared=false ;;
- *bfd*) shared=true ;;
- *) shared=false ;;
-esac
-fi
-# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
-if test "${enable_commonbfdlib+set}" = set; then
- enableval="$enable_commonbfdlib"
- case "${enableval}" in
- yes) commonbfdlib=true ;;
- no) commonbfdlib=false ;;
- *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
-esac
-fi
-# Check whether --with-mmap or --without-mmap was given.
-if test "${with_mmap+set}" = set; then
- withval="$with_mmap"
- case "${withval}" in
- yes) want_mmap=true ;;
- no) want_mmap=false ;;
- *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
-esac
-else
- want_mmap=false
-fi
-
-
-
ac_aux_dir=
-for ac_dir in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`; do
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -596,7 +554,7 @@ for ac_dir in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`; do
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`" 1>&2; exit 1; }
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
@@ -625,33 +583,33 @@ esac
# Make sure we can run config.sub.
-if $ac_config_sub sun4 >/dev/null 2>&1; then :
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:634: checking host system type" >&5
+echo "configure:592: checking host system type" >&5
host_alias=$host
case "$host_alias" in
NONE)
case $nonopt in
NONE)
- if host_alias=`$ac_config_guess`; then :
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;;
*) host_alias=$nonopt ;;
esac ;;
esac
-host=`$ac_config_sub $host_alias`
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:655: checking target system type" >&5
+echo "configure:613: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -662,14 +620,14 @@ NONE)
esac ;;
esac
-target=`$ac_config_sub $target_alias`
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:673: checking build system type" >&5
+echo "configure:631: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -680,7 +638,7 @@ NONE)
esac ;;
esac
-build=`$ac_config_sub $build_alias`
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
@@ -691,53 +649,10 @@ test "$host_alias" != "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-if test -z "$target" ; then
- { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
-fi
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-
-host64=false
-target64=false
-
-# host stuff:
-
-ALLLIBS='$(TARGETLIB)'
-PICFLAG=
-SHLIB=unused-shlib
-SHLINK=unused-shlink
-if test "${shared}" = "true"; then
- PICFLAG=-fpic
- if test "${commonbfdlib}" = "true"; then
- ALLLIBS='$(TARGETLIB)'
- else
- ALLLIBS='$(TARGETLIB) $(SHLIB) $(SHLINK)'
- SHLIB=libbfd.so.`sed -e 's/[^0-9]*\([0-9.]*\).*/\1/' ${srcdir}/VERSION`
- SHLINK=libbfd.so
- fi
-fi
-
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:741: checking for $ac_word" >&5
+echo "configure:656: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -766,7 +681,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:770: checking for $ac_word" >&5
+echo "configure:685: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -814,7 +729,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:818: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:733: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -824,11 +739,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 828 "configure"
+#line 743 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -848,12 +763,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:852: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:767: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:857: checking whether we are using GNU C" >&5
+echo "configure:772: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -862,7 +777,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -877,7 +792,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:881: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:796: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -904,9 +819,8 @@ else
test "${CFLAGS+set}" = set || CFLAGS="-g"
fi
-
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:910: checking for POSIXized ISC" >&5
+echo "configure:824: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -927,8 +841,239 @@ else
fi
-# Permit host specific settings.
-. ${srcdir}/configure.host
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:857: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:911: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "$*" != "X $srcdir/configure conftestfile" \
+ && test "$*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+ fi
+
+ test "$2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:968: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=bfd
+
+VERSION=2.9.1
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+cat >> confdefs.h <<EOF
+#define PACKAGE "$PACKAGE"
+EOF
+
+cat >> confdefs.h <<EOF
+#define VERSION "$VERSION"
+EOF
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+echo "configure:1014: checking for working aclocal" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+ ACLOCAL=aclocal
+ echo "$ac_t""found" 1>&6
+else
+ ACLOCAL="$missing_dir/missing aclocal"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:1027: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+ AUTOCONF=autoconf
+ echo "$ac_t""found" 1>&6
+else
+ AUTOCONF="$missing_dir/missing autoconf"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:1040: checking for working automake" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+ AUTOMAKE=automake
+ echo "$ac_t""found" 1>&6
+else
+ AUTOMAKE="$missing_dir/missing automake"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:1053: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+ AUTOHEADER=autoheader
+ echo "$ac_t""found" 1>&6
+else
+ AUTOHEADER="$missing_dir/missing autoheader"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:1066: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+ MAKEINFO=makeinfo
+ echo "$ac_t""found" 1>&6
+else
+ MAKEINFO="$missing_dir/missing makeinfo"
+ echo "$ac_t""missing" 1>&6
+fi
+
if test $host != $build; then
@@ -940,7 +1085,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:944: checking for $ac_word" >&5
+echo "configure:1089: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -971,7 +1116,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:975: checking for $ac_word" >&5
+echo "configure:1120: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1002,7 +1147,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1006: checking for $ac_word" >&5
+echo "configure:1151: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1033,96 +1178,627 @@ else
fi
fi
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1048: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+ enableval="$enable_shared"
+ p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+else
+ enable_shared=no
+fi
+
+
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+ enableval="$enable_static"
+ p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+else
+ enable_static=yes
+fi
+
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1233: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- for ac_prog in ginstall installbsd scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- # OSF/1 installbsd also uses dspmsg, but is usable.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval="$with_gnu_ld"
+ test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
+echo "configure:1272: checking for ld used by GCC" >&5
+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
+ case "$ac_prog" in
+ # Accept absolute paths.
+ /* | [A-Za-z]:\\*)
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
+echo "configure:1290: checking for GNU ld" >&5
+else
+ echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+echo "configure:1293: checking for non-GNU ld" >&5
+fi
+if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog"; then
+ ac_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+ echo "$ac_t""$LD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
+
+echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
+echo "configure:1329: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ ac_cv_prog_gnu_ld=yes
+else
+ ac_cv_prog_gnu_ld=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+
+
+echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
+echo "configure:1345: checking for BSD-compatible nm" >&5
+if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$NM" in
+/* | [A-Za-z]:\\*)
+ ac_cv_path_NM="$NM" # Let the user override the test with a path.
+ ;;
+*)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -B"
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -p"
+ else
+ ac_cv_path_NM="$ac_dir/nm"
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+ ;;
+esac
+fi
+
+NM="$ac_cv_path_NM"
+echo "$ac_t""$NM" 1>&6
+
+
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:1382: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+ rm -f conftestdata
+ ac_cv_prog_LN_S="ln -s"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Check for any special flags to pass to ltconfig.
+libtool_flags=
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$silent" = yes && libtool_flags="$libtool_flags --silent"
+test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$host" in
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 1418 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
;;
esac
- done
- IFS="$ac_save_IFS"
+ fi
+ rm -rf conftest*
+ ;;
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ CFLAGS="$CFLAGS -belf"
+ ;;
+esac
+
+# Actually configure libtool. ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+
+
+# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
+if test "${enable_64_bit_bfd+set}" = set; then
+ enableval="$enable_64_bit_bfd"
+ case "${enableval}" in
+ yes) want64=true ;;
+ no) want64=false ;;
+ *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
+esac
+else
+ want64=false
fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
+# Check whether --enable-targets or --disable-targets was given.
+if test "${enable_targets+set}" = set; then
+ enableval="$enable_targets"
+ case "${enableval}" in
+ yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
+ ;;
+ no) enable_targets= ;;
+ *) enable_targets=$enableval ;;
+esac
+fi
+# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
+if test "${enable_commonbfdlib+set}" = set; then
+ enableval="$enable_commonbfdlib"
+ case "${enableval}" in
+ yes) commonbfdlib=true ;;
+ no) commonbfdlib=false ;;
+ *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
+esac
+fi
+# Check whether --with-mmap or --without-mmap was given.
+if test "${with_mmap+set}" = set; then
+ withval="$with_mmap"
+ case "${withval}" in
+ yes) want_mmap=true ;;
+ no) want_mmap=false ;;
+ *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
+esac
+else
+ want_mmap=false
+fi
+
+
+
+
+
+if test -z "$target" ; then
+ { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
+fi
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+
+echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
+echo "configure:1519: checking whether to enable maintainer-specific portions of Makefiles" >&5
+ # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+ enableval="$enable_maintainer_mode"
+ USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINT=
else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
+ MAINT='#M#'
fi
+
+
+echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
+echo "configure:1537: checking for Cygwin32 environment" >&5
+if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1542 "configure"
+#include "confdefs.h"
+
+int main() {
+return __CYGWIN32__;
+; return 0; }
+EOF
+if { (eval echo configure:1549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ am_cv_cygwin32=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_cygwin32=no
+fi
+rm -f conftest*
+rm -f conftest*
fi
-echo "$ac_t""$INSTALL" 1>&6
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+echo "$ac_t""$am_cv_cygwin32" 1>&6
+CYGWIN32=
+test "$am_cv_cygwin32" = yes && CYGWIN32=yes
+echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
+echo "configure:1566: checking for Mingw32 environment" >&5
+if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1571 "configure"
+#include "confdefs.h"
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:1578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ am_cv_mingw32=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_mingw32=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_mingw32" 1>&6
+MINGW32=
+test "$am_cv_mingw32" = yes && MINGW32=yes
-if test "${shared}" = "true"; then
- if test "${GCC}" != "yes" && test "${shared_non_gcc}" != "yes"; then
- echo "configure: warning: BFD --enable-shared only supported when using gcc" 1>&2
- shared=false
- ALLLIBS='$(TARGETLIB)'
- PICFLAG=
- SHLIB=unused-shlib
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:1597: checking for executable suffix" >&5
+if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
+am_cv_exeext=.exe
+else
+cat > am_c_test.c << 'EOF'
+int main() {
+/* Nothing needed here */
+}
+EOF
+${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
+am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
+rm -f am_c_test*
+fi
+
+test x"${am_cv_exeext}" = x && am_cv_exeext=no
+fi
+EXEEXT=""
+test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
+echo "$ac_t""${am_cv_exeext}" 1>&6
+
+
+host64=false
+target64=false
+
+# host stuff:
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1629: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1658: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ ac_prog_rejected=no
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
fi
fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1706: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+cat > conftest.$ac_ext <<EOF
+#line 1716 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+if { (eval echo configure:1720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1740: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1745: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-if test "${commonbfdlib}" = "true"; then
- COMMON_SHLIB=yes
- PICLIST=piclist
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=
+ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1769: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
else
- COMMON_SHLIB=
- PICLIST=
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
fi
+# Permit host specific settings.
+. ${srcdir}/configure.host
-VERSION=`cat ${srcdir}/VERSION`
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
BFD_HOST_64BIT_LONG=0
@@ -1150,9 +1826,34 @@ if test -z "$CC_FOR_BUILD"; then
fi
fi
+# Also set EXEEXT_FOR_BUILD.
+if test "x$cross_compiling" = "xno"; then
+ EXEEXT_FOR_BUILD='$(EXEEXT)'
+else
+ echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
+echo "configure:1835: checking for build system executable suffix" >&5
+if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > ac_c_test.c << 'EOF'
+int main() {
+/* Nothing needed here */
+}
+EOF
+ ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
+ bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
+ rm -f ac_c_test*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
+fi
+
+echo "$ac_t""$bfd_cv_build_exeext" 1>&6
+ EXEEXT_FOR_BUILD=""
+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
+fi
+
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1156: checking how to run the C preprocessor" >&5
+echo "configure:1857: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1167,13 +1868,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1171 "configure"
+#line 1872 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1184,13 +1885,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1188 "configure"
+#line 1889 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1216,17 +1917,17 @@ for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1220: checking for $ac_hdr" >&5
+echo "configure:1921: 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
-#line 1225 "configure"
+#line 1926 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1256,17 +1957,17 @@ for ac_hdr in fcntl.h sys/file.h sys/time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1260: checking for $ac_hdr" >&5
+echo "configure:1961: 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
-#line 1265 "configure"
+#line 1966 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1293,12 +1994,12 @@ fi
done
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1297: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1998: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1302 "configure"
+#line 2003 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -1307,7 +2008,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -1327,15 +2028,15 @@ EOF
fi
-for ac_func in fcntl getpagesize setitimer sysconf
+for ac_func in fcntl getpagesize setitimer sysconf fdopen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1334: checking for $ac_func" >&5
+echo "configure:2035: 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 <<EOF
-#line 1339 "configure"
+#line 2040 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1358,7 +2059,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1385,7 +2086,7 @@ done
case "${host}" in
-i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32 | *-*-windows)
+i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
cat >> confdefs.h <<\EOF
#define USE_BINARY_FOPEN 1
EOF
@@ -1393,12 +2094,12 @@ EOF
esac
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:1397: checking whether strstr must be declared" >&5
+echo "configure:2098: checking whether strstr must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1402 "configure"
+#line 2103 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -1419,7 +2120,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:1423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -1441,12 +2142,12 @@ EOF
fi
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:1445: checking whether malloc must be declared" >&5
+echo "configure:2146: checking whether malloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1450 "configure"
+#line 2151 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -1467,7 +2168,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:1471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -1489,12 +2190,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:1493: checking whether realloc must be declared" >&5
+echo "configure:2194: checking whether realloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1498 "configure"
+#line 2199 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -1515,7 +2216,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:1519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -1537,12 +2238,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:1541: checking whether free must be declared" >&5
+echo "configure:2242: checking whether free must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1546 "configure"
+#line 2247 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -1563,7 +2264,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:1567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -1585,12 +2286,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:1589: checking whether getenv must be declared" >&5
+echo "configure:2290: checking whether getenv must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1594 "configure"
+#line 2295 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -1611,7 +2312,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:1615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -1638,21 +2339,22 @@ COREFILE=
COREFLAG=
if test "${target}" = "${host}"; then
case "${host}" in
- alpha*-*-linux*)
- COREFILE=trad-core.o
+ alpha*-*-linux-gnu*)
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/alphalinux.h"
EOF
;;
- alpha*-*-*) COREFILE=osf-core.o ;;
- arm-*-riscix) COREFILE=trad-core.o ;;
- hppa*-*-hpux*) COREFILE=hpux-core.o ;;
- hppa*-*-hiux*) COREFILE=hpux-core.o ;;
- hppa*-*-bsd*) COREFILE="hpux-core.o hppabsd-core.o"
+ alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;;
+ alpha*-*-*) COREFILE=osf-core.lo ;;
+ arm-*-riscix) COREFILE=trad-core.lo ;;
+ hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
+ hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
+ hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
i[3456]86-sequent-bsd*)
- COREFILE=trad-core.o;
+ COREFILE=trad-core.lo;
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/symmetry.h"
EOF
@@ -1660,88 +2362,88 @@ EOF
;;
i[3456]86-sequent-sysv4*) ;;
i[3456]86-sequent-sysv*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/symmetry.h"
EOF
;;
i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/i386bsd.h"
EOF
;;
i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
- COREFILE=netbsd-core.o
+ COREFILE=netbsd-core.lo
;;
i[3456]86-esix-sysv3*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/esix.h"
EOF
;;
i[3456]86-*-sco* | i[3456]86-*-isc*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/i386sco.h"
EOF
;;
i[3456]86-*-mach3*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/i386mach3.h"
EOF
;;
- i[3456]86-*-linux*)
- COREFILE=trad-core.o
+ i[3456]86-*-linux-gnu*)
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/i386linux.h"
EOF
;;
- i[3456]86-*-isc*) COREFILE=trad-core.o ;;
- i[3456]86-*-aix*) COREFILE=aix386-core.o ;;
+ i[3456]86-*-isc*) COREFILE=trad-core.lo ;;
+ i[3456]86-*-aix*) COREFILE=aix386-core.lo ;;
i860-*-mach3* | i860-*-osf1*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/i860mach3.h"
EOF
;;
mips-dec-bsd*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/mipsbsd.h"
EOF
;;
mips-dec-mach3*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/mipsmach3.h"
EOF
;;
mips-*-netbsd* | mips*-*-openbsd*)
- COREFILE=netbsd-core.o
+ COREFILE=netbsd-core.lo
;;
mips-dec-*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/decstation.h"
EOF
;;
- mips-sgi-irix4*) COREFILE=irix-core.o ;;
- mips-sgi-irix5*) COREFILE=irix-core.o ;;
- mips-sgi-irix6*) COREFILE=irix-core.o ;;
+ mips-sgi-irix4*) COREFILE=irix-core.lo ;;
+ mips-sgi-irix5*) COREFILE=irix-core.lo ;;
+ mips-sgi-irix6*) COREFILE=irix-core.lo ;;
mips-*-mach3*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/mipsmach3.h"
EOF
@@ -1749,117 +2451,118 @@ EOF
;;
mips-*-sysv4*) ;;
mips-*-sysv* | mips-*-riscos*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/riscos.h"
EOF
;;
mips-sony-bsd*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/news-mips.h"
EOF
;;
m68*-bull*-sysv*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/dpx2.h"
EOF
;;
- m68*-hp-hpux*) COREFILE=hpux-core.o ;;
+ m68*-hp-hpux*) COREFILE=hpux-core.lo ;;
m68*-hp-bsd*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/hp300bsd.h"
EOF
;;
- m68*-*-linux*)
- COREFILE=trad-core.o
+ m68*-*-linux-gnu*)
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/m68klinux.h"
EOF
;;
m68*-motorola-sysv*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/delta68.h"
EOF
;;
m68*-sony-*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/news.h"
EOF
;;
m68*-*-netbsd* | m68*-*-openbsd*)
- COREFILE=netbsd-core.o
+ COREFILE=netbsd-core.lo
;;
m68*-apple-aux*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/m68kaux.h"
EOF
;;
m88*-*-sysv4*) ;;
- m88*-motorola-sysv*) COREFILE=ptrace-core.o ;;
+ m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;;
m88*-*-mach3*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/m88kmach3.h"
EOF
;;
ns32k-pc532-mach)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/pc532mach.h"
EOF
;;
ns32k-*-netbsd* | ns32k-*-openbsd*)
- COREFILE=netbsd-core.o
+ COREFILE=netbsd-core.lo
;;
- rs6000-*-lynx*) COREFILE=lynx-core.o ;;
- rs6000-*-aix4*) COREFILE=rs6000-core.o ;;
- rs6000-*-*) COREFILE=rs6000-core.o ;;
- powerpc-*-*bsd*) COREFILE=netbsd-core.o ;;
- powerpc-*-aix4*) COREFILE=rs6000-core.o ;;
- powerpc-*-aix*) COREFILE=rs6000-core.o ;;
+ rs6000-*-lynx*) COREFILE=lynx-core.lo ;;
+ rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
+ rs6000-*-*) COREFILE=rs6000-core.lo ;;
+ powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
+ powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
+ powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
powerpc-*-beos*) ;;
+ powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
sparc-*-netbsd* | sparc-*-openbsd*)
- COREFILE=netbsd-core.o
+ COREFILE=netbsd-core.lo
;;
tahoe-*-*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/tahoe.h"
EOF
;;
vax-*-ultrix2*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/vaxult2.h"
EOF
;;
vax-*-ultrix*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/vaxult2.h"
EOF
;;
vax-*-*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
cat >> confdefs.h <<\EOF
#define TRAD_HEADER "hosts/vaxbsd.h"
EOF
@@ -1868,34 +2571,35 @@ EOF
esac
case "$COREFILE" in
- aix386-core.o) COREFLAG=-DAIX386_CORE ;;
- hppabsd-core.o) COREFLAG=-DHPPABSD_CORE ;;
- hpux-core.o) COREFLAG=-DHPUX_CORE ;;
- irix-core.o) COREFLAG=-DIRIX_CORE ;;
- lynx-core.o) COREFLAG=-DLYNX_CORE ;;
- osf-core.o) COREFLAG=-DOSF_CORE ;;
- ptrace-core.o) COREFLAG=-DPTRACE_CORE ;;
- rs6000-core.o) COREFLAG="$COREFLAG -DAIX_CORE" ;;
- trad-core.o) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
+ aix386-core.lo) COREFLAG=-DAIX386_CORE ;;
+ hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;;
+ hpux-core.lo) COREFLAG=-DHPUX_CORE ;;
+ irix-core.lo) COREFLAG=-DIRIX_CORE ;;
+ lynx-core.lo) COREFLAG=-DLYNX_CORE ;;
+ netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;;
+ osf-core.lo) COREFLAG=-DOSF_CORE ;;
+ ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
+ rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
+ trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
esac
# The ELF code uses the native <sys/procfs.h> to handle core files.
# Define HAVE_SYS_PROCFS_H if the file exists and defines
# prstatus_t.
echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6
-echo "configure:1887: checking for sys/procfs.h" >&5
+echo "configure:2591: checking for sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1892 "configure"
+#line 2596 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
prstatus_t t;
; return 0; }
EOF
-if { (eval echo configure:1899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_header_sys_procfs_h=yes
else
@@ -1973,6 +2677,7 @@ for i in $selvecs ; do
done
selvecs="$f"
+
# uniq the architectures in all the configured targets.
f=""
for i in $selarchs ; do
@@ -1986,135 +2691,144 @@ selarchs="$f"
# Target backend .o files.
tb=
-elf="elf.o elflink.o"
+elf="elf.lo elflink.lo dwarf2.lo"
for vec in $selvecs
do
case "$vec" in
# This list is alphabetized to make it easy to compare
# with the two vector lists in targets.c.
- a29kcoff_big_vec) tb="$tb coff-a29k.o cofflink.o" ;;
- a_out_adobe_vec) tb="$tb aout-adobe.o aout32.o" ;;
- armcoff_little_vec) tb="$tb coff-arm.o cofflink.o " ;;
- armcoff_big_vec) tb="$tb coff-arm.o cofflink.o " ;;
- armpe_little_vec) tb="$tb pe-arm.o cofflink.o " ;;
- armpe_big_vec) tb="$tb pe-arm.o cofflink.o " ;;
- armpei_little_vec) tb="$tb pei-arm.o cofflink.o " ;;
- armpei_big_vec) tb="$tb pei-arm.o cofflink.o " ;;
- aout0_big_vec) tb="$tb aout0.o aout32.o" ;;
- aout_arm_big_vec) tb="$tb aout-arm.o aout32.o" ;;
- aout_arm_little_vec) tb="$tb aout-arm.o aout32.o" ;;
- aout_mips_big_vec) tb="$tb mipsbsd.o aout32.o" ;;
- aout_mips_little_vec) tb="$tb mipsbsd.o aout32.o" ;;
- apollocoff_vec) tb="$tb coff-apollo.o" ;;
- b_out_vec_big_host) tb="$tb bout.o aout32.o" ;;
- b_out_vec_little_host) tb="$tb bout.o aout32.o" ;;
- bfd_elf64_alpha_vec) tb="$tb elf64-alpha.o elf64.o $elf"
+ a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
+ a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
+ armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
+ armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
+ armpe_little_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;;
+ armpe_big_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;;
+ armpei_little_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
+ armpei_big_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
+ aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
+ aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
+ aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
+ aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
+ aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
+ apollocoff_vec) tb="$tb coff-apollo.lo" ;;
+ b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
+ b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
+ bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
target64=true ;;
- bfd_elf32_big_generic_vec) tb="$tb elf32-gen.o elf32.o $elf" ;;
- bfd_elf32_bigmips_vec) tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;;
- bfd_elf64_bigmips_vec) tb="$tb elf64-mips.o elf64.o elf32-mips.o elf32.o $elf ecofflink.o"
+ bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
+ bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
+ bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
target64=true ;;
- bfd_elf32_d10v_vec) tb="$tb elf32-d10v.o elf32.o $elf" ;;
- bfd_elf32_hppa_vec) tb="$tb elf32-hppa.o elf32.o $elf" ;;
- bfd_elf32_i386_vec) tb="$tb elf32-i386.o elf32.o $elf" ;;
- bfd_elf32_i860_vec) tb="$tb elf32-i860.o elf32.o $elf" ;;
- bfd_elf32_little_generic_vec) tb="$tb elf32-gen.o elf32.o $elf" ;;
- bfd_elf32_littlemips_vec) tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;;
- bfd_elf64_littlemips_vec) tb="$tb elf64-mips.o elf64.o elf32-mips.o elf32.o $elf ecofflink.o"
+ bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
+ bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
+ bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
+ bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
+ bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
target64=true ;;
- bfd_elf32_m32r_vec) tb="$tb elf32-m32r.o elf32.o $elf" ;;
- bfd_elf32_m68k_vec) tb="$tb elf32-m68k.o elf32.o $elf" ;;
- bfd_elf32_m88k_vec) tb="$tb elf32-m88k.o elf32.o $elf" ;;
- bfd_elf32_mn10200_vec) tb="$tb elf-m10200.o elf32.o $elf" ;;
- bfd_elf32_mn10300_vec) tb="$tb elf-m10300.o elf32.o $elf" ;;
- bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;;
- bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;;
- bfd_elf32_sh_vec) tb="$tb elf32-sh.o elf32.o $elf coff-sh.o" ;;
- bfd_elf32_shl_vec) tb="$tb elf32-sh.o elf32.o $elf coff-sh.o" ;;
- bfd_elf32_sparc_vec) tb="$tb elf32-sparc.o elf32.o $elf" ;;
- bfd_elf64_big_generic_vec) tb="$tb elf64-gen.o elf64.o $elf"
+ bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
+ bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
+ bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
+ bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
+ bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
+ bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
+ bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
target64=true ;;
- bfd_elf64_little_generic_vec) tb="$tb elf64-gen.o elf64.o $elf"
+ bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
target64=true ;;
- bfd_elf64_sparc_vec) tb="$tb elf64-sparc.o elf64.o $elf"
+ bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
target64=true ;;
- cisco_core_vec) tb="$tb cisco-core.o" ;;
- demo_64_vec) tb="$tb demo64.o aout64.o"
+ cisco_core_vec) tb="$tb cisco-core.lo" ;;
+ demo_64_vec) tb="$tb demo64.lo aout64.lo"
target64=true ;;
- ecoff_big_vec) tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
- ecoff_little_vec) tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
- ecoff_biglittle_vec) tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
- ecoffalpha_little_vec) tb="$tb coff-alpha.o ecoff.o ecofflink.o"
+ ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
+ ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
+ ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
+ ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"
target64=true ;;
- evax_alpha_vec) tb="$tb evax-alpha.o evax-emh.o evax-egsd.o evax-etir.o evax-misc.o"
+ go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
+ go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
+ evax_alpha_vec) tb="$tb evax-alpha.lo evax-emh.lo evax-egsd.lo evax-etir.lo evax-misc.lo"
target64=true ;;
- h8300coff_vec) tb="$tb coff-h8300.o reloc16.o" ;;
- h8500coff_vec) tb="$tb coff-h8500.o reloc16.o" ;;
- host_aout_vec) tb="$tb host-aout.o aout32.o" ;;
- hp300bsd_vec) tb="$tb hp300bsd.o aout32.o" ;;
- hp300hpux_vec) tb="$tb hp300hpux.o aout32.o" ;;
- i386aout_vec) tb="$tb i386aout.o aout32.o" ;;
- i386bsd_vec) tb="$tb i386bsd.o aout32.o" ;;
- i386coff_vec) tb="$tb coff-i386.o cofflink.o" ;;
- i386dynix_vec) tb="$tb i386dynix.o aout32.o" ;;
- i386freebsd_vec) tb="$tb i386freebsd.o aout32.o" ;;
- i386msdos_vec) tb="$tb i386msdos.o" ;;
- i386pe_vec) tb="$tb pe-i386.o cofflink.o " ;;
- i386pei_vec) tb="$tb pei-i386.o cofflink.o" ;;
- i386linux_vec) tb="$tb i386linux.o aout32.o" ;;
- i386lynx_aout_vec) tb="$tb i386lynx.o lynx-core.o aout32.o" ;;
- i386lynx_coff_vec) tb="$tb cf-i386lynx.o cofflink.o lynx-core.o" ;;
- i386mach3_vec) tb="$tb i386mach3.o aout32.o" ;;
- i386netbsd_vec) tb="$tb i386netbsd.o aout32.o" ;;
- i386os9k_vec) tb="$tb i386os9k.o aout32.o" ;;
- i860coff_vec) tb="$tb coff-i860.o cofflink.o" ;;
- icoff_big_vec) tb="$tb coff-i960.o cofflink.o" ;;
- icoff_little_vec) tb="$tb coff-i960.o cofflink.o" ;;
- ieee_vec) tb="$tb ieee.o" ;;
- m68kcoff_vec) tb="$tb coff-m68k.o cofflink.o" ;;
- m68kcoffun_vec) tb="$tb coff-u68k.o coff-m68k.o cofflink.o" ;;
- m68klinux_vec) tb="$tb m68klinux.o aout32.o" ;;
- m68klynx_aout_vec) tb="$tb m68klynx.o lynx-core.o aout32.o" ;;
- m68klynx_coff_vec) tb="$tb cf-m68klynx.o coff-m68k.o cofflink.o lynx-core.o" ;;
- m68knetbsd_vec) tb="$tb m68knetbsd.o aout32.o" ;;
- m68k4knetbsd_vec) tb="$tb m68k4knetbsd.o aout32.o" ;;
- m68kaux_coff_vec) tb="$tb coff-aux.o coff-m68k.o cofflink.o" ;;
- m68ksysvcoff_vec) tb="$tb coff-svm68k.o cofflink.o" ;;
- m88kbcs_vec) tb="$tb coff-m88k.o" ;;
- newsos3_vec) tb="$tb newsos3.o aout32.o" ;;
- nlm32_i386_vec) tb="$tb nlm32-i386.o nlm32.o nlm.o" ;;
- nlm32_sparc_vec) tb="$tb nlm32-sparc.o nlm32.o nlm.o" ;;
- nlm32_alpha_vec) tb="$tb nlm32-alpha.o nlm32.o nlm.o"
+ h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
+ h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;;
+ host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
+ hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;;
+ hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;;
+ i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
+ i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
+ i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
+ i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
+ i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
+ i386msdos_vec) tb="$tb i386msdos.lo" ;;
+ i386pe_vec) tb="$tb pe-i386.lo cofflink.lo " ;;
+ i386pei_vec) tb="$tb pei-i386.lo cofflink.lo" ;;
+ i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
+ i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
+ i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
+ i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
+ i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
+ i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
+ i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
+ icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
+ icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
+ ieee_vec) tb="$tb ieee.lo" ;;
+ m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
+ m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
+ m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
+ m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
+ m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
+ m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
+ m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
+ m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
+ m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
+ m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
+ newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
+ nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
+ nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
+ nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"
target64=true ;;
- riscix_vec) tb="$tb aout32.o riscix.o" ;;
- nlm32_powerpc_vec) tb="$tb nlm32-ppc.o nlm32.o nlm.o" ;;
- pc532netbsd_vec) tb="$tb ns32knetbsd.o aout-ns32k.o" ;;
- pc532machaout_vec) tb="$tb pc532-mach.o aout-ns32k.o" ;;
- pmac_xcoff_vec) tb="$tb coff-pmac.o xcofflink.o" ;;
- rs6000coff_vec) tb="$tb coff-rs6000.o xcofflink.o" ;;
- bfd_powerpc_pe_vec) tb="$tb pe-ppc.o cofflink.o" ;;
- bfd_powerpcle_pe_vec) tb="$tb pe-ppc.o cofflink.o" ;;
- bfd_powerpc_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;;
- bfd_powerpcle_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;;
- ppcboot_vec) tb="$tb ppcboot.o" ;;
- shcoff_vec) tb="$tb coff-sh.o cofflink.o" ;;
- shlcoff_vec) tb="$tb coff-sh.o cofflink.o" ;;
- som_vec) tb="$tb som.o" ;;
- sparcle_aout_vec) tb="$tb aout-sparcle.o aout32.o" ;;
- sparclinux_vec) tb="$tb sparclinux.o aout32.o stab-syms.o" ;;
- sparclynx_aout_vec) tb="$tb sparclynx.o lynx-core.o aout32.o" ;;
- sparclynx_coff_vec) tb="$tb cf-sparclynx.o lynx-core.o" ;;
- sparcnetbsd_vec) tb="$tb sparcnetbsd.o aout32.o" ;;
- sparccoff_vec) tb="$tb coff-sparc.o" ;;
- srec_vec) tb="$tb srec.o" ;;
- sunos_big_vec) tb="$tb sunos.o aout32.o" ;;
- symbolsrec_vec) tb="$tb srec.o" ;;
- tekhex_vec) tb="$tb tekhex.o" ;;
- we32kcoff_vec) tb="$tb coff-we32k.o" ;;
- z8kcoff_vec) tb="$tb coff-z8k.o reloc16.o" ;;
- w65_vec) tb="$tb coff-w65.o reloc16.o" ;;
- versados_vec) tb="$tb versados.o" ;;
+ riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
+ nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
+ pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
+ pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
+ pmac_xcoff_vec) tb="$tb coff-pmac.lo xcofflink.lo" ;;
+ rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
+ bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
+ bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
+ bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
+ bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
+ ppcboot_vec) tb="$tb ppcboot.lo" ;;
+ shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
+ shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
+ shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
+ shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
+ som_vec) tb="$tb som.lo" ;;
+ sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
+ sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
+ sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
+ sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
+ sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
+ sparccoff_vec) tb="$tb coff-sparc.lo" ;;
+ srec_vec) tb="$tb srec.lo" ;;
+ sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
+ symbolsrec_vec) tb="$tb srec.lo" ;;
+ tekhex_vec) tb="$tb tekhex.lo" ;;
+ tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
+ tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
+ we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
+ z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
+ w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
+ versados_vec) tb="$tb versados.lo" ;;
"") ;;
*) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
@@ -2124,7 +2838,7 @@ done
# Target architecture .o files.
# A couple of CPUs use shorter file names to avoid problems on DOS
# filesystems.
-ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
+ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
# Weed out duplicate .o files.
f=""
@@ -2196,17 +2910,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:2200: checking for $ac_hdr" >&5
+echo "configure:2914: 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
-#line 2205 "configure"
+#line 2919 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2235,12 +2949,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2239: checking for $ac_func" >&5
+echo "configure:2953: 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 <<EOF
-#line 2244 "configure"
+#line 2958 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2263,7 +2977,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2288,7 +3002,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2292: checking for working mmap" >&5
+echo "configure:3006: 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
@@ -2296,7 +3010,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 2300 "configure"
+#line 3014 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2436,7 +3150,7 @@ main()
}
EOF
-if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -2461,12 +3175,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2465: checking for $ac_func" >&5
+echo "configure:3179: 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 <<EOF
-#line 2470 "configure"
+#line 3184 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2489,7 +3203,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2544,7 +3258,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1` in
+ case `(ac_space=' '; set) 2>&1 | grep ac_space` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@@ -2611,7 +3325,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12"
+ echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -2631,6 +3345,7 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
+s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
@@ -2668,27 +3383,32 @@ s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@CC@%$CC%g
-s%@HDEFINES@%$HDEFINES%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@ALLLIBS@%$ALLLIBS%g
-s%@PICFLAG@%$PICFLAG%g
-s%@SHLIB@%$SHLIB%g
-s%@SHLIB_CC@%$SHLIB_CC%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LIBS@%$SHLIB_LIBS%g
-s%@COMMON_SHLIB@%$COMMON_SHLIB%g
-s%@PICLIST@%$PICLIST%g
-s%@SHLINK@%$SHLINK%g
-s%@INSTALL_SHLIB@%$INSTALL_SHLIB%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@AR@%$AR%g
+s%@RANLIB@%$RANLIB%g
+s%@LD@%$LD%g
+s%@NM@%$NM%g
+s%@LN_S@%$LN_S%g
+s%@LIBTOOL@%$LIBTOOL%g
+s%@MAINT@%$MAINT%g
+s%@EXEEXT@%$EXEEXT%g
+s%@HDEFINES@%$HDEFINES%g
s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
+s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
s%@CPP@%$CPP%g
s%@COREFILE@%$COREFILE%g
s%@COREFLAG@%$COREFLAG%g
@@ -2908,9 +3628,11 @@ fi; done
EOF
cat >> $CONFIG_STATUS <<EOF
+
EOF
cat >> $CONFIG_STATUS <<\EOF
-case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+
exit 0
EOF
chmod +x $CONFIG_STATUS
diff --git a/contrib/binutils/bfd/configure.host b/contrib/binutils/bfd/configure.host
index 2983274..769c0a2 100644
--- a/contrib/binutils/bfd/configure.host
+++ b/contrib/binutils/bfd/configure.host
@@ -11,24 +11,15 @@
# host64 set to true if 64 bit types are as fast as 32 bit
# HOST_64BIT_TYPE host 64 bit type
# HOST_U_64BIT_TYPE unsigned 64 bit type (not needed if 64BIT_TYPE is long)
-# SHLIB_CC compiler to use when building shared library
-# SHLIB_CFLAGS flags to use when building shared library
-# SHLIB_LIBS libraries to use when building shared library
-# PICFLAG may be set to flag to use to compile PIC
-# SHLINK may be set to the name to link the shared library to
-# ALLLIBS may be set to libraries to build
-# HLDFLAGS LDFLAGS specific to the host
-# HLDENV environment variable to set when linking for the host
-# RPATH_ENVVAR environment variable used to find shared libraries
-# INSTALL_SHLIB install a shared library
HDEFINES=
host64=false
HOST_64BIT_TYPE=
+HOST_U_64BIT_TYPE=
case "${host}" in
-alpha-*-*) host64=true; HOST_64BIT_TYPE=long ;;
+alpha*-*-*) host64=true; HOST_64BIT_TYPE=long ;;
hppa*-*-hpux*) HDEFINES=-DHOST_HPPAHPUX ;;
hppa*-*-hiux*) HDEFINES=-DHOST_HPPAHPUX ;;
@@ -76,96 +67,3 @@ m68*-hp-hpux*) HDEFINES=-DHOST_HP300HPUX ;;
ac_cv_header_unistd_h=no
;;
esac
-
-# If we are configuring with --enable-shared, adjust the shared
-# library support based on the host. This support must work for both
-# the BFD and the opcodes libraries.
-HLDFLAGS=
-HLDENV=
-RPATH_ENVVAR=LD_LIBRARY_PATH
-SHLIB_CC='$(CC)'
-SHLIB_CFLAGS='-shared'
-SHLIB_LIBS=
-INSTALL_SHLIB='$(INSTALL_PROGRAM) $$f $(libdir)/$$tf;'
-if [ "${shared}" = "true" ]; then
- case "${host}" in
- hppa*-*-*) picfrag=${srcdir}/../config/mh-papic ;;
- i[34566]86-*-*) picfrag=${srcdir}/../config/mh-x86pic ;;
- *-*-*) picfrag=${srcdir}/../config/mh-${host_cpu}pic ;;
- esac
- if [ -f "${picfrag}" ]; then
- pic=`sed -n -e 's/^PICFLAG[ ]*=[ ]*\(.*\)$/\1/p' ${picfrag}`
- if [ -n "${pic}" ]; then
- PICFLAG=${pic}
- fi
- fi
-
- case "${host}" in
- *-dec-osf*)
- # -fpic is not needed on the Alpha.
- PICFLAG=
- HLDFLAGS='-rpath $(libdir)'
- SHLIB_CFLAGS='-shared -Wl,-soname,$(SONAME)'
- ;;
- *-*-hpux*)
- # HP/UX uses .sl for shared libraries.
- SHLINK=`echo ${SHLINK} | sed -e 's/so$/sl/'`
- SHLIB_CFLAGS='-shared $(PICFLAG)'
- HLDFLAGS='-Wl,+s,+b,$(libdir)'
- RPATH_ENVVAR=SHLIB_PATH
- INSTALL_SHLIB='$(INSTALL_PROGRAM) $$f $(libdir)/$$tf; chmod -w $(libdir)/$$tf;'
- ;;
- *-*-irix[56]*)
- # -fpic is not needed on Irix 5 or 6.
- PICFLAG=
- SHLIB_CFLAGS='-shared -Wl,-soname,$(SONAME)'
- HLDFLAGS='-Wl,-rpath,$(libdir)'
- ;;
- *-*-linux*aout*)
- ;;
- *-*-linux*)
- SHLIB_CFLAGS='-shared -Wl,-soname,$(SONAME)'
- case "${libdir}" in
- /lib | /usr/lib) ;;
- *) HLDFLAGS='-Wl,-rpath,$(libdir)' ;;
- esac
- # On Linux, apparently, linking against -lc lets ldconfig figure
- # out which version of libc should be used.
- SHLIB_LIBS=-lc
- ;;
- *-*-solaris*)
- SHLIB_CFLAGS='-shared -h $(SONAME)'
- HLDFLAGS='-R $(libdir)'
- ;;
- *-*-sysv4*)
- SHLIB_CFLAGS='-shared -h $(SONAME)'
- HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
- ;;
- *-*-sunos*)
- # Build a libTARGET-bfd.so.VERSION symlink in the object directory.
- ALLLIBS=`echo ${ALLLIBS} | sed -e 's/\$(SHLINK)/stamp-tshlink/'`
- ;;
- esac
-fi
-
-# On SunOS, if the linker supports the -rpath option, use it to
-# prevent ../bfd and ../opcodes from being included in the run time
-# search path.
-case "${host}" in
- *-*-sunos*)
- echo 'main () { }' > conftest.c
- ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
- if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
- :
- elif grep 'No such file' conftest.t >/dev/null 2>&1; then
- :
- elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
- :
- elif [ "${shared}" = "true" ]; then
- HLDFLAGS='-Wl,-rpath=$(libdir)'
- else
- HLDFLAGS='-Wl,-rpath='
- fi
- rm -f conftest.t conftest.c conftest
- ;;
-esac
diff --git a/contrib/binutils/bfd/configure.in b/contrib/binutils/bfd/configure.in
index c62e729..f8951e6 100644
--- a/contrib/binutils/bfd/configure.in
+++ b/contrib/binutils/bfd/configure.in
@@ -1,8 +1,25 @@
dnl Process this file with autoconf to produce a configure script.
dnl
+
AC_PREREQ(2.5)
AC_INIT(libbfd.c)
+AC_CANONICAL_SYSTEM
+AC_ISC_POSIX
+
+AM_INIT_AUTOMAKE(bfd, 2.9.1)
+
+dnl These must be called before AM_PROG_LIBTOOL, because it may want
+dnl to call AC_CHECK_PROG.
+AC_CHECK_TOOL(AR, ar)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+
+dnl Default to a non shared library. This may be overridden by the
+dnl configure option --enable-shared.
+AM_DISABLE_SHARED
+
+AM_PROG_LIBTOOL
+
AC_ARG_ENABLE(64-bit-bfd,
[ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)],
[case "${enableval}" in
@@ -18,14 +35,6 @@ AC_ARG_ENABLE(targets,
no) enable_targets= ;;
*) enable_targets=$enableval ;;
esac])dnl
-AC_ARG_ENABLE(shared,
-[ --enable-shared build shared BFD library],
-[case "${enableval}" in
- yes) shared=true ;;
- no) shared=false ;;
- *bfd*) shared=true ;;
- *) shared=false ;;
-esac])dnl
AC_ARG_ENABLE(commonbfdlib,
[ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
[case "${enableval}" in
@@ -41,79 +50,29 @@ AC_ARG_WITH(mmap,
*) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;;
esac],[want_mmap=false])dnl
-AC_CONFIG_HEADER(config.h:config.in)
+AM_CONFIG_HEADER(config.h:config.in)
-AC_CONFIG_AUX_DIR(`cd $srcdir/..;pwd`)
-AC_CANONICAL_SYSTEM
if test -z "$target" ; then
AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
fi
AC_ARG_PROGRAM
+AM_MAINTAINER_MODE
+AM_CYGWIN32
+AM_EXEEXT
+
host64=false
target64=false
# host stuff:
-ALLLIBS='$(TARGETLIB)'
-PICFLAG=
-SHLIB=unused-shlib
-SHLINK=unused-shlink
-if test "${shared}" = "true"; then
- PICFLAG=-fpic
- if test "${commonbfdlib}" = "true"; then
- ALLLIBS='$(TARGETLIB)'
- else
- ALLLIBS='$(TARGETLIB) $(SHLIB) $(SHLINK)'
-changequote(,)dnl
- SHLIB=libbfd.so.`sed -e 's/[^0-9]*\([0-9.]*\).*/\1/' ${srcdir}/VERSION`
-changequote([,])dnl
- SHLINK=libbfd.so
- fi
-fi
-
AC_PROG_CC
-AC_ISC_POSIX
-
# Permit host specific settings.
. ${srcdir}/configure.host
AC_SUBST(HDEFINES)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_PROG_INSTALL
-
-if test "${shared}" = "true"; then
- if test "${GCC}" != "yes" && test "${shared_non_gcc}" != "yes"; then
- AC_MSG_WARN([BFD --enable-shared only supported when using gcc])
- shared=false
- ALLLIBS='$(TARGETLIB)'
- PICFLAG=
- SHLIB=unused-shlib
- fi
-fi
-
-AC_SUBST(ALLLIBS)
-AC_SUBST(PICFLAG)
-AC_SUBST(SHLIB)
-AC_SUBST(SHLIB_CC)
-AC_SUBST(SHLIB_CFLAGS)
-AC_SUBST(SHLIB_LIBS)
-if test "${commonbfdlib}" = "true"; then
- COMMON_SHLIB=yes
- PICLIST=piclist
-else
- COMMON_SHLIB=
- PICLIST=
-fi
-AC_SUBST(COMMON_SHLIB)
-AC_SUBST(PICLIST)
-AC_SUBST(SHLINK)
-AC_SUBST(INSTALL_SHLIB)
-
-VERSION=`cat ${srcdir}/VERSION`
-AC_SUBST(VERSION)
+AM_PROG_INSTALL
BFD_HOST_64BIT_LONG=0
BFD_HOST_64_BIT_DEFINED=0
@@ -136,7 +95,7 @@ BFD_CC_FOR_BUILD
AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h)
AC_HEADER_TIME
-AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf)
+AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen)
BFD_BINARY_FOPEN
@@ -151,182 +110,185 @@ COREFILE=
COREFLAG=
if test "${target}" = "${host}"; then
case "${host}" in
- alpha*-*-linux*)
- COREFILE=trad-core.o
+ alpha*-*-linux-gnu*)
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/alphalinux.h")
;;
- alpha*-*-*) COREFILE=osf-core.o ;;
- arm-*-riscix) COREFILE=trad-core.o ;;
- hppa*-*-hpux*) COREFILE=hpux-core.o ;;
- hppa*-*-hiux*) COREFILE=hpux-core.o ;;
- hppa*-*-bsd*) COREFILE="hpux-core.o hppabsd-core.o"
+ alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;;
+ alpha*-*-*) COREFILE=osf-core.lo ;;
+ arm-*-riscix) COREFILE=trad-core.lo ;;
+ hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
+ hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
+ hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
changequote(,)dnl
i[3456]86-sequent-bsd*)
changequote([,])dnl
- COREFILE=trad-core.o;
+ COREFILE=trad-core.lo;
AC_DEFINE(TRAD_HEADER,"hosts/symmetry.h")
;;
changequote(,)dnl
i[3456]86-sequent-sysv4*) ;;
i[3456]86-sequent-sysv*)
changequote([,])dnl
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/symmetry.h")
;;
changequote(,)dnl
i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
changequote([,])dnl
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/i386bsd.h")
;;
changequote(,)dnl
i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
changequote([,])dnl
- COREFILE=netbsd-core.o
+ COREFILE=netbsd-core.lo
;;
changequote(,)dnl
i[3456]86-esix-sysv3*)
changequote([,])dnl
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/esix.h")
;;
changequote(,)dnl
i[3456]86-*-sco* | i[3456]86-*-isc*)
changequote([,])dnl
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/i386sco.h")
;;
changequote(,)dnl
i[3456]86-*-mach3*)
changequote([,])dnl
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/i386mach3.h")
;;
changequote(,)dnl
- i[3456]86-*-linux*)
+ i[3456]86-*-linux-gnu*)
changequote([,])dnl
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/i386linux.h")
;;
changequote(,)dnl
- i[3456]86-*-isc*) COREFILE=trad-core.o ;;
- i[3456]86-*-aix*) COREFILE=aix386-core.o ;;
+ i[3456]86-*-isc*) COREFILE=trad-core.lo ;;
+ i[3456]86-*-aix*) COREFILE=aix386-core.lo ;;
changequote([,])dnl
i860-*-mach3* | i860-*-osf1*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/i860mach3.h")
;;
mips-dec-bsd*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/mipsbsd.h")
;;
mips-dec-mach3*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/mipsmach3.h")
;;
mips-*-netbsd* | mips*-*-openbsd*)
- COREFILE=netbsd-core.o
+ COREFILE=netbsd-core.lo
;;
mips-dec-*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/decstation.h")
;;
- mips-sgi-irix4*) COREFILE=irix-core.o ;;
- mips-sgi-irix5*) COREFILE=irix-core.o ;;
- mips-sgi-irix6*) COREFILE=irix-core.o ;;
+ mips-sgi-irix4*) COREFILE=irix-core.lo ;;
+ mips-sgi-irix5*) COREFILE=irix-core.lo ;;
+ mips-sgi-irix6*) COREFILE=irix-core.lo ;;
mips-*-mach3*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/mipsmach3.h")
;;
mips-*-sysv4*) ;;
mips-*-sysv* | mips-*-riscos*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/riscos.h")
;;
mips-sony-bsd*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/news-mips.h")
;;
m68*-bull*-sysv*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/dpx2.h")
;;
- m68*-hp-hpux*) COREFILE=hpux-core.o ;;
+ m68*-hp-hpux*) COREFILE=hpux-core.lo ;;
m68*-hp-bsd*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/hp300bsd.h")
;;
- m68*-*-linux*)
- COREFILE=trad-core.o
+ m68*-*-linux-gnu*)
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/m68klinux.h")
;;
m68*-motorola-sysv*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER, "hosts/delta68.h")
;;
m68*-sony-*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/news.h")
;;
m68*-*-netbsd* | m68*-*-openbsd*)
- COREFILE=netbsd-core.o
+ COREFILE=netbsd-core.lo
;;
m68*-apple-aux*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/m68kaux.h")
;;
m88*-*-sysv4*) ;;
- m88*-motorola-sysv*) COREFILE=ptrace-core.o ;;
+ m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;;
m88*-*-mach3*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/m88kmach3.h")
;;
ns32k-pc532-mach)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/pc532mach.h")
;;
ns32k-*-netbsd* | ns32k-*-openbsd*)
- COREFILE=netbsd-core.o
- ;;
- rs6000-*-lynx*) COREFILE=lynx-core.o ;;
- rs6000-*-aix4*) COREFILE=rs6000-core.o ;;
- rs6000-*-*) COREFILE=rs6000-core.o ;;
- powerpc-*-*bsd*) COREFILE=netbsd-core.o ;;
- powerpc-*-aix4*) COREFILE=rs6000-core.o ;;
- powerpc-*-aix*) COREFILE=rs6000-core.o ;;
+ COREFILE=netbsd-core.lo
+ ;;
+ rs6000-*-lynx*) COREFILE=lynx-core.lo ;;
+ rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
+ rs6000-*-*) COREFILE=rs6000-core.lo ;;
+ powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
+ powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
+ powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
powerpc-*-beos*) ;;
+ powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
sparc-*-netbsd* | sparc-*-openbsd*)
- COREFILE=netbsd-core.o
+ COREFILE=netbsd-core.lo
;;
tahoe-*-*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/tahoe.h")
;;
vax-*-ultrix2*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/vaxult2.h")
;;
vax-*-ultrix*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/vaxult2.h")
;;
vax-*-*)
- COREFILE=trad-core.o
+ COREFILE=trad-core.lo
AC_DEFINE(TRAD_HEADER,"hosts/vaxbsd.h")
;;
esac
case "$COREFILE" in
- aix386-core.o) COREFLAG=-DAIX386_CORE ;;
- hppabsd-core.o) COREFLAG=-DHPPABSD_CORE ;;
- hpux-core.o) COREFLAG=-DHPUX_CORE ;;
- irix-core.o) COREFLAG=-DIRIX_CORE ;;
- lynx-core.o) COREFLAG=-DLYNX_CORE ;;
- osf-core.o) COREFLAG=-DOSF_CORE ;;
- ptrace-core.o) COREFLAG=-DPTRACE_CORE ;;
- rs6000-core.o) COREFLAG="$COREFLAG -DAIX_CORE" ;;
- trad-core.o) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
+ aix386-core.lo) COREFLAG=-DAIX386_CORE ;;
+ hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;;
+ hpux-core.lo) COREFLAG=-DHPUX_CORE ;;
+ irix-core.lo) COREFLAG=-DIRIX_CORE ;;
+ lynx-core.lo) COREFLAG=-DLYNX_CORE ;;
+ netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;;
+ osf-core.lo) COREFLAG=-DOSF_CORE ;;
+ ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
+ rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
+ trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
esac
# The ELF code uses the native <sys/procfs.h> to handle core files.
@@ -400,6 +362,7 @@ for i in $selvecs ; do
done
selvecs="$f"
+
# uniq the architectures in all the configured targets.
f=""
for i in $selarchs ; do
@@ -413,135 +376,144 @@ selarchs="$f"
# Target backend .o files.
tb=
-elf="elf.o elflink.o"
+elf="elf.lo elflink.lo dwarf2.lo"
for vec in $selvecs
do
case "$vec" in
# This list is alphabetized to make it easy to compare
# with the two vector lists in targets.c.
- a29kcoff_big_vec) tb="$tb coff-a29k.o cofflink.o" ;;
- a_out_adobe_vec) tb="$tb aout-adobe.o aout32.o" ;;
- armcoff_little_vec) tb="$tb coff-arm.o cofflink.o " ;;
- armcoff_big_vec) tb="$tb coff-arm.o cofflink.o " ;;
- armpe_little_vec) tb="$tb pe-arm.o cofflink.o " ;;
- armpe_big_vec) tb="$tb pe-arm.o cofflink.o " ;;
- armpei_little_vec) tb="$tb pei-arm.o cofflink.o " ;;
- armpei_big_vec) tb="$tb pei-arm.o cofflink.o " ;;
- aout0_big_vec) tb="$tb aout0.o aout32.o" ;;
- aout_arm_big_vec) tb="$tb aout-arm.o aout32.o" ;;
- aout_arm_little_vec) tb="$tb aout-arm.o aout32.o" ;;
- aout_mips_big_vec) tb="$tb mipsbsd.o aout32.o" ;;
- aout_mips_little_vec) tb="$tb mipsbsd.o aout32.o" ;;
- apollocoff_vec) tb="$tb coff-apollo.o" ;;
- b_out_vec_big_host) tb="$tb bout.o aout32.o" ;;
- b_out_vec_little_host) tb="$tb bout.o aout32.o" ;;
- bfd_elf64_alpha_vec) tb="$tb elf64-alpha.o elf64.o $elf"
+ a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
+ a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
+ armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
+ armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
+ armpe_little_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;;
+ armpe_big_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;;
+ armpei_little_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
+ armpei_big_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
+ aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
+ aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
+ aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
+ aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
+ aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
+ apollocoff_vec) tb="$tb coff-apollo.lo" ;;
+ b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
+ b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
+ bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
target64=true ;;
- bfd_elf32_big_generic_vec) tb="$tb elf32-gen.o elf32.o $elf" ;;
- bfd_elf32_bigmips_vec) tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;;
- bfd_elf64_bigmips_vec) tb="$tb elf64-mips.o elf64.o elf32-mips.o elf32.o $elf ecofflink.o"
+ bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
+ bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
+ bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
target64=true ;;
- bfd_elf32_d10v_vec) tb="$tb elf32-d10v.o elf32.o $elf" ;;
- bfd_elf32_hppa_vec) tb="$tb elf32-hppa.o elf32.o $elf" ;;
- bfd_elf32_i386_vec) tb="$tb elf32-i386.o elf32.o $elf" ;;
- bfd_elf32_i860_vec) tb="$tb elf32-i860.o elf32.o $elf" ;;
- bfd_elf32_little_generic_vec) tb="$tb elf32-gen.o elf32.o $elf" ;;
- bfd_elf32_littlemips_vec) tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;;
- bfd_elf64_littlemips_vec) tb="$tb elf64-mips.o elf64.o elf32-mips.o elf32.o $elf ecofflink.o"
+ bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
+ bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
+ bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
+ bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
+ bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
target64=true ;;
- bfd_elf32_m32r_vec) tb="$tb elf32-m32r.o elf32.o $elf" ;;
- bfd_elf32_m68k_vec) tb="$tb elf32-m68k.o elf32.o $elf" ;;
- bfd_elf32_m88k_vec) tb="$tb elf32-m88k.o elf32.o $elf" ;;
- bfd_elf32_mn10200_vec) tb="$tb elf-m10200.o elf32.o $elf" ;;
- bfd_elf32_mn10300_vec) tb="$tb elf-m10300.o elf32.o $elf" ;;
- bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;;
- bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;;
- bfd_elf32_sh_vec) tb="$tb elf32-sh.o elf32.o $elf coff-sh.o" ;;
- bfd_elf32_shl_vec) tb="$tb elf32-sh.o elf32.o $elf coff-sh.o" ;;
- bfd_elf32_sparc_vec) tb="$tb elf32-sparc.o elf32.o $elf" ;;
- bfd_elf64_big_generic_vec) tb="$tb elf64-gen.o elf64.o $elf"
+ bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
+ bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
+ bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
+ bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
+ bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
+ bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
+ bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
target64=true ;;
- bfd_elf64_little_generic_vec) tb="$tb elf64-gen.o elf64.o $elf"
+ bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
target64=true ;;
- bfd_elf64_sparc_vec) tb="$tb elf64-sparc.o elf64.o $elf"
+ bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
target64=true ;;
- cisco_core_vec) tb="$tb cisco-core.o" ;;
- demo_64_vec) tb="$tb demo64.o aout64.o"
+ cisco_core_vec) tb="$tb cisco-core.lo" ;;
+ demo_64_vec) tb="$tb demo64.lo aout64.lo"
target64=true ;;
- ecoff_big_vec) tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
- ecoff_little_vec) tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
- ecoff_biglittle_vec) tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
- ecoffalpha_little_vec) tb="$tb coff-alpha.o ecoff.o ecofflink.o"
+ ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
+ ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
+ ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
+ ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"
target64=true ;;
- evax_alpha_vec) tb="$tb evax-alpha.o evax-emh.o evax-egsd.o evax-etir.o evax-misc.o"
+ go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
+ go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
+ evax_alpha_vec) tb="$tb evax-alpha.lo evax-emh.lo evax-egsd.lo evax-etir.lo evax-misc.lo"
target64=true ;;
- h8300coff_vec) tb="$tb coff-h8300.o reloc16.o" ;;
- h8500coff_vec) tb="$tb coff-h8500.o reloc16.o" ;;
- host_aout_vec) tb="$tb host-aout.o aout32.o" ;;
- hp300bsd_vec) tb="$tb hp300bsd.o aout32.o" ;;
- hp300hpux_vec) tb="$tb hp300hpux.o aout32.o" ;;
- i386aout_vec) tb="$tb i386aout.o aout32.o" ;;
- i386bsd_vec) tb="$tb i386bsd.o aout32.o" ;;
- i386coff_vec) tb="$tb coff-i386.o cofflink.o" ;;
- i386dynix_vec) tb="$tb i386dynix.o aout32.o" ;;
- i386freebsd_vec) tb="$tb i386freebsd.o aout32.o" ;;
- i386msdos_vec) tb="$tb i386msdos.o" ;;
- i386pe_vec) tb="$tb pe-i386.o cofflink.o " ;;
- i386pei_vec) tb="$tb pei-i386.o cofflink.o" ;;
- i386linux_vec) tb="$tb i386linux.o aout32.o" ;;
- i386lynx_aout_vec) tb="$tb i386lynx.o lynx-core.o aout32.o" ;;
- i386lynx_coff_vec) tb="$tb cf-i386lynx.o cofflink.o lynx-core.o" ;;
- i386mach3_vec) tb="$tb i386mach3.o aout32.o" ;;
- i386netbsd_vec) tb="$tb i386netbsd.o aout32.o" ;;
- i386os9k_vec) tb="$tb i386os9k.o aout32.o" ;;
- i860coff_vec) tb="$tb coff-i860.o cofflink.o" ;;
- icoff_big_vec) tb="$tb coff-i960.o cofflink.o" ;;
- icoff_little_vec) tb="$tb coff-i960.o cofflink.o" ;;
- ieee_vec) tb="$tb ieee.o" ;;
- m68kcoff_vec) tb="$tb coff-m68k.o cofflink.o" ;;
- m68kcoffun_vec) tb="$tb coff-u68k.o coff-m68k.o cofflink.o" ;;
- m68klinux_vec) tb="$tb m68klinux.o aout32.o" ;;
- m68klynx_aout_vec) tb="$tb m68klynx.o lynx-core.o aout32.o" ;;
- m68klynx_coff_vec) tb="$tb cf-m68klynx.o coff-m68k.o cofflink.o lynx-core.o" ;;
- m68knetbsd_vec) tb="$tb m68knetbsd.o aout32.o" ;;
- m68k4knetbsd_vec) tb="$tb m68k4knetbsd.o aout32.o" ;;
- m68kaux_coff_vec) tb="$tb coff-aux.o coff-m68k.o cofflink.o" ;;
- m68ksysvcoff_vec) tb="$tb coff-svm68k.o cofflink.o" ;;
- m88kbcs_vec) tb="$tb coff-m88k.o" ;;
- newsos3_vec) tb="$tb newsos3.o aout32.o" ;;
- nlm32_i386_vec) tb="$tb nlm32-i386.o nlm32.o nlm.o" ;;
- nlm32_sparc_vec) tb="$tb nlm32-sparc.o nlm32.o nlm.o" ;;
- nlm32_alpha_vec) tb="$tb nlm32-alpha.o nlm32.o nlm.o"
+ h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
+ h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;;
+ host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
+ hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;;
+ hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;;
+ i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
+ i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
+ i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
+ i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
+ i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
+ i386msdos_vec) tb="$tb i386msdos.lo" ;;
+ i386pe_vec) tb="$tb pe-i386.lo cofflink.lo " ;;
+ i386pei_vec) tb="$tb pei-i386.lo cofflink.lo" ;;
+ i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
+ i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
+ i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
+ i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
+ i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
+ i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
+ i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
+ icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
+ icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
+ ieee_vec) tb="$tb ieee.lo" ;;
+ m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
+ m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
+ m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
+ m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
+ m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
+ m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
+ m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
+ m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
+ m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
+ m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
+ newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
+ nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
+ nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
+ nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"
target64=true ;;
- riscix_vec) tb="$tb aout32.o riscix.o" ;;
- nlm32_powerpc_vec) tb="$tb nlm32-ppc.o nlm32.o nlm.o" ;;
- pc532netbsd_vec) tb="$tb ns32knetbsd.o aout-ns32k.o" ;;
- pc532machaout_vec) tb="$tb pc532-mach.o aout-ns32k.o" ;;
- pmac_xcoff_vec) tb="$tb coff-pmac.o xcofflink.o" ;;
- rs6000coff_vec) tb="$tb coff-rs6000.o xcofflink.o" ;;
- bfd_powerpc_pe_vec) tb="$tb pe-ppc.o cofflink.o" ;;
- bfd_powerpcle_pe_vec) tb="$tb pe-ppc.o cofflink.o" ;;
- bfd_powerpc_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;;
- bfd_powerpcle_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;;
- ppcboot_vec) tb="$tb ppcboot.o" ;;
- shcoff_vec) tb="$tb coff-sh.o cofflink.o" ;;
- shlcoff_vec) tb="$tb coff-sh.o cofflink.o" ;;
- som_vec) tb="$tb som.o" ;;
- sparcle_aout_vec) tb="$tb aout-sparcle.o aout32.o" ;;
- sparclinux_vec) tb="$tb sparclinux.o aout32.o stab-syms.o" ;;
- sparclynx_aout_vec) tb="$tb sparclynx.o lynx-core.o aout32.o" ;;
- sparclynx_coff_vec) tb="$tb cf-sparclynx.o lynx-core.o" ;;
- sparcnetbsd_vec) tb="$tb sparcnetbsd.o aout32.o" ;;
- sparccoff_vec) tb="$tb coff-sparc.o" ;;
- srec_vec) tb="$tb srec.o" ;;
- sunos_big_vec) tb="$tb sunos.o aout32.o" ;;
- symbolsrec_vec) tb="$tb srec.o" ;;
- tekhex_vec) tb="$tb tekhex.o" ;;
- we32kcoff_vec) tb="$tb coff-we32k.o" ;;
- z8kcoff_vec) tb="$tb coff-z8k.o reloc16.o" ;;
- w65_vec) tb="$tb coff-w65.o reloc16.o" ;;
- versados_vec) tb="$tb versados.o" ;;
+ riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
+ nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
+ pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
+ pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
+ pmac_xcoff_vec) tb="$tb coff-pmac.lo xcofflink.lo" ;;
+ rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
+ bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
+ bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
+ bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
+ bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
+ ppcboot_vec) tb="$tb ppcboot.lo" ;;
+ shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
+ shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
+ shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
+ shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
+ som_vec) tb="$tb som.lo" ;;
+ sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
+ sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
+ sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
+ sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
+ sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
+ sparccoff_vec) tb="$tb coff-sparc.lo" ;;
+ srec_vec) tb="$tb srec.lo" ;;
+ sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
+ symbolsrec_vec) tb="$tb srec.lo" ;;
+ tekhex_vec) tb="$tb tekhex.lo" ;;
+ tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
+ tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
+ we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
+ z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
+ w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
+ versados_vec) tb="$tb versados.lo" ;;
"") ;;
*) AC_MSG_ERROR(*** unknown target vector $vec) ;;
@@ -551,7 +523,7 @@ done
# Target architecture .o files.
# A couple of CPUs use shorter file names to avoid problems on DOS
# filesystems.
-ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
+ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
# Weed out duplicate .o files.
f=""
@@ -627,5 +599,4 @@ case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
esac
rm -f doc/config.status
-AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h,
-[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
+AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h)
diff --git a/contrib/binutils/bfd/cpu-arc.c b/contrib/binutils/bfd/cpu-arc.c
new file mode 100644
index 0000000..bce59d4
--- /dev/null
+++ b/contrib/binutils/bfd/cpu-arc.c
@@ -0,0 +1,70 @@
+/* BFD support for the ARC processor
+ Copyright 1994, 1995, 1997 Free Software Foundation, Inc.
+ Contributed by Doug Evans (dje@cygnus.com).
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+
+#define ARC(mach, print_name, default_p, next) \
+{ \
+ 32, /* 32 bits in a word */ \
+ 32, /* 32 bits in an address */ \
+ 8, /* 8 bits in a byte */ \
+ bfd_arch_arc, \
+ mach, \
+ "arc", \
+ print_name, \
+ 4, /* section alignment power */ \
+ default_p, \
+ bfd_default_compatible, \
+ bfd_default_scan, \
+ next, \
+ }
+
+#if 0 /* ??? Not currently needed, but keep in for future reference. */
+static const bfd_arch_info_type arch_info_struct[] =
+{
+ ARC (bfd_mach_arc_foo, "arc-foo", false, &arch_info_struct[1]),
+ ARC (bfd_mach_arc_bar, "arc-bar", false, 0),
+};
+#endif
+
+const bfd_arch_info_type bfd_arc_arch =
+ ARC (bfd_mach_arc_base, "arc-base", true, 0 /*&arch_info_struct[0]*/);
+
+/* Utility routines. */
+
+/* Given cpu type NAME, return its bfd_mach_arc_xxx value.
+ Returns -1 if not found. */
+
+int
+arc_get_mach (name)
+ char *name;
+{
+ const bfd_arch_info_type *p;
+
+ for (p = &bfd_arc_arch; p != NULL; p = p->next)
+ {
+ /* +4: skip over "arc-" */
+ if (strcmp (name, p->printable_name + 4) == 0)
+ return p->mach;
+ }
+ return -1;
+}
diff --git a/contrib/binutils/bfd/cpu-sh.c b/contrib/binutils/bfd/cpu-sh.c
index 7f6dd68..9f7ef20 100644
--- a/contrib/binutils/bfd/cpu-sh.c
+++ b/contrib/binutils/bfd/cpu-sh.c
@@ -23,15 +23,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libbfd.h"
-int bfd_default_scan_num_mach();
-
static boolean
scan_mach (info, string)
const struct bfd_arch_info *info;
const char *string;
{
- if (strcmp(string,"sh") == 0) return true;
- if (strcmp(string,"SH") == 0) return true;
+ if (strcasecmp (info->printable_name, string) == 0)
+ return true;
return false;
}
@@ -51,18 +49,69 @@ compatible (a,b)
}
#endif
+#define SH_NEXT &arch_info_struct[0]
+#define SH3_NEXT &arch_info_struct[1]
+#define SH3E_NEXT &arch_info_struct[2]
+#define SH4_NEXT NULL
+
+static const bfd_arch_info_type arch_info_struct[] =
+{
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_sh,
+ bfd_mach_sh3,
+ "sh", /* arch_name */
+ "sh3", /* printable name */
+ 1,
+ false, /* not the default */
+ bfd_default_compatible,
+ scan_mach,
+ SH3_NEXT
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_sh,
+ bfd_mach_sh3e,
+ "sh", /* arch_name */
+ "sh3e", /* printable name */
+ 1,
+ false, /* not the default */
+ bfd_default_compatible,
+ scan_mach,
+ SH3E_NEXT
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_sh,
+ bfd_mach_sh4,
+ "sh", /* arch_name */
+ "sh4", /* printable name */
+ 1,
+ false, /* not the default */
+ bfd_default_compatible,
+ scan_mach,
+ SH4_NEXT
+ },
+};
+
const bfd_arch_info_type bfd_sh_arch =
{
32, /* 32 bits in a word */
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_sh,
- 0, /* only 1 machine */
+ bfd_mach_sh,
"sh", /* arch_name */
"sh", /* printable name */
1,
true, /* the default machine */
bfd_default_compatible,
scan_mach,
- 0,
+ SH_NEXT
};
diff --git a/contrib/binutils/bfd/cpu-tic30.c b/contrib/binutils/bfd/cpu-tic30.c
new file mode 100644
index 0000000..dd723f7
--- /dev/null
+++ b/contrib/binutils/bfd/cpu-tic30.c
@@ -0,0 +1,39 @@
+/* BFD support for the Texas Instruments TMS320C30 architecture.
+ Copyright 1998 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+
+const bfd_arch_info_type bfd_tic30_arch =
+{
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_tic30,
+ 0, /* only 1 machine */
+ "tic30",
+ "tms320c30",
+ 2,
+ true, /* the one and only */
+ bfd_default_compatible,
+ bfd_default_scan,
+ 0,
+};
diff --git a/contrib/binutils/bfd/cpu-v850.c b/contrib/binutils/bfd/cpu-v850.c
new file mode 100644
index 0000000..df97bc9
--- /dev/null
+++ b/contrib/binutils/bfd/cpu-v850.c
@@ -0,0 +1,94 @@
+/* BFD support for the NEC V850 processor
+ Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+
+#include <ctype.h>
+
+static boolean
+scan (info, string)
+ const struct bfd_arch_info * info;
+ const char * string;
+{
+ const char *ptr_src;
+ const char *ptr_tst;
+ unsigned long number;
+ enum bfd_architecture arch;
+
+ /* First test for an exact match */
+ if (strcasecmp (string, info->printable_name) == 0)
+ return true;
+
+ /* See how much of the supplied string matches with the
+ architecture, eg the string m68k:68020 would match the m68k entry
+ up to the :, then we get left with the machine number */
+
+ for (ptr_src = string, ptr_tst = info->arch_name;
+ *ptr_src && *ptr_tst;
+ ptr_src++, ptr_tst++)
+ {
+ if (*ptr_src != *ptr_tst) break;
+ }
+
+ /* Chewed up as much of the architecture as will match, skip any
+ colons */
+ if (*ptr_src == ':')
+ ptr_src++;
+
+ if (*ptr_src == 0)
+ {
+ /* nothing more, then only keep this one if it is the default
+ machine for this architecture */
+ return info->the_default;
+ }
+
+ number = 0;
+ while (isdigit ((unsigned char) *ptr_src))
+ {
+ number = number * 10 + * ptr_src - '0';
+ ptr_src++;
+ }
+
+ switch (number)
+ {
+
+ default:
+ return false;
+ }
+
+ if (arch != info->arch)
+ return false;
+
+ if (number != info->mach)
+ return false;
+
+ return true;
+}
+
+#define N(number, print, default, next) \
+{ 32, 32, 8, bfd_arch_v850, number, "v850", print, 2, default, \
+ bfd_default_compatible, scan, next }
+
+#define NEXT NULL
+
+
+const bfd_arch_info_type bfd_v850_arch =
+ N (bfd_mach_v850, "v850", true, NEXT);
diff --git a/contrib/binutils/bfd/dep-in.sed b/contrib/binutils/bfd/dep-in.sed
index 5a48285..444dde0 100644
--- a/contrib/binutils/bfd/dep-in.sed
+++ b/contrib/binutils/bfd/dep-in.sed
@@ -3,6 +3,7 @@
s/\\\n */ /g
t loop
+s!\.o:!.lo:!
s! @BFD_H@!!g
s!@INCDIR@!$(INCDIR)!g
s!@SRCDIR@/!!g
diff --git a/contrib/binutils/bfd/doc/ChangeLog b/contrib/binutils/bfd/doc/ChangeLog
index 7e46efc..871299c 100644
--- a/contrib/binutils/bfd/doc/ChangeLog
+++ b/contrib/binutils/bfd/doc/ChangeLog
@@ -1,3 +1,78 @@
+Mon Apr 6 14:06:55 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (STAGESTUFF): Remove variable.
+ (CLEANFILES): Don't remove $(STAGESTUFF).
+ (DISTCLEANFILES, MAINTAINERCLEANFILES): New variables.
+ * Makefile.in: Rebuild.
+
+Fri Mar 27 16:25:25 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * chew.c (skip_white_and_starts): Remove unused declaration.
+ (skip_white_and_stars): Add casts to avoid warnings.
+ (skip_trailing_newlines, paramstuff, courierize): Likewise.
+ (bulletize, do_fancy_stuff, iscommand): Likewise.
+ (kill_bogus_lines, nextword, main): Likewise.
+ (manglecomments): Comment out.
+ (outputdots, kill_bogus_lines): Remove unused local variables.
+ (perform, compile): Likewise.
+ (courierize): Fully parenthesize expression.
+ (copy_past_newline): Declare return value.
+ (print): Change printf format string.
+ (main): Call usage for an unrecognized option.
+
+Fri Feb 13 14:37:14 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Define.
+ * Makefile.in: Rebuild.
+
+Mon Jan 26 15:38:36 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * doc.str (bodytext): Don't output @* at the end.
+ * chew.c (kill_bogus_lines): Make sure that a period at the
+ beginning is recognized.
+ (indent): Don't put indentation at the end.
+ (copy_past_newline): Expand tabs.
+ * Makefile.am (s-reloc, s-syms): Depend on doc.str.
+ * Makefile.in: Rebuild.
+
+Wed Oct 1 14:41:28 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (libbfd.h): Don't use cpu-h8300.c, cpu-i960.c, or
+ elfcode.h as input files; they don't contribute anything.
+ * Makefile.in: Rebuild.
+
+Fri Aug 15 04:55:15 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.am (libbfd.h, libcoff.h): Invoke $(MKDOC) as ./$(MKDOC).
+ * Makefile.in: Rebuild.
+
+Fri Aug 1 12:59:58 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (CC_FOR_BUILD): Don't set explicitly.
+ * Makefile.in: Rebuild.
+
+Thu Jul 31 20:00:12 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am: New file, based on old Makefile.in.
+ * Makefile.in: Now built with automake.
+
+Tue Jul 22 14:44:00 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
+
+ * Makefile.in: Change stamp-* files to s-* files. Use bfdt.texi
+ rather than bfd.texi.
+ (DOCFILES): Change bfd.texi to bfdt.texi.
+ * bfd.texinfo: Include bfdt.texi, not bfd.texi.
+
+Mon Jun 16 15:33:15 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (CC, CFLAGS): Substitute from configure script.
+ From Jeff Makey <jeff@cts.com>.
+
+Tue Apr 15 12:37:41 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (install-info): Use mkinstalldirs to build
+ $(infodir).
+
Tue Apr 8 12:49:46 1997 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in (install-info): Permit info files to be in srcdir.
diff --git a/contrib/binutils/bfd/doc/Makefile.am b/contrib/binutils/bfd/doc/Makefile.am
new file mode 100644
index 0000000..7588273
--- /dev/null
+++ b/contrib/binutils/bfd/doc/Makefile.am
@@ -0,0 +1,248 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+DOCFILES = aoutx.texi archive.texi archures.texi \
+ bfdt.texi cache.texi coffcode.texi \
+ core.texi elf.texi elfcode.texi format.texi libbfd.texi \
+ opncls.texi reloc.texi section.texi \
+ syms.texi targets.texi init.texi hash.texi linker.texi
+
+PROTOS = archive.p archures.p bfd.p \
+ core.p format.p \
+ libbfd.p opncls.p reloc.p \
+ section.p syms.p targets.p \
+ format.p core.p init.p
+
+IPROTOS = cache.ip libbfd.ip reloc.ip init.ip archures.ip coffcode.ip
+
+# SRCDOC, SRCPROT, SRCIPROT only used to sidestep Sun Make bug in interaction
+# between VPATH and suffix rules. If you use GNU Make, perhaps other Makes,
+# you don't need these three:
+SRCDOC = $(srcdir)/../aoutx.h $(srcdir)/../archive.c \
+ $(srcdir)/../archures.c $(srcdir)/../bfd.c \
+ $(srcdir)/../cache.c $(srcdir)/../coffcode.h \
+ $(srcdir)/../corefile.c $(srcdir)/../elf.c \
+ $(srcdir)/../elfcode.h $(srcdir)/../format.c \
+ $(srcdir)/../libbfd.c $(srcdir)/../opncls.c \
+ $(srcdir)/../reloc.c $(srcdir)/../section.c \
+ $(srcdir)/../syms.c $(srcdir)/../targets.c \
+ $(srcdir)/../hash.c $(srcdir)/../linker.c
+
+SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
+ $(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c \
+ $(srcdir)/../format.c $(srcdir)/../libbfd.c \
+ $(srcdir)/../opncls.c $(srcdir)/../reloc.c \
+ $(srcdir)/../section.c $(srcdir)/../syms.c \
+ $(srcdir)/../targets.c $(srcdir)/../init.c
+
+SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
+ $(srcdir)/../reloc.c $(srcdir)/../cpu-h8300.c \
+ $(srcdir)/../cpu-i960.c $(srcdir)/../archures.c \
+ $(srcdir)/../init.c
+
+TEXIDIR = $(srcdir)/../../texinfo/fsf
+
+info_TEXINFOS = bfd.texinfo
+
+MKDOC = chew$(EXEEXT_FOR_BUILD)
+
+$(MKDOC): chew.o
+ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS)
+
+chew.o: chew.c
+ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
+
+protos: libbfd.h libcoff.h bfd.h
+
+bfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
+
+# We can't replace these rules with an implicit rule, because
+# makes without VPATH support couldn't find the .h files in `..'.
+
+# We use s-XXX targets so that we can distribute the info files,
+# and permit people to rebuild them, without requiring the makeinfo
+# program. If somebody tries to rebuild info, but none of the .texi
+# files have changed, then this Makefile will build chew, and will
+# build all of the stamp files, but will not actually have to rebuild
+# bfd.info.
+
+s-aoutx: $(MKDOC) $(srcdir)/../aoutx.h $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
+ $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
+ touch s-aoutx
+aoutx.texi: s-aoutx
+
+s-archive: $(MKDOC) $(srcdir)/../archive.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
+ $(srcdir)/../../move-if-change archive.tmp archive.texi
+ touch s-archive
+archive.texi: s-archive
+
+s-archures: $(MKDOC) $(srcdir)/../archures.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
+ $(srcdir)/../../move-if-change archures.tmp archures.texi
+ touch s-archures
+archures.texi: s-archures
+
+# We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
+# bfd.texinfo on an 8.3 filesystem.
+s-bfd: $(MKDOC) $(srcdir)/../bfd.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
+ $(srcdir)/../../move-if-change bfd.tmp bfdt.texi
+ touch s-bfd
+bfdt.texi: s-bfd
+
+s-cache: $(MKDOC) $(srcdir)/../cache.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
+ $(srcdir)/../../move-if-change cache.tmp cache.texi
+ touch s-cache
+cache.texi: s-cache
+
+s-coffcode: $(MKDOC) $(srcdir)/../coffcode.h $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
+ $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
+ touch s-coffcode
+coffcode.texi: s-coffcode
+
+s-core: $(MKDOC) $(srcdir)/../corefile.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
+ $(srcdir)/../../move-if-change core.tmp core.texi
+ touch s-core
+core.texi: s-core
+
+s-elf: $(MKDOC) $(srcdir)/../elf.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
+ $(srcdir)/../../move-if-change elf.tmp elf.texi
+ touch s-elf
+elf.texi: s-elf
+
+s-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
+ $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
+ touch s-elfcode
+elfcode.texi: s-elfcode
+
+s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
+ $(srcdir)/../../move-if-change format.tmp format.texi
+ touch s-format
+format.texi: s-format
+
+s-libbfd: $(MKDOC) $(srcdir)/../libbfd.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
+ $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
+ touch s-libbfd
+libbfd.texi: s-libbfd
+
+s-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../opncls.c >opncls.tmp
+ $(srcdir)/../../move-if-change opncls.tmp opncls.texi
+ touch s-opncls
+opncls.texi: s-opncls
+
+s-reloc: $(MKDOC) $(srcdir)/../reloc.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../reloc.c >reloc.tmp
+ $(srcdir)/../../move-if-change reloc.tmp reloc.texi
+ touch s-reloc
+reloc.texi: s-reloc
+
+s-section: $(MKDOC) $(srcdir)/../section.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
+ $(srcdir)/../../move-if-change section.tmp section.texi
+ touch s-section
+section.texi: s-section
+
+s-syms: $(MKDOC) $(srcdir)/../syms.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
+ $(srcdir)/../../move-if-change syms.tmp syms.texi
+ touch s-syms
+syms.texi: s-syms
+
+s-targets: $(MKDOC) $(srcdir)/../targets.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
+ $(srcdir)/../../move-if-change targets.tmp targets.texi
+ touch s-targets
+targets.texi: s-targets
+
+s-init: $(MKDOC) $(srcdir)/../init.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
+ $(srcdir)/../../move-if-change init.tmp init.texi
+ touch s-init
+init.texi: s-init
+
+s-hash: $(MKDOC) $(srcdir)/../hash.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
+ $(srcdir)/../../move-if-change hash.tmp hash.texi
+ touch s-hash
+hash.texi: s-hash
+
+s-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
+ $(srcdir)/../../move-if-change linker.tmp linker.texi
+ touch s-linker
+linker.texi: s-linker
+
+libbfd.h: $(srcdir)/../libbfd-in.h \
+ $(srcdir)/../init.c \
+ $(srcdir)/../libbfd.c \
+ $(srcdir)/../cache.c \
+ $(srcdir)/../reloc.c \
+ $(srcdir)/../archures.c \
+ $(srcdir)/proto.str \
+ $(MKDOC)
+ cat $(srcdir)/../libbfd-in.h >libbfd.h
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../init.c >>libbfd.h
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../libbfd.c >>libbfd.h
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cache.c >>libbfd.h
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../reloc.c >>libbfd.h
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../archures.c >>libbfd.h
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../elf.c >>libbfd.h
+
+libcoff.h: $(srcdir)/../libcoff-in.h \
+ $(srcdir)/../coffcode.h \
+ $(srcdir)/proto.str \
+ $(MKDOC)
+ cat $(srcdir)/../libcoff-in.h >libcoff.h
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../coffcode.h >>libcoff.h
+
+bfd.h: $(srcdir)/../bfd-in.h \
+ $(srcdir)/../init.c \
+ $(srcdir)/../opncls.c \
+ $(srcdir)/../libbfd.c \
+ $(srcdir)/../section.c \
+ $(srcdir)/../archures.c \
+ $(srcdir)/../reloc.c \
+ $(srcdir)/../syms.c \
+ $(srcdir)/../bfd.c \
+ $(srcdir)/../archive.c \
+ $(srcdir)/../corefile.c \
+ $(srcdir)/../targets.c \
+ $(srcdir)/../format.c \
+ $(srcdir)/proto.str \
+ $(MKDOC)
+ cat $(srcdir)/../bfd-in.h >bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../init.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../opncls.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../libbfd.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../section.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archures.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../reloc.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../syms.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../bfd.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archive.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../corefile.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../targets.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../format.c >>bfd.h
+ echo "#ifdef __cplusplus" >>bfd.h
+ echo "}" >>bfd.h
+ echo "#endif" >>bfd.h
+ echo "#endif" >>bfd.h
+
+MOSTLYCLEANFILES = $(MKDOC) *.o
+
+CLEANFILES = s-* *.p *.ip
+
+DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
+
+MAINTAINERCLEANFILES = $(DOCFILES)
diff --git a/contrib/binutils/bfd/doc/Makefile.in b/contrib/binutils/bfd/doc/Makefile.in
index b7ecd8e..cc1a092 100644
--- a/contrib/binutils/bfd/doc/Makefile.in
+++ b/contrib/binutils/bfd/doc/Makefile.in
@@ -1,66 +1,98 @@
-#
-# Makefile
-# Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
+# Makefile.in generated automatically by automake 1.2e from Makefile.am
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
-VPATH = @srcdir@
-srcdir = @srcdir@
-prefix = @prefix@
+SHELL = @SHELL@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
exec_prefix = @exec_prefix@
-bindir = @bindir@
-libdir = @libdir@
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
datadir = @datadir@
-mandir = @mandir@
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
infodir = @infodir@
+mandir = @mandir@
includedir = @includedir@
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
-MKDOC=./chew
-SHELL = /bin/sh
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
-
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
-CFLAGS = -g
-
-CC_FOR_BUILD = $(CC)
-
-#### Host, target, and site specific Makefile fragments come in here.
-###
-
-.c.o:
- $(CC) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include $(H_CFLAGS) $(CFLAGS) $<
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AR = @AR@
+BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@
+BFD_HOST_64_BIT = @BFD_HOST_64_BIT@
+BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@
+BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@
+CC = @CC@
+CC_FOR_BUILD = @CC_FOR_BUILD@
+COREFILE = @COREFILE@
+COREFLAG = @COREFLAG@
+EXEEXT = @EXEEXT@
+EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
+HDEFINES = @HDEFINES@
+LD = @LD@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NM = @NM@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+TDEFINES = @TDEFINES@
+VERSION = @VERSION@
+all_backends = @all_backends@
+bfd_backends = @bfd_backends@
+bfd_machines = @bfd_machines@
+tdefaults = @tdefaults@
+wordsize = @wordsize@
+
+AUTOMAKE_OPTIONS = cygnus
DOCFILES = aoutx.texi archive.texi archures.texi \
- bfd.texi cache.texi coffcode.texi \
+ bfdt.texi cache.texi coffcode.texi \
core.texi elf.texi elfcode.texi format.texi libbfd.texi \
opncls.texi reloc.texi section.texi \
syms.texi targets.texi init.texi hash.texi linker.texi
@@ -98,27 +130,213 @@ SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
$(srcdir)/../cpu-i960.c $(srcdir)/../archures.c \
$(srcdir)/../init.c
-STAGESTUFF = $(DOCFILES) *.info*
-
TEXIDIR = $(srcdir)/../../texinfo/fsf
-all install:
+info_TEXINFOS = bfd.texinfo
+
+MKDOC = chew$(EXEEXT_FOR_BUILD)
+
+MOSTLYCLEANFILES = $(MKDOC) *.o
-info: bfd.info
+CLEANFILES = s-* *.p *.ip
-dvi: bfd.dvi
+DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
-install-info: info
- if [ -r bfd.info ]; then \
- dir=.; \
- else \
- dir=$(srcdir); \
- fi; \
- for i in `cd $$dir; echo *.info*`; do \
- $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i; \
+MAINTAINERCLEANFILES = $(DOCFILES)
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi`
+TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
+INFO_DEPS = bfd.info
+DVIS = bfd.dvi
+TEXINFOS = bfd.texinfo
+DIST_COMMON = ChangeLog Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP = --best
+default: all
+
+.SUFFIXES:
+.SUFFIXES: .dvi .info .ps .texi .texinfo
+$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+bfd.info: bfd.texinfo
+bfd.dvi: bfd.texinfo
+
+
+DVIPS = dvips
+
+.texi.info:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texi.dvi:
+ TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.texi:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texinfo.info:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texinfo:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texinfo.dvi:
+ TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+.dvi.ps:
+ $(DVIPS) $< -o $@
+
+install-info-am: $(INFO_DEPS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(infodir)
+ @for file in $(INFO_DEPS); do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
+ if test -f $$d/$$ifile; then \
+ echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \
+ $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
+ else : ; fi; \
+ done; \
+ done
+ @$(POST_INSTALL)
+ @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+ for file in $(INFO_DEPS); do \
+ echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
+ install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
+ done; \
+ else : ; fi
+
+uninstall-info:
+ $(PRE_UNINSTALL)
+ @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+ ii=yes; \
+ else ii=; fi; \
+ for file in $(INFO_DEPS); do \
+ test -z "$ii" \
+ || install-info --info-dir=$(infodir) --remove $$file; \
done
+ $(NORMAL_UNINSTALL)
+ for file in $(INFO_DEPS); do \
+ (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+ done
+
+dist-info: $(INFO_DEPS)
+ for base in $(INFO_DEPS); do \
+ if test -f $$base; then d=.; else d=$(srcdir); fi; \
+ for file in `cd $$d && eval echo $$base*`; do \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
+ done; \
+ done
+
+mostlyclean-aminfo:
+ -rm -f bfd.aux bfd.cp bfd.cps bfd.dvi bfd.fn bfd.fns bfd.ky bfd.kys \
+ bfd.ps bfd.log bfd.pg bfd.toc bfd.tp bfd.tps bfd.vr bfd.vrs \
+ bfd.op bfd.tr bfd.cv bfd.cn
+
+clean-aminfo:
+
+distclean-aminfo:
+
+maintainer-clean-aminfo:
+ for i in $(INFO_DEPS); do \
+ rm -f $$i; \
+ if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
+ rm -f $$i-[0-9]*; \
+ fi; \
+ done
+clean-info: mostlyclean-aminfo
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = doc
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
+ done
+ $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
+info: $(INFO_DEPS)
+dvi: $(DVIS)
+check:
+ $(MAKE)
+installcheck:
+install-info: install-info-am
+install-exec:
+ @$(NORMAL_INSTALL)
+
+install-data:
+ @$(NORMAL_INSTALL)
+
+install: install-exec install-data all
+ @:
+
+uninstall:
+
+all: Makefile
+
+install-strip:
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+installdirs:
+
+
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean: mostlyclean-aminfo mostlyclean-generic
+
+clean: clean-aminfo clean-generic mostlyclean
+
+distclean: distclean-aminfo distclean-generic clean
+ -rm -f config.status
+ -rm -f libtool
+
+maintainer-clean: maintainer-clean-aminfo maintainer-clean-generic \
+ distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+.PHONY: default install-info-am uninstall-info mostlyclean-aminfo \
+distclean-aminfo clean-aminfo maintainer-clean-aminfo tags distdir info \
+dvi installcheck install-info install-exec install-data install \
+uninstall all installdirs mostlyclean-generic distclean-generic \
+clean-generic maintainer-clean-generic clean mostlyclean distclean \
+maintainer-clean
-docs: $(MKDOC) protos bfd.info bfd.dvi bfd.ps
$(MKDOC): chew.o
$(CC_FOR_BUILD) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS)
@@ -128,159 +346,156 @@ chew.o: chew.c
protos: libbfd.h libcoff.h bfd.h
+bfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
# We can't replace these rules with an implicit rule, because
# makes without VPATH support couldn't find the .h files in `..'.
-# We use stamp-XXX targets so that we can distribute the info files,
+# We use s-XXX targets so that we can distribute the info files,
# and permit people to rebuild them, without requiring the makeinfo
# program. If somebody tries to rebuild info, but none of the .texi
# files have changed, then this Makefile will build chew, and will
# build all of the stamp files, but will not actually have to rebuild
# bfd.info.
-stamp-aoutx: $(MKDOC) $(srcdir)/../aoutx.h $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
+s-aoutx: $(MKDOC) $(srcdir)/../aoutx.h $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
$(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
- touch stamp-aoutx
-aoutx.texi: stamp-aoutx
+ touch s-aoutx
+aoutx.texi: s-aoutx
-stamp-archive: $(MKDOC) $(srcdir)/../archive.c $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
+s-archive: $(MKDOC) $(srcdir)/../archive.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
$(srcdir)/../../move-if-change archive.tmp archive.texi
- touch stamp-archive
-archive.texi: stamp-archive
+ touch s-archive
+archive.texi: s-archive
-stamp-archures: $(MKDOC) $(srcdir)/../archures.c $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
+s-archures: $(MKDOC) $(srcdir)/../archures.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
$(srcdir)/../../move-if-change archures.tmp archures.texi
- touch stamp-archures
-archures.texi: stamp-archures
-
-stamp-bfd: $(MKDOC) $(srcdir)/../bfd.c $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
- $(srcdir)/../../move-if-change bfd.tmp bfd.texi
- touch stamp-bfd
-bfd.texi: stamp-bfd
-
-stamp-cache: $(MKDOC) $(srcdir)/../cache.c $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
+ touch s-archures
+archures.texi: s-archures
+
+# We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
+# bfd.texinfo on an 8.3 filesystem.
+s-bfd: $(MKDOC) $(srcdir)/../bfd.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
+ $(srcdir)/../../move-if-change bfd.tmp bfdt.texi
+ touch s-bfd
+bfdt.texi: s-bfd
+
+s-cache: $(MKDOC) $(srcdir)/../cache.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
$(srcdir)/../../move-if-change cache.tmp cache.texi
- touch stamp-cache
-cache.texi: stamp-cache
+ touch s-cache
+cache.texi: s-cache
-stamp-coffcode: $(MKDOC) $(srcdir)/../coffcode.h $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
+s-coffcode: $(MKDOC) $(srcdir)/../coffcode.h $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
$(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
- touch stamp-coffcode
-coffcode.texi: stamp-coffcode
+ touch s-coffcode
+coffcode.texi: s-coffcode
-stamp-core: $(MKDOC) $(srcdir)/../corefile.c $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
+s-core: $(MKDOC) $(srcdir)/../corefile.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
$(srcdir)/../../move-if-change core.tmp core.texi
- touch stamp-core
-core.texi: stamp-core
+ touch s-core
+core.texi: s-core
-stamp-elf: $(MKDOC) $(srcdir)/../elf.c $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
+s-elf: $(MKDOC) $(srcdir)/../elf.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
$(srcdir)/../../move-if-change elf.tmp elf.texi
- touch stamp-elf
-elf.texi: stamp-elf
+ touch s-elf
+elf.texi: s-elf
-stamp-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
+s-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
$(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
- touch stamp-elfcode
-elfcode.texi: stamp-elfcode
+ touch s-elfcode
+elfcode.texi: s-elfcode
-stamp-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
+s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
$(srcdir)/../../move-if-change format.tmp format.texi
- touch stamp-format
-format.texi: stamp-format
+ touch s-format
+format.texi: s-format
-stamp-libbfd: $(MKDOC) $(srcdir)/../libbfd.c $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
+s-libbfd: $(MKDOC) $(srcdir)/../libbfd.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
$(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
- touch stamp-libbfd
-libbfd.texi: stamp-libbfd
+ touch s-libbfd
+libbfd.texi: s-libbfd
-stamp-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../opncls.c >opncls.tmp
+s-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../opncls.c >opncls.tmp
$(srcdir)/../../move-if-change opncls.tmp opncls.texi
- touch stamp-opncls
-opncls.texi: stamp-opncls
+ touch s-opncls
+opncls.texi: s-opncls
-stamp-reloc: $(MKDOC) $(srcdir)/../reloc.c
- $(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../reloc.c >reloc.tmp
+s-reloc: $(MKDOC) $(srcdir)/../reloc.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../reloc.c >reloc.tmp
$(srcdir)/../../move-if-change reloc.tmp reloc.texi
- touch stamp-reloc
-reloc.texi: stamp-reloc
+ touch s-reloc
+reloc.texi: s-reloc
-stamp-section: $(MKDOC) $(srcdir)/../section.c $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
+s-section: $(MKDOC) $(srcdir)/../section.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
$(srcdir)/../../move-if-change section.tmp section.texi
- touch stamp-section
-section.texi: stamp-section
+ touch s-section
+section.texi: s-section
-stamp-syms: $(MKDOC) $(srcdir)/../syms.c
- $(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
+s-syms: $(MKDOC) $(srcdir)/../syms.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
$(srcdir)/../../move-if-change syms.tmp syms.texi
- touch stamp-syms
-syms.texi: stamp-syms
+ touch s-syms
+syms.texi: s-syms
-stamp-targets: $(MKDOC) $(srcdir)/../targets.c $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
+s-targets: $(MKDOC) $(srcdir)/../targets.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
$(srcdir)/../../move-if-change targets.tmp targets.texi
- touch stamp-targets
-targets.texi: stamp-targets
+ touch s-targets
+targets.texi: s-targets
-stamp-init: $(MKDOC) $(srcdir)/../init.c $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
+s-init: $(MKDOC) $(srcdir)/../init.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
$(srcdir)/../../move-if-change init.tmp init.texi
- touch stamp-init
-init.texi: stamp-init
+ touch s-init
+init.texi: s-init
-stamp-hash: $(MKDOC) $(srcdir)/../hash.c $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
+s-hash: $(MKDOC) $(srcdir)/../hash.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
$(srcdir)/../../move-if-change hash.tmp hash.texi
- touch stamp-hash
-hash.texi: stamp-hash
+ touch s-hash
+hash.texi: s-hash
-stamp-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
- $(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
+s-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
$(srcdir)/../../move-if-change linker.tmp linker.texi
- touch stamp-linker
-linker.texi: stamp-linker
+ touch s-linker
+linker.texi: s-linker
libbfd.h: $(srcdir)/../libbfd-in.h \
$(srcdir)/../init.c \
$(srcdir)/../libbfd.c \
$(srcdir)/../cache.c \
$(srcdir)/../reloc.c \
- $(srcdir)/../cpu-h8300.c \
- $(srcdir)/../cpu-i960.c \
$(srcdir)/../archures.c \
- $(srcdir)/../elfcode.h \
$(srcdir)/proto.str \
$(MKDOC)
cat $(srcdir)/../libbfd-in.h >libbfd.h
- $(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../init.c >>libbfd.h
- $(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../libbfd.c >>libbfd.h
- $(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cache.c >>libbfd.h
- $(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../reloc.c >>libbfd.h
- $(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cpu-h8300.c >>libbfd.h
- $(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cpu-i960.c >>libbfd.h
- $(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../archures.c >>libbfd.h
- $(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../elf.c >>libbfd.h
- $(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../elfcode.h >>libbfd.h
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../init.c >>libbfd.h
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../libbfd.c >>libbfd.h
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cache.c >>libbfd.h
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../reloc.c >>libbfd.h
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../archures.c >>libbfd.h
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../elf.c >>libbfd.h
libcoff.h: $(srcdir)/../libcoff-in.h \
$(srcdir)/../coffcode.h \
$(srcdir)/proto.str \
$(MKDOC)
cat $(srcdir)/../libcoff-in.h >libcoff.h
- $(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../coffcode.h >>libcoff.h
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../coffcode.h >>libcoff.h
bfd.h: $(srcdir)/../bfd-in.h \
$(srcdir)/../init.c \
@@ -298,84 +513,23 @@ bfd.h: $(srcdir)/../bfd-in.h \
$(srcdir)/proto.str \
$(MKDOC)
cat $(srcdir)/../bfd-in.h >bfd.h
- $(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../init.c >>bfd.h
- $(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../opncls.c >>bfd.h
- $(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../libbfd.c >>bfd.h
- $(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../section.c >>bfd.h
- $(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archures.c >>bfd.h
- $(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../reloc.c >>bfd.h
- $(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../syms.c >>bfd.h
- $(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../bfd.c >>bfd.h
- $(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archive.c >>bfd.h
- $(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../corefile.c >>bfd.h
- $(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../targets.c >>bfd.h
- $(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../format.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../init.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../opncls.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../libbfd.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../section.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archures.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../reloc.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../syms.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../bfd.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archive.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../corefile.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../targets.c >>bfd.h
+ ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../format.c >>bfd.h
echo "#ifdef __cplusplus" >>bfd.h
echo "}" >>bfd.h
echo "#endif" >>bfd.h
echo "#endif" >>bfd.h
-
-clean-info: clean
-
-mostlyclean:
- rm -rf *.log *.ps *~* *.dvi *# $(MKDOC) *.o
-
-clean: mostlyclean
- rm -rf $(STAGESTUFF) stamp-*
- rm -f *.p *.ip bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
-
-distclean: mostlyclean
- rm -f *.p *.ip bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
- rm -f stamp-*
- rm -f Makefile config.status
-
-maintainer-clean realclean: clean
- rm -f Makefile config.status
-
-bfd.info: $(DOCFILES) bfdsumm.texi bfd.texinfo
- $(MAKEINFO) -I$(srcdir) -o bfd.info $(srcdir)/bfd.texinfo
-
-bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
- $(TEXI2DVI) $(srcdir)/bfd.texinfo
-
-bfd.ps: bfd.dvi
- dvips bfd -o
-
-quickdoc: $(DOCFILES) bfdsumm.texi bfd.texinfo
- TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex bfd.texinfo
-
-stage1: force
- - mkdir stage1
- - mv -f $(STAGESTUFF) stage1
-
-stage2: force
- - mkdir stage2
- - mv -f $(STAGESTUFF) stage2
-
-stage3: force
- - mkdir stage3
- - mv -f $(STAGESTUFF) stage3
-
-against=stage2
-
-comparison: force
- for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i || exit 1 ; done
-
-de-stage1: force
- - (cd stage1 ; mv -f $(STAGESTUFF) ..)
- - rmdir stage1
-
-de-stage2: force
- - (cd stage2 ; mv -f $(STAGESTUFF) ..)
- - rmdir stage2
-
-de-stage3: force
- - (cd stage3 ; mv -f $(STAGESTUFF) ..)
- - rmdir stage3
-
-force:
-
-Makefile: $(srcdir)/Makefile.in
- cd .. && CONFIG_FILES=doc/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/binutils/bfd/doc/aoutx.texi b/contrib/binutils/bfd/doc/aoutx.texi
index a35fe9b..d97e96a 100644
--- a/contrib/binutils/bfd/doc/aoutx.texi
+++ b/contrib/binutils/bfd/doc/aoutx.texi
@@ -1,6 +1,6 @@
@section a.out backends
-@*
+
@strong{Description}@*
BFD supports a number of different flavours of a.out format,
though the major differences are only the sizes of the
@@ -29,33 +29,33 @@ As an example, this is what goes on to make the back end for a
sun4, from @file{aout32.c}:
@example
- #define ARCH_SIZE 32
- #include "aoutx.h"
+ #define ARCH_SIZE 32
+ #include "aoutx.h"
@end example
Which exports names:
@example
- ...
- aout_32_canonicalize_reloc
- aout_32_find_nearest_line
- aout_32_get_lineno
- aout_32_get_reloc_upper_bound
- ...
+ ...
+ aout_32_canonicalize_reloc
+ aout_32_find_nearest_line
+ aout_32_get_lineno
+ aout_32_get_reloc_upper_bound
+ ...
@end example
from @file{sunos.c}:
@example
- #define TARGET_NAME "a.out-sunos-big"
- #define VECNAME sunos_big_vec
- #include "aoutf1.h"
+ #define TARGET_NAME "a.out-sunos-big"
+ #define VECNAME sunos_big_vec
+ #include "aoutf1.h"
@end example
requires all the names from @file{aout32.c}, and produces the jump vector
@example
- sunos_big_vec
+ sunos_big_vec
@end example
The file @file{host-aout.c} is a special case. It is for a large set
@@ -86,18 +86,18 @@ ordinary a.out files on your host. To configure a new machine
to use @file{host-aout.c}, specify:
@example
- TDEFAULTS = -DDEFAULT_VECTOR=host_aout_big_vec
- TDEPFILES= host-aout.o trad-core.o
+ TDEFAULTS = -DDEFAULT_VECTOR=host_aout_big_vec
+ TDEPFILES= host-aout.o trad-core.o
@end example
in the @file{config/@var{XXX}.mt} file, and modify @file{configure.in}
to use the
@file{@var{XXX}.mt} file (by setting "@code{bfd_target=XXX}") when your
configuration is selected.
-@*
+
@subsection Relocations
-@*
+
@strong{Description}@*
The file @file{aoutx.h} provides for both the @emph{standard}
and @emph{extended} forms of a.out relocation records.
@@ -106,15 +106,15 @@ The standard records contain only an
address, a symbol index, and a type field. The extended records
(used on 29ks and sparcs) also have a full integer for an
addend.
-@*
+
@subsection Internal entry points
-@*
+
@strong{Description}@*
@file{aoutx.h} exports several routines for accessing the
contents of an a.out file, which are gathered and exported in
turn by various format specific files (eg sunos.c).
-@*
+
@findex aout_@var{size}_swap_exec_header_in
@subsubsection @code{aout_@var{size}_swap_exec_header_in}
@strong{Synopsis}
@@ -128,7 +128,7 @@ void aout_@var{size}_swap_exec_header_in,
Swap the information in an executable header @var{raw_bytes} taken
from a raw byte stream memory image into the internal exec header
structure @var{execp}.
-@*
+
@findex aout_@var{size}_swap_exec_header_out
@subsubsection @code{aout_@var{size}_swap_exec_header_out}
@strong{Synopsis}
@@ -141,7 +141,7 @@ void aout_@var{size}_swap_exec_header_out
@strong{Description}@*
Swap the information in an internal exec header structure
@var{execp} into the buffer @var{raw_bytes} ready for writing to disk.
-@*
+
@findex aout_@var{size}_some_aout_object_p
@subsubsection @code{aout_@var{size}_some_aout_object_p}
@strong{Synopsis}
@@ -156,7 +156,7 @@ checking is an a.out file. Do some more checking, and set up
for access if it really is. Call back to the calling
environment's "finish up" function just before returning, to
handle any last-minute setup.
-@*
+
@findex aout_@var{size}_mkobject
@subsubsection @code{aout_@var{size}_mkobject}
@strong{Synopsis}
@@ -165,7 +165,7 @@ boolean aout_@var{size}_mkobject, (bfd *abfd);
@end example
@strong{Description}@*
Initialize BFD @var{abfd} for use with a.out files.
-@*
+
@findex aout_@var{size}_machine_type
@subsubsection @code{aout_@var{size}_machine_type}
@strong{Synopsis}
@@ -173,7 +173,7 @@ Initialize BFD @var{abfd} for use with a.out files.
enum machine_type aout_@var{size}_machine_type
(enum bfd_architecture arch,
unsigned long machine));
- @end example
+@end example
@strong{Description}@*
Keep track of machine architecture and machine type for
a.out's. Return the @code{machine_type} for a particular
@@ -182,7 +182,7 @@ and machine can't be represented in a.out format.
If the architecture is understood, machine type 0 (default)
is always understood.
-@*
+
@findex aout_@var{size}_set_arch_mach
@subsubsection @code{aout_@var{size}_set_arch_mach}
@strong{Synopsis}
@@ -191,12 +191,12 @@ boolean aout_@var{size}_set_arch_mach,
(bfd *,
enum bfd_architecture arch,
unsigned long machine));
- @end example
+@end example
@strong{Description}@*
Set the architecture and the machine of the BFD @var{abfd} to the
values @var{arch} and @var{machine}. Verify that @var{abfd}'s format
can support the architecture required.
-@*
+
@findex aout_@var{size}_new_section_hook
@subsubsection @code{aout_@var{size}_new_section_hook}
@strong{Synopsis}
@@ -204,8 +204,8 @@ can support the architecture required.
boolean aout_@var{size}_new_section_hook,
(bfd *abfd,
asection *newsect));
- @end example
+@end example
@strong{Description}@*
Called by the BFD in response to a @code{bfd_make_section}
request.
-@*
+
diff --git a/contrib/binutils/bfd/doc/archive.texi b/contrib/binutils/bfd/doc/archive.texi
index f8d6b89..7e91a16 100644
--- a/contrib/binutils/bfd/doc/archive.texi
+++ b/contrib/binutils/bfd/doc/archive.texi
@@ -1,6 +1,6 @@
@section Archives
-@*
+
@strong{Description}@*
An archive (or library) is just another BFD. It has a symbol
table, although there's not much a user program will do with it.
@@ -49,7 +49,7 @@ spaces and such in filenames anyway, so this shouldn't be much
of a restriction.
Archives are supported in BFD in @code{archive.c}.
-@*
+
@findex bfd_get_next_mapent
@subsubsection @code{bfd_get_next_mapent}
@strong{Synopsis}
@@ -68,7 +68,7 @@ got the last one.
A @code{carsym} is a canonical archive symbol. The only
user-visible element is its name, a null-terminated string.
-@*
+
@findex bfd_set_archive_head
@subsubsection @code{bfd_set_archive_head}
@strong{Synopsis}
@@ -78,7 +78,7 @@ boolean bfd_set_archive_head(bfd *output, bfd *new_head);
@strong{Description}@*
Set the head of the chain of
BFDs contained in the archive @var{output} to @var{new_head}.
-@*
+
@findex bfd_openr_next_archived_file
@subsubsection @code{bfd_openr_next_archived_file}
@strong{Synopsis}
@@ -92,4 +92,4 @@ Subsequent calls should pass
the archive and the previous return value to return a created
BFD to the next contained element. NULL is returned when there
are no more.
-@*
+
diff --git a/contrib/binutils/bfd/doc/archures.texi b/contrib/binutils/bfd/doc/archures.texi
index 2dcc074..c555ea7 100644
--- a/contrib/binutils/bfd/doc/archures.texi
+++ b/contrib/binutils/bfd/doc/archures.texi
@@ -19,11 +19,11 @@ insert as many items into the list of architectures as it wants to;
generally this would be one for each machine and one for the
default case (an item with a machine field of 0).
-BFD's idea of an architecture is implemented in @file{archures.c}.
-@*
+BFD's idea of an architecture is implemented in @file{archures.c}.
+
@subsection bfd_architecture
-@*
+
@strong{Description}@*
This enum gives the object file's CPU architecture, in a
global sense---i.e., what processor family does it belong to?
@@ -38,6 +38,13 @@ enum bfd_architecture
bfd_arch_unknown, /* File arch not known */
bfd_arch_obscure, /* Arch known, not one of these */
bfd_arch_m68k, /* Motorola 68xxx */
+#define bfd_mach_m68000 1
+#define bfd_mach_m68008 2
+#define bfd_mach_m68010 3
+#define bfd_mach_m68020 4
+#define bfd_mach_m68030 5
+#define bfd_mach_m68040 6
+#define bfd_mach_m68060 7
bfd_arch_vax, /* DEC Vax */
bfd_arch_i960, /* Intel 960 */
/* The order of the following is important.
@@ -54,23 +61,37 @@ enum bfd_architecture
#define bfd_mach_i960_mc 4
#define bfd_mach_i960_xa 5
#define bfd_mach_i960_ca 6
-#define bfd_mach_i960_jx 7
+#define bfd_mach_i960_jx 7
#define bfd_mach_i960_hx 8
bfd_arch_a29k, /* AMD 29000 */
bfd_arch_sparc, /* SPARC */
-#define bfd_mach_sparc 1
+#define bfd_mach_sparc 1
/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
-#define bfd_mach_sparc_sparclet 2
-#define bfd_mach_sparc_sparclite 3
-#define bfd_mach_sparc_v8plus 4
-#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */
-#define bfd_mach_sparc_v9 6
-#define bfd_mach_sparc_v9a 7 /* with ultrasparc add'ns */
+#define bfd_mach_sparc_sparclet 2
+#define bfd_mach_sparc_sparclite 3
+#define bfd_mach_sparc_v8plus 4
+#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */
+#define bfd_mach_sparc_v9 6
+#define bfd_mach_sparc_v9a 7 /* with ultrasparc add'ns */
/* Nonzero if MACH has the v9 instruction set. */
#define bfd_mach_sparc_v9_p(mach) \
((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a)
bfd_arch_mips, /* MIPS Rxxxx */
+#define bfd_mach_mips3000 3000
+#define bfd_mach_mips3900 3900
+#define bfd_mach_mips4000 4000
+#define bfd_mach_mips4010 4010
+#define bfd_mach_mips4100 4100
+#define bfd_mach_mips4300 4300
+#define bfd_mach_mips4400 4400
+#define bfd_mach_mips4600 4600
+#define bfd_mach_mips4650 4650
+#define bfd_mach_mips5000 5000
+#define bfd_mach_mips6000 6000
+#define bfd_mach_mips8000 8000
+#define bfd_mach_mips10000 10000
+#define bfd_mach_mips16 16
bfd_arch_i386, /* Intel 386 */
#define bfd_mach_i386_i386 0
#define bfd_mach_i386_i8086 1
@@ -91,24 +112,40 @@ enum bfd_architecture
bfd_arch_hppa, /* HP PA RISC */
bfd_arch_d10v, /* Mitsubishi D10V */
bfd_arch_z8k, /* Zilog Z8000 */
-#define bfd_mach_z8001 1
-#define bfd_mach_z8002 2
+#define bfd_mach_z8001 1
+#define bfd_mach_z8002 2
bfd_arch_h8500, /* Hitachi H8/500 */
bfd_arch_sh, /* Hitachi SH */
+#define bfd_mach_sh 0
+#define bfd_mach_sh3 0x30
+#define bfd_mach_sh3e 0x3e
+#define bfd_mach_sh4 0x40
bfd_arch_alpha, /* Dec Alpha */
bfd_arch_arm, /* Advanced Risc Machines ARM */
+#define bfd_mach_arm_2 1
+#define bfd_mach_arm_2a 2
+#define bfd_mach_arm_3 3
+#define bfd_mach_arm_3M 4
+#define bfd_mach_arm_4 5
+#define bfd_mach_arm_4T 6
bfd_arch_ns32k, /* National Semiconductors ns32000 */
bfd_arch_w65, /* WDC 65816 */
+ bfd_arch_tic30, /* Texas Instruments TMS320C30 */
+ bfd_arch_v850, /* NEC V850 */
+#define bfd_mach_v850 0
+ bfd_arch_arc, /* Argonaut RISC Core */
+#define bfd_mach_arc_base 0
bfd_arch_m32r, /* Mitsubishi M32R/D */
+#define bfd_mach_m32r 0 /* backwards compatibility */
bfd_arch_mn10200, /* Matsushita MN10200 */
bfd_arch_mn10300, /* Matsushita MN10300 */
bfd_arch_last
@};
@end example
-@*
+
@subsection bfd_arch_info
-@*
+
@strong{Description}@*
This structure contains information on architectures for use
within BFD.
@@ -125,17 +162,17 @@ typedef struct bfd_arch_info
const char *printable_name;
unsigned int section_align_power;
/* true if this is the default machine for the architecture */
- boolean the_default;
+ boolean the_default;
const struct bfd_arch_info * (*compatible)
- PARAMS ((const struct bfd_arch_info *a,
- const struct bfd_arch_info *b));
+ PARAMS ((const struct bfd_arch_info *a,
+ const struct bfd_arch_info *b));
boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
const struct bfd_arch_info *next;
@} bfd_arch_info_type;
@end example
-@*
+
@findex bfd_printable_name
@subsubsection @code{bfd_printable_name}
@strong{Synopsis}
@@ -145,7 +182,7 @@ const char *bfd_printable_name(bfd *abfd);
@strong{Description}@*
Return a printable string representing the architecture and machine
from the pointer to the architecture info structure.
-@*
+
@findex bfd_scan_arch
@subsubsection @code{bfd_scan_arch}
@strong{Synopsis}
@@ -156,7 +193,17 @@ const bfd_arch_info_type *bfd_scan_arch(const char *string);
Figure out if BFD supports any cpu which could be described with
the name @var{string}. Return a pointer to an @code{arch_info}
structure if a machine is found, otherwise NULL.
-@*
+
+@findex bfd_arch_list
+@subsubsection @code{bfd_arch_list}
+@strong{Synopsis}
+@example
+const char **bfd_arch_list(void);
+@end example
+@strong{Description}@*
+Return a freshly malloced NULL-terminated vector of the names
+of all the valid BFD architectures. Do not modify the names.
+
@findex bfd_arch_get_compatible
@subsubsection @code{bfd_arch_get_compatible}
@strong{Synopsis}
@@ -171,7 +218,7 @@ architectures and machine types are compatible. Calculates
the lowest common denominator between the two architectures
and machine types implied by the BFDs and returns a pointer to
an @code{arch_info} structure describing the compatible machine.
-@*
+
@findex bfd_default_arch_struct
@subsubsection @code{bfd_default_arch_struct}
@strong{Description}@*
@@ -183,7 +230,7 @@ architecture of the file.
@example
extern const bfd_arch_info_type bfd_default_arch_struct;
@end example
-@*
+
@findex bfd_set_arch_info
@subsubsection @code{bfd_set_arch_info}
@strong{Synopsis}
@@ -192,7 +239,7 @@ void bfd_set_arch_info(bfd *abfd, const bfd_arch_info_type *arg);
@end example
@strong{Description}@*
Set the architecture info of @var{abfd} to @var{arg}.
-@*
+
@findex bfd_default_set_arch_mach
@subsubsection @code{bfd_default_set_arch_mach}
@strong{Synopsis}
@@ -206,7 +253,7 @@ Set the architecture and machine type in BFD @var{abfd}
to @var{arch} and @var{mach}. Find the correct
pointer to a structure and insert it into the @code{arch_info}
pointer.
-@*
+
@findex bfd_get_arch
@subsubsection @code{bfd_get_arch}
@strong{Synopsis}
@@ -216,7 +263,7 @@ enum bfd_architecture bfd_get_arch(bfd *abfd);
@strong{Description}@*
Return the enumerated type which describes the BFD @var{abfd}'s
architecture.
-@*
+
@findex bfd_get_mach
@subsubsection @code{bfd_get_mach}
@strong{Synopsis}
@@ -226,7 +273,7 @@ unsigned long bfd_get_mach(bfd *abfd);
@strong{Description}@*
Return the long type which describes the BFD @var{abfd}'s
machine.
-@*
+
@findex bfd_arch_bits_per_byte
@subsubsection @code{bfd_arch_bits_per_byte}
@strong{Synopsis}
@@ -236,7 +283,7 @@ unsigned int bfd_arch_bits_per_byte(bfd *abfd);
@strong{Description}@*
Return the number of bits in one of the BFD @var{abfd}'s
architecture's bytes.
-@*
+
@findex bfd_arch_bits_per_address
@subsubsection @code{bfd_arch_bits_per_address}
@strong{Synopsis}
@@ -246,7 +293,7 @@ unsigned int bfd_arch_bits_per_address(bfd *abfd);
@strong{Description}@*
Return the number of bits in one of the BFD @var{abfd}'s
architecture's addresses.
-@*
+
@findex bfd_default_compatible
@subsubsection @code{bfd_default_compatible}
@strong{Synopsis}
@@ -257,7 +304,7 @@ const bfd_arch_info_type *bfd_default_compatible
@end example
@strong{Description}@*
The default function for testing for compatibility.
-@*
+
@findex bfd_default_scan
@subsubsection @code{bfd_default_scan}
@strong{Synopsis}
@@ -267,7 +314,7 @@ boolean bfd_default_scan(const struct bfd_arch_info *info, const char *string);
@strong{Description}@*
The default function for working out whether this is an
architecture hit and a machine hit.
-@*
+
@findex bfd_get_arch_info
@subsubsection @code{bfd_get_arch_info}
@strong{Synopsis}
@@ -276,7 +323,7 @@ const bfd_arch_info_type * bfd_get_arch_info(bfd *abfd);
@end example
@strong{Description}@*
Return the architecture info struct in @var{abfd}.
-@*
+
@findex bfd_lookup_arch
@subsubsection @code{bfd_lookup_arch}
@strong{Synopsis}
@@ -291,7 +338,7 @@ Look for the architecure info structure which matches the
arguments @var{arch} and @var{machine}. A machine of 0 matches the
machine/architecture structure which marks itself as the
default.
-@*
+
@findex bfd_printable_arch_mach
@subsubsection @code{bfd_printable_arch_mach}
@strong{Synopsis}
@@ -304,4 +351,4 @@ Return a printable string representing the architecture and
machine type.
This routine is depreciated.
-@*
+
diff --git a/contrib/binutils/bfd/doc/bfd.texinfo b/contrib/binutils/bfd/doc/bfd.texinfo
index af7bc10..dc0f96c 100644
--- a/contrib/binutils/bfd/doc/bfd.texinfo
+++ b/contrib/binutils/bfd/doc/bfd.texinfo
@@ -1,6 +1,6 @@
\input texinfo.tex
@setfilename bfd.info
-@c $Id: bfd.texinfo,v 1.28 1995/11/10 20:04:12 victoria Exp $
+@c $Id: bfd.texinfo,v 1.29 1997/07/22 18:47:29 ian Exp $
@tex
% NOTE LOCAL KLUGE TO AVOID TOO MUCH WHITESPACE
\global\long\def\example{%
@@ -67,7 +67,7 @@ into another language, under the above conditions for modified versions.
@tex
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.28 $} % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.29 $} % For use in headers, footers too
{\parskip=0pt
\hfill Cygnus Support\par
\hfill sac\@cygnus.com\par
@@ -213,7 +213,7 @@ IEEE-695.
@node BFD front end, BFD back ends, Overview, Top
@chapter BFD front end
-@include bfd.texi
+@include bfdt.texi
@menu
* Memory Usage::
diff --git a/contrib/binutils/bfd/doc/bfdt.texi b/contrib/binutils/bfd/doc/bfdt.texi
new file mode 100644
index 0000000..6013d6a
--- /dev/null
+++ b/contrib/binutils/bfd/doc/bfdt.texi
@@ -0,0 +1,597 @@
+@section @code{typedef bfd}
+A BFD has type @code{bfd}; objects of this type are the
+cornerstone of any application using BFD. Using BFD
+consists of making references though the BFD and to data in the BFD.
+
+Here is the structure that defines the type @code{bfd}. It
+contains the major data about the file and pointers
+to the rest of the data.
+
+
+@example
+
+struct _bfd
+@{
+ /* The filename the application opened the BFD with. */
+ CONST char *filename;
+
+ /* A pointer to the target jump table. */
+ const struct bfd_target *xvec;
+
+ /* To avoid dragging too many header files into every file that
+ includes `@code{bfd.h}', IOSTREAM has been declared as a "char
+ *", and MTIME as a "long". Their correct types, to which they
+ are cast when used, are "FILE *" and "time_t". The iostream
+ is the result of an fopen on the filename. However, if the
+ BFD_IN_MEMORY flag is set, then iostream is actually a pointer
+ to a bfd_in_memory struct. */
+ PTR iostream;
+
+ /* Is the file descriptor being cached? That is, can it be closed as
+ needed, and re-opened when accessed later? */
+
+ boolean cacheable;
+
+ /* Marks whether there was a default target specified when the
+ BFD was opened. This is used to select which matching algorithm
+ to use to choose the back end. */
+
+ boolean target_defaulted;
+
+ /* The caching routines use these to maintain a
+ least-recently-used list of BFDs */
+
+ struct _bfd *lru_prev, *lru_next;
+
+ /* When a file is closed by the caching routines, BFD retains
+ state information on the file here: */
+
+ file_ptr where;
+
+ /* and here: (``once'' means at least once) */
+
+ boolean opened_once;
+
+ /* Set if we have a locally maintained mtime value, rather than
+ getting it from the file each time: */
+
+ boolean mtime_set;
+
+ /* File modified time, if mtime_set is true: */
+
+ long mtime;
+
+ /* Reserved for an unimplemented file locking extension.*/
+
+ int ifd;
+
+ /* The format which belongs to the BFD. (object, core, etc.) */
+
+ bfd_format format;
+
+ /* The direction the BFD was opened with*/
+
+ enum bfd_direction @{no_direction = 0,
+ read_direction = 1,
+ write_direction = 2,
+ both_direction = 3@} direction;
+
+ /* Format_specific flags*/
+
+ flagword flags;
+
+ /* Currently my_archive is tested before adding origin to
+ anything. I believe that this can become always an add of
+ origin, with origin set to 0 for non archive files. */
+
+ file_ptr origin;
+
+ /* Remember when output has begun, to stop strange things
+ from happening. */
+ boolean output_has_begun;
+
+ /* Pointer to linked list of sections*/
+ struct sec *sections;
+
+ /* The number of sections */
+ unsigned int section_count;
+
+ /* Stuff only useful for object files:
+ The start address. */
+ bfd_vma start_address;
+
+ /* Used for input and output*/
+ unsigned int symcount;
+
+ /* Symbol table for output BFD (with symcount entries) */
+ struct symbol_cache_entry **outsymbols;
+
+ /* Pointer to structure which contains architecture information*/
+ const struct bfd_arch_info *arch_info;
+
+ /* Stuff only useful for archives:*/
+ PTR arelt_data;
+ struct _bfd *my_archive; /* The containing archive BFD. */
+ struct _bfd *next; /* The next BFD in the archive. */
+ struct _bfd *archive_head; /* The first BFD in the archive. */
+ boolean has_armap;
+
+ /* A chain of BFD structures involved in a link. */
+ struct _bfd *link_next;
+
+ /* A field used by _bfd_generic_link_add_archive_symbols. This will
+ be used only for archive elements. */
+ int archive_pass;
+
+ /* Used by the back end to hold private data. */
+
+ union
+ @{
+ struct aout_data_struct *aout_data;
+ struct artdata *aout_ar_data;
+ struct _oasys_data *oasys_obj_data;
+ struct _oasys_ar_data *oasys_ar_data;
+ struct coff_tdata *coff_obj_data;
+ struct pe_tdata *pe_obj_data;
+ struct xcoff_tdata *xcoff_obj_data;
+ struct ecoff_tdata *ecoff_obj_data;
+ struct ieee_data_struct *ieee_data;
+ struct ieee_ar_data_struct *ieee_ar_data;
+ struct srec_data_struct *srec_data;
+ struct ihex_data_struct *ihex_data;
+ struct tekhex_data_struct *tekhex_data;
+ struct elf_obj_tdata *elf_obj_data;
+ struct nlm_obj_tdata *nlm_obj_data;
+ struct bout_data_struct *bout_data;
+ struct sun_core_struct *sun_core_data;
+ struct trad_core_struct *trad_core_data;
+ struct som_data_struct *som_data;
+ struct hpux_core_struct *hpux_core_data;
+ struct hppabsd_core_struct *hppabsd_core_data;
+ struct sgi_core_struct *sgi_core_data;
+ struct lynx_core_struct *lynx_core_data;
+ struct osf_core_struct *osf_core_data;
+ struct cisco_core_struct *cisco_core_data;
+ struct versados_data_struct *versados_data;
+ struct netbsd_core_struct *netbsd_core_data;
+ PTR any;
+ @} tdata;
+
+ /* Used by the application to hold private data*/
+ PTR usrdata;
+
+ /* Where all the allocated stuff under this BFD goes. This is a
+ struct objalloc *, but we use PTR to avoid requiring the inclusion of
+ objalloc.h. */
+ PTR memory;
+@};
+
+@end example
+@section Error reporting
+Most BFD functions return nonzero on success (check their
+individual documentation for precise semantics). On an error,
+they call @code{bfd_set_error} to set an error condition that callers
+can check by calling @code{bfd_get_error}.
+If that returns @code{bfd_error_system_call}, then check
+@code{errno}.
+
+The easiest way to report a BFD error to the user is to
+use @code{bfd_perror}.
+
+@subsection Type @code{bfd_error_type}
+The values returned by @code{bfd_get_error} are defined by the
+enumerated type @code{bfd_error_type}.
+
+
+@example
+
+typedef enum bfd_error
+@{
+ bfd_error_no_error = 0,
+ bfd_error_system_call,
+ bfd_error_invalid_target,
+ bfd_error_wrong_format,
+ bfd_error_invalid_operation,
+ bfd_error_no_memory,
+ bfd_error_no_symbols,
+ bfd_error_no_armap,
+ bfd_error_no_more_archived_files,
+ bfd_error_malformed_archive,
+ bfd_error_file_not_recognized,
+ bfd_error_file_ambiguously_recognized,
+ bfd_error_no_contents,
+ bfd_error_nonrepresentable_section,
+ bfd_error_no_debug_section,
+ bfd_error_bad_value,
+ bfd_error_file_truncated,
+ bfd_error_file_too_big,
+ bfd_error_invalid_error_code
+@} bfd_error_type;
+
+@end example
+@findex bfd_get_error
+@subsubsection @code{bfd_get_error}
+@strong{Synopsis}
+@example
+bfd_error_type bfd_get_error (void);
+@end example
+@strong{Description}@*
+Return the current BFD error condition.
+
+@findex bfd_set_error
+@subsubsection @code{bfd_set_error}
+@strong{Synopsis}
+@example
+void bfd_set_error (bfd_error_type error_tag);
+@end example
+@strong{Description}@*
+Set the BFD error condition to be @var{error_tag}.
+
+@findex bfd_errmsg
+@subsubsection @code{bfd_errmsg}
+@strong{Synopsis}
+@example
+CONST char *bfd_errmsg (bfd_error_type error_tag);
+@end example
+@strong{Description}@*
+Return a string describing the error @var{error_tag}, or
+the system error if @var{error_tag} is @code{bfd_error_system_call}.
+
+@findex bfd_perror
+@subsubsection @code{bfd_perror}
+@strong{Synopsis}
+@example
+void bfd_perror (CONST char *message);
+@end example
+@strong{Description}@*
+Print to the standard error stream a string describing the
+last BFD error that occurred, or the last system error if
+the last BFD error was a system call failure. If @var{message}
+is non-NULL and non-empty, the error string printed is preceded
+by @var{message}, a colon, and a space. It is followed by a newline.
+
+@subsection BFD error handler
+Some BFD functions want to print messages describing the
+problem. They call a BFD error handler function. This
+function may be overriden by the program.
+
+The BFD error handler acts like printf.
+
+
+@example
+
+typedef void (*bfd_error_handler_type) PARAMS ((const char *, ...));
+
+@end example
+@findex bfd_set_error_handler
+@subsubsection @code{bfd_set_error_handler}
+@strong{Synopsis}
+@example
+bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
+@end example
+@strong{Description}@*
+Set the BFD error handler function. Returns the previous
+function.
+
+@findex bfd_set_error_program_name
+@subsubsection @code{bfd_set_error_program_name}
+@strong{Synopsis}
+@example
+void bfd_set_error_program_name (const char *);
+@end example
+@strong{Description}@*
+Set the program name to use when printing a BFD error. This
+is printed before the error message followed by a colon and
+space. The string must not be changed after it is passed to
+this function.
+
+@findex bfd_get_error_handler
+@subsubsection @code{bfd_get_error_handler}
+@strong{Synopsis}
+@example
+bfd_error_handler_type bfd_get_error_handler (void);
+@end example
+@strong{Description}@*
+Return the BFD error handler function.
+
+@section Symbols
+
+
+@findex bfd_get_reloc_upper_bound
+@subsubsection @code{bfd_get_reloc_upper_bound}
+@strong{Synopsis}
+@example
+long bfd_get_reloc_upper_bound(bfd *abfd, asection *sect);
+@end example
+@strong{Description}@*
+Return the number of bytes required to store the
+relocation information associated with section @var{sect}
+attached to bfd @var{abfd}. If an error occurs, return -1.
+
+@findex bfd_canonicalize_reloc
+@subsubsection @code{bfd_canonicalize_reloc}
+@strong{Synopsis}
+@example
+long bfd_canonicalize_reloc
+ (bfd *abfd,
+ asection *sec,
+ arelent **loc,
+ asymbol **syms);
+@end example
+@strong{Description}@*
+Call the back end associated with the open BFD
+@var{abfd} and translate the external form of the relocation
+information attached to @var{sec} into the internal canonical
+form. Place the table into memory at @var{loc}, which has
+been preallocated, usually by a call to
+@code{bfd_get_reloc_upper_bound}. Returns the number of relocs, or
+-1 on error.
+
+The @var{syms} table is also needed for horrible internal magic
+reasons.
+
+@findex bfd_set_reloc
+@subsubsection @code{bfd_set_reloc}
+@strong{Synopsis}
+@example
+void bfd_set_reloc
+ (bfd *abfd, asection *sec, arelent **rel, unsigned int count)
+@end example
+@strong{Description}@*
+Set the relocation pointer and count within
+section @var{sec} to the values @var{rel} and @var{count}.
+The argument @var{abfd} is ignored.
+
+@findex bfd_set_file_flags
+@subsubsection @code{bfd_set_file_flags}
+@strong{Synopsis}
+@example
+boolean bfd_set_file_flags(bfd *abfd, flagword flags);
+@end example
+@strong{Description}@*
+Set the flag word in the BFD @var{abfd} to the value @var{flags}.
+
+Possible errors are:
+@itemize @bullet
+
+@item
+@code{bfd_error_wrong_format} - The target bfd was not of object format.
+@item
+@code{bfd_error_invalid_operation} - The target bfd was open for reading.
+@item
+@code{bfd_error_invalid_operation} -
+The flag word contained a bit which was not applicable to the
+type of file. E.g., an attempt was made to set the @code{D_PAGED} bit
+on a BFD format which does not support demand paging.
+@end itemize
+
+@findex bfd_set_start_address
+@subsubsection @code{bfd_set_start_address}
+@strong{Synopsis}
+@example
+boolean bfd_set_start_address(bfd *abfd, bfd_vma vma);
+@end example
+@strong{Description}@*
+Make @var{vma} the entry point of output BFD @var{abfd}.
+
+@strong{Returns}@*
+Returns @code{true} on success, @code{false} otherwise.
+
+@findex bfd_get_mtime
+@subsubsection @code{bfd_get_mtime}
+@strong{Synopsis}
+@example
+long bfd_get_mtime(bfd *abfd);
+@end example
+@strong{Description}@*
+Return the file modification time (as read from the file system, or
+from the archive header for archive members).
+
+@findex bfd_get_size
+@subsubsection @code{bfd_get_size}
+@strong{Synopsis}
+@example
+long bfd_get_size(bfd *abfd);
+@end example
+@strong{Description}@*
+Return the file size (as read from file system) for the file
+associated with BFD @var{abfd}.
+
+The initial motivation for, and use of, this routine is not
+so we can get the exact size of the object the BFD applies to, since
+that might not be generally possible (archive members for example).
+It would be ideal if someone could eventually modify
+it so that such results were guaranteed.
+
+Instead, we want to ask questions like "is this NNN byte sized
+object I'm about to try read from file offset YYY reasonable?"
+As as example of where we might do this, some object formats
+use string tables for which the first @code{sizeof(long)} bytes of the
+table contain the size of the table itself, including the size bytes.
+If an application tries to read what it thinks is one of these
+string tables, without some way to validate the size, and for
+some reason the size is wrong (byte swapping error, wrong location
+for the string table, etc.), the only clue is likely to be a read
+error when it tries to read the table, or a "virtual memory
+exhausted" error when it tries to allocate 15 bazillon bytes
+of space for the 15 bazillon byte table it is about to read.
+This function at least allows us to answer the quesion, "is the
+size reasonable?".
+
+@findex bfd_get_gp_size
+@subsubsection @code{bfd_get_gp_size}
+@strong{Synopsis}
+@example
+int bfd_get_gp_size(bfd *abfd);
+@end example
+@strong{Description}@*
+Return the maximum size of objects to be optimized using the GP
+register under MIPS ECOFF. This is typically set by the @code{-G}
+argument to the compiler, assembler or linker.
+
+@findex bfd_set_gp_size
+@subsubsection @code{bfd_set_gp_size}
+@strong{Synopsis}
+@example
+void bfd_set_gp_size(bfd *abfd, int i);
+@end example
+@strong{Description}@*
+Set the maximum size of objects to be optimized using the GP
+register under ECOFF or MIPS ELF. This is typically set by
+the @code{-G} argument to the compiler, assembler or linker.
+
+@findex bfd_scan_vma
+@subsubsection @code{bfd_scan_vma}
+@strong{Synopsis}
+@example
+bfd_vma bfd_scan_vma(CONST char *string, CONST char **end, int base);
+@end example
+@strong{Description}@*
+Convert, like @code{strtoul}, a numerical expression
+@var{string} into a @code{bfd_vma} integer, and return that integer.
+(Though without as many bells and whistles as @code{strtoul}.)
+The expression is assumed to be unsigned (i.e., positive).
+If given a @var{base}, it is used as the base for conversion.
+A base of 0 causes the function to interpret the string
+in hex if a leading "0x" or "0X" is found, otherwise
+in octal if a leading zero is found, otherwise in decimal.
+
+Overflow is not detected.
+
+@findex bfd_copy_private_bfd_data
+@subsubsection @code{bfd_copy_private_bfd_data}
+@strong{Synopsis}
+@example
+boolean bfd_copy_private_bfd_data(bfd *ibfd, bfd *obfd);
+@end example
+@strong{Description}@*
+Copy private BFD information from the BFD @var{ibfd} to the
+the BFD @var{obfd}. Return @code{true} on success, @code{false} on error.
+Possible error returns are:
+
+@itemize @bullet
+
+@item
+@code{bfd_error_no_memory} -
+Not enough memory exists to create private data for @var{obfd}.
+@end itemize
+@example
+#define bfd_copy_private_bfd_data(ibfd, obfd) \
+ BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
+ (ibfd, obfd))
+@end example
+
+@findex bfd_merge_private_bfd_data
+@subsubsection @code{bfd_merge_private_bfd_data}
+@strong{Synopsis}
+@example
+boolean bfd_merge_private_bfd_data(bfd *ibfd, bfd *obfd);
+@end example
+@strong{Description}@*
+Merge private BFD information from the BFD @var{ibfd} to the
+the output file BFD @var{obfd} when linking. Return @code{true}
+on success, @code{false} on error. Possible error returns are:
+
+@itemize @bullet
+
+@item
+@code{bfd_error_no_memory} -
+Not enough memory exists to create private data for @var{obfd}.
+@end itemize
+@example
+#define bfd_merge_private_bfd_data(ibfd, obfd) \
+ BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
+ (ibfd, obfd))
+@end example
+
+@findex bfd_set_private_flags
+@subsubsection @code{bfd_set_private_flags}
+@strong{Synopsis}
+@example
+boolean bfd_set_private_flags(bfd *abfd, flagword flags);
+@end example
+@strong{Description}@*
+Set private BFD flag information in the BFD @var{abfd}.
+Return @code{true} on success, @code{false} on error. Possible error
+returns are:
+
+@itemize @bullet
+
+@item
+@code{bfd_error_no_memory} -
+Not enough memory exists to create private data for @var{obfd}.
+@end itemize
+@example
+#define bfd_set_private_flags(abfd, flags) \
+ BFD_SEND (abfd, _bfd_set_private_flags, \
+ (abfd, flags))
+@end example
+
+@findex stuff
+@subsubsection @code{stuff}
+@strong{Description}@*
+Stuff which should be documented:
+@example
+#define bfd_sizeof_headers(abfd, reloc) \
+ BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
+
+#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
+ BFD_SEND (abfd, _bfd_find_nearest_line, (abfd, sec, syms, off, file, func, line))
+
+ /* Do these three do anything useful at all, for any back end? */
+#define bfd_debug_info_start(abfd) \
+ BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
+
+#define bfd_debug_info_end(abfd) \
+ BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
+
+#define bfd_debug_info_accumulate(abfd, section) \
+ BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
+
+
+#define bfd_stat_arch_elt(abfd, stat) \
+ BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
+
+#define bfd_update_armap_timestamp(abfd) \
+ BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
+
+#define bfd_set_arch_mach(abfd, arch, mach)\
+ BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
+
+#define bfd_relax_section(abfd, section, link_info, again) \
+ BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
+
+#define bfd_link_hash_table_create(abfd) \
+ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
+
+#define bfd_link_add_symbols(abfd, info) \
+ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
+
+#define bfd_final_link(abfd, info) \
+ BFD_SEND (abfd, _bfd_final_link, (abfd, info))
+
+#define bfd_free_cached_info(abfd) \
+ BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
+
+#define bfd_get_dynamic_symtab_upper_bound(abfd) \
+ BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
+
+#define bfd_print_private_bfd_data(abfd, file)\
+ BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
+
+#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
+ BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
+
+#define bfd_get_dynamic_reloc_upper_bound(abfd) \
+ BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
+
+#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
+ BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
+
+extern bfd_byte *bfd_get_relocated_section_contents
+ PARAMS ((bfd *, struct bfd_link_info *,
+ struct bfd_link_order *, bfd_byte *,
+ boolean, asymbol **));
+
+@end example
+
diff --git a/contrib/binutils/bfd/doc/cache.texi b/contrib/binutils/bfd/doc/cache.texi
index badda34..4aafb69 100644
--- a/contrib/binutils/bfd/doc/cache.texi
+++ b/contrib/binutils/bfd/doc/cache.texi
@@ -9,7 +9,7 @@ limit (often as low as 20 open files). The module in
the required BFD is open. If not, then it chooses a file to
close, closes it and opens the one wanted, returning its file
handle.
-@*
+
@findex BFD_CACHE_MAX_OPEN macro
@subsubsection @code{BFD_CACHE_MAX_OPEN macro}
@strong{Description}@*
@@ -18,7 +18,7 @@ one time.
@example
#define BFD_CACHE_MAX_OPEN 10
@end example
-@*
+
@findex bfd_last_cache
@subsubsection @code{bfd_last_cache}
@strong{Synopsis}
@@ -29,7 +29,7 @@ extern bfd *bfd_last_cache;
Zero, or a pointer to the topmost BFD on the chain. This is
used by the @code{bfd_cache_lookup} macro in @file{libbfd.h} to
determine when it can avoid a function call.
-@*
+
@findex bfd_cache_lookup
@subsubsection @code{bfd_cache_lookup}
@strong{Description}@*
@@ -43,7 +43,7 @@ otherwise, it has to perform the complicated lookup function.
(FILE*)(bfd_last_cache->iostream): \
bfd_cache_lookup_worker(x))
@end example
-@*
+
@findex bfd_cache_init
@subsubsection @code{bfd_cache_init}
@strong{Synopsis}
@@ -52,7 +52,7 @@ boolean bfd_cache_init (bfd *abfd);
@end example
@strong{Description}@*
Add a newly opened BFD to the cache.
-@*
+
@findex bfd_cache_close
@subsubsection @code{bfd_cache_close}
@strong{Synopsis}
@@ -62,11 +62,11 @@ boolean bfd_cache_close (bfd *abfd);
@strong{Description}@*
Remove the BFD @var{abfd} from the cache. If the attached file is open,
then close it too.
-@*
+
@strong{Returns}@*
@code{false} is returned if closing the file fails, @code{true} is
returned if all is well.
-@*
+
@findex bfd_open_file
@subsubsection @code{bfd_open_file}
@strong{Synopsis}
@@ -79,7 +79,7 @@ Call the OS to open a file for @var{abfd}. Return the @code{FILE *}
BFD so that future accesses know the file is open. If the @code{FILE *}
returned is @code{NULL}, then it won't have been put in the
cache, so it won't have to be removed from it.
-@*
+
@findex bfd_cache_lookup_worker
@subsubsection @code{bfd_cache_lookup_worker}
@strong{Synopsis}
@@ -92,4 +92,4 @@ quick answer. Find a file descriptor for @var{abfd}. If
necessary, it open it. If there are already more than
@code{BFD_CACHE_MAX_OPEN} files open, it tries to close one first, to
avoid running out of file descriptors.
-@*
+
diff --git a/contrib/binutils/bfd/doc/chew.c b/contrib/binutils/bfd/doc/chew.c
index 3958f30..eba69c2 100644
--- a/contrib/binutils/bfd/doc/chew.c
+++ b/contrib/binutils/bfd/doc/chew.c
@@ -1,5 +1,6 @@
/* chew
- Copyright (C) 1990-1991 Free Software Foundation, Inc.
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1998
+ Free Software Foundation, Inc.
Contributed by steve chamberlain @cygnus
This file is part of BFD, the Binary File Descriptor library.
@@ -118,7 +119,6 @@ static void overwrite_string (string_type *, string_type *);
static void catbuf (string_type *, char *, unsigned int);
static void cattext (string_type *, char *);
static void catstr (string_type *, string_type *);
-static unsigned int skip_white_and_starts (string_type *, unsigned int);
#endif
@@ -248,7 +248,7 @@ DEFUN(skip_white_and_stars,(src, idx),
{
char c;
while ((c = at(src,idx)),
- isspace (c)
+ isspace ((unsigned char) c)
|| (c == '*'
/* Don't skip past end-of-comment or star as first
character on its line. */
@@ -323,7 +323,7 @@ static void remchar (void), strip_trailing_newlines (void), push_number (void);
static void push_text (void);
static void remove_noncomments (string_type *, string_type *);
static void print_stack_level (void);
-static void paramstuff (void), translatecomments (void), manglecomments (void);
+static void paramstuff (void), translatecomments (void);
static void outputdots (void), courierize (void), bulletize (void);
static void do_fancy_stuff (void);
static int iscommand (string_type *, unsigned int);
@@ -379,7 +379,7 @@ WORD(remchar)
static void
strip_trailing_newlines ()
{
- while ((isspace (at (tos, tos->write_idx - 1))
+ while ((isspace ((unsigned char) at (tos, tos->write_idx - 1))
|| at (tos, tos->write_idx - 1) == '\n')
&& tos->write_idx > 0)
tos->write_idx--;
@@ -503,9 +503,11 @@ DEFUN_VOID(paramstuff)
fname = openp;
/* Step back to the fname */
fname--;
- while (fname && isspace(at(tos, fname)))
+ while (fname && isspace((unsigned char) at(tos, fname)))
fname --;
- while (fname && !isspace(at(tos,fname)) && at(tos,fname) != '*')
+ while (fname
+ && !isspace((unsigned char) at(tos,fname))
+ && at(tos,fname) != '*')
fname--;
fname++;
@@ -573,6 +575,10 @@ WORD(translatecomments)
}
+#if 0
+
+/* This is not currently used. */
+
/* turn everything not starting with a . into a comment */
WORD(manglecomments)
@@ -607,6 +613,8 @@ WORD(manglecomments)
}
+#endif
+
/* Mod tos so that only lines with leading dots remain */
static void
DEFUN_VOID(outputdots)
@@ -619,7 +627,7 @@ DEFUN_VOID(outputdots)
{
if (at(tos, idx) == '\n' && at(tos, idx+1) == '.')
{
- char c, c2;
+ char c;
idx += 2;
while ((c = at(tos, idx)) && c != '\n')
@@ -699,7 +707,8 @@ WORD(courierize)
{
if (at(tos,idx) == '@')
command = 1;
- else if (isspace(at(tos,idx)) || at(tos,idx) == '}')
+ else if (isspace((unsigned char) at(tos,idx))
+ || at(tos,idx) == '}')
command = 0;
catchar(&out, at(tos, idx));
idx++;
@@ -709,8 +718,9 @@ WORD(courierize)
catchar(&out,'\n');
}
while (at(tos, idx) == '\n'
- && (at(tos, idx+1) == '.')
- || (at(tos,idx+1) == '|'));
+ && ((at(tos, idx+1) == '.')
+ || (at(tos,idx+1) == '|')))
+ ;
cattext(&out,"@end example");
}
else
@@ -746,10 +756,10 @@ WORD(bulletize)
idx+=2;
}
-else
+ else
if (at(tos, idx) == '\n' &&
at(tos, idx+1) == 'o' &&
- isspace(at(tos, idx +2)))
+ isspace((unsigned char) at(tos, idx +2)))
{
if (!on)
{
@@ -797,7 +807,7 @@ WORD(do_fancy_stuff)
{
if (at(tos, idx) == '<'
&& at(tos, idx+1) == '<'
- && !isspace(at(tos,idx + 2)))
+ && !isspace((unsigned char) at(tos,idx + 2)))
{
/* This qualifies as a << startup */
idx +=2;
@@ -831,7 +841,7 @@ DEFUN( iscommand,(ptr, idx),
{
unsigned int len = 0;
while (at(ptr,idx)) {
- if (isupper(at(ptr,idx)) || at(ptr,idx) == ' ' ||
+ if (isupper((unsigned char) at(ptr,idx)) || at(ptr,idx) == ' ' ||
at(ptr,idx) == '_')
{
len++;
@@ -849,14 +859,29 @@ DEFUN( iscommand,(ptr, idx),
}
+static int
DEFUN(copy_past_newline,(ptr, idx, dst),
string_type *ptr AND
unsigned int idx AND
string_type *dst)
{
+ int column = 0;
+
while (at(ptr, idx) && at(ptr, idx) != '\n')
{
- catchar(dst, at(ptr, idx));
+ if (at (ptr, idx) == '\t')
+ {
+ /* Expand tabs. Neither makeinfo nor TeX can cope well with
+ them. */
+ do
+ catchar (dst, ' ');
+ while (++column & 7);
+ }
+ else
+ {
+ catchar(dst, at(ptr, idx));
+ column++;
+ }
idx++;
}
@@ -883,7 +908,6 @@ WORD(kill_bogus_lines)
{
int sl ;
- int nl = 0;
int idx = 0;
int c;
int dot = 0 ;
@@ -897,6 +921,11 @@ WORD(kill_bogus_lines)
}
c = idx;
+ /* If the first char is a '.' prepend a newline so that it is
+ recognized properly later. */
+ if (at (tos, idx) == '.')
+ catchar (&out, '\n');
+
/* Find the last char */
while (at(tos,idx))
{
@@ -906,7 +935,7 @@ WORD(kill_bogus_lines)
/* find the last non white before the nl */
idx--;
- while (idx && isspace(at(tos,idx)))
+ while (idx && isspace((unsigned char) at(tos,idx)))
idx--;
idx++;
@@ -972,7 +1001,7 @@ WORD(indent)
case '\n':
cattext(&out,"\n");
idx++;
- if (tab)
+ if (tab && at(tos,idx))
{
cattext(&out," ");
}
@@ -1107,7 +1136,7 @@ DEFUN(nextword,(string, word),
int length = 0;
- while (isspace(*string) || *string == '-') {
+ while (isspace((unsigned char) *string) || *string == '-') {
if (*string == '-')
{
while (*string && *string != '\n')
@@ -1137,7 +1166,7 @@ DEFUN(nextword,(string, word),
}
else
{
- while (!isspace(*string))
+ while (!isspace((unsigned char) *string))
{
string++;
length++;
@@ -1210,9 +1239,6 @@ static void DEFUN_VOID(perform)
/* It's worth looking through the command list */
if (iscommand(ptr, idx))
{
- unsigned int i;
- int found = 0;
-
char *next;
dict_type *word ;
@@ -1305,8 +1331,6 @@ void
DEFUN(compile, (string),
char *string)
{
- int jstack[STACK];
- int *jptr = jstack;
/* add words to the dictionary */
char *word;
string = nextword(string, &word);
@@ -1416,7 +1440,7 @@ WORD(print)
else if (*isp == 2)
write_buffer (tos, stderr);
else
- fprintf (stderr, "print: illegal print destination `%d'\n", *isp);
+ fprintf (stderr, "print: illegal print destination `%ld'\n", *isp);
isp--;
tos--;
icheck_range ();
@@ -1512,7 +1536,7 @@ char *av[])
read_in(&buffer, stdin);
remove_noncomments(&buffer, ptr);
- for (i= 1; i < ac; i++)
+ for (i= 1; i < (unsigned int) ac; i++)
{
if (av[i][0] == '-')
{
@@ -1541,6 +1565,8 @@ char *av[])
{
warning = 1;
}
+ else
+ usage ();
}
}
write_buffer(stack+0, stdout);
diff --git a/contrib/binutils/bfd/doc/coffcode.texi b/contrib/binutils/bfd/doc/coffcode.texi
index 5c3d546..d3bcfa0 100644
--- a/contrib/binutils/bfd/doc/coffcode.texi
+++ b/contrib/binutils/bfd/doc/coffcode.texi
@@ -18,7 +18,7 @@ The Intel i960 processor version of coff is implemented in
@file{coff-i960.c}. This file has the same structure as
@file{coff-m88k.c}, except that it includes @file{coff/i960.h}
rather than @file{coff-m88k.h}.
-@*
+
@subsection Porting to a new version of coff
The recommended method is to select from the existing
implementations the version of coff which is most like the one
@@ -41,10 +41,10 @@ dump utility, usually called @code{att-dump} or just
@code{dump}) are the same. Then clean up your code, and send
what you've done to Cygnus. Then your stuff will be in the
next release, and you won't have to keep integrating it.
-@*
+
@subsection How the coff backend works
-@*
+
@subsubsection File layout
The Coff backend is split into generic routines that are
applicable to any Coff target and routines that are specific
@@ -75,7 +75,7 @@ types, @file{coff-i960.c} also includes some code to
manipulate the i960 relocs. This code is not in
@file{coffcode.h} because it would not be used by any other
target.
-@*
+
@subsubsection Bit twiddling
Each flavour of coff supported in BFD has its own header file
describing the external layout of the structures. There is also
@@ -108,7 +108,7 @@ saving the internal BFD overhead, but uses BFD to swap things
on the way out, making cross ports much safer. Doing so also
allows BFD (and thus the linker) to use the same header files
as @code{gas}, which makes one avenue to disaster disappear.
-@*
+
@subsubsection Symbol reading
The simple canonical form for symbols used by BFD is not rich
enough to keep all the information available in a coff symbol
@@ -135,7 +135,7 @@ rather than the normal text associated with the symbol
At this time the symbol names are moved around. Coff stores
all symbols less than nine characters long physically
within the symbol table; longer strings are kept at the end of
-the file in the string table. This pass moves all strings
+the file in the string table. This pass moves all strings
into memory and replaces them with pointers to the strings.
The symbol table is massaged once again, this time to create
@@ -147,7 +147,7 @@ shares strings with the hidden internal symbol table.
Any linenumbers are read from the coff file too, and attached
to the symbols which own the functions the linenumbers belong to.
-@*
+
@subsubsection Symbol writing
Writing a symbol to a coff file which didn't come from a coff
file will lose any debugging information. The @code{asymbol}
@@ -199,15 +199,16 @@ to a symbol into the index into the symbol table of the asymbol.
This routine runs through the symbol table and patches up the
symbols from their internal form into the coff way, calls the
bit twiddlers, and writes out the table to the file.
-@*
+
@findex coff_symbol_type
@subsubsection @code{coff_symbol_type}
@strong{Description}@*
The hidden information for an @code{asymbol} is described in a
@code{combined_entry_type}:
-@*
-.
+
+
@example
+
typedef struct coff_ptr_struct
@{
@@ -292,43 +293,43 @@ typedef struct
Special entry points for gas to swap out coff parts:
@example
unsigned int (*_bfd_coff_swap_aux_out) PARAMS ((
- bfd *abfd,
- PTR in,
- int type,
- int class,
+ bfd *abfd,
+ PTR in,
+ int type,
+ int class,
int indaux,
int numaux,
- PTR ext));
+ PTR ext));
unsigned int (*_bfd_coff_swap_sym_out) PARAMS ((
bfd *abfd,
- PTR in,
- PTR ext));
+ PTR in,
+ PTR ext));
unsigned int (*_bfd_coff_swap_lineno_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR ext));
+ bfd *abfd,
+ PTR in,
+ PTR ext));
unsigned int (*_bfd_coff_swap_reloc_out) PARAMS ((
- bfd *abfd,
- PTR src,
- PTR dst));
+ bfd *abfd,
+ PTR src,
+ PTR dst));
unsigned int (*_bfd_coff_swap_filehdr_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR out));
+ bfd *abfd,
+ PTR in,
+ PTR out));
unsigned int (*_bfd_coff_swap_aouthdr_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR out));
+ bfd *abfd,
+ PTR in,
+ PTR out));
unsigned int (*_bfd_coff_swap_scnhdr_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR out));
+ bfd *abfd,
+ PTR in,
+ PTR out));
@end example
Special entry points for generic COFF routines to call target
@@ -453,6 +454,12 @@ dependent COFF routines:
boolean collect,
struct bfd_link_hash_entry **hashp));
+ boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
+ bfd * abfd ));
+ boolean (*_bfd_coff_final_link_postscript) PARAMS ((
+ bfd * abfd,
+ struct coff_final_link_info * pfinfo));
+
@} bfd_coff_backend_data;
#define coff_backend_info(abfd) ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
@@ -498,7 +505,7 @@ dependent COFF routines:
#define bfd_coff_long_section_names(abfd) \
(coff_backend_info (abfd)->_bfd_coff_long_section_names)
#define bfd_coff_default_section_alignment_power(abfd) \
- (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
+ (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
#define bfd_coff_swap_filehdr_in(abfd, i,o) \
((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
@@ -567,6 +574,11 @@ dependent COFF routines:
((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
(info, abfd, name, flags, section, value, string, cp, coll, hashp))
+#define bfd_coff_link_output_has_begun(a) \
+ ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a))
+#define bfd_coff_final_link_postscript(a,p) \
+ ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
+
@end example
@subsubsection Writing relocations
To write relocations, the back end steps though the
@@ -578,7 +590,7 @@ address and the relocation offset; the type is dug directly
from the howto field. Then the @code{internal_reloc} is
swapped into the shape of an @code{external_reloc} and written
out to disk.
-@*
+
@subsubsection Reading linenumbers
Creating the linenumber table is done by reading in the entire
coff linenumber table, and creating another table for internal use.
@@ -594,7 +606,7 @@ table, and each symbol which marks a function is marked by
pointing its...
How does this work ?
-@*
+
@subsubsection Reading relocations
Coff relocations are easily transformed into the internal BFD form
(@code{arelent}).
@@ -624,4 +636,4 @@ and 960 use the @code{r_type} to directly produce an index
into a howto table vector; the 88k subtracts a number from the
@code{r_type} field and creates an addend field.
@end itemize
-@*
+
diff --git a/contrib/binutils/bfd/doc/core.texi b/contrib/binutils/bfd/doc/core.texi
index 841daa9..55e369a 100644
--- a/contrib/binutils/bfd/doc/core.texi
+++ b/contrib/binutils/bfd/doc/core.texi
@@ -1,9 +1,9 @@
@section Core files
-@*
+
@strong{Description}@*
These are functions pertaining to core files.
-@*
+
@findex bfd_core_file_failing_command
@subsubsection @code{bfd_core_file_failing_command}
@strong{Synopsis}
@@ -13,7 +13,7 @@ CONST char *bfd_core_file_failing_command(bfd *abfd);
@strong{Description}@*
Return a read-only string explaining which program was running
when it failed and produced the core file @var{abfd}.
-@*
+
@findex bfd_core_file_failing_signal
@subsubsection @code{bfd_core_file_failing_signal}
@strong{Synopsis}
@@ -23,7 +23,7 @@ int bfd_core_file_failing_signal(bfd *abfd);
@strong{Description}@*
Returns the signal number which caused the core dump which
generated the file the BFD @var{abfd} is attached to.
-@*
+
@findex core_file_matches_executable_p
@subsubsection @code{core_file_matches_executable_p}
@strong{Synopsis}
@@ -35,4 +35,4 @@ boolean core_file_matches_executable_p
Return @code{true} if the core file attached to @var{core_bfd}
was generated by a run of the executable file attached to
@var{exec_bfd}, @code{false} otherwise.
-@*
+
diff --git a/contrib/binutils/bfd/doc/doc.str b/contrib/binutils/bfd/doc/doc.str
index 9368599..7a276fe 100644
--- a/contrib/binutils/bfd/doc/doc.str
+++ b/contrib/binutils/bfd/doc/doc.str
@@ -71,7 +71,7 @@
do_fancy_stuff
courierize
catstr
- "@*\n" catstr
+ "\n" catstr
;
: asection
diff --git a/contrib/binutils/bfd/doc/elf.texi b/contrib/binutils/bfd/doc/elf.texi
index 673654c..4f9434c 100644
--- a/contrib/binutils/bfd/doc/elf.texi
+++ b/contrib/binutils/bfd/doc/elf.texi
@@ -6,7 +6,7 @@ Currently, the best supported back ends are for sparc and i386
Documentation of the internals of the support code still needs
to be written. The code is changing quickly enough that we
haven't bothered yet.
-@*
+
@findex bfd_elf_find_section
@subsubsection @code{bfd_elf_find_section}
@strong{Synopsis}
@@ -19,4 +19,4 @@ Since BFD hides string tables from callers, GDB needs to use an
internal hook to find them. Sun's .stabstr, in particular,
isn't even pointed to by the .stab section, so ordinary
mechanisms wouldn't work to find it, even if we had some.
-@*
+
diff --git a/contrib/binutils/bfd/doc/format.texi b/contrib/binutils/bfd/doc/format.texi
index d30a41b..3281c36 100644
--- a/contrib/binutils/bfd/doc/format.texi
+++ b/contrib/binutils/bfd/doc/format.texi
@@ -22,7 +22,7 @@ The BFD contains other BFDs and an optional index.
@code{bfd_core}
@end itemize
The BFD contains the result of an executable core dump.
-@*
+
@findex bfd_check_format
@subsubsection @code{bfd_check_format}
@strong{Synopsis}
@@ -65,7 +65,7 @@ none of the backends recognised the file format.
@code{bfd_error_file_ambiguously_recognized} -
more than one backend recognised the file format.
@end itemize
-@*
+
@findex bfd_check_format_matches
@subsubsection @code{bfd_check_format_matches}
@strong{Synopsis}
@@ -82,7 +82,7 @@ Then the user may choose a format and try again.
When done with the list that @var{matching} points to, the caller
should free it.
-@*
+
@findex bfd_set_format
@subsubsection @code{bfd_set_format}
@strong{Synopsis}
@@ -94,7 +94,7 @@ This function sets the file format of the BFD @var{abfd} to the
format @var{format}. If the target set in the BFD does not
support the format requested, the format is invalid, or the BFD
is not open for writing, then an error occurs.
-@*
+
@findex bfd_format_string
@subsubsection @code{bfd_format_string}
@strong{Synopsis}
@@ -105,4 +105,4 @@ CONST char *bfd_format_string(bfd_format format);
Return a pointer to a const string
@code{invalid}, @code{object}, @code{archive}, @code{core}, or @code{unknown},
depending upon the value of @var{format}.
-@*
+
diff --git a/contrib/binutils/bfd/doc/hash.texi b/contrib/binutils/bfd/doc/hash.texi
index 4147ce4..45d63e0 100644
--- a/contrib/binutils/bfd/doc/hash.texi
+++ b/contrib/binutils/bfd/doc/hash.texi
@@ -25,7 +25,7 @@ The basic hash table code is in @code{hash.c}.
* Traversing a Hash Table::
* Deriving a New Hash Table Type::
@end menu
-@*
+
@node Creating and Freeing a Hash Table, Looking Up or Entering a String, Hash Tables, Hash Tables
@subsection Creating and freeing a hash table
@findex bfd_hash_table_init
@@ -54,7 +54,7 @@ objalloc using @code{bfd_hash_allocate}.
Use @code{bfd_hash_table_free} to free up all the memory that has
been allocated for a hash table. This will not free up the
@code{struct bfd_hash_table} itself, which you must provide.
-@*
+
@node Looking Up or Entering a String, Traversing a Hash Table, Creating and Freeing a Hash Table, Hash Tables
@subsection Looking up or entering a string
@findex bfd_hash_lookup
@@ -81,7 +81,7 @@ copy the string onto the hash table objalloc or not. If
@var{copy} is passed as @code{false}, you must be careful not to
deallocate or modify the string as long as the hash table
exists.
-@*
+
@node Traversing a Hash Table, Deriving a New Hash Table Type, Looking Up or Entering a String, Hash Tables
@subsection Traversing a hash table
@findex bfd_hash_traverse
@@ -97,7 +97,7 @@ must return a @code{boolean} value, which indicates whether to
continue traversing the hash table. If the function returns
@code{false}, @code{bfd_hash_traverse} will stop the traversal and
return immediately.
-@*
+
@node Deriving a New Hash Table Type, , Traversing a Hash Table, Hash Tables
@subsection Deriving a new hash table type
Many uses of hash tables want to store additional information
@@ -123,7 +123,7 @@ table derived from the linker hash table.
* Write the Derived Creation Routine::
* Write Other Derived Routines::
@end menu
-@*
+
@node Define the Derived Structures, Write the Derived Creation Routine, Deriving a New Hash Table Type, Deriving a New Hash Table Type
@subsubsection Define the derived structures
You must define a structure for an entry in the hash table,
@@ -143,7 +143,7 @@ bfd_link_hash_entry} (in @code{bfdlink.h}). The first field,
@code{root}, is of type @code{struct bfd_hash_entry}. Similarly,
the first field in @code{struct bfd_link_hash_table}, @code{table},
is of type @code{struct bfd_hash_table}.
-@*
+
@node Write the Derived Creation Routine, Write Other Derived Routines, Define the Derived Structures, Deriving a New Hash Table Type
@subsubsection Write the derived creation routine
You must write a routine which will create and initialize an
@@ -174,9 +174,10 @@ Here is a boilerplate example of a creation routine.
are creating. @var{base_newfunc} is the name of the creation
routine of the hash table type your hash table is derived
from.
-@*
-.struct bfd_hash_entry *
+
+
@example
+struct bfd_hash_entry *
@var{function_name} (entry, table, string)
struct bfd_hash_entry *entry;
struct bfd_hash_table *table;
@@ -189,14 +190,14 @@ from.
if (ret == (@var{entry_type} *) NULL)
@{
ret = ((@var{entry_type} *)
- bfd_hash_allocate (table, sizeof (@var{entry_type})));
+ bfd_hash_allocate (table, sizeof (@var{entry_type})));
if (ret == (@var{entry_type} *) NULL)
return NULL;
@}
/* Call the allocation method of the base class. */
ret = ((@var{entry_type} *)
- @var{base_newfunc} ((struct bfd_hash_entry *) ret, table, string));
+ @var{base_newfunc} ((struct bfd_hash_entry *) ret, table, string));
/* Initialize the local fields here. */
@@ -214,7 +215,7 @@ routine for a basic hash table.
@code{_bfd_link_hash_newfunc} also initializes the local fields
in a linker hash table entry: @code{type}, @code{written} and
@code{next}.
-@*
+
@node Write Other Derived Routines, , Write the Derived Creation Routine, Deriving a New Hash Table Type
@subsubsection Write other derived routines
You will want to write other routines for your new hash table,
@@ -241,4 +242,4 @@ the a.out backend linker hash table, which is derived from the
linker hash table, uses macros for the lookup and traversal
routines. These are @code{aout_link_hash_lookup} and
@code{aout_link_hash_traverse} in aoutx.h.
-@*
+
diff --git a/contrib/binutils/bfd/doc/init.texi b/contrib/binutils/bfd/doc/init.texi
index 2902eac..e561a77 100644
--- a/contrib/binutils/bfd/doc/init.texi
+++ b/contrib/binutils/bfd/doc/init.texi
@@ -1,6 +1,6 @@
@section Initialization
These are the functions that handle initializing a BFD.
-@*
+
@findex bfd_init
@subsubsection @code{bfd_init}
@strong{Synopsis}
@@ -10,4 +10,4 @@ void bfd_init(void);
@strong{Description}@*
This routine must be called before any other BFD function to
initialize magical internal data structures.
-@*
+
diff --git a/contrib/binutils/bfd/doc/libbfd.texi b/contrib/binutils/bfd/doc/libbfd.texi
index 002e2f4..6bee5b5 100644
--- a/contrib/binutils/bfd/doc/libbfd.texi
+++ b/contrib/binutils/bfd/doc/libbfd.texi
@@ -1,11 +1,11 @@
@section Internal functions
-@*
+
@strong{Description}@*
These routines are used within BFD.
They are not intended for export, but are documented here for
completeness.
-@*
+
@findex bfd_write_bigendian_4byte_int
@subsubsection @code{bfd_write_bigendian_4byte_int}
@strong{Synopsis}
@@ -16,7 +16,7 @@ void bfd_write_bigendian_4byte_int(bfd *abfd, int i);
Write a 4 byte integer @var{i} to the output BFD @var{abfd}, in big
endian order regardless of what else is going on. This is useful in
archives.
-@*
+
@findex bfd_put_size
@subsubsection @code{bfd_put_size}
@findex bfd_get_size
@@ -45,41 +45,41 @@ To detect calling these with less than a @code{bfd_vma}, use
#define bfd_put_8(abfd, val, ptr) \
(*((unsigned char *)(ptr)) = (unsigned char)(val))
#define bfd_put_signed_8 \
- bfd_put_8
+ bfd_put_8
#define bfd_get_8(abfd, ptr) \
(*(unsigned char *)(ptr))
#define bfd_get_signed_8(abfd, ptr) \
- ((*(unsigned char *)(ptr) ^ 0x80) - 0x80)
+ ((*(unsigned char *)(ptr) ^ 0x80) - 0x80)
#define bfd_put_16(abfd, val, ptr) \
BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
#define bfd_put_signed_16 \
- bfd_put_16
+ bfd_put_16
#define bfd_get_16(abfd, ptr) \
BFD_SEND(abfd, bfd_getx16, (ptr))
#define bfd_get_signed_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
+ BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
#define bfd_put_32(abfd, val, ptr) \
BFD_SEND(abfd, bfd_putx32, ((val),(ptr)))
#define bfd_put_signed_32 \
- bfd_put_32
+ bfd_put_32
#define bfd_get_32(abfd, ptr) \
BFD_SEND(abfd, bfd_getx32, (ptr))
#define bfd_get_signed_32(abfd, ptr) \
- BFD_SEND(abfd, bfd_getx_signed_32, (ptr))
+ BFD_SEND(abfd, bfd_getx_signed_32, (ptr))
#define bfd_put_64(abfd, val, ptr) \
BFD_SEND(abfd, bfd_putx64, ((val), (ptr)))
#define bfd_put_signed_64 \
- bfd_put_64
+ bfd_put_64
#define bfd_get_64(abfd, ptr) \
BFD_SEND(abfd, bfd_getx64, (ptr))
#define bfd_get_signed_64(abfd, ptr) \
- BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
+ BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
@end example
-@*
+
@findex bfd_h_put_size
@subsubsection @code{bfd_h_put_size}
@strong{Description}@*
@@ -93,43 +93,43 @@ order and their data in little endian order.
/* Byte swapping macros for file header data. */
#define bfd_h_put_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
+ bfd_put_8 (abfd, val, ptr)
#define bfd_h_put_signed_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
+ bfd_put_8 (abfd, val, ptr)
#define bfd_h_get_8(abfd, ptr) \
- bfd_get_8 (abfd, ptr)
+ bfd_get_8 (abfd, ptr)
#define bfd_h_get_signed_8(abfd, ptr) \
- bfd_get_signed_8 (abfd, ptr)
+ bfd_get_signed_8 (abfd, ptr)
#define bfd_h_put_16(abfd, val, ptr) \
BFD_SEND(abfd, bfd_h_putx16,(val,ptr))
#define bfd_h_put_signed_16 \
- bfd_h_put_16
+ bfd_h_put_16
#define bfd_h_get_16(abfd, ptr) \
BFD_SEND(abfd, bfd_h_getx16,(ptr))
#define bfd_h_get_signed_16(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr))
+ BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr))
#define bfd_h_put_32(abfd, val, ptr) \
BFD_SEND(abfd, bfd_h_putx32,(val,ptr))
#define bfd_h_put_signed_32 \
- bfd_h_put_32
+ bfd_h_put_32
#define bfd_h_get_32(abfd, ptr) \
BFD_SEND(abfd, bfd_h_getx32,(ptr))
#define bfd_h_get_signed_32(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr))
+ BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr))
#define bfd_h_put_64(abfd, val, ptr) \
BFD_SEND(abfd, bfd_h_putx64,(val, ptr))
#define bfd_h_put_signed_64 \
- bfd_h_put_64
+ bfd_h_put_64
#define bfd_h_get_64(abfd, ptr) \
BFD_SEND(abfd, bfd_h_getx64,(ptr))
#define bfd_h_get_signed_64(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
+ BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
@end example
-@*
+
@findex bfd_log2
@subsubsection @code{bfd_log2}
@strong{Synopsis}
@@ -139,4 +139,4 @@ unsigned int bfd_log2(bfd_vma x);
@strong{Description}@*
Return the log base 2 of the value supplied, rounded up. E.g., an
@var{x} of 1025 returns 11.
-@*
+
diff --git a/contrib/binutils/bfd/doc/linker.texi b/contrib/binutils/bfd/doc/linker.texi
index 5cd6268..0de907d 100644
--- a/contrib/binutils/bfd/doc/linker.texi
+++ b/contrib/binutils/bfd/doc/linker.texi
@@ -30,12 +30,12 @@ ends which have implemented versions of these routines are
a.out (in @code{aoutx.h}) and ECOFF (in @code{ecoff.c}). The a.out
routines are used as examples throughout this section.
-@menu
+@menu
* Creating a Linker Hash Table::
* Adding Symbols to the Hash Table::
* Performing the Final Link::
@end menu
-@*
+
@node Creating a Linker Hash Table, Adding Symbols to the Hash Table, Linker Functions, Linker Functions
@subsection Creating a linker hash table
@cindex _bfd_link_hash_table_create in target vector
@@ -70,7 +70,7 @@ generally not know exactly which fields will be required until
you have finished. You should simply create a new hash table
which defines no additional fields, and then simply add fields
as they become necessary.
-@*
+
@node Adding Symbols to the Hash Table, Performing the Final Link, Creating a Linker Hash Table, Linker Functions
@subsection Adding symbols to the hash table
@cindex _bfd_link_add_symbols in target vector
@@ -93,7 +93,7 @@ The a.out version of this entry point is
* Adding symbols from an object file::
* Adding symbols from an archive::
@end menu
-@*
+
@node Differing file formats, Adding symbols from an object file, Adding Symbols to the Hash Table, Adding Symbols to the Hash Table
@subsubsection Differing file formats
Normally all the files involved in a link will be of the same
@@ -127,7 +127,7 @@ See @code{ecoff_link_add_externals} for an example of how to
check the @code{creator} field before saving information (in this
case, the ECOFF external symbol debugging information) in a
hash table entry.
-@*
+
@node Adding symbols from an object file, Adding symbols from an archive, Differing file formats, Adding Symbols to the Hash Table
@subsubsection Adding symbols from an object file
When the @code{_bfd_link_add_symbols} routine is passed an object
@@ -168,7 +168,7 @@ pointers to the hash tables entries created by
@code{_bfd_generic_link_add_one_symbol} indexed by symbol number,
so that the @code{_bfd_final_link} routine does not have to call
the hash table lookup routine to locate the entry.
-@*
+
@node Adding symbols from an archive, , Adding symbols from an object file, Adding Symbols to the Hash Table
@subsubsection Adding symbols from an archive
When the @code{_bfd_link_add_symbols} routine is passed an
@@ -217,7 +217,7 @@ call @code{_bfd_generic_link_add_archive_symbols}, because ECOFF
archives already contain a hash table of symbols. The ECOFF
back end searches the archive itself to avoid the overhead of
creating a new hash table.
-@*
+
@node Performing the Final Link, , Adding Symbols to the Hash Table, Linker Functions
@subsection Performing the final link
@cindex _bfd_link_final_link in target vector
@@ -246,7 +246,7 @@ the specific object file format. The a.out
* Relocating the section contents::
* Writing the symbol table::
@end menu
-@*
+
@node Information provided by the linker, Relocating the section contents, Performing the Final Link, Performing the Final Link
@subsubsection Information provided by the linker
Before the linker calls the @code{_bfd_final_link} entry point,
@@ -267,7 +267,7 @@ types of information. They also describe relocs that must be
created by the BFD backend, but do not correspond to any input
file; this is used to support -Ur, which builds constructors
while generating a relocateable object file.
-@*
+
@node Relocating the section contents, Writing the symbol table, Information provided by the linker, Performing the Final Link
@subsubsection Relocating the section contents
The @code{_bfd_final_link} function should look through the
@@ -302,7 +302,7 @@ The a.out function which handles reading, relocating, and
writing section contents is @code{aout_link_input_section}. The
actual relocation is done in @code{aout_link_input_section_std}
and @code{aout_link_input_section_ext}.
-@*
+
@node Writing the symbol table, , Relocating the section contents, Performing the Final Link
@subsubsection Writing the symbol table
The @code{_bfd_final_link} function must gather all the symbols
@@ -347,7 +347,7 @@ traversing the global hash table with the function
@code{aout_link_write_other_symbol}. It builds a string table
while writing out the symbols, which is written to the output
file at the end of @code{NAME(aout,final_link)}.
-@*
+
@findex bfd_link_split_section
@subsubsection @code{bfd_link_split_section}
@strong{Synopsis}
@@ -362,4 +362,4 @@ reloceatable or final link.
BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
@end example
-@*
+
diff --git a/contrib/binutils/bfd/doc/opncls.texi b/contrib/binutils/bfd/doc/opncls.texi
index 07456d8..4fbb0a7 100644
--- a/contrib/binutils/bfd/doc/opncls.texi
+++ b/contrib/binutils/bfd/doc/opncls.texi
@@ -1,6 +1,6 @@
@section Opening and closing BFDs
-@*
+
@findex bfd_openr
@subsubsection @code{bfd_openr}
@strong{Synopsis}
@@ -16,7 +16,7 @@ that function.
If @code{NULL} is returned then an error has occured. Possible errors
are @code{bfd_error_no_memory}, @code{bfd_error_invalid_target} or @code{system_call} error.
-@*
+
@findex bfd_fdopenr
@subsubsection @code{bfd_fdopenr}
@strong{Synopsis}
@@ -40,7 +40,7 @@ assume no cacheing; the file descriptor will remain open until
files.
Possible errors are @code{bfd_error_no_memory}, @code{bfd_error_invalid_target} and @code{bfd_error_system_call}.
-@*
+
@findex bfd_openstreamr
@subsubsection @code{bfd_openstreamr}
@strong{Synopsis}
@@ -50,7 +50,7 @@ bfd *bfd_openstreamr(const char *, const char *, PTR);
@strong{Description}@*
Open a BFD for read access on an existing stdio stream. When
the BFD is passed to @code{bfd_close}, the stream will be closed.
-@*
+
@findex bfd_openw
@subsubsection @code{bfd_openw}
@strong{Synopsis}
@@ -63,7 +63,7 @@ file format @var{target}, and return a pointer to it.
Possible errors are @code{bfd_error_system_call}, @code{bfd_error_no_memory},
@code{bfd_error_invalid_target}.
-@*
+
@findex bfd_close
@subsubsection @code{bfd_close}
@strong{Synopsis}
@@ -80,10 +80,10 @@ All memory attached to the BFD is released.
The file descriptor associated with the BFD is closed (even
if it was passed in to BFD by @code{bfd_fdopenr}).
-@*
+
@strong{Returns}@*
@code{true} is returned if all is ok, otherwise @code{false}.
-@*
+
@findex bfd_close_all_done
@subsubsection @code{bfd_close_all_done}
@strong{Synopsis}
@@ -100,10 +100,10 @@ If the created file is executable, then @code{chmod} is called
to mark it as such.
All memory attached to the BFD is released.
-@*
+
@strong{Returns}@*
@code{true} is returned if all is ok, otherwise @code{false}.
-@*
+
@findex bfd_create
@subsubsection @code{bfd_create}
@strong{Synopsis}
@@ -115,7 +115,7 @@ Create a new BFD in the manner of
@code{bfd_openw}, but without opening a file. The new BFD
takes the target from the target used by @var{template}. The
format is always set to @code{bfd_object}.
-@*
+
@findex bfd_alloc
@subsubsection @code{bfd_alloc}
@strong{Synopsis}
@@ -125,4 +125,4 @@ PTR bfd_alloc (bfd *abfd, size_t wanted);
@strong{Description}@*
Allocate a block of @var{wanted} bytes of memory attached to
@code{abfd} and return a pointer to it.
-@*
+
diff --git a/contrib/binutils/bfd/doc/reloc.texi b/contrib/binutils/bfd/doc/reloc.texi
index 63c079e..fc4970d 100644
--- a/contrib/binutils/bfd/doc/reloc.texi
+++ b/contrib/binutils/bfd/doc/reloc.texi
@@ -16,14 +16,15 @@ in a particular section, and fill in the right bits of the structures.
* typedef arelent::
* howto manager::
@end menu
-@*
+
@node typedef arelent, howto manager, Relocations, Relocations
@subsection typedef arelent
This is the structure of a relocation entry:
-@*
-.
+
+
@example
+
typedef enum bfd_reloc_status
@{
/* No errors detected */
@@ -219,37 +220,39 @@ information in the reloc record and data section. A back end
would normally have a relocation instruction set and turn
relocations into pointers to the correct structure on input -
but it would be possible to create each howto field on demand.
-@*
+
@subsubsection @code{enum complain_overflow}
Indicates what sort of overflow checking should be done when
performing a relocation.
-@*
-.
+
+
@example
+
enum complain_overflow
@{
- /* Do not complain on overflow. */
+ /* Do not complain on overflow. */
complain_overflow_dont,
- /* Complain if the bitfield overflows, whether it is considered
- as signed or unsigned. */
+ /* Complain if the bitfield overflows, whether it is considered
+ as signed or unsigned. */
complain_overflow_bitfield,
- /* Complain if the value overflows when considered as signed
- number. */
+ /* Complain if the value overflows when considered as signed
+ number. */
complain_overflow_signed,
- /* Complain if the value overflows when considered as an
- unsigned number. */
+ /* Complain if the value overflows when considered as an
+ unsigned number. */
complain_overflow_unsigned
@};
@end example
@subsubsection @code{reloc_howto_type}
The @code{reloc_howto_type} is a structure which contains all the
information that libbfd needs to know to tie up a back end's data.
-@*
-.struct symbol_cache_entry; /* Forward declaration */
+
+
@example
+struct symbol_cache_entry; /* Forward declaration */
struct reloc_howto_struct
@{
@@ -265,13 +268,13 @@ struct reloc_howto_struct
unwanted data from the relocation. */
unsigned int rightshift;
- /* The size of the item to be relocated. This is *not* a
- power-of-two measure. To get the number of bytes operated
- on by a type of relocation, use bfd_get_reloc_size. */
+ /* The size of the item to be relocated. This is *not* a
+ power-of-two measure. To get the number of bytes operated
+ on by a type of relocation, use bfd_get_reloc_size. */
int size;
/* The number of bits in the item to be relocated. This is used
- when doing overflow checking. */
+ when doing overflow checking. */
unsigned int bitsize;
/* Notes that the relocation is relative to the location in the
@@ -280,12 +283,12 @@ struct reloc_howto_struct
being relocated. */
boolean pc_relative;
- /* The bit position of the reloc value in the destination.
- The relocated value is left shifted by this amount. */
+ /* The bit position of the reloc value in the destination.
+ The relocated value is left shifted by this amount. */
unsigned int bitpos;
- /* What type of overflow error should be checked for when
- relocating. */
+ /* What type of overflow error should be checked for when
+ relocating. */
enum complain_overflow complain_on_overflow;
/* If this field is non null, then the supplied function is
@@ -293,8 +296,8 @@ struct reloc_howto_struct
strange relocation methods to be accomodated (e.g., i960 callj
instructions). */
bfd_reloc_status_type (*special_function)
- PARAMS ((bfd *abfd,
- arelent *reloc_entry,
+ PARAMS ((bfd *abfd,
+ arelent *reloc_entry,
struct symbol_cache_entry *symbol,
PTR data,
asection *input_section,
@@ -341,7 +344,7 @@ The HOWTO define is horrible and will go away.
#define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
@{(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC@}
@end example
-@*
+
@strong{Description}@*
And will be replaced with the totally magic way. But for the
moment, we are compatible, so do it this way.
@@ -349,7 +352,7 @@ moment, we are compatible, so do it this way.
#define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN)
@end example
-@*
+
@strong{Description}@*
Helper routine to turn a symbol into a relocation value.
@example
@@ -365,17 +368,17 @@ Helper routine to turn a symbol into a relocation value.
@} \
@}
@end example
-@*
+
@findex bfd_get_reloc_size
@subsubsection @code{bfd_get_reloc_size}
@strong{Synopsis}
@example
-int bfd_get_reloc_size (reloc_howto_type *);
+unsigned int bfd_get_reloc_size (reloc_howto_type *);
@end example
@strong{Description}@*
For a reloc_howto_type that operates on a fixed number of bytes,
this returns the number of bytes operated on.
-@*
+
@findex arelent_chain
@subsubsection @code{arelent_chain}
@strong{Description}@*
@@ -386,7 +389,24 @@ typedef struct relent_chain @{
struct relent_chain *next;
@} arelent_chain;
@end example
-@*
+
+@findex bfd_check_overflow
+@subsubsection @code{bfd_check_overflow}
+@strong{Synopsis}
+@example
+bfd_reloc_status_type
+bfd_check_overflow
+ (enum complain_overflow how,
+ unsigned int bitsize,
+ unsigned int rightshift,
+ bfd_vma relocation);
+@end example
+@strong{Description}@*
+Perform overflow checking on @var{relocation} which has @var{bitsize}
+significant bits and will be shifted right by @var{rightshift} bits.
+The result is either of @code{bfd_reloc_ok} or
+@code{bfd_reloc_overflow}.
+
@findex bfd_perform_relocation
@subsubsection @code{bfd_perform_relocation}
@strong{Synopsis}
@@ -415,7 +435,7 @@ slot will always be big enough for the addend. Complex reloc
types with addends were invented to solve just this problem.
The @var{error_message} argument is set to an error message if
this return @code{bfd_reloc_dangerous}.
-@*
+
@findex bfd_install_relocation
@subsubsection @code{bfd_install_relocation}
@strong{Synopsis}
@@ -436,14 +456,14 @@ a relocation.
For now, this function should be considered reserved for the
assembler.
-@*
+
@node howto manager, , typedef arelent, Relocations
@section The howto manager
When an application wants to create a relocation, but doesn't
know what the target machine might call it, it can find out by
using this bit of code.
-@*
+
@findex bfd_reloc_code_type
@subsubsection @code{bfd_reloc_code_type}
@strong{Description}@*
@@ -455,7 +475,7 @@ return a howto pointer.
This does mean that the application must determine the correct
enumerator value; you can't get a howto pointer from a random set
of attributes.
-@*
+
Here are the possible values for @code{enum bfd_reloc_code_real}:
@deffn {} BFD_RELOC_64
@@ -576,11 +596,18 @@ I think these are specific to SPARC a.out (e.g., Sun 4).
@deffnx {} BFD_RELOC_SPARC_PC_LM22
@deffnx {} BFD_RELOC_SPARC_WDISP16
@deffnx {} BFD_RELOC_SPARC_WDISP19
-@deffnx {} BFD_RELOC_SPARC_GLOB_JMP
@deffnx {} BFD_RELOC_SPARC_7
@deffnx {} BFD_RELOC_SPARC_6
@deffnx {} BFD_RELOC_SPARC_5
-Some relocations we're using for SPARC V9 -- subject to change.
+@deffnx {} BFD_RELOC_SPARC_DISP64
+@deffnx {} BFD_RELOC_SPARC_PLT64
+@deffnx {} BFD_RELOC_SPARC_HIX22
+@deffnx {} BFD_RELOC_SPARC_LOX10
+@deffnx {} BFD_RELOC_SPARC_H44
+@deffnx {} BFD_RELOC_SPARC_M44
+@deffnx {} BFD_RELOC_SPARC_L44
+@deffnx {} BFD_RELOC_SPARC_REGISTER
+SPARC64 relocations
@end deffn
@deffn {} BFD_RELOC_ALPHA_GPDISP_HI16
Alpha ECOFF and ELF relocations. Some of these treat the symbol or
@@ -790,6 +817,23 @@ These relocs are only used within the ARM assembler. They are not
@deffnx {} BFD_RELOC_SH_LABEL
Hitachi SH relocs. Not all of these appear in object files.
@end deffn
+@deffn {} BFD_RELOC_THUMB_PCREL_BRANCH9
+@deffnx {} BFD_RELOC_THUMB_PCREL_BRANCH12
+@deffnx {} BFD_RELOC_THUMB_PCREL_BRANCH23
+Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
+be zero and is not stored in the instruction.
+@end deffn
+@deffn {} BFD_RELOC_ARC_B22_PCREL
+Argonaut RISC Core (ARC) relocs.
+ARC 22 bit pc-relative branch. The lowest two bits must be zero and are
+not stored in the instruction. The high 20 bits are installed in bits 26
+through 7 of the instruction.
+@end deffn
+@deffn {} BFD_RELOC_ARC_B26
+ARC 26 bit absolute branch. The lowest two bits must be zero and are not
+stored in the instruction. The high 24 bits are installed in bits 23
+through 0.
+@end deffn
@deffn {} BFD_RELOC_D10V_10_PCREL_R
Mitsubishi D10V relocs.
This is a 10-bit reloc with the right 2 bits
@@ -838,6 +882,40 @@ This is a 16-bit reloc containing the lower 16 bits of an address.
This is a 16-bit reloc containing the small data area offset for use in
add3, load, and store instructions.
@end deffn
+@deffn {} BFD_RELOC_V850_9_PCREL
+This is a 9-bit reloc
+@end deffn
+@deffn {} BFD_RELOC_V850_22_PCREL
+This is a 22-bit reloc
+@end deffn
+@deffn {} BFD_RELOC_V850_SDA_16_16_OFFSET
+This is a 16 bit offset from the short data area pointer.
+@end deffn
+@deffn {} BFD_RELOC_V850_SDA_15_16_OFFSET
+This is a 16 bit offset (of which only 15 bits are used) from the
+short data area pointer.
+@end deffn
+@deffn {} BFD_RELOC_V850_ZDA_16_16_OFFSET
+This is a 16 bit offset from the zero data area pointer.
+@end deffn
+@deffn {} BFD_RELOC_V850_ZDA_15_16_OFFSET
+This is a 16 bit offset (of which only 15 bits are used) from the
+zero data area pointer.
+@end deffn
+@deffn {} BFD_RELOC_V850_TDA_6_8_OFFSET
+This is an 8 bit offset (of which only 6 bits are used) from the
+tiny data area pointer.
+@end deffn
+@deffn {} BFD_RELOC_V850_TDA_7_8_OFFSET
+This is an 8bit offset (of which only 7 bits are used) from the tiny
+data area pointer.
+@end deffn
+@deffn {} BFD_RELOC_V850_TDA_7_7_OFFSET
+This is a 7 bit offset from the tiny data area pointer.
+@end deffn
+@deffn {} BFD_RELOC_V850_TDA_16_16_OFFSET
+This is a 16 bit offset from the tiny data area pointer.
+@end deffn
@deffn {} BFD_RELOC_MN10300_32_PCREL
This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
instruction.
@@ -846,8 +924,14 @@ instruction.
This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
instruction.
@end deffn
-.
+@deffn {} BFD_RELOC_TIC30_LDP
+This is a 8bit DP reloc for the tms320c30, where the most
+significant 8 bits of a 24 bit word are placed into the least
+significant 8 bits of the opcode.
+@end deffn
+
@example
+
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
@end example
@findex bfd_reloc_type_lookup
@@ -861,7 +945,7 @@ bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code);
Return a pointer to a howto structure which, when
invoked, will perform the relocation @var{code} on data from the
architecture noted.
-@*
+
@findex bfd_default_reloc_type_lookup
@subsubsection @code{bfd_default_reloc_type_lookup}
@strong{Synopsis}
@@ -871,7 +955,7 @@ reloc_howto_type *bfd_default_reloc_type_lookup
@end example
@strong{Description}@*
Provides a default relocation lookup routine for any architecture.
-@*
+
@findex bfd_get_reloc_code_name
@subsubsection @code{bfd_get_reloc_code_name}
@strong{Synopsis}
@@ -881,7 +965,7 @@ const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
@strong{Description}@*
Provides a printable name for the supplied relocation code.
Useful mainly for printing error messages.
-@*
+
@findex bfd_generic_relax_section
@subsubsection @code{bfd_generic_relax_section}
@strong{Synopsis}
@@ -895,7 +979,7 @@ boolean bfd_generic_relax_section
@strong{Description}@*
Provides default handling for relaxing for back ends which
don't do relaxing -- i.e., does nothing.
-@*
+
@findex bfd_generic_get_relocated_section_contents
@subsubsection @code{bfd_generic_get_relocated_section_contents}
@strong{Synopsis}
@@ -911,4 +995,4 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
@strong{Description}@*
Provides default handling of relocation effort for back ends
which can't be bothered to do it efficiently.
-@*
+
diff --git a/contrib/binutils/bfd/doc/section.texi b/contrib/binutils/bfd/doc/section.texi
index d5ff109..24625c2 100644
--- a/contrib/binutils/bfd/doc/section.texi
+++ b/contrib/binutils/bfd/doc/section.texi
@@ -12,7 +12,7 @@ Sections are supported in BFD in @code{section.c}.
* typedef asection::
* section prototypes::
@end menu
-@*
+
@node Section Input, Section Output, Sections, Sections
@subsection Section input
When a BFD is opened for reading, the section structures are
@@ -42,7 +42,7 @@ size of the data. An IEEE-695 file doesn't contain raw data in
sections, but data and relocation expressions intermixed, so
the data area has to be parsed to get out the data and
relocations.
-@*
+
@node Section Output, typedef asection, Section Input, Sections
@subsection Section output
To write a new object style BFD, the various sections to be
@@ -81,7 +81,7 @@ structures would look like:
size 0x103 |
output_section --------|
@end example
-@*
+
@subsection Link orders
The data within a section is stored in a @dfn{link_order}.
These are much like the fixups in @code{gas}. The link_order
@@ -98,14 +98,15 @@ select whether to relax. Sometimes relaxing takes a lot of
time. The linker runs around the relocations to see if any
are attached to data which can be shrunk, if so it does it on
a link_order by link_order basis.
-@*
+
@node typedef asection, section prototypes, Section Output, Sections
@subsection typedef asection
Here is the section structure:
-@*
-.
+
+
@example
+
typedef struct sec
@{
/* The name of the section; the name isn't a copy, the pointer is
@@ -201,7 +202,7 @@ typedef struct sec
multiple times, the value of a symbol is the amount of
space it requires, and the largest symbol value is the one
used). Most targets have exactly one of these (which we
- translate to bfd_com_section_ptr), but ECOFF has two. */
+ translate to bfd_com_section_ptr), but ECOFF has two. */
#define SEC_IS_COMMON 0x8000
/* The section contains only debugging information. For
@@ -217,76 +218,76 @@ typedef struct sec
#define SEC_IN_MEMORY 0x20000
/* The contents of this section are to be excluded by the
- linker for executable and shared objects unless those
- objects are to be further relocated. */
+ linker for executable and shared objects unless those
+ objects are to be further relocated. */
#define SEC_EXCLUDE 0x40000
- /* The contents of this section are to be sorted by the
- based on the address specified in the associated symbol
- table. */
+ /* The contents of this section are to be sorted by the
+ based on the address specified in the associated symbol
+ table. */
#define SEC_SORT_ENTRIES 0x80000
- /* When linking, duplicate sections of the same name should be
- discarded, rather than being combined into a single section as
- is usually done. This is similar to how common symbols are
- handled. See SEC_LINK_DUPLICATES below. */
+ /* When linking, duplicate sections of the same name should be
+ discarded, rather than being combined into a single section as
+ is usually done. This is similar to how common symbols are
+ handled. See SEC_LINK_DUPLICATES below. */
#define SEC_LINK_ONCE 0x100000
- /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
- should handle duplicate sections. */
+ /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
+ should handle duplicate sections. */
#define SEC_LINK_DUPLICATES 0x600000
- /* This value for SEC_LINK_DUPLICATES means that duplicate
- sections with the same name should simply be discarded. */
+ /* This value for SEC_LINK_DUPLICATES means that duplicate
+ sections with the same name should simply be discarded. */
#define SEC_LINK_DUPLICATES_DISCARD 0x0
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if there are any duplicate sections, although
- it should still only link one copy. */
+ /* This value for SEC_LINK_DUPLICATES means that the linker
+ should warn if there are any duplicate sections, although
+ it should still only link one copy. */
#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections are a different size. */
+ /* This value for SEC_LINK_DUPLICATES means that the linker
+ should warn if any duplicate sections are a different size. */
#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections contain different
- contents. */
+ /* This value for SEC_LINK_DUPLICATES means that the linker
+ should warn if any duplicate sections contain different
+ contents. */
#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000
- /* This section was created by the linker as part of dynamic
- relocation or other arcane processing. It is skipped when
- going through the first-pass output, trusting that someone
- else up the line will take care of it later. */
+ /* This section was created by the linker as part of dynamic
+ relocation or other arcane processing. It is skipped when
+ going through the first-pass output, trusting that someone
+ else up the line will take care of it later. */
#define SEC_LINKER_CREATED 0x800000
- /* End of section flags. */
+ /* End of section flags. */
- /* Some internal packed boolean fields. */
+ /* Some internal packed boolean fields. */
- /* See the vma field. */
- unsigned int user_set_vma : 1;
+ /* See the vma field. */
+ unsigned int user_set_vma : 1;
- /* Whether relocations have been processed. */
- unsigned int reloc_done : 1;
+ /* Whether relocations have been processed. */
+ unsigned int reloc_done : 1;
- /* A mark flag used by some of the linker backends. */
- unsigned int linker_mark : 1;
+ /* A mark flag used by some of the linker backends. */
+ unsigned int linker_mark : 1;
- /* End of internal packed boolean fields. */
+ /* End of internal packed boolean fields. */
/* The virtual memory address of the section - where it will be
at run time. The symbols are relocated against this. The
- user_set_vma flag is maintained by bfd; if it's not set, the
- backend can assign addresses (for example, in @code{a.out}, where
- the default address for @code{.data} is dependent on the specific
- target and various flags). */
+ user_set_vma flag is maintained by bfd; if it's not set, the
+ backend can assign addresses (for example, in @code{a.out}, where
+ the default address for @code{.data} is dependent on the specific
+ target and various flags). */
bfd_vma vma;
/* The load address of the section - where it would be in a
rom image; really only used for writing section header
- information. */
+ information. */
bfd_vma lma;
@@ -297,8 +298,8 @@ typedef struct sec
bfd_size_type _cooked_size;
/* The original size on disk of the section, in bytes. Normally this
- value is the same as the size, but if some relaxing has
- been done, then this value will be bigger. */
+ value is the same as the size, but if some relaxing has
+ been done, then this value will be bigger. */
bfd_size_type _raw_size;
@@ -383,7 +384,7 @@ typedef struct sec
bfd *owner;
- /* A symbol which points at this section only */
+ /* A symbol which points at this section only */
struct symbol_cache_entry *symbol;
struct symbol_cache_entry **symbol_ptr_ptr;
@@ -393,7 +394,7 @@ typedef struct sec
/* These sections are global, and are managed by BFD. The application
and target back end are not permitted to change the values in
- these sections. New code should use the section_ptr macros rather
+ these sections. New code should use the section_ptr macros rather
than referring directly to the const sections. The const sections
may eventually vanish. */
#define BFD_ABS_SECTION_NAME "*ABS*"
@@ -430,7 +431,7 @@ extern const struct symbol_cache_entry * const bfd_ind_symbol;
@node section prototypes, , typedef asection, Sections
@subsection Section prototypes
These are the functions exported by the section handling part of BFD.
-@*
+
@findex bfd_get_section_by_name
@subsubsection @code{bfd_get_section_by_name}
@strong{Synopsis}
@@ -446,7 +447,7 @@ This should only be used in special cases; the normal way to process
all sections of a given name is to use @code{bfd_map_over_sections} and
@code{strcmp} on the name (or better yet, base it on the section flags
or something else) for each section.
-@*
+
@findex bfd_make_section_old_way
@subsubsection @code{bfd_make_section_old_way}
@strong{Synopsis}
@@ -473,7 +474,7 @@ If output has already started for this BFD.
@code{bfd_error_no_memory} -
If memory allocation fails.
@end itemize
-@*
+
@findex bfd_make_section_anyway
@subsubsection @code{bfd_make_section_anyway}
@strong{Synopsis}
@@ -493,7 +494,7 @@ Return @code{NULL} and set @code{bfd_error} on error; possible errors are:
@item
@code{bfd_error_no_memory} - If memory allocation fails.
@end itemize
-@*
+
@findex bfd_make_section
@subsubsection @code{bfd_make_section}
@strong{Synopsis}
@@ -505,7 +506,7 @@ Like @code{bfd_make_section_anyway}, but return @code{NULL} (without calling
bfd_set_error ()) without changing the section chain if there is already a
section named @var{name}. If there is an error, return @code{NULL} and set
@code{bfd_error}.
-@*
+
@findex bfd_set_section_flags
@subsubsection @code{bfd_set_section_flags}
@strong{Synopsis}
@@ -525,7 +526,7 @@ The section cannot have one or more of the attributes
requested. For example, a .bss section in @code{a.out} may not
have the @code{SEC_HAS_CONTENTS} field set.
@end itemize
-@*
+
@findex bfd_map_over_sections
@subsubsection @code{bfd_map_over_sections}
@strong{Synopsis}
@@ -542,18 +543,18 @@ attached to the BFD @var{abfd}, passing @var{obj} as an
argument. The function will be called as if by
@example
- func(abfd, the_section, obj);
+ func(abfd, the_section, obj);
@end example
This is the prefered method for iterating over sections; an
alternative would be to use a loop:
@example
- section *p;
- for (p = abfd->sections; p != NULL; p = p->next)
- func(abfd, p, ...)
+ section *p;
+ for (p = abfd->sections; p != NULL; p = p->next)
+ func(abfd, p, ...)
@end example
-@*
+
@findex bfd_set_section_size
@subsubsection @code{bfd_set_section_size}
@strong{Synopsis}
@@ -571,7 +572,7 @@ Possible error returns:
@code{bfd_error_invalid_operation} -
Writing has started to the BFD, so setting the size is invalid.
@end itemize
-@*
+
@findex bfd_set_section_contents
@subsubsection @code{bfd_set_section_contents}
@strong{Synopsis}
@@ -602,7 +603,7 @@ and some more too
@end itemize
This routine is front end to the back end function
@code{_bfd_set_section_contents}.
-@*
+
@findex bfd_get_section_contents
@subsubsection @code{bfd_get_section_contents}
@strong{Synopsis}
@@ -622,7 +623,7 @@ flag set are requested or if the section does not have the
@code{SEC_HAS_CONTENTS} flag set, then the @var{location} is filled
with zeroes. If no errors occur, @code{true} is returned, else
@code{false}.
-@*
+
@findex bfd_copy_private_section_data
@subsubsection @code{bfd_copy_private_section_data}
@strong{Synopsis}
@@ -644,6 +645,6 @@ Not enough memory exists to create private data for @var{osec}.
@example
#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
BFD_SEND (obfd, _bfd_copy_private_section_data, \
- (ibfd, isection, obfd, osection))
+ (ibfd, isection, obfd, osection))
@end example
-@*
+
diff --git a/contrib/binutils/bfd/doc/syms.texi b/contrib/binutils/bfd/doc/syms.texi
index 034f086..48593f4 100644
--- a/contrib/binutils/bfd/doc/syms.texi
+++ b/contrib/binutils/bfd/doc/syms.texi
@@ -29,7 +29,7 @@ the scenes'' information will be still available.
* typedef asymbol::
* symbol handling functions::
@end menu
-@*
+
@node Reading Symbols, Writing Symbols, Symbols, Symbols
@subsection Reading symbols
There are two stages to reading a symbol table from a BFD:
@@ -37,35 +37,35 @@ allocating storage, and the actual reading process. This is an
excerpt from an application which reads the symbol table:
@example
- long storage_needed;
- asymbol **symbol_table;
- long number_of_symbols;
- long i;
+ long storage_needed;
+ asymbol **symbol_table;
+ long number_of_symbols;
+ long i;
- storage_needed = bfd_get_symtab_upper_bound (abfd);
+ storage_needed = bfd_get_symtab_upper_bound (abfd);
if (storage_needed < 0)
FAIL
- if (storage_needed == 0) @{
- return ;
- @}
- symbol_table = (asymbol **) xmalloc (storage_needed);
- ...
- number_of_symbols =
- bfd_canonicalize_symtab (abfd, symbol_table);
+ if (storage_needed == 0) @{
+ return ;
+ @}
+ symbol_table = (asymbol **) xmalloc (storage_needed);
+ ...
+ number_of_symbols =
+ bfd_canonicalize_symtab (abfd, symbol_table);
if (number_of_symbols < 0)
FAIL
- for (i = 0; i < number_of_symbols; i++) @{
- process_symbol (symbol_table[i]);
- @}
+ for (i = 0; i < number_of_symbols; i++) @{
+ process_symbol (symbol_table[i]);
+ @}
@end example
All storage for the symbols themselves is in an objalloc
connected to the BFD; it is freed when the BFD is closed.
-@*
+
@node Writing Symbols, Mini Symbols, Reading Symbols, Symbols
@subsection Writing symbols
Writing of a symbol table is automatic when a BFD open for
@@ -79,31 +79,31 @@ which has been created using @code{bfd_make_empty_symbol}. Here is an
example showing the creation of a symbol table with only one element:
@example
- #include "bfd.h"
- main()
- @{
- bfd *abfd;
- asymbol *ptrs[2];
- asymbol *new;
-
- abfd = bfd_openw("foo","a.out-sunos-big");
- bfd_set_format(abfd, bfd_object);
- new = bfd_make_empty_symbol(abfd);
- new->name = "dummy_symbol";
- new->section = bfd_make_section_old_way(abfd, ".text");
- new->flags = BSF_GLOBAL;
- new->value = 0x12345;
-
- ptrs[0] = new;
- ptrs[1] = (asymbol *)0;
-
- bfd_set_symtab(abfd, ptrs, 1);
- bfd_close(abfd);
- @}
-
- ./makesym
- nm foo
- 00012345 A dummy_symbol
+ #include "bfd.h"
+ main()
+ @{
+ bfd *abfd;
+ asymbol *ptrs[2];
+ asymbol *new;
+
+ abfd = bfd_openw("foo","a.out-sunos-big");
+ bfd_set_format(abfd, bfd_object);
+ new = bfd_make_empty_symbol(abfd);
+ new->name = "dummy_symbol";
+ new->section = bfd_make_section_old_way(abfd, ".text");
+ new->flags = BSF_GLOBAL;
+ new->value = 0x12345;
+
+ ptrs[0] = new;
+ ptrs[1] = (asymbol *)0;
+
+ bfd_set_symtab(abfd, ptrs, 1);
+ bfd_close(abfd);
+ @}
+
+ ./makesym
+ nm foo
+ 00012345 A dummy_symbol
@end example
Many formats cannot represent arbitary symbol information; for
@@ -111,7 +111,7 @@ instance, the @code{a.out} object format does not allow an
arbitary number of sections. A symbol pointing to a section
which is not one of @code{.text}, @code{.data} or @code{.bss} cannot
be described.
-@*
+
@node Mini Symbols, typedef asymbol, Writing Symbols, Symbols
@subsection Mini Symbols
Mini symbols provide read-only access to the symbol table.
@@ -130,124 +130,125 @@ to a minisymbol, and a pointer to a structure returned by
@code{bfd_make_empty_symbol}, and return a @code{asymbol} structure.
The return value may or may not be the same as the value from
@code{bfd_make_empty_symbol} which was passed in.
-@*
+
@node typedef asymbol, symbol handling functions, Mini Symbols, Symbols
@subsection typedef asymbol
An @code{asymbol} has the form:
-@*
-.
+
+
@example
+
typedef struct symbol_cache_entry
@{
- /* A pointer to the BFD which owns the symbol. This information
- is necessary so that a back end can work out what additional
- information (invisible to the application writer) is carried
- with the symbol.
+ /* A pointer to the BFD which owns the symbol. This information
+ is necessary so that a back end can work out what additional
+ information (invisible to the application writer) is carried
+ with the symbol.
- This field is *almost* redundant, since you can use section->owner
- instead, except that some symbols point to the global sections
- bfd_@{abs,com,und@}_section. This could be fixed by making
- these globals be per-bfd (or per-target-flavor). FIXME. */
+ This field is *almost* redundant, since you can use section->owner
+ instead, except that some symbols point to the global sections
+ bfd_@{abs,com,und@}_section. This could be fixed by making
+ these globals be per-bfd (or per-target-flavor). FIXME. */
struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
- /* The text of the symbol. The name is left alone, and not copied; the
- application may not alter it. */
+ /* The text of the symbol. The name is left alone, and not copied; the
+ application may not alter it. */
CONST char *name;
- /* The value of the symbol. This really should be a union of a
+ /* The value of the symbol. This really should be a union of a
numeric value with a pointer, since some flags indicate that
a pointer to another symbol is stored here. */
symvalue value;
- /* Attributes of a symbol: */
+ /* Attributes of a symbol: */
#define BSF_NO_FLAGS 0x00
- /* The symbol has local scope; @code{static} in @code{C}. The value
- is the offset into the section of the data. */
-#define BSF_LOCAL 0x01
+ /* The symbol has local scope; @code{static} in @code{C}. The value
+ is the offset into the section of the data. */
+#define BSF_LOCAL 0x01
- /* The symbol has global scope; initialized data in @code{C}. The
- value is the offset into the section of the data. */
-#define BSF_GLOBAL 0x02
+ /* The symbol has global scope; initialized data in @code{C}. The
+ value is the offset into the section of the data. */
+#define BSF_GLOBAL 0x02
- /* The symbol has global scope and is exported. The value is
- the offset into the section of the data. */
-#define BSF_EXPORT BSF_GLOBAL /* no real difference */
+ /* The symbol has global scope and is exported. The value is
+ the offset into the section of the data. */
+#define BSF_EXPORT BSF_GLOBAL /* no real difference */
- /* A normal C symbol would be one of:
- @code{BSF_LOCAL}, @code{BSF_FORT_COMM}, @code{BSF_UNDEFINED} or
- @code{BSF_GLOBAL} */
+ /* A normal C symbol would be one of:
+ @code{BSF_LOCAL}, @code{BSF_FORT_COMM}, @code{BSF_UNDEFINED} or
+ @code{BSF_GLOBAL} */
- /* The symbol is a debugging record. The value has an arbitary
- meaning. */
-#define BSF_DEBUGGING 0x08
+ /* The symbol is a debugging record. The value has an arbitary
+ meaning. */
+#define BSF_DEBUGGING 0x08
- /* The symbol denotes a function entry point. Used in ELF,
- perhaps others someday. */
+ /* The symbol denotes a function entry point. Used in ELF,
+ perhaps others someday. */
#define BSF_FUNCTION 0x10
- /* Used by the linker. */
+ /* Used by the linker. */
#define BSF_KEEP 0x20
#define BSF_KEEP_G 0x40
- /* A weak global symbol, overridable without warnings by
- a regular global symbol of the same name. */
+ /* A weak global symbol, overridable without warnings by
+ a regular global symbol of the same name. */
#define BSF_WEAK 0x80
/* This symbol was created to point to a section, e.g. ELF's
- STT_SECTION symbols. */
+ STT_SECTION symbols. */
#define BSF_SECTION_SYM 0x100
- /* The symbol used to be a common symbol, but now it is
- allocated. */
+ /* The symbol used to be a common symbol, but now it is
+ allocated. */
#define BSF_OLD_COMMON 0x200
- /* The default value for common data. */
+ /* The default value for common data. */
#define BFD_FORT_COMM_DEFAULT_VALUE 0
- /* In some files the type of a symbol sometimes alters its
- location in an output file - ie in coff a @code{ISFCN} symbol
- which is also @code{C_EXT} symbol appears where it was
- declared and not at the end of a section. This bit is set
- by the target BFD part to convey this information. */
+ /* In some files the type of a symbol sometimes alters its
+ location in an output file - ie in coff a @code{ISFCN} symbol
+ which is also @code{C_EXT} symbol appears where it was
+ declared and not at the end of a section. This bit is set
+ by the target BFD part to convey this information. */
#define BSF_NOT_AT_END 0x400
- /* Signal that the symbol is the label of constructor section. */
+ /* Signal that the symbol is the label of constructor section. */
#define BSF_CONSTRUCTOR 0x800
- /* Signal that the symbol is a warning symbol. The name is a
- warning. The name of the next symbol is the one to warn about;
- if a reference is made to a symbol with the same name as the next
- symbol, a warning is issued by the linker. */
+ /* Signal that the symbol is a warning symbol. The name is a
+ warning. The name of the next symbol is the one to warn about;
+ if a reference is made to a symbol with the same name as the next
+ symbol, a warning is issued by the linker. */
#define BSF_WARNING 0x1000
- /* Signal that the symbol is indirect. This symbol is an indirect
- pointer to the symbol with the same name as the next symbol. */
+ /* Signal that the symbol is indirect. This symbol is an indirect
+ pointer to the symbol with the same name as the next symbol. */
#define BSF_INDIRECT 0x2000
- /* BSF_FILE marks symbols that contain a file name. This is used
- for ELF STT_FILE symbols. */
+ /* BSF_FILE marks symbols that contain a file name. This is used
+ for ELF STT_FILE symbols. */
#define BSF_FILE 0x4000
- /* Symbol is from dynamic linking information. */
-#define BSF_DYNAMIC 0x8000
+ /* Symbol is from dynamic linking information. */
+#define BSF_DYNAMIC 0x8000
/* The symbol denotes a data object. Used in ELF, and perhaps
others someday. */
-#define BSF_OBJECT 0x10000
+#define BSF_OBJECT 0x10000
flagword flags;
- /* A pointer to the section to which this symbol is
- relative. This will always be non NULL, there are special
+ /* A pointer to the section to which this symbol is
+ relative. This will always be non NULL, there are special
sections for undefined and absolute symbols. */
struct sec *section;
- /* Back end special data. */
+ /* Back end special data. */
union
@{
PTR p;
@@ -260,7 +261,7 @@ typedef struct symbol_cache_entry
@node symbol handling functions, , typedef asymbol, Symbols
@subsection Symbol handling functions
-@*
+
@findex bfd_get_symtab_upper_bound
@subsubsection @code{bfd_get_symtab_upper_bound}
@strong{Description}@*
@@ -272,7 +273,7 @@ the BFD, then return 0. If an error occurs, return -1.
#define bfd_get_symtab_upper_bound(abfd) \
BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
@end example
-@*
+
@findex bfd_is_local_label
@subsubsection @code{bfd_is_local_label}
@strong{Synopsis}
@@ -282,7 +283,7 @@ boolean bfd_is_local_label(bfd *abfd, asymbol *sym);
@strong{Description}@*
Return true if the given symbol @var{sym} in the BFD @var{abfd} is
a compiler generated local label, else return false.
-@*
+
@findex bfd_is_local_label_name
@subsubsection @code{bfd_is_local_label_name}
@strong{Synopsis}
@@ -298,7 +299,7 @@ local label.
#define bfd_is_local_label_name(abfd, name) \
BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
@end example
-@*
+
@findex bfd_canonicalize_symtab
@subsubsection @code{bfd_canonicalize_symtab}
@strong{Description}@*
@@ -312,7 +313,7 @@ including the NULL.
BFD_SEND (abfd, _bfd_canonicalize_symtab,\
(abfd, location))
@end example
-@*
+
@findex bfd_set_symtab
@subsubsection @code{bfd_set_symtab}
@strong{Synopsis}
@@ -323,7 +324,7 @@ boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count);
Arrange that when the output BFD @var{abfd} is closed,
the table @var{location} of @var{count} pointers to symbols
will be written.
-@*
+
@findex bfd_print_symbol_vandf
@subsubsection @code{bfd_print_symbol_vandf}
@strong{Synopsis}
@@ -333,7 +334,7 @@ void bfd_print_symbol_vandf(PTR file, asymbol *symbol);
@strong{Description}@*
Print the value and flags of the @var{symbol} supplied to the
stream @var{file}.
-@*
+
@findex bfd_make_empty_symbol
@subsubsection @code{bfd_make_empty_symbol}
@strong{Description}@*
@@ -348,7 +349,7 @@ information, and will cause problems later on.
#define bfd_make_empty_symbol(abfd) \
BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
@end example
-@*
+
@findex bfd_make_debug_symbol
@subsubsection @code{bfd_make_debug_symbol}
@strong{Description}@*
@@ -359,13 +360,13 @@ yet to be worked out.
#define bfd_make_debug_symbol(abfd,ptr,size) \
BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
@end example
-@*
+
@findex bfd_decode_symclass
@subsubsection @code{bfd_decode_symclass}
@strong{Description}@*
Return a character corresponding to the symbol
class of @var{symbol}, or '?' for an unknown class.
-@*
+
@strong{Synopsis}
@example
int bfd_decode_symclass(asymbol *symbol);
@@ -376,7 +377,7 @@ int bfd_decode_symclass(asymbol *symbol);
Fill in the basic info about symbol that nm needs.
Additional info may be added by the back-ends after
calling this function.
-@*
+
@strong{Synopsis}
@example
void bfd_symbol_info(asymbol *symbol, symbol_info *ret);
@@ -402,6 +403,6 @@ Not enough memory exists to create private data for @var{osec}.
@example
#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
- (ibfd, isymbol, obfd, osymbol))
+ (ibfd, isymbol, obfd, osymbol))
@end example
-@*
+
diff --git a/contrib/binutils/bfd/doc/targets.texi b/contrib/binutils/bfd/doc/targets.texi
index 05dce15..ccaaf40 100644
--- a/contrib/binutils/bfd/doc/targets.texi
+++ b/contrib/binutils/bfd/doc/targets.texi
@@ -1,6 +1,6 @@
@section Targets
-@*
+
@strong{Description}@*
Each port of BFD to a different machine requries the creation
of a target back end. All the back end provides to the root
@@ -54,12 +54,12 @@ type is tried to see if it recognizes the specified format.
@menu
* bfd_target::
@end menu
-@*
+
@node bfd_target, , Targets, Targets
@subsection bfd_target
-@*
+
@strong{Description}@*
This structure contains everything that BFD knows about a
target. It includes things like its byte order, name, and which
@@ -253,10 +253,10 @@ CAT(NAME,_bfd_set_private_flags),\
CAT(NAME,_bfd_print_private_bfd_data)\
/* Called to copy BFD general private data from one object file
to another. */
- boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
+ boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
/* Called to merge BFD general private data from one object file
to a common output file when linking. */
- boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
+ boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
/* Called to copy BFD private section data from one object file
to another. */
boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
@@ -264,9 +264,9 @@ CAT(NAME,_bfd_print_private_bfd_data)\
/* Called to copy BFD private symbol data from one symbol
to another. */
boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
- bfd *, asymbol *));
+ bfd *, asymbol *));
/* Called to set private backend flags */
- boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
+ boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
/* Called to print private BFD data */
boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
@@ -335,7 +335,7 @@ CAT(NAME,_minisymbol_to_symbol)
struct symbol_cache_entry *,
symbol_info *));
#define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e))
- boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
+ boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
boolean (*_bfd_find_nearest_line) PARAMS ((bfd *abfd,
@@ -436,7 +436,7 @@ in this structure.
PTR backend_data;
@} bfd_target;
@end example
-@*
+
@findex bfd_set_default_target
@subsubsection @code{bfd_set_default_target}
@strong{Synopsis}
@@ -447,7 +447,7 @@ boolean bfd_set_default_target (const char *name);
Set the default target vector to use when recognizing a BFD.
This takes the name of the target, which may be a BFD target
name or a configuration triplet.
-@*
+
@findex bfd_find_target
@subsubsection @code{bfd_find_target}
@strong{Synopsis}
@@ -464,7 +464,7 @@ variable to "default" will cause the first entry in the target
list to be returned, and "target_defaulted" will be set in the
BFD. This causes @code{bfd_check_format} to loop over all the
targets to find the one that matches the file being read.
-@*
+
@findex bfd_target_list
@subsubsection @code{bfd_target_list}
@strong{Synopsis}
@@ -475,4 +475,4 @@ const char **bfd_target_list(void);
Return a freshly malloced NULL-terminated
vector of the names of all the valid BFD targets. Do not
modify the names.
-@*
+
diff --git a/contrib/binutils/bfd/dwarf2.c b/contrib/binutils/bfd/dwarf2.c
new file mode 100644
index 0000000..ed2ba13
--- /dev/null
+++ b/contrib/binutils/bfd/dwarf2.c
@@ -0,0 +1,1457 @@
+/* DWARF 2 support.
+ Copyright 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions
+ (gavin@cygnus.com).
+
+ From the dwarf2read.c header:
+ Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology,
+ Inc. with support from Florida State University (under contract
+ with the Ada Joint Program Office), and Silicon Graphics, Inc.
+ Initial contribution by Brent Benson, Harris Computer Systems, Inc.,
+ based on Fred Fish's (Cygnus Support) implementation of DWARF 1
+ support in dwarfread.c
+
+This file is part of BFD.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libiberty.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf/dwarf2.h"
+
+/* The data in the .debug_line statement prologue looks like this. */
+struct line_head
+ {
+ unsigned int total_length;
+ unsigned short version;
+ unsigned int prologue_length;
+ unsigned char minimum_instruction_length;
+ unsigned char default_is_stmt;
+ int line_base;
+ unsigned char line_range;
+ unsigned char opcode_base;
+ unsigned char *standard_opcode_lengths;
+ };
+
+/* Attributes have a name and a value */
+struct attribute
+ {
+ enum dwarf_attribute name;
+ enum dwarf_form form;
+ union
+ {
+ char *str;
+ struct dwarf_block *blk;
+ unsigned int unsnd;
+ int snd;
+ bfd_vma addr;
+ }
+ u;
+ };
+
+/* Get at parts of an attribute structure */
+
+#define DW_STRING(attr) ((attr)->u.str)
+#define DW_UNSND(attr) ((attr)->u.unsnd)
+#define DW_BLOCK(attr) ((attr)->u.blk)
+#define DW_SND(attr) ((attr)->u.snd)
+#define DW_ADDR(attr) ((attr)->u.addr)
+
+/* Blocks are a bunch of untyped bytes. */
+struct dwarf_block
+ {
+ unsigned int size;
+ char *data;
+ };
+
+
+struct dwarf2_debug {
+
+ /* A list of all previously read comp_units. */
+ struct comp_unit* all_comp_units;
+
+ /* The next unread compilation unit within the .debug_info section.
+ Zero indicates that the .debug_info section has not been loaded
+ into a buffer yet.*/
+ char* info_ptr;
+
+ /* Pointer to the end of the .debug_info section memory buffer. */
+ char* info_ptr_end;
+
+ /* Pointer to the .debug_abbrev section loaded into memory. */
+ char* dwarf_abbrev_buffer;
+
+ /* Length of the loaded .debug_abbrev section. */
+ unsigned long dwarf_abbrev_size;
+};
+
+
+/* VERBATUM
+ The following function up to the END VERBATUM mark are
+ copied directly from dwarf2read.c. */
+
+/* read dwarf information from a buffer */
+
+static unsigned int
+read_1_byte (abfd, buf)
+ bfd *abfd;
+ char *buf;
+{
+ return bfd_get_8 (abfd, (bfd_byte *) buf);
+}
+
+static int
+read_1_signed_byte (abfd, buf)
+ bfd *abfd;
+ char *buf;
+{
+ return bfd_get_signed_8 (abfd, (bfd_byte *) buf);
+}
+
+static unsigned int
+read_2_bytes (abfd, buf)
+ bfd *abfd;
+ char *buf;
+{
+ return bfd_get_16 (abfd, (bfd_byte *) buf);
+}
+
+#if 0
+
+/* This is not used. */
+
+static int
+read_2_signed_bytes (abfd, buf)
+ bfd *abfd;
+ char *buf;
+{
+ return bfd_get_signed_16 (abfd, (bfd_byte *) buf);
+}
+
+#endif
+
+static unsigned int
+read_4_bytes (abfd, buf)
+ bfd *abfd;
+ char *buf;
+{
+ return bfd_get_32 (abfd, (bfd_byte *) buf);
+}
+
+#if 0
+
+/* This is not used. */
+
+static int
+read_4_signed_bytes (abfd, buf)
+ bfd *abfd;
+ char *buf;
+{
+ return bfd_get_signed_32 (abfd, (bfd_byte *) buf);
+}
+
+#endif
+
+static unsigned int
+read_8_bytes (abfd, buf)
+ bfd *abfd;
+ char *buf;
+{
+ return bfd_get_64 (abfd, (bfd_byte *) buf);
+}
+
+static char *
+read_n_bytes (abfd, buf, size)
+ bfd * abfd;
+ char *buf;
+ unsigned int size;
+{
+ /* If the size of a host char is 8 bits, we can return a pointer
+ to the buffer, otherwise we have to copy the data to a buffer
+ allocated on the temporary obstack. */
+ return buf;
+}
+
+static char *
+read_string (abfd, buf, bytes_read_ptr)
+ bfd *abfd;
+ char *buf;
+ unsigned int *bytes_read_ptr;
+{
+ /* If the size of a host char is 8 bits, we can return a pointer
+ to the string, otherwise we have to copy the string to a buffer
+ allocated on the temporary obstack. */
+ if (*buf == '\0')
+ {
+ *bytes_read_ptr = 1;
+ return NULL;
+ }
+ *bytes_read_ptr = strlen (buf) + 1;
+ return buf;
+}
+
+static unsigned int
+read_unsigned_leb128 (abfd, buf, bytes_read_ptr)
+ bfd *abfd;
+ char *buf;
+ unsigned int *bytes_read_ptr;
+{
+ unsigned int result, num_read;
+ int i, shift;
+ unsigned char byte;
+
+ result = 0;
+ shift = 0;
+ num_read = 0;
+ i = 0;
+ while (1)
+ {
+ byte = bfd_get_8 (abfd, (bfd_byte *) buf);
+ buf++;
+ num_read++;
+ result |= ((byte & 127) << shift);
+ if ((byte & 128) == 0)
+ {
+ break;
+ }
+ shift += 7;
+ }
+ *bytes_read_ptr = num_read;
+ return result;
+}
+
+static int
+read_signed_leb128 (abfd, buf, bytes_read_ptr)
+ bfd *abfd;
+ char *buf;
+ unsigned int *bytes_read_ptr;
+{
+ int result;
+ int i, shift, size, num_read;
+ unsigned char byte;
+
+ result = 0;
+ shift = 0;
+ size = 32;
+ num_read = 0;
+ i = 0;
+ while (1)
+ {
+ byte = bfd_get_8 (abfd, (bfd_byte *) buf);
+ buf++;
+ num_read++;
+ result |= ((byte & 127) << shift);
+ shift += 7;
+ if ((byte & 128) == 0)
+ {
+ break;
+ }
+ }
+ if ((shift < size) && (byte & 0x40))
+ {
+ result |= -(1 << shift);
+ }
+ *bytes_read_ptr = num_read;
+ return result;
+}
+
+/* END VERBATUM */
+
+
+static bfd_vma
+read_address (abfd, buf)
+ bfd *abfd;
+ char *buf;
+{
+ bfd_vma retval = 0;
+
+ if (sizeof(retval) == 4)
+ {
+ retval = bfd_get_32 (abfd, (bfd_byte *) buf);
+ } else {
+ retval = bfd_get_64 (abfd, (bfd_byte *) buf);
+ }
+ return retval;
+}
+
+
+
+
+
+/* This data structure holds the information of an abbrev. */
+struct abbrev_info
+ {
+ unsigned int number; /* number identifying abbrev */
+ enum dwarf_tag tag; /* dwarf tag */
+ int has_children; /* boolean */
+ unsigned int num_attrs; /* number of attributes */
+ struct attr_abbrev *attrs; /* an array of attribute descriptions */
+ struct abbrev_info *next; /* next in chain */
+ };
+
+struct attr_abbrev
+ {
+ enum dwarf_attribute name;
+ enum dwarf_form form;
+ };
+
+#ifndef ABBREV_HASH_SIZE
+#define ABBREV_HASH_SIZE 121
+#endif
+#ifndef ATTR_ALLOC_CHUNK
+#define ATTR_ALLOC_CHUNK 4
+#endif
+
+/* Lookup an abbrev_info structure in the abbrev hash table. */
+
+static struct abbrev_info *
+lookup_abbrev (number,abbrevs)
+ unsigned int number;
+ struct abbrev_info **abbrevs;
+{
+ unsigned int hash_number;
+ struct abbrev_info *abbrev;
+
+ hash_number = number % ABBREV_HASH_SIZE;
+ abbrev = abbrevs[hash_number];
+
+ while (abbrev)
+ {
+ if (abbrev->number == number)
+ return abbrev;
+ else
+ abbrev = abbrev->next;
+ }
+ return NULL;
+}
+
+/* In DWARF version 2, the description of the debugging information is
+ stored in a separate .debug_abbrev section. Before we read any
+ dies from a section we read in all abbreviations and install them
+ in a hash table. */
+
+static struct abbrev_info**
+read_abbrevs (abfd, offset)
+ bfd * abfd;
+ unsigned int offset;
+{
+ struct abbrev_info **abbrevs;
+ char *abbrev_ptr;
+ struct abbrev_info *cur_abbrev;
+ unsigned int abbrev_number, bytes_read, abbrev_name;
+ unsigned int abbrev_form, hash_number;
+ struct dwarf2_debug *stash;
+
+ stash = elf_tdata(abfd)->dwarf2_find_line_info;
+
+ if (! stash->dwarf_abbrev_buffer)
+ {
+ asection *msec;
+
+ msec = bfd_get_section_by_name (abfd, ".debug_abbrev");
+ if (! msec)
+ {
+ (*_bfd_error_handler) ("Dwarf Error: Can't find .debug_abbrev section.");
+ bfd_set_error (bfd_error_bad_value);
+ return 0;
+ }
+
+ stash->dwarf_abbrev_size = bfd_get_section_size_before_reloc (msec);
+ stash->dwarf_abbrev_buffer = (unsigned char*) bfd_alloc (abfd, stash->dwarf_abbrev_size);
+ if (! stash->dwarf_abbrev_buffer)
+ return 0;
+
+ if (! bfd_get_section_contents (abfd, msec,
+ stash->dwarf_abbrev_buffer, 0,
+ stash->dwarf_abbrev_size))
+ return 0;
+ }
+
+ if (offset > stash->dwarf_abbrev_size)
+ {
+ (*_bfd_error_handler) ("Dwarf Error: Abbrev offset (%u) bigger than abbrev size (%u).",
+ offset, stash->dwarf_abbrev_size );
+ bfd_set_error (bfd_error_bad_value);
+ return 0;
+ }
+
+ abbrevs = (struct abbrev_info**) bfd_zalloc (abfd, sizeof(struct abbrev_info*) * ABBREV_HASH_SIZE);
+
+ abbrev_ptr = stash->dwarf_abbrev_buffer + offset;
+ abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+ abbrev_ptr += bytes_read;
+
+ /* loop until we reach an abbrev number of 0 */
+ while (abbrev_number)
+ {
+ cur_abbrev = (struct abbrev_info*)bfd_zalloc (abfd, sizeof (struct abbrev_info));
+
+ /* read in abbrev header */
+ cur_abbrev->number = abbrev_number;
+ cur_abbrev->tag = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+ abbrev_ptr += bytes_read;
+ cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr);
+ abbrev_ptr += 1;
+
+ /* now read in declarations */
+ abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+ abbrev_ptr += bytes_read;
+ abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+ abbrev_ptr += bytes_read;
+ while (abbrev_name)
+ {
+ if ((cur_abbrev->num_attrs % ATTR_ALLOC_CHUNK) == 0)
+ {
+ cur_abbrev->attrs = (struct attr_abbrev *)
+ bfd_realloc (cur_abbrev->attrs,
+ (cur_abbrev->num_attrs + ATTR_ALLOC_CHUNK)
+ * sizeof (struct attr_abbrev));
+ if (! cur_abbrev->attrs)
+ return 0;
+ }
+ cur_abbrev->attrs[cur_abbrev->num_attrs].name = abbrev_name;
+ cur_abbrev->attrs[cur_abbrev->num_attrs++].form = abbrev_form;
+ abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+ abbrev_ptr += bytes_read;
+ abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+ abbrev_ptr += bytes_read;
+ }
+
+ hash_number = abbrev_number % ABBREV_HASH_SIZE;
+ cur_abbrev->next = abbrevs[hash_number];
+ abbrevs[hash_number] = cur_abbrev;
+
+ /* Get next abbreviation.
+ Under Irix6 the abbreviations for a compilation unit are not
+ always properly terminated with an abbrev number of 0.
+ Exit loop if we encounter an abbreviation which we have
+ already read (which means we are about to read the abbreviations
+ for the next compile unit) or if the end of the abbreviation
+ table is reached. */
+ if ((unsigned int) (abbrev_ptr - stash->dwarf_abbrev_buffer)
+ >= stash->dwarf_abbrev_size)
+ break;
+ abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+ abbrev_ptr += bytes_read;
+ if (lookup_abbrev (abbrev_number,abbrevs) != NULL)
+ break;
+ }
+
+ return abbrevs;
+}
+
+/* Read an attribute described by an abbreviated attribute. */
+
+static char *
+read_attribute (attr, abbrev, abfd, info_ptr)
+ struct attribute *attr;
+ struct attr_abbrev *abbrev;
+ bfd *abfd;
+ char *info_ptr;
+{
+ unsigned int bytes_read;
+ struct dwarf_block *blk;
+
+ attr->name = abbrev->name;
+ attr->form = abbrev->form;
+ switch (abbrev->form)
+ {
+ case DW_FORM_addr:
+ case DW_FORM_ref_addr:
+ DW_ADDR (attr) = read_address (abfd, info_ptr);
+ info_ptr += sizeof(bfd_vma);
+ break;
+ case DW_FORM_block2:
+ blk = (struct dwarf_block *) bfd_alloc (abfd, sizeof (struct dwarf_block));
+ blk->size = read_2_bytes (abfd, info_ptr);
+ info_ptr += 2;
+ blk->data = read_n_bytes (abfd, info_ptr, blk->size);
+ info_ptr += blk->size;
+ DW_BLOCK (attr) = blk;
+ break;
+ case DW_FORM_block4:
+ blk = (struct dwarf_block *) bfd_alloc (abfd, sizeof (struct dwarf_block));
+ blk->size = read_4_bytes (abfd, info_ptr);
+ info_ptr += 4;
+ blk->data = read_n_bytes (abfd, info_ptr, blk->size);
+ info_ptr += blk->size;
+ DW_BLOCK (attr) = blk;
+ break;
+ case DW_FORM_data2:
+ DW_UNSND (attr) = read_2_bytes (abfd, info_ptr);
+ info_ptr += 2;
+ break;
+ case DW_FORM_data4:
+ DW_UNSND (attr) = read_4_bytes (abfd, info_ptr);
+ info_ptr += 4;
+ break;
+ case DW_FORM_data8:
+ DW_UNSND (attr) = read_8_bytes (abfd, info_ptr);
+ info_ptr += 8;
+ break;
+ case DW_FORM_string:
+ DW_STRING (attr) = read_string (abfd, info_ptr, &bytes_read);
+ info_ptr += bytes_read;
+ break;
+ case DW_FORM_block:
+ blk = (struct dwarf_block *) bfd_alloc (abfd, sizeof (struct dwarf_block));
+ blk->size = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
+ info_ptr += bytes_read;
+ blk->data = read_n_bytes (abfd, info_ptr, blk->size);
+ info_ptr += blk->size;
+ DW_BLOCK (attr) = blk;
+ break;
+ case DW_FORM_block1:
+ blk = (struct dwarf_block *) bfd_alloc (abfd, sizeof (struct dwarf_block));
+ blk->size = read_1_byte (abfd, info_ptr);
+ info_ptr += 1;
+ blk->data = read_n_bytes (abfd, info_ptr, blk->size);
+ info_ptr += blk->size;
+ DW_BLOCK (attr) = blk;
+ break;
+ case DW_FORM_data1:
+ DW_UNSND (attr) = read_1_byte (abfd, info_ptr);
+ info_ptr += 1;
+ break;
+ case DW_FORM_flag:
+ DW_UNSND (attr) = read_1_byte (abfd, info_ptr);
+ info_ptr += 1;
+ break;
+ case DW_FORM_sdata:
+ DW_SND (attr) = read_signed_leb128 (abfd, info_ptr, &bytes_read);
+ info_ptr += bytes_read;
+ break;
+ case DW_FORM_udata:
+ DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
+ info_ptr += bytes_read;
+ break;
+ case DW_FORM_ref1:
+ DW_UNSND (attr) = read_1_byte (abfd, info_ptr);
+ info_ptr += 1;
+ break;
+ case DW_FORM_ref2:
+ DW_UNSND (attr) = read_2_bytes (abfd, info_ptr);
+ info_ptr += 2;
+ break;
+ case DW_FORM_ref4:
+ DW_UNSND (attr) = read_4_bytes (abfd, info_ptr);
+ info_ptr += 4;
+ break;
+ case DW_FORM_ref_udata:
+ DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
+ info_ptr += bytes_read;
+ break;
+ case DW_FORM_strp:
+ case DW_FORM_indirect:
+ default:
+ (*_bfd_error_handler) ("Dwarf Error: Invalid or unhandled FORM value: %d.",
+ abbrev->form);
+ bfd_set_error (bfd_error_bad_value);
+ }
+ return info_ptr;
+}
+
+
+/* Source line information table routines. */
+
+#define FILE_ALLOC_CHUNK 5
+#define DIR_ALLOC_CHUNK 5
+
+struct line_info {
+ struct line_info* prev_line;
+
+ bfd_vma address;
+ char* filename;
+ unsigned int line;
+ unsigned int column;
+};
+
+struct fileinfo {
+ char *name;
+ unsigned int dir;
+ unsigned int time;
+ unsigned int size;
+};
+
+struct line_info_table {
+ bfd* abfd;
+
+ unsigned int num_files;
+ unsigned int num_dirs;
+
+ char* comp_dir;
+ char** dirs;
+ struct fileinfo* files;
+ struct line_info* last_line;
+};
+
+static void
+add_line_info (table, address, filename, line, column)
+ struct line_info_table* table;
+ bfd_vma address;
+ char* filename;
+ unsigned int line;
+ unsigned int column;
+{
+ struct line_info* info = (struct line_info*)
+ bfd_alloc (table->abfd, sizeof (struct line_info));
+
+ info->prev_line = table->last_line;
+ table->last_line = info;
+
+ info->address = address;
+ info->filename = filename;
+ info->line = line;
+ info->column = column;
+}
+
+static char*
+concat_filename (table, file)
+ struct line_info_table* table;
+ unsigned int file;
+{
+ char* filename = table->files[file - 1].name;
+ if (*filename == '/')
+ return filename;
+
+ else
+ {
+ char* dirname = (table->files[file - 1].dir
+ ? table->dirs[table->files[file - 1].dir - 1]
+ : table->comp_dir);
+ return (char*) concat (dirname, "/", filename, NULL);
+ }
+}
+
+/* Decode the line number information for the compilation unit whose
+ line number info is at OFFSET in the .debug_line section.
+ The compilation directory of the file is passed in COMP_DIR. */
+
+static struct line_info_table*
+decode_line_info (abfd, offset, comp_dir)
+ bfd *abfd;
+ unsigned int offset;
+ char *comp_dir;
+{
+ static char* dwarf_line_buffer = 0;
+
+ struct line_info_table* table;
+
+ char *line_ptr;
+ char *line_end;
+ struct line_head lh;
+ unsigned int i, bytes_read;
+ char *cur_file, *cur_dir;
+ unsigned char op_code, extended_op, adj_opcode;
+
+ if (! dwarf_line_buffer)
+ {
+ asection *msec;
+ unsigned long size;
+
+ msec = bfd_get_section_by_name (abfd, ".debug_line");
+ if (! msec)
+ {
+ (*_bfd_error_handler) ("Dwarf Error: Can't find .debug_line section.");
+ bfd_set_error (bfd_error_bad_value);
+ return 0;
+ }
+
+ size = bfd_get_section_size_before_reloc (msec);
+ dwarf_line_buffer = (unsigned char*) bfd_alloc (abfd, size);
+ if (! dwarf_line_buffer)
+ return 0;
+
+ if (! bfd_get_section_contents (abfd, msec,
+ dwarf_line_buffer, 0,
+ size))
+ return 0;
+ }
+
+ table = (struct line_info_table*) bfd_alloc (abfd,
+ sizeof (struct line_info_table));
+ table->abfd = abfd;
+ table->comp_dir = comp_dir;
+
+ table->num_files = 0;
+ table->files = NULL;
+
+ table->num_dirs = 0;
+ table->dirs = NULL;
+
+ line_ptr = dwarf_line_buffer + offset;
+
+ /* read in the prologue */
+ lh.total_length = read_4_bytes (abfd, line_ptr);
+ line_ptr += 4;
+ line_end = line_ptr + lh.total_length;
+ lh.version = read_2_bytes (abfd, line_ptr);
+ line_ptr += 2;
+ lh.prologue_length = read_4_bytes (abfd, line_ptr);
+ line_ptr += 4;
+ lh.minimum_instruction_length = read_1_byte (abfd, line_ptr);
+ line_ptr += 1;
+ lh.default_is_stmt = read_1_byte (abfd, line_ptr);
+ line_ptr += 1;
+ lh.line_base = read_1_signed_byte (abfd, line_ptr);
+ line_ptr += 1;
+ lh.line_range = read_1_byte (abfd, line_ptr);
+ line_ptr += 1;
+ lh.opcode_base = read_1_byte (abfd, line_ptr);
+ line_ptr += 1;
+ lh.standard_opcode_lengths = (unsigned char *)
+ bfd_alloc (abfd, lh.opcode_base * sizeof (unsigned char));
+
+ lh.standard_opcode_lengths[0] = 1;
+ for (i = 1; i < lh.opcode_base; ++i)
+ {
+ lh.standard_opcode_lengths[i] = read_1_byte (abfd, line_ptr);
+ line_ptr += 1;
+ }
+
+ /* Read directory table */
+ while ((cur_dir = read_string (abfd, line_ptr, &bytes_read)) != NULL)
+ {
+ line_ptr += bytes_read;
+ if ((table->num_dirs % DIR_ALLOC_CHUNK) == 0)
+ {
+ table->dirs = (char **)
+ bfd_realloc (table->dirs,
+ (table->num_dirs + DIR_ALLOC_CHUNK) * sizeof (char *));
+ if (! table->dirs)
+ return 0;
+ }
+ table->dirs[table->num_dirs++] = cur_dir;
+ }
+ line_ptr += bytes_read;
+
+ /* Read file name table */
+ while ((cur_file = read_string (abfd, line_ptr, &bytes_read)) != NULL)
+ {
+ line_ptr += bytes_read;
+ if ((table->num_files % FILE_ALLOC_CHUNK) == 0)
+ {
+ table->files = (struct fileinfo *)
+ bfd_realloc (table->files,
+ (table->num_files + FILE_ALLOC_CHUNK)
+ * sizeof (struct fileinfo));
+ if (! table->files)
+ return 0;
+ }
+ table->files[table->num_files].name = cur_file;
+ table->files[table->num_files].dir =
+ read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
+ table->files[table->num_files].time =
+ read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
+ table->files[table->num_files].size =
+ read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
+ table->num_files++;
+ }
+ line_ptr += bytes_read;
+
+ /* Read the statement sequences until there's nothing left. */
+ while (line_ptr < line_end)
+ {
+ /* state machine registers */
+ bfd_vma address = 0;
+ char* filename = concat_filename (table, 1);
+ unsigned int line = 1;
+ unsigned int column = 0;
+ int is_stmt = lh.default_is_stmt;
+ int basic_block = 0;
+ int end_sequence = 0;
+
+ /* Decode the table. */
+ while (! end_sequence)
+ {
+ op_code = read_1_byte (abfd, line_ptr);
+ line_ptr += 1;
+ switch (op_code)
+ {
+ case DW_LNS_extended_op:
+ line_ptr += 1; /* ignore length */
+ extended_op = read_1_byte (abfd, line_ptr);
+ line_ptr += 1;
+ switch (extended_op)
+ {
+ case DW_LNE_end_sequence:
+ end_sequence = 1;
+ add_line_info (table, address, filename, line, column);
+ break;
+ case DW_LNE_set_address:
+ address = read_address (abfd, line_ptr);
+ address &= 0xffffffff;
+ line_ptr += sizeof (bfd_vma);
+ break;
+ case DW_LNE_define_file:
+ cur_file = read_string (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
+ if ((table->num_files % FILE_ALLOC_CHUNK) == 0)
+ {
+ table->files = (struct fileinfo *)
+ bfd_realloc (table->files,
+ (table->num_files + FILE_ALLOC_CHUNK)
+ * sizeof (struct fileinfo));
+ if (! table->files)
+ return 0;
+ }
+ table->files[table->num_files].name = cur_file;
+ table->files[table->num_files].dir =
+ read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
+ table->files[table->num_files].time =
+ read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
+ table->files[table->num_files].size =
+ read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
+ table->num_files++;
+ break;
+ default:
+ (*_bfd_error_handler) ("Dwarf Error: mangled line number section.");
+ bfd_set_error (bfd_error_bad_value);
+ return 0;
+ }
+ break;
+ case DW_LNS_copy:
+ add_line_info (table, address, filename, line, column);
+ basic_block = 0;
+ break;
+ case DW_LNS_advance_pc:
+ address += lh.minimum_instruction_length
+ * read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
+ break;
+ case DW_LNS_advance_line:
+ line += read_signed_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
+ break;
+ case DW_LNS_set_file:
+ {
+ unsigned int file;
+
+ /* The file and directory tables are 0 based, the references
+ are 1 based. */
+ file = read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
+ filename = concat_filename (table, file);
+ break;
+ }
+ case DW_LNS_set_column:
+ column = read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
+ break;
+ case DW_LNS_negate_stmt:
+ is_stmt = (!is_stmt);
+ break;
+ case DW_LNS_set_basic_block:
+ basic_block = 1;
+ break;
+ case DW_LNS_const_add_pc:
+ address += (255 - lh.opcode_base) / lh.line_range;
+ break;
+ case DW_LNS_fixed_advance_pc:
+ address += read_2_bytes (abfd, line_ptr);
+ line_ptr += 2;
+ break;
+ default: /* special operand */
+ adj_opcode = op_code - lh.opcode_base;
+ address += (adj_opcode / lh.line_range)
+ * lh.minimum_instruction_length;
+ line += lh.line_base + (adj_opcode % lh.line_range);
+ /* append row to matrix using current values */
+ add_line_info (table, address, filename, line, column);
+ basic_block = 1;
+ }
+ }
+ }
+
+ return table;
+}
+
+
+/* If ADDR is within TABLE set the output parameters and return true,
+ otherwise return false. The output parameters, FILENAME_PTR and
+ LINENUMBER_PTR, are pointers to the objects to be filled in. */
+
+static boolean
+lookup_address_in_line_info_table (table,
+ addr,
+ filename_ptr,
+ linenumber_ptr)
+ struct line_info_table* table;
+ bfd_vma addr;
+ const char **filename_ptr;
+ unsigned int *linenumber_ptr;
+{
+ struct line_info* each_line;
+ struct line_info* next_line;
+
+ for (next_line = 0, each_line = table->last_line;
+ each_line;
+ next_line = each_line, each_line = each_line->prev_line)
+ {
+ if (addr >= each_line->address
+ && (next_line == 0
+ || addr < next_line->address))
+ {
+ *filename_ptr = each_line->filename;
+ *linenumber_ptr = each_line->line;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+
+
+
+/* Function table functions. */
+
+struct funcinfo {
+ struct funcinfo *prev_func;
+
+ char* name;
+ bfd_vma low;
+ bfd_vma high;
+};
+
+
+/* If ADDR is within TABLE, set FUNCTIONNAME_PTR, and return true. */
+
+static boolean
+lookup_address_in_function_table (table,
+ addr,
+ functionname_ptr)
+ struct funcinfo* table;
+ bfd_vma addr;
+ const char **functionname_ptr;
+{
+ struct funcinfo* each_func;
+
+ for (each_func = table;
+ each_func;
+ each_func = each_func->prev_func)
+ {
+ if (addr >= (each_func->low & 0xffffffff)
+ && addr < (each_func->high & 0xffffffff))
+ {
+ *functionname_ptr = each_func->name;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+
+
+
+/* DWARF2 Compilation unit functions. */
+
+
+/* A minimal decoding of DWARF2 compilation units. We only decode
+ what's needed to get to the line number information. */
+
+struct comp_unit {
+
+ /* Chain the previously read compilation units. */
+ struct comp_unit* next_unit;
+
+ /* Keep the bdf convenient (for memory allocation). */
+ bfd* abfd;
+
+ /* The lowest and higest addresses contained in this compilation
+ unit as specified in the compilation unit header. */
+ bfd_vma low;
+ bfd_vma high;
+
+ /* The DW_AT_name attribute (for error messages). */
+ char* name;
+
+ /* The abbrev hash table. */
+ struct abbrev_info** abbrevs;
+
+ /* Note that an error was found by comp_unit_find_nearest_line. */
+ int error;
+
+ /* The DW_AT_comp_dir attribute */
+ char* comp_dir;
+
+ /* True if there is a line number table associated with this comp. unit. */
+ int stmtlist;
+
+ /* The offset into .debug_line of the line number table. */
+ unsigned long line_offset;
+
+ /* Pointer to the first child die for the comp unit. */
+ char *first_child_die_ptr;
+
+ /* The end of the comp unit. */
+ char *end_ptr;
+
+ /* The decoded line number, NULL if not yet decoded. */
+ struct line_info_table* line_table;
+
+ /* A list of the functions found in this comp. unit. */
+ struct funcinfo* function_table;
+
+};
+
+
+
+/* Scan over each die in a comp. unit looking for functions to add
+ to the function table. */
+
+static boolean
+scan_unit_for_functions (unit)
+ struct comp_unit *unit;
+{
+ bfd *abfd = unit->abfd;
+ char *info_ptr = unit->first_child_die_ptr;
+ int nesting_level = 1;
+
+ while (nesting_level)
+ {
+ unsigned int abbrev_number, bytes_read, i;
+ struct abbrev_info *abbrev;
+ struct attribute attr;
+ struct funcinfo *func;
+ char* name = 0;
+
+ abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
+ info_ptr += bytes_read;
+
+ if (! abbrev_number)
+ {
+ nesting_level--;
+ continue;
+ }
+
+ abbrev = lookup_abbrev (abbrev_number,unit->abbrevs);
+ if (! abbrev)
+ {
+ (*_bfd_error_handler) ("Dwarf Error: Could not find abbrev number %d.",
+ abbrev_number);
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+
+ if (abbrev->tag == DW_TAG_subprogram)
+ {
+ func = (struct funcinfo*) bfd_zalloc (abfd, sizeof (struct funcinfo));
+ func->prev_func = unit->function_table;
+ unit->function_table = func;
+ }
+ else
+ func = NULL;
+
+ for (i = 0; i < abbrev->num_attrs; ++i)
+ {
+ info_ptr = read_attribute (&attr, &abbrev->attrs[i], abfd, info_ptr);
+
+ if (func)
+ {
+ switch (attr.name)
+ {
+ case DW_AT_name:
+
+ name = DW_STRING (&attr);
+
+ /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name. */
+ if (func->name == NULL)
+ func->name = DW_STRING (&attr);
+ break;
+
+ case DW_AT_MIPS_linkage_name:
+ func->name = DW_STRING (&attr);
+ break;
+
+ case DW_AT_low_pc:
+ func->low = DW_ADDR (&attr);
+ break;
+
+ case DW_AT_high_pc:
+ func->high = DW_ADDR (&attr);
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ switch (attr.name)
+ {
+ case DW_AT_name:
+ name = DW_STRING (&attr);
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
+
+ if (abbrev->has_children)
+ nesting_level++;
+ }
+
+ return true;
+}
+
+
+
+
+
+
+/* Parse a DWARF2 compilation unit starting at INFO_PTR. This includes
+ the compilation unit header that proceeds the DIE's, but does not
+ include the length field that preceeds each compilation unit header.
+ END_PTR points one past the end of this comp unit.
+
+ This routine does not read the whole compilation unit; only enough
+ to get to the line number information for the compilation unit.
+ */
+
+static struct comp_unit*
+parse_comp_unit (abfd, info_ptr, end_ptr)
+ bfd* abfd;
+ char* info_ptr;
+ char* end_ptr;
+{
+ struct comp_unit* unit;
+
+ unsigned short version;
+ unsigned int abbrev_offset;
+ unsigned char addr_size;
+ struct abbrev_info** abbrevs;
+
+ unsigned int abbrev_number, bytes_read, i;
+ struct abbrev_info *abbrev;
+ struct attribute attr;
+
+ version = read_2_bytes (abfd, info_ptr);
+ info_ptr += 2;
+ abbrev_offset = read_4_bytes (abfd, info_ptr);
+ info_ptr += 4;
+ addr_size = read_1_byte (abfd, info_ptr);
+ info_ptr += 1;
+
+ if (version != 2)
+ {
+ (*_bfd_error_handler) ("Dwarf Error: found dwarf version '%hu' in compilation unit '%s', this reader only handles version 2 information.",
+ version,
+ unit->name);
+ bfd_set_error (bfd_error_bad_value);
+ return 0;
+ }
+
+ if (addr_size != sizeof (bfd_vma))
+ {
+ (*_bfd_error_handler) ("Dwarf Error: found address size '%u' in compilation unit '%s', this readers only handles address size '%u'.",
+ addr_size,
+ unit->name,
+ sizeof (bfd_vma));
+ bfd_set_error (bfd_error_bad_value);
+ return 0;
+ }
+
+ /* Read the abbrevs for this compilation unit into a table */
+ abbrevs = read_abbrevs (abfd, abbrev_offset);
+ if (! abbrevs)
+ return 0;
+
+ abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
+ info_ptr += bytes_read;
+ if (! abbrev_number)
+ {
+ (*_bfd_error_handler) ("Dwarf Error: Bad abbrev number: %d.",
+ abbrev_number);
+ bfd_set_error (bfd_error_bad_value);
+ return 0;
+ }
+
+ abbrev = lookup_abbrev (abbrev_number, abbrevs);
+ if (! abbrev)
+ {
+ (*_bfd_error_handler) ("Dwarf Error: Could not find abbrev number %d.",
+ abbrev_number);
+ bfd_set_error (bfd_error_bad_value);
+ return 0;
+ }
+
+ unit = (struct comp_unit*) bfd_zalloc (abfd, sizeof (struct comp_unit));
+ unit->abfd = abfd;
+ unit->abbrevs = abbrevs;
+ unit->end_ptr = end_ptr;
+
+ for (i = 0; i < abbrev->num_attrs; ++i)
+ {
+ info_ptr = read_attribute (&attr, &abbrev->attrs[i], abfd, info_ptr);
+
+ /* Store the data if it is of an attribute we want to keep in a
+ partial symbol table. */
+ switch (attr.name)
+ {
+ case DW_AT_stmt_list:
+ unit->stmtlist = 1;
+ unit->line_offset = DW_UNSND (&attr);
+ break;
+
+ case DW_AT_name:
+ unit->name = DW_STRING (&attr);
+ break;
+
+ case DW_AT_low_pc:
+ unit->low = DW_ADDR (&attr);
+ break;
+
+ case DW_AT_high_pc:
+ unit->high = DW_ADDR (&attr);
+ break;
+
+ case DW_AT_comp_dir:
+ {
+ char* comp_dir = DW_STRING (&attr);
+ if (comp_dir)
+ {
+ /* Irix 6.2 native cc prepends <machine>.: to the compilation
+ directory, get rid of it. */
+ char *cp = (char*) strchr (comp_dir, ':');
+
+ if (cp && cp != comp_dir && cp[-1] == '.' && cp[1] == '/')
+ comp_dir = cp + 1;
+ }
+ unit->comp_dir = comp_dir;
+ break;
+ }
+
+ default:
+ break;
+ }
+ }
+
+ unit->first_child_die_ptr = info_ptr;
+ return unit;
+}
+
+
+
+
+
+/* Return true if UNIT contains the address given by ADDR. */
+
+static boolean
+comp_unit_contains_address (unit, addr)
+ struct comp_unit* unit;
+ bfd_vma addr;
+{
+ return ! unit->error
+ && ( addr >= (unit->low & 0xffffffff)
+ && addr <= (unit->high & 0xffffffff));
+}
+
+
+/* If UNIT contains ADDR, set the output parameters to the values for
+ the line containing ADDR. The output parameters, FILENAME_PTR,
+ FUNCTIONNAME_PTR, and LINENUMBER_PTR, are pointers to the objects
+ to be filled in.
+
+ Return true of UNIT contains ADDR, and no errors were encountered;
+ false otherwise. */
+
+static boolean
+comp_unit_find_nearest_line (unit, addr,
+ filename_ptr, functionname_ptr, linenumber_ptr)
+ struct comp_unit* unit;
+ bfd_vma addr;
+ const char **filename_ptr;
+ const char **functionname_ptr;
+ unsigned int *linenumber_ptr;
+{
+ boolean line_p;
+ boolean func_p;
+
+ if (unit->error)
+ return false;
+
+ if (! unit->line_table)
+ {
+ if (! unit->stmtlist)
+ {
+ unit->error = 1;
+ return false;
+ }
+
+ unit->line_table = decode_line_info (unit->abfd,
+ unit->line_offset,
+ unit->comp_dir);
+
+ if (! unit->line_table)
+ {
+ unit->error = 1;
+ return false;
+ }
+
+ if (! scan_unit_for_functions (unit))
+ {
+ unit->error = 1;
+ return false;
+ }
+ }
+
+ line_p = lookup_address_in_line_info_table (unit->line_table,
+ addr,
+ filename_ptr,
+ linenumber_ptr);
+ func_p = lookup_address_in_function_table (unit->function_table,
+ addr,
+ functionname_ptr);
+ return line_p || func_p;
+}
+
+/* The DWARF2 version of find_nearest line.
+ Return true if the line is found without error. */
+
+boolean
+_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr, linenumber_ptr)
+ bfd *abfd;
+ asection *section;
+ asymbol **symbols;
+ bfd_vma offset;
+ const char **filename_ptr;
+ const char **functionname_ptr;
+ unsigned int *linenumber_ptr;
+{
+ /* Read each compilation unit from the section .debug_info, and check
+ to see if it contains the address we are searching for. If yes,
+ lookup the address, and return the line number info. If no, go
+ on to the next compilation unit.
+
+ We keep a list of all the previously read compilation units, and
+ a pointer to the next un-read compilation unit. Check the
+ previously read units before reading more.
+ */
+
+ struct dwarf2_debug *stash = elf_tdata (abfd)->dwarf2_find_line_info;
+
+ /* What address are we looking for? */
+ bfd_vma addr = offset + section->vma;
+
+ struct comp_unit* each;
+
+ *filename_ptr = NULL;
+ *functionname_ptr = NULL;
+ *linenumber_ptr = 0;
+
+ if (! stash)
+ {
+ asection *msec;
+ unsigned long size;
+
+ stash = elf_tdata (abfd)->dwarf2_find_line_info =
+ (struct dwarf2_debug*) bfd_zalloc (abfd, sizeof (struct dwarf2_debug));
+
+ if (! stash)
+ return false;
+
+ msec = bfd_get_section_by_name (abfd, ".debug_info");
+ if (! msec)
+ {
+ /* No dwarf2 info. Note that at this point the stash
+ has been allocated, but contains zeros, this lets
+ future calls to this function fail quicker. */
+ return false;
+ }
+
+ size = bfd_get_section_size_before_reloc (msec);
+ stash->info_ptr = (unsigned char*) bfd_alloc (abfd, size);
+
+ if (! stash->info_ptr)
+ return false;
+
+ if (! bfd_get_section_contents (abfd, msec, stash->info_ptr, 0, size))
+ {
+ stash->info_ptr = 0;
+ return false;
+ }
+
+ stash->info_ptr_end = stash->info_ptr + size;
+ }
+
+
+ /* A null info_ptr indicates that there is no dwarf2 info
+ (or that an error occured while setting up the stash). */
+
+ if (! stash->info_ptr)
+ return false;
+
+
+
+ /* Check the previously read comp. units first. */
+
+ for (each = stash->all_comp_units; each; each = each->next_unit)
+ {
+ if (comp_unit_contains_address (each, addr))
+ return comp_unit_find_nearest_line (each, addr,
+ filename_ptr,
+ functionname_ptr,
+ linenumber_ptr);
+ }
+
+
+ /* Read each remaining comp. units checking each as they are read. */
+ while (stash->info_ptr < stash->info_ptr_end)
+ {
+ struct comp_unit* each;
+ unsigned int length;
+
+ length = read_4_bytes (abfd, stash->info_ptr);
+ stash->info_ptr += 4;
+
+ if (length > 0)
+ {
+ each = parse_comp_unit (abfd, stash->info_ptr,
+ stash->info_ptr + length);
+ stash->info_ptr += length;
+
+ if (each)
+ {
+ each->next_unit = stash->all_comp_units;
+ stash->all_comp_units = each;
+
+ if (comp_unit_contains_address (each, addr))
+ return comp_unit_find_nearest_line (each, addr,
+ filename_ptr,
+ functionname_ptr,
+ linenumber_ptr);
+ }
+ }
+ }
+
+ return false;
+}
+
+/* end of file */
diff --git a/contrib/binutils/bfd/ecoff.c b/contrib/binutils/bfd/ecoff.c
index a5e44a3..274baef 100644
--- a/contrib/binutils/bfd/ecoff.c
+++ b/contrib/binutils/bfd/ecoff.c
@@ -1,5 +1,6 @@
/* Generic ECOFF (Extended-COFF) routines.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -3141,7 +3142,7 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
/* Ultrix appears to use as a hash table size the least power of two
greater than twice the number of entries. */
- for (hashlog = 0; (1 << hashlog) <= 2 * orl_count; hashlog++)
+ for (hashlog = 0; ((unsigned int) 1 << hashlog) <= 2 * orl_count; hashlog++)
;
hashsize = 1 << hashlog;
diff --git a/contrib/binutils/bfd/ecofflink.c b/contrib/binutils/bfd/ecofflink.c
index db18339..a120a2b 100644
--- a/contrib/binutils/bfd/ecofflink.c
+++ b/contrib/binutils/bfd/ecofflink.c
@@ -706,17 +706,18 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
struct string_hash_entry *fh;
/* We look up a string formed from the file name and the
- number of symbols. Sometimes an include file will
- conditionally define a typedef or something based on the
- order of include files. Using the number of symbols as a
- hash reduces the chance that we will merge symbol
- information that should not be merged. */
+ number of symbols and aux entries. Sometimes an include
+ file will conditionally define a typedef or something
+ based on the order of include files. Using the number of
+ symbols and aux entries as a hash reduces the chance that
+ we will merge symbol information that should not be
+ merged. */
name = input_debug->ss + fdr.issBase + fdr.rss;
lookup = (char *) bfd_malloc (strlen (name) + 20);
if (lookup == NULL)
return false;
- sprintf (lookup, "%s %lx", name, fdr.csym);
+ sprintf (lookup, "%s %lx %lx", name, fdr.csym, fdr.caux);
fh = string_hash_lookup (&ainfo->fdr_hash, lookup, true, true);
free (lookup);
diff --git a/contrib/binutils/bfd/elf-bfd.h b/contrib/binutils/bfd/elf-bfd.h
index ecee307..571998a 100644
--- a/contrib/binutils/bfd/elf-bfd.h
+++ b/contrib/binutils/bfd/elf-bfd.h
@@ -1,5 +1,5 @@
/* BFD back-end data structures for ELF files.
- Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -483,9 +483,15 @@ struct elf_backend_data
const struct elf_size_info *s;
+ /* offset of the _GLOBAL_OFFSET_TABLE_ symbol from the start of the
+ .got section */
+ bfd_vma got_symbol_offset;
+
unsigned want_got_plt : 1;
unsigned plt_readonly : 1;
unsigned want_plt_sym : 1;
+ unsigned plt_not_loaded : 1;
+ unsigned plt_alignment : 4;
};
/* Information stored for each BFD section in an ELF file. This
@@ -559,7 +565,7 @@ typedef struct elf_linker_section
bfd_vma max_hole_offset; /* maximum offset for the hole */
elf_linker_section_enum_t which; /* which section this is */
boolean hole_written_p; /* whether the hole has been initialized */
- int alignment; /* alignment for the section */
+ unsigned int alignment; /* alignment for the section */
flagword flags; /* flags to use to create the section */
} elf_linker_section_t;
@@ -651,6 +657,9 @@ struct elf_obj_tdata
find_nearest_line. */
struct mips_elf_find_line *find_line_info;
+ /* A place to stash dwarf2 info for this bfd. */
+ struct dwarf2_debug *dwarf2_find_line_info;
+
/* An array of stub sections indexed by symbol number, used by the
MIPS ELF linker. FIXME: We should figure out some way to only
include this field for a MIPS ELF target. */
@@ -660,10 +669,10 @@ struct elf_obj_tdata
boolean flags_init;
/* Number of symbol version definitions we are about to emit. */
- int cverdefs;
+ unsigned int cverdefs;
/* Number of symbol version references we are about to emit. */
- int cverrefs;
+ unsigned int cverrefs;
/* Symbol version definitions in external objects. */
Elf_Internal_Verdef *verdef;
@@ -964,6 +973,8 @@ extern Elf_Internal_Rela *_bfd_elf64_link_read_relocs
#define bfd_elf32_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol
#define bfd_elf64_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol
+extern boolean _bfd_elf_close_and_cleanup PARAMS ((bfd *));
+
/* MIPS ELF specific routines. */
extern boolean _bfd_mips_elf_object_p PARAMS ((bfd *));
diff --git a/contrib/binutils/bfd/elf32-arc.c b/contrib/binutils/bfd/elf32-arc.c
new file mode 100644
index 0000000..81fafd5
--- /dev/null
+++ b/contrib/binutils/bfd/elf32-arc.c
@@ -0,0 +1,213 @@
+/* ARC-specific support for 32-bit ELF
+ Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ Contributed by Doug Evans (dje@cygnus.com).
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf/arc.h"
+
+static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
+ PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
+static void arc_info_to_howto_rel
+ PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
+static boolean arc_elf_object_p PARAMS ((bfd *));
+static void arc_elf_final_write_processing PARAMS ((bfd *, boolean));
+
+/* Try to minimize the amount of space occupied by relocation tables
+ on the ROM (not that the ROM won't be swamped by other ELF overhead). */
+#define USE_REL
+
+static reloc_howto_type elf_arc_howto_table[] =
+{
+ /* This reloc does nothing. */
+ HOWTO (R_ARC_NONE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARC_NONE", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A standard 32 bit relocation. */
+ HOWTO (R_ARC_32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARC_32", /* name */
+ false, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A 26 bit absolute branch, right shifted by 2. */
+ HOWTO (R_ARC_B26, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARC_B26", /* name */
+ false, /* partial_inplace */
+ 0x00ffffff, /* src_mask */
+ 0x00ffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A relative 22 bit branch; bits 21-2 are stored in bits 26-7. */
+ HOWTO (R_ARC_B22_PCREL, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 22, /* bitsize */
+ true, /* pc_relative */
+ 7, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARC_B22_PCREL", /* name */
+ false, /* partial_inplace */
+ 0x07ffff80, /* src_mask */
+ 0x07ffff80, /* dst_mask */
+ true), /* pcrel_offset */
+
+};
+
+/* Map BFD reloc types to ARC ELF reloc types. */
+
+struct arc_reloc_map
+{
+ unsigned char bfd_reloc_val;
+ unsigned char elf_reloc_val;
+};
+
+static const struct arc_reloc_map arc_reloc_map[] =
+{
+ { BFD_RELOC_NONE, R_ARC_NONE, },
+ { BFD_RELOC_32, R_ARC_32 },
+ { BFD_RELOC_CTOR, R_ARC_32 },
+ { BFD_RELOC_ARC_B26, R_ARC_B26 },
+ { BFD_RELOC_ARC_B22_PCREL, R_ARC_B22_PCREL },
+};
+
+static reloc_howto_type *
+bfd_elf32_bfd_reloc_type_lookup (abfd, code)
+ bfd *abfd;
+ bfd_reloc_code_real_type code;
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (arc_reloc_map) / sizeof (struct arc_reloc_map);
+ i++)
+ {
+ if (arc_reloc_map[i].bfd_reloc_val == code)
+ return &elf_arc_howto_table[arc_reloc_map[i].elf_reloc_val];
+ }
+
+ return NULL;
+}
+
+/* Set the howto pointer for an ARC ELF reloc. */
+
+static void
+arc_info_to_howto_rel (abfd, cache_ptr, dst)
+ bfd *abfd;
+ arelent *cache_ptr;
+ Elf32_Internal_Rel *dst;
+{
+ unsigned int r_type;
+
+ r_type = ELF32_R_TYPE (dst->r_info);
+ BFD_ASSERT (r_type < (unsigned int) R_ARC_max);
+ cache_ptr->howto = &elf_arc_howto_table[r_type];
+}
+
+/* Set the right machine number for an ARC ELF file. */
+
+static boolean
+arc_elf_object_p (abfd)
+ bfd *abfd;
+{
+ int mach;
+ unsigned long arch = elf_elfheader (abfd)->e_flags & EF_ARC_MACH;
+
+ switch (arch)
+ {
+ case E_ARC_MACH_BASE:
+ mach = bfd_mach_arc_base;
+ break;
+ default:
+ /* Unknown cpu type. ??? What to do? */
+ return false;
+ }
+
+ (void) bfd_default_set_arch_mach (abfd, bfd_arch_arc, mach);
+ return true;
+}
+
+/* The final processing done just before writing out an ARC ELF object file.
+ This gets the ARC architecture right based on the machine number. */
+
+static void
+arc_elf_final_write_processing (abfd, linker)
+ bfd *abfd;
+ boolean linker;
+{
+ int mach;
+ unsigned long val;
+
+ switch (mach = bfd_get_mach (abfd))
+ {
+ case bfd_mach_arc_base:
+ val = E_ARC_MACH_BASE;
+ break;
+ default:
+ return;
+ }
+
+ elf_elfheader (abfd)->e_flags &=~ EF_ARC_MACH;
+ elf_elfheader (abfd)->e_flags |= val;
+}
+
+#define TARGET_LITTLE_SYM bfd_elf32_littlearc_vec
+#define TARGET_LITTLE_NAME "elf32-littlearc"
+#define TARGET_BIG_SYM bfd_elf32_bigarc_vec
+#define TARGET_BIG_NAME "elf32-bigarc"
+#define ELF_ARCH bfd_arch_arc
+#define ELF_MACHINE_CODE EM_CYGNUS_ARC
+#define ELF_MAXPAGESIZE 0x1000
+
+#define elf_info_to_howto 0
+#define elf_info_to_howto_rel arc_info_to_howto_rel
+#define elf_backend_object_p arc_elf_object_p
+#define elf_backend_final_write_processing \
+ arc_elf_final_write_processing
+
+#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-sh.c b/contrib/binutils/bfd/elf32-sh.c
index c65114c..7153803 100644
--- a/contrib/binutils/bfd/elf32-sh.c
+++ b/contrib/binutils/bfd/elf32-sh.c
@@ -1,5 +1,5 @@
/* Hitachi SH specific support for 32-bit ELF
- Copyright 1996 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -694,7 +694,7 @@ sh_elf_relax_section (abfd, sec, link_info, again)
continue;
}
- /* Read the local symbols. */
+ /* Read this BFD's symbols if we haven't done so already. */
if (extsyms == NULL)
{
if (symtab_hdr->contents != NULL)
@@ -702,15 +702,13 @@ sh_elf_relax_section (abfd, sec, link_info, again)
else
{
extsyms = ((Elf32_External_Sym *)
- bfd_malloc (symtab_hdr->sh_info
- * sizeof (Elf32_External_Sym)));
+ bfd_malloc (symtab_hdr->sh_size));
if (extsyms == NULL)
goto error_return;
free_extsyms = extsyms;
if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
- || (bfd_read (extsyms, sizeof (Elf32_External_Sym),
- symtab_hdr->sh_info, abfd)
- != (symtab_hdr->sh_info * sizeof (Elf32_External_Sym))))
+ || (bfd_read (extsyms, 1, symtab_hdr->sh_size, abfd)
+ != symtab_hdr->sh_size))
goto error_return;
}
}
@@ -975,13 +973,13 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
{
Elf_Internal_Shdr *symtab_hdr;
Elf32_External_Sym *extsyms;
- int shndx;
+ int shndx, index;
bfd_byte *contents;
Elf_Internal_Rela *irel, *irelend;
Elf_Internal_Rela *irelalign;
bfd_vma toaddr;
Elf32_External_Sym *esym, *esymend;
- struct elf_link_hash_entry **sym_hash, **sym_hash_end;
+ struct elf_link_hash_entry *sym_hash;
asection *o;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -1029,11 +1027,12 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
/* Adjust all the relocs. */
for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
{
- bfd_vma nraddr, start, stop;
+ bfd_vma nraddr, stop;
+ bfd_vma start = 0;
int insn = 0;
Elf_Internal_Sym sym;
int off, adjust, oinsn;
- bfd_signed_vma voff;
+ bfd_signed_vma voff = 0;
boolean overflow;
/* Get the new reloc address. */
@@ -1051,7 +1050,8 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
&& irel->r_offset < addr + count
&& ELF32_R_TYPE (irel->r_info) != (int) R_SH_ALIGN
&& ELF32_R_TYPE (irel->r_info) != (int) R_SH_CODE
- && ELF32_R_TYPE (irel->r_info) != (int) R_SH_DATA)
+ && ELF32_R_TYPE (irel->r_info) != (int) R_SH_DATA
+ && ELF32_R_TYPE (irel->r_info) != (int) R_SH_LABEL)
irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
(int) R_SH_NONE);
@@ -1325,7 +1325,7 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
}
}
- /* Adjust all the symbols. */
+ /* Adjust the local symbols defined in this section. */
esym = extsyms;
esymend = esym + symtab_hdr->sh_info;
for (; esym < esymend; esym++)
@@ -1343,19 +1343,23 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
}
}
- sym_hash = elf_sym_hashes (abfd);
- sym_hash_end = (sym_hash
- + (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
- - symtab_hdr->sh_info));
- for (; sym_hash < sym_hash_end; sym_hash++)
+ /* Now adjust the global symbols defined in this section. */
+ esym = extsyms + symtab_hdr->sh_info;
+ esymend = extsyms + (symtab_hdr->sh_size / sizeof (Elf32_External_Sym));
+ for (index = 0; esym < esymend; esym++, index++)
{
- if (((*sym_hash)->root.type == bfd_link_hash_defined
- || (*sym_hash)->root.type == bfd_link_hash_defweak)
- && (*sym_hash)->root.u.def.section == sec
- && (*sym_hash)->root.u.def.value > addr
- && (*sym_hash)->root.u.def.value < toaddr)
+ Elf_Internal_Sym isym;
+
+ bfd_elf32_swap_symbol_in (abfd, esym, &isym);
+ sym_hash = elf_sym_hashes (abfd)[index];
+ if (isym.st_shndx == shndx
+ && ((sym_hash)->root.type == bfd_link_hash_defined
+ || (sym_hash)->root.type == bfd_link_hash_defweak)
+ && (sym_hash)->root.u.def.section == sec
+ && (sym_hash)->root.u.def.value > addr
+ && (sym_hash)->root.u.def.value < toaddr)
{
- (*sym_hash)->root.u.def.value -= count;
+ (sym_hash)->root.u.def.value -= count;
}
}
@@ -1618,6 +1622,8 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma relocation;
bfd_reloc_status_type r;
+ r_symndx = ELF32_R_SYM (rel->r_info);
+
if (info->relocateable)
{
/* This is a relocateable link. We don't have to change
@@ -1659,8 +1665,6 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
howto = sh_elf_howto_table + r_type;
- r_symndx = ELF32_R_SYM (rel->r_info);
-
/* This is a final link. */
h = NULL;
sym = NULL;
diff --git a/contrib/binutils/bfd/elf32-v850.c b/contrib/binutils/bfd/elf32-v850.c
new file mode 100644
index 0000000..c66513a
--- /dev/null
+++ b/contrib/binutils/bfd/elf32-v850.c
@@ -0,0 +1,1785 @@
+/* V850-specific support for 32-bit ELF
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+
+
+/* XXX FIXME: This code is littered with 32bit int, 16bit short, 8bit char
+ dependencies. As is the gas & simulator code or the v850. */
+
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "bfdlink.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf/v850.h"
+
+/* sign-extend a 24-bit number */
+#define SEXT24(x) ((((x) & 0xffffff) ^ (~ 0x7fffff)) + 0x800000)
+
+static reloc_howto_type *v850_elf_reloc_type_lookup
+ PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
+static void v850_elf_info_to_howto_rel
+ PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
+static bfd_reloc_status_type v850_elf_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static boolean v850_elf_is_local_label_name PARAMS ((bfd *, const char *));
+static boolean v850_elf_relocate_section PARAMS((bfd *,
+ struct bfd_link_info *,
+ bfd *,
+ asection *,
+ bfd_byte *,
+ Elf_Internal_Rela *,
+ Elf_Internal_Sym *,
+ asection **));
+/* Try to minimize the amount of space occupied by relocation tables
+ on the ROM (not that the ROM won't be swamped by other ELF overhead). */
+#define USE_REL
+
+/* Note: It is REQUIRED that the 'type' value of each entry in this array
+ match the index of the entry in the array. */
+static reloc_howto_type v850_elf_howto_table[] =
+{
+ /* This reloc does nothing. */
+ HOWTO (R_V850_NONE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_V850_NONE", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A PC relative 9 bit branch. */
+ HOWTO (R_V850_9_PCREL, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_9_PCREL", /* name */
+ false, /* partial_inplace */
+ 0x00ffffff, /* src_mask */
+ 0x00ffffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* A PC relative 22 bit branch. */
+ HOWTO (R_V850_22_PCREL, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 22, /* bitsize */
+ true, /* pc_relative */
+ 7, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_22_PCREL", /* name */
+ false, /* partial_inplace */
+ 0x07ffff80, /* src_mask */
+ 0x07ffff80, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* High 16 bits of symbol value. */
+ HOWTO (R_V850_HI16_S, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_HI16_S", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* High 16 bits of symbol value. */
+ HOWTO (R_V850_HI16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_HI16", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Low 16 bits of symbol value. */
+ HOWTO (R_V850_LO16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_LO16", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Simple 32bit reloc. */
+ HOWTO (R_V850_32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Simple 16bit reloc. */
+ HOWTO (R_V850_16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_V850_16", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Simple 8bit reloc. */
+ HOWTO (R_V850_8, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_V850_8", /* name */
+ true, /* partial_inplace */
+ 0xff, /* src_mask */
+ 0xff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16 bit offset from the short data area pointer. */
+ HOWTO (R_V850_SDA_16_16_OFFSET, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_SDA_16_16_OFFSET", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 15 bit offset from the short data area pointer. */
+ HOWTO (R_V850_SDA_15_16_OFFSET, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 1, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_SDA_15_16_OFFSET", /* name */
+ false, /* partial_inplace */
+ 0xfffe, /* src_mask */
+ 0xfffe, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16 bit offset from the zero data area pointer. */
+ HOWTO (R_V850_ZDA_16_16_OFFSET, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_ZDA_16_16_OFFSET", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 15 bit offset from the zero data area pointer. */
+ HOWTO (R_V850_ZDA_15_16_OFFSET, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 1, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_ZDA_15_16_OFFSET", /* name */
+ false, /* partial_inplace */
+ 0xfffe, /* src_mask */
+ 0xfffe, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 6 bit offset from the tiny data area pointer. */
+ HOWTO (R_V850_TDA_6_8_OFFSET, /* type */
+ 2, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ false, /* pc_relative */
+ 1, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_TDA_6_8_OFFSET", /* name */
+ false, /* partial_inplace */
+ 0x7e, /* src_mask */
+ 0x7e, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 8 bit offset from the tiny data area pointer. */
+ HOWTO (R_V850_TDA_7_8_OFFSET, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_TDA_7_8_OFFSET", /* name */
+ false, /* partial_inplace */
+ 0x7f, /* src_mask */
+ 0x7f, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 7 bit offset from the tiny data area pointer. */
+ HOWTO (R_V850_TDA_7_7_OFFSET, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 7, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_TDA_7_7_OFFSET", /* name */
+ false, /* partial_inplace */
+ 0x7f, /* src_mask */
+ 0x7f, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16 bit offset from the tiny data area pointer! */
+ HOWTO (R_V850_TDA_16_16_OFFSET, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_TDA_16_16_OFFSET", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xfff, /* dst_mask */
+ false), /* pcrel_offset */
+
+};
+
+/* Map BFD reloc types to V850 ELF reloc types. */
+
+struct v850_elf_reloc_map
+{
+ unsigned char bfd_reloc_val;
+ unsigned char elf_reloc_val;
+};
+
+static const struct v850_elf_reloc_map v850_elf_reloc_map[] =
+{
+ { BFD_RELOC_NONE, R_V850_NONE },
+ { BFD_RELOC_V850_9_PCREL, R_V850_9_PCREL },
+ { BFD_RELOC_V850_22_PCREL, R_V850_22_PCREL },
+ { BFD_RELOC_HI16_S, R_V850_HI16_S },
+ { BFD_RELOC_HI16, R_V850_HI16 },
+ { BFD_RELOC_LO16, R_V850_LO16 },
+ { BFD_RELOC_32, R_V850_32 },
+ { BFD_RELOC_16, R_V850_16 },
+ { BFD_RELOC_8, R_V850_8 },
+ { BFD_RELOC_V850_SDA_16_16_OFFSET, R_V850_SDA_16_16_OFFSET },
+ { BFD_RELOC_V850_SDA_15_16_OFFSET, R_V850_SDA_15_16_OFFSET },
+ { BFD_RELOC_V850_ZDA_16_16_OFFSET, R_V850_ZDA_16_16_OFFSET },
+ { BFD_RELOC_V850_ZDA_15_16_OFFSET, R_V850_ZDA_15_16_OFFSET },
+ { BFD_RELOC_V850_TDA_6_8_OFFSET, R_V850_TDA_6_8_OFFSET },
+ { BFD_RELOC_V850_TDA_7_8_OFFSET, R_V850_TDA_7_8_OFFSET },
+ { BFD_RELOC_V850_TDA_7_7_OFFSET, R_V850_TDA_7_7_OFFSET },
+ { BFD_RELOC_V850_TDA_16_16_OFFSET, R_V850_TDA_16_16_OFFSET },
+};
+
+
+/* Map a bfd relocation into the appropriate howto structure */
+static reloc_howto_type *
+v850_elf_reloc_type_lookup (abfd, code)
+ bfd * abfd;
+ bfd_reloc_code_real_type code;
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (v850_elf_reloc_map) / sizeof (struct v850_elf_reloc_map);
+ i++)
+ {
+ if (v850_elf_reloc_map[i].bfd_reloc_val == code)
+ {
+ BFD_ASSERT (v850_elf_howto_table[v850_elf_reloc_map[i].elf_reloc_val].type == v850_elf_reloc_map[i].elf_reloc_val);
+
+ return & v850_elf_howto_table[v850_elf_reloc_map[i].elf_reloc_val];
+ }
+ }
+
+ return NULL;
+}
+
+
+/* Set the howto pointer for an V850 ELF reloc. */
+static void
+v850_elf_info_to_howto_rel (abfd, cache_ptr, dst)
+ bfd * abfd;
+ arelent * cache_ptr;
+ Elf32_Internal_Rel * dst;
+{
+ unsigned int r_type;
+
+ r_type = ELF32_R_TYPE (dst->r_info);
+ BFD_ASSERT (r_type < (unsigned int) R_V850_max);
+ cache_ptr->howto = &v850_elf_howto_table[r_type];
+}
+
+
+/* Look through the relocs for a section during the first phase, and
+ allocate space in the global offset table or procedure linkage
+ table. */
+
+static boolean
+v850_elf_check_relocs (abfd, info, sec, relocs)
+ bfd * abfd;
+ struct bfd_link_info * info;
+ asection * sec;
+ const Elf_Internal_Rela * relocs;
+{
+ boolean ret = true;
+ bfd *dynobj;
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ const Elf_Internal_Rela *rel;
+ const Elf_Internal_Rela *rel_end;
+ asection *sreloc;
+ enum v850_reloc_type r_type;
+ int other = 0;
+ const char *common = (const char *)0;
+
+ if (info->relocateable)
+ return true;
+
+#ifdef DEBUG
+ fprintf (stderr, "v850_elf_check_relocs called for section %s in %s\n",
+ bfd_get_section_name (abfd, sec),
+ bfd_get_filename (abfd));
+#endif
+
+ dynobj = elf_hash_table (info)->dynobj;
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ sreloc = NULL;
+
+ rel_end = relocs + sec->reloc_count;
+ for (rel = relocs; rel < rel_end; rel++)
+ {
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx < symtab_hdr->sh_info)
+ h = NULL;
+ else
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+ r_type = (enum v850_reloc_type) ELF32_R_TYPE (rel->r_info);
+ switch (r_type)
+ {
+ default:
+ case R_V850_NONE:
+ case R_V850_9_PCREL:
+ case R_V850_22_PCREL:
+ case R_V850_HI16_S:
+ case R_V850_HI16:
+ case R_V850_LO16:
+ case R_V850_32:
+ case R_V850_16:
+ case R_V850_8:
+ break;
+
+ case R_V850_SDA_16_16_OFFSET:
+ case R_V850_SDA_15_16_OFFSET:
+ other = V850_OTHER_SDA;
+ common = ".scommon";
+ goto small_data_common;
+
+ case R_V850_ZDA_16_16_OFFSET:
+ case R_V850_ZDA_15_16_OFFSET:
+ other = V850_OTHER_ZDA;
+ common = ".zcommon";
+ goto small_data_common;
+
+ case R_V850_TDA_6_8_OFFSET:
+ case R_V850_TDA_7_8_OFFSET:
+ case R_V850_TDA_7_7_OFFSET:
+ case R_V850_TDA_16_16_OFFSET:
+ other = V850_OTHER_TDA;
+ common = ".tcommon";
+ /* fall through */
+
+#define V850_OTHER_MASK (V850_OTHER_TDA | V850_OTHER_SDA | V850_OTHER_ZDA)
+
+ small_data_common:
+ if (h)
+ {
+ h->other |= other; /* flag which type of relocation was used */
+ if ((h->other & V850_OTHER_MASK) != (other & V850_OTHER_MASK)
+ && (h->other & V850_OTHER_ERROR) == 0)
+ {
+ const char * msg;
+ static char buff[100]; /* XXX */
+
+ switch (h->other & V850_OTHER_MASK)
+ {
+ default:
+ msg = "cannot occupy in multiple small data regions";
+ break;
+ case V850_OTHER_SDA | V850_OTHER_ZDA | V850_OTHER_TDA:
+ msg = "can only be in one of the small, zero, and tiny data regions";
+ break;
+ case V850_OTHER_SDA | V850_OTHER_ZDA:
+ msg = "cannot be in both small and zero data regions simultaneously";
+ break;
+ case V850_OTHER_SDA | V850_OTHER_TDA:
+ msg = "cannot be in both small and tiny data regions simultaneously";
+ break;
+ case V850_OTHER_ZDA | V850_OTHER_TDA:
+ msg = "cannot be in both zero and tiny data regions simultaneously";
+ break;
+ }
+
+ sprintf (buff, "Variable '%s' %s", h->root.root.string, msg );
+ info->callbacks->warning (info, buff, h->root.root.string,
+ abfd, h->root.u.def.section, 0);
+
+ bfd_set_error (bfd_error_bad_value);
+ h->other |= V850_OTHER_ERROR;
+ ret = false;
+ }
+ }
+
+ if (h && h->root.type == bfd_link_hash_common
+ && h->root.u.c.p
+ && !strcmp (bfd_get_section_name (abfd, h->root.u.c.p->section), "COMMON"))
+ {
+ asection *section = h->root.u.c.p->section = bfd_make_section_old_way (abfd, common);
+ section->flags |= SEC_IS_COMMON;
+ }
+
+#ifdef DEBUG
+ fprintf (stderr, "v850_elf_check_relocs, found %s relocation for %s%s\n",
+ v850_elf_howto_table[ (int)r_type ].name,
+ (h && h->root.root.string) ? h->root.root.string : "<unknown>",
+ (h->root.type == bfd_link_hash_common) ? ", symbol is common" : "");
+#endif
+ break;
+ }
+ }
+
+ return ret;
+}
+
+typedef struct
+{
+ long addend;
+ bfd_byte * address;
+ unsigned long counter;
+}
+hi16s_location;
+
+static hi16s_location previous_hi16s[ 10 ]; /* XXX is this enough ? */
+static unsigned long hi16s_counter;
+
+static void
+remember_hi16s_reloc (addend, address)
+ long addend;
+ bfd_byte * address;
+{
+ hi16s_location * oldest = NULL;
+ int i;
+
+ /* Find a free slot. */
+ for (i = sizeof (previous_hi16s) / sizeof (previous_hi16s[0]); i--;)
+ {
+ hi16s_location * entry = previous_hi16s + i;
+
+ if (entry->addend == 0 && entry->address == 0)
+ {
+ /* Use this entry. */
+ oldest = entry;
+ break;
+ }
+
+ /* Remember the least recently added entry. */
+ if (oldest == NULL || oldest->counter > entry->counter)
+ oldest = entry;
+ }
+
+ oldest->addend = addend;
+ oldest->address = address;
+ oldest->counter = hi16s_counter ++;
+
+ /* Cope with wrap around of our counter. */
+ if (hi16s_counter == 0)
+ {
+ /* XXX - Assume that all counter entries differ only in their low 16 bits. */
+ for (i = sizeof (previous_hi16s) / sizeof (previous_hi16s[0]); i--;)
+ {
+ hi16s_location * entry = previous_hi16s + i;
+
+ entry->counter &= 0xffff;
+ }
+
+ hi16s_counter = 0x10000;
+ }
+
+ return;
+}
+
+static bfd_byte *
+find_remembered_hi16s_reloc (addend)
+ long addend;
+{
+ hi16s_location * match = NULL;
+ int i;
+
+ /* Search the table. Record the most recent entry that matches. */
+ for (i = sizeof (previous_hi16s) / sizeof (previous_hi16s[0]); i--;)
+ {
+ hi16s_location * entry = previous_hi16s + i;
+
+ if (entry->addend == addend)
+ {
+ if (match == NULL || match->counter < entry->counter)
+ match = entry;
+ }
+ }
+
+ if (match != NULL)
+ {
+ bfd_byte * addr;
+
+ /* Empty the table entry. */
+ match->addend = 0;
+
+ addr = match->address;
+ match->address = NULL;
+
+ return addr;
+ }
+
+ return NULL;
+}
+
+static bfd_reloc_status_type
+v850_elf_store_addend_in_insn (abfd, r_type, addend, address, replace)
+ bfd * abfd;
+ int r_type;
+ long addend;
+ bfd_byte * address;
+ boolean replace;
+{
+ unsigned long insn;
+
+ switch (r_type)
+ {
+ default:
+ /* fprintf (stderr, "reloc type %d not SUPPORTED\n", r_type ); */
+ return bfd_reloc_notsupported;
+
+ case R_V850_32:
+ if (! replace)
+ addend += bfd_get_32 (abfd, address);
+
+ bfd_put_32 (abfd, addend, address);
+ return bfd_reloc_ok;
+
+ case R_V850_22_PCREL:
+ if (addend > 0x1fffff || addend < -0x200000)
+ return bfd_reloc_overflow;
+
+ if ((addend % 2) != 0)
+ return bfd_reloc_dangerous;
+
+ insn = bfd_get_32 (abfd, address);
+ insn &= ~0xfffe003f;
+ insn |= (((addend & 0xfffe) << 16) | ((addend & 0x3f0000) >> 16));
+ bfd_put_32 (abfd, insn, address);
+ return bfd_reloc_ok;
+
+ case R_V850_9_PCREL:
+ if (addend > 0xff || addend < -0x100)
+ return bfd_reloc_overflow;
+
+ if ((addend % 2) != 0)
+ return bfd_reloc_dangerous;
+
+ insn = bfd_get_16 (abfd, address);
+ insn &= ~ 0xf870;
+ insn |= ((addend & 0x1f0) << 7) | ((addend & 0x0e) << 3);
+ break;
+
+ case R_V850_HI16:
+ addend += (bfd_get_16 (abfd, address) << 16);
+ addend = (addend >> 16);
+ insn = addend;
+ break;
+
+ case R_V850_HI16_S:
+ /* Remember where this relocation took place. */
+ remember_hi16s_reloc (addend, address);
+
+ addend += (bfd_get_16 (abfd, address) << 16);
+ addend = (addend >> 16) + ((addend & 0x8000) != 0);
+
+ /* This relocation cannot overflow. */
+ if (addend > 0x7fff || addend < -0x8000)
+ addend = 0;
+
+ insn = addend;
+ break;
+
+ case R_V850_LO16:
+ /* Calculate the sum of the value stored in the instruction and the
+ addend and check for overflow from the low 16 bits into the high
+ 16 bits. The assembler has already done some of this: If the
+ value stored in the instruction has its 15th bit set, (counting
+ from zero) then the assembler will have added 1 to the value
+ stored in the associated HI16S reloc. So for example, these
+ relocations:
+
+ movhi hi( fred ), r0, r1
+ movea lo( fred ), r1, r1
+
+ will store 0 in the value fields for the MOVHI and MOVEA instructions
+ and addend will be the address of fred, but for these instructions:
+
+ movhi hi( fred + 0x123456), r0, r1
+ movea lo( fred + 0x123456), r1, r1
+
+ the value stored in the MOVHI instruction will be 0x12 and the value
+ stored in the MOVEA instruction will be 0x3456. If however the
+ instructions were:
+
+ movhi hi( fred + 0x10ffff), r0, r1
+ movea lo( fred + 0x10ffff), r1, r1
+
+ then the value stored in the MOVHI instruction would be 0x11 (not
+ 0x10) and the value stored in the MOVEA instruction would be 0xffff.
+ Thus (assuming for the moment that the addend is 0), at run time the
+ MOVHI instruction loads 0x110000 into r1, then the MOVEA instruction
+ adds 0xffffffff (sign extension!) producing 0x10ffff. Similarly if
+ the instructions were:
+
+ movhi hi( fred - 1), r0, r1
+ movea lo( fred - 1), r1, r1
+
+ then 0 is stored in the MOVHI instruction and -1 is stored in the
+ MOVEA instruction.
+
+ Overflow can occur if the addition of the value stored in the
+ instruction plus the addend sets the 15th bit when before it was clear.
+ This is because the 15th bit will be sign extended into the high part,
+ thus reducing its value by one, but since the 15th bit was originally
+ clear, the assembler will not have added 1 to the previous HI16S reloc
+ to compensate for this effect. For example:
+
+ movhi hi( fred + 0x123456), r0, r1
+ movea lo( fred + 0x123456), r1, r1
+
+ The value stored in HI16S reloc is 0x12, the value stored in the LO16
+ reloc is 0x3456. If we assume that the address of fred is 0x00007000
+ then the relocations become:
+
+ HI16S: 0x0012 + (0x00007000 >> 16) = 0x12
+ LO16: 0x3456 + (0x00007000 & 0xffff) = 0xa456
+
+ but when the instructions are executed, the MOVEA instruction's value
+ is signed extended, so the sum becomes:
+
+ 0x00120000
+ + 0xffffa456
+ ------------
+ 0x0011a456 but 'fred + 0x123456' = 0x0012a456
+
+ Note that if the 15th bit was set in the value stored in the LO16
+ reloc, then we do not have to do anything:
+
+ movhi hi( fred + 0x10ffff), r0, r1
+ movea lo( fred + 0x10ffff), r1, r1
+
+ HI16S: 0x0011 + (0x00007000 >> 16) = 0x11
+ LO16: 0xffff + (0x00007000 & 0xffff) = 0x6fff
+
+ 0x00110000
+ + 0x00006fff
+ ------------
+ 0x00116fff = fred + 0x10ffff = 0x7000 + 0x10ffff
+
+
+ Overflow can also occur if the computation carries into the 16th bit
+ and it also results in the 15th bit having the same value as the 15th
+ bit of the original value. What happens is that the HI16S reloc
+ will have already examined the 15th bit of the original value and
+ added 1 to the high part if the bit is set. This compensates for the
+ sign extension of 15th bit of the result of the computation. But now
+ there is a carry into the 16th bit, and this has not been allowed for.
+
+ So, for example if fred is at address 0xf000:
+
+ movhi hi( fred + 0xffff), r0, r1 [bit 15 of the offset is set]
+ movea lo( fred + 0xffff), r1, r1
+
+ HI16S: 0x0001 + (0x0000f000 >> 16) = 0x0001
+ LO16: 0xffff + (0x0000f000 & 0xffff) = 0xefff (carry into bit 16 is lost)
+
+ 0x00010000
+ + 0xffffefff
+ ------------
+ 0x0000efff but 'fred + 0xffff' = 0x0001efff
+
+ Similarly, if the 15th bit remains clear, but overflow occurs into
+ the 16th bit then (assuming the address of fred is 0xf000):
+
+ movhi hi( fred + 0x7000), r0, r1 [bit 15 of the offset is clear]
+ movea lo( fred + 0x7000), r1, r1
+
+ HI16S: 0x0000 + (0x0000f000 >> 16) = 0x0000
+ LO16: 0x7000 + (0x0000f000 & 0xffff) = 0x6fff (carry into bit 16 is lost)
+
+ 0x00000000
+ + 0x00006fff
+ ------------
+ 0x00006fff but 'fred + 0x7000' = 0x00016fff
+
+ Note - there is no need to change anything if a carry occurs, and the
+ 15th bit changes its value from being set to being clear, as the HI16S
+ reloc will have already added in 1 to the high part for us:
+
+ movhi hi( fred + 0xffff), r0, r1 [bit 15 of the offset is set]
+ movea lo( fred + 0xffff), r1, r1
+
+ HI16S: 0x0001 + (0x00007000 >> 16)
+ LO16: 0xffff + (0x00007000 & 0xffff) = 0x6fff (carry into bit 16 is lost)
+
+ 0x00010000
+ + 0x00006fff (bit 15 not set, so the top half is zero)
+ ------------
+ 0x00016fff which is right (assuming that fred is at 0x7000)
+
+ but if the 15th bit goes from being clear to being set, then we must
+ once again handle overflow:
+
+ movhi hi( fred + 0x7000), r0, r1 [bit 15 of the offset is clear]
+ movea lo( fred + 0x7000), r1, r1
+
+ HI16S: 0x0000 + (0x0000ffff >> 16)
+ LO16: 0x7000 + (0x0000ffff & 0xffff) = 0x6fff (carry into bit 16)
+
+ 0x00000000
+ + 0x00006fff (bit 15 not set, so the top half is zero)
+ ------------
+ 0x00006fff which is wrong (assuming that fred is at 0xffff)
+ */
+
+ {
+ long result;
+
+ insn = bfd_get_16 (abfd, address);
+ result = insn + addend;
+
+#define BIT15_SET(x) ((x) & 0x8000)
+#define OVERFLOWS(a,i) ((((a) & 0xffff) + (i)) > 0xffff)
+
+ if ((BIT15_SET (result) && ! BIT15_SET (addend))
+ || (OVERFLOWS (addend, insn)
+ && ((! BIT15_SET (insn)) || (BIT15_SET (addend)))))
+ {
+ bfd_byte * hi16s_address = find_remembered_hi16s_reloc (addend);
+
+ /* Amend the matching HI16_S relocation. */
+ if (hi16s_address != NULL)
+ {
+ insn = bfd_get_16 (abfd, hi16s_address);
+ insn += 1;
+ bfd_put_16 (abfd, insn, hi16s_address);
+ }
+ else
+ {
+ fprintf (stderr, "FAILED to find previous HI16 reloc\n");
+ return bfd_reloc_overflow;
+ }
+ }
+
+ /* Do not complain if value has top bit set, as this has been anticipated. */
+ insn = result & 0xffff;
+ break;
+ }
+
+ case R_V850_8:
+ if (! replace)
+ addend += (char) bfd_get_8 (abfd, address);
+
+ if (addend > 0x7f || addend < -0x80)
+ return bfd_reloc_overflow;
+
+ bfd_put_8 (abfd, addend, address);
+ return bfd_reloc_ok;
+
+
+ case R_V850_16:
+ replace = false;
+ /* drop through */
+ case R_V850_SDA_16_16_OFFSET:
+ case R_V850_ZDA_16_16_OFFSET:
+ case R_V850_TDA_16_16_OFFSET:
+ if (! replace)
+ addend += bfd_get_16 (abfd, address);
+
+ if (addend > 0x7fff || addend < -0x8000)
+ return bfd_reloc_overflow;
+
+ insn = addend;
+ break;
+
+ case R_V850_SDA_15_16_OFFSET:
+ case R_V850_ZDA_15_16_OFFSET:
+ insn = bfd_get_16 (abfd, address);
+
+ if (! replace)
+ addend += (insn & 0xfffe);
+
+ if (addend > 0x7ffe || addend < -0x8000)
+ return bfd_reloc_overflow;
+
+ if (addend & 1)
+ return bfd_reloc_dangerous;
+
+ insn = (addend & ~1) | (insn & 1);
+ break;
+
+ case R_V850_TDA_6_8_OFFSET:
+ insn = bfd_get_16 (abfd, address);
+
+ if (! replace)
+ addend += ((insn & 0x7e) << 1);
+
+ if (addend > 0xfc || addend < 0)
+ return bfd_reloc_overflow;
+
+ if (addend & 3)
+ return bfd_reloc_dangerous;
+
+ insn &= 0xff81;
+ insn |= (addend >> 1);
+ break;
+
+ case R_V850_TDA_7_8_OFFSET:
+ insn = bfd_get_16 (abfd, address);
+
+ if (! replace)
+ addend += ((insn & 0x7f) << 1);
+
+ if (addend > 0xfe || addend < 0)
+ return bfd_reloc_overflow;
+
+ if (addend & 1)
+ return bfd_reloc_dangerous;
+
+ insn &= 0xff80;
+ insn |= (addend >> 1);
+ break;
+
+ case R_V850_TDA_7_7_OFFSET:
+ insn = bfd_get_16 (abfd, address);
+
+ if (! replace)
+ addend += insn & 0x7f;
+
+ if (addend > 0x7f || addend < 0)
+ return bfd_reloc_overflow;
+
+ insn &= 0xff80;
+ insn |= addend;
+ break;
+
+ }
+
+ bfd_put_16 (abfd, insn, address);
+ return bfd_reloc_ok;
+}
+
+
+/* Insert the addend into the instruction. */
+static bfd_reloc_status_type
+v850_elf_reloc (abfd, reloc, symbol, data, isection, obfd, err)
+ bfd * abfd;
+ arelent * reloc;
+ asymbol * symbol;
+ PTR data;
+ asection * isection;
+ bfd * obfd;
+ char ** err;
+{
+ long relocation;
+
+ /* If there is an output BFD,
+ and the symbol is not a section name (which is only defined at final link time),
+ and either we are not putting the addend into the instruction
+ or the addend is zero, so there is nothing to add into the instruction
+ then just fixup the address and return. */
+ if (obfd != (bfd *) NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0
+ && (! reloc->howto->partial_inplace
+ || reloc->addend == 0))
+ {
+ reloc->address += isection->output_offset;
+ return bfd_reloc_ok;
+ }
+#if 0
+ else if (obfd != NULL)
+ {
+ return bfd_reloc_continue;
+ }
+#endif
+
+ /* Catch relocs involving undefined symbols. */
+ if (bfd_is_und_section (symbol->section)
+ && (symbol->flags & BSF_WEAK) == 0
+ && obfd == NULL)
+ return bfd_reloc_undefined;
+
+ /* We handle final linking of some relocs ourselves. */
+
+ /* Is the address of the relocation really within the section? */
+ if (reloc->address > isection->_cooked_size)
+ return bfd_reloc_outofrange;
+
+ /* Work out which section the relocation is targetted at and the
+ initial relocation command value. */
+
+ /* Get symbol value. (Common symbols are special.) */
+ if (bfd_is_com_section (symbol->section))
+ relocation = 0;
+ else
+ relocation = symbol->value;
+
+ /* Convert input-section-relative symbol value to absolute + addend. */
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+ relocation += reloc->addend;
+
+ if (reloc->howto->pc_relative == true)
+ {
+ /* Here the variable relocation holds the final address of the
+ symbol we are relocating against, plus any addend. */
+ relocation -= isection->output_section->vma + isection->output_offset;
+
+ /* Deal with pcrel_offset */
+ relocation -= reloc->address;
+ }
+
+ /* I've got no clue... */
+ reloc->addend = 0;
+
+ return v850_elf_store_addend_in_insn (abfd, reloc->howto->type, relocation,
+ (bfd_byte *) data + reloc->address, true);
+}
+
+
+/*ARGSUSED*/
+static boolean
+v850_elf_is_local_label_name (abfd, name)
+ bfd * abfd;
+ const char * name;
+{
+ return ( (name[0] == '.' && (name[1] == 'L' || name[1] == '.'))
+ || (name[0] == '_' && name[1] == '.' && name[2] == 'L' && name[3] == '_'));
+}
+
+
+/* Perform a relocation as part of a final link. */
+static bfd_reloc_status_type
+v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
+ input_section, contents, offset, value,
+ addend, info, sym_sec, is_local)
+ reloc_howto_type * howto;
+ bfd * input_bfd;
+ bfd * output_bfd;
+ asection * input_section;
+ bfd_byte * contents;
+ bfd_vma offset;
+ bfd_vma value;
+ bfd_vma addend;
+ struct bfd_link_info * info;
+ asection * sym_sec;
+ int is_local;
+{
+ unsigned long r_type = howto->type;
+ bfd_byte * hit_data = contents + offset;
+
+ /* Adjust the value according to the relocation. */
+ switch (r_type)
+ {
+ case R_V850_9_PCREL:
+ value -= (input_section->output_section->vma
+ + input_section->output_offset);
+ value -= offset;
+ break;
+
+ case R_V850_22_PCREL:
+ value -= (input_section->output_section->vma
+ + input_section->output_offset
+ + offset);
+
+ value = SEXT24 (value); /* Only the bottom 24 bits of the PC are valid */
+ break;
+
+ case R_V850_HI16_S:
+ case R_V850_HI16:
+ case R_V850_LO16:
+ case R_V850_16:
+ case R_V850_32:
+ case R_V850_8:
+ break;
+
+ case R_V850_ZDA_15_16_OFFSET:
+ case R_V850_ZDA_16_16_OFFSET:
+ if (sym_sec == NULL)
+ return bfd_reloc_undefined;
+
+ value -= sym_sec->output_section->vma;
+ break;
+
+ case R_V850_SDA_15_16_OFFSET:
+ case R_V850_SDA_16_16_OFFSET:
+ {
+ unsigned long gp;
+ struct bfd_link_hash_entry * h;
+
+ if (sym_sec == NULL)
+ return bfd_reloc_undefined;
+
+ /* Get the value of __gp. */
+ h = bfd_link_hash_lookup (info->hash, "__gp", false, false, true);
+ if (h == (struct bfd_link_hash_entry *) NULL
+ || h->type != bfd_link_hash_defined)
+ return bfd_reloc_other;
+
+ gp = (h->u.def.value
+ + h->u.def.section->output_section->vma
+ + h->u.def.section->output_offset);
+
+ value -= sym_sec->output_section->vma;
+ value -= (gp - sym_sec->output_section->vma);
+ }
+ break;
+
+ case R_V850_TDA_16_16_OFFSET:
+ case R_V850_TDA_7_7_OFFSET:
+ case R_V850_TDA_7_8_OFFSET:
+ case R_V850_TDA_6_8_OFFSET:
+ {
+ unsigned long ep;
+ struct bfd_link_hash_entry * h;
+
+ /* Get the value of __ep. */
+ h = bfd_link_hash_lookup (info->hash, "__ep", false, false, true);
+ if (h == (struct bfd_link_hash_entry *) NULL
+ || h->type != bfd_link_hash_defined)
+ return bfd_reloc_continue; /* Actually this indicates that __ep could not be found. */
+
+ ep = (h->u.def.value
+ + h->u.def.section->output_section->vma
+ + h->u.def.section->output_offset);
+
+ value -= ep;
+ }
+ break;
+
+
+ case R_V850_NONE:
+ return bfd_reloc_ok;
+
+ default:
+ return bfd_reloc_notsupported;
+ }
+
+ /* Perform the relocation. */
+ return v850_elf_store_addend_in_insn (input_bfd, r_type, value, hit_data, false);
+}
+
+
+/* Relocate an V850 ELF section. */
+static boolean
+v850_elf_relocate_section (output_bfd, info, input_bfd, input_section,
+ contents, relocs, local_syms, local_sections)
+ bfd * output_bfd;
+ struct bfd_link_info * info;
+ bfd * input_bfd;
+ asection * input_section;
+ bfd_byte * contents;
+ Elf_Internal_Rela * relocs;
+ Elf_Internal_Sym * local_syms;
+ asection ** local_sections;
+{
+ Elf_Internal_Shdr * symtab_hdr;
+ struct elf_link_hash_entry ** sym_hashes;
+ Elf_Internal_Rela * rel;
+ Elf_Internal_Rela * relend;
+
+ symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (input_bfd);
+
+ rel = relocs;
+ relend = relocs + input_section->reloc_count;
+ for (; rel < relend; rel++)
+ {
+ int r_type;
+ reloc_howto_type * howto;
+ unsigned long r_symndx;
+ Elf_Internal_Sym * sym;
+ asection * sec;
+ struct elf_link_hash_entry * h;
+ bfd_vma relocation;
+ bfd_reloc_status_type r;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
+ howto = v850_elf_howto_table + r_type;
+
+ if (info->relocateable)
+ {
+ /* This is a relocateable link. We don't have to change
+ anything, unless the reloc is against a section symbol,
+ in which case we have to adjust according to where the
+ section symbol winds up in the output section. */
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ {
+ sec = local_sections[r_symndx];
+#ifdef USE_REL
+ /* The Elf_Internal_Rel structure does not have space for the
+ modified addend value, so we store it in the instruction
+ instead. */
+
+ if (sec->output_offset + sym->st_value != 0)
+ {
+ if (v850_elf_store_addend_in_insn (input_bfd, r_type,
+ sec->output_offset +
+ sym->st_value,
+ contents + rel->r_offset,
+ false)
+ != bfd_reloc_ok)
+ {
+ info->callbacks->warning
+ (info,
+ "Unable to handle relocation during incremental link",
+ NULL, input_bfd, input_section, rel->r_offset);
+ }
+ }
+#else
+ rel->r_addend += sec->output_offset + sym->st_value;
+#endif
+ }
+ }
+
+ continue;
+ }
+
+ /* This is a final link. */
+ h = NULL;
+ sym = NULL;
+ sec = NULL;
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ sec = local_sections[r_symndx];
+ relocation = (sec->output_section->vma
+ + sec->output_offset
+ + sym->st_value);
+#if 0
+ {
+ char * name;
+ name = bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, sym->st_name);
+ name = (name == NULL) ? "<none>" : name;
+fprintf (stderr, "local: sec: %s, sym: %s (%d), value: %x + %x + %x addend %x\n",
+ sec->name, name, sym->st_name,
+ sec->output_section->vma, sec->output_offset, sym->st_value, rel->r_addend);
+ }
+#endif
+ }
+ else
+ {
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ {
+ sec = h->root.u.def.section;
+ relocation = (h->root.u.def.value
+ + sec->output_section->vma
+ + sec->output_offset);
+#if 0
+fprintf (stderr, "defined: sec: %s, name: %s, value: %x + %x + %x gives: %x\n",
+ sec->name, h->root.root.string, h->root.u.def.value, sec->output_section->vma, sec->output_offset, relocation);
+#endif
+ }
+ else if (h->root.type == bfd_link_hash_undefweak)
+ {
+#if 0
+fprintf (stderr, "undefined: sec: %s, name: %s\n",
+ sec->name, h->root.root.string);
+#endif
+ relocation = 0;
+ }
+ else
+ {
+ if (! ((*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd,
+ input_section, rel->r_offset)))
+ return false;
+#if 0
+fprintf (stderr, "unknown: name: %s\n", h->root.root.string);
+#endif
+ relocation = 0;
+ }
+ }
+
+ /* FIXME: We should use the addend, but the COFF relocations
+ don't. */
+ r = v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
+ input_section,
+ contents, rel->r_offset,
+ relocation, rel->r_addend,
+ info, sec, h == NULL);
+
+ if (r != bfd_reloc_ok)
+ {
+ const char * name;
+ const char * msg = (const char *)0;
+
+ if (h != NULL)
+ name = h->root.root.string;
+ else
+ {
+ name = (bfd_elf_string_from_elf_section
+ (input_bfd, symtab_hdr->sh_link, sym->st_name));
+ if (name == NULL || *name == '\0')
+ name = bfd_section_name (input_bfd, sec);
+ }
+
+ switch (r)
+ {
+ case bfd_reloc_overflow:
+ if (! ((*info->callbacks->reloc_overflow)
+ (info, name, howto->name, (bfd_vma) 0,
+ input_bfd, input_section, rel->r_offset)))
+ return false;
+ break;
+
+ case bfd_reloc_undefined:
+ if (! ((*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section,
+ rel->r_offset)))
+ return false;
+ break;
+
+ case bfd_reloc_outofrange:
+ msg = "internal error: out of range error";
+ goto common_error;
+
+ case bfd_reloc_notsupported:
+ msg = "internal error: unsupported relocation error";
+ goto common_error;
+
+ case bfd_reloc_dangerous:
+ msg = "internal error: dangerous relocation";
+ goto common_error;
+
+ case bfd_reloc_other:
+ msg = "could not locate special linker symbol __gp";
+ goto common_error;
+
+ case bfd_reloc_continue:
+ msg = "could not locate special linker symbol __ep";
+ goto common_error;
+
+ case (bfd_reloc_dangerous + 1):
+ msg = "could not locate special linker symbol __ctbp";
+ goto common_error;
+
+ default:
+ msg = "internal error: unknown error";
+ /* fall through */
+
+ common_error:
+ if (!((*info->callbacks->warning)
+ (info, msg, name, input_bfd, input_section,
+ rel->r_offset)))
+ return false;
+ break;
+ }
+ }
+ }
+
+ return true;
+}
+
+/* Set the right machine number. */
+static boolean
+v850_elf_object_p (abfd)
+ bfd *abfd;
+{
+ switch (elf_elfheader (abfd)->e_flags & EF_V850_ARCH)
+ {
+ default:
+ case E_V850_ARCH: (void) bfd_default_set_arch_mach (abfd, bfd_arch_v850, 0); break;
+ }
+ return true;
+}
+
+/* Store the machine number in the flags field. */
+void
+v850_elf_final_write_processing (abfd, linker)
+ bfd * abfd;
+ boolean linker;
+{
+ unsigned long val;
+
+ switch (bfd_get_mach (abfd))
+ {
+ default:
+ case 0: val = E_V850_ARCH; break;
+ }
+
+ elf_elfheader (abfd)->e_flags &=~ EF_V850_ARCH;
+ elf_elfheader (abfd)->e_flags |= val;
+}
+
+/* Function to keep V850 specific file flags. */
+boolean
+v850_elf_set_private_flags (abfd, flags)
+ bfd * abfd;
+ flagword flags;
+{
+ BFD_ASSERT (!elf_flags_init (abfd)
+ || elf_elfheader (abfd)->e_flags == flags);
+
+ elf_elfheader (abfd)->e_flags = flags;
+ elf_flags_init (abfd) = true;
+ return true;
+}
+
+/* Copy backend specific data from one object module to another */
+boolean
+v850_elf_copy_private_bfd_data (ibfd, obfd)
+ bfd * ibfd;
+ bfd * obfd;
+{
+ if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return true;
+
+ BFD_ASSERT (!elf_flags_init (obfd)
+ || (elf_elfheader (obfd)->e_flags
+ == elf_elfheader (ibfd)->e_flags));
+
+ elf_gp (obfd) = elf_gp (ibfd);
+ elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
+ elf_flags_init (obfd) = true;
+ return true;
+}
+
+/* Merge backend specific data from an object file to the output
+ object file when linking. */
+boolean
+v850_elf_merge_private_bfd_data (ibfd, obfd)
+ bfd * ibfd;
+ bfd * obfd;
+{
+ flagword out_flags;
+ flagword in_flags;
+
+ if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return true;
+
+ in_flags = elf_elfheader (ibfd)->e_flags;
+ out_flags = elf_elfheader (obfd)->e_flags;
+
+ if (! elf_flags_init (obfd))
+ {
+ /* If the input is the default architecture then do not
+ bother setting the flags for the output architecture,
+ instead allow future merges to do this. If no future
+ merges ever set these flags then they will retain their
+ unitialised values, which surprise surprise, correspond
+ to the default values. */
+ if (bfd_get_arch_info (ibfd)->the_default)
+ return true;
+
+ elf_flags_init (obfd) = true;
+ elf_elfheader (obfd)->e_flags = in_flags;
+
+ if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
+ && bfd_get_arch_info (obfd)->the_default)
+ {
+ return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd));
+ }
+
+ return true;
+ }
+
+ /* Check flag compatibility. */
+ if (in_flags == out_flags)
+ return true;
+
+ if ((in_flags & EF_V850_ARCH) != (out_flags & EF_V850_ARCH)
+ && (in_flags & EF_V850_ARCH) != E_V850_ARCH)
+ _bfd_error_handler ("%s: Architecture mismatch with previous modules",
+ bfd_get_filename (ibfd));
+
+ return true;
+}
+/* Display the flags field */
+
+static boolean
+v850_elf_print_private_bfd_data (abfd, ptr)
+ bfd * abfd;
+ PTR ptr;
+{
+ FILE * file = (FILE *) ptr;
+
+ BFD_ASSERT (abfd != NULL && ptr != NULL)
+
+ fprintf (file, "private flags = %lx", elf_elfheader (abfd)->e_flags);
+
+ switch (elf_elfheader (abfd)->e_flags & EF_V850_ARCH)
+ {
+ default:
+ case E_V850_ARCH: fprintf (file, ": v850 architecture"); break;
+ }
+
+ fputc ('\n', file);
+
+ return true;
+}
+
+/* V850 ELF uses four common sections. One is the usual one, and the
+ others are for (small) objects in one of the special data areas:
+ small, tiny and zero. All the objects are kept together, and then
+ referenced via the gp register, the ep register or the r0 register
+ respectively, which yields smaller, faster assembler code. This
+ approach is copied from elf32-mips.c. */
+
+static asection v850_elf_scom_section;
+static asymbol v850_elf_scom_symbol;
+static asymbol * v850_elf_scom_symbol_ptr;
+static asection v850_elf_tcom_section;
+static asymbol v850_elf_tcom_symbol;
+static asymbol * v850_elf_tcom_symbol_ptr;
+static asection v850_elf_zcom_section;
+static asymbol v850_elf_zcom_symbol;
+static asymbol * v850_elf_zcom_symbol_ptr;
+
+
+/* Given a BFD section, try to locate the corresponding ELF section
+ index. */
+
+static boolean
+v850_elf_section_from_bfd_section (abfd, hdr, sec, retval)
+ bfd * abfd;
+ Elf32_Internal_Shdr * hdr;
+ asection * sec;
+ int * retval;
+{
+ if (strcmp (bfd_get_section_name (abfd, sec), ".scommon") == 0)
+ {
+ *retval = SHN_V850_SCOMMON;
+ return true;
+ }
+ if (strcmp (bfd_get_section_name (abfd, sec), ".tcommon") == 0)
+ {
+ *retval = SHN_V850_TCOMMON;
+ return true;
+ }
+ if (strcmp (bfd_get_section_name (abfd, sec), ".zcommon") == 0)
+ {
+ *retval = SHN_V850_ZCOMMON;
+ return true;
+ }
+ return false;
+}
+
+/* Handle the special V850 section numbers that a symbol may use. */
+
+static void
+v850_elf_symbol_processing (abfd, asym)
+ bfd * abfd;
+ asymbol * asym;
+{
+ elf_symbol_type * elfsym = (elf_symbol_type *) asym;
+
+ switch (elfsym->internal_elf_sym.st_shndx)
+ {
+ case SHN_V850_SCOMMON:
+ if (v850_elf_scom_section.name == NULL)
+ {
+ /* Initialize the small common section. */
+ v850_elf_scom_section.name = ".scommon";
+ v850_elf_scom_section.flags = SEC_IS_COMMON | SEC_ALLOC | SEC_DATA;
+ v850_elf_scom_section.output_section = & v850_elf_scom_section;
+ v850_elf_scom_section.symbol = & v850_elf_scom_symbol;
+ v850_elf_scom_section.symbol_ptr_ptr = & v850_elf_scom_symbol_ptr;
+ v850_elf_scom_symbol.name = ".scommon";
+ v850_elf_scom_symbol.flags = BSF_SECTION_SYM;
+ v850_elf_scom_symbol.section = & v850_elf_scom_section;
+ v850_elf_scom_symbol_ptr = & v850_elf_scom_symbol;
+ }
+ asym->section = & v850_elf_scom_section;
+ asym->value = elfsym->internal_elf_sym.st_size;
+ break;
+
+ case SHN_V850_TCOMMON:
+ if (v850_elf_tcom_section.name == NULL)
+ {
+ /* Initialize the tcommon section. */
+ v850_elf_tcom_section.name = ".tcommon";
+ v850_elf_tcom_section.flags = SEC_IS_COMMON;
+ v850_elf_tcom_section.output_section = & v850_elf_tcom_section;
+ v850_elf_tcom_section.symbol = & v850_elf_tcom_symbol;
+ v850_elf_tcom_section.symbol_ptr_ptr = & v850_elf_tcom_symbol_ptr;
+ v850_elf_tcom_symbol.name = ".tcommon";
+ v850_elf_tcom_symbol.flags = BSF_SECTION_SYM;
+ v850_elf_tcom_symbol.section = & v850_elf_tcom_section;
+ v850_elf_tcom_symbol_ptr = & v850_elf_tcom_symbol;
+ }
+ asym->section = & v850_elf_tcom_section;
+ asym->value = elfsym->internal_elf_sym.st_size;
+ break;
+
+ case SHN_V850_ZCOMMON:
+ if (v850_elf_zcom_section.name == NULL)
+ {
+ /* Initialize the zcommon section. */
+ v850_elf_zcom_section.name = ".zcommon";
+ v850_elf_zcom_section.flags = SEC_IS_COMMON;
+ v850_elf_zcom_section.output_section = & v850_elf_zcom_section;
+ v850_elf_zcom_section.symbol = & v850_elf_zcom_symbol;
+ v850_elf_zcom_section.symbol_ptr_ptr = & v850_elf_zcom_symbol_ptr;
+ v850_elf_zcom_symbol.name = ".zcommon";
+ v850_elf_zcom_symbol.flags = BSF_SECTION_SYM;
+ v850_elf_zcom_symbol.section = & v850_elf_zcom_section;
+ v850_elf_zcom_symbol_ptr = & v850_elf_zcom_symbol;
+ }
+ asym->section = & v850_elf_zcom_section;
+ asym->value = elfsym->internal_elf_sym.st_size;
+ break;
+ }
+}
+
+/* Hook called by the linker routine which adds symbols from an object
+ file. We must handle the special MIPS section numbers here. */
+
+/*ARGSUSED*/
+static boolean
+v850_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
+ bfd * abfd;
+ struct bfd_link_info * info;
+ const Elf_Internal_Sym * sym;
+ const char ** namep;
+ flagword * flagsp;
+ asection ** secp;
+ bfd_vma * valp;
+{
+ switch (sym->st_shndx)
+ {
+ case SHN_V850_SCOMMON:
+ *secp = bfd_make_section_old_way (abfd, ".scommon");
+ (*secp)->flags |= SEC_IS_COMMON;
+ *valp = sym->st_size;
+ break;
+
+ case SHN_V850_TCOMMON:
+ *secp = bfd_make_section_old_way (abfd, ".tcommon");
+ (*secp)->flags |= SEC_IS_COMMON;
+ *valp = sym->st_size;
+ break;
+
+ case SHN_V850_ZCOMMON:
+ *secp = bfd_make_section_old_way (abfd, ".zcommon");
+ (*secp)->flags |= SEC_IS_COMMON;
+ *valp = sym->st_size;
+ break;
+ }
+
+ return true;
+}
+
+/*ARGSIGNORED*/
+static boolean
+v850_elf_link_output_symbol_hook (abfd, info, name, sym, input_sec)
+ bfd * abfd;
+ struct bfd_link_info * info;
+ const char * name;
+ Elf_Internal_Sym * sym;
+ asection * input_sec;
+{
+ /* If we see a common symbol, which implies a relocatable link, then
+ if a symbol was in a special common section in an input file, mark
+ it as a special common in the output file. */
+
+ if (sym->st_shndx == SHN_COMMON)
+ {
+ if (strcmp (input_sec->name, ".scommon") == 0)
+ sym->st_shndx = SHN_V850_SCOMMON;
+ else if (strcmp (input_sec->name, ".tcommon") == 0)
+ sym->st_shndx = SHN_V850_TCOMMON;
+ else if (strcmp (input_sec->name, ".zcommon") == 0)
+ sym->st_shndx = SHN_V850_ZCOMMON;
+ }
+
+ return true;
+}
+
+static boolean
+v850_elf_section_from_shdr (abfd, hdr, name)
+ bfd * abfd;
+ Elf_Internal_Shdr * hdr;
+ char * name;
+{
+ /* 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. */
+
+ if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
+ return false;
+
+ switch (hdr->sh_type)
+ {
+ case SHT_V850_SCOMMON:
+ case SHT_V850_TCOMMON:
+ case SHT_V850_ZCOMMON:
+ if (! bfd_set_section_flags (abfd, hdr->bfd_section,
+ (bfd_get_section_flags (abfd,
+ hdr->bfd_section)
+ | SEC_IS_COMMON)))
+ return false;
+ }
+
+ return true;
+}
+
+/* Set the correct type for a V850 ELF section. We do this by the
+ section name, which is a hack, but ought to work. */
+static boolean
+v850_elf_fake_sections (abfd, hdr, sec)
+ bfd * abfd;
+ Elf32_Internal_Shdr * hdr;
+ asection * sec;
+{
+ register const char * name;
+
+ name = bfd_get_section_name (abfd, sec);
+
+ if (strcmp (name, ".scommon") == 0)
+ {
+ hdr->sh_type = SHT_V850_SCOMMON;
+ }
+ else if (strcmp (name, ".tcommon") == 0)
+ {
+ hdr->sh_type = SHT_V850_TCOMMON;
+ }
+ else if (strcmp (name, ".zcommon") == 0)
+ hdr->sh_type = SHT_V850_ZCOMMON;
+
+ return true;
+}
+
+
+
+#define TARGET_LITTLE_SYM bfd_elf32_v850_vec
+#define TARGET_LITTLE_NAME "elf32-v850"
+#define ELF_ARCH bfd_arch_v850
+#define ELF_MACHINE_CODE EM_CYGNUS_V850
+#define ELF_MAXPAGESIZE 0x1000
+
+#define elf_info_to_howto 0
+#define elf_info_to_howto_rel v850_elf_info_to_howto_rel
+
+#define elf_backend_check_relocs v850_elf_check_relocs
+#define elf_backend_relocate_section v850_elf_relocate_section
+#define elf_backend_object_p v850_elf_object_p
+#define elf_backend_final_write_processing v850_elf_final_write_processing
+#define elf_backend_section_from_bfd_section v850_elf_section_from_bfd_section
+#define elf_backend_symbol_processing v850_elf_symbol_processing
+#define elf_backend_add_symbol_hook v850_elf_add_symbol_hook
+#define elf_backend_link_output_symbol_hook v850_elf_link_output_symbol_hook
+#define elf_backend_section_from_shdr v850_elf_section_from_shdr
+#define elf_backend_fake_sections v850_elf_fake_sections
+
+#define bfd_elf32_bfd_is_local_label_name v850_elf_is_local_label_name
+#define bfd_elf32_bfd_reloc_type_lookup v850_elf_reloc_type_lookup
+#define bfd_elf32_bfd_copy_private_bfd_data v850_elf_copy_private_bfd_data
+#define bfd_elf32_bfd_merge_private_bfd_data v850_elf_merge_private_bfd_data
+#define bfd_elf32_bfd_set_private_flags v850_elf_set_private_flags
+#define bfd_elf32_bfd_print_private_bfd_data v850_elf_print_private_bfd_data
+
+#define elf_symbol_leading_char '_'
+
+#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf64-alpha.c b/contrib/binutils/bfd/elf64-alpha.c
index 2800272d..6d9c539 100644
--- a/contrib/binutils/bfd/elf64-alpha.c
+++ b/contrib/binutils/bfd/elf64-alpha.c
@@ -1,5 +1,5 @@
/* Alpha specific support for 64-bit ELF
- Copyright 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>.
This file is part of BFD, the Binary File Descriptor library.
@@ -555,7 +555,8 @@ static reloc_howto_type elf64_alpha_howto_table[] =
false), /* pcrel_offset */
/* Push a value on the reloc evaluation stack. */
- HOWTO (ALPHA_R_OP_PUSH, /* type */
+ /* Not implemented -- it's dumb. */
+ HOWTO (R_ALPHA_OP_PUSH, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
@@ -571,7 +572,8 @@ static reloc_howto_type elf64_alpha_howto_table[] =
/* Store the value from the stack at the given address. Store it in
a bitfield of size r_size starting at bit position r_offset. */
- HOWTO (ALPHA_R_OP_STORE, /* type */
+ /* Not implemented -- it's dumb. */
+ HOWTO (R_ALPHA_OP_STORE, /* type */
0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long) */
64, /* bitsize */
@@ -587,7 +589,8 @@ static reloc_howto_type elf64_alpha_howto_table[] =
/* Subtract the reloc address from the value on the top of the
relocation stack. */
- HOWTO (ALPHA_R_OP_PSUB, /* type */
+ /* Not implemented -- it's dumb. */
+ HOWTO (R_ALPHA_OP_PSUB, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
@@ -603,7 +606,8 @@ static reloc_howto_type elf64_alpha_howto_table[] =
/* Shift the value on the top of the relocation stack right by the
given value. */
- HOWTO (ALPHA_R_OP_PRSHIFT, /* type */
+ /* Not implemented -- it's dumb. */
+ HOWTO (R_ALPHA_OP_PRSHIFT, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
@@ -617,7 +621,146 @@ static reloc_howto_type elf64_alpha_howto_table[] =
0, /* dst_mask */
false), /* pcrel_offset */
+ /* Change the value of GP used by +r_addend until the next GPVALUE or the
+ end of the input bfd. */
+ /* Not implemented -- it's dumb. */
+ HOWTO (R_ALPHA_GPVALUE,
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ elf64_alpha_reloc_bad, /* special_function */
+ "GPVALUE", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The high 16 bits of the displacement from GP to the target. */
+ /* XXX: Not implemented. */
+ HOWTO (R_ALPHA_GPRELHIGH,
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ elf64_alpha_reloc_bad, /* special_function */
+ "GPRELHIGH", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The low 16 bits of the displacement from GP to the target. */
+ /* XXX: Not implemented. */
+ HOWTO (R_ALPHA_GPRELLOW,
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ elf64_alpha_reloc_bad, /* special_function */
+ "GPRELLOW", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A 16-bit displacement from the GP to the target. */
+ /* XXX: Not implemented. */
+ HOWTO (R_ALPHA_IMMED_GP_16,
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ elf64_alpha_reloc_bad, /* special_function */
+ "IMMED_GP_16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The high bits of a 32-bit displacement from the GP to the target; the
+ low bits are supplied in the subsequent R_ALPHA_IMMED_LO32 relocs. */
+ /* XXX: Not implemented. */
+ HOWTO (R_ALPHA_IMMED_GP_HI32,
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ elf64_alpha_reloc_bad, /* special_function */
+ "IMMED_GP_HI32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The high bits of a 32-bit displacement to the starting address of the
+ current section (the relocation target is ignored); the low bits are
+ supplied in the subsequent R_ALPHA_IMMED_LO32 relocs. */
+ /* XXX: Not implemented. */
+ HOWTO (R_ALPHA_IMMED_SCN_HI32,
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ elf64_alpha_reloc_bad, /* special_function */
+ "IMMED_SCN_HI32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The high bits of a 32-bit displacement from the previous br, bsr, jsr
+ or jmp insn (as tagged by a BRADDR or HINT reloc) to the target; the
+ low bits are supplied by subsequent R_ALPHA_IMMED_LO32 relocs. */
+ /* XXX: Not implemented. */
+ HOWTO (R_ALPHA_IMMED_BR_HI32,
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ elf64_alpha_reloc_bad, /* special_function */
+ "IMMED_BR_HI32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The low 16 bits of a displacement calculated in a previous HI32 reloc. */
+ /* XXX: Not implemented. */
+ HOWTO (R_ALPHA_IMMED_LO32,
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ elf64_alpha_reloc_bad, /* special_function */
+ "IMMED_LO32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
/* Misc ELF relocations. */
+
+ /* A dynamic relocation to copy the target into our .dynbss section. */
+ /* Not generated, as all Alpha objects use PIC, so it is not needed. It
+ is present because every other ELF has one, but should not be used
+ because .dynbss is an ugly thing. */
HOWTO (R_ALPHA_COPY,
0,
0,
@@ -632,6 +775,7 @@ static reloc_howto_type elf64_alpha_howto_table[] =
0,
true),
+ /* A dynamic relocation for a .got entry. */
HOWTO (R_ALPHA_GLOB_DAT,
0,
0,
@@ -646,6 +790,7 @@ static reloc_howto_type elf64_alpha_howto_table[] =
0,
true),
+ /* A dynamic relocation for a .plt entry. */
HOWTO (R_ALPHA_JMP_SLOT,
0,
0,
@@ -660,6 +805,7 @@ static reloc_howto_type elf64_alpha_howto_table[] =
0,
true),
+ /* A dynamic relocation to add the base of the DSO to a 64-bit field. */
HOWTO (R_ALPHA_RELATIVE,
0,
0,
@@ -866,9 +1012,9 @@ elf64_alpha_info_to_howto (abfd, cache_ptr, dst)
#define PLT_HEADER_WORD4 0x6b7b0000 /* jmp $27,($27) */
#define PLT_ENTRY_SIZE 12
-#define PLT_ENTRY_WORD1 0x279f0000 /* ldah $28, 0($31) */
-#define PLT_ENTRY_WORD2 0x239c0000 /* lda $28, 0($28) */
-#define PLT_ENTRY_WORD3 0xc3e00000 /* br $31, plt0 */
+#define PLT_ENTRY_WORD1 0xc3800000 /* br $28, plt0 */
+#define PLT_ENTRY_WORD2 0
+#define PLT_ENTRY_WORD3 0
#define MAX_GOT_ENTRIES (64*1024 / 8)
@@ -1545,6 +1691,11 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
else
{
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+ while (h->root.root.type == bfd_link_hash_indirect
+ || h->root.root.type == bfd_link_hash_warning)
+ h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
+
h->root.elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
}
r_type = ELF64_R_TYPE (rel->r_info);
@@ -1855,6 +2006,79 @@ elf64_alpha_adjust_dynamic_symbol (info, h)
return true;
}
+/* Symbol versioning can create new symbols, and make our old symbols
+ indirect to the new ones. Consolidate the got and reloc information
+ in these situations. */
+
+static boolean
+elf64_alpha_merge_ind_symbols (hi, dummy)
+ struct alpha_elf_link_hash_entry *hi;
+ PTR dummy;
+{
+ struct alpha_elf_link_hash_entry *hs;
+
+ if (hi->root.root.type != bfd_link_hash_indirect)
+ return true;
+ hs = hi;
+ do {
+ hs = (struct alpha_elf_link_hash_entry *)hs->root.root.u.i.link;
+ } while (hs->root.root.type == bfd_link_hash_indirect);
+
+ /* Merge the flags. Whee. */
+
+ hs->flags |= hi->flags;
+
+ /* Merge the .got entries. Cannibalize the old symbol's list in
+ doing so, since we don't need it anymore. */
+
+ if (hs->got_entries == NULL)
+ hs->got_entries = hi->got_entries;
+ else
+ {
+ struct alpha_elf_got_entry *gi, *gs, *gin, *gsh;
+
+ gsh = hs->got_entries;
+ for (gi = hi->got_entries; gi ; gi = gin)
+ {
+ gin = gi->next;
+ for (gs = gsh; gs ; gs = gs->next)
+ if (gi->gotobj == gs->gotobj && gi->addend == gs->addend )
+ goto got_found;
+ gi->next = hs->got_entries;
+ hs->got_entries = gi;
+ got_found:;
+ }
+ }
+ hi->got_entries = NULL;
+
+ /* And similar for the reloc entries. */
+
+ if (hs->reloc_entries == NULL)
+ hs->reloc_entries = hi->reloc_entries;
+ else
+ {
+ struct alpha_elf_reloc_entry *ri, *rs, *rin, *rsh;
+
+ rsh = hs->reloc_entries;
+ for (ri = hi->reloc_entries; ri ; ri = rin)
+ {
+ rin = ri->next;
+ for (rs = rsh; rs ; rs = rs->next)
+ if (ri->rtype == rs->rtype)
+ {
+ rs->count += ri->count;
+ goto found_reloc;
+ }
+ ri->next = hs->reloc_entries;
+ hs->reloc_entries = ri;
+ found_reloc:;
+ }
+ }
+ hi->reloc_entries = NULL;
+
+ return true;
+}
+
/* Is it possible to merge two object file's .got tables? */
static boolean
@@ -1883,12 +2107,19 @@ elf64_alpha_can_merge_gots (a, b)
for (i = 0; i < n; ++i)
{
struct alpha_elf_got_entry *ae, *be;
- for (be = hashes[i]->got_entries; be ; be = be->next)
+ struct alpha_elf_link_hash_entry *h;
+
+ h = hashes[i];
+ while (h->root.root.type == bfd_link_hash_indirect
+ || h->root.root.type == bfd_link_hash_warning)
+ h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
+
+ for (be = h->got_entries; be ; be = be->next)
{
if (be->gotobj != b)
continue;
- for (ae = hashes[i]->got_entries; ae ; ae = ae->next)
+ for (ae = h->got_entries; ae ; ae = ae->next)
if (ae->gotobj == a && ae->addend == be->addend)
goto global_found;
@@ -1945,7 +2176,14 @@ elf64_alpha_merge_gots (a, b)
for (i = 0; i < n; ++i)
{
struct alpha_elf_got_entry *ae, *be, **pbe, **start;
- start = &hashes[i]->got_entries;
+ struct alpha_elf_link_hash_entry *h;
+
+ h = hashes[i];
+ while (h->root.root.type == bfd_link_hash_indirect
+ || h->root.root.type == bfd_link_hash_warning)
+ h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
+
+ start = &h->got_entries;
for (pbe = start, be = *start; be ; pbe = &be->next, be = be->next)
{
if (be->gotobj != b)
@@ -2061,6 +2299,11 @@ elf64_alpha_always_size_sections (output_bfd, info)
if (info->relocateable)
return true;
+ /* First, take care of the indirect symbols created by versioning. */
+ alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
+ elf64_alpha_merge_ind_symbols,
+ NULL);
+
ngots = 0;
got_list = NULL;
cur_got_obj = NULL;
@@ -2162,8 +2405,10 @@ elf64_alpha_calc_dynrel_sizes (h, info)
}
/* If the symbol is dynamic, we'll need all the relocations in their
- natural form. */
- if (alpha_elf_dynamic_symbol_p (&h->root, info))
+ natural form. If it has been forced local, we'll need the same
+ number of RELATIVE relocations. */
+ if (alpha_elf_dynamic_symbol_p (&h->root, info)
+ || (info->shared && h->root.dynindx == -1))
{
struct alpha_elf_reloc_entry *relent;
@@ -2306,7 +2551,8 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
s->output_section);
target = bfd_get_section_by_name (output_bfd, outname + 5);
if (target != NULL
- && (target->flags & SEC_READONLY) != 0)
+ && (target->flags & SEC_READONLY) != 0
+ && (target->flags & SEC_ALLOC) != 0)
reltext = true;
if (strcmp(name, ".rela.plt") == 0)
@@ -2619,6 +2865,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (h != NULL)
{
gotent = h->got_entries;
+ BFD_ASSERT(gotent != NULL);
+
while (gotent->gotobj != gotobj || gotent->addend != addend)
gotent = gotent->next;
@@ -2628,8 +2876,26 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_put_64 (output_bfd, relocation+addend,
sgot->contents + gotent->got_offset);
- /* The dynamic relocations for the .got entries are
- done in finish_dynamic_symbol. */
+ /* If the symbol has been forced local, output a
+ RELATIVE reloc, otherwise it will be handled in
+ finish_dynamic_symbol. */
+ if (info->shared && h->root.dynindx == -1)
+ {
+ Elf_Internal_Rela outrel;
+
+ BFD_ASSERT(srelgot != NULL);
+
+ outrel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + gotent->got_offset);
+ outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE);
+ outrel.r_addend = 0;
+
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel,
+ ((Elf64_External_Rela *)
+ srelgot->contents)
+ + srelgot->reloc_count++);
+ }
gotent->flags |= ALPHA_ELF_GOT_ENTRY_RELOCS_DONE;
}
@@ -2851,16 +3117,10 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
/* Fill in the entry in the procedure linkage table. */
{
unsigned insn1, insn2, insn3;
- long hi, lo;
-
- /* decompose the reloc offset for the plt for ldah+lda */
- hi = plt_index * sizeof(Elf64_External_Rela);
- lo = ((hi & 0xffff) ^ 0x8000) - 0x8000;
- hi = (hi - lo) >> 16;
- insn1 = PLT_ENTRY_WORD1 | (hi & 0xffff);
- insn2 = PLT_ENTRY_WORD2 | (lo & 0xffff);
- insn3 = PLT_ENTRY_WORD3 | ((-(h->plt_offset + 12) >> 2) & 0x1fffff);
+ insn1 = PLT_ENTRY_WORD1 | ((-(h->plt_offset + 4) >> 2) & 0x1fffff);
+ insn2 = PLT_ENTRY_WORD2;
+ insn3 = PLT_ENTRY_WORD3;
bfd_put_32 (output_bfd, insn1, splt->contents + h->plt_offset);
bfd_put_32 (output_bfd, insn2, splt->contents + h->plt_offset + 4);
@@ -3733,7 +3993,7 @@ elf64_alpha_ecoff_debug_swap =
#define TARGET_LITTLE_NAME "elf64-alpha"
#define ELF_ARCH bfd_arch_alpha
#define ELF_MACHINE_CODE EM_ALPHA
-#define ELF_MAXPAGESIZE 0x100000
+#define ELF_MAXPAGESIZE 0x10000
#define bfd_elf64_bfd_link_hash_table_create \
elf64_alpha_bfd_link_hash_table_create
diff --git a/contrib/binutils/bfd/elfcode.h b/contrib/binutils/bfd/elfcode.h
index 0443a32..4591e5f 100644
--- a/contrib/binutils/bfd/elfcode.h
+++ b/contrib/binutils/bfd/elfcode.h
@@ -1,5 +1,5 @@
/* ELF executable support for BFD.
- Copyright 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -176,11 +176,15 @@ static char *elf_symbol_flags PARAMS ((flagword));
can be handled by explicitly specifying 32 bits or "the long type". */
#if ARCH_SIZE == 64
#define put_word bfd_h_put_64
+#define put_signed_word bfd_h_put_signed_64
#define get_word bfd_h_get_64
+#define get_signed_word bfd_h_get_signed_64
#endif
#if ARCH_SIZE == 32
#define put_word bfd_h_put_32
+#define put_signed_word bfd_h_put_signed_32
#define get_word bfd_h_get_32
+#define get_signed_word bfd_h_get_signed_32
#endif
/* Translate an ELF symbol in external format into an ELF symbol in internal
@@ -372,7 +376,7 @@ elf_swap_reloca_in (abfd, src, dst)
{
dst->r_offset = get_word (abfd, (bfd_byte *) src->r_offset);
dst->r_info = get_word (abfd, (bfd_byte *) src->r_info);
- dst->r_addend = get_word (abfd, (bfd_byte *) src->r_addend);
+ dst->r_addend = get_signed_word (abfd, (bfd_byte *) src->r_addend);
}
/* Translate an ELF reloc from internal format to external format. */
@@ -394,7 +398,7 @@ elf_swap_reloca_out (abfd, src, dst)
{
put_word (abfd, src->r_offset, dst->r_offset);
put_word (abfd, src->r_info, dst->r_info);
- put_word (abfd, src->r_addend, dst->r_addend);
+ put_signed_word (abfd, src->r_addend, dst->r_addend);
}
INLINE void
@@ -926,7 +930,7 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
{
Elf_Internal_Shdr *hdr;
Elf_Internal_Shdr *verhdr;
- long symcount; /* Number of external ELF symbols */
+ unsigned long symcount; /* Number of external ELF symbols */
elf_symbol_type *sym; /* Pointer to current bfd symbol */
elf_symbol_type *symbase; /* Buffer for generated bfd symbols */
Elf_Internal_Sym i_sym;
@@ -974,7 +978,7 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
sym = symbase = NULL;
else
{
- long i;
+ unsigned long i;
if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) == -1)
return -1;
diff --git a/contrib/binutils/bfd/elfcore.h b/contrib/binutils/bfd/elfcore.h
index 77f683a..5bea812 100644
--- a/contrib/binutils/bfd/elfcore.h
+++ b/contrib/binutils/bfd/elfcore.h
@@ -35,7 +35,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static boolean bfd_prstatus PARAMS ((bfd *, char *, int, long, int));
static boolean bfd_prpsinfo PARAMS ((bfd *, char *, int, long));
static boolean bfd_fpregset PARAMS ((bfd *, char *, int, long, int));
-static boolean elf_corefile_note PARAMS ((bfd *, Elf_Internal_Phdr *));
#else
#define bfd_prstatus(abfd, descdata, descsz, filepos, thread) true
@@ -44,6 +43,8 @@ static boolean elf_corefile_note PARAMS ((bfd *, Elf_Internal_Phdr *));
#define get_thread(STATUS) (1)
#endif
+static boolean elf_corefile_note PARAMS ((bfd *, Elf_Internal_Phdr *));
+
#ifdef HAVE_SYS_PROCFS_H
static int did_reg;
@@ -77,7 +78,7 @@ bfd_prstatus (abfd, descdata, descsz, filepos, thread)
newsect->_raw_size = sizeof (status->pr_reg);
newsect->filepos = filepos + (long) &status->pr_reg;
newsect->flags = SEC_HAS_CONTENTS;
- newsect->alignment_power = 2;
+ newsect->alignment_power = LOG_FILE_ALIGN;
if ((core_prstatus (abfd) = bfd_alloc (abfd, descsz)) != NULL)
{
memcpy (core_prstatus (abfd), descdata, descsz);
diff --git a/contrib/binutils/bfd/elflink.c b/contrib/binutils/bfd/elflink.c
index 7ca2b44..92e8d17 100644
--- a/contrib/binutils/bfd/elflink.c
+++ b/contrib/binutils/bfd/elflink.c
@@ -33,18 +33,26 @@ _bfd_elf_create_got_section (abfd, info)
register asection *s;
struct elf_link_hash_entry *h;
struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ int ptralign;
/* This function may be called more than once. */
if (bfd_get_section_by_name (abfd, ".got") != NULL)
return true;
+ switch (bed->s->arch_size)
+ {
+ case 32: ptralign = 2; break;
+ case 64: ptralign = 3; break;
+ default: abort();
+ }
+
flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
| SEC_LINKER_CREATED);
s = bfd_make_section (abfd, ".got");
if (s == NULL
|| !bfd_set_section_flags (abfd, s, flags)
- || !bfd_set_section_alignment (abfd, s, 2))
+ || !bfd_set_section_alignment (abfd, s, ptralign))
return false;
if (bed->want_got_plt)
@@ -52,7 +60,7 @@ _bfd_elf_create_got_section (abfd, info)
s = bfd_make_section (abfd, ".got.plt");
if (s == NULL
|| !bfd_set_section_flags (abfd, s, flags)
- || !bfd_set_section_alignment (abfd, s, 2))
+ || !bfd_set_section_alignment (abfd, s, ptralign))
return false;
}
@@ -62,9 +70,9 @@ _bfd_elf_create_got_section (abfd, info)
a global offset table. */
h = NULL;
if (!(_bfd_generic_link_add_one_symbol
- (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s, (bfd_vma) 0,
- (const char *) NULL, false, get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
+ (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
+ bed->got_symbol_offset, (const char *) NULL, false,
+ bed->collect, (struct bfd_link_hash_entry **) &h)))
return false;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -75,8 +83,9 @@ _bfd_elf_create_got_section (abfd, info)
elf_hash_table (info)->hgot = h;
- /* The first three global offset table entries are reserved. */
- s->_raw_size += 3 * 4;
+ /* The first three global offset table entries after
+ '_GLOBAL_OFFSET_TABLE_' are reserved. */
+ s->_raw_size += (3 << ptralign) + bed->got_symbol_offset;
return true;
}
@@ -89,9 +98,17 @@ _bfd_elf_create_dynamic_sections (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
{
- flagword flags;
+ flagword flags, pltflags;
register asection *s;
struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ int ptralign;
+
+ switch (bed->s->arch_size)
+ {
+ case 32: ptralign = 2; break;
+ case 64: ptralign = 3; break;
+ default: abort();
+ }
/* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and
.rel[a].bss sections. */
@@ -99,12 +116,17 @@ _bfd_elf_create_dynamic_sections (abfd, info)
flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
| SEC_LINKER_CREATED);
+ pltflags = flags;
+ pltflags |= SEC_CODE;
+ if (bed->plt_not_loaded)
+ pltflags &= ~ (SEC_LOAD | SEC_HAS_CONTENTS);
+ if (bed->plt_readonly)
+ pltflags |= SEC_READONLY;
+
s = bfd_make_section (abfd, ".plt");
if (s == NULL
- || ! bfd_set_section_flags (abfd, s,
- (flags | SEC_CODE
- | (bed->plt_readonly ? SEC_READONLY : 0)))
- || ! bfd_set_section_alignment (abfd, s, 2))
+ || ! bfd_set_section_flags (abfd, s, pltflags)
+ || ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
return false;
if (bed->want_plt_sym)
@@ -129,7 +151,7 @@ _bfd_elf_create_dynamic_sections (abfd, info)
s = bfd_make_section (abfd, bed->use_rela_p ? ".rela.plt" : ".rel.plt");
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
- || ! bfd_set_section_alignment (abfd, s, 2))
+ || ! bfd_set_section_alignment (abfd, s, ptralign))
return false;
if (! _bfd_elf_create_got_section (abfd, info))
@@ -162,7 +184,7 @@ _bfd_elf_create_dynamic_sections (abfd, info)
s = bfd_make_section (abfd, bed->use_rela_p ? ".rela.bss" : ".rel.bss");
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
- || ! bfd_set_section_alignment (abfd, s, 2))
+ || ! bfd_set_section_alignment (abfd, s, ptralign))
return false;
}
diff --git a/contrib/binutils/bfd/elflink.h b/contrib/binutils/bfd/elflink.h
index a6d06b1..21bd270 100644
--- a/contrib/binutils/bfd/elflink.h
+++ b/contrib/binutils/bfd/elflink.h
@@ -1,5 +1,5 @@
/* ELF linker support.
- Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,12 +19,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* ELF linker code. */
+/* This struct is used to pass information to routines called via
+ elf_link_hash_traverse which must return failure. */
+
+struct elf_info_failed
+{
+ boolean failed;
+ struct bfd_link_info *info;
+};
+
static boolean elf_link_add_object_symbols
PARAMS ((bfd *, struct bfd_link_info *));
static boolean elf_link_add_archive_symbols
PARAMS ((bfd *, struct bfd_link_info *));
+static boolean elf_merge_symbol
+ PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
+ asection **, bfd_vma *, struct elf_link_hash_entry **,
+ boolean *, boolean *, boolean *));
static boolean elf_export_symbol
PARAMS ((struct elf_link_hash_entry *, PTR));
+static boolean elf_fix_symbol_flags
+ PARAMS ((struct elf_link_hash_entry *, struct elf_info_failed *));
static boolean elf_adjust_dynamic_symbol
PARAMS ((struct elf_link_hash_entry *, PTR));
static boolean elf_link_find_version_dependencies
@@ -36,15 +51,6 @@ static boolean elf_link_assign_sym_version
static boolean elf_link_renumber_dynsyms
PARAMS ((struct elf_link_hash_entry *, PTR));
-/* This struct is used to pass information to routines called via
- elf_link_hash_traverse which must return failure. */
-
-struct elf_info_failed
-{
- boolean failed;
- struct bfd_link_info *info;
-};
-
/* Given an ELF BFD, add symbols to the global hash table as
appropriate. */
@@ -261,6 +267,360 @@ elf_link_add_archive_symbols (abfd, info)
return false;
}
+/* This function is called when we want to define a new symbol. It
+ handles the various cases which arise when we find a definition in
+ a dynamic object, or when there is already a definition in a
+ dynamic object. The new symbol is described by NAME, SYM, PSEC,
+ and PVALUE. We set SYM_HASH to the hash table entry. We set
+ OVERRIDE if the old symbol is overriding a new definition. We set
+ TYPE_CHANGE_OK if it is OK for the type to change. We set
+ SIZE_CHANGE_OK if it is OK for the size to change. By OK to
+ change, we mean that we shouldn't warn if the type or size does
+ change. */
+
+static boolean
+elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash,
+ override, type_change_ok, size_change_ok)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ const char *name;
+ Elf_Internal_Sym *sym;
+ asection **psec;
+ bfd_vma *pvalue;
+ struct elf_link_hash_entry **sym_hash;
+ boolean *override;
+ boolean *type_change_ok;
+ boolean *size_change_ok;
+{
+ asection *sec;
+ struct elf_link_hash_entry *h;
+ int bind;
+ bfd *oldbfd;
+ boolean newdyn, olddyn, olddef, newdef, newdyncommon, olddyncommon;
+
+ *override = false;
+ *type_change_ok = false;
+ *size_change_ok = false;
+
+ sec = *psec;
+ bind = ELF_ST_BIND (sym->st_info);
+
+ if (! bfd_is_und_section (sec))
+ h = elf_link_hash_lookup (elf_hash_table (info), name, true, false, false);
+ else
+ h = ((struct elf_link_hash_entry *)
+ bfd_wrapped_link_hash_lookup (abfd, info, name, true, false, false));
+ if (h == NULL)
+ return false;
+ *sym_hash = h;
+
+ /* This code is for coping with dynamic objects, and is only useful
+ if we are doing an ELF link. */
+ if (info->hash->creator != abfd->xvec)
+ return true;
+
+ /* For merging, we only care about real symbols. */
+
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ /* If we just created the symbol, mark it as being an ELF symbol.
+ Other than that, there is nothing to do--there is no merge issue
+ with a newly defined symbol--so we just return. */
+
+ if (h->root.type == bfd_link_hash_new)
+ {
+ h->elf_link_hash_flags &=~ ELF_LINK_NON_ELF;
+ return true;
+ }
+
+ /* OLDBFD is a BFD associated with the existing symbol. */
+
+ switch (h->root.type)
+ {
+ default:
+ oldbfd = NULL;
+ break;
+
+ case bfd_link_hash_undefined:
+ case bfd_link_hash_undefweak:
+ oldbfd = h->root.u.undef.abfd;
+ break;
+
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ oldbfd = h->root.u.def.section->owner;
+ break;
+
+ case bfd_link_hash_common:
+ oldbfd = h->root.u.c.p->section->owner;
+ break;
+ }
+
+ /* NEWDYN and OLDDYN indicate whether the new or old symbol,
+ respectively, is from a dynamic object. */
+
+ if ((abfd->flags & DYNAMIC) != 0)
+ newdyn = true;
+ else
+ newdyn = false;
+
+ if (oldbfd == NULL || (oldbfd->flags & DYNAMIC) == 0)
+ olddyn = false;
+ else
+ olddyn = true;
+
+ /* NEWDEF and OLDDEF indicate whether the new or old symbol,
+ respectively, appear to be a definition rather than reference. */
+
+ if (bfd_is_und_section (sec) || bfd_is_com_section (sec))
+ newdef = false;
+ else
+ newdef = true;
+
+ if (h->root.type == bfd_link_hash_undefined
+ || h->root.type == bfd_link_hash_undefweak
+ || h->root.type == bfd_link_hash_common)
+ olddef = false;
+ else
+ olddef = true;
+
+ /* NEWDYNCOMMON and OLDDYNCOMMON indicate whether the new or old
+ symbol, respectively, appears to be a common symbol in a dynamic
+ object. If a symbol appears in an uninitialized section, and is
+ not weak, and is not a function, then it may be a common symbol
+ which was resolved when the dynamic object was created. We want
+ to treat such symbols specially, because they raise special
+ considerations when setting the symbol size: if the symbol
+ appears as a common symbol in a regular object, and the size in
+ the regular object is larger, we must make sure that we use the
+ larger size. This problematic case can always be avoided in C,
+ but it must be handled correctly when using Fortran shared
+ libraries.
+
+ Note that if NEWDYNCOMMON is set, NEWDEF will be set, and
+ likewise for OLDDYNCOMMON and OLDDEF.
+
+ Note that this test is just a heuristic, and that it is quite
+ possible to have an uninitialized symbol in a shared object which
+ is really a definition, rather than a common symbol. This could
+ lead to some minor confusion when the symbol really is a common
+ symbol in some regular object. However, I think it will be
+ harmless. */
+
+ if (newdyn
+ && newdef
+ && (sec->flags & SEC_ALLOC) != 0
+ && (sec->flags & SEC_LOAD) == 0
+ && sym->st_size > 0
+ && bind != STB_WEAK
+ && ELF_ST_TYPE (sym->st_info) != STT_FUNC)
+ newdyncommon = true;
+ else
+ newdyncommon = false;
+
+ if (olddyn
+ && olddef
+ && h->root.type == bfd_link_hash_defined
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ && (h->root.u.def.section->flags & SEC_ALLOC) != 0
+ && (h->root.u.def.section->flags & SEC_LOAD) == 0
+ && h->size > 0
+ && h->type != STT_FUNC)
+ olddyncommon = true;
+ else
+ olddyncommon = false;
+
+ /* It's OK to change the type if either the existing symbol or the
+ new symbol is weak. */
+
+ if (h->root.type == bfd_link_hash_defweak
+ || h->root.type == bfd_link_hash_undefweak
+ || bind == STB_WEAK)
+ *type_change_ok = true;
+
+ /* It's OK to change the size if either the existing symbol or the
+ new symbol is weak, or if the old symbol is undefined. */
+
+ if (*type_change_ok
+ || h->root.type == bfd_link_hash_undefined)
+ *size_change_ok = true;
+
+ /* If both the old and the new symbols look like common symbols in a
+ dynamic object, set the size of the symbol to the larger of the
+ two. */
+
+ if (olddyncommon
+ && newdyncommon
+ && sym->st_size != h->size)
+ {
+ /* Since we think we have two common symbols, issue a multiple
+ common warning if desired. Note that we only warn if the
+ size is different. If the size is the same, we simply let
+ the old symbol override the new one as normally happens with
+ symbols defined in dynamic objects. */
+
+ if (! ((*info->callbacks->multiple_common)
+ (info, h->root.root.string, oldbfd, bfd_link_hash_common,
+ h->size, abfd, bfd_link_hash_common, sym->st_size)))
+ return false;
+
+ if (sym->st_size > h->size)
+ h->size = sym->st_size;
+
+ *size_change_ok = true;
+ }
+
+ /* If we are looking at a dynamic object, and we have found a
+ definition, we need to see if the symbol was already defined by
+ some other object. If so, we want to use the existing
+ definition, and we do not want to report a multiple symbol
+ definition error; we do this by clobbering *PSEC to be
+ bfd_und_section_ptr.
+
+ We treat a common symbol as a definition if the symbol in the
+ shared library is a function, since common symbols always
+ represent variables; this can cause confusion in principle, but
+ any such confusion would seem to indicate an erroneous program or
+ shared library. We also permit a common symbol in a regular
+ object to override a weak symbol in a shared object. */
+
+ if (newdyn
+ && newdef
+ && (olddef
+ || (h->root.type == bfd_link_hash_common
+ && (bind == STB_WEAK
+ || ELF_ST_TYPE (sym->st_info) == STT_FUNC))))
+ {
+ *override = true;
+ newdef = false;
+ newdyncommon = false;
+
+ *psec = sec = bfd_und_section_ptr;
+ *size_change_ok = true;
+
+ /* If we get here when the old symbol is a common symbol, then
+ we are explicitly letting it override a weak symbol or
+ function in a dynamic object, and we don't want to warn about
+ a type change. If the old symbol is a defined symbol, a type
+ change warning may still be appropriate. */
+
+ if (h->root.type == bfd_link_hash_common)
+ *type_change_ok = true;
+ }
+
+ /* Handle the special case of an old common symbol merging with a
+ new symbol which looks like a common symbol in a shared object.
+ We change *PSEC and *PVALUE to make the new symbol look like a
+ common symbol, and let _bfd_generic_link_add_one_symbol will do
+ the right thing. */
+
+ if (newdyncommon
+ && h->root.type == bfd_link_hash_common)
+ {
+ *override = true;
+ newdef = false;
+ newdyncommon = false;
+ *pvalue = sym->st_size;
+ *psec = sec = bfd_com_section_ptr;
+ *size_change_ok = true;
+ }
+
+ /* If the old symbol is from a dynamic object, and the new symbol is
+ a definition which is not from a dynamic object, then the new
+ symbol overrides the old symbol. Symbols from regular files
+ always take precedence over symbols from dynamic objects, even if
+ they are defined after the dynamic object in the link.
+
+ As above, we again permit a common symbol in a regular object to
+ override a definition in a shared object if the shared object
+ symbol is a function or is weak. */
+
+ if (! newdyn
+ && (newdef
+ || (bfd_is_com_section (sec)
+ && (h->root.type == bfd_link_hash_defweak
+ || h->type == STT_FUNC)))
+ && olddyn
+ && olddef
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0)
+ {
+ /* Change the hash table entry to undefined, and let
+ _bfd_generic_link_add_one_symbol do the right thing with the
+ new definition. */
+
+ h->root.type = bfd_link_hash_undefined;
+ h->root.u.undef.abfd = h->root.u.def.section->owner;
+ *size_change_ok = true;
+
+ olddef = false;
+ olddyncommon = false;
+
+ /* We again permit a type change when a common symbol may be
+ overriding a function. */
+
+ if (bfd_is_com_section (sec))
+ *type_change_ok = true;
+
+ /* This union may have been set to be non-NULL when this symbol
+ was seen in a dynamic object. We must force the union to be
+ NULL, so that it is correct for a regular symbol. */
+
+ h->verinfo.vertree = NULL;
+
+ /* In this special case, if H is the target of an indirection,
+ we want the caller to frob with H rather than with the
+ indirect symbol. That will permit the caller to redefine the
+ target of the indirection, rather than the indirect symbol
+ itself. FIXME: This will break the -y option if we store a
+ symbol with a different name. */
+ *sym_hash = h;
+ }
+
+ /* Handle the special case of a new common symbol merging with an
+ old symbol that looks like it might be a common symbol defined in
+ a shared object. Note that we have already handled the case in
+ which a new common symbol should simply override the definition
+ in the shared library. */
+
+ if (! newdyn
+ && bfd_is_com_section (sec)
+ && olddyncommon)
+ {
+ /* It would be best if we could set the hash table entry to a
+ common symbol, but we don't know what to use for the section
+ or the alignment. */
+ if (! ((*info->callbacks->multiple_common)
+ (info, h->root.root.string, oldbfd, bfd_link_hash_common,
+ h->size, abfd, bfd_link_hash_common, sym->st_size)))
+ return false;
+
+ /* If the predumed common symbol in the dynamic object is
+ larger, pretend that the new symbol has its size. */
+
+ if (h->size > *pvalue)
+ *pvalue = h->size;
+
+ /* FIXME: We no longer know the alignment required by the symbol
+ in the dynamic object, so we just wind up using the one from
+ the regular object. */
+
+ olddef = false;
+ olddyncommon = false;
+
+ h->root.type = bfd_link_hash_undefined;
+ h->root.u.undef.abfd = h->root.u.def.section->owner;
+
+ *size_change_ok = true;
+ *type_change_ok = true;
+
+ h->verinfo.vertree = NULL;
+ }
+
+ return true;
+}
+
/* Add symbols from an ELF object file to the linker hash table. */
static boolean
@@ -395,57 +755,8 @@ elf_link_add_object_symbols (abfd, info)
{
/* Read in any version definitions. */
- if (elf_dynverdef (abfd) != 0)
- {
- Elf_Internal_Shdr *verdefhdr;
- bfd_byte *dynver;
- int i;
- const Elf_External_Verdef *extverdef;
- Elf_Internal_Verdef *intverdef;
-
- verdefhdr = &elf_tdata (abfd)->dynverdef_hdr;
- elf_tdata (abfd)->verdef =
- ((Elf_Internal_Verdef *)
- bfd_zalloc (abfd,
- verdefhdr->sh_info * sizeof (Elf_Internal_Verdef)));
- if (elf_tdata (abfd)->verdef == NULL)
- goto error_return;
-
- dynver = (bfd_byte *) bfd_malloc (verdefhdr->sh_size);
- if (dynver == NULL)
- goto error_return;
-
- if (bfd_seek (abfd, verdefhdr->sh_offset, SEEK_SET) != 0
- || (bfd_read ((PTR) dynver, 1, verdefhdr->sh_size, abfd)
- != verdefhdr->sh_size))
- goto error_return;
-
- extverdef = (const Elf_External_Verdef *) dynver;
- intverdef = elf_tdata (abfd)->verdef;
- for (i = 0; i < verdefhdr->sh_info; i++, intverdef++)
- {
- const Elf_External_Verdaux *extverdaux;
- Elf_Internal_Verdaux intverdaux;
-
- _bfd_elf_swap_verdef_in (abfd, extverdef, intverdef);
-
- /* Pick up the name of the version. */
- extverdaux = ((const Elf_External_Verdaux *)
- ((bfd_byte *) extverdef + intverdef->vd_aux));
- _bfd_elf_swap_verdaux_in (abfd, extverdaux, &intverdaux);
-
- intverdef->vd_bfd = abfd;
- intverdef->vd_nodename =
- bfd_elf_string_from_elf_section (abfd, verdefhdr->sh_link,
- intverdaux.vda_name);
-
- extverdef = ((const Elf_External_Verdef *)
- ((bfd_byte *) extverdef + intverdef->vd_next));
- }
-
- free (dynver);
- dynver = NULL;
- }
+ if (! _bfd_elf_slurp_version_tables (abfd))
+ goto error_return;
/* Read in the symbol versions, but don't bother to convert them
to internal format. */
@@ -787,7 +1098,7 @@ elf_link_add_object_symbols (abfd, info)
if (info->hash->creator->flavour == bfd_target_elf_flavour)
{
Elf_Internal_Versym iver;
- int vernum;
+ unsigned int vernum = 0;
boolean override;
if (ever != NULL)
@@ -807,19 +1118,58 @@ elf_link_add_object_symbols (abfd, info)
int namelen, newlen;
char *newname, *p;
- if (vernum > elf_tdata (abfd)->dynverdef_hdr.sh_info)
+ if (sym.st_shndx != SHN_UNDEF)
{
- (*_bfd_error_handler)
- ("%s: %s: invalid version %d (max %d)",
- abfd->filename, name, vernum,
- elf_tdata (abfd)->dynverdef_hdr.sh_info);
- bfd_set_error (bfd_error_bad_value);
- goto error_return;
+ if (vernum > elf_tdata (abfd)->dynverdef_hdr.sh_info)
+ {
+ (*_bfd_error_handler)
+ ("%s: %s: invalid version %u (max %d)",
+ abfd->filename, name, vernum,
+ elf_tdata (abfd)->dynverdef_hdr.sh_info);
+ bfd_set_error (bfd_error_bad_value);
+ goto error_return;
+ }
+ else if (vernum > 1)
+ verstr =
+ elf_tdata (abfd)->verdef[vernum - 1].vd_nodename;
+ else
+ verstr = "";
}
- else if (vernum > 1)
- verstr = elf_tdata (abfd)->verdef[vernum - 1].vd_nodename;
else
- verstr = "";
+ {
+ /* We cannot simply test for the number of
+ entries in the VERNEED section since the
+ numbers for the needed versions do not start
+ at 0. */
+ Elf_Internal_Verneed *t;
+
+ verstr = NULL;
+ for (t = elf_tdata (abfd)->verref;
+ t != NULL;
+ t = t->vn_nextref)
+ {
+ Elf_Internal_Vernaux *a;
+
+ for (a = t->vn_auxptr; a != NULL; a = a->vna_nextptr)
+ {
+ if (a->vna_other == vernum)
+ {
+ verstr = a->vna_nodename;
+ break;
+ }
+ }
+ if (a != NULL)
+ break;
+ }
+ if (verstr == NULL)
+ {
+ (*_bfd_error_handler)
+ ("%s: %s: invalid needed version %d",
+ abfd->filename, name, vernum);
+ bfd_set_error (bfd_error_bad_value);
+ goto error_return;
+ }
+ }
namelen = strlen (name);
newlen = namelen + strlen (verstr) + 2;
@@ -840,212 +1190,31 @@ elf_link_add_object_symbols (abfd, info)
}
}
- /* We need to look up the symbol now in order to get some of
- the dynamic object handling right. We pass the hash
- table entry in to _bfd_generic_link_add_one_symbol so
- that it does not have to look it up again. */
- if (! bfd_is_und_section (sec))
- h = elf_link_hash_lookup (elf_hash_table (info), name,
- true, false, false);
- else
- h = ((struct elf_link_hash_entry *)
- bfd_wrapped_link_hash_lookup (abfd, info, name, true,
- false, false));
- if (h == NULL)
+ if (! elf_merge_symbol (abfd, info, name, &sym, &sec, &value,
+ sym_hash, &override, &type_change_ok,
+ &size_change_ok))
goto error_return;
- *sym_hash = h;
- if (h->root.type == bfd_link_hash_new)
- h->elf_link_hash_flags &=~ ELF_LINK_NON_ELF;
+ if (override)
+ definition = false;
+ h = *sym_hash;
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
- /* FIXME: There are too many cases here, and it's too
- confusing. This code needs to be reorganized somehow. */
-
- /* It's OK to change the type if it used to be a weak
- definition, or if the current definition is weak (and
- hence might be ignored). */
- if (h->root.type == bfd_link_hash_defweak
- || h->root.type == bfd_link_hash_undefweak
- || bind == STB_WEAK)
- type_change_ok = true;
-
- /* It's OK to change the size if it used to be a weak
- definition, or if it used to be undefined, or if we will
- be overriding an old definition. */
- if (type_change_ok
- || h->root.type == bfd_link_hash_undefined)
- size_change_ok = true;
-
+ /* Remember the old alignment if this is a common symbol, so
+ that we don't reduce the alignment later on. We can't
+ check later, because _bfd_generic_link_add_one_symbol
+ will set a default for the alignment which we want to
+ override. */
if (h->root.type == bfd_link_hash_common)
old_alignment = h->root.u.c.p->alignment_power;
- override = false;
-
- /* If we are looking at a dynamic object, and this is a
- definition, we need to see if it has already been defined
- by some other object. If it has, we want to use the
- existing definition, and we do not want to report a
- multiple symbol definition error; we do this by
- clobbering sec to be bfd_und_section_ptr. We treat a
- common symbol as a definition if the symbol in the shared
- library is a function, since common symbols always
- represent variables; this can cause confusion in
- principle, but any such confusion would seem to indicate
- an erroneous program or shared library. */
- if (dynamic && definition)
- {
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak
- || (h->root.type == bfd_link_hash_common
- && (bind == STB_WEAK
- || ELF_ST_TYPE (sym.st_info) == STT_FUNC)))
- {
- /* In the special case of two symbols which look
- like common symbols in a dynamic object, set the
- size of the symbol to the larger of the two. */
- if ((sec->flags & SEC_ALLOC) != 0
- && (sec->flags & SEC_LOAD) == 0
- && sym.st_size > 0
- && bind != STB_WEAK
- && ELF_ST_TYPE (sym.st_info) != STT_FUNC
- && h->root.type == bfd_link_hash_defined
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->root.u.def.section->owner->flags & DYNAMIC) != 0
- && (h->root.u.def.section->flags & SEC_ALLOC) != 0
- && (h->root.u.def.section->flags & SEC_LOAD) == 0
- && h->size > 0
- && h->type != STT_FUNC
- && sym.st_size != h->size)
- {
- /* Note that we only warn if the size is
- different. If the size is the same, then we
- simply let the first shared library override
- the second. */
- if (! ((*info->callbacks->multiple_common)
- (info, h->root.root.string,
- h->root.u.def.section->owner,
- bfd_link_hash_common,
- h->size, abfd, bfd_link_hash_common,
- sym.st_size)))
- goto error_return;
- if (sym.st_size > h->size)
- h->size = sym.st_size;
- }
-
- override = true;
- sec = bfd_und_section_ptr;
- definition = false;
- size_change_ok = true;
- if (h->root.type == bfd_link_hash_common)
- type_change_ok = true;
- }
- }
-
- /* If we already have a common symbol, and the symbol in the
- shared library is in an uninitialized section, then treat
- the shared library symbol as a common symbol. This will
- not always be correct, but it should do little harm. */
- if (dynamic
- && definition
- && h->root.type == bfd_link_hash_common
- && (sec->flags & SEC_ALLOC) != 0
- && (sec->flags & SEC_LOAD) == 0
- && sym.st_size > 0
- && bind != STB_WEAK
- && ELF_ST_TYPE (sym.st_info) != STT_FUNC)
- {
- override = true;
- sec = bfd_com_section_ptr;
- definition = false;
- value = sym.st_size;
- size_change_ok = true;
- }
-
- /* If we are not looking at a dynamic object, and we have a
- definition, we want to override any definition we may
- have from a dynamic object. Symbols from regular files
- always take precedence over symbols from dynamic objects,
- even if they are defined after the dynamic object in the
- link. */
- if (! dynamic
- && (definition
- || (bfd_is_com_section (sec)
- && (h->root.type == bfd_link_hash_defweak
- || h->type == STT_FUNC)))
- && (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->root.u.def.section->owner->flags & DYNAMIC) != 0)
- {
- override = true;
- /* Change the hash table entry to undefined, and let
- _bfd_generic_link_add_one_symbol do the right thing
- with the new definition. */
- h->root.type = bfd_link_hash_undefined;
- h->root.u.undef.abfd = h->root.u.def.section->owner;
- size_change_ok = true;
- if (bfd_is_com_section (sec))
- type_change_ok = true;
-
- /* This union may have been set to be non-NULL when this
- symbol was seen in a dynamic object. We must force
- the union to be NULL, so that it is correct for a
- regular symbol. */
- h->verinfo.vertree = NULL;
- }
-
- /* If we are not looking at a shared library and we have a
- common symbol, and the symbol in the shared library is in
- an uninitialized section, then treat the shared library
- symbol as a common symbol. This will not always be
- correct, but it should do little harm. Note that the
- above condition already handled cases in which a common
- symbol should simply override the definition in the
- shared library. */
- if (! dynamic
- && ! override
- && bfd_is_com_section (sec)
- && h->root.type == bfd_link_hash_defined
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->root.u.def.section->owner->flags & DYNAMIC) != 0
- && (h->root.u.def.section->flags & SEC_ALLOC) != 0
- && (h->root.u.def.section->flags & SEC_LOAD) == 0
- && h->size > 0
- && h->type != STT_FUNC)
- {
- /* It would be best if we could set the hash table entry
- to a common symbol, but we don't know what to use for
- the section or the alignment. */
- if (! ((*info->callbacks->multiple_common)
- (info, h->root.root.string,
- h->root.u.def.section->owner, bfd_link_hash_common,
- h->size, abfd, bfd_link_hash_common, value)))
- goto error_return;
-
- if (h->size > value)
- value = h->size;
-
- /* FIXME: We no longer know the alignment required by
- the symbol in the shared library, so we just wind up
- using the one from the regular object. */
-
- override = true;
- h->root.type = bfd_link_hash_undefined;
- h->root.u.undef.abfd = h->root.u.def.section->owner;
- size_change_ok = true;
- type_change_ok = true;
- h->verinfo.vertree = NULL;
- }
-
- if (ever != NULL
+ if (elf_tdata (abfd)->verdef != NULL
&& ! override
&& vernum > 1
- && (h->verinfo.verdef == NULL || definition))
+ && definition)
h->verinfo.verdef = &elf_tdata (abfd)->verdef[vernum - 1];
}
@@ -1188,7 +1357,8 @@ elf_link_add_object_symbols (abfd, info)
if (p != NULL && p[1] == ELF_VER_CHR)
{
char *shortname;
- struct elf_link_hash_entry *hold;
+ struct elf_link_hash_entry *hi;
+ boolean override;
shortname = bfd_hash_allocate (&info->hash->table,
p - name + 1);
@@ -1197,124 +1367,134 @@ elf_link_add_object_symbols (abfd, info)
strncpy (shortname, name, p - name);
shortname[p - name] = '\0';
- /* First look to see if we have an existing symbol
- with this name. */
- hold = elf_link_hash_lookup (elf_hash_table (info),
- shortname, false, false,
- false);
-
- /* If we are looking at a normal object, and the
- symbol was seen in a shared object, clobber the
- definition in the shared object. */
- if (hold != NULL
- && ! dynamic
- && (hold->root.type == bfd_link_hash_defined
- || hold->root.type == bfd_link_hash_defweak)
- && (hold->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && ((hold->root.u.def.section->owner->flags & DYNAMIC)
- != 0))
- {
- /* Change the hash table entry to undefined, so
- that _bfd_generic_link_add_one_symbol will do
- the right thing. */
- hold->root.type = bfd_link_hash_undefined;
- hold->root.u.undef.abfd =
- hold->root.u.def.section->owner;
- hold->verinfo.vertree = NULL;
- hold = NULL;
- }
+ /* We are going to create a new symbol. Merge it
+ with any existing symbol with this name. For the
+ purposes of the merge, act as though we were
+ defining the symbol we just defined, although we
+ actually going to define an indirect symbol. */
+ if (! elf_merge_symbol (abfd, info, shortname, &sym, &sec,
+ &value, &hi, &override,
+ &type_change_ok, &size_change_ok))
+ goto error_return;
- /* If we are looking at a shared object, and we have
- already seen this symbol defined elsewhere, then
- don't try to define it again. */
- if (hold != NULL
- && dynamic
- && (hold->root.type == bfd_link_hash_defined
- || hold->root.type == bfd_link_hash_defweak
- || hold->root.type == bfd_link_hash_indirect
- || (hold->root.type == bfd_link_hash_common
- && (bind == STB_WEAK
- || ELF_ST_TYPE (sym.st_info) == STT_FUNC))))
- {
- /* Don't add an indirect symbol. */
- }
- else
+ if (! override)
{
- struct elf_link_hash_entry *hi;
-
- hi = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, shortname, BSF_INDIRECT,
bfd_ind_section_ptr, (bfd_vma) 0, name, false,
collect, (struct bfd_link_hash_entry **) &hi)))
goto error_return;
+ }
+ else
+ {
+ /* In this case the symbol named SHORTNAME is
+ overriding the indirect symbol we want to
+ add. We were planning on making SHORTNAME an
+ indirect symbol referring to NAME. SHORTNAME
+ is the name without a version. NAME is the
+ fully versioned name, and it is the default
+ version.
+
+ Overriding means that we already saw a
+ definition for the symbol SHORTNAME in a
+ regular object, and it is overriding the
+ symbol defined in the dynamic object.
+
+ When this happens, we actually want to change
+ NAME, the symbol we just added, to refer to
+ SHORTNAME. This will cause references to
+ NAME in the shared object to become
+ references to SHORTNAME in the regular
+ object. This is what we expect when we
+ override a function in a shared object: that
+ the references in the shared object will be
+ mapped to the definition in the regular
+ object. */
+
+ while (hi->root.type == bfd_link_hash_indirect
+ || hi->root.type == bfd_link_hash_warning)
+ hi = (struct elf_link_hash_entry *) hi->root.u.i.link;
+
+ h->root.type = bfd_link_hash_indirect;
+ h->root.u.i.link = (struct bfd_link_hash_entry *) hi;
+ if (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)
+ {
+ h->elf_link_hash_flags &=~ ELF_LINK_HASH_DEF_DYNAMIC;
+ hi->elf_link_hash_flags |= ELF_LINK_HASH_REF_DYNAMIC;
+ if (! _bfd_elf_link_record_dynamic_symbol (info, hi))
+ goto error_return;
+ }
- /* If there is a duplicate definition somewhere,
- then HI may not point to an indirect symbol.
- We will have reported an error to the user in
- that case. */
+ /* Now set HI to H, so that the following code
+ will set the other fields correctly. */
+ hi = h;
+ }
- if (hi->root.type == bfd_link_hash_indirect)
+ /* If there is a duplicate definition somewhere,
+ then HI may not point to an indirect symbol. We
+ will have reported an error to the user in that
+ case. */
+
+ if (hi->root.type == bfd_link_hash_indirect)
+ {
+ struct elf_link_hash_entry *ht;
+
+ /* If the symbol became indirect, then we assume
+ that we have not seen a definition before. */
+ BFD_ASSERT ((hi->elf_link_hash_flags
+ & (ELF_LINK_HASH_DEF_DYNAMIC
+ | ELF_LINK_HASH_DEF_REGULAR))
+ == 0);
+
+ ht = (struct elf_link_hash_entry *) hi->root.u.i.link;
+
+ /* Copy down any references that we may have
+ already seen to the symbol which just became
+ indirect. */
+ ht->elf_link_hash_flags |=
+ (hi->elf_link_hash_flags
+ & (ELF_LINK_HASH_REF_DYNAMIC
+ | ELF_LINK_HASH_REF_REGULAR));
+
+ /* Copy over the global table offset entry.
+ This may have been already set up by a
+ check_relocs routine. */
+ if (ht->got_offset == (bfd_vma) -1)
{
- hi->elf_link_hash_flags &= ~ ELF_LINK_NON_ELF;
+ ht->got_offset = hi->got_offset;
+ hi->got_offset = (bfd_vma) -1;
+ }
+ BFD_ASSERT (hi->got_offset == (bfd_vma) -1);
- /* If the symbol became indirect, then we
- assume that we have not seen a definition
- before. */
- BFD_ASSERT ((hi->elf_link_hash_flags
- & (ELF_LINK_HASH_DEF_DYNAMIC
- | ELF_LINK_HASH_DEF_REGULAR))
- == 0);
+ if (ht->dynindx == -1)
+ {
+ ht->dynindx = hi->dynindx;
+ ht->dynstr_index = hi->dynstr_index;
+ hi->dynindx = -1;
+ hi->dynstr_index = 0;
+ }
+ BFD_ASSERT (hi->dynindx == -1);
- /* Copy down any references that we may have
- already seen to the symbol which just
- became indirect. */
- h->elf_link_hash_flags |=
- (hi->elf_link_hash_flags
- & (ELF_LINK_HASH_REF_DYNAMIC
- | ELF_LINK_HASH_REF_REGULAR));
+ /* FIXME: There may be other information to copy
+ over for particular targets. */
- /* Copy over the global table offset entry.
- This may have been already set up by a
- check_relocs routine. */
- if (h->got_offset == (bfd_vma) -1)
- {
- h->got_offset = hi->got_offset;
- hi->got_offset = (bfd_vma) -1;
- }
- BFD_ASSERT (hi->got_offset == (bfd_vma) -1);
-
- if (h->dynindx == -1)
+ /* See if the new flags lead us to realize that
+ the symbol must be dynamic. */
+ if (! dynsym)
+ {
+ if (! dynamic)
{
- h->dynindx = hi->dynindx;
- h->dynstr_index = hi->dynstr_index;
- hi->dynindx = -1;
- hi->dynstr_index = 0;
+ if (info->shared
+ || ((hi->elf_link_hash_flags
+ & ELF_LINK_HASH_REF_DYNAMIC)
+ != 0))
+ dynsym = true;
}
- BFD_ASSERT (hi->dynindx == -1);
-
- /* FIXME: There may be other information to
- copy over for particular targets. */
-
- /* See if the new flags lead us to realize
- that the symbol must be dynamic. */
- if (! dynsym)
+ else
{
- if (! dynamic)
- {
- if (info->shared
- || ((hi->elf_link_hash_flags
- & ELF_LINK_HASH_REF_DYNAMIC)
- != 0))
- dynsym = true;
- }
- else
- {
- if ((hi->elf_link_hash_flags
- & ELF_LINK_HASH_REF_REGULAR) != 0)
- dynsym = true;
- }
+ if ((hi->elf_link_hash_flags
+ & ELF_LINK_HASH_REF_REGULAR) != 0)
+ dynsym = true;
}
}
}
@@ -1329,53 +1509,23 @@ elf_link_add_object_symbols (abfd, info)
strncpy (shortname, name, p - name);
strcpy (shortname + (p - name), p + 1);
- /* First look to see if we have an existing symbol
- with this name. */
- hold = elf_link_hash_lookup (elf_hash_table (info),
- shortname, false, false,
- false);
-
- /* If we are looking at a normal object, and the
- symbol was seen in a shared object, clobber the
- definition in the shared object. */
- if (hold != NULL
- && ! dynamic
- && (hold->root.type == bfd_link_hash_defined
- || hold->root.type == bfd_link_hash_defweak)
- && (hold->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && ((hold->root.u.def.section->owner->flags & DYNAMIC)
- != 0))
- {
- /* Change the hash table entry to undefined, so
- that _bfd_generic_link_add_one_symbol will do
- the right thing. */
- hold->root.type = bfd_link_hash_undefined;
- hold->root.u.undef.abfd =
- hold->root.u.def.section->owner;
- hold->verinfo.vertree = NULL;
- hold = NULL;
- }
+ /* Once again, merge with any existing symbol. */
+ if (! elf_merge_symbol (abfd, info, shortname, &sym, &sec,
+ &value, &hi, &override,
+ &type_change_ok, &size_change_ok))
+ goto error_return;
- /* If we are looking at a shared object, and we have
- already seen this symbol defined elsewhere, then
- don't try to define it again. */
- if (hold != NULL
- && dynamic
- && (hold->root.type == bfd_link_hash_defined
- || hold->root.type == bfd_link_hash_defweak
- || hold->root.type == bfd_link_hash_indirect
- || (hold->root.type == bfd_link_hash_common
- && (bind == STB_WEAK
- || ELF_ST_TYPE (sym.st_info) == STT_FUNC))))
+ if (override)
{
- /* Don't add an indirect symbol. */
+ /* Here SHORTNAME is a versioned name, so we
+ don't expect to see the type of override we
+ do in the case above. */
+ (*_bfd_error_handler)
+ ("%s: warning: unexpected redefinition of `%s'",
+ bfd_get_filename (abfd), shortname);
}
else
{
- struct elf_link_hash_entry *hi;
-
- hi = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, shortname, BSF_INDIRECT,
bfd_ind_section_ptr, (bfd_vma) 0, name, false,
@@ -1389,8 +1539,6 @@ elf_link_add_object_symbols (abfd, info)
if (hi->root.type == bfd_link_hash_indirect)
{
- hi->elf_link_hash_flags &= ~ ELF_LINK_NON_ELF;
-
/* If the symbol became indirect, then we
assume that we have not seen a definition
before. */
@@ -1586,7 +1734,8 @@ elf_link_add_object_symbols (abfd, info)
if ((o->flags & SEC_RELOC) == 0
|| o->reloc_count == 0
|| ((info->strip == strip_all || info->strip == strip_debugger)
- && (o->flags & SEC_DEBUGGING) != 0))
+ && (o->flags & SEC_DEBUGGING) != 0)
+ || bfd_is_abs_section (o->output_section))
continue;
internal_relocs = (NAME(_bfd_elf,link_read_relocs)
@@ -1695,7 +1844,7 @@ elf_link_create_dynamic_sections (abfd, info)
s = bfd_make_section (abfd, ".gnu.version_d");
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
- || ! bfd_set_section_alignment (abfd, s, 2))
+ || ! bfd_set_section_alignment (abfd, s, LOG_FILE_ALIGN))
return false;
s = bfd_make_section (abfd, ".gnu.version");
@@ -1707,7 +1856,7 @@ elf_link_create_dynamic_sections (abfd, info)
s = bfd_make_section (abfd, ".gnu.version_r");
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
- || ! bfd_set_section_alignment (abfd, s, 2))
+ || ! bfd_set_section_alignment (abfd, s, LOG_FILE_ALIGN))
return false;
s = bfd_make_section (abfd, ".dynsym");
@@ -1954,6 +2103,15 @@ NAME(bfd_elf,record_link_assignment) (output_bfd, info, name, provide)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
h->root.type = bfd_link_hash_undefined;
+ /* If this symbol is not being provided by the linker script, and it is
+ currently defined by a dynamic object, but not by a regular object,
+ then clear out any version information because the symbol will not be
+ associated with the dynamic object any more. */
+ if (!provide
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ h->verinfo.verdef = NULL;
+
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -2049,10 +2207,11 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
bfd *dynobj;
struct elf_backend_data *bed;
bfd_size_type old_dynsymcount;
+ struct elf_assign_sym_version_info asvinfo;
*sinterpptr = NULL;
- soname_indx = -1;
+ soname_indx = (bfd_size_type) -1;
if (info->hash->creator->flavour != bfd_target_elf_flavour)
return true;
@@ -2147,6 +2306,20 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
}
}
+ /* Attach all the symbols to their version information. */
+ asvinfo.output_bfd = output_bfd;
+ asvinfo.info = info;
+ asvinfo.verdefs = verdefs;
+ asvinfo.export_dynamic = export_dynamic;
+ asvinfo.removed_dynamic = false;
+ asvinfo.failed = false;
+
+ elf_link_hash_traverse (elf_hash_table (info),
+ elf_link_assign_sym_version,
+ (PTR) &asvinfo);
+ if (asvinfo.failed)
+ return false;
+
/* Find all symbols which were defined in a dynamic object and make
the backend pick a reasonable value for them. */
eif.failed = false;
@@ -2201,30 +2374,14 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
size_t i;
size_t bucketcount = 0;
Elf_Internal_Sym isym;
- struct elf_assign_sym_version_info sinfo;
/* Set up the version definition section. */
s = bfd_get_section_by_name (dynobj, ".gnu.version_d");
BFD_ASSERT (s != NULL);
- /* Attach all the symbols to their version information. This
- may cause some symbols to be unexported. */
- sinfo.output_bfd = output_bfd;
- sinfo.info = info;
- sinfo.verdefs = verdefs;
- sinfo.export_dynamic = export_dynamic;
- sinfo.removed_dynamic = false;
- sinfo.failed = false;
-
- elf_link_hash_traverse (elf_hash_table (info),
- elf_link_assign_sym_version,
- (PTR) &sinfo);
- if (sinfo.failed)
- return false;
-
/* We may have created additional version definitions if we are
just linking a regular application. */
- verdefs = sinfo.verdefs;
+ verdefs = asvinfo.verdefs;
if (verdefs == NULL)
{
@@ -2247,7 +2404,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
Elf_Internal_Verdef def;
Elf_Internal_Verdaux defaux;
- if (sinfo.removed_dynamic)
+ if (asvinfo.removed_dynamic)
{
/* Some dynamic symbols were changed to be local
symbols. In this case, we renumber all of the
@@ -2301,7 +2458,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
def.vd_next = (sizeof (Elf_External_Verdef)
+ sizeof (Elf_External_Verdaux));
- if (soname_indx != -1)
+ if (soname_indx != (bfd_size_type) -1)
{
def.vd_hash = bfd_elf_hash ((const unsigned char *) soname);
defaux.vda_name = soname_indx;
@@ -2385,7 +2542,14 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
for (n = t->deps; n != NULL; n = n->next)
{
- defaux.vda_name = n->version_needed->name_indx;
+ if (n->version_needed == NULL)
+ {
+ /* This can happen if there was an error in the
+ version script. */
+ defaux.vda_name = 0;
+ }
+ else
+ defaux.vda_name = n->version_needed->name_indx;
if (n->next == NULL)
defaux.vda_next = 0;
else
@@ -2478,8 +2642,13 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
t->vn_version = VER_NEED_CURRENT;
t->vn_cnt = caux;
- indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr,
- t->vn_bfd->filename, true, false);
+ if (elf_dt_name (t->vn_bfd) != NULL)
+ indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr,
+ elf_dt_name (t->vn_bfd),
+ true, false);
+ else
+ indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr,
+ t->vn_bfd->filename, true, false);
if (indx == (bfd_size_type) -1)
return false;
t->vn_file = indx;
@@ -2606,23 +2775,17 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
return true;
}
-/* Make the backend pick a good value for a dynamic symbol. This is
- called via elf_link_hash_traverse, and also calls itself
- recursively. */
+/* Fix up the flags for a symbol. This handles various cases which
+ can only be fixed after all the input files are seen. This is
+ currently called by both adjust_dynamic_symbol and
+ assign_sym_version, which is unnecessary but perhaps more robust in
+ the face of future changes. */
static boolean
-elf_adjust_dynamic_symbol (h, data)
+elf_fix_symbol_flags (h, eif)
struct elf_link_hash_entry *h;
- PTR data;
+ struct elf_info_failed *eif;
{
- struct elf_info_failed *eif = (struct elf_info_failed *) data;
- bfd *dynobj;
- struct elf_backend_data *bed;
-
- /* Ignore indirect symbols. These are added by the versioning code. */
- if (h->root.type == bfd_link_hash_indirect)
- return true;
-
/* If this symbol was mentioned in a non-ELF file, try to set
DEF_REGULAR and REF_REGULAR correctly. This is the only way to
permit a non-ELF file to correctly refer to a symbol defined in
@@ -2642,8 +2805,9 @@ elf_adjust_dynamic_symbol (h, data)
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
}
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- || (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0)
+ if (h->dynindx == -1
+ && ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ || (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0))
{
if (! _bfd_elf_link_record_dynamic_symbol (eif->info, h))
{
@@ -2675,6 +2839,30 @@ elf_adjust_dynamic_symbol (h, data)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
h->elf_link_hash_flags &=~ ELF_LINK_HASH_NEEDS_PLT;
+ return true;
+}
+
+/* Make the backend pick a good value for a dynamic symbol. This is
+ called via elf_link_hash_traverse, and also calls itself
+ recursively. */
+
+static boolean
+elf_adjust_dynamic_symbol (h, data)
+ struct elf_link_hash_entry *h;
+ PTR data;
+{
+ struct elf_info_failed *eif = (struct elf_info_failed *) data;
+ bfd *dynobj;
+ struct elf_backend_data *bed;
+
+ /* Ignore indirect symbols. These are added by the versioning code. */
+ if (h->root.type == bfd_link_hash_indirect)
+ return true;
+
+ /* Fix the symbol flags. */
+ if (! elf_fix_symbol_flags (h, eif))
+ return false;
+
/* If this symbol does not require a PLT entry, and it is not
defined by a dynamic object, or is not referenced by a regular
object, ignore it. We do have to handle a weak defined symbol,
@@ -2819,7 +3007,7 @@ elf_link_find_version_dependencies (h, data)
/* See if we already know about this version. */
for (t = elf_tdata (rinfo->output_bfd)->verref; t != NULL; t = t->vn_nextref)
{
- if (t->vn_bfd == h->verinfo.verdef->vd_bfd)
+ if (t->vn_bfd != h->verinfo.verdef->vd_bfd)
continue;
for (a = t->vn_auxptr; a != NULL; a = a->vna_nextptr)
@@ -2879,8 +3067,19 @@ elf_link_assign_sym_version (h, data)
struct elf_assign_sym_version_info *sinfo =
(struct elf_assign_sym_version_info *) data;
struct bfd_link_info *info = sinfo->info;
+ struct elf_info_failed eif;
char *p;
+ /* Fix the symbol flags. */
+ eif.failed = false;
+ eif.info = info;
+ if (! elf_fix_symbol_flags (h, &eif))
+ {
+ if (eif.failed)
+ sinfo->failed = true;
+ return false;
+ }
+
/* We only need version numbers for symbols defined in regular
objects. */
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
@@ -2916,26 +3115,37 @@ elf_link_assign_sym_version (h, data)
{
if (strcmp (t->name, p) == 0)
{
+ int len;
+ char *alc;
+ struct bfd_elf_version_expr *d;
+
+ len = p - h->root.root.string;
+ alc = bfd_alloc (sinfo->output_bfd, len);
+ if (alc == NULL)
+ return false;
+ strncpy (alc, h->root.root.string, len - 1);
+ alc[len - 1] = '\0';
+ if (alc[len - 2] == ELF_VER_CHR)
+ alc[len - 2] = '\0';
+
h->verinfo.vertree = t;
t->used = true;
+ d = NULL;
+
+ if (t->globals != NULL)
+ {
+ for (d = t->globals; d != NULL; d = d->next)
+ {
+ if ((d->match[0] == '*' && d->match[1] == '\0')
+ || fnmatch (d->match, alc, 0) == 0)
+ break;
+ }
+ }
/* See if there is anything to force this symbol to
local scope. */
- if (t->locals != NULL)
+ if (d == NULL && t->locals != NULL)
{
- int len;
- char *alc;
- struct bfd_elf_version_expr *d;
-
- len = p - h->root.root.string;
- alc = bfd_alloc (sinfo->output_bfd, len);
- if (alc == NULL)
- return false;
- strncpy (alc, h->root.root.string, len - 1);
- alc[len - 1] = '\0';
- if (alc[len - 2] == ELF_VER_CHR)
- alc[len - 2] = '\0';
-
for (d = t->locals; d != NULL; d = d->next)
{
if ((d->match[0] == '*' && d->match[1] == '\0')
@@ -2943,12 +3153,12 @@ elf_link_assign_sym_version (h, data)
{
if (h->dynindx != -1
&& info->shared
- && ! sinfo->export_dynamic
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_NEEDS_PLT) == 0)
+ && ! sinfo->export_dynamic)
{
sinfo->removed_dynamic = true;
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
+ h->elf_link_hash_flags &=~
+ ELF_LINK_HASH_NEEDS_PLT;
h->dynindx = -1;
/* FIXME: The name of the symbol has
already been recorded in the dynamic
@@ -2958,10 +3168,9 @@ elf_link_assign_sym_version (h, data)
break;
}
}
-
- bfd_release (sinfo->output_bfd, alc);
}
+ bfd_release (sinfo->output_bfd, alc);
break;
}
}
@@ -3008,7 +3217,7 @@ elf_link_assign_sym_version (h, data)
/* We could not find the version for a symbol when
generating a shared archive. Return an error. */
(*_bfd_error_handler)
- ("%s: undefined version name %s",
+ ("%s: undefined versioned symbol name %s",
bfd_get_filename (sinfo->output_bfd), h->root.root.string);
bfd_set_error (bfd_error_bad_value);
sinfo->failed = true;
@@ -3028,7 +3237,7 @@ elf_link_assign_sym_version (h, data)
struct bfd_elf_version_expr *d;
/* See if can find what version this symbol is in. If the
- symbol is supposed to eb local, then don't actually register
+ symbol is supposed to be local, then don't actually register
it. */
deflt = NULL;
for (t = sinfo->verdefs; t != NULL; t = t->next)
@@ -3059,12 +3268,11 @@ elf_link_assign_sym_version (h, data)
h->verinfo.vertree = t;
if (h->dynindx != -1
&& info->shared
- && ! sinfo->export_dynamic
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_NEEDS_PLT) == 0)
+ && ! sinfo->export_dynamic)
{
sinfo->removed_dynamic = true;
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
+ h->elf_link_hash_flags &=~ ELF_LINK_HASH_NEEDS_PLT;
h->dynindx = -1;
/* FIXME: The name of the symbol has already
been recorded in the dynamic string table
@@ -3084,11 +3292,11 @@ elf_link_assign_sym_version (h, data)
h->verinfo.vertree = deflt;
if (h->dynindx != -1
&& info->shared
- && ! sinfo->export_dynamic
- && (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) == 0)
+ && ! sinfo->export_dynamic)
{
sinfo->removed_dynamic = true;
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
+ h->elf_link_hash_flags &=~ ELF_LINK_HASH_NEEDS_PLT;
h->dynindx = -1;
/* FIXME: The name of the symbol has already been
recorded in the dynamic string table section. */
@@ -4099,7 +4307,7 @@ elf_link_output_extsym (h, data)
break;
case bfd_link_hash_common:
- input_sec = bfd_com_section_ptr;
+ input_sec = h->root.u.c.p->section;
sym.st_shndx = SHN_COMMON;
sym.st_value = 1 << h->root.u.c.p->alignment_power;
break;
@@ -4127,13 +4335,30 @@ elf_link_output_extsym (h, data)
((struct elf_link_hash_entry *) h->root.u.i.link, data));
}
+ /* Give the processor backend a chance to tweak the symbol value,
+ and also to finish up anything that needs to be done for this
+ symbol. */
+ if ((h->dynindx != -1
+ || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
+ && elf_hash_table (finfo->info)->dynamic_sections_created)
+ {
+ struct elf_backend_data *bed;
+
+ bed = get_elf_backend_data (finfo->output_bfd);
+ if (! ((*bed->elf_backend_finish_dynamic_symbol)
+ (finfo->output_bfd, finfo->info, h, &sym)))
+ {
+ eoinfo->failed = true;
+ return false;
+ }
+ }
+
/* If this symbol should be put in the .dynsym section, then put it
there now. We have already know the symbol index. We also fill
in the entry in the .hash section. */
if (h->dynindx != -1
&& elf_hash_table (finfo->info)->dynamic_sections_created)
{
- struct elf_backend_data *bed;
char *p, *copy;
const char *name;
size_t bucketcount;
@@ -4143,17 +4368,6 @@ elf_link_output_extsym (h, data)
sym.st_name = h->dynstr_index;
- /* Give the processor backend a chance to tweak the symbol
- value, and also to finish up anything that needs to be done
- for this symbol. */
- bed = get_elf_backend_data (finfo->output_bfd);
- if (! ((*bed->elf_backend_finish_dynamic_symbol)
- (finfo->output_bfd, finfo->info, h, &sym)))
- {
- eoinfo->failed = true;
- return false;
- }
-
elf_swap_symbol_out (finfo->output_bfd, &sym,
(PTR) (((Elf_External_Sym *)
finfo->dynsym_sec->contents)
@@ -4517,6 +4731,7 @@ elf_link_input_bfd (finfo, input_bfd)
|| (elf_bad_symtab (input_bfd)
&& finfo->sections[r_symndx] == NULL))
{
+ struct elf_link_hash_entry *rh;
long indx;
/* This is a reloc against a global symbol. We
@@ -4527,13 +4742,18 @@ elf_link_input_bfd (finfo, input_bfd)
for this symbol. The symbol index is then
set at the end of elf_bfd_final_link. */
indx = r_symndx - extsymoff;
- *rel_hash = elf_sym_hashes (input_bfd)[indx];
+ rh = elf_sym_hashes (input_bfd)[indx];
+ while (rh->root.type == bfd_link_hash_indirect
+ || rh->root.type == bfd_link_hash_warning)
+ rh = (struct elf_link_hash_entry *) rh->root.u.i.link;
/* Setting the index to -2 tells
elf_link_output_extsym that this symbol is
used by a reloc. */
- BFD_ASSERT ((*rel_hash)->indx < 0);
- (*rel_hash)->indx = -2;
+ BFD_ASSERT (rh->indx < 0);
+ rh->indx = -2;
+
+ *rel_hash = rh;
continue;
}
@@ -4881,7 +5101,7 @@ elf_create_pointer_linker_section (abfd, info, lsect, h, rel)
/* Allocate a table to hold the local symbols if first time */
if (!ptr)
{
- int num_symbols = elf_tdata (abfd)->symtab_hdr.sh_info;
+ unsigned int num_symbols = elf_tdata (abfd)->symtab_hdr.sh_info;
register unsigned int i;
ptr = (elf_linker_section_pointers_t **)
diff --git a/contrib/binutils/bfd/elfxx-target.h b/contrib/binutils/bfd/elfxx-target.h
index 1b551a7..e4d2b3d 100644
--- a/contrib/binutils/bfd/elfxx-target.h
+++ b/contrib/binutils/bfd/elfxx-target.h
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
There are two such structures here: one for big-endian machines and
one for little-endian machines. */
-#define bfd_elfNN_close_and_cleanup _bfd_generic_close_and_cleanup
+#define bfd_elfNN_close_and_cleanup _bfd_elf_close_and_cleanup
#define bfd_elfNN_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
#ifndef bfd_elfNN_get_section_contents
#define bfd_elfNN_get_section_contents _bfd_generic_get_section_contents
@@ -61,6 +61,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define bfd_elfNN_get_section_contents_in_window \
_bfd_generic_get_section_contents_in_window
+#ifndef elf_backend_got_symbol_offset
+#define elf_backend_got_symbol_offset (bfd_vma) 0
+#endif
#ifndef elf_backend_want_got_plt
#define elf_backend_want_got_plt 0
#endif
@@ -70,6 +73,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef elf_backend_want_plt_sym
#define elf_backend_want_plt_sym 0
#endif
+#ifndef elf_backend_plt_not_loaded
+#define elf_backend_plt_not_loaded 0
+#endif
+#ifndef elf_backend_plt_alignment
+#define elf_backend_plt_alignment 2
+#endif
#define bfd_elfNN_bfd_debug_info_start bfd_void
#define bfd_elfNN_bfd_debug_info_end bfd_void
@@ -309,9 +318,12 @@ static CONST struct elf_backend_data elfNN_bed =
ELF_MACHINE_ALT1,
ELF_MACHINE_ALT2,
&elf_backend_size_info,
+ elf_backend_got_symbol_offset,
elf_backend_want_got_plt,
elf_backend_plt_readonly,
- elf_backend_want_plt_sym
+ elf_backend_want_plt_sym,
+ elf_backend_plt_not_loaded,
+ elf_backend_plt_alignment
};
#ifdef TARGET_BIG_SYM
diff --git a/contrib/binutils/bfd/i386netbsd.c b/contrib/binutils/bfd/i386netbsd.c
index 32feaa7..327b6f9 100644
--- a/contrib/binutils/bfd/i386netbsd.c
+++ b/contrib/binutils/bfd/i386netbsd.c
@@ -1,5 +1,5 @@
/* BFD back-end for NetBSD/386 a.out-ish binaries.
- Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
+ Copyright (C) 1990, 91, 92, 94, 95, 96, 1998 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SEGMENT_SIZE TARGET_PAGE_SIZE
#define DEFAULT_ARCH bfd_arch_i386
-#define MACHTYPE_OK(mtype) ((mtype) == M_386_NETBSD || (mtype) == M_UNKNOWN)
+#define DEFAULT_MID M_386_NETBSD
#define MY(OP) CAT(i386netbsd_,OP)
/* This needs to start with a.out so GDB knows it is an a.out variant. */
diff --git a/contrib/binutils/bfd/ieee.c b/contrib/binutils/bfd/ieee.c
index b559208..ab09140 100644
--- a/contrib/binutils/bfd/ieee.c
+++ b/contrib/binutils/bfd/ieee.c
@@ -1,5 +1,5 @@
/* BFD back-end for ieee-695 objects.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
@@ -1646,10 +1646,8 @@ do_one (ieee, current_map, location_ptr, s, iterations)
s->flags |= SEC_RELOC;
s->owner->flags |= HAS_RELOC;
s->reloc_count++;
- if (r->relent.sym_ptr_ptr == 0)
- {
- r->relent.sym_ptr_ptr = section->symbol_ptr_ptr;
- }
+ if (r->relent.sym_ptr_ptr == NULL && section != NULL)
+ r->relent.sym_ptr_ptr = section->symbol_ptr_ptr;
if (this_byte (&(ieee->h)) == (int) ieee_comma)
{
@@ -1987,8 +1985,9 @@ ieee_canonicalize_reloc (abfd, section, relptr, symbols)
symbols + src->symbol.index + ieee->external_reference_base_offset;
break;
case 0:
- src->relent.sym_ptr_ptr =
- src->relent.sym_ptr_ptr[0]->section->symbol_ptr_ptr;
+ if (src->relent.sym_ptr_ptr != NULL)
+ src->relent.sym_ptr_ptr =
+ src->relent.sym_ptr_ptr[0]->section->symbol_ptr_ptr;
break;
default:
@@ -3642,9 +3641,11 @@ ieee_generic_stat_arch_elt (abfd, buf)
bfd *abfd;
struct stat *buf;
{
- ieee_ar_data_type *ar = abfd->my_archive->tdata.ieee_ar_data;
+ ieee_ar_data_type *ar = (ieee_ar_data_type *) NULL;
ieee_data_type *ieee;
+ if (abfd->my_archive != NULL)
+ ar = abfd->my_archive->tdata.ieee_ar_data;
if (ar == (ieee_ar_data_type *) NULL)
{
bfd_set_error (bfd_error_invalid_operation);
diff --git a/contrib/binutils/bfd/ihex.c b/contrib/binutils/bfd/ihex.c
index c70cfe0..e4b098e 100644
--- a/contrib/binutils/bfd/ihex.c
+++ b/contrib/binutils/bfd/ihex.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel Hex objects.
- Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Written by Ian Lance Taylor of Cygnus Support <ian@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -270,6 +270,7 @@ ihex_scan (abfd)
bfd *abfd;
{
bfd_vma segbase;
+ bfd_vma extbase;
asection *sec;
int lineno;
boolean error;
@@ -283,6 +284,7 @@ ihex_scan (abfd)
abfd->start_address = 0;
segbase = 0;
+ extbase = 0;
sec = NULL;
lineno = 1;
error = false;
@@ -376,7 +378,7 @@ ihex_scan (abfd)
case 0:
/* This is a data record. */
if (sec != NULL
- && sec->vma + sec->_raw_size == segbase + addr)
+ && sec->vma + sec->_raw_size == extbase + segbase + addr)
{
/* This data goes at the end of the section we are
currently building. */
@@ -396,8 +398,8 @@ ihex_scan (abfd)
if (sec == NULL)
goto error_return;
sec->flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC;
- sec->vma = segbase + addr;
- sec->lma = segbase + addr;
+ sec->vma = extbase + segbase + addr;
+ sec->lma = extbase + segbase + addr;
sec->_raw_size = len;
sec->filepos = pos;
}
@@ -456,7 +458,7 @@ ihex_scan (abfd)
goto error_return;
}
- segbase = HEX4 (buf) << 16;
+ extbase = HEX4 (buf) << 16;
sec = NULL;
@@ -791,9 +793,11 @@ ihex_write_object_contents (abfd)
bfd *abfd;
{
bfd_vma segbase;
+ bfd_vma extbase;
struct ihex_data_list *l;
segbase = 0;
+ extbase = 0;
for (l = abfd->tdata.ihex_data->head; l != NULL; l = l->next)
{
bfd_vma where;
@@ -811,13 +815,16 @@ ihex_write_object_contents (abfd)
if (now > CHUNK)
now = CHUNK;
- if (where > segbase + 0xffff)
+ if (where > segbase + extbase + 0xffff)
{
bfd_byte addr[2];
/* We need a new base address. */
if (where <= 0xfffff)
{
+ /* The addresses should be sorted. */
+ BFD_ASSERT (extbase == 0);
+
segbase = where & 0xf0000;
addr[0] = (bfd_byte)(segbase >> 12) & 0xff;
addr[1] = (bfd_byte)(segbase >> 4) & 0xff;
@@ -826,8 +833,23 @@ ihex_write_object_contents (abfd)
}
else
{
- segbase = where & 0xffff0000;
- if (where > segbase + 0xffff)
+ /* The extended address record and the extended
+ linear address record are combined, at least by
+ some readers. We need an extended linear address
+ record here, so if we've already written out an
+ extended address record, zero it out to avoid
+ confusion. */
+ if (segbase != 0)
+ {
+ addr[0] = 0;
+ addr[1] = 0;
+ if (! ihex_write_record (abfd, 2, 0, 2, addr))
+ return false;
+ segbase = 0;
+ }
+
+ extbase = where & 0xffff0000;
+ if (where > extbase + 0xffff)
{
char buf[20];
@@ -838,14 +860,15 @@ ihex_write_object_contents (abfd)
bfd_set_error (bfd_error_bad_value);
return false;
}
- addr[0] = (bfd_byte)(segbase >> 24) & 0xff;
- addr[1] = (bfd_byte)(segbase >> 16) & 0xff;
+ addr[0] = (bfd_byte)(extbase >> 24) & 0xff;
+ addr[1] = (bfd_byte)(extbase >> 16) & 0xff;
if (! ihex_write_record (abfd, 2, 0, 4, addr))
return false;
}
}
- if (! ihex_write_record (abfd, now, where - segbase, 0, p))
+ if (! ihex_write_record (abfd, now, where - (extbase + segbase),
+ 0, p))
return false;
where += now;
diff --git a/contrib/binutils/bfd/libaout.h b/contrib/binutils/bfd/libaout.h
index 09c45d5..3e6a56a 100644
--- a/contrib/binutils/bfd/libaout.h
+++ b/contrib/binutils/bfd/libaout.h
@@ -1,5 +1,6 @@
/* BFD back-end data structures for a.out (and similar) files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -228,6 +229,9 @@ enum machine_type {
M_68K4K_NETBSD = 136, /* NetBSD/m68k4k binary */
M_532_NETBSD = 137, /* NetBSD/ns32k binary */
M_SPARC_NETBSD = 138, /* NetBSD/sparc binary */
+ M_PMAX_NETBSD = 139, /* NetBSD/pmax (MIPS little-endian) binary */
+ M_VAX_NETBSD = 140, /* NetBSD/vax binary */
+ M_ALPHA_NETBSD = 141, /* NetBSD/alpha binary */
M_SPARCLET_1 = 147, /* 0x93, reserved */
M_MIPS1 = 151, /* MIPS R2000/R3000 binary */
M_MIPS2 = 152, /* MIPS R4000/R6000 binary */
diff --git a/contrib/binutils/bfd/libbfd-in.h b/contrib/binutils/bfd/libbfd-in.h
index 8e332dd..30911b2 100644
--- a/contrib/binutils/bfd/libbfd-in.h
+++ b/contrib/binutils/bfd/libbfd-in.h
@@ -1,6 +1,6 @@
/* libbfd.h -- Declarations used by bfd library *implementation*.
(This include file is not for users of the library.)
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Written by Cygnus Support.
** NOTE: libbfd.h is a GENERATED file. Don't change it; instead,
@@ -24,9 +24,13 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Align an address upward to a boundary, expressed as a number of bytes.
- E.g. align to an 8-byte boundary with argument of 8. */
-#define BFD_ALIGN(this, boundary) \
- ((( (this) + ((boundary) -1)) & (~((boundary)-1))))
+ E.g. align to an 8-byte boundary with argument of 8. Take care never
+ to wrap around if the address is within boundary-1 of the end of the
+ address space. */
+#define BFD_ALIGN(this, boundary) \
+ ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
+ ? (((bfd_vma) (this) + ((boundary) - 1)) & (~((boundary)-1))) \
+ : ~ (bfd_vma) 0)
/* If you want to read and write large blocks, you might want to do it
in quanta of this amount */
@@ -348,6 +352,11 @@ extern boolean _bfd_stab_section_find_nearest_line
PARAMS ((bfd *, asymbol **, asection *, bfd_vma, boolean *, const char **,
const char **, unsigned int *, PTR *));
+/* Find the nearest line using DWARF 2 debugging information. */
+extern boolean _bfd_dwarf2_find_nearest_line
+ PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
+ const char **, unsigned int *));
+
/* A routine to create entries for a bfd_link_hash_table. */
extern struct bfd_hash_entry *_bfd_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *entry,
diff --git a/contrib/binutils/bfd/libbfd.c b/contrib/binutils/bfd/libbfd.c
index 5c18a48..042bdee 100644
--- a/contrib/binutils/bfd/libbfd.c
+++ b/contrib/binutils/bfd/libbfd.c
@@ -1,5 +1,6 @@
/* Assorted BFD support routines, only used internally.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -687,9 +688,20 @@ bfd_seek (abfd, position, direction)
if (result != 0)
{
+ int hold_errno = errno;
+
/* Force redetermination of `where' field. */
bfd_tell (abfd);
- bfd_set_error (bfd_error_system_call);
+
+ /* An EINVAL error probably means that the file offset was
+ absurd. */
+ if (hold_errno == EINVAL)
+ bfd_set_error (bfd_error_file_truncated);
+ else
+ {
+ bfd_set_error (bfd_error_system_call);
+ errno = hold_errno;
+ }
}
else
{
diff --git a/contrib/binutils/bfd/libbfd.h b/contrib/binutils/bfd/libbfd.h
index 815dcfb..296bf41 100644
--- a/contrib/binutils/bfd/libbfd.h
+++ b/contrib/binutils/bfd/libbfd.h
@@ -1,6 +1,6 @@
/* libbfd.h -- Declarations used by bfd library *implementation*.
(This include file is not for users of the library.)
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Written by Cygnus Support.
** NOTE: libbfd.h is a GENERATED file. Don't change it; instead,
@@ -24,9 +24,13 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Align an address upward to a boundary, expressed as a number of bytes.
- E.g. align to an 8-byte boundary with argument of 8. */
-#define BFD_ALIGN(this, boundary) \
- ((( (this) + ((boundary) -1)) & (~((boundary)-1))))
+ E.g. align to an 8-byte boundary with argument of 8. Take care never
+ to wrap around if the address is within boundary-1 of the end of the
+ address space. */
+#define BFD_ALIGN(this, boundary) \
+ ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
+ ? (((bfd_vma) (this) + ((boundary) - 1)) & (~((boundary)-1))) \
+ : ~ (bfd_vma) 0)
/* If you want to read and write large blocks, you might want to do it
in quanta of this amount */
@@ -348,6 +352,11 @@ extern boolean _bfd_stab_section_find_nearest_line
PARAMS ((bfd *, asymbol **, asection *, bfd_vma, boolean *, const char **,
const char **, unsigned int *, PTR *));
+/* Find the nearest line using DWARF 2 debugging information. */
+extern boolean _bfd_dwarf2_find_nearest_line
+ PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
+ const char **, unsigned int *));
+
/* A routine to create entries for a bfd_link_hash_table. */
extern struct bfd_hash_entry *_bfd_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *entry,
@@ -626,10 +635,16 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_SPARC_PC_LM22",
"BFD_RELOC_SPARC_WDISP16",
"BFD_RELOC_SPARC_WDISP19",
- "BFD_RELOC_SPARC_GLOB_JMP",
"BFD_RELOC_SPARC_7",
"BFD_RELOC_SPARC_6",
"BFD_RELOC_SPARC_5",
+ "BFD_RELOC_SPARC_PLT64",
+ "BFD_RELOC_SPARC_HIX22",
+ "BFD_RELOC_SPARC_LOX10",
+ "BFD_RELOC_SPARC_H44",
+ "BFD_RELOC_SPARC_M44",
+ "BFD_RELOC_SPARC_L44",
+ "BFD_RELOC_SPARC_REGISTER",
"BFD_RELOC_ALPHA_GPDISP_HI16",
"BFD_RELOC_ALPHA_GPDISP_LO16",
"BFD_RELOC_ALPHA_GPDISP",
@@ -654,6 +669,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MIPS_GOT_LO16",
"BFD_RELOC_MIPS_CALL_HI16",
"BFD_RELOC_MIPS_CALL_LO16",
+
"BFD_RELOC_386_GOT32",
"BFD_RELOC_386_PLT32",
"BFD_RELOC_386_COPY",
@@ -740,7 +756,11 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_SH_CODE",
"BFD_RELOC_SH_DATA",
"BFD_RELOC_SH_LABEL",
-
+ "BFD_RELOC_THUMB_PCREL_BRANCH9",
+ "BFD_RELOC_THUMB_PCREL_BRANCH12",
+ "BFD_RELOC_THUMB_PCREL_BRANCH23",
+ "BFD_RELOC_ARC_B22_PCREL",
+ "BFD_RELOC_ARC_B26",
"BFD_RELOC_D10V_10_PCREL_R",
"BFD_RELOC_D10V_10_PCREL_L",
"BFD_RELOC_D10V_18",
@@ -755,9 +775,20 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_M32R_HI16_SLO",
"BFD_RELOC_M32R_LO16",
"BFD_RELOC_M32R_SDA16",
+ "BFD_RELOC_V850_9_PCREL",
+ "BFD_RELOC_V850_22_PCREL",
+ "BFD_RELOC_V850_SDA_16_16_OFFSET",
+ "BFD_RELOC_V850_SDA_15_16_OFFSET",
+ "BFD_RELOC_V850_ZDA_16_16_OFFSET",
+ "BFD_RELOC_V850_ZDA_15_16_OFFSET",
+ "BFD_RELOC_V850_TDA_6_8_OFFSET",
+ "BFD_RELOC_V850_TDA_7_8_OFFSET",
+ "BFD_RELOC_V850_TDA_7_7_OFFSET",
+ "BFD_RELOC_V850_TDA_16_16_OFFSET",
"BFD_RELOC_MN10300_32_PCREL",
"BFD_RELOC_MN10300_16_PCREL",
+ "BFD_RELOC_TIC30_LDP",
"@@overflow: BFD_RELOC_UNUSED@@",
};
#endif
diff --git a/contrib/binutils/bfd/libcoff-in.h b/contrib/binutils/bfd/libcoff-in.h
index 7cd047e..0dc2121 100644
--- a/contrib/binutils/bfd/libcoff-in.h
+++ b/contrib/binutils/bfd/libcoff-in.h
@@ -1,5 +1,5 @@
/* BFD COFF object file private structure.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -96,6 +96,11 @@ typedef struct coff_tdata
/* Used by coff_find_nearest_line. */
PTR line_info;
+
+ /* Copy of some of the f_flags bits in the COFF filehdr structure,
+ used by ARM code. */
+ flagword flags;
+
} coff_data_type;
/* Tdata for pe image files. */
@@ -417,6 +422,10 @@ struct coff_final_link_info
bfd *output_bfd;
/* Used to indicate failure in traversal routine. */
boolean failed;
+ /* If doing "task linking" set only during the time when we want the
+ global symbol writer to convert the storage class of defined global
+ symbols from global to static. */
+ boolean global_to_static;
/* Hash table for long symbol names. */
struct bfd_strtab_hash *strtab;
/* When doing a relocateable link, an array of information kept for
@@ -479,6 +488,8 @@ extern struct bfd_hash_entry *_bfd_coff_debug_merge_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
extern boolean _bfd_coff_write_global_sym
PARAMS ((struct coff_link_hash_entry *, PTR));
+extern boolean _bfd_coff_write_task_globals
+ PARAMS ((struct coff_link_hash_entry *, PTR));
extern boolean _bfd_coff_link_input_bfd
PARAMS ((struct coff_final_link_info *, bfd *));
extern boolean _bfd_coff_reloc_link_order
diff --git a/contrib/binutils/bfd/libcoff.h b/contrib/binutils/bfd/libcoff.h
index d525cfd..4d83bd4 100644
--- a/contrib/binutils/bfd/libcoff.h
+++ b/contrib/binutils/bfd/libcoff.h
@@ -1,5 +1,5 @@
/* BFD COFF object file private structure.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -96,6 +96,11 @@ typedef struct coff_tdata
/* Used by coff_find_nearest_line. */
PTR line_info;
+
+ /* Copy of some of the f_flags bits in the COFF filehdr structure,
+ used by ARM code. */
+ flagword flags;
+
} coff_data_type;
/* Tdata for pe image files. */
@@ -417,6 +422,10 @@ struct coff_final_link_info
bfd *output_bfd;
/* Used to indicate failure in traversal routine. */
boolean failed;
+ /* If doing "task linking" set only during the time when we want the
+ global symbol writer to convert the storage class of defined global
+ symbols from global to static. */
+ boolean global_to_static;
/* Hash table for long symbol names. */
struct bfd_strtab_hash *strtab;
/* When doing a relocateable link, an array of information kept for
@@ -479,6 +488,8 @@ extern struct bfd_hash_entry *_bfd_coff_debug_merge_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
extern boolean _bfd_coff_write_global_sym
PARAMS ((struct coff_link_hash_entry *, PTR));
+extern boolean _bfd_coff_write_task_globals
+ PARAMS ((struct coff_link_hash_entry *, PTR));
extern boolean _bfd_coff_link_input_bfd
PARAMS ((struct coff_final_link_info *, bfd *));
extern boolean _bfd_coff_reloc_link_order
@@ -592,43 +603,43 @@ typedef struct
PTR in));
unsigned int (*_bfd_coff_swap_aux_out) PARAMS ((
- bfd *abfd,
- PTR in,
- int type,
- int class,
+ bfd *abfd,
+ PTR in,
+ int type,
+ int class,
int indaux,
int numaux,
- PTR ext));
+ PTR ext));
unsigned int (*_bfd_coff_swap_sym_out) PARAMS ((
bfd *abfd,
- PTR in,
- PTR ext));
+ PTR in,
+ PTR ext));
unsigned int (*_bfd_coff_swap_lineno_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR ext));
+ bfd *abfd,
+ PTR in,
+ PTR ext));
unsigned int (*_bfd_coff_swap_reloc_out) PARAMS ((
- bfd *abfd,
- PTR src,
- PTR dst));
+ bfd *abfd,
+ PTR src,
+ PTR dst));
unsigned int (*_bfd_coff_swap_filehdr_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR out));
+ bfd *abfd,
+ PTR in,
+ PTR out));
unsigned int (*_bfd_coff_swap_aouthdr_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR out));
+ bfd *abfd,
+ PTR in,
+ PTR out));
unsigned int (*_bfd_coff_swap_scnhdr_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR out));
+ bfd *abfd,
+ PTR in,
+ PTR out));
unsigned int _bfd_filhsz;
unsigned int _bfd_aoutsz;
@@ -749,6 +760,12 @@ typedef struct
boolean collect,
struct bfd_link_hash_entry **hashp));
+ boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
+ bfd * abfd ));
+ boolean (*_bfd_coff_final_link_postscript) PARAMS ((
+ bfd * abfd,
+ struct coff_final_link_info * pfinfo));
+
} bfd_coff_backend_data;
#define coff_backend_info(abfd) ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
@@ -794,7 +811,7 @@ typedef struct
#define bfd_coff_long_section_names(abfd) \
(coff_backend_info (abfd)->_bfd_coff_long_section_names)
#define bfd_coff_default_section_alignment_power(abfd) \
- (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
+ (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
#define bfd_coff_swap_filehdr_in(abfd, i,o) \
((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
@@ -863,3 +880,8 @@ typedef struct
((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
(info, abfd, name, flags, section, value, string, cp, coll, hashp))
+#define bfd_coff_link_output_has_begun(a) \
+ ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a))
+#define bfd_coff_final_link_postscript(a,p) \
+ ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
+
diff --git a/contrib/binutils/bfd/linker.c b/contrib/binutils/bfd/linker.c
index d508bb2..1c3c9a2 100644
--- a/contrib/binutils/bfd/linker.c
+++ b/contrib/binutils/bfd/linker.c
@@ -1319,14 +1319,14 @@ generic_link_add_symbol_list (abfd, info, symbol_count, symbols, collect)
if (bfd_is_com_section (bfd_get_section (p)))
p->flags |= BSF_OLD_COMMON;
}
-
- /* Store a back pointer from the symbol to the hash
- table entry for the benefit of relaxation code until
- it gets rewritten to not use asymbol structures.
- Setting this is also used to check whether these
- symbols were set up by the generic linker. */
- p->udata.p = (PTR) h;
}
+
+ /* Store a back pointer from the symbol to the hash
+ table entry for the benefit of relaxation code until
+ it gets rewritten to not use asymbol structures.
+ Setting this is also used to check whether these
+ symbols were set up by the generic linker. */
+ p->udata.p = (PTR) h;
}
}
@@ -1394,7 +1394,7 @@ static const enum link_action link_action[8][8] =
/* UNDEFW_ROW */ {WEAK, NOACT, NOACT, REF, REF, NOACT, REFC, WARNC },
/* DEF_ROW */ {DEF, DEF, DEF, MDEF, DEF, CDEF, MDEF, CYCLE },
/* DEFW_ROW */ {DEFW, DEFW, DEFW, NOACT, NOACT, NOACT, NOACT, CYCLE },
- /* COMMON_ROW */ {COM, COM, COM, CREF, CREF, BIG, CREF, WARNC },
+ /* COMMON_ROW */ {COM, COM, COM, CREF, CREF, BIG, REFC, WARNC },
/* INDR_ROW */ {IND, IND, IND, MDEF, IND, CIND, MIND, CYCLE },
/* WARN_ROW */ {MWARN, WARN, WARN, CWARN, CWARN, WARN, CWARN, MWARN },
/* SET_ROW */ {SET, SET, SET, SET, SET, SET, CYCLE, CYCLE }
diff --git a/contrib/binutils/bfd/netbsd-core.c b/contrib/binutils/bfd/netbsd-core.c
index 40500e8..41fab99 100644
--- a/contrib/binutils/bfd/netbsd-core.c
+++ b/contrib/binutils/bfd/netbsd-core.c
@@ -1,5 +1,5 @@
/* BFD back end for NetBSD style core files
- Copyright 1988, 1989, 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
+ Copyright 1988, 89, 91, 92, 93, 96, 1998 Free Software Foundation, Inc.
Written by Paul Kranenburg, EUR
This file is part of BFD, the Binary File Descriptor library.
@@ -41,10 +41,10 @@ struct netbsd_core_struct {
/* forward declarations */
-static const bfd_target * netbsd_core_core_file_p PARAMS ((bfd *abfd));
-static char * netbsd_core_core_file_failing_command PARAMS ((bfd *abfd));
-static int netbsd_core_core_file_failing_signal PARAMS ((bfd *abfd));
-static boolean netbsd_core_core_file_matches_executable_p
+static const bfd_target * netbsd_core_file_p PARAMS ((bfd *abfd));
+static char * netbsd_core_file_failing_command PARAMS ((bfd *abfd));
+static int netbsd_core_file_failing_signal PARAMS ((bfd *abfd));
+static boolean netbsd_core_file_matches_executable_p
PARAMS ((bfd *core_bfd, bfd *exec_bfd));
static void swap_abort PARAMS ((void));
@@ -52,7 +52,7 @@ static void swap_abort PARAMS ((void));
/* ARGSUSED */
static const bfd_target *
-netbsd_core_core_file_p (abfd)
+netbsd_core_file_p (abfd)
bfd *abfd;
{
@@ -104,6 +104,7 @@ netbsd_core_core_file_p (abfd)
asect = (asection *) bfd_zalloc (abfd, sizeof(asection));
if (asect == NULL) {
bfd_set_error(bfd_error_no_memory);
+ goto punt;
}
asect->_raw_size = coreseg.c_size;
@@ -169,7 +170,7 @@ punt: {
}
static char*
-netbsd_core_core_file_failing_command (abfd)
+netbsd_core_file_failing_command (abfd)
bfd *abfd;
{
/*return core_command (abfd);*/
@@ -178,7 +179,7 @@ netbsd_core_core_file_failing_command (abfd)
/* ARGSUSED */
static int
-netbsd_core_core_file_failing_signal (abfd)
+netbsd_core_file_failing_signal (abfd)
bfd *abfd;
{
/*return core_signal (abfd);*/
@@ -187,69 +188,12 @@ netbsd_core_core_file_failing_signal (abfd)
/* ARGSUSED */
static boolean
-netbsd_core_core_file_matches_executable_p (core_bfd, exec_bfd)
+netbsd_core_file_matches_executable_p (core_bfd, exec_bfd)
bfd *core_bfd, *exec_bfd;
{
- return true; /* FIXME, We have no way of telling at this point */
+ return true; /* FIXME, We have no way of telling at this point */
}
-/* No archive file support via this BFD */
-#define netbsd_openr_next_archived_file bfd_generic_openr_next_archived_file
-#define netbsd_generic_stat_arch_elt bfd_generic_stat_arch_elt
-#define netbsd_slurp_armap bfd_false
-#define netbsd_slurp_extended_name_table bfd_true
-#define netbsd_write_armap (boolean (*) PARAMS \
- ((bfd *arch, unsigned int elength, struct orl *map, \
- unsigned int orl_count, int stridx))) bfd_false
-#define netbsd_truncate_arname bfd_dont_truncate_arname
-#define aout_32_openr_next_archived_file bfd_generic_openr_next_archived_file
-
-#define netbsd_close_and_cleanup bfd_generic_close_and_cleanup
-#define netbsd_set_section_contents (boolean (*) PARAMS \
- ((bfd *abfd, asection *section, PTR data, file_ptr offset, \
- bfd_size_type count))) bfd_false
-#define netbsd_get_section_contents bfd_generic_get_section_contents
-#define netbsd_new_section_hook (boolean (*) PARAMS \
- ((bfd *, sec_ptr))) bfd_true
-#define netbsd_get_symtab_upper_bound bfd_0u
-#define netbsd_get_symtab (unsigned int (*) PARAMS \
- ((bfd *, struct symbol_cache_entry **))) bfd_0u
-#define netbsd_get_reloc_upper_bound (unsigned int (*) PARAMS \
- ((bfd *, sec_ptr))) bfd_0u
-#define netbsd_canonicalize_reloc (unsigned int (*) PARAMS \
- ((bfd *, sec_ptr, arelent **, struct symbol_cache_entry**))) bfd_0u
-#define netbsd_make_empty_symbol (struct symbol_cache_entry * \
- (*) PARAMS ((bfd *))) bfd_false
-#define netbsd_print_symbol (void (*) PARAMS \
- ((bfd *, PTR, struct symbol_cache_entry *, \
- bfd_print_symbol_type))) bfd_false
-#define netbsd_get_symbol_info (void (*) PARAMS \
- ((bfd *, struct symbol_cache_entry *, \
- symbol_info *))) bfd_false
-#define netbsd_get_lineno (alent * (*) PARAMS \
- ((bfd *, struct symbol_cache_entry *))) bfd_nullvoidptr
-#define netbsd_set_arch_mach (boolean (*) PARAMS \
- ((bfd *, enum bfd_architecture, unsigned long))) bfd_false
-#define netbsd_find_nearest_line (boolean (*) PARAMS \
- ((bfd *abfd, struct sec *section, \
- struct symbol_cache_entry **symbols,bfd_vma offset, \
- CONST char **file, CONST char **func, unsigned int *line))) bfd_false
-#define netbsd_sizeof_headers (int (*) PARAMS \
- ((bfd *, boolean))) bfd_0
-
-#define netbsd_bfd_debug_info_start bfd_void
-#define netbsd_bfd_debug_info_end bfd_void
-#define netbsd_bfd_debug_info_accumulate (void (*) PARAMS \
- ((bfd *, struct sec *))) bfd_void
-#define netbsd_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
-#define netbsd_bfd_relax_section bfd_generic_relax_section
-#define netbsd_bfd_seclet_link \
- ((boolean (*) PARAMS ((bfd *, PTR, boolean))) bfd_false)
-#define netbsd_bfd_reloc_type_lookup \
- ((CONST struct reloc_howto_struct *(*) PARAMS ((bfd *, bfd_reloc_code_real_type))) bfd_nullvoidptr)
-#define netbsd_bfd_make_debug_symbol \
- ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
-
/* If somebody calls any byte-swapping routines, shoot them. */
static void
swap_abort()
@@ -259,17 +203,17 @@ swap_abort()
#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort )
#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort )
#define NO_SIGNED_GET \
- ((bfd_signed_vma (*) PARAMS (( const bfd_byte *))) swap_abort )
+ ((bfd_signed_vma (*) PARAMS ((const bfd_byte *))) swap_abort )
const bfd_target netbsd_core_vec =
{
"netbsd-core",
bfd_target_unknown_flavour,
- true, /* target byte order */
- true, /* target headers byte order */
+ BFD_ENDIAN_UNKNOWN, /* target byte order */
+ BFD_ENDIAN_UNKNOWN, /* target headers byte order */
(HAS_RELOC | EXEC_P | /* object flags */
HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
0, /* symbol prefix */
' ', /* ar_pad_char */
@@ -285,7 +229,7 @@ const bfd_target netbsd_core_vec =
_bfd_dummy_target, /* unknown format */
_bfd_dummy_target, /* object file */
_bfd_dummy_target, /* archive */
- netbsd_core_core_file_p /* a core file */
+ netbsd_core_file_p /* a core file */
},
{ /* bfd_set_format */
bfd_false, bfd_false,
@@ -298,7 +242,7 @@ const bfd_target netbsd_core_vec =
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
- BFD_JUMP_TABLE_CORE (netbsd_core),
+ BFD_JUMP_TABLE_CORE (netbsd),
BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
diff --git a/contrib/binutils/bfd/netbsd.h b/contrib/binutils/bfd/netbsd.h
index ad3ec9c..ba0ce5a 100644
--- a/contrib/binutils/bfd/netbsd.h
+++ b/contrib/binutils/bfd/netbsd.h
@@ -1,5 +1,6 @@
/* BFD back-end definitions used by all NetBSD targets.
- Copyright (C) 1990, 91, 92, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1990, 91, 92, 94, 95, 96, 97 1998
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,8 +16,13 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+USA. */
+
+/* Check for our machine type (part of magic number). */
+#ifndef MACHTYPE_OK
+#define MACHTYPE_OK(m) ((m) == DEFAULT_MID || (m) == M_UNKNOWN)
+#endif
/* This is the normal load address for executables. */
#define TEXT_START_ADDR TARGET_PAGE_SIZE
@@ -93,20 +99,8 @@ MY(write_object_contents) (abfd)
/* Magic number, maestro, please! */
switch (bfd_get_arch(abfd)) {
- case bfd_arch_m68k:
- if (strcmp (abfd->xvec->name, "a.out-m68k4k-netbsd") == 0)
- N_SET_MACHTYPE(*execp, M_68K4K_NETBSD);
- else
- N_SET_MACHTYPE(*execp, M_68K_NETBSD);
- break;
- case bfd_arch_sparc:
- N_SET_MACHTYPE(*execp, M_SPARC_NETBSD);
- break;
- case bfd_arch_i386:
- N_SET_MACHTYPE(*execp, M_386_NETBSD);
- break;
- case bfd_arch_ns32k:
- N_SET_MACHTYPE(*execp, M_532_NETBSD);
+ case DEFAULT_ARCH:
+ N_SET_MACHTYPE(*execp, DEFAULT_MID);
break;
default:
N_SET_MACHTYPE(*execp, M_UNKNOWN);
diff --git a/contrib/binutils/bfd/opncls.c b/contrib/binutils/bfd/opncls.c
index 142a32a..c58173c 100644
--- a/contrib/binutils/bfd/opncls.c
+++ b/contrib/binutils/bfd/opncls.c
@@ -220,16 +220,17 @@ bfd_fdopenr (filename, target, fd)
return NULL;
}
-#if defined(VMS) || defined(__GO32__)
- nbfd->iostream = (PTR)fopen(filename, FOPEN_RB);
+#ifndef HAVE_FDOPEN
+ nbfd->iostream = (PTR) fopen (filename, FOPEN_RB);
#else
/* (O_ACCMODE) parens are to avoid Ultrix header file bug */
- switch (fdflags & (O_ACCMODE)) {
- case O_RDONLY: nbfd->iostream = (PTR) fdopen (fd, FOPEN_RB); break;
- case O_WRONLY: nbfd->iostream = (PTR) fdopen (fd, FOPEN_RUB); break;
- case O_RDWR: nbfd->iostream = (PTR) fdopen (fd, FOPEN_RUB); break;
- default: abort ();
- }
+ switch (fdflags & (O_ACCMODE))
+ {
+ case O_RDONLY: nbfd->iostream = (PTR) fdopen (fd, FOPEN_RB); break;
+ case O_WRONLY: nbfd->iostream = (PTR) fdopen (fd, FOPEN_RUB); break;
+ case O_RDWR: nbfd->iostream = (PTR) fdopen (fd, FOPEN_RUB); break;
+ default: abort ();
+ }
#endif
if (nbfd->iostream == NULL)
diff --git a/contrib/binutils/bfd/reloc.c b/contrib/binutils/bfd/reloc.c
index c2a94ed..dda7624 100644
--- a/contrib/binutils/bfd/reloc.c
+++ b/contrib/binutils/bfd/reloc.c
@@ -1,5 +1,5 @@
/* BFD support for handling relocation entries.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -411,14 +411,14 @@ FUNCTION
bfd_get_reloc_size
SYNOPSIS
- int bfd_get_reloc_size (reloc_howto_type *);
+ unsigned int bfd_get_reloc_size (reloc_howto_type *);
DESCRIPTION
For a reloc_howto_type that operates on a fixed number of bytes,
this returns the number of bytes operated on.
*/
-int
+unsigned int
bfd_get_reloc_size (howto)
reloc_howto_type *howto;
{
@@ -451,6 +451,110 @@ DESCRIPTION
*/
+/*
+FUNCTION
+ bfd_check_overflow
+
+SYNOPSIS
+ bfd_reloc_status_type
+ bfd_check_overflow
+ (enum complain_overflow how,
+ unsigned int bitsize,
+ unsigned int rightshift,
+ bfd_vma relocation);
+
+DESCRIPTION
+ Perform overflow checking on @var{relocation} which has @var{bitsize}
+ significant bits and will be shifted right by @var{rightshift} bits.
+ The result is either of @code{bfd_reloc_ok} or
+ @code{bfd_reloc_overflow}.
+
+*/
+
+bfd_reloc_status_type
+bfd_check_overflow (how, bitsize, rightshift, relocation)
+ enum complain_overflow how;
+ unsigned int bitsize, rightshift;
+ bfd_vma relocation;
+{
+ bfd_vma check;
+ bfd_reloc_status_type flag = bfd_reloc_ok;
+
+ /* Get the value that will be used for the relocation, but
+ starting at bit position zero. */
+ check = relocation >> rightshift;
+
+ switch (how)
+ {
+ case complain_overflow_dont:
+ break;
+
+ case complain_overflow_signed:
+ {
+ /* Assumes two's complement. */
+ bfd_signed_vma reloc_signed_max = (1 << (bitsize - 1)) - 1;
+ bfd_signed_vma reloc_signed_min = ~reloc_signed_max;
+
+ /* The above right shift is incorrect for a signed value.
+ Fix it up by forcing on the upper bits. */
+ if (rightshift > 0
+ && (bfd_signed_vma) relocation < 0)
+ check |= ((bfd_vma) - 1
+ & ~((bfd_vma) - 1
+ >> rightshift));
+ if ((bfd_signed_vma) check > reloc_signed_max
+ || (bfd_signed_vma) check < reloc_signed_min)
+ flag = bfd_reloc_overflow;
+ }
+ break;
+
+ case complain_overflow_unsigned:
+ {
+ /* Assumes two's complement. This expression avoids
+ overflow if `bitsize' is the number of bits in
+ bfd_vma. */
+ bfd_vma reloc_unsigned_max = (((1 << (bitsize - 1)) - 1) << 1) | 1;
+
+ if ((bfd_vma) check > reloc_unsigned_max)
+ flag = bfd_reloc_overflow;
+ }
+ break;
+
+ case complain_overflow_bitfield:
+ {
+ /* Assumes two's complement. This expression avoids
+ overflow if `bitsize' is the number of bits in
+ bfd_vma. */
+ bfd_vma reloc_bits = (((1 << (bitsize - 1)) - 1) << 1) | 1;
+
+ if (((bfd_vma) check & ~reloc_bits) != 0
+ && ((bfd_vma) check & ~reloc_bits) != (-1 & ~reloc_bits))
+ {
+ /* The above right shift is incorrect for a signed
+ value. See if turning on the upper bits fixes the
+ overflow. */
+ if (rightshift > 0
+ && (bfd_signed_vma) relocation < 0)
+ {
+ check |= ((bfd_vma) - 1
+ & ~((bfd_vma) - 1
+ >> rightshift));
+ if (((bfd_vma) check & ~reloc_bits) != (-1 & ~reloc_bits))
+ flag = bfd_reloc_overflow;
+ }
+ else
+ flag = bfd_reloc_overflow;
+ }
+ }
+ break;
+
+ default:
+ abort ();
+ }
+
+ return flag;
+}
+
/*
FUNCTION
@@ -721,75 +825,8 @@ space consuming. For each target:
adding in the value contained in the object file. */
if (howto->complain_on_overflow != complain_overflow_dont
&& flag == bfd_reloc_ok)
- {
- bfd_vma check;
-
- /* Get the value that will be used for the relocation, but
- starting at bit position zero. */
- check = relocation >> howto->rightshift;
- switch (howto->complain_on_overflow)
- {
- case complain_overflow_signed:
- {
- /* Assumes two's complement. */
- bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1;
- bfd_signed_vma reloc_signed_min = ~reloc_signed_max;
-
- /* The above right shift is incorrect for a signed value.
- Fix it up by forcing on the upper bits. */
- if (howto->rightshift > 0
- && (bfd_signed_vma) relocation < 0)
- check |= ((bfd_vma) - 1
- & ~((bfd_vma) - 1
- >> howto->rightshift));
- if ((bfd_signed_vma) check > reloc_signed_max
- || (bfd_signed_vma) check < reloc_signed_min)
- flag = bfd_reloc_overflow;
- }
- break;
- case complain_overflow_unsigned:
- {
- /* Assumes two's complement. This expression avoids
- overflow if howto->bitsize is the number of bits in
- bfd_vma. */
- bfd_vma reloc_unsigned_max =
- (((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
-
- if ((bfd_vma) check > reloc_unsigned_max)
- flag = bfd_reloc_overflow;
- }
- break;
- case complain_overflow_bitfield:
- {
- /* Assumes two's complement. This expression avoids
- overflow if howto->bitsize is the number of bits in
- bfd_vma. */
- bfd_vma reloc_bits = (((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
-
- if (((bfd_vma) check & ~reloc_bits) != 0
- && ((bfd_vma) check & ~reloc_bits) != (-1 & ~reloc_bits))
- {
- /* The above right shift is incorrect for a signed
- value. See if turning on the upper bits fixes the
- overflow. */
- if (howto->rightshift > 0
- && (bfd_signed_vma) relocation < 0)
- {
- check |= ((bfd_vma) - 1
- & ~((bfd_vma) - 1
- >> howto->rightshift));
- if (((bfd_vma) check & ~reloc_bits) != (-1 & ~reloc_bits))
- flag = bfd_reloc_overflow;
- }
- else
- flag = bfd_reloc_overflow;
- }
- }
- break;
- default:
- abort ();
- }
- }
+ flag = bfd_check_overflow (howto->complain_on_overflow, howto->bitsize,
+ howto->rightshift, relocation);
/*
Either we are relocating all the way, or we don't want to apply
@@ -983,6 +1020,7 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
if (howto->special_function)
{
bfd_reloc_status_type cont;
+
/* XXX - The special_function calls haven't been fixed up to deal
with creating new relocations and section contents. */
cont = howto->special_function (abfd, reloc_entry, symbol,
@@ -1007,7 +1045,6 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
else
relocation = symbol->value;
-
reloc_target_output_section = symbol->section->output_section;
/* Convert input-section-relative symbol value to absolute. */
@@ -1172,79 +1209,11 @@ space consuming. For each target:
need to compute the value in a size larger than bitsize, but we
can't reasonably do that for a reloc the same size as a host
machine word.
-
FIXME: We should also do overflow checking on the result after
adding in the value contained in the object file. */
if (howto->complain_on_overflow != complain_overflow_dont)
- {
- bfd_vma check;
-
- /* Get the value that will be used for the relocation, but
- starting at bit position zero. */
- check = relocation >> howto->rightshift;
- switch (howto->complain_on_overflow)
- {
- case complain_overflow_signed:
- {
- /* Assumes two's complement. */
- bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1;
- bfd_signed_vma reloc_signed_min = ~reloc_signed_max;
-
- /* The above right shift is incorrect for a signed value.
- Fix it up by forcing on the upper bits. */
- if (howto->rightshift > 0
- && (bfd_signed_vma) relocation < 0)
- check |= ((bfd_vma) - 1
- & ~((bfd_vma) - 1
- >> howto->rightshift));
- if ((bfd_signed_vma) check > reloc_signed_max
- || (bfd_signed_vma) check < reloc_signed_min)
- flag = bfd_reloc_overflow;
- }
- break;
- case complain_overflow_unsigned:
- {
- /* Assumes two's complement. This expression avoids
- overflow if howto->bitsize is the number of bits in
- bfd_vma. */
- bfd_vma reloc_unsigned_max =
- (((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
-
- if ((bfd_vma) check > reloc_unsigned_max)
- flag = bfd_reloc_overflow;
- }
- break;
- case complain_overflow_bitfield:
- {
- /* Assumes two's complement. This expression avoids
- overflow if howto->bitsize is the number of bits in
- bfd_vma. */
- bfd_vma reloc_bits = (((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
-
- if (((bfd_vma) check & ~reloc_bits) != 0
- && ((bfd_vma) check & ~reloc_bits) != (-1 & ~reloc_bits))
- {
- /* The above right shift is incorrect for a signed
- value. See if turning on the upper bits fixes the
- overflow. */
- if (howto->rightshift > 0
- && (bfd_signed_vma) relocation < 0)
- {
- check |= ((bfd_vma) - 1
- & ~((bfd_vma) - 1
- >> howto->rightshift));
- if (((bfd_vma) check & ~reloc_bits) != (-1 & ~reloc_bits))
- flag = bfd_reloc_overflow;
- }
- else
- flag = bfd_reloc_overflow;
- }
- }
- break;
- default:
- abort ();
- }
- }
+ flag = bfd_check_overflow (howto->complain_on_overflow, howto->bitsize,
+ howto->rightshift, relocation);
/*
Either we are relocating all the way, or we don't want to apply
@@ -1376,8 +1345,9 @@ space consuming. For each target:
bfd_perform_relocation is so hacked up it is easier to write a new
function than to try to deal with it.
- This routine does a final relocation. It should not be used when
- generating relocateable output.
+ This routine does a final relocation. Whether it is useful for a
+ relocateable link depends upon how the object format defines
+ relocations.
FIXME: This routine ignores any special_function in the HOWTO,
since the existing special_function values have been written for
@@ -1870,15 +1840,30 @@ ENUMX
ENUMX
BFD_RELOC_SPARC_WDISP19
ENUMX
- BFD_RELOC_SPARC_GLOB_JMP
-ENUMX
BFD_RELOC_SPARC_7
ENUMX
BFD_RELOC_SPARC_6
ENUMX
BFD_RELOC_SPARC_5
+ENUMEQX
+ BFD_RELOC_SPARC_DISP64
+ BFD_RELOC_64_PCREL
+ENUMX
+ BFD_RELOC_SPARC_PLT64
+ENUMX
+ BFD_RELOC_SPARC_HIX22
+ENUMX
+ BFD_RELOC_SPARC_LOX10
+ENUMX
+ BFD_RELOC_SPARC_H44
+ENUMX
+ BFD_RELOC_SPARC_M44
+ENUMX
+ BFD_RELOC_SPARC_L44
+ENUMX
+ BFD_RELOC_SPARC_REGISTER
ENUMDOC
- Some relocations we're using for SPARC V9 -- subject to change.
+ SPARC64 relocations
ENUM
BFD_RELOC_ALPHA_GPDISP_HI16
@@ -2022,9 +2007,12 @@ ENUMX
BFD_RELOC_MIPS_CALL_HI16
ENUMX
BFD_RELOC_MIPS_CALL_LO16
+COMMENT
ENUMDOC
MIPS ELF relocations.
+COMMENT
+
ENUM
BFD_RELOC_386_GOT32
ENUMX
@@ -2221,7 +2209,29 @@ ENUMX
ENUMDOC
Hitachi SH relocs. Not all of these appear in object files.
-COMMENT
+ENUM
+ BFD_RELOC_THUMB_PCREL_BRANCH9
+ENUMX
+ BFD_RELOC_THUMB_PCREL_BRANCH12
+ENUMX
+ BFD_RELOC_THUMB_PCREL_BRANCH23
+ENUMDOC
+ Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
+ be zero and is not stored in the instruction.
+
+ENUM
+ BFD_RELOC_ARC_B22_PCREL
+ENUMDOC
+ Argonaut RISC Core (ARC) relocs.
+ ARC 22 bit pc-relative branch. The lowest two bits must be zero and are
+ not stored in the instruction. The high 20 bits are installed in bits 26
+ through 7 of the instruction.
+ENUM
+ BFD_RELOC_ARC_B26
+ENUMDOC
+ ARC 26 bit absolute branch. The lowest two bits must be zero and are not
+ stored in the instruction. The high 24 bits are installed in bits 23
+ through 0.
COMMENT
ENUM
@@ -2289,6 +2299,51 @@ ENUMDOC
This is a 16-bit reloc containing the small data area offset for use in
add3, load, and store instructions.
+ENUM
+ BFD_RELOC_V850_9_PCREL
+ENUMDOC
+ This is a 9-bit reloc
+ENUM
+ BFD_RELOC_V850_22_PCREL
+ENUMDOC
+ This is a 22-bit reloc
+
+ENUM
+ BFD_RELOC_V850_SDA_16_16_OFFSET
+ENUMDOC
+ This is a 16 bit offset from the short data area pointer.
+ENUM
+ BFD_RELOC_V850_SDA_15_16_OFFSET
+ENUMDOC
+ This is a 16 bit offset (of which only 15 bits are used) from the
+ short data area pointer.
+ENUM
+ BFD_RELOC_V850_ZDA_16_16_OFFSET
+ENUMDOC
+ This is a 16 bit offset from the zero data area pointer.
+ENUM
+ BFD_RELOC_V850_ZDA_15_16_OFFSET
+ENUMDOC
+ This is a 16 bit offset (of which only 15 bits are used) from the
+ zero data area pointer.
+ENUM
+ BFD_RELOC_V850_TDA_6_8_OFFSET
+ENUMDOC
+ This is an 8 bit offset (of which only 6 bits are used) from the
+ tiny data area pointer.
+ENUM
+ BFD_RELOC_V850_TDA_7_8_OFFSET
+ENUMDOC
+ This is an 8bit offset (of which only 7 bits are used) from the tiny
+ data area pointer.
+ENUM
+ BFD_RELOC_V850_TDA_7_7_OFFSET
+ENUMDOC
+ This is a 7 bit offset from the tiny data area pointer.
+ENUM
+ BFD_RELOC_V850_TDA_16_16_OFFSET
+ENUMDOC
+ This is a 16 bit offset from the tiny data area pointer.
COMMENT
ENUM
@@ -2301,6 +2356,14 @@ ENUM
ENUMDOC
This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
instruction.
+
+ENUM
+ BFD_RELOC_TIC30_LDP
+ENUMDOC
+ This is a 8bit DP reloc for the tms320c30, where the most
+ significant 8 bits of a 24 bit word are placed into the least
+ significant 8 bits of the opcode.
+
ENDSENUM
BFD_RELOC_UNUSED
CODE_FRAGMENT
diff --git a/contrib/binutils/bfd/reloc16.c b/contrib/binutils/bfd/reloc16.c
index 999d7f4..7e7952e 100644
--- a/contrib/binutils/bfd/reloc16.c
+++ b/contrib/binutils/bfd/reloc16.c
@@ -1,5 +1,6 @@
/* 8 and 16 bit COFF relocation functions, for BFD.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -147,7 +148,7 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
/* Get enough memory to hold the stuff */
bfd *input_bfd = i->owner;
asection *input_section = i;
- unsigned *shrinks;
+ int *shrinks;
int shrink = 0;
long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
arelent **reloc_vector = NULL;
@@ -194,13 +195,14 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
int another_pass = 0;
/* Allocate and initialize the shrinks array for this section. */
- shrinks = (unsigned *)bfd_malloc (reloc_count * sizeof (unsigned));
- memset (shrinks, 0, reloc_count * sizeof (unsigned));
+ shrinks = (int *) bfd_malloc (reloc_count * sizeof (int));
+ memset (shrinks, 0, reloc_count * sizeof (int));
/* Loop until nothing changes in this section. */
do {
arelent **parent;
- unsigned int i, j;
+ unsigned int i;
+ long j;
another_pass = 0;
diff --git a/contrib/binutils/bfd/srec.c b/contrib/binutils/bfd/srec.c
index 3e45b3b..1386ebd 100644
--- a/contrib/binutils/bfd/srec.c
+++ b/contrib/binutils/bfd/srec.c
@@ -1,5 +1,6 @@
/* BFD back-end for s-record objects.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -406,7 +407,7 @@ srec_scan (abfd)
while ((c = srec_get_byte (abfd, &error)) != EOF
&& ! isspace (c))
{
- if (p - symbuf >= alc)
+ if ((unsigned int) (p - symbuf) >= alc)
{
char *n;
diff --git a/contrib/binutils/bfd/stabs.c b/contrib/binutils/bfd/stabs.c
index 783fcfb..77c7352 100644
--- a/contrib/binutils/bfd/stabs.c
+++ b/contrib/binutils/bfd/stabs.c
@@ -1,5 +1,5 @@
/* Stabs in sections linking support.
- Copyright 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -566,7 +566,7 @@ _bfd_write_section_stabs (output_bfd, psinfo, stabsec, psecinfo, contents)
}
}
- BFD_ASSERT (tosym - contents == stabsec->_cooked_size);
+ BFD_ASSERT ((bfd_size_type) (tosym - contents) == stabsec->_cooked_size);
return bfd_set_section_contents (output_bfd, stabsec->output_section,
contents, stabsec->output_offset,
diff --git a/contrib/binutils/bfd/stamp-h.in b/contrib/binutils/bfd/stamp-h.in
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/contrib/binutils/bfd/stamp-h.in
@@ -0,0 +1 @@
+timestamp
diff --git a/contrib/binutils/bfd/syms.c b/contrib/binutils/bfd/syms.c
index fbff74a..d39e7d87 100644
--- a/contrib/binutils/bfd/syms.c
+++ b/contrib/binutils/bfd/syms.c
@@ -1,5 +1,5 @@
/* Generic symbol-table support for the BFD library.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -715,6 +715,42 @@ _bfd_generic_minisymbol_to_symbol (abfd, dynamic, minisym, sym)
placed in *pinfo should be saved with the BFD, and passed back each
time this function is called. */
+/* We use a cache by default. */
+
+#define ENABLE_CACHING
+
+/* We keep an array of indexentry structures to record where in the
+ stabs section we should look to find line number information for a
+ particular address. */
+
+struct indexentry
+{
+ bfd_vma val;
+ bfd_byte *stab;
+ bfd_byte *str;
+ char *directory_name;
+ char *file_name;
+ char *function_name;
+};
+
+/* Compare two indexentry structures. This is called via qsort. */
+
+static int
+cmpindexentry (a, b)
+ const PTR *a;
+ const PTR *b;
+{
+ const struct indexentry *contestantA = (const struct indexentry *) a;
+ const struct indexentry *contestantB = (const struct indexentry *) b;
+
+ if (contestantA->val < contestantB->val)
+ return -1;
+ else if (contestantA->val > contestantB->val)
+ return 1;
+ else
+ return 0;
+}
+
/* A pointer to this structure is stored in *pinfo. */
struct stab_find_info
@@ -727,13 +763,22 @@ struct stab_find_info
bfd_byte *stabs;
/* The contents of the .stabstr section. */
bfd_byte *strs;
- /* An malloc buffer to hold the file name. */
- char *filename;
+
+ /* A table that indexes stabs by memory address. */
+ struct indexentry *indextable;
+ /* The number of entries in indextable. */
+ int indextablesize;
+
+#ifdef ENABLE_CACHING
/* Cached values to restart quickly. */
+ struct indexentry *cached_indexentry;
bfd_vma cached_offset;
bfd_byte *cached_stab;
- bfd_byte *cached_str;
- bfd_size_type cached_stroff;
+ char *cached_file_name;
+#endif
+
+ /* Saved ptr to malloc'ed filename. */
+ char *filename;
};
boolean
@@ -751,18 +796,36 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
{
struct stab_find_info *info;
bfd_size_type stabsize, strsize;
- bfd_byte *stab, *stabend, *str;
+ bfd_byte *stab, *str;
bfd_size_type stroff;
- bfd_vma fnaddr;
- char *directory_name, *main_file_name, *current_file_name, *line_file_name;
- char *fnname;
- bfd_vma low_func_vma, low_line_vma;
+ struct indexentry *indexentry;
+ char *directory_name, *file_name;
*pfound = false;
*pfilename = bfd_get_filename (abfd);
*pfnname = NULL;
*pline = 0;
+ /* Stabs entries use a 12 byte format:
+ 4 byte string table index
+ 1 byte stab type
+ 1 byte stab other field
+ 2 byte stab desc field
+ 4 byte stab value
+ FIXME: This will have to change for a 64 bit object format.
+
+ The stabs symbols are divided into compilation units. For the
+ first entry in each unit, the type of 0, the value is the length
+ of the string table for this unit, and the desc field is the
+ number of stabs symbols for this unit. */
+
+#define STRDXOFF (0)
+#define TYPEOFF (4)
+#define OTHEROFF (5)
+#define DESCOFF (6)
+#define VALOFF (8)
+#define STABSIZE (12)
+
info = (struct stab_find_info *) *pinfo;
if (info != NULL)
{
@@ -779,6 +842,12 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
{
long reloc_size, reloc_count;
arelent **reloc_vector;
+ bfd_vma val;
+ int i;
+ char *name;
+ char *file_name;
+ char *directory_name;
+ char *function_name;
info = (struct stab_find_info *) bfd_zalloc (abfd, sizeof *info);
if (info == NULL)
@@ -868,140 +937,189 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
if (reloc_vector != NULL)
free (reloc_vector);
- *pinfo = (PTR) info;
- }
+ /* First time through this function, build a table matching
+ function VM addresses to stabs, then sort based on starting
+ VM address. Do this in two passes: once to count how many
+ table entries we'll need, and a second to actually build the
+ table. */
- /* We are passed a section relative offset. The offsets in the
- stabs information are absolute. */
- offset += bfd_get_section_vma (abfd, section);
+ info->indextablesize = 0;
+ for (stab = info->stabs; stab < info->stabs + stabsize; stab += STABSIZE)
+ {
+ if (stab[TYPEOFF] == N_FUN)
+ ++info->indextablesize;
+ }
- /* Stabs entries use a 12 byte format:
- 4 byte string table index
- 1 byte stab type
- 1 byte stab other field
- 2 byte stab desc field
- 4 byte stab value
- FIXME: This will have to change for a 64 bit object format.
+ if (info->indextablesize == 0)
+ return true;
+ ++info->indextablesize;
- The stabs symbols are divided into compilation units. For the
- first entry in each unit, the type of 0, the value is the length
- of the string table for this unit, and the desc field is the
- number of stabs symbols for this unit. */
+ info->indextable = ((struct indexentry *)
+ bfd_alloc (abfd,
+ (sizeof (struct indexentry)
+ * info->indextablesize)));
+ if (info->indextable == NULL)
+ return false;
-#define STRDXOFF (0)
-#define TYPEOFF (4)
-#define OTHEROFF (5)
-#define DESCOFF (6)
-#define VALOFF (8)
-#define STABSIZE (12)
+ file_name = NULL;
+ directory_name = NULL;
- /* It would be nice if we could skip ahead to the stabs symbols for
- the next compilation unit to quickly scan through the compilation
- units. Unfortunately, since each line number gets a separate
- stabs entry, it is entirely plausible that a large source file
- will overflow the 16 bit count of stabs entries. */
- fnaddr = 0;
- directory_name = NULL;
- main_file_name = NULL;
- current_file_name = NULL;
- line_file_name = NULL;
- fnname = NULL;
- low_func_vma = 0;
- low_line_vma = 0;
-
- stabend = info->stabs + stabsize;
-
- if (info->cached_stab == NULL || offset < info->cached_offset)
- {
- stab = info->stabs;
- str = info->strs;
- stroff = 0;
- }
- else
- {
- stab = info->cached_stab;
- str = info->cached_str;
- stroff = info->cached_stroff;
- }
+ for (i = 0, stroff = 0, stab = info->stabs, str = info->strs;
+ i < info->indextablesize && stab < info->stabs + stabsize;
+ stab += STABSIZE)
+ {
+ switch (stab[TYPEOFF])
+ {
+ case 0:
+ /* This is the first entry in a compilation unit. */
+ if ((bfd_size_type) ((info->strs + strsize) - str) < stroff)
+ break;
+ str += stroff;
+ stroff = bfd_get_32 (abfd, stab + VALOFF);
+ break;
- info->cached_offset = offset;
+ case N_SO:
+ /* The main file name. */
- for (; stab < stabend; stab += STABSIZE)
- {
- boolean done;
- bfd_vma val;
- char *name;
+ file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
- done = false;
+ if (*file_name == '\0')
+ {
+ directory_name = NULL;
+ file_name = NULL;
+ }
+ else if (stab + STABSIZE >= info->stabs + stabsize
+ || *(stab + STABSIZE + TYPEOFF) != N_SO)
+ {
+ directory_name = NULL;
+ }
+ else
+ {
+ /* Two consecutive N_SOs are a directory and a file
+ name. */
+ stab += STABSIZE;
+ directory_name = file_name;
+ file_name = ((char *) str
+ + bfd_get_32 (abfd, stab + STRDXOFF));
+ }
+ break;
- switch (stab[TYPEOFF])
- {
- case 0:
- /* This is the first entry in a compilation unit. */
- if ((bfd_size_type) ((info->strs + strsize) - str) < stroff)
- {
- done = true;
+ case N_SOL:
+ /* The name of an include file. */
+ file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
break;
- }
- str += stroff;
- stroff = bfd_get_32 (abfd, stab + VALOFF);
- break;
- case N_SO:
- /* The main file name. */
+ case N_FUN:
+ /* A function name. */
- val = bfd_get_32 (abfd, stab + VALOFF);
- if (val > offset)
- {
- done = true;
+ name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
+
+ if (*name == '\0')
+ name = NULL;
+
+ function_name = name;
+
+ if (name == NULL)
+ continue;
+
+ val = bfd_get_32 (abfd, stab + VALOFF);
+
+ info->indextable[i].val = val;
+ info->indextable[i].stab = stab;
+ info->indextable[i].str = str;
+ info->indextable[i].directory_name = directory_name;
+ info->indextable[i].file_name = file_name;
+ info->indextable[i].function_name = function_name;
+
+ ++i;
break;
}
+ }
+
+ info->indextable[i].val = (bfd_vma) -1;
+ info->indextable[i].stab = info->stabs + stabsize;
+ info->indextable[i].str = str;
+ info->indextable[i].directory_name = NULL;
+ info->indextable[i].file_name = NULL;
+ info->indextable[i].function_name = NULL;
+ ++i;
- name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
+ info->indextablesize = i;
- /* An empty string indicates the end of the compilation
- unit. */
- if (*name == '\0')
+ qsort (info->indextable, i, sizeof (struct indexentry), cmpindexentry);
+
+ *pinfo = (PTR) info;
+ }
+
+ /* We are passed a section relative offset. The offsets in the
+ stabs information are absolute. */
+ offset += bfd_get_section_vma (abfd, section);
+
+#ifdef ENABLE_CACHING
+ if (info->cached_indexentry != NULL
+ && offset >= info->cached_offset
+ && offset < (info->cached_indexentry + 1)->val)
+ {
+ stab = info->cached_stab;
+ indexentry = info->cached_indexentry;
+ file_name = info->cached_file_name;
+ }
+ else
+#endif
+ {
+ /* Cache non-existant or invalid. Do binary search on
+ indextable. */
+
+ long low, high;
+ long mid = -1;
+
+ indexentry = NULL;
+
+ low = 0;
+ high = info->indextablesize - 1;
+ while (low != high)
+ {
+ mid = (high + low) / 2;
+ if (offset >= info->indextable[mid].val
+ && offset < info->indextable[mid + 1].val)
{
- /* If there are functions in different sections, they
- may have addresses larger than val, but we don't want
- to forget the file name. When there are functions in
- different cases, there is supposed to be an N_FUN at
- the end of the function indicating where it ends. */
- if (low_func_vma < val || fnname == NULL)
- main_file_name = NULL;
+ indexentry = &info->indextable[mid];
break;
}
- /* We know that we have to get to at least this point in the
- stabs entries for this offset. */
- info->cached_stab = stab;
- info->cached_str = str;
- info->cached_stroff = stroff;
+ if (info->indextable[mid].val > offset)
+ high = mid;
+ else
+ low = mid + 1;
+ }
- current_file_name = name;
+ if (indexentry == NULL)
+ return true;
- /* Look ahead to the next symbol. Two consecutive N_SO
- symbols are a directory and a file name. */
- if (stab + STABSIZE >= stabend
- || *(stab + STABSIZE + TYPEOFF) != N_SO)
- directory_name = NULL;
- else
- {
- stab += STABSIZE;
- directory_name = current_file_name;
- current_file_name = ((char *) str
- + bfd_get_32 (abfd, stab + STRDXOFF));
- }
+ stab = indexentry->stab + STABSIZE;
+ file_name = indexentry->file_name;
+ }
- main_file_name = current_file_name;
+ directory_name = indexentry->directory_name;
+ str = indexentry->str;
- break;
+ for (; stab < (indexentry+1)->stab; stab += STABSIZE)
+ {
+ boolean done;
+ bfd_vma val;
+
+ done = false;
+ switch (stab[TYPEOFF])
+ {
case N_SOL:
/* The name of an include file. */
- current_file_name = ((char *) str
- + bfd_get_32 (abfd, stab + STRDXOFF));
+ val = bfd_get_32 (abfd, stab + VALOFF);
+ if (val <= offset)
+ {
+ file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
+ *pline = 0;
+ }
break;
case N_SLINE:
@@ -1009,40 +1127,25 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
case N_BSLINE:
/* A line number. The value is relative to the start of the
current function. */
- val = fnaddr + bfd_get_32 (abfd, stab + VALOFF);
- if (val >= low_line_vma && val <= offset)
+ val = indexentry->val + bfd_get_32 (abfd, stab + VALOFF);
+ if (val <= offset)
{
*pline = bfd_get_16 (abfd, stab + DESCOFF);
- low_line_vma = val;
- line_file_name = current_file_name;
+
+#ifdef ENABLE_CACHING
+ info->cached_stab = stab;
+ info->cached_offset = val;
+ info->cached_file_name = file_name;
+ info->cached_indexentry = indexentry;
+#endif
}
+ if (val > offset)
+ done = true;
break;
case N_FUN:
- /* A function name. */
- val = bfd_get_32 (abfd, stab + VALOFF);
- name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
-
- /* An empty string here indicates the end of a function, and
- the value is relative to fnaddr. */
-
- if (*name == '\0')
- {
- val += fnaddr;
- if (val >= low_func_vma && val < offset)
- fnname = NULL;
- }
- else
- {
- if (val >= low_func_vma && val <= offset)
- {
- fnname = name;
- low_func_vma = val;
- }
-
- fnaddr = val;
- }
-
+ case N_SO:
+ done = true;
break;
}
@@ -1050,46 +1153,34 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
break;
}
- if (main_file_name == NULL)
- {
- /* No information found. */
- return true;
- }
-
*pfound = true;
- if (*pline != 0)
- main_file_name = line_file_name;
-
- if (main_file_name != NULL)
+ if (file_name[0] == '/' || directory_name == NULL)
+ *pfilename = file_name;
+ else
{
- if (main_file_name[0] == '/' || directory_name == NULL)
- *pfilename = main_file_name;
- else
- {
- size_t dirlen;
+ size_t dirlen;
- dirlen = strlen (directory_name);
- if (info->filename == NULL
- || strncmp (info->filename, directory_name, dirlen) != 0
- || strcmp (info->filename + dirlen, main_file_name) != 0)
- {
- if (info->filename != NULL)
- free (info->filename);
- info->filename = (char *) bfd_malloc (dirlen +
- strlen (main_file_name)
- + 1);
- if (info->filename == NULL)
- return false;
- strcpy (info->filename, directory_name);
- strcpy (info->filename + dirlen, main_file_name);
- }
-
- *pfilename = info->filename;
+ dirlen = strlen (directory_name);
+ if (info->filename == NULL
+ || strncmp (info->filename, directory_name, dirlen) != 0
+ || strcmp (info->filename + dirlen, file_name) != 0)
+ {
+ if (info->filename != NULL)
+ free (info->filename);
+ info->filename = (char *) bfd_malloc (dirlen +
+ strlen (file_name)
+ + 1);
+ if (info->filename == NULL)
+ return false;
+ strcpy (info->filename, directory_name);
+ strcpy (info->filename + dirlen, file_name);
}
+
+ *pfilename = info->filename;
}
- if (fnname != NULL)
+ if (indexentry->function_name != NULL)
{
char *s;
@@ -1097,11 +1188,11 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
to clobber the colon. It's OK to change the name, since the
string is in our own local storage anyhow. */
- s = strchr (fnname, ':');
+ s = strchr (indexentry->function_name, ':');
if (s != NULL)
*s = '\0';
- *pfnname = fnname;
+ *pfnname = indexentry->function_name;
}
return true;
diff --git a/contrib/binutils/bfd/targets.c b/contrib/binutils/bfd/targets.c
index de0e0f2..a6c61bb 100644
--- a/contrib/binutils/bfd/targets.c
+++ b/contrib/binutils/bfd/targets.c
@@ -1,5 +1,6 @@
/* Generic target-file-type support for the BFD library.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -483,6 +484,8 @@ extern const bfd_target armpei_big_vec;
extern const bfd_target b_out_vec_big_host;
extern const bfd_target b_out_vec_little_host;
extern const bfd_target bfd_elf64_alpha_vec;
+extern const bfd_target bfd_elf32_bigarc_vec;
+extern const bfd_target bfd_elf32_littlearc_vec;
extern const bfd_target bfd_elf32_big_generic_vec;
extern const bfd_target bfd_elf32_bigmips_vec;
extern const bfd_target bfd_elf64_bigmips_vec;
@@ -503,6 +506,7 @@ extern const bfd_target bfd_elf32_powerpcle_vec;
extern const bfd_target bfd_elf32_sh_vec;
extern const bfd_target bfd_elf32_shl_vec;
extern const bfd_target bfd_elf32_sparc_vec;
+extern const bfd_target bfd_elf32_v850_vec;
extern const bfd_target bfd_elf64_big_generic_vec;
extern const bfd_target bfd_elf64_little_generic_vec;
extern const bfd_target bfd_elf64_sparc_vec;
@@ -531,6 +535,7 @@ extern const bfd_target bfd_powerpcle_pei_vec;
extern const bfd_target i386pe_vec;
extern const bfd_target i386pei_vec;
extern const bfd_target go32coff_vec;
+extern const bfd_target go32stubbedcoff_vec;
extern const bfd_target i386linux_vec;
extern const bfd_target i386lynx_aout_vec;
extern const bfd_target i386lynx_coff_vec;
@@ -566,6 +571,8 @@ extern const bfd_target pmac_xcoff_vec;
extern const bfd_target rs6000coff_vec;
extern const bfd_target shcoff_vec;
extern const bfd_target shlcoff_vec;
+extern const bfd_target shcoff_small_vec;
+extern const bfd_target shlcoff_small_vec;
extern const bfd_target sparcle_aout_vec;
extern const bfd_target sparclinux_vec;
extern const bfd_target sparclynx_aout_vec;
@@ -574,6 +581,9 @@ extern const bfd_target sparcnetbsd_vec;
extern const bfd_target sparccoff_vec;
extern const bfd_target sunos_big_vec;
extern const bfd_target tekhex_vec;
+extern const bfd_target tic30_aout_vec;
+extern const bfd_target tic30_coff_vec;
+extern const bfd_target vaxnetbsd_vec;
extern const bfd_target versados_vec;
extern const bfd_target we32kcoff_vec;
extern const bfd_target w65_vec;
@@ -635,6 +645,7 @@ const bfd_target * const bfd_target_vector[] = {
#ifdef BFD64
&bfd_elf64_alpha_vec,
#endif
+ &bfd_elf32_bigarc_vec,
&bfd_elf32_bigmips_vec,
#ifdef BFD64
&bfd_elf64_bigmips_vec,
@@ -644,6 +655,7 @@ const bfd_target * const bfd_target_vector[] = {
&bfd_elf32_i386_vec,
&bfd_elf32_i860_vec,
&bfd_elf32_little_generic_vec,
+ &bfd_elf32_littlearc_vec,
&bfd_elf32_littlemips_vec,
#ifdef BFD64
&bfd_elf64_littlemips_vec,
@@ -655,6 +667,8 @@ const bfd_target * const bfd_target_vector[] = {
&bfd_elf32_m88k_vec,
&bfd_elf32_sparc_vec,
&bfd_elf32_powerpc_vec,
+ &bfd_elf32_powerpcle_vec,
+ &bfd_elf32_v850_vec,
#ifdef BFD64 /* No one seems to use this. */
&bfd_elf64_big_generic_vec,
&bfd_elf64_little_generic_vec,
@@ -699,6 +713,7 @@ const bfd_target * const bfd_target_vector[] = {
&bfd_powerpc_pei_vec,
&bfd_powerpcle_pei_vec,
&go32coff_vec,
+ &go32stubbedcoff_vec,
#if 0
/* Since a.out files lack decent magic numbers, no way to recognize
which kind of a.out file it is. */
@@ -767,6 +782,8 @@ const bfd_target * const bfd_target_vector[] = {
&ppcboot_vec,
&shcoff_vec,
&shlcoff_vec,
+ &shcoff_small_vec,
+ &shlcoff_small_vec,
&sparcle_aout_vec,
&sparclinux_vec,
&sparclynx_aout_vec,
@@ -775,8 +792,11 @@ const bfd_target * const bfd_target_vector[] = {
&sunos_big_vec,
&aout0_big_vec,
&tekhex_vec,
- &we32kcoff_vec,
+ &tic30_aout_vec,
+ &tic30_coff_vec,
+ &vaxnetbsd_vec,
&versados_vec,
+ &we32kcoff_vec,
&z8kcoff_vec,
#endif /* not SELECT_VECS */
@@ -805,6 +825,9 @@ const bfd_target * const bfd_target_vector[] = {
#ifdef IRIX_CORE
&irix_core_vec,
#endif
+#ifdef NETBSD_CORE
+ &netbsd_core_vec,
+#endif
#ifdef OSF_CORE
&osf_core_vec,
#endif
diff --git a/contrib/binutils/bfd/tekhex.c b/contrib/binutils/bfd/tekhex.c
index 238ccca..76f49d9 100644
--- a/contrib/binutils/bfd/tekhex.c
+++ b/contrib/binutils/bfd/tekhex.c
@@ -817,6 +817,8 @@ tekhex_write_object_contents (abfd)
asection *s;
struct data_struct *d;
+ tekhex_init ();
+
bytes_written = 0;
/* And the raw data */
@@ -868,50 +870,53 @@ tekhex_write_object_contents (abfd)
}
/* And the symbols */
- for (p = abfd->outsymbols; *p; p++)
+ if (abfd->outsymbols)
{
- int section_code = bfd_decode_symclass (*p);
+ for (p = abfd->outsymbols; *p; p++)
+ {
+ int section_code = bfd_decode_symclass (*p);
- if (section_code != '?')
- { /* do not include debug symbols */
- asymbol *s = *p;
- char *dst = buffer;
+ if (section_code != '?')
+ { /* do not include debug symbols */
+ asymbol *s = *p;
+ char *dst = buffer;
- writesym (&dst, s->section->name);
+ writesym (&dst, s->section->name);
- switch (section_code)
- {
- case 'A':
- *dst++ = '2';
- break;
- case 'a':
- *dst++ = '6';
- break;
- case 'D':
- case 'B':
- case 'O':
- *dst++ = '4';
- break;
- case 'd':
- case 'b':
- case 'o':
- *dst++ = '8';
- break;
- case 'T':
- *dst++ = '3';
- break;
- case 't':
- *dst++ = '7';
- break;
- case 'C':
- case 'U':
- bfd_set_error (bfd_error_wrong_format);
- return false;
- }
+ switch (section_code)
+ {
+ case 'A':
+ *dst++ = '2';
+ break;
+ case 'a':
+ *dst++ = '6';
+ break;
+ case 'D':
+ case 'B':
+ case 'O':
+ *dst++ = '4';
+ break;
+ case 'd':
+ case 'b':
+ case 'o':
+ *dst++ = '8';
+ break;
+ case 'T':
+ *dst++ = '3';
+ break;
+ case 't':
+ *dst++ = '7';
+ break;
+ case 'C':
+ case 'U':
+ bfd_set_error (bfd_error_wrong_format);
+ return false;
+ }
- writesym (&dst, s->name);
- writevalue (&dst, s->value + s->section->vma);
- out (abfd, '3', buffer, dst);
+ writesym (&dst, s->name);
+ writevalue (&dst, s->value + s->section->vma);
+ out (abfd, '3', buffer, dst);
+ }
}
}
OpenPOWER on IntegriCloud