diff -rN binutils-2.11/Makefile.in binutils-2.11.2/Makefile.in 1742c1742,1744 < VER = ` if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ --- > VER = ` if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' $(TOOL)/configure.in >/dev/null 2>&1; then \ > sed < bfd/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ > elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ diff -rN binutils-2.11/bfd/COPYING binutils-2.11.2/bfd/COPYING 4c4 < Copyright (C) 1989, 1991 Free Software Foundation, Inc. --- > Copyright 1989, 1991, 1997 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/ChangeLog binutils-2.11.2/bfd/ChangeLog 0a1,566 > 2001-06-19 Philip Blundell > > * configure.in: Set version to 2.11.2. > * configure: Regenerate. > > 2001-06-19 Andreas Jaeger > > Merge from mainline sources: > 2001-06-19 Andreas Jaeger > * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of > dynamic symbols. > 2001-06-07 Andreas Jaeger > * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an > assertion. > (elf64_x86_64_check_relocs): Set an alignment of 8 for .rela > sections; handle further relocations. > 2001-06-01 Andreas Jaeger > * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8 > relocation, small reformatting. > > 2001-06-14 Nick Clifton > > Merge from mainline sources: > 2001-04-27 Sean McNeil > * config.bfd: Add arm-vxworks target. > * coff-arm (coff_arm_relocate_section): Add in symbol value to > addend (fro VXworks targets). > 2001-03-06 Nick Clifton > * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero > of offset in BLX(1) instruction. > * coff-arm.c (coff_arm_relocate_section): Clear bit zero of > offset in BLX(1) instruction. > Fix formatting. > 2001-03-06 Nick Clifton > * coff-arm.c (coff_arm_reloc_type_lookup): Add > BFD_RELOC_THUMB_PCREL_BLX. > 2001-05-04 Nick Clifton > * elf32-arm.h (elf32_arm_final_link_relocate): Set > EF_ARM_HASENTRY if the start address is set. > > 2001-06-11 Alan Modra > > * configure.in (): Move powerpc-*-*bsd* after > powerpc-*-freebsd*. > > Merge from mainline. > 2001-06-02 H.J. Lu > * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX > and ELFOSABI_HPUX. > * elf64-hppa.c (elf64_hppa_object_p): Likewise. > > 2001-06-02 Hans-Peter Nilsson > * section.c (_bfd_strip_section_from_output): Handle NULL > output_section. > > 2001-05-30 Alan Modra > * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for > millicode. Don't allocate .got and .rela.got space here.. > (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here.. > (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and > .rela.plt here.. > (hppa_handle_PIC_calls): ..nor here.. > (allocate_plt_and_got): ..instead do it all here. New function. > (elf32_hppa_size_dynamic_sections): Allocate local .got space and > call allocate_plt_and_got. No need to zap .got if not dynamic. > (elf32_hppa_final_link): Call regular bfd_final_link instead of > gc_common_final_link. > (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define. > (elf32_hppa_relocate_section): Use it here. > (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of > dynamic_sections_created. > (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym. > > 2001-05-28 Thiemo Seufer > * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of > a zeroing loop. > (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly. > (elf_link_input_bfd): Likewise. > (elf_reloc_link_order): Likewise. > (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64 > relocations correctly. > > 2001-05-28 Alan Modra > * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries > for symbols forced local that need plabels. > (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in > .plt.rela for local syms if non-shared. > (hppa_build_one_stub): Mask lsb of plt.offset. > (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set. > (clobber_millicode_symbols): Correct comment. > (elf32_hppa_relocate_section): Likewise. > (elf32_hppa_finish_dynamic_symbol): Likewise. > > 2001-05-25 Alan Modra > * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow > undefined millicode syms in shared libs. > (hppa_build_one_stub): Turn BFD_ASSERTs into aborts. > (elf32_hppa_check_relocs): Likewise. > (elf32_hppa_adjust_dynamic_symbol): Likewise. > (elf32_hppa_size_dynamic_sections): Likewise. > (elf32_hppa_relocate_section): Likewise. > (elf32_hppa_finish_dynamic_symbol): Likewise. > (elf32_hppa_finish_dynamic_sections): Likewise. > > 2001-05-23 Alexandre Oliva > * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo > s/ENTIRES/ENTRIES/. > > 2001-05-23 Thiemo Seufer > * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations. > * libbfd.h: Regenerate. > * bfd-in2.h: Regenerate. > * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support. > * archures.c (bfd_mach_mips12000): Define. > * cpu-mips.c (arch_info_struct): Add MIPS r12k support. > * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k > support. > (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef. > * bfd-in2.h: Regenerate. > * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol. > > 2001-05-23 Nick Clifton > * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number > of entries in a structured section. > * elf.c: Use new macro. > * elf32-i386.c: Use new macro. > * elf32-mips.c: Use new macro. > * elf64-alpha.c: Use new macro. > * elf64-sparc.c: Use new macro. > * elfcode.h: Use new macro. > * elflink.h: Use new macro. > > 2001-05-21 Andreas Jaeger > * dwarf2.c (decode_line_info): Fix error message. > (read_abbrevs): Fix test for offset as suggested by Alan Modra and > adjust error message. > > 2001-05-17 H.J. Lu > * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the > version definition to basename of the output filename. > > 2001-05-15 Alexandre Oliva > * elf-m10300.c (mn10300_elf_relax_section): Don't relax > negative 32-bit operands to 16 operands when the operand is > going to be zero-extended by the modified opcode. > > 2001-05-11 Jakub Jelinek > * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind > sections as well. > (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO > to .gnu.linkonce.t.FOO text section. > > 2001-05-11 Nick Clifton > * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr' > to be unsigned long, in order to match its use. > > 2001-05-10 H.J. Lu > * linker.c (_bfd_generic_link_add_one_symbol): Check loop on > indirect symbols. > > 2001-05-09 H.J. Lu > * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate > versymhdr->sh_size bytes for extversym instead of hdr->sh_size. > Remove the unused veriable `dynver'. > > 2001-05-07 Thiemo Seufer > * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it > is always a positive integer. Cast away sign mismatch. > * elf32-mips.c: Fix misleading comment and typo. > (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use > correct data type. > * elflink.c: Fix typo. > (_bfd_elf_create_dynamic_sections): Remove superfluous initialization. > * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch. > > 2001-05-03 Nick Clifton > * targets.c (_bfd_target_vector_entries): Compute value based on > the size of the _bfd_target_vector and not bfd_target_vector. > > 2001-05-03 Andreas Jaeger > * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute. > (elf_generic_info_to_howto_rel): Likewise. > * coff-alpha.c (reloc_nil): Likewise. > (alpha_ecoff_bad_format_hook): Likewise. > (alpha_adjust_reloc_out): Likewise. > (alpha_bfd_reloc_type_lookup): Likewise. > (alpha_convert_external_reloc): Likewise. > * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise. > (elf64_alpha_reloc_bad): Likewise. > (elf64_alpha_reloc_gpdisp): Likewise. > (elf64_alpha_bfd_reloc_type_lookup): Likewise. > (elf64_alpha_info_to_howto): Likewise. > (elf64_alpha_add_symbol_hook): Likewise. > (elf64_alpha_create_got_section): Likewise. > (elf64_alpha_is_local_label_name): Likewise. > (elf64_alpha_merge_ind_symbols): Likewise. > * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise. > (mips_elf64_get_reloc_upper_bound): Likewise. > * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise. > (nlm_alpha_get_public_offset): Likewise. > > 2001-04-30 H.J. Lu > * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1 > only for ELF_LINK_FORCED_LOCAL. > * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise. > * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise. > * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise. > * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL > if the symbol has hidden or internal visibility. > > 2001-04-14 Mark Elbrecht > * coffcode.h (coff_write_object_contents): Use > bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out. > > 2001-04-09 Hans-Peter Nilsson > * elflink.h (elf_fix_symbol_flags): For non-default visibilities, > only hide symbols marked STV_INTERNAL or STV_HIDDEN. > > 2001-04-05 Steven J. Hill > * config.bfd (mips*el*-*-linux-gnu*): Use traditional little > endian MIPS ELF target. > (mips*-*-linux-gnu*): Use traditional big endian MIPS ELF target. > * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional > 64bit big endian MIPS ELF target. > (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little > endian MIPS ELF target. > * configure: Regenerated. > * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and > little endian targets. > (mips_elf_sym_is_global): Handle traditional targets. > * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional > 64bit big endian MIPS ELF target. > (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little > endian MIPS ELF target. > * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec > and bfd_elf64_tradlittlemips_vec. > > 2001-04-04 Alan Modra > * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol > when -Bsymbolic causes a symbol to no longer need a .plt entry. > > 2001-04-03 David Mosberger > * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted. > > 2001-03-30 H.J. Lu > * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ... > (PEI_DEFAULT_TARGET_SUBSYSTEM): This. > > 2001-03-23 Nick Clifton > * Makefile.am (BUILD_CFILES): New variable: List of C source > files created in build directory. > (BUILD_HFILES): New variable: List of header files created in > build directory. > (POTFILES): Delete. > (po/POTFILES.in): Replace rule with empty entry. > (po/SRC-POTFILES.in): New rule: Create a list of source files > in the source directory. > (po/BLD-POTFILES.in): New rule: Create a list of source files > in the build directory. > (MOSTLYCLEAN): Do not delete source files created in build > directory. > * Makefile.in: Regenerate. > * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in > into po/Makefile. > * configure: Regenerate. > * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES > and BLD_POTFILES. > Add .. to the search path when building bfd.pot. > Delete POTFILES when performing distclean. > Add comment describing why distclean is broken in maintainer mode. > * po/POTFILES.in: Delete. > * po/SRC-POTFILES.in: New file. > * po/BLD-POTFILES.in: New file. > * po/bfd.pot: Regenerate. > > 2001-03-06 Igor Shevlyakov > * archures.c (bfd_default_scan): Add Coldfire CPUs. > * bfd-in2.h: Regenerate. > * cpu-m68k.c: Add Coldfire CPUs for arch table. > * ieee.c (ieee_write_processor): Set proper id for > Coldfire CPUs. > > 2001-02-27 H.J. Lu > * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if > abfd->tdata.aout_data == NULL. > > 2001-02-26 Nick Clifton > * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy > up, replacing multiple if statements with a switch. > (handle_COMDAT): New function. > > 2001-02-26 H.J. Lu > * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue > a warning for section flags we do not handle instead of > aborting. > > 2001-02-19 Jakub Jelinek > * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT > entries that could serve as a definition for a weak symbol. > * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise. > > 2001-02-18 Jim Kingdon > * irix-core.c (irix_core_core_file_p): Set the architecture (GDB > multiarch needs it). > > 2001-02-18 H.J. Lu > * elflink.h (elf_link_input_bfd): Ignore invalid section symbol > index. > > 2001-02-18 Kazu Hirata > * vms-misc.c: Fix formatting. > > 2001-02-16 Kazu Hirata > * vms.c: Fix formatting. > > 2001-02-14 H.J. Lu > * elf.c (elf_find_function): New function. > (_bfd_elf_find_nearest_line): Call elf_find_function () to find > the file name and function name. > > 2001-02-14 Nick Clifton > * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c > (BFD64_BACKENDS): Add pepigen.c > Add rules to create peigen.c and pepigen.c from peXXigen.c. > > 2001-02-14 H.J. Lu > * libcoff-in.h (pe_tdata): Add members target_subsystem and > force_minimum_alignment. > > 2001-02-13 Kazu Hirata > * vms.c (vms_print_symbol): Remove unreachable code. > * rs6000-core.c: Fix formatting. > > 2001-02-13 David Mosberger > * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define > as _bfd_XXi_only_swap_filehdr_out. > (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set > pe->force_minimum_alignment to TRUE. > (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to > PEI_TARGET_SUBSYSTEM. > (pe_print_private_bfd_data): Call > _bfd_XX_print_private_bfd_data_common() instead of > _bfd_pe_print_private_bfd_data_common(). > (pe_bfd_copy_private_bfd_data): Call > _bfd_XX_bfd_copy_private_bfd_data_common() instead of > _bfd_pe_bfd_copy_private_bfd_data_common(). > (coff_bfd_copy_private_section_data): Define as > _bfd_XX_bfd_copy_private_section_data instead of > _bfd_pe_bfd_copy_private_section_data. > (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead > of a _bfd_pe_get_symbol_info. > * peigen.c: Delete. > * peXXigen.c: Renamed from peigen.c. > (COFF_WITH_XX): Define this macro (will get expanded into > COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being > compiled as peigen.c or pepigen.c. > [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to > define the canonical PEP structures and definitions. > (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in > effect, enforce minimum file and section alignments. If > extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to > pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN, > so, by default, this is a no-op). > * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep. > (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map > _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to > _bfd_pefoo if it's not defined. Use these macros to define > coff swap macros. > * libcoff.h (pe_tdata): Add members target_subsystem and > force_minimum_alignment. > * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to > COFF_WITH_pep. > (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM. > * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of > peigen.lo. > * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep. > (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and > PEPAOUTHDR. > * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo. > (BFD64_BACKENDS_CFILES): Mention pepigen.c > (peigen.c): Add rule to generate from peXXigen.c. > (pepigen.c): Ditto. > (pepigen.lo): List dependencies for pepigen.lo. > > 2001-02-11 H.J. Lu > * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB > alignment. > > 2001-02-11 Maciej W. Rozycki > * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch > from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32 > relocations against dynsym symbols. > * elf32-mips.c (elf_mips_howto_table): Fix the comment on > the R_MIPS_26 relocation. > (mips_elf_calculate_relocation): Use (p + 4) instead of p for > the R_MIPS_26 relocation. > (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26 > relocation. > * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on > the R_MIPS_26 relocation. > (mips_elf64_howto_table_rela): Likewise. > * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub > member to mark symbols that have non-CALL relocations against > them. > (mips_elf_link_hash_newfunc): Initialize no_fn_stub. > (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like > R_MIPS_GOT16. > (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a > non-CALL relocation against it is encountered. > (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well. > (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if > no_fn_stub is not set. > * elf32-mips.c (mips_elf_output_extsym): Get the output section > information from the real symbol for indirect ones. > Check no_fn_stub to find out if a symbol has a function stub > indeed. > > 2001-02-09 Jakub Jelinek > * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function. > > 2001-02-09 Mark Kettenis > * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32 > similar to R_SPARC_32. > * elf64-sparc.c (sparc64_elf_howto_table): Likewise. > > 2001-02-08 Richard Henderson > * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness > before visibility. Locally defined protected symbols are not > dynamic. > > 2001-02-07 Jakub Jelinek > * elflink.h (is_global_symbol_definition): Rename to > is_global_data_symbol_definition and have it reject function > symbols. > (elf_link_is_defined_archive_symbol): Use renamed function. > > 2001-02-07 Todd Vierling > * libbfd-in.h (bfd_target_vector): Change extern array to pointer. > * libbfd.h (bfd_target_vector): Likewise. > * targets.c (bfd_target_vector): Rename to _bfd_target_vector and > make static; create pointer reference named bfd_target_vector. > (_bfd_target_vector_entries): Calculate this based on the array > typed _bfd_target_vector. > > 2001-02-06 H.J. Lu > * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and > internal symbols are not dynamic. > * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise. > > 2001-02-06 Kazu Hirata > * elf-m10200.c: Fix formatting. > > 2001-02-01 Kazu Hirata > * elf-m10300.c: Fix formatting. > > 2001-06-10 Philip Blundell > > * configure.in: Set version to 2.11.1. > * configure: Regenerate. > > 2001-06-09 Philip Blundell > > * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last > change. > (elf32_arm_plt_entry): Likewise. > > 2001-06-07 Alan Modra > > * Most files: Update copyright notices. > > 2001-05-29 Andreas Jaeger > > * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64. > (elf64_x86_64_relocate_section): Likewise. > > 2001-05-28 Andreas Jaeger > > * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the > generic version since we want a hashsize of 4. > (elf_backend_size_info): Likewise. > > 2001-05-28 Nicolas Pitre > > * elf32-arm.h: Fix PLT generation for big endian ARM. > > 2001-05-28 Jeff Sturm > > * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64. > * bfd-in2.h: Regenerate. > * libbfd.h: Regenerate. > * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32 > and BFD_RELOC_SPARC_UA64 mapping > * elf64-sparc.c: Likewise. > > 2001-05-23 Alan Modra > > Merge from mainline. > 2001-05-17 Alan Modra > * elf32-hppa.c (hppa_build_one_stub): Add an assert to check > plt.offset. > > 2001-05-16 Alan Modra > * section.c (asection): Add linker_has_input field. > (STD_SECTION): Adjust initialization to suit. > * ecoff.c (bfd_debug_section): Likewise. > * bfd-in2.h: Regenerate. > > 2001-05-07 Thiemo Seufer > * ecoff.c (bfd_debug_section): Fix initialization. > > 2001-05-12 Peter Targett > * cpu-arc.c (arch_info_struct): Add entry 'base' representing old > name for 'arc5' core versions. > (bfd_arc_arch): Make bfd_mach_arc_6 default. > * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default > architecture. > (arc_elf_final_write_processing): Make bfd_mach_arc_6 default. > > 2001-05-08 Ian Lance Taylor > * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is > NULL or is not COFF. > (coff_i386_rtype_to_howto): Don't dump core if output section > owner is not COFF. > > 2001-04-13 Roger Sayle > * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section > flag on pe-i386 targets. > > 2001-04-26 H.J. Lu > * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is > valid. > > 2001-04-05 David Mosberger > * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an > ordinary "progbits" section. > > 2001-05-04 Richard Henderson > > * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true. > > 2001-04-30 Andreas Jaeger , Andreas Schwab > > * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for > R_X86_64_GOTPCREL, don't use assignments instead of comparisons. > > 2001-04-27 Andreas Jaeger > > * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap > out handled entries. > (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries. > (elf64_x86_64_relocate_section): Fix GOTPCREL calculation. > (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and > GOT32. > > 2001-04-30 Alan Modra > > * elf32-hppa.c (final_link_relocate): Branch to .+8 for > calls to undefined weak symbols. > > 2001-04-19 Andreas Jaeger > > * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions. > (elf64_x86_64_plt_entry): Likewise. > (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation. > (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation. > diff -rN binutils-2.11/bfd/Makefile.am binutils-2.11.2/bfd/Makefile.am 388d387 < peigen.c \ 423c422,423 < nlm64.lo --- > nlm64.lo \ > pepigen.lo 434d433 < elf64-ia64.c \ 472c471 < CFILES = \ --- > SOURCE_CFILES = \ 478a478,482 > BUILD_CFILES = \ > elf32-ia64.c elf64-ia64.c peigen.c pepigen.c > > CFILES = $(SOURCE_CFILES) $(BUILD_CFILES) > 488,496c492,517 < HFILES = \ < elf32-target.h elf64-target.h targmatch.h \ < $(SOURCE_HFILES) < < POTFILES = $(CFILES) $(SOURCE_HFILES) < < po/POTFILES.in: @MAINT@ Makefile < for file in $(POTFILES); do echo $$file; done | sort > tmp \ < && mv tmp $(srcdir)/po/POTFILES.in --- > ## ... and all .h files which are in the build tree. > BUILD_HFILES = \ > elf32-target.h elf64-target.h targmatch.h > > HFILES = $(SOURCE_HFILES) $(BUILD_HFILES) > > SRC_POTFILES = $(SOURCE_CFILES) $(SOURCE_HFILES) > BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES) > > po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES) > for file in $(SRC_POTFILES); do echo $$file; done | sort > tmp \ > && mv tmp $(srcdir)/po/SRC-POTFILES.in > > po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES) > for file in $(BLD_POTFILES); do echo $$file; done | sort > tmp \ > && mv tmp $(srcdir)/po/BLD-POTFILES.in > > # The following target is retained for upgrade purposes. > # This target used to exist in older versions of this makefile, and was > # referenced by /po/Makefile (which is created from /po/Make-in) > # So old versions of /po/Makefile will try to regenerate themselves > # when make is next run, but that dependency cannot be completed without a build > # of po/POTFILES.in. Hence the presence of this rule. This rule will be deleted > # once it is no longer needed - probably in the fall of 2001. > po/POTFILES.in: > 537a559 > $(RANLIB) libbfd.tmp; \ 580a603,612 > peigen.c : peXXigen.c > rm -f peigen.c > sed -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new > mv -f peigen.new peigen.c > > pepigen.c : peXXigen.c > rm -f pepigen.c > sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new > mv -f pepigen.new pepigen.c > 693,694c725 < MOSTLYCLEANFILES = elf32-target.h elf64-target.h ofiles stamp-ofiles \ < targmatch.h --- > MOSTLYCLEANFILES = ofiles stamp-ofiles 698a730,731 > DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) > 739a773,775 > dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(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 908,910d943 < dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(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 981,984d1013 < elf32-ia64.lo: elf32-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ < $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ < $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ < $(INCDIR)/elf/reloc-macros.h elf32-target.h 1188,1190d1216 < peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ < $(INCDIR)/coff/i386.h $(INCDIR)/coff/pe.h libcoff.h \ < $(INCDIR)/bfdlink.h libpei.h 1244a1271,1274 > elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \ > elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ > $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/x86-64.h \ > $(INCDIR)/elf/reloc-macros.h elf64-target.h 1252,1263c1282,1286 < elf64-hppa.lo: elf64-hppa.c $(INCDIR)/filenames.h elf-bfd.h \ < $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ < $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ < libhppa.h elf64-hppa.h elf-hppa.h elf64-target.h < elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ < $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ < $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ < $(INCDIR)/elf/reloc-macros.h elf64-target.h < elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h elf-bfd.h \ < $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ < $(INCDIR)/bfdlink.h $(INCDIR)/opcode/i386.h $(INCDIR)/elf/x86-64.h \ < $(INCDIR)/elf/reloc-macros.h elf64-target.h --- > elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \ > $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ > $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ > $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h libhppa.h \ > elf64-hppa.h elf-hppa.h elf64-target.h 1298a1322,1335 > elf32-ia64.lo: elf32-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ > $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ > $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ > $(INCDIR)/elf/reloc-macros.h elf32-target.h > elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ > $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ > $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ > $(INCDIR)/elf/reloc-macros.h elf64-target.h > peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ > $(INCDIR)/coff/i386.h $(INCDIR)/coff/pe.h libcoff.h \ > $(INCDIR)/bfdlink.h libpei.h > pepigen.lo: pepigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ > $(INCDIR)/coff/ia64.h $(INCDIR)/coff/pe.h libcoff.h \ > $(INCDIR)/bfdlink.h libpei.h diff -rN binutils-2.11/bfd/Makefile.in binutils-2.11.2/bfd/Makefile.in 147c147,152 < 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 dwarf2.lo --- > 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 \ > dwarf2.lo 150c155,160 < 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 dwarf2.c --- > 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 \ > dwarf2.c 155,158c165,248 < ALL_MACHINES = cpu-a29k.lo cpu-alpha.lo cpu-arc.lo cpu-arm.lo cpu-avr.lo cpu-cris.lo cpu-d10v.lo cpu-d30v.lo cpu-fr30.lo cpu-h8300.lo cpu-h8500.lo cpu-hppa.lo cpu-ia64.lo cpu-i370.lo cpu-i386.lo cpu-i860.lo cpu-i960.lo cpu-m32r.lo cpu-m68hc11.lo cpu-m68hc12.lo cpu-m68k.lo cpu-m88k.lo cpu-m10200.lo cpu-m10300.lo cpu-mcore.lo cpu-mips.lo cpu-ns32k.lo cpu-pj.lo cpu-powerpc.lo cpu-rs6000.lo cpu-sh.lo cpu-sparc.lo cpu-tic30.lo cpu-tic54x.lo cpu-tic80.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-avr.c cpu-cris.c cpu-d10v.c cpu-d30v.c cpu-fr30.c cpu-h8300.c cpu-h8500.c cpu-hppa.c cpu-ia64.c cpu-i370.c cpu-i386.c cpu-i860.c cpu-i960.c cpu-m32r.c cpu-m68hc11.c cpu-m68hc12.c cpu-m68k.c cpu-m88k.c cpu-m10200.c cpu-m10300.c cpu-mcore.c cpu-mips.c cpu-ns32k.c cpu-pj.c cpu-powerpc.c cpu-rs6000.c cpu-sh.c cpu-sparc.c cpu-tic30.c cpu-tic54x.c cpu-tic80.c cpu-v850.c cpu-vax.c cpu-we32k.c cpu-w65.c cpu-z8k.c --- > ALL_MACHINES = \ > cpu-a29k.lo \ > cpu-alpha.lo \ > cpu-arc.lo \ > cpu-arm.lo \ > cpu-avr.lo \ > cpu-cris.lo \ > cpu-d10v.lo \ > cpu-d30v.lo \ > cpu-fr30.lo \ > cpu-h8300.lo \ > cpu-h8500.lo \ > cpu-hppa.lo \ > cpu-ia64.lo \ > cpu-i370.lo \ > cpu-i386.lo \ > cpu-i860.lo \ > cpu-i960.lo \ > cpu-m32r.lo \ > cpu-m68hc11.lo \ > cpu-m68hc12.lo \ > cpu-m68k.lo \ > cpu-m88k.lo \ > cpu-m10200.lo \ > cpu-m10300.lo \ > cpu-mcore.lo \ > cpu-mips.lo \ > cpu-ns32k.lo \ > cpu-pj.lo \ > cpu-powerpc.lo \ > cpu-rs6000.lo \ > cpu-sh.lo \ > cpu-sparc.lo \ > cpu-tic30.lo \ > cpu-tic54x.lo \ > cpu-tic80.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-avr.c \ > cpu-cris.c \ > cpu-d10v.c \ > cpu-d30v.c \ > cpu-fr30.c \ > cpu-h8300.c \ > cpu-h8500.c \ > cpu-hppa.c \ > cpu-ia64.c \ > cpu-i370.c \ > cpu-i386.c \ > cpu-i860.c \ > cpu-i960.c \ > cpu-m32r.c \ > cpu-m68hc11.c \ > cpu-m68hc12.c \ > cpu-m68k.c \ > cpu-m88k.c \ > cpu-m10200.c \ > cpu-m10300.c \ > cpu-mcore.c \ > cpu-mips.c \ > cpu-ns32k.c \ > cpu-pj.c \ > cpu-powerpc.c \ > cpu-rs6000.c \ > cpu-sh.c \ > cpu-sparc.c \ > cpu-tic30.c \ > cpu-tic54x.c \ > cpu-tic80.c \ > cpu-v850.c \ > cpu-vax.c \ > cpu-we32k.c \ > cpu-w65.c \ > cpu-z8k.c 163,166c253,526 < BFD32_BACKENDS = aout-adobe.lo aout-arm.lo aout-cris.lo aout-ns32k.lo aout-sparcle.lo aout-tic30.lo aout0.lo aout32.lo armnetbsd.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-tic54x.lo coff-tic80.lo coff-u68k.lo coff-we32k.lo coff-w65.lo coff-z8k.lo cofflink.lo dwarf1.lo ecoff.lo ecofflink.lo efi-app-ia32.lo elf.lo elf32-arc.lo elfarm-oabi.lo elfarm-nabi.lo elf32-avr.lo elf32-cris.lo elf32-d10v.lo elf32-d30v.lo elf32-fr30.lo elf32-gen.lo elf32-hppa.lo elf32-i370.lo elf32-i386.lo elf32-i860.lo elf32-i960.lo elf32-ia64.lo elf32-m32r.lo elf32-m68hc11.lo elf32-m68hc12.lo elf32-m68k.lo elf32-m88k.lo elf-m10200.lo elf-m10300.lo elf32-mcore.lo elf32-mips.lo elf32-pj.lo elf32-ppc.lo elf32-sh.lo elf32-sh-lin.lo elf32-sparc.lo elf32-v850.lo elf32.lo elflink.lo epoc-pe-arm.lo epoc-pei-arm.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-mcore.lo pei-mcore.lo pe-ppc.lo pei-ppc.lo pe-sh.lo pei-sh.lo pe-mips.lo pei-mips.lo peigen.lo ppcboot.lo reloc16.lo riscix.lo sparclinux.lo sparclynx.lo sparcnetbsd.lo sunos.lo vaxnetbsd.lo versados.lo vms.lo vms-gsd.lo vms-hdr.lo vms-misc.lo vms-tir.lo xcofflink.lo < < < BFD32_BACKENDS_CFILES = aout-adobe.c aout-arm.c aout-cris.c aout-ns32k.c aout-sparcle.c aout-tic30.c aout0.c aout32.c armnetbsd.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-tic54x.c coff-tic80.c coff-u68k.c coff-we32k.c coff-w65.c coff-z8k.c cofflink.c dwarf1.c ecoff.c ecofflink.c efi-app-ia32.c elf.c elf32-arc.c elfarm-oabi.c elfarm-nabi.c elf32-avr.c elf32-cris.c elf32-d10v.c elf32-d30v.c elf32-fr30.c elf32-gen.c elf32-hppa.c elf32-i370.c elf32-i386.c elf32-i860.c elf32-i960.c elf32-m32r.c elf32-m68k.c elf32-m68hc11.c elf32-m68hc12.c elf32-m88k.c elf-m10200.c elf-m10300.c elf32-mcore.c elf32-mips.c elf32-pj.c elf32-ppc.c elf32-sh.c elf32-sh-lin.c elf32-sparc.c elf32-v850.c elf32.c elflink.c epoc-pe-arm.c epoc-pei-arm.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-mcore.c pei-mcore.c pe-ppc.c pei-ppc.c pe-sh.c pei-sh.c pe-mips.c pei-mips.c peigen.c ppcboot.c reloc16.c riscix.c sparclinux.c sparclynx.c sparcnetbsd.c sunos.c vaxnetbsd.c versados.c vms.c vms-gsd.c vms-hdr.c vms-misc.c vms-tir.c xcofflink.c --- > BFD32_BACKENDS = \ > aout-adobe.lo \ > aout-arm.lo \ > aout-cris.lo \ > aout-ns32k.lo \ > aout-sparcle.lo \ > aout-tic30.lo \ > aout0.lo \ > aout32.lo \ > armnetbsd.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-tic54x.lo \ > coff-tic80.lo \ > coff-u68k.lo \ > coff-we32k.lo \ > coff-w65.lo \ > coff-z8k.lo \ > cofflink.lo \ > dwarf1.lo \ > ecoff.lo \ > ecofflink.lo \ > efi-app-ia32.lo \ > elf.lo \ > elf32-arc.lo \ > elfarm-oabi.lo \ > elfarm-nabi.lo \ > elf32-avr.lo \ > elf32-cris.lo \ > elf32-d10v.lo \ > elf32-d30v.lo \ > elf32-fr30.lo \ > elf32-gen.lo \ > elf32-hppa.lo \ > elf32-i370.lo \ > elf32-i386.lo \ > elf32-i860.lo \ > elf32-i960.lo \ > elf32-ia64.lo \ > elf32-m32r.lo \ > elf32-m68hc11.lo \ > elf32-m68hc12.lo \ > elf32-m68k.lo \ > elf32-m88k.lo \ > elf-m10200.lo \ > elf-m10300.lo \ > elf32-mcore.lo \ > elf32-mips.lo \ > elf32-pj.lo \ > elf32-ppc.lo \ > elf32-sh.lo \ > elf32-sh-lin.lo \ > elf32-sparc.lo \ > elf32-v850.lo \ > elf32.lo \ > elflink.lo \ > epoc-pe-arm.lo \ > epoc-pei-arm.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-mcore.lo \ > pei-mcore.lo \ > pe-ppc.lo \ > pei-ppc.lo \ > pe-sh.lo \ > pei-sh.lo \ > pe-mips.lo \ > pei-mips.lo \ > peigen.lo \ > ppcboot.lo \ > reloc16.lo \ > riscix.lo \ > sparclinux.lo \ > sparclynx.lo \ > sparcnetbsd.lo \ > sunos.lo \ > vaxnetbsd.lo \ > versados.lo \ > vms.lo \ > vms-gsd.lo \ > vms-hdr.lo \ > vms-misc.lo \ > vms-tir.lo \ > xcofflink.lo > > > BFD32_BACKENDS_CFILES = \ > aout-adobe.c \ > aout-arm.c \ > aout-cris.c \ > aout-ns32k.c \ > aout-sparcle.c \ > aout-tic30.c \ > aout0.c \ > aout32.c \ > armnetbsd.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-tic54x.c \ > coff-tic80.c \ > coff-u68k.c \ > coff-we32k.c \ > coff-w65.c \ > coff-z8k.c \ > cofflink.c \ > dwarf1.c \ > ecoff.c \ > ecofflink.c \ > efi-app-ia32.c \ > elf.c \ > elf32-arc.c \ > elfarm-oabi.c \ > elfarm-nabi.c \ > elf32-avr.c \ > elf32-cris.c \ > elf32-d10v.c \ > elf32-d30v.c \ > elf32-fr30.c \ > elf32-gen.c \ > elf32-hppa.c \ > elf32-i370.c \ > elf32-i386.c \ > elf32-i860.c \ > elf32-i960.c \ > elf32-m32r.c \ > elf32-m68k.c \ > elf32-m68hc11.c \ > elf32-m68hc12.c \ > elf32-m88k.c \ > elf-m10200.c \ > elf-m10300.c \ > elf32-mcore.c \ > elf32-mips.c \ > elf32-pj.c \ > elf32-ppc.c \ > elf32-sh.c \ > elf32-sh-lin.c \ > elf32-sparc.c \ > elf32-v850.c \ > elf32.c \ > elflink.c \ > epoc-pe-arm.c \ > epoc-pei-arm.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-mcore.c \ > pei-mcore.c \ > pe-ppc.c \ > pei-ppc.c \ > pe-sh.c \ > pei-sh.c \ > pe-mips.c \ > pei-mips.c \ > ppcboot.c \ > reloc16.c \ > riscix.c \ > sparclinux.c \ > sparclynx.c \ > sparcnetbsd.c \ > sunos.c \ > vaxnetbsd.c \ > versados.c \ > vms.c \ > vms-gsd.c \ > vms-hdr.c \ > vms-misc.c \ > vms-tir.c \ > xcofflink.c 172,181c532,587 < BFD64_BACKENDS = aout64.lo coff-alpha.lo coff64-rs6000.lo demo64.lo efi-app-ia64.lo elf64-x86-64.lo elf64-alpha.lo elf64-hppa.lo elf64-ia64.lo elf64-gen.lo elf64-mips.lo elf64-sparc.lo elf64.lo nlm32-alpha.lo nlm64.lo < < < BFD64_BACKENDS_CFILES = aout64.c coff-alpha.c coff64-rs6000.c demo64.c efi-app-ia64.c elf64-x86-64.c elf64-alpha.c elf64-hppa.c elf64-ia64.c elf64-gen.c elf64-mips.c elf64-sparc.c elf64.c nlm32-alpha.c nlm64.c < < < OPTIONAL_BACKENDS = aix386-core.lo hpux-core.lo irix-core.lo lynx-core.lo osf-core.lo sco5-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 sco5-core.c trad-core.c cisco-core.c --- > BFD64_BACKENDS = \ > aout64.lo \ > coff-alpha.lo \ > coff64-rs6000.lo \ > demo64.lo \ > efi-app-ia64.lo \ > elf64-x86-64.lo \ > elf64-alpha.lo \ > elf64-hppa.lo \ > elf64-ia64.lo \ > elf64-gen.lo \ > elf64-mips.lo \ > elf64-sparc.lo \ > elf64.lo \ > nlm32-alpha.lo \ > nlm64.lo \ > pepigen.lo > > > BFD64_BACKENDS_CFILES = \ > aout64.c \ > coff-alpha.c \ > coff64-rs6000.c \ > demo64.c \ > efi-app-ia64.c \ > elf64-x86-64.c \ > elf64-alpha.c \ > elf64-hppa.c \ > elf64-gen.c \ > elf64-mips.c \ > elf64-sparc.c \ > elf64.c \ > nlm32-alpha.c \ > nlm64.c > > > OPTIONAL_BACKENDS = \ > aix386-core.lo \ > hpux-core.lo \ > irix-core.lo \ > lynx-core.lo \ > osf-core.lo \ > sco5-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 \ > sco5-core.c \ > trad-core.c \ > cisco-core.c 194c600,610 < CFILES = $(BFD_LIBS_CFILES) $(ALL_MACHINES_CFILES) $(BFD32_BACKENDS_CFILES) $(BFD64_BACKENDS_CFILES) $(OPTIONAL_BACKENDS_CFILES) --- > SOURCE_CFILES = \ > $(BFD_LIBS_CFILES) \ > $(ALL_MACHINES_CFILES) \ > $(BFD32_BACKENDS_CFILES) \ > $(BFD64_BACKENDS_CFILES) \ > $(OPTIONAL_BACKENDS_CFILES) > > > BUILD_CFILES = \ > elf32-ia64.c elf64-ia64.c peigen.c pepigen.c > 195a612 > CFILES = $(SOURCE_CFILES) $(BUILD_CFILES) 197c614,620 < SOURCE_HFILES = aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf64-hppa.h elfcode.h elfcore.h elflink.h freebsd.h genlink.h go32stub.h libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h xcoff-target.h --- > SOURCE_HFILES = \ > aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \ > elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf64-hppa.h \ > elfcode.h elfcore.h elflink.h freebsd.h genlink.h go32stub.h \ > libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \ > libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h \ > nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h xcoff-target.h 200c623,624 < HFILES = elf32-target.h elf64-target.h targmatch.h $(SOURCE_HFILES) --- > BUILD_HFILES = \ > elf32-target.h elf64-target.h targmatch.h 203c627,630 < POTFILES = $(CFILES) $(SOURCE_HFILES) --- > HFILES = $(SOURCE_HFILES) $(BUILD_HFILES) > > SRC_POTFILES = $(SOURCE_CFILES) $(SOURCE_HFILES) > BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES) 227c654,655 < 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 --- > 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 232c660 < MOSTLYCLEANFILES = elf32-target.h elf64-target.h ofiles stamp-ofiles targmatch.h --- > MOSTLYCLEANFILES = ofiles stamp-ofiles 233a662,663 > CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \ > stmp-bin2-h stmp-lbfd-h stmp-lcoff-h 235d664 < CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib stmp-bin2-h stmp-lbfd-h stmp-lcoff-h 236a666 > DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) 529c959 < cp -pr $$/$$file $(distdir)/$$file; \ --- > cp -pr $$d/$$file $(distdir)/$$file; \ 587a1018 > -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) 645,647c1076,1091 < po/POTFILES.in: @MAINT@ Makefile < for file in $(POTFILES); do echo $$file; done | sort > tmp \ < && mv tmp $(srcdir)/po/POTFILES.in --- > po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES) > for file in $(SRC_POTFILES); do echo $$file; done | sort > tmp \ > && mv tmp $(srcdir)/po/SRC-POTFILES.in > > po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES) > for file in $(BLD_POTFILES); do echo $$file; done | sort > tmp \ > && mv tmp $(srcdir)/po/BLD-POTFILES.in > > # The following target is retained for upgrade purposes. > # This target used to exist in older versions of this makefile, and was > # referenced by /po/Makefile (which is created from /po/Make-in) > # So old versions of /po/Makefile will try to regenerate themselves > # when make is next run, but that dependency cannot be completed without a build > # of po/POTFILES.in. Hence the presence of this rule. This rule will be deleted > # once it is no longer needed - probably in the fall of 2001. > po/POTFILES.in: 669a1114 > $(RANLIB) libbfd.tmp; \ 711a1157,1166 > > peigen.c : peXXigen.c > rm -f peigen.c > sed -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new > mv -f peigen.new peigen.c > > pepigen.c : peXXigen.c > rm -f pepigen.c > sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new > mv -f pepigen.new pepigen.c 855a1311,1313 > dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(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 1024,1026d1481 < dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(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 1097,1100d1551 < elf32-ia64.lo: elf32-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ < $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ < $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ < $(INCDIR)/elf/reloc-macros.h elf32-target.h 1304,1306d1754 < peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ < $(INCDIR)/coff/i386.h $(INCDIR)/coff/pe.h libcoff.h \ < $(INCDIR)/bfdlink.h libpei.h 1360a1809,1812 > elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \ > elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ > $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/x86-64.h \ > $(INCDIR)/elf/reloc-macros.h elf64-target.h 1368,1379c1820,1824 < elf64-hppa.lo: elf64-hppa.c $(INCDIR)/filenames.h elf-bfd.h \ < $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ < $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ < libhppa.h elf64-hppa.h elf-hppa.h elf64-target.h < elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ < $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ < $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ < $(INCDIR)/elf/reloc-macros.h elf64-target.h < elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h elf-bfd.h \ < $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ < $(INCDIR)/bfdlink.h $(INCDIR)/opcode/i386.h $(INCDIR)/elf/x86-64.h \ < $(INCDIR)/elf/reloc-macros.h elf64-target.h --- > elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \ > $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ > $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ > $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h libhppa.h \ > elf64-hppa.h elf-hppa.h elf64-target.h 1414a1860,1873 > elf32-ia64.lo: elf32-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ > $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ > $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ > $(INCDIR)/elf/reloc-macros.h elf32-target.h > elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ > $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ > $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ > $(INCDIR)/elf/reloc-macros.h elf64-target.h > peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ > $(INCDIR)/coff/i386.h $(INCDIR)/coff/pe.h libcoff.h \ > $(INCDIR)/bfdlink.h libpei.h > pepigen.lo: pepigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ > $(INCDIR)/coff/ia64.h $(INCDIR)/coff/pe.h libcoff.h \ > $(INCDIR)/bfdlink.h libpei.h diff -rN binutils-2.11/bfd/aclocal.m4 binutils-2.11.2/bfd/aclocal.m4 139,156d138 < #serial 1 < # This test replaces the one in autoconf. < # Currently this macro should have the same name as the autoconf macro < # because gettext's gettext.m4 (distributed in the automake package) < # still uses it. Otherwise, the use in gettext.m4 makes autoheader < # give these diagnostics: < # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX < # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX < < undefine([AC_ISC_POSIX]) < < AC_DEFUN(AC_ISC_POSIX, < [ < dnl This test replaces the obsolescent AC_ISC_POSIX kludge. < AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) < ] < ) < diff -rN binutils-2.11/bfd/aix386-core.c binutils-2.11.2/bfd/aix386-core.c 4c4 < Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 97, 98, 2000 --- > Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1996, 1998, 1999, 2000 diff -rN binutils-2.11/bfd/aout-adobe.c binutils-2.11.2/bfd/aout-adobe.c 2c2 < Copyright 1990, 91, 92, 93, 94, 95, 96, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000 diff -rN binutils-2.11/bfd/aout-arm.c binutils-2.11.2/bfd/aout-arm.c 2c2,3 < Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1997, 1998, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/aout-cris.c binutils-2.11.2/bfd/aout-cris.c 2c2 < Copyright (C) 2000 Free Software Foundation, Inc. --- > Copyright 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/aout-encap.c binutils-2.11.2/bfd/aout-encap.c 2c2 < Copyright (C) 1990, 1991 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1994, 1995, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/aout-ns32k.c binutils-2.11.2/bfd/aout-ns32k.c 2c2,3 < Copyright (C) 1990, 91, 92, 94, 95, 96, 1998 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/aout-sparcle.c binutils-2.11.2/bfd/aout-sparcle.c 2c2 < Copyright (C) 1996 Free Software Foundation, Inc. --- > Copyright 1996 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/aout-target.h binutils-2.11.2/bfd/aout-target.h 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 diff -rN binutils-2.11/bfd/aout-tic30.c binutils-2.11.2/bfd/aout-tic30.c 2c2 < Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/aout0.c binutils-2.11.2/bfd/aout0.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 1994 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/aout32.c binutils-2.11.2/bfd/aout32.c 2c2 < Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/aout64.c binutils-2.11.2/bfd/aout64.c 2c2 < Copyright 1990, 1991, 1992 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1994 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/aoutf1.h binutils-2.11.2/bfd/aoutf1.h 2c2 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000 diff -rN binutils-2.11/bfd/aoutx.h binutils-2.11.2/bfd/aoutx.h 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, > 2001 777a779 > case bfd_mach_mips12000: 2909c2911,2912 < if (bfd_get_format (abfd) != bfd_object) --- > if (bfd_get_format (abfd) != bfd_object > || abfd->tdata.aout_data == NULL) diff -rN binutils-2.11/bfd/archive.c binutils-2.11.2/bfd/archive.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000 diff -rN binutils-2.11/bfd/archures.c binutils-2.11.2/bfd/archures.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 81a83,86 > .#define bfd_mach_mcf5200 9 > .#define bfd_mach_mcf5206e 10 > .#define bfd_mach_mcf5307 11 > .#define bfd_mach_mcf5407 12 132a138 > .#define bfd_mach_mips12000 12000 849a856,871 > break; > case 5200: > arch = bfd_arch_m68k; > number = bfd_mach_mcf5200; > break; > case 5206: > arch = bfd_arch_m68k; > number = bfd_mach_mcf5206e; > break; > case 5307: > arch = bfd_arch_m68k; > number = bfd_mach_mcf5307; > break; > case 5407: > arch = bfd_arch_m68k; > number = bfd_mach_mcf5407; diff -rN binutils-2.11/bfd/armnetbsd.c binutils-2.11.2/bfd/armnetbsd.c 2c2 < Copyright (C) 1999 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/bfd-in.h binutils-2.11.2/bfd/bfd-in.h 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 diff -rN binutils-2.11/bfd/bfd-in2.h binutils-2.11.2/bfd/bfd-in2.h 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 1116a1118,1121 > /* Another mark flag used by some of the linker backends. Set for > output sections that have a input section. */ > unsigned int linker_has_input : 1; > 1350a1356,1359 > #define bfd_mach_mcf5200 9 > #define bfd_mach_mcf5206e 10 > #define bfd_mach_mcf5307 11 > #define bfd_mach_mcf5407 12 1401a1411 > #define bfd_mach_mips12000 12000 1899a1910 > BFD_RELOC_SPARC_UA16, 1900a1912 > BFD_RELOC_SPARC_UA64, 2051a2064,2074 > BFD_RELOC_MIPS_SHIFT5, > BFD_RELOC_MIPS_SHIFT6, > BFD_RELOC_MIPS_INSERT_A, > BFD_RELOC_MIPS_INSERT_B, > BFD_RELOC_MIPS_DELETE, > BFD_RELOC_MIPS_HIGHEST, > BFD_RELOC_MIPS_HIGHER, > BFD_RELOC_MIPS_SCN_DISP, > BFD_RELOC_MIPS_REL16, > BFD_RELOC_MIPS_RELGOT, > BFD_RELOC_MIPS_JALR, diff -rN binutils-2.11/bfd/bfd.c binutils-2.11.2/bfd/bfd.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 diff -rN binutils-2.11/bfd/binary.c binutils-2.11.2/bfd/binary.c 2c2,3 < Copyright 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/bout.c binutils-2.11.2/bfd/bout.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000 diff -rN binutils-2.11/bfd/cache.c binutils-2.11.2/bfd/cache.c 2c2 < Copyright 1990, 91, 92, 93, 94, 95, 1996, 2000, 2001 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001 diff -rN binutils-2.11/bfd/cf-i386lynx.c binutils-2.11.2/bfd/cf-i386lynx.c 2c2 < Copyright 1993, 1994 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cf-sparclynx.c binutils-2.11.2/bfd/cf-sparclynx.c 2c2 < Copyright 1993 Free Software Foundation, Inc. --- > Copyright 1993, 1994 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cisco-core.c binutils-2.11.2/bfd/cisco-core.c 3c3 < Copyright 1994 Free Software Foundation, Inc. --- > Copyright 1994, 1997, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coff-a29k.c binutils-2.11.2/bfd/coff-a29k.c 2c2 < Copyright 1990, 91, 92, 93, 94, 95, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001 diff -rN binutils-2.11/bfd/coff-alpha.c binutils-2.11.2/bfd/coff-alpha.c 2c2,3 < Copyright 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 130,136c131,137 < bfd *abfd; < arelent *reloc; < asymbol *sym; < PTR data; < asection *sec; < bfd *output_bfd; < char **error_message; --- > bfd *abfd ATTRIBUTE_UNUSED; > arelent *reloc ATTRIBUTE_UNUSED; > asymbol *sym ATTRIBUTE_UNUSED; > PTR data ATTRIBUTE_UNUSED; > asection *sec ATTRIBUTE_UNUSED; > bfd *output_bfd ATTRIBUTE_UNUSED; > char **error_message ATTRIBUTE_UNUSED; 475c476 < bfd *abfd; --- > bfd *abfd ATTRIBUTE_UNUSED; 710c711 < bfd *abfd; --- > bfd *abfd ATTRIBUTE_UNUSED; 1178c1179 < bfd *abfd; --- > bfd *abfd ATTRIBUTE_UNUSED; 1252c1253 < bfd *output_bfd; --- > bfd *output_bfd ATTRIBUTE_UNUSED; 2015c2016 < struct internal_aouthdr *ahdr; --- > struct internal_aouthdr *ahdr ATTRIBUTE_UNUSED; diff -rN binutils-2.11/bfd/coff-apollo.c binutils-2.11.2/bfd/coff-apollo.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 1997 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coff-arm.c binutils-2.11.2/bfd/coff-arm.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 855a857 > ASTD (BFD_RELOC_THUMB_PCREL_BLX, ARM_THUMB23); 1245,1250c1247,1258 < #if 0 /* We must not ignore the symbol value. If the symbol is < within the same section, the relocation should have already < been fixed, but if it is not, we'll be handed a reloc into < the beginning of the symbol's section, so we must not cancel < out the symbol's value, otherwise we'll be adding it in < twice. */ --- > /* FIXME - it is not clear which targets need this next test > and which do not. It is known that it is needed for the > VXworks target (hence the #ifdef), but it is also known > that it was supressed for other (arm) targets. This ought > to be sorted out one day. */ > #ifdef VXWORKS > /* We must not ignore the symbol value. If the symbol is > within the same section, the relocation should have already > been fixed, but if it is not, we'll be handed a reloc into > the beginning of the symbol's section, so we must not cancel > out the symbol's value, otherwise we'll be adding it in > twice. */ 1590c1598 < /* howto->pc_relative should be TRUE for type 14 BRANCH23 */ --- > /* howto->pc_relative should be TRUE for type 14 BRANCH23. */ 1594c1602 < /* howto->pcrel_offset should be TRUE for type 14 BRANCH23 */ --- > /* howto->pcrel_offset should be TRUE for type 14 BRANCH23. */ 1600d1607 < /* Drop unwanted bits from the value we are relocating to. */ 1601a1609 > /* Drop unwanted bits from the value we are relocating to. */ 1615,1617c1623 < { < add = (((x) & 0x07ff0000) >> 4) | (((x) & 0x7ff) << 1); < } --- > add = (((x) & 0x07ff0000) >> 4) | (((x) & 0x7ff) << 1); 1619,1621c1625 < { < add = ((((x) & 0x7ff) << 12) | (((x) & 0x07ff0000) >> 15)); < } --- > add = ((((x) & 0x7ff) << 12) | (((x) & 0x07ff0000) >> 15)); 1631d1634 < 1636a1640 > /* howto->bitpos == 0 */ 1639,1640d1642 < /* howto->bitpos == 0 */ < 1642c1644 < relocation += signed_add; --- > relocation += signed_add; 1651c1653,1661 < /* Put RELOCATION into the correct bits: */ --- > /* For the BLX(1) instruction remove bit 0 of the adjusted offset. > Bit 0 can only be set if the upper insn is at a half-word boundary, > since the destination address, an ARM instruction, must always be > on a word boundary. The semantics of the BLX (1) instruction, > however, are that bit 0 in the offset must always be 0, and the > corresponding bit 1 in the target address will be set from bit > 1 of the source address. */ > if ((x & 0x18000000) == 0x08000000) > relocation &= ~0x2; 1652a1663 > /* Put the relocation into the correct bits. */ 1654,1656c1665 < { < relocation = (((relocation & 0xffe) >> 1) | ((relocation << 4) & 0x07ff0000)); < } --- > relocation = (((relocation & 0xffe) >> 1) | ((relocation << 4) & 0x07ff0000)); 1658,1660c1667 < { < relocation = (((relocation & 0xffe) << 15) | ((relocation >> 12) & 0x7ff)); < } --- > relocation = (((relocation & 0xffe) << 15) | ((relocation >> 12) & 0x7ff)); 1662c1669 < /* Add RELOCATION to the correct bits of X: */ --- > /* Add the relocation to the correct bits of X. */ 1665c1672 < /* Put the relocated value back in the object file: */ --- > /* Put the relocated value back in the object file. */ diff -rN binutils-2.11/bfd/coff-aux.c binutils-2.11.2/bfd/coff-aux.c 2c2 < Copyright 1996, 1997 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coff-go32.c binutils-2.11.2/bfd/coff-go32.c 2,3c2,3 < Copyright 1990, 91, 92, 93, 94, 1999, 2000, < 2001 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994, 1999, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coff-h8300.c binutils-2.11.2/bfd/coff-h8300.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000 diff -rN binutils-2.11/bfd/coff-h8500.c binutils-2.11.2/bfd/coff-h8500.c 2c2,3 < Copyright 1993, 94, 95, 1997 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1997, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coff-i386.c binutils-2.11.2/bfd/coff-i386.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 131c132,134 < if (reloc_entry->howto->type == R_IMAGEBASE) --- > if (reloc_entry->howto->type == R_IMAGEBASE > && output_bfd != NULL > && bfd_get_flavour(output_bfd) == bfd_target_coff_flavour) 491c494,496 < if (rel->r_type == R_IMAGEBASE) --- > if (rel->r_type == R_IMAGEBASE > && (bfd_get_flavour(sec->output_section->owner) > == bfd_target_coff_flavour)) 578c583 < | SEC_LINK_ONCE | SEC_LINK_DUPLICATES --- > | SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY diff -rN binutils-2.11/bfd/coff-i860.c binutils-2.11.2/bfd/coff-i860.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 97, 1999 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coff-i960.c binutils-2.11.2/bfd/coff-i960.c 2c2 < Copyright (C) 1990, 91, 92, 93, 94, 95, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000 diff -rN binutils-2.11/bfd/coff-ia64.c binutils-2.11.2/bfd/coff-ia64.c 2c2 < Copyright 1999 Free Software Foundation, Inc. --- > Copyright 1999, 2000, 2001 Free Software Foundation, Inc. 24d23 < 26d24 < 28d25 < 30d26 < 46c42 < #ifdef COFF_WITH_PEP64 --- > #ifdef COFF_WITH_pep 48,49c44,45 < # define AOUTSZ PEP64AOUTSZ < # define PEAOUTHDR PEP64AOUTHDR --- > # define AOUTSZ PEPAOUTSZ > # define PEAOUTHDR PEPAOUTHDR 75,82d70 < /* 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. */ 84c72,73 < bfd_byte ext_offset[4]; --- > struct external_PEI_DOS_hdr dos_hdr; > struct external_PEI_IMAGE_hdr image_hdr; 86,87d74 < bfd_byte ext_signature[4]; < unsigned long signature; 89,90c76,78 < if (bfd_seek (abfd, 0x3c, SEEK_SET) != 0 < || bfd_read (ext_offset, 1, 4, abfd) != 4) --- > if (bfd_seek (abfd, 0x00, SEEK_SET) != 0 > || bfd_read (&dos_hdr, 1, sizeof (dos_hdr), abfd) > != sizeof (dos_hdr)) 96,98c84,104 < offset = bfd_h_get_32 (abfd, ext_offset); < if (bfd_seek (abfd, offset, SEEK_SET) != 0 < || bfd_read (ext_signature, 1, 4, abfd) != 4) --- > > /* There are really two magic numbers involved; the magic number > that says this is a NT executable (PEI) and the magic number > that determines the architecture. The former is DOSMAGIC, > stored in the e_magic field. The latter is stored in the > f_magic field. If the NT magic number isn't valid, the > architecture magic number could be mimicked by some other > field (specifically, the number of relocs in section 3). Since > this routine can only be called correctly for a PEI file, check > the e_magic number here, and, if it doesn't match, clobber the > f_magic number so that we don't get a false match. */ > if (bfd_h_get_16 (abfd, (bfd_byte *) dos_hdr.e_magic) != DOSMAGIC) > { > bfd_set_error (bfd_error_wrong_format); > return NULL; > } > > offset = bfd_h_get_32 (abfd, (bfd_byte *) dos_hdr.e_lfanew); > if (bfd_seek (abfd, (file_ptr) offset, SEEK_SET) != 0 > || bfd_read (&image_hdr, 1, sizeof (image_hdr), abfd) > != sizeof (image_hdr)) 104d109 < signature = bfd_h_get_32 (abfd, ext_signature); 106c111,112 < if (signature != 0x4550) --- > if (bfd_h_get_32 (abfd, (bfd_byte *) image_hdr.nt_signature) > != 0x4550) 113,115c119,120 < pick up the COFF header. We adjust so that that will work. 20 < is the size of the COFF filehdr. */ < --- > pick up the COFF header for PE, see "struct external_PEI_filehdr" > in include/coff/pe.h. We adjust so that that will work. */ 117,119c122 < (bfd_tell (abfd) < - bfd_coff_filhsz (abfd) < + 20), --- > (file_ptr) (offset - sizeof (dos_hdr)), diff -rN binutils-2.11/bfd/coff-m68k.c binutils-2.11.2/bfd/coff-m68k.c 2c2 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000 diff -rN binutils-2.11/bfd/coff-m88k.c binutils-2.11.2/bfd/coff-m88k.c 2c2 < Copyright 1990, 91, 92, 93, 94, 95, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000 diff -rN binutils-2.11/bfd/coff-mcore.c binutils-2.11.2/bfd/coff-mcore.c 2c2 < Copyright (C) 1999 Free Software Foundation, Inc. --- > Copyright 1999, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coff-mips.c binutils-2.11.2/bfd/coff-mips.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 diff -rN binutils-2.11/bfd/coff-pmac.c binutils-2.11.2/bfd/coff-pmac.c 2c2 < Copyright 1995 Free Software Foundation, Inc. --- > Copyright 1995, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coff-ppc.c binutils-2.11.2/bfd/coff-ppc.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 diff -rN binutils-2.11/bfd/coff-rs6000.c binutils-2.11.2/bfd/coff-rs6000.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 diff -rN binutils-2.11/bfd/coff-sh.c binutils-2.11.2/bfd/coff-sh.c 2c2,3 < Copyright 1993, 94, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coff-sparc.c binutils-2.11.2/bfd/coff-sparc.c 2c2 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000 diff -rN binutils-2.11/bfd/coff-tic30.c binutils-2.11.2/bfd/coff-tic30.c 2c2 < Copyright (C) 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coff-tic54x.c binutils-2.11.2/bfd/coff-tic54x.c 2c2 < Copyright (C) 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coff-tic80.c binutils-2.11.2/bfd/coff-tic80.c 2c2 < Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coff-w65.c binutils-2.11.2/bfd/coff-w65.c 2c2 < Copyright 1995, 96, 1997 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coff-we32k.c binutils-2.11.2/bfd/coff-we32k.c 2c2 < Copyright (C) 1992, 93, 94, 95, 97, 1999 Free Software Foundation, Inc. --- > Copyright 1992, 1993, 1994, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coff-z8k.c binutils-2.11.2/bfd/coff-z8k.c 2c2,3 < Copyright 1992, 93, 94, 95, 1997 Free Software Foundation, Inc. --- > Copyright 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coff64-rs6000.c binutils-2.11.2/bfd/coff64-rs6000.c 2c2 < Copyright 2000 --- > Copyright 2000, 2001 diff -rN binutils-2.11/bfd/coffcode.h binutils-2.11.2/bfd/coffcode.h 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 341a343,345 > #ifdef COFF_WITH_PE > static flagword handle_COMDAT PARAMS ((bfd *, flagword, PTR, const char *, asection *)); > #endif 701,709d704 < /* The PE version; see above for the general comments. < < Since to set the SEC_LINK_ONCE and associated flags, we have to < look at the symbol table anyway, we return the symbol table index < of the symbol being used as the COMDAT symbol. This is admittedly < ugly, but there's really nowhere else that we have access to the < required information. FIXME: Is the COMDAT symbol index used for < any purpose other than objdump? */ < 711,712c706,708 < styp_to_sec_flags (abfd, hdr, name, section) < bfd *abfd ATTRIBUTE_UNUSED; --- > handle_COMDAT (abfd, sec_flags, hdr, name, section) > bfd * abfd; > flagword sec_flags; 718,719c714,747 < long styp_flags = internal_s->s_flags; < flagword sec_flags = 0; --- > bfd_byte *esymstart, *esym, *esymend; > int seen_state = 0; > char *target_name = NULL; > > sec_flags |= SEC_LINK_ONCE; > > /* Unfortunately, the PE format stores essential information in > the symbol table, of all places. We need to extract that > information now, so that objdump and the linker will know how > to handle the section without worrying about the symbols. We > can't call slurp_symtab, because the linker doesn't want the > swapped symbols. */ > > /* COMDAT sections are special. The first symbol is the section > symbol, which tells what kind of COMDAT section it is. The > second symbol is the "comdat symbol" - the one with the > unique name. GNU uses the section symbol for the unique > name; MS uses ".text" for every comdat section. Sigh. - DJ */ > > /* This is not mirrored in sec_to_styp_flags(), but there > doesn't seem to be a need to, either, and it would at best be > rather messy. */ > > if (! _bfd_coff_get_external_symbols (abfd)) > return sec_flags; > > esymstart = esym = (bfd_byte *) obj_coff_external_syms (abfd); > esymend = esym + obj_raw_syment_count (abfd) * bfd_coff_symesz (abfd); > > while (esym < esymend) > { > struct internal_syment isym; > char buf[SYMNMLEN + 1]; > const char *symname; 721,803c749 < if (styp_flags & STYP_DSECT) < abort (); /* Don't know what to do */ < #ifdef SEC_NEVER_LOAD < if (styp_flags & STYP_NOLOAD) < sec_flags |= SEC_NEVER_LOAD; < #endif < if (styp_flags & STYP_GROUP) < abort (); /* Don't know what to do */ < /* skip IMAGE_SCN_TYPE_NO_PAD */ < if (styp_flags & STYP_COPY) < abort (); /* Don't know what to do */ < if (styp_flags & IMAGE_SCN_CNT_CODE) < sec_flags |= SEC_CODE | SEC_ALLOC | SEC_LOAD; < if (styp_flags & IMAGE_SCN_CNT_INITIALIZED_DATA) < sec_flags |= SEC_DATA | SEC_ALLOC | SEC_LOAD; < if (styp_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) < sec_flags |= SEC_ALLOC; < if (styp_flags & IMAGE_SCN_LNK_OTHER) < abort (); /* Don't know what to do */ < if (styp_flags & IMAGE_SCN_LNK_INFO) < { < /* We mark these as SEC_DEBUGGING, but only if COFF_PAGE_SIZE is < defined. coff_compute_section_file_positions uses < COFF_PAGE_SIZE to ensure that the low order bits of the < 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 < sec_flags |= SEC_DEBUGGING; < #endif < } < if (styp_flags & STYP_OVER) < abort (); /* Don't know what to do */ < if (styp_flags & IMAGE_SCN_LNK_REMOVE) < sec_flags |= SEC_EXCLUDE; < < if (styp_flags & IMAGE_SCN_MEM_SHARED) < sec_flags |= SEC_SHARED; < /* COMDAT: see below */ < if (styp_flags & IMAGE_SCN_MEM_DISCARDABLE) < sec_flags |= SEC_DEBUGGING; < if (styp_flags & IMAGE_SCN_MEM_NOT_CACHED) < abort ();/* Don't know what to do */ < if (styp_flags & IMAGE_SCN_MEM_NOT_PAGED) < abort (); /* Don't know what to do */ < < /* We infer from the distinct read/write/execute bits the settings < of some of the bfd flags; the actual values, should we need them, < are also in pei_section_data (abfd, section)->pe_flags. */ < < if (styp_flags & IMAGE_SCN_MEM_EXECUTE) < sec_flags |= SEC_CODE; /* Probably redundant */ < /* IMAGE_SCN_MEM_READ is simply ignored, assuming it always to be true. */ < if ((styp_flags & IMAGE_SCN_MEM_WRITE) == 0) < sec_flags |= SEC_READONLY; < < /* COMDAT gets very special treatment. */ < if (styp_flags & IMAGE_SCN_LNK_COMDAT) < { < sec_flags |= SEC_LINK_ONCE; < < /* Unfortunately, the PE format stores essential information in < the symbol table, of all places. We need to extract that < information now, so that objdump and the linker will know how < to handle the section without worrying about the symbols. We < can't call slurp_symtab, because the linker doesn't want the < swapped symbols. */ < < /* COMDAT sections are special. The first symbol is the section < symbol, which tells what kind of COMDAT section it is. The < second symbol is the "comdat symbol" - the one with the < unique name. GNU uses the section symbol for the unique < name; MS uses ".text" for every comdat section. Sigh. - DJ */ < < /* This is not mirrored in sec_to_styp_flags(), but there < doesn't seem to be a need to, either, and it would at best be < rather messy. */ < < if (_bfd_coff_get_external_symbols (abfd)) < { < bfd_byte *esymstart, *esym, *esymend; < int seen_state = 0; < char *target_name = NULL; --- > bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &isym); 805,806c751,782 < esymstart = esym = (bfd_byte *) obj_coff_external_syms (abfd); < esymend = esym + obj_raw_syment_count (abfd) * bfd_coff_symesz (abfd); --- > if (sizeof (internal_s->s_name) > SYMNMLEN) > { > /* This case implies that the matching > symbol name will be in the string table. */ > abort (); > } > > if (isym.n_scnum == section->target_index) > { > /* According to the MSVC documentation, the first > TWO entries with the section # are both of > interest to us. The first one is the "section > symbol" (section name). The second is the comdat > symbol name. Here, we've found the first > qualifying entry; we distinguish it from the > second with a state flag. > > In the case of gas-generated (at least until that > is fixed) .o files, it isn't necessarily the > second one. It may be some other later symbol. > > Since gas also doesn't follow MS conventions and > emits the section similar to .text$, where > is the name we're looking for, we > distinguish the two as follows: > > If the section name is simply a section name (no > $) we presume it's MS-generated, and look at > precisely the second symbol for the comdat name. > If the section name has a $, we assume it's > gas-generated, and look for (whatever > follows the $) as the comdat symbol. */ 808c784,790 < while (esym < esymend) --- > /* All 3 branches use this */ > symname = _bfd_coff_internal_syment_name (abfd, &isym, buf); > > if (symname == NULL) > abort (); > > switch (seen_state) 810,812c792,795 < struct internal_syment isym; < char buf[SYMNMLEN + 1]; < const char *symname; --- > case 0: > { > /* The first time we've seen the symbol. */ > union internal_auxent aux; 814c797 < bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &isym); --- > seen_state = 1; 816,819c799,817 < if (sizeof (internal_s->s_name) > SYMNMLEN) < { < /* This case implies that the matching symbol name < will be in the string table. */ --- > /* If it isn't the stuff we're expecting, die; > The MS documentation is vague, but it > appears that the second entry serves BOTH > as the comdat symbol and the defining > symbol record (either C_STAT or C_EXT, > possibly with an aux entry with debug > information if it's a function.) It > appears the only way to find the second one > is to count. (On Intel, they appear to be > adjacent, but on Alpha, they have been > found separated.) > > Here, we think we've found the first one, > but there's some checking we can do to be > sure. */ > > if (! (isym.n_sclass == C_STAT > && isym.n_type == T_NULL > && isym.n_value == 0)) 821d818 < } 823,926c820,860 < if (isym.n_scnum == section->target_index) < { < /* According to the MSVC documentation, the first < TWO entries with the section # are both of < interest to us. The first one is the "section < symbol" (section name). The second is the comdat < symbol name. Here, we've found the first < qualifying entry; we distinguish it from the < second with a state flag. < < In the case of gas-generated (at least until that < is fixed) .o files, it isn't necessarily the < second one. It may be some other later symbol. < < Since gas also doesn't follow MS conventions and < emits the section similar to .text$, where < is the name we're looking for, we < distinguish the two as follows: < < If the section name is simply a section name (no < $) we presume it's MS-generated, and look at < precisely the second symbol for the comdat name. < If the section name has a $, we assume it's < gas-generated, and look for (whatever < follows the $) as the comdat symbol. */ < < /* All 3 branches use this */ < symname = _bfd_coff_internal_syment_name (abfd, &isym, buf); < < if (symname == NULL) < abort (); < < switch (seen_state) < { < case 0: < { < /* The first time we've seen the symbol. */ < union internal_auxent aux; < < seen_state = 1; < < /* If it isn't the stuff we're expecting, die; < The MS documentation is vague, but it < appears that the second entry serves BOTH < as the comdat symbol and the defining < symbol record (either C_STAT or C_EXT, < possibly with an aux entry with debug < information if it's a function.) It < appears the only way to find the second one < is to count. (On Intel, they appear to be < adjacent, but on Alpha, they have been < found separated.) < < Here, we think we've found the first one, < but there's some checking we can do to be < sure. */ < < if (! (isym.n_sclass == C_STAT < && isym.n_type == T_NULL < && isym.n_value == 0)) < abort (); < < /* FIXME LATER: MSVC generates section names < like .text for comdats. Gas generates < names like .text$foo__Fv (in the case of a < function). See comment above for more. */ < < if (strcmp (name, symname) != 0) < abort (); < < /* This is the section symbol. */ < < bfd_coff_swap_aux_in (abfd, (PTR) (esym + bfd_coff_symesz (abfd)), < isym.n_type, isym.n_sclass, < 0, isym.n_numaux, (PTR) &aux); < < target_name = strchr (name, '$'); < if (target_name != NULL) < { < /* Gas mode. */ < seen_state = 2; < /* Skip the `$'. */ < target_name += 1; < } < < /* FIXME: Microsoft uses NODUPLICATES and < ASSOCIATIVE, but gnu uses ANY and < SAME_SIZE. Unfortunately, gnu doesn't do < the comdat symbols right. So, until we can < fix it to do the right thing, we are < temporarily disabling comdats for the MS < types (they're used in DLLs and C++, but we < don't support *their* C++ libraries anyway < - DJ. */ < < /* Cygwin does not follow the MS style, and < uses ANY and SAME_SIZE where NODUPLICATES < and ASSOCIATIVE should be used. For < Interix, we just do the right thing up < front. */ < < switch (aux.x_scn.x_comdat) < { < case IMAGE_COMDAT_SELECT_NODUPLICATES: --- > /* FIXME LATER: MSVC generates section names > like .text for comdats. Gas generates > names like .text$foo__Fv (in the case of a > function). See comment above for more. */ > > if (strcmp (name, symname) != 0) > abort (); > > /* This is the section symbol. */ > bfd_coff_swap_aux_in (abfd, (PTR) (esym + bfd_coff_symesz (abfd)), > isym.n_type, isym.n_sclass, > 0, isym.n_numaux, (PTR) &aux); > > target_name = strchr (name, '$'); > if (target_name != NULL) > { > /* Gas mode. */ > seen_state = 2; > /* Skip the `$'. */ > target_name += 1; > } > > /* FIXME: Microsoft uses NODUPLICATES and > ASSOCIATIVE, but gnu uses ANY and > SAME_SIZE. Unfortunately, gnu doesn't do > the comdat symbols right. So, until we can > fix it to do the right thing, we are > temporarily disabling comdats for the MS > types (they're used in DLLs and C++, but we > don't support *their* C++ libraries anyway > - DJ. */ > > /* Cygwin does not follow the MS style, and > uses ANY and SAME_SIZE where NODUPLICATES > and ASSOCIATIVE should be used. For > Interix, we just do the right thing up > front. */ > > switch (aux.x_scn.x_comdat) > { > case IMAGE_COMDAT_SELECT_NODUPLICATES: 928c862 < sec_flags |= SEC_LINK_DUPLICATES_ONE_ONLY; --- > sec_flags |= SEC_LINK_DUPLICATES_ONE_ONLY; 930c864 < sec_flags &= ~SEC_LINK_ONCE; --- > sec_flags &= ~SEC_LINK_ONCE; 932c866 < break; --- > break; 934,936c868,870 < case IMAGE_COMDAT_SELECT_ANY: < sec_flags |= SEC_LINK_DUPLICATES_DISCARD; < break; --- > case IMAGE_COMDAT_SELECT_ANY: > sec_flags |= SEC_LINK_DUPLICATES_DISCARD; > break; 938,940c872,874 < case IMAGE_COMDAT_SELECT_SAME_SIZE: < sec_flags |= SEC_LINK_DUPLICATES_SAME_SIZE; < break; --- > case IMAGE_COMDAT_SELECT_SAME_SIZE: > sec_flags |= SEC_LINK_DUPLICATES_SAME_SIZE; > break; 942,945c876,879 < case IMAGE_COMDAT_SELECT_EXACT_MATCH: < /* Not yet fully implemented ??? */ < sec_flags |= SEC_LINK_DUPLICATES_SAME_CONTENTS; < break; --- > case IMAGE_COMDAT_SELECT_EXACT_MATCH: > /* Not yet fully implemented ??? */ > sec_flags |= SEC_LINK_DUPLICATES_SAME_CONTENTS; > break; 947,948c881,882 < /* debug$S gets this case; other < implications ??? */ --- > /* debug$S gets this case; other > implications ??? */ 950,954c884,888 < /* There may be no symbol... we'll search < the whole table... Is this the right < place to play this game? Or should we do < it when reading it in. */ < case IMAGE_COMDAT_SELECT_ASSOCIATIVE: --- > /* There may be no symbol... we'll search > the whole table... Is this the right > place to play this game? Or should we do > it when reading it in. */ > case IMAGE_COMDAT_SELECT_ASSOCIATIVE: 956,957c890,891 < /* FIXME: This is not currently implemented. */ < sec_flags |= SEC_LINK_DUPLICATES_DISCARD; --- > /* FIXME: This is not currently implemented. */ > sec_flags |= SEC_LINK_DUPLICATES_DISCARD; 959c893 < sec_flags &= ~SEC_LINK_ONCE; --- > sec_flags &= ~SEC_LINK_ONCE; 961c895 < break; --- > break; 963,970c897,904 < default: /* 0 means "no symbol" */ < /* debug$F gets this case; other < implications ??? */ < sec_flags |= SEC_LINK_DUPLICATES_DISCARD; < break; < } < } < break; --- > default: /* 0 means "no symbol" */ > /* debug$F gets this case; other > implications ??? */ > sec_flags |= SEC_LINK_DUPLICATES_DISCARD; > break; > } > } > break; 972,973c906,907 < case 2: < /* Gas mode: the first matching on partial name. */ --- > case 2: > /* Gas mode: the first matching on partial name. */ 978,1007c912,925 < /* Is this the name we're looking for? */ < if (strcmp (target_name, < symname + (TARGET_UNDERSCORE ? 1 : 0)) != 0) < { < /* Not the name we're looking for */ < esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd); < continue; < } < /* Fall through. */ < case 1: < /* MSVC mode: the lexically second symbol (or < drop through from the above). */ < { < char *newname; < < /* This must the the second symbol with the < section #. It is the actual symbol name. < Intel puts the two adjacent, but Alpha (at < least) spreads them out. */ < < section->comdat = < bfd_alloc (abfd, sizeof (struct bfd_comdat_info)); < if (section->comdat == NULL) < abort (); < section->comdat->symbol = < (esym - esymstart) / bfd_coff_symesz (abfd); < < newname = bfd_alloc (abfd, strlen (symname) + 1); < if (newname == NULL) < abort (); --- > /* Is this the name we're looking for? */ > if (strcmp (target_name, > symname + (TARGET_UNDERSCORE ? 1 : 0)) != 0) > { > /* Not the name we're looking for */ > esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd); > continue; > } > /* Fall through. */ > case 1: > /* MSVC mode: the lexically second symbol (or > drop through from the above). */ > { > char *newname; 1009,1010c927,935 < strcpy (newname, symname); < section->comdat->name = newname; --- > /* This must the the second symbol with the > section #. It is the actual symbol name. > Intel puts the two adjacent, but Alpha (at > least) spreads them out. */ > > section->comdat = > bfd_alloc (abfd, sizeof (struct bfd_comdat_info)); > if (section->comdat == NULL) > abort (); 1012c937,938 < } --- > section->comdat->symbol = > (esym - esymstart) / bfd_coff_symesz (abfd); 1014,1016c940,942 < goto breakloop; < } < } --- > newname = bfd_alloc (abfd, strlen (symname) + 1); > if (newname == NULL) > abort (); 1018c944,948 < esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd); --- > strcpy (newname, symname); > section->comdat->name = newname; > } > > goto breakloop; 1020,1022d949 < breakloop: < /* SunOS requires a statement after any label. */ < ; 1023a951,1080 > > esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd); > } > > breakloop: > return sec_flags; > } > > > /* The PE version; see above for the general comments. > > Since to set the SEC_LINK_ONCE and associated flags, we have to > look at the symbol table anyway, we return the symbol table index > of the symbol being used as the COMDAT symbol. This is admittedly > ugly, but there's really nowhere else that we have access to the > required information. FIXME: Is the COMDAT symbol index used for > any purpose other than objdump? */ > > static flagword > styp_to_sec_flags (abfd, hdr, name, section) > bfd *abfd; > PTR hdr; > const char *name; > asection *section; > { > struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr; > long styp_flags = internal_s->s_flags; > flagword sec_flags; > > /* Assume read only unless IMAGE_SCN_MEM_WRITE is specified. */ > sec_flags = SEC_READONLY; > > /* Process each flag bit in styp_flags in turn. */ > while (styp_flags) > { > long flag = styp_flags & - styp_flags; > char * unhandled = NULL; > > styp_flags &= ~ flag; > > /* We infer from the distinct read/write/execute bits the settings > of some of the bfd flags; the actual values, should we need them, > are also in pei_section_data (abfd, section)->pe_flags. */ > > switch (flag) > { > case STYP_DSECT: > unhandled = "STYP_DSECT"; > break; > case STYP_GROUP: > unhandled = "STYP_GROUP"; > break; > case STYP_COPY: > unhandled = "STYP_COPY"; > break; > case STYP_OVER: > unhandled = "STYP_OVER"; > break; > #ifdef SEC_NEVER_LOAD > case STYP_NOLOAD: > sec_flags |= SEC_NEVER_LOAD; > break; > #endif > case IMAGE_SCN_MEM_READ: > /* Ignored, assume it always to be true. */ > break; > case IMAGE_SCN_TYPE_NO_PAD: > /* Skip. */ > break; > case IMAGE_SCN_LNK_OTHER: > unhandled = "IMAGE_SCN_LNK_OTHER"; > break; > case IMAGE_SCN_MEM_NOT_CACHED: > unhandled = "IMAGE_SCN_MEM_NOT_CACHED"; > break; > case IMAGE_SCN_MEM_NOT_PAGED: > unhandled = "IMAGE_SCN_MEM_NOT_PAGED"; > break; > case IMAGE_SCN_MEM_EXECUTE: > sec_flags |= SEC_CODE; > break; > case IMAGE_SCN_MEM_WRITE: > sec_flags &= ~ SEC_READONLY; > break; > case IMAGE_SCN_MEM_DISCARDABLE: > sec_flags |= SEC_DEBUGGING; > break; > case IMAGE_SCN_MEM_SHARED: > sec_flags |= SEC_SHARED; > break; > case IMAGE_SCN_LNK_REMOVE: > sec_flags |= SEC_EXCLUDE; > break; > case IMAGE_SCN_CNT_CODE: > sec_flags |= SEC_CODE | SEC_ALLOC | SEC_LOAD; > break; > case IMAGE_SCN_CNT_INITIALIZED_DATA: > sec_flags |= SEC_DATA | SEC_ALLOC | SEC_LOAD; > break; > case IMAGE_SCN_CNT_UNINITIALIZED_DATA: > sec_flags |= SEC_ALLOC; > break; > case IMAGE_SCN_LNK_INFO: > /* We mark these as SEC_DEBUGGING, but only if COFF_PAGE_SIZE is > defined. coff_compute_section_file_positions uses > COFF_PAGE_SIZE to ensure that the low order bits of the > 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 > sec_flags |= SEC_DEBUGGING; > #endif > break; > case IMAGE_SCN_LNK_COMDAT: > /* COMDAT gets very special treatment. */ > sec_flags = handle_COMDAT (abfd, sec_flags, hdr, name, section); > break; > default: > /* Silently ignore for now. */ > break; > } > > /* If the section flag was not handled, report it here. This will allow > users of the BFD library to report a problem but continue executing. > Tools which need to be aware of these problems (such as the linker) > can override the default bfd_error_handler to intercept these reports. */ > if (unhandled != NULL) > (*_bfd_error_handler) > (_("%s (%s): Section flag %s (0x%x) ignored"), > bfd_get_filename (abfd), name, unhandled, flag); 3968c4025 < coff_swap_filehdr_out (abfd, (PTR) & internal_f, (PTR) buff); --- > bfd_coff_swap_filehdr_out (abfd, (PTR) & internal_f, (PTR) buff); diff -rN binutils-2.11/bfd/coffgen.c binutils-2.11.2/bfd/coffgen.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 diff -rN binutils-2.11/bfd/cofflink.c binutils-2.11.2/bfd/cofflink.c 2c2,3 < Copyright 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/coffswap.h binutils-2.11.2/bfd/coffswap.h 2c2 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000 288a289 > diff -rN binutils-2.11/bfd/config.bfd binutils-2.11.2/bfd/config.bfd 141a142,147 > arm-*-vxworks*) > targ_defvec=armcoff_little_vec > targ_selvecs=armcoff_big_vec > targ_underscore=yes > targ_cflags=-DVXWORKS > ;; 660c666 < mips*el*-*-linux-gnu* | mips*el*-*-openbsd*) --- > mips*el*-*-openbsd*) 664c670,674 < mips*-*-linux-gnu* | mips*-*-openbsd*) --- > mips*el*-*-linux-gnu*) > targ_defvec=bfd_elf32_tradlittlemips_vec > targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec ecoff_little_vec ecoff_big_vec" > ;; > mips*-*-openbsd*) 666a677,680 > ;; > mips*-*-linux-gnu*) > targ_defvec=bfd_elf32_tradbigmips_vec > targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" diff -rN binutils-2.11/bfd/config.in binutils-2.11.2/bfd/config.in 27a28,30 > /* Define if you need to in order for stat and other things to work. */ > #undef _POSIX_SOURCE > diff -rN binutils-2.11/bfd/configure binutils-2.11.2/bfd/configure 734a735,762 > # 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:739: 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=":" > ac_dummy="$PATH" > for ac_dir in $ac_dummy; 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 736,739c764,769 < echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 < echo "configure:738: checking for strerror in -lcposix" >&5 < ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` < if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- > 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:769: checking for $ac_word" >&5 > if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 742,745c772,862 < ac_save_LIBS="$LIBS" < LIBS="-lcposix $LIBS" < cat > conftest.$ac_ext < if test -n "$CC"; then > ac_cv_prog_CC="$CC" # Let the user override the test. > else > IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" > ac_prog_rejected=no > ac_dummy="$PATH" > for ac_dir in $ac_dummy; 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 > > if test -z "$CC"; then > case "`uname -s`" in > *win32* | *WIN32*) > # Extract the first word of "cl", so it can be a program name with args. > set dummy cl; ac_word=$2 > echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 > echo "configure:820: 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=":" > ac_dummy="$PATH" > for ac_dir in $ac_dummy; do > test -z "$ac_dir" && ac_dir=. > if test -f $ac_dir/$ac_word; then > ac_cv_prog_CC="cl" > 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 > ;; > esac > 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:852: 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' > cross_compiling=$ac_cv_prog_cc_cross > > cat > conftest.$ac_ext << EOF > > #line 863 "configure" 747,750d863 < /* Override any gcc2 internal prototype to avoid an error. */ < /* We use char because int might match the return type of a gcc2 < builtin and then its argument prototype would still apply. */ < char strerror(); 752,754c865 < int main() { < strerror() < ; return 0; } --- > main(){return(0);} 756,758c867,874 < if { (eval echo configure:757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then < rm -rf conftest* < eval "ac_cv_lib_$ac_lib_var=yes" --- > if { (eval echo configure:868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 762,763c878,934 < rm -rf conftest* < eval "ac_cv_lib_$ac_lib_var=no" --- > ac_cv_prog_cc_works=no > fi > rm -fr conftest* > 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' > cross_compiling=$ac_cv_prog_cc_cross > > 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:894: 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:899: 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 < #ifdef __GNUC__ > yes; > #endif > EOF > if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:908: \"$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 $ac_cv_prog_gcc = yes; then > GCC=yes > else > GCC= > fi > > 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:927: 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 > 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 766d936 < LIBS="$ac_save_LIBS" 769c939,961 < if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then --- > > 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 > if test "$GCC" = yes; then > CFLAGS="-g -O2" > else > CFLAGS="-g" > fi > else > if test "$GCC" = yes; then > CFLAGS="-O2" > else > CFLAGS= > fi > fi > > echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 > echo "configure:959: 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 771c963,972 < LIBS="$LIBS -lcposix" --- > ISC=yes # If later tests want to check for ISC. > cat >> confdefs.h <<\EOF > #define _POSIX_SOURCE 1 > EOF > > if test "$GCC" = yes; then > CC="$CC -posix" > else > CC="$CC -Xp" > fi 773a975 > ISC= 776,777d977 < < 791c991 < echo "configure:792: checking for a BSD compatible install" >&5 --- > echo "configure:992: checking for a BSD compatible install" >&5 844c1044 < echo "configure:845: checking whether build environment is sane" >&5 --- > echo "configure:1045: checking whether build environment is sane" >&5 901c1101 < echo "configure:902: checking whether ${MAKE-make} sets \${MAKE}" >&5 --- > echo "configure:1102: checking whether ${MAKE-make} sets \${MAKE}" >&5 930c1130 < VERSION=2.11 --- > VERSION=2.11.2 947c1147 < echo "configure:948: checking for working aclocal" >&5 --- > echo "configure:1148: checking for working aclocal" >&5 960c1160 < echo "configure:961: checking for working autoconf" >&5 --- > echo "configure:1161: checking for working autoconf" >&5 973c1173 < echo "configure:974: checking for working automake" >&5 --- > echo "configure:1174: checking for working automake" >&5 986c1186 < echo "configure:987: checking for working autoheader" >&5 --- > echo "configure:1187: checking for working autoheader" >&5 999c1199 < echo "configure:1000: checking for working makeinfo" >&5 --- > echo "configure:1200: checking for working makeinfo" >&5 1022c1222 < echo "configure:1023: checking for $ac_word" >&5 --- > echo "configure:1223: checking for $ac_word" >&5 1054c1254 < echo "configure:1055: checking for $ac_word" >&5 --- > echo "configure:1255: checking for $ac_word" >&5 1086c1286 < echo "configure:1087: checking for $ac_word" >&5 --- > echo "configure:1287: checking for $ac_word" >&5 1189,1410d1388 < # 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:1193: 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=":" < ac_dummy="$PATH" < for ac_dir in $ac_dummy; 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:1223: 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=":" < ac_prog_rejected=no < ac_dummy="$PATH" < for ac_dir in $ac_dummy; 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 < < if test -z "$CC"; then < case "`uname -s`" in < *win32* | *WIN32*) < # Extract the first word of "cl", so it can be a program name with args. < set dummy cl; ac_word=$2 < echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 < echo "configure:1274: 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=":" < ac_dummy="$PATH" < for ac_dir in $ac_dummy; do < test -z "$ac_dir" && ac_dir=. < if test -f $ac_dir/$ac_word; then < ac_cv_prog_CC="cl" < 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 < ;; < esac < 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:1306: 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' < cross_compiling=$ac_cv_prog_cc_cross < < cat > conftest.$ac_ext << EOF < < #line 1317 "configure" < #include "confdefs.h" < < main(){return(0);} < EOF < if { (eval echo configure:1322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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* < 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' < cross_compiling=$ac_cv_prog_cc_cross < < 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:1348: 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:1353: 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 <&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 $ac_cv_prog_gcc = yes; then < GCC=yes < else < GCC= < fi < < 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:1381: 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 < 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 < if test "$GCC" = yes; then < CFLAGS="-g -O2" < else < CFLAGS="-g" < fi < else < if test "$GCC" = yes; then < CFLAGS="-O2" < else < CFLAGS= < fi < fi < 1423c1401 < echo "configure:1424: checking for ld used by GCC" >&5 --- > echo "configure:1402: checking for ld used by GCC" >&5 1453c1431 < echo "configure:1454: checking for GNU ld" >&5 --- > echo "configure:1432: checking for GNU ld" >&5 1456c1434 < echo "configure:1457: checking for non-GNU ld" >&5 --- > echo "configure:1435: checking for non-GNU ld" >&5 1491c1469 < echo "configure:1492: checking if the linker ($LD) is GNU ld" >&5 --- > echo "configure:1470: checking if the linker ($LD) is GNU ld" >&5 1508c1486 < echo "configure:1509: checking for $LD option to reload object files" >&5 --- > echo "configure:1487: checking for $LD option to reload object files" >&5 1520c1498 < echo "configure:1521: checking for BSD-compatible nm" >&5 --- > echo "configure:1499: checking for BSD-compatible nm" >&5 1558c1536 < echo "configure:1559: checking whether ln -s works" >&5 --- > echo "configure:1537: checking whether ln -s works" >&5 1579c1557 < echo "configure:1580: checking how to recognise dependant libraries" >&5 --- > echo "configure:1558: checking how to recognise dependant libraries" >&5 1722c1700 < echo "configure:1723: checking for object suffix" >&5 --- > echo "configure:1701: checking for object suffix" >&5 1728c1706 < if { (eval echo configure:1729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:1707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1748c1726 < echo "configure:1749: checking for executable suffix" >&5 --- > echo "configure:1727: checking for executable suffix" >&5 1758c1736 < if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then --- > if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then 1785c1763 < echo "configure:1786: checking for ${ac_tool_prefix}file" >&5 --- > echo "configure:1764: checking for ${ac_tool_prefix}file" >&5 1847c1825 < echo "configure:1848: checking for file" >&5 --- > echo "configure:1826: checking for file" >&5 1918c1896 < echo "configure:1919: checking for $ac_word" >&5 --- > echo "configure:1897: checking for $ac_word" >&5 1950c1928 < echo "configure:1951: checking for $ac_word" >&5 --- > echo "configure:1929: checking for $ac_word" >&5 1985c1963 < echo "configure:1986: checking for $ac_word" >&5 --- > echo "configure:1964: checking for $ac_word" >&5 2017c1995 < echo "configure:2018: checking for $ac_word" >&5 --- > echo "configure:1996: checking for $ac_word" >&5 2084,2085c2062,2063 < echo '#line 2085 "configure"' > conftest.$ac_ext < if { (eval echo configure:2086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > echo '#line 2063 "configure"' > conftest.$ac_ext > if { (eval echo configure:2064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 2106c2084 < echo "configure:2107: checking whether the C compiler needs -belf" >&5 --- > echo "configure:2085: checking whether the C compiler needs -belf" >&5 2119c2097 < #line 2120 "configure" --- > #line 2098 "configure" 2126c2104 < if { (eval echo configure:2127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:2105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2336c2314 < echo "configure:2337: checking whether to enable maintainer-specific portions of Makefiles" >&5 --- > echo "configure:2315: checking whether to enable maintainer-specific portions of Makefiles" >&5 2361c2339 < echo "configure:2362: checking for executable suffix" >&5 --- > echo "configure:2340: checking for executable suffix" >&5 2371c2349 < if { (eval echo configure:2372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then --- > if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then 2400c2378 < echo "configure:2401: checking for $ac_word" >&5 --- > echo "configure:2379: checking for $ac_word" >&5 2430c2408 < echo "configure:2431: checking for $ac_word" >&5 --- > echo "configure:2409: checking for $ac_word" >&5 2481c2459 < echo "configure:2482: checking for $ac_word" >&5 --- > echo "configure:2460: checking for $ac_word" >&5 2513c2491 < echo "configure:2514: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 --- > echo "configure:2492: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 2524c2502 < #line 2525 "configure" --- > #line 2503 "configure" 2529c2507 < if { (eval echo configure:2530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:2508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2555c2533 < echo "configure:2556: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 --- > echo "configure:2534: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 2560c2538 < echo "configure:2561: checking whether we are using GNU C" >&5 --- > echo "configure:2539: checking whether we are using GNU C" >&5 2569c2547 < if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2570: \"$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:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 2588c2566 < echo "configure:2589: checking whether ${CC-cc} accepts -g" >&5 --- > echo "configure:2567: checking whether ${CC-cc} accepts -g" >&5 2622c2600 < echo "configure:2623: checking how to run the C preprocessor" >&5 --- > echo "configure:2601: checking how to run the C preprocessor" >&5 2637c2615 < #line 2638 "configure" --- > #line 2616 "configure" 2643c2621 < { (eval echo configure:2644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:2622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2654c2632 < #line 2655 "configure" --- > #line 2633 "configure" 2660c2638 < { (eval echo configure:2661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:2639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2671c2649 < #line 2672 "configure" --- > #line 2650 "configure" 2677c2655 < { (eval echo configure:2678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:2656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2704c2682 < echo "configure:2705: checking for $ac_word" >&5 --- > echo "configure:2683: checking for $ac_word" >&5 2732c2710 < echo "configure:2733: checking for ANSI C header files" >&5 --- > echo "configure:2711: checking for ANSI C header files" >&5 2737c2715 < #line 2738 "configure" --- > #line 2716 "configure" 2745c2723 < { (eval echo configure:2746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:2724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2762c2740 < #line 2763 "configure" --- > #line 2741 "configure" 2780c2758 < #line 2781 "configure" --- > #line 2759 "configure" 2801c2779 < #line 2802 "configure" --- > #line 2780 "configure" 2812c2790 < if { (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --- > if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 2836c2814 < echo "configure:2837: checking for working const" >&5 --- > echo "configure:2815: checking for working const" >&5 2841c2819 < #line 2842 "configure" --- > #line 2820 "configure" 2890c2868 < if { (eval echo configure:2891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:2869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 2911c2889 < echo "configure:2912: checking for inline" >&5 --- > echo "configure:2890: checking for inline" >&5 2918c2896 < #line 2919 "configure" --- > #line 2897 "configure" 2925c2903 < if { (eval echo configure:2926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:2904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 2951c2929 < echo "configure:2952: checking for off_t" >&5 --- > echo "configure:2930: checking for off_t" >&5 2956c2934 < #line 2957 "configure" --- > #line 2935 "configure" 2984c2962 < echo "configure:2985: checking for size_t" >&5 --- > echo "configure:2963: checking for size_t" >&5 2989c2967 < #line 2990 "configure" --- > #line 2968 "configure" 3019c2997 < echo "configure:3020: checking for working alloca.h" >&5 --- > echo "configure:2998: checking for working alloca.h" >&5 3024c3002 < #line 3025 "configure" --- > #line 3003 "configure" 3031c3009 < if { (eval echo configure:3032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3052c3030 < echo "configure:3053: checking for alloca" >&5 --- > echo "configure:3031: checking for alloca" >&5 3057c3035 < #line 3058 "configure" --- > #line 3036 "configure" 3085c3063 < if { (eval echo configure:3086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3117c3095 < echo "configure:3118: checking whether alloca needs Cray hooks" >&5 --- > echo "configure:3096: checking whether alloca needs Cray hooks" >&5 3122c3100 < #line 3123 "configure" --- > #line 3101 "configure" 3147c3125 < echo "configure:3148: checking for $ac_func" >&5 --- > echo "configure:3126: checking for $ac_func" >&5 3152c3130 < #line 3153 "configure" --- > #line 3131 "configure" 3175c3153 < if { (eval echo configure:3176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3202c3180 < echo "configure:3203: checking stack direction for C alloca" >&5 --- > echo "configure:3181: checking stack direction for C alloca" >&5 3210c3188 < #line 3211 "configure" --- > #line 3189 "configure" 3229c3207 < if { (eval echo configure:3230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --- > if { (eval echo configure:3208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 3254c3232 < echo "configure:3255: checking for $ac_hdr" >&5 --- > echo "configure:3233: checking for $ac_hdr" >&5 3259c3237 < #line 3260 "configure" --- > #line 3238 "configure" 3264c3242 < { (eval echo configure:3265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:3243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 3293c3271 < echo "configure:3294: checking for $ac_func" >&5 --- > echo "configure:3272: checking for $ac_func" >&5 3298c3276 < #line 3299 "configure" --- > #line 3277 "configure" 3321c3299 < if { (eval echo configure:3322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3346c3324 < echo "configure:3347: checking for working mmap" >&5 --- > echo "configure:3325: checking for working mmap" >&5 3354c3332 < #line 3355 "configure" --- > #line 3333 "configure" 3494c3472 < if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --- > if { (eval echo configure:3473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 3522c3500 < echo "configure:3523: checking for $ac_hdr" >&5 --- > echo "configure:3501: checking for $ac_hdr" >&5 3527c3505 < #line 3528 "configure" --- > #line 3506 "configure" 3532c3510 < { (eval echo configure:3533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:3511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 3562c3540 < echo "configure:3563: checking for $ac_func" >&5 --- > echo "configure:3541: checking for $ac_func" >&5 3567c3545 < #line 3568 "configure" --- > #line 3546 "configure" 3590c3568 < if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3619c3597 < echo "configure:3620: checking for $ac_func" >&5 --- > echo "configure:3598: checking for $ac_func" >&5 3624c3602 < #line 3625 "configure" --- > #line 3603 "configure" 3647c3625 < if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3681c3659 < echo "configure:3682: checking for LC_MESSAGES" >&5 --- > echo "configure:3660: checking for LC_MESSAGES" >&5 3686c3664 < #line 3687 "configure" --- > #line 3665 "configure" 3693c3671 < if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3714c3692 < echo "configure:3715: checking whether NLS is requested" >&5 --- > echo "configure:3693: checking whether NLS is requested" >&5 3734c3712 < echo "configure:3735: checking whether included gettext is requested" >&5 --- > echo "configure:3713: checking whether included gettext is requested" >&5 3753c3731 < echo "configure:3754: checking for libintl.h" >&5 --- > echo "configure:3732: checking for libintl.h" >&5 3758c3736 < #line 3759 "configure" --- > #line 3737 "configure" 3763c3741 < { (eval echo configure:3764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:3742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 3780c3758 < echo "configure:3781: checking for gettext in libc" >&5 --- > echo "configure:3759: checking for gettext in libc" >&5 3785c3763 < #line 3786 "configure" --- > #line 3764 "configure" 3792c3770 < if { (eval echo configure:3793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3808c3786 < echo "configure:3809: checking for bindtextdomain in -lintl" >&5 --- > echo "configure:3787: checking for bindtextdomain in -lintl" >&5 3816c3794 < #line 3817 "configure" --- > #line 3795 "configure" 3827c3805 < if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3843c3821 < echo "configure:3844: checking for gettext in libintl" >&5 --- > echo "configure:3822: checking for gettext in libintl" >&5 3848c3826 < #line 3849 "configure" --- > #line 3827 "configure" 3855c3833 < if { (eval echo configure:3856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3883c3861 < echo "configure:3884: checking for $ac_word" >&5 --- > echo "configure:3862: checking for $ac_word" >&5 3917c3895 < echo "configure:3918: checking for $ac_func" >&5 --- > echo "configure:3896: checking for $ac_func" >&5 3922c3900 < #line 3923 "configure" --- > #line 3901 "configure" 3945c3923 < if { (eval echo configure:3946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3972c3950 < echo "configure:3973: checking for $ac_word" >&5 --- > echo "configure:3951: checking for $ac_word" >&5 4008c3986 < echo "configure:4009: checking for $ac_word" >&5 --- > echo "configure:3987: checking for $ac_word" >&5 4040c4018 < #line 4041 "configure" --- > #line 4019 "configure" 4048c4026 < if { (eval echo configure:4049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4080c4058 < echo "configure:4081: checking for $ac_word" >&5 --- > echo "configure:4059: checking for $ac_word" >&5 4114c4092 < echo "configure:4115: checking for $ac_word" >&5 --- > echo "configure:4093: checking for $ac_word" >&5 4150c4128 < echo "configure:4151: checking for $ac_word" >&5 --- > echo "configure:4129: checking for $ac_word" >&5 4240c4218 < echo "configure:4241: checking for catalogs to be installed" >&5 --- > echo "configure:4219: checking for catalogs to be installed" >&5 4268c4246 < echo "configure:4269: checking for linux/version.h" >&5 --- > echo "configure:4247: checking for linux/version.h" >&5 4273c4251 < #line 4274 "configure" --- > #line 4252 "configure" 4278c4256 < { (eval echo configure:4279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:4257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 4356c4334 < echo "configure:4357: checking for a BSD compatible install" >&5 --- > echo "configure:4335: checking for a BSD compatible install" >&5 4439c4417 < echo "configure:4440: checking for build system executable suffix" >&5 --- > echo "configure:4418: checking for build system executable suffix" >&5 4467c4445 < echo "configure:4468: checking for $ac_hdr" >&5 --- > echo "configure:4446: checking for $ac_hdr" >&5 4472c4450 < #line 4473 "configure" --- > #line 4451 "configure" 4477c4455 < { (eval echo configure:4478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:4456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 4507c4485 < echo "configure:4508: checking for $ac_hdr" >&5 --- > echo "configure:4486: checking for $ac_hdr" >&5 4512c4490 < #line 4513 "configure" --- > #line 4491 "configure" 4517c4495 < { (eval echo configure:4518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:4496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 4544c4522 < echo "configure:4545: checking whether time.h and sys/time.h may both be included" >&5 --- > echo "configure:4523: checking whether time.h and sys/time.h may both be included" >&5 4549c4527 < #line 4550 "configure" --- > #line 4528 "configure" 4558c4536 < if { (eval echo configure:4559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:4537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 4583c4561 < echo "configure:4584: checking for $ac_hdr that defines DIR" >&5 --- > echo "configure:4562: checking for $ac_hdr that defines DIR" >&5 4588c4566 < #line 4589 "configure" --- > #line 4567 "configure" 4596c4574 < if { (eval echo configure:4597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:4575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 4621c4599 < echo "configure:4622: checking for opendir in -ldir" >&5 --- > echo "configure:4600: checking for opendir in -ldir" >&5 4629c4607 < #line 4630 "configure" --- > #line 4608 "configure" 4640c4618 < if { (eval echo configure:4641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4662c4640 < echo "configure:4663: checking for opendir in -lx" >&5 --- > echo "configure:4641: checking for opendir in -lx" >&5 4670c4648 < #line 4671 "configure" --- > #line 4649 "configure" 4681c4659 < if { (eval echo configure:4682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4706c4684 < echo "configure:4707: checking for $ac_func" >&5 --- > echo "configure:4685: checking for $ac_func" >&5 4711c4689 < #line 4712 "configure" --- > #line 4690 "configure" 4734c4712 < if { (eval echo configure:4735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4769c4747 < echo "configure:4770: checking whether strstr must be declared" >&5 --- > echo "configure:4748: checking whether strstr must be declared" >&5 4774c4752 < #line 4775 "configure" --- > #line 4753 "configure" 4795c4773 < if { (eval echo configure:4796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:4774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 4816c4794 < echo "configure:4817: checking whether malloc must be declared" >&5 --- > echo "configure:4795: checking whether malloc must be declared" >&5 4821c4799 < #line 4822 "configure" --- > #line 4800 "configure" 4842c4820 < if { (eval echo configure:4843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:4821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 4863c4841 < echo "configure:4864: checking whether realloc must be declared" >&5 --- > echo "configure:4842: checking whether realloc must be declared" >&5 4868c4846 < #line 4869 "configure" --- > #line 4847 "configure" 4889c4867 < if { (eval echo configure:4890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:4868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 4910c4888 < echo "configure:4911: checking whether free must be declared" >&5 --- > echo "configure:4889: checking whether free must be declared" >&5 4915c4893 < #line 4916 "configure" --- > #line 4894 "configure" 4936c4914 < if { (eval echo configure:4937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:4915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 4957c4935 < echo "configure:4958: checking whether getenv must be declared" >&5 --- > echo "configure:4936: checking whether getenv must be declared" >&5 4962c4940 < #line 4963 "configure" --- > #line 4941 "configure" 4983c4961 < if { (eval echo configure:4984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:4962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5155d5132 < powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; 5160a5138 > powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; 5202c5180 < echo "configure:5203: checking for $ac_hdr" >&5 --- > echo "configure:5181: checking for $ac_hdr" >&5 5207c5185 < #line 5208 "configure" --- > #line 5186 "configure" 5212c5190 < { (eval echo configure:5213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:5191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 5240c5218 < echo "configure:5241: checking for prstatus_t in sys/procfs.h" >&5 --- > echo "configure:5219: checking for prstatus_t in sys/procfs.h" >&5 5245c5223 < #line 5246 "configure" --- > #line 5224 "configure" 5254c5232 < if { (eval echo configure:5255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5276c5254 < echo "configure:5277: checking for prstatus32_t in sys/procfs.h" >&5 --- > echo "configure:5255: checking for prstatus32_t in sys/procfs.h" >&5 5281c5259 < #line 5282 "configure" --- > #line 5260 "configure" 5290c5268 < if { (eval echo configure:5291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5312c5290 < echo "configure:5313: checking for prstatus_t.pr_who in sys/procfs.h" >&5 --- > echo "configure:5291: checking for prstatus_t.pr_who in sys/procfs.h" >&5 5317c5295 < #line 5318 "configure" --- > #line 5296 "configure" 5326c5304 < if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5348c5326 < echo "configure:5349: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 --- > echo "configure:5327: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 5353c5331 < #line 5354 "configure" --- > #line 5332 "configure" 5362c5340 < if { (eval echo configure:5363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5384c5362 < echo "configure:5385: checking for pstatus_t in sys/procfs.h" >&5 --- > echo "configure:5363: checking for pstatus_t in sys/procfs.h" >&5 5389c5367 < #line 5390 "configure" --- > #line 5368 "configure" 5398c5376 < if { (eval echo configure:5399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5420c5398 < echo "configure:5421: checking for pxstatus_t in sys/procfs.h" >&5 --- > echo "configure:5399: checking for pxstatus_t in sys/procfs.h" >&5 5425c5403 < #line 5426 "configure" --- > #line 5404 "configure" 5434c5412 < if { (eval echo configure:5435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5456c5434 < echo "configure:5457: checking for pstatus32_t in sys/procfs.h" >&5 --- > echo "configure:5435: checking for pstatus32_t in sys/procfs.h" >&5 5461c5439 < #line 5462 "configure" --- > #line 5440 "configure" 5470c5448 < if { (eval echo configure:5471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5492c5470 < echo "configure:5493: checking for prpsinfo_t in sys/procfs.h" >&5 --- > echo "configure:5471: checking for prpsinfo_t in sys/procfs.h" >&5 5497c5475 < #line 5498 "configure" --- > #line 5476 "configure" 5506c5484 < if { (eval echo configure:5507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5528c5506 < echo "configure:5529: checking for prpsinfo32_t in sys/procfs.h" >&5 --- > echo "configure:5507: checking for prpsinfo32_t in sys/procfs.h" >&5 5533c5511 < #line 5534 "configure" --- > #line 5512 "configure" 5542c5520 < if { (eval echo configure:5543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5564c5542 < echo "configure:5565: checking for psinfo_t in sys/procfs.h" >&5 --- > echo "configure:5543: checking for psinfo_t in sys/procfs.h" >&5 5569c5547 < #line 5570 "configure" --- > #line 5548 "configure" 5578c5556 < if { (eval echo configure:5579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5600c5578 < echo "configure:5601: checking for psinfo32_t in sys/procfs.h" >&5 --- > echo "configure:5579: checking for psinfo32_t in sys/procfs.h" >&5 5605c5583 < #line 5606 "configure" --- > #line 5584 "configure" 5614c5592 < if { (eval echo configure:5615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5636c5614 < echo "configure:5637: checking for lwpstatus_t in sys/procfs.h" >&5 --- > echo "configure:5615: checking for lwpstatus_t in sys/procfs.h" >&5 5641c5619 < #line 5642 "configure" --- > #line 5620 "configure" 5650c5628 < if { (eval echo configure:5651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5672c5650 < echo "configure:5673: checking for lwpxstatus_t in sys/procfs.h" >&5 --- > echo "configure:5651: checking for lwpxstatus_t in sys/procfs.h" >&5 5677c5655 < #line 5678 "configure" --- > #line 5656 "configure" 5686c5664 < if { (eval echo configure:5687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5708c5686 < echo "configure:5709: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 --- > echo "configure:5687: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 5713c5691 < #line 5714 "configure" --- > #line 5692 "configure" 5722c5700 < if { (eval echo configure:5723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5744c5722 < echo "configure:5745: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 --- > echo "configure:5723: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 5749c5727 < #line 5750 "configure" --- > #line 5728 "configure" 5758c5736 < if { (eval echo configure:5759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5780c5758 < echo "configure:5781: checking for win32_pstatus_t in sys/procfs.h" >&5 --- > echo "configure:5759: checking for win32_pstatus_t in sys/procfs.h" >&5 5785c5763 < #line 5786 "configure" --- > #line 5764 "configure" 5794c5772 < if { (eval echo configure:5795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5937c5915 < bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo peigen.lo cofflink.lo" --- > bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo" 6004a5983,5986 > bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo" > target64=true ;; > bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo" > target64=true ;; 6188c6170 < echo "configure:6189: checking for $ac_hdr" >&5 --- > echo "configure:6171: checking for $ac_hdr" >&5 6193c6175 < #line 6194 "configure" --- > #line 6176 "configure" 6198c6180 < { (eval echo configure:6199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:6181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 6227c6209 < echo "configure:6228: checking for $ac_func" >&5 --- > echo "configure:6210: checking for $ac_func" >&5 6232c6214 < #line 6233 "configure" --- > #line 6215 "configure" 6255c6237 < if { (eval echo configure:6256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:6238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 6280c6262 < echo "configure:6281: checking for working mmap" >&5 --- > echo "configure:6263: checking for working mmap" >&5 6288c6270 < #line 6289 "configure" --- > #line 6271 "configure" 6428c6410 < if { (eval echo configure:6429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --- > if { (eval echo configure:6411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 6453c6435 < echo "configure:6454: checking for $ac_func" >&5 --- > echo "configure:6436: checking for $ac_func" >&5 6458c6440 < #line 6459 "configure" --- > #line 6441 "configure" 6481c6463 < if { (eval echo configure:6482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:6464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 6660a6643 > s%@CC@%$CC%g 6674d6656 < s%@CC@%$CC%g 6937c6919 < sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile --- > sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile 6942a6925 > diff -rN binutils-2.11/bfd/configure.in binutils-2.11.2/bfd/configure.in 10c10 < AM_INIT_AUTOMAKE(bfd, 2.11) --- > AM_INIT_AUTOMAKE(bfd, 2.11.2) 307d306 < powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; 312a312 > powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; 488c488 < bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo peigen.lo cofflink.lo" --- > bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo" 555a556,559 > bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo" > target64=true ;; > bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo" > target64=true ;; 744c748,749 < [sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile]) --- > [sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile]) > diff -rN binutils-2.11/bfd/corefile.c binutils-2.11.2/bfd/corefile.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-a29k.c binutils-2.11.2/bfd/cpu-a29k.c 2c2 < Copyright 1992 Free Software Foundation, Inc. --- > Copyright 1992, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-alpha.c binutils-2.11.2/bfd/cpu-alpha.c 2c2 < Copyright 1992 Free Software Foundation, Inc. --- > Copyright 1992, 1993, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-arc.c binutils-2.11.2/bfd/cpu-arc.c 2c2 < Copyright 1994, 1995, 1997 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1997, 2001 Free Software Foundation, Inc. 36c36 < bfd_default_compatible, \ --- > bfd_default_compatible, \ 44,45c44,46 < ARC ( bfd_mach_arc_6, "arc6", false, &arch_info_struct[2] ), < ARC ( bfd_mach_arc_7, "arc7", false, &arch_info_struct[3] ), --- > ARC ( bfd_mach_arc_5, "base", false, &arch_info_struct[2] ), > ARC ( bfd_mach_arc_6, "arc6", false, &arch_info_struct[3] ), > ARC ( bfd_mach_arc_7, "arc7", false, &arch_info_struct[4] ), 50c51 < ARC ( bfd_mach_arc_5, "arc", true, &arch_info_struct[0] ); --- > ARC ( bfd_mach_arc_6, "arc", true, &arch_info_struct[0] ); diff -rN binutils-2.11/bfd/cpu-arm.c binutils-2.11.2/bfd/cpu-arm.c 2c2 < Copyright 1994, 95, 97, 1999 Free Software Foundation, Inc. --- > Copyright 1994, 1997, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-avr.c binutils-2.11.2/bfd/cpu-avr.c 2c2 < Copyright (C) 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-cris.c binutils-2.11.2/bfd/cpu-cris.c 2c2 < Copyright (C) 2000 Free Software Foundation, Inc. --- > Copyright 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-d10v.c binutils-2.11.2/bfd/cpu-d10v.c 2c2 < Copyright 1996, 1999 Free Software Foundation, Inc. --- > Copyright 1996, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-fr30.c binutils-2.11.2/bfd/cpu-fr30.c 2c2 < Copyright (C) 1998 Free Software Foundation, Inc. --- > Copyright 1998 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-h8300.c binutils-2.11.2/bfd/cpu-h8300.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-h8500.c binutils-2.11.2/bfd/cpu-h8500.c 2c2 < Copyright (C) 1993, 1994, 1995, 1999 Free Software Foundation, Inc. --- > Copyright 1993, 1995, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-hppa.c binutils-2.11.2/bfd/cpu-hppa.c 2c2 < Copyright 1992 Free Software Foundation, Inc. --- > Copyright 1992, 1995, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-i370.c binutils-2.11.2/bfd/cpu-i370.c 2c2,3 < Copyright (C) 1994, 95, 96, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1996, 1998, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-i386.c binutils-2.11.2/bfd/cpu-i386.c 2c2,3 < Copyright 1992, 94, 95, 1996 Free Software Foundation, Inc. --- > Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-i960.c binutils-2.11.2/bfd/cpu-i960.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1993, 1994, 1996, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-ia64-opc.c binutils-2.11.2/bfd/cpu-ia64-opc.c 1c1 < /* Copyright (C) 1998, 1999 Free Software Foundation, Inc. --- > /* Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-ia64.c binutils-2.11.2/bfd/cpu-ia64.c 2c2 < Copyright (C) 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-m10300.c binutils-2.11.2/bfd/cpu-m10300.c 2c2 < Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-m32r.c binutils-2.11.2/bfd/cpu-m32r.c 2c2 < Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1996, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-m68hc11.c binutils-2.11.2/bfd/cpu-m68hc11.c 2c2 < Copyright 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1999, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-m68k.c binutils-2.11.2/bfd/cpu-m68k.c 2c2 < Copyright (C) 1990, 91, 92, 93, 94, 95, 97, 1998 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1997, 1998, 2000, 2001 30,39c30,43 < { < N(bfd_mach_m68000, "m68k:68000", false, &arch_info_struct[1]), < N(bfd_mach_m68008, "m68k:68008", false, &arch_info_struct[2]), < N(bfd_mach_m68010, "m68k:68010", false, &arch_info_struct[3]), < N(bfd_mach_m68020, "m68k:68020", false, &arch_info_struct[4]), < N(bfd_mach_m68030, "m68k:68030", false, &arch_info_struct[5]), < N(bfd_mach_m68040, "m68k:68040", false, &arch_info_struct[6]), < N(bfd_mach_cpu32, "m68k:cpu32", false, &arch_info_struct[7]), < N(bfd_mach_m68060, "m68k:68060", false, 0), < }; --- > { > N(bfd_mach_m68000, "m68k:68000", false, &arch_info_struct[1]), > N(bfd_mach_m68008, "m68k:68008", false, &arch_info_struct[2]), > N(bfd_mach_m68010, "m68k:68010", false, &arch_info_struct[3]), > N(bfd_mach_m68020, "m68k:68020", false, &arch_info_struct[4]), > N(bfd_mach_m68030, "m68k:68030", false, &arch_info_struct[5]), > N(bfd_mach_m68040, "m68k:68040", false, &arch_info_struct[6]), > N(bfd_mach_cpu32, "m68k:cpu32", false, &arch_info_struct[7]), > N(bfd_mach_mcf5200,"m68k:5200", false, &arch_info_struct[8]), > N(bfd_mach_mcf5206e,"m68k:5206e",false, &arch_info_struct[9]), > N(bfd_mach_mcf5307, "m68k:5307", false, &arch_info_struct[10]), > N(bfd_mach_mcf5407, "m68k:5407", false, &arch_info_struct[11]), > N(bfd_mach_m68060, "m68k:68060", false, 0), > }; diff -rN binutils-2.11/bfd/cpu-m88k.c binutils-2.11.2/bfd/cpu-m88k.c 2c2 < Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1994, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-mcore.c binutils-2.11.2/bfd/cpu-mcore.c 2c2 < Copyright (C) 1993, 1999 Free Software Foundation, Inc. --- > Copyright 1993, 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-mips.c binutils-2.11.2/bfd/cpu-mips.c 2c2,3 < Copyright (C) 1990, 91-97, 1998, 2000 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 2000 > Free Software Foundation, Inc. 56a58 > I_mips12000, 82a85 > N (64, 64, bfd_mach_mips12000,"mips:12000", false, NN(I_mips12000)), diff -rN binutils-2.11/bfd/cpu-ns32k.c binutils-2.11.2/bfd/cpu-ns32k.c 2c2,3 < Copyright (C) 1990, 91, 94, 95, 96, 98, 1999 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1994, 1995, 1998, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-pj.c binutils-2.11.2/bfd/cpu-pj.c 2c2 < Copyright (C) 1999 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-powerpc.c binutils-2.11.2/bfd/cpu-powerpc.c 2c2 < Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1996, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-rs6000.c binutils-2.11.2/bfd/cpu-rs6000.c 2c2 < Copyright (C) 1990, 1991 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1993, 1995, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-sh.c binutils-2.11.2/bfd/cpu-sh.c 2c2 < Copyright (C) 1993, 97, 1998, 2000 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1997, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-sparc.c binutils-2.11.2/bfd/cpu-sparc.c 2c2 < Copyright (C) 1992, 94, 95, 96, 97, 2000 Free Software Foundation, Inc. --- > Copyright 1992, 1995, 1996, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-tic54x.c binutils-2.11.2/bfd/cpu-tic54x.c 2c2 < Copyright 1999,2000 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-tic80.c binutils-2.11.2/bfd/cpu-tic80.c 2c2 < Copyright (C) 1996, 1999 Free Software Foundation, Inc. --- > Copyright 1996 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-v850.c binutils-2.11.2/bfd/cpu-v850.c 2c2 < Copyright 1996, 1997, 1998 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-vax.c binutils-2.11.2/bfd/cpu-vax.c 2c2 < Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1994, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-w65.c binutils-2.11.2/bfd/cpu-w65.c 2c2 < Copyright (C) 1995, 1999 Free Software Foundation, Inc. --- > Copyright 1995, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-we32k.c binutils-2.11.2/bfd/cpu-we32k.c 2c2 < Copyright (C) 1992 Free Software Foundation, Inc. --- > Copyright 1992, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/cpu-z8k.c binutils-2.11.2/bfd/cpu-z8k.c 2c2 < Copyright (C) 1992 Free Software Foundation, Inc. --- > Copyright 1992, 1993, 1994, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/demo64.c binutils-2.11.2/bfd/demo64.c 2c2 < Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/doc/ChangeLog binutils-2.11.2/bfd/doc/ChangeLog 0a1,5 > 2001-06-11 Alan Modra > > * bfdint.texi (BFD target vector miscellaneous): --oformat, not > -oformat. > diff -rN binutils-2.11/bfd/doc/Makefile.in binutils-2.11.2/bfd/doc/Makefile.in 197c197 < TAR = gtar --- > TAR = tar diff -rN binutils-2.11/bfd/doc/archures.texi binutils-2.11.2/bfd/doc/archures.texi 48a49,52 > #define bfd_mach_mcf5200 9 > #define bfd_mach_mcf5206e 10 > #define bfd_mach_mcf5307 11 > #define bfd_mach_mcf5407 12 99a104 > #define bfd_mach_mips12000 12000 diff -rN binutils-2.11/bfd/doc/bfd.info binutils-2.11.2/bfd/doc/bfd.info 22,26c22,26 < bfd.info-3: 83014 < bfd.info-4: 132756 < bfd.info-5: 181734 < bfd.info-6: 214313 < bfd.info-7: 260724 --- > bfd.info-3: 83193 > bfd.info-4: 131325 > bfd.info-5: 180785 > bfd.info-6: 215030 > bfd.info-7: 261441 44,87c44,87 < Node: section prototypes54206 < Node: Symbols60891 < Node: Reading Symbols62481 < Node: Writing Symbols63655 < Node: Mini Symbols65345 < Node: typedef asymbol66310 < Node: symbol handling functions71539 < Node: Archives75866 < Node: Formats79484 < Node: Relocations82294 < Node: typedef arelent83014 < Node: howto manager99173 < Node: Core Files129772 < Node: Targets130793 < Node: bfd_target132756 < Node: Architectures151670 < Node: Opening and Closing166892 < Node: Internal171289 < Node: File Caching177289 < Node: Linker Functions180068 < Node: Creating a Linker Hash Table181734 < Node: Adding Symbols to the Hash Table183462 < Node: Differing file formats184352 < Node: Adding symbols from an object file186085 < Node: Adding symbols from an archive188221 < Node: Performing the Final Link190620 < Node: Information provided by the linker191851 < Node: Relocating the section contents192987 < Node: Writing the symbol table194724 < Node: Hash Tables197318 < Node: Creating and Freeing a Hash Table198509 < Node: Looking Up or Entering a String199666 < Node: Traversing a Hash Table200908 < Node: Deriving a New Hash Table Type201686 < Node: Define the Derived Structures202741 < Node: Write the Derived Creation Routine203807 < Node: Write Other Derived Routines206506 < Node: BFD back ends207806 < Node: What to Put Where208050 < Node: aout208188 < Node: coff214313 < Node: elf241469 < Node: GNU Free Documentation License242302 < Node: Index260724 --- > Node: section prototypes54385 > Node: Symbols61070 > Node: Reading Symbols62660 > Node: Writing Symbols63834 > Node: Mini Symbols65524 > Node: typedef asymbol66489 > Node: symbol handling functions71718 > Node: Archives76045 > Node: Formats79663 > Node: Relocations82473 > Node: typedef arelent83193 > Node: howto manager99352 > Node: Core Files130304 > Node: Targets131325 > Node: bfd_target133288 > Node: Architectures152202 > Node: Opening and Closing167609 > Node: Internal172006 > Node: File Caching178006 > Node: Linker Functions180785 > Node: Creating a Linker Hash Table182451 > Node: Adding Symbols to the Hash Table184179 > Node: Differing file formats185069 > Node: Adding symbols from an object file186802 > Node: Adding symbols from an archive188938 > Node: Performing the Final Link191337 > Node: Information provided by the linker192568 > Node: Relocating the section contents193704 > Node: Writing the symbol table195441 > Node: Hash Tables198035 > Node: Creating and Freeing a Hash Table199226 > Node: Looking Up or Entering a String200383 > Node: Traversing a Hash Table201625 > Node: Deriving a New Hash Table Type202403 > Node: Define the Derived Structures203458 > Node: Write the Derived Creation Routine204524 > Node: Write Other Derived Routines207223 > Node: BFD back ends208523 > Node: What to Put Where208767 > Node: aout208905 > Node: coff215030 > Node: elf242186 > Node: GNU Free Documentation License243019 > Node: Index261441 diff -rN binutils-2.11/bfd/doc/bfd.info-2 binutils-2.11.2/bfd/doc/bfd.info-2 240a241,244 > /* Another mark flag used by some of the linker backends. Set for > output sections that have a input section. */ > unsigned int linker_has_input : 1; > diff -rN binutils-2.11/bfd/doc/bfd.info-3 binutils-2.11.2/bfd/doc/bfd.info-3 551a552 > - : BFD_RELOC_SPARC_UA16 552a554 > - : BFD_RELOC_SPARC_UA64 704a707,717 > - : BFD_RELOC_MIPS_SHIFT5 > - : BFD_RELOC_MIPS_SHIFT6 > - : BFD_RELOC_MIPS_INSERT_A > - : BFD_RELOC_MIPS_INSERT_B > - : BFD_RELOC_MIPS_DELETE > - : BFD_RELOC_MIPS_HIGHEST > - : BFD_RELOC_MIPS_HIGHER > - : BFD_RELOC_MIPS_SCN_DISP > - : BFD_RELOC_MIPS_REL16 > - : BFD_RELOC_MIPS_RELGOT > - : BFD_RELOC_MIPS_JALR 1407,1456d1419 < <  < File: bfd.info, Node: Targets, Next: Architectures, Prev: Core Files, Up: BFD front end < < Targets < ======= < < *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 part of BFD is a < structure containing pointers to functions which perform certain low < level operations on files. BFD translates the applications's requests < through a pointer into calls to the back end routines. < < When a file is opened with `bfd_openr', its format and target are < unknown. BFD uses various mechanisms to determine how to interpret the < file. The operations performed are: < < * Create a BFD by calling the internal routine `_bfd_new_bfd', then < call `bfd_find_target' with the target string supplied to < `bfd_openr' and the new BFD pointer. < < * If a null target string was provided to `bfd_find_target', look up < the environment variable `GNUTARGET' and use that as the target < string. < < * If the target string is still `NULL', or the target string is < `default', then use the first item in the target vector as the < target type, and set `target_defaulted' in the BFD to cause < `bfd_check_format' to loop through all the targets. *Note < bfd_target::. *Note Formats::. < < * Otherwise, inspect the elements in the target vector one by one, < until a match on target name is found. When found, use it. < < * Otherwise return the error `bfd_error_invalid_target' to < `bfd_openr'. < < * `bfd_openr' attempts to open the file using `bfd_open_file', and < returns the BFD. < Once the BFD has been opened and the target selected, the file < format may be determined. This is done by calling `bfd_check_format' on < the BFD with a suggested format. If `target_defaulted' has been set, < each possible target type is tried to see if it recognizes the < specified format. `bfd_check_format' returns `true' when the caller < guesses right. < < * Menu: < < * bfd_target:: diff -rN binutils-2.11/bfd/doc/bfd.info-4 binutils-2.11.2/bfd/doc/bfd.info-4 18a19,68 > File: bfd.info, Node: Targets, Next: Architectures, Prev: Core Files, Up: BFD front end > > Targets > ======= > > *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 part of BFD is a > structure containing pointers to functions which perform certain low > level operations on files. BFD translates the applications's requests > through a pointer into calls to the back end routines. > > When a file is opened with `bfd_openr', its format and target are > unknown. BFD uses various mechanisms to determine how to interpret the > file. The operations performed are: > > * Create a BFD by calling the internal routine `_bfd_new_bfd', then > call `bfd_find_target' with the target string supplied to > `bfd_openr' and the new BFD pointer. > > * If a null target string was provided to `bfd_find_target', look up > the environment variable `GNUTARGET' and use that as the target > string. > > * If the target string is still `NULL', or the target string is > `default', then use the first item in the target vector as the > target type, and set `target_defaulted' in the BFD to cause > `bfd_check_format' to loop through all the targets. *Note > bfd_target::. *Note Formats::. > > * Otherwise, inspect the elements in the target vector one by one, > until a match on target name is found. When found, use it. > > * Otherwise return the error `bfd_error_invalid_target' to > `bfd_openr'. > > * `bfd_openr' attempts to open the file using `bfd_open_file', and > returns the BFD. > Once the BFD has been opened and the target selected, the file > format may be determined. This is done by calling `bfd_check_format' on > the BFD with a suggested format. If `target_defaulted' has been set, > each possible target type is tried to see if it recognizes the > specified format. `bfd_check_format' returns `true' when the caller > guesses right. > > * Menu: > > * bfd_target:: > >  470a521,524 > #define bfd_mach_mcf5200 9 > #define bfd_mach_mcf5206e 10 > #define bfd_mach_mcf5307 11 > #define bfd_mach_mcf5407 12 521a576 > #define bfd_mach_mips12000 12000 1237,1275d1291 < <  < File: bfd.info, Node: Linker Functions, Next: Hash Tables, Prev: File Caching, Up: BFD front end < < Linker Functions < ================ < < The linker uses three special entry points in the BFD target vector. < It is not necessary to write special routines for these entry points < when creating a new BFD back end, since generic versions are provided. < However, writing them can speed up linking and make it use < significantly less runtime memory. < < The first routine creates a hash table used by the other routines. < The second routine adds the symbols from an object file to the hash < table. The third routine takes all the object files and links them < together to create the output file. These routines are designed so < that the linker proper does not need to know anything about the symbols < in the object files that it is linking. The linker merely arranges the < sections as directed by the linker script and lets BFD handle the < details of symbols and relocs. < < The second routine and third routines are passed a pointer to a < `struct bfd_link_info' structure (defined in `bfdlink.h') which holds < information relevant to the link, including the linker hash table < (which was created by the first routine) and a set of callback < functions to the linker proper. < < The generic linker routines are in `linker.c', and use the header < file `genlink.h'. As of this writing, the only back ends which have < implemented versions of these routines are a.out (in `aoutx.h') and < ECOFF (in `ecoff.c'). The a.out routines are used as examples < throughout this section. < < * Menu: < < * Creating a Linker Hash Table:: < * Adding Symbols to the Hash Table:: < * Performing the Final Link:: diff -rN binutils-2.11/bfd/doc/bfd.info-5 binutils-2.11.2/bfd/doc/bfd.info-5 18a19,57 > File: bfd.info, Node: Linker Functions, Next: Hash Tables, Prev: File Caching, Up: BFD front end > > Linker Functions > ================ > > The linker uses three special entry points in the BFD target vector. > It is not necessary to write special routines for these entry points > when creating a new BFD back end, since generic versions are provided. > However, writing them can speed up linking and make it use > significantly less runtime memory. > > The first routine creates a hash table used by the other routines. > The second routine adds the symbols from an object file to the hash > table. The third routine takes all the object files and links them > together to create the output file. These routines are designed so > that the linker proper does not need to know anything about the symbols > in the object files that it is linking. The linker merely arranges the > sections as directed by the linker script and lets BFD handle the > details of symbols and relocs. > > The second routine and third routines are passed a pointer to a > `struct bfd_link_info' structure (defined in `bfdlink.h') which holds > information relevant to the link, including the linker hash table > (which was created by the first routine) and a set of callback > functions to the linker proper. > > The generic linker routines are in `linker.c', and use the header > file `genlink.h'. As of this writing, the only back ends which have > implemented versions of these routines are a.out (in `aoutx.h') and > ECOFF (in `ecoff.c'). The a.out routines are used as examples > throughout this section. > > * Menu: > > * Creating a Linker Hash Table:: > * Adding Symbols to the Hash Table:: > * Performing the Final Link:: > >  diff -rN binutils-2.11/bfd/doc/bfd.info-7 binutils-2.11.2/bfd/doc/bfd.info-7 411a412 > * BFD_RELOC_MIPS_DELETE: howto manager. 419a421,425 > * BFD_RELOC_MIPS_HIGHER: howto manager. > * BFD_RELOC_MIPS_HIGHEST: howto manager. > * BFD_RELOC_MIPS_INSERT_A: howto manager. > * BFD_RELOC_MIPS_INSERT_B: howto manager. > * BFD_RELOC_MIPS_JALR: howto manager. 421a428,432 > * BFD_RELOC_MIPS_REL16: howto manager. > * BFD_RELOC_MIPS_RELGOT: howto manager. > * BFD_RELOC_MIPS_SCN_DISP: howto manager. > * BFD_RELOC_MIPS_SHIFT5: howto manager. > * BFD_RELOC_MIPS_SHIFT6: howto manager. 536a548 > * BFD_RELOC_SPARC_UA16: howto manager. 537a550 > * BFD_RELOC_SPARC_UA64: howto manager. diff -rN binutils-2.11/bfd/doc/bfd.texinfo binutils-2.11.2/bfd/doc/bfd.texinfo 3c3,5 < @c $Id: bfd.texinfo,v 1.2 2000/11/15 18:24:49 nickc Exp $ --- > @c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 2000 > @c Free Software Foundation, Inc. > @c 65c67 < \xdef\manvers{\$Revision: 1.2 $} % For use in headers, footers too --- > \xdef\manvers{\$Revision: 1.2.2.1 $} % For use in headers, footers too diff -rN binutils-2.11/bfd/doc/bfdint.texi binutils-2.11.2/bfd/doc/bfdint.texi 1a2,4 > @c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, > @c 2000 > @c Free Software Foundation, Inc. 296c299 < use BFD, such as the @samp{-oformat} linker option. --- > use BFD, such as the @samp{--oformat} linker option. diff -rN binutils-2.11/bfd/doc/chew.c binutils-2.11.2/bfd/doc/chew.c 2c2 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1998, 2000, 2001 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001 diff -rN binutils-2.11/bfd/doc/reloc.texi binutils-2.11.2/bfd/doc/reloc.texi 601a602 > @deffnx {} BFD_RELOC_SPARC_UA16 602a604 > @deffnx {} BFD_RELOC_SPARC_UA64 754a757,767 > @deffnx {} BFD_RELOC_MIPS_SHIFT5 > @deffnx {} BFD_RELOC_MIPS_SHIFT6 > @deffnx {} BFD_RELOC_MIPS_INSERT_A > @deffnx {} BFD_RELOC_MIPS_INSERT_B > @deffnx {} BFD_RELOC_MIPS_DELETE > @deffnx {} BFD_RELOC_MIPS_HIGHEST > @deffnx {} BFD_RELOC_MIPS_HIGHER > @deffnx {} BFD_RELOC_MIPS_SCN_DISP > @deffnx {} BFD_RELOC_MIPS_REL16 > @deffnx {} BFD_RELOC_MIPS_RELGOT > @deffnx {} BFD_RELOC_MIPS_JALR diff -rN binutils-2.11/bfd/doc/section.texi binutils-2.11.2/bfd/doc/section.texi 323a324,327 > /* Another mark flag used by some of the linker backends. Set for > output sections that have a input section. */ > unsigned int linker_has_input : 1; > diff -rN binutils-2.11/bfd/dwarf1.c binutils-2.11.2/bfd/dwarf1.c 461c461 < bfd_vma addr = offset + section->vma; --- > unsigned long addr = (unsigned long)(offset + section->vma); diff -rN binutils-2.11/bfd/dwarf2.c binutils-2.11.2/bfd/dwarf2.c 2c2,3 < Copyright 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 439c440 < if (offset > stash->dwarf_abbrev_size) --- > if (offset >= stash->dwarf_abbrev_size) 441c442 < (*_bfd_error_handler) (_("Dwarf Error: Abbrev offset (%u) bigger than abbrev size (%u)."), --- > (*_bfd_error_handler) (_("Dwarf Error: Abbrev offset (%u) greater than or equal to abbrev size (%u)."), 806c807 < (*_bfd_error_handler) (_("Dwarf Error: Line offset (%u) bigger than line size (%u)."), --- > (*_bfd_error_handler) (_("Dwarf Error: Line offset (%u) greater than or equal to line size (%u)."), diff -rN binutils-2.11/bfd/ecoff.c binutils-2.11.2/bfd/ecoff.c 2c2 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 77,90c77,98 < /* name, index, next, flags, set_vma, reloc_done, linker_mark, gc_mark */ < "*DEBUG*", 0, 0, 0, 0, 0, 0, 0, < /* vma, lma, _cooked_size, _raw_size, output_offset, output_section, */ < 0, 0, 0, 0, 0, NULL, < /* alig, reloc..., orel..., reloc_count, filepos, rel_..., line_... */ < 0, 0, 0, 0, 0, 0, 0, < /* userdata, contents, lineno, lineno_count */ < 0, 0, 0, 0, < /* comdat_info, moving_line_filepos, target_index, used_by_bfd, */ < NULL, 0, 0, 0, < /* cons, owner, symbol */ < 0, 0, (struct symbol_cache_entry *) NULL, < /* symbol_ptr_ptr, link_order_head, ..._tail */ < (struct symbol_cache_entry **) NULL, NULL, NULL --- > /* name, id, index, next, flags, user_set_vma, reloc_done, */ > "*DEBUG*", 0, 0, NULL, 0, 0, 0, > /* linker_mark, linker_has_input, gc_mark, segment_mark, */ > 0, 0, 0, 0, > /* vma, lma, _cooked_size, _raw_size, */ > 0, 0, 0, 0, > /* output_offset, output_section, alignment_power, */ > 0, NULL, 0, > /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ > NULL, NULL, 0, 0, 0, > /* line_filepos, userdata, contents, lineno, lineno_count, */ > 0, NULL, NULL, NULL, 0, > /* comdat, kept_section, moving_line_filepos, */ > NULL, NULL, 0, > /* target_index, used_by_bfd, constructor_chain, owner, */ > 0, NULL, NULL, NULL, > /* symbol, */ > (struct symbol_cache_entry *) NULL, > /* symbol_ptr_ptr, */ > (struct symbol_cache_entry **) NULL, > /* link_order_head, link_order_tail */ > NULL, NULL diff -rN binutils-2.11/bfd/ecofflink.c binutils-2.11.2/bfd/ecofflink.c 2c2,3 < Copyright 1993, 94, 95, 96, 97, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1996, 1997, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/ecoffswap.h binutils-2.11.2/bfd/ecoffswap.h 2c2,3 < Copyright 1992, 1993, 1994, 1995, 1996, 2000 Free Software Foundation, Inc. --- > Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001 > Free Software Foundation, Inc. 198c199 < if (intern->rss == 0xffffffff) --- > if (intern->rss == (signed long) 0xffffffff) diff -rN binutils-2.11/bfd/efi-app-ia32.c binutils-2.11.2/bfd/efi-app-ia32.c 2c2 < Copyright 1999 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. 31,32c31 < #define ALIGN_SECTIONS_IN_FILE < #define PEI_DEFAULT_TARGET_SUBSYSTEM IMAGE_SUBSYSTEM_EFI_APPLICATION --- > #define PEI_TARGET_SUBSYSTEM IMAGE_SUBSYSTEM_EFI_APPLICATION diff -rN binutils-2.11/bfd/efi-app-ia64.c binutils-2.11.2/bfd/efi-app-ia64.c 2c2 < Copyright 1999 Free Software Foundation, Inc. --- > Copyright 1999, 2000, 2001 Free Software Foundation, Inc. 28c28 < #define COFF_WITH_PEP64 --- > #define COFF_WITH_pep 32c32 < #define PEI_DEFAULT_TARGET_SUBSYSTEM IMAGE_SUBSYSTEM_EFI_APPLICATION --- > #define PEI_TARGET_SUBSYSTEM IMAGE_SUBSYSTEM_EFI_APPLICATION diff -rN binutils-2.11/bfd/elf-bfd.h binutils-2.11.2/bfd/elf-bfd.h 2,3c2,3 < Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999, 2000 Free Software < Foundation, Inc. --- > Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 28a29,33 > > /* The number of entries in a section is its size divided by the size > of a single entry. This is normally only applicaable to reloc and > symbol table sections. */ > #define NUM_SHDR_ENTRIES(shdr) ((shdr)->sh_size / (shdr)->sh_entsize) diff -rN binutils-2.11/bfd/elf-m10200.c binutils-2.11.2/bfd/elf-m10200.c 2c2,3 < Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 38,39c39 < enum reloc_type < { --- > enum reloc_type { 51,52c51 < static reloc_howto_type elf_mn10200_howto_table[] = < { --- > static reloc_howto_type elf_mn10200_howto_table[] = { 168,169c167 < struct mn10200_reloc_map < { --- > struct mn10200_reloc_map { 174,181c172,178 < static const struct mn10200_reloc_map mn10200_reloc_map[] = < { < { BFD_RELOC_NONE, R_MN10200_NONE, }, < { BFD_RELOC_32, R_MN10200_32, }, < { BFD_RELOC_16, R_MN10200_16, }, < { BFD_RELOC_8, R_MN10200_8, }, < { BFD_RELOC_24, R_MN10200_24, }, < { BFD_RELOC_8_PCREL, R_MN10200_PCREL8, }, --- > static const struct mn10200_reloc_map mn10200_reloc_map[] = { > { BFD_RELOC_NONE , R_MN10200_NONE , }, > { BFD_RELOC_32 , R_MN10200_32 , }, > { BFD_RELOC_16 , R_MN10200_16 , }, > { BFD_RELOC_8 , R_MN10200_8 , }, > { BFD_RELOC_24 , R_MN10200_24 , }, > { BFD_RELOC_8_PCREL , R_MN10200_PCREL8 , }, 253c250 < if ((long)value > 0x7fff || (long)value < -0x8000) --- > if ((long) value > 0x7fff || (long) value < -0x8000) 262c259 < if ((long)value > 0x7f || (long)value < -0x80) --- > if ((long) value > 0x7f || (long) value < -0x80) 271c268 < if ((long)value > 0x7fffff || (long)value < -0x800000) --- > if ((long) value > 0x7fffff || (long) value < -0x800000) 285,286c282,283 < if ((long)value > 0xff || (long)value < -0x100) < return bfd_reloc_overflow; --- > if ((long) value > 0xff || (long) value < -0x100) > return bfd_reloc_overflow; 297,298c294,295 < if ((long)value > 0xffff || (long)value < -0x10000) < return bfd_reloc_overflow; --- > if ((long) value > 0xffff || (long) value < -0x10000) > return bfd_reloc_overflow; 309,310c306,307 < if ((long)value > 0xffffff || (long)value < -0x1000000) < return bfd_reloc_overflow; --- > if ((long) value > 0xffffff || (long) value < -0x1000000) > return bfd_reloc_overflow; 425c422 < const char *msg = (const char *)0; --- > const char *msg = (const char *) 0; 670c667 < if ((long)value < 0x8001 && (long)value > -0x8000) --- > if ((long) value < 0x8001 && (long) value > -0x8000) 728c725 < if ((long)value < 0x80 && (long)value > -0x80) --- > if ((long) value < 0x80 && (long) value > -0x80) 848,901c845,898 < case 0xfc: < code = 0xfd; < break; < case 0xfd: < code = 0xfc; < break; < case 0xfe: < code = 0xff; < break; < case 0xff: < code = 0xfe; < break; < case 0xe8: < code = 0xe9; < break; < case 0xe9: < code = 0xe8; < break; < case 0xe0: < code = 0xe2; < break; < case 0xe2: < code = 0xe0; < break; < case 0xe3: < code = 0xe1; < break; < case 0xe1: < code = 0xe3; < break; < case 0xe4: < code = 0xe6; < break; < case 0xe6: < code = 0xe4; < break; < case 0xe7: < code = 0xe5; < break; < case 0xe5: < code = 0xe7; < break; < case 0xec: < code = 0xed; < break; < case 0xed: < code = 0xec; < break; < case 0xee: < code = 0xef; < break; < case 0xef: < code = 0xee; < break; --- > case 0xfc: > code = 0xfd; > break; > case 0xfd: > code = 0xfc; > break; > case 0xfe: > code = 0xff; > break; > case 0xff: > code = 0xfe; > break; > case 0xe8: > code = 0xe9; > break; > case 0xe9: > code = 0xe8; > break; > case 0xe0: > code = 0xe2; > break; > case 0xe2: > code = 0xe0; > break; > case 0xe3: > code = 0xe1; > break; > case 0xe1: > code = 0xe3; > break; > case 0xe4: > code = 0xe6; > break; > case 0xe6: > code = 0xe4; > break; > case 0xe7: > code = 0xe5; > break; > case 0xe5: > code = 0xe7; > break; > case 0xec: > code = 0xed; > break; > case 0xed: > code = 0xec; > break; > case 0xee: > code = 0xef; > break; > case 0xef: > code = 0xee; > break; 932c929 < if ((long)value < 0x7fff && (long)value > -0x8000) --- > if ((long) value < 0x7fff && (long) value > -0x8000) 1075,1088c1072,1085 < || (code & 0xfc) == 0x60 < || (code & 0xfc) == 0x64 < || (code & 0xfc) == 0x68 < || (code & 0xfc) == 0x6c < || (code & 0xfc) == 0x80 < || (code & 0xfc) == 0xf0 < || (code & 0xfc) == 0x00 < || (code & 0xfc) == 0x10 < || (code & 0xfc) == 0xb0 < || (code & 0xfc) == 0x30 < || (code & 0xfc) == 0xa0 < || (code & 0xfc) == 0x20 < || (code & 0xfc) == 0x90) < && (value & 0x8000) != 0) --- > || (code & 0xfc) == 0x60 > || (code & 0xfc) == 0x64 > || (code & 0xfc) == 0x68 > || (code & 0xfc) == 0x6c > || (code & 0xfc) == 0x80 > || (code & 0xfc) == 0xf0 > || (code & 0xfc) == 0x00 > || (code & 0xfc) == 0x10 > || (code & 0xfc) == 0xb0 > || (code & 0xfc) == 0x30 > || (code & 0xfc) == 0xa0 > || (code & 0xfc) == 0x20 > || (code & 0xfc) == 0x90) > && (value & 0x8000) != 0) diff -rN binutils-2.11/bfd/elf-m10300.c binutils-2.11.2/bfd/elf-m10300.c 2c2,3 < Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 26,27c27 < struct elf32_mn10300_link_hash_entry < { --- > struct elf32_mn10300_link_hash_entry { 65,66c65 < struct elf32_mn10300_link_hash_table < { --- > struct elf32_mn10300_link_hash_table { 122,123c121 < static reloc_howto_type elf_mn10300_howto_table[] = < { --- > static reloc_howto_type elf_mn10300_howto_table[] = { 267d264 < 270,271c267 < struct mn10300_reloc_map < { --- > struct mn10300_reloc_map { 276,277c272 < static const struct mn10300_reloc_map mn10300_reloc_map[] = < { --- > static const struct mn10300_reloc_map mn10300_reloc_map[] = { 462c457 < if ((long)value > 0x7fffff || (long)value < -0x800000) --- > if ((long) value > 0x7fffff || (long) value < -0x800000) 473c468 < if ((long)value > 0x7fff || (long)value < -0x8000) --- > if ((long) value > 0x7fff || (long) value < -0x8000) 482c477 < if ((long)value > 0x7f || (long)value < -0x80) --- > if ((long) value > 0x7f || (long) value < -0x80) 494c489 < if ((long)value > 0xff || (long)value < -0x100) --- > if ((long) value > 0xff || (long) value < -0x100) 506c501 < if ((long)value > 0xffff || (long)value < -0x10000) --- > if ((long) value > 0xffff || (long) value < -0x10000) 639c634 < const char *msg = (const char *)0; --- > const char *msg = (const char *) 0; 705c700 < entry = (struct elf32_mn10300_link_hash_entry *)gen_entry; --- > entry = (struct elf32_mn10300_link_hash_entry *) gen_entry; 825,840c820,835 < /* Get cached copy if it exists. */ < if (symtab_hdr->contents != NULL) < extsyms = (Elf32_External_Sym *) symtab_hdr->contents; < else < { < /* Go get them off disk. */ < extsyms = ((Elf32_External_Sym *) < bfd_malloc (symtab_hdr->sh_size)); < if (extsyms == NULL) < goto error_return; < free_extsyms = extsyms; < if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0 < || (bfd_read (extsyms, 1, symtab_hdr->sh_size, input_bfd) < != symtab_hdr->sh_size)) < goto error_return; < } --- > /* Get cached copy if it exists. */ > if (symtab_hdr->contents != NULL) > extsyms = (Elf32_External_Sym *) symtab_hdr->contents; > else > { > /* Go get them off disk. */ > extsyms = ((Elf32_External_Sym *) > bfd_malloc (symtab_hdr->sh_size)); > if (extsyms == NULL) > goto error_return; > free_extsyms = extsyms; > if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0 > || (bfd_read (extsyms, 1, symtab_hdr->sh_size, input_bfd) > != symtab_hdr->sh_size)) > goto error_return; > } 859c854 < contents = (bfd_byte *)bfd_malloc (section->_raw_size); --- > contents = (bfd_byte *) bfd_malloc (section->_raw_size); 902c897 < if (r_type < 0 || r_type >= (int)R_MN10300_MAX) --- > if (r_type < 0 || r_type >= (int) R_MN10300_MAX) 947c942,943 < sprintf (new_name, "%s_%08x", sym_name, (int)sym_sec); --- > sprintf (new_name, "%s_%08x", > sym_name, (int) sym_sec); 1027c1023,1024 < sprintf (new_name, "%s_%08x", sym_name, (int)sym_sec); --- > sprintf (new_name, "%s_%08x", > sym_name, (int) sym_sec); 1036c1033 < isym.st_value, contents); --- > isym.st_value, contents); 1121,1136c1118,1133 < /* Get cached copy if it exists. */ < if (symtab_hdr->contents != NULL) < extsyms = (Elf32_External_Sym *) symtab_hdr->contents; < else < { < /* Go get them off disk. */ < extsyms = ((Elf32_External_Sym *) < bfd_malloc (symtab_hdr->sh_size)); < if (extsyms == NULL) < goto error_return; < free_extsyms = extsyms; < if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0 < || (bfd_read (extsyms, 1, symtab_hdr->sh_size, input_bfd) < != symtab_hdr->sh_size)) < goto error_return; < } --- > /* Get cached copy if it exists. */ > if (symtab_hdr->contents != NULL) > extsyms = (Elf32_External_Sym *) symtab_hdr->contents; > else > { > /* Go get them off disk. */ > extsyms = ((Elf32_External_Sym *) > bfd_malloc (symtab_hdr->sh_size)); > if (extsyms == NULL) > goto error_return; > free_extsyms = extsyms; > if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0 > || (bfd_read (extsyms, 1, symtab_hdr->sh_size, input_bfd) > != symtab_hdr->sh_size)) > goto error_return; > } 1153,1161c1150,1158 < /* Get a copy of the native relocations. */ < internal_relocs = (_bfd_elf32_link_read_relocs < (input_bfd, section, (PTR) NULL, < (Elf_Internal_Rela *) NULL, < link_info->keep_memory)); < if (internal_relocs == NULL) < goto error_return; < if (! link_info->keep_memory) < free_relocs = internal_relocs; --- > /* Get a copy of the native relocations. */ > internal_relocs = (_bfd_elf32_link_read_relocs > (input_bfd, section, (PTR) NULL, > (Elf_Internal_Rela *) NULL, > link_info->keep_memory)); > if (internal_relocs == NULL) > goto error_return; > if (! link_info->keep_memory) > free_relocs = internal_relocs; 1170c1167 < contents = (bfd_byte *)bfd_malloc (section->_raw_size); --- > contents = (bfd_byte *) bfd_malloc (section->_raw_size); 1221c1218 < sprintf (new_name, "%s_%08x", sym_name, (int)sym_sec); --- > sprintf (new_name, "%s_%08x", sym_name, (int) sym_sec); 1245c1242 < symtab_hdr->contents = (bfd_byte *)extsyms; --- > symtab_hdr->contents = (bfd_byte *) extsyms; 1302c1299 < symtab_hdr->contents = (bfd_byte *)extsyms; --- > symtab_hdr->contents = (bfd_byte *) extsyms; 1492c1489 < sprintf (new_name, "%s_%08x", sym_name, (int)sym_sec); --- > sprintf (new_name, "%s_%08x", sym_name, (int) sym_sec); 1606c1603 < if ((long)value < 0x8001 && (long)value > -0x8000) --- > if ((long) value < 0x8001 && (long) value > -0x8000) 1721c1718 < if ((long)value < 0x80 && (long)value > -0x80) --- > if ((long) value < 0x80 && (long) value > -0x80) 1840,1881c1837,1878 < case 0xc8: < code = 0xc9; < break; < case 0xc9: < code = 0xc8; < break; < case 0xc0: < code = 0xc2; < break; < case 0xc2: < code = 0xc0; < break; < case 0xc3: < code = 0xc1; < break; < case 0xc1: < code = 0xc3; < break; < case 0xc4: < code = 0xc6; < break; < case 0xc6: < code = 0xc4; < break; < case 0xc7: < code = 0xc5; < break; < case 0xc5: < code = 0xc7; < break; < case 0xe8: < code = 0xe9; < break; < case 0x9d: < code = 0xe8; < break; < case 0xea: < code = 0xeb; < break; < case 0xeb: < code = 0xea; < break; --- > case 0xc8: > code = 0xc9; > break; > case 0xc9: > code = 0xc8; > break; > case 0xc0: > code = 0xc2; > break; > case 0xc2: > code = 0xc0; > break; > case 0xc3: > code = 0xc1; > break; > case 0xc1: > code = 0xc3; > break; > case 0xc4: > code = 0xc6; > break; > case 0xc6: > code = 0xc4; > break; > case 0xc7: > code = 0xc5; > break; > case 0xc5: > code = 0xc7; > break; > case 0xe8: > code = 0xe9; > break; > case 0x9d: > code = 0xe8; > break; > case 0xea: > code = 0xeb; > break; > case 0xeb: > code = 0xea; > break; 1911c1908 < if ((long)value < 0x7f && (long)value > -0x80) --- > if ((long) value < 0x7f && (long) value > -0x80) 1923,1924c1920,1921 < /* Get the second opcode. */ < code = bfd_get_8 (abfd, contents + irel->r_offset - 2); --- > /* Get the second opcode. */ > code = bfd_get_8 (abfd, contents + irel->r_offset - 2); 1956,1958c1953,1955 < irel->r_info < = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), < R_MN10300_8); --- > irel->r_info = > ELF32_R_INFO (ELF32_R_SYM (irel->r_info), > R_MN10300_8); 1967c1964 < may be slow. */ --- > may be slow. */ 1972d1968 < 1987c1983 < if ((long)value < 0x7fffff && (long)value > -0x800000) --- > if ((long) value < 0x7fffff && (long) value > -0x800000) 2005c2001 < if (code != 0x6b && code != 0x7b --- > if (code != 0x6b && code != 0x7b 2033,2035c2029,2031 < irel->r_info < = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), < R_MN10300_24); --- > irel->r_info = > ELF32_R_INFO (ELF32_R_SYM (irel->r_info), > R_MN10300_24); 2044c2040 < may be slow. */ --- > may be slow. */ 2049d2044 < 2056c2051 < if ((long)value < 0x7fff && (long)value > -0x8000) --- > if ((long) value < 0x7fff && (long) value > -0x8000) 2190a2186,2190 > /* sp-based offsets are zero-extended. */ > if (code >= 0x90 && code <= 0x93 > && (long)value < 0) > continue; > 2238a2239,2243 > /* mov imm16, an zero-extends the immediate. */ > if (code == 0xdc > && (long)value < 0) > continue; > 2284,2287c2289,2292 < mov (d32,sp),an -> mov (d32,sp),an < mov (d32,sp),dn -> mov (d32,sp),dn < movbu (d32,sp),dn -> movbu (d32,sp),dn < movhu (d32,sp),dn -> movhu (d32,sp),dn --- > mov (d32,sp),an -> mov (d16,sp),an > mov (d32,sp),dn -> mov (d16,sp),dn > movbu (d32,sp),dn -> movbu (d16,sp),dn > movhu (d32,sp),dn -> movhu (d16,sp),dn 2292,2295c2297,2300 < and imm32,dn -> and imm32,dn < or imm32,dn -> or imm32,dn < xor imm32,dn -> xor imm32,dn < btst imm32,dn -> btst imm32,dn */ --- > and imm32,dn -> and imm16,dn > or imm32,dn -> or imm16,dn > xor imm32,dn -> xor imm16,dn > btst imm32,dn -> btst imm16,dn */ 2310a2316,2325 > /* cmp imm16, an zero-extends the immediate. */ > if (code == 0xdc > && (long)value < 0) > continue; > > /* So do sp-based offsets. */ > if (code >= 0xb0 && code <= 0xb3 > && (long)value < 0) > continue; > 2359c2374 < R_MN10300_16); --- > R_MN10300_16); 2875,2877c2890,2892 < case E_MN10300_MACH_MN10300: < default: < return bfd_mach_mn10300; --- > case E_MN10300_MACH_MN10300: > default: > return bfd_mach_mn10300; 2879,2880c2894,2895 < case E_MN10300_MACH_AM33: < return bfd_mach_am33; --- > case E_MN10300_MACH_AM33: > return bfd_mach_am33; 2897,2904c2912,2919 < default: < case bfd_mach_mn10300: < val = E_MN10300_MACH_MN10300; < break; < < case bfd_mach_am33: < val = E_MN10300_MACH_AM33; < break; --- > default: > case bfd_mach_mn10300: > val = E_MN10300_MACH_MN10300; > break; > > case bfd_mach_am33: > val = E_MN10300_MACH_AM33; > break; 2916c2931 < elf_mn10300_mach (elf_elfheader (abfd)->e_flags)); --- > elf_mn10300_mach (elf_elfheader (abfd)->e_flags)); diff -rN binutils-2.11/bfd/elf.c binutils-2.11.2/bfd/elf.c 2c2,3 < Copyright 1993, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 58a60,63 > static boolean elf_find_function PARAMS ((bfd *, asection *, > asymbol **, > bfd_vma, const char **, > const char **)); 808,809c813,814 < CONST char *section_name; < CONST char *name = NULL; --- > const char *section_name; > const char *name = NULL; 1005d1009 < h->dynindx = -1; 1006a1011,1012 > if ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0) > h->dynindx = -1; 1426c1432 < target_sect->reloc_count += hdr->sh_size / hdr->sh_entsize; --- > target_sect->reloc_count += NUM_SHDR_ENTRIES (hdr); 3393c3399 < /* also note that EM_M32, AT&T WE32100 is unknown to bfd */ --- > /* Also note that EM_M32, AT&T WE32100 is unknown to bfd. */ 4730,4731c4736,4737 < if ((iverdefmem.vd_ndx & VERSYM_VERSION) > maxidx) < maxidx = iverdefmem.vd_ndx & VERSYM_VERSION; --- > if ((iverdefmem.vd_ndx & ((unsigned) VERSYM_VERSION)) > maxidx) > maxidx = iverdefmem.vd_ndx & ((unsigned) VERSYM_VERSION); 4974,4975c4980,4981 < /* Find the nearest line to a particular section and offset, for error < reporting. */ --- > /* Find the function to a particular section and offset, > for error reporting. */ 4977,4985c4983,4986 < boolean < _bfd_elf_find_nearest_line (abfd, < section, < symbols, < offset, < filename_ptr, < functionname_ptr, < line_ptr) < bfd *abfd; --- > static boolean > elf_find_function (abfd, section, symbols, offset, > filename_ptr, functionname_ptr) > bfd *abfd ATTRIBUTE_UNUSED; 4989,4991c4990,4991 < CONST char **filename_ptr; < CONST char **functionname_ptr; < unsigned int *line_ptr; --- > const char **filename_ptr; > const char **functionname_ptr; 4993d4992 < boolean found; 4999,5020d4997 < if (_bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset, < filename_ptr, functionname_ptr, < line_ptr)) < return true; < < if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset, < filename_ptr, functionname_ptr, < line_ptr, 0, < &elf_tdata (abfd)->dwarf2_find_line_info)) < return true; < < if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, < &found, filename_ptr, < functionname_ptr, line_ptr, < &elf_tdata (abfd)->line_info)) < return false; < if (found) < return true; < < if (symbols == NULL) < return false; < 5057,5058c5034,5097 < *filename_ptr = filename; < *functionname_ptr = bfd_asymbol_name (func); --- > if (filename_ptr) > *filename_ptr = filename; > if (functionname_ptr) > *functionname_ptr = bfd_asymbol_name (func); > > return true; > } > > /* Find the nearest line to a particular section and offset, > for error reporting. */ > > boolean > _bfd_elf_find_nearest_line (abfd, section, symbols, offset, > filename_ptr, functionname_ptr, line_ptr) > bfd *abfd; > asection *section; > asymbol **symbols; > bfd_vma offset; > const char **filename_ptr; > const char **functionname_ptr; > unsigned int *line_ptr; > { > boolean found; > > if (_bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset, > filename_ptr, functionname_ptr, > line_ptr)) > { > if (!*functionname_ptr) > elf_find_function (abfd, section, symbols, offset, > *filename_ptr ? NULL : filename_ptr, > functionname_ptr); > > return true; > } > > if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset, > filename_ptr, functionname_ptr, > line_ptr, 0, > &elf_tdata (abfd)->dwarf2_find_line_info)) > { > if (!*functionname_ptr) > elf_find_function (abfd, section, symbols, offset, > *filename_ptr ? NULL : filename_ptr, > functionname_ptr); > > return true; > } > > if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, > &found, filename_ptr, > functionname_ptr, line_ptr, > &elf_tdata (abfd)->line_info)) > return false; > if (found) > return true; > > if (symbols == NULL) > return false; > > if (! elf_find_function (abfd, section, symbols, offset, > filename_ptr, functionname_ptr)) > return false; > diff -rN binutils-2.11/bfd/elf32-arc.c binutils-2.11.2/bfd/elf32-arc.c 2c2 < Copyright (C) 1994, 1995, 1997, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1997, 1999, 2001 Free Software Foundation, Inc. 60,64c60,64 < 0, /* rightshift */ < 2, /* size (0 = byte, 1 = short, 2 = long) */ < 32, /* bitsize */ < false, /* pc_relative */ < 0, /* bitpos */ --- > 0, /* rightshift */ > 2, /* size (0 = byte, 1 = short, 2 = long) */ > 32, /* bitsize */ > false, /* pc_relative */ > 0, /* bitpos */ 66c66 < bfd_elf_generic_reloc, /* special_function */ --- > bfd_elf_generic_reloc, /* special_function */ 68,71c68,71 < false, /* partial_inplace */ < 0xffffffff, /* src_mask */ < 0xffffffff, /* dst_mask */ < false), /* pcrel_offset */ --- > false, /* partial_inplace */ > 0xffffffff, /* src_mask */ > 0xffffffff, /* dst_mask */ > false), /* pcrel_offset */ 158c158 < int mach = bfd_mach_arc_5; --- > int mach = bfd_mach_arc_6; 166d165 < default: 169a169 > default: 196d195 < default: 199a199 > default: diff -rN binutils-2.11/bfd/elf32-arm.h binutils-2.11.2/bfd/elf32-arm.h 2c2 < Copyright 1998, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc. 81c81 < static const bfd_byte elf32_arm_plt0_entry [PLT_ENTRY_SIZE] = --- > static const unsigned long elf32_arm_plt0_entry [PLT_ENTRY_SIZE / 4] = 83,86c83,86 < 0x04, 0xe0, 0x2d, 0xe5, /* str lr, [sp, #-4]! */ < 0x10, 0xe0, 0x9f, 0xe5, /* ldr lr, [pc, #16] */ < 0x0e, 0xe0, 0x8f, 0xe0, /* adr lr, pc, lr */ < 0x08, 0xf0, 0xbe, 0xe5 /* ldr pc, [lr, #8]! */ --- > 0xe52de004, /* str lr, [sp, #-4]! */ > 0xe59fe010, /* ldr lr, [pc, #16] */ > 0xe08fe00e, /* add lr, pc, lr */ > 0xe5bef008 /* ldr pc, [lr, #8]! */ 91c91 < static const bfd_byte elf32_arm_plt_entry [PLT_ENTRY_SIZE] = --- > static const unsigned long elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] = 93,96c93,96 < 0x04, 0xc0, 0x9f, 0xe5, /* ldr ip, [pc, #4] */ < 0x0c, 0xc0, 0x8f, 0xe0, /* add ip, pc, ip */ < 0x00, 0xf0, 0x9c, 0xe5, /* ldr pc, [ip] */ < 0x00, 0x00, 0x00, 0x00 /* offset to symbol in got */ --- > 0xe59fc004, /* ldr ip, [pc, #4] */ > 0xe08fc00c, /* add ip, pc, ip */ > 0xe59cf000, /* ldr pc, [ip] */ > 0x00000000 /* offset to symbol in got */ 1021a1022,1033 > /* If the start address has been set, then set the EF_ARM_HASENTRY > flag. Setting this more than once is redundant, but the cost is > not too high, and it keeps the code simple. > > The test is done here, rather than somewhere else, because the > start address is only set just before the final link commences. > > Note - if the user deliberately sets a start address of 0, the > flag will not be set. */ > if (bfd_get_start_address (output_bfd) != 0) > elf_elfheader (output_bfd)->e_flags |= EF_ARM_HASENTRY; > 1436a1449,1460 > #ifndef OLD_ARM_ABI > if (r_type == R_ARM_THM_XPC22 > && ((lower_insn & 0x1800) == 0x0800)) > /* Remove bit zero of the adjusted offset. Bit zero can only be > set if the upper insn is at a half-word boundary, since the > destination address, an ARM instruction, must always be on a > word boundary. The semantics of the BLX (1) instruction, however, > are that bit zero in the offset must always be zero, and the > corresponding bit one in the target address will be set from bit > one of the source address. */ > lower_insn &= ~1; > #endif 3138,3140c3162,3167 < memcpy (splt->contents + h->plt.offset, < elf32_arm_plt_entry, < PLT_ENTRY_SIZE); --- > bfd_put_32 (output_bfd, elf32_arm_plt_entry[0], > splt->contents + h->plt.offset + 0); > bfd_put_32 (output_bfd, elf32_arm_plt_entry[1], > splt->contents + h->plt.offset + 4); > bfd_put_32 (output_bfd, elf32_arm_plt_entry[2], > splt->contents + h->plt.offset + 8); 3336c3363,3368 < memcpy (splt->contents, elf32_arm_plt0_entry, PLT_ENTRY_SIZE); --- > { > bfd_put_32 (output_bfd, elf32_arm_plt0_entry[0], splt->contents + 0); > bfd_put_32 (output_bfd, elf32_arm_plt0_entry[1], splt->contents + 4); > bfd_put_32 (output_bfd, elf32_arm_plt0_entry[2], splt->contents + 8); > bfd_put_32 (output_bfd, elf32_arm_plt0_entry[3], splt->contents + 12); > } diff -rN binutils-2.11/bfd/elf32-avr.c binutils-2.11.2/bfd/elf32-avr.c 2c2 < Copyright (C) 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-cris.c binutils-2.11.2/bfd/elf32-cris.c 2c2 < Copyright (C) 2000 Free Software Foundation, Inc. --- > Copyright 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-d10v.c binutils-2.11.2/bfd/elf32-d10v.c 2c2 < Copyright (C) 1996, 1998, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-d30v.c binutils-2.11.2/bfd/elf32-d30v.c 2c2 < Copyright (C) 1997, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-fr30.c binutils-2.11.2/bfd/elf32-fr30.c 2c2 < Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-hppa.c binutils-2.11.2/bfd/elf32-hppa.c 368a369,371 > static boolean allocate_plt_and_got > PARAMS ((struct elf_link_hash_entry *, PTR)); > 769c772,773 < && hash->elf.plt.offset != (bfd_vma) -1) --- > && hash->elf.plt.offset != (bfd_vma) -1 > && hash->elf.type != STT_PARISC_MILLI) 833a838 > bfd_vma off; 941c946,951 < sym_value = (stub_entry->h->elf.plt.offset --- > off = stub_entry->h->elf.plt.offset; > if (off >= (bfd_vma) -2) > abort (); > > off &= ~ (bfd_vma) 1; > sym_value = (off 1000,1001c1010,1012 < BFD_ASSERT (eh->elf.root.type == bfd_link_hash_defined < || eh->elf.root.type == bfd_link_hash_defweak); --- > if (eh->elf.root.type != bfd_link_hash_defined > && eh->elf.root.type != bfd_link_hash_defweak) > abort (); 1014c1025 < hplink->splt->contents + eh->elf.plt.offset); --- > hplink->splt->contents + off); 1017c1028 < hplink->splt->contents + eh->elf.plt.offset + 4); --- > hplink->splt->contents + off + 4); 1139c1150,1151 < unsigned int flags = elf_elfheader (abfd)->e_flags; --- > Elf_Internal_Ehdr * i_ehdrp; > unsigned int flags; 1140a1153,1165 > i_ehdrp = elf_elfheader (abfd); > if (strcmp (bfd_get_target (abfd), "elf32-hppa-linux") == 0) > { > if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX) > return false; > } > else > { > if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_HPUX) > return false; > } > > flags = i_ehdrp->e_flags; 1291c1316,1317 < BFD_ASSERT (rel->r_addend == 0); --- > if (rel->r_addend != 0) > abort (); 1297c1323,1334 < pointing to the PLT entry. */ --- > pointing to the PLT entry. > For executables, the original 32-bit ABI allowed two > different styles of PLABELs (function pointers): For > global functions, the PLABEL word points into the .plt > two bytes past a (function address, gp) pair, and for > local functions the PLABEL points directly at the > function. The magic +2 for the first type allows us to > differentiate between the two. As you can imagine, this > is a real pain when it comes to generating code to call > functions indirectly or to compare function pointers. > We avoid the mess by always pointing a PLABEL into the > .plt, even for local functions. */ 1327a1365,1366 > if (h->elf.type == STT_PARISC_MILLI) > need_entry = NEED_STUBREL; 1426,1428d1464 < < hplink->sgot->_raw_size += GOT_ENTRY_SIZE; < hplink->srelgot->_raw_size += sizeof (Elf32_External_Rela); 1453,1466c1489 < { < local_got_refcounts[r_symndx] = 1; < < hplink->sgot->_raw_size += GOT_ENTRY_SIZE; < if (info->shared) < { < /* If we are generating a shared object, we need to < output a reloc so that the dynamic linker can < adjust this GOT entry (because the address < the shared library is loaded at is not fixed). */ < hplink->srelgot->_raw_size += < sizeof (Elf32_External_Rela); < } < } --- > local_got_refcounts[r_symndx] = 1; 1768,1769d1790 < asection *sgot; < asection *srelgot; 1782,1784d1802 < sgot = hplink->sgot; < srelgot = hplink->srelgot; < 1797,1804c1815 < { < h->got.refcount -= 1; < if (h->got.refcount == 0) < { < sgot->_raw_size -= GOT_ENTRY_SIZE; < srelgot->_raw_size -= sizeof (Elf32_External_Rela); < } < } --- > h->got.refcount -= 1; 1809,1817c1820 < { < local_got_refcounts[r_symndx] -= 1; < if (local_got_refcounts[r_symndx] == 0) < { < sgot->_raw_size -= GOT_ENTRY_SIZE; < if (info->shared) < srelgot->_raw_size -= sizeof (Elf32_External_Rela); < } < } --- > local_got_refcounts[r_symndx] -= 1; 1866c1869,1870 < h->dynindx = -1; --- > if ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0) > h->dynindx = -1; 1873a1878,1888 > /* This is the condition under which elf32_hppa_finish_dynamic_symbol > will be called from elflink.h. If elflink.h doesn't call our > finish_dynamic_symbol routine, we'll need to do something about > initializing any .plt and .got entries in elf32_hppa_relocate_section. */ > #define WILL_CALL_FINISH_DYNAMIC_SYMBOL(DYN, INFO, H) \ > ((DYN) \ > && ((INFO)->shared \ > || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) \ > && ((H)->dynindx != -1 \ > || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)) > 1932,1944d1946 < /* Make an entry in the .plt section. */ < s = hplink->splt; < h->plt.offset = s->_raw_size; < if (PLABEL_PLT_ENTRY_SIZE != PLT_ENTRY_SIZE < && ((struct elf32_hppa_link_hash_entry *) h)->plabel < && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) < { < /* Add some extra space for the dynamic linker to use. */ < s->_raw_size += PLABEL_PLT_ENTRY_SIZE; < } < else < s->_raw_size += PLT_ENTRY_SIZE; < 1954,1959d1955 < < /* We also need to make an entry in the .rela.plt section. */ < s = hplink->srelplt; < s->_raw_size += sizeof (Elf32_External_Rela); < < hplink->need_plt_stub = 1; 1960a1957 > 1969,1970c1966,1968 < BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined < || h->weakdef->root.type == bfd_link_hash_defweak); --- > if (h->weakdef->root.type != bfd_link_hash_defined > && h->weakdef->root.type != bfd_link_hash_defweak) > abort (); 2051c2049 < PTR inf; --- > PTR inf ATTRIBUTE_UNUSED; 2053,2057d2050 < struct bfd_link_info *info; < bfd *dynobj; < struct elf32_hppa_link_hash_table *hplink; < asection *s; < 2071a2065,2083 > return true; > } > > /* Allocate space in .plt, .got and associated reloc sections for > global syms. */ > > static boolean > allocate_plt_and_got (h, inf) > struct elf_link_hash_entry *h; > PTR inf; > { > struct bfd_link_info *info; > struct elf32_hppa_link_hash_table *hplink; > asection *s; > > if (h->root.type == bfd_link_hash_indirect > || h->root.type == bfd_link_hash_warning) > return true; > 2074c2086,2101 < dynobj = hplink->root.dynobj; --- > if ((hplink->root.dynamic_sections_created > && h->plt.refcount > 0) > || ((struct elf32_hppa_link_hash_entry *) h)->pic_call) > { > /* Make an entry in the .plt section. */ > s = hplink->splt; > h->plt.offset = s->_raw_size; > if (PLABEL_PLT_ENTRY_SIZE != PLT_ENTRY_SIZE > && ((struct elf32_hppa_link_hash_entry *) h)->plabel > && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) > { > /* Add some extra space for the dynamic linker to use. */ > s->_raw_size += PLABEL_PLT_ENTRY_SIZE; > } > else > s->_raw_size += PLT_ENTRY_SIZE; 2076,2079c2103,2129 < /* Make an entry in the .plt section. */ < s = hplink->splt; < h->plt.offset = s->_raw_size; < s->_raw_size += PLT_ENTRY_SIZE; --- > if (! ((struct elf32_hppa_link_hash_entry *) h)->pic_call > && WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h)) > { > /* We also need to make an entry in the .rela.plt section. */ > hplink->srelplt->_raw_size += sizeof (Elf32_External_Rela); > hplink->need_plt_stub = 1; > } > } > else > { > h->plt.offset = (bfd_vma) -1; > h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; > } > > if (h->got.refcount > 0) > { > boolean dyn; > > s = hplink->sgot; > h->got.offset = s->_raw_size; > s->_raw_size += GOT_ENTRY_SIZE; > dyn = hplink->root.dynamic_sections_created; > if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h)) > hplink->srelgot->_raw_size += sizeof (Elf32_External_Rela); > } > else > h->got.offset = (bfd_vma) -1; 2146,2147c2196,2197 < /* Note! We only want to remove these from the dynamic symbol < table. Therefore we do not set ELF_LINK_FORCED_LOCAL. */ --- > /* We only want to remove these from the dynamic symbol table. > Therefore we do not leave ELF_LINK_FORCED_LOCAL set. */ 2149c2199,2205 < elf32_hppa_hide_symbol (info, h); --- > { > unsigned short oldflags = h->elf_link_hash_flags; > h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; > elf32_hppa_hide_symbol (info, h); > h->elf_link_hash_flags &= ~ELF_LINK_FORCED_LOCAL; > h->elf_link_hash_flags |= oldflags & ELF_LINK_FORCED_LOCAL; > } 2168c2224,2225 < BFD_ASSERT (dynobj != NULL); --- > if (dynobj == NULL) > abort (); 2178c2235,2236 < BFD_ASSERT (s != NULL); --- > if (s == NULL) > abort (); 2188c2246 < /* Set up .plt offsets for local plabels. */ --- > /* Set up .got and .plt offsets for local syms. */ 2190a2249,2250 > bfd_signed_vma *local_got; > bfd_signed_vma *end_local_got; 2194a2255,2258 > asection *srel; > > if (bfd_get_flavour (i) != bfd_target_elf_flavour) > continue; 2196,2197c2260,2261 < local_plt = elf_local_got_refcounts (i); < if (!local_plt) --- > local_got = elf_local_got_refcounts (i); > if (!local_got) 2202,2203c2266,2280 < local_plt += locsymcount; < end_local_plt = local_plt + locsymcount; --- > end_local_got = local_got + locsymcount; > s = hplink->sgot; > srel = hplink->srelgot; > for (; local_got < end_local_got; ++local_got) > { > if (*local_got > 0) > { > *local_got = s->_raw_size; > s->_raw_size += GOT_ENTRY_SIZE; > if (info->shared) > srel->_raw_size += sizeof (Elf32_External_Rela); > } > else > *local_got = (bfd_vma) -1; > } 2204a2282,2285 > local_plt = end_local_got; > end_local_plt = local_plt + locsymcount; > s = hplink->splt; > srel = hplink->srelplt; 2209d2289 < s = hplink->splt; 2213c2293 < hplink->srelplt->_raw_size += sizeof (Elf32_External_Rela); --- > srel->_raw_size += sizeof (Elf32_External_Rela); 2229,2235d2308 < < /* We may have created entries in the .rela.got section. < However, if we are not creating the dynamic sections, we will < not actually use these entries. Reset the size of .rela.got, < which will cause it to get stripped from the output file < below. */ < hplink->srelgot->_raw_size = 0; 2237a2311,2315 > /* Allocate global sym .plt and .got entries. */ > elf_link_hash_traverse (&hplink->root, > allocate_plt_and_got, > info); > 3146,3148c3224,3225 < /* Invoke the regular ELF garbage collecting linker to do all the < work. */ < if (!_bfd_elf32_gc_common_final_link (abfd, info)) --- > /* Invoke the regular ELF linker to do all the work. */ > if (!bfd_elf32_bfd_final_link (abfd, info)) 3274,3275c3351,3355 < /* It's OK if undefined weak. Make undefined weak < branches go nowhere. */ --- > /* It's OK if undefined weak. Calls to undefined weak > symbols behave as if the "called" function > immediately returns. We can thus call to a weak > function without first checking whether the function > is defined. */ 3277c3357 < addend = 0; --- > addend = 8; 3582c3662,3663 < && ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT) --- > && ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT > && h->elf.type != STT_PARISC_MILLI) 3612a3694 > boolean dyn; 3615c3697,3698 < BFD_ASSERT (off != (bfd_vma) -1); --- > if (off == (bfd_vma) -1) > abort (); 3617,3621c3700,3701 < if (! hplink->root.dynamic_sections_created < || (info->shared < && (info->symbolic || h->elf.dynindx == -1) < && (h->elf.elf_link_hash_flags < & ELF_LINK_HASH_DEF_REGULAR) != 0)) --- > dyn = hplink->root.dynamic_sections_created; > if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, &h->elf)) 3652,3655c3732,3734 < BFD_ASSERT (local_got_offsets != NULL < && local_got_offsets[r_symndx] != (bfd_vma) -1); < < off = local_got_offsets[r_symndx]; --- > if (local_got_offsets == NULL > || (off = local_got_offsets[r_symndx]) == (bfd_vma) -1) > abort (); 3669,3672c3748,3751 < /* Output a dynamic *ABS* relocation for this < GOT entry. In this case it is relative to < the base of the object because the symbol < index is zero. */ --- > /* Output a dynamic relocation for this GOT > entry. In this case it is relative to the > base of the object because the symbol index > is zero. */ 3719a3799,3816 > if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, &h->elf)) > { > /* In a non-shared link, adjust_dynamic_symbols > isn't called for symbols forced local. We > need to write out the plt entry here. */ > if ((off & 1) != 0) > off &= ~1; > else > { > bfd_put_32 (output_bfd, > relocation, > hplink->splt->contents + off); > bfd_put_32 (output_bfd, > elf_gp (hplink->splt->output_section->owner), > hplink->splt->contents + off + 4); > h->elf.plt.offset |= 1; > } > } 3765c3862,3863 < BFD_ASSERT (off < (bfd_vma) -2); --- > if (off >= (bfd_vma) -2 || (off & 1) != 0) > abort (); 3832c3930,3931 < BFD_ASSERT (sreloc != NULL); --- > if (sreloc == NULL) > abort (); 3997a4097,4099 > if (h->plt.offset & 1) > abort (); > 4028,4029c4130,4131 < end of the .plt. This is only done for plt entries < with a non-*ABS* dynamic relocation. */ --- > end of the .plt. This is not done for plt entries > with a base-relative dynamic relocation. */ 4087,4095c4189,4196 < /* If this is a static link, or it is a -Bsymbolic link and the < symbol is defined locally or was forced to be local because < of a version file, we just want to emit a RELATIVE reloc. < The entry in the global offset table will already have been < initialized in the relocate_section function. */ < if (! hplink->root.dynamic_sections_created < || (info->shared < && (info->symbolic || h->dynindx == -1) < && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))) --- > /* If this is a -Bsymbolic link and the symbol is defined > locally or was forced to be local because of a version file, > we just want to emit a RELATIVE reloc. The entry in the > global offset table will already have been initialized in the > relocate_section function. */ > if (info->shared > && (info->symbolic || h->dynindx == -1) > && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)) 4104c4205,4206 < BFD_ASSERT((h->got.offset & 1) == 0); --- > if ((h->got.offset & 1) != 0) > abort (); 4125,4127c4227,4230 < BFD_ASSERT (h->dynindx != -1 < && (h->root.type == bfd_link_hash_defined < || h->root.type == bfd_link_hash_defweak)); --- > if (! (h->dynindx != -1 > && (h->root.type == bfd_link_hash_defined > || h->root.type == bfd_link_hash_defweak))) > abort (); 4173c4276,4277 < BFD_ASSERT (sdyn != NULL); --- > if (sdyn == NULL) > abort (); diff -rN binutils-2.11/bfd/elf32-hppa.h binutils-2.11.2/bfd/elf32-hppa.h 7c7 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000 diff -rN binutils-2.11/bfd/elf32-i370.c binutils-2.11.2/bfd/elf32-i370.c 2c2,3 < Copyright 1994, 95, 96, 97, 98, 2000 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-i386.c binutils-2.11.2/bfd/elf32-i386.c 2c2 < Copyright 1993, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 503a504,517 > if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr)) > { > if (abfd->my_archive) > (*_bfd_error_handler) (_("%s(%s): bad symbol index: %d"), > bfd_get_filename (abfd->my_archive), > bfd_get_filename (abfd), > r_symndx); > else > (*_bfd_error_handler) (_("%s: bad symbol index: %d"), > bfd_get_filename (abfd), > r_symndx); > return false; > } > 689c703 < } --- > } 821c835 < struct bfd_link_info *info ATTRIBUTE_UNUSED; --- > struct bfd_link_info *info; 2068a2083,2120 > /* Set the correct type for an x86 ELF section. We do this by the > section name, which is a hack, but ought to work. */ > > static boolean > elf_i386_fake_sections (abfd, hdr, sec) > bfd *abfd ATTRIBUTE_UNUSED; > Elf32_Internal_Shdr *hdr; > asection *sec; > { > register const char *name; > > name = bfd_get_section_name (abfd, sec); > > if (strcmp (name, ".reloc") == 0) > /* > * This is an ugly, but unfortunately necessary hack that is > * needed when producing EFI binaries on x86. It tells > * elf.c:elf_fake_sections() not to consider ".reloc" as a section > * containing ELF relocation info. We need this hack in order to > * be able to generate ELF binaries that can be translated into > * EFI applications (which are essentially COFF objects). Those > * files contain a COFF ".reloc" section inside an ELFNN object, > * which would normally cause BFD to segfault because it would > * attempt to interpret this section as containing relocation > * entries for section "oc". With this hack enabled, ".reloc" > * will be treated as a normal data section, which will avoid the > * segfault. However, you won't be able to create an ELFNN binary > * with a section named "oc" that needs relocations, but that's > * the kind of ugly side-effects you get when detecting section > * types based on their names... In practice, this limitation is > * unlikely to bite. > */ > hdr->sh_type = SHT_PROGBITS; > > return true; > } > > 2098a2151 > #define elf_backend_fake_sections elf_i386_fake_sections diff -rN binutils-2.11/bfd/elf32-i860.c binutils-2.11.2/bfd/elf32-i860.c 2c2 < Copyright 1993, 2000 Free Software Foundation, Inc. --- > Copyright 1993, 1995, 1999, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-i960.c binutils-2.11.2/bfd/elf32-i960.c 2c2 < Copyright 1999 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-m32r.c binutils-2.11.2/bfd/elf32-m32r.c 2c2,3 < Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-m68hc11.c binutils-2.11.2/bfd/elf32-m68hc11.c 2c2 < Copyright (C) 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-m68hc12.c binutils-2.11.2/bfd/elf32-m68hc12.c 2c2 < Copyright (C) 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-m68k.c binutils-2.11.2/bfd/elf32-m68k.c 2c2,3 < Copyright 1993, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. --- > Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-m88k.c binutils-2.11.2/bfd/elf32-m88k.c 2c2 < Copyright 1993 Free Software Foundation, Inc. --- > Copyright 1993, 1995, 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-mcore.c binutils-2.11.2/bfd/elf32-mcore.c 2c2 < Copyright 1994, 1995, 1999 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1999, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-mips.c binutils-2.11.2/bfd/elf32-mips.c 2c2 < Copyright 1993, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 82a83,88 > /* We must not create a stub for a symbol that has relocations > related to taking the function's address, i.e. any but > R_MIPS_CALL*16 ones -- see "MIPS ABI Supplement, 3rd Edition", > p. 4-20. */ > boolean no_fn_stub; > 196c202 < bfd_vma, bfd_vma *, asection *, boolean local_p)); --- > bfd_vma, bfd_vma *, asection *)); 204a211,215 > extern const bfd_target bfd_elf32_tradlittlemips_vec; > #ifdef BFD64 > extern const bfd_target bfd_elf64_tradbigmips_vec; > extern const bfd_target bfd_elf64_tradlittlemips_vec; > #endif 222,223c233 < /* Nonzero if ABFD is using the 64-bit ABI. FIXME: This is never < true, yet. */ --- > /* Nonzero if ABFD is using the 64-bit ABI. */ 229c239,246 < --- > #ifdef BFD64 > #define IRIX_COMPAT(abfd) \ > (((abfd->xvec == &bfd_elf64_tradbigmips_vec) || \ > (abfd->xvec == &bfd_elf64_tradlittlemips_vec) || \ > (abfd->xvec == &bfd_elf32_tradbigmips_vec) || \ > (abfd->xvec == &bfd_elf32_tradlittlemips_vec)) ? ict_none : \ > ((ABI_N32_P (abfd) || ABI_64_P (abfd)) ? ict_irix6 : ict_irix5)) > #else 231c248,249 < (abfd->xvec == &bfd_elf32_tradbigmips_vec ? ict_none : \ --- > (((abfd->xvec == &bfd_elf32_tradbigmips_vec) || \ > (abfd->xvec == &bfd_elf32_tradlittlemips_vec)) ? ict_none : \ 232a251 > #endif 235d253 < 524c542 < /* 26 bit branch address. */ --- > /* 26 bit jump address. */ 534c552 < bits must match the PC. */ --- > bits must match the PC + 4. */ 1652c1670 < generated when addreses are 64 bits. The upper 32 bits are a simle --- > generated when addresses are 64 bits. The upper 32 bits are a simple 2298c2316,2321 < return (sym->flags & BSF_SECTION_SYM) == 0 ? true : false; --- > if (SGI_COMPAT(abfd)) > return (sym->flags & BSF_SECTION_SYM) == 0 ? true : false; > else > return ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0 > || bfd_is_und_section (bfd_get_section (sym)) > || bfd_is_com_section (bfd_get_section (sym))); 2369a2393,2394 > case bfd_mach_mips10000: > case bfd_mach_mips12000: 3052c3077 < Elf32_Internal_Shdr *hdr ATTRIBUTE_UNUSED; --- > Elf_Internal_Shdr *hdr ATTRIBUTE_UNUSED; 3957a3983 > ret->no_fn_stub = false; 3981c4007,4008 < h->root.dynindx = -1; --- > if ((h->root.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0) > h->root.dynindx = -1; 4333,4338c4360,4363 < /* Set type and value for a symbol with a function stub. */ < h->esym.asym.st = stProc; < sec = h->root.root.u.def.section; < if (sec == NULL) < h->esym.asym.value = 0; < else --- > struct mips_elf_link_hash_entry *hd = h; > boolean no_fn_stub = h->no_fn_stub; > > while (hd->root.root.type == bfd_link_hash_indirect) 4340,4346c4365,4366 < output_section = sec->output_section; < if (output_section != NULL) < h->esym.asym.value = (h->root.plt.offset < + sec->output_offset < + output_section->vma); < else < h->esym.asym.value = 0; --- > hd = (struct mips_elf_link_hash_entry *)h->root.root.u.i.link; > no_fn_stub = no_fn_stub || hd->no_fn_stub; 4347a4368,4385 > > if (!no_fn_stub) > { > /* Set type and value for a symbol with a function stub. */ > h->esym.asym.st = stProc; > sec = hd->root.root.u.def.section; > if (sec == NULL) > h->esym.asym.value = 0; > else > { > output_section = sec->output_section; > if (output_section != NULL) > h->esym.asym.value = (hd->root.plt.offset > + sec->output_offset > + output_section->vma); > else > h->esym.asym.value = 0; > } 4349c4387 < h->esym.ifd = 0; --- > h->esym.ifd = 0; 4350a4389 > } 5751c5790 < symbol, addendp, input_section, local_p) --- > symbol, addendp, input_section) 5760d5798 < boolean local_p; 5845c5883 < *addendp += symbol - sec->output_section->vma; --- > *addendp += section_offset; 5850,5853c5888,5892 < /* If the relocation is against a local symbol was previously an < absolute relocation, we must adjust it by the value we give < it in the dynamic symbol table. */ < if (local_p && r_type != R_MIPS_REL32) --- > /* If the relocation was previously an absolute relocation and > this symbol will not be referred to by the relocation, we must > adjust it by the value we give it in the dynamic symbol table. > Otherwise leave the job up to the dynamic linker. */ > if (!indx && r_type != R_MIPS_REL32) 6228c6267 < else if (r_type == R_MIPS_GOT16) --- > else if (r_type == R_MIPS_GOT16 || r_type == R_MIPS_CALL16) 6291c6330 < input_section, local_p)) --- > input_section)) 6323c6362 < /* The calculation for R_MIPS_26 is just the same as for an --- > /* The calculation for R_MIPS16_26 is just the same as for an 6330c6369 < value = (((addend << 2) | (p & 0xf0000000)) + symbol) >> 2; --- > value = (((addend << 2) | ((p + 4) & 0xf0000000)) + symbol) >> 2; 6395a6435 > case R_MIPS_CALL16: 6418d6457 < case R_MIPS_CALL16: 6623c6662 < (((A < 2) | (P & 0xf0000000) + S) >> 2) --- > (((A < 2) | ((P + 4) & 0xf0000000) + S) >> 2) 6625c6664 < let R = (((A < 2) | (P & 0xf0000000) + S) >> 2) --- > let R = (((A < 2) | ((P + 4) & 0xf0000000) + S) >> 2) 6754a6794 > const char * msg = (const char *) NULL; 6787,6788c6827 < >= (rel_hdr->sh_size / rel_hdr->sh_entsize < * bed->s->int_rels_per_ext_rel)) --- > >= (NUM_SHDR_ENTRIES (rel_hdr) * bed->s->int_rels_per_ext_rel)) 7009,7010c7048,7051 < abort (); < break; --- > msg = _("internal error: unsupported relocation error"); > info->callbacks->warning > (info, msg, name, input_bfd, input_section, rel->r_offset); > return false; 7555c7596 < symcount = symtab_hdr->sh_size / symtab_hdr->sh_entsize; --- > symcount = NUM_SHDR_ENTRIES (symtab_hdr); 7670c7711 < else if (r_symndx >= extsymoff + (symtab_hdr->sh_size / symtab_hdr->sh_entsize)) --- > else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr)) 7731,7734c7772,7775 < the segment. Similar comments apply to R_MIPS_GOT16. We < don't count R_MIPS_GOT_HI16, or R_MIPS_CALL_HI16 because < these are always followed by an R_MIPS_GOT_LO16 or < R_MIPS_CALL_LO16. --- > the segment. Similar comments apply to R_MIPS_GOT16 and > R_MIPS_CALL16. We don't count R_MIPS_GOT_HI16, or > R_MIPS_CALL_HI16 because these are always followed by an > R_MIPS_GOT_LO16 or R_MIPS_CALL_LO16. 7865a7907,7925 > /* We must not create a stub for a symbol that has relocations > related to taking the function's address. */ > switch (r_type) > { > default: > if (h != NULL) > { > struct mips_elf_link_hash_entry *mh; > > mh = (struct mips_elf_link_hash_entry *) h; > mh->no_fn_stub = true; > } > break; > case R_MIPS_CALL16: > case R_MIPS_CALL_HI16: > case R_MIPS_CALL_LO16: > break; > } > 8000a8061,8062 > if (indmips->no_fn_stub) > dirmips->no_fn_stub = true; 8041,8042c8103,8105 < /* For a function, create a stub, if needed. */ < if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0) --- > /* For a function, create a stub, if allowed. */ > if (! hmips->no_fn_stub > && (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0) 8274c8337 < struct _bfd *sub; --- > bfd *sub; diff -rN binutils-2.11/bfd/elf32-pj.c binutils-2.11.2/bfd/elf32-pj.c 2c2 < Copyright 1999 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-ppc.c binutils-2.11.2/bfd/elf32-ppc.c 2c2,3 < Copyright 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-sh.c binutils-2.11.2/bfd/elf32-sh.c 2c2,3 < Copyright 1996, 97, 98, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf32-sparc.c binutils-2.11.2/bfd/elf32-sparc.c 2c2 < Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 88c88 < HOWTO(R_SPARC_UA32, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0x00000000,true), --- > HOWTO(R_SPARC_UA32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0xffffffff,true), 123,125c123,125 < HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true), < HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true), < HOWTO(R_SPARC_REV32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", false,0,0xffffffff,true), --- > HOWTO(R_SPARC_UA64, 0,4,64,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA64", false,0,(~ (bfd_vma)0), true), > HOWTO(R_SPARC_UA16, 0,1,16,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA16", false,0,0x0000ffff,true), > HOWTO(R_SPARC_REV32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", false,0,0xffffffff,true), 162,181c162,182 < /* ??? Doesn't dwarf use this? */ < /*{ BFD_RELOC_SPARC_UA32, R_SPARC_UA32 }, not used?? */ < {BFD_RELOC_SPARC_10, R_SPARC_10}, < {BFD_RELOC_SPARC_11, R_SPARC_11}, < {BFD_RELOC_SPARC_64, R_SPARC_64}, < {BFD_RELOC_SPARC_OLO10, R_SPARC_OLO10}, < {BFD_RELOC_SPARC_HH22, R_SPARC_HH22}, < {BFD_RELOC_SPARC_HM10, R_SPARC_HM10}, < {BFD_RELOC_SPARC_LM22, R_SPARC_LM22}, < {BFD_RELOC_SPARC_PC_HH22, R_SPARC_PC_HH22}, < {BFD_RELOC_SPARC_PC_HM10, R_SPARC_PC_HM10}, < {BFD_RELOC_SPARC_PC_LM22, R_SPARC_PC_LM22}, < {BFD_RELOC_SPARC_WDISP16, R_SPARC_WDISP16}, < {BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19}, < {BFD_RELOC_SPARC_7, R_SPARC_7}, < {BFD_RELOC_SPARC_5, R_SPARC_5}, < {BFD_RELOC_SPARC_6, R_SPARC_6}, < {BFD_RELOC_SPARC_REV32, R_SPARC_REV32 }, < {BFD_RELOC_VTABLE_INHERIT, R_SPARC_GNU_VTINHERIT}, < {BFD_RELOC_VTABLE_ENTRY, R_SPARC_GNU_VTENTRY}, --- > { BFD_RELOC_SPARC_UA16, R_SPARC_UA16 }, > { BFD_RELOC_SPARC_UA32, R_SPARC_UA32 }, > { BFD_RELOC_SPARC_UA64, R_SPARC_UA64 }, > { BFD_RELOC_SPARC_10, R_SPARC_10 }, > { BFD_RELOC_SPARC_11, R_SPARC_11 }, > { BFD_RELOC_SPARC_64, R_SPARC_64 }, > { BFD_RELOC_SPARC_OLO10, R_SPARC_OLO10 }, > { BFD_RELOC_SPARC_HH22, R_SPARC_HH22 }, > { BFD_RELOC_SPARC_HM10, R_SPARC_HM10 }, > { BFD_RELOC_SPARC_LM22, R_SPARC_LM22 }, > { BFD_RELOC_SPARC_PC_HH22, R_SPARC_PC_HH22 }, > { BFD_RELOC_SPARC_PC_HM10, R_SPARC_PC_HM10 }, > { BFD_RELOC_SPARC_PC_LM22, R_SPARC_PC_LM22 }, > { BFD_RELOC_SPARC_WDISP16, R_SPARC_WDISP16 }, > { BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19 }, > { BFD_RELOC_SPARC_7, R_SPARC_7 }, > { BFD_RELOC_SPARC_5, R_SPARC_5 }, > { BFD_RELOC_SPARC_6, R_SPARC_6 }, > { BFD_RELOC_SPARC_REV32, R_SPARC_REV32 }, > { BFD_RELOC_VTABLE_INHERIT, R_SPARC_GNU_VTINHERIT }, > { BFD_RELOC_VTABLE_ENTRY, R_SPARC_GNU_VTENTRY }, 553a555 > case R_SPARC_UA16: 554a557 > case R_SPARC_UA64: 1220a1224 > || r_type == R_SPARC_UA16 1221a1226 > || r_type == R_SPARC_UA64 1407a1413 > case R_SPARC_UA16: 1408a1415 > case R_SPARC_UA64: 1761a1769,1775 > /* If the symbol is weak, we do need to clear the value. > Otherwise, the PLT entry would provide a definition for > the symbol even if the symbol wasn't defined anywhere, > and so the symbol would never be NULL. */ > if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK) > == 0) > sym->st_value = 0; diff -rN binutils-2.11/bfd/elf32-v850.c binutils-2.11.2/bfd/elf32-v850.c 2c2,3 < Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 1328d1328 < diff -rN binutils-2.11/bfd/elf32.c binutils-2.11.2/bfd/elf32.c 2c2 < Copyright 1993 Free Software Foundation, Inc. --- > Copyright 1993, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf64-alpha.c binutils-2.11.2/bfd/elf64-alpha.c 2c2,3 < Copyright 1996, 97, 98, 1999 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 243,244d243 < if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT) < return false; 249a249,261 > switch (ELF_ST_VISIBILITY (h->other)) > { > case STV_DEFAULT: > break; > case STV_HIDDEN: > case STV_INTERNAL: > return false; > case STV_PROTECTED: > if (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) > return false; > break; > } > 557c569 < false), /* pcrel_offset */ --- > true), /* pcrel_offset */ 572c584 < false), /* pcrel_offset */ --- > true), /* pcrel_offset */ 587c599 < false), /* pcrel_offset */ --- > true), /* pcrel_offset */ 858c870 < bfd *abfd; --- > bfd *abfd ATTRIBUTE_UNUSED; 860,861c872,873 < asymbol *sym; < PTR data; --- > asymbol *sym ATTRIBUTE_UNUSED; > PTR data ATTRIBUTE_UNUSED; 864c876 < char **error_message; --- > char **error_message ATTRIBUTE_UNUSED; 875c887 < bfd *abfd; --- > bfd *abfd ATTRIBUTE_UNUSED; 877,878c889,890 < asymbol *sym; < PTR data; --- > asymbol *sym ATTRIBUTE_UNUSED; > PTR data ATTRIBUTE_UNUSED; 881c893 < char **error_message; --- > char **error_message ATTRIBUTE_UNUSED; 938c950 < asymbol *sym; --- > asymbol *sym ATTRIBUTE_UNUSED; 1019c1031 < bfd *abfd; --- > bfd *abfd ATTRIBUTE_UNUSED; 1037c1049 < bfd *abfd; --- > bfd *abfd ATTRIBUTE_UNUSED; 1839,1840c1851,1852 < const char **namep; < flagword *flagsp; --- > const char **namep ATTRIBUTE_UNUSED; > flagword *flagsp ATTRIBUTE_UNUSED; 1875c1887 < struct bfd_link_info *info; --- > struct bfd_link_info *info ATTRIBUTE_UNUSED; 2078c2090 < bfd *abfd; --- > bfd *abfd ATTRIBUTE_UNUSED; 2730c2742 < PTR dummy; --- > PTR dummy ATTRIBUTE_UNUSED; 2822c2834 < n = symtab_hdr->sh_size / symtab_hdr->sh_entsize - symtab_hdr->sh_info; --- > n = NUM_SHDR_ENTRIES (symtab_hdr) - symtab_hdr->sh_info; 2894c2906 < n = symtab_hdr->sh_size / symtab_hdr->sh_entsize - symtab_hdr->sh_info; --- > n = NUM_SHDR_ENTRIES (symtab_hdr) - symtab_hdr->sh_info; 4718,4719c4730,4731 < #define ELF_MACHINE_CODE EM_ALPHA < #define ELF_MAXPAGESIZE 0x10000 --- > #define ELF_MACHINE_CODE EM_ALPHA > #define ELF_MAXPAGESIZE 0x10000 diff -rN binutils-2.11/bfd/elf64-gen.c binutils-2.11.2/bfd/elf64-gen.c 2c2 < Copyright 1993, 1995, 1998 Free Software Foundation, Inc. --- > Copyright 1993, 1995, 1998, 1999, 2001 Free Software Foundation, Inc. 45c45 < bfd *abfd; --- > bfd *abfd ATTRIBUTE_UNUSED; 47c47 < Elf64_Internal_Rela *elf_reloc; --- > Elf64_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED; 54c54 < bfd *abfd; --- > bfd *abfd ATTRIBUTE_UNUSED; 56c56 < Elf64_Internal_Rel *elf_reloc; --- > Elf64_Internal_Rel *elf_reloc ATTRIBUTE_UNUSED; 61c61 < static boolean --- > static boolean diff -rN binutils-2.11/bfd/elf64-hppa.c binutils-2.11.2/bfd/elf64-hppa.c 361c361,362 < unsigned int flags = elf_elfheader (abfd)->e_flags; --- > Elf_Internal_Ehdr * i_ehdrp; > unsigned int flags; 362a364,376 > i_ehdrp = elf_elfheader (abfd); > if (strcmp (bfd_get_target (abfd), "elf64-hppa-linux") == 0) > { > if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX) > return false; > } > else > { > if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_HPUX) > return false; > } > > flags = i_ehdrp->e_flags; diff -rN binutils-2.11/bfd/elf64-hppa.h binutils-2.11.2/bfd/elf64-hppa.h 3c3 < Copyright (C) 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elf64-mips.c binutils-2.11.2/bfd/elf64-mips.c 2c2,3 < Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 162c163 < /* This needs complex overflow --- > /* This needs complex overflow 164c165 < bits must match the PC. */ --- > bits must match the PC + 4. */ 715c716 < /* This needs complex overflow --- > /* This needs complex overflow 717c718 < bits must match the PC. */ --- > bits must match the PC + 4. */ 1392c1393 < bfd *abfd; --- > bfd *abfd ATTRIBUTE_UNUSED; 1416c1417 < bfd *abfd; --- > bfd *abfd ATTRIBUTE_UNUSED; 2189a2191,2207 > #include "elf64-target.h" > > /* Support for traditional mips targets */ > > #define INCLUDED_TARGET_FILE /* More a type of flag */ > > #undef TARGET_LITTLE_SYM > #undef TARGET_LITTLE_NAME > #undef TARGET_BIG_SYM > #undef TARGET_BIG_NAME > > #define TARGET_LITTLE_SYM bfd_elf64_tradlittlemips_vec > #define TARGET_LITTLE_NAME "elf64-tradlittlemips" > #define TARGET_BIG_SYM bfd_elf64_tradbigmips_vec > #define TARGET_BIG_NAME "elf64-tradbigmips" > > /* Include the target file again for this target */ diff -rN binutils-2.11/bfd/elf64-sparc.c binutils-2.11.2/bfd/elf64-sparc.c 2c2 < Copyright (C) 1993, 95, 96, 97, 98, 99, 2000 --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 65a66,67 > static boolean sparc64_elf_copy_private_bfd_data > PARAMS ((bfd *, bfd *)); 121c123 < HOWTO(R_SPARC_UA32, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0x00000000,true), --- > HOWTO(R_SPARC_UA32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0xffffffff,true), 189,213c191,216 < /* ??? Doesn't dwarf use this? */ < /*{ BFD_RELOC_SPARC_UA32, R_SPARC_UA32 }, not used?? */ < {BFD_RELOC_SPARC_10, R_SPARC_10}, < {BFD_RELOC_SPARC_11, R_SPARC_11}, < {BFD_RELOC_SPARC_64, R_SPARC_64}, < {BFD_RELOC_SPARC_OLO10, R_SPARC_OLO10}, < {BFD_RELOC_SPARC_HH22, R_SPARC_HH22}, < {BFD_RELOC_SPARC_HM10, R_SPARC_HM10}, < {BFD_RELOC_SPARC_LM22, R_SPARC_LM22}, < {BFD_RELOC_SPARC_PC_HH22, R_SPARC_PC_HH22}, < {BFD_RELOC_SPARC_PC_HM10, R_SPARC_PC_HM10}, < {BFD_RELOC_SPARC_PC_LM22, R_SPARC_PC_LM22}, < {BFD_RELOC_SPARC_WDISP16, R_SPARC_WDISP16}, < {BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19}, < {BFD_RELOC_SPARC_7, R_SPARC_7}, < {BFD_RELOC_SPARC_5, R_SPARC_5}, < {BFD_RELOC_SPARC_6, R_SPARC_6}, < {BFD_RELOC_SPARC_DISP64, R_SPARC_DISP64}, < {BFD_RELOC_SPARC_PLT64, R_SPARC_PLT64}, < {BFD_RELOC_SPARC_HIX22, R_SPARC_HIX22}, < {BFD_RELOC_SPARC_LOX10, R_SPARC_LOX10}, < {BFD_RELOC_SPARC_H44, R_SPARC_H44}, < {BFD_RELOC_SPARC_M44, R_SPARC_M44}, < {BFD_RELOC_SPARC_L44, R_SPARC_L44}, < {BFD_RELOC_SPARC_REGISTER, R_SPARC_REGISTER} --- > { BFD_RELOC_SPARC_UA16, R_SPARC_UA16 }, > { BFD_RELOC_SPARC_UA32, R_SPARC_UA32 }, > { BFD_RELOC_SPARC_UA64, R_SPARC_UA64 }, > { BFD_RELOC_SPARC_10, R_SPARC_10 }, > { BFD_RELOC_SPARC_11, R_SPARC_11 }, > { BFD_RELOC_SPARC_64, R_SPARC_64 }, > { BFD_RELOC_SPARC_OLO10, R_SPARC_OLO10 }, > { BFD_RELOC_SPARC_HH22, R_SPARC_HH22 }, > { BFD_RELOC_SPARC_HM10, R_SPARC_HM10 }, > { BFD_RELOC_SPARC_LM22, R_SPARC_LM22 }, > { BFD_RELOC_SPARC_PC_HH22, R_SPARC_PC_HH22 }, > { BFD_RELOC_SPARC_PC_HM10, R_SPARC_PC_HM10 }, > { BFD_RELOC_SPARC_PC_LM22, R_SPARC_PC_LM22 }, > { BFD_RELOC_SPARC_WDISP16, R_SPARC_WDISP16 }, > { BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19 }, > { BFD_RELOC_SPARC_7, R_SPARC_7 }, > { BFD_RELOC_SPARC_5, R_SPARC_5 }, > { BFD_RELOC_SPARC_6, R_SPARC_6 }, > { BFD_RELOC_SPARC_DISP64, R_SPARC_DISP64 }, > { BFD_RELOC_SPARC_PLT64, R_SPARC_PLT64 }, > { BFD_RELOC_SPARC_HIX22, R_SPARC_HIX22 }, > { BFD_RELOC_SPARC_LOX10, R_SPARC_LOX10 }, > { BFD_RELOC_SPARC_H44, R_SPARC_H44 }, > { BFD_RELOC_SPARC_M44, R_SPARC_M44 }, > { BFD_RELOC_SPARC_L44, R_SPARC_L44 }, > { BFD_RELOC_SPARC_REGISTER, R_SPARC_REGISTER } 397c400 < asect->reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize; --- > asect->reloc_count = NUM_SHDR_ENTRIES (rel_hdr); 997c1000 < rel_end = relocs + sec->reloc_count; --- > rel_end = relocs + NUM_SHDR_ENTRIES (& elf_section_data (sec)->rel_hdr); 1903c1906 < relend = relocs + input_section->reloc_count; --- > relend = relocs + NUM_SHDR_ENTRIES (& elf_section_data (input_section)->rel_hdr); 2707a2711,2717 > /* If the symbol is weak, we do need to clear the value. > Otherwise, the PLT entry would provide a definition for > the symbol even if the symbol wasn't defined anywhere, > and so the symbol would never be NULL. */ > if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK) > == 0) > sym->st_value = 0; 2895a2906,2923 > /* Copy backend specific data from one object module to another */ > static boolean > sparc64_elf_copy_private_bfd_data (ibfd, obfd) > bfd *ibfd, *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_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags; > elf_flags_init (obfd) = true; > return true; > } > 3117c3145,3146 < --- > #define bfd_elf64_bfd_copy_private_bfd_data \ > sparc64_elf_copy_private_bfd_data diff -rN binutils-2.11/bfd/elf64-x86-64.c binutils-2.11.2/bfd/elf64-x86-64.c 40c40,41 < bfd_elf_generic_reloc, "R_X86_64_NONE", false, 0x00000000, 0x00000000, false), --- > bfd_elf_generic_reloc, "R_X86_64_NONE", false, 0x00000000, 0x00000000, > false), 42c43,44 < bfd_elf_generic_reloc, "R_X86_64_64", false, MINUS_ONE, MINUS_ONE, false), --- > bfd_elf_generic_reloc, "R_X86_64_64", false, MINUS_ONE, MINUS_ONE, > false), 44c46,47 < bfd_elf_generic_reloc, "R_X86_64_PC32", false, 0xffffffff, 0xffffffff, true), --- > bfd_elf_generic_reloc, "R_X86_64_PC32", false, 0xffffffff, 0xffffffff, > true), 46c49,50 < bfd_elf_generic_reloc, "R_X86_64_GOT32", false, 0xffffffff, 0xffffffff, false), --- > bfd_elf_generic_reloc, "R_X86_64_GOT32", false, 0xffffffff, 0xffffffff, > false), 48c52,53 < bfd_elf_generic_reloc, "R_X86_64_PLT32", false, 0xffffffff, 0xffffffff, true), --- > bfd_elf_generic_reloc, "R_X86_64_PLT32", false, 0xffffffff, 0xffffffff, > true), 50c55,56 < bfd_elf_generic_reloc, "R_X86_64_COPY", false, 0xffffffff, 0xffffffff, false), --- > bfd_elf_generic_reloc, "R_X86_64_COPY", false, 0xffffffff, 0xffffffff, > false), 52c58,59 < bfd_elf_generic_reloc, "R_X86_64_GLOB_DAT", false, MINUS_ONE, MINUS_ONE, false), --- > bfd_elf_generic_reloc, "R_X86_64_GLOB_DAT", false, MINUS_ONE, > MINUS_ONE, false), 54c61,62 < bfd_elf_generic_reloc, "R_X86_64_JUMP_SLOT", false, MINUS_ONE, MINUS_ONE, false), --- > bfd_elf_generic_reloc, "R_X86_64_JUMP_SLOT", false, MINUS_ONE, > MINUS_ONE, false), 56c64,65 < bfd_elf_generic_reloc, "R_X86_64_RELATIVE", false, MINUS_ONE, MINUS_ONE, false), --- > bfd_elf_generic_reloc, "R_X86_64_RELATIVE", false, MINUS_ONE, > MINUS_ONE, false), 58c67,68 < bfd_elf_generic_reloc, "R_X86_64_GOTPCREL", false, 0xffffffff, 0xffffffff, true), --- > bfd_elf_generic_reloc, "R_X86_64_GOTPCREL", false, 0xffffffff, > 0xffffffff, true), 60c70,71 < bfd_elf_generic_reloc, "R_X86_64_32", false, 0xffffffff, 0xffffffff, false), --- > bfd_elf_generic_reloc, "R_X86_64_32", false, 0xffffffff, 0xffffffff, > false), 62c73,74 < bfd_elf_generic_reloc, "R_X86_64_32S", false, 0xffffffff, 0xffffffff, false), --- > bfd_elf_generic_reloc, "R_X86_64_32S", false, 0xffffffff, 0xffffffff, > false), 176,178c188,190 < 0xff, 0xb3, 8, 0, 0, 0, /* pushq GOT+8(%rip) */ < 0xff, 0xa3, 16, 0, 0, 0, /* jmp GOT+16(%rip) */ < 0, 0, 0, 0 /* pad out to 16 bytes. */ --- > 0xff, 0x35, 8, 0, 0, 0, /* pushq GOT+8(%rip) */ > 0xff, 0x25, 16, 0, 0, 0, /* jmpq *GOT+16(%rip) */ > 0x90, 0x90, 0x90, 0x90 /* pad out to 16 bytes with nops. */ 185c197 < 0xff, 0xa3, /* jmp *name@GOTPC(%rip) */ --- > 0xff, 0x25, /* jmpq *name@GOTPC(%rip) */ 187c199 < 0x68, /* pushq immediate */ --- > 0x68, /* pushq immediate */ 462a475 > h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT; 464,467c477 < { < h->plt.refcount = 1; < h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT; < } --- > h->plt.refcount = 1; 471a482,483 > case R_X86_64_8: > case R_X86_64_16: 472a485 > case R_X86_64_64: 494c507,509 < && (ELF64_R_TYPE (rel->r_info) != R_X86_64_PC32 --- > && (((ELF64_R_TYPE (rel->r_info) != R_X86_64_PC8) > && (ELF64_R_TYPE (rel->r_info) != R_X86_64_PC16) > && (ELF64_R_TYPE (rel->r_info) != R_X86_64_PC32)) 530c545 < || ! bfd_set_section_alignment (dynobj, sreloc, 2)) --- > || ! bfd_set_section_alignment (dynobj, sreloc, 3)) 544c559,561 < && ELF64_R_TYPE (rel->r_info) == R_X86_64_PC32) --- > && ((ELF64_R_TYPE (rel->r_info) == R_X86_64_PC8) > || (ELF64_R_TYPE (rel->r_info) == R_X86_64_PC16) > || (ELF64_R_TYPE (rel->r_info) == R_X86_64_PC32))) 1099c1116 < contents, relocs, local_syms, local_sections) --- > contents, relocs, local_syms, local_sections) 1197,1201c1214,1217 < if (r_type == R_X86_64_GOTPCREL < || (r_type = R_X86_64_PLT32 < && splt != NULL < && h->plt.offset != (bfd_vma) -1) < || (r_type = R_X86_64_GOT32 --- > if ((r_type == R_X86_64_PLT32 > && splt != NULL > && h->plt.offset != (bfd_vma) -1) > || ((r_type == R_X86_64_GOT32 || r_type == R_X86_64_GOTPCREL) 1211,1216c1227,1233 < && ( r_type == R_X86_64_8 || < r_type == R_X86_64_16 || < r_type == R_X86_64_32 || < r_type == R_X86_64_64 || < r_type == R_X86_64_PC16 || < r_type == R_X86_64_PC32) --- > && (r_type == R_X86_64_8 > || r_type == R_X86_64_16 > || r_type == R_X86_64_32 > || r_type == R_X86_64_64 > || r_type == R_X86_64_PC8 > || r_type == R_X86_64_PC16 > || r_type == R_X86_64_PC32) 1268,1349d1284 < BFD_ASSERT (sgot != NULL); < < if (h != NULL) < { < bfd_vma off = h->got.offset; < BFD_ASSERT (off != (bfd_vma) -1); < < if (! elf_hash_table (info)->dynamic_sections_created < || (info->shared < && (info->symbolic || h->dynindx == -1) < && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))) < { < /* This is actually a static link, or it is a -Bsymbolic < link and the symbol is defined locally, or the symbol < was forced to be local because of a version file. We < must initialize this entry in the global offset table. < Since the offset must always be a multiple of 8, we < use the least significant bit to record whether we < have initialized it already. < < When doing a dynamic link, we create a .rela.got < relocation entry to initialize the value. This is < done in the finish_dynamic_symbol routine. */ < if ((off & 1) != 0) < off &= ~1; < else < { < bfd_put_64 (output_bfd, relocation, < sgot->contents + off); < h->got.offset |= 1; < } < } < relocation = sgot->output_offset + off; < } < else < { < bfd_vma off; < < BFD_ASSERT (local_got_offsets != NULL < && local_got_offsets[r_symndx] != (bfd_vma) -1); < < off = local_got_offsets[r_symndx]; < < /* The offset must always be a multiple of 8. We use < the least significant bit to record whether we have < already generated the necessary reloc. */ < if ((off & 1) != 0) < off &= ~1; < else < { < bfd_put_64 (output_bfd, relocation, sgot->contents + off); < < if (info->shared) < { < asection *srelgot; < Elf_Internal_Rela outrel; < < /* We need to generate a R_X86_64_RELATIVE reloc < for the dynamic linker. */ < srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); < BFD_ASSERT (srelgot != NULL); < < outrel.r_offset = (sgot->output_section->vma < + sgot->output_offset < + off); < outrel.r_info = ELF64_R_INFO (0, R_X86_64_RELATIVE); < outrel.r_addend = relocation; < bfd_elf64_swap_reloca_out (output_bfd, &outrel, < (((Elf64_External_Rela *) < srelgot->contents) < + srelgot->reloc_count)); < ++srelgot->reloc_count; < } < < local_got_offsets[r_symndx] |= 1; < } < < relocation = sgot->output_offset + off; < } < < break; < 1352d1286 < 1353a1288 > 1384c1319,1322 < relocation = sgot->output_offset + off; --- > if (r_type == R_X86_64_GOTPCREL) > relocation = sgot->output_section->vma + sgot->output_offset + off; > else > relocation = sgot->output_offset + off; 1429c1367,1370 < relocation = sgot->output_section->vma + off; --- > if (r_type == R_X86_64_GOTPCREL) > relocation = sgot->output_section->vma + sgot->output_offset + off; > else > relocation = sgot->output_offset + off; 1430a1372 > 1455,1457d1396 < case R_X86_64_8: < case R_X86_64_16: < case R_X86_64_32: 1461c1400,1407 < /* FIXME: The abi says the linker should make sure the value is --- > if (h == NULL) > break; > /* Fall through. */ > case R_X86_64_8: > case R_X86_64_16: > case R_X86_64_32: > case R_X86_64_64: > /* FIXME: The ABI says the linker should make sure the value is 1465c1411,1412 < && ((r_type != R_X86_64_PC8 && r_type != R_X86_64_PC16 --- > && ((r_type != R_X86_64_PC8 > && r_type != R_X86_64_PC16 1467,1471c1414,1417 < || (h != NULL < && h->dynindx != -1 < && (! info->symbolic < || (h->elf_link_hash_flags < & ELF_LINK_HASH_DEF_REGULAR) == 0)))) --- > || (! info->symbolic > || (h->elf_link_hash_flags > & ELF_LINK_HASH_DEF_REGULAR) == 0))) > 1526,1527c1472,1477 < else if ((r_type == R_X86_64_PC8) || (r_type == R_X86_64_PC16) < || (r_type == R_X86_64_PC32)) --- > /* h->dynindx may be -1 if this symbol was marked to > become local. */ > else if (h != NULL > && ((! info->symbolic && h->dynindx != -1) > || (h->elf_link_hash_flags > & ELF_LINK_HASH_DEF_REGULAR) == 0)) 1529c1479 < BFD_ASSERT (h != NULL && h->dynindx != -1); --- > BFD_ASSERT (h->dynindx != -1); 1536,1541c1486 < /* h->dynindx may be -1 if this symbol was marked to < become local. */ < if (h == NULL < || ((info->symbolic || h->dynindx == -1) < && (h->elf_link_hash_flags < & ELF_LINK_HASH_DEF_REGULAR) != 0)) --- > if (r_type == R_X86_64_64) 1549,1553c1494,1525 < BFD_ASSERT (h->dynindx != -1); < relocate = false; < outrel.r_info = ELF64_R_INFO (h->dynindx, R_X86_64_32); < outrel.r_addend = relocation + rela->r_addend; < } --- > long indx; > > if (h == NULL) > sec = local_sections[r_symndx]; > else > { > BFD_ASSERT (h->root.type == bfd_link_hash_defined > || (h->root.type > == bfd_link_hash_defweak)); > sec = h->root.u.def.section; > } > if (sec != NULL && bfd_is_abs_section (sec)) > indx = 0; > else if (sec == NULL || sec->owner == NULL) > { > bfd_set_error (bfd_error_bad_value); > return false; > } > else > { > asection *osec; > > osec = sec->output_section; > indx = elf_section_data (osec)->dynindx; > BFD_ASSERT (indx > 0); > } > > relocate = false; > outrel.r_info = ELF64_R_INFO (indx, r_type); > outrel.r_addend = relocation + rela->r_addend; > } > 1657c1629 < bytes. The first three are reserved. */ --- > bytes. The first three are reserved for the dynamic linker. */ 1667,1668c1639,1651 < bfd_put_64 (output_bfd, got_offset, splt->contents + h->plt.offset + 2); < bfd_put_64 (output_bfd, plt_index * sizeof (Elf64_External_Rela), --- > /* Put offset for jmp *name@GOTPCREL(%rip), since the > instruction uses 6 bytes, subtract this value. */ > bfd_put_32 (output_bfd, > (sgot->output_section->vma > + sgot->output_offset > + got_offset > - splt->output_section->vma > - splt->output_offset > - h->plt.offset > - 6), > splt->contents + h->plt.offset + 2); > /* Put relocation index. */ > bfd_put_32 (output_bfd, plt_index, 1670c1653,1654 < bfd_put_64 (output_bfd, - (h->plt.offset + PLT_ENTRY_SIZE), --- > /* Put offset for jmp .PLT0. */ > bfd_put_32 (output_bfd, - (h->plt.offset + PLT_ENTRY_SIZE), 1673c1657,1658 < /* Fill in the entry in the global offset table. */ --- > /* Fill in the entry in the global offset table, initially this > points to the pushq instruction in the PLT which is at offset 6. */ 1702a1688,1734 > if (h->got.offset != (bfd_vma) -1) > { > asection *sgot; > asection *srela; > Elf_Internal_Rela rela; > > /* This symbol has an entry in the global offset table. Set it > up. */ > > sgot = bfd_get_section_by_name (dynobj, ".got"); > srela = bfd_get_section_by_name (dynobj, ".rela.got"); > BFD_ASSERT (sgot != NULL && srela != NULL); > > rela.r_offset = (sgot->output_section->vma > + sgot->output_offset > + (h->got.offset &~ 1)); > > /* If this is a static link, or it is a -Bsymbolic link and the > symbol is defined locally or was forced to be local because > of a version file, we just want to emit a RELATIVE reloc. > The entry in the global offset table will already have been > initialized in the relocate_section function. */ > if (! elf_hash_table (info)->dynamic_sections_created > || (info->shared > && (info->symbolic || h->dynindx == -1) > && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))) > { > BFD_ASSERT((h->got.offset & 1) != 0); > rela.r_info = ELF64_R_INFO (0, R_X86_64_RELATIVE); > rela.r_addend = (h->root.u.def.value > + h->root.u.def.section->output_section->vma > + h->root.u.def.section->output_offset); > } > else > { > BFD_ASSERT((h->got.offset & 1) == 0); > bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset); > rela.r_info = ELF64_R_INFO (h->dynindx, R_X86_64_GLOB_DAT); > rela.r_addend = 0; > } > > bfd_elf64_swap_reloca_out (output_bfd, &rela, > ((Elf64_External_Rela *) srela->contents > + srela->reloc_count)); > ++srela->reloc_count; > } > 1749a1782,1783 > sgot = bfd_get_section_by_name (dynobj, ".got.plt"); > BFD_ASSERT (sgot != NULL); 1772c1806 < break; --- > continue; 1810d1843 < 1818a1852 > /* Fill in the first entry in the procedure linkage table. */ 1819a1854,1874 > /* Add offset for pushq GOT+8(%rip), since the instruction > uses 6 bytes subtract this value. */ > bfd_put_32 (output_bfd, > (sgot->output_section->vma > + sgot->output_offset > + 8 > - splt->output_section->vma > - splt->output_offset > - 6), > splt->contents + 2); > /* Add offset for jmp *GOT+16(%rip). The 12 is the offset to > the end of the instruction. */ > bfd_put_32 (output_bfd, > (sgot->output_section->vma > + sgot->output_offset > + 16 > - splt->output_section->vma > - splt->output_offset > - 12), > splt->contents + 8); > 1828,1829d1882 < sgot = bfd_get_section_by_name (dynobj, ".got.plt"); < BFD_ASSERT (sgot != NULL); 1838c1891 < /* Write GOT[1] and GOT[2], needed for the linker. */ --- > /* Write GOT[1] and GOT[2], needed for the dynamic linker. */ 1849,1882d1901 < /* < * Why was the hash table entry size definition changed from < * ARCH_SIZE/8 to 4? This breaks the 64 bit dynamic linker and < * this is the only reason for the elf64_x86_64_size_info structure. < */ < < const struct elf_size_info elf64_86_64_size_info = < { < sizeof (Elf64_External_Ehdr), < sizeof (Elf64_External_Phdr), < sizeof (Elf64_External_Shdr), < sizeof (Elf64_External_Rel), < sizeof (Elf64_External_Rela), < sizeof (Elf64_External_Sym), < sizeof (Elf64_External_Dyn), < sizeof (Elf_External_Note), < 8, /* hash-table entry size */ < 1, /* internal relocations per external relocations */ < 64, /* arch_size */ < 8, /* file_align */ < ELFCLASS64, EV_CURRENT, < bfd_elf64_write_out_phdrs, < bfd_elf64_write_shdrs_and_ehdr, < bfd_elf64_write_relocs, < bfd_elf64_swap_symbol_out, < bfd_elf64_slurp_reloc_table, < bfd_elf64_slurp_symbol_table, < bfd_elf64_swap_dyn_in, < bfd_elf64_swap_dyn_out, < NULL, < NULL, < NULL, < NULL < }; 1889,1890d1907 < < #define elf_backend_size_info elf64_86_64_size_info diff -rN binutils-2.11/bfd/elfarm-nabi.c binutils-2.11.2/bfd/elfarm-nabi.c 2c2 < Copyright 1999 Free Software Foundation, Inc. --- > Copyright 1999, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elfarm-oabi.c binutils-2.11.2/bfd/elfarm-oabi.c 2c2 < Copyright 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1999, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elfcode.h binutils-2.11.2/bfd/elfcode.h 2,3c2,3 < Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 1999, 2000 Free < Software Foundation, Inc. --- > Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, > 2001 Free Software Foundation, Inc. 1375c1375 < reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize; --- > reloc_count = NUM_SHDR_ENTRIES (rel_hdr); 1377,1379c1377 < reloc_count2 = (rel_hdr2 < ? (rel_hdr2->sh_size / rel_hdr2->sh_entsize) < : 0); --- > reloc_count2 = (rel_hdr2 ? NUM_SHDR_ENTRIES (rel_hdr2) : 0); 1396c1394 < reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize; --- > reloc_count = NUM_SHDR_ENTRIES (rel_hdr); diff -rN binutils-2.11/bfd/elfcore.h binutils-2.11.2/bfd/elfcore.h 2c2,3 < Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1997, 1998, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/elflink.c binutils-2.11.2/bfd/elflink.c 2c2,3 < Copyright 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 110c111 < int ptralign = 0; --- > int ptralign; 335c336 < /* Assign dynsym indicies. In a shared library we generate a section --- > /* Assign dynsym indices. In a shared library we generate a section diff -rN binutils-2.11/bfd/elflink.h binutils-2.11.2/bfd/elflink.h 2c2,3 < Copyright 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 83c84 < /* Return true iff this is a non-common definition of a symbol. */ --- > /* Return true iff this is a non-common, definition of a non-function symbol. */ 85c86 < is_global_symbol_definition (abfd, sym) --- > is_global_data_symbol_definition (abfd, sym) 93a95,98 > /* Function symbols do not count. */ > if (ELF_ST_TYPE (sym->st_info) == STT_FUNC) > return false; > 119c124 < whoes archove map contains a mention of SYMDEF, and determine if --- > whose archive map contains a mention of SYMDEF, and determine if 204c209 < result = is_global_symbol_definition (abfd, & sym); --- > result = is_global_data_symbol_definition (abfd, & sym); 893d897 < bfd_byte *dynver = NULL; 1021c1025 < extversym = (Elf_External_Versym *) bfd_malloc (hdr->sh_size); --- > extversym = (Elf_External_Versym *) bfd_malloc (versymhdr->sh_size); 2172,2173d2175 < if (dynver != NULL) < free (dynver); 2454c2456 < erelend = erel + shdr->sh_size / shdr->sh_entsize; --- > erelend = erel + NUM_SHDR_ENTRIES (shdr); 2460c2462 < unsigned char i; --- > unsigned int i; 2484c2486 < erelaend = erela + shdr->sh_size / shdr->sh_entsize; --- > erelaend = erela + NUM_SHDR_ENTRIES (shdr); 2564c2566 < internal_relocs + (rel_hdr->sh_size / rel_hdr->sh_entsize --- > internal_relocs + (NUM_SHDR_ENTRIES (rel_hdr) 2954a2957,2959 > eif.info = info; > eif.failed = false; > 2959,2962d2963 < struct elf_info_failed eif; < < eif.failed = false; < eif.info = info; 2984,2985d2984 < eif.failed = false; < eif.info = info; 3516,3518c3515,3519 < need a PLT entry. Likewise, if the symbol has any kind of < visibility (internal, hidden, or protected), it doesn't need a < PLT. */ --- > need a PLT entry, and we can accomplish that by forcing it local. > Likewise, if the symbol has hidden or internal visibility. > FIXME: It might be that we also do not need a PLT for other > non-hidden visibilities, but we would have to tell that to the > backend specifically; we can't just clear PLT-related data here. */ 3521c3522,3524 < && (eif->info->symbolic || ELF_ST_VISIBILITY (h->other)) --- > && (eif->info->symbolic > || ELF_ST_VISIBILITY (h->other) == STV_INTERNAL > || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN) 3524,3525c3527,3532 < h->elf_link_hash_flags &=~ ELF_LINK_HASH_NEEDS_PLT; < h->plt.offset = (bfd_vma) -1; --- > struct elf_backend_data *bed; > bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj); > if (ELF_ST_VISIBILITY (h->other) == STV_INTERNAL > || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN) > h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; > (*bed->elf_backend_hide_symbol) (eif->info, h); 4089d4095 < register struct elf_link_hash_entry **p, **pend; 4112a4119,4120 > struct elf_link_hash_entry **p; > 4114,4115c4122,4123 < bfd_malloc (o->reloc_count < * sizeof (struct elf_link_hash_entry *))); --- > bfd_zmalloc (o->reloc_count > * sizeof (struct elf_link_hash_entry *))); 4120,4122d4127 < pend = p + o->reloc_count; < for (; p < pend; p++) < *p = NULL; 4141a4147,4164 > Elf_Internal_Rel *irel; > Elf_Internal_Rela *irela; > > irel = (Elf_Internal_Rel *) bfd_zmalloc (sizeof (Elf_Internal_Rel) > * bed->s->int_rels_per_ext_rel); > if (irel == NULL) > { > (*_bfd_error_handler) (_("Error: out of memory")); > abort (); > } > > irela = (Elf_Internal_Rela *) bfd_zmalloc (sizeof (Elf_Internal_Rela) > * bed->s->int_rels_per_ext_rel); > if (irela == NULL) > { > (*_bfd_error_handler) (_("Error: out of memory")); > abort (); > } 4153c4176 < Elf_Internal_Rel irel; --- > unsigned int j; 4157c4180 < (*bed->s->swap_reloc_in) (abfd, (bfd_byte *) erel, &irel); --- > (*bed->s->swap_reloc_in) (abfd, (bfd_byte *) erel, irel); 4159,4161c4182,4187 < elf_swap_reloc_in (abfd, erel, &irel); < irel.r_info = ELF_R_INFO ((*rel_hash)->indx, < ELF_R_TYPE (irel.r_info)); --- > elf_swap_reloc_in (abfd, erel, irel); > > for (j = 0; j < bed->s->int_rels_per_ext_rel; j++) > irel[j].r_info = ELF_R_INFO ((*rel_hash)->indx, > ELF_R_TYPE (irel[j].r_info)); > 4163c4189 < (*bed->s->swap_reloc_out) (abfd, &irel, (bfd_byte *) erel); --- > (*bed->s->swap_reloc_out) (abfd, irel, (bfd_byte *) erel); 4165c4191 < elf_swap_reloc_out (abfd, &irel, erel); --- > elf_swap_reloc_out (abfd, irel, erel); 4170c4196 < Elf_Internal_Rela irela; --- > unsigned int j; 4177c4203 < (*bed->s->swap_reloca_in) (abfd, (bfd_byte *) erela, &irela); --- > (*bed->s->swap_reloca_in) (abfd, (bfd_byte *) erela, irela); 4179,4181c4205,4210 < elf_swap_reloca_in (abfd, erela, &irela); < irela.r_info = ELF_R_INFO ((*rel_hash)->indx, < ELF_R_TYPE (irela.r_info)); --- > elf_swap_reloca_in (abfd, erela, irela); > > for (j = 0; j < bed->s->int_rels_per_ext_rel; j++) > irela[j].r_info = ELF_R_INFO ((*rel_hash)->indx, > ELF_R_TYPE (irela[j].r_info)); > 4183c4212 < (*bed->s->swap_reloca_out) (abfd, &irela, (bfd_byte *) erela); --- > (*bed->s->swap_reloca_out) (abfd, irela, (bfd_byte *) erela); 4185c4214 < elf_swap_reloca_out (abfd, &irela, erela); --- > elf_swap_reloca_out (abfd, irela, erela); 4187a4217,4219 > > free (irel); > free (irela); 4385,4386c4417 < *rel_count += (esdi->rel_hdr.sh_size < / esdi->rel_hdr.sh_entsize); --- > *rel_count += NUM_SHDR_ENTRIES (& esdi->rel_hdr); 4388,4389c4419 < *rel_count2 += (esdi->rel_hdr2->sh_size < / esdi->rel_hdr2->sh_entsize); --- > *rel_count2 += NUM_SHDR_ENTRIES (esdi->rel_hdr2); 4434c4464 < symtab_hdr->sh_addralign = 4; /* FIXME: system dependent? */ --- > symtab_hdr->sh_addralign = bed->s->file_align; 5387c5417,5419 < irelaend = irela + input_rel_hdr->sh_size / input_rel_hdr->sh_entsize; --- > irelaend = irela + NUM_SHDR_ENTRIES (input_rel_hdr) > * bed->s->int_rels_per_ext_rel; > 5390a5423,5431 > Elf_Internal_Rel *irel; > > irel = (Elf_Internal_Rel *) bfd_zmalloc (bed->s->int_rels_per_ext_rel > * sizeof (Elf_Internal_Rel)); > if (irel == NULL) > { > (*_bfd_error_handler) (_("Error: out of memory")); > abort (); > } 5393c5434 < for (; irela < irelaend; irela++, erel++) --- > for (; irela < irelaend; irela += bed->s->int_rels_per_ext_rel, erel++) 5395c5436,5443 < Elf_Internal_Rel irel; --- > unsigned int i; > > for (i = 0; i < bed->s->int_rels_per_ext_rel; i++) > { > irel[i].r_offset = irela[i].r_offset; > irel[i].r_info = irela[i].r_info; > BFD_ASSERT (irela[i].r_addend == 0); > } 5397,5399d5444 < irel.r_offset = irela->r_offset; < irel.r_info = irela->r_info; < BFD_ASSERT (irela->r_addend == 0); 5401c5446 < (*bed->s->swap_reloc_out) (output_bfd, &irel, (PTR) erel); --- > (*bed->s->swap_reloc_out) (output_bfd, irel, (PTR) erel); 5403c5448 < elf_swap_reloc_out (output_bfd, &irel, erel); --- > elf_swap_reloc_out (output_bfd, irel, erel); 5404a5450,5451 > > free (irel); 5410,5411c5457,5458 < BFD_ASSERT (input_rel_hdr->sh_entsize < == sizeof (Elf_External_Rela)); --- > BFD_ASSERT (input_rel_hdr->sh_entsize == sizeof (Elf_External_Rela)); > 5413c5460 < for (; irela < irelaend; irela++, erela++) --- > for (; irela < irelaend; irela += bed->s->int_rels_per_ext_rel, erela++) 5422c5469 < *rel_countp += input_rel_hdr->sh_size / input_rel_hdr->sh_entsize; --- > *rel_countp += NUM_SHDR_ENTRIES (input_rel_hdr); 5513a5561 > name = NULL; 5515c5563,5566 < isec = bfd_und_section_ptr; --- > { > isec = bfd_und_section_ptr; > name = isec->name; > } 5519c5570,5573 < isec = bfd_abs_section_ptr; --- > { > isec = bfd_abs_section_ptr; > name = isec->name; > } 5521c5575,5578 < isec = bfd_com_section_ptr; --- > { > isec = bfd_com_section_ptr; > name = isec->name; > } 5540c5597,5608 < isec->symbol->value = isym->st_value; --- > { > if (name) > { > if (isec->symbol->value != isym->st_value) > (*_bfd_error_handler) > (_("%s: invalid section symbol index 0x%x (%s) ingored"), > bfd_get_filename (input_bfd), isym->st_shndx, > name); > continue; > } > isec->symbol->value = isym->st_value; > } 5713a5782 > unsigned int next_erel; 5718,5719c5787,5788 < irelaend = < irela + o->reloc_count * bed->s->int_rels_per_ext_rel; --- > irelaend = irela > + o->reloc_count * bed->s->int_rels_per_ext_rel; 5723c5792 < for (; irela < irelaend; irela++, rel_hash++) --- > for (next_erel = 0; irela < irelaend; irela++, next_erel++) 5728a5798,5803 > if (next_erel == bed->s->int_rels_per_ext_rel) > { > rel_hash++; > next_erel = 0; > } > 5745c5820 < long indx; --- > unsigned long indx; 5853,5854c5928,5929 < internal_relocs < += input_rel_hdr->sh_size / input_rel_hdr->sh_entsize; --- > internal_relocs += NUM_SHDR_ENTRIES (input_rel_hdr) > * bed->s->int_rels_per_ext_rel; 6021c6096 < Elf_Internal_Rel irel; --- > Elf_Internal_Rel *irel; 6022a6098,6107 > unsigned int i; > > irel = (Elf_Internal_Rel *) bfd_zmalloc (bed->s->int_rels_per_ext_rel > * sizeof (Elf_Internal_Rel)); > if (irel == NULL) > return false; > > for (i = 0; i < bed->s->int_rels_per_ext_rel; i++) > irel[i].r_offset = offset; > irel[0].r_info = ELF_R_INFO (indx, howto->type); 6024,6025d6108 < irel.r_offset = offset; < irel.r_info = ELF_R_INFO (indx, howto->type); 6027a6111 > 6029c6113 < (*bed->s->swap_reloc_out) (output_bfd, &irel, (bfd_byte *) erel); --- > (*bed->s->swap_reloc_out) (output_bfd, irel, (bfd_byte *) erel); 6031c6115,6117 < elf_swap_reloc_out (output_bfd, &irel, erel); --- > elf_swap_reloc_out (output_bfd, irel, erel); > > free (irel); 6035c6121 < Elf_Internal_Rela irela; --- > Elf_Internal_Rela *irela; 6036a6123,6133 > unsigned int i; > > irela = (Elf_Internal_Rela *) bfd_zmalloc (bed->s->int_rels_per_ext_rel > * sizeof (Elf_Internal_Rela)); > if (irela == NULL) > return false; > > for (i = 0; i < bed->s->int_rels_per_ext_rel; i++) > irela[i].r_offset = offset; > irela[0].r_info = ELF_R_INFO (indx, howto->type); > irela[0].r_addend = addend; 6038,6040d6134 < irela.r_offset = offset; < irela.r_info = ELF_R_INFO (indx, howto->type); < irela.r_addend = addend; 6042a6137 > 6044c6139 < (*bed->s->swap_reloca_out) (output_bfd, &irela, (bfd_byte *) erela); --- > (*bed->s->swap_reloca_out) (output_bfd, irela, (bfd_byte *) erela); 6046c6141 < elf_swap_reloca_out (output_bfd, &irela, erela); --- > elf_swap_reloca_out (output_bfd, irela, erela); 6183c6278 < /* Fill in the address for a pointer generated in alinker section. */ --- > /* Fill in the address for a pointer generated in a linker section. */ 6250c6345,6355 < Elf_Internal_Rela outrel; --- > Elf_Internal_Rela *outrel; > struct elf_backend_data *bed = get_elf_backend_data (output_bfd); > unsigned int i; > > outrel = (Elf_Internal_Rela *) bfd_zmalloc (sizeof (Elf_Internal_Rela) > * bed->s->int_rels_per_ext_rel); > if (outrel == NULL) > { > (*_bfd_error_handler) (_("Error: out of memory")); > return 0; > } 6259,6264c6364,6370 < outrel.r_offset = (lsect->section->output_section->vma < + lsect->section->output_offset < + linker_section_ptr->offset); < outrel.r_info = ELF_R_INFO (0, relative_reloc); < outrel.r_addend = 0; < elf_swap_reloca_out (output_bfd, &outrel, --- > for (i = 0; i < bed->s->int_rels_per_ext_rel; i++) > outrel[i].r_offset = (lsect->section->output_section->vma > + lsect->section->output_offset > + linker_section_ptr->offset); > outrel[0].r_info = ELF_R_INFO (0, relative_reloc); > outrel[0].r_addend = 0; > elf_swap_reloca_out (output_bfd, outrel, 6268a6375,6376 > > free (outrel); diff -rN binutils-2.11/bfd/elfxx-ia64.c binutils-2.11.2/bfd/elfxx-ia64.c 913c913 < size_t len1, len2; --- > size_t len1, len2, len3; 917,918c917,920 < return (strncmp (name, ELF_STRING_ia64_unwind, len1) == 0 < && strncmp (name, ELF_STRING_ia64_unwind_info, len2) != 0); --- > len3 = sizeof (ELF_STRING_ia64_unwind_once) - 1; > return ((strncmp (name, ELF_STRING_ia64_unwind, len1) == 0 > && strncmp (name, ELF_STRING_ia64_unwind_info, len2) != 0) > || strncmp (name, ELF_STRING_ia64_unwind_once, len3) == 0); 1056a1059,1070 > else if (sname > && (len = sizeof (ELF_STRING_ia64_unwind_once) - 1, > strncmp (sname, ELF_STRING_ia64_unwind_once, len)) == 0) > { > /* .gnu.linkonce.ia64unw.FOO -> .gnu.linkonce.t.FOO */ > size_t len2 = sizeof (".gnu.linkonce.t.") - 1; > char *once_name = alloca (len2 + strlen (sname) - len + 1); > > memcpy (once_name, ".gnu.linkonce.t.", len2); > strcpy (once_name + len2, sname + len); > text_sect = bfd_get_section_by_name (abfd, once_name); > } 1265,1266c1279,1284 < if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT) < return false; --- > switch (ELF_ST_VISIBILITY (h->other)) > { > case STV_INTERNAL: > case STV_HIDDEN: > return false; > } 1405c1423,1424 < h->root.dynindx = -1; --- > if ((h->root.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0) > h->root.dynindx = -1; diff -rN binutils-2.11/bfd/elfxx-target.h binutils-2.11.2/bfd/elfxx-target.h 2c2,3 < Copyright 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 112a114 > #ifndef bfd_elfNN_bfd_make_debug_symbol 114a117 > #endif diff -rN binutils-2.11/bfd/epoc-pe-arm.c binutils-2.11.2/bfd/epoc-pe-arm.c 2c2 < Copyright 1999 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/epoc-pei-arm.c binutils-2.11.2/bfd/epoc-pei-arm.c 2c2 < Copyright 1999 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/format.c binutils-2.11.2/bfd/format.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 1999 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/freebsd.h binutils-2.11.2/bfd/freebsd.h 2c2,3 < Copyright (C) 1990, 1991, 1992, 1996, 2000 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1996, 1997, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/gen-aout.c binutils-2.11.2/bfd/gen-aout.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 98 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/genlink.h binutils-2.11.2/bfd/genlink.h 2c2 < Copyright 1993, 1994 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1996 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/hash.c binutils-2.11.2/bfd/hash.c 2c2,3 < Copyright (C) 1993, 94, 95, 97, 1999 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1997, 1999, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/host-aout.c binutils-2.11.2/bfd/host-aout.c 2c2 < Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1994, 1995 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/hp300bsd.c binutils-2.11.2/bfd/hp300bsd.c 2c2 < Copyright 1992 Free Software Foundation, Inc. --- > Copyright 1992, 1994, 1995 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/hp300hpux.c binutils-2.11.2/bfd/hp300hpux.c 2c2,3 < Copyright (C) 1990, 91, 94, 95, 97, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1993, 1994, 1995, 1997, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/hppabsd-core.c binutils-2.11.2/bfd/hppabsd-core.c 2c2,3 < Copyright 1993, 94, 95, 97, 1998 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1998, 1999, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/hpux-core.c binutils-2.11.2/bfd/hpux-core.c 2c2,3 < Copyright 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1996, 1998, 1999, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/i386aout.c binutils-2.11.2/bfd/i386aout.c 2c2,3 < Copyright 1990, 91, 92, 94, 95, 96, 1997 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1994, 1996, 1997 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/i386bsd.c binutils-2.11.2/bfd/i386bsd.c 2c2 < Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/i386dynix.c binutils-2.11.2/bfd/i386dynix.c 2c2 < Copyright (C) 1994, 1995 Free Software Foundation, Inc. --- > Copyright 1994, 1995 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/i386freebsd.c binutils-2.11.2/bfd/i386freebsd.c 2c2 < Copyright (C) 1990, 1991, 1992, 1996 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1996 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/i386linux.c binutils-2.11.2/bfd/i386linux.c 2c2 < Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1992, 1993, 1994, 1995, 1996, 1997 diff -rN binutils-2.11/bfd/i386lynx.c binutils-2.11.2/bfd/i386lynx.c 2c2 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996 diff -rN binutils-2.11/bfd/i386mach3.c binutils-2.11.2/bfd/i386mach3.c 2c2,3 < Copyright (C) 1990, 91, 93, 94, 95, 1997 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1993, 1994, 1995, 1997 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/i386msdos.c binutils-2.11.2/bfd/i386msdos.c 2c2 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999 diff -rN binutils-2.11/bfd/i386netbsd.c binutils-2.11.2/bfd/i386netbsd.c 2c2,3 < Copyright (C) 1990, 91, 92, 94, 95, 96, 1998 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/i386os9k.c binutils-2.11.2/bfd/i386os9k.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 98, 1999 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/ieee.c binutils-2.11.2/bfd/ieee.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 3583a3585,3588 > case bfd_mach_mcf5200:id = "5200"; break; > case bfd_mach_mcf5206e:id = "5206e"; break; > case bfd_mach_mcf5307:id = "5307"; break; > case bfd_mach_mcf5407:id = "5407"; break; diff -rN binutils-2.11/bfd/ihex.c binutils-2.11.2/bfd/ihex.c 2c2 < Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/init.c binutils-2.11.2/bfd/init.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/irix-core.c binutils-2.11.2/bfd/irix-core.c 2c2 < Copyright 1993, 94, 95, 96, 1997 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1996, 1999, 2001 Free Software Foundation, Inc. 168c168 < --- > 169a170 > bfd_default_set_arch_mach (abfd, bfd_arch_mips, 0); diff -rN binutils-2.11/bfd/libaout.h binutils-2.11.2/bfd/libaout.h 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 diff -rN binutils-2.11/bfd/libbfd-in.h binutils-2.11.2/bfd/libbfd-in.h 3c3,4 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 524c525 < extern const bfd_target * const bfd_target_vector[]; --- > extern const bfd_target * const *bfd_target_vector; diff -rN binutils-2.11/bfd/libbfd.c binutils-2.11.2/bfd/libbfd.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 233a235 > 749d750 < 962c963 < addr[1] = (bfd_byte )data; --- > addr[1] = (bfd_byte) data; 970c971 < addr[0] = (bfd_byte )data; --- > addr[0] = (bfd_byte) data; 1129c1130 < addr[3] = (bfd_byte)data; --- > addr[3] = (bfd_byte) data; 1137c1138 < addr[0] = (bfd_byte)data; --- > addr[0] = (bfd_byte) data; diff -rN binutils-2.11/bfd/libbfd.h binutils-2.11.2/bfd/libbfd.h 3c3,4 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 524c525 < extern const bfd_target * const bfd_target_vector[]; --- > extern const bfd_target * const *bfd_target_vector; 648a650 > "BFD_RELOC_SPARC_UA16", 649a652 > "BFD_RELOC_SPARC_UA64", 708a712,722 > "BFD_RELOC_MIPS_SHIFT5", > "BFD_RELOC_MIPS_SHIFT6", > "BFD_RELOC_MIPS_INSERT_A", > "BFD_RELOC_MIPS_INSERT_B", > "BFD_RELOC_MIPS_DELETE", > "BFD_RELOC_MIPS_HIGHEST", > "BFD_RELOC_MIPS_HIGHER", > "BFD_RELOC_MIPS_SCN_DISP", > "BFD_RELOC_MIPS_REL16", > "BFD_RELOC_MIPS_RELGOT", > "BFD_RELOC_MIPS_JALR", diff -rN binutils-2.11/bfd/libcoff-in.h binutils-2.11.2/bfd/libcoff-in.h 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 123a125,126 > int target_subsystem; > boolean force_minimum_alignment; 163c166 < bfd_size_type maxdata; --- > bfd_vma maxdata; 166c169 < bfd_size_type maxstack; --- > bfd_vma maxstack; diff -rN binutils-2.11/bfd/libcoff.h binutils-2.11.2/bfd/libcoff.h 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 123a125,126 > int target_subsystem; > boolean force_minimum_alignment; 163c166 < bfd_size_type maxdata; --- > bfd_vma maxdata; 166c169 < bfd_size_type maxstack; --- > bfd_vma maxstack; diff -rN binutils-2.11/bfd/libecoff.h binutils-2.11.2/bfd/libecoff.h 2c2 < Copyright (C) 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1996, 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/libhppa.h binutils-2.11.2/bfd/libhppa.h 2c2 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000 diff -rN binutils-2.11/bfd/libieee.h binutils-2.11.2/bfd/libieee.h 2c2 < Copyright (C) 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1994, 1996 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/libnlm.h binutils-2.11.2/bfd/libnlm.h 2c2 < Copyright (C) 1993 Free Software Foundation, Inc. --- > Copyright 1993, 1994 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/liboasys.h binutils-2.11.2/bfd/liboasys.h 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 1997 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994, 1997 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/libpei.h binutils-2.11.2/bfd/libpei.h 2c2,3 < Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 195c196 < #ifdef COFF_WITH_PEP64 --- > #ifdef COFF_WITH_pep 209c210,228 < #else /* !COFF_WITH_PEP64 */ --- > #define _bfd_XX_bfd_copy_private_bfd_data_common _bfd_pep_bfd_copy_private_bfd_data_common > #define _bfd_XX_bfd_copy_private_section_data _bfd_pep_bfd_copy_private_section_data > #define _bfd_XX_get_symbol_info _bfd_pep_get_symbol_info > #define _bfd_XX_only_swap_filehdr_out _bfd_pep_only_swap_filehdr_out > #define _bfd_XX_print_private_bfd_data_common _bfd_pep_print_private_bfd_data_common > #define _bfd_XXi_final_link_postscript _bfd_pepi_final_link_postscript > #define _bfd_XXi_final_link_postscript _bfd_pepi_final_link_postscript > #define _bfd_XXi_only_swap_filehdr_out _bfd_pepi_only_swap_filehdr_out > #define _bfd_XXi_swap_aouthdr_in _bfd_pepi_swap_aouthdr_in > #define _bfd_XXi_swap_aouthdr_out _bfd_pepi_swap_aouthdr_out > #define _bfd_XXi_swap_aux_in _bfd_pepi_swap_aux_in > #define _bfd_XXi_swap_aux_out _bfd_pepi_swap_aux_out > #define _bfd_XXi_swap_lineno_in _bfd_pepi_swap_lineno_in > #define _bfd_XXi_swap_lineno_out _bfd_pepi_swap_lineno_out > #define _bfd_XXi_swap_scnhdr_out _bfd_pepi_swap_scnhdr_out > #define _bfd_XXi_swap_sym_in _bfd_pepi_swap_sym_in > #define _bfd_XXi_swap_sym_out _bfd_pepi_swap_sym_out > > #else /* !COFF_WITH_pep */ 223c242,260 < #endif /* !COFF_WITH_PEP64 */ --- > #define _bfd_XX_bfd_copy_private_bfd_data_common _bfd_pe_bfd_copy_private_bfd_data_common > #define _bfd_XX_bfd_copy_private_section_data _bfd_pe_bfd_copy_private_section_data > #define _bfd_XX_get_symbol_info _bfd_pe_get_symbol_info > #define _bfd_XX_only_swap_filehdr_out _bfd_pe_only_swap_filehdr_out > #define _bfd_XX_print_private_bfd_data_common _bfd_pe_print_private_bfd_data_common > #define _bfd_XXi_final_link_postscript _bfd_pei_final_link_postscript > #define _bfd_XXi_final_link_postscript _bfd_pei_final_link_postscript > #define _bfd_XXi_only_swap_filehdr_out _bfd_pei_only_swap_filehdr_out > #define _bfd_XXi_swap_aouthdr_in _bfd_pei_swap_aouthdr_in > #define _bfd_XXi_swap_aouthdr_out _bfd_pei_swap_aouthdr_out > #define _bfd_XXi_swap_aux_in _bfd_pei_swap_aux_in > #define _bfd_XXi_swap_aux_out _bfd_pei_swap_aux_out > #define _bfd_XXi_swap_lineno_in _bfd_pei_swap_lineno_in > #define _bfd_XXi_swap_lineno_out _bfd_pei_swap_lineno_out > #define _bfd_XXi_swap_scnhdr_out _bfd_pei_swap_scnhdr_out > #define _bfd_XXi_swap_sym_in _bfd_pei_swap_sym_in > #define _bfd_XXi_swap_sym_out _bfd_pei_swap_sym_out > > #endif /* !COFF_WITH_pep */ 237,238c274,275 < void _bfd_pei_swap_sym_in PARAMS ((bfd*, PTR, PTR)); < #define coff_swap_sym_in _bfd_pei_swap_sym_in --- > void _bfd_XXi_swap_sym_in PARAMS ((bfd*, PTR, PTR)); > #define coff_swap_sym_in _bfd_XXi_swap_sym_in 240,241c277,278 < unsigned int _bfd_pei_swap_sym_out PARAMS ((bfd*, PTR, PTR)); < #define coff_swap_sym_out _bfd_pei_swap_sym_out --- > unsigned int _bfd_XXi_swap_sym_out PARAMS ((bfd*, PTR, PTR)); > #define coff_swap_sym_out _bfd_XXi_swap_sym_out 243,244c280,281 < void _bfd_pei_swap_aux_in PARAMS ((bfd *, PTR, int, int, int, int, PTR)); < #define coff_swap_aux_in _bfd_pei_swap_aux_in --- > void _bfd_XXi_swap_aux_in PARAMS ((bfd *, PTR, int, int, int, int, PTR)); > #define coff_swap_aux_in _bfd_XXi_swap_aux_in 246c283 < unsigned int _bfd_pei_swap_aux_out \ --- > unsigned int _bfd_XXi_swap_aux_out \ 248c285 < #define coff_swap_aux_out _bfd_pei_swap_aux_out --- > #define coff_swap_aux_out _bfd_XXi_swap_aux_out 250,251c287,288 < void _bfd_pei_swap_lineno_in PARAMS ((bfd*, PTR, PTR)); < #define coff_swap_lineno_in _bfd_pei_swap_lineno_in --- > void _bfd_XXi_swap_lineno_in PARAMS ((bfd*, PTR, PTR)); > #define coff_swap_lineno_in _bfd_XXi_swap_lineno_in 253,254c290,291 < unsigned int _bfd_pei_swap_lineno_out PARAMS ((bfd*, PTR, PTR)); < #define coff_swap_lineno_out _bfd_pei_swap_lineno_out --- > unsigned int _bfd_XXi_swap_lineno_out PARAMS ((bfd*, PTR, PTR)); > #define coff_swap_lineno_out _bfd_XXi_swap_lineno_out 256,257c293,294 < void _bfd_pei_swap_aouthdr_in PARAMS ((bfd*, PTR, PTR)); < #define coff_swap_aouthdr_in _bfd_pei_swap_aouthdr_in --- > void _bfd_XXi_swap_aouthdr_in PARAMS ((bfd*, PTR, PTR)); > #define coff_swap_aouthdr_in _bfd_XXi_swap_aouthdr_in 259,260c296,297 < unsigned int _bfd_pei_swap_aouthdr_out PARAMS ((bfd *, PTR, PTR)); < #define coff_swap_aouthdr_out _bfd_pei_swap_aouthdr_out --- > unsigned int _bfd_XXi_swap_aouthdr_out PARAMS ((bfd *, PTR, PTR)); > #define coff_swap_aouthdr_out _bfd_XXi_swap_aouthdr_out 262,263c299,300 < unsigned int _bfd_pei_swap_scnhdr_out PARAMS ((bfd *, PTR, PTR)); < #define coff_swap_scnhdr_out _bfd_pei_swap_scnhdr_out --- > unsigned int _bfd_XXi_swap_scnhdr_out PARAMS ((bfd *, PTR, PTR)); > #define coff_swap_scnhdr_out _bfd_XXi_swap_scnhdr_out 265c302 < boolean _bfd_pe_print_private_bfd_data_common PARAMS ((bfd *, PTR)); --- > boolean _bfd_XX_print_private_bfd_data_common PARAMS ((bfd *, PTR)); 267c304 < boolean _bfd_pe_bfd_copy_private_bfd_data_common PARAMS ((bfd *, bfd *)); --- > boolean _bfd_XX_bfd_copy_private_bfd_data_common PARAMS ((bfd *, bfd *)); 269c306 < void _bfd_pe_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *)); --- > void _bfd_XX_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *)); 271c308 < boolean _bfd_pei_final_link_postscript --- > boolean _bfd_XXi_final_link_postscript 275c312 < #define coff_final_link_postscript _bfd_pei_final_link_postscript --- > #define coff_final_link_postscript _bfd_XXi_final_link_postscript 281,283c318,320 < unsigned int _bfd_pe_only_swap_filehdr_out PARAMS ((bfd*, PTR, PTR)); < unsigned int _bfd_pei_only_swap_filehdr_out PARAMS ((bfd*, PTR, PTR)); < boolean _bfd_pe_bfd_copy_private_section_data --- > unsigned int _bfd_XX_only_swap_filehdr_out PARAMS ((bfd*, PTR, PTR)); > unsigned int _bfd_XXi_only_swap_filehdr_out PARAMS ((bfd*, PTR, PTR)); > boolean _bfd_XX_bfd_copy_private_section_data diff -rN binutils-2.11/bfd/linker.c binutils-2.11.2/bfd/linker.c 2c2 < Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 1803a1804,1812 > if (inh->type == bfd_link_hash_indirect > && inh->u.i.link == h) > { > (*_bfd_error_handler) > (_("%s: indirect symbol `%s' to `%s' is a loop"), > bfd_get_filename (abfd), name, string); > bfd_set_error (bfd_error_invalid_operation); > return false; > } diff -rN binutils-2.11/bfd/lynx-core.c binutils-2.11.2/bfd/lynx-core.c 2c2 < Copyright 1993 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/m68k4knetbsd.c binutils-2.11.2/bfd/m68k4knetbsd.c 2c2 < Copyright (C) 1990, 91, 92, 95, 1998 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1995, 1998 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/m68klinux.c binutils-2.11.2/bfd/m68klinux.c 2c2 < Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000 diff -rN binutils-2.11/bfd/m68klynx.c binutils-2.11.2/bfd/m68klynx.c 2c2,3 < Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/m68knetbsd.c binutils-2.11.2/bfd/m68knetbsd.c 2c2,3 < Copyright (C) 1990, 91, 92, 94, 95, 97, 1998 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1994, 1995, 1997, 1998, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/m88kmach3.c binutils-2.11.2/bfd/m88kmach3.c 2c2 < Copyright (C) 1990, 1991, 1993, 1994 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1993, 1994, 1995 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/mipsbsd.c binutils-2.11.2/bfd/mipsbsd.c 2c2,3 < Copyright (C) 1993, 94, 95, 97, 98, 1999 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1997, 1998, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/netbsd-core.c binutils-2.11.2/bfd/netbsd-core.c 2c2,3 < Copyright 1988, 89, 91, 92, 93, 96, 1998 Free Software Foundation, Inc. --- > Copyright 1988, 1989, 1991, 1992, 1993, 1996, 1998, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/netbsd.h binutils-2.11.2/bfd/netbsd.h 2c2 < Copyright (C) 1990, 91, 92, 94, 95, 96, 97, 98, 2000 --- > Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000 diff -rN binutils-2.11/bfd/newsos3.c binutils-2.11.2/bfd/newsos3.c 2c2 < Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1994, 1995, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/nlm-target.h binutils-2.11.2/bfd/nlm-target.h 2c2 < Copyright (C) 1993, 94, 95, 1997 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/nlm.c binutils-2.11.2/bfd/nlm.c 2c2 < Copyright (C) 1993 Free Software Foundation, Inc. --- > Copyright 1993, 1994 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/nlm32-alpha.c binutils-2.11.2/bfd/nlm32-alpha.c 2c2 < Copyright (C) 1993 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 2000, 2001 Free Software Foundation, Inc. 606,610c606,610 < bfd *abfd; < asection *sec; < PTR data; < bfd_vma offset; < bfd_size_type count; --- > bfd *abfd ATTRIBUTE_UNUSED; > asection *sec ATTRIBUTE_UNUSED; > PTR data ATTRIBUTE_UNUSED; > bfd_vma offset ATTRIBUTE_UNUSED; > bfd_size_type count ATTRIBUTE_UNUSED; 810c810 < bfd *abfd; --- > bfd *abfd ATTRIBUTE_UNUSED; diff -rN binutils-2.11/bfd/nlm32-i386.c binutils-2.11.2/bfd/nlm32-i386.c 2c2 < Copyright (C) 1993 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/nlm32-ppc.c binutils-2.11.2/bfd/nlm32-ppc.c 2c2 < Copyright (C) 1994, 1995, 1999 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/nlm32-sparc.c binutils-2.11.2/bfd/nlm32-sparc.c 2c2 < Copyright (C) 1993, 1994, 1995, 1999 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/nlm32.c binutils-2.11.2/bfd/nlm32.c 2c2 < Copyright (C) 1993 Free Software Foundation, Inc. --- > Copyright 1993 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/nlm64.c binutils-2.11.2/bfd/nlm64.c 2c2 < Copyright (C) 1993 Free Software Foundation, Inc. --- > Copyright 1993 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/nlmcode.h binutils-2.11.2/bfd/nlmcode.h 2c2 < Copyright (C) 1993, 94, 95, 98, 1999 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/nlmswap.h binutils-2.11.2/bfd/nlmswap.h 2c2 < Copyright (C) 1993 Free Software Foundation, Inc. --- > Copyright 1993, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/ns32knetbsd.c binutils-2.11.2/bfd/ns32knetbsd.c 2c2,3 < Copyright (C) 1990, 91, 92, 94, 95, 1998 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1994, 1995, 1998, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/oasys.c binutils-2.11.2/bfd/oasys.c 2c2 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999 diff -rN binutils-2.11/bfd/opncls.c binutils-2.11.2/bfd/opncls.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997, 2001 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, > 2001 diff -rN binutils-2.11/bfd/osf-core.c binutils-2.11.2/bfd/osf-core.c 2c2 < Copyright 1993, 94, 95, 97, 1998 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1998, 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/pc532-mach.c binutils-2.11.2/bfd/pc532-mach.c 2c2,3 < Copyright (C) 1990, 1991, 1992, 1994, 2000 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1994, 1995, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/pe-arm.c binutils-2.11.2/bfd/pe-arm.c 2c2 < Copyright 1995, 1999 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1999, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/pe-i386.c binutils-2.11.2/bfd/pe-i386.c 2c2 < Copyright 1995, 1996, 1999 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1999, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/pe-mips.c binutils-2.11.2/bfd/pe-mips.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/pe-ppc.c binutils-2.11.2/bfd/pe-ppc.c 2c2 < Copyright 1995 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/pe-sh.c binutils-2.11.2/bfd/pe-sh.c 2c2 < Copyright 1995, 2000 Free Software Foundation, Inc. --- > Copyright 1995, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/peXXigen.c binutils-2.11.2/bfd/peXXigen.c 0a1,2043 > /* Support for the generic parts of PE/PEI; the common executable parts. > Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. > Written by Cygnus Solutions. > > 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. */ > > /* Most of this hacked by Steve Chamberlain . > > PE/PEI rearrangement (and code added): Donn Terry > Softway Systems, Inc. > */ > > /* Hey look, some documentation [and in a place you expect to find it]! > > The main reference for the pei format is "Microsoft Portable Executable > and Common Object File Format Specification 4.1". Get it if you need to > do some serious hacking on this code. > > Another reference: > "Peering Inside the PE: A Tour of the Win32 Portable Executable > File Format", MSJ 1994, Volume 9. > > The *sole* difference between the pe format and the pei format is that the > latter has an MSDOS 2.0 .exe header on the front that prints the message > "This app must be run under Windows." (or some such). > (FIXME: Whether that statement is *really* true or not is unknown. > Are there more subtle differences between pe and pei formats? > For now assume there aren't. If you find one, then for God sakes > document it here!) > > The Microsoft docs use the word "image" instead of "executable" because > the former can also refer to a DLL (shared library). Confusion can arise > because the `i' in `pei' also refers to "image". The `pe' format can > also create images (i.e. executables), it's just that to run on a win32 > system you need to use the pei format. > > FIXME: Please add more docs here so the next poor fool that has to hack > on this code has a chance of getting something accomplished without > wasting too much time. > */ > > /* This expands into COFF_WITH_pe or COFF_WITH_pep depending on whether > we're compiling for straight PE or PE+. */ > #define COFF_WITH_XX > > #include "bfd.h" > #include "sysdep.h" > #include "libbfd.h" > #include "coff/internal.h" > > /* NOTE: it's strange to be including an architecture specific header > in what's supposed to be general (to PE/PEI) code. However, that's > where the definitions are, and they don't vary per architecture > within PE/PEI, so we get them from there. FIXME: The lack of > variance is an assumption which may prove to be incorrect if new > PE/PEI targets are created. */ > #ifdef COFF_WITH_pep > # include "coff/ia64.h" > #else > # include "coff/i386.h" > #endif > > #include "coff/pe.h" > #include "libcoff.h" > #include "libpei.h" > > #ifdef COFF_WITH_pep > # undef AOUTSZ > # define AOUTSZ PEPAOUTSZ > # define PEAOUTHDR PEPAOUTHDR > #endif > > /* FIXME: This file has various tests of POWERPC_LE_PE. Those tests > worked when the code was in peicode.h, but no longer work now that > the code is in peigen.c. PowerPC NT is said to be dead. If > anybody wants to revive the code, you will have to figure out how > to handle those issues. */ > > static void add_data_entry > PARAMS ((bfd *, struct internal_extra_pe_aouthdr *, int, char *, bfd_vma)); > static boolean pe_print_pdata PARAMS ((bfd *, PTR)); > static boolean pe_print_reloc PARAMS ((bfd *, PTR)); > > /**********************************************************************/ > > void > _bfd_XXi_swap_sym_in (abfd, ext1, in1) > bfd *abfd; > PTR ext1; > PTR in1; > { > SYMENT *ext = (SYMENT *) ext1; > struct internal_syment *in = (struct internal_syment *) in1; > > if (ext->e.e_name[0] == 0) > { > in->_n._n_n._n_zeroes = 0; > in->_n._n_n._n_offset = > bfd_h_get_32 (abfd, (bfd_byte *) ext->e.e.e_offset); > } > else > { > memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN); > } > > in->n_value = bfd_h_get_32 (abfd, (bfd_byte *) ext->e_value); > in->n_scnum = bfd_h_get_16 (abfd, (bfd_byte *) ext->e_scnum); > if (sizeof (ext->e_type) == 2) > { > in->n_type = bfd_h_get_16 (abfd, (bfd_byte *) ext->e_type); > } > else > { > in->n_type = bfd_h_get_32 (abfd, (bfd_byte *) ext->e_type); > } > in->n_sclass = bfd_h_get_8 (abfd, ext->e_sclass); > in->n_numaux = bfd_h_get_8 (abfd, ext->e_numaux); > > #ifndef STRICT_PE_FORMAT > /* This is for Gnu-created DLLs. */ > > /* The section symbols for the .idata$ sections have class 0x68 > (C_SECTION), which MS documentation indicates is a section > symbol. Unfortunately, the value field in the symbol is simply a > copy of the .idata section's flags rather than something useful. > When these symbols are encountered, change the value to 0 so that > they will be handled somewhat correctly in the bfd code. */ > if (in->n_sclass == C_SECTION) > { > in->n_value = 0x0; > > #if 0 > /* FIXME: This is clearly wrong. The problem seems to be that > undefined C_SECTION symbols appear in the first object of a > MS generated .lib file, and the symbols are not defined > anywhere. */ > in->n_scnum = 1; > > /* I have tried setting the class to 3 and using the following > to set the section number. This will put the address of the > pointer to the string kernel32.dll at addresses 0 and 0x10 > off start of idata section which is not correct. */ > #if 0 > if (strcmp (in->_n._n_name, ".idata$4") == 0) > in->n_scnum = 3; > else > in->n_scnum = 2; > #endif > #else > /* Create synthetic empty sections as needed. DJ */ > if (in->n_scnum == 0) > { > asection *sec; > for (sec = abfd->sections; sec; sec = sec->next) > { > if (strcmp (sec->name, in->n_name) == 0) > { > in->n_scnum = sec->target_index; > break; > } > } > } > if (in->n_scnum == 0) > { > int unused_section_number = 0; > asection *sec; > char *name; > for (sec = abfd->sections; sec; sec = sec->next) > if (unused_section_number <= sec->target_index) > unused_section_number = sec->target_index + 1; > > name = bfd_alloc (abfd, strlen (in->n_name) + 10); > if (name == NULL) > return; > strcpy (name, in->n_name); > sec = bfd_make_section_anyway (abfd, name); > > sec->vma = 0; > sec->lma = 0; > sec->_cooked_size = 0; > sec->_raw_size = 0; > sec->filepos = 0; > sec->rel_filepos = 0; > sec->reloc_count = 0; > sec->line_filepos = 0; > sec->lineno_count = 0; > sec->userdata = NULL; > sec->next = (asection *) NULL; > sec->flags = 0; > sec->alignment_power = 2; > sec->flags = SEC_HAS_CONTENTS | SEC_ALLOC | SEC_DATA | SEC_LOAD; > > sec->target_index = unused_section_number; > > in->n_scnum = unused_section_number; > } > in->n_sclass = C_STAT; > #endif > } > #endif > > #ifdef coff_swap_sym_in_hook > /* This won't work in peigen.c, but since it's for PPC PE, it's not > worth fixing. */ > coff_swap_sym_in_hook (abfd, ext1, in1); > #endif > } > > unsigned int > _bfd_XXi_swap_sym_out (abfd, inp, extp) > bfd *abfd; > PTR inp; > PTR extp; > { > struct internal_syment *in = (struct internal_syment *) inp; > SYMENT *ext = (SYMENT *) extp; > if (in->_n._n_name[0] == 0) > { > bfd_h_put_32 (abfd, 0, (bfd_byte *) ext->e.e.e_zeroes); > bfd_h_put_32 (abfd, in->_n._n_n._n_offset, (bfd_byte *) ext->e.e.e_offset); > } > else > { > memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN); > } > > bfd_h_put_32 (abfd, in->n_value, (bfd_byte *) ext->e_value); > bfd_h_put_16 (abfd, in->n_scnum, (bfd_byte *) ext->e_scnum); > if (sizeof (ext->e_type) == 2) > { > bfd_h_put_16 (abfd, in->n_type, (bfd_byte *) ext->e_type); > } > else > { > bfd_h_put_32 (abfd, in->n_type, (bfd_byte *) ext->e_type); > } > bfd_h_put_8 (abfd, in->n_sclass, ext->e_sclass); > bfd_h_put_8 (abfd, in->n_numaux, ext->e_numaux); > > return SYMESZ; > } > > void > _bfd_XXi_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) > bfd *abfd; > PTR ext1; > int type; > int class; > int indx ATTRIBUTE_UNUSED; > int numaux ATTRIBUTE_UNUSED; > PTR in1; > { > AUXENT *ext = (AUXENT *) ext1; > union internal_auxent *in = (union internal_auxent *) in1; > > switch (class) > { > case C_FILE: > if (ext->x_file.x_fname[0] == 0) > { > in->x_file.x_n.x_zeroes = 0; > in->x_file.x_n.x_offset = > bfd_h_get_32 (abfd, (bfd_byte *) ext->x_file.x_n.x_offset); > } > else > { > memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN); > } > return; > > case C_STAT: > case C_LEAFSTAT: > case C_HIDDEN: > if (type == T_NULL) > { > in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext); > in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext); > in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext); > in->x_scn.x_checksum = > bfd_h_get_32 (abfd, (bfd_byte *) ext->x_scn.x_checksum); > in->x_scn.x_associated = > bfd_h_get_16 (abfd, (bfd_byte *) ext->x_scn.x_associated); > in->x_scn.x_comdat = > bfd_h_get_8 (abfd, (bfd_byte *) ext->x_scn.x_comdat); > return; > } > break; > } > > in->x_sym.x_tagndx.l = bfd_h_get_32 (abfd, (bfd_byte *) ext->x_sym.x_tagndx); > in->x_sym.x_tvndx = bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_tvndx); > > if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) > { > in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext); > in->x_sym.x_fcnary.x_fcn.x_endndx.l = GET_FCN_ENDNDX (abfd, ext); > } > else > { > in->x_sym.x_fcnary.x_ary.x_dimen[0] = > bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[0]); > in->x_sym.x_fcnary.x_ary.x_dimen[1] = > bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[1]); > in->x_sym.x_fcnary.x_ary.x_dimen[2] = > bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[2]); > in->x_sym.x_fcnary.x_ary.x_dimen[3] = > bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[3]); > } > > if (ISFCN (type)) > { > in->x_sym.x_misc.x_fsize = > bfd_h_get_32 (abfd, (bfd_byte *) ext->x_sym.x_misc.x_fsize); > } > else > { > 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); > } > } > > unsigned int > _bfd_XXi_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) > bfd *abfd; > PTR inp; > int type; > int class; > int indx ATTRIBUTE_UNUSED; > int numaux ATTRIBUTE_UNUSED; > PTR extp; > { > union internal_auxent *in = (union internal_auxent *) inp; > AUXENT *ext = (AUXENT *) extp; > > memset ((PTR) ext, 0, AUXESZ); > switch (class) > { > case C_FILE: > if (in->x_file.x_fname[0] == 0) > { > bfd_h_put_32 (abfd, 0, (bfd_byte *) ext->x_file.x_n.x_zeroes); > bfd_h_put_32 (abfd, > in->x_file.x_n.x_offset, > (bfd_byte *) ext->x_file.x_n.x_offset); > } > else > { > memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN); > } > return AUXESZ; > > case C_STAT: > case C_LEAFSTAT: > case C_HIDDEN: > if (type == T_NULL) > { > 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); > bfd_h_put_32 (abfd, in->x_scn.x_checksum, > (bfd_byte *) ext->x_scn.x_checksum); > bfd_h_put_16 (abfd, in->x_scn.x_associated, > (bfd_byte *) ext->x_scn.x_associated); > bfd_h_put_8 (abfd, in->x_scn.x_comdat, > (bfd_byte *) ext->x_scn.x_comdat); > return AUXESZ; > } > break; > } > > bfd_h_put_32 (abfd, in->x_sym.x_tagndx.l, (bfd_byte *) ext->x_sym.x_tagndx); > bfd_h_put_16 (abfd, in->x_sym.x_tvndx, (bfd_byte *) ext->x_sym.x_tvndx); > > if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) > { > PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext); > PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext); > } > else > { > bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0], > (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[0]); > bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1], > (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[1]); > bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2], > (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[2]); > bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3], > (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[3]); > } > > if (ISFCN (type)) > bfd_h_put_32 (abfd, in->x_sym.x_misc.x_fsize, > (bfd_byte *) ext->x_sym.x_misc.x_fsize); > else > { > PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext); > PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext); > } > > return AUXESZ; > } > > void > _bfd_XXi_swap_lineno_in (abfd, ext1, in1) > bfd *abfd; > PTR ext1; > PTR in1; > { > LINENO *ext = (LINENO *) ext1; > struct internal_lineno *in = (struct internal_lineno *) in1; > > in->l_addr.l_symndx = bfd_h_get_32 (abfd, (bfd_byte *) ext->l_addr.l_symndx); > in->l_lnno = GET_LINENO_LNNO (abfd, ext); > } > > unsigned int > _bfd_XXi_swap_lineno_out (abfd, inp, outp) > bfd *abfd; > PTR inp; > PTR outp; > { > struct internal_lineno *in = (struct internal_lineno *) inp; > struct external_lineno *ext = (struct external_lineno *) outp; > bfd_h_put_32 (abfd, in->l_addr.l_symndx, (bfd_byte *) > ext->l_addr.l_symndx); > > PUT_LINENO_LNNO (abfd, in->l_lnno, ext); > return LINESZ; > } > > void > _bfd_XXi_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1) > bfd *abfd; > PTR aouthdr_ext1; > PTR aouthdr_int1; > { > struct internal_extra_pe_aouthdr *a; > PEAOUTHDR *src = (PEAOUTHDR *) (aouthdr_ext1); > AOUTHDR *aouthdr_ext = (AOUTHDR *) aouthdr_ext1; > struct internal_aouthdr *aouthdr_int = (struct internal_aouthdr *)aouthdr_int1; > > aouthdr_int->magic = bfd_h_get_16 (abfd, (bfd_byte *) aouthdr_ext->magic); > aouthdr_int->vstamp = bfd_h_get_16 (abfd, (bfd_byte *) aouthdr_ext->vstamp); > aouthdr_int->tsize = > GET_AOUTHDR_TSIZE (abfd, (bfd_byte *) aouthdr_ext->tsize); > aouthdr_int->dsize = > GET_AOUTHDR_DSIZE (abfd, (bfd_byte *) aouthdr_ext->dsize); > aouthdr_int->bsize = > GET_AOUTHDR_BSIZE (abfd, (bfd_byte *) aouthdr_ext->bsize); > aouthdr_int->entry = > GET_AOUTHDR_ENTRY (abfd, (bfd_byte *) aouthdr_ext->entry); > aouthdr_int->text_start = > GET_AOUTHDR_TEXT_START (abfd, (bfd_byte *) aouthdr_ext->text_start); > #ifndef COFF_WITH_pep > /* PE32+ does not have data_start member! */ > aouthdr_int->data_start = > GET_AOUTHDR_DATA_START (abfd, (bfd_byte *) aouthdr_ext->data_start); > #endif > > a = &aouthdr_int->pe; > a->ImageBase = GET_OPTHDR_IMAGE_BASE (abfd, (bfd_byte *) src->ImageBase); > a->SectionAlignment = bfd_h_get_32 (abfd, (bfd_byte *) src->SectionAlignment); > a->FileAlignment = bfd_h_get_32 (abfd, (bfd_byte *) src->FileAlignment); > a->MajorOperatingSystemVersion = > bfd_h_get_16 (abfd, (bfd_byte *) src->MajorOperatingSystemVersion); > a->MinorOperatingSystemVersion = > bfd_h_get_16 (abfd, (bfd_byte *) src->MinorOperatingSystemVersion); > a->MajorImageVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MajorImageVersion); > a->MinorImageVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MinorImageVersion); > a->MajorSubsystemVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MajorSubsystemVersion); > a->MinorSubsystemVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MinorSubsystemVersion); > a->Reserved1 = bfd_h_get_32 (abfd, (bfd_byte *) src->Reserved1); > a->SizeOfImage = bfd_h_get_32 (abfd, (bfd_byte *) src->SizeOfImage); > a->SizeOfHeaders = bfd_h_get_32 (abfd, (bfd_byte *) src->SizeOfHeaders); > a->CheckSum = bfd_h_get_32 (abfd, (bfd_byte *) src->CheckSum); > a->Subsystem = bfd_h_get_16 (abfd, (bfd_byte *) src->Subsystem); > a->DllCharacteristics = bfd_h_get_16 (abfd, (bfd_byte *) src->DllCharacteristics); > a->SizeOfStackReserve = GET_OPTHDR_SIZE_OF_STACK_RESERVE (abfd, (bfd_byte *) src->SizeOfStackReserve); > a->SizeOfStackCommit = GET_OPTHDR_SIZE_OF_STACK_COMMIT (abfd, (bfd_byte *) src->SizeOfStackCommit); > a->SizeOfHeapReserve = GET_OPTHDR_SIZE_OF_HEAP_RESERVE (abfd, (bfd_byte *) src->SizeOfHeapReserve); > a->SizeOfHeapCommit = GET_OPTHDR_SIZE_OF_HEAP_COMMIT (abfd, (bfd_byte *) src->SizeOfHeapCommit); > a->LoaderFlags = bfd_h_get_32 (abfd, (bfd_byte *) src->LoaderFlags); > a->NumberOfRvaAndSizes = bfd_h_get_32 (abfd, (bfd_byte *) src->NumberOfRvaAndSizes); > > { > int idx; > for (idx = 0; idx < 16; idx++) > { > /* If data directory is empty, rva also should be 0. */ > int size = > bfd_h_get_32 (abfd, (bfd_byte *) src->DataDirectory[idx][1]); > a->DataDirectory[idx].Size = size; > > if (size) > { > a->DataDirectory[idx].VirtualAddress = > bfd_h_get_32 (abfd, (bfd_byte *) src->DataDirectory[idx][0]); > } > else > a->DataDirectory[idx].VirtualAddress = 0; > } > } > > if (aouthdr_int->entry) > { > aouthdr_int->entry += a->ImageBase; > #ifndef COFF_WITH_pep > aouthdr_int->entry &= 0xffffffff; > #endif > } > if (aouthdr_int->tsize) > { > aouthdr_int->text_start += a->ImageBase; > #ifndef COFF_WITH_pep > aouthdr_int->text_start &= 0xffffffff; > #endif > } > #ifndef COFF_WITH_pep > /* PE32+ does not have data_start member! */ > if (aouthdr_int->dsize) > { > aouthdr_int->data_start += a->ImageBase; > aouthdr_int->data_start &= 0xffffffff; > } > #endif > > #ifdef POWERPC_LE_PE > /* These three fields are normally set up by ppc_relocate_section. > In the case of reading a file in, we can pick them up from the > DataDirectory. */ > first_thunk_address = a->DataDirectory[12].VirtualAddress; > thunk_size = a->DataDirectory[12].Size; > import_table_size = a->DataDirectory[1].Size; > #endif > > } > > /* A support function for below. */ > > static void > add_data_entry (abfd, aout, idx, name, base) > bfd *abfd; > struct internal_extra_pe_aouthdr *aout; > int idx; > char *name; > bfd_vma base; > { > asection *sec = bfd_get_section_by_name (abfd, name); > > /* add import directory information if it exists */ > if ((sec != NULL) > && (coff_section_data (abfd, sec) != NULL) > && (pei_section_data (abfd, sec) != NULL)) > { > /* If data directory is empty, rva also should be 0 */ > int size = pei_section_data (abfd, sec)->virt_size; > aout->DataDirectory[idx].Size = size; > > if (size) > { > aout->DataDirectory[idx].VirtualAddress = > (sec->vma - base) & 0xffffffff; > sec->flags |= SEC_DATA; > } > } > } > > unsigned int > _bfd_XXi_swap_aouthdr_out (abfd, in, out) > bfd *abfd; > PTR in; > PTR out; > { > struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in; > pe_data_type *pe = pe_data (abfd); > struct internal_extra_pe_aouthdr *extra = &pe->pe_opthdr; > PEAOUTHDR *aouthdr_out = (PEAOUTHDR *) out; > bfd_vma sa, fa, ib; > > if (pe->force_minimum_alignment) > { > if (!extra->FileAlignment) > extra->FileAlignment = PE_DEF_FILE_ALIGNMENT; > if (!extra->SectionAlignment) > extra->SectionAlignment = PE_DEF_SECTION_ALIGNMENT; > } > > if (extra->Subsystem == IMAGE_SUBSYSTEM_UNKNOWN) > extra->Subsystem = pe->target_subsystem; > > sa = extra->SectionAlignment; > fa = extra->FileAlignment; > ib = extra->ImageBase; > > if (aouthdr_in->tsize) > { > aouthdr_in->text_start -= ib; > #ifndef COFF_WITH_pep > aouthdr_in->text_start &= 0xffffffff; > #endif > } > if (aouthdr_in->dsize) > { > aouthdr_in->data_start -= ib; > #ifndef COFF_WITH_pep > aouthdr_in->data_start &= 0xffffffff; > #endif > } > if (aouthdr_in->entry) > { > aouthdr_in->entry -= ib; > #ifndef COFF_WITH_pep > aouthdr_in->entry &= 0xffffffff; > #endif > } > > #define FA(x) (((x) + fa -1 ) & (- fa)) > #define SA(x) (((x) + sa -1 ) & (- sa)) > > /* We like to have the sizes aligned. */ > > aouthdr_in->bsize = FA (aouthdr_in->bsize); > > extra->NumberOfRvaAndSizes = IMAGE_NUMBEROF_DIRECTORY_ENTRIES; > > /* first null out all data directory entries .. */ > memset (extra->DataDirectory, sizeof (extra->DataDirectory), 0); > > add_data_entry (abfd, extra, 0, ".edata", ib); > > /* Don't call add_data_entry for .idata$2 or .idata$5. It's done in > bfd_coff_final_link where all the required information is > available. */ > > /* However, until other .idata fixes are made (pending patch), the > entry for .idata is needed for backwards compatability. FIXME. */ > add_data_entry (abfd, extra, 1, ".idata", ib); > > add_data_entry (abfd, extra, 2, ".rsrc", ib); > > add_data_entry (abfd, extra, 3, ".pdata", ib); > > /* For some reason, the virtual size (which is what's set by > add_data_entry) for .reloc is not the same as the size recorded > in this slot by MSVC; it doesn't seem to cause problems (so far), > but since it's the best we've got, use it. It does do the right > thing for .pdata. */ > if (pe->has_reloc_section) > add_data_entry (abfd, extra, 5, ".reloc", ib); > > { > asection *sec; > bfd_vma dsize = 0; > bfd_vma isize = SA(abfd->sections->filepos); > bfd_vma tsize = 0; > > for (sec = abfd->sections; sec; sec = sec->next) > { > int rounded = FA(sec->_raw_size); > > if (sec->flags & SEC_DATA) > dsize += rounded; > if (sec->flags & SEC_CODE) > tsize += rounded; > /* The image size is the total VIRTUAL size (which is what is > in the virt_size field). Files have been seen (from MSVC > 5.0 link.exe) where the file size of the .data segment is > quite small compared to the virtual size. Without this > fix, strip munges the file. */ > isize += SA (FA (pei_section_data (abfd, sec)->virt_size)); > } > > aouthdr_in->dsize = dsize; > aouthdr_in->tsize = tsize; > extra->SizeOfImage = isize; > } > > extra->SizeOfHeaders = abfd->sections->filepos; > bfd_h_put_16 (abfd, aouthdr_in->magic, (bfd_byte *) aouthdr_out->standard.magic); > > #define LINKER_VERSION 256 /* That is, 2.56 */ > > /* This piece of magic sets the "linker version" field to > LINKER_VERSION. */ > bfd_h_put_16 (abfd, > LINKER_VERSION / 100 + (LINKER_VERSION % 100) * 256, > (bfd_byte *) aouthdr_out->standard.vstamp); > > PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, (bfd_byte *) aouthdr_out->standard.tsize); > PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, (bfd_byte *) aouthdr_out->standard.dsize); > PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, (bfd_byte *) aouthdr_out->standard.bsize); > PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, (bfd_byte *) aouthdr_out->standard.entry); > PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start, > (bfd_byte *) aouthdr_out->standard.text_start); > > #ifndef COFF_WITH_pep > /* PE32+ does not have data_start member! */ > PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start, > (bfd_byte *) aouthdr_out->standard.data_start); > #endif > > PUT_OPTHDR_IMAGE_BASE (abfd, extra->ImageBase, > (bfd_byte *) aouthdr_out->ImageBase); > bfd_h_put_32 (abfd, extra->SectionAlignment, > (bfd_byte *) aouthdr_out->SectionAlignment); > bfd_h_put_32 (abfd, extra->FileAlignment, > (bfd_byte *) aouthdr_out->FileAlignment); > bfd_h_put_16 (abfd, extra->MajorOperatingSystemVersion, > (bfd_byte *) aouthdr_out->MajorOperatingSystemVersion); > bfd_h_put_16 (abfd, extra->MinorOperatingSystemVersion, > (bfd_byte *) aouthdr_out->MinorOperatingSystemVersion); > bfd_h_put_16 (abfd, extra->MajorImageVersion, > (bfd_byte *) aouthdr_out->MajorImageVersion); > bfd_h_put_16 (abfd, extra->MinorImageVersion, > (bfd_byte *) aouthdr_out->MinorImageVersion); > bfd_h_put_16 (abfd, extra->MajorSubsystemVersion, > (bfd_byte *) aouthdr_out->MajorSubsystemVersion); > bfd_h_put_16 (abfd, extra->MinorSubsystemVersion, > (bfd_byte *) aouthdr_out->MinorSubsystemVersion); > bfd_h_put_32 (abfd, extra->Reserved1, > (bfd_byte *) aouthdr_out->Reserved1); > bfd_h_put_32 (abfd, extra->SizeOfImage, > (bfd_byte *) aouthdr_out->SizeOfImage); > bfd_h_put_32 (abfd, extra->SizeOfHeaders, > (bfd_byte *) aouthdr_out->SizeOfHeaders); > bfd_h_put_32 (abfd, extra->CheckSum, > (bfd_byte *) aouthdr_out->CheckSum); > bfd_h_put_16 (abfd, extra->Subsystem, > (bfd_byte *) aouthdr_out->Subsystem); > bfd_h_put_16 (abfd, extra->DllCharacteristics, > (bfd_byte *) aouthdr_out->DllCharacteristics); > PUT_OPTHDR_SIZE_OF_STACK_RESERVE (abfd, extra->SizeOfStackReserve, > (bfd_byte *) aouthdr_out->SizeOfStackReserve); > PUT_OPTHDR_SIZE_OF_STACK_COMMIT (abfd, extra->SizeOfStackCommit, > (bfd_byte *) aouthdr_out->SizeOfStackCommit); > PUT_OPTHDR_SIZE_OF_HEAP_RESERVE (abfd, extra->SizeOfHeapReserve, > (bfd_byte *) aouthdr_out->SizeOfHeapReserve); > PUT_OPTHDR_SIZE_OF_HEAP_COMMIT (abfd, extra->SizeOfHeapCommit, > (bfd_byte *) aouthdr_out->SizeOfHeapCommit); > bfd_h_put_32 (abfd, extra->LoaderFlags, > (bfd_byte *) aouthdr_out->LoaderFlags); > bfd_h_put_32 (abfd, extra->NumberOfRvaAndSizes, > (bfd_byte *) aouthdr_out->NumberOfRvaAndSizes); > { > int idx; > for (idx = 0; idx < 16; idx++) > { > bfd_h_put_32 (abfd, extra->DataDirectory[idx].VirtualAddress, > (bfd_byte *) aouthdr_out->DataDirectory[idx][0]); > bfd_h_put_32 (abfd, extra->DataDirectory[idx].Size, > (bfd_byte *) aouthdr_out->DataDirectory[idx][1]); > } > } > > return AOUTSZ; > } > > unsigned int > _bfd_XXi_only_swap_filehdr_out (abfd, in, out) > bfd *abfd; > PTR in; > PTR out; > { > int idx; > struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; > struct external_PEI_filehdr *filehdr_out = (struct external_PEI_filehdr *) out; > > if (pe_data (abfd)->has_reloc_section) > filehdr_in->f_flags &= ~F_RELFLG; > > if (pe_data (abfd)->dll) > filehdr_in->f_flags |= F_DLL; > > filehdr_in->pe.e_magic = DOSMAGIC; > filehdr_in->pe.e_cblp = 0x90; > filehdr_in->pe.e_cp = 0x3; > filehdr_in->pe.e_crlc = 0x0; > filehdr_in->pe.e_cparhdr = 0x4; > filehdr_in->pe.e_minalloc = 0x0; > filehdr_in->pe.e_maxalloc = 0xffff; > filehdr_in->pe.e_ss = 0x0; > filehdr_in->pe.e_sp = 0xb8; > filehdr_in->pe.e_csum = 0x0; > filehdr_in->pe.e_ip = 0x0; > filehdr_in->pe.e_cs = 0x0; > filehdr_in->pe.e_lfarlc = 0x40; > filehdr_in->pe.e_ovno = 0x0; > > for (idx = 0; idx < 4; idx++) > filehdr_in->pe.e_res[idx] = 0x0; > > filehdr_in->pe.e_oemid = 0x0; > filehdr_in->pe.e_oeminfo = 0x0; > > for (idx = 0; idx < 10; idx++) > filehdr_in->pe.e_res2[idx] = 0x0; > > filehdr_in->pe.e_lfanew = 0x80; > > /* This next collection of data are mostly just characters. It > appears to be constant within the headers put on NT exes. */ > filehdr_in->pe.dos_message[0] = 0x0eba1f0e; > filehdr_in->pe.dos_message[1] = 0xcd09b400; > filehdr_in->pe.dos_message[2] = 0x4c01b821; > filehdr_in->pe.dos_message[3] = 0x685421cd; > filehdr_in->pe.dos_message[4] = 0x70207369; > filehdr_in->pe.dos_message[5] = 0x72676f72; > filehdr_in->pe.dos_message[6] = 0x63206d61; > filehdr_in->pe.dos_message[7] = 0x6f6e6e61; > filehdr_in->pe.dos_message[8] = 0x65622074; > filehdr_in->pe.dos_message[9] = 0x6e757220; > filehdr_in->pe.dos_message[10] = 0x206e6920; > filehdr_in->pe.dos_message[11] = 0x20534f44; > filehdr_in->pe.dos_message[12] = 0x65646f6d; > filehdr_in->pe.dos_message[13] = 0x0a0d0d2e; > filehdr_in->pe.dos_message[14] = 0x24; > filehdr_in->pe.dos_message[15] = 0x0; > filehdr_in->pe.nt_signature = NT_SIGNATURE; > > 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, time (0), (bfd_byte *) filehdr_out->f_timdat); > PUT_FILEHDR_SYMPTR (abfd, (bfd_vma) filehdr_in->f_symptr, > (bfd_byte *) filehdr_out->f_symptr); > bfd_h_put_32 (abfd, filehdr_in->f_nsyms, (bfd_byte *) filehdr_out->f_nsyms); > 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); > > /* put in extra dos header stuff. This data remains essentially > constant, it just has to be tacked on to the beginning of all exes > for NT */ > bfd_h_put_16 (abfd, filehdr_in->pe.e_magic, (bfd_byte *) filehdr_out->e_magic); > bfd_h_put_16 (abfd, filehdr_in->pe.e_cblp, (bfd_byte *) filehdr_out->e_cblp); > bfd_h_put_16 (abfd, filehdr_in->pe.e_cp, (bfd_byte *) filehdr_out->e_cp); > bfd_h_put_16 (abfd, filehdr_in->pe.e_crlc, (bfd_byte *) filehdr_out->e_crlc); > bfd_h_put_16 (abfd, filehdr_in->pe.e_cparhdr, > (bfd_byte *) filehdr_out->e_cparhdr); > bfd_h_put_16 (abfd, filehdr_in->pe.e_minalloc, > (bfd_byte *) filehdr_out->e_minalloc); > bfd_h_put_16 (abfd, filehdr_in->pe.e_maxalloc, > (bfd_byte *) filehdr_out->e_maxalloc); > bfd_h_put_16 (abfd, filehdr_in->pe.e_ss, (bfd_byte *) filehdr_out->e_ss); > bfd_h_put_16 (abfd, filehdr_in->pe.e_sp, (bfd_byte *) filehdr_out->e_sp); > bfd_h_put_16 (abfd, filehdr_in->pe.e_csum, (bfd_byte *) filehdr_out->e_csum); > bfd_h_put_16 (abfd, filehdr_in->pe.e_ip, (bfd_byte *) filehdr_out->e_ip); > bfd_h_put_16 (abfd, filehdr_in->pe.e_cs, (bfd_byte *) filehdr_out->e_cs); > bfd_h_put_16 (abfd, filehdr_in->pe.e_lfarlc, (bfd_byte *) filehdr_out->e_lfarlc); > bfd_h_put_16 (abfd, filehdr_in->pe.e_ovno, (bfd_byte *) filehdr_out->e_ovno); > { > int idx; > for (idx = 0; idx < 4; idx++) > bfd_h_put_16 (abfd, filehdr_in->pe.e_res[idx], > (bfd_byte *) filehdr_out->e_res[idx]); > } > bfd_h_put_16 (abfd, filehdr_in->pe.e_oemid, (bfd_byte *) filehdr_out->e_oemid); > bfd_h_put_16 (abfd, filehdr_in->pe.e_oeminfo, > (bfd_byte *) filehdr_out->e_oeminfo); > { > int idx; > for (idx = 0; idx < 10; idx++) > bfd_h_put_16 (abfd, filehdr_in->pe.e_res2[idx], > (bfd_byte *) filehdr_out->e_res2[idx]); > } > bfd_h_put_32 (abfd, filehdr_in->pe.e_lfanew, (bfd_byte *) filehdr_out->e_lfanew); > > { > int idx; > for (idx = 0; idx < 16; idx++) > bfd_h_put_32 (abfd, filehdr_in->pe.dos_message[idx], > (bfd_byte *) filehdr_out->dos_message[idx]); > } > > /* Also put in the NT signature. */ > bfd_h_put_32 (abfd, filehdr_in->pe.nt_signature, > (bfd_byte *) filehdr_out->nt_signature); > > return FILHSZ; > } > > unsigned int > _bfd_XX_only_swap_filehdr_out (abfd, in, out) > bfd *abfd; > PTR in; > PTR out; > { > struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; > FILHDR *filehdr_out = (FILHDR *) out; > > 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); > PUT_FILEHDR_SYMPTR (abfd, (bfd_vma) filehdr_in->f_symptr, > (bfd_byte *) filehdr_out->f_symptr); > bfd_h_put_32 (abfd, filehdr_in->f_nsyms, (bfd_byte *) filehdr_out->f_nsyms); > 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); > > return FILHSZ; > } > > unsigned int > _bfd_XXi_swap_scnhdr_out (abfd, in, out) > bfd *abfd; > PTR in; > PTR out; > { > struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; > SCNHDR *scnhdr_ext = (SCNHDR *) out; > unsigned int ret = SCNHSZ; > bfd_vma ps; > bfd_vma ss; > > memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); > > PUT_SCNHDR_VADDR (abfd, > ((scnhdr_int->s_vaddr > - pe_data (abfd)->pe_opthdr.ImageBase) > & 0xffffffff), > (bfd_byte *) scnhdr_ext->s_vaddr); > > /* NT wants the size data to be rounded up to the next > NT_FILE_ALIGNMENT, but zero if it has no content (as in .bss, > sometimes). */ > > if ((scnhdr_int->s_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) != 0) > { > ps = scnhdr_int->s_size; > ss = 0; > } > else > { > ps = scnhdr_int->s_paddr; > ss = scnhdr_int->s_size; > } > > PUT_SCNHDR_SIZE (abfd, ss, > (bfd_byte *) scnhdr_ext->s_size); > > /* s_paddr in PE is really the virtual size. */ > PUT_SCNHDR_PADDR (abfd, ps, (bfd_byte *) scnhdr_ext->s_paddr); > > PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, > (bfd_byte *) scnhdr_ext->s_scnptr); > PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, > (bfd_byte *) scnhdr_ext->s_relptr); > PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, > (bfd_byte *) scnhdr_ext->s_lnnoptr); > > /* Extra flags must be set when dealing with NT. All sections should also > have the IMAGE_SCN_MEM_READ (0x40000000) flag set. In addition, the > .text section must have IMAGE_SCN_MEM_EXECUTE (0x20000000) and the data > sections (.idata, .data, .bss, .CRT) must have IMAGE_SCN_MEM_WRITE set > (this is especially important when dealing with the .idata section since > the addresses for routines from .dlls must be overwritten). If .reloc > section data is ever generated, we must add IMAGE_SCN_MEM_DISCARDABLE > (0x02000000). Also, the resource data should also be read and > writable. */ > > /* FIXME: alignment is also encoded in this field, at least on ppc (krk) */ > /* FIXME: even worse, I don't see how to get the original alignment field*/ > /* back... */ > > { > int flags = scnhdr_int->s_flags; > bfd_h_put_32 (abfd, flags, (bfd_byte *) scnhdr_ext->s_flags); > } > > if (coff_data (abfd)->link_info > && ! coff_data (abfd)->link_info->relocateable > && ! coff_data (abfd)->link_info->shared > && strcmp (scnhdr_int->s_name, ".text") == 0) > { > /* By inference from looking at MS output, the 32 bit field > which is the combintion of the number_of_relocs and > number_of_linenos is used for the line number count in > executables. A 16-bit field won't do for cc1. The MS > document says that the number of relocs is zero for > executables, but the 17-th bit has been observed to be there. > Overflow is not an issue: a 4G-line program will overflow a > bunch of other fields long before this! */ > bfd_h_put_16 (abfd, scnhdr_int->s_nlnno & 0xffff, > (bfd_byte *) scnhdr_ext->s_nlnno); > bfd_h_put_16 (abfd, scnhdr_int->s_nlnno >> 16, > (bfd_byte *) scnhdr_ext->s_nreloc); > } > else > { > if (scnhdr_int->s_nlnno <= 0xffff) > bfd_h_put_16 (abfd, scnhdr_int->s_nlnno, > (bfd_byte *) scnhdr_ext->s_nlnno); > else > { > (*_bfd_error_handler) (_("%s: line number overflow: 0x%lx > 0xffff"), > bfd_get_filename (abfd), > scnhdr_int->s_nlnno); > bfd_set_error (bfd_error_file_truncated); > bfd_h_put_16 (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nlnno); > ret = 0; > } > if (scnhdr_int->s_nreloc <= 0xffff) > bfd_h_put_16 (abfd, scnhdr_int->s_nreloc, > (bfd_byte *) scnhdr_ext->s_nreloc); > else > { > /* PE can deal with large #s of relocs, but not here */ > bfd_h_put_16 (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nreloc); > scnhdr_int->s_flags |= IMAGE_SCN_LNK_NRELOC_OVFL; > bfd_h_put_32 (abfd, scnhdr_int->s_flags, > (bfd_byte *) scnhdr_ext->s_flags); > #if 0 > (*_bfd_error_handler) (_("%s: reloc overflow 1: 0x%lx > 0xffff"), > bfd_get_filename (abfd), > scnhdr_int->s_nreloc); > bfd_set_error (bfd_error_file_truncated); > bfd_h_put_16 (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nreloc); > ret = 0; > #endif > } > } > return ret; > } > > static char * dir_names[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] = { > N_("Export Directory [.edata (or where ever we found it)]"), > N_("Import Directory [parts of .idata]"), > N_("Resource Directory [.rsrc]"), > N_("Exception Directory [.pdata]"), > N_("Security Directory"), > N_("Base Relocation Directory [.reloc]"), > N_("Debug Directory"), > N_("Description Directory"), > N_("Special Directory"), > N_("Thread Storage Directory [.tls]"), > N_("Load Configuration Directory"), > N_("Bound Import Directory"), > N_("Import Address Table Directory"), > N_("Delay Import Directory"), > N_("Reserved"), > N_("Reserved") > }; > > /**********************************************************************/ > #ifdef POWERPC_LE_PE > /* The code for the PPC really falls in the "architecture dependent" > category. However, it's not clear that anyone will ever care, so > we're ignoring the issue for now; if/when PPC matters, some of this > may need to go into peicode.h, or arguments passed to enable the > PPC- specific code. */ > #endif > > /**********************************************************************/ > static boolean > pe_print_idata (abfd, vfile) > bfd *abfd; > PTR vfile; > { > FILE *file = (FILE *) vfile; > bfd_byte *data; > asection *section; > bfd_signed_vma adj; > > #ifdef POWERPC_LE_PE > asection *rel_section = bfd_get_section_by_name (abfd, ".reldata"); > #endif > > bfd_size_type datasize = 0; > bfd_size_type dataoff; > bfd_size_type i; > int onaline = 20; > > pe_data_type *pe = pe_data (abfd); > struct internal_extra_pe_aouthdr *extra = &pe->pe_opthdr; > > bfd_vma addr; > > addr = extra->DataDirectory[1].VirtualAddress; > > if (addr == 0 && extra->DataDirectory[1].Size == 0) > { > /* Maybe the extra header isn't there. Look for the section. */ > section = bfd_get_section_by_name (abfd, ".idata"); > if (section == NULL) > return true; > > addr = section->vma; > datasize = bfd_section_size (abfd, section); > if (datasize == 0) > return true; > } > else > { > addr += extra->ImageBase; > for (section = abfd->sections; section != NULL; section = section->next) > { > datasize = bfd_section_size (abfd, section); > if (addr >= section->vma && addr < section->vma + datasize) > break; > } > > if (section == NULL) > { > fprintf (file, > _("\nThere is an import table, but the section containing it could not be found\n")); > return true; > } > } > > fprintf (file, _("\nThere is an import table in %s at 0x%lx\n"), > section->name, (unsigned long) addr); > > dataoff = addr - section->vma; > datasize -= dataoff; > > #ifdef POWERPC_LE_PE > if (rel_section != 0 && bfd_section_size (abfd, rel_section) != 0) > { > /* The toc address can be found by taking the starting address, > which on the PPC locates a function descriptor. The > descriptor consists of the function code starting address > followed by the address of the toc. The starting address we > get from the bfd, and the descriptor is supposed to be in the > .reldata section. */ > > bfd_vma loadable_toc_address; > bfd_vma toc_address; > bfd_vma start_address; > bfd_byte *data = 0; > int offset; > > data = (bfd_byte *) bfd_malloc ((size_t) bfd_section_size (abfd, > rel_section)); > if (data == NULL && bfd_section_size (abfd, rel_section) != 0) > return false; > > bfd_get_section_contents (abfd, > rel_section, > (PTR) data, 0, > bfd_section_size (abfd, rel_section)); > > offset = abfd->start_address - rel_section->vma; > > start_address = bfd_get_32 (abfd, data + offset); > loadable_toc_address = bfd_get_32 (abfd, data + offset + 4); > toc_address = loadable_toc_address - 32768; > > fprintf (file, > _("\nFunction descriptor located at the start address: %04lx\n"), > (unsigned long int) (abfd->start_address)); > fprintf (file, > _("\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"), > start_address, loadable_toc_address, toc_address); > } > else > { > fprintf (file, > _("\nNo reldata section! Function descriptor not decoded.\n")); > } > #endif > > fprintf (file, > _("\nThe Import Tables (interpreted %s section contents)\n"), > section->name); > fprintf (file, > _(" vma: Hint Time Forward DLL First\n")); > fprintf (file, > _(" Table Stamp Chain Name Thunk\n")); > > data = (bfd_byte *) bfd_malloc (dataoff + datasize); > if (data == NULL) > return false; > > /* Read the whole section. Some of the fields might be before dataoff. */ > if (! bfd_get_section_contents (abfd, section, (PTR) data, > 0, dataoff + datasize)) > return false; > > adj = section->vma - extra->ImageBase; > > for (i = 0; i < datasize; i += onaline) > { > bfd_vma hint_addr; > bfd_vma time_stamp; > bfd_vma forward_chain; > bfd_vma dll_name; > bfd_vma first_thunk; > int idx = 0; > bfd_size_type j; > char *dll; > > /* print (i + extra->DataDirectory[1].VirtualAddress) */ > fprintf (file, " %08lx\t", (unsigned long) (i + adj + dataoff)); > > if (i + 20 > datasize) > { > /* Check stuff. */ > ; > } > > hint_addr = bfd_get_32 (abfd, data + i + dataoff); > time_stamp = bfd_get_32 (abfd, data + i + 4 + dataoff); > forward_chain = bfd_get_32 (abfd, data + i + 8 + dataoff); > dll_name = bfd_get_32 (abfd, data + i + 12 + dataoff); > first_thunk = bfd_get_32 (abfd, data + i + 16 + dataoff); > > fprintf (file, "%08lx %08lx %08lx %08lx %08lx\n", > (unsigned long) hint_addr, > (unsigned long) time_stamp, > (unsigned long) forward_chain, > (unsigned long) dll_name, > (unsigned long) first_thunk); > > if (hint_addr == 0 && first_thunk == 0) > break; > > dll = (char *) data + dll_name - adj; > fprintf (file, _("\n\tDLL Name: %s\n"), dll); > > if (hint_addr != 0) > { > fprintf (file, _("\tvma: Hint/Ord Member-Name\n")); > > idx = hint_addr - adj; > > for (j = 0; j < datasize; j += 4) > { > unsigned long member = bfd_get_32 (abfd, data + idx + j); > > if (member == 0) > break; > if (member & 0x80000000) > fprintf (file, "\t%04lx\t %4lu", member, > member & 0x7fffffff); > else > { > int ordinal; > char *member_name; > > ordinal = bfd_get_16 (abfd, data + member - adj); > member_name = (char *) data + member - adj + 2; > fprintf (file, "\t%04lx\t %4d %s", > member, ordinal, member_name); > } > > /* If the time stamp is not zero, the import address > table holds actual addresses. */ > if (time_stamp != 0 > && first_thunk != 0 > && first_thunk != hint_addr) > fprintf (file, "\t%04lx", > (long) bfd_get_32 (abfd, data + first_thunk - adj + j)); > > fprintf (file, "\n"); > } > } > > if (hint_addr != first_thunk && time_stamp == 0) > { > int differ = 0; > int idx2; > > idx2 = first_thunk - adj; > > for (j = 0; j < datasize; j += 4) > { > int ordinal; > char *member_name; > bfd_vma hint_member = 0; > bfd_vma iat_member; > > if (hint_addr != 0) > hint_member = bfd_get_32 (abfd, data + idx + j); > iat_member = bfd_get_32 (abfd, data + idx2 + j); > > if (hint_addr == 0 && iat_member == 0) > break; > > if (hint_addr == 0 || hint_member != iat_member) > { > if (differ == 0) > { > fprintf (file, > _("\tThe Import Address Table (difference found)\n")); > fprintf (file, _("\tvma: Hint/Ord Member-Name\n")); > differ = 1; > } > if (iat_member == 0) > { > fprintf (file, > _("\t>>> Ran out of IAT members!\n")); > } > else > { > ordinal = bfd_get_16 (abfd, data + iat_member - adj); > member_name = (char *) data + iat_member - adj + 2; > fprintf (file, "\t%04lx\t %4d %s\n", > (unsigned long) iat_member, > ordinal, > member_name); > } > } > > if (hint_addr != 0 && hint_member == 0) > break; > } > if (differ == 0) > { > fprintf (file, > _("\tThe Import Address Table is identical\n")); > } > } > > fprintf (file, "\n"); > > } > > free (data); > > return true; > } > > static boolean > pe_print_edata (abfd, vfile) > bfd *abfd; > PTR vfile; > { > FILE *file = (FILE *) vfile; > bfd_byte *data; > asection *section; > > bfd_size_type datasize = 0; > bfd_size_type dataoff; > bfd_size_type i; > > bfd_signed_vma adj; > struct EDT_type { > long export_flags; /* reserved - should be zero */ > long time_stamp; > short major_ver; > short minor_ver; > bfd_vma name; /* rva - relative to image base */ > long base; /* ordinal base */ > unsigned long num_functions; /* Number in the export address table */ > unsigned long num_names; /* Number in the name pointer table */ > bfd_vma eat_addr; /* rva to the export address table */ > bfd_vma npt_addr; /* rva to the Export Name Pointer Table */ > bfd_vma ot_addr; /* rva to the Ordinal Table */ > } edt; > > pe_data_type *pe = pe_data (abfd); > struct internal_extra_pe_aouthdr *extra = &pe->pe_opthdr; > > bfd_vma addr; > > addr = extra->DataDirectory[0].VirtualAddress; > > if (addr == 0 && extra->DataDirectory[0].Size == 0) > { > /* Maybe the extra header isn't there. Look for the section. */ > section = bfd_get_section_by_name (abfd, ".edata"); > if (section == NULL) > return true; > > addr = section->vma; > datasize = bfd_section_size (abfd, section); > if (datasize == 0) > return true; > } > else > { > addr += extra->ImageBase; > for (section = abfd->sections; section != NULL; section = section->next) > { > datasize = bfd_section_size (abfd, section); > if (addr >= section->vma && addr < section->vma + datasize) > break; > } > > if (section == NULL) > { > fprintf (file, > _("\nThere is an export table, but the section containing it could not be found\n")); > return true; > } > } > > fprintf (file, _("\nThere is an export table in %s at 0x%lx\n"), > section->name, (unsigned long) addr); > > dataoff = addr - section->vma; > datasize -= dataoff; > > data = (bfd_byte *) bfd_malloc (datasize); > if (data == NULL) > return false; > > if (! bfd_get_section_contents (abfd, section, (PTR) data, dataoff, > datasize)) > return false; > > /* Go get Export Directory Table. */ > edt.export_flags = bfd_get_32 (abfd, data + 0); > edt.time_stamp = bfd_get_32 (abfd, data + 4); > edt.major_ver = bfd_get_16 (abfd, data + 8); > edt.minor_ver = bfd_get_16 (abfd, data + 10); > edt.name = bfd_get_32 (abfd, data + 12); > edt.base = bfd_get_32 (abfd, data + 16); > edt.num_functions = bfd_get_32 (abfd, data + 20); > edt.num_names = bfd_get_32 (abfd, data + 24); > edt.eat_addr = bfd_get_32 (abfd, data + 28); > edt.npt_addr = bfd_get_32 (abfd, data + 32); > edt.ot_addr = bfd_get_32 (abfd, data + 36); > > adj = section->vma - extra->ImageBase + dataoff; > > /* Dump the EDT first first */ > fprintf (file, > _("\nThe Export Tables (interpreted %s section contents)\n\n"), > section->name); > > fprintf (file, > _("Export Flags \t\t\t%lx\n"), (unsigned long) edt.export_flags); > > fprintf (file, > _("Time/Date stamp \t\t%lx\n"), (unsigned long) edt.time_stamp); > > fprintf (file, > _("Major/Minor \t\t\t%d/%d\n"), edt.major_ver, edt.minor_ver); > > fprintf (file, > _("Name \t\t\t\t")); > fprintf_vma (file, edt.name); > fprintf (file, > " %s\n", data + edt.name - adj); > > fprintf (file, > _("Ordinal Base \t\t\t%ld\n"), edt.base); > > fprintf (file, > _("Number in:\n")); > > fprintf (file, > _("\tExport Address Table \t\t%08lx\n"), > edt.num_functions); > > fprintf (file, > _("\t[Name Pointer/Ordinal] Table\t%08lx\n"), edt.num_names); > > fprintf (file, > _("Table Addresses\n")); > > fprintf (file, > _("\tExport Address Table \t\t")); > fprintf_vma (file, edt.eat_addr); > fprintf (file, "\n"); > > fprintf (file, > _("\tName Pointer Table \t\t")); > fprintf_vma (file, edt.npt_addr); > fprintf (file, "\n"); > > fprintf (file, > _("\tOrdinal Table \t\t\t")); > fprintf_vma (file, edt.ot_addr); > fprintf (file, "\n"); > > /* The next table to find is the Export Address Table. It's basically > a list of pointers that either locate a function in this dll, or > forward the call to another dll. Something like: > typedef union { > long export_rva; > long forwarder_rva; > } export_address_table_entry; > */ > > fprintf (file, > _("\nExport Address Table -- Ordinal Base %ld\n"), > edt.base); > > for (i = 0; i < edt.num_functions; ++i) > { > bfd_vma eat_member = bfd_get_32 (abfd, > data + edt.eat_addr + (i * 4) - adj); > if (eat_member == 0) > continue; > > if (eat_member - adj <= datasize) > { > /* This rva is to a name (forwarding function) in our section. */ > /* Should locate a function descriptor. */ > fprintf (file, > "\t[%4ld] +base[%4ld] %04lx %s -- %s\n", > (long) i, > (long) (i + edt.base), > (unsigned long) eat_member, > _("Forwarder RVA"), > data + eat_member - adj); > } > else > { > /* Should locate a function descriptor in the reldata section. */ > fprintf (file, > "\t[%4ld] +base[%4ld] %04lx %s\n", > (long) i, > (long) (i + edt.base), > (unsigned long) eat_member, > _("Export RVA")); > } > } > > /* The Export Name Pointer Table is paired with the Export Ordinal Table. */ > /* Dump them in parallel for clarity. */ > fprintf (file, > _("\n[Ordinal/Name Pointer] Table\n")); > > for (i = 0; i < edt.num_names; ++i) > { > bfd_vma name_ptr = bfd_get_32 (abfd, > data + > edt.npt_addr > + (i*4) - adj); > > char *name = (char *) data + name_ptr - adj; > > bfd_vma ord = bfd_get_16 (abfd, > data + > edt.ot_addr > + (i*2) - adj); > fprintf (file, > "\t[%4ld] %s\n", (long) ord, name); > } > > free (data); > > return true; > } > > /* This really is architecture dependent. On IA-64, a .pdata entry > consists of three dwords containing relative virtual addresses that > specify the start and end address of the code range the entry > covers and the address of the corresponding unwind info data. */ > > static boolean > pe_print_pdata (abfd, vfile) > bfd *abfd; > PTR vfile; > { > #ifdef COFF_WITH_pep > # define PDATA_ROW_SIZE (3*8) > #else > # define PDATA_ROW_SIZE (5*4) > #endif > FILE *file = (FILE *) vfile; > bfd_byte *data = 0; > asection *section = bfd_get_section_by_name (abfd, ".pdata"); > bfd_size_type datasize = 0; > bfd_size_type i; > bfd_size_type start, stop; > int onaline = PDATA_ROW_SIZE; > > if (section == NULL > || coff_section_data (abfd, section) == NULL > || pei_section_data (abfd, section) == NULL) > return true; > > stop = pei_section_data (abfd, section)->virt_size; > if ((stop % onaline) != 0) > fprintf (file, > _("Warning, .pdata section size (%ld) is not a multiple of %d\n"), > (long) stop, onaline); > > fprintf (file, > _("\nThe Function Table (interpreted .pdata section contents)\n")); > #ifdef COFF_WITH_pep > fprintf (file, > _(" vma:\t\t\tBegin Address End Address Unwind Info\n")); > #else > fprintf (file, > _(" vma:\t\tBegin End EH EH PrologEnd Exception\n")); > fprintf (file, > _(" \t\tAddress Address Handler Data Address Mask\n")); > #endif > > if (bfd_section_size (abfd, section) == 0) > return true; > > data = (bfd_byte *) bfd_malloc ((size_t) bfd_section_size (abfd, section)); > datasize = bfd_section_size (abfd, section); > if (data == NULL && datasize != 0) > return false; > > bfd_get_section_contents (abfd, > section, > (PTR) data, 0, > bfd_section_size (abfd, section)); > > start = 0; > > for (i = start; i < stop; i += onaline) > { > bfd_vma begin_addr; > bfd_vma end_addr; > bfd_vma eh_handler; > bfd_vma eh_data; > bfd_vma prolog_end_addr; > int em_data; > > if (i + PDATA_ROW_SIZE > stop) > break; > > begin_addr = GET_PDATA_ENTRY (abfd, data + i ); > end_addr = GET_PDATA_ENTRY (abfd, data + i + 4); > eh_handler = GET_PDATA_ENTRY (abfd, data + i + 8); > eh_data = GET_PDATA_ENTRY (abfd, data + i + 12); > prolog_end_addr = GET_PDATA_ENTRY (abfd, data + i + 16); > > if (begin_addr == 0 && end_addr == 0 && eh_handler == 0 > && eh_data == 0 && prolog_end_addr == 0) > { > /* We are probably into the padding of the section now. */ > break; > } > > em_data = ((eh_handler & 0x1) << 2) | (prolog_end_addr & 0x3); > eh_handler &= ~(bfd_vma) 0x3; > prolog_end_addr &= ~(bfd_vma) 0x3; > > fputc (' ', file); > fprintf_vma (file, i + section->vma); fputc ('\t', file); > fprintf_vma (file, begin_addr); fputc (' ', file); > fprintf_vma (file, end_addr); fputc (' ', file); > fprintf_vma (file, eh_handler); > #ifndef COFF_WITH_pep > fputc (' ', file); > fprintf_vma (file, eh_data); fputc (' ', file); > fprintf_vma (file, prolog_end_addr); > fprintf (file, " %x", em_data); > #endif > > #ifdef POWERPC_LE_PE > if (eh_handler == 0 && eh_data != 0) > { > /* Special bits here, although the meaning may be a little > mysterious. The only one I know for sure is 0x03. */ > /* Code Significance */ > /* 0x00 None */ > /* 0x01 Register Save Millicode */ > /* 0x02 Register Restore Millicode */ > /* 0x03 Glue Code Sequence */ > switch (eh_data) > { > case 0x01: > fprintf (file, _(" Register save millicode")); > break; > case 0x02: > fprintf (file, _(" Register restore millicode")); > break; > case 0x03: > fprintf (file, _(" Glue code sequence")); > break; > default: > break; > } > } > #endif > fprintf (file, "\n"); > } > > free (data); > > return true; > } > > #define IMAGE_REL_BASED_HIGHADJ 4 > static const char * const tbl[] = { > "ABSOLUTE", > "HIGH", > "LOW", > "HIGHLOW", > "HIGHADJ", > "MIPS_JMPADDR", > "SECTION", > "REL32", > "RESERVED1", > "MIPS_JMPADDR16", > "DIR64", > "HIGH3ADJ" > "UNKNOWN", /* MUST be last */ > }; > > static boolean > pe_print_reloc (abfd, vfile) > bfd *abfd; > PTR vfile; > { > FILE *file = (FILE *) vfile; > bfd_byte *data = 0; > asection *section = bfd_get_section_by_name (abfd, ".reloc"); > bfd_size_type datasize = 0; > bfd_size_type i; > bfd_size_type start, stop; > > if (section == NULL) > return true; > > if (bfd_section_size (abfd, section) == 0) > return true; > > fprintf (file, > _("\n\nPE File Base Relocations (interpreted .reloc section contents)\n")); > > data = (bfd_byte *) bfd_malloc ((size_t) bfd_section_size (abfd, section)); > datasize = bfd_section_size (abfd, section); > if (data == NULL && datasize != 0) > return false; > > bfd_get_section_contents (abfd, > section, > (PTR) data, 0, > bfd_section_size (abfd, section)); > > start = 0; > > stop = bfd_section_size (abfd, section); > > for (i = start; i < stop;) > { > int j; > bfd_vma virtual_address; > long number, size; > > /* The .reloc section is a sequence of blocks, with a header consisting > of two 32 bit quantities, followed by a number of 16 bit entries */ > > virtual_address = bfd_get_32 (abfd, data+i); > size = bfd_get_32 (abfd, data+i+4); > number = (size - 8) / 2; > > if (size == 0) > { > break; > } > > fprintf (file, > _("\nVirtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"), > (unsigned long) virtual_address, size, size, number); > > for (j = 0; j < number; ++j) > { > unsigned short e = bfd_get_16 (abfd, data + i + 8 + j * 2); > unsigned int t = (e & 0xF000) >> 12; > int off = e & 0x0FFF; > > if (t >= sizeof (tbl) / sizeof (tbl[0])) > t = (sizeof (tbl) / sizeof (tbl[0])) - 1; > > fprintf (file, > _("\treloc %4d offset %4x [%4lx] %s"), > j, off, (long) (off + virtual_address), tbl[t]); > > /* HIGHADJ takes an argument, - the next record *is* the > low 16 bits of addend. */ > if (t == IMAGE_REL_BASED_HIGHADJ) > { > fprintf (file, " (%4x)", > ((unsigned int) > bfd_get_16 (abfd, data + i + 8 + j * 2 + 2))); > j++; > } > > fprintf (file, "\n"); > } > i += size; > } > > free (data); > > return true; > } > > /* Print out the program headers. */ > > boolean > _bfd_XX_print_private_bfd_data_common (abfd, vfile) > bfd *abfd; > PTR vfile; > { > FILE *file = (FILE *) vfile; > int j; > pe_data_type *pe = pe_data (abfd); > struct internal_extra_pe_aouthdr *i = &pe->pe_opthdr; > const char *subsystem_name = NULL; > > /* The MS dumpbin program reportedly ands with 0xff0f before > printing the characteristics field. Not sure why. No reason to > emulate it here. */ > fprintf (file, _("\nCharacteristics 0x%x\n"), pe->real_flags); > #undef PF > #define PF(x, y) if (pe->real_flags & x) { fprintf (file, "\t%s\n", y); } > PF (F_RELFLG, "relocations stripped"); > PF (F_EXEC, "executable"); > PF (F_LNNO, "line numbers stripped"); > PF (F_LSYMS, "symbols stripped"); > PF (0x80, "little endian"); > PF (F_AR32WR, "32 bit words"); > PF (0x200, "debugging information removed"); > PF (0x1000, "system file"); > PF (F_DLL, "DLL"); > PF (0x8000, "big endian"); > #undef PF > > /* ctime implies '\n'. */ > fprintf (file, "\nTime/Date\t\t%s", ctime (&pe->coff.timestamp)); > fprintf (file, "\nImageBase\t\t"); > fprintf_vma (file, i->ImageBase); > fprintf (file, "\nSectionAlignment\t"); > fprintf_vma (file, i->SectionAlignment); > fprintf (file, "\nFileAlignment\t\t"); > fprintf_vma (file, i->FileAlignment); > fprintf (file, "\nMajorOSystemVersion\t%d\n", i->MajorOperatingSystemVersion); > fprintf (file, "MinorOSystemVersion\t%d\n", i->MinorOperatingSystemVersion); > fprintf (file, "MajorImageVersion\t%d\n", i->MajorImageVersion); > fprintf (file, "MinorImageVersion\t%d\n", i->MinorImageVersion); > fprintf (file, "MajorSubsystemVersion\t%d\n", i->MajorSubsystemVersion); > fprintf (file, "MinorSubsystemVersion\t%d\n", i->MinorSubsystemVersion); > fprintf (file, "Win32Version\t\t%08lx\n", i->Reserved1); > fprintf (file, "SizeOfImage\t\t%08lx\n", i->SizeOfImage); > fprintf (file, "SizeOfHeaders\t\t%08lx\n", i->SizeOfHeaders); > fprintf (file, "CheckSum\t\t%08lx\n", i->CheckSum); > switch (i->Subsystem) > { > case IMAGE_SUBSYSTEM_UNKNOWN: > subsystem_name = "unspecified"; > break; > case IMAGE_SUBSYSTEM_NATIVE: > subsystem_name = "NT native"; > break; > case IMAGE_SUBSYSTEM_WINDOWS_GUI: > subsystem_name = "Windows GUI"; > break; > case IMAGE_SUBSYSTEM_WINDOWS_CUI: > subsystem_name = "Windows CUI"; > break; > case IMAGE_SUBSYSTEM_POSIX_CUI: > subsystem_name = "POSIX CUI"; > break; > case IMAGE_SUBSYSTEM_WINDOWS_CE_GUI: > subsystem_name = "Wince CUI"; > break; > case IMAGE_SUBSYSTEM_EFI_APPLICATION: > subsystem_name = "EFI application"; > break; > case IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER: > subsystem_name = "EFI boot service driver"; > break; > case IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER: > subsystem_name = "EFI runtime driver"; > break; > } > fprintf (file, "Subsystem\t\t%08x", i->Subsystem); > if (subsystem_name) > fprintf (file, "\t(%s)", subsystem_name); > fprintf (file, "\nDllCharacteristics\t%08x\n", i->DllCharacteristics); > fprintf (file, "SizeOfStackReserve\t"); > fprintf_vma (file, i->SizeOfStackReserve); > fprintf (file, "\nSizeOfStackCommit\t"); > fprintf_vma (file, i->SizeOfStackCommit); > fprintf (file, "\nSizeOfHeapReserve\t"); > fprintf_vma (file, i->SizeOfHeapReserve); > fprintf (file, "\nSizeOfHeapCommit\t"); > fprintf_vma (file, i->SizeOfHeapCommit); > fprintf (file, "\nLoaderFlags\t\t%08lx\n", i->LoaderFlags); > fprintf (file, "NumberOfRvaAndSizes\t%08lx\n", i->NumberOfRvaAndSizes); > > fprintf (file, "\nThe Data Directory\n"); > for (j = 0; j < IMAGE_NUMBEROF_DIRECTORY_ENTRIES; j++) > { > fprintf (file, "Entry %1x ", j); > fprintf_vma (file, i->DataDirectory[j].VirtualAddress); > fprintf (file, " %08lx ", i->DataDirectory[j].Size); > fprintf (file, "%s\n", dir_names[j]); > } > > pe_print_idata (abfd, vfile); > pe_print_edata (abfd, vfile); > pe_print_pdata (abfd, vfile); > pe_print_reloc (abfd, vfile); > > return true; > } > > /* Copy any private info we understand from the input bfd > to the output bfd. */ > > boolean > _bfd_XX_bfd_copy_private_bfd_data_common (ibfd, obfd) > bfd *ibfd, *obfd; > { > /* One day we may try to grok other private data. */ > if (ibfd->xvec->flavour != bfd_target_coff_flavour > || obfd->xvec->flavour != bfd_target_coff_flavour) > return true; > > pe_data (obfd)->pe_opthdr = pe_data (ibfd)->pe_opthdr; > pe_data (obfd)->dll = pe_data (ibfd)->dll; > > /* for strip: if we removed .reloc, we'll make a real mess of things > if we don't remove this entry as well. */ > if (! pe_data (obfd)->has_reloc_section) > { > pe_data (obfd)->pe_opthdr.DataDirectory[5].VirtualAddress = 0; > pe_data (obfd)->pe_opthdr.DataDirectory[5].Size = 0; > } > return true; > } > > /* Copy private section data. */ > boolean > _bfd_XX_bfd_copy_private_section_data (ibfd, isec, obfd, osec) > bfd *ibfd; > asection *isec; > bfd *obfd; > asection *osec; > { > if (bfd_get_flavour (ibfd) != bfd_target_coff_flavour > || bfd_get_flavour (obfd) != bfd_target_coff_flavour) > return true; > > if (coff_section_data (ibfd, isec) != NULL > && pei_section_data (ibfd, isec) != NULL) > { > if (coff_section_data (obfd, osec) == NULL) > { > osec->used_by_bfd = > (PTR) bfd_zalloc (obfd, sizeof (struct coff_section_tdata)); > if (osec->used_by_bfd == NULL) > return false; > } > if (pei_section_data (obfd, osec) == NULL) > { > coff_section_data (obfd, osec)->tdata = > (PTR) bfd_zalloc (obfd, sizeof (struct pei_section_tdata)); > if (coff_section_data (obfd, osec)->tdata == NULL) > return false; > } > pei_section_data (obfd, osec)->virt_size = > pei_section_data (ibfd, isec)->virt_size; > pei_section_data (obfd, osec)->pe_flags = > pei_section_data (ibfd, isec)->pe_flags; > } > > return true; > } > > void > _bfd_XX_get_symbol_info (abfd, symbol, ret) > bfd *abfd; > asymbol *symbol; > symbol_info *ret; > { > coff_get_symbol_info (abfd, symbol, ret); > #if 0 /* This code no longer appears to be necessary. > ImageBase has already been added in by coff_swap_scnhdr_in. */ > if (pe_data (abfd) != NULL > && ((symbol->flags & BSF_DEBUGGING) == 0 > || (symbol->flags & BSF_DEBUGGING_RELOC) != 0) > && ! bfd_is_abs_section (symbol->section)) > ret->value += pe_data (abfd)->pe_opthdr.ImageBase; > #endif > } > > /* Handle the .idata section and other things that need symbol table > access. */ > > boolean > _bfd_XXi_final_link_postscript (abfd, pfinfo) > bfd *abfd; > struct coff_final_link_info *pfinfo; > { > struct coff_link_hash_entry *h1; > struct bfd_link_info *info = pfinfo->info; > > /* There are a few fields that need to be filled in now while we > have symbol table access. > > The .idata subsections aren't directly available as sections, but > they are in the symbol table, so get them from there. */ > > /* The import directory. This is the address of .idata$2, with size > of .idata$2 + .idata$3. */ > h1 = coff_link_hash_lookup (coff_hash_table (info), > ".idata$2", false, false, true); > if (h1 != NULL) > { > pe_data (abfd)->pe_opthdr.DataDirectory[1].VirtualAddress = > (h1->root.u.def.value > + h1->root.u.def.section->output_section->vma > + h1->root.u.def.section->output_offset); > h1 = coff_link_hash_lookup (coff_hash_table (info), > ".idata$4", false, false, true); > pe_data (abfd)->pe_opthdr.DataDirectory[1].Size = > ((h1->root.u.def.value > + h1->root.u.def.section->output_section->vma > + h1->root.u.def.section->output_offset) > - pe_data (abfd)->pe_opthdr.DataDirectory[1].VirtualAddress); > > /* The import address table. This is the size/address of > .idata$5. */ > h1 = coff_link_hash_lookup (coff_hash_table (info), > ".idata$5", false, false, true); > pe_data (abfd)->pe_opthdr.DataDirectory[12].VirtualAddress = > (h1->root.u.def.value > + h1->root.u.def.section->output_section->vma > + h1->root.u.def.section->output_offset); > h1 = coff_link_hash_lookup (coff_hash_table (info), > ".idata$6", false, false, true); > pe_data (abfd)->pe_opthdr.DataDirectory[12].Size = > ((h1->root.u.def.value > + h1->root.u.def.section->output_section->vma > + h1->root.u.def.section->output_offset) > - pe_data (abfd)->pe_opthdr.DataDirectory[12].VirtualAddress); > } > > /* If we couldn't find idata$2, we either have an excessively > trivial program or are in DEEP trouble; we have to assume trivial > program.... */ > return true; > } diff -rN binutils-2.11/bfd/pei-arm.c binutils-2.11.2/bfd/pei-arm.c 2c2 < Copyright 1995, 1999 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/pei-mips.c binutils-2.11.2/bfd/pei-mips.c 2c2 < Copyright 1995, 2000 Free Software Foundation, Inc. --- > Copyright 1995, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/pei-ppc.c binutils-2.11.2/bfd/pei-ppc.c 2c2 < Copyright 1995 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/pei-sh.c binutils-2.11.2/bfd/pei-sh.c 2c2 < Copyright 1995, 2000 Free Software Foundation, Inc. --- > Copyright 1995, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/peicode.h binutils-2.11.2/bfd/peicode.h 2c2,3 < Copyright 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 224c225 < #define coff_swap_filehdr_out _bfd_pei_only_swap_filehdr_out --- > # define coff_swap_filehdr_out _bfd_XXi_only_swap_filehdr_out 226c227 < #define coff_swap_filehdr_out _bfd_pe_only_swap_filehdr_out --- > # define coff_swap_filehdr_out _bfd_pe_only_swap_filehdr_out 304a306,313 > > #ifdef PEI_FORCE_MINIMUM_ALIGNMENT > pe->force_minimum_alignment = 1; > #endif > #ifdef PEI_TARGET_SUBSYSTEM > pe->target_subsystem = PEI_TARGET_SUBSYSTEM; > #endif > 368c377 < if (!_bfd_pe_print_private_bfd_data_common (abfd, vfile)) --- > if (!_bfd_XX_print_private_bfd_data_common (abfd, vfile)) 388c397 < if (!_bfd_pe_bfd_copy_private_bfd_data_common (ibfd, obfd)) --- > if (!_bfd_XX_bfd_copy_private_bfd_data_common (ibfd, obfd)) 398c407 < _bfd_pe_bfd_copy_private_section_data --- > _bfd_XX_bfd_copy_private_section_data 400c409 < #define coff_get_symbol_info _bfd_pe_get_symbol_info --- > #define coff_get_symbol_info _bfd_XX_get_symbol_info diff -rN binutils-2.11/bfd/peigen.c binutils-2.11.2/bfd/peigen.c 1,2025d0 < /* Support for the generic parts of PE/PEI; the common executable parts. < Copyright 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. < Written by Cygnus Solutions. < < 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. */ < < /* Most of this hacked by Steve Chamberlain . < < PE/PEI rearrangement (and code added): Donn Terry < Softway Systems, Inc. < */ < < /* Hey look, some documentation [and in a place you expect to find it]! < < The main reference for the pei format is "Microsoft Portable Executable < and Common Object File Format Specification 4.1". Get it if you need to < do some serious hacking on this code. < < Another reference: < "Peering Inside the PE: A Tour of the Win32 Portable Executable < File Format", MSJ 1994, Volume 9. < < The *sole* difference between the pe format and the pei format is that the < latter has an MSDOS 2.0 .exe header on the front that prints the message < "This app must be run under Windows." (or some such). < (FIXME: Whether that statement is *really* true or not is unknown. < Are there more subtle differences between pe and pei formats? < For now assume there aren't. If you find one, then for God sakes < document it here!) < < The Microsoft docs use the word "image" instead of "executable" because < the former can also refer to a DLL (shared library). Confusion can arise < because the `i' in `pei' also refers to "image". The `pe' format can < also create images (i.e. executables), it's just that to run on a win32 < system you need to use the pei format. < < FIXME: Please add more docs here so the next poor fool that has to hack < on this code has a chance of getting something accomplished without < wasting too much time. < */ < < #include "bfd.h" < #include "sysdep.h" < #include "libbfd.h" < #include "coff/internal.h" < < /* NOTE: it's strange to be including an architecture specific header < in what's supposed to be general (to PE/PEI) code. However, that's < where the definitions are, and they don't vary per architecture < within PE/PEI, so we get them from there. FIXME: The lack of < variance is an assumption which may prove to be incorrect if new < PE/PEI targets are created. */ < #include "coff/i386.h" < < #include "coff/pe.h" < #include "libcoff.h" < #include "libpei.h" < < /* FIXME: This file has various tests of POWERPC_LE_PE. Those tests < worked when the code was in peicode.h, but no longer work now that < the code is in peigen.c. PowerPC NT is said to be dead. If < anybody wants to revive the code, you will have to figure out how < to handle those issues. */ < < static void add_data_entry < PARAMS ((bfd *, struct internal_extra_pe_aouthdr *, int, char *, bfd_vma)); < static boolean pe_print_pdata PARAMS ((bfd *, PTR)); < static boolean pe_print_reloc PARAMS ((bfd *, PTR)); < < /**********************************************************************/ < < void < _bfd_pei_swap_sym_in (abfd, ext1, in1) < bfd *abfd; < PTR ext1; < PTR in1; < { < SYMENT *ext = (SYMENT *) ext1; < struct internal_syment *in = (struct internal_syment *) in1; < < if (ext->e.e_name[0] == 0) < { < in->_n._n_n._n_zeroes = 0; < in->_n._n_n._n_offset = < bfd_h_get_32 (abfd, (bfd_byte *) ext->e.e.e_offset); < } < else < { < memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN); < } < < in->n_value = bfd_h_get_32 (abfd, (bfd_byte *) ext->e_value); < in->n_scnum = bfd_h_get_16 (abfd, (bfd_byte *) ext->e_scnum); < if (sizeof (ext->e_type) == 2) < { < in->n_type = bfd_h_get_16 (abfd, (bfd_byte *) ext->e_type); < } < else < { < in->n_type = bfd_h_get_32 (abfd, (bfd_byte *) ext->e_type); < } < in->n_sclass = bfd_h_get_8 (abfd, ext->e_sclass); < in->n_numaux = bfd_h_get_8 (abfd, ext->e_numaux); < < #ifndef STRICT_PE_FORMAT < /* This is for Gnu-created DLLs. */ < < /* The section symbols for the .idata$ sections have class 0x68 < (C_SECTION), which MS documentation indicates is a section < symbol. Unfortunately, the value field in the symbol is simply a < copy of the .idata section's flags rather than something useful. < When these symbols are encountered, change the value to 0 so that < they will be handled somewhat correctly in the bfd code. */ < if (in->n_sclass == C_SECTION) < { < in->n_value = 0x0; < < #if 0 < /* FIXME: This is clearly wrong. The problem seems to be that < undefined C_SECTION symbols appear in the first object of a < MS generated .lib file, and the symbols are not defined < anywhere. */ < in->n_scnum = 1; < < /* I have tried setting the class to 3 and using the following < to set the section number. This will put the address of the < pointer to the string kernel32.dll at addresses 0 and 0x10 < off start of idata section which is not correct. */ < #if 0 < if (strcmp (in->_n._n_name, ".idata$4") == 0) < in->n_scnum = 3; < else < in->n_scnum = 2; < #endif < #else < /* Create synthetic empty sections as needed. DJ */ < if (in->n_scnum == 0) < { < asection *sec; < for (sec = abfd->sections; sec; sec = sec->next) < { < if (strcmp (sec->name, in->n_name) == 0) < { < in->n_scnum = sec->target_index; < break; < } < } < } < if (in->n_scnum == 0) < { < int unused_section_number = 0; < asection *sec; < char *name; < for (sec = abfd->sections; sec; sec = sec->next) < if (unused_section_number <= sec->target_index) < unused_section_number = sec->target_index + 1; < < name = bfd_alloc (abfd, strlen (in->n_name) + 10); < if (name == NULL) < return; < strcpy (name, in->n_name); < sec = bfd_make_section_anyway (abfd, name); < < sec->vma = 0; < sec->lma = 0; < sec->_cooked_size = 0; < sec->_raw_size = 0; < sec->filepos = 0; < sec->rel_filepos = 0; < sec->reloc_count = 0; < sec->line_filepos = 0; < sec->lineno_count = 0; < sec->userdata = NULL; < sec->next = (asection *) NULL; < sec->flags = 0; < sec->alignment_power = 2; < sec->flags = SEC_HAS_CONTENTS | SEC_ALLOC | SEC_DATA | SEC_LOAD; < < sec->target_index = unused_section_number; < < in->n_scnum = unused_section_number; < } < in->n_sclass = C_STAT; < #endif < } < #endif < < #ifdef coff_swap_sym_in_hook < /* This won't work in peigen.c, but since it's for PPC PE, it's not < worth fixing. */ < coff_swap_sym_in_hook (abfd, ext1, in1); < #endif < } < < unsigned int < _bfd_pei_swap_sym_out (abfd, inp, extp) < bfd *abfd; < PTR inp; < PTR extp; < { < struct internal_syment *in = (struct internal_syment *) inp; < SYMENT *ext = (SYMENT *) extp; < if (in->_n._n_name[0] == 0) < { < bfd_h_put_32 (abfd, 0, (bfd_byte *) ext->e.e.e_zeroes); < bfd_h_put_32 (abfd, in->_n._n_n._n_offset, (bfd_byte *) ext->e.e.e_offset); < } < else < { < memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN); < } < < bfd_h_put_32 (abfd, in->n_value, (bfd_byte *) ext->e_value); < bfd_h_put_16 (abfd, in->n_scnum, (bfd_byte *) ext->e_scnum); < if (sizeof (ext->e_type) == 2) < { < bfd_h_put_16 (abfd, in->n_type, (bfd_byte *) ext->e_type); < } < else < { < bfd_h_put_32 (abfd, in->n_type, (bfd_byte *) ext->e_type); < } < bfd_h_put_8 (abfd, in->n_sclass, ext->e_sclass); < bfd_h_put_8 (abfd, in->n_numaux, ext->e_numaux); < < return SYMESZ; < } < < void < _bfd_pei_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) < bfd *abfd; < PTR ext1; < int type; < int class; < int indx ATTRIBUTE_UNUSED; < int numaux ATTRIBUTE_UNUSED; < PTR in1; < { < AUXENT *ext = (AUXENT *) ext1; < union internal_auxent *in = (union internal_auxent *) in1; < < switch (class) < { < case C_FILE: < if (ext->x_file.x_fname[0] == 0) < { < in->x_file.x_n.x_zeroes = 0; < in->x_file.x_n.x_offset = < bfd_h_get_32 (abfd, (bfd_byte *) ext->x_file.x_n.x_offset); < } < else < { < memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN); < } < return; < < case C_STAT: < case C_LEAFSTAT: < case C_HIDDEN: < if (type == T_NULL) < { < in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext); < in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext); < in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext); < in->x_scn.x_checksum = < bfd_h_get_32 (abfd, (bfd_byte *) ext->x_scn.x_checksum); < in->x_scn.x_associated = < bfd_h_get_16 (abfd, (bfd_byte *) ext->x_scn.x_associated); < in->x_scn.x_comdat = < bfd_h_get_8 (abfd, (bfd_byte *) ext->x_scn.x_comdat); < return; < } < break; < } < < in->x_sym.x_tagndx.l = bfd_h_get_32 (abfd, (bfd_byte *) ext->x_sym.x_tagndx); < in->x_sym.x_tvndx = bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_tvndx); < < if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) < { < in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext); < in->x_sym.x_fcnary.x_fcn.x_endndx.l = GET_FCN_ENDNDX (abfd, ext); < } < else < { < in->x_sym.x_fcnary.x_ary.x_dimen[0] = < bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[0]); < in->x_sym.x_fcnary.x_ary.x_dimen[1] = < bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[1]); < in->x_sym.x_fcnary.x_ary.x_dimen[2] = < bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[2]); < in->x_sym.x_fcnary.x_ary.x_dimen[3] = < bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[3]); < } < < if (ISFCN (type)) < { < in->x_sym.x_misc.x_fsize = < bfd_h_get_32 (abfd, (bfd_byte *) ext->x_sym.x_misc.x_fsize); < } < else < { < 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); < } < } < < unsigned int < _bfd_pei_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) < bfd *abfd; < PTR inp; < int type; < int class; < int indx ATTRIBUTE_UNUSED; < int numaux ATTRIBUTE_UNUSED; < PTR extp; < { < union internal_auxent *in = (union internal_auxent *) inp; < AUXENT *ext = (AUXENT *) extp; < < memset ((PTR) ext, 0, AUXESZ); < switch (class) < { < case C_FILE: < if (in->x_file.x_fname[0] == 0) < { < bfd_h_put_32 (abfd, 0, (bfd_byte *) ext->x_file.x_n.x_zeroes); < bfd_h_put_32 (abfd, < in->x_file.x_n.x_offset, < (bfd_byte *) ext->x_file.x_n.x_offset); < } < else < { < memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN); < } < return AUXESZ; < < case C_STAT: < case C_LEAFSTAT: < case C_HIDDEN: < if (type == T_NULL) < { < 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); < bfd_h_put_32 (abfd, in->x_scn.x_checksum, < (bfd_byte *) ext->x_scn.x_checksum); < bfd_h_put_16 (abfd, in->x_scn.x_associated, < (bfd_byte *) ext->x_scn.x_associated); < bfd_h_put_8 (abfd, in->x_scn.x_comdat, < (bfd_byte *) ext->x_scn.x_comdat); < return AUXESZ; < } < break; < } < < bfd_h_put_32 (abfd, in->x_sym.x_tagndx.l, (bfd_byte *) ext->x_sym.x_tagndx); < bfd_h_put_16 (abfd, in->x_sym.x_tvndx, (bfd_byte *) ext->x_sym.x_tvndx); < < if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) < { < PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext); < PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext); < } < else < { < bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0], < (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[0]); < bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1], < (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[1]); < bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2], < (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[2]); < bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3], < (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[3]); < } < < if (ISFCN (type)) < bfd_h_put_32 (abfd, in->x_sym.x_misc.x_fsize, < (bfd_byte *) ext->x_sym.x_misc.x_fsize); < else < { < PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext); < PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext); < } < < return AUXESZ; < } < < void < _bfd_pei_swap_lineno_in (abfd, ext1, in1) < bfd *abfd; < PTR ext1; < PTR in1; < { < LINENO *ext = (LINENO *) ext1; < struct internal_lineno *in = (struct internal_lineno *) in1; < < in->l_addr.l_symndx = bfd_h_get_32 (abfd, (bfd_byte *) ext->l_addr.l_symndx); < in->l_lnno = GET_LINENO_LNNO (abfd, ext); < } < < unsigned int < _bfd_pei_swap_lineno_out (abfd, inp, outp) < bfd *abfd; < PTR inp; < PTR outp; < { < struct internal_lineno *in = (struct internal_lineno *) inp; < struct external_lineno *ext = (struct external_lineno *) outp; < bfd_h_put_32 (abfd, in->l_addr.l_symndx, (bfd_byte *) < ext->l_addr.l_symndx); < < PUT_LINENO_LNNO (abfd, in->l_lnno, ext); < return LINESZ; < } < < void < _bfd_pei_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1) < bfd *abfd; < PTR aouthdr_ext1; < PTR aouthdr_int1; < { < struct internal_extra_pe_aouthdr *a; < PEAOUTHDR *src = (PEAOUTHDR *) (aouthdr_ext1); < AOUTHDR *aouthdr_ext = (AOUTHDR *) aouthdr_ext1; < struct internal_aouthdr *aouthdr_int = (struct internal_aouthdr *)aouthdr_int1; < < aouthdr_int->magic = bfd_h_get_16 (abfd, (bfd_byte *) aouthdr_ext->magic); < aouthdr_int->vstamp = bfd_h_get_16 (abfd, (bfd_byte *) aouthdr_ext->vstamp); < aouthdr_int->tsize = < GET_AOUTHDR_TSIZE (abfd, (bfd_byte *) aouthdr_ext->tsize); < aouthdr_int->dsize = < GET_AOUTHDR_DSIZE (abfd, (bfd_byte *) aouthdr_ext->dsize); < aouthdr_int->bsize = < GET_AOUTHDR_BSIZE (abfd, (bfd_byte *) aouthdr_ext->bsize); < aouthdr_int->entry = < GET_AOUTHDR_ENTRY (abfd, (bfd_byte *) aouthdr_ext->entry); < aouthdr_int->text_start = < GET_AOUTHDR_TEXT_START (abfd, (bfd_byte *) aouthdr_ext->text_start); < #ifndef COFF_WITH_PEP64 < /* PE32+ does not have data_start member! */ < aouthdr_int->data_start = < GET_AOUTHDR_DATA_START (abfd, (bfd_byte *) aouthdr_ext->data_start); < #endif < < a = &aouthdr_int->pe; < a->ImageBase = GET_OPTHDR_IMAGE_BASE (abfd, (bfd_byte *) src->ImageBase); < a->SectionAlignment = bfd_h_get_32 (abfd, (bfd_byte *) src->SectionAlignment); < a->FileAlignment = bfd_h_get_32 (abfd, (bfd_byte *) src->FileAlignment); < a->MajorOperatingSystemVersion = < bfd_h_get_16 (abfd, (bfd_byte *) src->MajorOperatingSystemVersion); < a->MinorOperatingSystemVersion = < bfd_h_get_16 (abfd, (bfd_byte *) src->MinorOperatingSystemVersion); < a->MajorImageVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MajorImageVersion); < a->MinorImageVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MinorImageVersion); < a->MajorSubsystemVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MajorSubsystemVersion); < a->MinorSubsystemVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MinorSubsystemVersion); < a->Reserved1 = bfd_h_get_32 (abfd, (bfd_byte *) src->Reserved1); < a->SizeOfImage = bfd_h_get_32 (abfd, (bfd_byte *) src->SizeOfImage); < a->SizeOfHeaders = bfd_h_get_32 (abfd, (bfd_byte *) src->SizeOfHeaders); < a->CheckSum = bfd_h_get_32 (abfd, (bfd_byte *) src->CheckSum); < a->Subsystem = bfd_h_get_16 (abfd, (bfd_byte *) src->Subsystem); < a->DllCharacteristics = bfd_h_get_16 (abfd, (bfd_byte *) src->DllCharacteristics); < a->SizeOfStackReserve = GET_OPTHDR_SIZE_OF_STACK_RESERVE (abfd, (bfd_byte *) src->SizeOfStackReserve); < a->SizeOfStackCommit = GET_OPTHDR_SIZE_OF_STACK_COMMIT (abfd, (bfd_byte *) src->SizeOfStackCommit); < a->SizeOfHeapReserve = GET_OPTHDR_SIZE_OF_HEAP_RESERVE (abfd, (bfd_byte *) src->SizeOfHeapReserve); < a->SizeOfHeapCommit = GET_OPTHDR_SIZE_OF_HEAP_COMMIT (abfd, (bfd_byte *) src->SizeOfHeapCommit); < a->LoaderFlags = bfd_h_get_32 (abfd, (bfd_byte *) src->LoaderFlags); < a->NumberOfRvaAndSizes = bfd_h_get_32 (abfd, (bfd_byte *) src->NumberOfRvaAndSizes); < < { < int idx; < for (idx = 0; idx < 16; idx++) < { < /* If data directory is empty, rva also should be 0. */ < int size = < bfd_h_get_32 (abfd, (bfd_byte *) src->DataDirectory[idx][1]); < a->DataDirectory[idx].Size = size; < < if (size) < { < a->DataDirectory[idx].VirtualAddress = < bfd_h_get_32 (abfd, (bfd_byte *) src->DataDirectory[idx][0]); < } < else < a->DataDirectory[idx].VirtualAddress = 0; < } < } < < if (aouthdr_int->entry) < { < aouthdr_int->entry += a->ImageBase; < #ifndef COFF_WITH_PEP64 < aouthdr_int->entry &= 0xffffffff; < #endif < } < if (aouthdr_int->tsize) < { < aouthdr_int->text_start += a->ImageBase; < #ifndef COFF_WITH_PEP64 < aouthdr_int->text_start &= 0xffffffff; < #endif < } < #ifndef COFF_WITH_PEP64 < /* PE32+ does not have data_start member! */ < if (aouthdr_int->dsize) < { < aouthdr_int->data_start += a->ImageBase; < aouthdr_int->data_start &= 0xffffffff; < } < #endif < < #ifdef POWERPC_LE_PE < /* These three fields are normally set up by ppc_relocate_section. < In the case of reading a file in, we can pick them up from the < DataDirectory. */ < first_thunk_address = a->DataDirectory[12].VirtualAddress; < thunk_size = a->DataDirectory[12].Size; < import_table_size = a->DataDirectory[1].Size; < #endif < < } < < /* A support function for below. */ < < static void < add_data_entry (abfd, aout, idx, name, base) < bfd *abfd; < struct internal_extra_pe_aouthdr *aout; < int idx; < char *name; < bfd_vma base; < { < asection *sec = bfd_get_section_by_name (abfd, name); < < /* add import directory information if it exists */ < if ((sec != NULL) < && (coff_section_data (abfd, sec) != NULL) < && (pei_section_data (abfd, sec) != NULL)) < { < /* If data directory is empty, rva also should be 0 */ < int size = pei_section_data (abfd, sec)->virt_size; < aout->DataDirectory[idx].Size = size; < < if (size) < { < aout->DataDirectory[idx].VirtualAddress = < (sec->vma - base) & 0xffffffff; < sec->flags |= SEC_DATA; < } < } < } < < unsigned int < _bfd_pei_swap_aouthdr_out (abfd, in, out) < bfd *abfd; < PTR in; < PTR out; < { < struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in; < struct internal_extra_pe_aouthdr *extra = &pe_data (abfd)->pe_opthdr; < PEAOUTHDR *aouthdr_out = (PEAOUTHDR *) out; < bfd_vma sa, fa, ib; < < /* The following definitely is required for EFI applications. < Perhaps it's needed for other PEI targets as well, but I don't < know that for a fact, so we play it safe here and tweak the < alignments only if PEI_FORCE_MINIMUM_ALIGNMENT is < defined. --davidm */ < #ifdef PEI_FORCE_MINIMUM_ALIGNMENT < if (!extra->FileAlignment) < extra->FileAlignment = PE_DEF_FILE_ALIGNMENT; < if (!extra->SectionAlignment) < extra->SectionAlignment = PE_DEF_SECTION_ALIGNMENT; < #endif < < #ifdef PEI_DEFAULT_TARGET_SUBSYSTEM < if (extra->Subsystem == IMAGE_SUBSYSTEM_UNKNOWN) < extra->Subsystem = PEI_DEFAULT_TARGET_SUBSYSTEM; < #endif < < sa = extra->SectionAlignment; < fa = extra->FileAlignment; < ib = extra->ImageBase; < < if (aouthdr_in->tsize) < { < aouthdr_in->text_start -= ib; < aouthdr_in->text_start &= 0xffffffff; < } < if (aouthdr_in->dsize) < { < aouthdr_in->data_start -= ib; < aouthdr_in->data_start &= 0xffffffff; < } < if (aouthdr_in->entry) < { < aouthdr_in->entry -= ib; < aouthdr_in->entry &= 0xffffffff; < } < < #define FA(x) (((x) + fa -1 ) & (- fa)) < #define SA(x) (((x) + sa -1 ) & (- sa)) < < /* We like to have the sizes aligned. */ < < aouthdr_in->bsize = FA (aouthdr_in->bsize); < < extra->NumberOfRvaAndSizes = IMAGE_NUMBEROF_DIRECTORY_ENTRIES; < < /* first null out all data directory entries .. */ < memset (extra->DataDirectory, sizeof (extra->DataDirectory), 0); < < add_data_entry (abfd, extra, 0, ".edata", ib); < < /* Don't call add_data_entry for .idata$2 or .idata$5. It's done in < bfd_coff_final_link where all the required information is < available. */ < < /* However, until other .idata fixes are made (pending patch), the < entry for .idata is needed for backwards compatability. FIXME. */ < add_data_entry (abfd, extra, 1, ".idata", ib); < < add_data_entry (abfd, extra, 2, ".rsrc", ib); < < add_data_entry (abfd, extra, 3, ".pdata", ib); < < /* For some reason, the virtual size (which is what's set by < add_data_entry) for .reloc is not the same as the size recorded < in this slot by MSVC; it doesn't seem to cause problems (so far), < but since it's the best we've got, use it. It does do the right < thing for .pdata. */ < if (pe_data (abfd)->has_reloc_section) < add_data_entry (abfd, extra, 5, ".reloc", ib); < < { < asection *sec; < bfd_vma dsize = 0; < bfd_vma isize = SA(abfd->sections->filepos); < bfd_vma tsize = 0; < < for (sec = abfd->sections; sec; sec = sec->next) < { < int rounded = FA(sec->_raw_size); < < if (sec->flags & SEC_DATA) < dsize += rounded; < if (sec->flags & SEC_CODE) < tsize += rounded; < /* The image size is the total VIRTUAL size (which is what is < in the virt_size field). Files have been seen (from MSVC < 5.0 link.exe) where the file size of the .data segment is < quite small compared to the virtual size. Without this < fix, strip munges the file. */ < isize += SA (FA (pei_section_data (abfd, sec)->virt_size)); < } < < aouthdr_in->dsize = dsize; < aouthdr_in->tsize = tsize; < extra->SizeOfImage = isize; < } < < extra->SizeOfHeaders = abfd->sections->filepos; < bfd_h_put_16 (abfd, aouthdr_in->magic, (bfd_byte *) aouthdr_out->standard.magic); < < #define LINKER_VERSION 256 /* That is, 2.56 */ < < /* This piece of magic sets the "linker version" field to < LINKER_VERSION. */ < bfd_h_put_16 (abfd, < LINKER_VERSION / 100 + (LINKER_VERSION % 100) * 256, < (bfd_byte *) aouthdr_out->standard.vstamp); < < PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, (bfd_byte *) aouthdr_out->standard.tsize); < PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, (bfd_byte *) aouthdr_out->standard.dsize); < PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, (bfd_byte *) aouthdr_out->standard.bsize); < PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, (bfd_byte *) aouthdr_out->standard.entry); < PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start, < (bfd_byte *) aouthdr_out->standard.text_start); < < #ifndef COFF_WITH_PEP64 < /* PE32+ does not have data_start member! */ < PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start, < (bfd_byte *) aouthdr_out->standard.data_start); < #endif < < PUT_OPTHDR_IMAGE_BASE (abfd, extra->ImageBase, < (bfd_byte *) aouthdr_out->ImageBase); < bfd_h_put_32 (abfd, extra->SectionAlignment, < (bfd_byte *) aouthdr_out->SectionAlignment); < bfd_h_put_32 (abfd, extra->FileAlignment, < (bfd_byte *) aouthdr_out->FileAlignment); < bfd_h_put_16 (abfd, extra->MajorOperatingSystemVersion, < (bfd_byte *) aouthdr_out->MajorOperatingSystemVersion); < bfd_h_put_16 (abfd, extra->MinorOperatingSystemVersion, < (bfd_byte *) aouthdr_out->MinorOperatingSystemVersion); < bfd_h_put_16 (abfd, extra->MajorImageVersion, < (bfd_byte *) aouthdr_out->MajorImageVersion); < bfd_h_put_16 (abfd, extra->MinorImageVersion, < (bfd_byte *) aouthdr_out->MinorImageVersion); < bfd_h_put_16 (abfd, extra->MajorSubsystemVersion, < (bfd_byte *) aouthdr_out->MajorSubsystemVersion); < bfd_h_put_16 (abfd, extra->MinorSubsystemVersion, < (bfd_byte *) aouthdr_out->MinorSubsystemVersion); < bfd_h_put_32 (abfd, extra->Reserved1, < (bfd_byte *) aouthdr_out->Reserved1); < bfd_h_put_32 (abfd, extra->SizeOfImage, < (bfd_byte *) aouthdr_out->SizeOfImage); < bfd_h_put_32 (abfd, extra->SizeOfHeaders, < (bfd_byte *) aouthdr_out->SizeOfHeaders); < bfd_h_put_32 (abfd, extra->CheckSum, < (bfd_byte *) aouthdr_out->CheckSum); < bfd_h_put_16 (abfd, extra->Subsystem, < (bfd_byte *) aouthdr_out->Subsystem); < bfd_h_put_16 (abfd, extra->DllCharacteristics, < (bfd_byte *) aouthdr_out->DllCharacteristics); < PUT_OPTHDR_SIZE_OF_STACK_RESERVE (abfd, extra->SizeOfStackReserve, < (bfd_byte *) aouthdr_out->SizeOfStackReserve); < PUT_OPTHDR_SIZE_OF_STACK_COMMIT (abfd, extra->SizeOfStackCommit, < (bfd_byte *) aouthdr_out->SizeOfStackCommit); < PUT_OPTHDR_SIZE_OF_HEAP_RESERVE (abfd, extra->SizeOfHeapReserve, < (bfd_byte *) aouthdr_out->SizeOfHeapReserve); < PUT_OPTHDR_SIZE_OF_HEAP_COMMIT (abfd, extra->SizeOfHeapCommit, < (bfd_byte *) aouthdr_out->SizeOfHeapCommit); < bfd_h_put_32 (abfd, extra->LoaderFlags, < (bfd_byte *) aouthdr_out->LoaderFlags); < bfd_h_put_32 (abfd, extra->NumberOfRvaAndSizes, < (bfd_byte *) aouthdr_out->NumberOfRvaAndSizes); < { < int idx; < for (idx = 0; idx < 16; idx++) < { < bfd_h_put_32 (abfd, extra->DataDirectory[idx].VirtualAddress, < (bfd_byte *) aouthdr_out->DataDirectory[idx][0]); < bfd_h_put_32 (abfd, extra->DataDirectory[idx].Size, < (bfd_byte *) aouthdr_out->DataDirectory[idx][1]); < } < } < < return AOUTSZ; < } < < unsigned int < _bfd_pei_only_swap_filehdr_out (abfd, in, out) < bfd *abfd; < PTR in; < PTR out; < { < int idx; < struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; < struct external_PEI_filehdr *filehdr_out = (struct external_PEI_filehdr *) out; < < if (pe_data (abfd)->has_reloc_section) < filehdr_in->f_flags &= ~F_RELFLG; < < if (pe_data (abfd)->dll) < filehdr_in->f_flags |= F_DLL; < < filehdr_in->pe.e_magic = DOSMAGIC; < filehdr_in->pe.e_cblp = 0x90; < filehdr_in->pe.e_cp = 0x3; < filehdr_in->pe.e_crlc = 0x0; < filehdr_in->pe.e_cparhdr = 0x4; < filehdr_in->pe.e_minalloc = 0x0; < filehdr_in->pe.e_maxalloc = 0xffff; < filehdr_in->pe.e_ss = 0x0; < filehdr_in->pe.e_sp = 0xb8; < filehdr_in->pe.e_csum = 0x0; < filehdr_in->pe.e_ip = 0x0; < filehdr_in->pe.e_cs = 0x0; < filehdr_in->pe.e_lfarlc = 0x40; < filehdr_in->pe.e_ovno = 0x0; < < for (idx = 0; idx < 4; idx++) < filehdr_in->pe.e_res[idx] = 0x0; < < filehdr_in->pe.e_oemid = 0x0; < filehdr_in->pe.e_oeminfo = 0x0; < < for (idx = 0; idx < 10; idx++) < filehdr_in->pe.e_res2[idx] = 0x0; < < filehdr_in->pe.e_lfanew = 0x80; < < /* This next collection of data are mostly just characters. It < appears to be constant within the headers put on NT exes. */ < filehdr_in->pe.dos_message[0] = 0x0eba1f0e; < filehdr_in->pe.dos_message[1] = 0xcd09b400; < filehdr_in->pe.dos_message[2] = 0x4c01b821; < filehdr_in->pe.dos_message[3] = 0x685421cd; < filehdr_in->pe.dos_message[4] = 0x70207369; < filehdr_in->pe.dos_message[5] = 0x72676f72; < filehdr_in->pe.dos_message[6] = 0x63206d61; < filehdr_in->pe.dos_message[7] = 0x6f6e6e61; < filehdr_in->pe.dos_message[8] = 0x65622074; < filehdr_in->pe.dos_message[9] = 0x6e757220; < filehdr_in->pe.dos_message[10] = 0x206e6920; < filehdr_in->pe.dos_message[11] = 0x20534f44; < filehdr_in->pe.dos_message[12] = 0x65646f6d; < filehdr_in->pe.dos_message[13] = 0x0a0d0d2e; < filehdr_in->pe.dos_message[14] = 0x24; < filehdr_in->pe.dos_message[15] = 0x0; < filehdr_in->pe.nt_signature = NT_SIGNATURE; < < 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, time (0), (bfd_byte *) filehdr_out->f_timdat); < PUT_FILEHDR_SYMPTR (abfd, (bfd_vma) filehdr_in->f_symptr, < (bfd_byte *) filehdr_out->f_symptr); < bfd_h_put_32 (abfd, filehdr_in->f_nsyms, (bfd_byte *) filehdr_out->f_nsyms); < 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); < < /* put in extra dos header stuff. This data remains essentially < constant, it just has to be tacked on to the beginning of all exes < for NT */ < bfd_h_put_16 (abfd, filehdr_in->pe.e_magic, (bfd_byte *) filehdr_out->e_magic); < bfd_h_put_16 (abfd, filehdr_in->pe.e_cblp, (bfd_byte *) filehdr_out->e_cblp); < bfd_h_put_16 (abfd, filehdr_in->pe.e_cp, (bfd_byte *) filehdr_out->e_cp); < bfd_h_put_16 (abfd, filehdr_in->pe.e_crlc, (bfd_byte *) filehdr_out->e_crlc); < bfd_h_put_16 (abfd, filehdr_in->pe.e_cparhdr, < (bfd_byte *) filehdr_out->e_cparhdr); < bfd_h_put_16 (abfd, filehdr_in->pe.e_minalloc, < (bfd_byte *) filehdr_out->e_minalloc); < bfd_h_put_16 (abfd, filehdr_in->pe.e_maxalloc, < (bfd_byte *) filehdr_out->e_maxalloc); < bfd_h_put_16 (abfd, filehdr_in->pe.e_ss, (bfd_byte *) filehdr_out->e_ss); < bfd_h_put_16 (abfd, filehdr_in->pe.e_sp, (bfd_byte *) filehdr_out->e_sp); < bfd_h_put_16 (abfd, filehdr_in->pe.e_csum, (bfd_byte *) filehdr_out->e_csum); < bfd_h_put_16 (abfd, filehdr_in->pe.e_ip, (bfd_byte *) filehdr_out->e_ip); < bfd_h_put_16 (abfd, filehdr_in->pe.e_cs, (bfd_byte *) filehdr_out->e_cs); < bfd_h_put_16 (abfd, filehdr_in->pe.e_lfarlc, (bfd_byte *) filehdr_out->e_lfarlc); < bfd_h_put_16 (abfd, filehdr_in->pe.e_ovno, (bfd_byte *) filehdr_out->e_ovno); < { < int idx; < for (idx = 0; idx < 4; idx++) < bfd_h_put_16 (abfd, filehdr_in->pe.e_res[idx], < (bfd_byte *) filehdr_out->e_res[idx]); < } < bfd_h_put_16 (abfd, filehdr_in->pe.e_oemid, (bfd_byte *) filehdr_out->e_oemid); < bfd_h_put_16 (abfd, filehdr_in->pe.e_oeminfo, < (bfd_byte *) filehdr_out->e_oeminfo); < { < int idx; < for (idx = 0; idx < 10; idx++) < bfd_h_put_16 (abfd, filehdr_in->pe.e_res2[idx], < (bfd_byte *) filehdr_out->e_res2[idx]); < } < bfd_h_put_32 (abfd, filehdr_in->pe.e_lfanew, (bfd_byte *) filehdr_out->e_lfanew); < < { < int idx; < for (idx = 0; idx < 16; idx++) < bfd_h_put_32 (abfd, filehdr_in->pe.dos_message[idx], < (bfd_byte *) filehdr_out->dos_message[idx]); < } < < /* Also put in the NT signature. */ < bfd_h_put_32 (abfd, filehdr_in->pe.nt_signature, < (bfd_byte *) filehdr_out->nt_signature); < < return FILHSZ; < } < < unsigned int < _bfd_pe_only_swap_filehdr_out (abfd, in, out) < bfd *abfd; < PTR in; < PTR out; < { < struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; < FILHDR *filehdr_out = (FILHDR *) out; < < 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); < PUT_FILEHDR_SYMPTR (abfd, (bfd_vma) filehdr_in->f_symptr, < (bfd_byte *) filehdr_out->f_symptr); < bfd_h_put_32 (abfd, filehdr_in->f_nsyms, (bfd_byte *) filehdr_out->f_nsyms); < 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); < < return FILHSZ; < } < < unsigned int < _bfd_pei_swap_scnhdr_out (abfd, in, out) < bfd *abfd; < PTR in; < PTR out; < { < struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; < SCNHDR *scnhdr_ext = (SCNHDR *) out; < unsigned int ret = SCNHSZ; < bfd_vma ps; < bfd_vma ss; < < memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); < < PUT_SCNHDR_VADDR (abfd, < ((scnhdr_int->s_vaddr < - pe_data (abfd)->pe_opthdr.ImageBase) < & 0xffffffff), < (bfd_byte *) scnhdr_ext->s_vaddr); < < /* NT wants the size data to be rounded up to the next < NT_FILE_ALIGNMENT, but zero if it has no content (as in .bss, < sometimes). */ < < if ((scnhdr_int->s_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) != 0) < { < ps = scnhdr_int->s_size; < ss = 0; < } < else < { < ps = scnhdr_int->s_paddr; < ss = scnhdr_int->s_size; < } < < PUT_SCNHDR_SIZE (abfd, ss, < (bfd_byte *) scnhdr_ext->s_size); < < /* s_paddr in PE is really the virtual size. */ < PUT_SCNHDR_PADDR (abfd, ps, (bfd_byte *) scnhdr_ext->s_paddr); < < PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, < (bfd_byte *) scnhdr_ext->s_scnptr); < PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, < (bfd_byte *) scnhdr_ext->s_relptr); < PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, < (bfd_byte *) scnhdr_ext->s_lnnoptr); < < /* Extra flags must be set when dealing with NT. All sections should also < have the IMAGE_SCN_MEM_READ (0x40000000) flag set. In addition, the < .text section must have IMAGE_SCN_MEM_EXECUTE (0x20000000) and the data < sections (.idata, .data, .bss, .CRT) must have IMAGE_SCN_MEM_WRITE set < (this is especially important when dealing with the .idata section since < the addresses for routines from .dlls must be overwritten). If .reloc < section data is ever generated, we must add IMAGE_SCN_MEM_DISCARDABLE < (0x02000000). Also, the resource data should also be read and < writable. */ < < /* FIXME: alignment is also encoded in this field, at least on ppc (krk) */ < /* FIXME: even worse, I don't see how to get the original alignment field*/ < /* back... */ < < { < int flags = scnhdr_int->s_flags; < bfd_h_put_32 (abfd, flags, (bfd_byte *) scnhdr_ext->s_flags); < } < < if (coff_data (abfd)->link_info < && ! coff_data (abfd)->link_info->relocateable < && ! coff_data (abfd)->link_info->shared < && strcmp (scnhdr_int->s_name, ".text") == 0) < { < /* By inference from looking at MS output, the 32 bit field < which is the combintion of the number_of_relocs and < number_of_linenos is used for the line number count in < executables. A 16-bit field won't do for cc1. The MS < document says that the number of relocs is zero for < executables, but the 17-th bit has been observed to be there. < Overflow is not an issue: a 4G-line program will overflow a < bunch of other fields long before this! */ < bfd_h_put_16 (abfd, scnhdr_int->s_nlnno & 0xffff, < (bfd_byte *) scnhdr_ext->s_nlnno); < bfd_h_put_16 (abfd, scnhdr_int->s_nlnno >> 16, < (bfd_byte *) scnhdr_ext->s_nreloc); < } < else < { < if (scnhdr_int->s_nlnno <= 0xffff) < bfd_h_put_16 (abfd, scnhdr_int->s_nlnno, < (bfd_byte *) scnhdr_ext->s_nlnno); < else < { < (*_bfd_error_handler) (_("%s: line number overflow: 0x%lx > 0xffff"), < bfd_get_filename (abfd), < scnhdr_int->s_nlnno); < bfd_set_error (bfd_error_file_truncated); < bfd_h_put_16 (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nlnno); < ret = 0; < } < if (scnhdr_int->s_nreloc <= 0xffff) < bfd_h_put_16 (abfd, scnhdr_int->s_nreloc, < (bfd_byte *) scnhdr_ext->s_nreloc); < else < { < /* PE can deal with large #s of relocs, but not here */ < bfd_h_put_16 (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nreloc); < scnhdr_int->s_flags |= IMAGE_SCN_LNK_NRELOC_OVFL; < bfd_h_put_32 (abfd, scnhdr_int->s_flags, < (bfd_byte *) scnhdr_ext->s_flags); < #if 0 < (*_bfd_error_handler) (_("%s: reloc overflow 1: 0x%lx > 0xffff"), < bfd_get_filename (abfd), < scnhdr_int->s_nreloc); < bfd_set_error (bfd_error_file_truncated); < bfd_h_put_16 (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nreloc); < ret = 0; < #endif < } < } < return ret; < } < < static char * dir_names[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] = { < N_("Export Directory [.edata (or where ever we found it)]"), < N_("Import Directory [parts of .idata]"), < N_("Resource Directory [.rsrc]"), < N_("Exception Directory [.pdata]"), < N_("Security Directory"), < N_("Base Relocation Directory [.reloc]"), < N_("Debug Directory"), < N_("Description Directory"), < N_("Special Directory"), < N_("Thread Storage Directory [.tls]"), < N_("Load Configuration Directory"), < N_("Bound Import Directory"), < N_("Import Address Table Directory"), < N_("Delay Import Directory"), < N_("Reserved"), < N_("Reserved") < }; < < /**********************************************************************/ < #ifdef POWERPC_LE_PE < /* The code for the PPC really falls in the "architecture dependent" < category. However, it's not clear that anyone will ever care, so < we're ignoring the issue for now; if/when PPC matters, some of this < may need to go into peicode.h, or arguments passed to enable the < PPC- specific code. */ < #endif < < /**********************************************************************/ < static boolean < pe_print_idata (abfd, vfile) < bfd *abfd; < PTR vfile; < { < FILE *file = (FILE *) vfile; < bfd_byte *data; < asection *section; < bfd_signed_vma adj; < < #ifdef POWERPC_LE_PE < asection *rel_section = bfd_get_section_by_name (abfd, ".reldata"); < #endif < < bfd_size_type datasize = 0; < bfd_size_type dataoff; < bfd_size_type i; < int onaline = 20; < < pe_data_type *pe = pe_data (abfd); < struct internal_extra_pe_aouthdr *extra = &pe->pe_opthdr; < < bfd_vma addr; < < addr = extra->DataDirectory[1].VirtualAddress; < < if (addr == 0 && extra->DataDirectory[1].Size == 0) < { < /* Maybe the extra header isn't there. Look for the section. */ < section = bfd_get_section_by_name (abfd, ".idata"); < if (section == NULL) < return true; < < addr = section->vma; < datasize = bfd_section_size (abfd, section); < if (datasize == 0) < return true; < } < else < { < addr += extra->ImageBase; < for (section = abfd->sections; section != NULL; section = section->next) < { < datasize = bfd_section_size (abfd, section); < if (addr >= section->vma && addr < section->vma + datasize) < break; < } < < if (section == NULL) < { < fprintf (file, < _("\nThere is an import table, but the section containing it could not be found\n")); < return true; < } < } < < fprintf (file, _("\nThere is an import table in %s at 0x%lx\n"), < section->name, (unsigned long) addr); < < dataoff = addr - section->vma; < datasize -= dataoff; < < #ifdef POWERPC_LE_PE < if (rel_section != 0 && bfd_section_size (abfd, rel_section) != 0) < { < /* The toc address can be found by taking the starting address, < which on the PPC locates a function descriptor. The < descriptor consists of the function code starting address < followed by the address of the toc. The starting address we < get from the bfd, and the descriptor is supposed to be in the < .reldata section. */ < < bfd_vma loadable_toc_address; < bfd_vma toc_address; < bfd_vma start_address; < bfd_byte *data = 0; < int offset; < < data = (bfd_byte *) bfd_malloc ((size_t) bfd_section_size (abfd, < rel_section)); < if (data == NULL && bfd_section_size (abfd, rel_section) != 0) < return false; < < bfd_get_section_contents (abfd, < rel_section, < (PTR) data, 0, < bfd_section_size (abfd, rel_section)); < < offset = abfd->start_address - rel_section->vma; < < start_address = bfd_get_32 (abfd, data + offset); < loadable_toc_address = bfd_get_32 (abfd, data + offset + 4); < toc_address = loadable_toc_address - 32768; < < fprintf (file, < _("\nFunction descriptor located at the start address: %04lx\n"), < (unsigned long int) (abfd->start_address)); < fprintf (file, < _("\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"), < start_address, loadable_toc_address, toc_address); < } < else < { < fprintf (file, < _("\nNo reldata section! Function descriptor not decoded.\n")); < } < #endif < < fprintf (file, < _("\nThe Import Tables (interpreted %s section contents)\n"), < section->name); < fprintf (file, < _(" vma: Hint Time Forward DLL First\n")); < fprintf (file, < _(" Table Stamp Chain Name Thunk\n")); < < data = (bfd_byte *) bfd_malloc (dataoff + datasize); < if (data == NULL) < return false; < < /* Read the whole section. Some of the fields might be before dataoff. */ < if (! bfd_get_section_contents (abfd, section, (PTR) data, < 0, dataoff + datasize)) < return false; < < adj = section->vma - extra->ImageBase; < < for (i = 0; i < datasize; i += onaline) < { < bfd_vma hint_addr; < bfd_vma time_stamp; < bfd_vma forward_chain; < bfd_vma dll_name; < bfd_vma first_thunk; < int idx = 0; < bfd_size_type j; < char *dll; < < /* print (i + extra->DataDirectory[1].VirtualAddress) */ < fprintf (file, " %08lx\t", (unsigned long) (i + adj + dataoff)); < < if (i + 20 > datasize) < { < /* Check stuff. */ < ; < } < < hint_addr = bfd_get_32 (abfd, data + i + dataoff); < time_stamp = bfd_get_32 (abfd, data + i + 4 + dataoff); < forward_chain = bfd_get_32 (abfd, data + i + 8 + dataoff); < dll_name = bfd_get_32 (abfd, data + i + 12 + dataoff); < first_thunk = bfd_get_32 (abfd, data + i + 16 + dataoff); < < fprintf (file, "%08lx %08lx %08lx %08lx %08lx\n", < (unsigned long) hint_addr, < (unsigned long) time_stamp, < (unsigned long) forward_chain, < (unsigned long) dll_name, < (unsigned long) first_thunk); < < if (hint_addr == 0 && first_thunk == 0) < break; < < dll = (char *) data + dll_name - adj; < fprintf (file, _("\n\tDLL Name: %s\n"), dll); < < if (hint_addr != 0) < { < fprintf (file, _("\tvma: Hint/Ord Member-Name\n")); < < idx = hint_addr - adj; < < for (j = 0; j < datasize; j += 4) < { < unsigned long member = bfd_get_32 (abfd, data + idx + j); < < if (member == 0) < break; < if (member & 0x80000000) < fprintf (file, "\t%04lx\t %4lu", member, < member & 0x7fffffff); < else < { < int ordinal; < char *member_name; < < ordinal = bfd_get_16 (abfd, data + member - adj); < member_name = (char *) data + member - adj + 2; < fprintf (file, "\t%04lx\t %4d %s", < member, ordinal, member_name); < } < < /* If the time stamp is not zero, the import address < table holds actual addresses. */ < if (time_stamp != 0 < && first_thunk != 0 < && first_thunk != hint_addr) < fprintf (file, "\t%04lx", < (long) bfd_get_32 (abfd, data + first_thunk - adj + j)); < < fprintf (file, "\n"); < } < } < < if (hint_addr != first_thunk && time_stamp == 0) < { < int differ = 0; < int idx2; < < idx2 = first_thunk - adj; < < for (j = 0; j < datasize; j += 4) < { < int ordinal; < char *member_name; < bfd_vma hint_member = 0; < bfd_vma iat_member; < < if (hint_addr != 0) < hint_member = bfd_get_32 (abfd, data + idx + j); < iat_member = bfd_get_32 (abfd, data + idx2 + j); < < if (hint_addr == 0 && iat_member == 0) < break; < < if (hint_addr == 0 || hint_member != iat_member) < { < if (differ == 0) < { < fprintf (file, < _("\tThe Import Address Table (difference found)\n")); < fprintf (file, _("\tvma: Hint/Ord Member-Name\n")); < differ = 1; < } < if (iat_member == 0) < { < fprintf (file, < _("\t>>> Ran out of IAT members!\n")); < } < else < { < ordinal = bfd_get_16 (abfd, data + iat_member - adj); < member_name = (char *) data + iat_member - adj + 2; < fprintf (file, "\t%04lx\t %4d %s\n", < (unsigned long) iat_member, < ordinal, < member_name); < } < } < < if (hint_addr != 0 && hint_member == 0) < break; < } < if (differ == 0) < { < fprintf (file, < _("\tThe Import Address Table is identical\n")); < } < } < < fprintf (file, "\n"); < < } < < free (data); < < return true; < } < < static boolean < pe_print_edata (abfd, vfile) < bfd *abfd; < PTR vfile; < { < FILE *file = (FILE *) vfile; < bfd_byte *data; < asection *section; < < bfd_size_type datasize = 0; < bfd_size_type dataoff; < bfd_size_type i; < < bfd_signed_vma adj; < struct EDT_type { < long export_flags; /* reserved - should be zero */ < long time_stamp; < short major_ver; < short minor_ver; < bfd_vma name; /* rva - relative to image base */ < long base; /* ordinal base */ < unsigned long num_functions; /* Number in the export address table */ < unsigned long num_names; /* Number in the name pointer table */ < bfd_vma eat_addr; /* rva to the export address table */ < bfd_vma npt_addr; /* rva to the Export Name Pointer Table */ < bfd_vma ot_addr; /* rva to the Ordinal Table */ < } edt; < < pe_data_type *pe = pe_data (abfd); < struct internal_extra_pe_aouthdr *extra = &pe->pe_opthdr; < < bfd_vma addr; < < addr = extra->DataDirectory[0].VirtualAddress; < < if (addr == 0 && extra->DataDirectory[0].Size == 0) < { < /* Maybe the extra header isn't there. Look for the section. */ < section = bfd_get_section_by_name (abfd, ".edata"); < if (section == NULL) < return true; < < addr = section->vma; < datasize = bfd_section_size (abfd, section); < if (datasize == 0) < return true; < } < else < { < addr += extra->ImageBase; < for (section = abfd->sections; section != NULL; section = section->next) < { < datasize = bfd_section_size (abfd, section); < if (addr >= section->vma && addr < section->vma + datasize) < break; < } < < if (section == NULL) < { < fprintf (file, < _("\nThere is an export table, but the section containing it could not be found\n")); < return true; < } < } < < fprintf (file, _("\nThere is an export table in %s at 0x%lx\n"), < section->name, (unsigned long) addr); < < dataoff = addr - section->vma; < datasize -= dataoff; < < data = (bfd_byte *) bfd_malloc (datasize); < if (data == NULL) < return false; < < if (! bfd_get_section_contents (abfd, section, (PTR) data, dataoff, < datasize)) < return false; < < /* Go get Export Directory Table. */ < edt.export_flags = bfd_get_32 (abfd, data + 0); < edt.time_stamp = bfd_get_32 (abfd, data + 4); < edt.major_ver = bfd_get_16 (abfd, data + 8); < edt.minor_ver = bfd_get_16 (abfd, data + 10); < edt.name = bfd_get_32 (abfd, data + 12); < edt.base = bfd_get_32 (abfd, data + 16); < edt.num_functions = bfd_get_32 (abfd, data + 20); < edt.num_names = bfd_get_32 (abfd, data + 24); < edt.eat_addr = bfd_get_32 (abfd, data + 28); < edt.npt_addr = bfd_get_32 (abfd, data + 32); < edt.ot_addr = bfd_get_32 (abfd, data + 36); < < adj = section->vma - extra->ImageBase + dataoff; < < /* Dump the EDT first first */ < fprintf (file, < _("\nThe Export Tables (interpreted %s section contents)\n\n"), < section->name); < < fprintf (file, < _("Export Flags \t\t\t%lx\n"), (unsigned long) edt.export_flags); < < fprintf (file, < _("Time/Date stamp \t\t%lx\n"), (unsigned long) edt.time_stamp); < < fprintf (file, < _("Major/Minor \t\t\t%d/%d\n"), edt.major_ver, edt.minor_ver); < < fprintf (file, < _("Name \t\t\t\t")); < fprintf_vma (file, edt.name); < fprintf (file, < " %s\n", data + edt.name - adj); < < fprintf (file, < _("Ordinal Base \t\t\t%ld\n"), edt.base); < < fprintf (file, < _("Number in:\n")); < < fprintf (file, < _("\tExport Address Table \t\t%08lx\n"), < edt.num_functions); < < fprintf (file, < _("\t[Name Pointer/Ordinal] Table\t%08lx\n"), edt.num_names); < < fprintf (file, < _("Table Addresses\n")); < < fprintf (file, < _("\tExport Address Table \t\t")); < fprintf_vma (file, edt.eat_addr); < fprintf (file, "\n"); < < fprintf (file, < _("\tName Pointer Table \t\t")); < fprintf_vma (file, edt.npt_addr); < fprintf (file, "\n"); < < fprintf (file, < _("\tOrdinal Table \t\t\t")); < fprintf_vma (file, edt.ot_addr); < fprintf (file, "\n"); < < /* The next table to find is the Export Address Table. It's basically < a list of pointers that either locate a function in this dll, or < forward the call to another dll. Something like: < typedef union { < long export_rva; < long forwarder_rva; < } export_address_table_entry; < */ < < fprintf (file, < _("\nExport Address Table -- Ordinal Base %ld\n"), < edt.base); < < for (i = 0; i < edt.num_functions; ++i) < { < bfd_vma eat_member = bfd_get_32 (abfd, < data + edt.eat_addr + (i * 4) - adj); < if (eat_member == 0) < continue; < < if (eat_member - adj <= datasize) < { < /* This rva is to a name (forwarding function) in our section. */ < /* Should locate a function descriptor. */ < fprintf (file, < "\t[%4ld] +base[%4ld] %04lx %s -- %s\n", < (long) i, < (long) (i + edt.base), < (unsigned long) eat_member, < _("Forwarder RVA"), < data + eat_member - adj); < } < else < { < /* Should locate a function descriptor in the reldata section. */ < fprintf (file, < "\t[%4ld] +base[%4ld] %04lx %s\n", < (long) i, < (long) (i + edt.base), < (unsigned long) eat_member, < _("Export RVA")); < } < } < < /* The Export Name Pointer Table is paired with the Export Ordinal Table. */ < /* Dump them in parallel for clarity. */ < fprintf (file, < _("\n[Ordinal/Name Pointer] Table\n")); < < for (i = 0; i < edt.num_names; ++i) < { < bfd_vma name_ptr = bfd_get_32 (abfd, < data + < edt.npt_addr < + (i*4) - adj); < < char *name = (char *) data + name_ptr - adj; < < bfd_vma ord = bfd_get_16 (abfd, < data + < edt.ot_addr < + (i*2) - adj); < fprintf (file, < "\t[%4ld] %s\n", (long) ord, name); < } < < free (data); < < return true; < } < < /* This really is architecture dependent. On IA-64, a .pdata entry < consists of three dwords containing relative virtual addresses that < specify the start and end address of the code range the entry < covers and the address of the corresponding unwind info data. */ < < static boolean < pe_print_pdata (abfd, vfile) < bfd *abfd; < PTR vfile; < { < #ifdef COFF_WITH_PEP64 < # define PDATA_ROW_SIZE (3*8) < #else < # define PDATA_ROW_SIZE (5*4) < #endif < FILE *file = (FILE *) vfile; < bfd_byte *data = 0; < asection *section = bfd_get_section_by_name (abfd, ".pdata"); < bfd_size_type datasize = 0; < bfd_size_type i; < bfd_size_type start, stop; < int onaline = PDATA_ROW_SIZE; < < if (section == NULL < || coff_section_data (abfd, section) == NULL < || pei_section_data (abfd, section) == NULL) < return true; < < stop = pei_section_data (abfd, section)->virt_size; < if ((stop % onaline) != 0) < fprintf (file, < _("Warning, .pdata section size (%ld) is not a multiple of %d\n"), < (long) stop, onaline); < < fprintf (file, < _("\nThe Function Table (interpreted .pdata section contents)\n")); < #ifdef COFF_WITH_PEP64 < fprintf (file, < _(" vma:\t\t\tBegin Address End Address Unwind Info\n")); < #else < fprintf (file, < _(" vma:\t\tBegin End EH EH PrologEnd Exception\n")); < fprintf (file, < _(" \t\tAddress Address Handler Data Address Mask\n")); < #endif < < if (bfd_section_size (abfd, section) == 0) < return true; < < data = (bfd_byte *) bfd_malloc ((size_t) bfd_section_size (abfd, section)); < datasize = bfd_section_size (abfd, section); < if (data == NULL && datasize != 0) < return false; < < bfd_get_section_contents (abfd, < section, < (PTR) data, 0, < bfd_section_size (abfd, section)); < < start = 0; < < for (i = start; i < stop; i += onaline) < { < bfd_vma begin_addr; < bfd_vma end_addr; < bfd_vma eh_handler; < bfd_vma eh_data; < bfd_vma prolog_end_addr; < int em_data; < < if (i + PDATA_ROW_SIZE > stop) < break; < < begin_addr = GET_PDATA_ENTRY (abfd, data + i ); < end_addr = GET_PDATA_ENTRY (abfd, data + i + 4); < eh_handler = GET_PDATA_ENTRY (abfd, data + i + 8); < eh_data = GET_PDATA_ENTRY (abfd, data + i + 12); < prolog_end_addr = GET_PDATA_ENTRY (abfd, data + i + 16); < < if (begin_addr == 0 && end_addr == 0 && eh_handler == 0 < && eh_data == 0 && prolog_end_addr == 0) < { < /* We are probably into the padding of the section now. */ < break; < } < < em_data = ((eh_handler & 0x1) << 2) | (prolog_end_addr & 0x3); < eh_handler &= ~(bfd_vma) 0x3; < prolog_end_addr &= ~(bfd_vma) 0x3; < < fputc (' ', file); < fprintf_vma (file, i + section->vma); fputc ('\t', file); < fprintf_vma (file, begin_addr); fputc (' ', file); < fprintf_vma (file, end_addr); fputc (' ', file); < fprintf_vma (file, eh_handler); < #ifndef COFF_WITH_PEP64 < fputc (' ', file); < fprintf_vma (file, eh_data); fputc (' ', file); < fprintf_vma (file, prolog_end_addr); < fprintf (file, " %x", em_data); < #endif < < #ifdef POWERPC_LE_PE < if (eh_handler == 0 && eh_data != 0) < { < /* Special bits here, although the meaning may be a little < mysterious. The only one I know for sure is 0x03. */ < /* Code Significance */ < /* 0x00 None */ < /* 0x01 Register Save Millicode */ < /* 0x02 Register Restore Millicode */ < /* 0x03 Glue Code Sequence */ < switch (eh_data) < { < case 0x01: < fprintf (file, _(" Register save millicode")); < break; < case 0x02: < fprintf (file, _(" Register restore millicode")); < break; < case 0x03: < fprintf (file, _(" Glue code sequence")); < break; < default: < break; < } < } < #endif < fprintf (file, "\n"); < } < < free (data); < < return true; < } < < #define IMAGE_REL_BASED_HIGHADJ 4 < static const char * const tbl[] = { < "ABSOLUTE", < "HIGH", < "LOW", < "HIGHLOW", < "HIGHADJ", < "MIPS_JMPADDR", < "SECTION", < "REL32", < "RESERVED1", < "MIPS_JMPADDR16", < "DIR64", < "HIGH3ADJ" < "UNKNOWN", /* MUST be last */ < }; < < static boolean < pe_print_reloc (abfd, vfile) < bfd *abfd; < PTR vfile; < { < FILE *file = (FILE *) vfile; < bfd_byte *data = 0; < asection *section = bfd_get_section_by_name (abfd, ".reloc"); < bfd_size_type datasize = 0; < bfd_size_type i; < bfd_size_type start, stop; < < if (section == NULL) < return true; < < if (bfd_section_size (abfd, section) == 0) < return true; < < fprintf (file, < _("\n\nPE File Base Relocations (interpreted .reloc section contents)\n")); < < data = (bfd_byte *) bfd_malloc ((size_t) bfd_section_size (abfd, section)); < datasize = bfd_section_size (abfd, section); < if (data == NULL && datasize != 0) < return false; < < bfd_get_section_contents (abfd, < section, < (PTR) data, 0, < bfd_section_size (abfd, section)); < < start = 0; < < stop = bfd_section_size (abfd, section); < < for (i = start; i < stop;) < { < int j; < bfd_vma virtual_address; < long number, size; < < /* The .reloc section is a sequence of blocks, with a header consisting < of two 32 bit quantities, followed by a number of 16 bit entries */ < < virtual_address = bfd_get_32 (abfd, data+i); < size = bfd_get_32 (abfd, data+i+4); < number = (size - 8) / 2; < < if (size == 0) < { < break; < } < < fprintf (file, < _("\nVirtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"), < (unsigned long) virtual_address, size, size, number); < < for (j = 0; j < number; ++j) < { < unsigned short e = bfd_get_16 (abfd, data + i + 8 + j * 2); < unsigned int t = (e & 0xF000) >> 12; < int off = e & 0x0FFF; < < if (t >= sizeof (tbl) / sizeof (tbl[0])) < t = (sizeof (tbl) / sizeof (tbl[0])) - 1; < < fprintf (file, < _("\treloc %4d offset %4x [%4lx] %s"), < j, off, (long) (off + virtual_address), tbl[t]); < < /* HIGHADJ takes an argument, - the next record *is* the < low 16 bits of addend. */ < if (t == IMAGE_REL_BASED_HIGHADJ) < { < fprintf (file, " (%4x)", < ((unsigned int) < bfd_get_16 (abfd, data + i + 8 + j * 2 + 2))); < j++; < } < < fprintf (file, "\n"); < } < i += size; < } < < free (data); < < return true; < } < < /* Print out the program headers. */ < < boolean < _bfd_pe_print_private_bfd_data_common (abfd, vfile) < bfd *abfd; < PTR vfile; < { < FILE *file = (FILE *) vfile; < int j; < pe_data_type *pe = pe_data (abfd); < struct internal_extra_pe_aouthdr *i = &pe->pe_opthdr; < const char *subsystem_name = NULL; < < /* The MS dumpbin program reportedly ands with 0xff0f before < printing the characteristics field. Not sure why. No reason to < emulate it here. */ < fprintf (file, _("\nCharacteristics 0x%x\n"), pe->real_flags); < #undef PF < #define PF(x, y) if (pe->real_flags & x) { fprintf (file, "\t%s\n", y); } < PF (F_RELFLG, "relocations stripped"); < PF (F_EXEC, "executable"); < PF (F_LNNO, "line numbers stripped"); < PF (F_LSYMS, "symbols stripped"); < PF (0x80, "little endian"); < PF (F_AR32WR, "32 bit words"); < PF (0x200, "debugging information removed"); < PF (0x1000, "system file"); < PF (F_DLL, "DLL"); < PF (0x8000, "big endian"); < #undef PF < < /* ctime implies '\n'. */ < fprintf (file, "\nTime/Date\t\t%s", ctime (&pe->coff.timestamp)); < fprintf (file, "\nImageBase\t\t"); < fprintf_vma (file, i->ImageBase); < fprintf (file, "\nSectionAlignment\t"); < fprintf_vma (file, i->SectionAlignment); < fprintf (file, "\nFileAlignment\t\t"); < fprintf_vma (file, i->FileAlignment); < fprintf (file, "\nMajorOSystemVersion\t%d\n", i->MajorOperatingSystemVersion); < fprintf (file, "MinorOSystemVersion\t%d\n", i->MinorOperatingSystemVersion); < fprintf (file, "MajorImageVersion\t%d\n", i->MajorImageVersion); < fprintf (file, "MinorImageVersion\t%d\n", i->MinorImageVersion); < fprintf (file, "MajorSubsystemVersion\t%d\n", i->MajorSubsystemVersion); < fprintf (file, "MinorSubsystemVersion\t%d\n", i->MinorSubsystemVersion); < fprintf (file, "Win32Version\t\t%08lx\n", i->Reserved1); < fprintf (file, "SizeOfImage\t\t%08lx\n", i->SizeOfImage); < fprintf (file, "SizeOfHeaders\t\t%08lx\n", i->SizeOfHeaders); < fprintf (file, "CheckSum\t\t%08lx\n", i->CheckSum); < switch (i->Subsystem) < { < case IMAGE_SUBSYSTEM_UNKNOWN: < subsystem_name = "unspecified"; < break; < case IMAGE_SUBSYSTEM_NATIVE: < subsystem_name = "NT native"; < break; < case IMAGE_SUBSYSTEM_WINDOWS_GUI: < subsystem_name = "Windows GUI"; < break; < case IMAGE_SUBSYSTEM_WINDOWS_CUI: < subsystem_name = "Windows CUI"; < break; < case IMAGE_SUBSYSTEM_POSIX_CUI: < subsystem_name = "POSIX CUI"; < break; < case IMAGE_SUBSYSTEM_WINDOWS_CE_GUI: < subsystem_name = "Wince CUI"; < break; < case IMAGE_SUBSYSTEM_EFI_APPLICATION: < subsystem_name = "EFI application"; < break; < case IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER: < subsystem_name = "EFI boot service driver"; < break; < case IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER: < subsystem_name = "EFI runtime driver"; < break; < } < fprintf (file, "Subsystem\t\t%08x", i->Subsystem); < if (subsystem_name) < fprintf (file, "\t(%s)", subsystem_name); < fprintf (file, "\nDllCharacteristics\t%08x\n", i->DllCharacteristics); < fprintf (file, "SizeOfStackReserve\t"); < fprintf_vma (file, i->SizeOfStackReserve); < fprintf (file, "\nSizeOfStackCommit\t"); < fprintf_vma (file, i->SizeOfStackCommit); < fprintf (file, "\nSizeOfHeapReserve\t"); < fprintf_vma (file, i->SizeOfHeapReserve); < fprintf (file, "\nSizeOfHeapCommit\t"); < fprintf_vma (file, i->SizeOfHeapCommit); < fprintf (file, "\nLoaderFlags\t\t%08lx\n", i->LoaderFlags); < fprintf (file, "NumberOfRvaAndSizes\t%08lx\n", i->NumberOfRvaAndSizes); < < fprintf (file, "\nThe Data Directory\n"); < for (j = 0; j < IMAGE_NUMBEROF_DIRECTORY_ENTRIES; j++) < { < fprintf (file, "Entry %1x ", j); < fprintf_vma (file, i->DataDirectory[j].VirtualAddress); < fprintf (file, " %08lx ", i->DataDirectory[j].Size); < fprintf (file, "%s\n", dir_names[j]); < } < < pe_print_idata (abfd, vfile); < pe_print_edata (abfd, vfile); < pe_print_pdata (abfd, vfile); < pe_print_reloc (abfd, vfile); < < return true; < } < < /* Copy any private info we understand from the input bfd < to the output bfd. */ < < boolean < _bfd_pe_bfd_copy_private_bfd_data_common (ibfd, obfd) < bfd *ibfd, *obfd; < { < /* One day we may try to grok other private data. */ < if (ibfd->xvec->flavour != bfd_target_coff_flavour < || obfd->xvec->flavour != bfd_target_coff_flavour) < return true; < < pe_data (obfd)->pe_opthdr = pe_data (ibfd)->pe_opthdr; < pe_data (obfd)->dll = pe_data (ibfd)->dll; < < /* for strip: if we removed .reloc, we'll make a real mess of things < if we don't remove this entry as well. */ < if (! pe_data (obfd)->has_reloc_section) < { < pe_data (obfd)->pe_opthdr.DataDirectory[5].VirtualAddress = 0; < pe_data (obfd)->pe_opthdr.DataDirectory[5].Size = 0; < } < return true; < } < < /* Copy private section data. */ < boolean < _bfd_pe_bfd_copy_private_section_data (ibfd, isec, obfd, osec) < bfd *ibfd; < asection *isec; < bfd *obfd; < asection *osec; < { < if (bfd_get_flavour (ibfd) != bfd_target_coff_flavour < || bfd_get_flavour (obfd) != bfd_target_coff_flavour) < return true; < < if (coff_section_data (ibfd, isec) != NULL < && pei_section_data (ibfd, isec) != NULL) < { < if (coff_section_data (obfd, osec) == NULL) < { < osec->used_by_bfd = < (PTR) bfd_zalloc (obfd, sizeof (struct coff_section_tdata)); < if (osec->used_by_bfd == NULL) < return false; < } < if (pei_section_data (obfd, osec) == NULL) < { < coff_section_data (obfd, osec)->tdata = < (PTR) bfd_zalloc (obfd, sizeof (struct pei_section_tdata)); < if (coff_section_data (obfd, osec)->tdata == NULL) < return false; < } < pei_section_data (obfd, osec)->virt_size = < pei_section_data (ibfd, isec)->virt_size; < pei_section_data (obfd, osec)->pe_flags = < pei_section_data (ibfd, isec)->pe_flags; < } < < return true; < } < < void < _bfd_pe_get_symbol_info (abfd, symbol, ret) < bfd *abfd; < asymbol *symbol; < symbol_info *ret; < { < coff_get_symbol_info (abfd, symbol, ret); < < if (pe_data (abfd) != NULL < && ((symbol->flags & BSF_DEBUGGING) == 0 < || (symbol->flags & BSF_DEBUGGING_RELOC) != 0) < && ! bfd_is_abs_section (symbol->section)) < ret->value += pe_data (abfd)->pe_opthdr.ImageBase; < } < < /* Handle the .idata section and other things that need symbol table < access. */ < < boolean < _bfd_pei_final_link_postscript (abfd, pfinfo) < bfd *abfd; < struct coff_final_link_info *pfinfo; < { < struct coff_link_hash_entry *h1; < struct bfd_link_info *info = pfinfo->info; < < /* There are a few fields that need to be filled in now while we < have symbol table access. < < The .idata subsections aren't directly available as sections, but < they are in the symbol table, so get them from there. */ < < /* The import directory. This is the address of .idata$2, with size < of .idata$2 + .idata$3. */ < h1 = coff_link_hash_lookup (coff_hash_table (info), < ".idata$2", false, false, true); < if (h1 != NULL) < { < pe_data (abfd)->pe_opthdr.DataDirectory[1].VirtualAddress = < (h1->root.u.def.value < + h1->root.u.def.section->output_section->vma < + h1->root.u.def.section->output_offset); < h1 = coff_link_hash_lookup (coff_hash_table (info), < ".idata$4", false, false, true); < pe_data (abfd)->pe_opthdr.DataDirectory[1].Size = < ((h1->root.u.def.value < + h1->root.u.def.section->output_section->vma < + h1->root.u.def.section->output_offset) < - pe_data (abfd)->pe_opthdr.DataDirectory[1].VirtualAddress); < < /* The import address table. This is the size/address of < .idata$5. */ < h1 = coff_link_hash_lookup (coff_hash_table (info), < ".idata$5", false, false, true); < pe_data (abfd)->pe_opthdr.DataDirectory[12].VirtualAddress = < (h1->root.u.def.value < + h1->root.u.def.section->output_section->vma < + h1->root.u.def.section->output_offset); < h1 = coff_link_hash_lookup (coff_hash_table (info), < ".idata$6", false, false, true); < pe_data (abfd)->pe_opthdr.DataDirectory[12].Size = < ((h1->root.u.def.value < + h1->root.u.def.section->output_section->vma < + h1->root.u.def.section->output_offset) < - pe_data (abfd)->pe_opthdr.DataDirectory[12].VirtualAddress); < } < < /* If we couldn't find idata$2, we either have an excessively < trivial program or are in DEEP trouble; we have to assume trivial < program.... */ < return true; < } diff -rN binutils-2.11/bfd/po/Make-in binutils-2.11.2/bfd/po/Make-in 49c49 < DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ --- > DISTFILES = ChangeLog Makefile.in.in SRC-POTFILES.in BLD-POTFILES.in $(PACKAGE).pot \ 52c52,58 < POTFILES = \ --- > # Note - the following line gets processed by bfd/configure and amended > # to contain the full list of source dir POTFILES. > SRC-POTFILES = \ > > # Note - the following line gets processed by bfd/configure and amended > # to contain the full list of build dir POTFILES. > BLD-POTFILES = \ 85,86c91,93 < $(srcdir)/$(PACKAGE).pot: $(POTFILES) < $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ --- > $(srcdir)/$(PACKAGE).pot: $(SRC-POTFILES) $(BLD-POTFILES) > $(XGETTEXT) --default-domain=$(PACKAGE) \ > --directory=$(top_srcdir) \ 88c95,101 < --files-from=$(srcdir)/POTFILES.in --- > --files-from=$(srcdir)/SRC-POTFILES.in > $(XGETTEXT) --default-domain=$(PACKAGE) \ > --directory=.. \ > --directory=. \ > --add-comments --keyword=_ --keyword=N_ \ > --join-existing \ > --files-from=$(srcdir)/BLD-POTFILES.in 194c207,208 < rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m --- > rm -f Makefile Makefile.in *.mo *.msg *.cat *.cat.m > rm -f SRC-POTFILES BLD-POTFILES SRC-POTFILES.in BLD-POTFILES.in 228c242 < POTFILES: POTFILES.in --- > SRC-POTFILES: SRC-POTFILES.in 235c249,250 < && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ --- > && (sed -e '/^#/d' \ > -e '/^[ ]*$$/d' \ 241,242c256,269 < POTFILES.in: @MAINT@ ../Makefile < cd .. && $(MAKE) po/POTFILES.in --- > BLD-POTFILES: BLD-POTFILES.in > ( rm -f $@-t $@ \ > && (sed -e '/^#/d' \ > -e '/^[ ]*$$/d' \ > -e "s@.*@ ../& \\\\@" < $(srcdir)/$@.in \ > | sed -e '$$s/\\$$//') > $@-t \ > && chmod a-w $@-t \ > && mv $@-t $@ ) > > SRC-POTFILES.in: @MAINT@ ../Makefile > cd .. && $(MAKE) po/SRC-POTFILES.in > > BLD-POTFILES.in: @MAINT@ ../Makefile > cd .. && $(MAKE) po/BLD-POTFILES.in 244c271,283 < Makefile: Make-in ../config.status POTFILES --- > # Note - The presence of SRC-POTFILES and BLD-POTFILES as dependencies > # here breaks the implementation of the 'distclean' rule for maintainers. > # This is because if 'make distclean' is run in the BFD directory, the > # Makefile there will be deleted before 'distclean' is made here, and so > # the dependency SRC-POTFILES -> SRC-POTFILES.in -> ../Makefile cannot > # be satisfied. > # > # The SRC-POTFILES and BLD-POTFILES dependencies cannot be removed, > # however since it is necessary that these files be built during > # *configure* time, so that configure can insert them into the > # po/Makefile that it is creating, so that the Makefile will have > # the correct dependencies. > Makefile: Make-in ../config.status SRC-POTFILES BLD-POTFILES diff -rN binutils-2.11/bfd/po/POTFILES.in binutils-2.11.2/bfd/po/POTFILES.in 1,255d0 < aix386-core.c < aout0.c < aout32.c < aout64.c < aout-adobe.c < aout-arm.c < aout-cris.c < aoutf1.h < aout-ns32k.c < aout-sparcle.c < aout-target.h < aout-tic30.c < aoutx.h < archive.c < archures.c < armnetbsd.c < bfd.c < binary.c < bout.c < cache.c < cf-i386lynx.c < cf-m68klynx.c < cf-sparclynx.c < cisco-core.c < coff64-rs6000.c < coff-a29k.c < coff-alpha.c < coff-apollo.c < coff-arm.c < coff-aux.c < coffcode.h < coffgen.c < coff-go32.c < coff-h8300.c < coff-h8500.c < coff-i386.c < coff-i860.c < coff-i960.c < cofflink.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 < coffswap.h < coff-tic30.c < coff-tic54x.c < coff-tic80.c < coff-u68k.c < coff-w65.c < coff-we32k.c < coff-z8k.c < corefile.c < cpu-a29k.c < cpu-alpha.c < cpu-arc.c < cpu-arm.c < cpu-avr.c < cpu-cris.c < cpu-d10v.c < cpu-d30v.c < cpu-fr30.c < cpu-h8300.c < cpu-h8500.c < cpu-hppa.c < cpu-i370.c < cpu-i386.c < cpu-i860.c < cpu-i960.c < cpu-ia64.c < cpu-m10200.c < cpu-m10300.c < cpu-m32r.c < cpu-m68hc11.c < cpu-m68hc12.c < cpu-m68k.c < cpu-m88k.c < cpu-mcore.c < cpu-mips.c < cpu-ns32k.c < cpu-pj.c < cpu-powerpc.c < cpu-rs6000.c < cpu-sh.c < cpu-sparc.c < cpu-tic30.c < cpu-tic54x.c < cpu-tic80.c < cpu-v850.c < cpu-vax.c < cpu-w65.c < cpu-we32k.c < cpu-z8k.c < demo64.c < dwarf1.c < dwarf2.c < ecoff.c < ecofflink.c < ecoffswap.h < efi-app-ia32.c < efi-app-ia64.c < elf32-arc.c < elf32-arm.h < elf32-avr.c < elf32.c < elf32-cris.c < elf32-d10v.c < elf32-d30v.c < elf32-fr30.c < elf32-gen.c < elf32-hppa.c < elf32-hppa.h < elf32-i370.c < elf32-i386.c < elf32-i860.c < elf32-i960.c < elf32-m32r.c < elf32-m68hc11.c < elf32-m68hc12.c < elf32-m68k.c < elf32-m88k.c < elf32-mcore.c < elf32-mips.c < elf32-pj.c < elf32-ppc.c < elf32-sh.c < elf32-sh-lin.c < elf32-sparc.c < elf32-v850.c < elf64-alpha.c < elf64.c < elf64-gen.c < elf64-hppa.c < elf64-hppa.h < elf64-mips.c < elf64-sparc.c < elf64-x86-64.c < elfarm-nabi.c < elfarm-oabi.c < elf-bfd.h < elf.c < elfcode.h < elfcore.h < elf-hppa.h < elflink.c < elflink.h < elf-m10200.c < elf-m10300.c < epoc-pe-arm.c < epoc-pei-arm.c < format.c < freebsd.h < genlink.h < go32stub.h < hash.c < hp300bsd.c < hp300hpux.c < hpux-core.c < i386aout.c < i386bsd.c < i386dynix.c < i386freebsd.c < i386linux.c < i386lynx.c < i386mach3.c < i386msdos.c < i386netbsd.c < i386os9k.c < ieee.c < ihex.c < init.c < irix-core.c < libaout.h < libbfd.c < libbfd.h < libcoff.h < libecoff.h < libhppa.h < libieee.h < libnlm.h < liboasys.h < libpei.h < linker.c < lynx-core.c < m68k4knetbsd.c < m68klinux.c < m68klynx.c < m68knetbsd.c < m88kmach3.c < mipsbsd.c < netbsd.h < newsos3.c < nlm32-alpha.c < nlm32.c < nlm32-i386.c < nlm32-ppc.c < nlm32-sparc.c < nlm64.c < nlm.c < nlmcode.h < nlmswap.h < nlm-target.h < ns32k.h < ns32knetbsd.c < oasys.c < opncls.c < osf-core.c < pc532-mach.c < pe-arm.c < pe-i386.c < pei-arm.c < peicode.h < peigen.c < pei-i386.c < pei-mcore.c < pei-mips.c < pei-ppc.c < pei-sh.c < pe-mcore.c < pe-mips.c < pe-ppc.c < pe-sh.c < ppcboot.c < reloc16.c < reloc.c < riscix.c < sco5-core.c < section.c < som.c < som.h < sparclinux.c < sparclynx.c < sparcnetbsd.c < srec.c < stabs.c < stab-syms.c < sunos.c < syms.c < targets.c < tekhex.c < trad-core.c < vaxnetbsd.c < versados.c < vms.c < vms-gsd.c < vms.h < vms-hdr.c < vms-misc.c < vms-tir.c < xcofflink.c < xcoff-target.h diff -rN binutils-2.11/bfd/ppcboot.c binutils-2.11.2/bfd/ppcboot.c 2c2,3 < Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/ptrace-core.c binutils-2.11.2/bfd/ptrace-core.c 2c2,3 < Copyright 1993, 94, 95, 96, 1998 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/reloc.c binutils-2.11.2/bfd/reloc.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 1801a1803,1804 > BFD_RELOC_SPARC_UA16 > ENUMX 1802a1806,1807 > ENUMX > BFD_RELOC_SPARC_UA64 2038a2044,2065 > ENUMX > BFD_RELOC_MIPS_SHIFT5 > ENUMX > BFD_RELOC_MIPS_SHIFT6 > ENUMX > BFD_RELOC_MIPS_INSERT_A > ENUMX > BFD_RELOC_MIPS_INSERT_B > ENUMX > BFD_RELOC_MIPS_DELETE > ENUMX > BFD_RELOC_MIPS_HIGHEST > ENUMX > BFD_RELOC_MIPS_HIGHER > ENUMX > BFD_RELOC_MIPS_SCN_DISP > ENUMX > BFD_RELOC_MIPS_REL16 > ENUMX > BFD_RELOC_MIPS_RELGOT > ENUMX > BFD_RELOC_MIPS_JALR diff -rN binutils-2.11/bfd/reloc16.c binutils-2.11.2/bfd/reloc16.c 2c2 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000 diff -rN binutils-2.11/bfd/riscix.c binutils-2.11.2/bfd/riscix.c 2c2 < Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 --- > Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001 diff -rN binutils-2.11/bfd/rs6000-core.c binutils-2.11.2/bfd/rs6000-core.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, > 2001 34,35c35 < system include files that conflict with coff/rs6000.h. < */ --- > system include files that conflict with coff/rs6000.h. */ 110c110 < struct core_dumpx new; /* new AIX 4.3+ core dump */ --- > struct core_dumpx new; /* new AIX 4.3+ core dump */ 112c112 < struct core_dump new; /* for simpler coding */ --- > struct core_dump new; /* for simpler coding */ 114c114 < struct core_dump old; /* old AIX 4.2- core dump, still used on --- > struct core_dump old; /* old AIX 4.2- core dump, still used on 123c123 < struct vm_infox new; --- > struct vm_infox new; 125c125 < struct vm_info new; --- > struct vm_info new; 127c127 < struct vm_info old; --- > struct vm_info old; 250,251c250,251 < #define CORE_COMMONSZ ((int)&((struct core_dump *)0)->c_entries + \ < sizeof (((struct core_dump *)0)->c_entries)) --- > #define CORE_COMMONSZ ((int) &((struct core_dump *) 0)->c_entries \ > + sizeof (((struct core_dump *) 0)->c_entries)) 272c272 < return bfd_read ((char *)core + CORE_COMMONSZ, size, 1, abfd) == size; --- > return bfd_read ((char *) core + CORE_COMMONSZ, size, 1, abfd) == size; 363c363 < c_regoff = (char *)c_regptr - (char *)&core; --- > c_regoff = (char *) c_regptr - (char *) &core; 381c381 < of the ulimit, it's based on SA_FULLDUMP). But for the stack segment, --- > of the ulimit, it's based on SA_FULLDUMP). But for the stack segment, 400c400 < additional shared library sections in a full core. */ --- > additional shared library sections in a full core. */ 425c425 < /* Allocate core file header. */ --- > /* Allocate core file header. */ 427c427 < tmpptr = (char*) bfd_zalloc (abfd, size); --- > tmpptr = (char *) bfd_zalloc (abfd, size); 453c453 < } --- > } 484c484 < the .data section. */ --- > the .data section. */ 540c540 < size = (int) ((LdInfo *)0)->l64.ldinfo_filename; --- > size = (int) ((LdInfo *) 0)->l64.ldinfo_filename; 542c542 < size = (int) ((LdInfo *)0)->l32.ldinfo_filename; --- > size = (int) ((LdInfo *) 0)->l32.ldinfo_filename; 570c570 < return NULL; --- > return NULL; 620c620 < return abfd->xvec; /* this is garbage for now. */ --- > return abfd->xvec; /* This is garbage for now. */ 623c623,624 < /* return `true' if given core is from the given executable.. */ --- > /* Return `true' if given core is from the given executable. */ > 646c647 < size = (int) ((LdInfo *)0)->l64.ldinfo_filename; --- > size = (int) ((LdInfo *) 0)->l64.ldinfo_filename; 648c649 < size = (int) ((LdInfo *)0)->l32.ldinfo_filename; --- > size = (int) ((LdInfo *) 0)->l32.ldinfo_filename; diff -rN binutils-2.11/bfd/sco5-core.c binutils-2.11.2/bfd/sco5-core.c 2c2 < Copyright 1998 Free Software Foundation, Inc. --- > Copyright 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/section.c binutils-2.11.2/bfd/section.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 364a366,369 > . {* Another mark flag used by some of the linker backends. Set for > . output sections that have a input section. *} > . unsigned int linker_has_input : 1; > . 567,568c572,576 < /* linker_mark, gc_mark, segment_mark, vma, lma, _cooked_size, */ \ < 0, 1, 0, 0, 0, 0, \ --- > /* linker_mark, linker_has_input, gc_mark, segment_mark, */ \ > 0, 0, 1, 0, \ > \ > /* vma, lma, _cooked_size, _raw_size, */ \ > 0, 0, 0, 0, \ 570,571c578,579 < /* _raw_size, output_offset, output_section, alignment_power, */ \ < 0, 0, (struct sec *) &SEC, 0, \ --- > /* output_offset, output_section, alignment_power, */ \ > 0, (struct sec *) &SEC, 0, \ 1205a1214,1218 > > /* Handle a section that wasn't output. */ > if (os == NULL) > return; > diff -rN binutils-2.11/bfd/som.c binutils-2.11.2/bfd/som.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 diff -rN binutils-2.11/bfd/som.h binutils-2.11.2/bfd/som.h 2c2 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1998 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000 diff -rN binutils-2.11/bfd/sparclinux.c binutils-2.11.2/bfd/sparclinux.c 2c2 < Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2000 diff -rN binutils-2.11/bfd/sparclynx.c binutils-2.11.2/bfd/sparclynx.c 2c2 < Copyright (C) 1990, 91, 92, 93, 94, 95, 97, 1998 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000 diff -rN binutils-2.11/bfd/sparcnetbsd.c binutils-2.11.2/bfd/sparcnetbsd.c 2c2,3 < Copyright (C) 1990, 91, 92, 94, 95, 97, 1998 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1994, 1995, 1997, 1998, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/srec.c binutils-2.11.2/bfd/srec.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000 diff -rN binutils-2.11/bfd/stab-syms.c binutils-2.11.2/bfd/stab-syms.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. --- > Copyright 1990, 1991, 1992, 1994, 1995, 1996, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/stabs.c binutils-2.11.2/bfd/stabs.c 2c2 < Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/sunos.c binutils-2.11.2/bfd/sunos.c 2c2 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000 diff -rN binutils-2.11/bfd/syms.c binutils-2.11.2/bfd/syms.c 2c2,3 < Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000 diff -rN binutils-2.11/bfd/sysdep.h binutils-2.11.2/bfd/sysdep.h 2c2,3 < Copyright 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1997, 1998, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/targets.c binutils-2.11.2/bfd/targets.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 562a564,565 > extern const bfd_target bfd_elf64_tradbigmips_vec; > extern const bfd_target bfd_elf64_tradlittlemips_vec; 685c688 < const bfd_target * const bfd_target_vector[] = { --- > static const bfd_target * const _bfd_target_vector[] = { 765d767 < &bfd_elf32_sparc_vec, 769a772 > &bfd_elf32_sparc_vec, 776c779,782 < #ifdef BFD64 /* No one seems to use this. */ --- > #ifdef BFD64 > &bfd_elf64_tradbigmips_vec, > &bfd_elf64_tradlittlemips_vec, > /* No one seems to use this. */ 973a980 > const bfd_target * const *bfd_target_vector = _bfd_target_vector; 988c995 < const size_t _bfd_target_vector_entries = sizeof (bfd_target_vector)/sizeof (*bfd_target_vector); --- > const size_t _bfd_target_vector_entries = sizeof (_bfd_target_vector)/sizeof (*_bfd_target_vector); diff -rN binutils-2.11/bfd/tekhex.c binutils-2.11.2/bfd/tekhex.c 2c2 < Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000 diff -rN binutils-2.11/bfd/trad-core.c binutils-2.11.2/bfd/trad-core.c 2c2,3 < Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 98, 99, 2000 --- > Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, > 2000 diff -rN binutils-2.11/bfd/vaxnetbsd.c binutils-2.11.2/bfd/vaxnetbsd.c 2c2 < Copyright (C) 1998 Free Software Foundation, Inc. --- > Copyright 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/versados.c binutils-2.11.2/bfd/versados.c 2c2 < Copyright 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/vms-gsd.c binutils-2.11.2/bfd/vms-gsd.c 3c3 < Copyright 1996, 1997, 1998, 1999 Free Software Foundation Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/vms-hdr.c binutils-2.11.2/bfd/vms-hdr.c 3c3 < Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/vms-misc.c binutils-2.11.2/bfd/vms-misc.c 3c3,4 < Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 169d169 < 213d212 < 290c289 < if (PRIV(buf_size) == 0) --- > if (PRIV (buf_size) == 0) 292c291 < if (PRIV(is_vax)) --- > if (PRIV (is_vax)) 294,296c293,295 < PRIV(vms_buf) = (unsigned char *) malloc (OBJ_S_C_MAXRECSIZ); < PRIV(buf_size) = OBJ_S_C_MAXRECSIZ; < PRIV(file_format) = FF_VAX; --- > PRIV (vms_buf) = (unsigned char *) malloc (OBJ_S_C_MAXRECSIZ); > PRIV (buf_size) = OBJ_S_C_MAXRECSIZ; > PRIV (file_format) = FF_VAX; 299c298 < PRIV(vms_buf) = (unsigned char *) malloc (6); --- > PRIV (vms_buf) = (unsigned char *) malloc (6); 302c301 < vms_buf = PRIV(vms_buf); --- > vms_buf = PRIV (vms_buf); 310c309 < switch (PRIV(file_format)) --- > switch (PRIV (file_format)) 334c333 < if (bfd_read (PRIV(vms_buf), 1, 1, abfd) != 1) --- > if (bfd_read (PRIV (vms_buf), 1, 1, abfd) != 1) 344c343 < && (bfd_read (PRIV(vms_buf), 1, test_len, abfd) --- > && (bfd_read (PRIV (vms_buf), 1, test_len, abfd) 353c352 < if (PRIV(file_format) == FF_UNKNOWN) --- > if (PRIV (file_format) == FF_UNKNOWN) 358c357 < PRIV(file_format) = FF_FOREIGN; /* Y: foreign environment */ --- > PRIV (file_format) = FF_FOREIGN; /* Y: foreign environment */ 363c362 < PRIV(file_format) = FF_NATIVE; /* N: native environment */ --- > PRIV (file_format) = FF_NATIVE; /* N: native environment */ 368c367 < if (PRIV(is_vax)) --- > if (PRIV (is_vax)) 370,371c369,370 < PRIV(rec_length) = bfd_read (vms_buf, 1, PRIV(buf_size), abfd); < if (PRIV(rec_length) <= 0) --- > PRIV (rec_length) = bfd_read (vms_buf, 1, PRIV (buf_size), abfd); > if (PRIV (rec_length) <= 0) 376c375 < PRIV(vms_rec) = vms_buf; --- > PRIV (vms_rec) = vms_buf; 383c382 < &PRIV(rec_length)); --- > &PRIV (rec_length)); 385c384 < if (PRIV(rec_length) <= 0) --- > if (PRIV (rec_length) <= 0) 393c392 < if (PRIV(rec_length) > EOBJ_S_C_MAXRECSIZ) --- > if (PRIV (rec_length) > EOBJ_S_C_MAXRECSIZ) 401c400 < if (PRIV(rec_length) > PRIV(buf_size)) --- > if (PRIV (rec_length) > PRIV (buf_size)) 403,404c402,403 < PRIV(vms_buf) = (unsigned char *) realloc (vms_buf, PRIV(rec_length)); < vms_buf = PRIV(vms_buf); --- > PRIV (vms_buf) = (unsigned char *) realloc (vms_buf, PRIV (rec_length)); > vms_buf = PRIV (vms_buf); 410c409 < PRIV(buf_size) = PRIV(rec_length); --- > PRIV (buf_size) = PRIV (rec_length); 415c414 < remaining = PRIV(rec_length) - test_len + test_start; --- > remaining = PRIV (rec_length) - test_len + test_start; 426c425 < PRIV(vms_rec) = vms_buf + test_start; --- > PRIV (vms_rec) = vms_buf + test_start; 430c429 < vms_debug (11, "bfd_read rec_length %d\n", PRIV(rec_length)); --- > vms_debug (11, "bfd_read rec_length %d\n", PRIV (rec_length)); 433c432 < return PRIV(rec_length); --- > return PRIV (rec_length); 445c444 < PRIV(rec_length), PRIV(rec_size)); --- > PRIV (rec_length), PRIV (rec_size)); 448c447 < if (PRIV(rec_length) > 0) --- > if (PRIV (rec_length) > 0) 450c449 < PRIV(vms_rec) += PRIV(rec_size); --- > PRIV (vms_rec) += PRIV (rec_size); 458,459c457,458 < if (!PRIV(vms_rec) || !PRIV(vms_buf) < || PRIV(vms_rec) >= (PRIV(vms_buf) + PRIV(buf_size))) --- > if (!PRIV (vms_rec) || !PRIV (vms_buf) > || PRIV (vms_rec) >= (PRIV (vms_buf) + PRIV (buf_size))) 462c461 < if (PRIV(is_vax)) --- > if (PRIV (is_vax)) 464,465c463,464 < PRIV(rec_type) = *(PRIV(vms_rec)); < PRIV(rec_size) = PRIV(rec_length); --- > PRIV (rec_type) = *(PRIV (vms_rec)); > PRIV (rec_size) = PRIV (rec_length); 469,470c468,469 < _bfd_vms_get_header_values (abfd, PRIV(vms_rec), &PRIV(rec_type), < &PRIV(rec_size)); --- > _bfd_vms_get_header_values (abfd, PRIV (vms_rec), &PRIV (rec_type), > &PRIV (rec_size)); 472c471 < PRIV(rec_length) -= PRIV(rec_size); --- > PRIV (rec_length) -= PRIV (rec_size); 476,477c475,476 < PRIV(vms_rec), PRIV(rec_size), PRIV(rec_length), < PRIV(rec_type)); --- > PRIV (vms_rec), PRIV (rec_size), PRIV (rec_length), > PRIV (rec_type)); 480c479 < return PRIV(rec_type); --- > return PRIV (rec_type); 482d480 < 513d510 < 528c525 < vms_debug (4, "\n", val, psect, PRIV(stackptr)); --- > vms_debug (4, "\n", val, psect, PRIV (stackptr)); 534,537c531,534 < PRIV(stack[PRIV(stackptr)]).value = val; < PRIV(stack[PRIV(stackptr)]).psect = last_psect; < PRIV(stackptr)++; < if (PRIV(stackptr) >= STACKSIZE) --- > PRIV (stack[PRIV (stackptr)]).value = val; > PRIV (stack[PRIV (stackptr)]).psect = last_psect; > PRIV (stackptr)++; > if (PRIV (stackptr) >= STACKSIZE) 540c537 < (*_bfd_error_handler) (_("Stack overflow (%d) in _bfd_vms_push"), PRIV(stackptr)); --- > (*_bfd_error_handler) (_("Stack overflow (%d) in _bfd_vms_push"), PRIV (stackptr)); 555c552 < if (PRIV(stackptr) == 0) --- > if (PRIV (stackptr) == 0) 561,564c558,561 < PRIV(stackptr)--; < value = PRIV(stack[PRIV(stackptr)]).value; < if ((psect != NULL) && (PRIV(stack[PRIV(stackptr)]).psect >= 0)) < *psect = PRIV(stack[PRIV(stackptr)]).psect; --- > PRIV (stackptr)--; > value = PRIV (stack[PRIV (stackptr)]).value; > if ((psect != NULL) && (PRIV (stack[PRIV (stackptr)]).psect >= 0)) > *psect = PRIV (stack[PRIV (stackptr)]).psect; 567c564 < vms_debug (4, "\n", value, PRIV(stack[PRIV(stackptr)]).psect); --- > vms_debug (4, "\n", value, PRIV (stack[PRIV (stackptr)]).psect); 572d568 < 590c586 < sptr = PRIV(vms_section_table)[section->index]; --- > sptr = PRIV (vms_section_table)[section->index]; 603c599 < PRIV(vms_section_table)[section->index] = newptr; --- > PRIV (vms_section_table)[section->index] = newptr; 647c643 < return PRIV(vms_section_table)[index]; --- > return PRIV (vms_section_table)[index]; 649d644 < 673,674c668,669 < if (PRIV(push_level) > 0) < PRIV(length_pos) = PRIV(output_size); --- > if (PRIV (push_level) > 0) > PRIV (length_pos) = PRIV (output_size); 678c673 < PRIV(length_pos)); --- > PRIV (length_pos)); 700c695 < PRIV(output_alignment) = alignto; --- > PRIV (output_alignment) = alignto; 711c706 < vms_debug (6, "vms_output_push(pushed_size = %d)\n", PRIV(output_size)); --- > vms_debug (6, "vms_output_push(pushed_size = %d)\n", PRIV (output_size)); 714,715c709,710 < PRIV(push_level)++; < PRIV(pushed_size) = PRIV(output_size); --- > PRIV (push_level)++; > PRIV (pushed_size) = PRIV (output_size); 726c721 < vms_debug (6, "vms_output_pop(pushed_size = %d)\n", PRIV(pushed_size)); --- > vms_debug (6, "vms_output_pop(pushed_size = %d)\n", PRIV (pushed_size)); 730c725 < PRIV(length_pos) = 2; --- > PRIV (length_pos) = 2; 733c728 < vms_debug (6, "vms_output_pop: length_pos = %d\n", PRIV(length_pos)); --- > vms_debug (6, "vms_output_pop: length_pos = %d\n", PRIV (length_pos)); 736,737c731,732 < PRIV(pushed_size) = 0; < PRIV(push_level)--; --- > PRIV (pushed_size) = 0; > PRIV (push_level)--; 747c742 < int real_size = PRIV(output_size); --- > int real_size = PRIV (output_size); 753c748 < real_size, PRIV(pushed_size), PRIV(length_pos)); --- > real_size, PRIV (pushed_size), PRIV (length_pos)); 756,757c751,752 < if (PRIV(push_level) > 0) < length = real_size - PRIV(pushed_size); --- > if (PRIV (push_level) > 0) > length = real_size - PRIV (pushed_size); 763,764c758,759 < aligncount = (PRIV(output_alignment) < - (length % PRIV(output_alignment))) % PRIV(output_alignment); --- > aligncount = (PRIV (output_alignment) > - (length % PRIV (output_alignment))) % PRIV (output_alignment); 772c767 < PRIV(output_buf)[real_size++] = 0; --- > PRIV (output_buf)[real_size++] = 0; 777c772 < if (PRIV(push_level) > 0) --- > if (PRIV (push_level) > 0) 783c778 < PRIV(output_size) = PRIV(length_pos); --- > PRIV (output_size) = PRIV (length_pos); 786c781 < if (PRIV(push_level) == 0) --- > if (PRIV (push_level) == 0) 790c785 < fwrite (PRIV(output_buf)+2, 2, 1, (FILE *)abfd->iostream); --- > fwrite (PRIV (output_buf)+2, 2, 1, (FILE *)abfd->iostream); 792c787 < fwrite (PRIV(output_buf), real_size, 1, (FILE *)abfd->iostream); --- > fwrite (PRIV (output_buf), real_size, 1, (FILE *)abfd->iostream); 794c789 < PRIV(output_size) = 0; --- > PRIV (output_size) = 0; 798,799c793,794 < PRIV(output_size) = real_size; < PRIV(pushed_size) = PRIV(output_size); --- > PRIV (output_size) = real_size; > PRIV (pushed_size) = PRIV (output_size); 833c828 < return (MAX_OUTREC_SIZE - (PRIV(output_size) + size + MIN_OUTREC_LUFT)); --- > return (MAX_OUTREC_SIZE - (PRIV (output_size) + size + MIN_OUTREC_LUFT)); 847,848c842,843 < bfd_put_8 (abfd, value & 0xff, PRIV(output_buf) + PRIV(output_size)); < PRIV(output_size) += 1; --- > bfd_put_8 (abfd, value & 0xff, PRIV (output_buf) + PRIV (output_size)); > PRIV (output_size) += 1; 863,864c858,859 < bfd_put_16 (abfd, value & 0xffff, PRIV(output_buf) + PRIV(output_size)); < PRIV(output_size) += 2; --- > bfd_put_16 (abfd, value & 0xffff, PRIV (output_buf) + PRIV (output_size)); > PRIV (output_size) += 2; 879,880c874,875 < bfd_put_32 (abfd, value, PRIV(output_buf) + PRIV(output_size)); < PRIV(output_size) += 4; --- > bfd_put_32 (abfd, value, PRIV (output_buf) + PRIV (output_size)); > PRIV (output_size) += 4; 895,896c890,891 < bfd_put_64(abfd, value, PRIV(output_buf) + PRIV(output_size)); < PRIV(output_size) += 8; --- > bfd_put_64(abfd, value, PRIV (output_buf) + PRIV (output_size)); > PRIV (output_size) += 8; 943,944c938,939 < memcpy (PRIV(output_buf) + PRIV(output_size), data, length); < PRIV(output_size) += length; --- > memcpy (PRIV (output_buf) + PRIV (output_size), data, length); > PRIV (output_size) += length; 963,964c958,959 < memset (PRIV(output_buf) + PRIV(output_size), value, count); < PRIV(output_size) += count; --- > memset (PRIV (output_buf) + PRIV (output_size), value, count); > PRIV (output_size) += count; 1029c1024 < if (PRIV(flag_hash_long_names)) --- > if (PRIV (flag_hash_long_names)) 1040c1035 < && PRIV(flag_hash_long_names)) --- > && PRIV (flag_hash_long_names)) 1050,1051c1045,1046 < && PRIV(flag_hash_long_names) < && PRIV(flag_show_after_trunc)) --- > && PRIV (flag_hash_long_names) > && PRIV (flag_show_after_trunc)) 1093c1088 < bfd_hash_lookup (PRIV(vms_symbol_table), name, false, false); --- > bfd_hash_lookup (PRIV (vms_symbol_table), name, false, false); 1099c1094 < entry = (vms_symbol_entry *)bfd_hash_lookup (PRIV(vms_symbol_table), name, true, false); --- > entry = (vms_symbol_entry *)bfd_hash_lookup (PRIV (vms_symbol_table), name, true, false); 1107c1102 < PRIV(gsd_sym_count)++; --- > PRIV (gsd_sym_count)++; diff -rN binutils-2.11/bfd/vms-tir.c binutils-2.11.2/bfd/vms-tir.c 3c3 < Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/vms.c binutils-2.11.2/bfd/vms.c 3c3,4 < Copyright 1996, 97, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 244c245 < PRIV(is_vax) = 0; --- > PRIV (is_vax) = 0; 246c247 < PRIV(is_vax) = 1; --- > PRIV (is_vax) = 1; 248,253c249,254 < PRIV(vms_buf) = 0; < PRIV(buf_size) = 0; < PRIV(rec_length) = 0; < PRIV(file_format) = FF_UNKNOWN; < PRIV(fixup_done) = false; < PRIV(sections) = NULL; --- > PRIV (vms_buf) = 0; > PRIV (buf_size) = 0; > PRIV (rec_length) = 0; > PRIV (file_format) = FF_UNKNOWN; > PRIV (fixup_done) = false; > PRIV (sections) = NULL; 255c256 < PRIV(stack) = ((struct stack_struct *) --- > PRIV (stack) = ((struct stack_struct *) 257c258 < if (PRIV(stack) == 0) --- > if (PRIV (stack) == 0) 264c265 < PRIV(stackptr) = 0; --- > PRIV (stackptr) = 0; 266c267 < PRIV(vms_symbol_table) = ((struct bfd_hash_table *) --- > PRIV (vms_symbol_table) = ((struct bfd_hash_table *) 268c269 < if (PRIV(vms_symbol_table) == 0) --- > if (PRIV (vms_symbol_table) == 0) 271,272c272,273 < free (PRIV(stack)); < PRIV(stack) = 0; --- > free (PRIV (stack)); > PRIV (stack) = 0; 276c277 < if (!bfd_hash_table_init (PRIV(vms_symbol_table), _bfd_vms_hash_newfunc)) --- > if (!bfd_hash_table_init (PRIV (vms_symbol_table), _bfd_vms_hash_newfunc)) 279c280 < PRIV(location_stack) = ((struct location_struct *) --- > PRIV (location_stack) = ((struct location_struct *) 282c283 < if (PRIV(location_stack) == 0) --- > if (PRIV (location_stack) == 0) 285,286c286,287 < free (PRIV(vms_symbol_table)); < PRIV(vms_symbol_table) = 0; --- > free (PRIV (vms_symbol_table)); > PRIV (vms_symbol_table) = 0; 291c292 < PRIV(vms_section_table)[i] = NULL; --- > PRIV (vms_section_table)[i] = NULL; 293,294c294,295 < PRIV(output_buf) = (unsigned char *) malloc (MAX_OUTREC_SIZE); < if (PRIV(output_buf) == 0) --- > PRIV (output_buf) = (unsigned char *) malloc (MAX_OUTREC_SIZE); > if (PRIV (output_buf) == 0) 296,297c297,298 < free (PRIV(location_stack)); < PRIV(location_stack) = 0; --- > free (PRIV (location_stack)); > PRIV (location_stack) = 0; 300,304c301,305 < PRIV(push_level) = 0; < PRIV(pushed_size) = 0; < PRIV(length_pos) = 2; < PRIV(output_size) = 0; < PRIV(output_alignment) = 1; --- > PRIV (push_level) = 0; > PRIV (pushed_size) = 0; > PRIV (length_pos) = 2; > PRIV (output_size) = 0; > PRIV (output_alignment) = 1; 360c361 < if (PRIV(fixup_done)) --- > if (PRIV (fixup_done)) 368,370c369,371 < priv_section_count = PRIV(section_count); < bfd_hash_traverse (PRIV(vms_symbol_table), fill_section_ptr, < (PTR) (PRIV(sections))); --- > priv_section_count = PRIV (section_count); > bfd_hash_traverse (PRIV (vms_symbol_table), fill_section_ptr, > (PTR) (PRIV (sections))); 372c373 < PRIV(fixup_done) = true; --- > PRIV (fixup_done) = true; 424c425 < && (PRIV(rec_type) != EOBJ_S_C_EGSD)) --- > && (PRIV (rec_type) != EOBJ_S_C_EGSD)) 436c437 < prev_type = PRIV(rec_type); --- > prev_type = PRIV (rec_type); 592c593 < if (PRIV(is_vax)) --- > if (PRIV (is_vax)) 652c653 < if (PRIV(vms_buf) != NULL) --- > if (PRIV (vms_buf) != NULL) 654,655c655,656 < free (PRIV(vms_buf)); < PRIV(vms_buf) = NULL; --- > free (PRIV (vms_buf)); > PRIV (vms_buf) = NULL; 657c658 < PRIV(buf_size) = 0; --- > PRIV (buf_size) = 0; 659c660 < if (PRIV(output_buf) != 0) --- > if (PRIV (output_buf) != 0) 661,662c662,663 < free (PRIV(output_buf)); < PRIV(output_buf) = 0; --- > free (PRIV (output_buf)); > PRIV (output_buf) = 0; 673c674 < if (PRIV(sections) != NULL) --- > if (PRIV (sections) != NULL) 675,676c676,677 < free (PRIV(sections)); < PRIV(sections) = NULL; --- > free (PRIV (sections)); > PRIV (sections) = NULL; 679c680 < if (PRIV(vms_symbol_table)) --- > if (PRIV (vms_symbol_table)) 681,682c682,683 < bfd_hash_table_free (PRIV(vms_symbol_table)); < PRIV(vms_symbol_table) = 0; --- > bfd_hash_table_free (PRIV (vms_symbol_table)); > PRIV (vms_symbol_table) = 0; 685c686 < if (PRIV(stack)) --- > if (PRIV (stack)) 687,688c688,689 < free (PRIV(stack)); < PRIV(stack) = 0; --- > free (PRIV (stack)); > PRIV (stack) = 0; 691c692 < if (PRIV(location_stack)) --- > if (PRIV (location_stack)) 693,694c694,695 < free (PRIV(location_stack)); < PRIV(location_stack) = 0; --- > free (PRIV (location_stack)); > PRIV (location_stack) = 0; 699c700 < es = PRIV(vms_section_table)[i]; --- > es = PRIV (vms_section_table)[i]; 706c707 < PRIV(vms_section_table)[i] = NULL; --- > PRIV (vms_section_table)[i] = NULL; 738c739 < if (abfd->section_count > PRIV(section_count)) --- > if (abfd->section_count > PRIV (section_count)) 740,742c741,743 < PRIV(sections) = ((asection **) < bfd_realloc (PRIV(sections), abfd->section_count * sizeof (asection *))); < if (PRIV(sections) == 0) --- > PRIV (sections) = ((asection **) > bfd_realloc (PRIV (sections), abfd->section_count * sizeof (asection *))); > if (PRIV (sections) == 0) 744c745 < PRIV(section_count) = abfd->section_count; --- > PRIV (section_count) = abfd->section_count; 747c748 < vms_debug (6, "section_count: %d\n", PRIV(section_count)); --- > vms_debug (6, "section_count: %d\n", PRIV (section_count)); 749c750 < PRIV(sections)[section->index] = section; --- > PRIV (sections)[section->index] = section; 1085c1086 < vms_debug (1, "vms_get_symtab_upper_bound(%p), %d symbols\n", abfd, PRIV(gsd_sym_count)); --- > vms_debug (1, "vms_get_symtab_upper_bound(%p), %d symbols\n", abfd, PRIV (gsd_sym_count)); 1087c1088 < return (PRIV(gsd_sym_count)+1) * sizeof (asymbol *); --- > return (PRIV (gsd_sym_count)+1) * sizeof (asymbol *); 1103c1104 < PRIV(symnum) = 0; --- > PRIV (symnum) = 0; 1105c1106 < PRIV(symcache)[PRIV(symnum)++] = ((vms_symbol_entry *)entry)->symbol; --- > PRIV (symcache)[PRIV (symnum)++] = ((vms_symbol_entry *)entry)->symbol; 1129,1130c1130,1131 < PRIV(symcache) = symbols; < bfd_hash_traverse(PRIV(vms_symbol_table), copy_symbols, (PTR)abfd); --- > PRIV (symcache) = symbols; > bfd_hash_traverse(PRIV (vms_symbol_table), copy_symbols, (PTR)abfd); 1132c1133 < symbols[PRIV(gsd_sym_count)] = NULL; --- > symbols[PRIV (gsd_sym_count)] = NULL; 1134c1135 < return PRIV(gsd_sym_count); --- > return PRIV (gsd_sym_count); 1184,1185d1184 < break; < diff -rN binutils-2.11/bfd/vms.h binutils-2.11.2/bfd/vms.h 3c3 < Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/bfd/xcoff-target.h binutils-2.11.2/bfd/xcoff-target.h 2c2 < Copyright 2000 --- > Copyright 2000, 2001 diff -rN binutils-2.11/bfd/xcofflink.c binutils-2.11.2/bfd/xcofflink.c 2c2,3 < Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1997, 1998, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/ChangeLog binutils-2.11.2/binutils/ChangeLog 0a1,115 > 2001-06-11 Alan Modra > > Merge from mainline. > 2001-02-27 Alan Modra > * configure.in (BFD_VERSION): New. > (AM_INIT_AUTOMAKE): Use $BFD_VERSION. > * configure: Regenerate. > > 2001-04-27 Michal Svec > * strings.c (isgraphic): Do not use isascii() unless it is needed > for isprint() to work. > (main): Set the locale domain to LC_ALL not just LC_MESSAGES. > > 2001-04-10 Alan Modra > * nm.c (print_symbol_info_bsd): Use a simple printf string. > > 2001-02-07 Todd Vierling > * bucomm.c (bfd_target_vector): Change extern array to pointer. > * objdump.c (bfd_target_vector): Likewise. > > 2001-06-10 Philip Blundell > > * configure.in: Set version to 2.11.1. > * configure: Regenerate. > > 2001-06-09 Alan Modra > > * NEWS: Mention hppa64-elf. Add binutils-2.11 marker. > > * MAINTAINERS: Replace with mainline version. > > 2001-06-07 Alan Modra > > * Most files: Update copyright notices. > > 2001-05-30 Honda Hiroki > > * objcopy.c: Add new switches: --keep-global-symbol, > --keep-symbols, --localize-symbols, --keep-global-symbols and > --weaken-symbols. > * binutils.texi: Document new switches. > * objcopy.1: Regenerate. > * NEWS: Announce new feature. > > 2001-05-28 Philip Blundell > > From 2001-05-28 Andreas Jaeger > * readelf.c (display_debug_frames): Fix warnings: Remove unused > variables, fix format strings. > > From 2001-05-16 Richard Henderson > * readelf.c (do_debug_frames_interp): New. > (byte_get_little_endian): If BFD64, always read entire 8-byte fields. > (byte_get_big_endian): Likewise. > (parse_args) ['F']: Set do_debug_frames_interp. > (Frame_Chunk): Make data_factor signed, add fde_encoding. > (frame_display_row): Don't trunc pc_begin to int. > (size_of_encoded_value): New. > (display_debug_frames): Handle 64-bit targets. Print raw data > unless do_debug_frames_interp. > (debug_displays): Remove duplicate .debug_frame. > > From 2001-05-15 Ralf Baechle > * readelf.c: Replace uses of EM_MIPS_RS4_BE with EM_MIPS_RS3_LE. > The former constant was never in active use and is used otherwise > by the ABI. > > From 2001-05-11 Jakub Jelinek > * readelf.c (process_unwind): Print all unwind sections, not just > one. > > From 2001-05-07 Thiemo Seufer > * readelf.c (process_unwind): Remove const specifier. > > From 2001-03-30 H.J. Lu > * readelf.c (process_unwind): Just return if do_unwind is 0. > > From 2001-03-29 H.J. Lu > * readelf.c (process_unwind): Only do unwind sections for > IA64. > > From 2001-02-28 Nick Clifton > * readelf.c: (struct unw_aux_info): Remove const modifier for > 'strtab' field. > (process_unwind): Remove non-K&R compliant LHS type cast in call > to GET_DATA_ALLOC macro. > > From 2001-02-11 Michael Sokolov > * readelf.c (struct unw_aux_info): Remove const from the info member. > (process_unwind): Don't type-cast the third argument to the > GET_DATA_ALLOC macro. > > From 2001-02-11 Nick Clifton > * readelf.c (dump_relocations): Free corrected allocated > array. > (process_unwind): Fix compile time warning. > > From 2001-02-07 David Mosberger > * readelf.c (process_unwind): New function. > (slurp_ia64_unwind_table): Ditto. > (dump_ia64_unwind): Ditto. > (find_symbol_for_address): Ditto. > (slurp_rela_relocs): New function (split off from dump_relocations()). > (slurp_rel_relocs): Ditto. > (parse_args): Handle '-u' option. > * unwind-ia64.c: New file. > * unwind-ia64.h: New file. > * Makefile.am: Include unwind-ia64.c in readelf build. > * Makefile.in: Regenerate. > * po/binutils.pot: Regenerate. > > 2001-04-06 Hans-Peter Nilsson > > * readelf.c (display_debug_lines): Fix typo for "Prologue". > 355c470 < * binutils/binutils.texi: Put back "@end table" deleted by --- > * binutils.texi: Put back "@end table" deleted by 360,363c475,478 < * binutils/nm.c: Add optional style to demangle switch. < * binutils/objdump.c: Add optional style to demangle switch. < * binutils/addr2line.c: Add optional style to demangle switch. < * binutils/binutils.texi: Document optional style to demangle --- > * nm.c: Add optional style to demangle switch. > * objdump.c: Add optional style to demangle switch. > * addr2line.c: Add optional style to demangle switch. > * binutils.texi: Document optional style to demangle 676c791 < * readelf (dynamic_segment_mips_val): Call `sprintf', not --- > * readelf.c (dynamic_segment_mips_val): Call `sprintf', not 929c1044 < * dlltoolc.: Add support for sh-pe and mips-pe targets. --- > * dlltool.c: Add support for sh-pe and mips-pe targets. 974c1089 < * binutils/objdump.c (dump_section_header, find_symbol_for_address, --- > * objdump.c (dump_section_header, find_symbol_for_address, diff -rN binutils-2.11/binutils/MAINTAINERS binutils-2.11.2/binutils/MAINTAINERS 8a9,11 > Note - patches to the top level configure.in and config.sub scripts > should be sent to config-patches@gnu.org and not to the binutils list. > 17c20 < Alan Modra --- > Alan Modra 36c39 < HPPA elf32 Alan Modra --- > HPPA elf32 Alan Modra 39c42 < ix86 Alan Modra --- > ix86 Alan Modra 78a82,92 > > ------------- Obvious Fixes ------------- > > Fixes for obvious mistakes do not need approval, and can be checked in > right away, but the patch should still be sent to the binutils list. > The definition of obvious is a bit hazy, and if you are not sure, then > you should seek approval first. Obvious fixes include fixes for > spelling mistakes, blatantly incorrect code (where the correct code is > also blatantly obvious), and so on. Obvious fixes should always be > small, the larger they are, the more likely it is that they contain > some un-obvious side effect or consequence. diff -rN binutils-2.11/binutils/Makefile.am binutils-2.11.2/binutils/Makefile.am 164c164 < readelf_SOURCES = readelf.c version.c --- > readelf_SOURCES = readelf.c version.c unwind-ia64.c diff -rN binutils-2.11/binutils/Makefile.in binutils-2.11.2/binutils/Makefile.in 256c256 < readelf_SOURCES = readelf.c version.c --- > readelf_SOURCES = readelf.c version.c unwind-ia64.c 397c397,398 < readelf_OBJECTS = readelf.$(OBJEXT) version.$(OBJEXT) --- > readelf_OBJECTS = readelf.$(OBJEXT) version.$(OBJEXT) \ > unwind-ia64.$(OBJEXT) 440c441 < TAR = gtar --- > TAR = tar diff -rN binutils-2.11/binutils/NEWS binutils-2.11.2/binutils/NEWS 2a3,8 > * New command line switches added to objcopy to allow symbols to be kept as > global symbols, and also to specify files containing lists of such symbols. > by Honda Hiroki. > > Changes in binutils 2.11: > 15a22,23 > > * Support for 64-bit ELF on HPPA. diff -rN binutils-2.11/binutils/aclocal.m4 binutils-2.11.2/binutils/aclocal.m4 30,46d29 < #serial 1 < # This test replaces the one in autoconf. < # Currently this macro should have the same name as the autoconf macro < # because gettext's gettext.m4 (distributed in the automake package) < # still uses it. Otherwise, the use in gettext.m4 makes autoheader < # give these diagnostics: < # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX < # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX < < undefine([AC_ISC_POSIX]) < < AC_DEFUN(AC_ISC_POSIX, < [ < dnl This test replaces the obsolescent AC_ISC_POSIX kludge. < AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) < ] < ) diff -rN binutils-2.11/binutils/addr2line.c binutils-2.11.2/binutils/addr2line.c 2c2 < Copyright 1997, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/ar.c binutils-2.11.2/binutils/ar.c 2c2 < Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 diff -rN binutils-2.11/binutils/arlex.c binutils-2.11.2/binutils/arlex.c 4c4 < * $Header: /cvs/src/src/binutils/Attic/arlex.c,v 1.1.4.1 2001/03/12 15:40:34 pb Exp $ --- > * $Header: /cvs/src/src/binutils/Attic/arlex.c,v 1.1.4.2 2001/06/10 15:37:28 pb Exp $ 475c475 < /* Copyright (C) 1992, 95, 1997 Free Software Foundation, Inc. --- > /* Copyright 1992, 1997, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/arlex.l binutils-2.11.2/binutils/arlex.l 4c4 < /* Copyright (C) 1992, 95, 1997 Free Software Foundation, Inc. --- > /* Copyright 1992, 1997, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/arparse.c binutils-2.11.2/binutils/arparse.c 30c30 < /* Copyright (C) 1992, 93, 95, 97, 98, 1999 Free Software Foundation, Inc. --- > /* Copyright 1992, 1993, 1995, 1997, 1999 Free Software Foundation, Inc. 223c223 < #line 3 "/usr/share/misc/bison.simple" --- > #line 3 "/usr/share/bison/bison.simple" 437c437 < #line 217 "/usr/share/misc/bison.simple" --- > #line 217 "/usr/share/bison/bison.simple" 859c859 < #line 543 "/usr/share/misc/bison.simple" --- > #line 543 "/usr/share/bison/bison.simple" diff -rN binutils-2.11/binutils/arparse.y binutils-2.11.2/binutils/arparse.y 4c4 < /* Copyright (C) 1992, 93, 95, 97, 98, 1999 Free Software Foundation, Inc. --- > /* Copyright 1992, 1993, 1995, 1997, 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/arsup.c binutils-2.11.2/binutils/arsup.c 2c2 < Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1992, 1994, 1995, 1996, 1997, 2000 diff -rN binutils-2.11/binutils/arsup.h binutils-2.11.2/binutils/arsup.h 2c2 < Copyright 1992 Free Software Foundation, Inc. --- > Copyright 1992, 1993, 1994, 1996 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/binutils.info binutils-2.11.2/binutils/binutils.info 36,37c36,37 < binutils.info-2: 51584 < binutils.info-3: 99084 --- > binutils.info-2: 42164 > binutils.info-3: 91804 42,67c42,67 < Node: ar3177 < Node: ar cmdline5351 < Node: ar scripts13479 < Node: nm19158 < Node: objcopy26576 < Node: objdump40217 < Node: ranlib50835 < Node: size51584 < Node: strings54315 < Node: strip56140 < Node: c++filt59105 < Ref: c++filt-Footnote-162042 < Node: addr2line62148 < Node: nlmconv64743 < Node: windres67347 < Node: dlltool72399 < Node: readelf81740 < Node: Selecting The Target System84908 < Node: Target Selection85925 < Node: Architecture Selection88626 < Node: Linker Emulation Selection89857 < Node: Reporting Bugs90735 < Node: Bug Criteria91511 < Node: Bug Reporting92057 < Node: GNU Free Documentation License99084 < Node: Index117512 --- > Node: ar3179 > Node: ar cmdline5353 > Node: ar scripts13481 > Node: nm19160 > Node: objcopy26578 > Node: objdump42164 > Node: ranlib52782 > Node: size53531 > Node: strings56262 > Node: strip58087 > Node: c++filt61052 > Ref: c++filt-Footnote-163989 > Node: addr2line64095 > Node: nlmconv66690 > Node: windres69294 > Node: dlltool74346 > Node: readelf83687 > Node: Selecting The Target System86855 > Node: Target Selection87872 > Node: Architecture Selection90573 > Node: Linker Emulation Selection91804 > Node: Reporting Bugs92682 > Node: Bug Criteria93458 > Node: Bug Reporting94004 > Node: GNU Free Documentation License101031 > Node: Index119459 diff -rN binutils-2.11/binutils/binutils.info-1 binutils-2.11.2/binutils/binutils.info-1 40c40 < binary utilities (collectively version 2.11): --- > binary utilities (collectively version 2.11.2): 692a693 > [ -G SYMBOLNAME | --keep-global-symbol=SYMBOLNAME] 712a714,718 > [ --keep-symbols=FILENAME ] > [ --strip-symbols=FILENAME ] > [ --keep-global-symbols=FILENAME ] > [ --localize-symbols=FILENAME ] > [ --weaken-symbols=FILENAME ] 806a813,818 > `-G SYMBOLNAME' > `--keep-global-symbol=SYMBOLNAME' > Keep only symbol SYMBOLNAME global. Make all other symbols local > to the file, so that they are not visible externally. This option > may be given more than once. > 985a998,1027 > `--keep-symbols=FILENAME' > Apply `--keep-symbol' option to each symbol listed in the file > FILENAME. FILENAME is simply a flat file, with one symbol name > per line. Line comments may be introduced by the hash character. > This option may be given more than once. > > `--strip-symbols=FILENAME' > Apply `--strip-symbol' option to each symbol listed in the file > FILENAME. FILENAME is simply a flat file, with one symbol name > per line. Line comments may be introduced by the hash character. > This option may be given more than once. > > `--keep-global-symbols=FILENAME' > Apply `--keep-global-symbol' option to each symbol listed in the > file FILENAME. FILENAME is simply a flat file, with one symbol > name per line. Line comments may be introduced by the hash > character. This option may be given more than once. > > `--localize-symbols=FILENAME' > Apply `--localize-symbol' option to each symbol listed in the file > FILENAME. FILENAME is simply a flat file, with one symbol name > per line. Line comments may be introduced by the hash character. > This option may be given more than once. > > `--weaken-symbols=FILENAME' > Apply `--weaken-symbol' option to each symbol listed in the file > FILENAME. FILENAME is simply a flat file, with one symbol name > per line. Line comments may be introduced by the hash character. > This option may be given more than once. > 997,1309d1038 < <  < File: binutils.info, Node: objdump, Next: ranlib, Prev: objcopy, Up: Top < < objdump < ******* < < objdump [ -a | --archive-headers ] < [ -b BFDNAME | --target=BFDNAME ] < [ -C | --demangle[=STYLE] ] < [ -d | --disassemble ] < [ -D | --disassemble-all ] < [ -z | --disassemble-zeroes ] < [ -EB | -EL | --endian={big | little } ] < [ -f | --file-headers ] < [ --file-start-context ] < [ -g | --debugging ] < [ -h | --section-headers | --headers ] < [ -i | --info ] < [ -j SECTION | --section=SECTION ] < [ -l | --line-numbers ] < [ -S | --source ] < [ -m MACHINE | --architecture=MACHINE ] < [ -M OPTIONS | --disassembler-options=OPTIONS] < [ -p | --private-headers ] < [ -r | --reloc ] < [ -R | --dynamic-reloc ] < [ -s | --full-contents ] < [ -G | --stabs ] < [ -t | --syms ] < [ -T | --dynamic-syms ] < [ -x | --all-headers ] < [ -w | --wide ] < [ --start-address=ADDRESS ] < [ --stop-address=ADDRESS ] < [ --prefix-addresses] < [ --[no-]show-raw-insn ] < [ --adjust-vma=OFFSET ] < [ -V | --version ] < [ -H | --help ] < OBJFILE... < < `objdump' displays information about one or more object files. The < options control what particular information to display. This < information is mostly useful to programmers who are working on the < compilation tools, as opposed to programmers who just want their < program to compile and work. < < OBJFILE... are the object files to be examined. When you specify < archives, `objdump' shows information on each of the member object < files. < < The long and short forms of options, shown here as alternatives, are < equivalent. At least one option from the list < `-a,-d,-D,-f,-g,-G,-h,-H,-p,-r,-R,-S,-t,-T,-V,-x' must be given. < < `-a' < `--archive-header' < If any of the OBJFILE files are archives, display the archive < header information (in a format similar to `ls -l'). Besides the < information you could list with `ar tv', `objdump -a' shows the < object file format of each archive member. < < `--adjust-vma=OFFSET' < When dumping information, first add OFFSET to all the section < addresses. This is useful if the section addresses do not < correspond to the symbol table, which can happen when putting < sections at particular addresses when using a format which can not < represent section addresses, such as a.out. < < `-b BFDNAME' < `--target=BFDNAME' < Specify that the object-code format for the object files is < BFDNAME. This option may not be necessary; OBJDUMP can < automatically recognize many formats. < < For example, < objdump -b oasys -m vax -h fu.o < < displays summary information from the section headers (`-h') of < `fu.o', which is explicitly identified (`-m') as a VAX object file < in the format produced by Oasys compilers. You can list the < formats available with the `-i' option. *Note Target Selection::, < for more information. < < `-C' < `--demangle[=STYLE]' < Decode ("demangle") low-level symbol names into user-level names. < Besides removing any initial underscore prepended by the system, < this makes C++ function names readable. Different compilers have < different mangling styles. The optional demangling style argument < can be used to choose an appropriate demangling style for your < compiler. *Note c++filt::, for more information on demangling. < < `-G' < < `--debugging' < Display debugging information. This attempts to parse debugging < information stored in the file and print it out using a C like < syntax. Only certain types of debugging information have been < implemented. < < `-d' < `--disassemble' < Display the assembler mnemonics for the machine instructions from < OBJFILE. This option only disassembles those sections which are < expected to contain instructions. < < `-D' < `--disassemble-all' < Like `-d', but disassemble the contents of all sections, not just < those expected to contain instructions. < < `--prefix-addresses' < When disassembling, print the complete address on each line. This < is the older disassembly format. < < `--disassemble-zeroes' < Normally the disassembly output will skip blocks of zeroes. This < option directs the disassembler to disassemble those blocks, just < like any other data. < < `-EB' < `-EL' < `--endian={big|little}' < Specify the endianness of the object files. This only affects < disassembly. This can be useful when disassembling a file format < which does not describe endianness information, such as S-records. < < `-f' < `--file-header' < Display summary information from the overall header of each of the < OBJFILE files. < < `--file-start-context' < Specify that when displaying interlisted source code/disassembly < (assumes '-S') from a file that has not yet been displayed, extend < the context to the start of the file. < < `-h' < `--section-header' < `--header' < Display summary information from the section headers of the object < file. < < File segments may be relocated to nonstandard addresses, for < example by using the `-Ttext', `-Tdata', or `-Tbss' options to < `ld'. However, some object file formats, such as a.out, do not < store the starting address of the file segments. In those < situations, although `ld' relocates the sections correctly, using < `objdump -h' to list the file section headers cannot show the < correct addresses. Instead, it shows the usual addresses, which < are implicit for the target. < < `--help' < Print a summary of the options to `objdump' and exit. < < `-i' < `--info' < Display a list showing all architectures and object formats < available for specification with `-b' or `-m'. < < `-j NAME' < `--section=NAME' < Display information only for section NAME. < < `-l' < `--line-numbers' < Label the display (using debugging information) with the filename < and source line numbers corresponding to the object code or relocs < shown. Only useful with `-d', `-D', or `-r'. < < `-m MACHINE' < `--architecture=MACHINE' < Specify the architecture to use when disassembling object files. < This can be useful when disassembling object files which do not < describe architecture information, such as S-records. You can < list the available architectures with the `-i' option. < < `-M OPTIONS' < `--disassembler-options=OPTIONS' < Pass target specific information to the disassembler. Only < supported on some targets. < < If the target is an ARM architecture then this switch can be used < to select which register name set is used during disassembler. < Specifying `-M reg-name-std' (the default) will select the < register names as used in ARM's instruction set documentation, but < with register 13 called 'sp', register 14 called 'lr' and register < 15 called 'pc'. Specifying `-M reg-names-apcs' will select the < name set used by the ARM Procedure Call Standard, whilst < specifying `-M reg-names-raw' will just use `r' followed by the < register number. < < There are also two variants on the APCS register naming scheme < enabled by `-M reg-names-atpcs' and `-M reg-names-special-atpcs' < which use the ARM/Thumb Procedure Call Standard naming < conventions. (Eiuther with the normal register name sor the < special register names). < < This option can also be used for ARM architectures to force the < disassembler to interpret all instructions as THUMB instructions by < using the switch `--disassembler-options=force-thumb'. This can be < useful when attempting to disassemble thumb code produced by other < compilers. < < `-p' < `--private-headers' < Print information that is specific to the object file format. The < exact information printed depends upon the object file format. < For some object file formats, no additional information is printed. < < `-r' < `--reloc' < Print the relocation entries of the file. If used with `-d' or < `-D', the relocations are printed interspersed with the < disassembly. < < `-R' < `--dynamic-reloc' < Print the dynamic relocation entries of the file. This is only < meaningful for dynamic objects, such as certain types of shared < libraries. < < `-s' < `--full-contents' < Display the full contents of any sections requested. < < `-S' < `--source' < Display source code intermixed with disassembly, if possible. < Implies `-d'. < < `--show-raw-insn' < When disassembling instructions, print the instruction in hex as < well as in symbolic form. This is the default except when < `--prefix-addresses' is used. < < `--no-show-raw-insn' < When disassembling instructions, do not print the instruction < bytes. This is the default when `--prefix-addresses' is used. < < `-G' < < `--stabs' < Display the full contents of any sections requested. Display the < contents of the .stab and .stab.index and .stab.excl sections from < an ELF file. This is only useful on systems (such as Solaris 2.0) < in which `.stab' debugging symbol-table entries are carried in an < ELF section. In most other file formats, debugging symbol-table < entries are interleaved with linkage symbols, and are visible in < the `--syms' output. For more information on stabs symbols, see < *Note Stabs: (stabs.info)Top. < < `--start-address=ADDRESS' < Start displaying data at the specified address. This affects the < output of the `-d', `-r' and `-s' options. < < `--stop-address=ADDRESS' < Stop displaying data at the specified address. This affects the < output of the `-d', `-r' and `-s' options. < < `-t' < `--syms' < Print the symbol table entries of the file. This is similar to < the information provided by the `nm' program. < < `-T' < `--dynamic-syms' < Print the dynamic symbol table entries of the file. This is only < meaningful for dynamic objects, such as certain types of shared < libraries. This is similar to the information provided by the `nm' < program when given the `-D' (`--dynamic') option. < < `--version' < Print the version number of `objdump' and exit. < < `-x' < `--all-header' < Display all available header information, including the symbol < table and relocation entries. Using `-x' is equivalent to < specifying all of `-a -f -h -r -t'. < < `-w' < `--wide' < Format some lines for output devices that have more than 80 < columns. < <  < File: binutils.info, Node: ranlib, Next: readelf, Prev: objdump, Up: Top < < ranlib < ****** < < ranlib [-vV] ARCHIVE < < `ranlib' generates an index to the contents of an archive and stores < it in the archive. The index lists each symbol defined by a member of < an archive that is a relocatable object file. < < You may use `nm -s' or `nm --print-armap' to list this index. < < An archive with such an index speeds up linking to the library and < allows routines in the library to call each other without regard to < their placement in the archive. < < The GNU `ranlib' program is another form of GNU `ar'; running < `ranlib' is completely equivalent to executing `ar -s'. *Note ar::. < < `-v' < `-V' < `--version' < Show the version number of `ranlib'. diff -rN binutils-2.11/binutils/binutils.info-2 binutils-2.11.2/binutils/binutils.info-2 33a34,346 > File: binutils.info, Node: objdump, Next: ranlib, Prev: objcopy, Up: Top > > objdump > ******* > > objdump [ -a | --archive-headers ] > [ -b BFDNAME | --target=BFDNAME ] > [ -C | --demangle[=STYLE] ] > [ -d | --disassemble ] > [ -D | --disassemble-all ] > [ -z | --disassemble-zeroes ] > [ -EB | -EL | --endian={big | little } ] > [ -f | --file-headers ] > [ --file-start-context ] > [ -g | --debugging ] > [ -h | --section-headers | --headers ] > [ -i | --info ] > [ -j SECTION | --section=SECTION ] > [ -l | --line-numbers ] > [ -S | --source ] > [ -m MACHINE | --architecture=MACHINE ] > [ -M OPTIONS | --disassembler-options=OPTIONS] > [ -p | --private-headers ] > [ -r | --reloc ] > [ -R | --dynamic-reloc ] > [ -s | --full-contents ] > [ -G | --stabs ] > [ -t | --syms ] > [ -T | --dynamic-syms ] > [ -x | --all-headers ] > [ -w | --wide ] > [ --start-address=ADDRESS ] > [ --stop-address=ADDRESS ] > [ --prefix-addresses] > [ --[no-]show-raw-insn ] > [ --adjust-vma=OFFSET ] > [ -V | --version ] > [ -H | --help ] > OBJFILE... > > `objdump' displays information about one or more object files. The > options control what particular information to display. This > information is mostly useful to programmers who are working on the > compilation tools, as opposed to programmers who just want their > program to compile and work. > > OBJFILE... are the object files to be examined. When you specify > archives, `objdump' shows information on each of the member object > files. > > The long and short forms of options, shown here as alternatives, are > equivalent. At least one option from the list > `-a,-d,-D,-f,-g,-G,-h,-H,-p,-r,-R,-S,-t,-T,-V,-x' must be given. > > `-a' > `--archive-header' > If any of the OBJFILE files are archives, display the archive > header information (in a format similar to `ls -l'). Besides the > information you could list with `ar tv', `objdump -a' shows the > object file format of each archive member. > > `--adjust-vma=OFFSET' > When dumping information, first add OFFSET to all the section > addresses. This is useful if the section addresses do not > correspond to the symbol table, which can happen when putting > sections at particular addresses when using a format which can not > represent section addresses, such as a.out. > > `-b BFDNAME' > `--target=BFDNAME' > Specify that the object-code format for the object files is > BFDNAME. This option may not be necessary; OBJDUMP can > automatically recognize many formats. > > For example, > objdump -b oasys -m vax -h fu.o > > displays summary information from the section headers (`-h') of > `fu.o', which is explicitly identified (`-m') as a VAX object file > in the format produced by Oasys compilers. You can list the > formats available with the `-i' option. *Note Target Selection::, > for more information. > > `-C' > `--demangle[=STYLE]' > Decode ("demangle") low-level symbol names into user-level names. > Besides removing any initial underscore prepended by the system, > this makes C++ function names readable. Different compilers have > different mangling styles. The optional demangling style argument > can be used to choose an appropriate demangling style for your > compiler. *Note c++filt::, for more information on demangling. > > `-G' > > `--debugging' > Display debugging information. This attempts to parse debugging > information stored in the file and print it out using a C like > syntax. Only certain types of debugging information have been > implemented. > > `-d' > `--disassemble' > Display the assembler mnemonics for the machine instructions from > OBJFILE. This option only disassembles those sections which are > expected to contain instructions. > > `-D' > `--disassemble-all' > Like `-d', but disassemble the contents of all sections, not just > those expected to contain instructions. > > `--prefix-addresses' > When disassembling, print the complete address on each line. This > is the older disassembly format. > > `--disassemble-zeroes' > Normally the disassembly output will skip blocks of zeroes. This > option directs the disassembler to disassemble those blocks, just > like any other data. > > `-EB' > `-EL' > `--endian={big|little}' > Specify the endianness of the object files. This only affects > disassembly. This can be useful when disassembling a file format > which does not describe endianness information, such as S-records. > > `-f' > `--file-header' > Display summary information from the overall header of each of the > OBJFILE files. > > `--file-start-context' > Specify that when displaying interlisted source code/disassembly > (assumes '-S') from a file that has not yet been displayed, extend > the context to the start of the file. > > `-h' > `--section-header' > `--header' > Display summary information from the section headers of the object > file. > > File segments may be relocated to nonstandard addresses, for > example by using the `-Ttext', `-Tdata', or `-Tbss' options to > `ld'. However, some object file formats, such as a.out, do not > store the starting address of the file segments. In those > situations, although `ld' relocates the sections correctly, using > `objdump -h' to list the file section headers cannot show the > correct addresses. Instead, it shows the usual addresses, which > are implicit for the target. > > `--help' > Print a summary of the options to `objdump' and exit. > > `-i' > `--info' > Display a list showing all architectures and object formats > available for specification with `-b' or `-m'. > > `-j NAME' > `--section=NAME' > Display information only for section NAME. > > `-l' > `--line-numbers' > Label the display (using debugging information) with the filename > and source line numbers corresponding to the object code or relocs > shown. Only useful with `-d', `-D', or `-r'. > > `-m MACHINE' > `--architecture=MACHINE' > Specify the architecture to use when disassembling object files. > This can be useful when disassembling object files which do not > describe architecture information, such as S-records. You can > list the available architectures with the `-i' option. > > `-M OPTIONS' > `--disassembler-options=OPTIONS' > Pass target specific information to the disassembler. Only > supported on some targets. > > If the target is an ARM architecture then this switch can be used > to select which register name set is used during disassembler. > Specifying `-M reg-name-std' (the default) will select the > register names as used in ARM's instruction set documentation, but > with register 13 called 'sp', register 14 called 'lr' and register > 15 called 'pc'. Specifying `-M reg-names-apcs' will select the > name set used by the ARM Procedure Call Standard, whilst > specifying `-M reg-names-raw' will just use `r' followed by the > register number. > > There are also two variants on the APCS register naming scheme > enabled by `-M reg-names-atpcs' and `-M reg-names-special-atpcs' > which use the ARM/Thumb Procedure Call Standard naming > conventions. (Eiuther with the normal register name sor the > special register names). > > This option can also be used for ARM architectures to force the > disassembler to interpret all instructions as THUMB instructions by > using the switch `--disassembler-options=force-thumb'. This can be > useful when attempting to disassemble thumb code produced by other > compilers. > > `-p' > `--private-headers' > Print information that is specific to the object file format. The > exact information printed depends upon the object file format. > For some object file formats, no additional information is printed. > > `-r' > `--reloc' > Print the relocation entries of the file. If used with `-d' or > `-D', the relocations are printed interspersed with the > disassembly. > > `-R' > `--dynamic-reloc' > Print the dynamic relocation entries of the file. This is only > meaningful for dynamic objects, such as certain types of shared > libraries. > > `-s' > `--full-contents' > Display the full contents of any sections requested. > > `-S' > `--source' > Display source code intermixed with disassembly, if possible. > Implies `-d'. > > `--show-raw-insn' > When disassembling instructions, print the instruction in hex as > well as in symbolic form. This is the default except when > `--prefix-addresses' is used. > > `--no-show-raw-insn' > When disassembling instructions, do not print the instruction > bytes. This is the default when `--prefix-addresses' is used. > > `-G' > > `--stabs' > Display the full contents of any sections requested. Display the > contents of the .stab and .stab.index and .stab.excl sections from > an ELF file. This is only useful on systems (such as Solaris 2.0) > in which `.stab' debugging symbol-table entries are carried in an > ELF section. In most other file formats, debugging symbol-table > entries are interleaved with linkage symbols, and are visible in > the `--syms' output. For more information on stabs symbols, see > *Note Stabs: (stabs.info)Top. > > `--start-address=ADDRESS' > Start displaying data at the specified address. This affects the > output of the `-d', `-r' and `-s' options. > > `--stop-address=ADDRESS' > Stop displaying data at the specified address. This affects the > output of the `-d', `-r' and `-s' options. > > `-t' > `--syms' > Print the symbol table entries of the file. This is similar to > the information provided by the `nm' program. > > `-T' > `--dynamic-syms' > Print the dynamic symbol table entries of the file. This is only > meaningful for dynamic objects, such as certain types of shared > libraries. This is similar to the information provided by the `nm' > program when given the `-D' (`--dynamic') option. > > `--version' > Print the version number of `objdump' and exit. > > `-x' > `--all-header' > Display all available header information, including the symbol > table and relocation entries. Using `-x' is equivalent to > specifying all of `-a -f -h -r -t'. > > `-w' > `--wide' > Format some lines for output devices that have more than 80 > columns. > >  > File: binutils.info, Node: ranlib, Next: readelf, Prev: objdump, Up: Top > > ranlib > ****** > > ranlib [-vV] ARCHIVE > > `ranlib' generates an index to the contents of an archive and stores > it in the archive. The index lists each symbol defined by a member of > an archive that is a relocatable object file. > > You may use `nm -s' or `nm --print-armap' to list this index. > > An archive with such an index speeds up linking to the library and > allows routines in the library to call each other without regard to > their placement in the archive. > > The GNU `ranlib' program is another form of GNU `ar'; running > `ranlib' is completely equivalent to executing `ar -s'. *Note ar::. > > `-v' > `-V' > `--version' > Show the version number of `ranlib'. > >  1181,1402d1493 < <  < File: binutils.info, Node: Linker Emulation Selection, Prev: Architecture Selection, Up: Selecting The Target System < < Linker emulation selection < ========================== < < A linker "emulation" is a "personality" of the linker, which gives < the linker default values for the other aspects of the target system. < In particular, it consists of < < * the linker script < < * the target < < * several "hook" functions that are run at certain stages of the < linking process to do special things that some targets require < < The command to list valid linker emulation values is `ld -V'. < < Sample values: `hp300bsd', `mipslit', `sun4'. < < Ways to specify: < < 1. command line option: `-m' (*note Options: (ld.info)Options.) < < 2. environment variable `LDEMULATION' < < 3. compiled-in `DEFAULT_EMULATION' from `Makefile', which comes from < `EMUL' in `config/TARGET.mt' < <  < File: binutils.info, Node: Reporting Bugs, Next: GNU Free Documentation License, Prev: Selecting The Target System, Up: Top < < Reporting Bugs < ************** < < Your bug reports play an essential role in making the binary < utilities reliable. < < Reporting a bug may help you by bringing a solution to your problem, < or it may not. But in any case the principal function of a bug report < is to help the entire community by making the next version of the binary < utilities work better. Bug reports are your contribution to their < maintenance. < < In order for a bug report to serve its purpose, you must include the < information that enables us to fix the bug. < < * Menu: < < * Bug Criteria:: Have you found a bug? < * Bug Reporting:: How to report bugs < <  < File: binutils.info, Node: Bug Criteria, Next: Bug Reporting, Up: Reporting Bugs < < Have you found a bug? < ===================== < < If you are not sure whether you have found a bug, here are some < guidelines: < < * If a binary utility gets a fatal signal, for any input whatever, < that is a bug. Reliable utilities never crash. < < * If a binary utility produces an error message for valid input, < that is a bug. < < * If you are an experienced user of binary utilities, your < suggestions for improvement are welcome in any case. < <  < File: binutils.info, Node: Bug Reporting, Prev: Bug Criteria, Up: Reporting Bugs < < How to report bugs < ================== < < A number of companies and individuals offer support for GNU < products. If you obtained the binary utilities from a support < organization, we recommend you contact that organization first. < < You can find contact information for many support companies and < individuals in the file `etc/SERVICE' in the GNU Emacs distribution. < < In any event, we also recommend that you send bug reports for the < binary utilities to `bug-binutils@gnu.org'. < < The fundamental principle of reporting bugs usefully is this: < *report all the facts*. If you are not sure whether to state a fact or < leave it out, state it! < < Often people omit facts because they think they know what causes the < problem and assume that some details do not matter. Thus, you might < assume that the name of a file you use in an example does not matter. < Well, probably it does not, but one cannot be sure. Perhaps the bug is < a stray memory reference which happens to fetch from the location where < that pathname is stored in memory; perhaps, if the pathname were < different, the contents of that location would fool the utility into < doing the right thing despite the bug. Play it safe and give a < specific, complete example. That is the easiest thing for you to do, < and the most helpful. < < Keep in mind that the purpose of a bug report is to enable us to fix < the bug if it is new to us. Therefore, always write your bug reports < on the assumption that the bug has not been reported previously. < < Sometimes people give a few sketchy facts and ask, "Does this ring a < bell?" Those bug reports are useless, and we urge everyone to _refuse < to respond to them_ except to chide the sender to report bugs properly. < < To enable us to fix the bug, you should include all these things: < < * The version of the utility. Each utility announces it if you < start it with the `--version' argument. < < Without this, we will not know whether there is any point in < looking for the bug in the current version of the binary utilities. < < * Any patches you may have applied to the source, including any < patches made to the `BFD' library. < < * The type of machine you are using, and the operating system name < and version number. < < * What compiler (and its version) was used to compile the < utilities--e.g. "`gcc-2.7'". < < * The command arguments you gave the utility to observe the bug. To < guarantee you will not omit something important, list them all. A < copy of the Makefile (or the output from make) is sufficient. < < If we were to try to guess the arguments, we would probably guess < wrong and then we might not encounter the bug. < < * A complete input file, or set of input files, that will reproduce < the bug. If the utility is reading an object file or files, then < it is generally most helpful to send the actual object files, < uuencoded if necessary to get them through the mail system. Note < that `bug-binutils@gnu.org' is a mailing list, so you should avoid < sending very large files to it. Making the files available for < anonymous FTP is OK. < < If the source files were produced exclusively using GNU programs < (e.g., `gcc', `gas', and/or the GNU `ld'), then it may be OK to < send the source files rather than the object files. In this case, < be sure to say exactly what version of `gcc', or whatever, was < used to produce the object files. Also say how `gcc', or < whatever, was configured. < < * A description of what behavior you observe that you believe is < incorrect. For example, "It gets a fatal signal." < < Of course, if the bug is that the utility gets a fatal signal, < then we will certainly notice it. But if the bug is incorrect < output, we might not notice unless it is glaringly wrong. You < might as well not give us a chance to make a mistake. < < Even if the problem you experience is a fatal signal, you should < still say so explicitly. Suppose something strange is going on, < such as your copy of the utility is out of synch, or you have < encountered a bug in the C library on your system. (This has < happened!) Your copy might crash and ours would not. If you told < us to expect a crash, then when ours fails to crash, we would know < that the bug was not happening for us. If you had not told us to < expect a crash, then we would not be able to draw any conclusion < from our observations. < < * If you wish to suggest changes to the source, send us context < diffs, as generated by `diff' with the `-u', `-c', or `-p' option. < Always send diffs from the old file to the new file. If you wish < to discuss something in the `ld' source, refer to it by context, < not by line number. < < The line numbers in our development sources will not match those < in your sources. Your line numbers would convey no useful < information to us. < < Here are some things that are not necessary: < < * A description of the envelope of the bug. < < Often people who encounter a bug spend a lot of time investigating < which changes to the input file will make the bug go away and which < changes will not affect it. < < This is often time consuming and not very useful, because the way < we will find the bug is by running a single example under the < debugger with breakpoints, not by pure deduction from a series of < examples. We recommend that you save your time for something else. < < Of course, if you can find a simpler example to report _instead_ < of the original one, that is a convenience for us. Errors in the < output will be easier to spot, running under the debugger will take < less time, and so on. < < However, simplification is not vital; if you do not want to do < this, report the bug anyway and send us the entire test case you < used. < < * A patch for the bug. < < A patch for the bug does help us if it is a good one. But do not < omit the necessary information, such as the test case, on the < assumption that a patch is all we need. We might see problems < with your patch and decide to fix the problem another way, or we < might not understand it at all. < < Sometimes with programs as complicated as the binary utilities it < is very hard to construct an example that will make the program < follow a certain path through the code. If you do not send us the < example, we will not be able to construct one, so we will not be < able to verify that the bug is fixed. < < And if we cannot understand what bug you are trying to fix, or why < your patch should be an improvement, we will not install it. A < test case will help us to understand. < < * A guess about what the bug is or what it depends on. < < Such guesses are usually wrong. Even we cannot guess right about < such things without first using the debugger to find the facts. diff -rN binutils-2.11/binutils/binutils.info-3 binutils-2.11.2/binutils/binutils.info-3 33a34,255 > File: binutils.info, Node: Linker Emulation Selection, Prev: Architecture Selection, Up: Selecting The Target System > > Linker emulation selection > ========================== > > A linker "emulation" is a "personality" of the linker, which gives > the linker default values for the other aspects of the target system. > In particular, it consists of > > * the linker script > > * the target > > * several "hook" functions that are run at certain stages of the > linking process to do special things that some targets require > > The command to list valid linker emulation values is `ld -V'. > > Sample values: `hp300bsd', `mipslit', `sun4'. > > Ways to specify: > > 1. command line option: `-m' (*note Options: (ld.info)Options.) > > 2. environment variable `LDEMULATION' > > 3. compiled-in `DEFAULT_EMULATION' from `Makefile', which comes from > `EMUL' in `config/TARGET.mt' > >  > File: binutils.info, Node: Reporting Bugs, Next: GNU Free Documentation License, Prev: Selecting The Target System, Up: Top > > Reporting Bugs > ************** > > Your bug reports play an essential role in making the binary > utilities reliable. > > Reporting a bug may help you by bringing a solution to your problem, > or it may not. But in any case the principal function of a bug report > is to help the entire community by making the next version of the binary > utilities work better. Bug reports are your contribution to their > maintenance. > > In order for a bug report to serve its purpose, you must include the > information that enables us to fix the bug. > > * Menu: > > * Bug Criteria:: Have you found a bug? > * Bug Reporting:: How to report bugs > >  > File: binutils.info, Node: Bug Criteria, Next: Bug Reporting, Up: Reporting Bugs > > Have you found a bug? > ===================== > > If you are not sure whether you have found a bug, here are some > guidelines: > > * If a binary utility gets a fatal signal, for any input whatever, > that is a bug. Reliable utilities never crash. > > * If a binary utility produces an error message for valid input, > that is a bug. > > * If you are an experienced user of binary utilities, your > suggestions for improvement are welcome in any case. > >  > File: binutils.info, Node: Bug Reporting, Prev: Bug Criteria, Up: Reporting Bugs > > How to report bugs > ================== > > A number of companies and individuals offer support for GNU > products. If you obtained the binary utilities from a support > organization, we recommend you contact that organization first. > > You can find contact information for many support companies and > individuals in the file `etc/SERVICE' in the GNU Emacs distribution. > > In any event, we also recommend that you send bug reports for the > binary utilities to `bug-binutils@gnu.org'. > > The fundamental principle of reporting bugs usefully is this: > *report all the facts*. If you are not sure whether to state a fact or > leave it out, state it! > > Often people omit facts because they think they know what causes the > problem and assume that some details do not matter. Thus, you might > assume that the name of a file you use in an example does not matter. > Well, probably it does not, but one cannot be sure. Perhaps the bug is > a stray memory reference which happens to fetch from the location where > that pathname is stored in memory; perhaps, if the pathname were > different, the contents of that location would fool the utility into > doing the right thing despite the bug. Play it safe and give a > specific, complete example. That is the easiest thing for you to do, > and the most helpful. > > Keep in mind that the purpose of a bug report is to enable us to fix > the bug if it is new to us. Therefore, always write your bug reports > on the assumption that the bug has not been reported previously. > > Sometimes people give a few sketchy facts and ask, "Does this ring a > bell?" Those bug reports are useless, and we urge everyone to _refuse > to respond to them_ except to chide the sender to report bugs properly. > > To enable us to fix the bug, you should include all these things: > > * The version of the utility. Each utility announces it if you > start it with the `--version' argument. > > Without this, we will not know whether there is any point in > looking for the bug in the current version of the binary utilities. > > * Any patches you may have applied to the source, including any > patches made to the `BFD' library. > > * The type of machine you are using, and the operating system name > and version number. > > * What compiler (and its version) was used to compile the > utilities--e.g. "`gcc-2.7'". > > * The command arguments you gave the utility to observe the bug. To > guarantee you will not omit something important, list them all. A > copy of the Makefile (or the output from make) is sufficient. > > If we were to try to guess the arguments, we would probably guess > wrong and then we might not encounter the bug. > > * A complete input file, or set of input files, that will reproduce > the bug. If the utility is reading an object file or files, then > it is generally most helpful to send the actual object files, > uuencoded if necessary to get them through the mail system. Note > that `bug-binutils@gnu.org' is a mailing list, so you should avoid > sending very large files to it. Making the files available for > anonymous FTP is OK. > > If the source files were produced exclusively using GNU programs > (e.g., `gcc', `gas', and/or the GNU `ld'), then it may be OK to > send the source files rather than the object files. In this case, > be sure to say exactly what version of `gcc', or whatever, was > used to produce the object files. Also say how `gcc', or > whatever, was configured. > > * A description of what behavior you observe that you believe is > incorrect. For example, "It gets a fatal signal." > > Of course, if the bug is that the utility gets a fatal signal, > then we will certainly notice it. But if the bug is incorrect > output, we might not notice unless it is glaringly wrong. You > might as well not give us a chance to make a mistake. > > Even if the problem you experience is a fatal signal, you should > still say so explicitly. Suppose something strange is going on, > such as your copy of the utility is out of synch, or you have > encountered a bug in the C library on your system. (This has > happened!) Your copy might crash and ours would not. If you told > us to expect a crash, then when ours fails to crash, we would know > that the bug was not happening for us. If you had not told us to > expect a crash, then we would not be able to draw any conclusion > from our observations. > > * If you wish to suggest changes to the source, send us context > diffs, as generated by `diff' with the `-u', `-c', or `-p' option. > Always send diffs from the old file to the new file. If you wish > to discuss something in the `ld' source, refer to it by context, > not by line number. > > The line numbers in our development sources will not match those > in your sources. Your line numbers would convey no useful > information to us. > > Here are some things that are not necessary: > > * A description of the envelope of the bug. > > Often people who encounter a bug spend a lot of time investigating > which changes to the input file will make the bug go away and which > changes will not affect it. > > This is often time consuming and not very useful, because the way > we will find the bug is by running a single example under the > debugger with breakpoints, not by pure deduction from a series of > examples. We recommend that you save your time for something else. > > Of course, if you can find a simpler example to report _instead_ > of the original one, that is a convenience for us. Errors in the > output will be easier to spot, running under the debugger will take > less time, and so on. > > However, simplification is not vital; if you do not want to do > this, report the bug anyway and send us the entire test case you > used. > > * A patch for the bug. > > A patch for the bug does help us if it is a good one. But do not > omit the necessary information, such as the test case, on the > assumption that a patch is all we need. We might see problems > with your patch and decide to fix the problem another way, or we > might not understand it at all. > > Sometimes with programs as complicated as the binary utilities it > is very hard to construct an example that will make the program > follow a certain path through the code. If you do not send us the > example, we will not be able to construct one, so we will not be > able to verify that the bug is fixed. > > And if we cannot understand what bug you are trying to fix, or why > your patch should be an improvement, we will not install it. A > test case will help us to understand. > > * A guess about what the bug is or what it depends on. > > Such guesses are usually wrong. Even we cannot guess right about > such things without first using the debugger to find the facts. > >  diff -rN binutils-2.11/binutils/binutils.texi binutils-2.11.2/binutils/binutils.texi 879a880 > [ -G @var{symbolname} | --keep-global-symbol=@var{symbolname}] 899a901,905 > [ --keep-symbols=@var{filename} ] > [ --strip-symbols=@var{filename} ] > [ --keep-global-symbols=@var{filename} ] > [ --localize-symbols=@var{filename} ] > [ --weaken-symbols=@var{filename} ] 995a1002,1007 > @item -G @var{symbolname} > @itemx --keep-global-symbol=@var{symbolname} > Keep only symbol @var{symbolname} global. Make all other symbols local > to the file, so that they are not visible externally. This option may > be given more than once. > 1177a1190,1219 > > @item --keep-symbols=@var{filename} > Apply @samp{--keep-symbol} option to each symbol listed in the file > @var{filename}. @var{filename} is simply a flat file, with one symbol > name per line. Line comments may be introduced by the hash character. > This option may be given more than once. > > @item --strip-symbols=@var{filename} > Apply @samp{--strip-symbol} option to each symbol listed in the file > @var{filename}. @var{filename} is simply a flat file, with one symbol > name per line. Line comments may be introduced by the hash character. > This option may be given more than once. > > @item --keep-global-symbols=@var{filename} > Apply @samp{--keep-global-symbol} option to each symbol listed in the > file @var{filename}. @var{filename} is simply a flat file, with one > symbol name per line. Line comments may be introduced by the hash > character. This option may be given more than once. > > @item --localize-symbols=@var{filename} > Apply @samp{--localize-symbol} option to each symbol listed in the file > @var{filename}. @var{filename} is simply a flat file, with one symbol > name per line. Line comments may be introduced by the hash character. > This option may be given more than once. > > @item --weaken-symbols=@var{filename} > Apply @samp{--weaken-symbol} option to each symbol listed in the file > @var{filename}. @var{filename} is simply a flat file, with one symbol > name per line. Line comments may be introduced by the hash character. > This option may be given more than once. diff -rN binutils-2.11/binutils/bucomm.c binutils-2.11.2/binutils/bucomm.c 2c2 < Copyright (C) 1991, 92, 93, 94, 95, 97, 98, 2000 --- > Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001 160c160 < extern bfd_target *bfd_target_vector[]; --- > extern const bfd_target *const *bfd_target_vector; diff -rN binutils-2.11/binutils/bucomm.h binutils-2.11.2/binutils/bucomm.h 2c2 < Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 diff -rN binutils-2.11/binutils/budbg.h binutils-2.11.2/binutils/budbg.h 2c2 < Copyright (C) 1995, 1996 Free Software Foundation, Inc. --- > Copyright 1995, 1996 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/coffdump.c binutils-2.11.2/binutils/coffdump.c 2c2 < Copyright (C) 1994, 95, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/coffgrok.c binutils-2.11.2/binutils/coffgrok.c 2c2 < Copyright (C) 1994, 95, 97, 1998 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1997, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/coffgrok.h binutils-2.11.2/binutils/coffgrok.h 0a1,19 > /* coffgrok.h > Copyright 2001 Free Software Foundation, Inc. > > This file is part of GNU Binutils. > > 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. */ > diff -rN binutils-2.11/binutils/config.in binutils-2.11.2/binutils/config.in 30a31,33 > /* Define if you need to in order for stat and other things to work. */ > #undef _POSIX_SOURCE > diff -rN binutils-2.11/binutils/config.texi binutils-2.11.2/binutils/config.texi 1c1 < @set VERSION 2.11 --- > @set VERSION 2.11.2 diff -rN binutils-2.11/binutils/configure binutils-2.11.2/binutils/configure 730a731,758 > # 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:735: 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=":" > ac_dummy="$PATH" > for ac_dir in $ac_dummy; 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 732,735c760,765 < echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 < echo "configure:734: checking for strerror in -lcposix" >&5 < ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` < if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- > 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:765: checking for $ac_word" >&5 > if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 738,741c768,858 < ac_save_LIBS="$LIBS" < LIBS="-lcposix $LIBS" < cat > conftest.$ac_ext < if test -n "$CC"; then > ac_cv_prog_CC="$CC" # Let the user override the test. > else > IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" > ac_prog_rejected=no > ac_dummy="$PATH" > for ac_dir in $ac_dummy; 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 > > if test -z "$CC"; then > case "`uname -s`" in > *win32* | *WIN32*) > # Extract the first word of "cl", so it can be a program name with args. > set dummy cl; ac_word=$2 > echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 > echo "configure:816: 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=":" > ac_dummy="$PATH" > for ac_dir in $ac_dummy; do > test -z "$ac_dir" && ac_dir=. > if test -f $ac_dir/$ac_word; then > ac_cv_prog_CC="cl" > 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 > ;; > esac > 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:848: 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' > cross_compiling=$ac_cv_prog_cc_cross > > cat > conftest.$ac_ext << EOF > > #line 859 "configure" 743,746d859 < /* Override any gcc2 internal prototype to avoid an error. */ < /* We use char because int might match the return type of a gcc2 < builtin and then its argument prototype would still apply. */ < char strerror(); 748,750c861 < int main() { < strerror() < ; return 0; } --- > main(){return(0);} 752,754c863,870 < if { (eval echo configure:753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then < rm -rf conftest* < eval "ac_cv_lib_$ac_lib_var=yes" --- > if { (eval echo configure:864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 758,759c874,930 < rm -rf conftest* < eval "ac_cv_lib_$ac_lib_var=no" --- > ac_cv_prog_cc_works=no > fi > rm -fr conftest* > 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' > cross_compiling=$ac_cv_prog_cc_cross > > 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:890: 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:895: 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 < #ifdef __GNUC__ > yes; > #endif > EOF > if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:904: \"$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 $ac_cv_prog_gcc = yes; then > GCC=yes > else > GCC= > fi > > 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:923: 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 > 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 762d932 < LIBS="$ac_save_LIBS" 765c935,957 < if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then --- > > 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 > if test "$GCC" = yes; then > CFLAGS="-g -O2" > else > CFLAGS="-g" > fi > else > if test "$GCC" = yes; then > CFLAGS="-O2" > else > CFLAGS= > fi > fi > > echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 > echo "configure:955: 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 767c959,968 < LIBS="$LIBS -lcposix" --- > ISC=yes # If later tests want to check for ISC. > cat >> confdefs.h <<\EOF > #define _POSIX_SOURCE 1 > EOF > > if test "$GCC" = yes; then > CC="$CC -posix" > else > CC="$CC -Xp" > fi 769a971 > ISC= 772,773d973 < < 774a975 > BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in` 787c988 < echo "configure:788: checking for a BSD compatible install" >&5 --- > echo "configure:989: checking for a BSD compatible install" >&5 840c1041 < echo "configure:841: checking whether build environment is sane" >&5 --- > echo "configure:1042: checking whether build environment is sane" >&5 897c1098 < echo "configure:898: checking whether ${MAKE-make} sets \${MAKE}" >&5 --- > echo "configure:1099: checking whether ${MAKE-make} sets \${MAKE}" >&5 926c1127 < VERSION=2.11 --- > VERSION=${BFD_VERSION} 943c1144 < echo "configure:944: checking for working aclocal" >&5 --- > echo "configure:1145: checking for working aclocal" >&5 956c1157 < echo "configure:957: checking for working autoconf" >&5 --- > echo "configure:1158: checking for working autoconf" >&5 969c1170 < echo "configure:970: checking for working automake" >&5 --- > echo "configure:1171: checking for working automake" >&5 982c1183 < echo "configure:983: checking for working autoheader" >&5 --- > echo "configure:1184: checking for working autoheader" >&5 995c1196 < echo "configure:996: checking for working makeinfo" >&5 --- > echo "configure:1197: checking for working makeinfo" >&5 1078,1299d1278 < # 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:1082: 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=":" < ac_dummy="$PATH" < for ac_dir in $ac_dummy; 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:1112: 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=":" < ac_prog_rejected=no < ac_dummy="$PATH" < for ac_dir in $ac_dummy; 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 < < if test -z "$CC"; then < case "`uname -s`" in < *win32* | *WIN32*) < # Extract the first word of "cl", so it can be a program name with args. < set dummy cl; ac_word=$2 < echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 < echo "configure:1163: 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=":" < ac_dummy="$PATH" < for ac_dir in $ac_dummy; do < test -z "$ac_dir" && ac_dir=. < if test -f $ac_dir/$ac_word; then < ac_cv_prog_CC="cl" < 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 < ;; < esac < 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:1195: 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' < cross_compiling=$ac_cv_prog_cc_cross < < cat > conftest.$ac_ext << EOF < < #line 1206 "configure" < #include "confdefs.h" < < main(){return(0);} < EOF < if { (eval echo configure:1211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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* < 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' < cross_compiling=$ac_cv_prog_cc_cross < < 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:1237: 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:1242: 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 <&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 $ac_cv_prog_gcc = yes; then < GCC=yes < else < GCC= < fi < < 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:1270: 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 < 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 < if test "$GCC" = yes; then < CFLAGS="-g -O2" < else < CFLAGS="-g" < fi < else < if test "$GCC" = yes; then < CFLAGS="-O2" < else < CFLAGS= < fi < fi < 1312c1291 < echo "configure:1313: checking for ld used by GCC" >&5 --- > echo "configure:1292: checking for ld used by GCC" >&5 1342c1321 < echo "configure:1343: checking for GNU ld" >&5 --- > echo "configure:1322: checking for GNU ld" >&5 1345c1324 < echo "configure:1346: checking for non-GNU ld" >&5 --- > echo "configure:1325: checking for non-GNU ld" >&5 1380c1359 < echo "configure:1381: checking if the linker ($LD) is GNU ld" >&5 --- > echo "configure:1360: checking if the linker ($LD) is GNU ld" >&5 1397c1376 < echo "configure:1398: checking for $LD option to reload object files" >&5 --- > echo "configure:1377: checking for $LD option to reload object files" >&5 1409c1388 < echo "configure:1410: checking for BSD-compatible nm" >&5 --- > echo "configure:1389: checking for BSD-compatible nm" >&5 1447c1426 < echo "configure:1448: checking whether ln -s works" >&5 --- > echo "configure:1427: checking whether ln -s works" >&5 1468c1447 < echo "configure:1469: checking how to recognise dependant libraries" >&5 --- > echo "configure:1448: checking how to recognise dependant libraries" >&5 1611c1590 < echo "configure:1612: checking for object suffix" >&5 --- > echo "configure:1591: checking for object suffix" >&5 1617c1596 < if { (eval echo configure:1618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1637c1616 < echo "configure:1638: checking for executable suffix" >&5 --- > echo "configure:1617: checking for executable suffix" >&5 1647c1626 < if { (eval echo configure:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then --- > if { (eval echo configure:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then 1680c1659 < echo "configure:1681: checking for ${ac_tool_prefix}file" >&5 --- > echo "configure:1660: checking for ${ac_tool_prefix}file" >&5 1742c1721 < echo "configure:1743: checking for file" >&5 --- > echo "configure:1722: checking for file" >&5 1813c1792 < echo "configure:1814: checking for $ac_word" >&5 --- > echo "configure:1793: checking for $ac_word" >&5 1845c1824 < echo "configure:1846: checking for $ac_word" >&5 --- > echo "configure:1825: checking for $ac_word" >&5 1880c1859 < echo "configure:1881: checking for $ac_word" >&5 --- > echo "configure:1860: checking for $ac_word" >&5 1912c1891 < echo "configure:1913: checking for $ac_word" >&5 --- > echo "configure:1892: checking for $ac_word" >&5 1979,1980c1958,1959 < echo '#line 1980 "configure"' > conftest.$ac_ext < if { (eval echo configure:1981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > echo '#line 1959 "configure"' > conftest.$ac_ext > if { (eval echo configure:1960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 2001c1980 < echo "configure:2002: checking whether the C compiler needs -belf" >&5 --- > echo "configure:1981: checking whether the C compiler needs -belf" >&5 2014c1993 < #line 2015 "configure" --- > #line 1994 "configure" 2021c2000 < if { (eval echo configure:2022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2195c2174 < echo "configure:2196: checking for $ac_word" >&5 --- > echo "configure:2175: checking for $ac_word" >&5 2225c2204 < echo "configure:2226: checking for $ac_word" >&5 --- > echo "configure:2205: checking for $ac_word" >&5 2276c2255 < echo "configure:2277: checking for $ac_word" >&5 --- > echo "configure:2256: checking for $ac_word" >&5 2308c2287 < echo "configure:2309: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 --- > echo "configure:2288: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 2319c2298 < #line 2320 "configure" --- > #line 2299 "configure" 2324c2303 < if { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2350c2329 < echo "configure:2351: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 --- > echo "configure:2330: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 2355c2334 < echo "configure:2356: checking whether we are using GNU C" >&5 --- > echo "configure:2335: checking whether we are using GNU C" >&5 2364c2343 < if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2365: \"$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:2344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 2383c2362 < echo "configure:2384: checking whether ${CC-cc} accepts -g" >&5 --- > echo "configure:2363: checking whether ${CC-cc} accepts -g" >&5 2420c2399 < echo "configure:2421: checking for $ac_word" >&5 --- > echo "configure:2400: checking for $ac_word" >&5 2451c2430 < echo "configure:2452: checking how to run the C preprocessor" >&5 --- > echo "configure:2431: checking how to run the C preprocessor" >&5 2466c2445 < #line 2467 "configure" --- > #line 2446 "configure" 2472c2451 < { (eval echo configure:2473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:2452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2483c2462 < #line 2484 "configure" --- > #line 2463 "configure" 2489c2468 < { (eval echo configure:2490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:2469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2500c2479 < #line 2501 "configure" --- > #line 2480 "configure" 2506c2485 < { (eval echo configure:2507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:2486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2536c2515 < echo "configure:2537: checking for $ac_word" >&5 --- > echo "configure:2516: checking for $ac_word" >&5 2569c2548 < echo "configure:2570: checking for $ac_word" >&5 --- > echo "configure:2549: checking for $ac_word" >&5 2603c2582 < echo "configure:2604: checking for yywrap in -l$ac_lib" >&5 --- > echo "configure:2583: checking for yywrap in -l$ac_lib" >&5 2611c2590 < #line 2612 "configure" --- > #line 2591 "configure" 2622c2601 < if { (eval echo configure:2623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2645c2624 < echo "configure:2646: checking lex output file root" >&5 --- > echo "configure:2625: checking lex output file root" >&5 2666c2645 < echo "configure:2667: checking whether yytext is a pointer" >&5 --- > echo "configure:2646: checking whether yytext is a pointer" >&5 2678c2657 < #line 2679 "configure" --- > #line 2658 "configure" 2685c2664 < if { (eval echo configure:2686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2711c2690 < echo "configure:2712: checking for $ac_word" >&5 --- > echo "configure:2691: checking for $ac_word" >&5 2739c2718 < echo "configure:2740: checking for ANSI C header files" >&5 --- > echo "configure:2719: checking for ANSI C header files" >&5 2744c2723 < #line 2745 "configure" --- > #line 2724 "configure" 2752c2731 < { (eval echo configure:2753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:2732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2769c2748 < #line 2770 "configure" --- > #line 2749 "configure" 2787c2766 < #line 2788 "configure" --- > #line 2767 "configure" 2808c2787 < #line 2809 "configure" --- > #line 2788 "configure" 2819c2798 < if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --- > if { (eval echo configure:2799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 2843c2822 < echo "configure:2844: checking for working const" >&5 --- > echo "configure:2823: checking for working const" >&5 2848c2827 < #line 2849 "configure" --- > #line 2828 "configure" 2897c2876 < if { (eval echo configure:2898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:2877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 2918c2897 < echo "configure:2919: checking for inline" >&5 --- > echo "configure:2898: checking for inline" >&5 2925c2904 < #line 2926 "configure" --- > #line 2905 "configure" 2932c2911 < if { (eval echo configure:2933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:2912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 2958c2937 < echo "configure:2959: checking for off_t" >&5 --- > echo "configure:2938: checking for off_t" >&5 2963c2942 < #line 2964 "configure" --- > #line 2943 "configure" 2991c2970 < echo "configure:2992: checking for size_t" >&5 --- > echo "configure:2971: checking for size_t" >&5 2996c2975 < #line 2997 "configure" --- > #line 2976 "configure" 3026c3005 < echo "configure:3027: checking for working alloca.h" >&5 --- > echo "configure:3006: checking for working alloca.h" >&5 3031c3010 < #line 3032 "configure" --- > #line 3011 "configure" 3038c3017 < if { (eval echo configure:3039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3059c3038 < echo "configure:3060: checking for alloca" >&5 --- > echo "configure:3039: checking for alloca" >&5 3064c3043 < #line 3065 "configure" --- > #line 3044 "configure" 3092c3071 < if { (eval echo configure:3093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3124c3103 < echo "configure:3125: checking whether alloca needs Cray hooks" >&5 --- > echo "configure:3104: checking whether alloca needs Cray hooks" >&5 3129c3108 < #line 3130 "configure" --- > #line 3109 "configure" 3154c3133 < echo "configure:3155: checking for $ac_func" >&5 --- > echo "configure:3134: checking for $ac_func" >&5 3159c3138 < #line 3160 "configure" --- > #line 3139 "configure" 3182c3161 < if { (eval echo configure:3183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3209c3188 < echo "configure:3210: checking stack direction for C alloca" >&5 --- > echo "configure:3189: checking stack direction for C alloca" >&5 3217c3196 < #line 3218 "configure" --- > #line 3197 "configure" 3236c3215 < if { (eval echo configure:3237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --- > if { (eval echo configure:3216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 3261c3240 < echo "configure:3262: checking for $ac_hdr" >&5 --- > echo "configure:3241: checking for $ac_hdr" >&5 3266c3245 < #line 3267 "configure" --- > #line 3246 "configure" 3271c3250 < { (eval echo configure:3272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:3251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 3300c3279 < echo "configure:3301: checking for $ac_func" >&5 --- > echo "configure:3280: checking for $ac_func" >&5 3305c3284 < #line 3306 "configure" --- > #line 3285 "configure" 3328c3307 < if { (eval echo configure:3329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3353c3332 < echo "configure:3354: checking for working mmap" >&5 --- > echo "configure:3333: checking for working mmap" >&5 3361c3340 < #line 3362 "configure" --- > #line 3341 "configure" 3501c3480 < if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --- > if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 3529c3508 < echo "configure:3530: checking for $ac_hdr" >&5 --- > echo "configure:3509: checking for $ac_hdr" >&5 3534c3513 < #line 3535 "configure" --- > #line 3514 "configure" 3539c3518 < { (eval echo configure:3540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:3519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 3569c3548 < echo "configure:3570: checking for $ac_func" >&5 --- > echo "configure:3549: checking for $ac_func" >&5 3574c3553 < #line 3575 "configure" --- > #line 3554 "configure" 3597c3576 < if { (eval echo configure:3598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3626c3605 < echo "configure:3627: checking for $ac_func" >&5 --- > echo "configure:3606: checking for $ac_func" >&5 3631c3610 < #line 3632 "configure" --- > #line 3611 "configure" 3654c3633 < if { (eval echo configure:3655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3688c3667 < echo "configure:3689: checking for LC_MESSAGES" >&5 --- > echo "configure:3668: checking for LC_MESSAGES" >&5 3693c3672 < #line 3694 "configure" --- > #line 3673 "configure" 3700c3679 < if { (eval echo configure:3701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3721c3700 < echo "configure:3722: checking whether NLS is requested" >&5 --- > echo "configure:3701: checking whether NLS is requested" >&5 3741c3720 < echo "configure:3742: checking whether included gettext is requested" >&5 --- > echo "configure:3721: checking whether included gettext is requested" >&5 3760c3739 < echo "configure:3761: checking for libintl.h" >&5 --- > echo "configure:3740: checking for libintl.h" >&5 3765c3744 < #line 3766 "configure" --- > #line 3745 "configure" 3770c3749 < { (eval echo configure:3771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:3750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 3787c3766 < echo "configure:3788: checking for gettext in libc" >&5 --- > echo "configure:3767: checking for gettext in libc" >&5 3792c3771 < #line 3793 "configure" --- > #line 3772 "configure" 3799c3778 < if { (eval echo configure:3800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3815c3794 < echo "configure:3816: checking for bindtextdomain in -lintl" >&5 --- > echo "configure:3795: checking for bindtextdomain in -lintl" >&5 3823c3802 < #line 3824 "configure" --- > #line 3803 "configure" 3834c3813 < if { (eval echo configure:3835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3850c3829 < echo "configure:3851: checking for gettext in libintl" >&5 --- > echo "configure:3830: checking for gettext in libintl" >&5 3855c3834 < #line 3856 "configure" --- > #line 3835 "configure" 3862c3841 < if { (eval echo configure:3863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3890c3869 < echo "configure:3891: checking for $ac_word" >&5 --- > echo "configure:3870: checking for $ac_word" >&5 3924c3903 < echo "configure:3925: checking for $ac_func" >&5 --- > echo "configure:3904: checking for $ac_func" >&5 3929c3908 < #line 3930 "configure" --- > #line 3909 "configure" 3952c3931 < if { (eval echo configure:3953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3979c3958 < echo "configure:3980: checking for $ac_word" >&5 --- > echo "configure:3959: checking for $ac_word" >&5 4015c3994 < echo "configure:4016: checking for $ac_word" >&5 --- > echo "configure:3995: checking for $ac_word" >&5 4047c4026 < #line 4048 "configure" --- > #line 4027 "configure" 4055c4034 < if { (eval echo configure:4056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4087c4066 < echo "configure:4088: checking for $ac_word" >&5 --- > echo "configure:4067: checking for $ac_word" >&5 4121c4100 < echo "configure:4122: checking for $ac_word" >&5 --- > echo "configure:4101: checking for $ac_word" >&5 4157c4136 < echo "configure:4158: checking for $ac_word" >&5 --- > echo "configure:4137: checking for $ac_word" >&5 4247c4226 < echo "configure:4248: checking for catalogs to be installed" >&5 --- > echo "configure:4227: checking for catalogs to be installed" >&5 4275c4254 < echo "configure:4276: checking for linux/version.h" >&5 --- > echo "configure:4255: checking for linux/version.h" >&5 4280c4259 < #line 4281 "configure" --- > #line 4260 "configure" 4285c4264 < { (eval echo configure:4286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:4265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 4348c4327 < echo "configure:4349: checking whether to enable maintainer-specific portions of Makefiles" >&5 --- > echo "configure:4328: checking whether to enable maintainer-specific portions of Makefiles" >&5 4373c4352 < echo "configure:4374: checking for executable suffix" >&5 --- > echo "configure:4353: checking for executable suffix" >&5 4383c4362 < if { (eval echo configure:4384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then --- > if { (eval echo configure:4363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then 4426c4405 < echo "configure:4427: checking for $ac_word" >&5 --- > echo "configure:4406: checking for $ac_word" >&5 4465c4444 < echo "configure:4466: checking for a BSD compatible install" >&5 --- > echo "configure:4445: checking for a BSD compatible install" >&5 4532c4511 < echo "configure:4533: checking for build system executable suffix" >&5 --- > echo "configure:4512: checking for build system executable suffix" >&5 4567c4546 < echo "configure:4568: checking for $ac_hdr" >&5 --- > echo "configure:4547: checking for $ac_hdr" >&5 4572c4551 < #line 4573 "configure" --- > #line 4552 "configure" 4577c4556 < { (eval echo configure:4578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:4557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 4604c4583 < echo "configure:4605: checking for sys/wait.h that is POSIX.1 compatible" >&5 --- > echo "configure:4584: checking for sys/wait.h that is POSIX.1 compatible" >&5 4609c4588 < #line 4610 "configure" --- > #line 4589 "configure" 4625c4604 < if { (eval echo configure:4626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:4605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 4648c4627 < echo "configure:4649: checking for working alloca.h" >&5 --- > echo "configure:4628: checking for working alloca.h" >&5 4653c4632 < #line 4654 "configure" --- > #line 4633 "configure" 4660c4639 < if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4681c4660 < echo "configure:4682: checking for alloca" >&5 --- > echo "configure:4661: checking for alloca" >&5 4686c4665 < #line 4687 "configure" --- > #line 4666 "configure" 4714c4693 < if { (eval echo configure:4715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4746c4725 < echo "configure:4747: checking whether alloca needs Cray hooks" >&5 --- > echo "configure:4726: checking whether alloca needs Cray hooks" >&5 4751c4730 < #line 4752 "configure" --- > #line 4731 "configure" 4776c4755 < echo "configure:4777: checking for $ac_func" >&5 --- > echo "configure:4756: checking for $ac_func" >&5 4781c4760 < #line 4782 "configure" --- > #line 4761 "configure" 4804c4783 < if { (eval echo configure:4805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4831c4810 < echo "configure:4832: checking stack direction for C alloca" >&5 --- > echo "configure:4811: checking stack direction for C alloca" >&5 4839c4818 < #line 4840 "configure" --- > #line 4819 "configure" 4858c4837 < if { (eval echo configure:4859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --- > if { (eval echo configure:4838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 4882c4861 < echo "configure:4883: checking for $ac_func" >&5 --- > echo "configure:4862: checking for $ac_func" >&5 4887c4866 < #line 4888 "configure" --- > #line 4867 "configure" 4910c4889 < if { (eval echo configure:4911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4938c4917 < echo "configure:4939: checking for library containing frexp" >&5 --- > echo "configure:4918: checking for library containing frexp" >&5 4945c4924 < #line 4946 "configure" --- > #line 4925 "configure" 4956c4935 < if { (eval echo configure:4957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4967c4946 < #line 4968 "configure" --- > #line 4947 "configure" 4978c4957 < if { (eval echo configure:4979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5000c4979 < echo "configure:5001: checking for time_t in time.h" >&5 --- > echo "configure:4980: checking for time_t in time.h" >&5 5005c4984 < #line 5006 "configure" --- > #line 4985 "configure" 5012c4991 < if { (eval echo configure:5013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:4992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5033c5012 < echo "configure:5034: checking for time_t in sys/types.h" >&5 --- > echo "configure:5013: checking for time_t in sys/types.h" >&5 5038c5017 < #line 5039 "configure" --- > #line 5018 "configure" 5045c5024 < if { (eval echo configure:5046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5068c5047 < echo "configure:5069: checking for utime.h" >&5 --- > echo "configure:5048: checking for utime.h" >&5 5073c5052 < #line 5074 "configure" --- > #line 5053 "configure" 5084c5063 < if { (eval echo configure:5085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5105c5084 < echo "configure:5106: checking whether fprintf must be declared" >&5 --- > echo "configure:5085: checking whether fprintf must be declared" >&5 5110c5089 < #line 5111 "configure" --- > #line 5090 "configure" 5131c5110 < if { (eval echo configure:5132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5152c5131 < echo "configure:5153: checking whether strstr must be declared" >&5 --- > echo "configure:5132: checking whether strstr must be declared" >&5 5157c5136 < #line 5158 "configure" --- > #line 5137 "configure" 5178c5157 < if { (eval echo configure:5179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5199c5178 < echo "configure:5200: checking whether sbrk must be declared" >&5 --- > echo "configure:5179: checking whether sbrk must be declared" >&5 5204c5183 < #line 5205 "configure" --- > #line 5184 "configure" 5225c5204 < if { (eval echo configure:5226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5246c5225 < echo "configure:5247: checking whether getenv must be declared" >&5 --- > echo "configure:5226: checking whether getenv must be declared" >&5 5251c5230 < #line 5252 "configure" --- > #line 5231 "configure" 5272c5251 < if { (eval echo configure:5273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5293c5272 < echo "configure:5294: checking whether environ must be declared" >&5 --- > echo "configure:5273: checking whether environ must be declared" >&5 5298c5277 < #line 5299 "configure" --- > #line 5278 "configure" 5319c5298 < if { (eval echo configure:5320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5633a5613 > s%@CC@%$CC%g 5645d5624 < s%@CC@%$CC%g diff -rN binutils-2.11/binutils/configure.in binutils-2.11.2/binutils/configure.in 9c9,12 < AM_INIT_AUTOMAKE(binutils, 2.11) --- > changequote(,)dnl > BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in` > changequote([,])dnl > AM_INIT_AUTOMAKE(binutils, ${BFD_VERSION}) diff -rN binutils-2.11/binutils/debug.c binutils-2.11.2/binutils/debug.c 2c2 < Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/debug.h binutils-2.11.2/binutils/debug.h 2c2 < Copyright (C) 1995, 1996 Free Software Foundation, Inc. --- > Copyright 1995, 1996 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/deflex.c binutils-2.11.2/binutils/deflex.c 4c4 < * $Header: /cvs/src/src/binutils/Attic/deflex.c,v 1.1.4.1 2001/03/12 15:40:35 pb Exp $ --- > * $Header: /cvs/src/src/binutils/Attic/deflex.c,v 1.1.4.2 2001/06/10 15:37:28 pb Exp $ 480c480 < /* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc. --- > /* Copyright 1995, 1997, 1998, 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/deflex.l binutils-2.11.2/binutils/deflex.l 3c3 < /* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc. --- > /* Copyright 1995, 1997, 1998, 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/defparse.c binutils-2.11.2/binutils/defparse.c 38c38 < /* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc. --- > /* Copyright 1995, 1997, 1998, 1999 Free Software Foundation, Inc. 262c262 < #line 3 "/usr/share/misc/bison.simple" --- > #line 3 "/usr/share/bison/bison.simple" 476c476 < #line 217 "/usr/share/misc/bison.simple" --- > #line 217 "/usr/share/bison/bison.simple" 982c982 < #line 543 "/usr/share/misc/bison.simple" --- > #line 543 "/usr/share/bison/bison.simple" diff -rN binutils-2.11/binutils/defparse.y binutils-2.11.2/binutils/defparse.y 3c3 < /* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc. --- > /* Copyright 1995, 1997, 1998, 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/dlltool.c binutils-2.11.2/binutils/dlltool.c 2c2,3 < Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1997, 1998, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/dlltool.h binutils-2.11.2/binutils/dlltool.h 2c2 < Copyright (C) 1997, 1998 Free Software Foundation, Inc. --- > Copyright 1997, 1998 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/dllwrap.c binutils-2.11.2/binutils/dllwrap.c 2c2 < Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/filemode.c binutils-2.11.2/binutils/filemode.c 2c2,3 < Copyright (C) 1985, 90, 91, 94, 95, 97, 1999 Free Software Foundation, Inc. --- > Copyright 1985, 1990, 1991, 1994, 1995, 1997 > Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/ieee.c binutils-2.11.2/binutils/ieee.c 2c2 < Copyright 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. --- > Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/nlmconv.c binutils-2.11.2/binutils/nlmconv.c 2c2 < Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 diff -rN binutils-2.11/binutils/nlmconv.h binutils-2.11.2/binutils/nlmconv.h 2c2 < Copyright (C) 1993 Free Software Foundation, Inc. --- > Copyright 1993 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/nlmheader.c binutils-2.11.2/binutils/nlmheader.c 45c45 < Copyright (C) 1993, 94, 95, 97, 1998 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc. 338c338 < #line 3 "/usr/share/misc/bison.simple" --- > #line 3 "/usr/share/bison/bison.simple" 552c552 < #line 217 "/usr/share/misc/bison.simple" --- > #line 217 "/usr/share/bison/bison.simple" 1284c1284 < #line 543 "/usr/share/misc/bison.simple" --- > #line 543 "/usr/share/bison/bison.simple" diff -rN binutils-2.11/binutils/nlmheader.y binutils-2.11.2/binutils/nlmheader.y 2c2 < Copyright (C) 1993, 94, 95, 97, 1998 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/nm.c binutils-2.11.2/binutils/nm.c 2c2,3 < Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 --- > Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, > 2001 1477,1479c1478 < printf ("%*s", 16, ""); < #else < printf ("%*s", 8, ""); --- > printf (" "); 1480a1480 > printf (" "); diff -rN binutils-2.11/binutils/objcopy.1 binutils-2.11.2/binutils/objcopy.1 1,7c1,12 < .\" Copyright (c) 1991, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation < .\" See section COPYING for conditions for redistribution < .TH objcopy 1 "05 April 2000" "Free Software Foundation" "GNU Development Tools" < .de BP < .sp < .ti \-.2i < \(** --- > .\" Automatically generated by Pod::Man version 1.02 > .\" Wed May 30 12:24:28 2001 > .\" > .\" Standard preamble: > .\" ====================================================================== > .de Sh \" Subsection heading > .br > .if t .Sp > .ne 5 > .PP > \fB\\$1\fR > .PP 8a14,30 > .de Sp \" Vertical space (when we can't use .PP) > .if t .sp .5v > .if n .sp > .. > .de Ip \" List item > .br > .ie \\n(.$>=3 .ne \\$3 > .el .ne 3 > .IP "\\$1" \\$2 > .. > .de Vb \" Begin verbatim text > .ft CW > .nf > .ne \\$1 > .. > .de Ve \" End verbatim text > .ft R 10,13c32,72 < .SH NAME < objcopy \- copy and translate object files < < .SH SYNOPSIS --- > .fi > .. > .\" Set up some character translations and predefined strings. \*(-- will > .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left > .\" double quote, and \*(R" will give a right double quote. | will give a > .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used > .\" to do unbreakable dashes and therefore won't be available. \*(C` and > .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> > .tr \(*W-|\(bv\*(Tr > .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' > .ie n \{\ > . ds -- \(*W- > . ds PI pi > . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch > . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch > . ds L" "" > . ds R" "" > . ds C` ` > . ds C' ' > 'br\} > .el\{\ > . ds -- \|\(em\| > . ds PI \(*p > . ds L" `` > . ds R" '' > 'br\} > .\" > .\" If the F register is turned on, we'll generate index entries on stderr > .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and > .\" index entries marked with X<> in POD. Of course, you'll have to process > .\" the output yourself in some meaningful fashion. > .if \nF \{\ > . de IX > . tm Index:\\$1\t\\n%\t"\\$2" > . . > . nr % 0 > . rr F > .\} > .\" > .\" For nroff, turn off justification. Always turn off hyphenation; it > .\" makes way too many mistakes in technical documents. 15,68c74,190 < .na < .TP < .B objcopy < .RB "[\|" \-F\ \fIbfdname\fR\ |\ \fB\-\-target=\fIbfdname\fR "\|]" < .RB "[\|" \-I\ \fIbfdname\fR\ |\ \fB\-\-input\-target=\fIbfdname\fR "\|]" < .RB "[\|" \-O\ \fIbfdname\fR\ |\ \fB\-\-output\-target=\fIbfdname\fR "\|]" < .RB "[\|" \-j\ \fIsectionname\fR\ |\ \fB\-\-only\-section=\fIsectionname\fR "\|]" < .RB "[\|" \-R\ \fIsectionname\fR\ |\ \fB\-\-remove\-section=\fIsectionname\fR "\|]" < .RB "[\|" \-S\fR\ |\ \fB\-\-strip\-all\fR "\|]" < .RB "[\|" \-g\fR\ |\ \fB\-\-strip\-debug\fR "\|]" < .RB "[\|" \-\-strip\-unneeded\fR "\|]" < .RB "[\|" \-K\ \fIsymbolname\fR\ |\ \fB\-\-keep\-symbol=\fIsymbolname\fR "\|]" < .RB "[\|" \-N\ \fIsymbolname\fR\ |\ \fB\-\-strip\-symbol=\fIsymbolname\fR "\|]" < .RB "[\|" \-L\ \fIsymbolname\fR\ |\ \fB\-\-localize\-symbol=\fIsymbolname\fR "\|]" < .RB "[\|" \-W\ \fIsymbolname\fR\ |\ \fB\-\-weaken\-symbol=\fIsymbolname\fR "\|]" < .RB "[\|" \-x\fR\ |\ \fB\-\-discard\-all\fR "\|]" < .RB "[\|" \-X\fR\ |\ \fB\-\-discard\-locals\fR "\|]" < .RB "[\|" \-b\ \fIbyte\fR\ |\ \fB\-\-byte=\fIbyte\fR "\|]" < .RB "[\|" \-i\ \fIinterleave\fR\ |\ \fB\-\-interleave=\fIinterleave\fR "\|]" < .RB "[\|" \-p\fR\ |\ \fB\-\-preserve\-dates\fR "\|]" < .RB "[\|" \-\-debugging "\|]" < .RB "[\|" \-\-gap\-fill=\fIval\fR "\|]" < .RB "[\|" \-\-pad\-to=\fIaddress\fR "\|]" < .RB "[\|" \-\-set\-start=\fIval\fR "\|]" < .RB "[\|" \-\-change\-start=\fIincr\fR "\|]" < .RB "[\|" \-\-change\-addresses=\fIincr\fR "\|]" < .RB "[\|" \-\-change\-section\-address\ \fIsection{=,+,-}val\fR "\|]" < .RB "[\|" \-\-change\-section\-lma\ \fIsection{=,+,-}val\fR "\|]" < .RB "[\|" \-\-change\-section\-vma\ \fIsection{=,+,-}val\fR "\|]" < .RB "[\|" \-\-change\-warnings\fR "\|]" < .RB "[\|" \-\-no\-change\-warnings\fR "\|]" < .RB "[\|" \-\-set\-section\-flags\ \fIsection=flags\fR "\|]" < .RB "[\|" \-\-add\-section\ \fIsectionname=filename\fR "\|]" < .RB "[\|" \-\-change\-leading\-char\fR "\|]" < .RB "[\|" \-\-remove\-leading\-char\fR "\|]" < .RB "[\|" \-\-srec\-len=\fIval\fR "\|]" < .RB "[\|" \-\-srec\-forceS3\fR "\|]" < .RB "[\|" \-\-redefine\-sym\ \fIold=new\fR "\|]" < .RB "[\|" \-\-weaken\fR "\|]" < .RB "[\|" \-v\ |\ \-\-verbose\fR "\|]" < .RB "[\|" \-V\ |\ \-\-version\fR "\|]" < .RB "[\|" \-\-help\fR "\|]" < .B infile < .RB "[\|" outfile\fR "\|]" < .SH DESCRIPTION < The GNU < .B objcopy < utility copies the contents of an object file to another. < .B objcopy < uses the GNU BFD Library to read and write the object files. It can < write the destination object file in a format different from that of < the source object file. The exact behavior of < .B objcopy < is controlled by command-line options. --- > .\" > .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). > .\" Fear. Run. Save yourself. No user-serviceable parts. > .bd B 3 > . \" fudge factors for nroff and troff > .if n \{\ > . ds #H 0 > . ds #V .8m > . ds #F .3m > . ds #[ \f1 > . ds #] \fP > .\} > .if t \{\ > . ds #H ((1u-(\\\\n(.fu%2u))*.13m) > . ds #V .6m > . ds #F 0 > . ds #[ \& > . ds #] \& > .\} > . \" simple accents for nroff and troff > .if n \{\ > . ds ' \& > . ds ` \& > . ds ^ \& > . ds , \& > . ds ~ ~ > . ds / > .\} > .if t \{\ > . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" > . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' > . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' > . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' > . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' > . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' > .\} > . \" troff and (daisy-wheel) nroff accents > .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' > .ds 8 \h'\*(#H'\(*b\h'-\*(#H' > .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] > .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' > .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' > .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] > .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] > .ds ae a\h'-(\w'a'u*4/10)'e > .ds Ae A\h'-(\w'A'u*4/10)'E > . \" corrections for vroff > .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' > .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' > . \" for low resolution devices (crt and lpr) > .if \n(.H>23 .if \n(.V>19 \ > \{\ > . ds : e > . ds 8 ss > . ds o a > . ds d- d\h'-1'\(ga > . ds D- D\h'-1'\(hy > . ds th \o'bp' > . ds Th \o'LP' > . ds ae ae > . ds Ae AE > .\} > .rm #[ #] #H #V #F C > .\" ====================================================================== > .\" > .IX Title "OBJCOPY.1 1" > .TH OBJCOPY.1 1 "binutils-2.11.90" "2001-05-30" "GNU" > .UC > .SH "NAME" > objcopy \- copy and translate object files > .SH "SYNOPSIS" > .IX Header "SYNOPSIS" > objcopy [ \-F \fIbfdname\fR | \-\-target=\fIbfdname\fR ] > [ \-I \fIbfdname\fR | \-\-input-target=\fIbfdname\fR ] > [ \-O \fIbfdname\fR | \-\-output-target=\fIbfdname\fR ] > [ \-B \fIbfdarch\fR | \-\-binary-architecture=\fIbfdarch\fR ] > [ \-S | \-\-strip-all ] [ \-g | \-\-strip-debug ] > [ \-K \fIsymbolname\fR | \-\-keep-symbol=\fIsymbolname\fR ] > [ \-N \fIsymbolname\fR | \-\-strip-symbol=\fIsymbolname\fR ] > [ \-G \fIsymbolname\fR | \-\-keep-global-symbol=\fIsymbolname\fR] > [ \-L \fIsymbolname\fR | \-\-localize-symbol=\fIsymbolname\fR ] > [ \-W \fIsymbolname\fR | \-\-weaken-symbol=\fIsymbolname\fR ] > [ \-x | \-\-discard-all ] [ \-X | \-\-discard-locals ] > [ \-b \fIbyte\fR | \-\-byte=\fIbyte\fR ] > [ \-i \fIinterleave\fR | \-\-interleave=\fIinterleave\fR ] > [ \-j \fIsectionname\fR | \-\-only-section=\fIsectionname\fR ] > [ \-R \fIsectionname\fR | \-\-remove-section=\fIsectionname\fR ] > [ \-p | \-\-preserve-dates ] [ \-\-debugging ] > [ \-\-gap-fill=\fIval\fR ] [ \-\-pad-to=\fIaddress\fR ] > [ \-\-set-start=\fIval\fR ] [ \-\-adjust-start=\fIincr\fR ] > [ \-\-change-addresses=\fIincr\fR ] > [ \-\-change-section-address \fIsection\fR{=,+,\-}\fIval\fR ] > [ \-\-change-section-lma \fIsection\fR{=,+,\-}\fIval\fR ] > [ \-\-change-section-vma \fIsection\fR{=,+,\-}\fIval\fR ] > [ \-\-change-warnings ] [ \-\-no-change-warnings ] > [ \-\-set-section-flags \fIsection\fR=\fIflags\fR ] > [ \-\-add-section \fIsectionname\fR=\fIfilename\fR ] > [ \-\-change-leading-char ] [ \-\-remove-leading-char ] > [ \-\-srec-len=\fIival\fR ] [ \-\-srec-forceS3 ] > [ \-\-redefine-sym \fIold\fR=\fInew\fR ] [ \-\-weaken ] > [ \-\-keep-symbols=\fIfilename\fR ] > [ \-\-strip-symbols=\fIfilename\fR ] > [ \-\-keep-global-symbols=\fIfilename\fR ] > [ \-\-localize-symbols=\fIfilename\fR ] > [ \-\-weaken-symbols=\fIfilename\fR ] > [ \-v | \-\-verbose ] [ \-V | \-\-version ] [ \-\-help ] > \fIinfile\fR [\fIoutfile\fR] > .SH "DESCRIPTION" > .IX Header "DESCRIPTION" > The \s-1GNU\s0 \f(CW\*(C`objcopy\*(C'\fR utility copies the contents of an object > file to another. \f(CW\*(C`objcopy\*(C'\fR uses the \s-1GNU\s0 \s-1BFD\s0 Library to > read and write the object files. It can write the destination object > file in a format different from that of the source object file. The > exact behavior of \f(CW\*(C`objcopy\*(C'\fR is controlled by command-line options. > Note that \f(CW\*(C`objcopy\*(C'\fR should be able to copy a fully linked file > between any two formats. However, copying a relocatable object file > between any two formats may not work as expected. 70,76c192,196 < .B objcopy < creates temporary files to do its translations and deletes them < afterward. < .B objcopy < uses BFD to do all its translation work; it knows about all the < formats BFD knows about, and thus is able to recognize most formats < without being told explicitly. --- > \&\f(CW\*(C`objcopy\*(C'\fR creates temporary files to do its translations and > deletes them afterward. \f(CW\*(C`objcopy\*(C'\fR uses \s-1BFD\s0 to do all its > translation work; it has access to all the formats described in \s-1BFD\s0 > and thus is able to recognize most formats without being told > explicitly. 78,82c198,199 < .B objcopy < can be used to generate S-records by using an output target of < .B srec < (e.g., use < .B -O srec). --- > \&\f(CW\*(C`objcopy\*(C'\fR can be used to generate S-records by using an output > target of \fBsrec\fR (e.g., use \fB\-O srec\fR). 84,94c201,206 < .B objcopy < can be used to generate a raw binary file by using an output target of < .B binary < (e.g., use < .B -O binary). < When < .B objcopy < generates a raw binary file, it will essentially produce a memory dump < of the contents of the input object file. All symbols and relocation < information will be discarded. The memory dump will start at the < virtual address of the lowest section copied into the output file. --- > \&\f(CW\*(C`objcopy\*(C'\fR can be used to generate a raw binary file by using an > output target of \fBbinary\fR (e.g., use \fB\-O binary\fR). When > \&\f(CW\*(C`objcopy\*(C'\fR generates a raw binary file, it will essentially produce > a memory dump of the contents of the input object file. All symbols and > relocation information will be discarded. The memory dump will start at > the load address of the lowest section copied into the output file. 97,102c209,211 < use < .B -S < to remove sections containing debugging information. In some cases < .B -R < will be useful to remove sections which contain information which is < not needed by the binary file. --- > use \fB\-S\fR to remove sections containing debugging information. In > some cases \fB\-R\fR will be useful to remove sections which contain > information that is not needed by the binary file. 104,141c213,274 < .I infile < and < .I outfile < are the source and output files respectively. If you do not specify < .IR outfile , < .B objcopy < creates a temporary file and destructively renames the result with the < name of the input file. < < .SH OPTIONS < .TP < .B \-I \fIbfdname\fR, \fB\-\-input\-target=\fIbfdname < Consider the source file's object format to be < .IR bfdname , < rather than attempting to deduce it. < .TP < .B \-O \fIbfdname\fR, \fB\-\-output\-target=\fIbfdname < Write the output file using the object format < .IR bfdname . < .TP < .B \-F \fIbfdname\fR, \fB\-\-target=\fIbfdname < Use < .I bfdname < as the object format for both the input and the output file; i.e. < simply transfer data from source to destination with no translation. < .TP < .B \-j \fIsectionname\fR, \fB\-\-only\-section=\fIsectionname < Copy only the named section from the input file to the output file, < discarding all other sections. This option may be given more than < once. Note that using this option inappropriately may make the output < file unusable. < .TP < .B \-R \fIsectionname\fR, \fB\-\-remove-section=\fIsectionname < Remove the named section from the file. This option may be given more < than once. Note that using this option inappropriately may make the < output file unusable. < .TP < .B \-S\fR, \fB\-\-strip\-all --- > Note \- \f(CW\*(C`objcopy\*(C'\fR is not able to change the endianness of its input > files. If the input format has an endianness, (some formats do not), > \&\f(CW\*(C`objcopy\*(C'\fR can only copy the inputs into file formats that have the > same endianness or which have no endianness (eg \fBsrec\fR). > .SH "OPTIONS" > .IX Header "OPTIONS" > .Ip "\f(CW\*(C`\f(CIinfile\f(CW\*(C'\fR" 4 > .IX Item "infile" > .Ip "\f(CW\*(C`\f(CIoutfile\f(CW\*(C'\fR" 4 > .IX Item "outfile" > The input and output files, respectively. > If you do not specify \fIoutfile\fR, \f(CW\*(C`objcopy\*(C'\fR creates a > temporary file and destructively renames the result with > the name of \fIinfile\fR. > .Ip "\f(CW\*(C`\-I \f(CIbfdname\f(CW \*(C'\fR" 4 > .IX Item "-I bfdname " > .Ip "\f(CW\*(C`\-\-input\-target=\f(CIbfdname\f(CW\*(C'\fR" 4 > .IX Item "--input-target=bfdname" > Consider the source file's object format to be \fIbfdname\fR, rather than > attempting to deduce it. > .Ip "\f(CW\*(C`\-O \f(CIbfdname\f(CW\*(C'\fR" 4 > .IX Item "-O bfdname" > .Ip "\f(CW\*(C`\-\-output\-target=\f(CIbfdname\f(CW\*(C'\fR" 4 > .IX Item "--output-target=bfdname" > Write the output file using the object format \fIbfdname\fR. > .Ip "\f(CW\*(C`\-F \f(CIbfdname\f(CW\*(C'\fR" 4 > .IX Item "-F bfdname" > .Ip "\f(CW\*(C`\-\-target=\f(CIbfdname\f(CW\*(C'\fR" 4 > .IX Item "--target=bfdname" > Use \fIbfdname\fR as the object format for both the input and the output > file; i.e., simply transfer data from source to destination with no > translation. > .Ip "\f(CW\*(C`\-B \f(CIbfdarch\f(CW\*(C'\fR" 4 > .IX Item "-B bfdarch" > .Ip "\f(CW\*(C`\-\-binary\-architecture=\f(CIbfdarch\f(CW\*(C'\fR" 4 > .IX Item "--binary-architecture=bfdarch" > Useful when transforming a raw binary input file into an object file. > In this case the output architecture can be set to \fIbfdarch\fR. This > option will be ignored if the input file has a known \fIbfdarch\fR. You > can access this binary data inside a program by referencing the special > symbols that are created by the conversion process. These symbols are > called _binary_\fIobjfile\fR_start, _binary_\fIobjfile\fR_end and > _binary_\fIobjfile\fR_size. e.g. you can transform a picture file into > an object file and then access it in your code using these symbols. > .Ip "\f(CW\*(C`\-j \f(CIsectionname\f(CW\*(C'\fR" 4 > .IX Item "-j sectionname" > .Ip "\f(CW\*(C`\-\-only\-section=\f(CIsectionname\f(CW\*(C'\fR" 4 > .IX Item "--only-section=sectionname" > Copy only the named section from the input file to the output file. > This option may be given more than once. Note that using this option > inappropriately may make the output file unusable. > .Ip "\f(CW\*(C`\-R \f(CIsectionname\f(CW\*(C'\fR" 4 > .IX Item "-R sectionname" > .Ip "\f(CW\*(C`\-\-remove\-section=\f(CIsectionname\f(CW\*(C'\fR" 4 > .IX Item "--remove-section=sectionname" > Remove any section named \fIsectionname\fR from the output file. This > option may be given more than once. Note that using this option > inappropriately may make the output file unusable. > .Ip "\f(CW\*(C`\-S\*(C'\fR" 4 > .IX Item "-S" > .Ip "\f(CW\*(C`\-\-strip\-all\*(C'\fR" 4 > .IX Item "--strip-all" 143,144c276,279 < .TP < .B \-g\fR, \fB\-\-strip\-debug --- > .Ip "\f(CW\*(C`\-g\*(C'\fR" 4 > .IX Item "-g" > .Ip "\f(CW\*(C`\-\-strip\-debug\*(C'\fR" 4 > .IX Item "--strip-debug" 146,147c281,282 < .TP < .B \-\-strip\-unneeded --- > .Ip "\f(CW\*(C`\-\-strip\-unneeded\*(C'\fR" 4 > .IX Item "--strip-unneeded" 149,155c284,294 < .TP < .B \-K \fIsymbolname\fR, \fB\-\-keep\-symbol=\fIsymbolname < Copy only symbol \fIsymbolname\fP from the source file. This option < may be given more than once. < .TP < .B \-N \fIsymbolname\fR, \fB\-\-strip\-symbol=\fIsymbolname < Do not copy symbol \fIsymbolname\fP from the source file. This option --- > .Ip "\f(CW\*(C`\-K \f(CIsymbolname\f(CW\*(C'\fR" 4 > .IX Item "-K symbolname" > .Ip "\f(CW\*(C`\-\-keep\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4 > .IX Item "--keep-symbol=symbolname" > Copy only symbol \fIsymbolname\fR from the source file. This option may > be given more than once. > .Ip "\f(CW\*(C`\-N \f(CIsymbolname\f(CW\*(C'\fR" 4 > .IX Item "-N symbolname" > .Ip "\f(CW\*(C`\-\-strip\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4 > .IX Item "--strip-symbol=symbolname" > Do not copy symbol \fIsymbolname\fR from the source file. This option 157,159c296,307 < .TP < .B \-L \fIsymbolname\fR, \fB\-\-localize\-symbol=\fIsymbolname < Make symbol \fIsymbolname\fP local to the file, so that it is not --- > .Ip "\f(CW\*(C`\-G \f(CIsymbolname\f(CW\*(C'\fR" 4 > .IX Item "-G symbolname" > .Ip "\f(CW\*(C`\-\-keep\-global\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4 > .IX Item "--keep-global-symbol=symbolname" > Keep only symbol \fIsymbolname\fR global. Make all other symbols local > to the file, so that they are not visible externally. This option may > be given more than once. > .Ip "\f(CW\*(C`\-L \f(CIsymbolname\f(CW\*(C'\fR" 4 > .IX Item "-L symbolname" > .Ip "\f(CW\*(C`\-\-localize\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4 > .IX Item "--localize-symbol=symbolname" > Make symbol \fIsymbolname\fR local to the file, so that it is not 161,165c309,317 < .TP < .B \-W \fIsymbolname\fR, \fB\-\-weaken\-symbol=\fIsymbolname < Make symbol \fIsymbolname\fP weak. This option may be given more than once. < .TP < .B \-x\fR, \fB\-\-discard\-all --- > .Ip "\f(CW\*(C`\-W \f(CIsymbolname\f(CW\*(C'\fR" 4 > .IX Item "-W symbolname" > .Ip "\f(CW\*(C`\-\-weaken\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4 > .IX Item "--weaken-symbol=symbolname" > Make symbol \fIsymbolname\fR weak. This option may be given more than once. > .Ip "\f(CW\*(C`\-x\*(C'\fR" 4 > .IX Item "-x" > .Ip "\f(CW\*(C`\-\-discard\-all\*(C'\fR" 4 > .IX Item "--discard-all" 167,183c319,346 < .TP < .B \-X\fR, \fB\-\-discard\-locals < Do not copy compiler-generated local symbols. (These usually start < with "L" or "."). < .TP < .B \-b \fIbyte\fR, \fB\-\-byte=\fIbyte < Keep only every \fIbyte\fPth byte of the input file (header data is < not affected). \fIbyte\fP can be in the range from 0 to the < interleave-1. This option is useful for creating files to program < ROMs. It is typically used with an srec output target. < .TP < .B \-i \fIinterleave\fR, \fB\-\-interleave=\fIinterleave < Only copy one out of every \fIinterleave\fP bytes. Which one to copy is < selected by the \fB\-b\fP or \fB\-\-byte\fP option. The default is 4. < The interleave is ignored if neither \fB\-b\fP nor \fB\-\-byte\fP is given. < .TP < .B \-p\fR, \fB\-\-preserve\-dates --- > .Ip "\f(CW\*(C`\-X\*(C'\fR" 4 > .IX Item "-X" > .Ip "\f(CW\*(C`\-\-discard\-locals\*(C'\fR" 4 > .IX Item "--discard-locals" > Do not copy compiler-generated local symbols. > (These usually start with \fBL\fR or \fB.\fR.) > .Ip "\f(CW\*(C`\-b \f(CIbyte\f(CW\*(C'\fR" 4 > .IX Item "-b byte" > .Ip "\f(CW\*(C`\-\-byte=\f(CIbyte\f(CW\*(C'\fR" 4 > .IX Item "--byte=byte" > Keep only every \fIbyte\fRth byte of the input file (header data is not > affected). \fIbyte\fR can be in the range from 0 to \fIinterleave\fR\-1, > where \fIinterleave\fR is given by the \fB\-i\fR or \fB\*(--interleave\fR > option, or the default of 4. This option is useful for creating files > to program \s-1ROM\s0. It is typically used with an \f(CW\*(C`srec\*(C'\fR output > target. > .Ip "\f(CW\*(C`\-i \f(CIinterleave\f(CW\*(C'\fR" 4 > .IX Item "-i interleave" > .Ip "\f(CW\*(C`\-\-interleave=\f(CIinterleave\f(CW\*(C'\fR" 4 > .IX Item "--interleave=interleave" > Only copy one out of every \fIinterleave\fR bytes. Select which byte to > copy with the \fI\-b\fR or \fB\*(--byte\fR option. The default is 4. > \&\f(CW\*(C`objcopy\*(C'\fR ignores this option if you do not specify either \fB\-b\fR or > \&\fB\*(--byte\fR. > .Ip "\f(CW\*(C`\-p\*(C'\fR" 4 > .IX Item "-p" > .Ip "\f(CW\*(C`\-\-preserve\-dates\*(C'\fR" 4 > .IX Item "--preserve-dates" 186,187c349,350 < .TP < .B \-\-debugging --- > .Ip "\f(CW\*(C`\-\-debugging\*(C'\fR" 4 > .IX Item "--debugging" 191,194c354,357 < .TP < .B \-\-gap\-fill=\fIval < Fill gaps between sections with \fIval\fP. This operation applies to < the \fIload address\fP (LMA) of the sections. It is done by increasing --- > .Ip "\f(CW\*(C`\-\-gap\-fill \f(CIval\f(CW\*(C'\fR" 4 > .IX Item "--gap-fill val" > Fill gaps between sections with \fIval\fR. This operation applies to > the \fIload address\fR (\s-1LMA\s0) of the sections. It is done by increasing 196,199c359,362 < space created with \fIval\fP. < .TP < .B \-\-pad\-to=\fIaddress < Pad the output file up to the load address \fIaddress\fP. This is --- > space created with \fIval\fR. > .Ip "\f(CW\*(C`\-\-pad\-to \f(CIaddress\f(CW\*(C'\fR" 4 > .IX Item "--pad-to address" > Pad the output file up to the load address \fIaddress\fR. This is 201,209c364,367 < filled in with the value specified by \fB\-\-gap\-fill\fP (default < zero). < .TP < .B \fB\-\-set\-start=\fIval < Set the start address of the new file to \fIval\fP. Not all object < file formats support setting the start address. < .TP < .B \fB\-\-change\-start=\fIincr\fR, \fB\-\-adjust\-start=\fIincr < Changes the start address by adding \fIincr\fP. Not all object file --- > filled in with the value specified by \fB\*(--gap-fill\fR (default zero). > .Ip "\f(CW\*(C`\-\-set\-start \f(CIval\f(CW\*(C'\fR" 4 > .IX Item "--set-start val" > Set the start address of the new file to \fIval\fR. Not all object file 211,216c369,382 < .TP < .B \fB\-\-change\-addresses=\fIincr\fR, \fB\-\-adjust\-vma=\fIincr < Changes the address of all sections, as well as the start address, by < adding \fIincr\fP. Some object file formats do not permit section < addresses to be changed arbitrarily. Note that this does not relocate < the sections; if the program expects sections to be loaded at a --- > .Ip "\f(CW\*(C`\-\-change\-start \f(CIincr\f(CW\*(C'\fR" 4 > .IX Item "--change-start incr" > .Ip "\f(CW\*(C`\-\-adjust\-start \f(CIincr\f(CW\*(C'\fR" 4 > .IX Item "--adjust-start incr" > Change the start address by adding \fIincr\fR. Not all object file > formats support setting the start address. > .Ip "\f(CW\*(C`\-\-change\-addresses \f(CIincr\f(CW\*(C'\fR" 4 > .IX Item "--change-addresses incr" > .Ip "\f(CW\*(C`\-\-adjust\-vma \f(CIincr\f(CW\*(C'\fR" 4 > .IX Item "--adjust-vma incr" > Change the \s-1VMA\s0 and \s-1LMA\s0 addresses of all sections, as well as the start > address, by adding \fIincr\fR. Some object file formats do not permit > section addresses to be changed arbitrarily. Note that this does not > relocate the sections; if the program expects sections to be loaded at a 218,253c384,436 < that they are loaded at a different address, the program may fail. < .TP < .B \fB\-\-change\-section\-address\ \fIsection{=,+,-}val\fR, \fB\-\-adjust\-section\-vma\ \fIsection{=,+,-}val < Set or changes the VMA and LMA addresses of the named \fIsection\fP. < If \fI=\fP is used, the section address is set to \fIval\fP. < Otherwise, \fIval\fP is added to or subtracted from the section < address. See the comments under \fB\-\-change\-addresses\fP, above. If < \fIsection\fP does not exist in the input file, a warning will be < issued, unless \fB\-\-no\-change\-warnings\fP is used. < .TP < .B \fB\-\-change\-section\-lma\ \fIsection{=,+,-}val < Set or change the LMA address of the named \fIsection\fP. If \fI=\fP is < used, the section address is set to \fIval\fP. Otherwise, \fIval\fP < is added to or subtracted from the section address. See the comments < under \fB\-\-change\-addresses\fP, above. If \fIsection\fP does not exist < in the input file, a warning will be issued, unless < \fB\-\-no\-change\-warnings\fP is used. < .TP < .B \fB\-\-change\-section\-vma\ \fIsection{=,+,-}val < Set or change the VMA address of the named \fIsection\fP. If \fI=\fP is < used, the section address is set to \fIval\fP. Otherwise, \fIval\fP < is added to or subtracted from the section address. See the comments < under \fB\-\-change\-addresses\fP, above. If \fIsection\fP does not exist < in the input file, a warning will be issued, unless < \fB\-\-no\-change\-warnings\fP is used. < .TP < .B \fB\-\-change\-warnings\fR, \fB\-\-adjust\-warnings < If \fB\-\-change\-section\-XXX\fP is used, and the named section does < not exist, issue a warning. This is the default. < .TP < .B \fB\-\-no\-change\-warnings\fR, \fB\-\-no\-adjust\-warnings < Do not issue a warning if \fB\-\-change\-section\-XXX\fP is used, even < if the named section does not exist. < .TP < .B \fB\-\-set\-section\-flags\ \fIsection=flags < Set the flags for the named section. The \fIflags\fP argument is a --- > that they are loaded at a different address, the program may fail. > .Ip "\f(CW\*(C`\-\-change\-section\-address \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4 > .IX Item "--change-section-address section{=,+,-}val" > .Ip "\f(CW\*(C`\-\-adjust\-section\-vma \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4 > .IX Item "--adjust-section-vma section{=,+,-}val" > Set or change both the \s-1VMA\s0 address and the \s-1LMA\s0 address of the named > \&\fIsection\fR. If \fB=\fR is used, the section address is set to > \&\fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the > section address. See the comments under \fB\*(--change-addresses\fR, > above. If \fIsection\fR does not exist in the input file, a warning will > be issued, unless \fB\*(--no-change-warnings\fR is used. > .Ip "\f(CW\*(C`\-\-change\-section\-lma \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4 > .IX Item "--change-section-lma section{=,+,-}val" > Set or change the \s-1LMA\s0 address of the named \fIsection\fR. The \s-1LMA\s0 > address is the address where the section will be loaded into memory at > program load time. Normally this is the same as the \s-1VMA\s0 address, which > is the address of the section at program run time, but on some systems, > especially those where a program is held in \s-1ROM\s0, the two can be > different. If \fB=\fR is used, the section address is set to > \&\fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the > section address. See the comments under \fB\*(--change-addresses\fR, > above. If \fIsection\fR does not exist in the input file, a warning > will be issued, unless \fB\*(--no-change-warnings\fR is used. > .Ip "\f(CW\*(C`\-\-change\-section\-vma \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4 > .IX Item "--change-section-vma section{=,+,-}val" > Set or change the \s-1VMA\s0 address of the named \fIsection\fR. The \s-1VMA\s0 > address is the address where the section will be located once the > program has started executing. Normally this is the same as the \s-1LMA\s0 > address, which is the address where the section will be loaded into > memory, but on some systems, especially those where a program is held in > \&\s-1ROM\s0, the two can be different. If \fB=\fR is used, the section address > is set to \fIval\fR. Otherwise, \fIval\fR is added to or subtracted > from the section address. See the comments under > \&\fB\*(--change-addresses\fR, above. If \fIsection\fR does not exist in > the input file, a warning will be issued, unless > \&\fB\*(--no-change-warnings\fR is used. > .Ip "\f(CW\*(C`\-\-change\-warnings\*(C'\fR" 4 > .IX Item "--change-warnings" > .Ip "\f(CW\*(C`\-\-adjust\-warnings\*(C'\fR" 4 > .IX Item "--adjust-warnings" > If \fB\*(--change-section-address\fR or \fB\*(--change-section-lma\fR or > \&\fB\*(--change-section-vma\fR is used, and the named section does not > exist, issue a warning. This is the default. > .Ip "\f(CW\*(C`\-\-no\-change\-warnings\*(C'\fR" 4 > .IX Item "--no-change-warnings" > .Ip "\f(CW\*(C`\-\-no\-adjust\-warnings\*(C'\fR" 4 > .IX Item "--no-adjust-warnings" > Do not issue a warning if \fB\*(--change-section-address\fR or > \&\fB\*(--adjust-section-lma\fR or \fB\*(--adjust-section-vma\fR is used, even > if the named section does not exist. > .Ip "\f(CW\*(C`\-\-set\-section\-flags \f(CIsection\f(CW=\f(CIflags\f(CW\*(C'\fR" 4 > .IX Item "--set-section-flags section=flags" > Set the flags for the named section. The \fIflags\fR argument is a 255,259c438,446 < \fIalloc\fP, \fIcontents\fP, \fIload\fP, \fInoload\fP, \fIreadonly\fP, < \fIcode\fP, \fIdata\fP, \fIrom\fP, \fIshare\fP, and \fIdebug\fP. Not < all flags are meaningful for all object file formats. < .TP < .B \fB\-\-add\-section\ \fIsectionname=filename --- > \&\fBalloc\fR, \fBcontents\fR, \fBload\fR, \fBnoload\fR, > \&\fBreadonly\fR, \fBcode\fR, \fBdata\fR, \fBrom\fR, \fBshare\fR, and > \&\fBdebug\fR. You can set the \fBcontents\fR flag for a section which > does not have contents, but it is not meaningful to clear the > \&\fBcontents\fR flag of a section which does have contents\*(--just remove > the section instead. Not all flags are meaningful for all object file > formats. > .Ip "\f(CW\*(C`\-\-add\-section \f(CIsectionname\f(CW=\f(CIfilename\f(CW\*(C'\fR" 4 > .IX Item "--add-section sectionname=filename" 261,266c448,452 < contents of the new section are taken from the file \fIfilename\fR. < The size of the section will be the size of the file. This option < only works on file formats which can support sections with arbitrary < names. < .TP < .B \-\-change\-leading\-char --- > contents of the new section are taken from the file \fIfilename\fR. The > size of the section will be the size of the file. This option only > works on file formats which can support sections with arbitrary names. > .Ip "\f(CW\*(C`\-\-change\-leading\-char\*(C'\fR" 4 > .IX Item "--change-leading-char" 269,274c455,459 < often add before every symbol. This option tells < .B objcopy < to change the leading character of every symbol when it converts < between object file formats. If the object file formats use the same < leading character, this option has no effect. Otherwise, it will add < a character, or remove a character, or change a character, as --- > often add before every symbol. This option tells \f(CW\*(C`objcopy\*(C'\fR to > change the leading character of every symbol when it converts between > object file formats. If the object file formats use the same leading > character, this option has no effect. Otherwise, it will add a > character, or remove a character, or change a character, as 276,277c461,462 < .TP < .B \-\-remove\-leading\-char --- > .Ip "\f(CW\*(C`\-\-remove\-leading\-char\*(C'\fR" 4 > .IX Item "--remove-leading-char" 281,284c466,469 < remove a leading underscore from all global symbols. This can be < useful if you want to link together objects of different file formats < with different conventions for symbol names. This is different from < \fB\-\-change\-leading\-char\fP because it always changes the symbol name --- > remove a leading underscore from all global symbols. This can be useful > if you want to link together objects of different file formats with > different conventions for symbol names. This is different from > \&\f(CW\*(C`\-\-change\-leading\-char\*(C'\fR because it always changes the symbol name 286,296c471,483 < .TP < .B \fB\-\-srec\-len=\fIval < Meaningful only for srec output. Set the length of the Srecords to \fIval\fP. < This length covers both the address, data and crc fields. < .TP < .B \fB\-\-srec\-forceS3 < Meaningful only for srec output. Avoid generation of S1/S2 records, creating < S3-only record format. < .TP < .B \-\-redefine\-sym\ \fIold=new < Change the name of symbol \fIold\fR to \fInew\fR. This can be useful --- > file. > .Ip "\f(CW\*(C`\-\-srec\-len=\f(CIival\f(CW\*(C'\fR" 4 > .IX Item "--srec-len=ival" > Meaningful only for srec output. Set the maximum length of the Srecords > being produced to \fIival\fR. This length covers both address, data and > crc fields. > .Ip "\f(CW\*(C`\-\-srec\-forceS3\*(C'\fR" 4 > .IX Item "--srec-forceS3" > Meaningful only for srec output. Avoid generation of S1/S2 records, > creating S3\-only record format. > .Ip "\f(CW\*(C`\-\-redefine\-sym \f(CIold\f(CW=\f(CInew\f(CW\*(C'\fR" 4 > .IX Item "--redefine-sym old=new" > Change the name of a symbol \fIold\fR, to \fInew\fR. This can be useful 299,303c486,530 < .TP < .B \-\-weaken < Change all global symbols in the file to be weak. < .TP < .B \-v\fR, \fB\-\-verbose --- > .Ip "\f(CW\*(C`\-\-weaken\*(C'\fR" 4 > .IX Item "--weaken" > Change all global symbols in the file to be weak. This can be useful > when building an object which will be linked against other objects using > the \f(CW\*(C`\-R\*(C'\fR option to the linker. This option is only effective when > using an object file format which supports weak symbols. > .Ip "\f(CW\*(C`\-\-keep\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4 > .IX Item "--keep-symbols=filename" > Apply \fB\*(--keep-symbol\fR option to each symbol listed in the file > \&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol > name per line. Line comments may be introduced by the hash character. > This option may be given more than once. > .Ip "\f(CW\*(C`\-\-strip\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4 > .IX Item "--strip-symbols=filename" > Apply \fB\*(--strip-symbol\fR option to each symbol listed in the file > \&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol > name per line. Line comments may be introduced by the hash character. > This option may be given more than once. > .Ip "\f(CW\*(C`\-\-keep\-global\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4 > .IX Item "--keep-global-symbols=filename" > Apply \fB\*(--keep-global-symbol\fR option to each symbol listed in the > file \fIfilename\fR. \fIfilename\fR is simply a flat file, with one > symbol name per line. Line comments may be introduced by the hash > character. This option may be given more than once. > .Ip "\f(CW\*(C`\-\-localize\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4 > .IX Item "--localize-symbols=filename" > Apply \fB\*(--localize-symbol\fR option to each symbol listed in the file > \&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol > name per line. Line comments may be introduced by the hash character. > This option may be given more than once. > .Ip "\f(CW\*(C`\-\-weaken\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4 > .IX Item "--weaken-symbols=filename" > Apply \fB\*(--weaken-symbol\fR option to each symbol listed in the file > \&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol > name per line. Line comments may be introduced by the hash character. > This option may be given more than once. > .Ip "\f(CW\*(C`\-V\*(C'\fR" 4 > .IX Item "-V" > .Ip "\f(CW\*(C`\-\-version\*(C'\fR" 4 > .IX Item "--version" > Show the version number of \f(CW\*(C`objcopy\*(C'\fR. > .Ip "\f(CW\*(C`\-v\*(C'\fR" 4 > .IX Item "-v" > .Ip "\f(CW\*(C`\-\-verbose\*(C'\fR" 4 > .IX Item "--verbose" 305,315c532,535 < archives, "\fBobjcopy \-V\fR" lists all members of the archive. < .TP < .B \-V\fR, \fB\-\-version < Show the version number of < .B objcopy < and exit. < .TP < .B \-\-help < Show a summary of the options to < .B objcopy < and exit. --- > archives, \fBobjcopy \-V\fR lists all members of the archive. > .Ip "\f(CW\*(C`\-\-help\*(C'\fR" 4 > .IX Item "--help" > Show a summary of the options to \f(CW\*(C`objcopy\*(C'\fR. 317,327c537,541 < .RB "`\|" binutils "\|'" < entry in < .B < info\c < \&; < .I < The GNU Binary Utilities\c < \&, Roland H. Pesch (June 1993). < < .SH COPYING < Copyright (c) 1993, 94, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc. --- > .IX Header "SEE ALSO" > \&\fIld\fR\|(1), \fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR. > .SH "COPYRIGHT" > .IX Header "COPYRIGHT" > Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. 329,700c543,548 < This document is distributed under the terms of the GNU Free < Documentation License, version 1.1. That license is described in the < sources for this manual page, but it is not displayed here in order to < make this manual more consise. Copies of this license can also be < obtained from: http://www.gnu.org/copyleft/. < < \" .SH GNU Free Documentation License < \" Version 1.1, March 2000 < < \" Copyright (C) 2000 Free Software Foundation, Inc. < \" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA < < \" Everyone is permitted to copy and distribute verbatim < \" copies of this license document, but changing it is < \" not allowed. < \" .PP < \" 0. PREAMBLE < \" .PP < \" The purpose of this License is to make a manual, textbook, or other < \" written document "free" in the sense of freedom: to assure everyone < \" the effective freedom to copy and redistribute it, with or without < \" modifying it, either commercially or noncommercially. Secondarily, < \" this License preserves for the author and publisher a way to get < \" credit for their work, while not being considered responsible for < \" modifications made by others. < \" .PP < \" This License is a kind of "copyleft", which means that derivative < \" works of the document must themselves be free in the same sense. It < \" complements the GNU General Public License, which is a copyleft < \" license designed for free software. < \" .PP < \" We have designed this License in order to use it for manuals for free < \" software, because free software needs free documentation: a free < \" program should come with manuals providing the same freedoms that the < \" software does. But this License is not limited to software manuals; < \" it can be used for any textual work, regardless of subject matter or < \" whether it is published as a printed book. We recommend this License < \" principally for works whose purpose is instruction or reference. < \" .PP < \" 1. APPLICABILITY AND DEFINITIONS < \" .PP < \" This License applies to any manual or other work that contains a < \" notice placed by the copyright holder saying it can be distributed < \" under the terms of this License. The "Document", below, refers to any < \" such manual or work. Any member of the public is a licensee, and is < \" addressed as "you". < \" .PP < \" A "Modified Version" of the Document means any work containing the < \" Document or a portion of it, either copied verbatim, or with < \" modifications and/or translated into another language. < \" .PP < \" A "Secondary Section" is a named appendix or a front-matter section of < \" the Document that deals exclusively with the relationship of the < \" publishers or authors of the Document to the Document's overall subject < \" (or to related matters) and contains nothing that could fall directly < \" within that overall subject. (For example, if the Document is in part a < \" textbook of mathematics, a Secondary Section may not explain any < \" mathematics.) The relationship could be a matter of historical < \" connection with the subject or with related matters, or of legal, < \" commercial, philosophical, ethical or political position regarding < \" them. < \" .PP < \" The "Invariant Sections" are certain Secondary Sections whose titles < \" are designated, as being those of Invariant Sections, in the notice < \" that says that the Document is released under this License. < \" .PP < \" The "Cover Texts" are certain short passages of text that are listed, < \" as Front-Cover Texts or Back-Cover Texts, in the notice that says that < \" the Document is released under this License. < \" .PP < \" A "Transparent" copy of the Document means a machine-readable copy, < \" represented in a format whose specification is available to the < \" general public, whose contents can be viewed and edited directly and < \" straightforwardly with generic text editors or (for images composed of < \" pixels) generic paint programs or (for drawings) some widely available < \" drawing editor, and that is suitable for input to text formatters or < \" for automatic translation to a variety of formats suitable for input < \" to text formatters. A copy made in an otherwise Transparent file < \" format whose markup has been designed to thwart or discourage < \" subsequent modification by readers is not Transparent. A copy that is < \" not "Transparent" is called "Opaque". < \" .PP < \" Examples of suitable formats for Transparent copies include plain < \" ASCII without markup, Texinfo input format, LaTeX input format, SGML < \" or XML using a publicly available DTD, and standard-conforming simple < \" HTML designed for human modification. Opaque formats include < \" PostScript, PDF, proprietary formats that can be read and edited only < \" by proprietary word processors, SGML or XML for which the DTD and/or < \" processing tools are not generally available, and the < \" machine-generated HTML produced by some word processors for output < \" purposes only. < \" .PP < \" The "Title Page" means, for a printed book, the title page itself, < \" plus such following pages as are needed to hold, legibly, the material < \" this License requires to appear in the title page. For works in < \" formats which do not have any title page as such, "Title Page" means < \" the text near the most prominent appearance of the work's title, < \" preceding the beginning of the body of the text. < \" .PP < \" 2. VERBATIM COPYING < \" .PP < \" You may copy and distribute the Document in any medium, either < \" commercially or noncommercially, provided that this License, the < \" copyright notices, and the license notice saying this License applies < \" to the Document are reproduced in all copies, and that you add no other < \" conditions whatsoever to those of this License. You may not use < \" technical measures to obstruct or control the reading or further < \" copying of the copies you make or distribute. However, you may accept < \" compensation in exchange for copies. If you distribute a large enough < \" number of copies you must also follow the conditions in section 3. < \" .PP < \" You may also lend copies, under the same conditions stated above, and < \" you may publicly display copies. < \" .PP < \" 3. COPYING IN QUANTITY < \" .PP < \" If you publish printed copies of the Document numbering more than 100, < \" and the Document's license notice requires Cover Texts, you must enclose < \" the copies in covers that carry, clearly and legibly, all these Cover < \" Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on < \" the back cover. Both covers must also clearly and legibly identify < \" you as the publisher of these copies. The front cover must present < \" the full title with all words of the title equally prominent and < \" visible. You may add other material on the covers in addition. < \" Copying with changes limited to the covers, as long as they preserve < \" the title of the Document and satisfy these conditions, can be treated < \" as verbatim copying in other respects. < \" .PP < \" If the required texts for either cover are too voluminous to fit < \" legibly, you should put the first ones listed (as many as fit < \" reasonably) on the actual cover, and continue the rest onto adjacent < \" pages. < \" .PP < \" If you publish or distribute Opaque copies of the Document numbering < \" more than 100, you must either include a machine-readable Transparent < \" copy along with each Opaque copy, or state in or with each Opaque copy < \" a publicly-accessible computer-network location containing a complete < \" Transparent copy of the Document, free of added material, which the < \" general network-using public has access to download anonymously at no < \" charge using public-standard network protocols. If you use the latter < \" option, you must take reasonably prudent steps, when you begin < \" distribution of Opaque copies in quantity, to ensure that this < \" Transparent copy will remain thus accessible at the stated location < \" until at least one year after the last time you distribute an Opaque < \" copy (directly or through your agents or retailers) of that edition to < \" the public. < \" .PP < \" It is requested, but not required, that you contact the authors of the < \" Document well before redistributing any large number of copies, to give < \" them a chance to provide you with an updated version of the Document. < \" .PP < \" 4. MODIFICATIONS < \" .PP < \" You may copy and distribute a Modified Version of the Document under < \" the conditions of sections 2 and 3 above, provided that you release < \" the Modified Version under precisely this License, with the Modified < \" Version filling the role of the Document, thus licensing distribution < \" and modification of the Modified Version to whoever possesses a copy < \" of it. In addition, you must do these things in the Modified Version: < \" .PP < \" A. Use in the Title Page (and on the covers, if any) a title distinct < \" from that of the Document, and from those of previous versions < \" (which should, if there were any, be listed in the History section < \" of the Document). You may use the same title as a previous version < \" if the original publisher of that version gives permission. < \" .PP < \" B. List on the Title Page, as authors, one or more persons or entities < \" responsible for authorship of the modifications in the Modified < \" Version, together with at least five of the principal authors of the < \" Document (all of its principal authors, if it has less than five). < \" .PP < \" C. State on the Title page the name of the publisher of the < \" Modified Version, as the publisher. < \" .PP < \" D. Preserve all the copyright notices of the Document. < \" .PP < \" E. Add an appropriate copyright notice for your modifications < \" adjacent to the other copyright notices. < \" .PP < \" F. Include, immediately after the copyright notices, a license notice < \" giving the public permission to use the Modified Version under the < \" terms of this License, in the form shown in the Addendum below. < \" Preserve in that license notice the full lists of Invariant Sections < \" and required Cover Texts given in the Document's license notice. < \" .PP < \" H. Include an unaltered copy of this License. < \" .PP < \" I. Preserve the section entitled "History", and its title, and add to < \" it an item stating at least the title, year, new authors, and < \" publisher of the Modified Version as given on the Title Page. If < \" there is no section entitled "History" in the Document, create one < \" stating the title, year, authors, and publisher of the Document as < \" given on its Title Page, then add an item describing the Modified < \" Version as stated in the previous sentence. < \" .PP < \" J. Preserve the network location, if any, given in the Document for < \" public access to a Transparent copy of the Document, and likewise < \" the network locations given in the Document for previous versions < \" it was based on. These may be placed in the "History" section. < \" You may omit a network location for a work that was published at < \" least four years before the Document itself, or if the original < \" publisher of the version it refers to gives permission. < \" .PP < \" K. In any section entitled "Acknowledgements" or "Dedications", < \" preserve the section's title, and preserve in the section all the < \" substance and tone of each of the contributor acknowledgements < \" and/or dedications given therein. < \" .PP < \" L. Preserve all the Invariant Sections of the Document, < \" unaltered in their text and in their titles. Section numbers < \" or the equivalent are not considered part of the section titles. < \" .PP < \" M. Delete any section entitled "Endorsements". Such a section < \" may not be included in the Modified Version. < \" .PP < \" N. Do not retitle any existing section as "Endorsements" < \" or to conflict in title with any Invariant Section. < \" .PP < \" If the Modified Version includes new front-matter sections or < \" appendices that qualify as Secondary Sections and contain no material < \" copied from the Document, you may at your option designate some or all < \" of these sections as invariant. To do this, add their titles to the < \" list of Invariant Sections in the Modified Version's license notice. < \" These titles must be distinct from any other section titles. < \" .PP < \" You may add a section entitled "Endorsements", provided it contains < \" nothing but endorsements of your Modified Version by various < \" parties--for example, statements of peer review or that the text has < \" been approved by an organization as the authoritative definition of a < \" standard. < \" .PP < \" You may add a passage of up to five words as a Front-Cover Text, and a < \" passage of up to 25 words as a Back-Cover Text, to the end of the list < \" of Cover Texts in the Modified Version. Only one passage of < \" Front-Cover Text and one of Back-Cover Text may be added by (or < \" through arrangements made by) any one entity. If the Document already < \" includes a cover text for the same cover, previously added by you or < \" by arrangement made by the same entity you are acting on behalf of, < \" you may not add another; but you may replace the old one, on explicit < \" permission from the previous publisher that added the old one. < \" .PP < \" The author(s) and publisher(s) of the Document do not by this License < \" give permission to use their names for publicity for or to assert or < \" imply endorsement of any Modified Version. < \" .PP < < \" 5. COMBINING DOCUMENTS < \" .PP < \" You may combine the Document with other documents released under this < \" License, under the terms defined in section 4 above for modified < \" versions, provided that you include in the combination all of the < \" Invariant Sections of all of the original documents, unmodified, and < \" list them all as Invariant Sections of your combined work in its < \" license notice. < \" .PP < \" The combined work need only contain one copy of this License, and < \" multiple identical Invariant Sections may be replaced with a single < \" copy. If there are multiple Invariant Sections with the same name but < \" different contents, make the title of each such section unique by < \" adding at the end of it, in parentheses, the name of the original < \" author or publisher of that section if known, or else a unique number. < \" Make the same adjustment to the section titles in the list of < \" Invariant Sections in the license notice of the combined work. < \" .PP < \" In the combination, you must combine any sections entitled "History" < \" in the various original documents, forming one section entitled < \" "History"; likewise combine any sections entitled "Acknowledgements", < \" and any sections entitled "Dedications". You must delete all sections < \" entitled "Endorsements." < \" .PP < < \" 6. COLLECTIONS OF DOCUMENTS < \" .PP < \" You may make a collection consisting of the Document and other documents < \" released under this License, and replace the individual copies of this < \" License in the various documents with a single copy that is included in < \" the collection, provided that you follow the rules of this License for < \" verbatim copying of each of the documents in all other respects. < \" .PP < \" You may extract a single document from such a collection, and distribute < \" it individually under this License, provided you insert a copy of this < \" License into the extracted document, and follow this License in all < \" other respects regarding verbatim copying of that document. < \" .PP < < \" 7. AGGREGATION WITH INDEPENDENT WORKS < \" .PP < \" A compilation of the Document or its derivatives with other separate < \" and independent documents or works, in or on a volume of a storage or < \" distribution medium, does not as a whole count as a Modified Version < \" of the Document, provided no compilation copyright is claimed for the < \" compilation. Such a compilation is called an "aggregate", and this < \" License does not apply to the other self-contained works thus compiled < \" with the Document, on account of their being thus compiled, if they < \" are not themselves derivative works of the Document. < \" .PP < \" If the Cover Text requirement of section 3 is applicable to these < \" copies of the Document, then if the Document is less than one quarter < \" of the entire aggregate, the Document's Cover Texts may be placed on < \" covers that surround only the Document within the aggregate. < \" Otherwise they must appear on covers around the whole aggregate. < \" .PP < < \" 8. TRANSLATION < \" .PP < \" Translation is considered a kind of modification, so you may < \" distribute translations of the Document under the terms of section 4. < \" Replacing Invariant Sections with translations requires special < \" permission from their copyright holders, but you may include < \" translations of some or all Invariant Sections in addition to the < \" original versions of these Invariant Sections. You may include a < \" translation of this License provided that you also include the < \" original English version of this License. In case of a disagreement < \" between the translation and the original English version of this < \" License, the original English version will prevail. < \" .PP < < \" 9. TERMINATION < \" .PP < \" You may not copy, modify, sublicense, or distribute the Document except < \" as expressly provided for under this License. Any other attempt to < \" copy, modify, sublicense or distribute the Document is void, and will < \" automatically terminate your rights under this License. However, < \" parties who have received copies, or rights, from you under this < \" License will not have their licenses terminated so long as such < \" parties remain in full compliance. < \" .PP < < \" 10. FUTURE REVISIONS OF THIS LICENSE < \" .PP < \" The Free Software Foundation may publish new, revised versions < \" of the GNU Free Documentation License from time to time. Such new < \" versions will be similar in spirit to the present version, but may < \" differ in detail to address new problems or concerns. See < \" http://www.gnu.org/copyleft/. < \" .PP < \" Each version of the License is given a distinguishing version number. < \" If the Document specifies that a particular numbered version of this < \" License "or any later version" applies to it, you have the option of < \" following the terms and conditions either of that specified version or < \" of any later version that has been published (not as a draft) by the < \" Free Software Foundation. If the Document does not specify a version < \" number of this License, you may choose any version ever published (not < \" as a draft) by the Free Software Foundation. < \" .PP < < \" ADDENDUM: How to use this License for your documents < \" .PP < \" To use this License in a document you have written, include a copy of < \" the License in the document and put the following copyright and < \" license notices just after the title page: < \" .PP < \" Copyright (c) YEAR YOUR NAME. < \" Permission is granted to copy, distribute and/or < \" modify this document under the terms of the GNU < \" Free Documentation License, Version 1.1 or any later < \" version published by the Free Software Foundation; < \" with the Invariant Sections being LIST THEIR TITLES, < \" with the Front-Cover Texts being LIST, and with the < \" Back-Cover Texts being LIST. A copy of the license < \" is included in the section entitled "GNU Free < \" Documentation License". < \" .PP < \" If you have no Invariant Sections, write "with no Invariant Sections" < \" instead of saying which ones are invariant. If you have no < \" Front-Cover Texts, write "no Front-Cover Texts" instead of < \" "Front-Cover Texts being LIST"; likewise for Back-Cover Texts. < \" .PP < \" If your document contains nontrivial examples of program code, we < \" recommend releasing these examples in parallel under your choice of < \" free software license, such as the GNU General Public License, < \" to permit their use in free software. --- > Permission is granted to copy, distribute and/or modify this document > under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 > or any later version published by the Free Software Foundation; > with no Invariant Sections, with no Front-Cover Texts, and with no > Back-Cover Texts. A copy of the license is included in the > section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". diff -rN binutils-2.11/binutils/objcopy.c binutils-2.11.2/binutils/objcopy.c 2c2,3 < Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 --- > Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, > 2001 58a60 > static void add_specific_symbols PARAMS ((const char *, struct symlist **)); 186c188,189 < /* List of symbols to strip, keep, localize, weaken, or redefine. */ --- > /* List of symbols to strip, keep, localize, keep-global, weaken, > or redefine. */ 190a194 > static struct symlist *keepglobal_specific_list = NULL; 219a224,228 > #define OPTION_STRIP_SYMBOLS (OPTION_SREC_FORCES3 + 1) > #define OPTION_KEEP_SYMBOLS (OPTION_STRIP_SYMBOLS + 1) > #define OPTION_LOCALIZE_SYMBOLS (OPTION_KEEP_SYMBOLS + 1) > #define OPTION_KEEPGLOBAL_SYMBOLS (OPTION_LOCALIZE_SYMBOLS + 1) > #define OPTION_WEAKEN_SYMBOLS (OPTION_KEEPGLOBAL_SYMBOLS + 1) 280a290 > {"keep-global-symbol", required_argument, 0, 'G'}, 296a307,311 > {"keep-symbols", required_argument, 0, OPTION_KEEP_SYMBOLS}, > {"strip-symbols", required_argument, 0, OPTION_STRIP_SYMBOLS}, > {"keep-global-symbols", required_argument, 0, OPTION_KEEPGLOBAL_SYMBOLS}, > {"localize-symbols", required_argument, 0, OPTION_LOCALIZE_SYMBOLS}, > {"weaken-symbols", required_argument, 0, OPTION_WEAKEN_SYMBOLS}, 337a353 > -G --keep-global-symbol Localize all symbols except \n\ 366a383,387 > --strip-symbols -N for all symbols listed in \n\ > --keep-symbols -K for all symbols listed in \n\ > --localize-symbols -L for all symbols listed in \n\ > --keep-global-symbols -G for all symbols listed in \n\ > --weaken-symbols -W for all symbols listed in \n\ 514a536,651 > /* Add symbols listed in `filename' to strip_specific_list. */ > > #define IS_WHITESPACE(c) ((c) == ' ' || (c) == '\t') > #define IS_LINE_TERMINATOR(c) ((c) == '\n' || (c) == '\r' || (c) == '\0') > > static void > add_specific_symbols (filename, list) > const char *filename; > struct symlist **list; > { > struct stat st; > FILE * f; > char * line; > char * buffer; > unsigned int line_count; > > if (stat (filename, & st) < 0) > fatal (_("cannot stat: %s: %s"), filename, strerror (errno)); > if (st.st_size == 0) > return; > > buffer = (char *) xmalloc (st.st_size + 2); > f = fopen (filename, FOPEN_RT); > if (f == NULL) > fatal (_("cannot open: %s: %s"), filename, strerror (errno)); > > if (fread (buffer, 1, st.st_size, f) == 0 || ferror (f)) > fatal (_("%s: fread failed"), filename); > > fclose (f); > buffer [st.st_size] = '\n'; > buffer [st.st_size + 1] = '\0'; > > line_count = 1; > > for (line = buffer; * line != '\0'; line ++) > { > char * eol; > char * name; > char * name_end; > int finished = false; > > for (eol = line;; eol ++) > { > switch (* eol) > { > case '\n': > * eol = '\0'; > /* Cope with \n\r. */ > if (eol[1] == '\r') > ++ eol; > finished = true; > break; > > case '\r': > * eol = '\0'; > /* Cope with \r\n. */ > if (eol[1] == '\n') > ++ eol; > finished = true; > break; > > case 0: > finished = true; > break; > > case '#': > /* Line comment, Terminate the line here, in case a > name is present and then allow the rest of the > loop to find the real end of the line. */ > * eol = '\0'; > break; > > default: > break; > } > > if (finished) > break; > } > > /* A name may now exist somewhere between 'line' and 'eol'. > Strip off leading whitespace and trailing whitespace, > then add it to the list. */ > for (name = line; IS_WHITESPACE (* name); name ++) > ; > for (name_end = name; > (! IS_WHITESPACE (* name_end)) > && (! IS_LINE_TERMINATOR (* name_end)); > name_end ++) > ; > > if (! IS_LINE_TERMINATOR (* name_end)) > { > char * extra; > > for (extra = name_end + 1; IS_WHITESPACE (* extra); extra ++) > ; > > if (! IS_LINE_TERMINATOR (* extra)) > non_fatal (_("Ignoring rubbish found on line %d of %s"), > line_count, filename); > } > > * name_end = '\0'; > > if (name_end > name) > add_specific_symbol (name, list); > > /* Advance line pointer to end of line. The 'eol ++' in the for > loop above will then advance us to the start of the next line. */ > line = eol; > line_count ++; > } > } > 632a770,775 > else if (bfd_decode_symclass (sym) == 'I') > /* Global symbols in $idata sections need to be retained > even if relocatable is false. External users of the > library containing the $idata section may reference these > symbols. */ > keep = 1; 662c805,807 < && is_specified_symbol (name, localize_specific_list)) --- > && (is_specified_symbol (name, localize_specific_list) > || (keepglobal_specific_list != NULL > && ! is_specified_symbol (name, keepglobal_specific_list)))) 973a1119 > || keepglobal_specific_list != NULL 1692c1838 < while ((c = getopt_long (argc, argv, "I:O:F:K:N:R:o:sSpdgxXVv", --- > while ((c = getopt_long (argc, argv, "b:i:I:j:K:N:s:O:d:F:L:G:R:SpgxXVvW:", 1894a2041,2044 > case 'G': > add_specific_symbol (optarg, &keepglobal_specific_list); > break; > 2159a2310,2329 > > case OPTION_STRIP_SYMBOLS: > add_specific_symbols (optarg, &strip_specific_list); > break; > > case OPTION_KEEP_SYMBOLS: > add_specific_symbols (optarg, &keep_specific_list); > break; > > case OPTION_LOCALIZE_SYMBOLS: > add_specific_symbols (optarg, &localize_specific_list); > break; > > case OPTION_KEEPGLOBAL_SYMBOLS: > add_specific_symbols (optarg, &keepglobal_specific_list); > break; > > case OPTION_WEAKEN_SYMBOLS: > add_specific_symbols (optarg, &weaken_specific_list); > break; diff -rN binutils-2.11/binutils/objdump.c binutils-2.11.2/binutils/objdump.c 2c2,3 < Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 2647c2648 < extern bfd_target *bfd_target_vector[]; --- > extern const bfd_target *const *bfd_target_vector; 2654c2655 < bfd_target *p = bfd_target_vector[t]; --- > const bfd_target *p = bfd_target_vector[t]; 2695c2696 < extern bfd_target *bfd_target_vector[]; --- > extern const bfd_target *const *bfd_target_vector; 2713c2714 < bfd_target *p = bfd_target_vector[t]; --- > const bfd_target *p = bfd_target_vector[t]; 2764c2765 < extern bfd_target *bfd_target_vector[]; --- > extern const bfd_target *const *bfd_target_vector; diff -rN binutils-2.11/binutils/po/binutils.pot binutils-2.11.2/binutils/po/binutils.pot 9c9 < "POT-Creation-Date: 2001-01-11 12:02-0800\n" --- > "POT-Creation-Date: 2001-05-28 19:38+0100\n" 15c15 < "Content-Transfer-Encoding: ENCODING\n" --- > "Content-Transfer-Encoding: 8-bit\n" 26c26 < #: readelf.c:1876 size.c:91 strings.c:530 windres.c:737 --- > #: readelf.c:1974 size.c:91 strings.c:530 windres.c:737 188c188 < #: ar.c:824 ar.c:876 ar.c:1322 objcopy.c:1124 --- > #: ar.c:824 ar.c:876 ar.c:1322 objcopy.c:1131 1177c1177 < #: ieee.c:5324 --- > #: ieee.c:5333 1182c1182 < #: ieee.c:5360 --- > #: ieee.c:5369 1187c1187 < #: ieee.c:5396 --- > #: ieee.c:5405 1390,1391c1390,1391 < " `gnu', 'lucid', 'arm', 'hp', 'edg' or " < "'gnu-new-abi'\n" --- > " `gnu', 'lucid', 'arm', 'hp', 'edg' or 'gnu-new-" > "abi'\n" 1485c1485 < #: nm.c:1552 --- > #: nm.c:1550 1621c1621,1625 < #: objcopy.c:773 --- > #: objcopy.c:772 > msgid "Unable to change endianness of input file(s)" > msgstr "" > > #: objcopy.c:780 1626c1630 < #: objcopy.c:792 --- > #: objcopy.c:799 1631c1635 < #: objcopy.c:819 --- > #: objcopy.c:826 1636c1640 < #: objcopy.c:905 --- > #: objcopy.c:912 1641c1645 < #: objcopy.c:930 --- > #: objcopy.c:937 1646c1650 < #: objcopy.c:1068 --- > #: objcopy.c:1075 1651c1655 < #: objcopy.c:1102 --- > #: objcopy.c:1109 1656c1660 < #: objcopy.c:1291 --- > #: objcopy.c:1298 1660c1664 < #: objcopy.c:1300 --- > #: objcopy.c:1307 1664c1668 < #: objcopy.c:1314 --- > #: objcopy.c:1321 1668c1672 < #: objcopy.c:1340 --- > #: objcopy.c:1347 1672c1676 < #: objcopy.c:1349 --- > #: objcopy.c:1356 1676c1680 < #: objcopy.c:1363 --- > #: objcopy.c:1370 1680c1684 < #: objcopy.c:1371 --- > #: objcopy.c:1378 1685c1689 < #: objcopy.c:1645 --- > #: objcopy.c:1652 1690c1694 < #: objcopy.c:1660 --- > #: objcopy.c:1667 1695c1699 < #: objcopy.c:1669 --- > #: objcopy.c:1676 1700c1704 < #: objcopy.c:1775 --- > #: objcopy.c:1782 1705c1709 < #: objcopy.c:1825 --- > #: objcopy.c:1832 1709c1713 < #: objcopy.c:1831 --- > #: objcopy.c:1838 1713c1717 < #: objcopy.c:1851 objcopy.c:1859 --- > #: objcopy.c:1858 objcopy.c:1866 1718c1722 < #: objcopy.c:1928 objcopy.c:1998 objcopy.c:2099 objcopy.c:2127 --- > #: objcopy.c:1935 objcopy.c:2005 objcopy.c:2106 objcopy.c:2134 1723c1727 < #: objcopy.c:1931 --- > #: objcopy.c:1938 1728c1732 < #: objcopy.c:1949 --- > #: objcopy.c:1956 1733c1737 < #: objcopy.c:1953 --- > #: objcopy.c:1960 1738c1742 < #: objcopy.c:2067 --- > #: objcopy.c:2074 1743c1747 < #: objcopy.c:2169 --- > #: objcopy.c:2176 1747c1751 < #: objcopy.c:2188 --- > #: objcopy.c:2195 1752c1756 < #: objcopy.c:2228 objcopy.c:2242 --- > #: objcopy.c:2235 objcopy.c:2249 1815,1816c1819,1820 < " --file-start-context Include context from start of file (with " < "-S)\n" --- > " --file-start-context Include context from start of file (with -" > "S)\n" 1822,1823c1826,1827 < " 'lucid', 'arm', 'hp', 'edg', or " < "'gnu-new-abi'\n" --- > " 'lucid', 'arm', 'hp', 'edg', or 'gnu-new-" > "abi'\n" 1999c2003 < #: readelf.c:260 --- > #: readelf.c:271 2004c2008 < #: readelf.c:268 --- > #: readelf.c:279 2009c2013 < #: readelf.c:274 --- > #: readelf.c:285 2014c2018 < #: readelf.c:284 --- > #: readelf.c:295 2019c2023 < #: readelf.c:289 --- > #: readelf.c:300 2024c2028 < #: readelf.c:304 readelf.c:330 --- > #: readelf.c:315 readelf.c:341 2029c2033 < #: readelf.c:316 readelf.c:345 --- > #: readelf.c:327 readelf.c:356 2034c2038 < #: readelf.c:395 readelf.c:533 --- > #: readelf.c:409 readelf.c:548 2039c2043 < #: readelf.c:597 --- > #: readelf.c:612 2043c2047 < #: readelf.c:637 readelf.c:666 readelf.c:698 readelf.c:726 --- > #: readelf.c:643 readelf.c:670 readelf.c:713 readelf.c:738 2047c2051 < #: readelf.c:744 --- > #: readelf.c:787 2053c2057 < #: readelf.c:747 --- > #: readelf.c:790 2057c2061 < #: readelf.c:907 readelf.c:909 --- > #: readelf.c:950 readelf.c:952 2062c2066 < #: readelf.c:934 --- > #: readelf.c:977 2067c2071 < #: readelf.c:1147 --- > #: readelf.c:1193 2072c2076 < #: readelf.c:1166 --- > #: readelf.c:1212 2077c2081 < #: readelf.c:1169 readelf.c:1677 --- > #: readelf.c:1215 readelf.c:1756 2082c2086 < #: readelf.c:1183 --- > #: readelf.c:1229 2086c2090 < #: readelf.c:1184 --- > #: readelf.c:1230 2090c2094 < #: readelf.c:1185 --- > #: readelf.c:1231 2094c2098 < #: readelf.c:1186 --- > #: readelf.c:1232 2098c2102 < #: readelf.c:1187 --- > #: readelf.c:1233 2102c2106 < #: readelf.c:1191 --- > #: readelf.c:1237 2107c2111 < #: readelf.c:1193 --- > #: readelf.c:1239 2112c2116 < #: readelf.c:1195 readelf.c:1281 readelf.c:1811 --- > #: readelf.c:1241 readelf.c:1327 readelf.c:1907 2117c2121 < #: readelf.c:1208 --- > #: readelf.c:1254 2121c2125 < #: readelf.c:1849 --- > #: readelf.c:1946 2125c2129 < #: readelf.c:1850 --- > #: readelf.c:1947 2129c2133 < #: readelf.c:1851 --- > #: readelf.c:1948 2133c2137 < #: readelf.c:1852 --- > #: readelf.c:1949 2137c2141 < #: readelf.c:1853 --- > #: readelf.c:1950 2141c2145 < #: readelf.c:1854 --- > #: readelf.c:1951 2145c2149 < #: readelf.c:1855 --- > #: readelf.c:1952 2149c2153 < #: readelf.c:1856 --- > #: readelf.c:1953 2153c2157 < #: readelf.c:1857 --- > #: readelf.c:1954 2157c2161 < #: readelf.c:1858 --- > #: readelf.c:1955 2161c2165 < #: readelf.c:1859 --- > #: readelf.c:1956 2165c2169 < #: readelf.c:1860 --- > #: readelf.c:1957 2169c2173,2177 < #: readelf.c:1861 --- > #: readelf.c:1958 > msgid " -u or --unwind Display the unwind info (if present)\n" > msgstr "" > > #: readelf.c:1959 2173c2181 < #: readelf.c:1862 --- > #: readelf.c:1960 2177c2185 < #: readelf.c:1863 --- > #: readelf.c:1961 2183c2191 < #: readelf.c:1864 --- > #: readelf.c:1962 2189c2197 < #: readelf.c:1865 --- > #: readelf.c:1963 2193c2201 < #: readelf.c:1866 --- > #: readelf.c:1964 2197c2205 < #: readelf.c:1867 --- > #: readelf.c:1965 2202c2210 < #: readelf.c:1868 --- > #: readelf.c:1966 2207c2215 < #: readelf.c:1870 --- > #: readelf.c:1968 2211c2219 < #: readelf.c:1871 --- > #: readelf.c:1969 2216c2224 < #: readelf.c:1873 --- > #: readelf.c:1971 2220c2228 < #: readelf.c:1874 --- > #: readelf.c:1972 2224c2232 < #: readelf.c:1875 --- > #: readelf.c:1973 2228c2236 < #: readelf.c:1893 --- > #: readelf.c:1991 2232c2240 < #: readelf.c:2033 --- > #: readelf.c:2136 2237c2245 < #: readelf.c:2058 --- > #: readelf.c:2161 2242c2250 < #: readelf.c:2071 --- > #: readelf.c:2174 2246c2254 < #: readelf.c:2084 readelf.c:2101 readelf.c:3740 --- > #: readelf.c:2187 readelf.c:2204 readelf.c:4267 2250c2258 < #: readelf.c:2085 --- > #: readelf.c:2188 2254c2262 < #: readelf.c:2086 --- > #: readelf.c:2189 2258c2266 < #: readelf.c:2088 readelf.c:2105 readelf.c:2133 --- > #: readelf.c:2191 readelf.c:2208 readelf.c:2236 2263c2271 < #: readelf.c:2102 --- > #: readelf.c:2205 2267c2275 < #: readelf.c:2103 --- > #: readelf.c:2206 2271c2279 < #: readelf.c:2118 --- > #: readelf.c:2221 2275c2283 < #: readelf.c:2119 --- > #: readelf.c:2222 2279c2287 < #: readelf.c:2120 --- > #: readelf.c:2223 2283c2291 < #: readelf.c:2121 --- > #: readelf.c:2224 2287c2295 < #: readelf.c:2122 --- > #: readelf.c:2225 2291c2299 < #: readelf.c:2123 --- > #: readelf.c:2226 2295c2303 < #: readelf.c:2124 --- > #: readelf.c:2227 2299c2307 < #: readelf.c:2125 --- > #: readelf.c:2228 2303c2311 < #: readelf.c:2126 --- > #: readelf.c:2229 2307c2315 < #: readelf.c:2127 --- > #: readelf.c:2230 2311c2319 < #: readelf.c:2128 --- > #: readelf.c:2231 2315c2323 < #: readelf.c:2129 --- > #: readelf.c:2232 2319c2327 < #: readelf.c:2130 --- > #: readelf.c:2233 2323c2331 < #: readelf.c:2131 --- > #: readelf.c:2234 2327c2335 < #: readelf.c:2148 --- > #: readelf.c:2251 2331c2339 < #: readelf.c:2156 --- > #: readelf.c:2259 2335c2343 < #: readelf.c:2157 --- > #: readelf.c:2260 2339c2347 < #: readelf.c:2161 --- > #: readelf.c:2264 2344c2352 < #: readelf.c:2163 --- > #: readelf.c:2266 2349c2357 < #: readelf.c:2165 --- > #: readelf.c:2268 2354c2362 < #: readelf.c:2172 --- > #: readelf.c:2275 2359c2367 < #: readelf.c:2174 --- > #: readelf.c:2277 2364c2372 < #: readelf.c:2176 --- > #: readelf.c:2279 2369c2377 < #: readelf.c:2178 --- > #: readelf.c:2281 2374c2382 < #: readelf.c:2180 --- > #: readelf.c:2283 2379c2387 < #: readelf.c:2183 --- > #: readelf.c:2286 2383c2391 < #: readelf.c:2185 --- > #: readelf.c:2288 2389c2397 < #: readelf.c:2187 --- > #: readelf.c:2290 2395c2403 < #: readelf.c:2189 --- > #: readelf.c:2292 2399c2407 < #: readelf.c:2191 --- > #: readelf.c:2294 2404c2412 < #: readelf.c:2194 --- > #: readelf.c:2297 2409c2417 < #: readelf.c:2196 --- > #: readelf.c:2299 2414c2422 < #: readelf.c:2198 --- > #: readelf.c:2301 2419c2427 < #: readelf.c:2200 --- > #: readelf.c:2303 2424c2432 < #: readelf.c:2202 --- > #: readelf.c:2305 2429c2437 < #: readelf.c:2204 --- > #: readelf.c:2307 2434c2442 < #: readelf.c:2289 --- > #: readelf.c:2392 2440c2448 < #: readelf.c:2295 --- > #: readelf.c:2398 2447c2455 < #: readelf.c:2296 --- > #: readelf.c:2399 2451c2459 < #: readelf.c:2298 --- > #: readelf.c:2401 2458,2460c2466,2468 < #: readelf.c:2309 readelf.c:2485 readelf.c:2527 readelf.c:2570 readelf.c:2611 < #: readelf.c:3133 readelf.c:3174 readelf.c:3350 readelf.c:4358 readelf.c:4372 < #: readelf.c:7741 readelf.c:7781 --- > #: readelf.c:2412 readelf.c:2588 readelf.c:2630 readelf.c:2673 readelf.c:2714 > #: readelf.c:3660 readelf.c:3701 readelf.c:3877 readelf.c:4798 readelf.c:4812 > #: readelf.c:8251 readelf.c:8291 2464c2472 < #: readelf.c:2327 --- > #: readelf.c:2430 2471c2479 < #: readelf.c:2331 --- > #: readelf.c:2434 2476c2484 < #: readelf.c:2335 --- > #: readelf.c:2438 2480c2488 < #: readelf.c:2337 --- > #: readelf.c:2440 2484c2492 < #: readelf.c:2395 --- > #: readelf.c:2498 2488c2496 < #: readelf.c:2403 --- > #: readelf.c:2506 2492c2500 < #: readelf.c:2410 --- > #: readelf.c:2513 2499c2507 < #: readelf.c:2428 --- > #: readelf.c:2531 2505c2513 < #: readelf.c:2429 --- > #: readelf.c:2532 2509c2517 < #: readelf.c:2693 --- > #: readelf.c:2796 2515c2523 < #: readelf.c:2699 --- > #: readelf.c:2802 2520c2528 < #: readelf.c:2739 --- > #: readelf.c:2840 2524c2532 < #: readelf.c:2752 --- > #: readelf.c:2853 2528c2536 < #: readelf.c:2786 --- > #: readelf.c:2888 2535c2543 < #: readelf.c:2790 --- > #: readelf.c:2892 2541c2549 < #: readelf.c:2793 --- > #: readelf.c:2895 2545c2553 < #: readelf.c:2794 --- > #: readelf.c:2896 2549c2557 < #: readelf.c:2841 --- > #: readelf.c:2943 2553c2561 < #: readelf.c:2842 --- > #: readelf.c:2944 2557c2565 < #: readelf.c:2843 --- > #: readelf.c:2945 2561c2569 < #: readelf.c:2844 --- > #: readelf.c:2946 2566c2574 < #: readelf.c:2902 --- > #: readelf.c:3004 2573c2581 < #: readelf.c:2909 --- > #: readelf.c:3011 2579c2587 < #: readelf.c:2937 --- > #: readelf.c:3039 2585c2593 < #: readelf.c:2944 --- > #: readelf.c:3046 readelf.c:3480 2590c2598 < #: readelf.c:2972 --- > #: readelf.c:3074 2596c2604,2632 < #: readelf.c:3227 --- > #: readelf.c:3318 readelf.c:3330 > #, c-format > msgid "Skipping unexpected symbol type %u" > msgstr "" > > #: readelf.c:3338 > #, c-format > msgid "Skipping unexpected relocation type %s" > msgstr "" > > #: readelf.c:3383 readelf.c:3408 > msgid "" > "\n" > "There are no unwind sections in this file.\n" > msgstr "" > > #: readelf.c:3459 > msgid "" > "\n" > "Could not find unwind info section for " > msgstr "" > > #: readelf.c:3473 > msgid "" > "\n" > "Unwind section " > msgstr "" > > #: readelf.c:3754 2602c2638 < #: readelf.c:3261 --- > #: readelf.c:3788 2606c2642 < #: readelf.c:3270 --- > #: readelf.c:3797 2610c2646 < #: readelf.c:3300 --- > #: readelf.c:3827 2614c2650 < #: readelf.c:3306 --- > #: readelf.c:3833 2618c2654 < #: readelf.c:3367 --- > #: readelf.c:3894 2625c2661 < #: readelf.c:3370 --- > #: readelf.c:3897 2629c2665 < #: readelf.c:3406 --- > #: readelf.c:3933 2633c2669 < #: readelf.c:3410 --- > #: readelf.c:3937 2637c2673 < #: readelf.c:3414 --- > #: readelf.c:3941 2641c2677 < #: readelf.c:3418 --- > #: readelf.c:3945 2645c2681 < #: readelf.c:3422 --- > #: readelf.c:3949 2649c2685 < #: readelf.c:3440 readelf.c:3466 readelf.c:3492 --- > #: readelf.c:3967 readelf.c:3993 readelf.c:4019 2653c2689 < #: readelf.c:3442 readelf.c:3468 readelf.c:3494 --- > #: readelf.c:3969 readelf.c:3995 readelf.c:4021 2657c2693 < #: readelf.c:3613 --- > #: readelf.c:4140 2662c2698 < #: readelf.c:3616 --- > #: readelf.c:4143 2666c2702 < #: readelf.c:3620 --- > #: readelf.c:4147 2671c2707 < #: readelf.c:3624 --- > #: readelf.c:4151 2676c2712 < #: readelf.c:3628 --- > #: readelf.c:4155 2681c2717 < #: readelf.c:3689 --- > #: readelf.c:4216 2686c2722 < #: readelf.c:3786 --- > #: readelf.c:4313 2693c2729 < #: readelf.c:3789 --- > #: readelf.c:4316 2697c2733 < #: readelf.c:3791 readelf.c:3979 --- > #: readelf.c:4318 readelf.c:4506 2702c2738 < #: readelf.c:3821 --- > #: readelf.c:4348 2707c2743 < #: readelf.c:3824 --- > #: readelf.c:4351 2712c2748 < #: readelf.c:3835 --- > #: readelf.c:4362 2717c2753 < #: readelf.c:3837 --- > #: readelf.c:4364 2722c2758 < #: readelf.c:3852 --- > #: readelf.c:4379 2727c2763 < #: readelf.c:3855 --- > #: readelf.c:4382 2732c2768 < #: readelf.c:3874 --- > #: readelf.c:4401 2739c2775 < #: readelf.c:3877 --- > #: readelf.c:4404 2743c2779 < #: readelf.c:3879 --- > #: readelf.c:4406 2748c2784 < #: readelf.c:3905 --- > #: readelf.c:4432 2753c2789 < #: readelf.c:3908 --- > #: readelf.c:4435 2758c2794 < #: readelf.c:3910 --- > #: readelf.c:4437 2763c2799 < #: readelf.c:3912 --- > #: readelf.c:4439 2768c2804 < #: readelf.c:3930 --- > #: readelf.c:4457 2773c2809 < #: readelf.c:3933 --- > #: readelf.c:4460 2778c2814 < #: readelf.c:3936 --- > #: readelf.c:4463 2783c2819 < #: readelf.c:3974 --- > #: readelf.c:4501 2790c2826 < #: readelf.c:3977 --- > #: readelf.c:4504 2794c2830 < #: readelf.c:4007 --- > #: readelf.c:4535 2798c2834 < #: readelf.c:4011 --- > #: readelf.c:4539 2802c2838 < #: readelf.c:4233 --- > #: readelf.c:4673 2808c2844 < #: readelf.c:4251 readelf.c:4286 --- > #: readelf.c:4691 readelf.c:4726 2813c2849 < #: readelf.c:4253 readelf.c:4298 --- > #: readelf.c:4693 readelf.c:4738 2818c2854 < #: readelf.c:4255 readelf.c:4301 --- > #: readelf.c:4695 readelf.c:4741 2823c2859 < #: readelf.c:4364 --- > #: readelf.c:4804 2827c2863 < #: readelf.c:4406 --- > #: readelf.c:4846 2831c2867 < #: readelf.c:4412 --- > #: readelf.c:4852 2835c2871 < #: readelf.c:4418 --- > #: readelf.c:4858 2839c2875 < #: readelf.c:4438 --- > #: readelf.c:4878 2845c2881 < #: readelf.c:4440 --- > #: readelf.c:4880 2849c2885 < #: readelf.c:4442 --- > #: readelf.c:4882 2853c2889 < #: readelf.c:4486 --- > #: readelf.c:4926 2860c2896 < #: readelf.c:4490 --- > #: readelf.c:4930 2864c2900 < #: readelf.c:4492 --- > #: readelf.c:4932 2868c2904 < #: readelf.c:4601 --- > #: readelf.c:5042 2872c2908 < #: readelf.c:4660 --- > #: readelf.c:5102 2878c2914 < #: readelf.c:4672 --- > #: readelf.c:5114 2885c2921,2922 < #: readelf.c:4674 --- > #: readelf.c:5116 > #, c-format 2889c2926 < #: readelf.c:4679 readelf.c:4698 readelf.c:7423 readelf.c:7616 --- > #: readelf.c:5121 readelf.c:5140 readelf.c:7933 readelf.c:8126 2893c2930 < #: readelf.c:4747 --- > #: readelf.c:5189 2900c2937 < #: readelf.c:4750 --- > #: readelf.c:5192 2904c2941 < #: readelf.c:4798 --- > #: readelf.c:5240 2911c2948 < #: readelf.c:4821 --- > #: readelf.c:5263 2918c2955 < #: readelf.c:4826 --- > #: readelf.c:5268 2925c2962 < #: readelf.c:4978 --- > #: readelf.c:5420 2929c2966 < #: readelf.c:4985 --- > #: readelf.c:5427 2934c2971 < #: readelf.c:4990 --- > #: readelf.c:5432 2940c2977 < #: readelf.c:4996 --- > #: readelf.c:5438 2945c2982 < #: readelf.c:5001 --- > #: readelf.c:5443 2949c2986 < #: readelf.c:5002 readelf.c:5124 --- > #: readelf.c:5444 readelf.c:5566 2953c2990 < #: readelf.c:5004 --- > #: readelf.c:5446 2958,2959c2995,2996 < #: readelf.c:5007 readelf.c:5009 readelf.c:5011 readelf.c:5136 readelf.c:5138 < #: readelf.c:5140 --- > #: readelf.c:5449 readelf.c:5451 readelf.c:5453 readelf.c:5578 readelf.c:5580 > #: readelf.c:5582 2964c3001 < #: readelf.c:5012 --- > #: readelf.c:5454 2971c3008 < #: readelf.c:5016 --- > #: readelf.c:5458 2976c3013 < #: readelf.c:5042 --- > #: readelf.c:5484 2984c3021 < #: readelf.c:5054 --- > #: readelf.c:5496 2988c3025 < #: readelf.c:5062 --- > #: readelf.c:5504 2992c3029 < #: readelf.c:5077 --- > #: readelf.c:5519 2997c3034 < #: readelf.c:5078 --- > #: readelf.c:5520 3002c3039 < #: readelf.c:5079 --- > #: readelf.c:5521 3004c3041 < msgid " Prolgue Length: %d\n" --- > msgid " Prologue Length: %d\n" 3007c3044 < #: readelf.c:5080 --- > #: readelf.c:5522 3012c3049 < #: readelf.c:5081 --- > #: readelf.c:5523 3017c3054 < #: readelf.c:5082 --- > #: readelf.c:5524 3022c3059 < #: readelf.c:5083 --- > #: readelf.c:5525 3027c3064 < #: readelf.c:5084 --- > #: readelf.c:5526 3032c3069 < #: readelf.c:5093 --- > #: readelf.c:5535 3038c3075 < #: readelf.c:5096 --- > #: readelf.c:5538 3043c3080 < #: readelf.c:5102 --- > #: readelf.c:5544 3049c3086 < #: readelf.c:5105 --- > #: readelf.c:5547 3055c3092 < #: readelf.c:5109 --- > #: readelf.c:5551 3060c3097 < #: readelf.c:5120 --- > #: readelf.c:5562 3066c3103 < #: readelf.c:5123 --- > #: readelf.c:5565 3072c3109 < #: readelf.c:5131 --- > #: readelf.c:5573 3077c3114 < #: readelf.c:5142 --- > #: readelf.c:5584 3083c3120 < #: readelf.c:5150 --- > #: readelf.c:5592 3089c3126 < #: readelf.c:5169 --- > #: readelf.c:5611 3093c3130 < #: readelf.c:5176 --- > #: readelf.c:5618 3098c3135 < #: readelf.c:5184 --- > #: readelf.c:5626 3103c3140 < #: readelf.c:5191 --- > #: readelf.c:5633 3108c3145 < #: readelf.c:5199 --- > #: readelf.c:5641 3113c3150 < #: readelf.c:5206 --- > #: readelf.c:5648 3118c3155 < #: readelf.c:5211 --- > #: readelf.c:5653 3122c3159 < #: readelf.c:5219 --- > #: readelf.c:5661 3127c3164 < #: readelf.c:5227 --- > #: readelf.c:5669 3132c3169 < #: readelf.c:5235 --- > #: readelf.c:5677 3137c3174 < #: readelf.c:5239 --- > #: readelf.c:5681 3142c3179 < #: readelf.c:5262 readelf.c:5691 --- > #: readelf.c:5704 readelf.c:6133 3149c3186 < #: readelf.c:5285 --- > #: readelf.c:5727 3153c3190 < #: readelf.c:5292 --- > #: readelf.c:5734 3158c3195 < #: readelf.c:5294 --- > #: readelf.c:5736 3163c3200 < #: readelf.c:5296 --- > #: readelf.c:5738 3168c3205 < #: readelf.c:5298 --- > #: readelf.c:5740 3173c3210 < #: readelf.c:5301 --- > #: readelf.c:5743 3179c3216 < #: readelf.c:5383 --- > #: readelf.c:5825 3184c3221 < #: readelf.c:5478 --- > #: readelf.c:5920 3189c3226 < #: readelf.c:5515 --- > #: readelf.c:5957 3194c3231 < #: readelf.c:5697 --- > #: readelf.c:6139 3198c3235 < #: readelf.c:5703 --- > #: readelf.c:6145 3203c3240 < #: readelf.c:5706 --- > #: readelf.c:6148 3207c3244 < #: readelf.c:5706 --- > #: readelf.c:6148 3211c3248 < #: readelf.c:5710 --- > #: readelf.c:6152 3216c3253 < #: readelf.c:5729 --- > #: readelf.c:6171 3221c3258 < #: readelf.c:6036 --- > #: readelf.c:6478 3225c3262 < #: readelf.c:6038 --- > #: readelf.c:6480 3229c3266 < #: readelf.c:6165 --- > #: readelf.c:6607 3234c3271 < #: readelf.c:6169 --- > #: readelf.c:6611 3239c3276 < #: readelf.c:6182 --- > #: readelf.c:6624 3243c3280 < #: readelf.c:6183 --- > #: readelf.c:6625 3247c3284 < #: readelf.c:6184 --- > #: readelf.c:6626 3251c3288 < #: readelf.c:6185 --- > #: readelf.c:6627 3255c3292 < #: readelf.c:6186 --- > #: readelf.c:6628 3260c3297 < #: readelf.c:6315 readelf.c:6441 --- > #: readelf.c:6757 readelf.c:6883 3267c3304 < #: readelf.c:6337 --- > #: readelf.c:6779 3272c3309 < #: readelf.c:6338 --- > #: readelf.c:6780 3277c3314 < #: readelf.c:6339 --- > #: readelf.c:6781 3282c3319 < #: readelf.c:6340 --- > #: readelf.c:6782 3287c3324 < #: readelf.c:6341 --- > #: readelf.c:6783 3292c3329 < #: readelf.c:6345 --- > #: readelf.c:6787 3296c3333 < #: readelf.c:6367 --- > #: readelf.c:6809 3300c3337 < #: readelf.c:6407 --- > #: readelf.c:6849 3305c3342 < #: readelf.c:6412 --- > #: readelf.c:6854 3310c3347 < #: readelf.c:6462 --- > #: readelf.c:6904 3314c3351 < #: readelf.c:6466 --- > #: readelf.c:6908 3319c3356 < #: readelf.c:6467 --- > #: readelf.c:6909 3324c3361 < #: readelf.c:6468 --- > #: readelf.c:6910 3329c3366 < #: readelf.c:6469 --- > #: readelf.c:6911 3334c3371 < #: readelf.c:6470 --- > #: readelf.c:6912 3339c3376 < #: readelf.c:6472 --- > #: readelf.c:6914 3345c3382 < #: readelf.c:6634 --- > #: readelf.c:7092 3350c3387 < #: readelf.c:7109 --- > #: readelf.c:7620 3355c3392 < #: readelf.c:7173 --- > #: readelf.c:7683 3362c3399 < #: readelf.c:7192 --- > #: readelf.c:7702 3367c3404 < #: readelf.c:7264 --- > #: readelf.c:7774 3371c3408 < #: readelf.c:7447 --- > #: readelf.c:7957 3378c3415 < #: readelf.c:7609 --- > #: readelf.c:8119 3382c3419 < #: readelf.c:7637 --- > #: readelf.c:8147 3389c3426 < #: readelf.c:7638 --- > #: readelf.c:8148 3393c3430 < #: readelf.c:7663 --- > #: readelf.c:8173 3397c3434 < #: readelf.c:7664 --- > #: readelf.c:8174 3401c3438 < #: readelf.c:7665 --- > #: readelf.c:8175 3405c3442 < #: readelf.c:7666 --- > #: readelf.c:8176 3409c3446 < #: readelf.c:7667 --- > #: readelf.c:8177 3413c3450 < #: readelf.c:7668 --- > #: readelf.c:8178 3417c3454 < #: readelf.c:7669 --- > #: readelf.c:8179 3421c3458 < #: readelf.c:7670 --- > #: readelf.c:8180 3425c3462 < #: readelf.c:7671 --- > #: readelf.c:8181 3429c3466 < #: readelf.c:7672 --- > #: readelf.c:8182 3433c3470 < #: readelf.c:7673 --- > #: readelf.c:8183 3437c3474 < #: readelf.c:7675 --- > #: readelf.c:8185 3442c3479 < #: readelf.c:7713 --- > #: readelf.c:8223 3449c3486 < #: readelf.c:7715 --- > #: readelf.c:8225 3453c3490 < #: readelf.c:7826 --- > #: readelf.c:8336 3457c3494 < #: readelf.c:7904 --- > #: readelf.c:8414 3461c3498 < #: readelf.c:7905 --- > #: readelf.c:8415 3465c3502 < #: readelf.c:7940 --- > #: readelf.c:8450 3470c3507 < #: readelf.c:7947 --- > #: readelf.c:8457 3475c3512 < #: readelf.c:7953 --- > #: readelf.c:8463 3480c3517 < #: readelf.c:7967 --- > #: readelf.c:8477 3910c3947 < #: stabs.c:349 stabs.c:1770 --- > #: stabs.c:343 stabs.c:1760 3914c3951 < #: stabs.c:360 --- > #: stabs.c:354 3919c3956 < #: stabs.c:370 --- > #: stabs.c:364 3924c3961 < #: stabs.c:492 --- > #: stabs.c:486 3928c3965 < #: stabs.c:531 --- > #: stabs.c:525 3932c3969 < #: stabs.c:780 --- > #: stabs.c:770 3938c3975 < #: stabs.c:1307 --- > #: stabs.c:1297 3944c3981 < #: stabs.c:1862 --- > #: stabs.c:1852 3948c3985 < #: stabs.c:2189 --- > #: stabs.c:2179 3952c3989 < #: stabs.c:2207 --- > #: stabs.c:2197 3956c3993 < #: stabs.c:2399 --- > #: stabs.c:2389 3960c3997 < #: stabs.c:2405 --- > #: stabs.c:2395 3964c4001 < #: stabs.c:2485 --- > #: stabs.c:2475 3968c4005 < #: stabs.c:2741 --- > #: stabs.c:2731 3972c4009 < #: stabs.c:2981 --- > #: stabs.c:2971 3977c4014 < #: stabs.c:3294 --- > #: stabs.c:3284 3981c4018 < #: stabs.c:3382 --- > #: stabs.c:3372 3986c4023 < #: stabs.c:3387 --- > #: stabs.c:3377 3991c4028 < #: stabs.c:3474 --- > #: stabs.c:3464 3996c4033 < #: stabs.c:3773 --- > #: stabs.c:3763 4001c4038 < #: stabs.c:3869 --- > #: stabs.c:3859 4034c4071 < msgid "Copyright 1997, 98, 99, 2000 Free Software Foundation, Inc.\n" --- > msgid "Copyright 1997, 98, 99, 2000, 2001 Free Software Foundation, Inc.\n" diff -rN binutils-2.11/binutils/prdbg.c binutils-2.11.2/binutils/prdbg.c 2c2 < Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc. --- > Copyright 1995, 1996 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/rclex.c binutils-2.11.2/binutils/rclex.c 4c4 < * $Header: /cvs/src/src/binutils/Attic/rclex.c,v 1.1.4.1 2001/03/12 15:40:35 pb Exp $ --- > * $Header: /cvs/src/src/binutils/Attic/rclex.c,v 1.1.4.2 2001/06/10 15:37:28 pb Exp $ 638c638 < /* Copyright 1997, 1998 Free Software Foundation, Inc. --- > /* Copyright 1997, 1998, 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/rclex.l binutils-2.11.2/binutils/rclex.l 2c2 < /* Copyright 1997, 1998 Free Software Foundation, Inc. --- > /* Copyright 1997, 1998, 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/rcparse.c binutils-2.11.2/binutils/rcparse.c 93c93 < Copyright 1997, 1998 Free Software Foundation, Inc. --- > Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. 767c767 < #line 3 "/usr/share/misc/bison.simple" --- > #line 3 "/usr/share/bison/bison.simple" 981c981 < #line 217 "/usr/share/misc/bison.simple" --- > #line 217 "/usr/share/bison/bison.simple" 2922c2922 < #line 543 "/usr/share/misc/bison.simple" --- > #line 543 "/usr/share/bison/bison.simple" diff -rN binutils-2.11/binutils/rcparse.y binutils-2.11.2/binutils/rcparse.y 2c2 < Copyright 1997, 1998 Free Software Foundation, Inc. --- > Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/rdcoff.c binutils-2.11.2/binutils/rdcoff.c 2c2 < Copyright (C) 1996, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/rddbg.c binutils-2.11.2/binutils/rddbg.c 2c2 < Copyright (C) 1995, 96, 97, 98, 2000 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1997, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/readelf.c binutils-2.11.2/binutils/readelf.c 2c2 < Copyright (C) 1998, 99, 2000, 2001 Free Software Foundation, Inc. --- > Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc. 81,86c81,86 < char * program_name = "readelf"; < unsigned int dynamic_addr; < bfd_size_type dynamic_size; < unsigned int rela_addr; < unsigned int rela_size; < char * dynamic_strings; --- > char * program_name = "readelf"; > unsigned int dynamic_addr; > bfd_size_type dynamic_size; > unsigned int rela_addr; > unsigned int rela_size; > char * dynamic_strings; 90c90 < Elf_Internal_Sym * dynamic_symbols; --- > Elf_Internal_Sym * dynamic_symbols; 92c92 < unsigned long dynamic_syminfo_offset; --- > unsigned long dynamic_syminfo_offset; 94,97c94,97 < char program_interpreter [64]; < int dynamic_info[DT_JMPREL + 1]; < int version_info[16]; < int loadaddr = 0; --- > char program_interpreter [64]; > int dynamic_info[DT_JMPREL + 1]; > int version_info[16]; > int loadaddr = 0; 101,110c101,111 < int show_name; < int do_dynamic; < int do_syms; < int do_reloc; < int do_sections; < int do_segments; < int do_using_dynamic; < int do_header; < int do_dump; < int do_version; --- > int show_name; > int do_dynamic; > int do_syms; > int do_reloc; > int do_sections; > int do_segments; > int do_unwind; > int do_using_dynamic; > int do_header; > int do_dump; > int do_version; 118a120 > int do_debug_frames_interp; 152a155,156 > static int slurp_rela_relocs PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Rela **, unsigned long *)); > static int slurp_rel_relocs PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Rel **, unsigned long *)); 159a164 > static const char * get_ia64_segment_type PARAMS ((unsigned long)); 162a168 > static const char * get_ia64_section_type_name PARAMS ((unsigned int)); 168c174 < static const char * get_dynamic_flags PARAMS ((bfd_vma)); --- > static const char * get_dynamic_flags PARAMS ((bfd_vma)); 173a180 > static int process_unwind PARAMS ((FILE *)); 189a197 > static const char * get_elf_section_flags PARAMS ((bfd_vma)); 194c202 < static int disassemble_section PARAMS ((Elf32_Internal_Shdr *, FILE *)); --- > static int disassemble_section PARAMS ((Elf32_Internal_Shdr *, FILE *)); 196,197c204,205 < static int dump_section PARAMS ((Elf32_Internal_Shdr *, FILE *)); < static int display_debug_section PARAMS ((Elf32_Internal_Shdr *, FILE *)); --- > static int dump_section PARAMS ((Elf32_Internal_Shdr *, FILE *)); > static int display_debug_section PARAMS ((Elf32_Internal_Shdr *, FILE *)); 222c230 < static char * get_note_type PARAMS ((unsigned int)); --- > static char * get_note_type PARAMS ((unsigned int)); 226c234 < static int process_corefile_contents PARAMS ((FILE *)); --- > static int process_corefile_contents PARAMS ((FILE *)); 236c244 < #define SECTION_NAME(X) ((X) == NULL ? "" : \ --- > #define SECTION_NAME(X) ((X) == NULL ? "" : \ 242c250 < #define BYTE_GET(field) byte_get (field, sizeof (field)) --- > #define BYTE_GET(field) byte_get (field, sizeof (field)) 247c255 < internal field is also 8 bytes wide and so we can extact all the data. --- > internal field is also 8 bytes wide and so we can extract all the data. 253c261 < #define BYTE_GET8(field) byte_get (field, -8) --- > #define BYTE_GET8(field) byte_get (field, -8) 255c263 < #define BYTE_GET8(field) byte_get (field, 8) --- > #define BYTE_GET8(field) byte_get (field, 8) 258c266 < #define NUM_ELEM(array) (sizeof (array) / sizeof ((array)[0])) --- > #define NUM_ELEM(array) (sizeof (array) / sizeof ((array)[0])) 273,278c281,286 < } \ < \ < if (fread (var, size, 1, file) != 1) \ < { \ < error (_("Unable to read in %d bytes of %s\n"), size, reason); \ < free (var); \ --- > } \ > \ > if (fread (var, size, 1, file) != 1) \ > { \ > error (_("Unable to read in %d bytes of %s\n"), size, reason); \ > free (var); \ 280c288 < return 0; \ --- > return 0; \ 284c292 < #define GET_DATA(offset, var, reason) \ --- > #define GET_DATA(offset, var, reason) \ 286c294 < { \ --- > { \ 370a379 > #ifndef BFD64 375a385 > #endif 382a393 > case 8: 510a522 > #ifndef BFD64 518,519c530,531 < < #ifdef BFD64 --- > #else > case 8: 557c569 < case EM_MIPS_RS4_BE: --- > case EM_MIPS_RS3_LE: 605d616 < /* Display the contents of the relocation data found at the specified offset. */ 607,614c618,623 < dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) < FILE * file; < unsigned long rel_offset; < unsigned long rel_size; < Elf_Internal_Sym * symtab; < unsigned long nsyms; < char * strtab; < int is_rela; --- > slurp_rela_relocs (file, rel_offset, rel_size, relasp, nrelasp) > FILE *file; > unsigned long rel_offset; > unsigned long rel_size; > Elf_Internal_Rela **relasp; > unsigned long *nrelasp; 616,618c625,631 < unsigned int i; < Elf_Internal_Rel * rels; < Elf_Internal_Rela * relas; --- > Elf_Internal_Rela *relas; > unsigned long nrelas; > unsigned int i; > > if (is_32bit_elf) > { > Elf32_External_Rela * erelas; 619a633,634 > GET_DATA_ALLOC (rel_offset, rel_size, erelas, > Elf32_External_Rela *, "relocs"); 621,622c636 < if (is_rela == UNKNOWN) < is_rela = guess_is_rela (elf_header.e_machine); --- > nrelas = rel_size / sizeof (Elf32_External_Rela); 624,628c638,639 < if (is_rela) < { < if (is_32bit_elf) < { < Elf32_External_Rela * erelas; --- > relas = (Elf_Internal_Rela *) > malloc (nrelas * sizeof (Elf_Internal_Rela)); 630,631c641,645 < GET_DATA_ALLOC (rel_offset, rel_size, erelas, < Elf32_External_Rela *, "relocs"); --- > if (relas == NULL) > { > error(_("out of memory parsing relocs")); > return 0; > } 633c647,652 < rel_size = rel_size / sizeof (Elf32_External_Rela); --- > for (i = 0; i < nrelas; i++) > { > relas[i].r_offset = BYTE_GET (erelas[i].r_offset); > relas[i].r_info = BYTE_GET (erelas[i].r_info); > relas[i].r_addend = BYTE_GET (erelas[i].r_addend); > } 635,636c654,658 < relas = (Elf_Internal_Rela *) < malloc (rel_size * sizeof (Elf_Internal_Rela)); --- > free (erelas); > } > else > { > Elf64_External_Rela * erelas; 638,642c660,661 < if (relas == NULL) < { < error(_("out of memory parsing relocs")); < return 0; < } --- > GET_DATA_ALLOC (rel_offset, rel_size, erelas, > Elf64_External_Rela *, "relocs"); 644,649c663 < for (i = 0; i < rel_size; i++) < { < relas[i].r_offset = BYTE_GET (erelas[i].r_offset); < relas[i].r_info = BYTE_GET (erelas[i].r_info); < relas[i].r_addend = BYTE_GET (erelas[i].r_addend); < } --- > nrelas = rel_size / sizeof (Elf64_External_Rela); 651c665,666 < free (erelas); --- > relas = (Elf_Internal_Rela *) > malloc (nrelas * sizeof (Elf_Internal_Rela)); 653c668,671 < rels = (Elf_Internal_Rel *) relas; --- > if (relas == NULL) > { > error(_("out of memory parsing relocs")); > return 0; 655c673,674 < else --- > > for (i = 0; i < nrelas; i++) 657c676,679 < Elf64_External_Rela * erelas; --- > relas[i].r_offset = BYTE_GET8 (erelas[i].r_offset); > relas[i].r_info = BYTE_GET8 (erelas[i].r_info); > relas[i].r_addend = BYTE_GET8 (erelas[i].r_addend); > } 659,660c681,686 < GET_DATA_ALLOC (rel_offset, rel_size, erelas, < Elf64_External_Rela *, "relocs"); --- > free (erelas); > } > *relasp = relas; > *nrelasp = nrelas; > return 1; > } 662c688,698 < rel_size = rel_size / sizeof (Elf64_External_Rela); --- > static int > slurp_rel_relocs (file, rel_offset, rel_size, relsp, nrelsp) > FILE *file; > unsigned long rel_offset; > unsigned long rel_size; > Elf_Internal_Rel **relsp; > unsigned long *nrelsp; > { > Elf_Internal_Rel *rels; > unsigned long nrels; > unsigned int i; 664,665c700,702 < relas = (Elf_Internal_Rela *) < malloc (rel_size * sizeof (Elf_Internal_Rela)); --- > if (is_32bit_elf) > { > Elf32_External_Rel * erels; 667,671c704,705 < if (relas == NULL) < { < error(_("out of memory parsing relocs")); < return 0; < } --- > GET_DATA_ALLOC (rel_offset, rel_size, erels, > Elf32_External_Rel *, "relocs"); 673,678c707 < for (i = 0; i < rel_size; i++) < { < relas[i].r_offset = BYTE_GET8 (erelas[i].r_offset); < relas[i].r_info = BYTE_GET8 (erelas[i].r_info); < relas[i].r_addend = BYTE_GET8 (erelas[i].r_addend); < } --- > nrels = rel_size / sizeof (Elf32_External_Rel); 680c709,715 < free (erelas); --- > rels = (Elf_Internal_Rel *) malloc (nrels * sizeof (Elf_Internal_Rel)); > > if (rels == NULL) > { > error(_("out of memory parsing relocs")); > return 0; > } 682c717,720 < rels = (Elf_Internal_Rel *) relas; --- > for (i = 0; i < nrels; i++) > { > rels[i].r_offset = BYTE_GET (erels[i].r_offset); > rels[i].r_info = BYTE_GET (erels[i].r_info); 683a722,723 > > free (erels); 687,692c727 < if (is_32bit_elf) < { < Elf32_External_Rel * erels; < < GET_DATA_ALLOC (rel_offset, rel_size, erels, < Elf32_External_Rel *, "relocs"); --- > Elf64_External_Rel * erels; 694c729,730 < rel_size = rel_size / sizeof (Elf32_External_Rel); --- > GET_DATA_ALLOC (rel_offset, rel_size, erels, > Elf64_External_Rel *, "relocs"); 696,697c732 < rels = (Elf_Internal_Rel *) < malloc (rel_size * sizeof (Elf_Internal_Rel)); --- > nrels = rel_size / sizeof (Elf64_External_Rel); 699,709c734 < if (rels == NULL) < { < error(_("out of memory parsing relocs")); < return 0; < } < < for (i = 0; i < rel_size; i++) < { < rels[i].r_offset = BYTE_GET (erels[i].r_offset); < rels[i].r_info = BYTE_GET (erels[i].r_info); < } --- > rels = (Elf_Internal_Rel *) malloc (nrels * sizeof (Elf_Internal_Rel)); 711,715c736 < free (erels); < < relas = (Elf_Internal_Rela *) rels; < } < else --- > if (rels == NULL) 717,720c738,740 < Elf64_External_Rel * erels; < < GET_DATA_ALLOC (rel_offset, rel_size, erels, < Elf64_External_Rel *, "relocs"); --- > error(_("out of memory parsing relocs")); > return 0; > } 722c742,746 < rel_size = rel_size / sizeof (Elf64_External_Rel); --- > for (i = 0; i < nrels; i++) > { > rels[i].r_offset = BYTE_GET8 (erels[i].r_offset); > rels[i].r_info = BYTE_GET8 (erels[i].r_info); > } 724,725c748,753 < rels = (Elf_Internal_Rel *) < malloc (rel_size * sizeof (Elf_Internal_Rel)); --- > free (erels); > } > *relsp = rels; > *nrelsp = nrels; > return 1; > } 727,731c755,768 < if (rels == NULL) < { < error(_("out of memory parsing relocs")); < return 0; < } --- > /* Display the contents of the relocation data found at the specified offset. */ > static int > dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) > FILE * file; > unsigned long rel_offset; > unsigned long rel_size; > Elf_Internal_Sym * symtab; > unsigned long nsyms; > char * strtab; > int is_rela; > { > unsigned int i; > Elf_Internal_Rel * rels; > Elf_Internal_Rela * relas; 733,737d769 < for (i = 0; i < rel_size; i++) < { < rels[i].r_offset = BYTE_GET8 (erels[i].r_offset); < rels[i].r_info = BYTE_GET8 (erels[i].r_info); < } 739c771,772 < free (erels); --- > if (is_rela == UNKNOWN) > is_rela = guess_is_rela (elf_header.e_machine); 741,742c774,782 < relas = (Elf_Internal_Rela *) rels; < } --- > if (is_rela) > { > if (!slurp_rela_relocs (file, rel_offset, rel_size, &relas, &rel_size)) > return 0; > } > else > { > if (!slurp_rel_relocs (file, rel_offset, rel_size, &rels, &rel_size)) > return 0; 867c907 < case EM_MIPS_RS4_BE: --- > case EM_MIPS_RS3_LE: 959c999,1002 < free (relas); --- > if (is_rela) > free (relas); > else > free (rels); 1136c1179 < case EM_MIPS_RS4_BE: --- > case EM_MIPS_RS3_LE: 1211,1221c1254,1264 < case EM_NONE: return _("None"); < case EM_M32: return "WE32100"; < case EM_SPARC: return "Sparc"; < case EM_386: return "Intel 80386"; < case EM_68K: return "MC68000"; < case EM_88K: return "MC88000"; < case EM_486: return "Intel 80486"; < case EM_860: return "Intel 80860"; < case EM_MIPS: return "MIPS R3000"; < case EM_S370: return "IBM System/370"; < case EM_MIPS_RS4_BE: return "MIPS R4000 big-endian"; --- > case EM_NONE: return _("None"); > case EM_M32: return "WE32100"; > case EM_SPARC: return "Sparc"; > case EM_386: return "Intel 80386"; > case EM_68K: return "MC68000"; > case EM_88K: return "MC88000"; > case EM_486: return "Intel 80486"; > case EM_860: return "Intel 80860"; > case EM_MIPS: return "MIPS R3000"; > case EM_S370: return "IBM System/370"; > case EM_MIPS_RS3_LE: return "MIPS R4000 big-endian"; 1223c1266 < case EM_PARISC: return "HPPA"; --- > case EM_PARISC: return "HPPA"; 1225,1230c1268,1273 < case EM_SPARC32PLUS: return "Sparc v8+" ; < case EM_960: return "Intel 90860"; < case EM_PPC: return "PowerPC"; < case EM_V800: return "NEC V800"; < case EM_FR20: return "Fujitsu FR20"; < case EM_RH32: return "TRW RH32"; --- > case EM_SPARC32PLUS: return "Sparc v8+" ; > case EM_960: return "Intel 90860"; > case EM_PPC: return "PowerPC"; > case EM_V800: return "NEC V800"; > case EM_FR20: return "Fujitsu FR20"; > case EM_RH32: return "TRW RH32"; 1232,1236c1275,1279 < case EM_ARM: return "ARM"; < case EM_OLD_ALPHA: return "Digital Alpha (old)"; < case EM_SH: return "Hitachi SH"; < case EM_SPARCV9: return "Sparc v9"; < case EM_TRICORE: return "Siemens Tricore"; --- > case EM_ARM: return "ARM"; > case EM_OLD_ALPHA: return "Digital Alpha (old)"; > case EM_SH: return "Hitachi SH"; > case EM_SPARCV9: return "Sparc v9"; > case EM_TRICORE: return "Siemens Tricore"; 1246c1289 < case EM_ALPHA: return "Alpha"; --- > case EM_ALPHA: return "Alpha"; 1256,1273c1299,1316 < case EM_MMA: return "Fujitsu Multimedia Accelerator"; < case EM_PCP: return "Siemens PCP"; < case EM_NCPU: return "Sony nCPU embedded RISC processor"; < case EM_NDR1: return "Denso NDR1 microprocesspr"; < case EM_STARCORE: return "Motorola Star*Core processor"; < case EM_ME16: return "Toyota ME16 processor"; < case EM_ST100: return "STMicroelectronics ST100 processor"; < case EM_TINYJ: return "Advanced Logic Corp. TinyJ embedded processor"; < case EM_FX66: return "Siemens FX66 microcontroller"; < case EM_ST9PLUS: return "STMicroelectronics ST9+ 8/16 bit microcontroller"; < case EM_ST7: return "STMicroelectronics ST7 8-bit microcontroller"; < case EM_68HC16: return "Motorola MC68HC16 Microcontroller"; < case EM_68HC11: return "Motorola MC68HC11 Microcontroller"; < case EM_68HC08: return "Motorola MC68HC08 Microcontroller"; < case EM_68HC05: return "Motorola MC68HC05 Microcontroller"; < case EM_SVX: return "Silicon Graphics SVx"; < case EM_ST19: return "STMicroelectronics ST19 8-bit microcontroller"; < case EM_VAX: return "Digital VAX"; --- > case EM_MMA: return "Fujitsu Multimedia Accelerator"; > case EM_PCP: return "Siemens PCP"; > case EM_NCPU: return "Sony nCPU embedded RISC processor"; > case EM_NDR1: return "Denso NDR1 microprocesspr"; > case EM_STARCORE: return "Motorola Star*Core processor"; > case EM_ME16: return "Toyota ME16 processor"; > case EM_ST100: return "STMicroelectronics ST100 processor"; > case EM_TINYJ: return "Advanced Logic Corp. TinyJ embedded processor"; > case EM_FX66: return "Siemens FX66 microcontroller"; > case EM_ST9PLUS: return "STMicroelectronics ST9+ 8/16 bit microcontroller"; > case EM_ST7: return "STMicroelectronics ST7 8-bit microcontroller"; > case EM_68HC16: return "Motorola MC68HC16 Microcontroller"; > case EM_68HC11: return "Motorola MC68HC11 Microcontroller"; > case EM_68HC08: return "Motorola MC68HC08 Microcontroller"; > case EM_68HC05: return "Motorola MC68HC05 Microcontroller"; > case EM_SVX: return "Silicon Graphics SVx"; > case EM_ST19: return "STMicroelectronics ST19 8-bit microcontroller"; > case EM_VAX: return "Digital VAX"; 1276,1278c1319,1321 < case EM_JAVELIN: return "Infineon Technologies 32-bit embedded cpu"; < case EM_FIREPATH: return "Element 14 64-bit DSP processor"; < case EM_ZSP: return "LSI Logic's 16-bit DSP processor"; --- > case EM_JAVELIN: return "Infineon Technologies 32-bit embedded cpu"; > case EM_FIREPATH: return "Element 14 64-bit DSP processor"; > case EM_ZSP: return "LSI Logic's 16-bit DSP processor"; 1280,1281c1323,1324 < case EM_HUANY: return "Harvard Universitys's machine-independent object format"; < case EM_PRISM: return "SiTera Prism"; --- > case EM_HUANY: return "Harvard Universitys's machine-independent object format"; > case EM_PRISM: return "SiTera Prism"; 1459c1502 < case EM_MIPS_RS4_BE: --- > case EM_MIPS_RS3_LE: 1567a1611,1625 > > case EM_IA_64: > if ((e_flags & EF_IA_64_ABI64)) > strcat (buf, ", 64-bit"); > else > strcat (buf, ", 32-bit"); > if ((e_flags & EF_IA_64_REDUCEDFP)) > strcat (buf, ", reduced fp model"); > if ((e_flags & EF_IA_64_NOFUNCDESC_CONS_GP)) > strcat (buf, ", no function descriptors, constant gp"); > else if ((e_flags & EF_IA_64_CONS_GP)) > strcat (buf, ", constant gp"); > if ((e_flags & EF_IA_64_ABSOLUTE)) > strcat (buf, ", absolute"); > break; 1620a1679,1693 > get_ia64_segment_type (type) > unsigned long type; > { > switch (type) > { > case PT_IA_64_ARCHEXT: return "IA_64_ARCHEXT"; > case PT_IA_64_UNWIND: return "IA_64_UNWIND"; > default: > break; > } > > return NULL; > } > > static const char * 1644c1717 < case EM_MIPS_RS4_BE: --- > case EM_MIPS_RS3_LE: 1649a1723,1725 > case EM_IA_64: > result = get_ia64_segment_type (p_type); > break; 1752a1829,1842 > get_ia64_section_type_name (sh_type) > unsigned int sh_type; > { > switch (sh_type) > { > case SHT_IA_64_EXT: return "IA_64_EXT"; > case SHT_IA_64_UNWIND: return "IA_64_UNWIND"; > default: > break; > } > return NULL; > } > > static const char * 1793c1883 < case EM_MIPS_RS4_BE: --- > case EM_MIPS_RS3_LE: 1798a1889,1891 > case EM_IA_64: > result = get_ia64_section_type_name (sh_type); > break; 1839a1933 > {"unwind", no_argument, 0, 'u'}, 1863a1958 > fprintf (stdout, _(" -u or --unwind Display the unwind info (if present)\n")); 1926c2021 < (argc, argv, "ersahnldSDAIw::x:i:vV", options, NULL)) != EOF) --- > (argc, argv, "ersuahnldSDAIw::x:i:vV", options, NULL)) != EOF) 1942a2038 > do_unwind ++; 1965a2062,2064 > case 'u': > do_unwind ++; > break; 2030d2128 < case 'f': 2031a2130,2131 > do_debug_frames_interp = 1; > case 'f': 2068c2168 < if (!do_dynamic && !do_syms && !do_reloc && !do_sections --- > if (!do_dynamic && !do_syms && !do_reloc && !do_unwind && !do_sections 2761c2861,2862 < || do_debug_lines || do_debug_pubnames || do_debug_aranges || do_debug_frames) --- > || do_debug_lines || do_debug_pubnames || do_debug_aranges > || do_debug_frames) 2915,2916c3016,3017 < unsigned long i; < int found = 0; --- > unsigned long i; > int found = 0; 2978a3080,3504 > #include "unwind-ia64.h" > > /* An absolute address consists of a section and an offset. If the > section is NULL, the offset itself is the address, otherwise, the > address equals to LOAD_ADDRESS(section) + offset. */ > > struct absaddr > { > unsigned short section; > bfd_vma offset; > }; > > struct unw_aux_info > { > struct unw_table_entry > { > struct absaddr start; > struct absaddr end; > struct absaddr info; > } > *table; /* Unwind table. */ > unsigned long table_len; /* Length of unwind table. */ > unsigned char * info; /* Unwind info. */ > unsigned long info_size; /* Size of unwind info. */ > bfd_vma info_addr; /* starting address of unwind info. */ > bfd_vma seg_base; /* Starting address of segment. */ > Elf_Internal_Sym * symtab; /* The symbol table. */ > unsigned long nsyms; /* Number of symbols. */ > char * strtab; /* The string table. */ > unsigned long strtab_size; /* Size of string table. */ > }; > > static void find_symbol_for_address PARAMS ((struct unw_aux_info *, > struct absaddr, const char **, > bfd_vma *)); > static void dump_ia64_unwind PARAMS ((struct unw_aux_info *)); > static int slurp_ia64_unwind_table PARAMS ((FILE *, struct unw_aux_info *, > Elf32_Internal_Shdr *)); > > static void > find_symbol_for_address (aux, addr, symname, offset) > struct unw_aux_info *aux; > struct absaddr addr; > const char **symname; > bfd_vma *offset; > { > bfd_vma dist = (bfd_vma) 0x100000; > Elf_Internal_Sym *sym, *best = NULL; > unsigned long i; > > for (i = 0, sym = aux->symtab; i < aux->nsyms; ++i, ++sym) > { > if (ELF_ST_TYPE (sym->st_info) == STT_FUNC > && sym->st_name != 0 > && (addr.section == SHN_UNDEF || addr.section == sym->st_shndx) > && addr.offset >= sym->st_value > && addr.offset - sym->st_value < dist) > { > best = sym; > dist = addr.offset - sym->st_value; > if (!dist) > break; > } > } > if (best) > { > *symname = (best->st_name >= aux->strtab_size > ? "" : aux->strtab + best->st_name); > *offset = dist; > return; > } > *symname = NULL; > *offset = addr.offset; > } > > static void > dump_ia64_unwind (aux) > struct unw_aux_info *aux; > { > bfd_vma addr_size; > struct unw_table_entry * tp; > int in_body; > > addr_size = is_32bit_elf ? 4 : 8; > > for (tp = aux->table; tp < aux->table + aux->table_len; ++tp) > { > bfd_vma stamp; > bfd_vma offset; > const unsigned char * dp; > const unsigned char * head; > const char * procname; > > find_symbol_for_address (aux, tp->start, &procname, &offset); > > fputs ("\n<", stdout); > > if (procname) > { > fputs (procname, stdout); > > if (offset) > printf ("+%lx", (unsigned long) offset); > } > > fputs (">: [", stdout); > print_vma (tp->start.offset, PREFIX_HEX); > fputc ('-', stdout); > print_vma (tp->end.offset, PREFIX_HEX); > printf ("), info at +0x%lx\n", > (unsigned long) (tp->info.offset - aux->seg_base)); > > head = aux->info + (tp->info.offset - aux->info_addr); > stamp = BYTE_GET8 ((unsigned char *) head); > > printf (" v%u, flags=0x%lx (%s%s ), len=%lu bytes\n", > (unsigned) UNW_VER (stamp), > (unsigned long) ((stamp & UNW_FLAG_MASK) >> 32), > UNW_FLAG_EHANDLER (stamp) ? " ehandler" : "", > UNW_FLAG_UHANDLER (stamp) ? " uhandler" : "", > (unsigned long) (addr_size * UNW_LENGTH (stamp))); > > if (UNW_VER (stamp) != 1) > { > printf ("\tUnknown version.\n"); > continue; > } > > in_body = 0; > for (dp = head + 8; dp < head + 8 + addr_size * UNW_LENGTH (stamp);) > dp = unw_decode (dp, in_body, & in_body); > } > } > > static int > slurp_ia64_unwind_table (file, aux, sec) > FILE *file; > struct unw_aux_info *aux; > Elf32_Internal_Shdr *sec; > { > unsigned long size, addr_size, nrelas, i; > Elf_Internal_Phdr *prog_hdrs, *seg; > struct unw_table_entry *tep; > Elf32_Internal_Shdr *relsec; > Elf_Internal_Rela *rela, *rp; > unsigned char *table, *tp; > Elf_Internal_Sym *sym; > const char *relname; > int result; > > addr_size = is_32bit_elf ? 4 : 8; > > /* First, find the starting address of the segment that includes > this section: */ > > if (elf_header.e_phnum) > { > prog_hdrs = (Elf_Internal_Phdr *) > xmalloc (elf_header.e_phnum * sizeof (Elf_Internal_Phdr)); > > if (is_32bit_elf) > result = get_32bit_program_headers (file, prog_hdrs); > else > result = get_64bit_program_headers (file, prog_hdrs); > > if (!result) > { > free (prog_hdrs); > return 0; > } > > for (seg = prog_hdrs; seg < prog_hdrs + elf_header.e_phnum; ++seg) > { > if (seg->p_type != PT_LOAD) > continue; > > if (sec->sh_addr >= seg->p_vaddr > && (sec->sh_addr + sec->sh_size <= seg->p_vaddr + seg->p_memsz)) > { > aux->seg_base = seg->p_vaddr; > break; > } > } > > free (prog_hdrs); > } > > /* Second, build the unwind table from the contents of the unwind section: */ > size = sec->sh_size; > GET_DATA_ALLOC (sec->sh_offset, size, table, char *, "unwind table"); > > tep = aux->table = xmalloc (size / (3 * addr_size) * sizeof (aux->table[0])); > for (tp = table; tp < table + size; tp += 3 * addr_size, ++ tep) > { > tep->start.section = SHN_UNDEF; > tep->end.section = SHN_UNDEF; > tep->info.section = SHN_UNDEF; > if (is_32bit_elf) > { > tep->start.offset = byte_get ((unsigned char *) tp + 0, 4); > tep->end.offset = byte_get ((unsigned char *) tp + 4, 4); > tep->info.offset = byte_get ((unsigned char *) tp + 8, 4); > } > else > { > tep->start.offset = BYTE_GET8 ((unsigned char *) tp + 0); > tep->end.offset = BYTE_GET8 ((unsigned char *) tp + 8); > tep->info.offset = BYTE_GET8 ((unsigned char *) tp + 16); > } > tep->start.offset += aux->seg_base; > tep->end.offset += aux->seg_base; > tep->info.offset += aux->seg_base; > } > free (table); > > /* Third, apply any relocations to the unwind table: */ > > for (relsec = section_headers; > relsec < section_headers + elf_header.e_shnum; > ++relsec) > { > if (relsec->sh_type != SHT_RELA > || section_headers + relsec->sh_info != sec) > continue; > > if (!slurp_rela_relocs (file, relsec->sh_offset, relsec->sh_size, > & rela, & nrelas)) > return 0; > > for (rp = rela; rp < rela + nrelas; ++rp) > { > if (is_32bit_elf) > { > relname = elf_ia64_reloc_type (ELF32_R_TYPE (rp->r_info)); > sym = aux->symtab + ELF32_R_SYM (rp->r_info); > > if (ELF32_ST_TYPE (sym->st_info) != STT_SECTION) > { > warn (_("Skipping unexpected symbol type %u"), > ELF32_ST_TYPE (sym->st_info)); > continue; > } > } > else > { > relname = elf_ia64_reloc_type (ELF64_R_TYPE (rp->r_info)); > sym = aux->symtab + ELF64_R_SYM (rp->r_info); > > if (ELF64_ST_TYPE (sym->st_info) != STT_SECTION) > { > warn (_("Skipping unexpected symbol type %u"), > ELF64_ST_TYPE (sym->st_info)); > continue; > } > } > > if (strncmp (relname, "R_IA64_SEGREL", 13) != 0) > { > warn (_("Skipping unexpected relocation type %s"), relname); > continue; > } > > i = rp->r_offset / (3 * addr_size); > > switch (rp->r_offset/addr_size % 3) > { > case 0: > aux->table[i].start.section = sym->st_shndx; > aux->table[i].start.offset += rp->r_addend; > break; > case 1: > aux->table[i].end.section = sym->st_shndx; > aux->table[i].end.offset += rp->r_addend; > break; > case 2: > aux->table[i].info.section = sym->st_shndx; > aux->table[i].info.offset += rp->r_addend; > break; > default: > break; > } > } > > free (rela); > } > > aux->table_len = size / (3 * addr_size); > return 1; > } > > static int > process_unwind (file) > FILE * file; > { > Elf32_Internal_Shdr *sec, *unwsec = NULL, *strsec; > unsigned long i, addr_size, unwcount = 0, unwstart = 0; > struct unw_aux_info aux; > > if (!do_unwind) > return 1; > > if (elf_header.e_machine != EM_IA_64) > { > printf (_("\nThere are no unwind sections in this file.\n")); > return 1; > } > > memset (& aux, 0, sizeof (aux)); > > addr_size = is_32bit_elf ? 4 : 8; > > for (i = 0, sec = section_headers; i < elf_header.e_shnum; ++i, ++sec) > { > if (sec->sh_type == SHT_SYMTAB) > { > aux.nsyms = sec->sh_size / sec->sh_entsize; > aux.symtab = GET_ELF_SYMBOLS (file, sec->sh_offset, aux.nsyms); > > strsec = section_headers + sec->sh_link; > aux.strtab_size = strsec->sh_size; > GET_DATA_ALLOC (strsec->sh_offset, aux.strtab_size, > aux.strtab, char *, "string table"); > } > else if (sec->sh_type == SHT_IA_64_UNWIND) > unwcount++; > } > > if (!unwcount) > printf (_("\nThere are no unwind sections in this file.\n")); > > while (unwcount-- > 0) > { > char *suffix; > size_t len, len2; > > for (i = unwstart, sec = section_headers + unwstart; > i < elf_header.e_shnum; ++i, ++sec) > if (sec->sh_type == SHT_IA_64_UNWIND) > { > unwsec = sec; > break; > } > > unwstart = i + 1; > len = sizeof (ELF_STRING_ia64_unwind_once) - 1; > > if (strncmp (SECTION_NAME (unwsec), ELF_STRING_ia64_unwind_once, > len) == 0) > { > /* .gnu.linkonce.ia64unw.FOO -> .gnu.linkonce.ia64unwi.FOO */ > len2 = sizeof (ELF_STRING_ia64_unwind_info_once) - 1; > suffix = SECTION_NAME (unwsec) + len; > for (i = 0, sec = section_headers; i < elf_header.e_shnum; > ++i, ++sec) > if (strncmp (SECTION_NAME (sec), > ELF_STRING_ia64_unwind_info_once, len2) == 0 > && strcmp (SECTION_NAME (sec) + len2, suffix) == 0) > break; > } > else > { > /* .IA_64.unwindFOO -> .IA_64.unwind_infoFOO > .IA_64.unwind or BAR -> .IA_64.unwind_info */ > len = sizeof (ELF_STRING_ia64_unwind) - 1; > len2 = sizeof (ELF_STRING_ia64_unwind_info) - 1; > suffix = ""; > if (strncmp (SECTION_NAME (unwsec), ELF_STRING_ia64_unwind, > len) == 0) > suffix = SECTION_NAME (unwsec) + len; > for (i = 0, sec = section_headers; i < elf_header.e_shnum; > ++i, ++sec) > if (strncmp (SECTION_NAME (sec), > ELF_STRING_ia64_unwind_info, len2) == 0 > && strcmp (SECTION_NAME (sec) + len2, suffix) == 0) > break; > } > > if (i == elf_header.e_shnum) > { > printf (_("\nCould not find unwind info section for ")); > > if (string_table == NULL) > printf ("%d", unwsec->sh_name); > else > printf ("'%s'", SECTION_NAME (unwsec)); > } > else > { > aux.info_size = sec->sh_size; > aux.info_addr = sec->sh_addr; > GET_DATA_ALLOC (sec->sh_offset, aux.info_size, aux.info, > char *, "unwind info"); > > printf (_("\nUnwind section ")); > > if (string_table == NULL) > printf ("%d", unwsec->sh_name); > else > printf ("'%s'", SECTION_NAME (unwsec)); > > printf (_(" at offset 0x%lx contains %lu entries:\n"), > unwsec->sh_offset, > (unsigned long) (unwsec->sh_size / (3 * addr_size))); > > (void) slurp_ia64_unwind_table (file, & aux, unwsec); > > if (aux.table_len > 0) > dump_ia64_unwind (& aux); > > if (aux.table) > free ((char *) aux.table); > if (aux.info) > free ((char *) aux.info); > aux.table = NULL; > aux.info = NULL; > } > } > > if (aux.symtab) > free (aux.symtab); > if (aux.strtab) > free ((char *) aux.strtab); > > return 1; > } 3714c4240 < case EM_MIPS_RS4_BE: --- > case EM_MIPS_RS3_LE: 3954,3959c4480,4485 < int total; < int cnt; < unsigned char * edata; < unsigned short * data; < char * strtab; < Elf_Internal_Sym * symbols; --- > int total; > int cnt; > unsigned char * edata; > unsigned short * data; > char * strtab; > Elf_Internal_Sym * symbols; 4995c5521 < printf (_(" Prolgue Length: %d\n"), info.li_prologue_length); --- > printf (_(" Prologue Length: %d\n"), info.li_prologue_length); 6432c6958 < unsigned int data_factor; --- > int data_factor; 6437a6964 > unsigned char fde_encoding; 6499c7026 < printf ("%08x ", (unsigned int) fc->pc_begin); --- > printf ("%08lx ", fc->pc_begin); 6530a7058,7071 > static int > size_of_encoded_value (encoding) > int encoding; > { > switch (encoding & 0x7) > { > default: /* ??? */ > case 0: return is_32bit_elf ? 4 : 8; > case 2: return 2; > case 3: return 4; > case 4: return 8; > } > } > 6548a7090 > int addr_size = is_32bit_elf ? 4 : 8; 6560a7103,7105 > unsigned char * augmentation_data = NULL; > unsigned long augmentation_data_len = 0; > int encoded_ptr_size = addr_size; 6571,6572d7115 < printf ("\n%08x %08lx %08lx ", saved_start - section_start, length, cie_id); < 6574a7118,7119 > int version; > 6586,6590c7131 < start ++; /* version */ < fc->augmentation = start; < < while (* start) < start++; --- > version = *start++; 6592c7133,7134 < start++; /* skip past NUL */ --- > fc->augmentation = start; > start = strchr (start, '\0') + 1; 6596d7137 < int xtra; 6600,6602c7141,7143 < xtra = LEB (); < printf ("skipping %d extra bytes\n", xtra); < start += xtra; --- > augmentation_data_len = LEB (); > augmentation_data = start; > start += augmentation_data_len; 6606c7147 < start += 4; --- > start += addr_size; 6618,6619c7159,7207 < printf ("CIE \"%s\" cf=%d df=%d ra=%d\n", < fc->augmentation, fc->code_factor, fc->data_factor, fc->ra); --- > > if (do_debug_frames_interp) > printf ("\n%08lx %08lx %08lx CIE \"%s\" cf=%d df=%d ra=%d\n", > (unsigned long)(saved_start - section_start), length, cie_id, > fc->augmentation, fc->code_factor, fc->data_factor, > fc->ra); > else > { > printf ("\n%08lx %08lx %08lx CIE\n", > (unsigned long)(saved_start - section_start), length, cie_id); > printf (" Version: %d\n", version); > printf (" Augmentation: \"%s\"\n", fc->augmentation); > printf (" Code alignment factor: %u\n", fc->code_factor); > printf (" Data alignment factor: %d\n", fc->data_factor); > printf (" Return address column: %d\n", fc->ra); > > if (augmentation_data_len) > { > unsigned long i; > printf (" Augmentation data: "); > for (i = 0; i < augmentation_data_len; ++i) > printf (" %02x", augmentation_data[i]); > putchar ('\n'); > } > putchar ('\n'); > } > > if (augmentation_data_len) > { > unsigned char *p, *q; > p = fc->augmentation + 1; > q = augmentation_data; > > while (1) > { > if (*p == 'L') > q++; > else if (*p == 'P') > q += 1 + size_of_encoded_value (*q); > else if (*p == 'R') > fc->fde_encoding = *q++; > else > break; > p++; > } > > if (fc->fde_encoding) > encoded_ptr_size = size_of_encoded_value (fc->fde_encoding); > } 6631c7219 < look_for = is_eh ? start-4-cie_id : (unsigned char *) cie_id; --- > look_for = is_eh ? start - 4 - cie_id : section_start + cie_id; 6633,6634c7221,7223 < fc->pc_begin = byte_get (start, 4); start += 4; < fc->pc_range = byte_get (start, 4); start += 4; --- > for (cie=chunks; cie ; cie = cie->next) > if (cie->chunk_start == look_for) > break; 6636d7224 < for (cie=chunks; cie && (cie->chunk_start != look_for); cie = cie->next); 6639c7227,7228 < warn ("Invalid CIE pointer %08x in FDE at %08x\n", cie_id, saved_start); --- > warn ("Invalid CIE pointer %08lx in FDE at %08lx\n", > cie_id, saved_start); 6646a7236 > fc->fde_encoding = 0; 6661a7252 > fc->fde_encoding = cie->fde_encoding; 6663a7255,7262 > if (fc->fde_encoding) > encoded_ptr_size = size_of_encoded_value (fc->fde_encoding); > > fc->pc_begin = byte_get (start, encoded_ptr_size); > start += encoded_ptr_size; > fc->pc_range = byte_get (start, encoded_ptr_size); > start += encoded_ptr_size; > 6666,6667c7265,7267 < unsigned long l = LEB (); < start += l; --- > augmentation_data_len = LEB (); > augmentation_data = start; > start += augmentation_data_len; 6670,6671c7270,7272 < printf ("FDE cie=%08x pc=%08lx..%08lx\n", < cie->chunk_start-section_start, fc->pc_begin, --- > printf ("\n%08lx %08lx %08lx FDE cie=%08x pc=%08lx..%08lx\n", > (unsigned long)(saved_start - section_start), length, cie_id, > cie->chunk_start - section_start, fc->pc_begin, 6672a7274,7282 > if (! do_debug_frames_interp && augmentation_data_len) > { > unsigned long i; > printf (" Augmentation data: "); > for (i = 0; i < augmentation_data_len; ++i) > printf (" %02x", augmentation_data[i]); > putchar ('\n'); > putchar ('\n'); > } 6678,6680c7288 < /* This exists for readelf maintainers. */ < #define FDEBUG 0 < --- > if (do_debug_frames_interp) 6690,6691c7298 < bfd_vma vma; < --- > 6696c7303 < --- > 6713c7320 < start += sizeof (vma); --- > start += encoded_ptr_size; 6763c7370 < break; --- > break; 6768c7375 < reg = LEB (); LEB (); --- > reg = LEB (); LEB (); 6771c7378 < --- > 6799,6803c7406,7411 < frame_display_row (fc, &need_col_headers, &max_regs); < #if FDEBUG < printf (" DW_CFA_advance_loc: %08x = %08x + %d*%d\n", < fc->pc_begin + opa * fc->code_factor, fc->pc_begin, opa, fc->code_factor); < #endif --- > if (do_debug_frames_interp) > frame_display_row (fc, &need_col_headers, &max_regs); > else > printf (" DW_CFA_advance_loc: %d to %08lx\n", > opa * fc->code_factor, > fc->pc_begin + opa * fc->code_factor); 6809,6811c7417,7419 < #if FDEBUG < printf (" DW_CFA_offset: r%d = cfa[%d*%d]\n", opa, roffs, fc->data_factor); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_offset: r%d at cfa%+ld\n", > opa, roffs * fc->data_factor); 6817,6819c7425,7426 < #if FDEBUG < printf (" DW_CFA_restore: r%d\n", opa); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_restore: r%d\n", opa); 6825,6829c7432,7437 < frame_display_row (fc, &need_col_headers, &max_regs); < vma = byte_get (start, sizeof (vma)); start += sizeof (vma); < #if FDEBUG < printf (" DW_CFA_set_loc: %08x\n", vma); < #endif --- > vma = byte_get (start, encoded_ptr_size); > start += encoded_ptr_size; > if (do_debug_frames_interp) > frame_display_row (fc, &need_col_headers, &max_regs); > else > printf (" DW_CFA_set_loc: %08lx\n", (unsigned long)vma); 6834d7441 < frame_display_row (fc, &need_col_headers, &max_regs); 6836,6839c7443,7448 < #if FDEBUG < printf (" DW_CFA_advance_loc1: %08x = %08x + %d*%d\n", < fc->pc_begin + ofs * fc->code_factor, fc->pc_begin, ofs, fc->code_factor); < #endif --- > if (do_debug_frames_interp) > frame_display_row (fc, &need_col_headers, &max_regs); > else > printf (" DW_CFA_advance_loc1: %ld to %08lx\n", > ofs * fc->code_factor, > fc->pc_begin + ofs * fc->code_factor); 6844d7452 < frame_display_row (fc, &need_col_headers, &max_regs); 6846,6849c7454,7459 < #if FDEBUG < printf (" DW_CFA_advance_loc2: %08x = %08x + %d*%d\n", < fc->pc_begin + ofs * fc->code_factor, fc->pc_begin, ofs, fc->code_factor); < #endif --- > if (do_debug_frames_interp) > frame_display_row (fc, &need_col_headers, &max_regs); > else > printf (" DW_CFA_advance_loc2: %ld to %08lx\n", > ofs * fc->code_factor, > fc->pc_begin + ofs * fc->code_factor); 6854d7463 < frame_display_row (fc, &need_col_headers, &max_regs); 6856,6859c7465,7470 < #if FDEBUG < printf (" DW_CFA_advance_loc4: %08x = %08x + %d*%d\n", < fc->pc_begin + ofs * fc->code_factor, fc->pc_begin, ofs, fc->code_factor); < #endif --- > if (do_debug_frames_interp) > frame_display_row (fc, &need_col_headers, &max_regs); > else > printf (" DW_CFA_advance_loc4: %ld to %08lx\n", > ofs * fc->code_factor, > fc->pc_begin + ofs * fc->code_factor); 6866,6868c7477,7479 < #if FDEBUG < printf (" DW_CFA_offset_extended: r%d = cfa[%d*%d]\n", reg, roffs, fc->data_factor); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_offset_extended: r%ld at cfa%+ld\n", > reg, roffs * fc->data_factor); 6875,6877c7486,7487 < #if FDEBUG < printf (" DW_CFA_restore_extended: r%d\n", reg); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_restore_extended: r%ld\n", reg); 6884,6886c7494,7495 < #if FDEBUG < printf (" DW_CFA_undefined: r%d\n", reg); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_undefined: r%ld\n", reg); 6893,6895c7502,7503 < #if FDEBUG < printf (" DW_CFA_same_value: r%d\n", reg); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_same_value: r%ld\n", reg); 6903,6905c7511,7512 < #if FDEBUG < printf (" DW_CFA_register: r%d\n", reg); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_register: r%ld\n", reg); 6911,6913c7518,7519 < #if FDEBUG < printf (" DW_CFA_remember_state\n"); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_remember_state\n"); 6925,6927c7531,7532 < #if FDEBUG < printf (" DW_CFA_restore_state\n"); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_restore_state\n"); 6941,6943c7546,7548 < #if FDEBUG < printf (" DW_CFA_def_cfa: reg %d ofs %d\n", fc->cfa_reg, fc->cfa_offset); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_def_cfa: r%d ofs %d\n", > fc->cfa_reg, fc->cfa_offset); 6948,6950c7553,7554 < #if FDEBUG < printf (" DW_CFA_def_cfa_reg: %d\n", fc->cfa_reg); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_def_cfa_reg: r%d\n", fc->cfa_reg); 6955,6957c7559,7560 < #if FDEBUG < printf (" DW_CFA_def_cfa_offset: %d\n", fc->cfa_offset); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_def_cfa_offset: %d\n", fc->cfa_offset); 6961,6963c7564,7565 < #if FDEBUG < printf (" DW_CFA_nop\n"); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_nop\n"); 6970,6972c7572,7573 < #if FDEBUG < printf (" DW_CFA_GNU_window_save\n"); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_GNU_window_save\n"); 6975,6977d7575 < #ifndef DW_CFA_GNU_args_size < #define DW_CFA_GNU_args_size 0x2e < #endif 6980,6982c7578,7579 < #if FDEBUG < printf (" DW_CFA_GNU_args_size: %d\n", ul); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_GNU_args_size: %ld\n", ul); 6985,6987d7581 < #ifndef DW_CFA_GNU_negative_offset_extended < #define DW_CFA_GNU_negative_offset_extended 0x2f < #endif 6992,6994c7586,7588 < #if FDEBUG < printf (" DW_CFA_GNU_negative_offset_extended: r%d = cfa[%d*%d]\n", reg, l, fc->data_factor); < #endif --- > if (! do_debug_frames_interp) > printf (" DW_CFA_GNU_negative_offset_extended: r%ld at cfa%+ld\n", > reg, l * fc->data_factor); 7005c7599,7600 < frame_display_row (fc, &need_col_headers, &max_regs); --- > if (do_debug_frames_interp) > frame_display_row (fc, &need_col_headers, &max_regs); 7068d7662 < { ".debug_frame", display_debug_not_supported, NULL }, 7098c7692 < name = ".debug_info"; --- > name = ".debug_info"; 7125c7719 < unsigned int i; --- > unsigned int i; 7607c8201 < pnote->descsz, get_note_type (pnote->type)); --- > pnote->descsz, get_note_type (pnote->type)); 7759c8353 < case EM_MIPS_RS4_BE: --- > case EM_MIPS_RS3_LE: 7897a8492,8493 > > process_unwind (file); diff -rN binutils-2.11/binutils/rename.c binutils-2.11.2/binutils/rename.c 2c2 < Copyright (C) 1999 Free Software Foundation, Inc. --- > Copyright 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/resbin.c binutils-2.11.2/binutils/resbin.c 2c2 < Copyright 1997, 1998 Free Software Foundation, Inc. --- > Copyright 1997, 1998, 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/rescoff.c binutils-2.11.2/binutils/rescoff.c 2c2 < Copyright 1997, 1998, 2000 Free Software Foundation, Inc. --- > Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/resrc.c binutils-2.11.2/binutils/resrc.c 2c2 < Copyright 1997, 1998, 1999 Free Software Foundation, Inc. --- > Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/size.c binutils-2.11.2/binutils/size.c 2c2 < Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 diff -rN binutils-2.11/binutils/srconv.c binutils-2.11.2/binutils/srconv.c 2c2,3 < Copyright (C) 1994, 95, 96, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1996, 1998, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/strings.c binutils-2.11.2/binutils/strings.c 2c2 < Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 79c79,82 < #ifdef isascii --- > /* Not all printable characters have ASCII codes (depending upon the > LOCALE set) but on some older systems it is not safe to test isprint > without first testing isascii... */ > #if defined isascii && !defined HAVE_LOCALE_H 144c147 < setlocale (LC_MESSAGES, ""); --- > setlocale (LC_ALL, ""); diff -rN binutils-2.11/binutils/sysdump.c binutils-2.11.2/binutils/sysdump.c 2c2 < Copyright (C) 1994, 95, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/sysinfo.c binutils-2.11.2/binutils/sysinfo.c 14c14 < #line 1 "sysinfo.y" --- > #line 20 "sysinfo.y" 36c36 < #line 24 "sysinfo.y" --- > #line 43 "sysinfo.y" 109,111c109,111 < 38, 59, 75, 76, 79, 130, 150, 152, 153, 154, < 157, 186, 204, 217, 230, 233, 338, 340, 343, 348, < 354, 356, 359, 360, 362, 363 --- > 57, 78, 94, 95, 98, 149, 169, 171, 172, 173, > 176, 205, 223, 236, 249, 252, 357, 359, 362, 367, > 373, 375, 378, 379, 381, 382 183c183 < #line 3 "/usr/share/misc/bison.simple" --- > #line 3 "/usr/share/bison/bison.simple" 397c397 < #line 217 "/usr/share/misc/bison.simple" --- > #line 217 "/usr/share/bison/bison.simple" 726c726 < #line 38 "sysinfo.y" --- > #line 57 "sysinfo.y" 750c750 < #line 59 "sysinfo.y" --- > #line 78 "sysinfo.y" 765c765 < #line 81 "sysinfo.y" --- > #line 100 "sysinfo.y" 816c816 < #line 131 "sysinfo.y" --- > #line 150 "sysinfo.y" 834c834 < #line 158 "sysinfo.y" --- > #line 177 "sysinfo.y" 864c864 < #line 188 "sysinfo.y" --- > #line 207 "sysinfo.y" 880c880 < #line 205 "sysinfo.y" --- > #line 224 "sysinfo.y" 894c894 < #line 218 "sysinfo.y" --- > #line 237 "sysinfo.y" 907c907 < #line 232 "sysinfo.y" --- > #line 251 "sysinfo.y" 911c911 < #line 234 "sysinfo.y" --- > #line 253 "sysinfo.y" 1014c1014 < #line 339 "sysinfo.y" --- > #line 358 "sysinfo.y" 1018c1018 < #line 340 "sysinfo.y" --- > #line 359 "sysinfo.y" 1022c1022 < #line 345 "sysinfo.y" --- > #line 364 "sysinfo.y" 1026c1026 < #line 350 "sysinfo.y" --- > #line 369 "sysinfo.y" 1030c1030 < #line 355 "sysinfo.y" --- > #line 374 "sysinfo.y" 1034c1034 < #line 356 "sysinfo.y" --- > #line 375 "sysinfo.y" 1038c1038 < #line 364 "sysinfo.y" --- > #line 383 "sysinfo.y" 1052c1052 < #line 543 "/usr/share/misc/bison.simple" --- > #line 543 "/usr/share/bison/bison.simple" 1272c1272 < #line 379 "sysinfo.y" --- > #line 398 "sysinfo.y" diff -rN binutils-2.11/binutils/sysinfo.y binutils-2.11.2/binutils/sysinfo.y 0a1,19 > /* Copyright 2001 Free Software Foundation, Inc. > Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com). > > This file is part of GNU binutils. > > 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. */ > diff -rN binutils-2.11/binutils/syslex.c binutils-2.11.2/binutils/syslex.c 4c4 < * $Header: /cvs/src/src/binutils/Attic/syslex.c,v 1.1.4.1 2001/03/12 15:40:37 pb Exp $ --- > * $Header: /cvs/src/src/binutils/Attic/syslex.c,v 1.1.4.2 2001/06/10 15:37:28 pb Exp $ 416a417,435 > /* Copyright 2001 Free Software Foundation, Inc. > > This file is part of GLD, the Gnu Linker. > > GLD 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, or (at your option) > any later version. > > GLD 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 GLD; see the file COPYING. If not, write to the Free > Software Foundation, 59 Temple Place - Suite 330, Boston, MA > 02111-1307, USA. */ > 425c444 < #line 426 "lex.yy.c" --- > #line 445 "lex.yy.c" 576c595 < #line 11 "syslex.l" --- > #line 30 "syslex.l" 578c597 < #line 579 "lex.yy.c" --- > #line 598 "lex.yy.c" 663c682 < #line 12 "syslex.l" --- > #line 31 "syslex.l" 668c687 < #line 13 "syslex.l" --- > #line 32 "syslex.l" 673c692 < #line 14 "syslex.l" --- > #line 33 "syslex.l" 678c697 < #line 15 "syslex.l" --- > #line 34 "syslex.l" 683c702 < #line 16 "syslex.l" --- > #line 35 "syslex.l" 688c707 < #line 17 "syslex.l" --- > #line 36 "syslex.l" 693c712 < #line 18 "syslex.l" --- > #line 37 "syslex.l" 698c717 < #line 19 "syslex.l" --- > #line 38 "syslex.l" 703c722 < #line 20 "syslex.l" --- > #line 39 "syslex.l" 713c732 < #line 27 "syslex.l" --- > #line 46 "syslex.l" 721c740 < #line 32 "syslex.l" --- > #line 51 "syslex.l" 729c748 < #line 38 "syslex.l" --- > #line 57 "syslex.l" 734c753 < #line 39 "syslex.l" --- > #line 58 "syslex.l" 739c758 < #line 40 "syslex.l" --- > #line 59 "syslex.l" 744c763 < #line 41 "syslex.l" --- > #line 60 "syslex.l" 749c768 < #line 43 "syslex.l" --- > #line 62 "syslex.l" 754c773 < #line 44 "syslex.l" --- > #line 63 "syslex.l" 759c778 < #line 45 "syslex.l" --- > #line 64 "syslex.l" 764c783 < #line 46 "syslex.l" --- > #line 65 "syslex.l" 769c788 < #line 47 "syslex.l" --- > #line 66 "syslex.l" 774c793 < #line 48 "syslex.l" --- > #line 67 "syslex.l" 779c798 < #line 49 "syslex.l" --- > #line 68 "syslex.l" 784c803 < #line 50 "syslex.l" --- > #line 69 "syslex.l" 789c808 < #line 51 "syslex.l" --- > #line 70 "syslex.l" 794c813 < #line 52 "syslex.l" --- > #line 71 "syslex.l" 797c816 < #line 798 "lex.yy.c" --- > #line 817 "lex.yy.c" 1683c1702 < #line 52 "syslex.l" --- > #line 71 "syslex.l" diff -rN binutils-2.11/binutils/syslex.l binutils-2.11.2/binutils/syslex.l 1a2,20 > /* Copyright 2001 Free Software Foundation, Inc. > > This file is part of GLD, the Gnu Linker. > > GLD 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, or (at your option) > any later version. > > GLD 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 GLD; see the file COPYING. If not, write to the Free > Software Foundation, 59 Temple Place - Suite 330, Boston, MA > 02111-1307, USA. */ > diff -rN binutils-2.11/binutils/testsuite/ChangeLog binutils-2.11.2/binutils/testsuite/ChangeLog 0a1,36 > 2001-06-11 Alan Modra > > Merge from mainline. > 2001-06-07 H.J. Lu > * binutils-all/readelf.ss-mips: Support stabs. > * binutils-all/readelf.ss-tmips: Likewise. > > 2001-05-25 H.J. Lu > * binutils-all/readelf.exp (readelf_test): Set target_machine > to tmips for traditional mips. > * binutils-all/readelf.s: Support traditional mips. > * binutils-all/readelf.ss-tmips: New for traditional mips. > > 2001-05-25 Alan Modra > * binutils-all/readelf.exp: Replace linuxoldld with linux*oldld > and linuxaout with linux*aout. > * binutils-all/objcopy.exp: Remove xfail for linuxaout. > > 2001-03-30 H.J. Lu > * binutils-all/readelf.exp: Run on more ELF targets. > > 2001-02-11 H.J. Lu > * config/default.exp: Set up gcc_gas_flag. > * binutils-all/objcopy.exp (copy_setup): Process gcc_gas_flag > for Linux only. > * binutils-all/testprog.c: Include and don't use > exit (). > > 2001-06-07 Alan Modra > > * (binutils-all/ar.exp, binutils-all/nm.exp, > binutils-all/objcopy.exp, binutils-all/objdump.exp, > binutils-all/readelf.exp, binutils-all/size.exp, > binutils-all/hppa/objdump.exp, config/default.exp, > lib/utils-lib.exp): Update copyright notices. > diff -rN binutils-2.11/binutils/testsuite/binutils-all/ar.exp binutils-2.11.2/binutils/testsuite/binutils-all/ar.exp 1c1 < # Copyright (C) 1995, 1997 Free Software Foundation, Inc. --- > # Copyright 1995, 1997 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/testsuite/binutils-all/hppa/objdump.exp binutils-2.11.2/binutils/testsuite/binutils-all/hppa/objdump.exp 1c1,2 < # Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc. --- > # Copyright 1993, 1994, 1995, 1997, 1999, 2000 > # Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/testsuite/binutils-all/nm.exp binutils-2.11.2/binutils/testsuite/binutils-all/nm.exp 1c1 < # Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc. --- > # Copyright 1993, 1994, 1995, 1997 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/testsuite/binutils-all/objcopy.exp binutils-2.11.2/binutils/testsuite/binutils-all/objcopy.exp 1c1,2 < # Copyright (C) 1994, 95, 96, 97, 1998 Free Software Foundation, Inc. --- > # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 > # Free Software Foundation, Inc. 75c76 < setup_xfail "i*86-*-linuxaout*" "i*86-*-aout*" --- > setup_xfail "i*86-*-aout*" 400a402 > global gcc_gas_flag 411a414,418 > if { [istarget *-*-linux*] } { > foreach i $gcc_gas_flag { > set flags "additional_flags=$i $flags" > } > } diff -rN binutils-2.11/binutils/testsuite/binutils-all/objdump.exp binutils-2.11.2/binutils/testsuite/binutils-all/objdump.exp 1c1,2 < # Copyright (C) 1993, 1994, 1995, 1996, 2000 Free Software Foundation, Inc. --- > # Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 > # Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/testsuite/binutils-all/readelf.exp binutils-2.11.2/binutils/testsuite/binutils-all/readelf.exp 1c1 < # Copyright (C) 1999, 2000 Free Software Foundation, Inc. --- > # Copyright 1999, 2000 Free Software Foundation, Inc. 195c195,199 < set target_machine mips --- > if { [istarget mips*el-*-*] || [istarget "mips*-*-*linux*"] } then { > set target_machine tmips > } else { > set target_machine mips > } 221c225,238 < if ![istarget "*-*elf"] then { --- > if { ![istarget *-*-elf*] \ > && ![istarget *-*-linux*] \ > && ![istarget i?86-*-sysv4*] \ > && ![istarget i?86-*-unixware] \ > && ![istarget mips*-*-irix5*] \ > && ![istarget mips*-*-irix6*] \ > && ![istarget powerpc-*-sysv4*] \ > && ![istarget sparc*-*-solaris2*] } { > verbose "$READELF is only intended for ELF targets" 2 > return > } > > if { [istarget *-*-linux*oldld*] \ > || [istarget *-*-linux*aout*] } { 273c290 < readelf_test -wi $tempfile readelf.wi {v850*-*-* cris-*-*} --- > readelf_test -wi $tempfile readelf.wi {v850*-*-* cris-*-* *-*-linux*} diff -rN binutils-2.11/binutils/testsuite/binutils-all/readelf.s binutils-2.11.2/binutils/testsuite/binutils-all/readelf.s 6c6,8 < \[ 1\] .text PROGBITS 00000000 000034 000008 00 +AX +0 +0 +. --- > # On the normal MIPS systems, sections must be aligned to 16 byte > # boundaries. > \[ 1\] .text PROGBITS 00000000 0000(34|40) 0000(08|10) 00 +AX +0 +0 +(.|..) 10,11c12,13 < \[ .\] .data PROGBITS 00000000 00003c 000004 00 WA +0 +0 +. < \[ .\] .bss NOBITS 00000000 000040 000000 00 WA +0 +0 +. --- > \[ .\] .data PROGBITS 00000000 0000(3c|50) 0000(04|10) 00 WA +0 +0 +(.|..) > \[ .\] .bss NOBITS 00000000 0000(4|6)0 000000 00 WA +0 +0 +(.|..) diff -rN binutils-2.11/binutils/testsuite/binutils-all/readelf.ss-mips binutils-2.11.2/binutils/testsuite/binutils-all/readelf.ss-mips 15c15 < 11: 00000004 4 OBJECT GLOBAL DEFAULT PRC common_symbol --- > 11: 00000004 4 OBJECT GLOBAL DEFAULT (PRC|COM) common_symbol diff -rN binutils-2.11/binutils/testsuite/binutils-all/readelf.ss-tmips binutils-2.11.2/binutils/testsuite/binutils-all/readelf.ss-tmips 0a1,15 > > Symbol table '.symtab' contains 12 entries: > Num: Value Size Type Bind Vis Ndx Name > 0: 00000000 0 NOTYPE LOCAL DEFAULT UND > 1: 00000000 0 SECTION LOCAL DEFAULT 1 > 2: 00000000 0 SECTION LOCAL DEFAULT 4 > 3: 00000000 0 SECTION LOCAL DEFAULT 5 > 4: 00000000 0 NOTYPE LOCAL DEFAULT 1 static_text_symbol > 5: 00000000 0 NOTYPE LOCAL DEFAULT 4 static_data_symbol > 6: 00000000 0 SECTION LOCAL DEFAULT 6 > 7: 00000000 0 SECTION LOCAL DEFAULT 7 > 8: 00000000 0 OBJECT GLOBAL DEFAULT 1 text_symbol > 9: 00000000 0 NOTYPE GLOBAL DEFAULT UND external_symbol > 10: 00000000 0 OBJECT GLOBAL DEFAULT 4 data_symbol > 11: 00000004 4 OBJECT GLOBAL DEFAULT (PRC|COM) common_symbol diff -rN binutils-2.11/binutils/testsuite/binutils-all/readelf.wi binutils-2.11.2/binutils/testsuite/binutils-all/readelf.wi 3c3 < Compilation Unit: --- > Compilation Unit @ .*: diff -rN binutils-2.11/binutils/testsuite/binutils-all/size.exp binutils-2.11.2/binutils/testsuite/binutils-all/size.exp 1c1 < # Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc. --- > # Copyright 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/testsuite/binutils-all/testprog.c binutils-2.11.2/binutils/testsuite/binutils-all/testprog.c 3a4 > #include 25c26 < exit (1); --- > return (1); 29c30 < exit (0); --- > return (0); diff -rN binutils-2.11/binutils/testsuite/config/default.exp binutils-2.11.2/binutils/testsuite/config/default.exp 1c1,2 < # Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc. --- > # Copyright 1993, 1994, 1995, 1997, 1999, 2001 > # Free Software Foundation, Inc. 71a73,86 > > # Make a symlink from tmpdir/gas/as and tmpdir/gas/ld to the assembler > # and linker in the build tree, so that we can use a -B option to gcc > # to force it to use the newly built assembler/linker. > if {![file isdirectory tmpdir/gas]} then { > catch "exec mkdir tmpdir/gas" status > if {[file isfile ../gas/as-new]} then { > catch "exec ln -s ../../../gas/as-new tmpdir/gas/as" status > } > if {[file isfile ../ld/ld-new]} then { > catch "exec ln -s ../../../ld/ld-new tmpdir/gas/ld" status > } > } > set gcc_gas_flag "-B[pwd]/tmpdir/gas/" diff -rN binutils-2.11/binutils/testsuite/lib/utils-lib.exp binutils-2.11.2/binutils/testsuite/lib/utils-lib.exp 1c1,2 < # Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc. --- > # Copyright 1993, 1994, 1995, 1996, 1997, 2000 > # Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/unwind-ia64.c binutils-2.11.2/binutils/unwind-ia64.c 0a1,1108 > /* unwind-ia64.c -- utility routines to dump IA-64 unwind info for readelf. > Copyright 2000, 2001 Free Software Foundation, Inc. > Contributed by David Mosberger-Tang > > This file is part of GNU Binutils. > > 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, 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ > > #include "unwind-ia64.h" > #include > #include > > #if __GNUC__ >= 2 > /* Define BFD64 here, even if our default architecture is 32 bit ELF > as this will allow us to read in and parse 64bit and 32bit ELF files. > Only do this if we belive that the compiler can support a 64 bit > data type. For now we only rely on GCC being able to do this. */ > #define BFD64 > #endif > #include "bfd.h" > > static bfd_vma unw_rlen = 0; > > static void > unw_print_brmask (cp, mask) > char * cp; > unsigned char mask; > { > char *sep = ""; > int i; > > for (i = 0; mask && (i < 5); ++i) > { > if (mask & 1) > { > cp += sprintf (cp, "%sb%u", sep, i + 1); > sep = ","; > } > mask >>= 1; > } > *cp = '\0'; > } > > static void > unw_print_grmask (cp, mask) > char * cp; > unsigned char mask; > { > char *sep = ""; > int i; > > *cp = '\0'; > for (i = 0; i < 4; ++i) > { > if (mask & 1) > { > cp += sprintf (cp, "%sr%u", sep, i + 4); > sep = ","; > } > mask >>= 1; > } > } > > static void > unw_print_frmask (cp, mask) > char * cp; > unsigned long mask; > { > char *sep = ""; > int i; > > *cp = '\0'; > for (i = 0; i < 20; ++i) > { > if (mask & 1) > { > cp += sprintf (cp, "%sf%u", sep, (i < 4) ? (i + 2) : (i + 12)); > sep = ","; > } > mask >>= 1; > } > } > > static void > unw_print_abreg (cp, abreg) > char * cp; > unsigned char abreg; > { > static const char *special_reg[16] = > { > "pr", "psp", "@priunat", "rp", "ar.bsp", "ar.bspstore", "ar.rnat", > "ar.unat", "ar.fpsr", "ar.pfs", "ar.lc", > "Unknown11", "Unknown12", "Unknown13", "Unknown14", "Unknown15" > }; > > switch ((abreg >> 5) & 0x3) > { > case 0: /* gr */ > sprintf (cp, "r%u", (abreg & 0x1f)); > break; > > case 1: /* fr */ > sprintf (cp, "f%u", (abreg & 0x1f)); > break; > > case 2: /* br */ > sprintf (cp, "b%u", (abreg & 0x1f)); > break; > > case 3: /* special */ > strcpy (cp, special_reg[abreg & 0xf]); > break; > } > } > > static void > unw_print_xyreg (cp, x, ytreg) > char * cp; > unsigned char x; > unsigned char ytreg; > { > switch ((x << 1) | ((ytreg >> 7) & 1)) > { > case 0: /* gr */ > sprintf (cp, "r%u", (ytreg & 0x1f)); > break; > > case 1: /* fr */ > sprintf (cp, "f%u", (ytreg & 0x1f)); > break; > > case 2: /* br */ > sprintf (cp, "b%u", (ytreg & 0x1f)); > break; > } > } > > #define UNW_REG_BSP "bsp" > #define UNW_REG_BSPSTORE "bspstore" > #define UNW_REG_FPSR "fpsr" > #define UNW_REG_LC "lc" > #define UNW_REG_PFS "pfs" > #define UNW_REG_PR "pr" > #define UNW_REG_PSP "psp" > #define UNW_REG_RNAT "rnat" > #define UNW_REG_RP "rp" > #define UNW_REG_UNAT "unat" > > typedef bfd_vma unw_word; > > #define UNW_DEC_BAD_CODE(code) \ > printf ("Unknown code 0x%02x\n", code) > > #define UNW_DEC_PROLOGUE(fmt, body, rlen, arg) \ > do \ > { \ > unw_rlen = rlen; \ > *(int *)arg = body; \ > printf (" %s:%s(rlen=%lu)\n", \ > fmt, body ? "body" : "prologue", (unsigned long) rlen); \ > } \ > while (0) > > #define UNW_DEC_PROLOGUE_GR(fmt, rlen, mask, grsave, arg) \ > do \ > { \ > char regname[16], maskstr[64], *sep; \ > \ > unw_rlen = rlen; \ > *(int *)arg = 0; \ > \ > maskstr[0] = '\0'; \ > sep = ""; \ > if (mask & 0x8) \ > { \ > strcat (maskstr, "rp"); \ > sep = ","; \ > } \ > if (mask & 0x4) \ > { \ > strcat (maskstr, sep); \ > strcat (maskstr, "ar.pfs"); \ > sep = ","; \ > } \ > if (mask & 0x2) \ > { \ > strcat (maskstr, sep); \ > strcat (maskstr, "psp"); \ > sep = ","; \ > } \ > if (mask & 0x1) \ > { \ > strcat (maskstr, sep); \ > strcat (maskstr, "pr"); \ > } \ > sprintf (regname, "r%u", grsave); \ > printf (" %s:prologue_gr(mask=[%s],grsave=%s,rlen=%lu)\n", \ > fmt, maskstr, regname, (unsigned long) rlen); \ > } \ > while (0) > > #define UNW_DEC_FR_MEM(fmt, frmask, arg) \ > do \ > { \ > char frstr[200]; \ > \ > unw_print_frmask (frstr, frmask); \ > printf ("\t%s:fr_mem(frmask=[%s])\n", fmt, frstr); \ > } \ > while (0) > > #define UNW_DEC_GR_MEM(fmt, grmask, arg) \ > do \ > { \ > char grstr[200]; \ > \ > unw_print_grmask (grstr, grmask); \ > printf ("\t%s:gr_mem(grmask=[%s])\n", fmt, grstr); \ > } \ > while (0) > > #define UNW_DEC_FRGR_MEM(fmt, grmask, frmask, arg) \ > do \ > { \ > char frstr[200], grstr[20]; \ > \ > unw_print_grmask (grstr, grmask); \ > unw_print_frmask (frstr, frmask); \ > printf ("\t%s:frgr_mem(grmask=[%s],frmask=[%s])\n", fmt, grstr, frstr); \ > } \ > while (0) > > #define UNW_DEC_BR_MEM(fmt, brmask, arg) \ > do \ > { \ > char brstr[20]; \ > \ > unw_print_brmask (brstr, brmask); \ > printf ("\t%s:br_mem(brmask=[%s])\n", fmt, brstr); \ > } \ > while (0) > > #define UNW_DEC_BR_GR(fmt, brmask, gr, arg) \ > do \ > { \ > char brstr[20]; \ > \ > unw_print_brmask (brstr, brmask); \ > printf ("\t%s:br_gr(brmask=[%s],gr=r%u)\n", fmt, brstr, gr); \ > } \ > while (0) > > #define UNW_DEC_REG_GR(fmt, src, dst, arg) \ > printf ("\t%s:%s_gr(reg=r%u)\n", fmt, src, dst) > > #define UNW_DEC_RP_BR(fmt, dst, arg) \ > printf ("\t%s:rp_br(reg=b%u)\n", fmt, dst) > > #define UNW_DEC_REG_WHEN(fmt, reg, t, arg) \ > printf ("\t%s:%s_when(t=%lu)\n", fmt, reg, (unsigned long) t) > > #define UNW_DEC_REG_SPREL(fmt, reg, spoff, arg) \ > printf ("\t%s:%s_sprel(spoff=0x%lx)\n", \ > fmt, reg, 4*(unsigned long)spoff) > > #define UNW_DEC_REG_PSPREL(fmt, reg, pspoff, arg) \ > printf ("\t%s:%s_psprel(pspoff=0x10-0x%lx)\n", \ > fmt, reg, 4*(unsigned long)pspoff) > > #define UNW_DEC_GR_GR(fmt, grmask, gr, arg) \ > do \ > { \ > char grstr[20]; \ > \ > unw_print_grmask (grstr, grmask); \ > printf ("\t%s:gr_gr(grmask=[%s],r%u)\n", fmt, grstr, gr); \ > } \ > while (0) > > #define UNW_DEC_ABI(fmt, abi, context, arg) \ > do \ > { \ > static const char *abiname[] = \ > { \ > "@svr4", "@hpux", "@nt" \ > }; \ > char buf[20]; \ > const char *abistr = buf; \ > \ > if (abi < 3) \ > abistr = abiname[abi]; \ > else \ > sprintf (buf, "0x%x", abi); \ > printf ("\t%s:unwabi(abi=%s,context=0x%02x)\n", \ > fmt, abistr, context); \ > } \ > while (0) > > #define UNW_DEC_PRIUNAT_GR(fmt, r, arg) \ > printf ("\t%s:priunat_gr(reg=r%u)\n", fmt, r) > > #define UNW_DEC_PRIUNAT_WHEN_GR(fmt, t, arg) \ > printf ("\t%s:priunat_when_gr(t=%lu)\n", fmt, (unsigned long) t) > > #define UNW_DEC_PRIUNAT_WHEN_MEM(fmt, t, arg) \ > printf ("\t%s:priunat_when_mem(t=%lu)\n", fmt, (unsigned long) t) > > #define UNW_DEC_PRIUNAT_PSPREL(fmt, pspoff, arg) \ > printf ("\t%s:priunat_psprel(pspoff=0x10-0x%lx)\n", \ > fmt, 4*(unsigned long)pspoff) > > #define UNW_DEC_PRIUNAT_SPREL(fmt, spoff, arg) \ > printf ("\t%s:priunat_sprel(spoff=0x%lx)\n", \ > fmt, 4*(unsigned long)spoff) > > #define UNW_DEC_MEM_STACK_F(fmt, t, size, arg) \ > printf ("\t%s:mem_stack_f(t=%lu,size=%lu)\n", \ > fmt, (unsigned long) t, 16*(unsigned long)size) > > #define UNW_DEC_MEM_STACK_V(fmt, t, arg) \ > printf ("\t%s:mem_stack_v(t=%lu)\n", fmt, (unsigned long) t) > > #define UNW_DEC_SPILL_BASE(fmt, pspoff, arg) \ > printf ("\t%s:spill_base(pspoff=0x10-0x%lx)\n", \ > fmt, 4*(unsigned long)pspoff) > > #define UNW_DEC_SPILL_MASK(fmt, dp, arg) \ > do \ > { \ > static const char * spill_type = "-frb"; \ > unsigned const char * imaskp = dp; \ > unsigned char mask = 0; \ > bfd_vma insn = 0; \ > \ > printf ("\t%s:spill_mask(imask=[", fmt); \ > for (insn = 0; insn < unw_rlen; ++insn) \ > { \ > if ((insn % 4) == 0) \ > mask = *imaskp++; \ > if (insn > 0 && (insn % 3) == 0) \ > putchar (','); \ > putchar (spill_type[(mask >> (2 * (3 - (insn & 0x3)))) & 0x3]); \ > } \ > printf ("])\n"); \ > dp = imaskp; \ > } \ > while (0) > > #define UNW_DEC_SPILL_SPREL(fmt, t, abreg, spoff, arg) \ > do \ > { \ > char regname[10]; \ > \ > unw_print_abreg (regname, abreg); \ > printf ("\t%s:spill_sprel(reg=%s,t=%lu,spoff=0x%lx)\n", \ > fmt, regname, (unsigned long) t, 4*(unsigned long)off); \ > } \ > while (0) > > #define UNW_DEC_SPILL_PSPREL(fmt, t, abreg, pspoff, arg) \ > do \ > { \ > char regname[10]; \ > \ > unw_print_abreg (regname, abreg); \ > printf ("\t%s:spill_psprel(reg=%s,t=%lu,pspoff=0x10-0x%lx)\n", \ > fmt, regname, (unsigned long) t, 4*(unsigned long)pspoff); \ > } \ > while (0) > > #define UNW_DEC_RESTORE(fmt, t, abreg, arg) \ > do \ > { \ > char regname[10]; \ > \ > unw_print_abreg (regname, abreg); \ > printf ("\t%s:restore(t=%lu,reg=%s)\n", \ > fmt, (unsigned long) t, regname); \ > } \ > while (0) > > #define UNW_DEC_SPILL_REG(fmt, t, abreg, x, ytreg, arg) \ > do \ > { \ > char abregname[10], tregname[10]; \ > \ > unw_print_abreg (abregname, abreg); \ > unw_print_xyreg (tregname, x, ytreg); \ > printf ("\t%s:spill_reg(t=%lu,reg=%s,treg=%s)\n", \ > fmt, (unsigned long) t, abregname, tregname); \ > } \ > while (0) > > #define UNW_DEC_SPILL_SPREL_P(fmt, qp, t, abreg, spoff, arg) \ > do \ > { \ > char regname[20]; \ > \ > unw_print_abreg (regname, abreg); \ > printf ("\t%s:spill_sprel_p(qp=p%u,t=%lu,reg=%s,spoff=0x%lx)\n", \ > fmt, qp, (unsigned long) t, regname, 4 * (unsigned long)spoff); \ > } \ > while (0) > > #define UNW_DEC_SPILL_PSPREL_P(fmt, qp, t, abreg, pspoff, arg) \ > do \ > { \ > char regname[20]; \ > \ > unw_print_abreg (regname, abreg); \ > printf ("\t%s:spill_psprel_p(qp=p%u,t=%lu,reg=%s,pspoff=0x10-0x%lx)\n",\ > fmt, qp, (unsigned long) t, regname, 4*(unsigned long)pspoff);\ > } \ > while (0) > > #define UNW_DEC_RESTORE_P(fmt, qp, t, abreg, arg) \ > do \ > { \ > char regname[20]; \ > \ > unw_print_abreg (regname, abreg); \ > printf ("\t%s:restore_p(qp=p%u,t=%lu,reg=%s)\n", \ > fmt, qp, (unsigned long) t, regname); \ > } \ > while (0) > > #define UNW_DEC_SPILL_REG_P(fmt, qp, t, abreg, x, ytreg, arg) \ > do \ > { \ > char regname[20], tregname[20]; \ > \ > unw_print_abreg (regname, abreg); \ > unw_print_xyreg (tregname, x, ytreg); \ > printf ("\t%s:spill_reg_p(qp=p%u,t=%lu,reg=%s,treg=%s)\n", \ > fmt, qp, (unsigned long) t, regname, tregname); \ > } \ > while (0) > > #define UNW_DEC_LABEL_STATE(fmt, label, arg) \ > printf ("\t%s:label_state(label=%lu)\n", fmt, (unsigned long) label) > > #define UNW_DEC_COPY_STATE(fmt, label, arg) \ > printf ("\t%s:copy_state(label=%lu)\n", fmt, (unsigned long) label) > > #define UNW_DEC_EPILOGUE(fmt, t, ecount, arg) \ > printf ("\t%s:epilogue(t=%lu,ecount=%lu)\n", \ > fmt, (unsigned long) t, (unsigned long) ecount) > > /* > * Generic IA-64 unwind info decoder. > * > * This file is used both by the Linux kernel and objdump. Please > * keep the two copies of this file in sync (modulo differences in the > * prototypes...). > * > * You need to customize the decoder by defining the following > * macros/constants before including this file: > * > * Types: > * unw_word Unsigned integer type with at least 64 bits > * > * Register names: > * UNW_REG_BSP > * UNW_REG_BSPSTORE > * UNW_REG_FPSR > * UNW_REG_LC > * UNW_REG_PFS > * UNW_REG_PR > * UNW_REG_RNAT > * UNW_REG_PSP > * UNW_REG_RP > * UNW_REG_UNAT > * > * Decoder action macros: > * UNW_DEC_BAD_CODE(code) > * UNW_DEC_ABI(fmt,abi,context,arg) > * UNW_DEC_BR_GR(fmt,brmask,gr,arg) > * UNW_DEC_BR_MEM(fmt,brmask,arg) > * UNW_DEC_COPY_STATE(fmt,label,arg) > * UNW_DEC_EPILOGUE(fmt,t,ecount,arg) > * UNW_DEC_FRGR_MEM(fmt,grmask,frmask,arg) > * UNW_DEC_FR_MEM(fmt,frmask,arg) > * UNW_DEC_GR_GR(fmt,grmask,gr,arg) > * UNW_DEC_GR_MEM(fmt,grmask,arg) > * UNW_DEC_LABEL_STATE(fmt,label,arg) > * UNW_DEC_MEM_STACK_F(fmt,t,size,arg) > * UNW_DEC_MEM_STACK_V(fmt,t,arg) > * UNW_DEC_PRIUNAT_GR(fmt,r,arg) > * UNW_DEC_PRIUNAT_WHEN_GR(fmt,t,arg) > * UNW_DEC_PRIUNAT_WHEN_MEM(fmt,t,arg) > * UNW_DEC_PRIUNAT_WHEN_PSPREL(fmt,pspoff,arg) > * UNW_DEC_PRIUNAT_WHEN_SPREL(fmt,spoff,arg) > * UNW_DEC_PROLOGUE(fmt,body,rlen,arg) > * UNW_DEC_PROLOGUE_GR(fmt,rlen,mask,grsave,arg) > * UNW_DEC_REG_PSPREL(fmt,reg,pspoff,arg) > * UNW_DEC_REG_REG(fmt,src,dst,arg) > * UNW_DEC_REG_SPREL(fmt,reg,spoff,arg) > * UNW_DEC_REG_WHEN(fmt,reg,t,arg) > * UNW_DEC_RESTORE(fmt,t,abreg,arg) > * UNW_DEC_RESTORE_P(fmt,qp,t,abreg,arg) > * UNW_DEC_SPILL_BASE(fmt,pspoff,arg) > * UNW_DEC_SPILL_MASK(fmt,imaskp,arg) > * UNW_DEC_SPILL_PSPREL(fmt,t,abreg,pspoff,arg) > * UNW_DEC_SPILL_PSPREL_P(fmt,qp,t,abreg,pspoff,arg) > * UNW_DEC_SPILL_REG(fmt,t,abreg,x,ytreg,arg) > * UNW_DEC_SPILL_REG_P(fmt,qp,t,abreg,x,ytreg,arg) > * UNW_DEC_SPILL_SPREL(fmt,t,abreg,spoff,arg) > * UNW_DEC_SPILL_SPREL_P(fmt,qp,t,abreg,pspoff,arg) > */ > > static unw_word unw_decode_uleb128 PARAMS ((const unsigned char **)); > static const unsigned char *unw_decode_x1 PARAMS ((const unsigned char *, > unsigned char, void *)); > static const unsigned char *unw_decode_x2 PARAMS ((const unsigned char *, > unsigned char, void *)); > static const unsigned char *unw_decode_x3 PARAMS ((const unsigned char *, > unsigned char, void *)); > static const unsigned char *unw_decode_x4 PARAMS ((const unsigned char *, > unsigned char, void *)); > static const unsigned char *unw_decode_r1 PARAMS ((const unsigned char *, > unsigned char, void *)); > static const unsigned char *unw_decode_r2 PARAMS ((const unsigned char *, > unsigned char, void *)); > static const unsigned char *unw_decode_r3 PARAMS ((const unsigned char *, > unsigned char, void *)); > static const unsigned char *unw_decode_p1 PARAMS ((const unsigned char *, > unsigned char, void *)); > static const unsigned char *unw_decode_p2_p5 PARAMS ((const unsigned char *, > unsigned char, void *)); > static const unsigned char *unw_decode_p6 PARAMS ((const unsigned char *, > unsigned char, void *)); > static const unsigned char *unw_decode_p7_p10 PARAMS ((const unsigned char *, > unsigned char, void *)); > static const unsigned char *unw_decode_b1 PARAMS ((const unsigned char *, > unsigned char, void *)); > static const unsigned char *unw_decode_b2 PARAMS ((const unsigned char *, > unsigned char, void *)); > static const unsigned char *unw_decode_b3_x4 PARAMS ((const unsigned char *, > unsigned char, void *)); > > static unw_word > unw_decode_uleb128 (dpp) > const unsigned char **dpp; > { > unsigned shift = 0; > unw_word byte, result = 0; > const unsigned char *bp = *dpp; > > while (1) > { > byte = *bp++; > result |= (byte & 0x7f) << shift; > > if ((byte & 0x80) == 0) > break; > > shift += 7; > } > > *dpp = bp; > > return result; > } > > static const unsigned char * > unw_decode_x1 (dp, code, arg) > const unsigned char * dp; > unsigned char code; > void * arg ATTRIBUTE_UNUSED; > { > unsigned char byte1, abreg; > unw_word t, off; > > byte1 = *dp++; > t = unw_decode_uleb128 (&dp); > off = unw_decode_uleb128 (&dp); > abreg = (byte1 & 0x7f); > if (byte1 & 0x80) > UNW_DEC_SPILL_SPREL ("X1", t, abreg, off, arg); > else > UNW_DEC_SPILL_PSPREL ("X1", t, abreg, off, arg); > return dp; > } > > static const unsigned char * > unw_decode_x2 (dp, code, arg) > const unsigned char * dp; > unsigned char code; > void * arg ATTRIBUTE_UNUSED; > { > unsigned char byte1, byte2, abreg, x, ytreg; > unw_word t; > > byte1 = *dp++; > byte2 = *dp++; > t = unw_decode_uleb128 (&dp); > abreg = (byte1 & 0x7f); > ytreg = byte2; > x = (byte1 >> 7) & 1; > if ((byte1 & 0x80) == 0 && ytreg == 0) > UNW_DEC_RESTORE ("X2", t, abreg, arg); > else > UNW_DEC_SPILL_REG ("X2", t, abreg, x, ytreg, arg); > return dp; > } > > static const unsigned char * > unw_decode_x3 (dp, code, arg) > const unsigned char * dp; > unsigned char code; > void * arg ATTRIBUTE_UNUSED; > { > unsigned char byte1, byte2, abreg, qp; > unw_word t, off; > > byte1 = *dp++; > byte2 = *dp++; > t = unw_decode_uleb128 (&dp); > off = unw_decode_uleb128 (&dp); > > qp = (byte1 & 0x3f); > abreg = (byte2 & 0x7f); > > if (byte1 & 0x80) > UNW_DEC_SPILL_SPREL_P ("X3", qp, t, abreg, off, arg); > else > UNW_DEC_SPILL_PSPREL_P ("X3", qp, t, abreg, off, arg); > return dp; > } > > static const unsigned char * > unw_decode_x4 (dp, code, arg) > const unsigned char * dp; > unsigned char code; > void * arg ATTRIBUTE_UNUSED; > { > unsigned char byte1, byte2, byte3, qp, abreg, x, ytreg; > unw_word t; > > byte1 = *dp++; > byte2 = *dp++; > byte3 = *dp++; > t = unw_decode_uleb128 (&dp); > > qp = (byte1 & 0x3f); > abreg = (byte2 & 0x7f); > x = (byte2 >> 7) & 1; > ytreg = byte3; > > if ((byte2 & 0x80) == 0 && byte3 == 0) > UNW_DEC_RESTORE_P ("X4", qp, t, abreg, arg); > else > UNW_DEC_SPILL_REG_P ("X4", qp, t, abreg, x, ytreg, arg); > return dp; > } > > static const unsigned char * > unw_decode_r1 (dp, code, arg) > const unsigned char *dp; > unsigned char code; > void *arg; > { > int body = (code & 0x20) != 0; > unw_word rlen; > > rlen = (code & 0x1f); > UNW_DEC_PROLOGUE ("R1", body, rlen, arg); > return dp; > } > > static const unsigned char * > unw_decode_r2 (dp, code, arg) > const unsigned char *dp; > unsigned char code; > void *arg; > { > unsigned char byte1, mask, grsave; > unw_word rlen; > > byte1 = *dp++; > > mask = ((code & 0x7) << 1) | ((byte1 >> 7) & 1); > grsave = (byte1 & 0x7f); > rlen = unw_decode_uleb128 (& dp); > UNW_DEC_PROLOGUE_GR ("R2", rlen, mask, grsave, arg); > return dp; > } > > static const unsigned char * > unw_decode_r3 (dp, code, arg) > const unsigned char *dp; > unsigned char code; > void *arg; > { > unw_word rlen; > > rlen = unw_decode_uleb128 (& dp); > UNW_DEC_PROLOGUE ("R3", ((code & 0x3) == 1), rlen, arg); > return dp; > } > > static const unsigned char * > unw_decode_p1 (dp, code, arg) > const unsigned char * dp; > unsigned char code; > void * arg ATTRIBUTE_UNUSED; > { > unsigned char brmask = (code & 0x1f); > > UNW_DEC_BR_MEM ("P1", brmask, arg); > return dp; > } > > static const unsigned char * > unw_decode_p2_p5 (dp, code, arg) > const unsigned char * dp; > unsigned char code; > void * arg ATTRIBUTE_UNUSED; > { > if ((code & 0x10) == 0) > { > unsigned char byte1 = *dp++; > > UNW_DEC_BR_GR ("P2", ((code & 0xf) << 1) | ((byte1 >> 7) & 1), > (byte1 & 0x7f), arg); > } > else if ((code & 0x08) == 0) > { > unsigned char byte1 = *dp++, r, dst; > > r = ((code & 0x7) << 1) | ((byte1 >> 7) & 1); > dst = (byte1 & 0x7f); > switch (r) > { > case 0: > UNW_DEC_REG_GR ("P3", UNW_REG_PSP, dst, arg); > break; > case 1: > UNW_DEC_REG_GR ("P3", UNW_REG_RP, dst, arg); > break; > case 2: > UNW_DEC_REG_GR ("P3", UNW_REG_PFS, dst, arg); > break; > case 3: > UNW_DEC_REG_GR ("P3", UNW_REG_PR, dst, arg); > break; > case 4: > UNW_DEC_REG_GR ("P3", UNW_REG_UNAT, dst, arg); > break; > case 5: > UNW_DEC_REG_GR ("P3", UNW_REG_LC, dst, arg); > break; > case 6: > UNW_DEC_RP_BR ("P3", dst, arg); > break; > case 7: > UNW_DEC_REG_GR ("P3", UNW_REG_RNAT, dst, arg); > break; > case 8: > UNW_DEC_REG_GR ("P3", UNW_REG_BSP, dst, arg); > break; > case 9: > UNW_DEC_REG_GR ("P3", UNW_REG_BSPSTORE, dst, arg); > break; > case 10: > UNW_DEC_REG_GR ("P3", UNW_REG_FPSR, dst, arg); > break; > case 11: > UNW_DEC_PRIUNAT_GR ("P3", dst, arg); > break; > default: > UNW_DEC_BAD_CODE (r); > break; > } > } > else if ((code & 0x7) == 0) > UNW_DEC_SPILL_MASK ("P4", dp, arg); > else if ((code & 0x7) == 1) > { > unw_word grmask, frmask, byte1, byte2, byte3; > > byte1 = *dp++; > byte2 = *dp++; > byte3 = *dp++; > grmask = ((byte1 >> 4) & 0xf); > frmask = ((byte1 & 0xf) << 16) | (byte2 << 8) | byte3; > UNW_DEC_FRGR_MEM ("P5", grmask, frmask, arg); > } > else > UNW_DEC_BAD_CODE (code); > > return dp; > } > > static const unsigned char * > unw_decode_p6 (dp, code, arg) > const unsigned char * dp; > unsigned char code; > void * arg ATTRIBUTE_UNUSED; > { > int gregs = (code & 0x10) != 0; > unsigned char mask = (code & 0x0f); > > if (gregs) > UNW_DEC_GR_MEM ("P6", mask, arg); > else > UNW_DEC_FR_MEM ("P6", mask, arg); > return dp; > } > > static const unsigned char * > unw_decode_p7_p10 (dp, code, arg) > const unsigned char *dp; > unsigned char code; > void *arg; > { > unsigned char r, byte1, byte2; > unw_word t, size; > > if ((code & 0x10) == 0) > { > r = (code & 0xf); > t = unw_decode_uleb128 (&dp); > switch (r) > { > case 0: > size = unw_decode_uleb128 (&dp); > UNW_DEC_MEM_STACK_F ("P7", t, size, arg); > break; > > case 1: > UNW_DEC_MEM_STACK_V ("P7", t, arg); > break; > case 2: > UNW_DEC_SPILL_BASE ("P7", t, arg); > break; > case 3: > UNW_DEC_REG_SPREL ("P7", UNW_REG_PSP, t, arg); > break; > case 4: > UNW_DEC_REG_WHEN ("P7", UNW_REG_RP, t, arg); > break; > case 5: > UNW_DEC_REG_PSPREL ("P7", UNW_REG_RP, t, arg); > break; > case 6: > UNW_DEC_REG_WHEN ("P7", UNW_REG_PFS, t, arg); > break; > case 7: > UNW_DEC_REG_PSPREL ("P7", UNW_REG_PFS, t, arg); > break; > case 8: > UNW_DEC_REG_WHEN ("P7", UNW_REG_PR, t, arg); > break; > case 9: > UNW_DEC_REG_PSPREL ("P7", UNW_REG_PR, t, arg); > break; > case 10: > UNW_DEC_REG_WHEN ("P7", UNW_REG_LC, t, arg); > break; > case 11: > UNW_DEC_REG_PSPREL ("P7", UNW_REG_LC, t, arg); > break; > case 12: > UNW_DEC_REG_WHEN ("P7", UNW_REG_UNAT, t, arg); > break; > case 13: > UNW_DEC_REG_PSPREL ("P7", UNW_REG_UNAT, t, arg); > break; > case 14: > UNW_DEC_REG_WHEN ("P7", UNW_REG_FPSR, t, arg); > break; > case 15: > UNW_DEC_REG_PSPREL ("P7", UNW_REG_FPSR, t, arg); > break; > default: > UNW_DEC_BAD_CODE (r); > break; > } > } > else > { > switch (code & 0xf) > { > case 0x0: /* p8 */ > { > r = *dp++; > t = unw_decode_uleb128 (&dp); > switch (r) > { > case 1: > UNW_DEC_REG_SPREL ("P8", UNW_REG_RP, t, arg); > break; > case 2: > UNW_DEC_REG_SPREL ("P8", UNW_REG_PFS, t, arg); > break; > case 3: > UNW_DEC_REG_SPREL ("P8", UNW_REG_PR, t, arg); > break; > case 4: > UNW_DEC_REG_SPREL ("P8", UNW_REG_LC, t, arg); > break; > case 5: > UNW_DEC_REG_SPREL ("P8", UNW_REG_UNAT, t, arg); > break; > case 6: > UNW_DEC_REG_SPREL ("P8", UNW_REG_FPSR, t, arg); > break; > case 7: > UNW_DEC_REG_WHEN ("P8", UNW_REG_BSP, t, arg); > break; > case 8: > UNW_DEC_REG_PSPREL ("P8", UNW_REG_BSP, t, arg); > break; > case 9: > UNW_DEC_REG_SPREL ("P8", UNW_REG_BSP, t, arg); > break; > case 10: > UNW_DEC_REG_WHEN ("P8", UNW_REG_BSPSTORE, t, arg); > break; > case 11: > UNW_DEC_REG_PSPREL ("P8", UNW_REG_BSPSTORE, t, arg); > break; > case 12: > UNW_DEC_REG_SPREL ("P8", UNW_REG_BSPSTORE, t, arg); > break; > case 13: > UNW_DEC_REG_WHEN ("P8", UNW_REG_RNAT, t, arg); > break; > case 14: > UNW_DEC_REG_PSPREL ("P8", UNW_REG_RNAT, t, arg); > break; > case 15: > UNW_DEC_REG_SPREL ("P8", UNW_REG_RNAT, t, arg); > break; > case 16: > UNW_DEC_PRIUNAT_WHEN_GR ("P8", t, arg); > break; > case 17: > UNW_DEC_PRIUNAT_PSPREL ("P8", t, arg); > break; > case 18: > UNW_DEC_PRIUNAT_SPREL ("P8", t, arg); > break; > case 19: > UNW_DEC_PRIUNAT_WHEN_MEM ("P8", t, arg); > break; > default: > UNW_DEC_BAD_CODE (r); > break; > } > } > break; > > case 0x1: > byte1 = *dp++; > byte2 = *dp++; > UNW_DEC_GR_GR ("P9", (byte1 & 0xf), (byte2 & 0x7f), arg); > break; > > case 0xf: /* p10 */ > byte1 = *dp++; > byte2 = *dp++; > UNW_DEC_ABI ("P10", byte1, byte2, arg); > break; > > case 0x9: > return unw_decode_x1 (dp, code, arg); > > case 0xa: > return unw_decode_x2 (dp, code, arg); > > case 0xb: > return unw_decode_x3 (dp, code, arg); > > case 0xc: > return unw_decode_x4 (dp, code, arg); > > default: > UNW_DEC_BAD_CODE (code); > break; > } > } > return dp; > } > > static const unsigned char * > unw_decode_b1 (dp, code, arg) > const unsigned char * dp; > unsigned char code; > void * arg ATTRIBUTE_UNUSED; > { > unw_word label = (code & 0x1f); > > if ((code & 0x20) != 0) > UNW_DEC_COPY_STATE ("B1", label, arg); > else > UNW_DEC_LABEL_STATE ("B1", label, arg); > return dp; > } > > static const unsigned char * > unw_decode_b2 (dp, code, arg) > const unsigned char * dp; > unsigned char code; > void * arg ATTRIBUTE_UNUSED; > { > unw_word t; > > t = unw_decode_uleb128 (& dp); > UNW_DEC_EPILOGUE ("B2", t, (code & 0x1f), arg); > return dp; > } > > static const unsigned char * > unw_decode_b3_x4 (dp, code, arg) > const unsigned char *dp; > unsigned char code; > void *arg; > { > unw_word t, ecount, label; > > if ((code & 0x10) == 0) > { > t = unw_decode_uleb128 (&dp); > ecount = unw_decode_uleb128 (&dp); > UNW_DEC_EPILOGUE ("B3", t, ecount, arg); > } > else if ((code & 0x07) == 0) > { > label = unw_decode_uleb128 (&dp); > if ((code & 0x08) != 0) > UNW_DEC_COPY_STATE ("B4", label, arg); > else > UNW_DEC_LABEL_STATE ("B4", label, arg); > } > else > switch (code & 0x7) > { > case 1: > return unw_decode_x1 (dp, code, arg); > case 2: > return unw_decode_x2 (dp, code, arg); > case 3: > return unw_decode_x3 (dp, code, arg); > case 4: > return unw_decode_x4 (dp, code, arg); > default: > UNW_DEC_BAD_CODE (code); > break; > } > return dp; > } > > typedef const unsigned char *(*unw_decoder) > PARAMS ((const unsigned char *, unsigned char, void *)); > > static unw_decoder unw_decode_table[2][8] = > { > /* prologue table: */ > { > unw_decode_r1, /* 0 */ > unw_decode_r1, > unw_decode_r2, > unw_decode_r3, > unw_decode_p1, /* 4 */ > unw_decode_p2_p5, > unw_decode_p6, > unw_decode_p7_p10 > }, > { > unw_decode_r1, /* 0 */ > unw_decode_r1, > unw_decode_r2, > unw_decode_r3, > unw_decode_b1, /* 4 */ > unw_decode_b1, > unw_decode_b2, > unw_decode_b3_x4 > } > }; > > /* Decode one descriptor and return address of next descriptor. */ > const unsigned char * > unw_decode (dp, inside_body, ptr_inside_body) > const unsigned char * dp; > int inside_body; > void * ptr_inside_body; > { > unw_decoder decoder; > unsigned char code; > > code = *dp++; > decoder = unw_decode_table[inside_body][code >> 5]; > return (*decoder) (dp, code, ptr_inside_body); > } diff -rN binutils-2.11/binutils/unwind-ia64.h binutils-2.11.2/binutils/unwind-ia64.h 0a1,31 > /* unwind-ia64.h -- dump IA-64 unwind info. > Copyright 2000, 2001 Free Software Foundation, Inc. > Contributed by David Mosberger-Tang > > This file is part of GNU Binutils. > > 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, 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ > > #include > #include > > #define UNW_VER(x) ((x) >> 48) > #define UNW_FLAG_MASK 0x0000ffff00000000 > #define UNW_FLAG_OSMASK 0x0000f00000000000 > #define UNW_FLAG_EHANDLER(x) ((x) & 0x0000000100000000L) > #define UNW_FLAG_UHANDLER(x) ((x) & 0x0000000200000000L) > #define UNW_LENGTH(x) ((x) & 0x00000000ffffffffL) > > extern const unsigned char * unw_decode PARAMS ((const unsigned char *, int, void *)); diff -rN binutils-2.11/binutils/version.c binutils-2.11.2/binutils/version.c 2c2,3 < Copyright 1991, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. --- > Copyright 1991, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/windres.c binutils-2.11.2/binutils/windres.c 2c2 < Copyright 1997, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/windres.h binutils-2.11.2/binutils/windres.h 2c2 < Copyright 1997, 1998 Free Software Foundation, Inc. --- > Copyright 1997, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/binutils/wrstabs.c binutils-2.11.2/binutils/wrstabs.c 2c2 < Copyright (C) 1996, 97, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/COPYING binutils-2.11.2/gas/COPYING 4c4 < Copyright (C) 1989, 1991 Free Software Foundation, Inc. --- > Copyright 1989, 1991, 1997 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/ChangeLog binutils-2.11.2/gas/ChangeLog 0a1,570 > 2001-06-18 Philip Blundell > > * config/tc-arm.c (do_msr): Remove restriction on usage of > immediate operands. > > 2001-06-13 Philip Blundell > > * config/tc-arm.c (thumb_shift): Improve wording of error message. > (do_t_arit): Likewise. > > 2001-06-13 Nick Clifton > > * config/tc-sh.c (md_pseudo_table): Only intercept the .file and > .loc pseudos if the dfwarf2 functions are available. > (md_assemble): Only call dwarf2_emit_insn if it is available. > > 2001-06-13 Nick Clifton > > Merge from mainline: > 2001-05-11 Nick Clifton > * config/tc-arm.c (arm_handle_align): When truncating an aligned > block, ensure that the low order bits of the alignment are > preserved. > 2001-05-06 Nick Clifton > * config/tc-arm.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define. > * config/tc-arm.c (arm_handle_align): Do not insert more than > MAX_MEM_FOR_RS_ALIGN_CODE bytes. > (arm_frag_align_code): Use MAX_MEM_FOR_RS_ALIGN_CODE. > 2001-04-26 Nick Clifton > * config/tc-arm.c (arm_handle_align): New Function: Generate > no-op filled alignment frags. > (arm_frag_align_code): New Function: Create a code alignment frag. > (arm_init_frag): New Function: Initialse the target dependent > parts of a frag. > * config/tc-arm.h (TC_FRAG_TYPE): Define. > (TC_FRAG_INIT): Define. > (HANDLE_ALIGN): Define. > (md_do_align): Define. > 2001-03-12 Nick Clifton > * config/tc-arm.c (md_begin): Always set machine type based on > cpu_variant. > 2001-03-06 Nick Clifton > * config/tc-arm.c (md_apply_fix3): Clear bit zero of offset in > BLX(1) instruction. > > 2001-06-12 Nick Clifton > > * doc/as.texinfo (Infix Ops): Document that comparison and > combiner operators can be used as infix operators. > > 2001-06-12 Nick Clifton > > * config/tc-arm.c: Fix test for overlow of literal pool. > > 2001-06-11 Alan Modra > > Merge from mainline. > 2001-06-08 Alan Modra > * config/tc-mips.c (mips16_mark_labels): Reduce number of calls to > S_GET_VALUE by using a temp. > (append_insn): Likewise, and for S_SET_VALUE too. > (mips_emit_delays): Likewise. > (my_getExpression): Likewise. > (md_apply_fix): Likewise. Use "valueT" rather than "long" for "value". > (mips16_extended_frag): Cater for first relaxation pass having > bogus addresses. Use relax_marker to reliably determine whether a > symbol frag has been reached on the current pass. > > 2001-06-07 H.J. Lu > * configure.in: Use MIPS_STABS_ELF for Linux/mips. > * configure: Regenerate. > > 2001-06-07 H.J. Lu > * config/tc-mips.c (mips_pseudo_table): Add "extern" if > MIPS_STABS_ELF is defined. > > 2001-06-06 Christian Groessler > * config/tc-z8k.c: Removed many warnings by removing unused > variables and tagging unused parameters as such. > (md_begin): Fixed a typo (","instead of ";"). > (struct ctrl_table): Add parentheses to initialize array > correctly. > (struct flag_table): Likewise. > (struct intr_table): Likewise. > (struct table): Likewise. > (check_operand): "#if 0"'ed since it doesn't seem to be used. > > 2001-06-06 Peter Jakubek > * gas/config/tc-m68k.c (md_show_usage): Add all supported ColdFire > options to list (e.g. m5206e, m5307, m5407). > > 2001-06-06 Alan Modra > * config/tc-i386.c (md_assemble): Handle Pentium4 branch hints. > : Remove dead code. > > 2001-06-05 Nick Clifton > * symbols.c (S_SET_EXTERNAL): Do not override a section symbol's > status. > > 2001-05-27 Alan Modra > * config/tc-m68k.c (md_assemble): Ensure variable part of frag is > allocated in the same chunk as the fixed part. > > 2001-05-25 Alan Modra > * configure.in: Replace linuxoldld with linux*oldld. > * configure: Regenerate. > > 2000-05-24 Tom Rix > * config/obj-coff.c (add_lineno): xcoff allows negative line > numbers > * config/tc-ppc.c (ppc_stabx): fix generated symbol > > 2001-05-23 Thiemo Seufer > * config/tc-mips.c (ISA_HAS_64BIT_REGS): Add ISA_MIPS64 as 64 bit > architecture, remove erraneous ISA_MIPS32. > (md_show_usage): Add MIPS r12k support. > (mips_cpu_info_table): Add MIPS r12k support. > > 2001-05-22 Alan Modra > * config/tc-m68k.c (relaxable_symbol): Only treat external symbols > as relaxable if embedded system, make weak syms non-relaxable. > Move definition.. > (tc_m68k_fix_adjustable): ..so it can be used here. > (md_apply_fix_2): Sign extend without conditional. > > 2001-05-16 Jeff Johnston > * cgen.c (gas_cgen_tc_gen_reloc): Changed error message when > howto entry is not found. > > 2001-05-10 Alan Modra > * config/obj-vms.c (obj_crawl_symbol_chain): Don't take address of > symbol_next. > * config/tc-fr30.c (md_estimate_size_before_relax): Return size of > current variable part of frag. > * config/tc-m32r.c (md_estimate_size_before_relax): Likewise. > * config/tc-m68hc11.c (RELAX_STATE): Define. > (RELAX_LENGTH): Define. > (md_estimate_size_before_relax): Handle non-relaxable cases > separately from relaxable cases for clarity, and return correct > size for multi-pass relaxation. > * config/tc-tahoe.c (RELAX_LENGTH): Correct. > (md_estimate_size_before_relax): As for tc-m68hc11.c. > (md_convert_frag): Remove "length_code". > * config/tc-vax.c (RELAX_STATE): Define. > (RELAX_LENGTH): Define. > (md_relax_table): Add missing entry. > (md_estimate_size_before_relax): As for tc-m68hc11.c. > (md_convert_frag): Remove "length_code". > * config/tc-ns32k.c (md_estimate_size_before_relax): Simplify and > don't bother setting fr_var. Return correct size for multi-pass > relaxation. > * config/tc-h8500.c (md_convert_frag): Don't bother clearing fr_var. > (md_estimate_size_before_relax): No need to set fr_var. > * config/tc-mcore.c (md_convert_frag): Don't bother clearing fr_var. > (md_estimate_size_before_relax): No need to set fr_var. > > 2001-05-08 Andreas Schwab > * config/tc-m68k.c: Instead of replacing -1 by 64 in assignment to > fx_pcrel_adjust explicitly sign extend when reading it. > > 2001-05-03 Thiemo Seufer > * Makefile.am (TARG_ENV_HFILES): Add te-hppa64.h and te-hppalinux64.h. > Run "make dep-am". > * Makefile.in: Regenerate. > * configure.in: Remove duplicate mips-*-ecoff* entry. > * configure: Regenerate. > * config/obj-ecoff.c (obj_pseudo_table): Fix terminating entry. > (n_names): Cast away type mismatch. > (ecoff_sec_sym_ok_for_reloc): Add unused attribute. > (obj_ecoff_frob_symbol): Likewise. > * ecoff.c: (add_file): Add unused attribute. > (ecoff_directive_begin): Likewise. > (ecoff_directive_bend): Likewise. > (ecoff_directive_def): Likewise. > (ecoff_directive_dim): Likewise. > (ecoff_directive_scl): Likewise. > (ecoff_directive_size): Likewise. > (ecoff_directive_type): Likewise. > (ecoff_directive_tag): Likewise. > (ecoff_directive_val): Likewise. > (ecoff_directive_endef): Likewise. > (ecoff_directive_end): Likewise. > (ecoff_directive_ent): Likewise. > (ecoff_directive_extern): Likewise. > (ecoff_directive_file): Likewise. > (ecoff_directive_fmask): Likewise. > (ecoff_directive_frame): Likewise. > (ecoff_directive_mask): Likewise. > (ecoff_directive_loc): Likewise. > (mark_stabs): Likewise. > (ecoff_stab): Likewise. > (ecoff_frob_symbol): Cast away type mismatch. > (ecoff_padding_adjust): Likewise. > (ecoff_build_symbols): Likewise. > (ecoff_build_procs): Likewise. > (ecoff_build_aux): Likewise. > (ecoff_build_strings): Likewise. > (ecoff_build_fdr): Likewise. > (ecoff_build_debug): Likewise. > * itbl-ops.c (itbl_assemble): Variable initialization. > > 2001-04-29 Keith M Wesolowski > * config/tc-mips.c (md_parse_option): Also accept > elf64-tradbigmips and elf64-tradlittlemips for OPTION_64. > > 2001-04-27 Sean McNeil > * configure.in: Add arm-vxworks. > * configure: Regenerate. > > 2001-04-25 Nick Clifton > * config/obj-coff.c (do_linenos_for): Check to see if the filename > symbol has been initialised before extracting its symbol index. > > 2001-04-24 Christian Groessler > * config/tc-z8k.c (build_bytes): 12 and 16 bit displacements now > generate R_CALLR and R_REL16 relocations > > 2000-04-20 Jason Eckhardt > * config/tc-d10v.h (tc_frob_label): Update the symbol's frag > since frag_now can change after d10v_cleanup is called. > > 2001-04-12 Jason Merrill > * dwarf2dbg.c (process_entries): Don't optimize redundant line notes. > > 2001-04-07 Steven J. Hill > * config/tc-mips.c: Support ELF64 for traditional MIPS targets. > * Makefile.am: (TARG_ENV_HFILES): Add tc-mips.h. > * Makefile.in: Regenerated. > * configure.in: Use traditional MIPS targets for Linux/MIPS. > * configure: Regenerated. > > 2001-04-05 Alan Modra > * configure.in: Add h8500-*-coff and h8500-*-rtems targets. > * configure: Regenerate. > * config/tc-h8500.c (md_estimate_size_before_relax): Add missing > cases, and always return size based on current fr_subtype. > (md_begin): Move initialization of md_relax_table.. > (md_relax_table): ..to static initializer. Set rlx_length for > UNDEF_WORD_DISP cases. > * config/tc-w65.c (md_estimate_size_before_relax): Likewise. > (md_begin): Likewise. > (md_relax_table): Likewise. > * config/tc-mcore.c (md_estimate_size_before_relax): Likewise. > (md_relax_table): Set rlx_length for UNDEF_WORD_DISP cases. > Set rlx_backward and rlx_forward to zero for unused states. > * config/tc-sh.c (md_estimate_size_before_relax): Likewise. > (md_relax_table): Set rlx_length for UNDEF_WORD_DISP cases. > (UNCOND12, UNCOND32): Remove duplicate defines. > > 2001-03-30 Alan Modra > * dwarf2dbg.c (dwarf2_directive_file): Fix warnings. > > 2001-03-30 Alan Modra > * config/tc-sh.c (md_estimate_size_before_relax): Add extra > do-nothing cases to switch to avoid abort on a second relaxation > pass, and tidy code a little. > * config/tc-h8500.c (md_estimate_size_before_relax): Likewise. > * config/tc-w65.c (md_estimate_size_before_relax): Likewise. > * config/tc-mcore.c (COND12, UNCD12): Rename to DISP12 throughout. > (COND32, UNCD32): Rename to DISP32 throughout. > (UNDEF_WORD_DISP): Renumber to 3. > (md_estimate_size_before_relax): Add extra do-nothing cases. > * config/tc-mn10200.c (md_estimate_size_before_relax): Rewrite. > * config/tc-ns32k.c (md_estimate_size_before_relax): Add cases to > handle word and dword branches. > > 2001-03-17 Alan Modra > * read.c (do_org): Handle complex expressions. > * cgen.c (gas_cgen_finish_insn): Likewise. > > 2001-03-15 Alexandre Oliva > * config/tc-sh.c (parse_reg): Match capital MACH and MACL. > > 2001-03-06 Igor Shevlyakov > * config/tc-m68k.c : Add 5407 to archs[] table. > (HAVE_LONG_BRANCH): Add mcf5407. > (select_control_regs): Recognize 5407. > > 2001-03-02 Richard Sandiford > * config/atof-ieee.c (TC_LARGEST_EXPONENT_IS_NORMAL): New macro. > (gen_to_words): Print warnings if NaNs are found and the target CPU > does not support them. Allow largest exponent to be used in normal > numbers if TC_LARGEST_EXPONENT_IS_NORMAL evaluates to true. > > 2001-02-27 Alan Modra > * configure.in (BFD_VERSION): New. > (AM_INIT_AUTOMAKE): Use $BFD_VERSION. > * configure: Regenerate. > > 2001-02-26 Mark Elbrecht > * config/obj-coff.c [BFD_ASSEMBLER] (obj_coff_section): Set > SEC_NEVER_LOAD when the 'n' flag is used. > Add SEC_NEVER_LOAD to matchflags. > > 2001-02-24 Stephane Carrez > * symbols.c (decode_local_label_name): Initialize message_format > only when an error is reported (perf pb due to I18N). > > 2001-02-23 H.J. Lu > * dwarf2dbg.c (dwarf2_directive_file): Call s_app_file (0) if > BFD_ASSEMBLER is not defined. > > 2001-02-16 matthew green > * cgen.c (gas_cgen_md_apply_fix3): Support BFD_RELOC_64. > > 2001-02-11 Maciej W. Rozycki > * config/tc-mips.c (macro): For M_LA_AB emit a > BFD_RELOC_MIPS_CALL16 relocation or a > BFD_RELOC_MIPS_CALL_HI16/BFD_RELOC_MIPS_CALL_LO16 pair instead of > BFD_RELOC_MIPS_GOT16 and > BFD_RELOC_MIPS_GOT_HI16/BFD_RELOC_MIPS_GOT_LO16, respectively for > loading the jump register when generating SVR4_PIC code. > > 2001-02-10 Chris Demetriou > * configure.in: Make 'mipself' and 'mipsecoff' emulations > map to MIPS-specific files, as they used to do before the > change on 2000-05-21. > * configure: Regerate. > > 2001-02-10 Chris Demetriou > * config/tc-mips.c (md_parse_option): Don't try to compile > ELF-only option code if not ELF. > > 2001-06-10 Philip Blundell > > * configure.in: Set version to 2.11.1. > * configure: Regenerate. > > 2001-06-07 Alan Modra > > * Most files: Update copyright notices. > > 2001-06-06 Hans-Peter Nilsson > > * config/tc-cris.c (cris_insn_first_word_frag): New. > (md_assemble): Call cris_insn_first_word_frag to get the first > frag in an insn, not frag_more. Don't call dwarf2_emit_insn at > end. Drop variable insn_size. > (gen_bdap): Call cris_insn_first_word_frag, not frag_more. > > 2001-06-06 Nick Clifton > > * as.c (show_usage): Remove L from listing options. It is not a > generic option. > > 2001-06-06 Tracy Kuhrt > > * as.c (parse_args): Correct option name "listing-lhs-width2". > > 2001-05-30 Richard Henderson > > * read.c (emit_leb128_expr): Call md_cons_align. > > 2001-05-28 Jeff Sturm > > * config/tc-sparc.c (md_apply_fix3): Handle BFD_RELOC_SPARC_UA16, > BFD_RELOC_SPARC_UA32 and BFD_RELOC_SPARC_UA64. > (tc_gen_reloc): Likewise. > (sparc_cons_align): Don't clear sparc_no_align_cons. > (cons_fix_new_sparc): Substitute BFD_RELOC_SPARC_UA{16|32|64} for > BFD_RELOC_{16|32|64} iff sparc_no_align_cons is set. > > 2001-05-23 Alan Modra > > Merge from mainline. > 2001-05-22 Alan Modra > * config/tc-arc.c (md_assemble): Use is_end_of_line instead of > testing for NULs. > > 2001-05-16 Alan Modra > * config/tc-arc.c (md_assemble): Correct dwarf2_emit_insn param > for 8 byte insns. > * config/tc-i386.c (md_assemble): Call dwarf2_emit_insn before > opcodes are output rather than after. Delete insn_size. > * config/tc-v850.c (md_assemble): Similarly, but delete > total_insn_size. Update copyright. > > 2001-05-03 Alan Modra > * config/tc-i386.c (i386_displacement): Call as_bad for bad GOTOFF > expressions rather than triggering an assert. > > 2001-03-30 Alan Modra > * config/tc-i386.c (UNCOND_JUMP, COND_JUMP, COND_JUMP86): Decrement. > (md_relax_table): Remove first four unused entries. Increment > rlx_length by one throughout table, and update comments to suit. > (md_estimate_size_before_relax): Return size of current variable > part of frag to reflect reality when relaxing more than once. > > 2001-03-25 Alan Modra > * config/tc-i386.c (i386_scale): Accept an absolute expression for > scale factor, and return the end of the expression. > (i386_operand): Modify for above. > > 2001-03-13 Alan Modra > * config/tc-i386.c (RELOC_ENUM): Define. Use throughout file. > (NUM_FLAG_CODE): Define. > (lex_got): New function. > (got_reloc): New global var. > (x86_cons_fix_new): New function. > (x86_cons): New function. > (i386_immediate): Use lex_got here, replacing inline code. Change > "ignoring junk.." error message to "junk.." > (i386_displacement): Likewise. > * config/tc-i386.h (TC_PARSE_CONS_EXPRESSION): Define. > (x86_cons): Declare. > (TC_CONS_FIX_NEW): Define. > (x86_cons_fix_new): Declare. > > 2001-03-07 Alan Modra > * config/tc-i386.c (struct _i386_insn): Rename disp_reloc to reloc. > (md_assemble) : Use correct field of i.op[] > union. > : Use correct i.disp_reloc[]. > : Likewise. > > 2001-02-13 Alan Modra > * doc/c-i386.texi (i386-Arch): Add "jumps"/"nojumps" blurb. > Mention effect of < 386 architectures on jump promotion. > (i386-Jumps): xref above. Don't assume long disp is 32 bits. > > * config/tc-i386.c (no_cond_jump_promotion): New. > (set_cpu_arch): Parse "jumps" arch modifier. > (insn_size): Modify usage comment. > (ENCODE_RELAX_STATE): Reformat and protect macro arg. > (SIZE_FROM_RELAX_STATE): Rename to DISP_SIZE_FROM_RELAX_STATE. > (TYPE_FROM_RELAX_STATE): New define. > (UNCOND_JUMP, COND_JUMP): Renumber. > (md_relax_table): Reorder to suit. > (COND_JUMP86): New define. > (md_relax_table): Handle COND_JUMP86 cases. Add a few comments. > (md_assemble): Create frag var for jumps of max size, encode relax > state for COND_JUMP86. > (md_estimate_size_before_relax): Handle COND_JUMP86 cases, and > leave conditional jumps small if no_cond_jump_promotion. > (md_convert_frag): Likewise. > > 2001-05-10 Alan Modra > * config/tc-v850.c (md_estimate_size_before_relax): Rewrite. > (md_convert_frag): Don't bother clearing fr_var. > (md_pseudo_table): Correct initialization. > > 2001-05-12 Peter Targett > * config/tc-arc.c: Update copyright and tidy source comments. > (md_pseudo_table): Add directive .cpu back as an alias for > .option. Add .file and .line for dwarf2 support. > (arc_mach_type): Make bfd_mach_arc_6 default. > (md_longopts): Add entry 'pre-v6' representing old command line > option when assembling for 'arc5' core versions. > (md_parse_option): Make OPTION_ARC same as OPTION_ARC6, for new > default behaviour. > (arc_code_symbol): Make symbol value for @h30 fixup expression > equal to O_constant. > (md_assemble): Call dwarf2_emit_insn. > Include "dwarf2dbg2.h". Formatting fixes throughout file. > * config/tc-arc.h (DWARF2_LINE_MIN_INSN_LENGTH): Define. > * doc/c-arc.texi (ARC_CORE_DEFAULT): Update to new default. > > 2001-05-15 Alexandre Oliva > * config/tc-mn10300.c (mn10300_force_relocation): Don't > optimize differences between symbols in code sections to > constants. > (mn10300_fix_adjustable): Don't adjust to section+offset > relocations pointing at symbols in code sections. > > 2001-05-14 Alexandre Oliva > * config/tc-mn10300.c (md_assemble): Anchor dwarf2 line info > before a relaxable insns. > > 2001-05-13 Alexandre Oliva > * config/tc-mn10300.c (tc_gen_reloc): Don't reject differences > between symbols if the base symbol is in the current section; > emit a PC-relative relocation instead. > > 2001-05-09 Alexandre Oliva > * config/tc-mn10300.c (md_apply_fix3): Accept PC-relative relocs. > > 2001-05-06 Alexandre Oliva > * config/tc-mn10300.c (md_assemble): Subtract operand->shift > from offset in non-pcrel operands too. > > 2001-04-14 Alexandre Oliva > * config/tc-mn10300.c (md_assemble): Simplify offset adjustment of > pc-relative relocations not placed at the end of the instruction. > > 2001-04-06 Alexandre Oliva > * config/tc-mn10300.c (xr_registers): Added `pc'. > > 2001-03-30 Alan Modra > * config/tc-mn10300.c (md_estimate_size_before_relax): Rewrite. > > 2001-02-23 Richard Sandiford > * config/tc-mn10300.c (md_apply_fix3): Don't mark a fixup as > done if it's against a symbol. > > 2001-03-28 H.J. Lu > * read.c (equals): Set to local for COFF only if it hasn't been > defined before. > > 2001-03-27 Nick Papadonis > * read.c (equals): (for COFF) default symbols to being local. > > 2001-03-23 Richard Sandiford > * write.c (fix_new_exp): Print an error if passed a register. > > 2001-03-20 Alan Modra > * frags.h (struct frag): Add relax_marker. > * write.c (is_dnrange): Delete. > (relax_frag): Use correct types for `aim', `target', `address'. > Delete `offset', `was_address'. Test `relax_marker' instead of > using fragile (and slow) address test. > (relax_segment): Init and flip `relax_marker'. > > 2001-02-13 Ian Lance Taylor > * write.c (is_dnrange): Stop as soon as the address becomes > larger. > (relax_frag): Add segment parameter. Only call symbol_get_frag > once. Only call is_dnrange if the symbol is in the same segment, > and the symbol address is larger. > (relax_segment): Pass segment to md_relax_frag and relax_frag. > * write.h (relax_frag): Update declaration. > * config/tc-fr30.c (fr30_relax_frag): Add segment parameter. Pass > it to relax_frag. > * config/tc-m32r.c (m32r_relax_frag): Likewise. > * config/tc-m32r.h (md_relax_frag): Add segment parameter. > (m32r_relax_frag): Update declaration. > * config/tc-mips.h (md_relax_frag): Add segment parameter. > * config/tc-tic54x.h (md_relax_frag): Likewise. > * doc/internals.texi (CPU backend): Update documentation for > md_relax_frag. > > 2001-03-15 DJ Delorie > * stabs.c (s_stab_generic): Don't corrupt the notes obstack by > blindly freeing string if it isn't at the top of the obstack. > > 2001-05-14 Richard Henderson > > * ehopt.c (eh_frame_convert_frag): Fix missed subtype adjustment > last change. > > 2001-05-14 Richard Henderson > > * ehopt.c (get_cie_info): Rename from eh_frame_code_alignment; > also collect whether to expect an FDE augmentation. > (check_eh_frame): Rewrite as a state machine. Track where in > an FDE we are located, skip any augmentation. > (eh_frame_estimate_size_before_relax): Get code alignment from > the fragment subtype. > (eh_frame_relax_frag, eh_frame_convert_frag): Likewise. > * read.c (emit_leb128_expr): Call check_eh_frame. > > 2001-05-09 Richard Henderson > > * config/tc-ia64.c (generate_unwind_image): Align the fragment > beginning a function's unwind info block. > > 2001-04-27 David Mosberger > > * config/tc-ia64.c (dot_spillmem_p): Fix output_spill_?sprel_p() > argument passing order: predicate goes last, not first. > > 2001-04-16 David O'Brien > > * configure.in: Add the em type for FreeBSD targets. > * configure: Regenerate. > > 2001-04-13 Jim Wilson > > * tc-ia64.c (is_conditional_branch): Return true for br, brl, and br. > excluding br.i. > 110c680 < 001-02-18 David O'Brien --- > 2001-02-18 David O'Brien diff -rN binutils-2.11/gas/Makefile.am binutils-2.11.2/gas/Makefile.am 80c80 < # We deliberately omit som, since it does not work as a cross assembler. --- > # We deliberately omit SOM, since it does not work as a cross assembler. 339a340,341 > config/te-hppa64.h \ > config/te-hppalinux64.h \ 357c359,360 < config/te-sysv32.h --- > config/te-sysv32.h \ > config/te-tmips.h 948,949c951,953 < subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ < $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h --- > struc-symbol.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ > $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \ > $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h 952,954c956,959 < $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \ < $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h $(INCDIR)/elf/arc.h \ < $(INCDIR)/elf/reloc-macros.h --- > $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \ > subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ > $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \ > $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h 1182c1187 < $(INCDIR)/elf/reloc-macros.h --- > $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h 1306c1311 < $(INCDIR)/obstack.h subsegs.h --- > struc-symbol.h $(INCDIR)/obstack.h subsegs.h 1309,1310c1314,1315 < $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \ < $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h --- > $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \ > subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h 1852c1857 < sb.h macro.h --- > sb.h macro.h dwarf2dbg.h 1882c1887,1888 < write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h --- > write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h \ > dwarf2dbg.h diff -rN binutils-2.11/gas/Makefile.in binutils-2.11.2/gas/Makefile.in 192c192 < # We deliberately omit som, since it does not work as a cross assembler. --- > # We deliberately omit SOM, since it does not work as a cross assembler. 460a461,462 > config/te-hppa64.h \ > config/te-hppalinux64.h \ 478c480,481 < config/te-sysv32.h --- > config/te-sysv32.h \ > config/te-tmips.h 662,663c665,667 < subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ < $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h --- > struc-symbol.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ > $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \ > $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h 667,669c671,674 < $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \ < $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h $(INCDIR)/elf/arc.h \ < $(INCDIR)/elf/reloc-macros.h --- > $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \ > subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ > $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \ > $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h 954c959 < $(INCDIR)/elf/reloc-macros.h --- > $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h 1113c1118 < $(INCDIR)/obstack.h subsegs.h --- > struc-symbol.h $(INCDIR)/obstack.h subsegs.h 1117,1118c1122,1123 < $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \ < $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h --- > $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \ > subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h 1880c1885 < TAR = gtar --- > TAR = tar 2698c2703 < sb.h macro.h --- > sb.h macro.h dwarf2dbg.h 2728c2733,2734 < write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h --- > write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h \ > dwarf2dbg.h diff -rN binutils-2.11/gas/aclocal.m4 binutils-2.11.2/gas/aclocal.m4 86,103d85 < #serial 1 < # This test replaces the one in autoconf. < # Currently this macro should have the same name as the autoconf macro < # because gettext's gettext.m4 (distributed in the automake package) < # still uses it. Otherwise, the use in gettext.m4 makes autoheader < # give these diagnostics: < # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX < # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX < < undefine([AC_ISC_POSIX]) < < AC_DEFUN(AC_ISC_POSIX, < [ < dnl This test replaces the obsolescent AC_ISC_POSIX kludge. < AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) < ] < ) < diff -rN binutils-2.11/gas/app.c binutils-2.11.2/gas/app.c 2c2,3 < Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, > 1999, 2000 diff -rN binutils-2.11/gas/as.c binutils-2.11.2/gas/as.c 2c2,3 < Copyright (C) 1987, 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 --- > Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, > 1999, 2000, 2001 234d234 < L include line debug statistics (if applicable)\n\ 404c404 < {"listing-lhs-width", required_argument, NULL, OPTION_LISTING_LHS_WIDTH2}, --- > {"listing-lhs-width2", required_argument, NULL, OPTION_LISTING_LHS_WIDTH2}, diff -rN binutils-2.11/gas/as.h binutils-2.11.2/gas/as.h 2c2,3 < Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, > 1999, 2000, 2001 diff -rN binutils-2.11/gas/asintl.h binutils-2.11.2/gas/asintl.h 2c2 < Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/atof-generic.c binutils-2.11.2/gas/atof-generic.c 2c2 < Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 98, 2000 --- > Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000 diff -rN binutils-2.11/gas/bignum-copy.c binutils-2.11.2/gas/bignum-copy.c 2c2 < Copyright (C) 1987, 1990, 1991, 1992, 2000 --- > Copyright 1987, 1990, 1991, 1992, 1993, 2000 diff -rN binutils-2.11/gas/bignum.h binutils-2.11.2/gas/bignum.h 2c2 < Copyright (C) 1987, 1992 Free Software Foundation, Inc. --- > Copyright 1987, 1992 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/bit_fix.h binutils-2.11.2/gas/bit_fix.h 2c2 < Copyright (C) 1987, 1992, 2000 Free Software Foundation, Inc. --- > Copyright 1987, 1992, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/cgen.c binutils-2.11.2/gas/cgen.c 2c2,3 < Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 399a401,403 > expressionS *exp; > symbolS *sym; > offsetT off; 415a420,429 > exp = &fixups[relax_operand].exp; > sym = exp->X_add_symbol; > off = exp->X_add_number; > if (exp->X_op != O_constant && exp->X_op != O_symbol) > { > /* Handle complex expressions. */ > sym = make_expr_symbol (exp); > off = 0; > } > 422,423c436,437 < fixups[relax_operand].exp.X_add_symbol, < fixups[relax_operand].exp.X_add_number, --- > sym, > off, 618c632,634 < /* FIXME: later add support for 64 bits. */ --- > case BFD_RELOC_64: > md_number_to_chars (where, value, 8); > break; 656,657c672 < _("internal error: can't export reloc type %d (`%s')"), < fixP->fx_r_type, bfd_get_reloc_code_name (fixP->fx_r_type)); --- > _("relocation is not supported")); diff -rN binutils-2.11/gas/cgen.h binutils-2.11.2/gas/cgen.h 2c2 < Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/aout_gnu.h binutils-2.11.2/gas/config/aout_gnu.h 3c3,4 < Copyright (C) 1987-1992 Free Software Foundation, Inc. --- > Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/atof-ieee.c binutils-2.11.2/gas/config/atof-ieee.c 2c2 < Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1987, 1992, 1994, 1996, 1997, 1998, 1999, 2000, 2001 21a22,28 > /* Some float formats are based on the IEEE standard, but use the > largest exponent for normal numbers instead of NaNs and infinites. > The macro TC_LARGEST_EXPONENT_IS_NORMAL should evaluate to true > if the target machine uses such a format. The macro can depend on > command line flags if necessary. There is no need to define the > macro if it would always be 0. */ > 42a50,53 > #ifndef TC_LARGEST_EXPONENT_IS_NORMAL > #define TC_LARGEST_EXPONENT_IS_NORMAL 0 > #endif > 293a305,306 > if (TC_LARGEST_EXPONENT_IS_NORMAL) > as_warn ("NaNs are not supported by this target\n"); 330a344,346 > if (TC_LARGEST_EXPONENT_IS_NORMAL) > as_warn ("Infinities are not supported by this target\n"); > 368a385,387 > if (TC_LARGEST_EXPONENT_IS_NORMAL) > as_warn ("Infinities are not supported by this target\n"); > 581c600,602 < else if ((unsigned long) exponent_4 >= mask[exponent_bits]) --- > else if ((unsigned long) exponent_4 > mask[exponent_bits] > || (! TC_LARGEST_EXPONENT_IS_NORMAL > && (unsigned long) exponent_4 == mask[exponent_bits])) diff -rN binutils-2.11/gas/config/atof-tahoe.c binutils-2.11.2/gas/config/atof-tahoe.c 2c2 < Copyright (C) 1987, 1998 Free Software Foundation, Inc. */ --- > Copyright 1987, 1993, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/atof-vax.c binutils-2.11.2/gas/config/atof-vax.c 2c2 < Copyright (C) 1987, 1992, 93, 95, 97, 98, 1999 --- > Copyright 1987, 1992, 1993, 1995, 1997, 1999, 2000 diff -rN binutils-2.11/gas/config/itbl-mips.h binutils-2.11.2/gas/config/itbl-mips.h 4c4 < Copyright (C) 1997 Free Software Foundation, Inc. --- > Copyright 1997 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/m68k-parse.h binutils-2.11.2/gas/config/m68k-parse.h 2c2 < Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 1999 --- > Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000 diff -rN binutils-2.11/gas/config/m68k-parse.y binutils-2.11.2/gas/config/m68k-parse.y 2c2 < Copyright (C) 1995, 96, 1997, 1998 Free Software Foundation, Inc. --- > Copyright 1995, 1996, 1997, 1998 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/m88k-opcode.h binutils-2.11.2/gas/config/m88k-opcode.h 4c4 < Copyright (C) 1989, 1990, 1991 Free Software Foundation, Inc. --- > Copyright 1989, 1990, 1991, 1993, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/obj-aout.c binutils-2.11.2/gas/config/obj-aout.c 2c2 < Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001 diff -rN binutils-2.11/gas/config/obj-aout.h binutils-2.11.2/gas/config/obj-aout.h 2c2 < Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 98, 99, 2000 --- > Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000 diff -rN binutils-2.11/gas/config/obj-bout.c binutils-2.11.2/gas/config/obj-bout.c 2c2 < Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 2000 --- > Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001 diff -rN binutils-2.11/gas/config/obj-bout.h binutils-2.11.2/gas/config/obj-bout.h 2c2 < Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 2000 --- > Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000 diff -rN binutils-2.11/gas/config/obj-coff.c binutils-2.11.2/gas/config/obj-coff.c 2c2,3 < Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, > 1999, 2000, 2001 447a449,452 > > #ifndef OBJ_XCOFF > /* The native aix assembler accepts negative line number */ > 453a459 > #endif /* OBJ_XCOFF */ 1437c1443 < case 'n': flags &=~ SEC_LOAD; break; --- > case 'n': flags &=~ SEC_LOAD; flags |= SEC_NEVER_LOAD; break; 1490,1491c1496,1497 < flagword matchflags = SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE < | SEC_DATA | SEC_SHARED; --- > flagword matchflags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE > | SEC_DATA | SEC_SHARED | SEC_NEVER_LOAD); 2078c2084 < char *buffer; --- > char *buffer = NULL; 3352d3357 < 3355,3357c3360,3364 < /* Turn a pointer to a symbol into the symbols' index */ < line_ptr->line.l_addr.l_symndx = < ((symbolS *) line_ptr->line.l_addr.l_symndx)->sy_number; --- > /* Turn a pointer to a symbol into the symbols' index, > provided that it has been initialised. */ > if (line_ptr->line.l_addr.l_symndx) > line_ptr->line.l_addr.l_symndx = > ((symbolS *) line_ptr->line.l_addr.l_symndx)->sy_number; 4059c4066 < symbolP = symbol_find_or_make(name); --- > symbolP = symbol_find_or_make (name); 4061,4062c4068,4069 < if (S_GET_SEGMENT(symbolP) == SEG_UNKNOWN && < S_GET_VALUE(symbolP) == 0) --- > if (S_GET_SEGMENT (symbolP) == SEG_UNKNOWN && > S_GET_VALUE (symbolP) == 0) 4076,4077c4083,4084 < S_SET_SEGMENT(symbolP, SEG_E2); < S_SET_STORAGE_CLASS(symbolP, C_STAT); --- > S_SET_SEGMENT (symbolP, SEG_E2); > S_SET_STORAGE_CLASS (symbolP, C_STAT); 4081c4088 < as_bad(_("Symbol %s already defined"), name); --- > as_bad (_("Symbol %s already defined"), name); 4083c4090 < demand_empty_rest_of_line(); --- > demand_empty_rest_of_line (); diff -rN binutils-2.11/gas/config/obj-coff.h binutils-2.11.2/gas/config/obj-coff.h 2c2,3 < Copyright (C) 1989, 90, 91, 92, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, > 1999, 2000 diff -rN binutils-2.11/gas/config/obj-ecoff.c binutils-2.11.2/gas/config/obj-ecoff.c 2c2 < Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 98c98 < { NULL } --- > { NULL, s_ignore, 0 } 144c144 < #define n_names (sizeof (names) / sizeof (names[0])) --- > #define n_names ((int) (sizeof (names) / sizeof (names[0]))) 275c275 < asection *sec; --- > asection *sec ATTRIBUTE_UNUSED; 283c283 < int *puntp; --- > int *puntp ATTRIBUTE_UNUSED; diff -rN binutils-2.11/gas/config/obj-ecoff.h binutils-2.11.2/gas/config/obj-ecoff.h 2c2,3 < Copyright (C) 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1996, 1997, 1999 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/obj-elf.c binutils-2.11.2/gas/config/obj-elf.c 2c2 < Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 diff -rN binutils-2.11/gas/config/obj-elf.h binutils-2.11.2/gas/config/obj-elf.h 2c2 < Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 diff -rN binutils-2.11/gas/config/obj-evax.c binutils-2.11.2/gas/config/obj-evax.c 2c2 < Copyright (C) 1996, 1997 Free Software Foundation, Inc. --- > Copyright 1996, 1997 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/obj-evax.h binutils-2.11.2/gas/config/obj-evax.h 2c2 < Copyright (C) 1996, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/obj-generic.h binutils-2.11.2/gas/config/obj-generic.h 2c2,3 < Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc. --- > Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/obj-hp300.c binutils-2.11.2/gas/config/obj-hp300.c 2c2 < Copyright (C) 1993, 2000 Free Software Foundation, Inc. --- > Copyright 1993, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/obj-hp300.h binutils-2.11.2/gas/config/obj-hp300.h 2c2 < Copyright (C) 1993, 2000 Free Software Foundation, Inc. --- > Copyright 1993, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/obj-ieee.c binutils-2.11.2/gas/config/obj-ieee.c 2c2 < Copyright (C) 1991, 92, 93, 94, 95, 97, 98, 2000 --- > Copyright 1991, 1992, 1993, 1994, 1997, 2000 diff -rN binutils-2.11/gas/config/obj-ieee.h binutils-2.11.2/gas/config/obj-ieee.h 2c2,3 < Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc. --- > Copyright 1987, 1988, 1989, 1990, 1991, 1992, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/obj-multi.h binutils-2.11.2/gas/config/obj-multi.h 2c2 < Copyright (C) 1995, 96, 97, 99, 2000 --- > Copyright 1995, 1996, 1997, 1999, 2000 diff -rN binutils-2.11/gas/config/obj-som.c binutils-2.11.2/gas/config/obj-som.c 2c2 < Copyright (C) 1993, 1998, 2000 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/obj-som.h binutils-2.11.2/gas/config/obj-som.h 2c2 < Copyright (C) 1993, 1994, 1995, 1998 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/obj-vms.c binutils-2.11.2/gas/config/obj-vms.c 2c2 < Copyright (C) 1987, 88, 92, 94, 95, 97, 98, 2000 --- > Copyright 1987, 1988, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001 555c555 < symbolPP = &(symbol_next (symbolP)); --- > symbolPP = &symbolP->sy_next; diff -rN binutils-2.11/gas/config/obj-vms.h binutils-2.11.2/gas/config/obj-vms.h 2c2 < Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 99, 2000 --- > Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000 diff -rN binutils-2.11/gas/config/tc-a29k.c binutils-2.11.2/gas/config/tc-a29k.c 2c2 < Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 98, 2000 --- > Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 2000 diff -rN binutils-2.11/gas/config/tc-a29k.h binutils-2.11.2/gas/config/tc-a29k.h 2c2,3 < Copyright (C) 1989, 90, 91, 92, 93, 95, 1998 Free Software Foundation, Inc. --- > Copyright 1989, 1990, 1991, 1992, 1993, 1995, 1998 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-alpha.c binutils-2.11.2/gas/config/tc-alpha.c 2c2,3 < Copyright (C) 1989, 93-98, 1999, 2000, 2001 Free Software Foundation, Inc. --- > Copyright 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-alpha.h binutils-2.11.2/gas/config/tc-alpha.h 2c2,3 < Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-arc.c binutils-2.11.2/gas/config/tc-arc.c 2c2,3 < Copyright (C) 1994, 1995, 1997, 2000 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1997, 1999, 2000, 2001 > Free Software Foundation, Inc. 29a31 > #include "dwarf2dbg.h" 78c80 < { "align", s_align_bytes, 0 }, /* Defaulting is invalid (0) */ --- > { "align", s_align_bytes, 0 }, /* Defaulting is invalid (0). */ 89a92 > { "cpu", arc_option, 0 }, 90a94,95 > { "file", dwarf2_directive_file, 0 }, > { "loc", dwarf2_directive_loc, 0 }, 99c104 < pre-processor is disabled, these aren't very useful */ --- > pre-processor is disabled, these aren't very useful. */ 114c119 < /* Chars that can be used to separate mant from exp in floating point nums */ --- > /* Chars that can be used to separate mant from exp in floating point nums. */ 117,119c122,123 < /* Chars that mean this number is a floating point constant */ < /* As in 0f12.456 */ < /* or 0d1.2345e12 */ --- > /* Chars that mean this number is a floating point constant > As in 0f12.456 or 0d1.2345e12. */ 130c134 < static int arc_mach_type = bfd_mach_arc_5; --- > static int arc_mach_type = bfd_mach_arc_6; 136c140 < A .cpu command must appear before any instructions. */ --- > A .option command must appear before any instructions. */ 144c148 < {"EB", no_argument, NULL, OPTION_EB}, --- > { "EB", no_argument, NULL, OPTION_EB }, 146c150 < {"EL", no_argument, NULL, OPTION_EL}, --- > { "EL", no_argument, NULL, OPTION_EL }, 148c152,153 < {"marc5", no_argument, NULL, OPTION_ARC5}, --- > { "marc5", no_argument, NULL, OPTION_ARC5 }, > { "pre-v6", no_argument, NULL, OPTION_ARC5 }, 150c155 < {"marc6", no_argument, NULL, OPTION_ARC6}, --- > { "marc6", no_argument, NULL, OPTION_ARC6 }, 152c157 < {"marc7", no_argument, NULL, OPTION_ARC7}, --- > { "marc7", no_argument, NULL, OPTION_ARC7 }, 154c159 < {"marc8", no_argument, NULL, OPTION_ARC8}, --- > { "marc8", no_argument, NULL, OPTION_ARC8 }, 156c161 < {"marc", no_argument, NULL, OPTION_ARC}, --- > { "marc", no_argument, NULL, OPTION_ARC }, 176d180 < case OPTION_ARC: 179a184 > case OPTION_ARC: 216c221 < Opcode selection is defered until later because we might see a .cpu --- > Opcode selection is deferred until later because we might see a .option 228,230c233,234 < /* This call is necessary because we need to < initialize `arc_operand_map' which may be needed before we see the < first insn. */ --- > /* This call is necessary because we need to initialize `arc_operand_map' > which may be needed before we see the first insn. */ 237d240 < 279,280c282,285 < symbol_table_insert (symbol_create (arc_reg_names[i].name, reg_section, < (int) &arc_reg_names[i], &zero_address_frag)); --- > symbol_table_insert (symbol_create (arc_reg_names[i].name, > reg_section, > (int) &arc_reg_names[i], > &zero_address_frag)); 359c364 < /* index into `arc_operands' */ --- > /* index into `arc_operands' */ 383c388 < wait for a possible .cpu command. */ --- > wait for a possible .option command. */ 629c634 < if (*str == '\0') --- > if (is_end_of_line[(unsigned char) *str]) 737c742 < if (*str != '\0') --- > if (!is_end_of_line[(unsigned char) *str]) 803a809 > dwarf2_emit_insn (8); 813a820 > dwarf2_emit_insn (4); 914c921 < /* just after name is now '\0' */ --- > /* just after name is now '\0' */ 927c934 < input_line_pointer++; /* skip ',' */ --- > input_line_pointer++; /* skip ',' */ 950c957 < input_line_pointer++; /* skip ',' */ --- > input_line_pointer++; /* skip ',' */ 992c999 < input_line_pointer++; /* skip ',' */ --- > input_line_pointer++; /* skip ',' */ 1157c1164 < /* just after name is now '\0' */ --- > /* just after name is now '\0' */ 1170c1177 < input_line_pointer++; /* skip ',' */ --- > input_line_pointer++; /* skip ',' */ 1182c1189 < input_line_pointer++; /* skip ',' */ --- > input_line_pointer++; /* skip ',' */ 1220c1227 < input_line_pointer++; /* skip ',' */ --- > input_line_pointer++; /* skip ',' */ 1248c1255 < input_line_pointer++; /* skip ',' */ --- > input_line_pointer++; /* skip ',' */ 1375c1382 < /* just after name is now '\0' */ --- > /* just after name is now '\0' */ 1387c1394 < input_line_pointer++; /* skip ',' */ --- > input_line_pointer++; /* skip ',' */ 1439c1446 < subseg_set (bss_section, 0); /* ??? subseg_set (bss_section, 1); ??? */ --- > subseg_set (bss_section, 0); /* ??? subseg_set (bss_section, 1); ??? */ 1632a1640 > expressionP->X_add_symbol->sy_value.X_op = O_constant; 1638c1646 < /* Allow %st(sym1-sym2) */ --- > /* Allow %st(sym1-sym2) */ 1689c1697,1698 < { /* It could be a register. */ --- > { > /* It could be a register. */ diff -rN binutils-2.11/gas/config/tc-arc.h binutils-2.11.2/gas/config/tc-arc.h 2c2 < Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1997, 2000, 2001 Free Software Foundation, Inc. 68a69,70 > > #define DWARF2_LINE_MIN_INSN_LENGTH 4 diff -rN binutils-2.11/gas/config/tc-arm.c binutils-2.11.2/gas/config/tc-arm.c 2c2 < Copyright (C) 1994, 95, 96, 97, 98, 1999, 2000 --- > Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 1281a1282,1292 > > if (literals[lit_count].exp.X_op == inst.reloc.exp.X_op > && inst.reloc.exp.X_op == O_symbol > && (literals[lit_count].exp.X_add_number > == inst.reloc.exp.X_add_number) > && (literals[lit_count].exp.X_add_symbol > == inst.reloc.exp.X_add_symbol) > && (literals[lit_count].exp.X_op_symbol > == inst.reloc.exp.X_op_symbol)) > break; > 1287c1298 < if (next_literal_pool_place > MAX_LITERAL_POOL_SIZE) --- > if (next_literal_pool_place >= MAX_LITERAL_POOL_SIZE) 2280a2292,2295 > #if 0 /* The first edition of the ARM architecture manual stated that > writing anything other than the flags with an immediate operation > had UNPREDICTABLE effects. This constraint was removed in the > second edition of the specification. */ 2286a2302 > #endif 6017c6033 < inst.error = _("dest and source1 one must be the same register"); --- > inst.error = _("dest and source1 must be the same register"); 6516c6532,6536 < if (cpu_variant != (FPU_DEFAULT | CPU_DEFAULT)) --- > if (cpu_variant & ARM_EXT_XSCALE) > mach = bfd_mach_arm_XScale; > else if (cpu_variant & ARM_EXT_V5E) > mach = bfd_mach_arm_5TE; > else if (cpu_variant & ARM_EXT_V5) 6518,6537c6538,6541 < if (cpu_variant & ARM_EXT_XSCALE) < mach = bfd_mach_arm_XScale; < else if (cpu_variant & ARM_EXT_V5E) < mach = bfd_mach_arm_5TE; < else if (cpu_variant & ARM_EXT_V5) < { < if (cpu_variant & ARM_EXT_THUMB) < mach = bfd_mach_arm_5T; < else < mach = bfd_mach_arm_5; < } < else if (cpu_variant & ARM_EXT_HALFWORD) < { < if (cpu_variant & ARM_EXT_THUMB) < mach = bfd_mach_arm_4T; < else < mach = bfd_mach_arm_4; < } < else if (cpu_variant & ARM_EXT_LONGMUL) < mach = bfd_mach_arm_3M; --- > if (cpu_variant & ARM_EXT_THUMB) > mach = bfd_mach_arm_5T; > else > mach = bfd_mach_arm_5; 6538a6543,6551 > else if (cpu_variant & ARM_EXT_HALFWORD) > { > if (cpu_variant & ARM_EXT_THUMB) > mach = bfd_mach_arm_4T; > else > mach = bfd_mach_arm_4; > } > else if (cpu_variant & ARM_EXT_LONGMUL) > mach = bfd_mach_arm_3M; 7151a7165,7173 > if (fixP->fx_r_type == BFD_RELOC_THUMB_PCREL_BLX) > /* Remove bit zero of the adjusted offset. Bit zero can only be > set if the upper insn is at a half-word boundary, since the > destination address, an ARM instruction, must always be on a > word boundary. The semantics of the BLX (1) instruction, however, > are that bit zero in the offset must always be zero, and the > corresponding bit one in the target address will be set from bit > one of the source address. */ > newval2 &= ~1; 8421c8443,8474 < if (label_is_thumb_function_name) --- > /* Note - do not allow local symbols (.Lxxx) to be labeled > as Thumb functions. This is because these labels, whilst > they exist inside Thumb code, are not the entry points for > possible ARM->Thumb calls. Also, these labels can be used > as part of a computed goto or switch statement. eg gcc > can generate code that looks like this: > > ldr r2, [pc, .Laaa] > lsl r3, r3, #2 > ldr r2, [r3, r2] > mov pc, r2 > > .Lbbb: .word .Lxxx > .Lccc: .word .Lyyy > ..etc... > .Laaa: .word Lbbb > > The first instruction loads the address of the jump table. > The second instruction converts a table index into a byte offset. > The third instruction gets the jump address out of the table. > The fourth instruction performs the jump. > > If the address stored at .Laaa is that of a symbol which has the > Thumb_Func bit set, then the linker will arrange for this address > to have the bottom bit set, which in turn would mean that the > address computation performed by the third instruction would end > up with the bottom bit set. Since the ARM is capable of unaligned > word loads, the instruction would then load the incorrect address > out of the jump table, and chaos would ensue. */ > if (label_is_thumb_function_name > && (S_GET_NAME (sym)[0] != '.' || S_GET_NAME (sym)[1] != 'L') > && (bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0) 8745a8799,8897 > > /* This is called from HANDLE_ALIGN in write.c. Fill in the contents > of an rs_align_code fragment. */ > > void > arm_handle_align (fragP) > fragS *fragP; > { > static char const arm_noop[4] = { 0x00, 0x00, 0xa0, 0xe1 }; > static char const thumb_noop[2] = { 0xc0, 0x46 }; > static char const arm_bigend_noop[4] = { 0xe1, 0xa0, 0x00, 0x00 }; > static char const thumb_bigend_noop[2] = { 0x46, 0xc0 }; > > int bytes, fix, noop_size; > char * p; > const char * noop; > > if (fragP->fr_type != rs_align_code) > return; > > bytes = fragP->fr_next->fr_address - fragP->fr_address - fragP->fr_fix; > p = fragP->fr_literal + fragP->fr_fix; > fix = 0; > > if (bytes > MAX_MEM_FOR_RS_ALIGN_CODE) > bytes &= MAX_MEM_FOR_RS_ALIGN_CODE; > > if (fragP->tc_frag_data) > { > if (target_big_endian) > noop = thumb_bigend_noop; > else > noop = thumb_noop; > noop_size = sizeof (thumb_noop); > } > else > { > if (target_big_endian) > noop = arm_bigend_noop; > else > noop = arm_noop; > noop_size = sizeof (arm_noop); > } > > if (bytes & (noop_size - 1)) > { > fix = bytes & (noop_size - 1); > memset (p, 0, fix); > p += fix; > bytes -= fix; > } > > while (bytes >= noop_size) > { > memcpy (p, noop, noop_size); > p += noop_size; > bytes -= noop_size; > fix += noop_size; > } > > fragP->fr_fix += fix; > fragP->fr_var = noop_size; > } > > /* Called from md_do_align. Used to create an alignment > frag in a code section. */ > > void > arm_frag_align_code (n, max) > int n; > int max; > { > char * p; > > /* We assume that there will never be a requirment > to support alignments greater than 32 bytes. */ > if (max > MAX_MEM_FOR_RS_ALIGN_CODE) > as_fatal (_("alignments greater than 32 bytes not supported in .text sections.")); > > p = frag_var (rs_align_code, > MAX_MEM_FOR_RS_ALIGN_CODE, > 1, > (relax_substateT) max, > (symbolS *) NULL, > (offsetT) n, > (char *) NULL); > *p = 0; > > } > > /* Perform target specific initialisation of a frag. */ > > void > arm_init_frag (fragP) > fragS *fragP; > { > /* Record whether this frag is in an ARM or a THUMB area. */ > fragP->tc_frag_data = thumb_mode; > } diff -rN binutils-2.11/gas/config/tc-arm.h binutils-2.11.2/gas/config/tc-arm.h 2c2 < Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 --- > Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 216a217,236 > > #define MAX_MEM_FOR_RS_ALIGN_CODE 31 > > /* For frags in code sections we need to record whether they contain > ARM code or THUMB code. This is that if they have to be aligned, > they can contain the correct type of no-op instruction. */ > #define TC_FRAG_TYPE int > #define TC_FRAG_INIT(fragp) arm_init_frag (fragp) > extern void arm_init_frag PARAMS ((struct frag *)); > > #define HANDLE_ALIGN(fragp) arm_handle_align (fragp) > extern void arm_handle_align PARAMS ((struct frag *)); > > #define md_do_align(N, FILL, LEN, MAX, LABEL) \ > if (FILL == NULL && (N) != 0 && ! need_pass_2 && subseg_text_p (now_seg)) \ > { \ > arm_frag_align_code (N, MAX); \ > goto LABEL; \ > } > extern void arm_frag_align_code PARAMS ((int, int)); diff -rN binutils-2.11/gas/config/tc-avr.c binutils-2.11.2/gas/config/tc-avr.c 3c3 < Copyright (C) 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-avr.h binutils-2.11.2/gas/config/tc-avr.h 2c2 < Copyright (C) 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-cris.c binutils-2.11.2/gas/config/tc-cris.c 2c2 < Copyright (C) 2000 Free Software Foundation, Inc. --- > Copyright 2000, 2001 Free Software Foundation, Inc. 136a137 > static char *cris_insn_first_word_frag PARAMS ((void)); 652a654,673 > /* Allocate space for the first piece of an insn, and mark it as the > start of the insn for debug-format use. */ > > static char * > cris_insn_first_word_frag () > { > char *insnp = frag_more (2); > > /* We need to mark the start of the insn by passing dwarf2_emit_insn > the offset from the current fragment position. This must be done > after the first fragment is created but before any other fragments > (fixed or varying) are created. Note that the offset only > corresponds to the "size" of the insn for a fixed-size, > non-expanded insn. */ > if (OUTPUT_FLAVOR == bfd_target_elf_flavour) > dwarf2_emit_insn (2); > > return insnp; > } > 697d717 < int insn_size = 0; 720,721c740 < insn_size += 2; < opcodep = frag_more (2); --- > opcodep = cris_insn_first_word_frag (); 731d749 < insn_size += 4; 739,740c757 < insn_size += 2; < opcodep = frag_more (2); --- > opcodep = cris_insn_first_word_frag (); 766,767c783,786 < insn_size += 2; < opcodep = frag_more (2); --- > if (prefix.kind == PREFIX_NONE) > opcodep = cris_insn_first_word_frag (); > else > opcodep = frag_more (2); 806d824 < insn_size += 10; 838d855 < insn_size += output_instruction.imm_oprnd_size; 858,860d874 < < if (OUTPUT_FLAVOR == bfd_target_elf_flavour) < dwarf2_emit_insn (insn_size); 2227c2241 < opcodep = frag_more (2); --- > opcodep = cris_insn_first_word_frag (); diff -rN binutils-2.11/gas/config/tc-cris.h binutils-2.11.2/gas/config/tc-cris.h 2c2 < Copyright (C) 2000 Free Software Foundation, Inc. --- > Copyright 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-d10v.c binutils-2.11.2/gas/config/tc-d10v.c 2c2,3 < Copyright (C) 1996, 97, 98, 99, 2000 Free Software Foundation. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-d10v.h binutils-2.11.2/gas/config/tc-d10v.h 2c2 < Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc. 59c59,60 < S_SET_VALUE (sym, (valueT) frag_now_fix ()); \ --- > symbol_set_frag (sym, frag_now); \ > S_SET_VALUE (sym, (valueT) frag_now_fix ()); \ diff -rN binutils-2.11/gas/config/tc-d30v.c binutils-2.11.2/gas/config/tc-d30v.c 2c2 < Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation. --- > Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-d30v.h binutils-2.11.2/gas/config/tc-d30v.h 2c2 < Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1997, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-fr30.c binutils-2.11.2/gas/config/tc-fr30.c 2c2 < Copyright (C) 1998, 1999, 2000 Free Software Foundation. --- > Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc. 211c211,212 < fr30_relax_frag (fragP, stretch) --- > fr30_relax_frag (segment, fragP, stretch) > segT segment; 238c239 < growth = relax_frag (fragP, stretch); --- > growth = relax_frag (segment, fragP, stretch); 267,268d267 < int old_fr_fix = fragP->fr_fix; < 276a276,277 > int old_fr_fix = fragP->fr_fix; > 298a300 > return fragP->fr_fix - old_fr_fix; 325c327,328 < return (fragP->fr_var + fragP->fr_fix - old_fr_fix); --- > /* Return the size of the variable part of the frag. */ > return md_relax_table[fragP->fr_subtype].rlx_length; diff -rN binutils-2.11/gas/config/tc-fr30.h binutils-2.11.2/gas/config/tc-fr30.h 2c2 < Copyright (C) 1998, 2000 Free Software Foundation, Inc. --- > Copyright 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-generic.h binutils-2.11.2/gas/config/tc-generic.h 3c3 < Copyright (C) 1987, 91, 92, 95, 1997 Free Software Foundation, Inc. --- > Copyright 1987, 1991, 1992, 1995, 1997 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-h8300.c binutils-2.11.2/gas/config/tc-h8300.c 2,3c2,3 < Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 2000 < Free Software Foundation. --- > Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-h8300.h binutils-2.11.2/gas/config/tc-h8300.h 2c2,3 < Copyright (C) 1987-1992, 93, 94, 95, 96, 97, 98, 2000 --- > Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, > 1997, 1998, 2000 diff -rN binutils-2.11/gas/config/tc-h8500.c binutils-2.11.2/gas/config/tc-h8500.c 2c2,3 < Copyright (C) 1993, 94, 95, 98, 2000 Free Software Foundation. --- > Copyright 1993, 1994, 1995, 1998, 2000, 2001 > Free Software Foundation, Inc. 88c89,113 < relax_typeS md_relax_table[C (END, 0)]; --- > relax_typeS md_relax_table[C (END, 0)] = { > { 0, 0, 0, 0 }, > { 0, 0, 0, 0 }, > { 0, 0, 0, 0 }, > { 0, 0, 0, 0 }, > > /* BRANCH */ > { 0, 0, 0, 0 }, > { BYTE_F, BYTE_B, 2, C (BRANCH, WORD_DISP) }, > { WORD_F, WORD_B, 3, 0 }, > { 0, 0, 3, 0 }, > > /* SCB_F */ > { 0, 0, 0, 0 }, > { BYTE_F, BYTE_B, 3, C (SCB_F, WORD_DISP) }, > { WORD_F, WORD_B, 8, 0 }, > { 0, 0, 8, 0 }, > > /* SCB_TST */ > { 0, 0, 0, 0 }, > { BYTE_F, BYTE_B, 3, C (SCB_TST, WORD_DISP) }, > { WORD_F, WORD_B, 10, 0 }, > { 0, 0, 10, 0 } > > }; 103d127 < register relax_typeS *table; 117,150d140 < < /* Initialize the relax table. We use a local variable to avoid < warnings about modifying a supposedly const data structure. */ < table = (relax_typeS *) md_relax_table; < table[C (BRANCH, BYTE_DISP)].rlx_forward = BYTE_F; < table[C (BRANCH, BYTE_DISP)].rlx_backward = BYTE_B; < table[C (BRANCH, BYTE_DISP)].rlx_length = 2; < table[C (BRANCH, BYTE_DISP)].rlx_more = C (BRANCH, WORD_DISP); < < table[C (BRANCH, WORD_DISP)].rlx_forward = WORD_F; < table[C (BRANCH, WORD_DISP)].rlx_backward = WORD_B; < table[C (BRANCH, WORD_DISP)].rlx_length = 3; < table[C (BRANCH, WORD_DISP)].rlx_more = 0; < < table[C (SCB_F, BYTE_DISP)].rlx_forward = BYTE_F; < table[C (SCB_F, BYTE_DISP)].rlx_backward = BYTE_B; < table[C (SCB_F, BYTE_DISP)].rlx_length = 3; < table[C (SCB_F, BYTE_DISP)].rlx_more = C (SCB_F, WORD_DISP); < < table[C (SCB_F, WORD_DISP)].rlx_forward = WORD_F; < table[C (SCB_F, WORD_DISP)].rlx_backward = WORD_B; < table[C (SCB_F, WORD_DISP)].rlx_length = 8; < table[C (SCB_F, WORD_DISP)].rlx_more = 0; < < table[C (SCB_TST, BYTE_DISP)].rlx_forward = BYTE_F; < table[C (SCB_TST, BYTE_DISP)].rlx_backward = BYTE_B; < table[C (SCB_TST, BYTE_DISP)].rlx_length = 3; < table[C (SCB_TST, BYTE_DISP)].rlx_more = C (SCB_TST, WORD_DISP); < < table[C (SCB_TST, WORD_DISP)].rlx_forward = WORD_F; < table[C (SCB_TST, WORD_DISP)].rlx_backward = WORD_B; < table[C (SCB_TST, WORD_DISP)].rlx_length = 10; < table[C (SCB_TST, WORD_DISP)].rlx_more = 0; < 1356d1345 < fragP->fr_var = 0; 1372d1360 < fragP->fr_var = 0; 1444c1432 < int what = GET_WHAT (fragP->fr_subtype); --- > int what; 1449a1438 > 1452a1442 > what = GET_WHAT (fragP->fr_subtype); 1459d1448 < fragP->fr_var = md_relax_table[C (what, BYTE_DISP)].rlx_length; 1466,1467d1454 < fragP->fr_var = md_relax_table[C (what, WORD_DISP)].rlx_length; < return md_relax_table[C (what, WORD_DISP)].rlx_length; 1468a1456,1469 > break; > > case C (BRANCH, BYTE_DISP): > case C (BRANCH, WORD_DISP): > case C (BRANCH, UNDEF_WORD_DISP): > case C (SCB_F, BYTE_DISP): > case C (SCB_F, WORD_DISP): > case C (SCB_F, UNDEF_WORD_DISP): > case C (SCB_TST, BYTE_DISP): > case C (SCB_TST, WORD_DISP): > case C (SCB_TST, UNDEF_WORD_DISP): > /* When relaxing a section for the second time, we don't need to > do anything besides return the current size. */ > break; 1470c1471,1472 < return fragP->fr_var; --- > > return md_relax_table[fragP->fr_subtype].rlx_length; diff -rN binutils-2.11/gas/config/tc-h8500.h binutils-2.11.2/gas/config/tc-h8500.h 2c2 < Copyright (C) 1993, 95, 97, 98, 2000 Free Software Foundation, Inc. --- > Copyright 1993, 1995, 1997, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-hppa.h binutils-2.11.2/gas/config/tc-hppa.h 2c2 < Copyright 1989, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 --- > Copyright 1989, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001 diff -rN binutils-2.11/gas/config/tc-i370.c binutils-2.11.2/gas/config/tc-i370.c 3c3,4 < Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-i370.h binutils-2.11.2/gas/config/tc-i370.h 2c2,3 < Copyright (C) 1994, 95, 96, 97, 98, 2000 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 1996, 1997, 1998, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-i386.c binutils-2.11.2/gas/config/tc-i386.c 2c2,3 < Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 --- > Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 71a73,75 > #define RELOC_ENUM enum bfd_reloc_code_real > #else > #define RELOC_ENUM int 119,123c123 < #ifdef BFD_ASSEMBLER < enum bfd_reloc_code_real disp_reloc[MAX_OPERANDS]; < #else < int disp_reloc[MAX_OPERANDS]; < #endif --- > RELOC_ENUM reloc[MAX_OPERANDS]; 242a243 > #define NUM_FLAG_CODE ((int) CODE_64BIT + 1) 275a277,280 > /* If set, conditional jumps are not automatically promoted to handle > larger than a byte offset. */ > static unsigned int no_cond_jump_promotion = 0; > 277,280c282,284 < There are 2 relax states for 386 jump insns: one for conditional & < one for unconditional jumps. This is because these two types of < jumps add different sizes to frags when we're figuring out what < sort of jump to choose to reach a given label. */ --- > There are 3 major relax states for 386 jump insns because the > different types of jumps add different sizes to frags when we're > figuring out what sort of jump to choose to reach a given label. */ 282a287 > #define UNCOND_JUMP 0 284c289,290 < #define UNCOND_JUMP 2 --- > #define COND_JUMP86 2 > 300,303c306,311 < #define ENCODE_RELAX_STATE(type,size) \ < ((relax_substateT) ((type<<2) | (size))) < #define SIZE_FROM_RELAX_STATE(s) \ < ( (((s) & 0x3) == BIG ? 4 : (((s) & 0x3) == BIG16 ? 2 : 1)) ) --- > #define ENCODE_RELAX_STATE(type, size) \ > ((relax_substateT) (((type) << 2) | (size))) > #define TYPE_FROM_RELAX_STATE(s) \ > ((s) >> 2) > #define DISP_SIZE_FROM_RELAX_STATE(s) \ > ((((s) & 3) == BIG ? 4 : (((s) & 3) == BIG16 ? 2 : 1))) 318c326 < 3) how many bytes this mode will add to the size of the current frag --- > 3) how many bytes this mode will have in the variable part of the frag 320,328c328,333 < {1, 1, 0, 0}, < {1, 1, 0, 0}, < {1, 1, 0, 0}, < {1, 1, 0, 0}, < < {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (COND_JUMP, BIG)}, < {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (COND_JUMP, BIG16)}, < /* dword conditionals adds 4 bytes to frag: < 1 extra opcode byte, 3 extra displacement bytes. */ --- > > /* UNCOND_JUMP states. */ > {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG)}, > {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16)}, > /* dword jmp adds 4 bytes to frag: > 0 extra opcode bytes, 4 displacement bytes. */ 330,331c335,336 < /* word conditionals add 2 bytes to frag: < 1 extra opcode byte, 1 extra displacement byte. */ --- > /* word jmp adds 2 byte2 to frag: > 0 extra opcode bytes, 2 displacement bytes. */ 334,337c339,346 < {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG)}, < {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16)}, < /* dword jmp adds 3 bytes to frag: < 0 extra opcode bytes, 3 extra displacement bytes. */ --- > /* COND_JUMP states. */ > {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP, BIG)}, > {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP, BIG16)}, > /* dword conditionals adds 5 bytes to frag: > 1 extra opcode byte, 4 displacement bytes. */ > {0, 0, 5, 0}, > /* word conditionals add 3 bytes to frag: > 1 extra opcode byte, 2 displacement bytes. */ 339,341d347 < /* word jmp adds 1 byte to frag: < 0 extra opcode bytes, 1 extra displacement byte. */ < {0, 0, 1, 0} 342a349,357 > /* COND_JUMP86 states. */ > {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP86, BIG)}, > {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP86, BIG16)}, > /* dword conditionals adds 5 bytes to frag: > 1 extra opcode byte, 4 displacement bytes. */ > {0, 0, 5, 0}, > /* word conditionals add 4 bytes to frag: > 1 displacement byte and a 3 byte long branch insn. */ > {0, 0, 4, 0} 729c744,745 < cpu_arch_flags = cpu_arch[i].flags | (flag_code == CODE_64BIT ? Cpu64 : CpuNo64); --- > cpu_arch_flags = (cpu_arch[i].flags > | (flag_code == CODE_64BIT ? Cpu64 : CpuNo64)); 740a757,773 > no_cond_jump_promotion = 0; > if (*input_line_pointer == ',' > && ! is_end_of_line[(unsigned char) input_line_pointer[1]]) > { > char *string = ++input_line_pointer; > int e = get_symbol_end (); > > if (strcmp (string, "nojumps") == 0) > no_cond_jump_promotion = 1; > else if (strcmp (string, "jumps") == 0) > ; > else > as_bad (_("no such architecture modifier: `%s'"), string); > > *input_line_pointer = e; > } > 1201,1203d1233 < /* Count the size of the instruction generated. */ < int insn_size = 0; < 1211c1241 < i.disp_reloc[j] = NO_RELOC; --- > i.reloc[j] = NO_RELOC; 1511,1515c1541 < #ifdef BFD_ASSEMBLER < enum bfd_reloc_code_real temp_reloc; < #else < int temp_reloc; < #endif --- > RELOC_ENUM temp_reloc; 1535,1537c1561,1563 < temp_reloc = i.disp_reloc[xchg2]; < i.disp_reloc[xchg2] = i.disp_reloc[xchg1]; < i.disp_reloc[xchg1] = temp_reloc; --- > temp_reloc = i.reloc[xchg2]; > i.reloc[xchg2] = i.reloc[xchg1]; > i.reloc[xchg1] = temp_reloc; 1657c1683 < && i.op[op].imms->X_op == O_constant) --- > && i.op[op].disps->X_op == O_constant) 2674a2701,2705 > /* Tie dwarf2 debug info to the address at the start of the insn. > We can't do this after the insn has been output as the current > frag may have been closed off. eg. by frag_var. */ > dwarf2_emit_insn (0); > 2678d2708 < int size; 2692a2723,2729 > /* Pentium4 branch hints. */ > if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE /* not taken */ > || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE /* taken */) > { > prefix++; > i.prefixes--; > } 2699,2702d2735 < size = 4; < if (code16) < size = 2; < 2711,2712c2744 < frag_grow (prefix + 2 + size); < insn_size += prefix + 1; --- > frag_grow (prefix + 2 + 4); 2716a2749,2751 > if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE > || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE) > *p++ = i.prefix[SEG_PREFIX]; 2723,2724c2758,2759 < 1 + size, < i.disp_reloc[0], --- > 1 + 4, > i.reloc[0], 2727c2762,2764 < : ENCODE_RELAX_STATE (COND_JUMP, SMALL) | code16), --- > : ((cpu_arch_flags & Cpu386) != 0 > ? ENCODE_RELAX_STATE (COND_JUMP, SMALL) | code16 > : ENCODE_RELAX_STATE (COND_JUMP86, SMALL) | code16)), 2742d2778 < insn_size += 1; 2745a2782,2788 > /* Pentium4 branch hints. */ > if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE /* not taken */ > || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE /* taken */) > { > FRAG_APPEND_1_CHAR (i.prefix[SEG_PREFIX]); > i.prefixes--; > } 2757d2799 < insn_size += 1; 2771d2812 < insn_size++; 2778,2790c2819,2820 < if (fits_in_unsigned_byte (i.tm.base_opcode)) < { < insn_size += 1 + size; < p = frag_more (1 + size); < } < else < { < /* Opcode can be at most two bytes. */ < insn_size += 2 + size; < p = frag_more (2 + size); < *p++ = (i.tm.base_opcode >> 8) & 0xff; < } < *p++ = i.tm.base_opcode & 0xff; --- > p = frag_more (1 + size); > *p++ = i.tm.base_opcode; 2793c2823 < i.op[0].disps, 1, reloc (size, 1, 1, i.disp_reloc[0])); --- > i.op[0].disps, 1, reloc (size, 1, 1, i.reloc[0])); 2826d2855 < insn_size += prefix + 1 + 2 + size; 2851c2880 < i.op[1].imms, 0, reloc (size, 0, 0, i.disp_reloc[0])); --- > i.op[1].imms, 0, reloc (size, 0, 0, i.reloc[1])); 2874d2902 < insn_size += 1; 2883d2910 < insn_size += 1; 2888d2914 < insn_size += 2; 2898d2923 < insn_size += 1; 2913d2937 < insn_size += 1; 2947d2970 < insn_size += size; 2994d3016 < insn_size += size; 2998c3020 < reloc (size, pcrel, sign, i.disp_reloc[n])); --- > reloc (size, pcrel, sign, i.reloc[n])); 3029d3050 < insn_size += size; 3039,3043c3060 < #ifdef BFD_ASSEMBLER < enum bfd_reloc_code_real reloc_type; < #else < int reloc_type; < #endif --- > RELOC_ENUM reloc_type; 3059d3075 < insn_size += size; 3061c3077 < reloc_type = reloc (size, 0, sign, i.disp_reloc[0]); --- > reloc_type = reloc (size, 0, sign, i.reloc[n]); 3087,3088d3102 < dwarf2_emit_insn (insn_size); < 3097a3112,3235 > #ifndef LEX_AT > static char *lex_got PARAMS ((RELOC_ENUM *, int *)); > > /* Parse operands of the form > @GOTOFF+ > and similar .plt or .got references. > > If we find one, set up the correct relocation in RELOC and copy the > input string, minus the `@GOTOFF' into a malloc'd buffer for > parsing by the calling routine. Return this buffer, and if ADJUST > is non-null set it to the length of the string we removed from the > input line. Otherwise return NULL. */ > static char * > lex_got (reloc, adjust) > RELOC_ENUM *reloc; > int *adjust; > { > static const char * const mode_name[NUM_FLAG_CODE] = { "32", "16", "64" }; > static const struct { > const char *str; > const RELOC_ENUM rel[NUM_FLAG_CODE]; > } gotrel[] = { > { "PLT", { BFD_RELOC_386_PLT32, 0, BFD_RELOC_X86_64_PLT32 } }, > { "GOTOFF", { BFD_RELOC_386_GOTOFF, 0, 0 } }, > { "GOTPCREL", { 0, 0, BFD_RELOC_X86_64_GOTPCREL } }, > { "GOT", { BFD_RELOC_386_GOT32, 0, BFD_RELOC_X86_64_GOT32 } } > }; > char *cp; > unsigned int j; > > for (cp = input_line_pointer; *cp != '@'; cp++) > if (is_end_of_line[(unsigned char) *cp]) > return NULL; > > for (j = 0; j < sizeof (gotrel) / sizeof (gotrel[0]); j++) > { > int len; > > len = strlen (gotrel[j].str); > if (strncmp (cp + 1, gotrel[j].str, len) == 0) > { > if (gotrel[j].rel[(unsigned int) flag_code] != 0) > { > int first; > char *tmpbuf; > > *reloc = gotrel[j].rel[(unsigned int) flag_code]; > > if (GOT_symbol == NULL) > GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME); > > /* Replace the relocation token with ' ', so that > errors like foo@GOTOFF1 will be detected. */ > first = cp - input_line_pointer; > tmpbuf = xmalloc (strlen (input_line_pointer)); > memcpy (tmpbuf, input_line_pointer, first); > tmpbuf[first] = ' '; > strcpy (tmpbuf + first + 1, cp + 1 + len); > if (adjust) > *adjust = len; > return tmpbuf; > } > > as_bad (_("@%s reloc is not supported in %s bit mode"), > gotrel[j].str, mode_name[(unsigned int) flag_code]); > return NULL; > } > } > > /* Might be a symbol version string. Don't as_bad here. */ > return NULL; > } > > /* x86_cons_fix_new is called via the expression parsing code when a > reloc is needed. We use this hook to get the correct .got reloc. */ > static RELOC_ENUM got_reloc = NO_RELOC; > > void > x86_cons_fix_new (frag, off, len, exp) > fragS *frag; > unsigned int off; > unsigned int len; > expressionS *exp; > { > RELOC_ENUM r = reloc (len, 0, 0, got_reloc); > got_reloc = NO_RELOC; > fix_new_exp (frag, off, len, exp, 0, r); > } > > void > x86_cons (exp, size) > expressionS *exp; > int size; > { > if (size == 4) > { > /* Handle @GOTOFF and the like in an expression. */ > char *save; > char *gotfree_input_line; > int adjust; > > save = input_line_pointer; > gotfree_input_line = lex_got (&got_reloc, &adjust); > if (gotfree_input_line) > input_line_pointer = gotfree_input_line; > > expression (exp); > > if (gotfree_input_line) > { > /* expression () has merrily parsed up to the end of line, > or a comma - in the wrong buffer. Transfer how far > input_line_pointer has moved to the right buffer. */ > input_line_pointer = (save > + (input_line_pointer - gotfree_input_line) > + adjust); > free (gotfree_input_line); > } > } > else > expression (exp); > } > #endif > 3104a3243,3245 > #ifndef LEX_AT > char *gotfree_input_line; > #endif 3124,3188c3265,3267 < { < /* We can have operands of the form < @GOTOFF+ < Take the easy way out here and copy everything < into a temporary buffer... */ < register char *cp; < < cp = strchr (input_line_pointer, '@'); < if (cp != NULL) < { < char *tmpbuf; < int len = 0; < int first; < < /* GOT relocations are not supported in 16 bit mode. */ < if (flag_code == CODE_16BIT) < as_bad (_("GOT relocations not supported in 16 bit mode")); < < if (GOT_symbol == NULL) < GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME); < < if (strncmp (cp + 1, "PLT", 3) == 0) < { < if (flag_code == CODE_64BIT) < i.disp_reloc[this_operand] = BFD_RELOC_X86_64_PLT32; < else < i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32; < len = 3; < } < else if (strncmp (cp + 1, "GOTOFF", 6) == 0) < { < if (flag_code == CODE_64BIT) < as_bad ("GOTOFF relocations are unsupported in 64bit mode."); < i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF; < len = 6; < } < else if (strncmp (cp + 1, "GOTPCREL", 8) == 0) < { < if (flag_code == CODE_64BIT) < i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOTPCREL; < else < as_bad ("GOTPCREL relocations are supported only in 64bit mode."); < len = 8; < } < else if (strncmp (cp + 1, "GOT", 3) == 0) < { < if (flag_code == CODE_64BIT) < i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOT32; < else < i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32; < len = 3; < } < else < as_bad (_("bad reloc specifier in expression")); < < /* Replace the relocation token with ' ', so that errors like < foo@GOTOFF1 will be detected. */ < first = cp - input_line_pointer; < tmpbuf = (char *) alloca (strlen (input_line_pointer)); < memcpy (tmpbuf, input_line_pointer, first); < tmpbuf[first] = ' '; < strcpy (tmpbuf + first + 1, cp + 1 + len); < input_line_pointer = tmpbuf; < } < } --- > gotfree_input_line = lex_got (&i.reloc[this_operand], NULL); > if (gotfree_input_line) > input_line_pointer = gotfree_input_line; 3195c3274 < as_bad (_("ignoring junk `%s' after expression"), input_line_pointer); --- > as_bad (_("junk `%s' after expression"), input_line_pointer); 3197a3277,3280 > #ifndef LEX_AT > if (gotfree_input_line) > free (gotfree_input_line); > #endif 3251c3334 < static int i386_scale PARAMS ((char *)); --- > static char *i386_scale PARAMS ((char *)); 3253c3336 < static int --- > static char * 3257,3258c3340,3344 < if (!isdigit (*scale)) < goto bad_scale; --- > offsetT val; > char *save = input_line_pointer; > > input_line_pointer = scale; > val = get_absolute_expression (); 3260c3346 < switch (*scale) --- > switch (val) 3262,3263c3348,3349 < case '0': < case '1': --- > case 0: > case 1: 3266c3352 < case '2': --- > case 2: 3269c3355 < case '4': --- > case 4: 3272c3358 < case '8': --- > case 8: 3276d3361 < bad_scale: 3279c3364,3365 < return 0; --- > input_line_pointer = save; > return NULL; 3289c3375,3377 < return 1; --- > scale = input_line_pointer; > input_line_pointer = save; > return scale; 3301a3390,3392 > #ifndef LEX_AT > char *gotfree_input_line; > #endif 3362,3425c3453,3455 < { < /* We can have operands of the form < @GOTOFF+ < Take the easy way out here and copy everything < into a temporary buffer... */ < register char *cp; < < cp = strchr (input_line_pointer, '@'); < if (cp != NULL) < { < char *tmpbuf; < int len = 0; < int first; < < /* GOT relocations are not supported in 16 bit mode. */ < if (flag_code == CODE_16BIT) < as_bad (_("GOT relocations not supported in 16 bit mode")); < < if (GOT_symbol == NULL) < GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME); < < if (strncmp (cp + 1, "PLT", 3) == 0) < { < if (flag_code == CODE_64BIT) < i.disp_reloc[this_operand] = BFD_RELOC_X86_64_PLT32; < else < i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32; < len = 3; < } < else if (strncmp (cp + 1, "GOTOFF", 6) == 0) < { < if (flag_code == CODE_64BIT) < as_bad ("GOTOFF relocation is not supported in 64bit mode."); < i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF; < len = 6; < } < else if (strncmp (cp + 1, "GOTPCREL", 8) == 0) < { < if (flag_code != CODE_64BIT) < as_bad ("GOTPCREL relocation is supported only in 64bit mode."); < i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOTPCREL; < len = 8; < } < else if (strncmp (cp + 1, "GOT", 3) == 0) < { < if (flag_code == CODE_64BIT) < i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOT32; < else < i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32; < len = 3; < } < else < as_bad (_("bad reloc specifier in expression")); < < /* Replace the relocation token with ' ', so that errors like < foo@GOTOFF1 will be detected. */ < first = cp - input_line_pointer; < tmpbuf = (char *) alloca (strlen (input_line_pointer)); < memcpy (tmpbuf, input_line_pointer, first); < tmpbuf[first] = ' '; < strcpy (tmpbuf + first + 1, cp + 1 + len); < input_line_pointer = tmpbuf; < } < } --- > gotfree_input_line = lex_got (&i.reloc[this_operand], NULL); > if (gotfree_input_line) > input_line_pointer = gotfree_input_line; 3429a3460,3472 > SKIP_WHITESPACE (); > if (*input_line_pointer) > as_bad (_("junk `%s' after expression"), input_line_pointer); > #if GCC_ASM_O_HACK > RESTORE_END_STRING (disp_end + 1); > #endif > RESTORE_END_STRING (disp_end); > input_line_pointer = save_input_line_pointer; > #ifndef LEX_AT > if (gotfree_input_line) > free (gotfree_input_line); > #endif > 3434,3435c3477,3478 < if (i.disp_reloc[this_operand] == BFD_RELOC_386_GOTOFF < || i.disp_reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL) --- > if (i.reloc[this_operand] == BFD_RELOC_386_GOTOFF > || i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL) 3436a3480,3488 > if (exp->X_op != O_symbol) > { > as_bad (_("bad expression used with @%s"), > (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL > ? "GOTPCREL" > : "GOTOFF")); > return 0; > } > 3440d3491 < assert (exp->X_op == O_symbol); 3443,3444c3494,3495 < if (i.disp_reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL) < i.disp_reloc[this_operand] = BFD_RELOC_32_PCREL; --- > if (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL) > i.reloc[this_operand] = BFD_RELOC_32_PCREL; 3446c3497 < i.disp_reloc[this_operand] = BFD_RELOC_32; --- > i.reloc[this_operand] = BFD_RELOC_32; 3450,3459d3500 < SKIP_WHITESPACE (); < if (*input_line_pointer) < as_bad (_("ignoring junk `%s' after expression"), < input_line_pointer); < #if GCC_ASM_O_HACK < RESTORE_END_STRING (disp_end + 1); < #endif < RESTORE_END_STRING (disp_end); < input_line_pointer = save_input_line_pointer; < 3792c3833 < if (isdigit ((unsigned char) *base_string)) --- > if (*base_string != ')') 3794c3835,3837 < if (!i386_scale (base_string)) --- > char *end_scale = i386_scale (base_string); > > if (!end_scale) 3797c3840 < ++base_string; --- > base_string = end_scale; 3898,3902c3941 < #ifdef BFD_ASSEMBLER < enum bfd_reloc_code_real reloc_type; < #else < int reloc_type; < #endif --- > RELOC_ENUM reloc_type; 3916c3955 < switch (opcode[0]) --- > switch (TYPE_FROM_RELAX_STATE (fragP->fr_subtype)) 3918,3919c3957,3958 < case JUMP_PC_RELATIVE: < /* Make jmp (0xeb) a dword displacement jump. */ --- > case UNCOND_JUMP: > /* Make jmp (0xeb) a (d)word displacement jump. */ 3928c3967,3993 < default: --- > case COND_JUMP86: > if (no_cond_jump_promotion) > goto relax_guess; > > if (size == 2) > { > /* Negate the condition, and branch past an > unconditional jump. */ > opcode[0] ^= 1; > opcode[1] = 3; > /* Insert an unconditional jump. */ > opcode[2] = 0xe9; > /* We added two extra opcode bytes, and have a two byte > offset. */ > fragP->fr_fix += 2 + 2; > fix_new (fragP, old_fr_fix + 2, 2, > fragP->fr_symbol, > fragP->fr_offset, 1, > reloc_type); > break; > } > /* Fall through. */ > > case COND_JUMP: > if (no_cond_jump_promotion) > goto relax_guess; > 3930c3995 < to the dword-displacement jump 0x0f,0x8N. */ --- > to the (d)word-displacement jump 0x0f,0x8N. */ 3939a4005,4008 > > default: > BAD_CASE (fragP->fr_subtype); > break; 3944,3945c4013,4021 < /* Guess a short jump. */ < return 1; --- > > relax_guess: > /* Guess size depending on current relax state. Initially the relax > state will correspond to a short jump and we return 1, because > the variable part of the frag (the branch offset) is one byte > long. However, we can relax a section more than once and in that > case we must either set fr_subtype back to the unrelaxed state, > or return the value for the appropriate branch. */ > return md_relax_table[fragP->fr_subtype].rlx_length; 3985c4061 < /* Local symbols which have already been resolved have a NULL frags. */ --- > /* Local symbols which have already been resolved have a NULL frag. */ 3998c4074 < switch (fragP->fr_subtype) --- > if ((fragP->fr_subtype & BIG) == 0) 4000,4003d4075 < case ENCODE_RELAX_STATE (COND_JUMP, SMALL): < case ENCODE_RELAX_STATE (COND_JUMP, SMALL16): < case ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL): < case ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL16): 4007c4079,4084 < break; --- > } > else > { > if (no_cond_jump_promotion > && TYPE_FROM_RELAX_STATE (fragP->fr_subtype) != UNCOND_JUMP) > as_warn_where (fragP->fr_file, fragP->fr_line, _("long jump required")); 4009,4014c4086,4092 < case ENCODE_RELAX_STATE (COND_JUMP, BIG): < extension = 5; /* 2 opcode + 4 displacement */ < opcode[1] = opcode[0] + 0x10; < opcode[0] = TWO_BYTE_OPCODE_ESCAPE; < where_to_put_displacement = &opcode[2]; < break; --- > switch (fragP->fr_subtype) > { > case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG): > extension = 4; /* 1 opcode + 4 displacement */ > opcode[0] = 0xe9; > where_to_put_displacement = &opcode[1]; > break; 4016,4020c4094,4098 < case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG): < extension = 4; /* 1 opcode + 4 displacement */ < opcode[0] = 0xe9; < where_to_put_displacement = &opcode[1]; < break; --- > case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16): > extension = 2; /* 1 opcode + 2 displacement */ > opcode[0] = 0xe9; > where_to_put_displacement = &opcode[1]; > break; 4022,4027c4100,4106 < case ENCODE_RELAX_STATE (COND_JUMP, BIG16): < extension = 3; /* 2 opcode + 2 displacement */ < opcode[1] = opcode[0] + 0x10; < opcode[0] = TWO_BYTE_OPCODE_ESCAPE; < where_to_put_displacement = &opcode[2]; < break; --- > case ENCODE_RELAX_STATE (COND_JUMP, BIG): > case ENCODE_RELAX_STATE (COND_JUMP86, BIG): > extension = 5; /* 2 opcode + 4 displacement */ > opcode[1] = opcode[0] + 0x10; > opcode[0] = TWO_BYTE_OPCODE_ESCAPE; > where_to_put_displacement = &opcode[2]; > break; 4029,4033c4108,4113 < case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16): < extension = 2; /* 1 opcode + 2 displacement */ < opcode[0] = 0xe9; < where_to_put_displacement = &opcode[1]; < break; --- > case ENCODE_RELAX_STATE (COND_JUMP, BIG16): > extension = 3; /* 2 opcode + 2 displacement */ > opcode[1] = opcode[0] + 0x10; > opcode[0] = TWO_BYTE_OPCODE_ESCAPE; > where_to_put_displacement = &opcode[2]; > break; 4035,4037c4115,4126 < default: < BAD_CASE (fragP->fr_subtype); < break; --- > case ENCODE_RELAX_STATE (COND_JUMP86, BIG16): > extension = 4; > opcode[0] ^= 1; > opcode[1] = 3; > opcode[2] = 0xe9; > where_to_put_displacement = &opcode[3]; > break; > > default: > BAD_CASE (fragP->fr_subtype); > break; > } 4038a4128 > 4042c4132 < SIZE_FROM_RELAX_STATE (fragP->fr_subtype)); --- > DISP_SIZE_FROM_RELAX_STATE (fragP->fr_subtype)); diff -rN binutils-2.11/gas/config/tc-i386.h binutils-2.11.2/gas/config/tc-i386.h 2,3c2,4 < Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 < Free Software Foundation. --- > Copyright 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, > 2001 > Free Software Foundation, Inc. 155a157,165 > > #ifndef LEX_AT > #define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) x86_cons (EXP, NBYTES) > extern void x86_cons PARAMS ((expressionS *, int)); > > #define TC_CONS_FIX_NEW(FRAG,OFF,LEN,EXP) x86_cons_fix_new(FRAG, OFF, LEN, EXP) > extern void x86_cons_fix_new > PARAMS ((fragS *, unsigned int, unsigned int, expressionS *)); > #endif diff -rN binutils-2.11/gas/config/tc-i860.c binutils-2.11.2/gas/config/tc-i860.c 2c2 < Copyright (C) 1989, 1992, 1993, 1994, 1995, 1998, 1999, 2000 --- > Copyright 1989, 1992, 1993, 1994, 1995, 1998, 1999, 2000 diff -rN binutils-2.11/gas/config/tc-i860.h binutils-2.11.2/gas/config/tc-i860.h 2c2 < Copyright (C) 1991, 1992, 1995, 1998, 2000 --- > Copyright 1991, 1992, 1995, 1998, 2000 diff -rN binutils-2.11/gas/config/tc-i960.c binutils-2.11.2/gas/config/tc-i960.c 2c2,3 < Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, > 1999, 2000, 2001 diff -rN binutils-2.11/gas/config/tc-i960.h binutils-2.11.2/gas/config/tc-i960.h 2c2,3 < Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999, > 2000 diff -rN binutils-2.11/gas/config/tc-ia64.c binutils-2.11.2/gas/config/tc-ia64.c 2c2 < Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation. --- > Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc. 3167a3168 > frag_align (3, 0, 0); 3616c3617 < add_unwind_entry (output_spill_psprel_p (qp, ab, reg, e3.X_add_number)); --- > add_unwind_entry (output_spill_psprel_p (ab, reg, e3.X_add_number, qp)); 3618c3619 < add_unwind_entry (output_spill_sprel_p (qp, ab, reg, e3.X_add_number)); --- > add_unwind_entry (output_spill_sprel_p (ab, reg, e3.X_add_number, qp)); 6871a6873,6874 > /* Return true if idesc is a conditional branch instruction. */ > 6876,6884c6879,6885 < return (strncmp (idesc->name, "br", 2) == 0 < && (strcmp (idesc->name, "br") == 0 < || strncmp (idesc->name, "br.cond", 7) == 0 < || strncmp (idesc->name, "br.call", 7) == 0 < || strncmp (idesc->name, "br.ret", 6) == 0 < || strcmp (idesc->name, "brl") == 0 < || strncmp (idesc->name, "brl.cond", 7) == 0 < || strncmp (idesc->name, "brl.call", 7) == 0 < || strncmp (idesc->name, "brl.ret", 6) == 0)); --- > /* br is a conditional branch. Everything that starts with br. except > br.ia is a conditional branch. Everything that starts with brl is a > conditional branch. */ > return (idesc->name[0] == 'b' && idesc->name[1] == 'r' > && (idesc->name[2] == '\0' > || (idesc->name[2] == '.' && idesc->name[3] != 'i') > || idesc->name[2] == 'l')); diff -rN binutils-2.11/gas/config/tc-ia64.h binutils-2.11.2/gas/config/tc-ia64.h 2c2 < Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. --- > Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-m32r.c binutils-2.11.2/gas/config/tc-m32r.c 2c2 < Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 1387c1387,1388 < m32r_relax_frag (fragP, stretch) --- > m32r_relax_frag (segment, fragP, stretch) > segT segment; 1414c1415 < growth = relax_frag (fragP, stretch); --- > growth = relax_frag (segment, fragP, stretch); 1443,1444d1443 < int old_fr_fix = fragP->fr_fix; < 1452a1452,1453 > int old_fr_fix = fragP->fr_fix; > 1475a1477 > return fragP->fr_fix - old_fr_fix; 1502c1504 < return (fragP->fr_var + fragP->fr_fix - old_fr_fix); --- > return md_relax_table[fragP->fr_subtype].rlx_length; diff -rN binutils-2.11/gas/config/tc-m32r.h binutils-2.11.2/gas/config/tc-m32r.h 2c2,3 < Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 57,59c58,60 < extern long m32r_relax_frag PARAMS ((fragS *, long)); < #define md_relax_frag(fragP, stretch) \ < m32r_relax_frag (fragP, stretch) --- > extern long m32r_relax_frag PARAMS ((segT, fragS *, long)); > #define md_relax_frag(segment, fragP, stretch) \ > m32r_relax_frag (segment, fragP, stretch) diff -rN binutils-2.11/gas/config/tc-m68851.h binutils-2.11.2/gas/config/tc-m68851.h 3c3,4 < Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc. --- > Copyright 1987, 1988, 1989, 1990, 1991, 1992, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-m68hc11.c binutils-2.11.2/gas/config/tc-m68hc11.c 2c2 < Copyright (C) 1999, 2000, 2001 Free Software Foundation. --- > Copyright 1999, 2000, 2001 Free Software Foundation, Inc. 51a52,53 > #define RELAX_STATE(s) ((s) >> 2) > #define RELAX_LENGTH(s) ((s) & 3) 2566,2567c2568,2575 < int old_fr_fix; < char *buffer_address = fragP->fr_fix + fragP->fr_literal; --- > if (RELAX_LENGTH (fragP->fr_subtype) == STATE_UNDF) > { > if (S_GET_SEGMENT (fragP->fr_symbol) != segment > || !relaxable_symbol (fragP->fr_symbol)) > { > /* Non-relaxable cases. */ > int old_fr_fix; > char *buffer_address; 2569c2577,2578 < old_fr_fix = fragP->fr_fix; --- > old_fr_fix = fragP->fr_fix; > buffer_address = fragP->fr_fix + fragP->fr_literal; 2571,2573c2580,2582 < switch (fragP->fr_subtype) < { < case ENCODE_RELAX (STATE_PC_RELATIVE, STATE_UNDF): --- > switch (RELAX_STATE (fragP->fr_subtype)) > { > case STATE_PC_RELATIVE: 2575,2578c2584,2587 < /* This relax is only for bsr and bra. */ < assert (IS_OPCODE (fragP->fr_opcode[0], M6811_BSR) < || IS_OPCODE (fragP->fr_opcode[0], M6811_BRA) < || IS_OPCODE (fragP->fr_opcode[0], M6812_BSR)); --- > /* This relax is only for bsr and bra. */ > assert (IS_OPCODE (fragP->fr_opcode[0], M6811_BSR) > || IS_OPCODE (fragP->fr_opcode[0], M6811_BRA) > || IS_OPCODE (fragP->fr_opcode[0], M6812_BSR)); 2580,2600c2589,2662 < /* A relaxable case. */ < if (S_GET_SEGMENT (fragP->fr_symbol) == segment < && relaxable_symbol (fragP->fr_symbol)) < { < fragP->fr_subtype = ENCODE_RELAX (STATE_PC_RELATIVE, STATE_BYTE); < } < else < { < if (flag_fixed_branchs) < as_bad_where (fragP->fr_file, fragP->fr_line, < _("bra or bsr with undefined symbol.")); < < /* The symbol is undefined or in a separate section. Turn bra into a < jmp and bsr into a jsr. The insn becomes 3 bytes long (instead of < 2). A fixup is necessary for the unresolved symbol address. */ < < fragP->fr_opcode[0] = convert_branch (fragP->fr_opcode[0]); < < fragP->fr_fix++; < fix_new (fragP, old_fr_fix - 1, 2, fragP->fr_symbol, < fragP->fr_offset, 0, BFD_RELOC_16); --- > if (flag_fixed_branchs) > as_bad_where (fragP->fr_file, fragP->fr_line, > _("bra or bsr with undefined symbol.")); > > /* The symbol is undefined or in a separate section. > Turn bra into a jmp and bsr into a jsr. The insn > becomes 3 bytes long (instead of 2). A fixup is > necessary for the unresolved symbol address. */ > fragP->fr_opcode[0] = convert_branch (fragP->fr_opcode[0]); > > fragP->fr_fix++; > fix_new (fragP, old_fr_fix - 1, 2, fragP->fr_symbol, > fragP->fr_offset, 0, BFD_RELOC_16); > break; > > case STATE_CONDITIONAL_BRANCH: > assert (current_architecture & cpu6811); > > fragP->fr_opcode[0] ^= 1; /* Reverse sense of branch. */ > fragP->fr_opcode[1] = 3; /* Skip next jmp insn (3 bytes). */ > > /* Don't use fr_opcode[2] because this may be > in a different frag. */ > buffer_address[0] = M6811_JMP; > > fragP->fr_fix++; > fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, > fragP->fr_offset, 0, BFD_RELOC_16); > fragP->fr_fix += 2; > break; > > case STATE_INDEXED_OFFSET: > assert (current_architecture & cpu6812); > > /* Switch the indexed operation to 16-bit mode. */ > fragP->fr_opcode[0] = fragP->fr_opcode[0] << 3; > fragP->fr_opcode[0] |= 0xe2; > fragP->fr_fix++; > fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, > fragP->fr_offset, 0, BFD_RELOC_16); > fragP->fr_fix++; > break; > > case STATE_XBCC_BRANCH: > assert (current_architecture & cpu6812); > > fragP->fr_opcode[0] ^= 0x20; /* Reverse sense of branch. */ > fragP->fr_opcode[1] = 3; /* Skip next jmp insn (3 bytes). */ > > /* Don't use fr_opcode[2] because this may be > in a different frag. */ > buffer_address[0] = M6812_JMP; > > fragP->fr_fix++; > fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, > fragP->fr_offset, 0, BFD_RELOC_16); > fragP->fr_fix += 2; > break; > > case STATE_CONDITIONAL_BRANCH_6812: > assert (current_architecture & cpu6812); > > /* Translate into a lbcc branch. */ > fragP->fr_opcode[1] = fragP->fr_opcode[0]; > fragP->fr_opcode[0] = M6811_OPCODE_PAGE2; > > fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, > fragP->fr_offset, 0, BFD_RELOC_16_PCREL); > fragP->fr_fix += 2; > break; > > default: > as_fatal (_("Subtype %d is not recognized."), fragP->fr_subtype); > } 2602,2603d2663 < } < break; 2605,2606c2665,2667 < case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_UNDF): < assert (current_architecture & cpu6811); --- > /* Return the growth in the fixed part of the frag. */ > return fragP->fr_fix - old_fr_fix; > } 2608,2609c2669,2670 < if (S_GET_SEGMENT (fragP->fr_symbol) == segment < && relaxable_symbol (fragP->fr_symbol)) --- > /* Relaxable cases. */ > switch (RELAX_STATE (fragP->fr_subtype)) 2610a2672,2683 > case STATE_PC_RELATIVE: > /* This relax is only for bsr and bra. */ > assert (IS_OPCODE (fragP->fr_opcode[0], M6811_BSR) > || IS_OPCODE (fragP->fr_opcode[0], M6811_BRA) > || IS_OPCODE (fragP->fr_opcode[0], M6812_BSR)); > > fragP->fr_subtype = ENCODE_RELAX (STATE_PC_RELATIVE, STATE_BYTE); > break; > > case STATE_CONDITIONAL_BRANCH: > assert (current_architecture & cpu6811); > 2613,2629c2686 < } < else < { < fragP->fr_opcode[0] ^= 1; /* Reverse sense of branch. */ < fragP->fr_opcode[1] = 3; /* Skip next jmp insn (3 bytes). */ < < /* Don't use fr_opcode[2] because this may be < in a different frag. */ < buffer_address[0] = M6811_JMP; < < fragP->fr_fix++; < fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, < fragP->fr_offset, 0, BFD_RELOC_16); < fragP->fr_fix += 2; < frag_wane (fragP); < } < break; --- > break; 2631,2632c2688,2689 < case ENCODE_RELAX (STATE_INDEXED_OFFSET, STATE_UNDF): < assert (current_architecture & cpu6812); --- > case STATE_INDEXED_OFFSET: > assert (current_architecture & cpu6812); 2634,2636d2690 < if (S_GET_SEGMENT (fragP->fr_symbol) == segment < && relaxable_symbol (fragP->fr_symbol)) < { 2639,2651c2693 < } < else < { < /* Switch the indexed operation to 16-bit mode. */ < fragP->fr_opcode[0] = fragP->fr_opcode[0] << 3; < fragP->fr_opcode[0] |= 0xe2; < fragP->fr_fix++; < fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, < fragP->fr_offset, 0, BFD_RELOC_16); < fragP->fr_fix++; < frag_wane (fragP); < } < break; --- > break; 2653,2654c2695,2696 < case ENCODE_RELAX (STATE_XBCC_BRANCH, STATE_UNDF): < assert (current_architecture & cpu6812); --- > case STATE_XBCC_BRANCH: > assert (current_architecture & cpu6812); 2656,2658d2697 < if (S_GET_SEGMENT (fragP->fr_symbol) == segment < && relaxable_symbol (fragP->fr_symbol)) < { 2660,2676c2699 < } < else < { < fragP->fr_opcode[0] ^= 0x20; /* Reverse sense of branch. */ < fragP->fr_opcode[1] = 3; /* Skip next jmp insn (3 bytes). */ < < /* Don't use fr_opcode[2] because this may be < in a different frag. */ < buffer_address[0] = M6812_JMP; < < fragP->fr_fix++; < fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, < fragP->fr_offset, 0, BFD_RELOC_16); < fragP->fr_fix += 2; < frag_wane (fragP); < } < break; --- > break; 2678,2679c2701,2702 < case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH_6812, STATE_UNDF): < assert (current_architecture & cpu6812); --- > case STATE_CONDITIONAL_BRANCH_6812: > assert (current_architecture & cpu6812); 2681,2683d2703 < if (S_GET_SEGMENT (fragP->fr_symbol) == segment < && relaxable_symbol (fragP->fr_symbol)) < { 2685a2706 > break; 2687,2701d2707 < else < { < /* Translate into a lbcc branch. */ < fragP->fr_opcode[1] = fragP->fr_opcode[0]; < fragP->fr_opcode[0] = M6811_OPCODE_PAGE2; < < fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, < fragP->fr_offset, 0, BFD_RELOC_16_PCREL); < fragP->fr_fix += 2; < frag_wane (fragP); < } < break; < < default: < as_fatal (_("Subtype %d is not recognized."), fragP->fr_subtype); 2704c2710,2714 < return (fragP->fr_fix - old_fr_fix); --- > if (fragP->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0])) > as_fatal (_("Subtype %d is not recognized."), fragP->fr_subtype); > > /* Return the size of the variable part of the frag. */ > return md_relax_table[fragP->fr_subtype].rlx_length; diff -rN binutils-2.11/gas/config/tc-m68hc11.h binutils-2.11.2/gas/config/tc-m68hc11.h 2c2 < Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. --- > Copyright 1999, 2000, 2001 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-m68k.c binutils-2.11.2/gas/config/tc-m68k.c 2c2,3 < Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > 2000, 2001 232c233 < #define HAVE_LONG_BRANCH(x) ((x) & (m68020|m68030|m68040|m68060|cpu32)) --- > #define HAVE_LONG_BRANCH(x) ((x) & (m68020|m68030|m68040|m68060|cpu32|mcf5407)) 354,358c355,360 < struct m68k_cpu { < unsigned long arch; < const char *name; < int alias; < }; --- > struct m68k_cpu > { > unsigned long arch; > const char *name; > int alias; > }; 360,403c362,407 < static const struct m68k_cpu archs[] = { < { m68000, "68000", 0 }, < { m68010, "68010", 0 }, < { m68020, "68020", 0 }, < { m68030, "68030", 0 }, < { m68040, "68040", 0 }, < { m68060, "68060", 0 }, < { cpu32, "cpu32", 0 }, < { m68881, "68881", 0 }, < { m68851, "68851", 0 }, < { mcf5200, "5200", 0 }, < { mcf5206e, "5206e", 0 }, < { mcf5307, "5307", 0}, < /* Aliases (effectively, so far as gas is concerned) for the above < cpus. */ < { m68020, "68k", 1 }, < { m68000, "68008", 1 }, < { m68000, "68302", 1 }, < { m68000, "68306", 1 }, < { m68000, "68307", 1 }, < { m68000, "68322", 1 }, < { m68000, "68356", 1 }, < { m68000, "68ec000", 1 }, < { m68000, "68hc000", 1 }, < { m68000, "68hc001", 1 }, < { m68020, "68ec020", 1 }, < { m68030, "68ec030", 1 }, < { m68040, "68ec040", 1 }, < { m68060, "68ec060", 1 }, < { cpu32, "68330", 1 }, < { cpu32, "68331", 1 }, < { cpu32, "68332", 1 }, < { cpu32, "68333", 1 }, < { cpu32, "68334", 1 }, < { cpu32, "68336", 1 }, < { cpu32, "68340", 1 }, < { cpu32, "68341", 1 }, < { cpu32, "68349", 1 }, < { cpu32, "68360", 1 }, < { m68881, "68882", 1 }, < { mcf5200, "5202", 1 }, < { mcf5200, "5204", 1 }, < { mcf5200, "5206", 1 }, < }; --- > static const struct m68k_cpu archs[] = > { > { m68000, "68000", 0 }, > { m68010, "68010", 0 }, > { m68020, "68020", 0 }, > { m68030, "68030", 0 }, > { m68040, "68040", 0 }, > { m68060, "68060", 0 }, > { cpu32, "cpu32", 0 }, > { m68881, "68881", 0 }, > { m68851, "68851", 0 }, > { mcf5200, "5200", 0 }, > { mcf5206e, "5206e", 0 }, > { mcf5307, "5307", 0}, > { mcf5407, "5407", 0}, > /* Aliases (effectively, so far as gas is concerned) for the above > cpus. */ > { m68020, "68k", 1 }, > { m68000, "68008", 1 }, > { m68000, "68302", 1 }, > { m68000, "68306", 1 }, > { m68000, "68307", 1 }, > { m68000, "68322", 1 }, > { m68000, "68356", 1 }, > { m68000, "68ec000", 1 }, > { m68000, "68hc000", 1 }, > { m68000, "68hc001", 1 }, > { m68020, "68ec020", 1 }, > { m68030, "68ec030", 1 }, > { m68040, "68ec040", 1 }, > { m68060, "68ec060", 1 }, > { cpu32, "68330", 1 }, > { cpu32, "68331", 1 }, > { cpu32, "68332", 1 }, > { cpu32, "68333", 1 }, > { cpu32, "68334", 1 }, > { cpu32, "68336", 1 }, > { cpu32, "68340", 1 }, > { cpu32, "68341", 1 }, > { cpu32, "68349", 1 }, > { cpu32, "68360", 1 }, > { m68881, "68882", 1 }, > { mcf5200, "5202", 1 }, > { mcf5200, "5204", 1 }, > { mcf5200, "5206", 1 }, > }; 712a717,729 > /* Return zero if the reference to SYMBOL from within the same segment may > be relaxed. */ > > /* On an ELF system, we can't relax an externally visible symbol, > because it may be overridden by a shared library. However, if > TARGET_OS is "elf", then we presume that we are assembling for an > embedded system, in which case we don't have to worry about shared > libraries, and we can relax any external sym. */ > > #define relaxable_symbol(symbol) \ > (!((S_IS_EXTERNAL (symbol) && strcmp (TARGET_OS, "elf") != 0) \ > || S_IS_WEAK (symbol))) > 831,832c848 < if (S_IS_EXTERNAL (fixP->fx_addsy) < || S_IS_WEAK (fixP->fx_addsy)) --- > if (! relaxable_symbol (fixP->fx_addsy)) 864a881,882 > #define relaxable_symbol(symbol) 1 > 967,968c985,987 < + (fixp->fx_pcrel_adjust == 64 < ? -1 : fixp->fx_pcrel_adjust) --- > /* Explicit sign extension in case char is > unsigned. */ > + ((fixp->fx_pcrel_adjust & 0xff) ^ 0x80) - 0x80 981,1001d999 < /* Return zero if the reference to SYMBOL from within the same segment may < be relaxed. */ < #ifdef OBJ_ELF < < /* On an ELF system, we can't relax an externally visible symbol, < because it may be overridden by a shared library. However, if < TARGET_OS is "elf", then we presume that we are assembling for an < embedded system, in which case we don't have to worry about shared < libraries, and we can relax anything. */ < < #define relaxable_symbol(symbol) \ < (strcmp (TARGET_OS, "elf") == 0 \ < || (! S_IS_EXTERNAL (symbol) \ < && ! S_IS_WEAK (symbol))) < < #else < < #define relaxable_symbol(symbol) 1 < < #endif < 2545,2549c2543 < /* The pc_fix argument winds up in fx_pcrel_adjust, < which is a char, and may therefore be unsigned. We < want to pass -1, but we pass 64 instead, and convert < back in md_pcrel_from. */ < add_fix ('B', &opP->disp, 1, 64); --- > add_fix ('B', &opP->disp, 1, -1); 3672a3667,3681 > { > /* Calculate the max frag size. */ > int wid; > > wid = 2 * the_ins.fragb[0].fragoff; > for (n = 1; n < the_ins.nfrag; n++) > wid += 2 * (the_ins.numo - the_ins.fragb[n - 1].fragoff); > /* frag_var part. */ > wid += 10; > /* Make sure the whole insn fits in one chunk, in particular that > the var part is attached, as we access one byte before the > variable frag for byte branches. */ > frag_grow (wid); > } > 3967a3977 > case mcf5407: 4227,4230c4237 < if (val & 0x80000000) < val |= ~(addressT)0x7fffffff; < else < val &= 0x7fffffff; --- > val = ((val & 0xffffffff) ^ 0x80000000) - 0x80000000; 4585,4605d4591 < { < if (S_GET_SEGMENT (fragP->fr_symbol) == segment < && relaxable_symbol (fragP->fr_symbol)) < { < fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), BYTE); < } < else if (flag_short_refs) < { < /* Symbol is undefined and we want short ref. */ < fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), SHORT); < fragP->fr_var += 2; < } < else < { < /* Symbol is still undefined. Make it LONG. */ < fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), LONG); < fragP->fr_var += 4; < } < break; < } < 4617d4602 < fragP->fr_var += 2; 4623d4607 < fragP->fr_var += 6; 4639d4622 < fragP->fr_var += 2; 4645,4660d4627 < { < if ((S_GET_SEGMENT (fragP->fr_symbol) == segment < && relaxable_symbol (fragP->fr_symbol)) < || flag_short_refs) < { < fragP->fr_subtype = TAB (FBRANCH, SHORT); < fragP->fr_var += 2; < } < else < { < fragP->fr_subtype = TAB (FBRANCH, LONG); < fragP->fr_var += 4; < } < break; < } < 4662a4630 > case TAB (PCREL1632, SZ_UNDEF): 4669d4636 < fragP->fr_var += 2; 4674,4691d4640 < fragP->fr_var += 10; < } < break; < } < < case TAB (PCREL1632, SZ_UNDEF): < { < if (((S_GET_SEGMENT (fragP->fr_symbol)) == segment < && relaxable_symbol (fragP->fr_symbol)) < || flag_short_refs) < { < fragP->fr_subtype = TAB (PCREL1632, SHORT); < fragP->fr_var += 2; < } < else < { < fragP->fr_subtype = TAB (PCREL1632, LONG); < fragP->fr_var += 6; 4705d4653 < fragP->fr_var += 4; 4715d4662 < fragP->fr_var += 2; 4720d4666 < fragP->fr_var += 4; 4755d4700 < fragP->fr_var += 2; 4761a4707 > fragP->fr_var = md_relax_table[fragP->fr_subtype].rlx_length; 6944,6946c6890,6892 < -m68000 | -m68008 | -m68010 | -m68020 | -m68030 | -m68040 | -m68060\n\ < | -m68302 | -m68331 | -m68332 | -m68333 | -m68340 | -m68360\n\ < | -mcpu32 | -m5200\n\ --- > -m68000 | -m68008 | -m68010 | -m68020 | -m68030 | -m68040 | -m68060 |\n\ > -m68302 | -m68331 | -m68332 | -m68333 | -m68340 | -m68360 | -mcpu32 |\n\ > -m5200 | -m5202 | -m5204 | -m5206 | -m5206e | -m5307 | -m5407\n\ 7100,7102c7046,7048 < /* Because fx_pcrel_adjust is a char, and may be unsigned, we store < -1 as 64. */ < adjust = fixP->fx_pcrel_adjust; --- > /* Because fx_pcrel_adjust is a char, and may be unsigned, we explicitly > sign extend the value here. */ > adjust = ((fixP->fx_pcrel_adjust & 0xff) ^ 0x80) - 0x80; diff -rN binutils-2.11/gas/config/tc-m68k.h binutils-2.11.2/gas/config/tc-m68k.h 2c2,3 < Copyright (C) 1987, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, > 1998, 1999, 2000 diff -rN binutils-2.11/gas/config/tc-m88k.c binutils-2.11.2/gas/config/tc-m88k.c 4c4,5 < Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999 --- > Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, > 2000 diff -rN binutils-2.11/gas/config/tc-m88k.h binutils-2.11.2/gas/config/tc-m88k.h 4c4 < Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 2000 --- > Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000 diff -rN binutils-2.11/gas/config/tc-mcore.c binutils-2.11.2/gas/config/tc-mcore.c 2c2 < Copyright (C) 1999, 2000 Free Software Foundation. --- > Copyright 1999, 2000, 2001 Free Software Foundation, Inc. 95,100c95,97 < #define COND12 1 < #define COND32 2 < #define UNCD12 1 < #define UNCD32 2 < #define UNDEF_WORD_DISP 4 < #define END 5 --- > #define DISP12 1 > #define DISP32 2 > #define UNDEF_WORD_DISP 3 117,131c114,131 < const relax_typeS md_relax_table[] = < { < { 1, 1, 0, 0 }, /* 0: unused */ < { 1, 1, 0, 0 }, /* 1: unused */ < { 1, 1, 0, 0 }, /* 2: unused */ < { 1, 1, 0, 0 }, /* 3: unused */ < { 1, 1, 0, 0 }, /* 4: unused */ < { 2048, -2046, C12_LEN, C(COND_JUMP, COND32) }, /* 5: C(COND_JUMP, COND12) */ < { 0, 0, C32_LEN, 0 }, /* 6: C(COND_JUMP, COND32) */ < { 1, 1, 0, 0 }, /* 7: unused */ < { 1, 1, 0, 0 }, /* 8: unused */ < { 2048, -2046, U12_LEN, C(UNCD_JUMP, UNCD32) }, /* 9: C(UNCD_JUMP, UNCD12) */ < { 0, 0, U32_LEN, 0 }, /*10: C(UNCD_JUMP, UNCD32) */ < { 1, 1, 0, 0 }, /*11: unused */ < { 0, 0, 0, 0 } /*12: unused */ --- > const relax_typeS md_relax_table[] = { > { 0, 0, 0, 0 }, > { 0, 0, 0, 0 }, > { 0, 0, 0, 0 }, > { 0, 0, 0, 0 }, > > /* COND_JUMP */ > { 0, 0, 0, 0 }, /* UNDEF_DISP */ > { 2048, -2046, C12_LEN, C(COND_JUMP, DISP32) }, /* DISP12 */ > { 0, 0, C32_LEN, 0 }, /* DISP32 */ > { 0, 0, C32_LEN, 0 }, /* UNDEF_WORD_DISP */ > > /* UNCD_JUMP */ > { 0, 0, 0, 0 }, /* UNDEF_DISP */ > { 2048, -2046, U12_LEN, C(UNCD_JUMP, DISP32) }, /* DISP12 */ > { 0, 0, U32_LEN, 0 }, /* DISP32 */ > { 0, 0, U32_LEN, 0 } /* UNDEF_WORD_DISP */ > 708,709c708,709 < md_relax_table[C (UNCD_JUMP, UNCD32)].rlx_length, < md_relax_table[C (UNCD_JUMP, UNCD12)].rlx_length, --- > md_relax_table[C (UNCD_JUMP, DISP32)].rlx_length, > md_relax_table[C (UNCD_JUMP, DISP12)].rlx_length, 1561,1562c1561,1562 < md_relax_table[C (COND_JUMP, COND32)].rlx_length, < md_relax_table[C (COND_JUMP, COND12)].rlx_length, --- > md_relax_table[C (COND_JUMP, DISP32)].rlx_length, > md_relax_table[C (COND_JUMP, DISP12)].rlx_length, 1572,1573c1572,1573 < md_relax_table[C (UNCD_JUMP, UNCD32)].rlx_length, < md_relax_table[C (UNCD_JUMP, UNCD12)].rlx_length, --- > md_relax_table[C (UNCD_JUMP, DISP32)].rlx_length, > md_relax_table[C (UNCD_JUMP, DISP12)].rlx_length, 1907,1908c1907,1908 < case C (COND_JUMP, COND12): < case C (UNCD_JUMP, UNCD12): --- > case C (COND_JUMP, DISP12): > case C (UNCD_JUMP, DISP12): 1938d1937 < fragP->fr_var = 0; 1942c1941 < case C (COND_JUMP, COND32): --- > case C (COND_JUMP, DISP32): 2029,2030d2027 < < fragP->fr_var = 0; 2034c2031 < case C (UNCD_JUMP, UNCD32): --- > case C (UNCD_JUMP, DISP32): 2085,2086d2081 < < fragP->fr_var = 0; 2249a2245,2247 > default: > abort (); > 2254,2255c2252 < fragP->fr_subtype = C (UNCD_JUMP, UNCD12); < fragP->fr_var = md_relax_table[C (UNCD_JUMP, UNCD12)].rlx_length; --- > fragP->fr_subtype = C (UNCD_JUMP, DISP12); 2259,2260c2256 < fragP->fr_subtype = C (UNCD_JUMP, UNCD12); < fragP->fr_var = md_relax_table[C (UNCD_JUMP, UNCD12)].rlx_length; --- > fragP->fr_subtype = C (UNCD_JUMP, DISP12); 2265,2266d2260 < fragP->fr_var = md_relax_table[C (UNCD_JUMP, UNCD32)].rlx_length; < return md_relax_table[C (UNCD_JUMP, UNCD32)].rlx_length; 2270,2272d2263 < default: < abort (); < 2280,2281c2271 < fragP->fr_subtype = C (COND_JUMP, COND12); < fragP->fr_var = md_relax_table[C (COND_JUMP, COND12)].rlx_length; --- > fragP->fr_subtype = C (COND_JUMP, DISP12); 2287,2288d2276 < fragP->fr_var = md_relax_table[C (COND_JUMP, COND32)].rlx_length; < return md_relax_table[C (COND_JUMP, COND32)].rlx_length; 2293,2294c2281 < fragP->fr_subtype = C (COND_JUMP, COND12); < fragP->fr_var = md_relax_table[C (COND_JUMP, COND12)].rlx_length; --- > fragP->fr_subtype = C (COND_JUMP, DISP12); 2295a2283 > break; 2296a2285,2292 > case C (UNCD_JUMP, DISP12): > case C (UNCD_JUMP, DISP32): > case C (UNCD_JUMP, UNDEF_WORD_DISP): > case C (COND_JUMP, DISP12): > case C (COND_JUMP, DISP32): > case C (COND_JUMP, UNDEF_WORD_DISP): > /* When relaxing a section for the second time, we don't need to > do anything besides return the current size. */ 2300c2296 < return fragP->fr_var; --- > return md_relax_table[fragP->fr_subtype].rlx_length; diff -rN binutils-2.11/gas/config/tc-mcore.h binutils-2.11.2/gas/config/tc-mcore.h 3c3 < Copyright (C) 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-mips.c binutils-2.11.2/gas/config/tc-mips.c 2c2 < Copyright (C) 1993, 94, 95, 96, 97, 98, 1999, 2000 --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 129c129,130 < ? "elf32-tradbigmips" : "elf32-tradlittlemips"); --- > ? (mips_64 ? "elf64-tradbigmips" : "elf32-tradbigmips") > : (mips_64 ? "elf64-tradlittlemips" : "elf32-tradlittlemips")); 243c244 < || (ISA) == ISA_MIPS32 \ --- > || (ISA) == ISA_MIPS64 \ 794a796,800 > > #ifdef MIPS_STABS_ELF > { "extern", ecoff_directive_extern, 0}, > #endif > 1380a1387 > valueT val; 1388,1389c1395,1397 < if ((S_GET_VALUE (l->label) & 1) == 0) < S_SET_VALUE (l->label, S_GET_VALUE (l->label) + 1); --- > val = S_GET_VALUE (l->label); > if ((val & 1) == 0) > S_SET_VALUE (l->label, val + 1); 1699a1708,1709 > valueT val; > 1702c1712 < S_SET_VALUE (l->label, (valueT) frag_now_fix ()); --- > val = (valueT) frag_now_fix (); 1705c1715,1716 < S_SET_VALUE (l->label, S_GET_VALUE (l->label) + 1); --- > val += 1; > S_SET_VALUE (l->label, val); 2402a2414,2415 > valueT val; > 2405c2418 < S_SET_VALUE (l->label, (valueT) frag_now_fix ()); --- > val = (valueT) frag_now_fix (); 2408c2421,2422 < S_SET_VALUE (l->label, S_GET_VALUE (l->label) + 1); --- > val += 1; > S_SET_VALUE (l->label, val); 3939c3953 < macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7); --- > macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7); 3960c3974 < macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7); --- > macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7); 3999c4013 < macro_build ((char *) NULL, &icnt, NULL, "break", "c", 6); --- > macro_build ((char *) NULL, &icnt, NULL, "break", "c", 6); 4215a4230,4231 > int lw_reloc_type = (int) BFD_RELOC_MIPS_GOT16; > 4218a4235,4236 > or if tempreg is PIC_CALL_REG > lw $tempreg,($gp) (BFD_RELOC_MIPS_CALL16) 4244a4263,4264 > if (expr1.X_add_number == 0 && tempreg == PIC_CALL_REG) > lw_reloc_type = (int) BFD_RELOC_MIPS_CALL16; 4247c4267 < "t,o(b)", tempreg, (int) BFD_RELOC_MIPS_GOT16, GP); --- > "t,o(b)", tempreg, lw_reloc_type, GP); 4352a4373,4374 > int lui_reloc_type = (int) BFD_RELOC_MIPS_GOT_HI16; > int lw_reloc_type = (int) BFD_RELOC_MIPS_GOT_LO16; 4358a4381,4384 > or if tempreg is PIC_CALL_REG > lui $tempreg, (BFD_RELOC_MIPS_CALL_HI16) > addu $tempreg,$tempreg,$gp > lw $tempreg,($tempreg) (BFD_RELOC_MIPS_CALL_LO16) 4396a4423,4427 > if (expr1.X_add_number == 0 && tempreg == PIC_CALL_REG) > { > lui_reloc_type = (int) BFD_RELOC_MIPS_CALL_HI16; > lw_reloc_type = (int) BFD_RELOC_MIPS_CALL_LO16; > } 4398c4429 < tempreg, (int) BFD_RELOC_MIPS_GOT_HI16); --- > tempreg, lui_reloc_type); 4406,4407c4437 < "t,o(b)", tempreg, (int) BFD_RELOC_MIPS_GOT_LO16, < tempreg); --- > "t,o(b)", tempreg, lw_reloc_type, tempreg); 8739a8770 > valueT val; 8757,8758c8788,8789 < && S_GET_VALUE (ep->X_add_symbol) == frag_now_fix ()) < S_SET_VALUE (ep->X_add_symbol, S_GET_VALUE (ep->X_add_symbol) + 1); --- > && (val = S_GET_VALUE (ep->X_add_symbol)) == frag_now_fix ()) > S_SET_VALUE (ep->X_add_symbol, val + 1); 9059a9091 > #ifdef OBJ_ELF 9092a9125 > #endif /* OBJ_ELF */ 9109a9143 > #ifdef OBJ_ELF 9123c9157,9159 < || strcmp (*l, "elf64-littlemips") == 0) --- > || strcmp (*l, "elf64-littlemips") == 0 > || strcmp (*l, "elf64-tradbigmips") == 0 > || strcmp (*l, "elf64-tradlittlemips") == 0) 9130a9167 > #endif /* OBJ_ELF */ 9252a9290 > show (stream, "12000", &column, &first); 9486c9524,9525 < long insn, value; --- > long insn; > valueT value; 9501,9521c9540,9561 < if (S_GET_OTHER (fixP->fx_addsy) == STO_MIPS16 < || S_IS_WEAK (fixP->fx_addsy) < || (symbol_used_in_reloc_p (fixP->fx_addsy) < && (((bfd_get_section_flags (stdoutput, < S_GET_SEGMENT (fixP->fx_addsy)) < & SEC_LINK_ONCE) != 0) < || !strncmp (segment_name (S_GET_SEGMENT (fixP->fx_addsy)), < ".gnu.linkonce", < sizeof (".gnu.linkonce") - 1)))) < < { < value -= S_GET_VALUE (fixP->fx_addsy); < if (value != 0 && ! fixP->fx_pcrel) < { < /* In this case, the bfd_install_relocation routine will < incorrectly add the symbol value back in. We just want < the addend to appear in the object file. < FIXME: If this makes VALUE zero, we're toast. */ < value -= S_GET_VALUE (fixP->fx_addsy); < } < } --- > if (S_GET_OTHER (fixP->fx_addsy) == STO_MIPS16 > || S_IS_WEAK (fixP->fx_addsy) > || (symbol_used_in_reloc_p (fixP->fx_addsy) > && (((bfd_get_section_flags (stdoutput, > S_GET_SEGMENT (fixP->fx_addsy)) > & SEC_LINK_ONCE) != 0) > || !strncmp (segment_name (S_GET_SEGMENT (fixP->fx_addsy)), > ".gnu.linkonce", > sizeof (".gnu.linkonce") - 1)))) > > { > valueT symval = S_GET_VALUE (fixP->fx_addsy); > value -= symval; > if (value != 0 && ! fixP->fx_pcrel) > { > /* In this case, the bfd_install_relocation routine will > incorrectly add the symbol value back in. We just want > the addend to appear in the object file. > FIXME: If this makes VALUE zero, we're toast. */ > value -= symval; > } > } 9671c9711 < if (value < -0x8000 || value > 0x7fff) --- > if (value + 0x8000 > 0xffff) 9689c9729 < _("Branch to odd address (%lx)"), value); --- > _("Branch to odd address (%lx)"), (long) value); 9699c9739 < value >>= 2; --- > value = (offsetT) value >> 2; 9708c9748 < if (value >= -0x8000 && value < 0x8000) --- > if (value + 0x8000 <= 0xffff) 10724a10765 > fragS *sym_frag; 10757a10799,10800 > sym_frag = symbol_get_frag (fragp->fr_symbol); > 10762,10763c10805 < val = (S_GET_VALUE (fragp->fr_symbol) < + symbol_get_frag (fragp->fr_symbol)->fr_address); --- > val = S_GET_VALUE (fragp->fr_symbol) + sym_frag->fr_address; 10776c10818 < + symbol_get_frag (fragp->fr_symbol)->fr_address); --- > + sym_frag->fr_address); 10798a10841 > /* Must have been called from md_estimate_size_before_relax. */ 10810a10854,10859 > if (fragp != sym_frag && sym_frag->fr_address == 0) > /* Assume non-extended on the first relaxation pass. > The address we have calculated will be bogus if this is > a forward branch to another frag, as the forward frag > will have fr_address == 0. */ > return 0; 10814,10815c10863,10865 < the same section. If the fr_address of the symbol fragment < is greater then the address of this fragment we want to add --- > the same section. If the relax_marker of the symbol fragment > differs from the relax_marker of this fragment, we have not > yet adjusted the symbol fragment fr_address. We want to add 10819,10820c10869 < && (symbol_get_frag (fragp->fr_symbol)->fr_address < >= fragp->fr_address)) --- > && sym_frag->relax_marker != fragp->relax_marker) 10830,10832c10879 < for (f = fragp; < f != NULL && f != symbol_get_frag (fragp->fr_symbol); < f = f->fr_next) --- > for (f = fragp; f != NULL && f != sym_frag; f = f->fr_next) 12016a12064,12069 > > /* R12000 CPU */ > { "R12000", 0, ISA_MIPS4, CPU_R12000, }, > { "12000", 0, ISA_MIPS4, CPU_R12000, }, > { "12k", 0, ISA_MIPS4, CPU_R12000, }, > { "r12k", 0, ISA_MIPS4, CPU_R12000, }, diff -rN binutils-2.11/gas/config/tc-mips.h binutils-2.11.2/gas/config/tc-mips.h 2c2 < Copyright (C) 1993, 94, 95, 96, 97, 1999, 2000 --- > Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001 52c52 < #define md_relax_frag(fragp, stretch) mips_relax_frag(fragp, stretch) --- > #define md_relax_frag(segment, fragp, stretch) mips_relax_frag(fragp, stretch) diff -rN binutils-2.11/gas/config/tc-mn10200.c binutils-2.11.2/gas/config/tc-mn10200.c 2c2,3 < Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 1287,1309c1288,1300 < if (fragp->fr_subtype == 0) < return 2; < if (fragp->fr_subtype == 3) < return 3; < if (fragp->fr_subtype == 6) < { < if (!S_IS_DEFINED (fragp->fr_symbol) < || seg != S_GET_SEGMENT (fragp->fr_symbol)) < { < fragp->fr_subtype = 7; < return 5; < } < return 3; < } < if (fragp->fr_subtype == 8) < { < if (!S_IS_DEFINED (fragp->fr_symbol)) < { < fragp->fr_subtype = 10; < return 5; < } < return 2; < } --- > if (fragp->fr_subtype == 6 > && (!S_IS_DEFINED (fragp->fr_symbol) > || seg != S_GET_SEGMENT (fragp->fr_symbol))) > fragp->fr_subtype = 7; > else if (fragp->fr_subtype == 8 > && (!S_IS_DEFINED (fragp->fr_symbol) > || seg != S_GET_SEGMENT (fragp->fr_symbol))) > fragp->fr_subtype = 10; > > if (fragp->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0])) > abort (); > > return md_relax_table[fragp->fr_subtype].rlx_length; diff -rN binutils-2.11/gas/config/tc-mn10200.h binutils-2.11.2/gas/config/tc-mn10200.h 2c2 < Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-mn10300.c binutils-2.11.2/gas/config/tc-mn10300.c 2c2,3 < Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 213a215 > { "pc", 0 }, 938c940 < unsigned long insn, extension, size = 0, real_size; --- > unsigned long insn, extension, size = 0; 1514,1515d1515 < real_size = size; < 1519a1520,1526 > /* We want to anchor the line info to the previous frag (if > there isn't one, create it), so that, when the insn is > resized, we still get the right address for the beginning of > the region. */ > f = frag_more (0); > dwarf2_emit_insn (0); > 1730,1747c1737 < /* Gross. This disgusting hack is to make sure we < get the right offset for the 16/32 bit reloc in < "call" instructions. Basically they're a pain < because the reloc isn't at the end of the instruction. */ < if ((size == 5 || size == 7) < && (((insn >> 24) & 0xff) == 0xcd < || ((insn >> 24) & 0xff) == 0xdd)) < size -= 2; < < /* Similarly for certain bit instructions which don't < hav their 32bit reloc at the tail of the instruction. */ < if (size == 7 < && (((insn >> 16) & 0xffff) == 0xfe00 < || ((insn >> 16) & 0xffff) == 0xfe01 < || ((insn >> 16) & 0xffff) == 0xfe02)) < size -= 1; < < offset = size - reloc_size / 8; --- > offset = size - (reloc_size + operand->shift) / 8; 1790d1779 < } 1792c1781,1782 < dwarf2_emit_insn (real_size); --- > dwarf2_emit_insn (size); > } 1817a1808,1846 > /* If we got a difference between two symbols, and the > subtracted symbol is in the current section, use a > PC-relative relocation. If both symbols are in the same > section, the difference would have already been simplified > to a constant. */ > if (S_GET_SEGMENT (fixp->fx_subsy) == seg) > { > reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); > *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); > reloc->addend = (reloc->address - S_GET_VALUE (fixp->fx_subsy) > + fixp->fx_offset); > > switch (fixp->fx_r_type) > { > case BFD_RELOC_8: > reloc->howto = bfd_reloc_type_lookup (stdoutput, > BFD_RELOC_8_PCREL); > return reloc; > > case BFD_RELOC_16: > reloc->howto = bfd_reloc_type_lookup (stdoutput, > BFD_RELOC_16_PCREL); > return reloc; > > case BFD_RELOC_24: > reloc->howto = bfd_reloc_type_lookup (stdoutput, > BFD_RELOC_24_PCREL); > return reloc; > > case BFD_RELOC_32: > reloc->howto = bfd_reloc_type_lookup (stdoutput, > BFD_RELOC_32_PCREL); > return reloc; > > default: > /* Try to compute the absolute value below. */ > break; > } > } 1845,1882c1874,1890 < if (fragp->fr_subtype == 0) < return 2; < if (fragp->fr_subtype == 3) < return 3; < if (fragp->fr_subtype == 6) < { < if (!S_IS_DEFINED (fragp->fr_symbol) < || seg != S_GET_SEGMENT (fragp->fr_symbol)) < { < fragp->fr_subtype = 7; < return 7; < } < else < return 5; < } < if (fragp->fr_subtype == 8) < { < if (!S_IS_DEFINED (fragp->fr_symbol) < || seg != S_GET_SEGMENT (fragp->fr_symbol)) < { < fragp->fr_subtype = 9; < return 6; < } < else < return 4; < } < if (fragp->fr_subtype == 10) < { < if (!S_IS_DEFINED (fragp->fr_symbol) < || seg != S_GET_SEGMENT (fragp->fr_symbol)) < { < fragp->fr_subtype = 12; < return 5; < } < else < return 2; < } < abort (); --- > if (fragp->fr_subtype == 6 > && (!S_IS_DEFINED (fragp->fr_symbol) > || seg != S_GET_SEGMENT (fragp->fr_symbol))) > fragp->fr_subtype = 7; > else if (fragp->fr_subtype == 8 > && (!S_IS_DEFINED (fragp->fr_symbol) > || seg != S_GET_SEGMENT (fragp->fr_symbol))) > fragp->fr_subtype = 9; > else if (fragp->fr_subtype == 10 > && (!S_IS_DEFINED (fragp->fr_symbol) > || seg != S_GET_SEGMENT (fragp->fr_symbol))) > fragp->fr_subtype = 12; > > if (fragp->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0])) > abort (); > > return md_relax_table[fragp->fr_subtype].rlx_length; 1941a1950 > case BFD_RELOC_8_PCREL: 1945a1955 > case BFD_RELOC_16_PCREL: 1949a1960 > case BFD_RELOC_32_PCREL: 1966,1967c1977,1979 < fixp->fx_done = 1; < return 0; --- > /* If a symbol remains, pass the fixup, as a reloc, onto the linker. */ > if (fixp->fx_addsy == NULL) > fixp->fx_done = 1; 1968a1981 > return 0; 1982a1996,2004 > /* Do not adjust relocations involving symbols in code sections, > because it breaks linker relaxations. This could be fixed in the > linker, but this fix is simpler, and it pretty much only affects > object size a little bit. */ > if ((S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_CODE) > && fixp->fx_subsy > && S_GET_SEGMENT (fixp->fx_addsy) == S_GET_SEGMENT (fixp->fx_subsy)) > return 1; > 1998a2021,2027 > return 0; > > /* Do not adjust relocations involving symbols in code sections, > because it breaks linker relaxations. This could be fixed in the > linker, but this fix is simpler, and it pretty much only affects > object size a little bit. */ > if (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_CODE) diff -rN binutils-2.11/gas/config/tc-mn10300.h binutils-2.11.2/gas/config/tc-mn10300.h 2c2 < Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-ns32k.c binutils-2.11.2/gas/config/tc-ns32k.c 2c2,3 < Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 98, 1999, 2000 --- > Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, > 2001 2071,2075c2072 < int old_fix; < < old_fix = fragP->fr_fix; < < switch (fragP->fr_subtype) --- > if (fragP->fr_subtype == IND (BRANCH, UNDEF)) 2077,2078c2074 < case IND (BRANCH, UNDEF): < if (S_GET_SEGMENT (fragP->fr_symbol) == segment) --- > if (S_GET_SEGMENT (fragP->fr_symbol) != segment) 2080,2085c2076 < /* The symbol has been assigned a value. */ < fragP->fr_subtype = IND (BRANCH, BYTE); < } < else < { < /* We don't relax symbols defined in an other segment the --- > /* We don't relax symbols defined in another segment. The 2103c2094 < break; --- > return 4; 2105,2109c2096,2099 < case IND (BRANCH, BYTE): < fragP->fr_var += 1; < break; < default: < break; --- > > /* Relaxable case. Set up the initial guess for the variable > part of the frag. */ > fragP->fr_subtype = IND (BRANCH, BYTE); 2112c2102,2106 < return fragP->fr_var + fragP->fr_fix - old_fix; --- > if (fragP->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0])) > abort (); > > /* Return the size of the variable part of the frag. */ > return md_relax_table[fragP->fr_subtype].rlx_length; diff -rN binutils-2.11/gas/config/tc-ns32k.h binutils-2.11.2/gas/config/tc-ns32k.h 2c2,3 < Copyright (C) 1987, 92, 93, 94, 95, 97, 1999 Free Software Foundation, Inc. --- > Copyright 1987, 1992, 1993, 1994, 1995, 1997, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-pj.c binutils-2.11.2/gas/config/tc-pj.c 3c3 < Copyright (C) 1999 Free Software Foundation. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-pj.h binutils-2.11.2/gas/config/tc-pj.h 2c2 < Copyright (C) 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-ppc.c binutils-2.11.2/gas/config/tc-ppc.c 2c2 < Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 --- > Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 2848c2848,2849 < if (S_GET_STORAGE_CLASS (sym) == C_STSYM) --- > if (S_GET_STORAGE_CLASS (sym) == C_STSYM) { > 2849a2851,2869 > > /* In this case : > > .bs name > .stabx "z",arrays_,133,0 > .es > > .comm arrays_,13768,3 > > resolve_symbol_value will copy the exp's "within" into sym's when the > offset is 0. Since this seems to be corner case problem, > only do the correction for storage class C_STSYM. A better solution > would be to have the tc field updated in ppc_symbol_new_hook. */ > > if (exp.X_op == O_symbol) > { > symbol_get_tc (exp.X_add_symbol)->within = ppc_current_block; > } > } diff -rN binutils-2.11/gas/config/tc-ppc.h binutils-2.11.2/gas/config/tc-ppc.h 2c2 < Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 --- > Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000 diff -rN binutils-2.11/gas/config/tc-sh.c binutils-2.11.2/gas/config/tc-sh.c 2,3c2,3 < Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 < Free Software Foundation. --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 99a100 > #ifdef BFD_ASSEMBLER 101a103 > #endif 143,144d144 < #define UNCOND12 1 < #define UNCOND32 2 193c193,195 < EMPTY, EMPTY, EMPTY, EMPTY, --- > /* C (COND_JUMP, UNDEF_WORD_DISP) */ > { 0, 0, COND32_LENGTH, 0, }, > EMPTY, EMPTY, EMPTY, 203c205,207 < EMPTY, EMPTY, EMPTY, EMPTY, --- > /* C (COND_JUMP_DELAY, UNDEF_WORD_DISP) */ > { 0, 0, COND32_LENGTH, 0, }, > EMPTY, EMPTY, EMPTY, 211c215,218 < EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, --- > EMPTY, > /* C (UNCOND_JUMP, UNDEF_WORD_DISP) */ > { 0, 0, UNCOND32_LENGTH, 0, }, > EMPTY, EMPTY, EMPTY, 697c704 < if (src[3] == 'l') --- > if (tolower (src[3]) == 'l') 702c709 < if (src[3] == 'h') --- > if (tolower (src[3]) == 'h') 1942a1950 > #ifdef BFD_ASSEMBLER 1943a1952 > #endif 3030a3040,3041 > int what; > 3032a3044,3046 > default: > abort (); > 3038d3051 < fragP->fr_var = md_relax_table[C (UNCOND_JUMP, UNCOND12)].rlx_length; 3043d3055 < fragP->fr_var = md_relax_table[C (UNCOND_JUMP, UNCOND12)].rlx_length; 3048,3049d3059 < fragP->fr_var = md_relax_table[C (UNCOND_JUMP, UNCOND32)].rlx_length; < return md_relax_table[C (UNCOND_JUMP, UNCOND32)].rlx_length; 3053,3054d3062 < default: < abort (); 3056a3065 > what = GET_WHAT (fragP->fr_subtype); 3061d3069 < int what = GET_WHAT (fragP->fr_subtype); 3065d3072 < fragP->fr_var = md_relax_table[C (what, COND8)].rlx_length; 3069d3075 < int what = GET_WHAT (fragP->fr_subtype); 3072,3073d3077 < fragP->fr_var = md_relax_table[C (what, COND32)].rlx_length; < return md_relax_table[C (what, COND32)].rlx_length; 3077d3080 < int what = GET_WHAT (fragP->fr_subtype); 3080d3082 < fragP->fr_var = md_relax_table[C (what, COND8)].rlx_length; 3081a3084 > break; 3082a3086,3098 > case C (UNCOND_JUMP, UNCOND12): > case C (UNCOND_JUMP, UNCOND32): > case C (UNCOND_JUMP, UNDEF_WORD_DISP): > case C (COND_JUMP, COND8): > case C (COND_JUMP, COND12): > case C (COND_JUMP, COND32): > case C (COND_JUMP, UNDEF_WORD_DISP): > case C (COND_JUMP_DELAY, COND8): > case C (COND_JUMP_DELAY, COND12): > case C (COND_JUMP_DELAY, COND32): > case C (COND_JUMP_DELAY, UNDEF_WORD_DISP): > /* When relaxing a section for the second time, we don't need to > do anything besides return the current size. */ 3084a3101,3102 > > fragP->fr_var = md_relax_table[fragP->fr_subtype].rlx_length; diff -rN binutils-2.11/gas/config/tc-sh.h binutils-2.11.2/gas/config/tc-sh.h 2c2,3 < Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-sparc.c binutils-2.11.2/gas/config/tc-sparc.c 2c2,3 < Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 --- > Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, > 1999, 2000, 2001 2973c2974,2975 < if (fixP->fx_r_type == BFD_RELOC_16) --- > if (fixP->fx_r_type == BFD_RELOC_16 > || fixP->fx_r_type == BFD_RELOC_SPARC_UA16) 2977a2980 > || fixP->fx_r_type == BFD_RELOC_SPARC_UA32 2982c2985,2986 < else if (fixP->fx_r_type == BFD_RELOC_64) --- > else if (fixP->fx_r_type == BFD_RELOC_64 > || fixP->fx_r_type == BFD_RELOC_SPARC_UA64) 3317a3322,3324 > case BFD_RELOC_SPARC_UA16: > case BFD_RELOC_SPARC_UA32: > case BFD_RELOC_SPARC_UA64: 4067a4075 > /* Don't align if this is an unaligned pseudo-op. */ 4069,4073c4077 < { < /* This is an unaligned pseudo-op. */ < sparc_no_align_cons = 0; < return; < } --- > return; 4198c4202,4203 < if (target_little_endian_data && nbytes == 4 --- > if (target_little_endian_data > && nbytes == 4 4200a4206,4218 > > if (sparc_no_align_cons) > { > switch (nbytes) > { > case 2: r = BFD_RELOC_SPARC_UA16; break; > case 4: r = BFD_RELOC_SPARC_UA32; break; > case 8: r = BFD_RELOC_SPARC_UA64; break; > default: abort (); > } > sparc_no_align_cons = 0; > } > diff -rN binutils-2.11/gas/config/tc-sparc.h binutils-2.11.2/gas/config/tc-sparc.h 2c2,3 < Copyright (C) 1989, 90-96, 97, 98, 1999 Free Software Foundation, Inc. --- > Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, > 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-tahoe.c binutils-2.11.2/gas/config/tc-tahoe.c 1,2c1 < /* tc-tahoe.c < Not part of GAS yet. */ --- > /* This file is tc-tahoe.c 3a3,21 > Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1995, 2000 > Free Software Foundation, Inc. > > This file is part of GAS, the GNU Assembler. > > GAS 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, or (at your option) > any later version. > > GAS 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 GAS; see the file COPYING. If not, write to the Free > Software Foundation, 59 Temple Place - Suite 330, Boston, MA > 02111-1307, USA. */ 7c25 < /* this bit glommed from tahoe-inst.h */ --- > /* This bit glommed from tahoe-inst.h. */ 12,15c30,31 < /* < * This is part of tahoe-ins-parse.c & friends. < * We want to parse a tahoe instruction text into a tree defined here. < */ --- > /* This is part of tahoe-ins-parse.c & friends. > We want to parse a tahoe instruction text into a tree defined here. */ 21,24c37,40 < { < int top_ndx; /* -1, or index register. eg 7=[R7] */ < int top_reg; /* -1, or register number. eg 7 = R7 or (R7) */ < byte top_mode; /* Addressing mode byte. This byte, defines --- > { > int top_ndx; /* -1, or index register. eg 7=[R7] */ > int top_reg; /* -1, or register number. eg 7 = R7 or (R7) */ > byte top_mode; /* Addressing mode byte. This byte, defines 27c43 < char top_access; /* Access type wanted for this opperand --- > char top_access; /* Access type wanted for this opperand 29c45 < char top_width; /* Operand width expected, one of "bwlq?-:!" */ --- > char top_width; /* Operand width expected, one of "bwlq?-:!" */ 31c47 < char *top_error; /* Say if operand is inappropriate */ --- > char * top_error; /* Say if operand is inappropriate */ 33c49 < segT seg_of_operand; /* segment as returned by expression()*/ --- > segT seg_of_operand; /* segment as returned by expression()*/ 35c51 < expressionS exp_of_operand; /* The expression as parsed by expression()*/ --- > expressionS exp_of_operand; /* The expression as parsed by expression()*/ 37c53 < byte top_dispsize; /* Number of bytes in the displacement if we --- > byte top_dispsize; /* Number of bytes in the displacement if we 39c55 < }; --- > }; 61c77 < /* INDEXED_REG is decided by the existance or lack of a [reg] */ --- > /* INDEXED_REG is decided by the existance or lack of a [reg]. */ 64c80 < and it's a psuedo op.*/ --- > and it's a psuedo op. */ 82,83c98,99 < struct tit /* get it out of the sewer, it stands for < tahoe instruction tree (Geeze!) */ --- > struct tit /* Get it out of the sewer, it stands for > tahoe instruction tree (Geeze!). */ 232,233c248,249 < #define RELAX_STATE(what) ((what) >> 2) < #define RELAX_LENGTH(length) ((length) && 3) --- > #define RELAX_STATE(s) ((s) >> 2) > #define RELAX_LENGTH(s) ((s) & 3) 591,604c607,610 < /* < * md_estimate_size_before_relax() < * < * Called just before relax(). < * Any symbol that is now undefined will not become defined, so we assumed < * that it will be resolved by the linker. < * Return the correct fr_subtype in the frag, for relax() < * Return the initial "guess for fr_var" to caller. (How big I think this < * will be.) < * The guess for fr_var is ACTUALLY the growth beyond fr_fix. < * Whatever we do to grow fr_fix or fr_var contributes to our returned value. < * Although it may not be explicit in the frag, pretend fr_var starts with a < * 0 value. < */ --- > /* md_estimate_size_before_relax(), called just before relax(). > Any symbol that is now undefined will not become defined. > Return the correct fr_subtype in the frag and the growth beyond > fr_fix. */ 610,615c616 < register char *p; < register int old_fr_fix; < /* int pc_rel; FIXME: remove this */ < < old_fr_fix = fragP->fr_fix; < switch (fragP->fr_subtype) --- > if (RELAX_LENGTH (fragP->fr_subtype) == STATE_UNDF) 617,624c618 < case ENCODE_RELAX (STATE_PC_RELATIVE, STATE_UNDF): < if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type) < { < /* The symbol was in the same segment as the opcode, and it's < a real pc_rel case so it's a relaxable case. */ < fragP->fr_subtype = ENCODE_RELAX (STATE_PC_RELATIVE, STATE_BYTE); < } < else --- > if (S_GET_SEGMENT (fragP->fr_symbol) != segment) 626,636c620,622 < /* This case is still undefined, so asume it's a long word for the < linker to fix. */ < p = fragP->fr_literal + old_fr_fix; < *p |= TAHOE_PC_OR_LONG; < /* We now know how big it will be, one long word. */ < fragP->fr_fix += 1 + 4; < fix_new (fragP, old_fr_fix + 1, fragP->fr_symbol, < fragP->fr_offset, FX_PCREL32, NULL); < frag_wane (fragP); < } < break; --- > /* Non-relaxable cases. */ > char *p; > int old_fr_fix; 638,644c624 < case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_UNDF): < if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type) < { < fragP->fr_subtype = ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_BYTE); < } < else < { --- > old_fr_fix = fragP->fr_fix; 646,652c626,679 < *fragP->fr_opcode ^= 0x10; /* Reverse sense of branch. */ < *p++ = 6; < *p++ = TAHOE_JMP; < *p++ = TAHOE_PC_REL_LONG; < fragP->fr_fix += 1 + 1 + 1 + 4; < fix_new (fragP, old_fr_fix + 3, fragP->fr_symbol, < fragP->fr_offset, FX_PCREL32, NULL); --- > switch (RELAX_STATE (fragP->fr_subtype)) > { > case STATE_PC_RELATIVE: > *p |= TAHOE_PC_OR_LONG; > /* We now know how big it will be, one long word. */ > fragP->fr_fix += 1 + 4; > fix_new (fragP, old_fr_fix + 1, fragP->fr_symbol, > fragP->fr_offset, FX_PCREL32, NULL); > break; > > case STATE_CONDITIONAL_BRANCH: > *fragP->fr_opcode ^= 0x10; /* Reverse sense of branch. */ > *p++ = 6; > *p++ = TAHOE_JMP; > *p++ = TAHOE_PC_REL_LONG; > fragP->fr_fix += 1 + 1 + 1 + 4; > fix_new (fragP, old_fr_fix + 3, fragP->fr_symbol, > fragP->fr_offset, FX_PCREL32, NULL); > break; > > case STATE_BIG_REV_BRANCH: > *fragP->fr_opcode ^= 0x10; /* Reverse sense of branch. */ > *p++ = 0; > *p++ = 6; > *p++ = TAHOE_JMP; > *p++ = TAHOE_PC_REL_LONG; > fragP->fr_fix += 2 + 2 + 4; > fix_new (fragP, old_fr_fix + 4, fragP->fr_symbol, > fragP->fr_offset, FX_PCREL32, NULL); > break; > > case STATE_BIG_NON_REV_BRANCH: > *p++ = 2; > *p++ = 0; > *p++ = TAHOE_BRB; > *p++ = 6; > *p++ = TAHOE_JMP; > *p++ = TAHOE_PC_REL_LONG; > fragP->fr_fix += 2 + 2 + 2 + 4; > fix_new (fragP, old_fr_fix + 6, fragP->fr_symbol, > fragP->fr_offset, FX_PCREL32, NULL); > break; > > case STATE_ALWAYS_BRANCH: > *fragP->fr_opcode = TAHOE_JMP; > *p++ = TAHOE_PC_REL_LONG; > fragP->fr_fix += 1 + 4; > fix_new (fragP, old_fr_fix + 1, fragP->fr_symbol, > fragP->fr_offset, FX_PCREL32, NULL); > break; > > default: > abort (); > } 654,655d680 < } < break; 657,661c682,683 < case ENCODE_RELAX (STATE_BIG_REV_BRANCH, STATE_UNDF): < if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type) < { < fragP->fr_subtype = < ENCODE_RELAX (STATE_BIG_REV_BRANCH, STATE_WORD); --- > /* Return the growth in the fixed part of the frag. */ > return fragP->fr_fix - old_fr_fix; 663,676d684 < else < { < p = fragP->fr_literal + old_fr_fix; < *fragP->fr_opcode ^= 0x10; /* Reverse sense of branch. */ < *p++ = 0; < *p++ = 6; < *p++ = TAHOE_JMP; < *p++ = TAHOE_PC_REL_LONG; < fragP->fr_fix += 2 + 2 + 4; < fix_new (fragP, old_fr_fix + 4, fragP->fr_symbol, < fragP->fr_offset, FX_PCREL32, NULL); < frag_wane (fragP); < } < break; 678,679c686,688 < case ENCODE_RELAX (STATE_BIG_NON_REV_BRANCH, STATE_UNDF): < if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type) --- > /* Relaxable cases. Set up the initial guess for the variable > part of the frag. */ > switch (RELAX_STATE (fragP->fr_subtype)) 680a690,699 > case STATE_PC_RELATIVE: > fragP->fr_subtype = ENCODE_RELAX (STATE_PC_RELATIVE, STATE_BYTE); > break; > case STATE_CONDITIONAL_BRANCH: > fragP->fr_subtype = ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_BYTE); > break; > case STATE_BIG_REV_BRANCH: > fragP->fr_subtype = ENCODE_RELAX (STATE_BIG_REV_BRANCH, STATE_WORD); > break; > case STATE_BIG_NON_REV_BRANCH: 682,701c701,702 < } < else < { < p = fragP->fr_literal + old_fr_fix; < *p++ = 2; < *p++ = 0; < *p++ = TAHOE_BRB; < *p++ = 6; < *p++ = TAHOE_JMP; < *p++ = TAHOE_PC_REL_LONG; < fragP->fr_fix += 2 + 2 + 2 + 4; < fix_new (fragP, old_fr_fix + 6, fragP->fr_symbol, < fragP->fr_offset, FX_PCREL32, NULL); < frag_wane (fragP); < } < break; < < case ENCODE_RELAX (STATE_ALWAYS_BRANCH, STATE_UNDF): < if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type) < { --- > break; > case STATE_ALWAYS_BRANCH: 702a704 > break; 704,717d705 < else < { < p = fragP->fr_literal + old_fr_fix; < *fragP->fr_opcode = TAHOE_JMP; < *p++ = TAHOE_PC_REL_LONG; < fragP->fr_fix += 1 + 4; < fix_new (fragP, old_fr_fix + 1, fragP->fr_symbol, < fragP->fr_offset, FX_PCREL32, NULL); < frag_wane (fragP); < } < break; < < default: < break; 719,720c707,713 < return (fragP->fr_var + fragP->fr_fix - old_fr_fix); < } /* md_estimate_size_before_relax() */ --- > > if (fragP->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0])) > abort (); > > /* Return the size of the variable part of the frag. */ > return md_relax_table[fragP->fr_subtype].rlx_length; > } 741d733 < register short int length_code; /* 2=long 1=word 0=byte */ 752,753d743 < length_code = RELAX_LENGTH (fragP->fr_subtype); < know (length_code >= 0 && length_code < 3); diff -rN binutils-2.11/gas/config/tc-tahoe.h binutils-2.11.2/gas/config/tc-tahoe.h 3c3,4 < Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc. --- > Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1995, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-tic30.c binutils-2.11.2/gas/config/tc-tic30.c 2c2 < Copyright (C) 1998, 1999, 2000 Free Software Foundation. --- > Copyright 1998, 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-tic30.h binutils-2.11.2/gas/config/tc-tic30.h 2c2 < Copyright (C) 1998, 2000 Free Software Foundation. --- > Copyright 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-tic54x.c binutils-2.11.2/gas/config/tc-tic54x.c 2c2 < Copyright (C) 1999, 2000 Free Software Foundation. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-tic54x.h binutils-2.11.2/gas/config/tc-tic54x.h 2c2 < Copyright (C) 1999, 2000 Free Software Foundation. --- > Copyright 1999, 2000, 2001 Free Software Foundation, Inc. 111c111 < #define md_relax_frag(f,s) tic54x_relax_frag(f,s) --- > #define md_relax_frag(seg, f,s) tic54x_relax_frag(f,s) diff -rN binutils-2.11/gas/config/tc-tic80.c binutils-2.11.2/gas/config/tc-tic80.c 2c2 < Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-tic80.h binutils-2.11.2/gas/config/tc-tic80.h 2c2 < Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-v850.c binutils-2.11.2/gas/config/tc-v850.c 2c2,3 < Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation. --- > Copyright 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 607,608c608,609 < {"file", dwarf2_directive_file }, < {"loc", dwarf2_directive_loc }, --- > {"file", dwarf2_directive_file, 0}, > {"loc", dwarf2_directive_loc, 0}, 1324d1324 < fragP->fr_var = 0; 1348d1347 < fragP->fr_var = 0; 1358d1356 < fragP->fr_var = 0; 1705d1702 < unsigned long total_insn_size = 0; 2155a2153,2157 > /* Tie dwarf2 debug info to the address at the start of the insn. > We can't do this after the insn has been output as the current > frag may have been closed off. eg. by frag_var. */ > dwarf2_emit_insn (0); > 2181d2182 < total_insn_size = insn_size; 2196,2197d2196 < total_insn_size = insn_size; < 2203,2204d2201 < total_insn_size += extra_data_len; < 2277,2278d2273 < < dwarf2_emit_insn (total_insn_size); 2318c2313 < /* Assume everything will fit in two bytes, then expand as necessary. */ --- > /* Return current size of variable part of frag. */ 2325,2329c2320 < if (fragp->fr_subtype == 0) < fragp->fr_var = 4; < else if (fragp->fr_subtype == 2) < fragp->fr_var = 2; < else --- > if (fragp->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0])) 2331c2322,2323 < return 2; --- > > return md_relax_table[fragp->fr_subtype].rlx_length; diff -rN binutils-2.11/gas/config/tc-v850.h binutils-2.11.2/gas/config/tc-v850.h 2c2 < Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. --- > Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-vax.c binutils-2.11.2/gas/config/tc-vax.c 2c2 < Copyright (C) 1987, 91, 92, 93, 94, 95, 98, 99, 2000 --- > Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001 183a184,185 > #define RELAX_STATE(s) ((s) >> 2) > #define RELAX_LENGTH(s) ((s) & 3) 190a193 > 194a198 > 198a203 > 202a208 > 206a213 > 209a217 > {1, 1, 0, 0}, /* unused 5,3 */ 1143,1154c1151,1154 < /* < * md_estimate_size_before_relax() < * < * Called just before relax(). < * Any symbol that is now undefined will not become defined. < * Return the correct fr_subtype in the frag. < * Return the initial "guess for fr_var" to caller. < * The guess for fr_var is ACTUALLY the growth beyond fr_fix. < * Whatever we do to grow fr_fix or fr_var contributes to our returned value. < * Although it may not be explicit in the frag, pretend fr_var starts with a < * 0 value. < */ --- > /* md_estimate_size_before_relax(), called just before relax(). > Any symbol that is now undefined will not become defined. > Return the correct fr_subtype in the frag and the growth beyond > fr_fix. */ 1160,1164c1160 < char *p; < int old_fr_fix; < < old_fr_fix = fragP->fr_fix; < switch (fragP->fr_subtype) --- > if (RELAX_LENGTH (fragP->fr_subtype) == STATE_UNDF) 1166,1171c1162 < case ENCODE_RELAX (STATE_PC_RELATIVE, STATE_UNDF): < if (S_GET_SEGMENT (fragP->fr_symbol) == segment) < { /* A relaxable case. */ < fragP->fr_subtype = ENCODE_RELAX (STATE_PC_RELATIVE, STATE_BYTE); < } < else --- > if (S_GET_SEGMENT (fragP->fr_symbol) != segment) 1173,1180c1164,1166 < p = fragP->fr_literal + old_fr_fix; < p[0] |= VAX_PC_RELATIVE_MODE; /* Preserve @ bit. */ < fragP->fr_fix += 1 + 4; < fix_new (fragP, old_fr_fix + 1, 4, fragP->fr_symbol, < fragP->fr_offset, 1, NO_RELOC); < frag_wane (fragP); < } < break; --- > /* Non-relaxable cases. */ > char *p; > int old_fr_fix; 1182,1188c1168 < case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_UNDF): < if (S_GET_SEGMENT (fragP->fr_symbol) == segment) < { < fragP->fr_subtype = ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_BYTE); < } < else < { --- > old_fr_fix = fragP->fr_fix; 1190,1199c1170,1177 < *fragP->fr_opcode ^= 1; /* Reverse sense of branch. */ < p[0] = 6; < p[1] = VAX_JMP; < p[2] = VAX_PC_RELATIVE_MODE; /* ...(PC) */ < fragP->fr_fix += 1 + 1 + 1 + 4; < fix_new (fragP, old_fr_fix + 3, 4, fragP->fr_symbol, < fragP->fr_offset, 1, NO_RELOC); < frag_wane (fragP); < } < break; --- > switch (RELAX_STATE (fragP->fr_subtype)) > { > case STATE_PC_RELATIVE: > p[0] |= VAX_PC_RELATIVE_MODE; /* Preserve @ bit. */ > fragP->fr_fix += 1 + 4; > fix_new (fragP, old_fr_fix + 1, 4, fragP->fr_symbol, > fragP->fr_offset, 1, NO_RELOC); > break; 1201,1220c1179,1187 < case ENCODE_RELAX (STATE_COMPLEX_BRANCH, STATE_UNDF): < if (S_GET_SEGMENT (fragP->fr_symbol) == segment) < { < fragP->fr_subtype = ENCODE_RELAX (STATE_COMPLEX_BRANCH, STATE_WORD); < } < else < { < p = fragP->fr_literal + old_fr_fix; < p[0] = 2; < p[1] = 0; < p[2] = VAX_BRB; < p[3] = 6; < p[4] = VAX_JMP; < p[5] = VAX_PC_RELATIVE_MODE; /* ...(pc) */ < fragP->fr_fix += 2 + 2 + 1 + 1 + 4; < fix_new (fragP, old_fr_fix + 6, 4, fragP->fr_symbol, < fragP->fr_offset, 1, NO_RELOC); < frag_wane (fragP); < } < break; --- > case STATE_CONDITIONAL_BRANCH: > *fragP->fr_opcode ^= 1; /* Reverse sense of branch. */ > p[0] = 6; > p[1] = VAX_JMP; > p[2] = VAX_PC_RELATIVE_MODE; /* ...(PC) */ > fragP->fr_fix += 1 + 1 + 1 + 4; > fix_new (fragP, old_fr_fix + 3, 4, fragP->fr_symbol, > fragP->fr_offset, 1, NO_RELOC); > break; 1222,1237c1189,1222 < case ENCODE_RELAX (STATE_COMPLEX_HOP, STATE_UNDF): < if (S_GET_SEGMENT (fragP->fr_symbol) == segment) < { < fragP->fr_subtype = ENCODE_RELAX (STATE_COMPLEX_HOP, STATE_BYTE); < } < else < { < p = fragP->fr_literal + old_fr_fix; < p[0] = 2; < p[1] = VAX_BRB; < p[2] = 6; < p[3] = VAX_JMP; < p[4] = VAX_PC_RELATIVE_MODE; /* ...(pc) */ < fragP->fr_fix += 1 + 2 + 1 + 1 + 4; < fix_new (fragP, old_fr_fix + 5, 4, fragP->fr_symbol, < fragP->fr_offset, 1, NO_RELOC); --- > case STATE_COMPLEX_BRANCH: > p[0] = 2; > p[1] = 0; > p[2] = VAX_BRB; > p[3] = 6; > p[4] = VAX_JMP; > p[5] = VAX_PC_RELATIVE_MODE; /* ...(pc) */ > fragP->fr_fix += 2 + 2 + 1 + 1 + 4; > fix_new (fragP, old_fr_fix + 6, 4, fragP->fr_symbol, > fragP->fr_offset, 1, NO_RELOC); > break; > > case STATE_COMPLEX_HOP: > p[0] = 2; > p[1] = VAX_BRB; > p[2] = 6; > p[3] = VAX_JMP; > p[4] = VAX_PC_RELATIVE_MODE; /* ...(pc) */ > fragP->fr_fix += 1 + 2 + 1 + 1 + 4; > fix_new (fragP, old_fr_fix + 5, 4, fragP->fr_symbol, > fragP->fr_offset, 1, NO_RELOC); > break; > > case STATE_ALWAYS_BRANCH: > *fragP->fr_opcode += VAX_WIDEN_LONG; > p[0] = VAX_PC_RELATIVE_MODE; /* ...(PC) */ > fragP->fr_fix += 1 + 4; > fix_new (fragP, old_fr_fix + 1, 4, fragP->fr_symbol, > fragP->fr_offset, 1, NO_RELOC); > break; > > default: > abort (); > } 1238a1224,1226 > > /* Return the growth in the fixed part of the frag. */ > return fragP->fr_fix - old_fr_fix; 1240d1227 < break; 1242,1243c1229,1231 < case ENCODE_RELAX (STATE_ALWAYS_BRANCH, STATE_UNDF): < if (S_GET_SEGMENT (fragP->fr_symbol) == segment) --- > /* Relaxable cases. Set up the initial guess for the variable > part of the frag. */ > switch (RELAX_STATE (fragP->fr_subtype)) 1244a1233,1245 > case STATE_PC_RELATIVE: > fragP->fr_subtype = ENCODE_RELAX (STATE_PC_RELATIVE, STATE_BYTE); > break; > case STATE_CONDITIONAL_BRANCH: > fragP->fr_subtype = ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_BYTE); > break; > case STATE_COMPLEX_BRANCH: > fragP->fr_subtype = ENCODE_RELAX (STATE_COMPLEX_BRANCH, STATE_WORD); > break; > case STATE_COMPLEX_HOP: > fragP->fr_subtype = ENCODE_RELAX (STATE_COMPLEX_HOP, STATE_BYTE); > break; > case STATE_ALWAYS_BRANCH: 1245a1247 > break; 1247,1260d1248 < else < { < p = fragP->fr_literal + old_fr_fix; < *fragP->fr_opcode += VAX_WIDEN_LONG; < p[0] = VAX_PC_RELATIVE_MODE; /* ...(PC) */ < fragP->fr_fix += 1 + 4; < fix_new (fragP, old_fr_fix + 1, 4, fragP->fr_symbol, < fragP->fr_offset, 1, NO_RELOC); < frag_wane (fragP); < } < break; < < default: < break; 1262,1263c1250,1256 < return (fragP->fr_var + fragP->fr_fix - old_fr_fix); < } /* md_estimate_size_before_relax() */ --- > > if (fragP->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0])) > abort (); > > /* Return the size of the variable part of the frag. */ > return md_relax_table[fragP->fr_subtype].rlx_length; > } 1284d1276 < short int length_code; /* 2=long 1=word 0=byte */ 1295,1296d1286 < length_code = fragP->fr_subtype & 3; /* depends on ENCODE_RELAX() */ < know (length_code >= 0 && length_code < 3); diff -rN binutils-2.11/gas/config/tc-vax.h binutils-2.11.2/gas/config/tc-vax.h 2c2 < Copyright (C) 1987, 91, 92, 93, 95, 96, 97, 2000 --- > Copyright 1987, 1991, 1992, 1993, 1995, 1996, 1997, 2000 diff -rN binutils-2.11/gas/config/tc-w65.c binutils-2.11.2/gas/config/tc-w65.c 2c2 < Copyright (C) 1995, 1998, 2000 Free Software Foundation. --- > Copyright 1995, 1998, 2000, 2001 Free Software Foundation, Inc. 104c104,122 < relax_typeS md_relax_table[C (END, 0)]; --- > relax_typeS md_relax_table[C (END, 0)] = { > { 0, 0, 0, 0 }, > { 0, 0, 0, 0 }, > { 0, 0, 0, 0 }, > { 0, 0, 0, 0 }, > > /* COND_BRANCH */ > { 0, 0, 0, 0 }, /* UNDEF_BYTE_DISP */ > { BYTE_F, BYTE_B, 2, C (COND_BRANCH, WORD_DISP) }, /* BYTE_DISP */ > { WORD_F, WORD_B, 5, 0 }, /* WORD_DISP */ > { 0, 0, 5, 0 }, /* UNDEF_WORD_DISP */ > > /* UNCOND_BRANCH */ > { 0, 0, 0, 0 }, /* UNDEF_BYTE_DISP */ > { BYTE_F, BYTE_B, 2, C (UNCOND_BRANCH, WORD_DISP) }, /* BYTE_DISP */ > { WORD_F, WORD_B, 3, 0 }, /* WORD_DISP */ > { 0, 0, 3, 0 } /* UNDEF_WORD_DISP */ > > }; 134d151 < relax_typeS *table; 156,178d172 < /* Initialize the relax table. We use a local variable to avoid < warnings about modifying a supposedly const data structure. */ < table = (relax_typeS *) md_relax_table; < table[C (COND_BRANCH, BYTE_DISP)].rlx_forward = BYTE_F; < table[C (COND_BRANCH, BYTE_DISP)].rlx_backward = BYTE_B; < table[C (COND_BRANCH, BYTE_DISP)].rlx_length = 2; < table[C (COND_BRANCH, BYTE_DISP)].rlx_more = C (COND_BRANCH, WORD_DISP); < < table[C (COND_BRANCH, WORD_DISP)].rlx_forward = WORD_F; < table[C (COND_BRANCH, WORD_DISP)].rlx_backward = WORD_B; < table[C (COND_BRANCH, WORD_DISP)].rlx_length = 5; < table[C (COND_BRANCH, WORD_DISP)].rlx_more = 0; < < table[C (UNCOND_BRANCH, BYTE_DISP)].rlx_forward = BYTE_F; < table[C (UNCOND_BRANCH, BYTE_DISP)].rlx_backward = BYTE_B; < table[C (UNCOND_BRANCH, BYTE_DISP)].rlx_length = 2; < table[C (UNCOND_BRANCH, BYTE_DISP)].rlx_more = C (UNCOND_BRANCH, WORD_DISP); < < table[C (UNCOND_BRANCH, WORD_DISP)].rlx_forward = WORD_F; < table[C (UNCOND_BRANCH, WORD_DISP)].rlx_backward = WORD_B; < table[C (UNCOND_BRANCH, WORD_DISP)].rlx_length = 3; < table[C (UNCOND_BRANCH, WORD_DISP)].rlx_more = 0; < 1151c1145 < int what = GET_WHAT (fragP->fr_subtype); --- > int what; 1156a1151 > 1158a1154 > what = GET_WHAT (fragP->fr_subtype); 1165d1160 < fragP->fr_var = md_relax_table[C (what, BYTE_DISP)].rlx_length; 1172,1173d1166 < fragP->fr_var = md_relax_table[C (what, WORD_DISP)].rlx_length; < return md_relax_table[C (what, WORD_DISP)].rlx_length; 1174a1168,1178 > break; > > case C (COND_BRANCH, BYTE_DISP): > case C (COND_BRANCH, WORD_DISP): > case C (COND_BRANCH, UNDEF_WORD_DISP): > case C (UNCOND_BRANCH, BYTE_DISP): > case C (UNCOND_BRANCH, WORD_DISP): > case C (UNCOND_BRANCH, UNDEF_WORD_DISP): > /* When relaxing a section for the second time, we don't need to > do anything besides return the current size. */ > break; 1175a1180,1181 > > fragP->fr_var = md_relax_table[fragP->fr_subtype].rlx_length; diff -rN binutils-2.11/gas/config/tc-w65.h binutils-2.11.2/gas/config/tc-w65.h 2c2 < Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc. --- > Copyright 1995, 1997, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/tc-z8k.c binutils-2.11.2/gas/config/tc-z8k.c 2,3c2,3 < Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 < Free Software Foundation. --- > Copyright 1992, 1993, 1994, 1995, 1996, 1998, 2000 > Free Software Foundation, Inc. 162,163d161 < char *src = opcode->name; < 181,182c179,180 < fake_opcode->name = md_pseudo_table[idx].poc_name, < fake_opcode->func = (void *) (md_pseudo_table + idx); --- > fake_opcode->name = md_pseudo_table[idx].poc_name; > fake_opcode->func = (void *) (md_pseudo_table + idx); 407,415c405,413 < 0x2, "fcw", < 0X3, "refresh", < 0x4, "psapseg", < 0x5, "psapoff", < 0x5, "psap", < 0x6, "nspseg", < 0x7, "nspoff", < 0x7, "nsp", < 0 , 0 --- > { 0x2, "fcw" }, > { 0x3, "refresh" }, > { 0x4, "psapseg" }, > { 0x5, "psapoff" }, > { 0x5, "psap" }, > { 0x6, "nspseg" }, > { 0x7, "nspoff" }, > { 0x7, "nsp" }, > { 0 , 0 } 422c420 < unsigned int dst; --- > unsigned int dst ATTRIBUTE_UNUSED; 425d422 < int r; 458,464c455,461 < 0x1, "p", < 0x1, "v", < 0x2, "s", < 0x4, "z", < 0x8, "c", < 0x0, "+", < 0, 0 --- > { 0x1, "p" }, > { 0x1, "v" }, > { 0x2, "s" }, > { 0x4, "z" }, > { 0x8, "c" }, > { 0x0, "+" }, > { 0, 0 } 471c468 < unsigned int dst; --- > unsigned int dst ATTRIBUTE_UNUSED; 474d470 < int r; 511,515c507,511 < 0x1, "nvi", < 0x2, "vi", < 0x3, "both", < 0x3, "all", < 0, 0 --- > { 0x1, "nvi" }, > { 0x2, "vi" }, > { 0x3, "both" }, > { 0x3, "all" }, > { 0, 0 } 522c518 < unsigned int dst; --- > unsigned int dst ATTRIBUTE_UNUSED; 525d520 < int r; 558,580c553,575 < 0x0, "f", < 0x1, "lt", < 0x2, "le", < 0x3, "ule", < 0x4, "ov", < 0x4, "pe", < 0x5, "mi", < 0x6, "eq", < 0x6, "z", < 0x7, "c", < 0x7, "ult", < 0x8, "t", < 0x9, "ge", < 0xa, "gt", < 0xb, "ugt", < 0xc, "nov", < 0xc, "po", < 0xd, "pl", < 0xe, "ne", < 0xe, "nz", < 0xf, "nc", < 0xf, "uge", < 0 , 0 --- > { 0x0, "f" }, > { 0x1, "lt" }, > { 0x2, "le" }, > { 0x3, "ule" }, > { 0x4, "ov" }, > { 0x4, "pe" }, > { 0x5, "mi" }, > { 0x6, "eq" }, > { 0x6, "z" }, > { 0x7, "c" }, > { 0x7, "ult" }, > { 0x8, "t" }, > { 0x9, "ge" }, > { 0xa, "gt" }, > { 0xb, "ugt" }, > { 0xc, "nov" }, > { 0xc, "po" }, > { 0xd, "pl" }, > { 0xe, "ne" }, > { 0xe, "nz" }, > { 0xf, "nc" }, > { 0xf, "uge" }, > { 0 , 0 } 587c582 < unsigned int dst; --- > unsigned int dst ATTRIBUTE_UNUSED; 590d584 < int r; 619c613 < unsigned int dst; --- > unsigned int dst ATTRIBUTE_UNUSED; 623,625d616 < unsigned int num; < unsigned int len; < unsigned int size; 777c768 < return; --- > return NULL; 789c780 < return; --- > return NULL; 841,842c832 < unsigned int dispreg; < unsigned int this_index = opcode->idx; --- > int this_index = opcode->idx; 851c841 < int mode = operands[i].mode; --- > unsigned int mode = operands[i].mode; 914a905 > #if 0 /* Not used. */ 937a929 > #endif 969d960 < operand->X_add_number = n; 971d961 < #if 1 974c964 < case 8: /* 8 nibbles == 32 bits */ --- > case 8: /* 8 nibbles == 32 bits. */ 979c969 < case 4: /* 4 niblles == 16 bits */ --- > case 4: /* 4 nibbles == 16 bits. */ 988d977 < #endif 990d978 < 1000c988 < struct z8k_op *operand; --- > struct z8k_op *operand ATTRIBUTE_UNUSED; 1002,1005d989 < unsigned int i; < < int length; < char *output; 1007d990 < char part; 1009d991 < char high; 1020,1021c1002 < top: < for (nibble = 0; c = *class_ptr++; nibble++) --- > for (nibble = 0; (c = *class_ptr++); nibble++) 1033c1014 < da_operand->X_add_number |= 0x80000000; --- > /* da_operand->X_add_number |= 0x80000000; -- Now set at relocation time. */ 1110c1091,1101 < output_ptr = apply_fix (output_ptr, R_IMM16, da_operand, 4); --- > switch (c & ARG_MASK) > { > case ARG_DISP12: > output_ptr = apply_fix (output_ptr, R_CALLR, da_operand, 4); > break; > case ARG_DISP16: > output_ptr = apply_fix (output_ptr, R_REL16, da_operand, 4); > break; > default: > output_ptr = apply_fix (output_ptr, R_IMM16, da_operand, 4); > } 1172a1164 > char c; 1175d1166 < unsigned int i; 1180,1182d1170 < char *dot = 0; < char c; < 1256c1244 < object_headers *headers; --- > object_headers *headers ATTRIBUTE_UNUSED; 1263c1251 < char *name; --- > char *name ATTRIBUTE_UNUSED; 1270c1258 < object_headers *headers; --- > object_headers *headers ATTRIBUTE_UNUSED; 1392,1394c1380,1382 < object_headers *headers; < segT seg; < fragS *fragP; --- > object_headers *headers ATTRIBUTE_UNUSED; > segT seg ATTRIBUTE_UNUSED; > fragS *fragP ATTRIBUTE_UNUSED; 1474,1475c1462,1463 < register fragS *fragP; < register segT segment_type; --- > register fragS *fragP ATTRIBUTE_UNUSED; > register segT segment_type ATTRIBUTE_UNUSED; 1494c1482 < fixS *fixP; --- > fixS *fixP ATTRIBUTE_UNUSED; 1501c1489 < symbolS *s; --- > symbolS *s ATTRIBUTE_UNUSED; diff -rN binutils-2.11/gas/config/tc-z8k.h binutils-2.11.2/gas/config/tc-z8k.h 2c2,3 < Copyright (C) 1987-1992, 93, 95, 97, 98, 2000 --- > Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1997, 1998, > 2000 diff -rN binutils-2.11/gas/config/te-386bsd.h binutils-2.11.2/gas/config/te-386bsd.h 2c2,3 < Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc. --- > Copyright 1987, 1990, 1991, 1992, 1993, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/te-freebsd.h binutils-2.11.2/gas/config/te-freebsd.h 2c2 < Copyright (C) 2000 Free Software Foundation, Inc. --- > Copyright 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/te-hp300.h binutils-2.11.2/gas/config/te-hp300.h 2c2,3 < Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc. --- > Copyright 1987, 1990, 1991, 1992, 1993, 1995, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/te-hppa.h binutils-2.11.2/gas/config/te-hppa.h 2c2,3 < Copyright 1987, 1991, 1992 Free Software Foundation, Inc. --- > Copyright 1987, 1991, 1992, 1993, 1995, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/te-ic960.h binutils-2.11.2/gas/config/te-ic960.h 2c2,3 < Copyright (C) 1987-1992, 94, 95, 1997 Free Software Foundation, Inc. --- > Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1997, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/te-nbsd.h binutils-2.11.2/gas/config/te-nbsd.h 2c2,3 < Copyright (C) 1987, 90, 91, 92, 94, 95, 1998 Free Software Foundation, Inc. --- > Copyright 1987, 1990, 1991, 1992, 1994, 1998, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/te-ppcnw.h binutils-2.11.2/gas/config/te-ppcnw.h 2c2 < Copyright (C) 1994 Free Software Foundation, Inc. --- > Copyright 1994, 1995, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/te-sparcaout.h binutils-2.11.2/gas/config/te-sparcaout.h 2c2 < Copyright (C) 1996 Free Software Foundation, Inc. --- > Copyright 1996, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/te-sun3.h binutils-2.11.2/gas/config/te-sun3.h 2c2 < Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc. --- > Copyright 1987, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/te-tmips.h binutils-2.11.2/gas/config/te-tmips.h 2c2 < Copyright (C) 2000 Free Software Foundation, Inc. --- > Copyright 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config/vax-inst.h binutils-2.11.2/gas/config/vax-inst.h 2c2 < Copyright (C) 1987, 1992, 1995 Free Software Foundation, Inc. --- > Copyright 1987, 1992, 1995, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/config.in binutils-2.11.2/gas/config.in 27a28,30 > /* Define if you need to in order for stat and other things to work. */ > #undef _POSIX_SOURCE > 156a160,162 > /* Use ELF stabs for MIPS, not ECOFF stabs */ > #undef MIPS_STABS_ELF > 161a168,170 > > /* Default architecture. */ > #undef DEFAULT_ARCH diff -rN binutils-2.11/gas/configure binutils-2.11.2/gas/configure 732a733,760 > # 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:737: 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=":" > ac_dummy="$PATH" > for ac_dir in $ac_dummy; 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 734,737c762,767 < echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 < echo "configure:736: checking for strerror in -lcposix" >&5 < ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` < if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- > 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:767: checking for $ac_word" >&5 > if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 740,743c770,860 < ac_save_LIBS="$LIBS" < LIBS="-lcposix $LIBS" < cat > conftest.$ac_ext < if test -n "$CC"; then > ac_cv_prog_CC="$CC" # Let the user override the test. > else > IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" > ac_prog_rejected=no > ac_dummy="$PATH" > for ac_dir in $ac_dummy; 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 > > if test -z "$CC"; then > case "`uname -s`" in > *win32* | *WIN32*) > # Extract the first word of "cl", so it can be a program name with args. > set dummy cl; ac_word=$2 > echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 > echo "configure:818: 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=":" > ac_dummy="$PATH" > for ac_dir in $ac_dummy; do > test -z "$ac_dir" && ac_dir=. > if test -f $ac_dir/$ac_word; then > ac_cv_prog_CC="cl" > 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 > ;; > esac > 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:850: 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' > cross_compiling=$ac_cv_prog_cc_cross > > cat > conftest.$ac_ext << EOF > > #line 861 "configure" 745,748d861 < /* Override any gcc2 internal prototype to avoid an error. */ < /* We use char because int might match the return type of a gcc2 < builtin and then its argument prototype would still apply. */ < char strerror(); 750,752c863 < int main() { < strerror() < ; return 0; } --- > main(){return(0);} 754,756c865,872 < if { (eval echo configure:755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then < rm -rf conftest* < eval "ac_cv_lib_$ac_lib_var=yes" --- > if { (eval echo configure:866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 760,761c876,932 < rm -rf conftest* < eval "ac_cv_lib_$ac_lib_var=no" --- > ac_cv_prog_cc_works=no > fi > rm -fr conftest* > 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' > cross_compiling=$ac_cv_prog_cc_cross > > 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:892: 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:897: 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 < #ifdef __GNUC__ > yes; > #endif > EOF > if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:906: \"$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 $ac_cv_prog_gcc = yes; then > GCC=yes > else > GCC= > fi > > 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:925: 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 > 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 764d934 < LIBS="$ac_save_LIBS" 767c937,959 < if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then --- > > 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 > if test "$GCC" = yes; then > CFLAGS="-g -O2" > else > CFLAGS="-g" > fi > else > if test "$GCC" = yes; then > CFLAGS="-O2" > else > CFLAGS= > fi > fi > > echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 > echo "configure:957: 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 769c961,970 < LIBS="$LIBS -lcposix" --- > ISC=yes # If later tests want to check for ISC. > cat >> confdefs.h <<\EOF > #define _POSIX_SOURCE 1 > EOF > > if test "$GCC" = yes; then > CC="$CC -posix" > else > CC="$CC -Xp" > fi 771a973 > ISC= 774,775d975 < < 776a977 > BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in` 789c990 < echo "configure:790: checking for a BSD compatible install" >&5 --- > echo "configure:991: checking for a BSD compatible install" >&5 842c1043 < echo "configure:843: checking whether build environment is sane" >&5 --- > echo "configure:1044: checking whether build environment is sane" >&5 899c1100 < echo "configure:900: checking whether ${MAKE-make} sets \${MAKE}" >&5 --- > echo "configure:1101: checking whether ${MAKE-make} sets \${MAKE}" >&5 928c1129 < VERSION=2.11 --- > VERSION=${BFD_VERSION} 945c1146 < echo "configure:946: checking for working aclocal" >&5 --- > echo "configure:1147: checking for working aclocal" >&5 958c1159 < echo "configure:959: checking for working autoconf" >&5 --- > echo "configure:1160: checking for working autoconf" >&5 971c1172 < echo "configure:972: checking for working automake" >&5 --- > echo "configure:1173: checking for working automake" >&5 984c1185 < echo "configure:985: checking for working autoheader" >&5 --- > echo "configure:1186: checking for working autoheader" >&5 997c1198 < echo "configure:998: checking for working makeinfo" >&5 --- > echo "configure:1199: checking for working makeinfo" >&5 1080,1301d1280 < # 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:1084: 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=":" < ac_dummy="$PATH" < for ac_dir in $ac_dummy; 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:1114: 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=":" < ac_prog_rejected=no < ac_dummy="$PATH" < for ac_dir in $ac_dummy; 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 < < if test -z "$CC"; then < case "`uname -s`" in < *win32* | *WIN32*) < # Extract the first word of "cl", so it can be a program name with args. < set dummy cl; ac_word=$2 < echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 < echo "configure:1165: 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=":" < ac_dummy="$PATH" < for ac_dir in $ac_dummy; do < test -z "$ac_dir" && ac_dir=. < if test -f $ac_dir/$ac_word; then < ac_cv_prog_CC="cl" < 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 < ;; < esac < 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:1197: 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' < cross_compiling=$ac_cv_prog_cc_cross < < cat > conftest.$ac_ext << EOF < < #line 1208 "configure" < #include "confdefs.h" < < main(){return(0);} < EOF < if { (eval echo configure:1213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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* < 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' < cross_compiling=$ac_cv_prog_cc_cross < < 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:1239: 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:1244: 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 <&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 $ac_cv_prog_gcc = yes; then < GCC=yes < else < GCC= < fi < < 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:1272: 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 < 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 < if test "$GCC" = yes; then < CFLAGS="-g -O2" < else < CFLAGS="-g" < fi < else < if test "$GCC" = yes; then < CFLAGS="-O2" < else < CFLAGS= < fi < fi < 1314c1293 < echo "configure:1315: checking for ld used by GCC" >&5 --- > echo "configure:1294: checking for ld used by GCC" >&5 1344c1323 < echo "configure:1345: checking for GNU ld" >&5 --- > echo "configure:1324: checking for GNU ld" >&5 1347c1326 < echo "configure:1348: checking for non-GNU ld" >&5 --- > echo "configure:1327: checking for non-GNU ld" >&5 1382c1361 < echo "configure:1383: checking if the linker ($LD) is GNU ld" >&5 --- > echo "configure:1362: checking if the linker ($LD) is GNU ld" >&5 1399c1378 < echo "configure:1400: checking for $LD option to reload object files" >&5 --- > echo "configure:1379: checking for $LD option to reload object files" >&5 1411c1390 < echo "configure:1412: checking for BSD-compatible nm" >&5 --- > echo "configure:1391: checking for BSD-compatible nm" >&5 1449c1428 < echo "configure:1450: checking whether ln -s works" >&5 --- > echo "configure:1429: checking whether ln -s works" >&5 1470c1449 < echo "configure:1471: checking how to recognise dependant libraries" >&5 --- > echo "configure:1450: checking how to recognise dependant libraries" >&5 1613c1592 < echo "configure:1614: checking for object suffix" >&5 --- > echo "configure:1593: checking for object suffix" >&5 1619c1598 < if { (eval echo configure:1620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:1599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1639c1618 < echo "configure:1640: checking for executable suffix" >&5 --- > echo "configure:1619: checking for executable suffix" >&5 1649c1628 < if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then --- > if { (eval echo configure:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then 1682c1661 < echo "configure:1683: checking for ${ac_tool_prefix}file" >&5 --- > echo "configure:1662: checking for ${ac_tool_prefix}file" >&5 1744c1723 < echo "configure:1745: checking for file" >&5 --- > echo "configure:1724: checking for file" >&5 1815c1794 < echo "configure:1816: checking for $ac_word" >&5 --- > echo "configure:1795: checking for $ac_word" >&5 1847c1826 < echo "configure:1848: checking for $ac_word" >&5 --- > echo "configure:1827: checking for $ac_word" >&5 1882c1861 < echo "configure:1883: checking for $ac_word" >&5 --- > echo "configure:1862: checking for $ac_word" >&5 1914c1893 < echo "configure:1915: checking for $ac_word" >&5 --- > echo "configure:1894: checking for $ac_word" >&5 1981,1982c1960,1961 < echo '#line 1982 "configure"' > conftest.$ac_ext < if { (eval echo configure:1983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > echo '#line 1961 "configure"' > conftest.$ac_ext > if { (eval echo configure:1962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 2003c1982 < echo "configure:2004: checking whether the C compiler needs -belf" >&5 --- > echo "configure:1983: checking whether the C compiler needs -belf" >&5 2016c1995 < #line 2017 "configure" --- > #line 1996 "configure" 2023c2002 < if { (eval echo configure:2024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2334a2314 > arm-*-vxworks) fmt=coff ;; 2368a2349,2350 > h8500-*-rtems*) fmt=coff ;; > h8500-*-coff) fmt=coff ;; 2379c2361 < i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; --- > i386-*-linux*aout* | i386-*-linux*oldld) fmt=aout em=linux ;; 2477d2458 < mips-*-ecoff*) fmt=ecoff ;; 2484c2465,2473 < mips-*-sysv4*MP*) fmt=elf em=tmips ;; --- > mips-*-linux-gnu*) > fmt=elf em=tmips > cat >> confdefs.h <<\EOF > #define MIPS_STABS_ELF 1 > EOF > > ;; > mips-*-sysv4*MP* | mips-*-gnu*) > fmt=elf em=tmips ;; 2486c2475 < mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*) --- > mips-*-elf* | mips-*-rtems* | mips-*-openbsd*) 2586d2574 < *-*-freebsd*) fmt=elf bfd_gas=yes ;; 2588a2577 > *-*-freebsd*) fmt=elf em=freebsd bfd_gas=yes ;; 2897c2886 < mipsbelf | mipslelf) --- > mipsbelf | mipslelf | mipself) 2899c2888 < mipsbecoff | mipslecoff) --- > mipsbecoff | mipslecoff | mipsecoff) 3084c3073 < echo "configure:3085: checking for $ac_word" >&5 --- > echo "configure:3074: checking for $ac_word" >&5 3114c3103 < echo "configure:3115: checking for $ac_word" >&5 --- > echo "configure:3104: checking for $ac_word" >&5 3165c3154 < echo "configure:3166: checking for $ac_word" >&5 --- > echo "configure:3155: checking for $ac_word" >&5 3197c3186 < echo "configure:3198: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 --- > echo "configure:3187: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 3208c3197 < #line 3209 "configure" --- > #line 3198 "configure" 3213c3202 < if { (eval echo configure:3214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3239c3228 < echo "configure:3240: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 --- > echo "configure:3229: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 3244c3233 < echo "configure:3245: checking whether we are using GNU C" >&5 --- > echo "configure:3234: checking whether we are using GNU C" >&5 3253c3242 < if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3254: \"$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:3243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 3272c3261 < echo "configure:3273: checking whether ${CC-cc} accepts -g" >&5 --- > echo "configure:3262: checking whether ${CC-cc} accepts -g" >&5 3309c3298 < echo "configure:3310: checking for $ac_word" >&5 --- > echo "configure:3299: checking for $ac_word" >&5 3340c3329 < echo "configure:3341: checking how to run the C preprocessor" >&5 --- > echo "configure:3330: checking how to run the C preprocessor" >&5 3355c3344 < #line 3356 "configure" --- > #line 3345 "configure" 3361c3350 < { (eval echo configure:3362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:3351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 3372c3361 < #line 3373 "configure" --- > #line 3362 "configure" 3378c3367 < { (eval echo configure:3379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:3368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 3389c3378 < #line 3390 "configure" --- > #line 3379 "configure" 3395c3384 < { (eval echo configure:3396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:3385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 3425c3414 < echo "configure:3426: checking for $ac_word" >&5 --- > echo "configure:3415: checking for $ac_word" >&5 3458c3447 < echo "configure:3459: checking for $ac_word" >&5 --- > echo "configure:3448: checking for $ac_word" >&5 3492c3481 < echo "configure:3493: checking for yywrap in -l$ac_lib" >&5 --- > echo "configure:3482: checking for yywrap in -l$ac_lib" >&5 3500c3489 < #line 3501 "configure" --- > #line 3490 "configure" 3511c3500 < if { (eval echo configure:3512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3534c3523 < echo "configure:3535: checking lex output file root" >&5 --- > echo "configure:3524: checking lex output file root" >&5 3555c3544 < echo "configure:3556: checking whether yytext is a pointer" >&5 --- > echo "configure:3545: checking whether yytext is a pointer" >&5 3567c3556 < #line 3568 "configure" --- > #line 3557 "configure" 3574c3563 < if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3600c3589 < echo "configure:3601: checking for $ac_word" >&5 --- > echo "configure:3590: checking for $ac_word" >&5 3628c3617 < echo "configure:3629: checking for ANSI C header files" >&5 --- > echo "configure:3618: checking for ANSI C header files" >&5 3633c3622 < #line 3634 "configure" --- > #line 3623 "configure" 3641c3630 < { (eval echo configure:3642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:3631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 3658c3647 < #line 3659 "configure" --- > #line 3648 "configure" 3676c3665 < #line 3677 "configure" --- > #line 3666 "configure" 3697c3686 < #line 3698 "configure" --- > #line 3687 "configure" 3708c3697 < if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --- > if { (eval echo configure:3698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 3732c3721 < echo "configure:3733: checking for working const" >&5 --- > echo "configure:3722: checking for working const" >&5 3737c3726 < #line 3738 "configure" --- > #line 3727 "configure" 3786c3775 < if { (eval echo configure:3787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:3776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3807c3796 < echo "configure:3808: checking for inline" >&5 --- > echo "configure:3797: checking for inline" >&5 3814c3803 < #line 3815 "configure" --- > #line 3804 "configure" 3821c3810 < if { (eval echo configure:3822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:3811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3847c3836 < echo "configure:3848: checking for off_t" >&5 --- > echo "configure:3837: checking for off_t" >&5 3852c3841 < #line 3853 "configure" --- > #line 3842 "configure" 3880c3869 < echo "configure:3881: checking for size_t" >&5 --- > echo "configure:3870: checking for size_t" >&5 3885c3874 < #line 3886 "configure" --- > #line 3875 "configure" 3915c3904 < echo "configure:3916: checking for working alloca.h" >&5 --- > echo "configure:3905: checking for working alloca.h" >&5 3920c3909 < #line 3921 "configure" --- > #line 3910 "configure" 3927c3916 < if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3948c3937 < echo "configure:3949: checking for alloca" >&5 --- > echo "configure:3938: checking for alloca" >&5 3953c3942 < #line 3954 "configure" --- > #line 3943 "configure" 3981c3970 < if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:3971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4013c4002 < echo "configure:4014: checking whether alloca needs Cray hooks" >&5 --- > echo "configure:4003: checking whether alloca needs Cray hooks" >&5 4018c4007 < #line 4019 "configure" --- > #line 4008 "configure" 4043c4032 < echo "configure:4044: checking for $ac_func" >&5 --- > echo "configure:4033: checking for $ac_func" >&5 4048c4037 < #line 4049 "configure" --- > #line 4038 "configure" 4071c4060 < if { (eval echo configure:4072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4098c4087 < echo "configure:4099: checking stack direction for C alloca" >&5 --- > echo "configure:4088: checking stack direction for C alloca" >&5 4106c4095 < #line 4107 "configure" --- > #line 4096 "configure" 4125c4114 < if { (eval echo configure:4126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --- > if { (eval echo configure:4115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 4150c4139 < echo "configure:4151: checking for $ac_hdr" >&5 --- > echo "configure:4140: checking for $ac_hdr" >&5 4155c4144 < #line 4156 "configure" --- > #line 4145 "configure" 4160c4149 < { (eval echo configure:4161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:4150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 4189c4178 < echo "configure:4190: checking for $ac_func" >&5 --- > echo "configure:4179: checking for $ac_func" >&5 4194c4183 < #line 4195 "configure" --- > #line 4184 "configure" 4217c4206 < if { (eval echo configure:4218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4242c4231 < echo "configure:4243: checking for working mmap" >&5 --- > echo "configure:4232: checking for working mmap" >&5 4250c4239 < #line 4251 "configure" --- > #line 4240 "configure" 4390c4379 < if { (eval echo configure:4391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --- > if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 4418c4407 < echo "configure:4419: checking for $ac_hdr" >&5 --- > echo "configure:4408: checking for $ac_hdr" >&5 4423c4412 < #line 4424 "configure" --- > #line 4413 "configure" 4428c4417 < { (eval echo configure:4429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:4418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 4458c4447 < echo "configure:4459: checking for $ac_func" >&5 --- > echo "configure:4448: checking for $ac_func" >&5 4463c4452 < #line 4464 "configure" --- > #line 4453 "configure" 4486c4475 < if { (eval echo configure:4487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4515c4504 < echo "configure:4516: checking for $ac_func" >&5 --- > echo "configure:4505: checking for $ac_func" >&5 4520c4509 < #line 4521 "configure" --- > #line 4510 "configure" 4543c4532 < if { (eval echo configure:4544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4577c4566 < echo "configure:4578: checking for LC_MESSAGES" >&5 --- > echo "configure:4567: checking for LC_MESSAGES" >&5 4582c4571 < #line 4583 "configure" --- > #line 4572 "configure" 4589c4578 < if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4610c4599 < echo "configure:4611: checking whether NLS is requested" >&5 --- > echo "configure:4600: checking whether NLS is requested" >&5 4630c4619 < echo "configure:4631: checking whether included gettext is requested" >&5 --- > echo "configure:4620: checking whether included gettext is requested" >&5 4649c4638 < echo "configure:4650: checking for libintl.h" >&5 --- > echo "configure:4639: checking for libintl.h" >&5 4654c4643 < #line 4655 "configure" --- > #line 4644 "configure" 4659c4648 < { (eval echo configure:4660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:4649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 4676c4665 < echo "configure:4677: checking for gettext in libc" >&5 --- > echo "configure:4666: checking for gettext in libc" >&5 4681c4670 < #line 4682 "configure" --- > #line 4671 "configure" 4688c4677 < if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4704c4693 < echo "configure:4705: checking for bindtextdomain in -lintl" >&5 --- > echo "configure:4694: checking for bindtextdomain in -lintl" >&5 4712c4701 < #line 4713 "configure" --- > #line 4702 "configure" 4723c4712 < if { (eval echo configure:4724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4739c4728 < echo "configure:4740: checking for gettext in libintl" >&5 --- > echo "configure:4729: checking for gettext in libintl" >&5 4744c4733 < #line 4745 "configure" --- > #line 4734 "configure" 4751c4740 < if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4779c4768 < echo "configure:4780: checking for $ac_word" >&5 --- > echo "configure:4769: checking for $ac_word" >&5 4813c4802 < echo "configure:4814: checking for $ac_func" >&5 --- > echo "configure:4803: checking for $ac_func" >&5 4818c4807 < #line 4819 "configure" --- > #line 4808 "configure" 4841c4830 < if { (eval echo configure:4842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4868c4857 < echo "configure:4869: checking for $ac_word" >&5 --- > echo "configure:4858: checking for $ac_word" >&5 4904c4893 < echo "configure:4905: checking for $ac_word" >&5 --- > echo "configure:4894: checking for $ac_word" >&5 4936c4925 < #line 4937 "configure" --- > #line 4926 "configure" 4944c4933 < if { (eval echo configure:4945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:4934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4976c4965 < echo "configure:4977: checking for $ac_word" >&5 --- > echo "configure:4966: checking for $ac_word" >&5 5010c4999 < echo "configure:5011: checking for $ac_word" >&5 --- > echo "configure:5000: checking for $ac_word" >&5 5046c5035 < echo "configure:5047: checking for $ac_word" >&5 --- > echo "configure:5036: checking for $ac_word" >&5 5136c5125 < echo "configure:5137: checking for catalogs to be installed" >&5 --- > echo "configure:5126: checking for catalogs to be installed" >&5 5164c5153 < echo "configure:5165: checking for linux/version.h" >&5 --- > echo "configure:5154: checking for linux/version.h" >&5 5169c5158 < #line 5170 "configure" --- > #line 5159 "configure" 5174c5163 < { (eval echo configure:5175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:5164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 5237c5226 < echo "configure:5238: checking whether to enable maintainer-specific portions of Makefiles" >&5 --- > echo "configure:5227: checking whether to enable maintainer-specific portions of Makefiles" >&5 5262c5251 < echo "configure:5263: checking for executable suffix" >&5 --- > echo "configure:5252: checking for executable suffix" >&5 5272c5261 < if { (eval echo configure:5273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then --- > if { (eval echo configure:5262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then 5297c5286 < echo "configure:5298: checking for $ac_hdr" >&5 --- > echo "configure:5287: checking for $ac_hdr" >&5 5302c5291 < #line 5303 "configure" --- > #line 5292 "configure" 5307c5296 < { (eval echo configure:5308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --- > { (eval echo configure:5297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 5337c5326 < echo "configure:5338: checking whether compiling a cross-assembler" >&5 --- > echo "configure:5327: checking whether compiling a cross-assembler" >&5 5352c5341 < echo "configure:5353: checking for working alloca.h" >&5 --- > echo "configure:5342: checking for working alloca.h" >&5 5357c5346 < #line 5358 "configure" --- > #line 5347 "configure" 5364c5353 < if { (eval echo configure:5365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:5354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5385c5374 < echo "configure:5386: checking for alloca" >&5 --- > echo "configure:5375: checking for alloca" >&5 5390c5379 < #line 5391 "configure" --- > #line 5380 "configure" 5418c5407 < if { (eval echo configure:5419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:5408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5450c5439 < echo "configure:5451: checking whether alloca needs Cray hooks" >&5 --- > echo "configure:5440: checking whether alloca needs Cray hooks" >&5 5455c5444 < #line 5456 "configure" --- > #line 5445 "configure" 5480c5469 < echo "configure:5481: checking for $ac_func" >&5 --- > echo "configure:5470: checking for $ac_func" >&5 5485c5474 < #line 5486 "configure" --- > #line 5475 "configure" 5508c5497 < if { (eval echo configure:5509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:5498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5535c5524 < echo "configure:5536: checking stack direction for C alloca" >&5 --- > echo "configure:5525: checking stack direction for C alloca" >&5 5543c5532 < #line 5544 "configure" --- > #line 5533 "configure" 5562c5551 < if { (eval echo configure:5563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --- > if { (eval echo configure:5552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 5584c5573 < echo "configure:5585: checking for inline" >&5 --- > echo "configure:5574: checking for inline" >&5 5591c5580 < #line 5592 "configure" --- > #line 5581 "configure" 5598c5587 < if { (eval echo configure:5599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then --- > if { (eval echo configure:5588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5628c5617 < echo "configure:5629: checking for $ac_func" >&5 --- > echo "configure:5618: checking for $ac_func" >&5 5633c5622 < #line 5634 "configure" --- > #line 5623 "configure" 5656c5645 < if { (eval echo configure:5657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:5646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5685c5674 < echo "configure:5686: checking for $ac_func" >&5 --- > echo "configure:5675: checking for $ac_func" >&5 5690c5679 < #line 5691 "configure" --- > #line 5680 "configure" 5713c5702 < if { (eval echo configure:5714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:5703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5748c5737 < echo "configure:5749: checking for _mwvalidcheckl in -lmw" >&5 --- > echo "configure:5738: checking for _mwvalidcheckl in -lmw" >&5 5756c5745 < #line 5757 "configure" --- > #line 5746 "configure" 5767c5756 < if { (eval echo configure:5768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:5757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5788c5777 < echo "configure:5789: checking for main in -lm" >&5 --- > echo "configure:5778: checking for main in -lm" >&5 5796c5785 < #line 5797 "configure" --- > #line 5786 "configure" 5803c5792 < if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:5793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5826c5815 < echo "configure:5827: checking for main in -lm" >&5 --- > echo "configure:5816: checking for main in -lm" >&5 5834c5823 < #line 5835 "configure" --- > #line 5824 "configure" 5841c5830 < if { (eval echo configure:5842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:5831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5872c5861 < echo "configure:5873: checking for working assert macro" >&5 --- > echo "configure:5862: checking for working assert macro" >&5 5877c5866 < #line 5878 "configure" --- > #line 5867 "configure" 5893c5882 < if { (eval echo configure:5894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:5883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5934c5923 < echo "configure:5935: checking whether declaration is required for strstr" >&5 --- > echo "configure:5924: checking whether declaration is required for strstr" >&5 5939c5928 < #line 5940 "configure" --- > #line 5929 "configure" 5950c5939 < if { (eval echo configure:5951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:5940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5971c5960 < echo "configure:5972: checking whether declaration is required for malloc" >&5 --- > echo "configure:5961: checking whether declaration is required for malloc" >&5 5976c5965 < #line 5977 "configure" --- > #line 5966 "configure" 5987c5976 < if { (eval echo configure:5988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:5977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 6008c5997 < echo "configure:6009: checking whether declaration is required for free" >&5 --- > echo "configure:5998: checking whether declaration is required for free" >&5 6013c6002 < #line 6014 "configure" --- > #line 6003 "configure" 6024c6013 < if { (eval echo configure:6025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:6014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 6045c6034 < echo "configure:6046: checking whether declaration is required for sbrk" >&5 --- > echo "configure:6035: checking whether declaration is required for sbrk" >&5 6050c6039 < #line 6051 "configure" --- > #line 6040 "configure" 6061c6050 < if { (eval echo configure:6062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:6051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 6082c6071 < echo "configure:6083: checking whether declaration is required for environ" >&5 --- > echo "configure:6072: checking whether declaration is required for environ" >&5 6087c6076 < #line 6088 "configure" --- > #line 6077 "configure" 6098c6087 < if { (eval echo configure:6099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:6088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 6122c6111 < echo "configure:6123: checking whether declaration is required for errno" >&5 --- > echo "configure:6112: checking whether declaration is required for errno" >&5 6127c6116 < #line 6128 "configure" --- > #line 6117 "configure" 6142c6131 < if { (eval echo configure:6143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:6132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 6311a6301 > s%@CC@%$CC%g 6323d6312 < s%@CC@%$CC%g diff -rN binutils-2.11/gas/configure.in binutils-2.11.2/gas/configure.in 14c14,17 < AM_INIT_AUTOMAKE(gas, 2.11) --- > changequote(,)dnl > BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in` > changequote([,])dnl > AM_INIT_AUTOMAKE(gas, ${BFD_VERSION}) 194a198 > arm-*-vxworks) fmt=coff ;; 228a233,234 > h8500-*-rtems*) fmt=coff ;; > h8500-*-coff) fmt=coff ;; 239c245 < i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; --- > i386-*-linux*aout* | i386-*-linux*oldld) fmt=aout em=linux ;; 334d339 < mips-*-ecoff*) fmt=ecoff ;; 341c346,352 < mips-*-sysv4*MP*) fmt=elf em=tmips ;; --- > mips-*-linux-gnu*) > fmt=elf em=tmips > AC_DEFINE(MIPS_STABS_ELF, 1, > [Use ELF stabs for MIPS, not ECOFF stabs]) > ;; > mips-*-sysv4*MP* | mips-*-gnu*) > fmt=elf em=tmips ;; 343c354 < mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*) --- > mips-*-elf* | mips-*-rtems* | mips-*-openbsd*) 439d449 < *-*-freebsd*) fmt=elf bfd_gas=yes ;; 441a452 > *-*-freebsd*) fmt=elf em=freebsd bfd_gas=yes ;; 721c732 < mipsbelf | mipslelf) --- > mipsbelf | mipslelf | mipself) 723c734 < mipsbecoff | mipslecoff) --- > mipsbecoff | mipslecoff | mipsecoff) diff -rN binutils-2.11/gas/debug.c binutils-2.11.2/gas/debug.c 2c2,3 < Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992 Free Software Foundation, Inc. --- > Copyright 1987, 1988, 1989, 1990, 1991, 1992, 2000 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/depend.c binutils-2.11.2/gas/depend.c 2c2 < Copyright (C) 1997, 1998 Free Software Foundation, Inc. --- > Copyright 1997, 1998, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/Makefile.in binutils-2.11.2/gas/doc/Makefile.in 178c178 < TAR = gtar --- > TAR = tar diff -rN binutils-2.11/gas/doc/all.texi binutils-2.11.2/gas/doc/all.texi 1c1,2 < @c Copyright 1992, 1993, 2000 Free Software Foundation, Inc. --- > @c Copyright 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001 > @c Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/as.info binutils-2.11.2/gas/doc/as.info 22,29c22,29 < as.info-2: 50092 < as.info-3: 100040 < as.info-4: 149757 < as.info-5: 199248 < as.info-6: 249039 < as.info-7: 296011 < as.info-8: 342282 < as.info-9: 372091 --- > as.info-2: 50094 > as.info-3: 99626 > as.info-4: 149185 > as.info-5: 198790 > as.info-6: 248755 > as.info-7: 297747 > as.info-8: 344018 > as.info-9: 373827 34,366c34,366 < Node: Overview1626 < Node: Manual16194 < Node: GNU Assembler17133 < Node: Object Formats18299 < Node: Command Line18746 < Node: Input Files19828 < Node: Object21807 < Node: Errors22754 < Node: Invoking23944 < Node: a25790 < Node: D27124 < Node: f27344 < Node: I27847 < Node: K28386 < Node: L28685 < Node: M29511 < Node: MD33901 < Node: o34320 < Node: R34768 < Node: statistics35784 < Node: traditional-format36184 < Node: v36650 < Node: W36918 < Node: Z37818 < Node: Syntax38333 < Node: Preprocessing38923 < Node: Whitespace40483 < Node: Comments40873 < Node: Symbol Intro42951 < Node: Statements43634 < Node: Constants45548 < Node: Characters46174 < Node: Strings46667 < Node: Chars48820 < Node: Numbers49561 < Node: Integers50092 < Node: Bignums50735 < Node: Flonums51078 < Node: Sections52811 < Node: Secs Background53185 < Node: Ld Sections58211 < Node: As Sections60607 < Node: Sub-Sections61512 < Node: bss64511 < Node: Symbols65456 < Node: Labels66103 < Node: Setting Symbols66829 < Node: Symbol Names67194 < Node: Dot70156 < Node: Symbol Attributes70598 < Node: Symbol Value71330 < Node: Symbol Type72366 < Node: a.out Symbols72745 < Node: Symbol Desc72995 < Node: Symbol Other73277 < Node: COFF Symbols73433 < Node: SOM Symbols74062 < Node: Expressions74495 < Node: Empty Exprs75243 < Node: Integer Exprs75585 < Node: Arguments75975 < Node: Operators77072 < Node: Prefix Ops77398 < Node: Infix Ops77717 < Node: Pseudo Ops79209 < Node: Abort83964 < Node: ABORT84365 < Node: Align84627 < Node: Ascii86816 < Node: Asciz87117 < Node: Balign87357 < Node: Byte89215 < Node: Comm89448 < Node: Data90807 < Node: Def91117 < Node: Desc91485 < Node: Dim91978 < Node: Double92369 < Node: Eject92700 < Node: Else92868 < Node: Elseif93158 < Node: End93442 < Node: Endef93650 < Node: Endfunc93973 < Node: Endif94141 < Node: Equ94394 < Node: Equiv94697 < Node: Err95093 < Node: Exitm95396 < Node: Extern95556 < Node: Fail95810 < Node: File96248 < Node: Fill96857 < Node: Float97814 < Node: Func98148 < Node: Global98728 < Node: Hidden99471 < Node: hword100040 < Node: Ident100361 < Node: If100661 < Node: Include103253 < Node: Int103793 < Node: Internal104167 < Node: Irp104802 < Node: Irpc105601 < Node: Lcomm106420 < Node: Lflags107161 < Node: Line107348 < Node: Linkonce108371 < Node: Ln109591 < Node: MRI109739 < Node: List110066 < Node: Long110669 < Node: Macro110839 < Node: Nolist113223 < Node: Octa113639 < Node: Org113965 < Node: P2align115240 < Node: Previous117161 < Node: PopSection117848 < Node: Print118349 < Node: Protected118571 < Node: Psize119208 < Node: Purgem119885 < Node: PushSection120099 < Node: Quad120682 < Node: Rept121128 < Node: Sbttl121534 < Node: Scl121892 < Node: Section122388 < Node: Set125409 < Node: Short125961 < Node: Single126274 < Node: Size126611 < Node: Sleb128127348 < Node: Skip127663 < Node: Space127978 < Node: Stab128863 < Node: String130858 < Node: Struct131277 < Node: SubSection131993 < Node: Symver132547 < Node: Tag134931 < Node: Text135439 < Node: Title135751 < Node: Type136123 < Node: Uleb128137230 < Node: Val137545 < Node: Version137906 < Node: VTableEntry138172 < Node: VTableInherit138453 < Node: Weak138887 < Node: Word139148 < Node: Deprecated140982 < Node: Machine Dependencies141207 < Node: ARC-Dependent143292 < Node: ARC Options143668 < Node: ARC Syntax144720 < Node: ARC-Chars144940 < Node: ARC-Regs145059 < Node: ARC Floating Point145170 < Node: ARC Directives145472 < Node: ARC Opcodes146754 < Node: AMD29K-Dependent146954 < Node: AMD29K Options147335 < Node: AMD29K Syntax147509 < Node: AMD29K-Macros147773 < Node: AMD29K-Chars148024 < Node: AMD29K-Regs148287 < Node: AMD29K Floating Point149551 < Node: AMD29K Directives149757 < Node: AMD29K Opcodes151165 < Node: ARM-Dependent151501 < Node: ARM Options151875 < Node: ARM Syntax154914 < Node: ARM-Chars155134 < Node: ARM-Regs155645 < Node: ARM Floating Point155817 < Node: ARM Directives156007 < Node: ARM Opcodes158074 < Node: D10V-Dependent160124 < Node: D10V-Opts160466 < Node: D10V-Syntax161420 < Node: D10V-Size161940 < Node: D10V-Subs162900 < Node: D10V-Chars163922 < Node: D10V-Regs165508 < Node: D10V-Addressing166539 < Node: D10V-Word167212 < Node: D10V-Float167713 < Node: D10V-Opcodes168015 < Node: D30V-Dependent168399 < Node: D30V-Opts168744 < Node: D30V-Syntax169410 < Node: D30V-Size169933 < Node: D30V-Subs170891 < Node: D30V-Chars171913 < Node: D30V-Guarded174198 < Node: D30V-Regs174866 < Node: D30V-Addressing175992 < Node: D30V-Float176647 < Node: D30V-Opcodes176949 < Node: H8/300-Dependent177333 < Node: H8/300 Options177737 < Node: H8/300 Syntax177918 < Node: H8/300-Chars178205 < Node: H8/300-Regs178489 < Node: H8/300-Addressing179393 < Node: H8/300 Floating Point180419 < Node: H8/300 Directives180735 < Node: H8/300 Opcodes181255 < Node: H8/500-Dependent189608 < Node: H8/500 Options190012 < Node: H8/500 Syntax190193 < Node: H8/500-Chars190480 < Node: H8/500-Regs190771 < Node: H8/500-Addressing191527 < Node: H8/500 Floating Point192144 < Node: H8/500 Directives192460 < Node: H8/500 Opcodes192779 < Node: HPPA-Dependent197892 < Node: HPPA Notes198317 < Node: HPPA Options199064 < Node: HPPA Syntax199248 < Node: HPPA Floating Point200507 < Node: HPPA Directives200702 < Node: HPPA Opcodes207293 < Node: ESA/390-Dependent207541 < Node: ESA/390 Notes207991 < Node: ESA/390 Options208771 < Node: ESA/390 Syntax208970 < Node: ESA/390 Floating Point211131 < Node: ESA/390 Directives211400 < Node: ESA/390 Opcodes214677 < Node: i386-Dependent214928 < Node: i386-Options215986 < Node: i386-Syntax216597 < Node: i386-Mnemonics219000 < Node: i386-Regs221454 < Node: i386-Prefixes223488 < Node: i386-Memory226236 < Node: i386-jumps229162 < Node: i386-Float230252 < Node: i386-SIMD232070 < Node: i386-16bit233168 < Node: i386-Bugs235193 < Node: i386-Arch235932 < Node: i386-Notes236978 < Node: i860-Dependent237823 < Node: Notes-i860238209 < Node: Options-i860238703 < Node: Directives-i860239708 < Node: Opcodes for i860240370 < Node: i960-Dependent242489 < Node: Options-i960242881 < Node: Floating Point-i960246762 < Node: Directives-i960247019 < Node: Opcodes for i960249039 < Node: callj-i960249645 < Node: Compare-and-branch-i960250120 < Node: M32R-Dependent252009 < Node: M32R-Opts252272 < Node: M32R-Warnings254024 < Node: M68K-Dependent257012 < Node: M68K-Opts257469 < Node: M68K-Syntax263760 < Node: M68K-Moto-Syntax265588 < Node: M68K-Float268166 < Node: M68K-Directives268675 < Node: M68K-opcodes269270 < Node: M68K-Branch269482 < Node: M68K-Chars273668 < Node: M68HC11-Dependent274066 < Node: M68HC11-Opts274469 < Node: M68HC11-Syntax277172 < Node: M68HC11-Float277988 < Node: M68HC11-opcodes278501 < Node: M68HC11-Branch278669 < Node: MIPS-Dependent281176 < Node: MIPS Opts282078 < Node: MIPS Object286997 < Node: MIPS Stabs288552 < Node: MIPS ISA289263 < Node: MIPS autoextend290393 < Node: MIPS insn291104 < Node: MIPS option stack291590 < Node: PJ-Dependent292303 < Node: PJ Options292516 < Node: SH-Dependent292783 < Node: SH Options293163 < Node: SH Syntax293328 < Node: SH-Chars293587 < Node: SH-Regs293866 < Node: SH-Addressing294465 < Node: SH Floating Point295359 < Node: SH Directives295655 < Node: SH Opcodes296011 < Node: Sparc-Dependent300258 < Node: Sparc-Opts300630 < Node: Sparc-Aligned-Data302876 < Node: Sparc-Float303720 < Node: Sparc-Directives303910 < Node: Z8000-Dependent305859 < Node: Z8000 Options306818 < Node: Z8000 Syntax306993 < Node: Z8000-Chars307269 < Node: Z8000-Regs307487 < Node: Z8000-Addressing308277 < Node: Z8000 Directives309220 < Node: Z8000 Opcodes310818 < Node: Vax-Dependent320754 < Node: VAX-Opts321261 < Node: VAX-float324985 < Node: VAX-directives325606 < Node: VAX-opcodes326455 < Node: VAX-branch326833 < Node: VAX-operands329329 < Node: VAX-no330081 < Node: V850-Dependent330307 < Node: V850 Options330693 < Node: V850 Syntax332506 < Node: V850-Chars332732 < Node: V850-Regs332882 < Node: V850 Floating Point334419 < Node: V850 Directives334614 < Node: V850 Opcodes335514 < Node: Reporting Bugs340799 < Node: Bug Criteria341522 < Node: Bug Reporting342282 < Node: Acknowledgements348850 < Ref: Acknowledgements-Footnote-1353641 < Node: GNU Free Documentation License353667 < Node: Index372091 --- > Node: Overview1628 > Node: Manual16196 > Node: GNU Assembler17135 > Node: Object Formats18301 > Node: Command Line18748 > Node: Input Files19830 > Node: Object21809 > Node: Errors22756 > Node: Invoking23946 > Node: a25792 > Node: D27126 > Node: f27346 > Node: I27849 > Node: K28388 > Node: L28687 > Node: M29513 > Node: MD33903 > Node: o34322 > Node: R34770 > Node: statistics35786 > Node: traditional-format36186 > Node: v36652 > Node: W36920 > Node: Z37820 > Node: Syntax38335 > Node: Preprocessing38925 > Node: Whitespace40485 > Node: Comments40875 > Node: Symbol Intro42953 > Node: Statements43636 > Node: Constants45550 > Node: Characters46176 > Node: Strings46669 > Node: Chars48822 > Node: Numbers49563 > Node: Integers50094 > Node: Bignums50737 > Node: Flonums51080 > Node: Sections52813 > Node: Secs Background53187 > Node: Ld Sections58213 > Node: As Sections60609 > Node: Sub-Sections61514 > Node: bss64513 > Node: Symbols65458 > Node: Labels66105 > Node: Setting Symbols66831 > Node: Symbol Names67196 > Node: Dot70158 > Node: Symbol Attributes70600 > Node: Symbol Value71332 > Node: Symbol Type72368 > Node: a.out Symbols72747 > Node: Symbol Desc72997 > Node: Symbol Other73279 > Node: COFF Symbols73435 > Node: SOM Symbols74064 > Node: Expressions74497 > Node: Empty Exprs75245 > Node: Integer Exprs75587 > Node: Arguments75977 > Node: Operators77074 > Node: Prefix Ops77400 > Node: Infix Ops77719 > Node: Pseudo Ops80107 > Node: Abort84862 > Node: ABORT85263 > Node: Align85525 > Node: Ascii87714 > Node: Asciz88015 > Node: Balign88255 > Node: Byte90113 > Node: Comm90346 > Node: Data91705 > Node: Def92015 > Node: Desc92383 > Node: Dim92876 > Node: Double93267 > Node: Eject93598 > Node: Else93766 > Node: Elseif94056 > Node: End94340 > Node: Endef94548 > Node: Endfunc94871 > Node: Endif95039 > Node: Equ95292 > Node: Equiv95595 > Node: Err95991 > Node: Exitm96294 > Node: Extern96454 > Node: Fail96708 > Node: File97146 > Node: Fill97755 > Node: Float98712 > Node: Func99046 > Node: Global99626 > Node: Hidden100369 > Node: hword100938 > Node: Ident101259 > Node: If101559 > Node: Include104151 > Node: Int104691 > Node: Internal105065 > Node: Irp105700 > Node: Irpc106499 > Node: Lcomm107318 > Node: Lflags108059 > Node: Line108246 > Node: Linkonce109269 > Node: Ln110489 > Node: MRI110637 > Node: List110964 > Node: Long111567 > Node: Macro111737 > Node: Nolist114121 > Node: Octa114537 > Node: Org114863 > Node: P2align116138 > Node: Previous118059 > Node: PopSection118746 > Node: Print119247 > Node: Protected119469 > Node: Psize120106 > Node: Purgem120783 > Node: PushSection120997 > Node: Quad121580 > Node: Rept122026 > Node: Sbttl122432 > Node: Scl122790 > Node: Section123286 > Node: Set126307 > Node: Short126859 > Node: Single127172 > Node: Size127509 > Node: Sleb128128246 > Node: Skip128561 > Node: Space128876 > Node: Stab129761 > Node: String131756 > Node: Struct132175 > Node: SubSection132891 > Node: Symver133445 > Node: Tag135829 > Node: Text136337 > Node: Title136649 > Node: Type137021 > Node: Uleb128138128 > Node: Val138443 > Node: Version138804 > Node: VTableEntry139070 > Node: VTableInherit139351 > Node: Weak139785 > Node: Word140046 > Node: Deprecated141880 > Node: Machine Dependencies142105 > Node: ARC-Dependent144190 > Node: ARC Options144566 > Node: ARC Syntax145618 > Node: ARC-Chars145838 > Node: ARC-Regs145957 > Node: ARC Floating Point146068 > Node: ARC Directives146370 > Node: ARC Opcodes147652 > Node: AMD29K-Dependent147852 > Node: AMD29K Options148233 > Node: AMD29K Syntax148407 > Node: AMD29K-Macros148671 > Node: AMD29K-Chars148922 > Node: AMD29K-Regs149185 > Node: AMD29K Floating Point150449 > Node: AMD29K Directives150655 > Node: AMD29K Opcodes152063 > Node: ARM-Dependent152399 > Node: ARM Options152773 > Node: ARM Syntax155812 > Node: ARM-Chars156032 > Node: ARM-Regs156543 > Node: ARM Floating Point156715 > Node: ARM Directives156905 > Node: ARM Opcodes158972 > Node: D10V-Dependent161022 > Node: D10V-Opts161364 > Node: D10V-Syntax162318 > Node: D10V-Size162838 > Node: D10V-Subs163798 > Node: D10V-Chars164820 > Node: D10V-Regs166406 > Node: D10V-Addressing167437 > Node: D10V-Word168110 > Node: D10V-Float168611 > Node: D10V-Opcodes168913 > Node: D30V-Dependent169297 > Node: D30V-Opts169642 > Node: D30V-Syntax170308 > Node: D30V-Size170831 > Node: D30V-Subs171789 > Node: D30V-Chars172811 > Node: D30V-Guarded175096 > Node: D30V-Regs175764 > Node: D30V-Addressing176890 > Node: D30V-Float177545 > Node: D30V-Opcodes177847 > Node: H8/300-Dependent178231 > Node: H8/300 Options178635 > Node: H8/300 Syntax178816 > Node: H8/300-Chars179103 > Node: H8/300-Regs179387 > Node: H8/300-Addressing180291 > Node: H8/300 Floating Point181317 > Node: H8/300 Directives181633 > Node: H8/300 Opcodes182153 > Node: H8/500-Dependent190506 > Node: H8/500 Options190910 > Node: H8/500 Syntax191091 > Node: H8/500-Chars191378 > Node: H8/500-Regs191669 > Node: H8/500-Addressing192425 > Node: H8/500 Floating Point193042 > Node: H8/500 Directives193358 > Node: H8/500 Opcodes193677 > Node: HPPA-Dependent198790 > Node: HPPA Notes199215 > Node: HPPA Options199962 > Node: HPPA Syntax200146 > Node: HPPA Floating Point201405 > Node: HPPA Directives201600 > Node: HPPA Opcodes208191 > Node: ESA/390-Dependent208439 > Node: ESA/390 Notes208889 > Node: ESA/390 Options209669 > Node: ESA/390 Syntax209868 > Node: ESA/390 Floating Point212029 > Node: ESA/390 Directives212298 > Node: ESA/390 Opcodes215575 > Node: i386-Dependent215826 > Node: i386-Options216884 > Node: i386-Syntax217495 > Node: i386-Mnemonics219898 > Node: i386-Regs222352 > Node: i386-Prefixes224386 > Node: i386-Memory227134 > Node: i386-Jumps230060 > Node: i386-Float231170 > Node: i386-SIMD232988 > Node: i386-16bit234086 > Node: i386-Bugs236111 > Node: i386-Arch236850 > Node: i386-Notes238714 > Node: i860-Dependent239559 > Node: Notes-i860239945 > Node: Options-i860240439 > Node: Directives-i860241444 > Node: Opcodes for i860242106 > Node: i960-Dependent244225 > Node: Options-i960244617 > Node: Floating Point-i960248498 > Node: Directives-i960248755 > Node: Opcodes for i960250775 > Node: callj-i960251381 > Node: Compare-and-branch-i960251856 > Node: M32R-Dependent253745 > Node: M32R-Opts254008 > Node: M32R-Warnings255760 > Node: M68K-Dependent258748 > Node: M68K-Opts259205 > Node: M68K-Syntax265496 > Node: M68K-Moto-Syntax267324 > Node: M68K-Float269902 > Node: M68K-Directives270411 > Node: M68K-opcodes271006 > Node: M68K-Branch271218 > Node: M68K-Chars275404 > Node: M68HC11-Dependent275802 > Node: M68HC11-Opts276205 > Node: M68HC11-Syntax278908 > Node: M68HC11-Float279724 > Node: M68HC11-opcodes280237 > Node: M68HC11-Branch280405 > Node: MIPS-Dependent282912 > Node: MIPS Opts283814 > Node: MIPS Object288733 > Node: MIPS Stabs290288 > Node: MIPS ISA290999 > Node: MIPS autoextend292129 > Node: MIPS insn292840 > Node: MIPS option stack293326 > Node: PJ-Dependent294039 > Node: PJ Options294252 > Node: SH-Dependent294519 > Node: SH Options294899 > Node: SH Syntax295064 > Node: SH-Chars295323 > Node: SH-Regs295602 > Node: SH-Addressing296201 > Node: SH Floating Point297095 > Node: SH Directives297391 > Node: SH Opcodes297747 > Node: Sparc-Dependent301994 > Node: Sparc-Opts302366 > Node: Sparc-Aligned-Data304612 > Node: Sparc-Float305456 > Node: Sparc-Directives305646 > Node: Z8000-Dependent307595 > Node: Z8000 Options308554 > Node: Z8000 Syntax308729 > Node: Z8000-Chars309005 > Node: Z8000-Regs309223 > Node: Z8000-Addressing310013 > Node: Z8000 Directives310956 > Node: Z8000 Opcodes312554 > Node: Vax-Dependent322490 > Node: VAX-Opts322997 > Node: VAX-float326721 > Node: VAX-directives327342 > Node: VAX-opcodes328191 > Node: VAX-branch328569 > Node: VAX-operands331065 > Node: VAX-no331817 > Node: V850-Dependent332043 > Node: V850 Options332429 > Node: V850 Syntax334242 > Node: V850-Chars334468 > Node: V850-Regs334618 > Node: V850 Floating Point336155 > Node: V850 Directives336350 > Node: V850 Opcodes337250 > Node: Reporting Bugs342535 > Node: Bug Criteria343258 > Node: Bug Reporting344018 > Node: Acknowledgements350586 > Ref: Acknowledgements-Footnote-1355377 > Node: GNU Free Documentation License355403 > Node: Index373827 diff -rN binutils-2.11/gas/doc/as.info-1 binutils-2.11.2/gas/doc/as.info-1 25c25 < This file is a user guide to the GNU assembler `as' version 2.11. --- > This file is a user guide to the GNU assembler `as' version 2.11.2. diff -rN binutils-2.11/gas/doc/as.info-2 binutils-2.11.2/gas/doc/as.info-2 796c796 < 3. Lowest Precedence --- > 3. Low Precedence 808a809,846 > `==' > "Is Equal To" > > `<>' > "Is Not Equal To" > > `<' > "Is Less Than" > > `>' > "Is Greater Than" > > `>=' > "Is Greater Than Or Equal To" > > `<=' > "Is Less Than Or Equal To" > > The comparison operators can be used as infix operators. A > true results has a value of -1 whereas a false result has a > value of 0. Note, these operators perform signed > comparisons. > > 4. Lowest Precedence > > `&&' > "Logical And". > > `||' > "Logical Or". > > These two logical operations can be used to combine the > results of sub expressions. Note, unlike the comparison > operators a true result returns a value of 1 but a false > results does still return 0. Also note that the logical or > operator has a slightly lower precedence than logical and. > > 1370,1404d1407 < <  < File: as.info, Node: Global, Next: Hidden, Prev: Func, Up: Pseudo Ops < < `.global SYMBOL', `.globl SYMBOL' < ================================= < < `.global' makes the symbol visible to `ld'. If you define SYMBOL in < your partial program, its value is made available to other partial < programs that are linked with it. Otherwise, SYMBOL takes its < attributes from a symbol of the same name from another file linked into < the same program. < < Both spellings (`.globl' and `.global') are accepted, for < compatibility with other assemblers. < < On the HPPA, `.global' is not always enough to make it accessible to < other partial programs. You may need the HPPA-only `.EXPORT' directive < as well. *Note HPPA Assembler Directives: HPPA Directives. < <  < File: as.info, Node: Hidden, Next: hword, Prev: Global, Up: Pseudo Ops < < `.hidden NAMES' < =============== < < This one of the ELF visibility directives. The other two are < `.internal' (*note `.internal': Internal.) and `.protected' (*note < `.protected': Protected.). < < This directive overrides the named symbols default visibility (which < is set by their binding: local, global or weak). The directive sets < the visibility to `hidden' which means that the symbols are not visible < to other components. Such symbols are always considered to be < `protected' as well. diff -rN binutils-2.11/gas/doc/as.info-3 binutils-2.11.2/gas/doc/as.info-3 19a20,54 > File: as.info, Node: Global, Next: Hidden, Prev: Func, Up: Pseudo Ops > > `.global SYMBOL', `.globl SYMBOL' > ================================= > > `.global' makes the symbol visible to `ld'. If you define SYMBOL in > your partial program, its value is made available to other partial > programs that are linked with it. Otherwise, SYMBOL takes its > attributes from a symbol of the same name from another file linked into > the same program. > > Both spellings (`.globl' and `.global') are accepted, for > compatibility with other assemblers. > > On the HPPA, `.global' is not always enough to make it accessible to > other partial programs. You may need the HPPA-only `.EXPORT' directive > as well. *Note HPPA Assembler Directives: HPPA Directives. > >  > File: as.info, Node: Hidden, Next: hword, Prev: Global, Up: Pseudo Ops > > `.hidden NAMES' > =============== > > This one of the ELF visibility directives. The other two are > `.internal' (*note `.internal': Internal.) and `.protected' (*note > `.protected': Protected.). > > This directive overrides the named symbols default visibility (which > is set by their binding: local, global or weak). The directive sets > the visibility to `hidden' which means that the symbols are not visible > to other components. Such symbols are always considered to be > `protected' as well. > >  1288c1323 < the same as `-marc5', which is also the default. --- > the same as `-marc6', which is also the default. 1402c1437 < version. Again `arc' is an alias for `arc5'. --- > version. Again `arc' is an alias for `arc6'. 1407c1442 < (arc5). --- > (arc6). 1478,1522d1512 < <  < File: as.info, Node: AMD29K-Regs, Prev: AMD29K-Chars, Up: AMD29K Syntax < < Register Names < .............. < < General-purpose registers are represented by predefined symbols of < the form `GRNNN' (for global registers) or `LRNNN' (for local < registers), where NNN represents a number between `0' and `127', < written with no leading zeros. The leading letters may be in either < upper or lower case; for example, `gr13' and `LR7' are both valid < register names. < < You may also refer to general-purpose registers by specifying the < register number as the result of an expression (prefixed with `%%' to < flag the expression as a register number): < %%EXPRESSION < < --where EXPRESSION must be an absolute expression evaluating to a < number between `0' and `255'. The range [0, 127] refers to global < registers, and the range [128, 255] to local registers. < < In addition, `as' understands the following protected < special-purpose register names for the AMD 29K family: < < vab chd pc0 < ops chc pc1 < cps rbp pc2 < cfg tmc mmu < cha tmr lru < < These unprotected special-purpose register names are also recognized: < ipc alu fpe < ipa bp inte < ipb fc fps < q cr exop < <  < File: as.info, Node: AMD29K Floating Point, Next: AMD29K Directives, Prev: AMD29K Syntax, Up: AMD29K-Dependent < < Floating Point < -------------- < < The AMD 29K family uses IEEE floating-point numbers. diff -rN binutils-2.11/gas/doc/as.info-4 binutils-2.11.2/gas/doc/as.info-4 19a20,64 > File: as.info, Node: AMD29K-Regs, Prev: AMD29K-Chars, Up: AMD29K Syntax > > Register Names > .............. > > General-purpose registers are represented by predefined symbols of > the form `GRNNN' (for global registers) or `LRNNN' (for local > registers), where NNN represents a number between `0' and `127', > written with no leading zeros. The leading letters may be in either > upper or lower case; for example, `gr13' and `LR7' are both valid > register names. > > You may also refer to general-purpose registers by specifying the > register number as the result of an expression (prefixed with `%%' to > flag the expression as a register number): > %%EXPRESSION > > --where EXPRESSION must be an absolute expression evaluating to a > number between `0' and `255'. The range [0, 127] refers to global > registers, and the range [128, 255] to local registers. > > In addition, `as' understands the following protected > special-purpose register names for the AMD 29K family: > > vab chd pc0 > ops chc pc1 > cps rbp pc2 > cfg tmc mmu > cha tmr lru > > These unprotected special-purpose register names are also recognized: > ipc alu fpe > ipa bp inte > ipb fc fps > q cr exop > >  > File: as.info, Node: AMD29K Floating Point, Next: AMD29K Directives, Prev: AMD29K Syntax, Up: AMD29K-Dependent > > Floating Point > -------------- > > The AMD 29K family uses IEEE floating-point numbers. > >  1505,1547d1549 < <  < File: as.info, Node: HPPA-Dependent, Next: ESA/390-Dependent, Prev: H8/500-Dependent, Up: Machine Dependencies < < HPPA Dependent Features < ======================= < < * Menu: < < * HPPA Notes:: Notes < * HPPA Options:: Options < * HPPA Syntax:: Syntax < * HPPA Floating Point:: Floating Point < * HPPA Directives:: HPPA Machine Directives < * HPPA Opcodes:: Opcodes < <  < File: as.info, Node: HPPA Notes, Next: HPPA Options, Up: HPPA-Dependent < < Notes < ----- < < As a back end for GNU CC `as' has been throughly tested and should < work extremely well. We have tested it only minimally on hand written < assembly code and no one has tested it much on the assembly output from < the HP compilers. < < The format of the debugging sections has changed since the original < `as' port (version 1.3X) was released; therefore, you must rebuild all < HPPA objects and libraries with the new assembler so that you can debug < the final executable. < < The HPPA `as' port generates a small subset of the relocations < available in the SOM and ELF object file formats. Additional relocation < support will be added as it becomes necessary. < <  < File: as.info, Node: HPPA Options, Next: HPPA Syntax, Prev: HPPA Notes, Up: HPPA-Dependent < < Options < ------- < < `as' has no machine-dependent command-line options for the HPPA. diff -rN binutils-2.11/gas/doc/as.info-5 binutils-2.11.2/gas/doc/as.info-5 19a20,62 > File: as.info, Node: HPPA-Dependent, Next: ESA/390-Dependent, Prev: H8/500-Dependent, Up: Machine Dependencies > > HPPA Dependent Features > ======================= > > * Menu: > > * HPPA Notes:: Notes > * HPPA Options:: Options > * HPPA Syntax:: Syntax > * HPPA Floating Point:: Floating Point > * HPPA Directives:: HPPA Machine Directives > * HPPA Opcodes:: Opcodes > >  > File: as.info, Node: HPPA Notes, Next: HPPA Options, Up: HPPA-Dependent > > Notes > ----- > > As a back end for GNU CC `as' has been throughly tested and should > work extremely well. We have tested it only minimally on hand written > assembly code and no one has tested it much on the assembly output from > the HP compilers. > > The format of the debugging sections has changed since the original > `as' port (version 1.3X) was released; therefore, you must rebuild all > HPPA objects and libraries with the new assembler so that you can debug > the final executable. > > The HPPA `as' port generates a small subset of the relocations > available in the SOM and ELF object file formats. Additional relocation > support will be added as it becomes necessary. > >  > File: as.info, Node: HPPA Options, Next: HPPA Syntax, Prev: HPPA Notes, Up: HPPA-Dependent > > Options > ------- > > `as' has no machine-dependent command-line options for the HPPA. > >  462c505 < * i386-jumps:: Handling of Jump Instructions --- > * i386-Jumps:: Handling of Jump Instructions 711c754 < File: as.info, Node: i386-Memory, Next: i386-jumps, Prev: i386-Prefixes, Up: i386-Dependent --- > File: as.info, Node: i386-Memory, Next: i386-Jumps, Prev: i386-Prefixes, Up: i386-Dependent 781c824 < File: as.info, Node: i386-jumps, Next: i386-Float, Prev: i386-Memory, Up: i386-Dependent --- > File: as.info, Node: i386-Jumps, Next: i386-Float, Prev: i386-Memory, Up: i386-Dependent 789,790c832,833 < is insufficient a long (32-bit) displacement is used. We do not support < word (16-bit) displacement jumps in 32-bit mode (i.e. prefixing the jump --- > is insufficient a long displacement is used. We do not support word > (16-bit) displacement jumps in 32-bit mode (i.e. prefixing the jump 793c836 < added. --- > added. (See also *note i386-Arch::) 807c850 < File: as.info, Node: i386-Float, Next: i386-SIMD, Prev: i386-jumps, Up: i386-Dependent --- > File: as.info, Node: i386-Float, Next: i386-SIMD, Prev: i386-Jumps, Up: i386-Dependent 945,951c988,1010 < Apart from the warning, there is only one other effect on `as' < operation; If you specify a CPU other than `i486', then shift by one < instructions such as `sarl $1, %eax' will automatically use a two byte < opcode sequence. The larger three byte opcode sequence is used on the < 486 (and when no architecture is specified) because it executes faster < on the 486. Note that you can explicitly request the two byte opcode < by writing `sarl %eax'. --- > Apart from the warning, there are only two other effects on `as' > operation; Firstly, if you specify a CPU other than `i486', then shift > by one instructions such as `sarl $1, %eax' will automatically use a > two byte opcode sequence. The larger three byte opcode sequence is > used on the 486 (and when no architecture is specified) because it > executes faster on the 486. Note that you can explicitly request the > two byte opcode by writing `sarl %eax'. Secondly, if you specify > `i8086', `i186', or `i286', _and_ `.code16' or `.code16gcc' then byte > offset conditional jumps will be promoted when necessary to a two > instruction sequence consisting of a conditional jump of the opposite > sense around an unconditional jump to the target. > > Following the CPU architecture, you may specify `jumps' or `nojumps' > to control automatic promotion of conditional jumps. `jumps' is the > default, and enables jump promotion; All external jumps will be of the > long variety, and file-local jumps will be promoted as necessary. > (*note i386-Jumps::) `nojumps' leaves external conditional jumps as > byte offset jumps, and warns about file-local conditional jumps that > `as' promotes. Unconditional jumps are treated as for `jumps'. > > For example > > .arch i8086,nojumps 1215,1260d1273 < <  < File: as.info, Node: Directives-i960, Next: Opcodes for i960, Prev: Floating Point-i960, Up: i960-Dependent < < i960 Machine Directives < ----------------------- < < `.bss SYMBOL, LENGTH, ALIGN' < Reserve LENGTH bytes in the bss section for a local SYMBOL, < aligned to the power of two specified by ALIGN. LENGTH and ALIGN < must be positive absolute expressions. This directive differs < from `.lcomm' only in that it permits you to specify an alignment. < *Note `.lcomm': Lcomm. < < `.extended FLONUMS' < `.extended' expects zero or more flonums, separated by commas; for < each flonum, `.extended' emits an IEEE extended-format (80-bit) < floating-point number. < < `.leafproc CALL-LAB, BAL-LAB' < You can use the `.leafproc' directive in conjunction with the < optimized `callj' instruction to enable faster calls of leaf < procedures. If a procedure is known to call no other procedures, < you may define an entry point that skips procedure prolog code < (and that does not depend on system-supplied saved context), and < declare it as the BAL-LAB using `.leafproc'. If the procedure < also has an entry point that goes through the normal prolog, you < can specify that entry point as CALL-LAB. < < A `.leafproc' declaration is meant for use in conjunction with the < optimized call instruction `callj'; the directive records the data < needed later to choose between converting the `callj' into a `bal' < or a `call'. < < CALL-LAB is optional; if only one argument is present, or if the < two arguments are identical, the single argument is assumed to be < the `bal' entry point. < < `.sysproc NAME, INDEX' < The `.sysproc' directive defines a name for a system procedure. < After you define it using `.sysproc', you can use NAME to refer to < the system procedure identified by INDEX when calling procedures < with the optimized call instruction `callj'. < < Both arguments are required; INDEX must be between 0 and 31 < (inclusive). diff -rN binutils-2.11/gas/doc/as.info-6 binutils-2.11.2/gas/doc/as.info-6 19a20,65 > File: as.info, Node: Directives-i960, Next: Opcodes for i960, Prev: Floating Point-i960, Up: i960-Dependent > > i960 Machine Directives > ----------------------- > > `.bss SYMBOL, LENGTH, ALIGN' > Reserve LENGTH bytes in the bss section for a local SYMBOL, > aligned to the power of two specified by ALIGN. LENGTH and ALIGN > must be positive absolute expressions. This directive differs > from `.lcomm' only in that it permits you to specify an alignment. > *Note `.lcomm': Lcomm. > > `.extended FLONUMS' > `.extended' expects zero or more flonums, separated by commas; for > each flonum, `.extended' emits an IEEE extended-format (80-bit) > floating-point number. > > `.leafproc CALL-LAB, BAL-LAB' > You can use the `.leafproc' directive in conjunction with the > optimized `callj' instruction to enable faster calls of leaf > procedures. If a procedure is known to call no other procedures, > you may define an entry point that skips procedure prolog code > (and that does not depend on system-supplied saved context), and > declare it as the BAL-LAB using `.leafproc'. If the procedure > also has an entry point that goes through the normal prolog, you > can specify that entry point as CALL-LAB. > > A `.leafproc' declaration is meant for use in conjunction with the > optimized call instruction `callj'; the directive records the data > needed later to choose between converting the `callj' into a `bal' > or a `call'. > > CALL-LAB is optional; if only one argument is present, or if the > two arguments are identical, the single argument is assumed to be > the `bal' entry point. > > `.sysproc NAME, INDEX' > The `.sysproc' directive defines a name for a system procedure. > After you define it using `.sysproc', you can use NAME to refer to > the system procedure identified by INDEX when calling procedures > with the optimized call instruction `callj'. > > Both arguments are required; INDEX must be between 0 and 31 > (inclusive). > >  diff -rN binutils-2.11/gas/doc/as.info-9 binutils-2.11.2/gas/doc/as.info-9 326a327 > * comparison expressions: Infix Ops. 448a450 > * expressions, comparison: Infix Ops. 558c560 < * i386 jump optimization: i386-jumps. --- > * i386 jump optimization: i386-Jumps. 654,655c656,657 < * jump optimization, i386: i386-jumps. < * jump optimization, x86-64: i386-jumps. --- > * jump optimization, i386: i386-Jumps. > * jump optimization, x86-64: i386-Jumps. 1161c1163 < * x86-64 jump optimization: i386-jumps. --- > * x86-64 jump optimization: i386-Jumps. diff -rN binutils-2.11/gas/doc/as.texinfo binutils-2.11.2/gas/doc/as.texinfo 2c2,3 < @c Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 2000, 2001 --- > @c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, > @c 2001 3139c3140 < Lowest Precedence --- > Low Precedence 3158a3160,3194 > > @cindex comparison expressions > @cindex expressions, comparison > @item == > @dfn{Is Equal To} > @item <> > @dfn{Is Not Equal To} > @item < > @dfn{Is Less Than} > @itemx > > @dfn{Is Greater Than} > @itemx >= > @dfn{Is Greater Than Or Equal To} > @itemx <= > @dfn{Is Less Than Or Equal To} > > The comparison operators can be used as infix operators. A true results has a > value of -1 whereas a false result has a value of 0. Note, these operators > perform signed comparisons. > @end table > > @item Lowest Precedence > > @table @code > @item && > @dfn{Logical And}. > > @item || > @dfn{Logical Or}. > > These two logical operations can be used to combine the results of sub > expressions. Note, unlike the comparison operators a true result returns a > value of 1 but a false results does still return 0. Also note that the logical > or operator has a slightly lower precedence than logical and. > diff -rN binutils-2.11/gas/doc/c-a29k.texi binutils-2.11.2/gas/doc/c-a29k.texi 1c1 < @c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. --- > @c Copyright 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-arc.texi binutils-2.11.2/gas/doc/c-arc.texi 1c1 < @c Copyright (C) 2000, 2001 Free Software Foundation, Inc. --- > @c Copyright 2000, 2001 Free Software Foundation, Inc. 16c16 < @set ARC_CORE_DEFAULT 5 --- > @set ARC_CORE_DEFAULT 6 diff -rN binutils-2.11/gas/doc/c-arm.texi binutils-2.11.2/gas/doc/c-arm.texi 1c1,2 < @c Copyright (C) 1996, 1998, 1999, 2000 Free Software Foundation, Inc. --- > @c Copyright 1996, 1997, 1998, 1999, 2000, 2001 > @c Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-d10v.texi binutils-2.11.2/gas/doc/c-d10v.texi 1c1 < @c Copyright (C) 1996 Free Software Foundation, Inc. --- > @c Copyright 1996, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-hppa.texi binutils-2.11.2/gas/doc/c-hppa.texi 1c1,2 < @c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. --- > @c Copyright 1991, 1992, 1993, 1994, 1995, 1998 > @c Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-i370.texi binutils-2.11.2/gas/doc/c-i370.texi 1c1 < @c Copyright (C) 2000 Free Software Foundation, Inc. --- > @c Copyright 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-i386.texi binutils-2.11.2/gas/doc/c-i386.texi 1c1,2 < @c Copyright (C) 1991, 92, 93, 94, 95, 97, 1998 Free Software Foundation, Inc. --- > @c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001 > @c Free Software Foundation, Inc. 29c30 < * i386-jumps:: Handling of Jump Instructions --- > * i386-Jumps:: Handling of Jump Instructions 491c492 < @node i386-jumps --- > @node i386-Jumps 501c502 < is insufficient a long (32-bit) displacement is used. We do not support --- > is insufficient a long displacement is used. We do not support 505c506 < is added. --- > is added. (See also @pxref{i386-Arch}) 699,700c700,701 < Apart from the warning, there is only one other effect on < @code{@value{AS}} operation; If you specify a CPU other than --- > Apart from the warning, there are only two other effects on > @code{@value{AS}} operation; Firstly, if you specify a CPU other than 705a707,726 > Secondly, if you specify @samp{i8086}, @samp{i186}, or @samp{i286}, > @emph{and} @samp{.code16} or @samp{.code16gcc} then byte offset > conditional jumps will be promoted when necessary to a two instruction > sequence consisting of a conditional jump of the opposite sense around > an unconditional jump to the target. > > Following the CPU architecture, you may specify @samp{jumps} or > @samp{nojumps} to control automatic promotion of conditional jumps. > @samp{jumps} is the default, and enables jump promotion; All external > jumps will be of the long variety, and file-local jumps will be promoted > as necessary. (@pxref{i386-Jumps}) @samp{nojumps} leaves external > conditional jumps as byte offset jumps, and warns about file-local > conditional jumps that @code{@value{AS}} promotes. > Unconditional jumps are treated as for @samp{jumps}. > > For example > > @smallexample > .arch i8086,nojumps > @end smallexample diff -rN binutils-2.11/gas/doc/c-i860.texi binutils-2.11.2/gas/doc/c-i860.texi 1c1 < @c Copyright (C) 2000 Free Software Foundation, Inc. --- > @c Copyright 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-i960.texi binutils-2.11.2/gas/doc/c-i960.texi 1c1,2 < @c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. --- > @c Copyright 1991, 1992, 1993, 1994, 1995, 1996 > @c Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-m32r.texi binutils-2.11.2/gas/doc/c-m32r.texi 1c1,2 < @c Copyright (C) 1991, 92-98, 1999 Free Software Foundation, Inc. --- > @c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000 > @c Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-m68hc11.texi binutils-2.11.2/gas/doc/c-m68hc11.texi 1c1,2 < @c Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. --- > @c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000 > @c Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-m68k.texi binutils-2.11.2/gas/doc/c-m68k.texi 1c1,2 < @c Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. --- > @c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000 > @c Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-mips.texi binutils-2.11.2/gas/doc/c-mips.texi 1c1,2 < @c Copyright (C) 1991, 92, 93, 94, 95, 1997 Free Software Foundation, Inc. --- > @c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000 > @c Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-ns32k.texi binutils-2.11.2/gas/doc/c-ns32k.texi 1c1 < @c Copyright (c) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. --- > @c Copyright 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-pj.texi binutils-2.11.2/gas/doc/c-pj.texi 1c1 < @c Copyright (C) 1999 Free Software Foundation, Inc. --- > @c Copyright 1999 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-sh.texi binutils-2.11.2/gas/doc/c-sh.texi 1c1,2 < @c Copyright (C) 1991, 92, 93, 94, 95, 1997 Free Software Foundation, Inc. --- > @c Copyright 1991, 1992, 1993, 1994, 1995, 1997 > @c Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-sparc.texi binutils-2.11.2/gas/doc/c-sparc.texi 1c1,2 < @c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. --- > @c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1999 > @c Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-tic54x.texi binutils-2.11.2/gas/doc/c-tic54x.texi 1c1 < @c Copyright (C) 1999, 2000 Free Software Foundation, Inc. --- > @c Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-v850.texi binutils-2.11.2/gas/doc/c-v850.texi 1c1 < @c Copyright (C) 1997, 1998 Free Software Foundation, Inc. --- > @c Copyright 1997 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-vax.texi binutils-2.11.2/gas/doc/c-vax.texi 1c1,2 < @c Copyright (C) 1991, 92, 93, 94, 95, 96, 1998 Free Software Foundation, Inc. --- > @c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998 > @c Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/c-z8k.texi binutils-2.11.2/gas/doc/c-z8k.texi 1c1 < @c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. --- > @c Copyright 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/gasp.texi binutils-2.11.2/gas/doc/gasp.texi 6c6 < @c Copyright (c) 1994, 2000 Free Software Foundation, Inc. --- > @c Copyright 1994, 1995, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/doc/gasver.texi binutils-2.11.2/gas/doc/gasver.texi 1c1 < @set VERSION 2.11 --- > @set VERSION 2.11.2 diff -rN binutils-2.11/gas/doc/internals.texi binutils-2.11.2/gas/doc/internals.texi 1a2,4 > @c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, > @c 2001 > @c Free Software Foundation, Inc. 1169,1171c1172,1175 < This macro may be defined to relax a frag. GAS will call this with the frag < and the change in size of all previous frags; @code{md_relax_frag} should < return the change in size of the frag. @xref{Relaxation}. --- > This macro may be defined to relax a frag. GAS will call this with the > segment, the frag, and the change in size of all previous frags; > @code{md_relax_frag} should return the change in size of the frag. > @xref{Relaxation}. diff -rN binutils-2.11/gas/dwarf2dbg.c binutils-2.11.2/gas/dwarf2dbg.c 2c2 < Copyright (C) 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1999, 2000, 2001 Free Software Foundation, Inc. 327c327 < const char *filename; --- > char *filename; 350c350 < as_bad (_("File number %d already allocated"), num); --- > as_bad (_("File number %ld already allocated"), (long) num); 876c876,880 < if (line != e->loc.line || changed) --- > /* Don't try to optimize away redundant entries; gdb wants two > entries for a function where the code starts on the same line as > the {, and there's no way to identify that case here. Trust gcc > to optimize appropriately. */ > if (1 /* line != e->loc.line || changed */) 1299c1303 < as_fatal (_("dwarf2 is not supported for this object file format")); --- > s_app_file (0); diff -rN binutils-2.11/gas/dwarf2dbg.h binutils-2.11.2/gas/dwarf2dbg.h 2c2 < Copyright (C) 1999, 2000 Free Software Foundation, Inc. --- > Copyright 1999, 2000 Free Software Foundation, Inc. diff -rN binutils-2.11/gas/ecoff.c binutils-2.11.2/gas/ecoff.c 2c2,3 < Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. 2192c2193 < int indx; --- > int indx ATTRIBUTE_UNUSED; 2428c2429 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 2466c2467 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 2525c2526 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 2571c2572 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 2621c2622 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 2646c2647 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 2696c2697 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 2765c2766 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 2793c2794 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 2828c2829 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 3008c3009 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 3065c3066 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 3118c3119 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 3143c3144 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 3170c3171 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 3199c3200 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 3240c3241 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 3269c3270 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 3366c3367 < int ignore; --- > int ignore ATTRIBUTE_UNUSED; 3463c3464 < segT sec; --- > segT sec ATTRIBUTE_UNUSED; 3622c3623 < && S_GET_VALUE (sym) <= bfd_get_gp_size (stdoutput)) --- > && S_GET_VALUE (sym) <= (unsigned) bfd_get_gp_size (stdoutput)) 3693c3694 < if (*bufend - (*buf + offset) < add) --- > if ((unsigned long) (*bufend - (*buf + offset)) < add) 4087c4088 < || s > bfd_get_gp_size (stdoutput)) --- > || s > (unsigned) bfd_get_gp_size (stdoutput)) 4102c4103 < <= bfd_get_gp_size (stdoutput))) --- > <= (unsigned) bfd_get_gp_size (stdoutput))) 4257c4258 < if (*bufend - sym_out < external_sym_size) --- > if ((bfd_size_type)(*bufend - sym_out) < external_sym_size) 4375c4376 < if (*bufend - pdr_out < external_pdr_size) --- > if ((bfd_size_type)(*bufend - pdr_out) < external_pdr_size) 4448c4449,4450 < if (*bufend - (char *) aux_out < sizeof (union aux_ext)) --- > if ((unsigned long) (*bufend - (char *) aux_out) > < sizeof (union aux_ext)) 4533c4535 < if (*bufend - str_out < str_cnt) --- > if ((unsigned long)(*bufend - str_out) < str_cnt) 4624c4626 < if (*bufend - fdr_out < external_fdr_size) --- > if ((bfd_size_type)(*bufend - fdr_out) < external_fdr_size) 4774c4776 < if (bufend - (buf + offset) < proc_cnt * external_pdr_size) --- > if ((bfd_size_type)(bufend - (buf + offset)) < proc_cnt * external_pdr_size) diff -rN binutils-2.11/gas/ecoff.h binutils-2.11.2/gas/ecoff.h 2c2,3 < Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. --- > Copyright 1993, 1994, 1995, 1996, 1997, 1998 > Free Software Foundation, Inc. diff -rN binutils-2.11/gas/ehopt.c binutils-2.11.2/gas/ehopt.c 2c2 < Copyright (C) 1998, 2000 Free Software Foundation, Inc. --- > Copyright 1998, 2000, 2001 Free Software Foundation, Inc. 91c91,97 < static int eh_frame_code_alignment PARAMS ((int)); --- > struct cie_info > { > unsigned code_alignment; > int z_augmentation; > }; > > static int get_cie_info PARAMS ((struct cie_info *)); 93c99 < /* Get the code alignment factor from the CIE. */ --- > /* Extract information from the CIE. */ 96,97c102,103 < eh_frame_code_alignment (in_seg) < int in_seg; --- > get_cie_info (info) > struct cie_info *info; 99,101d104 < /* ??? Assume .eh_frame and .debug_frame have the same alignment. */ < static int code_alignment; < 108,114c111 < < if (code_alignment != 0) < return code_alignment; < < /* Can't find the alignment if we've changed sections. */ < if (! in_seg) < return -1; --- > int code_alignment = 0; 150,153c147 < { < code_alignment = -1; < return -1; < } --- > return 0; 166,169c160 < { < code_alignment = -1; < return -1; < } --- > return 0; 183,186c174,175 < { < code_alignment = -1; < return -1; < } --- > return 0; > 206,209c195 < { < code_alignment = -1; < return -1; < } --- > return 0; 233,241c219 < { < code_alignment = -1; < return -1; < } < } < else < { < code_alignment = -1; < return -1; --- > return 0; 242a221,222 > else if (augmentation[0] != 'z') > return 0; 248,252c228,232 < if ((code_alignment & 0x80) != 0 || code_alignment == 0) < { < code_alignment = -1; < return -1; < } --- > if ((code_alignment & 0x80) != 0) > code_alignment = 0; > > info->code_alignment = code_alignment; > info->z_augmentation = (augmentation[0] == 'z'); 254c234 < return code_alignment; --- > return 1; 276a257,272 > enum frame_state > { > state_idle, > state_saw_size, > state_saw_cie_offset, > state_saw_pc_begin, > state_seeing_aug_size, > state_skipping_aug, > state_wait_loc4, > state_saw_loc4, > state_error, > } state; > > int cie_info_ok; > struct cie_info cie_info; > 279,280d274 < int saw_size; < int saw_advance_loc4; 281a276,278 > > int aug_size; > int aug_shift; 300c297 < if (d->saw_size && S_IS_DEFINED (d->size_end_sym)) --- > if (d->state >= state_saw_size && S_IS_DEFINED (d->size_end_sym)) 305,306c302 < d->saw_size = 0; < d->saw_advance_loc4 = 0; --- > d->state = state_idle; 309,310c305 < if (! d->saw_size < && *pnbytes == 4) --- > switch (d->state) 312,322c307,308 < /* This might be the size of the CIE or FDE. We want to know < the size so that we don't accidentally optimize across an FDE < boundary. We recognize the size in one of two forms: a < symbol which will later be defined as a difference, or a < subtraction of two symbols. Either way, we can tell when we < are at the end of the FDE because the symbol becomes defined < (in the case of a subtraction, the end symbol, from which the < start symbol is being subtracted). Other ways of describing < the size will not be optimized. */ < if ((exp->X_op == O_symbol || exp->X_op == O_subtract) < && ! S_IS_DEFINED (exp->X_add_symbol)) --- > case state_idle: > if (*pnbytes == 4) 324,325c310,324 < d->saw_size = 1; < d->size_end_sym = exp->X_add_symbol; --- > /* This might be the size of the CIE or FDE. We want to know > the size so that we don't accidentally optimize across an FDE > boundary. We recognize the size in one of two forms: a > symbol which will later be defined as a difference, or a > subtraction of two symbols. Either way, we can tell when we > are at the end of the FDE because the symbol becomes defined > (in the case of a subtraction, the end symbol, from which the > start symbol is being subtracted). Other ways of describing > the size will not be optimized. */ > if ((exp->X_op == O_symbol || exp->X_op == O_subtract) > && ! S_IS_DEFINED (exp->X_add_symbol)) > { > d->state = state_saw_size; > d->size_end_sym = exp->X_add_symbol; > } 327,349c326 < } < else if (d->saw_size < && *pnbytes == 1 < && exp->X_op == O_constant < && exp->X_add_number == DW_CFA_advance_loc4) < { < /* This might be a DW_CFA_advance_loc4. Record the frag and the < position within the frag, so that we can change it later. */ < d->saw_advance_loc4 = 1; < frag_grow (1); < d->loc4_frag = frag_now; < d->loc4_fix = frag_now_fix (); < } < else if (d->saw_advance_loc4 < && *pnbytes == 4 < && exp->X_op == O_constant) < { < int ca; < < /* This is a case which we can optimize. The two symbols being < subtracted were in the same frag and the expression was < reduced to a constant. We can do the optimization entirely < in this function. */ --- > break; 351c328,347 < d->saw_advance_loc4 = 0; --- > case state_saw_size: > case state_saw_cie_offset: > /* Assume whatever form it appears in, it appears atomically. */ > d->state += 1; > break; > > case state_saw_pc_begin: > /* Decide whether we should see an augmentation. */ > if (! d->cie_info_ok > && ! (d->cie_info_ok = get_cie_info (&d->cie_info))) > d->state = state_error; > else if (d->cie_info.z_augmentation) > { > d->state = state_seeing_aug_size; > d->aug_size = 0; > d->aug_shift = 0; > } > else > d->state = state_wait_loc4; > break; 353,354c349,351 < ca = eh_frame_code_alignment (1); < if (ca < 0) --- > case state_seeing_aug_size: > /* Bytes == -1 means this comes from an leb128 directive. */ > if ((int)*pnbytes == -1 && exp->X_op == O_constant) 356c353,354 < /* Don't optimize. */ --- > d->aug_size = exp->X_add_number; > d->state = state_skipping_aug; 358,359c356 < else if (exp->X_add_number % ca == 0 < && exp->X_add_number / ca < 0x40) --- > else if (*pnbytes == 1 && exp->X_op == O_constant) 361,364c358,362 < d->loc4_frag->fr_literal[d->loc4_fix] < = DW_CFA_advance_loc | (exp->X_add_number / ca); < /* No more bytes needed. */ < return 1; --- > unsigned char byte = exp->X_add_number; > d->aug_size |= (byte & 0x7f) << d->aug_shift; > d->aug_shift += 7; > if ((byte & 0x80) == 0) > d->state = state_skipping_aug; 366c364,371 < else if (exp->X_add_number < 0x100) --- > else > d->state = state_error; > break; > > case state_skipping_aug: > if ((int)*pnbytes < 0) > d->state = state_error; > else 368,369c373,377 < d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc1; < *pnbytes = 1; --- > int left = (d->aug_size -= *pnbytes); > if (left == 0) > d->state = state_wait_loc4; > else if (left < 0) > d->state = state_error; 371c379,384 < else if (exp->X_add_number < 0x10000) --- > break; > > case state_wait_loc4: > if (*pnbytes == 1 > && exp->X_op == O_constant > && exp->X_add_number == DW_CFA_advance_loc4) 373,374c386,391 < d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc2; < *pnbytes = 2; --- > /* This might be a DW_CFA_advance_loc4. Record the frag and the > position within the frag, so t