diff -Nur binutils-2.12/bfd/ChangeLog binutils-2.12.1/bfd/ChangeLog --- binutils-2.12/bfd/ChangeLog Fri Mar 8 01:14:41 2002 +++ binutils-2.12.1/bfd/ChangeLog Tue May 14 19:35:22 2002 @@ -1,3 +1,620 @@ +2002-05-14 Daniel Jacobowitz + + * configure.in: Set is_release=y for 2.12.1 release. + * configure: Likewise. + +2002-05-13 David Edelsohn + + * configure.in: Auto-configure HAVE_ST_C_IMPL. + * configure: Regenerate. + * config.in: Regenerate. + * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL + or AIX_5_CORE. + +2002-05-11 Daniel Jacobowitz + + Merge from mainline (to elf32-mips.c): + 2002-05-03 H.J. Lu (hjl@gnu.org) + + * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local. + (mips_elf_link_hash_newfunc): Initialize forced_local to false. + (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol + to hide a global symbol. + (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set + forced_local to true. + +2002-05-11 Ralf Corsepius + Daniel Jacobowitz + + * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't + map BFD_RELOC_RVA. + +2002-05-09 Alan Modra + + * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete. + + Merge from mainline + 2002-05-08 Alan Modra + * elf32-ppc.c (ppc_elf_create_got): New function. + (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before + _bfd_elf_create_dynamic_sections. Correct .plt flags. + (ppc_elf_check_relocs): Use ppc_elf_create_got in place of + _bfd_elf_create_got_section. + + 2002-05-07 Alan Modra + * elf-bfd.h (struct elf_backend_data): Add rela_normal. + * elfxx-target.h (elf_backend_rela_normal): Define. + (elfNN_bed): Init rela_normal. + * elflink.h (elf_link_input_bfd ): Handle adjustment + for section symbols here if rela_normal. Simplify abs section test. + * elf-m10200.c (mn10200_elf_relocate_section): If relocatable, + return immediately. Remove code handling relocatable linking. + * elf-m10300.c (mn10300_elf_relocate_section): Likewise. + * elf32-fr30.c (fr30_elf_relocate_section): Likewise. + * elf32-i370.c (i370_elf_relocate_section): Likewise. + * elf32-i860.c (elf32_i860_relocate_section): Likewise. + * elf32-m68k.c (elf_m68k_relocate_section): Likewise. + * elf32-mcore.c (mcore_elf_relocate_section): Likewise. + * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. + * elf32-ppc.c (ppc_elf_relocate_section): Likewise. + * elf32-s390.c (elf_s390_relocate_section): Likewise. + * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. + * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. + * elf64-s390.c (elf_s390_relocate_section): Likewise. + * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. + * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. + * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL. + * elf32-m32r.c (m32r_elf_relocate_section): Likewise. + * elf-m10200.c (elf_backend_rela_normal): Define. + * elf-m10300.c (elf_backend_rela_normal): Define. + * elf32-fr30.c (elf_backend_rela_normal): Define. + * elf32-i370.c (elf_backend_rela_normal): Define. + * elf32-i860.c (elf_backend_rela_normal): Define. + * elf32-m68k.c (elf_backend_rela_normal): Define. + * elf32-mcore.c (elf_backend_rela_normal): Define. + * elf32-openrisc.c (elf_backend_rela_normal): Define. + * elf32-ppc.c (elf_backend_rela_normal): Define. + * elf32-s390.c (elf_backend_rela_normal): Define. + * elf32-xstormy16.c (elf_backend_rela_normal): Define. + * elf64-ppc.c (elf_backend_rela_normal): Define. + * elf64-s390.c (elf_backend_rela_normal): Define. + * elf64-x86-64.c (elf_backend_rela_normal): Define. + * elfxx-ia64.c (elf_backend_rela_normal): Define. + * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL. + * elf32-m32r.c (elf_backend_rela_normal): Likewise. + + 2002-05-06 Alan Modra + * elflink.h (elf_link_input_bfd ): Adjust r_offset + when not relocatable. Fix reloc_emitter call for K&R. + + 2002-05-04 Alan Modra + * dwarf2.c (struct line_head): Make prologue_length a bfd_vma. + (read_abbrevs): Change "offset" param to bfd_vma. + (parse_comp_unit): Change "version" and addr_size to unsigned ints. + Change "abbrev_offset" to bfd_vma. + (read_indirect_string): Use correct conversion chars in error + message format string, cast bfd_vma's to unsigned long. + (read_abbrevs): Likewise. + (read_attribute_value): Likewise. + (decode_line_info): Likewise. + (scan_unit_for_functions): Likewise. + (parse_comp_unit): Likewise. + + 2002-05-04 Bob Byrnes + * opncls.c (_bfd_new_bfd_contained_in): Check return value of + _bfd_new_bfd. + + 2002-05-02 Alan Modra + * elf64-ppc.c (ppc64_elf_howto_raw ): Change to a + 16 bit reloc. + : Likewise. + (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to + SECTOFF reloc. + * elf32-ppc.c (ppc_elf_howto_raw ): Correct. + (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to + SECTOFF reloc. + * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete. + (ppc64_elf_ha_reloc): New function. + (ppc64_elf_brtaken_reloc): New function. + (ppc64_elf_sectoff_reloc): New function. + (ppc64_elf_sectoff_ha_reloc): New function. + (ppc64_elf_toc_reloc): New function. + (ppc64_elf_toc_ha_reloc): New function. + (ppc64_elf_toc64_reloc): New function. + (ppc64_elf_unhandled_reloc): New function. + (ppc64_elf_howto_raw): Use the above. + : Mark pc_relative, pcrel_offset. + : Not pc_relative or pcrel_offset. Fix dst_mask. + : Likewise. + (IS_ABSOLUTE_RELOC): Update. + (struct ppc_link_hash_table): Add have_undefweak. + (ppc64_elf_link_hash_table_create): Init. + (func_desc_adjust): Set have_undefweak. + (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only + add the .sfpr blr when have_undefweak. + (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param + and relocatable test. Return TOCstart and don't set elf_gp. + (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch + offset calculation. Add assert on weak sym branch tweaks. + * elf64-ppc.h (ppc64_elf_set_toc): Delete. + (ppc64_elf_toc): Declare. + + 2002-05-01 Alan Modra + * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL + file_name. + + 2002-05-01 Alan Modra + * elf64-ppc.c (CROR_151515, CROR_313131): Define. + (ppc64_elf_relocate_section): Use them. Don't look for plt calls + on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt + call branches. Correct undefined weak destination. + (ppc64_elf_func_desc_adjust): Always create at least one blr in + .sfpr, and correct case where either only savef* or restf* is + needed. + + 2002-04-09 DJ Delorie + * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks. + +2002-05-06 Nick Clifton + + * elf32-arm.h (elf32_arm_final_link_relocate): Convert + 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets. + +2002-05-02 Richard Henderson + + * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs + vs SHN_UNDEF to zero. + +2002-04-27 Alan Modra + + Merge from mainline + 2002-04-12 Alan Modra + * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or + header pad. + + 2002-02-21 Andreas Jaeger + * elf64-x86-64.c: Major rework that introduces all recent changes + to the x86-64 backend. Get a closer match to elf32-i386. + (struct elf64_x86_64_dyn_relocs): Rename from + elf64_x86_64_pcrel_relocs_copied, add additional fields. Change + all users. + (struct elf64_x86_64_link_hash_table): Add short cuts to some + sections. + (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc, + remove casts, initialize new hash members. + (create_got_section): New. + (elf64_x86_64_create_dynamic_sections): New. + (elf64_x86_64_copy_indirect_symbol): New. + (elf64_x86_64_check_relocs): Don't allocate space for dynamic + relocs, .got or .relgot here but do it in allocate_dynrelocs. + Reference count possible .plt and .got entries. Don't test input + section SEC_READONLY here to try to avoid copy relocs, and keep + dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set + DF_TEXTREL here. Delay setting of variables until needed. Cache + pointer to "sreloc" section in elf_section_data. Tweak condition + under which .got created. Report files with bad relocation + section names. + (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel. + Reference count possible .plt entries. Don't deallocate .got and + .relgot space here. + (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't + do copy reloc processing for weakdefs. Remove redundant casts and + aborts. Delay setting of vars until needed. Move creation of + dynamic symbols and allocation of .plt and .rela.plt to + allocate_dynrelocs. Replace BFD_ASSERT with abort. + (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New. + (allocate_dynrelocs): New. + (readonly_dynrelocs): New. + (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs. + Allocate space for dyn relocs. Replace BFD_ASSERT with abort. + Zero out the dynamic allocated content space. + (elf64_x86_64_discard_copies): Removed. + (elf64_x86_64_relocate_section): Make use of dynamic section + short-cuts. Localise vars, and delay setting. Better error + reporting, replace BFD_ASSERT with abort. Check + ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the + regular object file and tread the weak definition as the normal + one. Don't discard relocs for undefweak or undefined symbols and + check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy + relocs. + (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for + symbols that have been forced local. Use same test to decide if + we can use a relative reloc for got as relocate_section. Expand + SHN_UNDEF comment. Move expressions out of function calls. + Replace BFD_ASSERT with abort. + (bfd_elf64_bfd_final_link): Removed. + (elf_backend_copy_indirect_symbol): Define. + + * reloc.c: Move sh relocs to where they belong. + * libbfd.h, bfd-in2.h: Regenerate. + + Merge from mainline + 2002-04-26 Alan Modra + * opncls.c (bfd_make_readable): Call bfd_section_list_clear. + * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise. + * elflink.h (elf_bfd_final_link): Ensure input bfd class is the + same as the output before calling elf_link_input_bfd. + * coffcode.h (coff_compute_section_file_positions): Set + section_tail after shuffling section list. + + 2002-04-23 Alan Modra + * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition + under which a plt call stub is used. + (final_link_relocate): Similarly. + (allocate_plt_static): Clear h-plabel except when plt entry is + exclusively used for a plabel. + (allocate_dynrelocs): Use the above to simplify plt sizing. + (struct elf32_hppa_link_hash_table): Add has_22bit_branch. + (elf32_hppa_link_hash_table_create): Init. + (BL22_RP): Define. + (hppa_build_one_stub): Use BL22_RP if has_22bit_branch. + (elf32_hppa_check_relocs): Set has_22bit_branch. + * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message. + (final_link_relocate): Likewise. + + 2002-04-20 Alan Modra + * archures.c (bfd_arch_info): Add comment on list order. + (bfd_default_set_arch_mach): Use bfd_lookup_arch. + * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default + is always at head of list. + * bfd-in2.h: Regenerate. + + 2002-04-16 Alan Modra + * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table + type rather than just assuming entries are ELF. + * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise. + * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise. + * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise. + * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry + rather than elf_link_hash_entry. + + 2002-04-15 Alan Modra + * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type. + + 2002-04-08 Randolph Chung + * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h. + (elf32_hppa_final_link): Split out sorting logic to.. + * elf-hppa.h (elf_hppa_sort_unwind): ..here. + (elf_hppa_final_link): Call elf_hppa_sort_unwind. + +2002-04-26 Richard Smith + Jakub Jelinek + + * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative. + (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel + encoded personality. + (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality + for CIE/FDE removal. + +2002-04-26 Jakub Jelinek + + * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build + search table if some FDE is DW_EH_PE_aligned encoded either. + (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially. + +2002-04-18 Nick Clifton + + * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9, + insert_thumb_branch, record_thumb_to_arm_glue): Suppress + definition of these functions for ARM_WINCE builds as they are + not used. + (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define + for ARM_WINCE builds. + +2002-04-16 Nick Clifton + + * ihex.c (ihex_write_object_contents): Fix check for records + crossing 64K boundaries. + +2002-04-06 Hans-Peter Nilsson + + * elf32-cris.c (cris_elf_howto_table) : Fix typo in name. + (cris_elf_check_relocs): Always create .rela.got here when + R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen. + (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here; + assume it's created. + +2002-04-04 Alan Modra + + * configure.in: Bump version to 2.12.1 and comment out is_release. + * configure: Regenerate. + * dep-in.sed: Cope with absolute paths. + * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR. + Run "make dep-am". + * Makefile.in: Regenerate. + + Merge from mainline + 2002-04-04 Alan Modra + * srec.c (MAXCHUNK, Chunk): Revise comments. + (srec_write_record): Correct buffer size. + (srec_write_header): Do without intermediate buffer. + (srec_write_section): Validate Chunk. + (srec_write_terminator): Pass NULL instead of dummy buffer. + (srec_write_symbols): Pass file and symbol names directly to + bfd_bwrite so sprintf won't overflow buffer. + + 2002-04-03 Jakub Jelinek + * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic + PC relative relocs against hidden symbols. + * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. + + 2002-04-03 Alan Modra + * elf.c (_bfd_elf_make_section_from_shdr): When setting section + LMAs, loop over segments until p_vaddr and p_memsz specify an + extent enclosing the section. + + 2002-04-02 Nick Clifton + * ihex.c (ihex_write_object_contents): Do not allow records to + cross a 64K boundary - wrap if necessary. + + 2002-03-28 Alan Modra + * linker.c (link_action): Ignore duplicate warning syms. + (_bfd_generic_link_write_global_symbol): Follow warning symbol link. + * elflink.h (elf_adjust_dynstr_offsets): Likewise. + (elf_adjust_dynamic_symbol): Likewise. + (elf_export_symbol): Likewise. + (elf_link_find_version_dependencies): Likewise. + (elf_link_assign_sym_version): Likewise. + (elf_link_sec_merge_syms): Likewise. + (elf_link_output_extsym): Likewise. + (elf_gc_sweep_symbol): Likewise. + (elf_gc_propagate_vtable_entries_used): Likewise. + (elf_gc_smash_unused_vtentry_relocs): Likewise. + (elf_gc_allocate_got_offsets): Likewise. + (elf_collect_hash_codes): Likewise. + * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise. + * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise. + (elf_hppa_remark_useless_dynamic_symbols): Likewise. + * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise. + * elf32-arm.h (elf32_arm_discard_copies): Likewise. + * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise. + (elf_cris_discard_excess_dso_dynamics): Likewise. + * elf32-hppa.c (clobber_millicode_symbols): Likewise. + (mark_PIC_calls): Likewise. + (allocate_plt_static): Likewise. + (allocate_dynrelocs): Likewise. + (readonly_dynrelocs): Likewise. + * elf32-i386.c (allocate_dynrelocs): Likewise. + (readonly_dynrelocs): Likewise. + * elf32-i370.c (i370_elf_adjust_dynindx): Likewise. + * elf32-m68k.c (elf_m68k_discard_copies): Likewise. + * elf32-mips.c (mips_elf_output_extsym): Likewise. + (mips_elf_sort_hash_table_f): Likewise. + (mips_elf_check_mips16_stubs): Likewise. + * elf32-s390.c (allocate_dynrelocs): Likewise. + (readonly_dynrelocs): Likewise. + * elf32-sh.c (sh_elf_discard_copies): Likewise. + * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise. + (xstormy16_relax_plt_realloc): Likewise. + * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise. + (elf64_alpha_output_extsym): Likewise. + * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise. + * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise. + (mips_elf64_check_mips16_stubs): Likewise. + (mips_elf64_output_extsym): Likewise. + * elf64-ppc.c (func_desc_adjust): Likewise. + (allocate_dynrelocs): Likewise. + (readonly_dynrelocs): Likewise. + * elf64-s390.c (allocate_dynrelocs): Likewise. + (readonly_dynrelocs): Likewise. + * elf64-sh64.c (sh64_elf64_discard_copies): Likewise. + * elf64-x86-64.c (elf64_x86_64_discard_copies): Likewise. + * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise. + * aoutx.h (aout_link_write_other_symbol): Likewise. + * cofflink.c (_bfd_coff_write_task_globals): Likewise. + (_bfd_coff_write_global_sym): Likewise. + * i386linux.c (linux_tally_symbols): Likewise. + * m68klinux.c (linux_tally_symbols): Likewise. + * sparclinux.c (linux_tally_symbols): Likewise. + * pdp11.c (aout_link_write_other_symbol): Likewise. + * sunos.c (sunos_scan_dynamic_symbol): Likewise. + * xcofflink.c (xcoff_build_ldsyms): Likewise. + (xcoff_write_global_symbol): Likewise. + * cofflink.c (_bfd_coff_final_link): Formatting. + * elf32-i386.c (elf_i386_check_relocs): Formatting. + * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise. + * elf64-alpha.c (elf64_alpha_output_extsym): Likewise. + * elf64-mips.c (mips_elf64_sort_hash_table): Likewise. + (mips_elf64_final_link): Likewise. + * elflink.h (elf_link_find_version_dependencies): Remove duplicate + prototype. + + 2002-03-21 Richard Earnshaw + * elf32-arm.h (elf32_arm_final_link_relocate , + ): Handle relocations to Thumb functions. + + 2002-03-19 Hans-Peter Nilsson + * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set + STT_NOTYPE symbols to STT_OBJECT. + + 2002-03-13 Alan Modra + * archures.c (bfd_default_compatible): Test bits_per_word. + * cpu-i386.c (i386_compatible): Remove. Replace occurrences with + bfd_default_compatible. + * cpu-i370.c (i370_compatible): Likewise. + * cpu-sparc.c (sparc_compatible): Likewise. + * cpu-h8300.c (compatible): Test in->arch == out->arch. + + 2002-02-19 Martin Schwidefsky + * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31. + (bfd_mach_s390_esame): Rename to bfd_mach_s390_64. + * bfd-in2.h: Regenerate. + * cpu-s390.c (arch_info_struct): Use renamed architecture defines. + Replace architecture name "s390" with "s390:31-bit" and "s390:esame" + with "s390:64-bit". + * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations. + (elf_s390_reloc_type_lookup): Likewise. + (elf_s390_check_relocs): Likewise. + (elf_s390_gc_sweep_hook): Likewise. + (elf_s390_relocate_section): Likewise. + (elf_s390_object_p): Use renamed architecture define. + * elf64-s390.c (elf_s390_object_p): Use renamed architecture define. + +2002-04-03 Alan Modra + + Merge from mainline. + 2002-03-28 Alan Modra + * cpu-mips.c (mips_compatible): Make static, prototype. + + 2002-03-14 Alan Modra + * cpu-mips.c (mips_compatible): New. Don't check bits_per_word. + (N): Use the above. + +2002-04-01 Nathan Williams + + * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error + which caused the returned LWP ID to always be 0. + +2002-04-01 Richard Henderson + + * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New. + (elf32_sparc_relocate_section): Use it to figure out when to + initialize .got entries. + * elf64-sparc.c: Similarly. + +2002-03-28 Alan Modra + + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + + Merge from mainline + 2002-03-27 Gregory Steuck + * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for + terminating NULL if empty symbol table. + (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise. + + 2002-03-26 Alan Modra + * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections. + + 2002-03-23 Alan Modra + * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on + section file offset for !SEC_LOAD sections. + + 2002-03-20 Daniel Jacobowitz + * dwarf2.c (struct funcinfo): Move up. + (lookup_address_in_function_table): New argument function_ptr. + Set it. + (lookup_address_in_line_table): New argument function. If function + is non-NULL, use it to handle ``addr'' before the first line note of + the function. + (comp_unit_find_nearest_line): Update and swap calls to + lookup_address_in_function_table and lookup_address_in_line_table. + * syms.c (_bfd_stab_section_find_nearest_line): Use the first + N_SLINE encountered if we see an N_FUN before any N_SLINE. + + 2002-03-18 Alan Modra + * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success. + * libbfd.h: Regenerate. + * archive.c (coff_write_armap): Pass on failures from + bfd_write_bigendian_4byte_int. + + 2002-03-14 H.J. Lu + * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD + error to bfd_error_nonrepresentable_section for reinit_array + section in DSO. + + 2002-03-14 Nick Clifton + * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag, + OR it in rather than replacing previously selected flags. + * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15. + (TARGET_LITTLE_SYM): Set ar_max_namelen to 15. + + 2002-03-14 Alan Modra + * elflink.h (elf_bfd_final_link): Revert last change. Instead, + ensure reloc size matches before calling elf_link_input_bfd. + Add an assert to check reloc size when counting output relocs. + + 2002-03-14 Nick Clifton + * mmo.c (mmo_get_loc): Return NULL rather than false. + + 2002-03-13 Alan Modra + * elflink.h: Formatting fixes. + (elf_link_output_extsym): Merge undefined and undef weak cases. + * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd + when word size of input matches output word size. + + 2002-03-07 H.J. Lu (hjl@gnu.org) + * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type + as the type for bfd_reloc_val. + + 2002-03-05 John David Anglin + * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function. + (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols. + (elf_hppa_final_link_relocate): Correct relocations for indirect + references to local data through the DLT. Fix .opd creation for + local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64 + relocations. Use e_lsel selector for R_PARISC_DLTIND21L, + R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per + "Processor-Specific ELF for PA_RISC, Version 1.43" document. + Similarly, use e_rsel for DLT and LTOFF 'R' relocations. + * elf32-hppa.c (final_link_relocate): Revise relocation selectors + as per "Processor-Specific ELF for PA_RISC, Version 1.43" document. + + 2002-03-05 Jakub Jelinek + * merge.c (_bfd_merge_sections): Don't segfault if there + is nothing to merge due to GC. + + 2002-03-05 Alan Modra + * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep + symbols that have been forced local. + * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym + to output forced local syms for non-shared link. + (elf_link_output_extsym): Tweak condition for calling backend + adjust_dynamic_symbol so that previous behaviour is kept. + Whitespace changes throughout file. + + 2002-03-04 H.J. Lu + * elf.c (bfd_section_from_shdr): Handle special sections, + .init_array, .fini_array and .preinit_array. + (elf_fake_sections): Likewise. + * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the + DT entry only if the section is in output for .init_array, + .fini_array and .preinit_array. Complain about .preinit_array + section in DSO. + (elf_bfd_final_link): Warn zero size for .init_array, + .fini_array and .preinit_array sections. + * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove + SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY. + (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and + .preinit_array. + + 2002-03-01 David Mosberger + * elflink.h (size_dynamic_sections): If section named + ".preinit_array" exists, create DT_PREINIT_ARRAY and + DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for + ".init_array" and ".fini_array". + (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ, + DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and + DT_FINI_ARRAY. + + 2002-02-19 Frank Ch. Eigler + * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping. + + 2002-02-13 Nick Clifton + * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on + non-zero physical addresses when adjusting the LMAs of new + sections. + + 2002-02-11 Michael Snyder + * elf-bfd.h (elfcore_write_lwpstatus): Add prototype. + * elf.c (elfcore_grok_pstatus): Add prototype. + (elfcore_grok_lwpstatus): Add prototype. + (elfcore_write_lwpstatus): New function. + (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy. + +2002-03-20 Tom Rix + + * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from + _bfd_xcoff_generic_stat_arch_elt. Fix format check. + * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt. + +Mon Mar 18 18:06:54 CET 2002 Jan Hubicka + + * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64" + 2002-03-07 Daniel Jacobowitz * configure.in: Set is_release=y for 2.12 release. diff -Nur binutils-2.12/bfd/ChangeLog-9495 binutils-2.12.1/bfd/ChangeLog-9495 --- binutils-2.12/bfd/ChangeLog-9495 Thu Mar 8 16:03:56 2001 +++ binutils-2.12.1/bfd/ChangeLog-9495 Thu May 9 10:48:40 2002 @@ -6887,7 +6887,7 @@ * libelf.h (struct elf_obj_tdata): Add new field bad_symtab. (elf_bad_symtab): Define new accessor macro. (_bfd_elf_link_hash_newfunc): Declare. - (_bew_elf_link_hash_table_init): Declare. + (_bfd_elf_link_hash_table_init): Declare. * elfcode.h (elf_object_p): Call backend object_p hook after swapping in all the section headers. (map_program_segments): Correct typo: Internal for External. diff -Nur binutils-2.12/bfd/Makefile.am binutils-2.12.1/bfd/Makefile.am --- binutils-2.12/bfd/Makefile.am Fri Feb 8 00:33:21 2002 +++ binutils-2.12.1/bfd/Makefile.am Thu Apr 4 11:20:20 2002 @@ -700,8 +700,8 @@ dep.sed: dep-in.sed config.status sed <$(srcdir)/dep-in.sed >dep.sed \ -e 's!@BFD_H@!$(BFD_H)!' \ - -e 's!@INCDIR@!$(INCDIR)!' \ - -e 's!@SRCDIR@!$(srcdir)!' + -e 's!@SRCDIR@!$(srcdir)!' \ + -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/bfd$$,,`'!' dep: DEP sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile @@ -1141,12 +1141,9 @@ elf32-target.h elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ - elf32-target.h $(srcdir)/../opcodes/sh64-opc.h -elf64-sh64.lo: elf64-sh64.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ - elf64-target.h + $(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \ + elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \ @@ -1425,6 +1422,10 @@ elf64-s390.lo: elf64-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \ + elf64-target.h +elf64-sh64.lo: elf64-sh64.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ elf64-target.h elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ diff -Nur binutils-2.12/bfd/Makefile.in binutils-2.12.1/bfd/Makefile.in --- binutils-2.12/bfd/Makefile.in Fri Feb 8 00:33:21 2002 +++ binutils-2.12.1/bfd/Makefile.in Thu Apr 4 11:20:20 2002 @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -750,7 +750,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES) OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS) @@ -917,7 +917,7 @@ dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ - test "$$subdir" = "." && dot_seen=yes; \ + test "$$subdir" != "." || dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ @@ -1258,8 +1258,8 @@ dep.sed: dep-in.sed config.status sed <$(srcdir)/dep-in.sed >dep.sed \ -e 's!@BFD_H@!$(BFD_H)!' \ - -e 's!@INCDIR@!$(INCDIR)!' \ - -e 's!@SRCDIR@!$(srcdir)!' + -e 's!@SRCDIR@!$(srcdir)!' \ + -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/bfd$$,,`'!' dep: DEP sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile @@ -1685,12 +1685,9 @@ elf32-target.h elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ - elf32-target.h $(srcdir)/../opcodes/sh64-opc.h -elf64-sh64.lo: elf64-sh64.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ - elf64-target.h + $(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \ + elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \ @@ -1969,6 +1966,10 @@ elf64-s390.lo: elf64-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \ + elf64-target.h +elf64-sh64.lo: elf64-sh64.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ elf64-target.h elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ diff -Nur binutils-2.12/bfd/aclocal.m4 binutils-2.12.1/bfd/aclocal.m4 --- binutils-2.12/bfd/aclocal.m4 Fri Apr 27 17:25:04 2001 +++ binutils-2.12.1/bfd/aclocal.m4 Mon Apr 1 20:28:43 2002 @@ -1,6 +1,6 @@ -dnl aclocal.m4 generated automatically by aclocal 1.4 +dnl aclocal.m4 generated automatically by aclocal 1.4-p5 -dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -145,7 +145,7 @@ dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) -AC_DEFUN(AM_INIT_AUTOMAKE, +AC_DEFUN([AM_INIT_AUTOMAKE], [AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) @@ -173,7 +173,7 @@ # Check to make sure that the build environment is sane. # -AC_DEFUN(AM_SANITY_CHECK, +AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 @@ -214,7 +214,7 @@ dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. -AC_DEFUN(AM_MISSING_PROG, +AC_DEFUN([AM_MISSING_PROG], [AC_MSG_CHECKING(for working $2) # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. @@ -230,7 +230,7 @@ # Like AC_CONFIG_HEADER, but automatically create stamp file. -AC_DEFUN(AM_CONFIG_HEADER, +AC_DEFUN([AM_CONFIG_HEADER], [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. @@ -256,7 +256,7 @@ # serial 1 -AC_DEFUN(AM_MAINTAINER_MODE, +AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, @@ -273,7 +273,7 @@ # Define a conditional. -AC_DEFUN(AM_CONDITIONAL, +AC_DEFUN([AM_CONDITIONAL], [AC_SUBST($1_TRUE) AC_SUBST($1_FALSE) if $2; then diff -Nur binutils-2.12/bfd/aoutx.h binutils-2.12.1/bfd/aoutx.h --- binutils-2.12/bfd/aoutx.h Wed Oct 10 08:08:27 2001 +++ binutils-2.12.1/bfd/aoutx.h Thu Apr 4 11:20:22 2002 @@ -1,6 +1,6 @@ /* BFD semi-generic back-end for a.out binaries. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, - 2001 + 2001, 2002 Free Software Foundation, Inc. Written by Cygnus Support. @@ -4577,6 +4577,13 @@ bfd_size_type indx; bfd_size_type amt; + if (h->root.type == bfd_link_hash_warning) + { + h = (struct aout_link_hash_entry *) h->root.u.i.link; + if (h->root.type == bfd_link_hash_new) + return true; + } + output_bfd = finfo->output_bfd; if (aout_backend_info (output_bfd)->write_dynamic_symbol != NULL) @@ -4605,6 +4612,7 @@ switch (h->root.type) { default: + case bfd_link_hash_warning: abort (); /* Avoid variable not initialized warnings. */ return true; @@ -4646,9 +4654,8 @@ type = N_WEAKU; val = 0; case bfd_link_hash_indirect: - case bfd_link_hash_warning: - /* FIXME: Ignore these for now. The circumstances under which - they should be written out are not clear to me. */ + /* We ignore these symbols, since the indirected symbol is + already in the hash table. */ return true; } diff -Nur binutils-2.12/bfd/archive.c binutils-2.12.1/bfd/archive.c --- binutils-2.12/bfd/archive.c Wed Dec 5 17:46:21 2001 +++ binutils-2.12.1/bfd/archive.c Mon Apr 1 20:28:44 2002 @@ -1,6 +1,6 @@ /* BFD back-end for archive files (libraries). Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001 + 2000, 2001, 2002 Free Software Foundation, Inc. Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault. @@ -2190,7 +2190,8 @@ != sizeof (struct ar_hdr)) return false; - bfd_write_bigendian_4byte_int (arch, symbol_count); + if (!bfd_write_bigendian_4byte_int (arch, symbol_count)) + return false; /* Two passes, first write the file offsets for each symbol - remembering that each offset is on a two byte boundary. */ @@ -2207,7 +2208,8 @@ while (count < symbol_count && map[count].u.abfd == current) { - bfd_write_bigendian_4byte_int (arch, archive_member_file_ptr); + if (!bfd_write_bigendian_4byte_int (arch, archive_member_file_ptr)) + return false; count++; } /* Add size of this archive entry. */ diff -Nur binutils-2.12/bfd/archures.c binutils-2.12.1/bfd/archures.c --- binutils-2.12/bfd/archures.c Fri Feb 8 00:33:22 2002 +++ binutils-2.12.1/bfd/archures.c Thu May 9 10:48:42 2002 @@ -259,8 +259,8 @@ .#define bfd_mach_avr5 5 . bfd_arch_cris, {* Axis CRIS *} . bfd_arch_s390, {* IBM s390 *} -.#define bfd_mach_s390_esa 0 -.#define bfd_mach_s390_esame 1 +.#define bfd_mach_s390_31 0 +.#define bfd_mach_s390_64 1 . bfd_arch_openrisc, {* OpenRISC *} . bfd_arch_mmix, {* Donald Knuth's educational processor. *} . bfd_arch_xstormy16, @@ -288,7 +288,9 @@ . const char *arch_name; . const char *printable_name; . unsigned int section_align_power; -. {* True if this is the default machine for the architecture. *} +. {* True if this is the default machine for the architecture. +. The default arch should be the first entry for an arch so that +. all the entries for that arch can be accessed via <>. *} . boolean the_default; . const struct bfd_arch_info * (*compatible) . PARAMS ((const struct bfd_arch_info *a, @@ -604,21 +606,9 @@ enum bfd_architecture arch; unsigned long mach; { - const bfd_arch_info_type * const *app, *ap; - - for (app = bfd_archures_list; *app != NULL; app++) - { - for (ap = *app; ap != NULL; ap = ap->next) - { - if (ap->arch == arch - && (ap->mach == mach - || (mach == 0 && ap->the_default))) - { - abfd->arch_info = ap; - return true; - } - } - } + abfd->arch_info = bfd_lookup_arch (arch, mach); + if (abfd->arch_info != NULL) + return true; abfd->arch_info = &bfd_default_arch_struct; bfd_set_error (bfd_error_bad_value); @@ -720,6 +710,9 @@ const bfd_arch_info_type *b; { if (a->arch != b->arch) + return NULL; + + if (a->bits_per_word != b->bits_per_word) return NULL; if (a->mach > b->mach) diff -Nur binutils-2.12/bfd/bfd-in2.h binutils-2.12.1/bfd/bfd-in2.h --- binutils-2.12/bfd/bfd-in2.h Sat Feb 9 17:53:53 2002 +++ binutils-2.12.1/bfd/bfd-in2.h Thu May 9 10:48:44 2002 @@ -1638,8 +1638,8 @@ #define bfd_mach_avr5 5 bfd_arch_cris, /* Axis CRIS */ bfd_arch_s390, /* IBM s390 */ -#define bfd_mach_s390_esa 0 -#define bfd_mach_s390_esame 1 +#define bfd_mach_s390_31 0 +#define bfd_mach_s390_64 1 bfd_arch_openrisc, /* OpenRISC */ bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, @@ -1657,7 +1657,9 @@ const char *arch_name; const char *printable_name; unsigned int section_align_power; - /* True if this is the default machine for the architecture. */ + /* True if this is the default machine for the architecture. + The default arch should be the first entry for an arch so that + all the entries for that arch can be accessed via <>. */ boolean the_default; const struct bfd_arch_info * (*compatible) PARAMS ((const struct bfd_arch_info *a, @@ -2194,55 +2196,6 @@ BFD_RELOC_MIPS_REL16, BFD_RELOC_MIPS_RELGOT, BFD_RELOC_MIPS_JALR, - BFD_RELOC_SH_GOT_LOW16, - BFD_RELOC_SH_GOT_MEDLOW16, - BFD_RELOC_SH_GOT_MEDHI16, - BFD_RELOC_SH_GOT_HI16, - BFD_RELOC_SH_GOTPLT_LOW16, - BFD_RELOC_SH_GOTPLT_MEDLOW16, - BFD_RELOC_SH_GOTPLT_MEDHI16, - BFD_RELOC_SH_GOTPLT_HI16, - BFD_RELOC_SH_PLT_LOW16, - BFD_RELOC_SH_PLT_MEDLOW16, - BFD_RELOC_SH_PLT_MEDHI16, - BFD_RELOC_SH_PLT_HI16, - BFD_RELOC_SH_GOTOFF_LOW16, - BFD_RELOC_SH_GOTOFF_MEDLOW16, - BFD_RELOC_SH_GOTOFF_MEDHI16, - BFD_RELOC_SH_GOTOFF_HI16, - BFD_RELOC_SH_GOTPC_LOW16, - BFD_RELOC_SH_GOTPC_MEDLOW16, - BFD_RELOC_SH_GOTPC_MEDHI16, - BFD_RELOC_SH_GOTPC_HI16, - BFD_RELOC_SH_COPY64, - BFD_RELOC_SH_GLOB_DAT64, - BFD_RELOC_SH_JMP_SLOT64, - BFD_RELOC_SH_RELATIVE64, - BFD_RELOC_SH_GOT10BY4, - BFD_RELOC_SH_GOT10BY8, - BFD_RELOC_SH_GOTPLT10BY4, - BFD_RELOC_SH_GOTPLT10BY8, - BFD_RELOC_SH_GOTPLT32, - BFD_RELOC_SH_SHMEDIA_CODE, - BFD_RELOC_SH_IMMU5, - BFD_RELOC_SH_IMMS6, - BFD_RELOC_SH_IMMS6BY32, - BFD_RELOC_SH_IMMU6, - BFD_RELOC_SH_IMMS10, - BFD_RELOC_SH_IMMS10BY2, - BFD_RELOC_SH_IMMS10BY4, - BFD_RELOC_SH_IMMS10BY8, - BFD_RELOC_SH_IMMS16, - BFD_RELOC_SH_IMMU16, - BFD_RELOC_SH_IMM_LOW16, - BFD_RELOC_SH_IMM_LOW16_PCREL, - BFD_RELOC_SH_IMM_MEDLOW16, - BFD_RELOC_SH_IMM_MEDLOW16_PCREL, - BFD_RELOC_SH_IMM_MEDHI16, - BFD_RELOC_SH_IMM_MEDHI16_PCREL, - BFD_RELOC_SH_IMM_HI16, - BFD_RELOC_SH_IMM_HI16_PCREL, - BFD_RELOC_SH_PT_16, /* i386/elf relocations */ @@ -2423,6 +2376,55 @@ BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC, + BFD_RELOC_SH_GOT_LOW16, + BFD_RELOC_SH_GOT_MEDLOW16, + BFD_RELOC_SH_GOT_MEDHI16, + BFD_RELOC_SH_GOT_HI16, + BFD_RELOC_SH_GOTPLT_LOW16, + BFD_RELOC_SH_GOTPLT_MEDLOW16, + BFD_RELOC_SH_GOTPLT_MEDHI16, + BFD_RELOC_SH_GOTPLT_HI16, + BFD_RELOC_SH_PLT_LOW16, + BFD_RELOC_SH_PLT_MEDLOW16, + BFD_RELOC_SH_PLT_MEDHI16, + BFD_RELOC_SH_PLT_HI16, + BFD_RELOC_SH_GOTOFF_LOW16, + BFD_RELOC_SH_GOTOFF_MEDLOW16, + BFD_RELOC_SH_GOTOFF_MEDHI16, + BFD_RELOC_SH_GOTOFF_HI16, + BFD_RELOC_SH_GOTPC_LOW16, + BFD_RELOC_SH_GOTPC_MEDLOW16, + BFD_RELOC_SH_GOTPC_MEDHI16, + BFD_RELOC_SH_GOTPC_HI16, + BFD_RELOC_SH_COPY64, + BFD_RELOC_SH_GLOB_DAT64, + BFD_RELOC_SH_JMP_SLOT64, + BFD_RELOC_SH_RELATIVE64, + BFD_RELOC_SH_GOT10BY4, + BFD_RELOC_SH_GOT10BY8, + BFD_RELOC_SH_GOTPLT10BY4, + BFD_RELOC_SH_GOTPLT10BY8, + BFD_RELOC_SH_GOTPLT32, + BFD_RELOC_SH_SHMEDIA_CODE, + BFD_RELOC_SH_IMMU5, + BFD_RELOC_SH_IMMS6, + BFD_RELOC_SH_IMMS6BY32, + BFD_RELOC_SH_IMMU6, + BFD_RELOC_SH_IMMS10, + BFD_RELOC_SH_IMMS10BY2, + BFD_RELOC_SH_IMMS10BY4, + BFD_RELOC_SH_IMMS10BY8, + BFD_RELOC_SH_IMMS16, + BFD_RELOC_SH_IMMU16, + BFD_RELOC_SH_IMM_LOW16, + BFD_RELOC_SH_IMM_LOW16_PCREL, + BFD_RELOC_SH_IMM_MEDLOW16, + BFD_RELOC_SH_IMM_MEDLOW16_PCREL, + BFD_RELOC_SH_IMM_MEDHI16, + BFD_RELOC_SH_IMM_MEDHI16_PCREL, + BFD_RELOC_SH_IMM_HI16, + BFD_RELOC_SH_IMM_HI16_PCREL, + BFD_RELOC_SH_PT_16, /* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must be zero and is not stored in the instruction. */ diff -Nur binutils-2.12/bfd/coff-arm.c binutils-2.12.1/bfd/coff-arm.c --- binutils-2.12/bfd/coff-arm.c Fri Feb 1 08:26:56 2002 +++ binutils-2.12.1/bfd/coff-arm.c Sat May 11 11:12:37 2002 @@ -1,6 +1,6 @@ /* BFD back-end for ARM COFF files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001 + 2000, 2001, 2002 Free Software Foundation, Inc. Written by Cygnus Support. @@ -87,12 +87,16 @@ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); static bfd_reloc_status_type aoutarm_fix_pcrel_26 PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); +#ifndef ARM_WINCE static bfd_reloc_status_type coff_thumb_pcrel_23 PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); -static bfd_reloc_status_type coff_thumb_pcrel_12 - PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); static bfd_reloc_status_type coff_thumb_pcrel_9 PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); +static insn32 insert_thumb_branch + PARAMS ((insn32, int)); +#endif +static bfd_reloc_status_type coff_thumb_pcrel_12 + PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); static bfd_reloc_status_type coff_arm_reloc PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); static boolean coff_arm_adjust_symndx @@ -109,8 +113,6 @@ PARAMS ((bfd *, bfd_reloc_code_real_type)); static struct bfd_link_hash_table * coff_arm_link_hash_table_create PARAMS ((bfd *)); -static insn32 insert_thumb_branch - PARAMS ((insn32, int)); static struct coff_link_hash_entry * find_thumb_glue PARAMS ((struct bfd_link_info *, const char *, bfd *)); static struct coff_link_hash_entry * find_arm_glue @@ -118,9 +120,11 @@ #ifndef COFF_IMAGE_WITH_PE static void record_arm_to_thumb_glue PARAMS ((struct bfd_link_info *, struct coff_link_hash_entry *)); +#ifndef ARM_WINCE static void record_thumb_to_arm_glue PARAMS ((struct bfd_link_info *, struct coff_link_hash_entry *)); #endif +#endif static boolean coff_arm_merge_private_bfd_data PARAMS ((bfd *, bfd *)); static boolean coff_arm_print_private_bfd_data @@ -801,6 +805,7 @@ return flag; } +#ifndef ARM_WINCE static bfd_reloc_status_type coff_thumb_pcrel_23 (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message) @@ -818,7 +823,7 @@ } static bfd_reloc_status_type -coff_thumb_pcrel_12 (abfd, reloc_entry, symbol, data, input_section, +coff_thumb_pcrel_9 (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message) bfd *abfd; arelent *reloc_entry; @@ -830,11 +835,12 @@ { return coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message, - b12); + b9); } +#endif /* not ARM_WINCE */ static bfd_reloc_status_type -coff_thumb_pcrel_9 (abfd, reloc_entry, symbol, data, input_section, +coff_thumb_pcrel_12 (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message) bfd *abfd; arelent *reloc_entry; @@ -846,7 +852,7 @@ { return coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message, - b9); + b12); } static const struct reloc_howto_struct * @@ -900,6 +906,13 @@ #define BADMAG(x) ARMBADMAG(x) #define ARM 1 /* Customize coffcode.h */ +#ifndef ARM_WINCE +/* Make sure that the 'r_offset' field is copied properly + so that identical binaries will compare the same. */ +#define SWAP_IN_RELOC_OFFSET H_GET_32 +#define SWAP_OUT_RELOC_OFFSET H_PUT_32 +#endif + /* Extend the coff_link_hash_table structure with a few ARM specific fields. This allows us to store global data here without actually creating any global variables, which is a no-no in the BFD world. */ @@ -970,6 +983,7 @@ } +#ifndef ARM_WINCE /* The thumb form of a long branch is a bit finicky, because the offset encoding is split over two fields, each in it's own instruction. They can occur in any order. So given a thumb form of long branch, and an @@ -1026,6 +1040,7 @@ return br_insn; } + static struct coff_link_hash_entry * find_thumb_glue (info, name, input_bfd) @@ -1055,6 +1070,7 @@ return myh; } +#endif /* not ARM_WINCE */ static struct coff_link_hash_entry * find_arm_glue (info, name, input_bfd) @@ -1909,6 +1925,7 @@ return; } +#ifndef ARM_WINCE static void record_thumb_to_arm_glue (info, h) struct bfd_link_info * info; @@ -1982,6 +1999,7 @@ return; } +#endif /* not ARM_WINCE */ /* Select a BFD to be used to hold the sections used by the glue code. This function is called from the linker scripts in ld/emultempl/ diff -Nur binutils-2.12/bfd/coff-rs6000.c binutils-2.12.1/bfd/coff-rs6000.c --- binutils-2.12/bfd/coff-rs6000.c Sun Feb 10 17:16:35 2002 +++ binutils-2.12.1/bfd/coff-rs6000.c Mon Apr 1 20:28:45 2002 @@ -46,7 +46,7 @@ extern const bfd_target *_bfd_xcoff_archive_p PARAMS ((bfd *)); extern PTR _bfd_xcoff_read_ar_hdr PARAMS ((bfd *)); extern bfd *_bfd_xcoff_openr_next_archived_file PARAMS ((bfd *, bfd *)); -extern int _bfd_xcoff_generic_stat_arch_elt PARAMS ((bfd *, struct stat *)); +extern int _bfd_xcoff_stat_arch_elt PARAMS ((bfd *, struct stat *)); extern boolean _bfd_xcoff_write_armap PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int)); extern boolean _bfd_xcoff_write_archive_contents PARAMS ((bfd *)); @@ -1389,7 +1389,7 @@ /* Stat an element in an XCOFF archive. */ int -_bfd_xcoff_generic_stat_arch_elt (abfd, s) +_bfd_xcoff_stat_arch_elt (abfd, s) bfd *abfd; struct stat *s; { @@ -1399,7 +1399,7 @@ return -1; } - if (! xcoff_big_format_p (abfd)) + if (! xcoff_big_format_p (abfd->my_archive)) { struct xcoff_ar_hdr *hdrp = arch_xhdr (abfd); @@ -3536,7 +3536,7 @@ _bfd_xcoff_read_ar_hdr, /* _read_ar_hdr */ _bfd_xcoff_openr_next_archived_file, /* _openr_next_archived_file */ _bfd_generic_get_elt_at_index, /* _get_elt_at_index */ - _bfd_xcoff_generic_stat_arch_elt, /* _generic_dtat_arch_elt */ + _bfd_xcoff_stat_arch_elt, /* _generic_stat_arch_elt */ /* XCOFF archives do not have a timestamp. */ bfd_true, /* _update_armap_timestamp */ @@ -3797,7 +3797,7 @@ _bfd_xcoff_read_ar_hdr, /* _read_ar_hdr */ _bfd_xcoff_openr_next_archived_file, /* _openr_next_archived_file */ _bfd_generic_get_elt_at_index, /* _get_elt_at_index */ - _bfd_xcoff_generic_stat_arch_elt, /* _generic_dtat_arch_elt */ + _bfd_xcoff_stat_arch_elt, /* _generic_stat_arch_elt */ /* XCOFF archives do not have a timestamp. */ bfd_true, /* _update_armap_timestamp */ diff -Nur binutils-2.12/bfd/coff-sh.c binutils-2.12.1/bfd/coff-sh.c --- binutils-2.12/bfd/coff-sh.c Thu Sep 20 19:30:34 2001 +++ binutils-2.12.1/bfd/coff-sh.c Sat May 11 13:03:03 2002 @@ -469,10 +469,11 @@ /* This structure is used to map BFD reloc codes to SH PE relocs. */ struct shcoff_reloc_map { - unsigned char bfd_reloc_val; + bfd_reloc_code_real_type bfd_reloc_val; unsigned char shcoff_reloc_val; }; +#ifdef COFF_WITH_PE /* An array mapping BFD reloc codes to SH PE relocs. */ static const struct shcoff_reloc_map sh_reloc_map[] = { @@ -480,6 +481,14 @@ { BFD_RELOC_RVA, R_SH_IMAGEBASE }, { BFD_RELOC_CTOR, R_SH_IMM32CE }, }; +#else +/* An array mapping BFD reloc codes to SH PE relocs. */ +static const struct shcoff_reloc_map sh_reloc_map[] = +{ + { BFD_RELOC_32, R_SH_IMM32 }, + { BFD_RELOC_CTOR, R_SH_IMM32 }, +}; +#endif /* Given a BFD reloc code, return the howto structure for the corresponding SH PE reloc. */ diff -Nur binutils-2.12/bfd/coff64-rs6000.c binutils-2.12.1/bfd/coff64-rs6000.c --- binutils-2.12/bfd/coff64-rs6000.c Sun Dec 30 23:08:23 2001 +++ binutils-2.12.1/bfd/coff64-rs6000.c Mon Apr 1 20:28:46 2002 @@ -103,7 +103,7 @@ extern boolean _bfd_xcoff_slurp_armap PARAMS ((bfd *)); extern PTR _bfd_xcoff_read_ar_hdr PARAMS ((bfd *)); extern bfd *_bfd_xcoff_openr_next_archived_file PARAMS ((bfd *, bfd *)); -extern int _bfd_xcoff_generic_stat_arch_elt PARAMS ((bfd *, struct stat *)); +extern int _bfd_xcoff_stat_arch_elt PARAMS ((bfd *, struct stat *)); extern boolean _bfd_xcoff_write_armap PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int)); extern boolean _bfd_xcoff_write_archive_contents PARAMS ((bfd *)); @@ -2577,9 +2577,9 @@ bfd_dont_truncate_arname, /* _truncate_arname */ _bfd_xcoff_write_armap, /* _write_armap */ _bfd_xcoff_read_ar_hdr, /* _read_ar_hdr */ - xcoff64_openr_next_archived_file, /* _openr_next_archived_file */ + xcoff64_openr_next_archived_file, /* _openr_next_archived_file */ _bfd_generic_get_elt_at_index, /* _get_elt_at_index */ - _bfd_xcoff_generic_stat_arch_elt, /* _generic_dtat_arch_elt */ + _bfd_xcoff_stat_arch_elt, /* _generic_stat_arch_elt */ /* XCOFF archives do not have a timestamp. */ bfd_true, /* _update_armap_timestamp */ diff -Nur binutils-2.12/bfd/coffcode.h binutils-2.12.1/bfd/coffcode.h --- binutils-2.12/bfd/coffcode.h Wed Feb 6 11:29:28 2002 +++ binutils-2.12.1/bfd/coffcode.h Thu May 9 10:48:49 2002 @@ -3014,6 +3014,7 @@ else current->target_index = target_index++; } + abfd->section_tail = ¤t->next; free (section_list); } @@ -4443,16 +4444,14 @@ #ifdef COFF_WITH_PE if (src->u.syment.n_sclass == C_NT_WEAK) - dst->symbol.flags = BSF_WEAK; + dst->symbol.flags |= BSF_WEAK; + if (src->u.syment.n_sclass == C_SECTION && src->u.syment.n_scnum > 0) - { - dst->symbol.flags = BSF_LOCAL; - } + dst->symbol.flags = BSF_LOCAL; #endif - if (src->u.syment.n_sclass == C_WEAKEXT) - dst->symbol.flags = BSF_WEAK; + dst->symbol.flags |= BSF_WEAK; break; diff -Nur binutils-2.12/bfd/cofflink.c binutils-2.12.1/bfd/cofflink.c --- binutils-2.12/bfd/cofflink.c Wed Oct 10 08:08:27 2001 +++ binutils-2.12.1/bfd/cofflink.c Thu Apr 4 11:20:27 2002 @@ -1,5 +1,5 @@ /* COFF specific linker code. - Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. @@ -1005,7 +1005,8 @@ if (info->task_link) { finfo.failed = false; - coff_link_hash_traverse (coff_hash_table (info), _bfd_coff_write_task_globals, + coff_link_hash_traverse (coff_hash_table (info), + _bfd_coff_write_task_globals, (PTR) &finfo); if (finfo.failed) goto error_return; @@ -1013,7 +1014,8 @@ /* Write out the global symbols. */ finfo.failed = false; - coff_link_hash_traverse (coff_hash_table (info), _bfd_coff_write_global_sym, + coff_link_hash_traverse (coff_hash_table (info), + _bfd_coff_write_global_sym, (PTR) &finfo); if (finfo.failed) goto error_return; @@ -2497,6 +2499,13 @@ output_bfd = finfo->output_bfd; + if (h->root.type == bfd_link_hash_warning) + { + h = (struct coff_link_hash_entry *) h->root.u.i.link; + if (h->root.type == bfd_link_hash_new) + return true; + } + if (h->indx >= 0) return true; @@ -2512,6 +2521,7 @@ { default: case bfd_link_hash_new: + case bfd_link_hash_warning: abort (); return false; @@ -2544,7 +2554,6 @@ break; case bfd_link_hash_indirect: - case bfd_link_hash_warning: /* Just ignore these. They can't be handled anyhow. */ return true; } @@ -2698,6 +2707,9 @@ struct coff_final_link_info *finfo = (struct coff_final_link_info *) data; boolean rtnval = true; boolean save_global_to_static; + + if (h->root.type == bfd_link_hash_warning) + h = (struct coff_link_hash_entry *) h->root.u.i.link; if (h->indx < 0) { diff -Nur binutils-2.12/bfd/config.in binutils-2.12.1/bfd/config.in --- binutils-2.12/bfd/config.in Wed May 23 13:26:35 2001 +++ binutils-2.12.1/bfd/config.in Mon May 13 12:20:11 2002 @@ -160,9 +160,15 @@ /* Define if you have the header file. */ #undef HAVE_SYS_PROCFS_H +/* Define if you have the header file. */ +#undef HAVE_SYS_STAT_H + /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H +/* Define if you have the header file. */ +#undef HAVE_SYS_TYPES_H + /* Define if you have the header file. */ #undef HAVE_TIME_H @@ -207,6 +213,9 @@ /* Define if getenv is not declared in system header files. */ #undef NEED_DECLARATION_GETENV + +/* Define if struct core_dumpx has member c_impl */ +#undef HAVE_ST_C_IMPL /* Define if has prstatus_t. */ #undef HAVE_PRSTATUS_T diff -Nur binutils-2.12/bfd/configure binutils-2.12.1/bfd/configure --- binutils-2.12/bfd/configure Fri Mar 8 01:12:03 2002 +++ binutils-2.12.1/bfd/configure Tue May 14 19:34:41 2002 @@ -1116,7 +1116,7 @@ PACKAGE=bfd -VERSION=2.12 +VERSION=2.12.1 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -5173,6 +5173,32 @@ rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*) COREFILE=rs6000-core.lo COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE" + # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE + # have c_impl as a member of struct core_dumpx + echo $ac_n "checking for c_impl in struct core_dumpx""... $ac_c" 1>&6 +echo "configure:5180: checking for c_impl in struct core_dumpx" >&5 + cat > conftest.$ac_ext < +int main() { +struct core_dumpx c; c.c_impl = 0; +; return 0; } +EOF +if { (eval echo configure:5189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cat >> confdefs.h <<\EOF +#define HAVE_ST_C_IMPL 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* ;; rs6000-*-aix4*) COREFILE=rs6000-core.lo ;; rs6000-*-*) COREFILE=rs6000-core.lo ;; @@ -5226,17 +5252,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5230: checking for $ac_hdr" >&5 +echo "configure:5256: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5264,12 +5290,12 @@ if test "$ac_cv_header_sys_procfs_h" = yes; then echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5268: checking for prstatus_t in sys/procfs.h" >&5 +echo "configure:5294: checking for prstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus_t=yes else @@ -5300,12 +5326,12 @@ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6 echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5304: checking for prstatus32_t in sys/procfs.h" >&5 +echo "configure:5330: checking for prstatus32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus32_t=yes else @@ -5336,12 +5362,12 @@ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6 echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5340: checking for prstatus_t.pr_who in sys/procfs.h" >&5 +echo "configure:5366: checking for prstatus_t.pr_who in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes else @@ -5372,12 +5398,12 @@ echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6 echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5376: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 +echo "configure:5402: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes else @@ -5408,12 +5434,12 @@ echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5412: checking for pstatus_t in sys/procfs.h" >&5 +echo "configure:5438: checking for pstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus_t=yes else @@ -5444,12 +5470,12 @@ echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5448: checking for pxstatus_t in sys/procfs.h" >&5 +echo "configure:5474: checking for pxstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pxstatus_t=yes else @@ -5480,12 +5506,12 @@ echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6 echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5484: checking for pstatus32_t in sys/procfs.h" >&5 +echo "configure:5510: checking for pstatus32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus32_t=yes else @@ -5516,12 +5542,12 @@ echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6 echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5520: checking for prpsinfo_t in sys/procfs.h" >&5 +echo "configure:5546: checking for prpsinfo_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo_t=yes else @@ -5552,12 +5578,12 @@ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6 echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5556: checking for prpsinfo32_t in sys/procfs.h" >&5 +echo "configure:5582: checking for prpsinfo32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes else @@ -5588,12 +5614,12 @@ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6 echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5592: checking for psinfo_t in sys/procfs.h" >&5 +echo "configure:5618: checking for psinfo_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo_t=yes else @@ -5624,12 +5650,12 @@ echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6 echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5628: checking for psinfo32_t in sys/procfs.h" >&5 +echo "configure:5654: checking for psinfo32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo32_t=yes else @@ -5660,12 +5686,12 @@ echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6 echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5664: checking for lwpstatus_t in sys/procfs.h" >&5 +echo "configure:5690: checking for lwpstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpstatus_t=yes else @@ -5696,12 +5722,12 @@ echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6 echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5700: checking for lwpxstatus_t in sys/procfs.h" >&5 +echo "configure:5726: checking for lwpxstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes else @@ -5732,12 +5758,12 @@ echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6 echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5736: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 +echo "configure:5762: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes else @@ -5768,12 +5794,12 @@ echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6 echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5772: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 +echo "configure:5798: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes else @@ -5804,12 +5830,12 @@ echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6 echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5808: checking for win32_pstatus_t in sys/procfs.h" >&5 +echo "configure:5834: checking for win32_pstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes else @@ -6235,10 +6261,10 @@ if test -n "$GCC" ; then bad_64bit_gcc=no; echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6 -echo "configure:6239: checking for gcc version with buggy 64-bit support" >&5 +echo "configure:6265: checking for gcc version with buggy 64-bit support" >&5 # Add more tests for gcc versions with non-working 64-bit support here. cat > conftest.$ac_ext <&6 -echo "configure:6287: checking for $ac_hdr" >&5 +echo "configure:6313: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6322,12 +6348,12 @@ for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6326: checking for $ac_func" >&5 +echo "configure:6352: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6375,7 +6401,7 @@ done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:6379: checking for working mmap" >&5 +echo "configure:6405: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6383,7 +6409,7 @@ ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -6561,12 +6587,12 @@ for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6565: checking for $ac_func" >&5 +echo "configure:6591: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else diff -Nur binutils-2.12/bfd/configure.in binutils-2.12.1/bfd/configure.in --- binutils-2.12/bfd/configure.in Fri Mar 8 01:12:11 2002 +++ binutils-2.12.1/bfd/configure.in Tue May 14 19:34:33 2002 @@ -7,7 +7,7 @@ AC_CANONICAL_SYSTEM AC_ISC_POSIX -AM_INIT_AUTOMAKE(bfd, 2.12) +AM_INIT_AUTOMAKE(bfd, 2.12.1) # Uncomment the next line to remove the date from the reported bfd version is_release=y @@ -327,6 +327,14 @@ changequote([,])dnl COREFILE=rs6000-core.lo COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE" + # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE + # have c_impl as a member of struct core_dumpx + AC_MSG_CHECKING([for c_impl in struct core_dumpx]) + AC_TRY_COMPILE([#include ], + [struct core_dumpx c; c.c_impl = 0;], + [AC_DEFINE(HAVE_ST_C_IMPL, 1, + [Define if struct core_dumpx has member c_impl]) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)]) ;; rs6000-*-aix4*) COREFILE=rs6000-core.lo ;; rs6000-*-*) COREFILE=rs6000-core.lo ;; diff -Nur binutils-2.12/bfd/cpu-h8300.c binutils-2.12.1/bfd/cpu-h8300.c --- binutils-2.12/bfd/cpu-h8300.c Tue Sep 18 05:57:22 2001 +++ binutils-2.12.1/bfd/cpu-h8300.c Thu Apr 4 11:20:28 2002 @@ -1,5 +1,5 @@ /* BFD library support routines for the Hitachi H8/300 architecture. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2000, 2001 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2000, 2001, 2002 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support. @@ -91,7 +91,7 @@ const bfd_arch_info_type *out; { /* It's really not a good idea to mix and match modes. */ - if (in->mach != out->mach) + if (in->arch != out->arch || in->mach != out->mach) return 0; else return in; diff -Nur binutils-2.12/bfd/cpu-i370.c binutils-2.12.1/bfd/cpu-i370.c --- binutils-2.12/bfd/cpu-i370.c Thu Mar 8 16:03:58 2001 +++ binutils-2.12.1/bfd/cpu-i370.c Thu Apr 4 11:20:28 2002 @@ -1,5 +1,5 @@ /* BFD i370 CPU definition - Copyright 1994, 1995, 1996, 1998, 1999, 2000 + Copyright 1994, 1995, 1996, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Ian Lance Taylor, Cygnus Support. Hacked by Linas Vepstas in 1998, 1999 @@ -24,27 +24,6 @@ #include "sysdep.h" #include "libbfd.h" -/* The common i360/370 architecture comes in many forms */ - -static const bfd_arch_info_type *i370_compatible - PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *)); - -static const bfd_arch_info_type * -i370_compatible (a, b) - const bfd_arch_info_type *a; - const bfd_arch_info_type *b; -{ - BFD_ASSERT (a->arch == bfd_arch_i370); - switch (b->arch) - { - default: - return NULL; - case bfd_arch_i370: - return bfd_default_compatible (a, b); - } - /*NOTREACHED*/ -} - static const bfd_arch_info_type arch_info_struct[] = { /* hack alert: old old machines are really 16 and 24 bit arch ... */ @@ -58,7 +37,7 @@ "i370:360", 3, false, /* not the default */ - i370_compatible, + bfd_default_compatible, bfd_default_scan, &arch_info_struct[1] }, @@ -72,7 +51,7 @@ "i370:370", 3, false, /* not the default */ - i370_compatible, + bfd_default_compatible, bfd_default_scan, 0 }, @@ -89,7 +68,7 @@ "i370:common", 3, true, /* the default */ - i370_compatible, + bfd_default_compatible, bfd_default_scan, &arch_info_struct[0] }; diff -Nur binutils-2.12/bfd/cpu-i386.c binutils-2.12.1/bfd/cpu-i386.c --- binutils-2.12/bfd/cpu-i386.c Wed Nov 14 07:01:58 2001 +++ binutils-2.12.1/bfd/cpu-i386.c Thu Apr 4 11:20:28 2002 @@ -1,5 +1,5 @@ /* BFD support for the Intel 386 architecture. - Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001 + Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -44,8 +44,8 @@ 8, /* 8 bits in a byte */ bfd_arch_i386, bfd_mach_x86_64_intel_syntax, - "x86-64:intel", - "x86-64:intel", + "i386:intel", + "i386:x86-64:intel", 3, true, bfd_default_compatible, @@ -75,8 +75,8 @@ 8, /* 8 bits in a byte */ bfd_arch_i386, bfd_mach_x86_64, - "x86-64", - "x86-64", + "i386", + "i386:x86-64", 3, true, bfd_default_compatible, diff -Nur binutils-2.12/bfd/cpu-mips.c binutils-2.12.1/bfd/cpu-mips.c --- binutils-2.12/bfd/cpu-mips.c Fri Aug 31 17:24:28 2001 +++ binutils-2.12.1/bfd/cpu-mips.c Tue Apr 2 19:48:05 2002 @@ -1,5 +1,5 @@ /* bfd back-end for mips support - Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 2000 + Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support. @@ -23,6 +23,29 @@ #include "sysdep.h" #include "libbfd.h" +static const bfd_arch_info_type *mips_compatible + PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *)); + +/* The default routine tests bits_per_word, which is wrong on mips as + mips word size doesn't correlate with reloc size. */ + +static const bfd_arch_info_type * +mips_compatible (a, b) + const bfd_arch_info_type *a; + const bfd_arch_info_type *b; +{ + if (a->arch != b->arch) + return NULL; + + if (a->mach > b->mach) + return a; + + if (b->mach > a->mach) + return b; + + return a; +} + #define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT) \ { \ BITS_WORD, /* bits in a word */ \ @@ -34,7 +57,7 @@ PRINT, \ 3, \ DEFAULT, \ - bfd_default_compatible, \ + mips_compatible, \ bfd_default_scan, \ NEXT, \ } diff -Nur binutils-2.12/bfd/cpu-powerpc.c binutils-2.12.1/bfd/cpu-powerpc.c --- binutils-2.12/bfd/cpu-powerpc.c Mon Feb 4 22:35:14 2002 +++ binutils-2.12.1/bfd/cpu-powerpc.c Thu May 9 10:48:52 2002 @@ -50,6 +50,65 @@ const bfd_arch_info_type bfd_powerpc_archs[] = { +#if BFD_DEFAULT_TARGET_SIZE == 64 /* default arch must come first. */ + { + 64, /* 64 bits in a word */ + 64, /* 64 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_powerpc, + bfd_mach_ppc64, + "powerpc", + "powerpc:common64", + 3, + true, /* default for 64 bit target */ + powerpc_compatible, + bfd_default_scan, + &bfd_powerpc_archs[1] + }, + { + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_powerpc, + bfd_mach_ppc, /* for the POWER/PowerPC common architecture */ + "powerpc", + "powerpc:common", + 3, + false, + powerpc_compatible, + bfd_default_scan, + &bfd_powerpc_archs[2], + }, +#else + { + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_powerpc, + bfd_mach_ppc, /* for the POWER/PowerPC common architecture */ + "powerpc", + "powerpc:common", + 3, + true, /* default for 32 bit target */ + powerpc_compatible, + bfd_default_scan, + &bfd_powerpc_archs[1], + }, + { + 64, /* 64 bits in a word */ + 64, /* 64 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_powerpc, + bfd_mach_ppc64, + "powerpc", + "powerpc:common64", + 3, + false, + powerpc_compatible, + bfd_default_scan, + &bfd_powerpc_archs[2] + }, +#endif { 32, /* 32 bits in a word */ 32, /* 32 bits in an address */ @@ -62,7 +121,7 @@ false, /* not the default */ powerpc_compatible, bfd_default_scan, - &bfd_powerpc_archs[1] + &bfd_powerpc_archs[3] }, { 32, /* 32 bits in a word */ @@ -76,7 +135,7 @@ false, /* not the default */ powerpc_compatible, bfd_default_scan, - &bfd_powerpc_archs[2] + &bfd_powerpc_archs[4] }, { 32, /* 32 bits in a word */ @@ -90,7 +149,7 @@ false, /* not the default */ powerpc_compatible, bfd_default_scan, - &bfd_powerpc_archs[3] + &bfd_powerpc_archs[5] }, { 32, /* 32 bits in a word */ @@ -104,7 +163,7 @@ false, /* not the default */ powerpc_compatible, bfd_default_scan, - &bfd_powerpc_archs[4] + &bfd_powerpc_archs[6] }, { 32, /* 32 bits in a word */ @@ -118,7 +177,7 @@ false, /* not the default */ powerpc_compatible, bfd_default_scan, - &bfd_powerpc_archs[5] + &bfd_powerpc_archs[7] }, { 64, /* 64 bits in a word */ @@ -132,7 +191,7 @@ false, /* not the default */ powerpc_compatible, bfd_default_scan, - &bfd_powerpc_archs[6] + &bfd_powerpc_archs[8] }, { 64, /* 64 bits in a word */ @@ -146,7 +205,7 @@ false, /* not the default */ powerpc_compatible, bfd_default_scan, - &bfd_powerpc_archs[7] + &bfd_powerpc_archs[9] }, { 64, /* 64 bits in a word */ @@ -160,7 +219,7 @@ false, /* not the default */ powerpc_compatible, bfd_default_scan, - &bfd_powerpc_archs[8] + &bfd_powerpc_archs[10] }, { 64, /* 64 bits in a word */ @@ -174,7 +233,7 @@ false, /* not the default */ powerpc_compatible, bfd_default_scan, - &bfd_powerpc_archs[9] + &bfd_powerpc_archs[11] }, { 64, /* 64 bits in a word */ @@ -188,7 +247,7 @@ false, /* not the default */ powerpc_compatible, bfd_default_scan, - &bfd_powerpc_archs[10] + &bfd_powerpc_archs[12] }, { 32, /* 32 bits in a word */ @@ -202,7 +261,7 @@ false, /* not the default */ powerpc_compatible, bfd_default_scan, - &bfd_powerpc_archs[11] + &bfd_powerpc_archs[13] }, { 32, /* 32 bits in a word */ @@ -214,34 +273,6 @@ "powerpc:MPC8XX", 3, false, /* not the default */ - powerpc_compatible, - bfd_default_scan, - &bfd_powerpc_archs[12] - }, - { - 64, /* 64 bits in a word */ - 64, /* 64 bits in an address */ - 8, /* 8 bits in a byte */ - bfd_arch_powerpc, - bfd_mach_ppc64, - "powerpc", - "powerpc:common64", - 3, - BFD_DEFAULT_TARGET_SIZE == 64, /* default for 64 bit target */ - powerpc_compatible, - bfd_default_scan, - &bfd_powerpc_archs[13] - }, - { - 32, /* 32 bits in a word */ - 32, /* 32 bits in an address */ - 8, /* 8 bits in a byte */ - bfd_arch_powerpc, - bfd_mach_ppc, /* for the POWER/PowerPC common architecture */ - "powerpc", - "powerpc:common", - 3, - BFD_DEFAULT_TARGET_SIZE != 64, /* default for 32 bit target */ powerpc_compatible, bfd_default_scan, 0 diff -Nur binutils-2.12/bfd/cpu-s390.c binutils-2.12.1/bfd/cpu-s390.c --- binutils-2.12/bfd/cpu-s390.c Thu Mar 8 16:03:58 2001 +++ binutils-2.12.1/bfd/cpu-s390.c Thu Apr 4 11:20:29 2002 @@ -1,5 +1,5 @@ /* BFD support for the s390 processor. - Copyright 2000, 2001 Free Software Foundation, Inc. + Copyright 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Carl B. Pedersen and Martin Schwidefsky. This file is part of BFD, the Binary File Descriptor library. @@ -23,15 +23,15 @@ #include "sysdep.h" #include "libbfd.h" -const bfd_arch_info_type bfd_s390_esame_arch = +const bfd_arch_info_type bfd_s390_64_arch = { 64, /* bits in a word */ 64, /* bits in an address */ 8, /* bits in a byte */ bfd_arch_s390, - bfd_mach_s390_esame, + bfd_mach_s390_64, "s390", - "s390:esame", + "s390:64-bit", 3, /* section alignment power */ true, /* the default */ bfd_default_compatible, @@ -45,12 +45,12 @@ 32, /* bits in an address */ 8, /* bits in a byte */ bfd_arch_s390, - bfd_mach_s390_esa, + bfd_mach_s390_31, "s390", - "s390:390", + "s390:31-bit", 3, /* section alignment power */ true, /* the default */ bfd_default_compatible, bfd_default_scan, - &bfd_s390_esame_arch + &bfd_s390_64_arch }; diff -Nur binutils-2.12/bfd/cpu-sparc.c binutils-2.12.1/bfd/cpu-sparc.c --- binutils-2.12/bfd/cpu-sparc.c Thu Mar 8 16:03:58 2001 +++ binutils-2.12.1/bfd/cpu-sparc.c Thu Apr 4 11:20:30 2002 @@ -1,5 +1,6 @@ /* BFD support for the SPARC architecture. - Copyright 1992, 1995, 1996, 1998, 2000 Free Software Foundation, Inc. + Copyright 1992, 1995, 1996, 1998, 2000, 2002 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -21,22 +22,6 @@ #include "sysdep.h" #include "libbfd.h" -/* Don't mix 32 bit and 64 bit files. */ - -static const bfd_arch_info_type *sparc_compatible - PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *)); - -static const bfd_arch_info_type * -sparc_compatible (a, b) - const bfd_arch_info_type *a; - const bfd_arch_info_type *b; -{ - if (a->bits_per_word != b->bits_per_word) - return NULL; - - return bfd_default_compatible (a, b); -} - static const bfd_arch_info_type arch_info_struct[] = { { @@ -49,7 +34,7 @@ "sparc:sparclet", 3, false, - sparc_compatible, + bfd_default_compatible, bfd_default_scan, &arch_info_struct[1], }, @@ -63,7 +48,7 @@ "sparc:sparclite", 3, false, - sparc_compatible, + bfd_default_compatible, bfd_default_scan, &arch_info_struct[2], }, @@ -77,7 +62,7 @@ "sparc:v8plus", 3, false, - sparc_compatible, + bfd_default_compatible, bfd_default_scan, &arch_info_struct[3], }, @@ -91,7 +76,7 @@ "sparc:v8plusa", 3, false, - sparc_compatible, + bfd_default_compatible, bfd_default_scan, &arch_info_struct[4], }, @@ -105,7 +90,7 @@ "sparc:sparclite_le", 3, false, - sparc_compatible, + bfd_default_compatible, bfd_default_scan, &arch_info_struct[5], }, @@ -119,7 +104,7 @@ "sparc:v9", 3, false, - sparc_compatible, + bfd_default_compatible, bfd_default_scan, &arch_info_struct[6], }, @@ -133,7 +118,7 @@ "sparc:v9a", 3, false, - sparc_compatible, + bfd_default_compatible, bfd_default_scan, &arch_info_struct[7], }, @@ -147,7 +132,7 @@ "sparc:v8plusb", 3, false, - sparc_compatible, + bfd_default_compatible, bfd_default_scan, &arch_info_struct[8], }, @@ -161,7 +146,7 @@ "sparc:v9b", 3, false, - sparc_compatible, + bfd_default_compatible, bfd_default_scan, 0, } @@ -178,7 +163,7 @@ "sparc", 3, true, /* the default */ - sparc_compatible, + bfd_default_compatible, bfd_default_scan, &arch_info_struct[0], }; diff -Nur binutils-2.12/bfd/dep-in.sed binutils-2.12.1/bfd/dep-in.sed --- binutils-2.12/bfd/dep-in.sed Thu Oct 4 11:37:38 2001 +++ binutils-2.12.1/bfd/dep-in.sed Thu Apr 4 11:20:31 2002 @@ -5,8 +5,10 @@ s!\.o:!.lo:! s! @BFD_H@!!g -s!@INCDIR@!$(INCDIR)!g +s!@SRCDIR@/../include!$(INCDIR)!g +s!@TOPDIR@/include!$(INCDIR)!g s!@SRCDIR@/../opcodes!$(srcdir)/../opcodes!g +s!@TOPDIR@/opcodes!$(srcdir)/../opcodes!g s!@SRCDIR@/!!g s! hosts/[^ ]*\.h! !g s! sysdep.h!!g diff -Nur binutils-2.12/bfd/doc/ChangeLog binutils-2.12.1/bfd/doc/ChangeLog --- binutils-2.12/bfd/doc/ChangeLog Fri Feb 1 04:22:53 2002 +++ binutils-2.12.1/bfd/doc/ChangeLog Mon Apr 1 20:28:55 2002 @@ -1,3 +1,7 @@ +2002-03-28 Alan Modra + + * Makefile.in: Regenerate. + 2002-02-01 Alan Modra * chew.c (WORD): Eliminate. diff -Nur binutils-2.12/bfd/doc/Makefile.in binutils-2.12.1/bfd/doc/Makefile.in --- binutils-2.12/bfd/doc/Makefile.in Fri Feb 8 00:33:25 2002 +++ binutils-2.12.1/bfd/doc/Makefile.in Mon Apr 1 20:28:55 2002 @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -242,7 +242,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: @@ -328,7 +328,7 @@ else ii=; fi; \ list='$(INFO_DEPS)'; \ for file in $$list; do \ - test -z "$ii" \ + test -z "$$ii" \ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ done @$(NORMAL_UNINSTALL) diff -Nur binutils-2.12/bfd/doc/archures.texi binutils-2.12.1/bfd/doc/archures.texi --- binutils-2.12/bfd/doc/archures.texi Fri Mar 8 01:16:00 2002 +++ binutils-2.12.1/bfd/doc/archures.texi Mon May 13 09:15:29 2002 @@ -225,8 +225,8 @@ #define bfd_mach_avr5 5 bfd_arch_cris, /* Axis CRIS */ bfd_arch_s390, /* IBM s390 */ -#define bfd_mach_s390_esa 0 -#define bfd_mach_s390_esame 1 +#define bfd_mach_s390_31 0 +#define bfd_mach_s390_64 1 bfd_arch_openrisc, /* OpenRISC */ bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, @@ -253,7 +253,9 @@ const char *arch_name; const char *printable_name; unsigned int section_align_power; - /* True if this is the default machine for the architecture. */ + /* True if this is the default machine for the architecture. + The default arch should be the first entry for an arch so that + all the entries for that arch can be accessed via @code{next}. */ boolean the_default; const struct bfd_arch_info * (*compatible) PARAMS ((const struct bfd_arch_info *a, diff -Nur binutils-2.12/bfd/doc/bfd.info binutils-2.12.1/bfd/doc/bfd.info --- binutils-2.12/bfd/doc/bfd.info Fri Mar 8 01:16:00 2002 +++ binutils-2.12.1/bfd/doc/bfd.info Tue May 14 19:47:17 2002 @@ -1,4 +1,4 @@ -This is bfd.info, produced by makeinfo version 4.0f from bfd.texinfo. +This is bfd.info, produced by makeinfo version 4.1 from bfd.texinfo. START-INFO-DIR-ENTRY * Bfd: (bfd). The Binary File Descriptor library. @@ -17,79 +17,79 @@  Indirect: -bfd.info-1: 687 -bfd.info-2: 39393 -bfd.info-3: 86644 -bfd.info-4: 102441 -bfd.info-5: 142458 -bfd.info-6: 192424 -bfd.info-7: 226691 -bfd.info-8: 266268 -bfd.info-9: 284690 +bfd.info-1: 686 +bfd.info-2: 39392 +bfd.info-3: 86643 +bfd.info-4: 102440 +bfd.info-5: 142457 +bfd.info-6: 189788 +bfd.info-7: 226834 +bfd.info-8: 266411 +bfd.info-9: 284833  Tag Table: (Indirect) -Node: Top687 -Node: Overview1019 -Node: History2069 -Node: How It Works3010 -Node: What BFD Version 2 Can Do4548 -Node: BFD information loss5858 -Node: Canonical format8381 -Node: BFD front end12742 -Node: Memory Usage33491 -Node: Initialization34714 -Node: Sections35091 -Node: Section Input35569 -Node: Section Output36925 -Node: typedef asection39393 -Node: section prototypes57594 -Node: Symbols64472 -Node: Reading Symbols66062 -Node: Writing Symbols67236 -Node: Mini Symbols68926 -Node: typedef asymbol69891 -Node: symbol handling functions74831 -Node: Archives79496 -Node: Formats83114 -Node: Relocations85924 -Node: typedef arelent86644 -Node: howto manager102441 -Node: Core Files139474 -Node: Targets140495 -Node: bfd_target142458 -Node: Architectures161944 -Node: Opening and Closing177771 -Node: Internal182168 -Node: File Caching189645 -Node: Linker Functions192424 -Node: Creating a Linker Hash Table194090 -Node: Adding Symbols to the Hash Table195818 -Node: Differing file formats196708 -Node: Adding symbols from an object file198441 -Node: Adding symbols from an archive200577 -Node: Performing the Final Link202976 -Node: Information provided by the linker204207 -Node: Relocating the section contents205343 -Node: Writing the symbol table207080 -Node: Hash Tables209674 -Node: Creating and Freeing a Hash Table210865 -Node: Looking Up or Entering a String212022 -Node: Traversing a Hash Table213264 -Node: Deriving a New Hash Table Type214042 -Node: Define the Derived Structures215097 -Node: Write the Derived Creation Routine216163 -Node: Write Other Derived Routines218862 -Node: BFD back ends220162 -Node: What to Put Where220428 -Node: aout220566 -Node: coff226691 -Node: elf251424 -Node: mmo252269 -Node: File layout253192 -Node: Symbol-table258830 -Node: mmo section mapping262625 -Node: GNU Free Documentation License266268 -Node: Index284690 +Node: Top686 +Node: Overview1018 +Node: History2068 +Node: How It Works3009 +Node: What BFD Version 2 Can Do4547 +Node: BFD information loss5857 +Node: Canonical format8380 +Node: BFD front end12741 +Node: Memory Usage33490 +Node: Initialization34713 +Node: Sections35090 +Node: Section Input35568 +Node: Section Output36924 +Node: typedef asection39392 +Node: section prototypes57593 +Node: Symbols64471 +Node: Reading Symbols66061 +Node: Writing Symbols67235 +Node: Mini Symbols68925 +Node: typedef asymbol69890 +Node: symbol handling functions74830 +Node: Archives79495 +Node: Formats83113 +Node: Relocations85923 +Node: typedef arelent86643 +Node: howto manager102440 +Node: Core Files139473 +Node: Targets140494 +Node: bfd_target142457 +Node: Architectures161943 +Node: Opening and Closing177911 +Node: Internal182308 +Node: File Caching189788 +Node: Linker Functions192567 +Node: Creating a Linker Hash Table194233 +Node: Adding Symbols to the Hash Table195961 +Node: Differing file formats196851 +Node: Adding symbols from an object file198584 +Node: Adding symbols from an archive200720 +Node: Performing the Final Link203119 +Node: Information provided by the linker204350 +Node: Relocating the section contents205486 +Node: Writing the symbol table207223 +Node: Hash Tables209817 +Node: Creating and Freeing a Hash Table211008 +Node: Looking Up or Entering a String212165 +Node: Traversing a Hash Table213407 +Node: Deriving a New Hash Table Type214185 +Node: Define the Derived Structures215240 +Node: Write the Derived Creation Routine216306 +Node: Write Other Derived Routines219005 +Node: BFD back ends220305 +Node: What to Put Where220571 +Node: aout220709 +Node: coff226834 +Node: elf251567 +Node: mmo252412 +Node: File layout253335 +Node: Symbol-table258973 +Node: mmo section mapping262768 +Node: GNU Free Documentation License266411 +Node: Index284833  End Tag Table diff -Nur binutils-2.12/bfd/doc/bfd.info-1 binutils-2.12.1/bfd/doc/bfd.info-1 --- binutils-2.12/bfd/doc/bfd.info-1 Fri Mar 8 01:16:00 2002 +++ binutils-2.12.1/bfd/doc/bfd.info-1 Tue May 14 19:47:17 2002 @@ -1,4 +1,4 @@ -This is bfd.info, produced by makeinfo version 4.0f from bfd.texinfo. +This is bfd.info, produced by makeinfo version 4.1 from bfd.texinfo. START-INFO-DIR-ENTRY * Bfd: (bfd). The Binary File Descriptor library. diff -Nur binutils-2.12/bfd/doc/bfd.info-2 binutils-2.12.1/bfd/doc/bfd.info-2 --- binutils-2.12/bfd/doc/bfd.info-2 Fri Mar 8 01:16:00 2002 +++ binutils-2.12.1/bfd/doc/bfd.info-2 Tue May 14 19:47:17 2002 @@ -1,4 +1,4 @@ -This is bfd.info, produced by makeinfo version 4.0f from bfd.texinfo. +This is bfd.info, produced by makeinfo version 4.1 from bfd.texinfo. START-INFO-DIR-ENTRY * Bfd: (bfd). The Binary File Descriptor library. diff -Nur binutils-2.12/bfd/doc/bfd.info-3 binutils-2.12.1/bfd/doc/bfd.info-3 --- binutils-2.12/bfd/doc/bfd.info-3 Fri Mar 8 01:16:00 2002 +++ binutils-2.12.1/bfd/doc/bfd.info-3 Tue May 14 19:47:17 2002 @@ -1,4 +1,4 @@ -This is bfd.info, produced by makeinfo version 4.0f from bfd.texinfo. +This is bfd.info, produced by makeinfo version 4.1 from bfd.texinfo. START-INFO-DIR-ENTRY * Bfd: (bfd). The Binary File Descriptor library. diff -Nur binutils-2.12/bfd/doc/bfd.info-4 binutils-2.12.1/bfd/doc/bfd.info-4 --- binutils-2.12/bfd/doc/bfd.info-4 Fri Mar 8 01:16:00 2002 +++ binutils-2.12.1/bfd/doc/bfd.info-4 Tue May 14 19:47:17 2002 @@ -1,4 +1,4 @@ -This is bfd.info, produced by makeinfo version 4.0f from bfd.texinfo. +This is bfd.info, produced by makeinfo version 4.1 from bfd.texinfo. START-INFO-DIR-ENTRY * Bfd: (bfd). The Binary File Descriptor library. @@ -301,55 +301,6 @@ - : BFD_RELOC_MIPS_REL16 - : BFD_RELOC_MIPS_RELGOT - : BFD_RELOC_MIPS_JALR - - : BFD_RELOC_SH_GOT_LOW16 - - : BFD_RELOC_SH_GOT_MEDLOW16 - - : BFD_RELOC_SH_GOT_MEDHI16 - - : BFD_RELOC_SH_GOT_HI16 - - : BFD_RELOC_SH_GOTPLT_LOW16 - - : BFD_RELOC_SH_GOTPLT_MEDLOW16 - - : BFD_RELOC_SH_GOTPLT_MEDHI16 - - : BFD_RELOC_SH_GOTPLT_HI16 - - : BFD_RELOC_SH_PLT_LOW16 - - : BFD_RELOC_SH_PLT_MEDLOW16 - - : BFD_RELOC_SH_PLT_MEDHI16 - - : BFD_RELOC_SH_PLT_HI16 - - : BFD_RELOC_SH_GOTOFF_LOW16 - - : BFD_RELOC_SH_GOTOFF_MEDLOW16 - - : BFD_RELOC_SH_GOTOFF_MEDHI16 - - : BFD_RELOC_SH_GOTOFF_HI16 - - : BFD_RELOC_SH_GOTPC_LOW16 - - : BFD_RELOC_SH_GOTPC_MEDLOW16 - - : BFD_RELOC_SH_GOTPC_MEDHI16 - - : BFD_RELOC_SH_GOTPC_HI16 - - : BFD_RELOC_SH_COPY64 - - : BFD_RELOC_SH_GLOB_DAT64 - - : BFD_RELOC_SH_JMP_SLOT64 - - : BFD_RELOC_SH_RELATIVE64 - - : BFD_RELOC_SH_GOT10BY4 - - : BFD_RELOC_SH_GOT10BY8 - - : BFD_RELOC_SH_GOTPLT10BY4 - - : BFD_RELOC_SH_GOTPLT10BY8 - - : BFD_RELOC_SH_GOTPLT32 - - : BFD_RELOC_SH_SHMEDIA_CODE - - : BFD_RELOC_SH_IMMU5 - - : BFD_RELOC_SH_IMMS6 - - : BFD_RELOC_SH_IMMS6BY32 - - : BFD_RELOC_SH_IMMU6 - - : BFD_RELOC_SH_IMMS10 - - : BFD_RELOC_SH_IMMS10BY2 - - : BFD_RELOC_SH_IMMS10BY4 - - : BFD_RELOC_SH_IMMS10BY8 - - : BFD_RELOC_SH_IMMS16 - - : BFD_RELOC_SH_IMMU16 - - : BFD_RELOC_SH_IMM_LOW16 - - : BFD_RELOC_SH_IMM_LOW16_PCREL - - : BFD_RELOC_SH_IMM_MEDLOW16 - - : BFD_RELOC_SH_IMM_MEDLOW16_PCREL - - : BFD_RELOC_SH_IMM_MEDHI16 - - : BFD_RELOC_SH_IMM_MEDHI16_PCREL - - : BFD_RELOC_SH_IMM_HI16 - - : BFD_RELOC_SH_IMM_HI16_PCREL - - : BFD_RELOC_SH_PT_16 MIPS ELF relocations. - : BFD_RELOC_386_GOT32 @@ -530,6 +481,55 @@ - : BFD_RELOC_SH_JMP_SLOT - : BFD_RELOC_SH_RELATIVE - : BFD_RELOC_SH_GOTPC + - : BFD_RELOC_SH_GOT_LOW16 + - : BFD_RELOC_SH_GOT_MEDLOW16 + - : BFD_RELOC_SH_GOT_MEDHI16 + - : BFD_RELOC_SH_GOT_HI16 + - : BFD_RELOC_SH_GOTPLT_LOW16 + - : BFD_RELOC_SH_GOTPLT_MEDLOW16 + - : BFD_RELOC_SH_GOTPLT_MEDHI16 + - : BFD_RELOC_SH_GOTPLT_HI16 + - : BFD_RELOC_SH_PLT_LOW16 + - : BFD_RELOC_SH_PLT_MEDLOW16 + - : BFD_RELOC_SH_PLT_MEDHI16 + - : BFD_RELOC_SH_PLT_HI16 + - : BFD_RELOC_SH_GOTOFF_LOW16 + - : BFD_RELOC_SH_GOTOFF_MEDLOW16 + - : BFD_RELOC_SH_GOTOFF_MEDHI16 + - : BFD_RELOC_SH_GOTOFF_HI16 + - : BFD_RELOC_SH_GOTPC_LOW16 + - : BFD_RELOC_SH_GOTPC_MEDLOW16 + - : BFD_RELOC_SH_GOTPC_MEDHI16 + - : BFD_RELOC_SH_GOTPC_HI16 + - : BFD_RELOC_SH_COPY64 + - : BFD_RELOC_SH_GLOB_DAT64 + - : BFD_RELOC_SH_JMP_SLOT64 + - : BFD_RELOC_SH_RELATIVE64 + - : BFD_RELOC_SH_GOT10BY4 + - : BFD_RELOC_SH_GOT10BY8 + - : BFD_RELOC_SH_GOTPLT10BY4 + - : BFD_RELOC_SH_GOTPLT10BY8 + - : BFD_RELOC_SH_GOTPLT32 + - : BFD_RELOC_SH_SHMEDIA_CODE + - : BFD_RELOC_SH_IMMU5 + - : BFD_RELOC_SH_IMMS6 + - : BFD_RELOC_SH_IMMS6BY32 + - : BFD_RELOC_SH_IMMU6 + - : BFD_RELOC_SH_IMMS10 + - : BFD_RELOC_SH_IMMS10BY2 + - : BFD_RELOC_SH_IMMS10BY4 + - : BFD_RELOC_SH_IMMS10BY8 + - : BFD_RELOC_SH_IMMS16 + - : BFD_RELOC_SH_IMMU16 + - : BFD_RELOC_SH_IMM_LOW16 + - : BFD_RELOC_SH_IMM_LOW16_PCREL + - : BFD_RELOC_SH_IMM_MEDLOW16 + - : BFD_RELOC_SH_IMM_MEDLOW16_PCREL + - : BFD_RELOC_SH_IMM_MEDHI16 + - : BFD_RELOC_SH_IMM_MEDHI16_PCREL + - : BFD_RELOC_SH_IMM_HI16 + - : BFD_RELOC_SH_IMM_HI16_PCREL + - : BFD_RELOC_SH_PT_16 Hitachi SH relocs. Not all of these appear in object files. - : BFD_RELOC_THUMB_PCREL_BRANCH9 diff -Nur binutils-2.12/bfd/doc/bfd.info-5 binutils-2.12.1/bfd/doc/bfd.info-5 --- binutils-2.12/bfd/doc/bfd.info-5 Fri Mar 8 01:16:00 2002 +++ binutils-2.12.1/bfd/doc/bfd.info-5 Tue May 14 19:47:17 2002 @@ -1,4 +1,4 @@ -This is bfd.info, produced by makeinfo version 4.0f from bfd.texinfo. +This is bfd.info, produced by makeinfo version 4.1 from bfd.texinfo. START-INFO-DIR-ENTRY * Bfd: (bfd). The Binary File Descriptor library. @@ -660,8 +660,8 @@ #define bfd_mach_avr5 5 bfd_arch_cris, /* Axis CRIS */ bfd_arch_s390, /* IBM s390 */ - #define bfd_mach_s390_esa 0 - #define bfd_mach_s390_esame 1 + #define bfd_mach_s390_31 0 + #define bfd_mach_s390_64 1 bfd_arch_openrisc, /* OpenRISC */ bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, @@ -685,7 +685,9 @@ const char *arch_name; const char *printable_name; unsigned int section_align_power; - /* True if this is the default machine for the architecture. */ + /* True if this is the default machine for the architecture. + The default arch should be the first entry for an arch so that + all the entries for that arch can be accessed via `next'. */ boolean the_default; const struct bfd_arch_info * (*compatible) PARAMS ((const struct bfd_arch_info *a, @@ -1039,7 +1041,7 @@ ............................... *Synopsis* - void bfd_write_bigendian_4byte_int (bfd *, unsigned int); + boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int); *Description* Write a 4 byte integer I to the output BFD ABFD, in big endian order regardless of what else is going on. This is useful in archives. @@ -1222,93 +1224,4 @@ *Description* Return the log base 2 of the value supplied, rounded up. E.g., an X of 1025 returns 11. A X of 0 returns 0. - - -File: bfd.info, Node: File Caching, Next: Linker Functions, Prev: Internal, Up: BFD front end - -File caching -============ - - The file caching mechanism is embedded within BFD and allows the -application to open as many BFDs as it wants without regard to the -underlying operating system's file descriptor limit (often as low as 20 -open files). The module in `cache.c' maintains a least recently used -list of `BFD_CACHE_MAX_OPEN' files, and exports the name -`bfd_cache_lookup', which runs around and makes sure that the required -BFD is open. If not, then it chooses a file to close, closes it and -opens the one wanted, returning its file handle. - -`BFD_CACHE_MAX_OPEN macro' -.......................... - - *Description* -The maximum number of files which the cache will keep open at one time. - #define BFD_CACHE_MAX_OPEN 10 - -`bfd_last_cache' -................ - - *Synopsis* - extern bfd *bfd_last_cache; - *Description* -Zero, or a pointer to the topmost BFD on the chain. This is used by -the `bfd_cache_lookup' macro in `libbfd.h' to determine when it can -avoid a function call. - -`bfd_cache_lookup' -.................. - - *Description* -Check to see if the required BFD is the same as the last one looked up. -If so, then it can use the stream in the BFD with impunity, since it -can't have changed since the last lookup; otherwise, it has to perform -the complicated lookup function. - #define bfd_cache_lookup(x) \ - ((x)==bfd_last_cache? \ - (FILE*) (bfd_last_cache->iostream): \ - bfd_cache_lookup_worker(x)) - -`bfd_cache_init' -................ - - *Synopsis* - boolean bfd_cache_init (bfd *abfd); - *Description* -Add a newly opened BFD to the cache. - -`bfd_cache_close' -................. - - *Synopsis* - boolean bfd_cache_close (bfd *abfd); - *Description* -Remove the BFD ABFD from the cache. If the attached file is open, then -close it too. - - *Returns* -`false' is returned if closing the file fails, `true' is returned if -all is well. - -`bfd_open_file' -............... - - *Synopsis* - FILE* bfd_open_file(bfd *abfd); - *Description* -Call the OS to open a file for ABFD. Return the `FILE *' (possibly -`NULL') that results from this operation. Set up the BFD so that -future accesses know the file is open. If the `FILE *' returned is -`NULL', then it won't have been put in the cache, so it won't have to -be removed from it. - -`bfd_cache_lookup_worker' -......................... - - *Synopsis* - FILE *bfd_cache_lookup_worker(bfd *abfd); - *Description* -Called when the macro `bfd_cache_lookup' fails to find a quick answer. -Find a file descriptor for ABFD. If necessary, it open it. If there -are already more than `BFD_CACHE_MAX_OPEN' files open, it tries to -close one first, to avoid running out of file descriptors. diff -Nur binutils-2.12/bfd/doc/bfd.info-6 binutils-2.12.1/bfd/doc/bfd.info-6 --- binutils-2.12/bfd/doc/bfd.info-6 Fri Mar 8 01:16:00 2002 +++ binutils-2.12.1/bfd/doc/bfd.info-6 Tue May 14 19:47:17 2002 @@ -1,4 +1,4 @@ -This is bfd.info, produced by makeinfo version 4.0f from bfd.texinfo. +This is bfd.info, produced by makeinfo version 4.1 from bfd.texinfo. START-INFO-DIR-ENTRY * Bfd: (bfd). The Binary File Descriptor library. @@ -14,6 +14,95 @@ 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 "GNU Free Documentation License". + + +File: bfd.info, Node: File Caching, Next: Linker Functions, Prev: Internal, Up: BFD front end + +File caching +============ + + The file caching mechanism is embedded within BFD and allows the +application to open as many BFDs as it wants without regard to the +underlying operating system's file descriptor limit (often as low as 20 +open files). The module in `cache.c' maintains a least recently used +list of `BFD_CACHE_MAX_OPEN' files, and exports the name +`bfd_cache_lookup', which runs around and makes sure that the required +BFD is open. If not, then it chooses a file to close, closes it and +opens the one wanted, returning its file handle. + +`BFD_CACHE_MAX_OPEN macro' +.......................... + + *Description* +The maximum number of files which the cache will keep open at one time. + #define BFD_CACHE_MAX_OPEN 10 + +`bfd_last_cache' +................ + + *Synopsis* + extern bfd *bfd_last_cache; + *Description* +Zero, or a pointer to the topmost BFD on the chain. This is used by +the `bfd_cache_lookup' macro in `libbfd.h' to determine when it can +avoid a function call. + +`bfd_cache_lookup' +.................. + + *Description* +Check to see if the required BFD is the same as the last one looked up. +If so, then it can use the stream in the BFD with impunity, since it +can't have changed since the last lookup; otherwise, it has to perform +the complicated lookup function. + #define bfd_cache_lookup(x) \ + ((x)==bfd_last_cache? \ + (FILE*) (bfd_last_cache->iostream): \ + bfd_cache_lookup_worker(x)) + +`bfd_cache_init' +................ + + *Synopsis* + boolean bfd_cache_init (bfd *abfd); + *Description* +Add a newly opened BFD to the cache. + +`bfd_cache_close' +................. + + *Synopsis* + boolean bfd_cache_close (bfd *abfd); + *Description* +Remove the BFD ABFD from the cache. If the attached file is open, then +close it too. + + *Returns* +`false' is returned if closing the file fails, `true' is returned if +all is well. + +`bfd_open_file' +............... + + *Synopsis* + FILE* bfd_open_file(bfd *abfd); + *Description* +Call the OS to open a file for ABFD. Return the `FILE *' (possibly +`NULL') that results from this operation. Set up the BFD so that +future accesses know the file is open. If the `FILE *' returned is +`NULL', then it won't have been put in the cache, so it won't have to +be removed from it. + +`bfd_cache_lookup_worker' +......................... + + *Synopsis* + FILE *bfd_cache_lookup_worker(bfd *abfd); + *Description* +Called when the macro `bfd_cache_lookup' fails to find a quick answer. +Find a file descriptor for ABFD. If necessary, it open it. If there +are already more than `BFD_CACHE_MAX_OPEN' files open, it tries to +close one first, to avoid running out of file descriptors.  File: bfd.info, Node: Linker Functions, Next: Hash Tables, Prev: File Caching, Up: BFD front end diff -Nur binutils-2.12/bfd/doc/bfd.info-7 binutils-2.12.1/bfd/doc/bfd.info-7 --- binutils-2.12/bfd/doc/bfd.info-7 Fri Mar 8 01:16:00 2002 +++ binutils-2.12.1/bfd/doc/bfd.info-7 Tue May 14 19:47:17 2002 @@ -1,4 +1,4 @@ -This is bfd.info, produced by makeinfo version 4.0f from bfd.texinfo. +This is bfd.info, produced by makeinfo version 4.1 from bfd.texinfo. START-INFO-DIR-ENTRY * Bfd: (bfd). The Binary File Descriptor library. diff -Nur binutils-2.12/bfd/doc/bfd.info-8 binutils-2.12.1/bfd/doc/bfd.info-8 --- binutils-2.12/bfd/doc/bfd.info-8 Fri Mar 8 01:16:00 2002 +++ binutils-2.12.1/bfd/doc/bfd.info-8 Tue May 14 19:47:17 2002 @@ -1,4 +1,4 @@ -This is bfd.info, produced by makeinfo version 4.0f from bfd.texinfo. +This is bfd.info, produced by makeinfo version 4.1 from bfd.texinfo. START-INFO-DIR-ENTRY * Bfd: (bfd). The Binary File Descriptor library. diff -Nur binutils-2.12/bfd/doc/bfd.info-9 binutils-2.12.1/bfd/doc/bfd.info-9 --- binutils-2.12/bfd/doc/bfd.info-9 Fri Mar 8 01:16:00 2002 +++ binutils-2.12.1/bfd/doc/bfd.info-9 Tue May 14 19:47:17 2002 @@ -1,4 +1,4 @@ -This is bfd.info, produced by makeinfo version 4.0f from bfd.texinfo. +This is bfd.info, produced by makeinfo version 4.1 from bfd.texinfo. START-INFO-DIR-ENTRY * Bfd: (bfd). The Binary File Descriptor library. diff -Nur binutils-2.12/bfd/doc/libbfd.texi binutils-2.12.1/bfd/doc/libbfd.texi --- binutils-2.12/bfd/doc/libbfd.texi Fri Mar 8 01:16:00 2002 +++ binutils-2.12.1/bfd/doc/libbfd.texi Mon May 13 09:15:31 2002 @@ -10,7 +10,7 @@ @subsubsection @code{bfd_write_bigendian_4byte_int} @strong{Synopsis} @example -void bfd_write_bigendian_4byte_int (bfd *, unsigned int); +boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int); @end example @strong{Description}@* Write a 4 byte integer @var{i} to the output BFD @var{abfd}, in big diff -Nur binutils-2.12/bfd/doc/reloc.texi binutils-2.12.1/bfd/doc/reloc.texi --- binutils-2.12/bfd/doc/reloc.texi Fri Mar 8 01:16:00 2002 +++ binutils-2.12.1/bfd/doc/reloc.texi Mon May 13 09:15:31 2002 @@ -768,55 +768,6 @@ @deffnx {} BFD_RELOC_MIPS_REL16 @deffnx {} BFD_RELOC_MIPS_RELGOT @deffnx {} BFD_RELOC_MIPS_JALR -@deffnx {} BFD_RELOC_SH_GOT_LOW16 -@deffnx {} BFD_RELOC_SH_GOT_MEDLOW16 -@deffnx {} BFD_RELOC_SH_GOT_MEDHI16 -@deffnx {} BFD_RELOC_SH_GOT_HI16 -@deffnx {} BFD_RELOC_SH_GOTPLT_LOW16 -@deffnx {} BFD_RELOC_SH_GOTPLT_MEDLOW16 -@deffnx {} BFD_RELOC_SH_GOTPLT_MEDHI16 -@deffnx {} BFD_RELOC_SH_GOTPLT_HI16 -@deffnx {} BFD_RELOC_SH_PLT_LOW16 -@deffnx {} BFD_RELOC_SH_PLT_MEDLOW16 -@deffnx {} BFD_RELOC_SH_PLT_MEDHI16 -@deffnx {} BFD_RELOC_SH_PLT_HI16 -@deffnx {} BFD_RELOC_SH_GOTOFF_LOW16 -@deffnx {} BFD_RELOC_SH_GOTOFF_MEDLOW16 -@deffnx {} BFD_RELOC_SH_GOTOFF_MEDHI16 -@deffnx {} BFD_RELOC_SH_GOTOFF_HI16 -@deffnx {} BFD_RELOC_SH_GOTPC_LOW16 -@deffnx {} BFD_RELOC_SH_GOTPC_MEDLOW16 -@deffnx {} BFD_RELOC_SH_GOTPC_MEDHI16 -@deffnx {} BFD_RELOC_SH_GOTPC_HI16 -@deffnx {} BFD_RELOC_SH_COPY64 -@deffnx {} BFD_RELOC_SH_GLOB_DAT64 -@deffnx {} BFD_RELOC_SH_JMP_SLOT64 -@deffnx {} BFD_RELOC_SH_RELATIVE64 -@deffnx {} BFD_RELOC_SH_GOT10BY4 -@deffnx {} BFD_RELOC_SH_GOT10BY8 -@deffnx {} BFD_RELOC_SH_GOTPLT10BY4 -@deffnx {} BFD_RELOC_SH_GOTPLT10BY8 -@deffnx {} BFD_RELOC_SH_GOTPLT32 -@deffnx {} BFD_RELOC_SH_SHMEDIA_CODE -@deffnx {} BFD_RELOC_SH_IMMU5 -@deffnx {} BFD_RELOC_SH_IMMS6 -@deffnx {} BFD_RELOC_SH_IMMS6BY32 -@deffnx {} BFD_RELOC_SH_IMMU6 -@deffnx {} BFD_RELOC_SH_IMMS10 -@deffnx {} BFD_RELOC_SH_IMMS10BY2 -@deffnx {} BFD_RELOC_SH_IMMS10BY4 -@deffnx {} BFD_RELOC_SH_IMMS10BY8 -@deffnx {} BFD_RELOC_SH_IMMS16 -@deffnx {} BFD_RELOC_SH_IMMU16 -@deffnx {} BFD_RELOC_SH_IMM_LOW16 -@deffnx {} BFD_RELOC_SH_IMM_LOW16_PCREL -@deffnx {} BFD_RELOC_SH_IMM_MEDLOW16 -@deffnx {} BFD_RELOC_SH_IMM_MEDLOW16_PCREL -@deffnx {} BFD_RELOC_SH_IMM_MEDHI16 -@deffnx {} BFD_RELOC_SH_IMM_MEDHI16_PCREL -@deffnx {} BFD_RELOC_SH_IMM_HI16 -@deffnx {} BFD_RELOC_SH_IMM_HI16_PCREL -@deffnx {} BFD_RELOC_SH_PT_16 MIPS ELF relocations. @end deffn @deffn {} BFD_RELOC_386_GOT32 @@ -996,6 +947,55 @@ @deffnx {} BFD_RELOC_SH_JMP_SLOT @deffnx {} BFD_RELOC_SH_RELATIVE @deffnx {} BFD_RELOC_SH_GOTPC +@deffnx {} BFD_RELOC_SH_GOT_LOW16 +@deffnx {} BFD_RELOC_SH_GOT_MEDLOW16 +@deffnx {} BFD_RELOC_SH_GOT_MEDHI16 +@deffnx {} BFD_RELOC_SH_GOT_HI16 +@deffnx {} BFD_RELOC_SH_GOTPLT_LOW16 +@deffnx {} BFD_RELOC_SH_GOTPLT_MEDLOW16 +@deffnx {} BFD_RELOC_SH_GOTPLT_MEDHI16 +@deffnx {} BFD_RELOC_SH_GOTPLT_HI16 +@deffnx {} BFD_RELOC_SH_PLT_LOW16 +@deffnx {} BFD_RELOC_SH_PLT_MEDLOW16 +@deffnx {} BFD_RELOC_SH_PLT_MEDHI16 +@deffnx {} BFD_RELOC_SH_PLT_HI16 +@deffnx {} BFD_RELOC_SH_GOTOFF_LOW16 +@deffnx {} BFD_RELOC_SH_GOTOFF_MEDLOW16 +@deffnx {} BFD_RELOC_SH_GOTOFF_MEDHI16 +@deffnx {} BFD_RELOC_SH_GOTOFF_HI16 +@deffnx {} BFD_RELOC_SH_GOTPC_LOW16 +@deffnx {} BFD_RELOC_SH_GOTPC_MEDLOW16 +@deffnx {} BFD_RELOC_SH_GOTPC_MEDHI16 +@deffnx {} BFD_RELOC_SH_GOTPC_HI16 +@deffnx {} BFD_RELOC_SH_COPY64 +@deffnx {} BFD_RELOC_SH_GLOB_DAT64 +@deffnx {} BFD_RELOC_SH_JMP_SLOT64 +@deffnx {} BFD_RELOC_SH_RELATIVE64 +@deffnx {} BFD_RELOC_SH_GOT10BY4 +@deffnx {} BFD_RELOC_SH_GOT10BY8 +@deffnx {} BFD_RELOC_SH_GOTPLT10BY4 +@deffnx {} BFD_RELOC_SH_GOTPLT10BY8 +@deffnx {} BFD_RELOC_SH_GOTPLT32 +@deffnx {} BFD_RELOC_SH_SHMEDIA_CODE +@deffnx {} BFD_RELOC_SH_IMMU5 +@deffnx {} BFD_RELOC_SH_IMMS6 +@deffnx {} BFD_RELOC_SH_IMMS6BY32 +@deffnx {} BFD_RELOC_SH_IMMU6 +@deffnx {} BFD_RELOC_SH_IMMS10 +@deffnx {} BFD_RELOC_SH_IMMS10BY2 +@deffnx {} BFD_RELOC_SH_IMMS10BY4 +@deffnx {} BFD_RELOC_SH_IMMS10BY8 +@deffnx {} BFD_RELOC_SH_IMMS16 +@deffnx {} BFD_RELOC_SH_IMMU16 +@deffnx {} BFD_RELOC_SH_IMM_LOW16 +@deffnx {} BFD_RELOC_SH_IMM_LOW16_PCREL +@deffnx {} BFD_RELOC_SH_IMM_MEDLOW16 +@deffnx {} BFD_RELOC_SH_IMM_MEDLOW16_PCREL +@deffnx {} BFD_RELOC_SH_IMM_MEDHI16 +@deffnx {} BFD_RELOC_SH_IMM_MEDHI16_PCREL +@deffnx {} BFD_RELOC_SH_IMM_HI16 +@deffnx {} BFD_RELOC_SH_IMM_HI16_PCREL +@deffnx {} BFD_RELOC_SH_PT_16 Hitachi SH relocs. Not all of these appear in object files. @end deffn @deffn {} BFD_RELOC_THUMB_PCREL_BRANCH9 diff -Nur binutils-2.12/bfd/dwarf2.c binutils-2.12.1/bfd/dwarf2.c --- binutils-2.12/bfd/dwarf2.c Wed Jan 30 05:28:47 2002 +++ binutils-2.12.1/bfd/dwarf2.c Thu May 9 10:48:54 2002 @@ -42,7 +42,7 @@ { bfd_vma total_length; unsigned short version; - unsigned int prologue_length; + bfd_vma prologue_length; unsigned char minimum_instruction_length; unsigned char default_is_stmt; int line_base; @@ -225,7 +225,7 @@ static struct abbrev_info *lookup_abbrev PARAMS ((unsigned int, struct abbrev_info **)); static struct abbrev_info **read_abbrevs - PARAMS ((bfd *, unsigned int, struct dwarf2_debug *)); + PARAMS ((bfd *, bfd_vma, struct dwarf2_debug *)); static char *read_attribute PARAMS ((struct attribute *, struct attr_abbrev *, struct comp_unit *, char *)); @@ -240,9 +240,10 @@ static struct line_info_table *decode_line_info PARAMS ((struct comp_unit *, struct dwarf2_debug *)); static boolean lookup_address_in_line_info_table - PARAMS ((struct line_info_table *, bfd_vma, const char **, unsigned int *)); + PARAMS ((struct line_info_table *, bfd_vma, struct funcinfo *, + const char **, unsigned int *)); static boolean lookup_address_in_function_table - PARAMS ((struct funcinfo *, bfd_vma, const char **)); + PARAMS ((struct funcinfo *, bfd_vma, struct funcinfo **, const char **)); static boolean scan_unit_for_functions PARAMS ((struct comp_unit *)); static bfd_vma find_rela_addend PARAMS ((bfd *, asection *, bfd_size_type, asymbol**)); @@ -395,8 +396,8 @@ if (offset >= stash->dwarf_str_size) { - (*_bfd_error_handler) (_("Dwarf Error: DW_FORM_strp offset (%u) greater than or equal to .debug_str size (%u)."), - offset, stash->dwarf_str_size); + (*_bfd_error_handler) (_("Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)."), + (unsigned long) offset, stash->dwarf_str_size); bfd_set_error (bfd_error_bad_value); return NULL; } @@ -522,7 +523,7 @@ static struct abbrev_info** read_abbrevs (abfd, offset, stash) bfd * abfd; - unsigned int offset; + bfd_vma offset; struct dwarf2_debug *stash; { struct abbrev_info **abbrevs; @@ -556,8 +557,8 @@ if (offset >= stash->dwarf_abbrev_size) { - (*_bfd_error_handler) (_("Dwarf Error: Abbrev offset (%u) greater than or equal to .debug_abbrev size (%u)."), - offset, stash->dwarf_abbrev_size); + (*_bfd_error_handler) (_("Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."), + (unsigned long) offset, stash->dwarf_abbrev_size); bfd_set_error (bfd_error_bad_value); return 0; } @@ -753,7 +754,7 @@ info_ptr = read_attribute_value (attr, form, unit, info_ptr); break; default: - (*_bfd_error_handler) (_("Dwarf Error: Invalid or unhandled FORM value: %d."), + (*_bfd_error_handler) (_("Dwarf Error: Invalid or unhandled FORM value: %u."), form); bfd_set_error (bfd_error_bad_value); } @@ -808,6 +809,14 @@ struct line_info* last_line; }; +struct funcinfo +{ + struct funcinfo *prev_func; + char* name; + bfd_vma low; + bfd_vma high; +}; + static void add_line_info (table, address, filename, line, column, end_sequence) struct line_info_table* table; @@ -949,7 +958,7 @@ below. */ if (unit->line_offset >= stash->dwarf_line_size) { - (*_bfd_error_handler) (_("Dwarf Error: Line offset (%u) greater than or equal to .debug_line size (%u)."), + (*_bfd_error_handler) (_("Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)."), unit->line_offset, stash->dwarf_line_size); bfd_set_error (bfd_error_bad_value); return 0; @@ -1215,10 +1224,12 @@ static boolean lookup_address_in_line_info_table (table, addr, + function, filename_ptr, linenumber_ptr) struct line_info_table* table; bfd_vma addr; + struct funcinfo *function; const char **filename_ptr; unsigned int *linenumber_ptr; { @@ -1235,35 +1246,53 @@ if (!each_line->end_sequence && addr >= each_line->address && addr < next_line->address) { - *filename_ptr = each_line->filename; - *linenumber_ptr = each_line->line; + /* If this line appears to span functions, and addr is in the + later function, return the first line of that function instead + of the last line of the earlier one. This check is for GCC + 2.95, which emits the first line number for a function late. */ + if (function != NULL + && each_line->address < function->low + && next_line->address > function->low) + { + *filename_ptr = next_line->filename; + *linenumber_ptr = next_line->line; + } + else + { + *filename_ptr = each_line->filename; + *linenumber_ptr = each_line->line; + } return true; } next_line = each_line; each_line = each_line->prev_line; } + /* At this point each_line is NULL but next_line is not. If we found the + containing function in this compilation unit, return the first line we + have a number for. This is also for compatibility with GCC 2.95. */ + if (function != NULL) + { + *filename_ptr = next_line->filename; + *linenumber_ptr = next_line->line; + return true; + } + return false; } /* Function table functions. */ -struct funcinfo -{ - struct funcinfo *prev_func; - char* name; - bfd_vma low; - bfd_vma high; -}; - /* If ADDR is within TABLE, set FUNCTIONNAME_PTR, and return true. */ static boolean lookup_address_in_function_table (table, addr, + function_ptr, functionname_ptr) struct funcinfo* table; bfd_vma addr; + struct funcinfo** function_ptr; const char **functionname_ptr; { struct funcinfo* each_func; @@ -1275,6 +1304,7 @@ if (addr >= each_func->low && addr < each_func->high) { *functionname_ptr = each_func->name; + *function_ptr = each_func; return true; } } @@ -1315,7 +1345,7 @@ abbrev = lookup_abbrev (abbrev_number,unit->abbrevs); if (! abbrev) { - (*_bfd_error_handler) (_("Dwarf Error: Could not find abbrev number %d."), + (*_bfd_error_handler) (_("Dwarf Error: Could not find abbrev number %u."), abbrev_number); bfd_set_error (bfd_error_bad_value); return false; @@ -1456,9 +1486,9 @@ unsigned int offset_size; { struct comp_unit* unit; - unsigned short version; - unsigned int abbrev_offset = 0; - unsigned char addr_size; + unsigned int version; + bfd_vma abbrev_offset = 0; + unsigned int addr_size; struct abbrev_info** abbrevs; unsigned int abbrev_number, bytes_read, i; struct abbrev_info *abbrev; @@ -1487,7 +1517,7 @@ if (version != 2) { - (*_bfd_error_handler) (_("Dwarf Error: found dwarf version '%hu', this reader only handles version 2 information."), version); + (*_bfd_error_handler) (_("Dwarf Error: found dwarf version '%u', this reader only handles version 2 information."), version); bfd_set_error (bfd_error_bad_value); return 0; } @@ -1496,7 +1526,7 @@ { (*_bfd_error_handler) (_("Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."), addr_size, - sizeof (bfd_vma)); + (unsigned int) sizeof (bfd_vma)); bfd_set_error (bfd_error_bad_value); return 0; } @@ -1517,7 +1547,7 @@ info_ptr += bytes_read; if (! abbrev_number) { - (*_bfd_error_handler) (_("Dwarf Error: Bad abbrev number: %d."), + (*_bfd_error_handler) (_("Dwarf Error: Bad abbrev number: %u."), abbrev_number); bfd_set_error (bfd_error_bad_value); return 0; @@ -1526,7 +1556,7 @@ abbrev = lookup_abbrev (abbrev_number, abbrevs); if (! abbrev) { - (*_bfd_error_handler) (_("Dwarf Error: Could not find abbrev number %d."), + (*_bfd_error_handler) (_("Dwarf Error: Could not find abbrev number %u."), abbrev_number); bfd_set_error (bfd_error_bad_value); return 0; @@ -1636,6 +1666,7 @@ { boolean line_p; boolean func_p; + struct funcinfo *function; if (unit->error) return false; @@ -1664,13 +1695,16 @@ } } + function = NULL; + func_p = lookup_address_in_function_table (unit->function_table, + addr, + &function, + functionname_ptr); line_p = lookup_address_in_line_info_table (unit->line_table, addr, + function, filename_ptr, linenumber_ptr); - func_p = lookup_address_in_function_table (unit->function_table, - addr, - functionname_ptr); return line_p || func_p; } diff -Nur binutils-2.12/bfd/ecoff.c binutils-2.12.1/bfd/ecoff.c --- binutils-2.12/bfd/ecoff.c Wed Oct 10 08:08:28 2001 +++ binutils-2.12.1/bfd/ecoff.c Thu Apr 4 11:20:31 2002 @@ -1,5 +1,5 @@ /* Generic ECOFF (Extended-COFF) routines. - Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 + Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Original version by Per Bothner. Full support added by Ian Lance Taylor, ian@cygnus.com. @@ -4393,6 +4393,13 @@ bfd *output_bfd = einfo->abfd; boolean strip; + if (h->root.type == bfd_link_hash_warning) + { + h = (struct ecoff_link_hash_entry *) h->root.u.i.link; + if (h->root.type == bfd_link_hash_new) + return true; + } + /* We need to check if this symbol is being stripped. */ if (h->root.type == bfd_link_hash_undefined || h->root.type == bfd_link_hash_undefweak) @@ -4474,6 +4481,7 @@ switch (h->root.type) { default: + case bfd_link_hash_warning: case bfd_link_hash_new: abort (); case bfd_link_hash_undefined: @@ -4502,9 +4510,8 @@ h->esym.asym.value = h->root.u.c.size; break; case bfd_link_hash_indirect: - case bfd_link_hash_warning: - /* FIXME: Ignore these for now. The circumstances under which - they should be written out are not clear to me. */ + /* We ignore these symbols, since the indirected symbol is + already in the hash table. */ return true; } diff -Nur binutils-2.12/bfd/elf-bfd.h binutils-2.12.1/bfd/elf-bfd.h --- binutils-2.12/bfd/elf-bfd.h Mon Jan 21 05:29:07 2002 +++ binutils-2.12.1/bfd/elf-bfd.h Thu May 9 10:48:54 2002 @@ -788,6 +788,11 @@ section. */ unsigned default_use_rela_p : 1; + /* Set if RELA relocations for a relocatable link can be handled by + generic code. Backends that set this flag need do nothing in the + backend relocate_section routine for relocatable linking. */ + unsigned rela_normal : 1; + /* True if addresses "naturally" sign extend. This is used when swapping in from Elf32 when BFD64. */ unsigned sign_extend_vma : 1; @@ -1531,6 +1536,8 @@ PARAMS ((bfd *, char *, int *, void *, int)); extern char *elfcore_write_prxfpreg PARAMS ((bfd *, char *, int *, void *, int)); +extern char *elfcore_write_lwpstatus + PARAMS ((bfd*, char*, int*, long, int, void*)); /* MIPS ELF specific routines. */ diff -Nur binutils-2.12/bfd/elf-eh-frame.c binutils-2.12.1/bfd/elf-eh-frame.c --- binutils-2.12/bfd/elf-eh-frame.c Tue Feb 19 08:10:18 2002 +++ binutils-2.12.1/bfd/elf-eh-frame.c Fri Apr 26 10:24:38 2002 @@ -64,6 +64,7 @@ unsigned char removed : 1; unsigned char make_relative : 1; unsigned char make_lsda_relative : 1; + unsigned char per_encoding_relative : 1; }; struct eh_frame_sec_info @@ -469,6 +470,8 @@ = cie.make_relative; sec_info->entry[last_cie_ndx].make_lsda_relative = cie.make_lsda_relative; + sec_info->entry[last_cie_ndx].per_encoding_relative + = (cie.per_encoding & 0x70) == DW_EH_PE_pcrel; } } @@ -633,8 +636,9 @@ else { if (info->shared - && (cie.fde_encoding & 0xf0) == DW_EH_PE_absptr - && cie.make_relative == 0) + && (((cie.fde_encoding & 0xf0) == DW_EH_PE_absptr + && cie.make_relative == 0) + || (cie.fde_encoding & 0xf0) == DW_EH_PE_aligned)) { /* If shared library uses absolute pointers which we cannot turn into PC relative, @@ -689,6 +693,7 @@ { sec_info->entry[i].make_relative = make_relative; sec_info->entry[i].make_lsda_relative = make_lsda_relative; + sec_info->entry[i].per_encoding_relative = 0; } } else if (sec_info->entry[i].cie && sec_info->entry[i].sec == sec) @@ -947,7 +952,8 @@ /* CIE */ cie_offset = sec_info->entry[i].new_offset; if (sec_info->entry[i].make_relative - || sec_info->entry[i].make_lsda_relative) + || sec_info->entry[i].make_lsda_relative + || sec_info->entry[i].per_encoding_relative) { unsigned char *aug; unsigned int action; @@ -956,7 +962,8 @@ /* Need to find 'R' or 'L' augmentation's argument and modify DW_EH_PE_* value. */ action = (sec_info->entry[i].make_relative ? 1 : 0) - | (sec_info->entry[i].make_lsda_relative ? 2 : 0); + | (sec_info->entry[i].make_lsda_relative ? 2 : 0) + | (sec_info->entry[i].per_encoding_relative ? 4 : 0); buf = contents + sec_info->entry[i].offset; /* Skip length, id and version. */ buf += 9; @@ -988,10 +995,22 @@ per_width = get_DW_EH_PE_width (per_encoding, ptr_size); BFD_ASSERT (per_width != 0); + BFD_ASSERT (((per_encoding & 0x70) == DW_EH_PE_pcrel) + == sec_info->entry[i].per_encoding_relative); if ((per_encoding & 0xf0) == DW_EH_PE_aligned) buf = (contents + ((buf - contents + per_width - 1) & ~((bfd_size_type) per_width - 1))); + if (action & 4) + { + bfd_vma value; + + value = read_value (abfd, buf, per_width); + value += (sec_info->entry[i].offset + - sec_info->entry[i].new_offset); + write_value (abfd, buf, value, per_width); + action &= ~4; + } buf += per_width; break; case 'R': @@ -1008,7 +1027,7 @@ } } } - else + else if (sec_info->entry[i].size > 4) { /* FDE */ bfd_vma value = 0, address; @@ -1081,6 +1100,9 @@ } } } + else + /* Terminating FDE must be at the end of .eh_frame section only. */ + BFD_ASSERT (i == sec_info->count - 1); BFD_ASSERT (p == contents + sec_info->entry[i].new_offset); memmove (p, contents + sec_info->entry[i].offset, diff -Nur binutils-2.12/bfd/elf-hppa.h binutils-2.12.1/bfd/elf-hppa.h --- binutils-2.12/bfd/elf-hppa.h Sun Feb 17 18:12:07 2002 +++ binutils-2.12.1/bfd/elf-hppa.h Thu May 9 10:48:54 2002 @@ -64,6 +64,12 @@ static void elf_hppa_final_write_processing PARAMS ((bfd *, boolean)); +static int hppa_unwind_entry_compare + PARAMS ((const PTR, const PTR)); + +static boolean elf_hppa_sort_unwind + PARAMS ((bfd *)); + #if ARCH_SIZE == 64 static boolean elf_hppa_add_symbol_hook PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *, @@ -75,6 +81,9 @@ static boolean elf_hppa_remark_useless_dynamic_symbols PARAMS ((struct elf_link_hash_entry *, PTR)); +static boolean elf_hppa_is_dynamic_loader_symbol + PARAMS ((const char *)); + static void elf_hppa_record_segment_addrs PARAMS ((bfd *, asection *, PTR)); @@ -83,12 +92,12 @@ static boolean elf_hppa_relocate_section PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, - bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); + bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); static bfd_reloc_status_type elf_hppa_final_link_relocate PARAMS ((Elf_Internal_Rela *, bfd *, bfd *, asection *, - bfd_byte *, bfd_vma, struct bfd_link_info *, - asection *, struct elf_link_hash_entry *, + bfd_byte *, bfd_vma, struct bfd_link_info *, + asection *, struct elf_link_hash_entry *, struct elf64_hppa_dyn_hash_entry *)); static int elf_hppa_relocate_insn @@ -706,7 +715,7 @@ be a section relative relocation. Dwarf2 (for example) uses 32bit section relative relocations. */ if (bfd_get_arch_info (abfd)->bits_per_address != 32) - final_type = R_PARISC_SECREL32; + final_type = R_PARISC_SECREL32; break; case e_psel: final_type = R_PARISC_PLABEL32; @@ -1034,6 +1043,64 @@ | EF_PARISC_TRAPNIL); } +/* Comparison function for qsort to sort unwind section during a + final link. */ + +static int +hppa_unwind_entry_compare (a, b) + const PTR a; + const PTR b; +{ + const bfd_byte *ap, *bp; + unsigned long av, bv; + + ap = (const bfd_byte *) a; + av = (unsigned long) ap[0] << 24; + av |= (unsigned long) ap[1] << 16; + av |= (unsigned long) ap[2] << 8; + av |= (unsigned long) ap[3]; + + bp = (const bfd_byte *) b; + bv = (unsigned long) bp[0] << 24; + bv |= (unsigned long) bp[1] << 16; + bv |= (unsigned long) bp[2] << 8; + bv |= (unsigned long) bp[3]; + + return av < bv ? -1 : av > bv ? 1 : 0; +} + +static boolean elf_hppa_sort_unwind (abfd) + bfd *abfd; +{ + asection *s; + + /* Magic section names, but this is much safer than having + relocate_section remember where SEGREL32 relocs occurred. + Consider what happens if someone inept creates a linker script + that puts unwind information in .text. */ + s = bfd_get_section_by_name (abfd, ".PARISC.unwind"); + if (s != NULL) + { + bfd_size_type size; + char *contents; + + size = s->_raw_size; + contents = bfd_malloc (size); + if (contents == NULL) + return false; + + if (! bfd_get_section_contents (abfd, s, contents, (file_ptr) 0, size)) + return false; + + qsort (contents, (size_t) (size / 16), 16, hppa_unwind_entry_compare); + + if (! bfd_set_section_contents (abfd, s, contents, (file_ptr) 0, size)) + return false; + } + + return true; +} + #if ARCH_SIZE == 64 /* Hook called by the linker routine which adds symbols from an object file. HP's libraries define symbols with HP specific section @@ -1076,6 +1143,9 @@ { struct bfd_link_info *info = (struct bfd_link_info *)data; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + /* If we are not creating a shared library, and this symbol is referenced by a shared library but is not defined anywhere, then the generic code will warn that it is undefined. @@ -1109,6 +1179,9 @@ { struct bfd_link_info *info = (struct bfd_link_info *)data; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + /* If we are not creating a shared library, and this symbol is referenced by a shared library but is not defined anywhere, then the generic code will warn that it is undefined. @@ -1136,6 +1209,23 @@ return true; } +static boolean +elf_hppa_is_dynamic_loader_symbol (name) + const char * name; +{ + return (! strcmp (name, "__CPU_REVISION") + || ! strcmp (name, "__CPU_KEYBITS_1") + || ! strcmp (name, "__SYSTEM_ID_D") + || ! strcmp (name, "__FPU_MODEL") + || ! strcmp (name, "__FPU_REVISION") + || ! strcmp (name, "__ARGC") + || ! strcmp (name, "__ARGV") + || ! strcmp (name, "__ENVP") + || ! strcmp (name, "__TLS_SIZE_D") + || ! strcmp (name, "__LOAD_INFO") + || ! strcmp (name, "__systab")); +} + /* Record the lowest address for the data and text segments. */ static void elf_hppa_record_segment_addrs (abfd, section, data) @@ -1258,6 +1348,11 @@ elf_hppa_remark_useless_dynamic_symbols, info); + /* If we're producing a final executable, sort the contents of the + unwind section. */ + if (retval) + retval = elf_hppa_sort_unwind (abfd); + return retval; } @@ -1390,7 +1485,7 @@ relocation = 0; } /* Allow undefined symbols in shared libraries. */ - else if (info->shared && !info->no_undefined + else if (info->shared && !info->no_undefined && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) { if (info->symbolic) @@ -1419,11 +1514,17 @@ relocation = 0; else { - if (!((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, true))) - return false; - break; + /* Ignore dynamic loader defined symbols. */ + if (elf_hppa_is_dynamic_loader_symbol (h->root.root.string)) + relocation = 0; + else + { + if (!((*info->callbacks->undefined_symbol) + (info, h->root.root.string, input_bfd, + input_section, rel->r_offset, true))) + return false; + break; + } } } @@ -1620,11 +1721,7 @@ a local function which had its address taken. */ if (dyn_h->h == NULL) { - bfd_put_64 (hppa_info->dlt_sec->owner, - value, - hppa_info->dlt_sec->contents + dyn_h->dlt_offset); - - /* Now handle .opd creation if needed. */ + /* Now do .opd creation if needed. */ if (r_type == R_PARISC_LTOFF_FPTR14R || r_type == R_PARISC_LTOFF_FPTR14DR || r_type == R_PARISC_LTOFF_FPTR14WR @@ -1638,7 +1735,7 @@ 0, 16); /* The next word is the address of the function. */ - bfd_put_64 (hppa_info->opd_sec->owner, value, + bfd_put_64 (hppa_info->opd_sec->owner, value + addend, (hppa_info->opd_sec->contents + dyn_h->opd_offset + 16)); @@ -1648,7 +1745,17 @@ bfd_put_64 (hppa_info->opd_sec->owner, value, (hppa_info->opd_sec->contents + dyn_h->opd_offset + 24)); + + /* The DLT value is the address of the .opd entry. */ + value = (dyn_h->opd_offset + + hppa_info->opd_sec->output_offset + + hppa_info->opd_sec->output_section->vma); + addend = 0; } + + bfd_put_64 (hppa_info->dlt_sec->owner, + value + addend, + hppa_info->dlt_sec->contents + dyn_h->dlt_offset); } /* We want the value of the DLT offset for this symbol, not @@ -1666,7 +1773,7 @@ if (r_type == R_PARISC_DLTIND21L || r_type == R_PARISC_LTOFF_FPTR21L || r_type == R_PARISC_LTOFF_TP21L) - value = hppa_field_adjust (value, addend, e_lrsel); + value = hppa_field_adjust (value, 0, e_lsel); else if (r_type == R_PARISC_DLTIND14F || r_type == R_PARISC_LTOFF_FPTR16F || r_type == R_PARISC_LTOFF_FPTR16WF @@ -1677,9 +1784,9 @@ || r_type == R_PARISC_LTOFF_TP16F || r_type == R_PARISC_LTOFF_TP16WF || r_type == R_PARISC_LTOFF_TP16DF) - value = hppa_field_adjust (value, addend, e_fsel); + value = hppa_field_adjust (value, 0, e_fsel); else - value = hppa_field_adjust (value, addend, e_rrsel); + value = hppa_field_adjust (value, 0, e_rsel); insn = elf_hppa_relocate_insn (insn, (int) value, r_type); break; @@ -1804,7 +1911,7 @@ memset (hppa_info->opd_sec->contents + dyn_h->opd_offset, 0, 16); /* The next word is the address of the function. */ - bfd_put_64 (hppa_info->opd_sec->owner, value, + bfd_put_64 (hppa_info->opd_sec->owner, value + addend, (hppa_info->opd_sec->contents + dyn_h->opd_offset + 16)); @@ -1813,6 +1920,15 @@ (hppa_info->opd_sec->output_section->owner); bfd_put_64 (hppa_info->opd_sec->owner, value, hppa_info->opd_sec->contents + dyn_h->opd_offset + 24); + + /* The DLT value is the address of the .opd entry. */ + value = (dyn_h->opd_offset + + hppa_info->opd_sec->output_offset + + hppa_info->opd_sec->output_section->vma); + + bfd_put_64 (hppa_info->dlt_sec->owner, + value, + hppa_info->dlt_sec->contents + dyn_h->dlt_offset); } /* We want the value of the DLT offset for this symbol, not @@ -1838,7 +1954,7 @@ memset (hppa_info->opd_sec->contents + dyn_h->opd_offset, 0, 16); /* The next word is the address of the function. */ - bfd_put_64 (hppa_info->opd_sec->owner, value, + bfd_put_64 (hppa_info->opd_sec->owner, value + addend, (hppa_info->opd_sec->contents + dyn_h->opd_offset + 16)); @@ -1847,6 +1963,15 @@ (hppa_info->opd_sec->output_section->owner); bfd_put_64 (hppa_info->opd_sec->owner, value, hppa_info->opd_sec->contents + dyn_h->opd_offset + 24); + + /* The DLT value is the address of the .opd entry. */ + value = (dyn_h->opd_offset + + hppa_info->opd_sec->output_offset + + hppa_info->opd_sec->output_section->vma); + + bfd_put_64 (hppa_info->dlt_sec->owner, + value, + hppa_info->dlt_sec->contents + dyn_h->dlt_offset); } /* We want the value of the DLT offset for this symbol, not @@ -1938,7 +2063,7 @@ memset (hppa_info->opd_sec->contents + dyn_h->opd_offset, 0, 16); /* The next word is the address of the function. */ - bfd_put_64 (hppa_info->opd_sec->owner, value, + bfd_put_64 (hppa_info->opd_sec->owner, value + addend, (hppa_info->opd_sec->contents + dyn_h->opd_offset + 16)); @@ -1950,12 +2075,12 @@ } /* We want the value of the OPD offset for this symbol, not - the symbol's actual address. */ + the symbol's actual address. */ value = (dyn_h->opd_offset + hppa_info->opd_sec->output_offset + hppa_info->opd_sec->output_section->vma); - bfd_put_64 (input_bfd, value + addend, hit_data); + bfd_put_64 (input_bfd, value, hit_data); return bfd_reloc_ok; } @@ -1991,7 +2116,7 @@ bfd_put_32 (input_bfd, value, hit_data); else bfd_put_64 (input_bfd, value, hit_data); - return bfd_reloc_ok; + return bfd_reloc_ok; } /* Something we don't know how to handle. */ diff -Nur binutils-2.12/bfd/elf-m10200.c binutils-2.12.1/bfd/elf-m10200.c --- binutils-2.12/bfd/elf-m10200.c Sun Dec 16 19:52:34 2001 +++ binutils-2.12.1/bfd/elf-m10200.c Thu May 9 10:48:54 2002 @@ -1,5 +1,5 @@ /* Matsushita 10200 specific support for 32-bit ELF - Copyright 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -347,6 +347,9 @@ struct elf_link_hash_entry **sym_hashes; Elf_Internal_Rela *rel, *relend; + if (info->relocateable) + return true; + symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); @@ -367,26 +370,6 @@ r_type = ELF32_R_TYPE (rel->r_info); howto = elf_mn10200_howto_table + r_type; - if (info->relocateable) - { - /* This is a relocateable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sec = local_sections[r_symndx]; - rel->r_addend += sec->output_offset + sym->st_value; - } - } - - continue; - } - - /* This is a final link. */ h = NULL; sym = NULL; sec = NULL; @@ -1572,6 +1555,7 @@ #define ELF_MACHINE_ALT1 EM_CYGNUS_MN10200 #define ELF_MAXPAGESIZE 0x1000 +#define elf_backend_rela_normal 1 #define elf_info_to_howto mn10200_info_to_howto #define elf_info_to_howto_rel 0 #define elf_backend_relocate_section mn10200_elf_relocate_section diff -Nur binutils-2.12/bfd/elf-m10300.c binutils-2.12.1/bfd/elf-m10300.c --- binutils-2.12/bfd/elf-m10300.c Tue Feb 12 04:24:00 2002 +++ binutils-2.12.1/bfd/elf-m10300.c Thu May 9 10:48:54 2002 @@ -551,6 +551,9 @@ struct elf32_mn10300_link_hash_entry **sym_hashes; Elf_Internal_Rela *rel, *relend; + if (info->relocateable) + return true; + symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; sym_hashes = (struct elf32_mn10300_link_hash_entry **) (elf_sym_hashes (input_bfd)); @@ -577,26 +580,6 @@ || r_type == R_MN10300_GNU_VTENTRY) continue; - if (info->relocateable) - { - /* This is a relocateable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sec = local_sections[r_symndx]; - rel->r_addend += sec->output_offset + sym->st_value; - } - } - - continue; - } - - /* This is a final link. */ h = NULL; sym = NULL; sec = NULL; @@ -709,6 +692,9 @@ entry = (struct elf32_mn10300_link_hash_entry *) gen_entry; + if (entry->root.root.type == bfd_link_hash_warning) + entry = (struct elf32_mn10300_link_hash_entry *) entry->root.root.u.i.link; + /* If we already know we want to convert "call" to "calls" for calls to this symbol, then return now. */ if (entry->flags == MN10300_CONVERT_CALL_TO_CALLS) @@ -3081,6 +3067,7 @@ #define elf_info_to_howto mn10300_info_to_howto #define elf_info_to_howto_rel 0 #define elf_backend_can_gc_sections 1 +#define elf_backend_rela_normal 1 #define elf_backend_check_relocs mn10300_elf_check_relocs #define elf_backend_gc_mark_hook mn10300_elf_gc_mark_hook #define elf_backend_relocate_section mn10300_elf_relocate_section diff -Nur binutils-2.12/bfd/elf.c binutils-2.12.1/bfd/elf.c --- binutils-2.12/bfd/elf.c Wed Feb 13 23:12:45 2002 +++ binutils-2.12.1/bfd/elf.c Thu May 9 10:48:54 2002 @@ -652,27 +652,44 @@ offset plus size lies within the segment's memory span and, if the section is loaded, the extent of the loaded data lies within the extent of the segment. - If the p_paddr field is not set, we don't alter the - LMA. */ + + Note - we used to check the p_paddr field as well, and + refuse to set the LMA if it was 0. This is wrong + though, as a perfectly valid initialised segment can + have a p_paddr of zero. Some architectures, eg ARM, + place special significance on the address 0 and + executables need to be able to have a segment which + covers this address. */ if (phdr->p_type == PT_LOAD - && phdr->p_paddr && (bfd_vma) hdr->sh_offset >= phdr->p_offset && (hdr->sh_offset + hdr->sh_size <= phdr->p_offset + phdr->p_memsz) && ((flags & SEC_LOAD) == 0 - || (phdr->p_offset + phdr->p_filesz - >= hdr->sh_offset + hdr->sh_size))) + || (hdr->sh_offset + hdr->sh_size + <= phdr->p_offset + phdr->p_filesz))) { - /* We used to do a relative adjustment here, but - that doesn't work if the segment is packed with - code from multiple VMAs. Instead we calculate - the LMA absoultely, based on the LMA of the - segment (it is assumed that the segment will - contain sections with contiguous LMAs, even if - the VMAs are not). */ - newsect->lma = phdr->p_paddr - + hdr->sh_offset - phdr->p_offset; - break; + if ((flags & SEC_LOAD) == 0) + newsect->lma = (phdr->p_paddr + + hdr->sh_addr - phdr->p_vaddr); + else + /* We used to use the same adjustment for SEC_LOAD + sections, but that doesn't work if the segment + is packed with code from multiple VMAs. + Instead we calculate the section LMA based on + the segment LMA. It is assumed that the + segment will contain sections with contiguous + LMAs, even if the VMAs are not. */ + newsect->lma = (phdr->p_paddr + + hdr->sh_offset - phdr->p_offset); + + /* With contiguous segments, we can't tell from file + offsets whether a section with zero size should + be placed at the end of one segment or the + beginning of the next. Decide based on vaddr. */ + if (hdr->sh_addr >= phdr->p_vaddr + && (hdr->sh_addr + hdr->sh_size + <= phdr->p_vaddr + phdr->p_memsz)) + break; } } } @@ -1558,6 +1575,9 @@ case SHT_NOBITS: /* .bss section. */ case SHT_HASH: /* .hash section. */ case SHT_NOTE: /* .note section. */ + case SHT_INIT_ARRAY: /* .init_array section. */ + case SHT_FINI_ARRAY: /* .fini_array section. */ + case SHT_PREINIT_ARRAY: /* .preinit_array section. */ return _bfd_elf_make_section_from_shdr (abfd, hdr, name); case SHT_SYMTAB: /* A symbol table */ @@ -2172,6 +2192,12 @@ this_hdr->sh_type = SHT_REL; this_hdr->sh_entsize = bed->s->sizeof_rel; } + else if (strcmp (asect->name, ".init_array") == 0) + this_hdr->sh_type = SHT_INIT_ARRAY; + else if (strcmp (asect->name, ".fini_array") == 0) + this_hdr->sh_type = SHT_FINI_ARRAY; + else if (strcmp (asect->name, ".preinit_array") == 0) + this_hdr->sh_type = SHT_PREINIT_ARRAY; else if (strncmp (asect->name, ".note", 5) == 0) this_hdr->sh_type = SHT_NOTE; else if (strncmp (asect->name, ".stab", 5) == 0 @@ -3855,7 +3881,6 @@ Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */ Elf_Internal_Phdr *i_phdrp = 0; /* Program header table, internal form */ Elf_Internal_Shdr **i_shdrp; /* Section header table, internal form */ - int count; struct elf_strtab_hash *shstrtab; struct elf_backend_data *bed = get_elf_backend_data (abfd); @@ -3878,12 +3903,6 @@ bfd_big_endian (abfd) ? ELFDATA2MSB : ELFDATA2LSB; i_ehdrp->e_ident[EI_VERSION] = bed->s->ev_current; - i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_NONE; - i_ehdrp->e_ident[EI_ABIVERSION] = 0; - - for (count = EI_PAD; count < EI_NIDENT; count++) - i_ehdrp->e_ident[count] = 0; - if ((abfd->flags & DYNAMIC) != 0) i_ehdrp->e_type = ET_DYN; else if ((abfd->flags & EXEC_P) != 0) @@ -5096,7 +5115,9 @@ Elf_Internal_Shdr *hdr = &elf_tdata (abfd)->symtab_hdr; symcount = hdr->sh_size / get_elf_backend_data (abfd)->s->sizeof_sym; - symtab_size = (symcount - 1 + 1) * (sizeof (asymbol *)); + symtab_size = (symcount + 1) * (sizeof (asymbol *)); + if (symcount > 0) + symtab_size -= sizeof (asymbol *); return symtab_size; } @@ -5116,7 +5137,9 @@ } symcount = hdr->sh_size / get_elf_backend_data (abfd)->s->sizeof_sym; - symtab_size = (symcount - 1 + 1) * (sizeof (asymbol *)); + symtab_size = (symcount + 1) * (sizeof (asymbol *)); + if (symcount > 0) + symtab_size -= sizeof (asymbol *); return symtab_size; } @@ -6149,6 +6172,8 @@ #endif /* defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T) */ #if defined (HAVE_PSTATUS_T) +static boolean elfcore_grok_pstatus PARAMS ((bfd *, Elf_Internal_Note *)); + static boolean elfcore_grok_pstatus (abfd, note) bfd *abfd; @@ -6186,6 +6211,8 @@ #endif /* defined (HAVE_PSTATUS_T) */ #if defined (HAVE_LWPSTATUS_T) +static boolean elfcore_grok_lwpstatus PARAMS ((bfd *, Elf_Internal_Note *)); + static boolean elfcore_grok_lwpstatus (abfd, note) bfd *abfd; @@ -6416,7 +6443,7 @@ cp = strchr (note->namedata, '@'); if (cp != NULL) { - *lwpidp = atoi(cp); + *lwpidp = atoi(cp + 1); return true; } return false; @@ -6599,6 +6626,38 @@ } #endif /* HAVE_PRSTATUS_T */ +#if defined (HAVE_LWPSTATUS_T) +char * +elfcore_write_lwpstatus (abfd, buf, bufsiz, pid, cursig, gregs) + bfd *abfd; + char *buf; + int *bufsiz; + long pid; + int cursig; + void *gregs; +{ + lwpstatus_t lwpstat; + char *note_name = "CORE"; + + memset (&lwpstat, 0, sizeof (lwpstat)); + lwpstat.pr_lwpid = pid >> 16; + lwpstat.pr_cursig = cursig; +#if defined (HAVE_LWPSTATUS_T_PR_REG) + memcpy (lwpstat.pr_reg, gregs, sizeof (lwpstat.pr_reg)); +#elif defined (HAVE_LWPSTATUS_T_PR_CONTEXT) +#if !defined(gregs) + memcpy (lwpstat.pr_context.uc_mcontext.gregs, + gregs, sizeof (lwpstat.pr_context.uc_mcontext.gregs)); +#else + memcpy (lwpstat.pr_context.uc_mcontext.__gregs, + gregs, sizeof (lwpstat.pr_context.uc_mcontext.__gregs)); +#endif +#endif + return elfcore_write_note (abfd, buf, bufsiz, note_name, + NT_LWPSTATUS, &lwpstat, sizeof (lwpstat)); +} +#endif /* HAVE_LWPSTATUS_T */ + #if defined (HAVE_PSTATUS_T) char * elfcore_write_pstatus (abfd, buf, bufsiz, pid, cursig, gregs) @@ -6612,11 +6671,11 @@ pstatus_t pstat; char *note_name = "CORE"; - memset (&pstat, 0, sizeof (prstat)); - pstat.pr_pid = pid; - memcpy (pstat.pr_reg, gregs, sizeof (pstat.pr_reg)); - return elfcore_write_note (abfd, buf, bufsiz, - note_name, NT_PSTATUS, &pstat, sizeof (pstat)); + memset (&pstat, 0, sizeof (pstat)); + pstat.pr_pid = pid & 0xffff; + buf = elfcore_write_note (abfd, buf, bufsiz, note_name, + NT_PSTATUS, &pstat, sizeof (pstat)); + return buf; } #endif /* HAVE_PSTATUS_T */ diff -Nur binutils-2.12/bfd/elf32-arm.h binutils-2.12.1/bfd/elf32-arm.h --- binutils-2.12/bfd/elf32-arm.h Tue Feb 19 08:10:19 2002 +++ binutils-2.12.1/bfd/elf32-arm.h Thu May 9 10:48:55 2002 @@ -1390,7 +1390,7 @@ boolean overflow = false; bfd_vma upper_insn = bfd_get_16 (input_bfd, hit_data); bfd_vma lower_insn = bfd_get_16 (input_bfd, hit_data + 2); - bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1; + bfd_signed_vma reloc_signed_max = ((1 << (howto->bitsize - 1)) - 1) >> howto->rightshift; bfd_signed_vma reloc_signed_min = ~ reloc_signed_max; bfd_vma check; bfd_signed_vma signed_check; @@ -1560,6 +1560,12 @@ if (sgot == NULL) return bfd_reloc_notsupported; + /* If we are addressing a Thumb function, we need to adjust the + address by one, so that attempts to call the function pointer will + correctly interpret it as Thumb code. */ + if (sym_flags == STT_ARM_TFUNC) + value += 1; + /* Note that sgot->output_offset is not involved in this calculation. We always want the start of .got. If we define _GLOBAL_OFFSET_TABLE in a different way, as is @@ -1612,6 +1618,13 @@ off &= ~1; else { + /* If we are addressing a Thumb function, we need to + adjust the address by one, so that attempts to + call the function pointer will correctly + interpret it as Thumb code. */ + if (sym_flags == STT_ARM_TFUNC) + value |= 1; + bfd_put_32 (output_bfd, value, sgot->contents + off); h->got.offset |= 1; } @@ -1817,6 +1830,11 @@ Elf_Internal_Rela * relend; const char * name; +#ifndef USE_REL + if (info->relocateable) + return true; +#endif + symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); @@ -1849,6 +1867,7 @@ #endif howto = bfd_reloc.howto; +#ifdef USE_REL if (info->relocateable) { /* This is a relocateable link. We don't have to change @@ -1861,19 +1880,16 @@ if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) { sec = local_sections[r_symndx]; -#ifdef USE_REL arm_add_to_rel (input_bfd, contents + rel->r_offset, howto, (bfd_signed_vma) (sec->output_offset + sym->st_value)); -#else - rel->r_addend += (sec->output_offset + sym->st_value); -#endif } } continue; } +#endif /* This is a final link. */ h = NULL; @@ -3275,6 +3291,9 @@ { struct elf32_arm_pcrel_relocs_copied * s; + if (h->root.root.type == bfd_link_hash_warning) + h = (struct elf32_arm_link_hash_entry *) h->root.root.u.i.link; + /* We only discard relocs for symbols defined in a regular object. */ if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) return true; @@ -3621,6 +3640,9 @@ #define elf_backend_plt_readonly 1 #define elf_backend_want_got_plt 1 #define elf_backend_want_plt_sym 0 +#ifndef USE_REL +#define elf_backend_rela_normal 1 +#endif #define elf_backend_got_header_size 12 #define elf_backend_plt_header_size PLT_ENTRY_SIZE diff -Nur binutils-2.12/bfd/elf32-cris.c binutils-2.12.1/bfd/elf32-cris.c --- binutils-2.12/bfd/elf32-cris.c Tue Feb 19 08:10:19 2002 +++ binutils-2.12.1/bfd/elf32-cris.c Fri Apr 26 10:24:39 2002 @@ -180,7 +180,7 @@ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ - "R_CRIS_16", /* name */ + "R_CRIS_16_PCREL", /* name */ false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ @@ -195,7 +195,7 @@ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ - "R_CRIS_32", /* name */ + "R_CRIS_32_PCREL", /* name */ false, /* partial_inplace */ 0x00000000, /* src_mask */ 0xffffffff, /* dst_mask */ @@ -1930,6 +1930,9 @@ BFD_ASSERT (dynobj != NULL); + if (h->root.root.type == bfd_link_hash_warning) + h = (struct elf_cris_link_hash_entry *) h->root.root.u.i.link; + /* If nobody wanted a GOTPLT with this symbol, we're done. */ if (h->gotplt_refcount <= 0) return true; @@ -1954,28 +1957,9 @@ h->gotplt_refcount = -1; - /* We always have a .got section when there are dynamic - relocs. */ - BFD_ASSERT (sgot != NULL /* Surely have .got section. */); - - /* We might have had a PLT but with no GOT entry and - further no GOT reloc section at all needed before. - Add it. */ - if (srelgot == NULL) - { - srelgot = bfd_make_section (dynobj, ".rela.got"); - - if (srelgot == NULL - || !bfd_set_section_flags (dynobj, srelgot, - (SEC_ALLOC - | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED - | SEC_READONLY)) - || !bfd_set_section_alignment (dynobj, srelgot, 2)) - return false; - } + /* We always have a .got and a .rela.got section if there were + GOTPLT relocs in input. */ + BFD_ASSERT (sgot != NULL && srelgot != NULL); /* Allocate space in the .got section. */ sgot->_raw_size += 4; @@ -2365,8 +2349,38 @@ specific GOT entry). */ switch (r_type) { + /* For R_CRIS_16_GOTPLT and R_CRIS_32_GOTPLT, we need a GOT + entry only for local symbols. Unfortunately, we don't know + until later on if there's a version script that forces the + symbol local. We must have the .rela.got section in place + before we know if the symbol looks global now, so we need + to treat the reloc just like for R_CRIS_16_GOT and + R_CRIS_32_GOT. */ + case R_CRIS_16_GOTPLT: + case R_CRIS_32_GOTPLT: case R_CRIS_16_GOT: case R_CRIS_32_GOT: + if (srelgot == NULL + && (h != NULL || info->shared)) + { + srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); + if (srelgot == NULL) + { + srelgot = bfd_make_section (dynobj, ".rela.got"); + if (srelgot == NULL + || !bfd_set_section_flags (dynobj, srelgot, + (SEC_ALLOC + | SEC_LOAD + | SEC_HAS_CONTENTS + | SEC_IN_MEMORY + | SEC_LINKER_CREATED + | SEC_READONLY)) + || !bfd_set_section_alignment (dynobj, srelgot, 2)) + return false; + } + } + /* Fall through. */ + case R_CRIS_32_GOTREL: case R_CRIS_32_PLT_GOTREL: if (sgot == NULL) @@ -2413,27 +2427,6 @@ case R_CRIS_16_GOT: case R_CRIS_32_GOT: /* This symbol requires a global offset table entry. */ - - if (srelgot == NULL - && (h != NULL || info->shared)) - { - srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); - if (srelgot == NULL) - { - srelgot = bfd_make_section (dynobj, ".rela.got"); - if (srelgot == NULL - || !bfd_set_section_flags (dynobj, srelgot, - (SEC_ALLOC - | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED - | SEC_READONLY)) - || !bfd_set_section_alignment (dynobj, srelgot, 2)) - return false; - } - } - if (h != NULL) { if (h->got.refcount == 0) @@ -2881,6 +2874,9 @@ struct elf_cris_pcrel_relocs_copied *s; struct bfd_link_info *info = (struct bfd_link_info *) inf; + if (h->root.root.type == bfd_link_hash_warning) + h = (struct elf_cris_link_hash_entry *) h->root.root.u.i.link; + /* If a symbol has been forced local or we have found a regular definition for the symbolic link case, then we won't be needing any relocs. */ @@ -2905,6 +2901,9 @@ PTR inf; { struct bfd_link_info *info = (struct bfd_link_info *) inf; + + if (h->root.root.type == bfd_link_hash_warning) + h = (struct elf_cris_link_hash_entry *) h->root.root.u.i.link; /* If we're not creating a shared library and have a symbol which is referred to by .got references, but the symbol is defined locally, diff -Nur binutils-2.12/bfd/elf32-fr30.c binutils-2.12.1/bfd/elf32-fr30.c --- binutils-2.12/bfd/elf32-fr30.c Sun Dec 16 19:52:35 2001 +++ binutils-2.12.1/bfd/elf32-fr30.c Thu May 9 10:48:55 2002 @@ -1,5 +1,5 @@ /* FR30-specific support for 32-bit ELF. - Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -517,6 +517,9 @@ Elf_Internal_Rela * rel; Elf_Internal_Rela * relend; + if (info->relocateable) + return true; + symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); relend = relocs + input_section->reloc_count; @@ -541,27 +544,6 @@ r_symndx = ELF32_R_SYM (rel->r_info); - if (info->relocateable) - { - /* This is a relocateable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - - if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sec = local_sections [r_symndx]; - rel->r_addend += sec->output_offset + sym->st_value; - } - } - - continue; - } - - /* This is a final link. */ howto = fr30_elf_howto_table + ELF32_R_TYPE (rel->r_info); h = NULL; sym = NULL; @@ -806,6 +788,7 @@ #define elf_backend_check_relocs fr30_elf_check_relocs #define elf_backend_can_gc_sections 1 +#define elf_backend_rela_normal 1 #define bfd_elf32_bfd_reloc_type_lookup fr30_reloc_type_lookup diff -Nur binutils-2.12/bfd/elf32-hppa.c binutils-2.12.1/bfd/elf32-hppa.c --- binutils-2.12/bfd/elf32-hppa.c Tue Feb 19 08:10:20 2002 +++ binutils-2.12.1/bfd/elf32-hppa.c Thu May 9 10:48:56 2002 @@ -71,14 +71,14 @@ (single sub-space version) : addil LR'lt_ptr+ltoff,%dp ; get procedure entry point : ldw RR'lt_ptr+ltoff(%r1),%r21 - : bv %r0(%r21) + : bv %r0(%r21) : ldw RR'lt_ptr+ltoff+4(%r1),%r19 ; get new dlt value. Import stub to call shared library routine from shared library (single sub-space version) : addil LR'ltoff,%r19 ; get procedure entry point : ldw RR'ltoff(%r1),%r21 - : bv %r0(%r21) + : bv %r0(%r21) : ldw RR'ltoff+4(%r1),%r19 ; get new dlt value. Import stub to call shared library routine from normal object file @@ -203,9 +203,6 @@ #endif } *dyn_relocs; - /* Set during a static link if we detect a function is PIC. */ - unsigned int maybe_pic_call:1; - /* Set if the only reason we need a .plt entry is for a non-PIC to PIC function call. */ unsigned int pic_call:1; @@ -255,10 +252,11 @@ /* Whether we support multiple sub-spaces for shared libs. */ unsigned int multi_subspace:1; - /* Flags set when PCREL12F and PCREL17F branches detected. Used to + /* Flags set when various size branches are detected. Used to select suitable defaults for the stub group size. */ unsigned int has_12bit_branch:1; unsigned int has_17bit_branch:1; + unsigned int has_22bit_branch:1; /* Set if we need a .plt stub to support lazy dynamic linking. */ unsigned int need_plt_stub:1; @@ -373,9 +371,6 @@ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); -static int hppa_unwind_entry_compare - PARAMS ((const PTR, const PTR)); - static boolean elf32_hppa_finish_dynamic_symbol PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, Elf_Internal_Sym *)); @@ -460,7 +455,6 @@ eh = (struct elf32_hppa_link_hash_entry *) entry; eh->stub_cache = NULL; eh->dyn_relocs = NULL; - eh->maybe_pic_call = 0; eh->pic_call = 0; eh->plabel = 0; } @@ -508,6 +502,7 @@ ret->multi_subspace = 0; ret->has_12bit_branch = 0; ret->has_17bit_branch = 0; + ret->has_22bit_branch = 0; ret->need_plt_stub = 0; ret->sym_sec.abfd = NULL; @@ -670,21 +665,12 @@ unsigned int r_type; if (hash != NULL - && (((hash->elf.root.type == bfd_link_hash_defined - || hash->elf.root.type == bfd_link_hash_defweak) - && hash->elf.root.u.def.section->output_section == NULL) - || (hash->elf.root.type == bfd_link_hash_defweak - && hash->elf.dynindx != -1 - && hash->elf.plt.offset != (bfd_vma) -1) - || hash->elf.root.type == bfd_link_hash_undefweak - || hash->elf.root.type == bfd_link_hash_undefined - || (hash->maybe_pic_call && !(input_sec->flags & SEC_HAS_GOT_REF)))) - { - /* If output_section is NULL, then it's a symbol defined in a - shared library. We will need an import stub. Decide between - hppa_stub_import and hppa_stub_import_shared later. For - shared links we need stubs for undefined or weak syms too; - They will presumably be resolved by the dynamic linker. */ + && hash->elf.plt.offset != (bfd_vma) -1 + && (hash->elf.dynindx != -1 || hash->pic_call) + && !hash->plabel) + { + /* We need an import stub. Decide between hppa_stub_import + and hppa_stub_import_shared later. */ return hppa_stub_import; } @@ -742,6 +728,7 @@ #define BE_SR0_R21 0xe2a00000 /* be 0(%sr0,%r21) */ #define STW_RP 0x6bc23fd1 /* stw %rp,-24(%sr0,%sp) */ +#define BL22_RP 0xe800a002 /* b,l,n XXX,%rp */ #define BL_RP 0xe8400002 /* b,l,n XXX,%rp */ #define NOP 0x08000240 /* nop */ #define LDW_RP 0x4bc23fd1 /* ldw -24(%sr0,%sp),%rp */ @@ -931,7 +918,9 @@ + stub_sec->output_offset + stub_sec->output_section->vma); - if (sym_value - 8 + 0x40000 >= 0x80000) + if (sym_value - 8 + (1 << (17 + 1)) >= (1 << (17 + 2)) + && (!htab->has_22bit_branch + || sym_value - 8 + (1 << (22 + 1)) >= (1 << (22 + 2)))) { (*_bfd_error_handler) (_("%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"), @@ -944,7 +933,10 @@ } val = hppa_field_adjust (sym_value, (bfd_signed_vma) -8, e_fsel) >> 2; - insn = hppa_rebuild_insn ((int) BL_RP, val, 17); + if (!htab->has_22bit_branch) + insn = hppa_rebuild_insn ((int) BL_RP, val, 17); + else + insn = hppa_rebuild_insn ((int) BL22_RP, val, 22); bfd_put_32 (stub_bfd, insn, loc); bfd_put_32 (stub_bfd, (bfd_vma) NOP, loc + 4); @@ -1263,12 +1255,16 @@ case R_PARISC_PCREL12F: htab->has_12bit_branch = 1; - /* Fall thru. */ + goto branch_common; + case R_PARISC_PCREL17C: case R_PARISC_PCREL17F: htab->has_17bit_branch = 1; - /* Fall thru. */ + goto branch_common; + case R_PARISC_PCREL22F: + htab->has_22bit_branch = 1; + branch_common: /* Function calls might need to go through the .plt, and might require long branch stubs. */ if (h == NULL) @@ -1322,7 +1318,7 @@ case R_PARISC_DIR14F: /* Used for load/store from absolute locn. */ case R_PARISC_DIR14R: case R_PARISC_DIR21L: /* As above, and for ext branches too. */ -#if 1 +#if 0 /* Help debug shared library creation. Any of the above relocs can be used in shared libs, but they may cause pages to become unshared. */ @@ -1838,19 +1834,10 @@ unsigned int power_of_two; /* If this is a function, put it in the procedure linkage table. We - will fill in the contents of the procedure linkage table later, - when we know the address of the .got section. */ + will fill in the contents of the procedure linkage table later. */ if (h->type == STT_FUNC || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0) { - if (!info->shared - && h->plt.refcount > 0 - && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0 - && (h->root.u.def.section->flags & SEC_HAS_GOT_REF) != 0) - { - ((struct elf32_hppa_link_hash_entry *) h)->maybe_pic_call = 1; - } - if (h->plt.refcount <= 0 || ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0 && h->root.type != bfd_link_hash_defweak @@ -1867,7 +1854,10 @@ /* As a special sop to the hppa ABI, we keep a .plt entry for functions in sections containing PIC code. */ - if (((struct elf32_hppa_link_hash_entry *) h)->maybe_pic_call) + if (!info->shared + && h->plt.refcount > 0 + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0 + && (h->root.u.def.section->flags & SEC_HAS_GOT_REF) != 0) ((struct elf32_hppa_link_hash_entry *) h)->pic_call = 1; else { @@ -1918,7 +1908,7 @@ } /* If we didn't find any dynamic relocs in read-only sections, then - we'll be keeping the dynamic relocs and avoiding the copy reloc. */ + we'll be keeping the dynamic relocs and avoiding the copy reloc. */ if (p == NULL) { h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF; @@ -1982,6 +1972,9 @@ struct elf_link_hash_entry *h; PTR inf ATTRIBUTE_UNUSED; { + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (! (h->plt.refcount > 0 && (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) @@ -1993,7 +1986,6 @@ } h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT; - ((struct elf32_hppa_link_hash_entry *) h)->maybe_pic_call = 1; ((struct elf32_hppa_link_hash_entry *) h)->pic_call = 1; return true; @@ -2011,16 +2003,19 @@ struct elf32_hppa_link_hash_table *htab; asection *s; - if (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) + if (h->root.type == bfd_link_hash_indirect) return true; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + info = (struct bfd_link_info *) inf; htab = hppa_link_hash_table (info); if (((struct elf32_hppa_link_hash_entry *) h)->pic_call) { /* Make an entry in the .plt section for non-pic code that is calling pic code. */ + ((struct elf32_hppa_link_hash_entry *) h)->plabel = 0; s = htab->splt; h->plt.offset = s->_raw_size; s->_raw_size += PLT_ENTRY_SIZE; @@ -2040,7 +2035,11 @@ if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h)) { - /* Allocate these later. */ + /* Allocate these later. From this point on, h->plabel + means that the plt entry is only used by a plabel. + We'll be using a normal plt entry for this symbol, so + clear the plabel indicator. */ + ((struct elf32_hppa_link_hash_entry *) h)->plabel = 0; } else if (((struct elf32_hppa_link_hash_entry *) h)->plabel) { @@ -2080,16 +2079,18 @@ struct elf32_hppa_link_hash_entry *eh; struct elf32_hppa_dyn_reloc_entry *p; - if (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) + if (h->root.type == bfd_link_hash_indirect) return true; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + info = (struct bfd_link_info *) inf; htab = hppa_link_hash_table (info); if (htab->elf.dynamic_sections_created && h->plt.offset != (bfd_vma) -1 && !((struct elf32_hppa_link_hash_entry *) h)->pic_call - && WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h)) + && !((struct elf32_hppa_link_hash_entry *) h)->plabel) { /* Make an entry in the .plt section. */ s = htab->splt; @@ -2213,14 +2214,13 @@ struct elf_link_hash_entry *h; struct bfd_link_info *info; { + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (h->type == STT_PARISC_MILLI && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) { elf32_hppa_hide_symbol (info, h, true); - - /* ?!? We only want to remove these from the dynamic symbol table. - Therefore we do not leave ELF_LINK_FORCED_LOCAL set. */ - h->elf_link_hash_flags &= ~ELF_LINK_FORCED_LOCAL; } return true; } @@ -2235,6 +2235,9 @@ struct elf32_hppa_link_hash_entry *eh; struct elf32_hppa_dyn_reloc_entry *p; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + eh = (struct elf32_hppa_link_hash_entry *) h; for (p = eh->dyn_relocs; p != NULL; p = p->next) { @@ -3258,37 +3261,13 @@ bfd *abfd; struct bfd_link_info *info; { - asection *s; - /* Invoke the regular ELF linker to do all the work. */ if (!bfd_elf32_bfd_final_link (abfd, info)) return false; /* If we're producing a final executable, sort the contents of the - unwind section. Magic section names, but this is much safer than - having elf32_hppa_relocate_section remember where SEGREL32 relocs - occurred. Consider what happens if someone inept creates a - linker script that puts unwind information in .text. */ - s = bfd_get_section_by_name (abfd, ".PARISC.unwind"); - if (s != NULL) - { - bfd_size_type size; - char *contents; - - size = s->_raw_size; - contents = bfd_malloc (size); - if (contents == NULL) - return false; - - if (! bfd_get_section_contents (abfd, s, contents, (file_ptr) 0, size)) - return false; - - qsort (contents, (size_t) (size / 16), 16, hppa_unwind_entry_compare); - - if (! bfd_set_section_contents (abfd, s, contents, (file_ptr) 0, size)) - return false; - } - return true; + unwind section. */ + return elf_hppa_sort_unwind (abfd); } /* Record the lowest address for the data and text segments. */ @@ -3361,19 +3340,14 @@ case R_PARISC_PCREL12F: case R_PARISC_PCREL17F: case R_PARISC_PCREL22F: - /* If this is a call to a function defined in another dynamic - library, or if it is a call to a PIC function in the same - object, or if this is a shared link and it is a call to a - weak symbol which may or may not be in the same object, then - find the import stub in the stub hash. */ + /* If this call should go via the plt, find the import stub in + the stub hash. */ if (sym_sec == NULL || sym_sec->output_section == NULL || (h != NULL - && ((h->maybe_pic_call - && !(input_section->flags & SEC_HAS_GOT_REF)) - || (h->elf.root.type == bfd_link_hash_defweak - && h->elf.dynindx != -1 - && h->elf.plt.offset != (bfd_vma) -1)))) + && h->elf.plt.offset != (bfd_vma) -1 + && (h->elf.dynindx != -1 || h->pic_call) + && !h->plabel)) { stub_entry = hppa_get_stub_entry (input_section, sym_sec, h, rel, htab); @@ -3428,7 +3402,7 @@ == (((int) OP_ADDIL << 26) | (27 << 21))) { insn &= ~ (0x1f << 21); -#if 1 /* debug them. */ +#if 0 /* debug them. */ (*_bfd_error_handler) (_("%s(%s+0x%lx): fixing %s"), bfd_archive_filename (input_bfd), @@ -3475,21 +3449,27 @@ r_field = e_fsel; break; - case R_PARISC_DIR21L: + case R_PARISC_DLTIND21L: case R_PARISC_PCREL21L: - case R_PARISC_DPREL21L: case R_PARISC_PLABEL21L: - case R_PARISC_DLTIND21L: + r_field = e_lsel; + break; + + case R_PARISC_DIR21L: + case R_PARISC_DPREL21L: r_field = e_lrsel; break; - case R_PARISC_DIR17R: case R_PARISC_PCREL17R: - case R_PARISC_DIR14R: case R_PARISC_PCREL14R: - case R_PARISC_DPREL14R: case R_PARISC_PLABEL14R: case R_PARISC_DLTIND14R: + r_field = e_rsel; + break; + + case R_PARISC_DIR17R: + case R_PARISC_DIR14R: + case R_PARISC_DPREL14R: r_field = e_rrsel; break; @@ -4091,32 +4071,6 @@ } return true; -} - -/* Comparison function for qsort to sort unwind section during a - final link. */ - -static int -hppa_unwind_entry_compare (a, b) - const PTR a; - const PTR b; -{ - const bfd_byte *ap, *bp; - unsigned long av, bv; - - ap = (const bfd_byte *) a; - av = (unsigned long) ap[0] << 24; - av |= (unsigned long) ap[1] << 16; - av |= (unsigned long) ap[2] << 8; - av |= (unsigned long) ap[3]; - - bp = (const bfd_byte *) b; - bv = (unsigned long) bp[0] << 24; - bv |= (unsigned long) bp[1] << 16; - bv |= (unsigned long) bp[2] << 8; - bv |= (unsigned long) bp[3]; - - return av < bv ? -1 : av > bv ? 1 : 0; } /* Finish up dynamic symbol handling. We set the contents of various diff -Nur binutils-2.12/bfd/elf32-i370.c binutils-2.12.1/bfd/elf32-i370.c --- binutils-2.12/bfd/elf32-i370.c Tue Feb 19 08:10:21 2002 +++ binutils-2.12.1/bfd/elf32-i370.c Thu May 9 10:48:56 2002 @@ -1,5 +1,5 @@ /* i370-specific support for 32-bit ELF - Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001 + Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. Hacked by Linas Vepstas for i370 linas@linas.org @@ -736,6 +736,9 @@ h->dynindx, *cp); #endif + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (h->dynindx != -1) h->dynindx += *cp; @@ -1274,6 +1277,9 @@ bfd_vma *local_got_offsets; boolean ret = true; + if (info->relocateable) + return true; + #ifdef DEBUG fprintf (stderr, "i370_elf_relocate_section called for %s section %s, %ld relocations%s\n", bfd_archive_filename (input_bfd), @@ -1317,34 +1323,6 @@ howto = i370_elf_howto_table[(int)r_type]; r_symndx = ELF32_R_SYM (rel->r_info); - if (info->relocateable) - { - /* This is a relocateable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - if ((unsigned)ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sec = local_sections[r_symndx]; - addend = rel->r_addend += sec->output_offset + sym->st_value; - } - } - -#ifdef DEBUG - fprintf (stderr, "\ttype = %s (%d), symbol index = %ld, offset = %ld, addend = %ld\n", - howto->name, - (int)r_type, - r_symndx, - (long)offset, - (long)addend); -#endif - continue; - } - - /* This is a final link. */ if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -1658,6 +1636,7 @@ #define elf_backend_plt_not_loaded 1 #define elf_backend_got_symbol_offset 4 +#define elf_backend_rela_normal 1 #define bfd_elf32_bfd_reloc_type_lookup i370_elf_reloc_type_lookup #define bfd_elf32_bfd_set_private_flags i370_elf_set_private_flags diff -Nur binutils-2.12/bfd/elf32-i386.c binutils-2.12.1/bfd/elf32-i386.c --- binutils-2.12/bfd/elf32-i386.c Tue Feb 19 08:10:18 2002 +++ binutils-2.12.1/bfd/elf32-i386.c Thu Apr 4 11:20:34 2002 @@ -1,5 +1,5 @@ /* Intel 80386/80486-specific support for 32-bit ELF - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -847,11 +847,10 @@ { const char *name; bfd *dynobj; + unsigned int strndx = elf_elfheader (abfd)->e_shstrndx; + unsigned int shnam = elf_section_data (sec)->rel_hdr.sh_name; - name = (bfd_elf_string_from_elf_section - (abfd, - elf_elfheader (abfd)->e_shstrndx, - elf_section_data (sec)->rel_hdr.sh_name)); + name = bfd_elf_string_from_elf_section (abfd, strndx, shnam); if (name == NULL) return false; @@ -1251,10 +1250,15 @@ struct elf_i386_link_hash_entry *eh; struct elf_i386_dyn_relocs *p; - if (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) + if (h->root.type == bfd_link_hash_indirect) return true; + if (h->root.type == bfd_link_hash_warning) + /* When warning symbols are created, they **replace** the "real" + entry in the hash table, thus we never get to see the real + symbol in a hash traversal. So look at it now. */ + h = (struct elf_link_hash_entry *) h->root.u.i.link; + info = (struct bfd_link_info *) inf; htab = elf_i386_hash_table (info); @@ -1420,6 +1424,9 @@ { struct elf_i386_link_hash_entry *eh; struct elf_i386_dyn_relocs *p; + + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; eh = (struct elf_i386_link_hash_entry *) h; for (p = eh->dyn_relocs; p != NULL; p = p->next) diff -Nur binutils-2.12/bfd/elf32-i860.c binutils-2.12.1/bfd/elf32-i860.c --- binutils-2.12/bfd/elf32-i860.c Fri Nov 23 07:17:16 2001 +++ binutils-2.12.1/bfd/elf32-i860.c Thu May 9 10:48:56 2002 @@ -1,5 +1,6 @@ /* Intel i860 specific support for 32-bit ELF. - Copyright 1993, 1995, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright 1993, 1995, 1999, 2000, 2001, 2002 + Free Software Foundation, Inc. Full i860 support contributed by Jason Eckhardt . @@ -878,6 +879,9 @@ Elf_Internal_Rela * rel; Elf_Internal_Rela * relend; + if (info->relocateable) + return true; + symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); relend = relocs + input_section->reloc_count; @@ -904,27 +908,6 @@ r_symndx = ELF32_R_SYM (rel->r_info); - if (info->relocateable) - { - /* This is a relocateable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - - if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sec = local_sections [r_symndx]; - rel->r_addend += sec->output_offset + sym->st_value; - } - } - - continue; - } - - /* This is a final link. */ howto = lookup_howto ((unsigned) ELF32_R_TYPE (rel->r_info)); h = NULL; sym = NULL; @@ -1097,6 +1080,7 @@ #define ELF_MACHINE_CODE EM_860 #define ELF_MAXPAGESIZE 4096 +#define elf_backend_rela_normal 1 #define elf_info_to_howto_rel NULL #define elf_info_to_howto elf32_i860_info_to_howto_rela #define elf_backend_relocate_section elf32_i860_relocate_section diff -Nur binutils-2.12/bfd/elf32-m32r.c binutils-2.12.1/bfd/elf32-m32r.c --- binutils-2.12/bfd/elf32-m32r.c Thu Jan 17 08:02:40 2002 +++ binutils-2.12.1/bfd/elf32-m32r.c Thu May 9 10:48:56 2002 @@ -838,7 +838,8 @@ { if (! info->relocateable && (*namep)[0] == '_' && (*namep)[1] == 'S' - && strcmp (*namep, "_SDA_BASE_") == 0) + && strcmp (*namep, "_SDA_BASE_") == 0 + && info->hash->creator->flavour == bfd_target_elf_flavour) { /* This is simpler than using _bfd_elf_create_linker_section (our needs are simpler than ppc's needs). Also @@ -980,6 +981,11 @@ /* Assume success. */ boolean ret = true; +#ifndef USE_REL + if (info->relocateable) + return true; +#endif + rel = relocs; relend = relocs + input_section->reloc_count; for (; rel < relend; rel++) @@ -1019,6 +1025,7 @@ howto = m32r_elf_howto_table + r_type; r_symndx = ELF32_R_SYM (rel->r_info); +#ifdef USE_REL if (info->relocateable) { /* This is a relocateable link. We don't have to change @@ -1044,16 +1051,7 @@ sec = local_sections[r_symndx]; addend += sec->output_offset + sym->st_value; -#ifndef USE_REL - /* This can't be done for USE_REL because it doesn't mean anything - and elf_link_input_bfd asserts this stays zero. */ - rel->r_addend = addend; -#endif -#ifndef USE_REL - /* Addends are stored with relocs. We're done. */ - continue; -#else /* USE_REL */ /* If partial_inplace, we need to store any additional addend back in the section. */ if (! howto->partial_inplace) @@ -1087,9 +1085,9 @@ r = _bfd_relocate_contents (howto, input_bfd, addend, contents + offset); } -#endif /* USE_REL */ } else +#endif /* USE_REL */ { bfd_vma relocation; @@ -2160,6 +2158,9 @@ #define elf_backend_check_relocs m32r_elf_check_relocs #define elf_backend_can_gc_sections 1 +#ifndef USE_REL +#define elf_backend_rela_normal 1 +#endif #if 0 /* not yet */ /* relax support */ #define bfd_elf32_bfd_relax_section m32r_elf_relax_section diff -Nur binutils-2.12/bfd/elf32-m68k.c binutils-2.12.1/bfd/elf32-m68k.c --- binutils-2.12/bfd/elf32-m68k.c Tue Feb 19 08:10:21 2002 +++ binutils-2.12.1/bfd/elf32-m68k.c Thu May 9 10:48:57 2002 @@ -1,5 +1,5 @@ /* Motorola 68k series support for 32-bit ELF - Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1271,6 +1271,9 @@ { struct elf_m68k_pcrel_relocs_copied *s; + if (h->root.root.type == bfd_link_hash_warning) + h = (struct elf_m68k_link_hash_entry *) h->root.root.u.i.link; + /* We only discard relocs for symbols defined in a regular object. */ if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) return true; @@ -1305,6 +1308,9 @@ Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; + if (info->relocateable) + return true; + dynobj = elf_hash_table (info)->dynobj; symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); @@ -1337,26 +1343,6 @@ r_symndx = ELF32_R_SYM (rel->r_info); - if (info->relocateable) - { - /* This is a relocateable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sec = local_sections[r_symndx]; - rel->r_addend += sec->output_offset + sym->st_value; - } - } - - continue; - } - - /* This is a final link. */ h = NULL; sym = NULL; sec = NULL; @@ -2322,5 +2308,6 @@ #define elf_backend_plt_readonly 1 #define elf_backend_want_plt_sym 0 #define elf_backend_got_header_size 12 +#define elf_backend_rela_normal 1 #include "elf32-target.h" diff -Nur binutils-2.12/bfd/elf32-mcore.c binutils-2.12.1/bfd/elf32-mcore.c --- binutils-2.12/bfd/elf32-mcore.c Tue Dec 18 12:59:58 2001 +++ binutils-2.12.1/bfd/elf32-mcore.c Thu May 9 10:48:57 2002 @@ -1,5 +1,6 @@ /* Motorola MCore specific support for 32-bit ELF - Copyright 1994, 1995, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright 1994, 1995, 1999, 2000, 2001, 2002 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -414,6 +415,9 @@ (info->relocateable) ? " (relocatable)" : ""); #endif + if (info->relocateable) + return true; + if (! mcore_elf_howto_table [R_MCORE_PCRELIMM8BY4]) /* Initialize howto table if needed */ mcore_elf_howto_init (); @@ -447,32 +451,6 @@ howto = mcore_elf_howto_table [(int) r_type]; r_symndx = ELF32_R_SYM (rel->r_info); - if (info->relocateable) - { - /* This is a relocateable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - - if ((unsigned)ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sec = local_sections[r_symndx]; - addend = rel->r_addend += sec->output_offset + sym->st_value; - } - } - -#ifdef DEBUG - fprintf (stderr, "\ttype = %s (%d), symbol index = %ld, offset = %ld, addend = %ld\n", - howto->name, (int) r_type, r_symndx, (long) offset, (long) addend); -#endif - continue; - } - - /* This is a final link. */ - /* Complain about known relocation that are not yet supported. */ if (howto->special_function == mcore_elf_unsupported_reloc) { @@ -726,5 +704,6 @@ #define elf_backend_check_relocs mcore_elf_check_relocs #define elf_backend_can_gc_sections 1 +#define elf_backend_rela_normal 1 #include "elf32-target.h" diff -Nur binutils-2.12/bfd/elf32-mips.c binutils-2.12.1/bfd/elf32-mips.c --- binutils-2.12/bfd/elf32-mips.c Tue Feb 19 08:10:29 2002 +++ binutils-2.12.1/bfd/elf32-mips.c Sat May 11 13:54:17 2002 @@ -105,6 +105,9 @@ /* This is like the call_stub field, but it is used if the function being called returns a floating point value. */ asection *call_fp_stub; + + /* Are we forced local? .*/ + boolean forced_local; }; static bfd_reloc_status_type mips32_64bit_reloc @@ -4528,6 +4531,7 @@ ret->need_fn_stub = false; ret->call_stub = NULL; ret->call_fp_stub = NULL; + ret->forced_local = false; } return (struct bfd_hash_entry *) ret; @@ -4543,7 +4547,12 @@ asection *got; struct mips_got_info *g; struct mips_elf_link_hash_entry *h; + h = (struct mips_elf_link_hash_entry *) entry; + if (h->forced_local) + return; + h->forced_local = true; + dynobj = elf_hash_table (info)->dynobj; got = bfd_get_section_by_name (dynobj, ".got"); g = (struct mips_got_info *) elf_section_data (got)->tdata; @@ -4779,6 +4788,9 @@ boolean strip; asection *sec, *output_section; + if (h->root.root.type == bfd_link_hash_warning) + h = (struct mips_elf_link_hash_entry *) h->root.root.u.i.link; + if (h->root.indx == -2) strip = false; else if (((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0 @@ -6044,9 +6056,18 @@ { /* A global symbol in the GOT must also be in the dynamic symbol table. */ - if (h->dynindx == -1 - && !bfd_elf32_link_record_dynamic_symbol (info, h)) - return false; + if (h->dynindx == -1) + { + switch (ELF_ST_VISIBILITY (h->other)) + { + case STV_INTERNAL: + case STV_HIDDEN: + _bfd_mips_elf_hide_symbol (info, h, true); + break; + } + if (!bfd_elf32_link_record_dynamic_symbol (info, h)) + return false; + } /* If we've already marked this entry as needing GOT space, we don't need to do it again. */ @@ -6089,6 +6110,9 @@ struct mips_elf_hash_sort_data *hsd = (struct mips_elf_hash_sort_data *) data; + if (h->root.root.type == bfd_link_hash_warning) + h = (struct mips_elf_link_hash_entry *) h->root.root.u.i.link; + /* Symbols without dynamic symbol table entries aren't interesting at all. */ if (h->root.dynindx == -1) @@ -8789,6 +8813,9 @@ struct mips_elf_link_hash_entry *h; PTR data ATTRIBUTE_UNUSED; { + if (h->root.root.type == bfd_link_hash_warning) + h = (struct mips_elf_link_hash_entry *) h->root.root.u.i.link; + if (h->fn_stub != NULL && ! h->need_fn_stub) { diff -Nur binutils-2.12/bfd/elf32-openrisc.c binutils-2.12.1/bfd/elf32-openrisc.c --- binutils-2.12/bfd/elf32-openrisc.c Sun Dec 16 19:52:35 2001 +++ binutils-2.12.1/bfd/elf32-openrisc.c Thu May 9 10:48:57 2002 @@ -1,5 +1,5 @@ /* OpenRISC-specific support for 32-bit ELF. - Copyright 2001 Free Software Foundation, Inc. + Copyright 2001, 2002 Free Software Foundation, Inc. Contributed by Johan Rydberg, jrydberg@opencores.org This file is part of BFD, the Binary File Descriptor library. @@ -338,6 +338,9 @@ Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; + if (info->relocateable) + return true; + symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); relend = relocs + input_section->reloc_count; @@ -361,25 +364,6 @@ || r_type == R_OPENRISC_GNU_VTENTRY) continue; - if (info->relocateable) - { - /* This is a relocateable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - - if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sec = local_sections[r_symndx]; - rel->r_addend += sec->output_offset + sym->st_value; - } - } - continue; - } - if ((unsigned int) r_type > (sizeof openrisc_elf_howto_table / sizeof (reloc_howto_type))) abort (); @@ -645,6 +629,7 @@ #define elf_backend_check_relocs openrisc_elf_check_relocs #define elf_backend_can_gc_sections 1 +#define elf_backend_rela_normal 1 #define bfd_elf32_bfd_reloc_type_lookup openrisc_reloc_type_lookup diff -Nur binutils-2.12/bfd/elf32-ppc.c binutils-2.12.1/bfd/elf32-ppc.c --- binutils-2.12/bfd/elf32-ppc.c Tue Feb 19 08:10:21 2002 +++ binutils-2.12.1/bfd/elf32-ppc.c Thu May 9 10:48:57 2002 @@ -1,5 +1,5 @@ /* PowerPC-specific support for 32-bit ELF - Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. @@ -49,6 +49,8 @@ static int ppc_elf_additional_program_headers PARAMS ((bfd *)); static boolean ppc_elf_modify_segment_map PARAMS ((bfd *)); +static asection *ppc_elf_create_got + PARAMS ((bfd *, struct bfd_link_info *)); static boolean ppc_elf_create_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); @@ -679,20 +681,20 @@ 0xffff, /* dst_mask */ false), /* pcrel_offset */ - /* 32-bit section relative relocation. */ + /* 16-bit section relative relocation. */ HOWTO (R_PPC_SECTOFF, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ - true, /* pc_relative */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_PPC_SECTOFF", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0, /* dst_mask */ - true), /* pcrel_offset */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ /* 16-bit lower half section relative relocation. */ HOWTO (R_PPC_SECTOFF_LO, /* type */ @@ -1295,7 +1297,7 @@ case BFD_RELOC_HI16_PLTOFF: ppc_reloc = R_PPC_PLT16_HI; break; case BFD_RELOC_HI16_S_PLTOFF: ppc_reloc = R_PPC_PLT16_HA; break; case BFD_RELOC_GPREL16: ppc_reloc = R_PPC_SDAREL16; break; - case BFD_RELOC_32_BASEREL: ppc_reloc = R_PPC_SECTOFF; break; + case BFD_RELOC_16_BASEREL: ppc_reloc = R_PPC_SECTOFF; break; case BFD_RELOC_LO16_BASEREL: ppc_reloc = R_PPC_SECTOFF_LO; break; case BFD_RELOC_HI16_BASEREL: ppc_reloc = R_PPC_SECTOFF_HI; break; case BFD_RELOC_HI16_S_BASEREL: ppc_reloc = R_PPC_SECTOFF_HA; break; @@ -1632,6 +1634,30 @@ return true; } +/* The powerpc .got has a blrl instruction in it. Mark it executable. */ + +static asection * +ppc_elf_create_got (abfd, info) + bfd *abfd; + struct bfd_link_info *info; +{ + register asection *s; + flagword flags; + + if (!_bfd_elf_create_got_section (abfd, info)) + return NULL; + + s = bfd_get_section_by_name (abfd, ".got"); + if (s == NULL) + abort (); + + flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS | SEC_IN_MEMORY + | SEC_LINKER_CREATED); + if (!bfd_set_section_flags (abfd, s, flags)) + return NULL; + return s; +} + /* We have to create .dynsbss and .rela.sbss here so that they get mapped to output sections (just like _bfd_elf_create_dynamic_sections has to create .dynbss and .rela.bss). */ @@ -1644,6 +1670,9 @@ register asection *s; flagword flags; + if (!ppc_elf_create_got (abfd, info)) + return false; + if (!_bfd_elf_create_dynamic_sections (abfd, info)) return false; @@ -1663,7 +1692,13 @@ || ! bfd_set_section_alignment (abfd, s, 2)) return false; } - return true; + + s = bfd_get_section_by_name (abfd, ".plt"); + if (s == NULL) + abort (); + + flags = SEC_ALLOC | SEC_CODE | SEC_IN_MEMORY | SEC_LINKER_CREATED; + return bfd_set_section_flags (abfd, s, flags); } /* Adjust a symbol defined by a dynamic object and referenced by a @@ -2119,10 +2154,9 @@ { if (dynobj == NULL) elf_hash_table (info)->dynobj = dynobj = abfd; - if (! _bfd_elf_create_got_section (dynobj, info)) + sgot = ppc_elf_create_got (dynobj, info); + if (sgot == NULL) return false; - sgot = bfd_get_section_by_name (dynobj, ".got"); - BFD_ASSERT (sgot != NULL); } } @@ -2139,10 +2173,9 @@ { if (dynobj == NULL) elf_hash_table (info)->dynobj = dynobj = abfd; - if (! _bfd_elf_create_got_section (dynobj, info)) + sgot = ppc_elf_create_got (dynobj, info); + if (sgot == NULL) return false; - sgot = bfd_get_section_by_name (dynobj, ".got"); - BFD_ASSERT (sgot != NULL); } if (srelgot == NULL @@ -2542,7 +2575,8 @@ { if (sym->st_shndx == SHN_COMMON && !info->relocateable - && sym->st_size <= elf_gp_size (abfd)) + && sym->st_size <= elf_gp_size (abfd) + && info->hash->creator->flavour == bfd_target_elf_flavour) { /* Common symbols less than or equal to -G nn bytes are automatically put into .sdata. */ @@ -2895,6 +2929,9 @@ (info->relocateable) ? " (relocatable)" : ""); #endif + if (info->relocateable) + return true; + if (!ppc_elf_howto_table[R_PPC_ADDR32]) /* Initialize howto table if needed. */ ppc_elf_howto_init (); @@ -2939,34 +2976,6 @@ howto = ppc_elf_howto_table[(int) r_type]; r_symndx = ELF32_R_SYM (rel->r_info); - if (info->relocateable) - { - /* This is a relocateable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - if ((unsigned) ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sec = local_sections[r_symndx]; - addend = rel->r_addend += sec->output_offset + sym->st_value; - } - } - -#ifdef DEBUG - fprintf (stderr, "\ttype = %s (%d), symbol index = %ld, offset = %ld, addend = %ld\n", - howto->name, - (int) r_type, - r_symndx, - (long) offset, - (long) addend); -#endif - continue; - } - - /* This is a final link. */ if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -3780,6 +3789,7 @@ #define elf_backend_can_refcount 1 #define elf_backend_got_header_size 12 #define elf_backend_plt_header_size PLT_INITIAL_ENTRY_SIZE +#define elf_backend_rela_normal 1 #define bfd_elf32_bfd_merge_private_bfd_data ppc_elf_merge_private_bfd_data #define bfd_elf32_bfd_relax_section ppc_elf_relax_section diff -Nur binutils-2.12/bfd/elf32-s390.c binutils-2.12.1/bfd/elf32-s390.c --- binutils-2.12/bfd/elf32-s390.c Tue Feb 19 08:10:22 2002 +++ binutils-2.12.1/bfd/elf32-s390.c Thu May 9 10:48:58 2002 @@ -1,5 +1,5 @@ /* IBM S/390-specific support for 32-bit ELF - Copyright 2000, 2001 Free Software Foundation, Inc. + Copyright 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Carl B. Pedersen and Martin Schwidefsky. This file is part of BFD, the Binary File Descriptor library. @@ -111,6 +111,10 @@ HOWTO(R_390_PC16, 0, 1, 16, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC16", false, 0,0x0000ffff, true), HOWTO(R_390_PC16DBL, 1, 1, 16, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC16DBL", false, 0,0x0000ffff, true), HOWTO(R_390_PLT16DBL, 1, 1, 16, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PLT16DBL", false, 0,0x0000ffff, true), + HOWTO(R_390_PC32DBL, 1, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC32DBL", false, 0,0xffffffff, true), + HOWTO(R_390_PLT32DBL, 1, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PLT32DBL", false, 0,0xffffffff, true), + HOWTO(R_390_GOTPCDBL, 1, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTPCDBL", false, 0,0xffffffff, true), + HOWTO(R_390_GOTENT, 1, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTENT", false, 0,0xffffffff, true), }; /* GNU extension to record C++ vtable hierarchy. */ @@ -166,6 +170,14 @@ return &elf_howto_table[(int) R_390_PC16DBL]; case BFD_RELOC_390_PLT16DBL: return &elf_howto_table[(int) R_390_PLT16DBL]; + case BFD_RELOC_390_PC32DBL: + return &elf_howto_table[(int) R_390_PC32DBL]; + case BFD_RELOC_390_PLT32DBL: + return &elf_howto_table[(int) R_390_PLT32DBL]; + case BFD_RELOC_390_GOTPCDBL: + return &elf_howto_table[(int) R_390_GOTPCDBL]; + case BFD_RELOC_390_GOTENT: + return &elf_howto_table[(int) R_390_GOTENT]; case BFD_RELOC_VTABLE_INHERIT: return &elf32_s390_vtinherit_howto; case BFD_RELOC_VTABLE_ENTRY: @@ -650,6 +662,7 @@ case R_390_GOT12: case R_390_GOT16: case R_390_GOT32: + case R_390_GOTENT: /* This symbol requires a global offset table entry. */ if (h != NULL) { @@ -679,6 +692,7 @@ case R_390_GOTOFF: case R_390_GOTPC: + case R_390_GOTPCDBL: if (htab->sgot == NULL) { if (htab->elf.dynobj == NULL) @@ -689,6 +703,7 @@ break; case R_390_PLT16DBL: + case R_390_PLT32DBL: case R_390_PLT32: /* This symbol requires a procedure linkage table entry. We actually build the entry in adjust_dynamic_symbol, @@ -711,6 +726,7 @@ case R_390_32: case R_390_PC16: case R_390_PC16DBL: + case R_390_PC32DBL: case R_390_PC32: if (h != NULL && !info->shared) { @@ -752,6 +768,7 @@ && (sec->flags & SEC_ALLOC) != 0 && ((ELF32_R_TYPE (rel->r_info) != R_390_PC16 && ELF32_R_TYPE (rel->r_info) != R_390_PC16DBL + && ELF32_R_TYPE (rel->r_info) != R_390_PC32DBL && ELF32_R_TYPE (rel->r_info) != R_390_PC32) || (h != NULL && (! info->symbolic @@ -854,6 +871,7 @@ p->count += 1; if (ELF32_R_TYPE (rel->r_info) == R_390_PC16 || ELF32_R_TYPE (rel->r_info) == R_390_PC16DBL + || ELF32_R_TYPE (rel->r_info) == R_390_PC32DBL || ELF32_R_TYPE (rel->r_info) == R_390_PC32) p->pc_count += 1; } @@ -954,6 +972,8 @@ case R_390_GOT32: case R_390_GOTOFF: case R_390_GOTPC: + case R_390_GOTPCDBL: + case R_390_GOTENT: r_symndx = ELF32_R_SYM (rel->r_info); if (r_symndx >= symtab_hdr->sh_info) { @@ -974,6 +994,7 @@ case R_390_32: case R_390_PC16: case R_390_PC16DBL: + case R_390_PC32DBL: case R_390_PC32: r_symndx = ELF32_R_SYM (rel->r_info); if (r_symndx >= symtab_hdr->sh_info) @@ -994,6 +1015,7 @@ { if (ELF32_R_TYPE (rel->r_info) == R_390_PC16 || ELF32_R_TYPE (rel->r_info) == R_390_PC16DBL + || ELF32_R_TYPE (rel->r_info) == R_390_PC32DBL || ELF32_R_TYPE (rel->r_info) == R_390_PC32) p->pc_count -= 1; p->count -= 1; @@ -1005,6 +1027,7 @@ break; case R_390_PLT16DBL: + case R_390_PLT32DBL: case R_390_PLT32: r_symndx = ELF32_R_SYM (rel->r_info); if (r_symndx >= symtab_hdr->sh_info) @@ -1191,10 +1214,12 @@ struct elf_s390_link_hash_entry *eh; struct elf_s390_dyn_relocs *p; - if (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) + if (h->root.type == bfd_link_hash_indirect) return true; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + info = (struct bfd_link_info *) inf; htab = elf_s390_hash_table (info); @@ -1361,6 +1386,9 @@ struct elf_s390_link_hash_entry *eh; struct elf_s390_dyn_relocs *p; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + eh = (struct elf_s390_link_hash_entry *) h; for (p = eh->dyn_relocs; p != NULL; p = p->next) { @@ -1604,6 +1632,9 @@ Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; + if (info->relocateable) + return true; + htab = elf_s390_hash_table (info); symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); @@ -1633,30 +1664,9 @@ bfd_set_error (bfd_error_bad_value); return false; } - howto = elf_howto_table + r_type; + howto = elf_howto_table + r_type; r_symndx = ELF32_R_SYM (rel->r_info); - - if (info->relocateable) - { - /* This is a relocateable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sec = local_sections[r_symndx]; - rel->r_addend += sec->output_offset + sym->st_value; - } - } - - continue; - } - - /* This is a final link. */ h = NULL; sym = NULL; sec = NULL; @@ -1716,6 +1726,7 @@ case R_390_GOT12: case R_390_GOT16: case R_390_GOT32: + case R_390_GOTENT: /* Relocation is to the entry for this symbol in the global offset table. */ if (htab->sgot == NULL) @@ -1803,6 +1814,16 @@ abort (); relocation = htab->sgot->output_offset + off; + + /* + * For @GOTENT the relocation is against the offset between + * the instruction and the symbols entry in the GOT and not + * between the start of the GOT and the symbols entry. We + * add the vma of the GOT to get the correct value. + */ + if (r_type == R_390_GOTENT) + relocation += htab->sgot->output_section->vma; + break; case R_390_GOTOFF: @@ -1818,12 +1839,14 @@ break; case R_390_GOTPC: + case R_390_GOTPCDBL: /* Use global offset table as symbol value. */ relocation = htab->sgot->output_section->vma; unresolved_reloc = false; break; case R_390_PLT16DBL: + case R_390_PLT32DBL: case R_390_PLT32: /* Relocation is to the entry for this symbol in the procedure linkage table. */ @@ -1853,6 +1876,7 @@ case R_390_32: case R_390_PC16: case R_390_PC16DBL: + case R_390_PC32DBL: case R_390_PC32: /* r_symndx will be zero only for relocs against symbols from removed linkonce sections, or sections discarded by @@ -1864,6 +1888,7 @@ if ((info->shared && ((r_type != R_390_PC16 && r_type != R_390_PC16DBL + && r_type != R_390_PC32DBL && r_type != R_390_PC32) || (h != NULL && h->dynindx != -1 @@ -1909,6 +1934,7 @@ && h->dynindx != -1 && (r_type == R_390_PC16 || r_type == R_390_PC16DBL + || r_type == R_390_PC32DBL || r_type == R_390_PC32 || !info->shared || !info->symbolic @@ -2375,7 +2401,7 @@ elf_s390_object_p (abfd) bfd *abfd; { - return bfd_default_set_arch_mach (abfd, bfd_arch_s390, bfd_mach_s390_esa); + return bfd_default_set_arch_mach (abfd, bfd_arch_s390, bfd_mach_s390_31); } static boolean @@ -2423,6 +2449,7 @@ #define elf_backend_want_plt_sym 0 #define elf_backend_got_header_size 12 #define elf_backend_plt_header_size PLT_ENTRY_SIZE +#define elf_backend_rela_normal 1 #define elf_info_to_howto elf_s390_info_to_howto diff -Nur binutils-2.12/bfd/elf32-sh.c binutils-2.12.1/bfd/elf32-sh.c --- binutils-2.12/bfd/elf32-sh.c Tue Feb 19 08:10:23 2002 +++ binutils-2.12.1/bfd/elf32-sh.c Thu Apr 4 11:20:36 2002 @@ -3899,8 +3899,8 @@ will not fill them in in the relocate_section routine. */ if (info->shared && info->symbolic) sh_elf_link_hash_traverse (sh_elf_hash_table (info), - sh_elf_discard_copies, - (PTR) NULL); + sh_elf_discard_copies, + (PTR) NULL); /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate @@ -4037,6 +4037,9 @@ PTR ignore ATTRIBUTE_UNUSED; { struct elf_sh_pcrel_relocs_copied *s; + + if (h->root.root.type == bfd_link_hash_warning) + h = (struct elf_sh_link_hash_entry *) h->root.root.u.i.link; /* We only discard relocs for symbols defined in a regular object. */ if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) diff -Nur binutils-2.12/bfd/elf32-sh64.c binutils-2.12.1/bfd/elf32-sh64.c --- binutils-2.12/bfd/elf32-sh64.c Mon Feb 11 01:18:13 2002 +++ binutils-2.12.1/bfd/elf32-sh64.c Thu May 9 10:48:59 2002 @@ -389,7 +389,8 @@ bfd_vma *valp; { /* We want to do this for relocatable as well as final linking. */ - if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL) + if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL + && info->hash->creator->flavour == bfd_target_elf_flavour) { struct elf_link_hash_entry *h; diff -Nur binutils-2.12/bfd/elf32-sparc.c binutils-2.12.1/bfd/elf32-sparc.c --- binutils-2.12/bfd/elf32-sparc.c Tue Feb 19 08:10:24 2002 +++ binutils-2.12.1/bfd/elf32-sparc.c Thu Apr 4 11:20:36 2002 @@ -1084,6 +1084,17 @@ return true; } +/* This is the condition under which 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 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)) + /* Relocate a SPARC ELF section. */ static boolean @@ -1133,9 +1144,10 @@ struct elf_link_hash_entry *h; Elf_Internal_Sym *sym; asection *sec; - bfd_vma relocation; + bfd_vma relocation, off; bfd_reloc_status_type r; boolean is_plt = false; + boolean unresolved_reloc; r_type = ELF32_R_TYPE (rel->r_info); @@ -1175,6 +1187,7 @@ h = NULL; sym = NULL; sec = NULL; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -1187,71 +1200,30 @@ while (h->root.type == bfd_link_hash_indirect || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; + + relocation = 0; if (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) { sec = h->root.u.def.section; - if (((r_type == R_SPARC_WPLT30 - || r_type == R_SPARC_PLT32) - && h->plt.offset != (bfd_vma) -1) - || ((r_type == R_SPARC_GOT10 - || r_type == R_SPARC_GOT13 - || r_type == R_SPARC_GOT22) - && elf_hash_table (info)->dynamic_sections_created - && (! info->shared - || (! info->symbolic && h->dynindx != -1) - || (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) == 0)) - || (info->shared - && ((! info->symbolic && h->dynindx != -1) - || (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) == 0) - && (r_type == R_SPARC_8 - || r_type == R_SPARC_16 - || r_type == R_SPARC_32 - || r_type == R_SPARC_DISP8 - || r_type == R_SPARC_DISP16 - || r_type == R_SPARC_DISP32 - || r_type == R_SPARC_WDISP30 - || r_type == R_SPARC_WDISP22 - || r_type == R_SPARC_WDISP19 - || r_type == R_SPARC_WDISP16 - || r_type == R_SPARC_HI22 - || r_type == R_SPARC_22 - || r_type == R_SPARC_13 - || r_type == R_SPARC_LO10 - || r_type == R_SPARC_UA16 - || r_type == R_SPARC_UA32 - || ((r_type == R_SPARC_PC10 - || r_type == R_SPARC_PC22) - && strcmp (h->root.root.string, - "_GLOBAL_OFFSET_TABLE_") != 0)) - && ((input_section->flags & SEC_ALLOC) != 0 - /* DWARF will emit R_SPARC_32 relocations in its - sections against symbols defined externally - in shared libraries. We can't do anything - with them here. */ - || ((input_section->flags & SEC_DEBUGGING) != 0 - && (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_DYNAMIC) != 0)))) - { - /* In these cases, we don't need the relocation - value. We check specially because in some - obscure cases sec->output_section will be NULL. */ - relocation = 0; - } + if (sec->output_section == NULL) + /* Set a flag that will be cleared later if we find a + relocation value for this symbol. output_section + is typically NULL for symbols satisfied by a shared + library. */ + unresolved_reloc = true; else relocation = (h->root.u.def.value + sec->output_section->vma + sec->output_offset); } else if (h->root.type == bfd_link_hash_undefweak) - relocation = 0; + ; else if (info->shared && (!info->symbolic || info->allow_shlib_undefined) && !info->no_undefined && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) - relocation = 0; + ; else { if (! ((*info->callbacks->undefined_symbol) @@ -1260,7 +1232,6 @@ (!info->shared || info->no_undefined || ELF_ST_VISIBILITY (h->other))))) return false; - relocation = 0; } } @@ -1279,14 +1250,17 @@ if (h != NULL) { - bfd_vma off; + boolean dyn; off = h->got.offset; BFD_ASSERT (off != (bfd_vma) -1); + dyn = elf_hash_table (info)->dynamic_sections_created; - if (! elf_hash_table (info)->dynamic_sections_created + if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h) || (info->shared - && (info->symbolic || h->dynindx == -1) + && (info->symbolic + || h->dynindx == -1 + || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL)) && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))) { /* This is actually a static link, or it is a @@ -1310,13 +1284,11 @@ h->got.offset |= 1; } } - - relocation = sgot->output_offset + off - got_base; + else + unresolved_reloc = false; } else { - bfd_vma off; - BFD_ASSERT (local_got_offsets != NULL && local_got_offsets[r_symndx] != (bfd_vma) -1); @@ -1355,10 +1327,8 @@ local_got_offsets[r_symndx] |= 1; } - - relocation = sgot->output_offset + off - got_base; } - + relocation = sgot->output_offset + off - got_base; break; case R_SPARC_PLT32: @@ -1396,6 +1366,7 @@ relocation = (splt->output_section->vma + splt->output_offset + h->plt.offset); + unresolved_reloc = false; if (r_type == R_SPARC_PLT32) { r_type = R_SPARC_32; @@ -1496,6 +1467,17 @@ if (!(outrel.r_offset & 3)) r_type = R_SPARC_32; break; + case R_SPARC_DISP8: + case R_SPARC_DISP16: + case R_SPARC_DISP32: + /* If the symbol is not dynamic, we should not keep + a dynamic relocation. But an .rela.* slot has been + allocated for it, output R_SPARC_NONE. + FIXME: Add code tracking needed dynamic relocs as + e.g. i386 has. */ + if (h->dynindx == -1) + skip = true, relocate = true; + break; } if (skip) @@ -1581,6 +1563,18 @@ default: break; } + + /* ??? Copied from elf32-i386.c, debugging section check and all. */ + if (unresolved_reloc + && !(info->shared + && (input_section->flags & SEC_DEBUGGING) != 0 + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0)) + (*_bfd_error_handler) + (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"), + bfd_archive_filename (input_bfd), + bfd_get_section_name (input_bfd, input_section), + (long) rel->r_offset, + h->root.root.string); r = bfd_reloc_continue; if (r_type == R_SPARC_WDISP16) diff -Nur binutils-2.12/bfd/elf32-xstormy16.c binutils-2.12.1/bfd/elf32-xstormy16.c --- binutils-2.12/bfd/elf32-xstormy16.c Tue Jan 15 06:58:42 2002 +++ binutils-2.12.1/bfd/elf32-xstormy16.c Thu May 9 10:48:59 2002 @@ -500,6 +500,9 @@ { struct relax_plt_data *data = (struct relax_plt_data *) xdata; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (h->plt.offset != (bfd_vma) -1) { bfd_vma address; @@ -533,6 +536,9 @@ { bfd_vma *entry = (bfd_vma *) xdata; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (h->plt.offset != (bfd_vma) -1) { h->plt.offset = *entry; @@ -784,6 +790,9 @@ bfd *dynobj; asection *splt; + if (info->relocateable) + return true; + symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); relend = relocs + input_section->reloc_count; @@ -812,28 +821,6 @@ continue; r_symndx = ELF32_R_SYM (rel->r_info); - - if (info->relocateable) - { - /* This is a relocateable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - - if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sec = local_sections [r_symndx]; - rel->r_addend += sec->output_offset + sym->st_value; - } - } - - continue; - } - - /* This is a final link. */ howto = xstormy16_elf_howto_table + ELF32_R_TYPE (rel->r_info); h = NULL; sym = NULL; @@ -1102,6 +1089,7 @@ xstormy16_elf_finish_dynamic_sections #define elf_backend_can_gc_sections 1 +#define elf_backend_rela_normal 1 #define bfd_elf32_bfd_reloc_type_lookup xstormy16_reloc_type_lookup #define bfd_elf32_bfd_relax_section xstormy16_elf_relax_section diff -Nur binutils-2.12/bfd/elf64-alpha.c binutils-2.12.1/bfd/elf64-alpha.c --- binutils-2.12/bfd/elf64-alpha.c Tue Feb 19 08:10:25 2002 +++ binutils-2.12.1/bfd/elf64-alpha.c Thu May 9 10:48:59 2002 @@ -2120,18 +2120,21 @@ boolean strip; asection *sec, *output_section; + if (h->root.root.type == bfd_link_hash_warning) + h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link; + if (h->root.indx == -2) strip = false; else if (((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0 - || (h->root.elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0) - && (h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0 - && (h->root.elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0) + || (h->root.elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0) + && (h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0 + && (h->root.elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0) strip = true; else if (einfo->info->strip == strip_all - || (einfo->info->strip == strip_some - && bfd_hash_lookup (einfo->info->keep_hash, - h->root.root.root.string, - false, false) == NULL)) + || (einfo->info->strip == strip_some + && bfd_hash_lookup (einfo->info->keep_hash, + h->root.root.root.string, + false, false) == NULL)) strip = true; else strip = false; @@ -2150,44 +2153,44 @@ h->esym.asym.st = stGlobal; if (h->root.root.type != bfd_link_hash_defined - && h->root.root.type != bfd_link_hash_defweak) - h->esym.asym.sc = scAbs; + && h->root.root.type != bfd_link_hash_defweak) + h->esym.asym.sc = scAbs; else - { - const char *name; + { + const char *name; + + sec = h->root.root.u.def.section; + output_section = sec->output_section; - sec = h->root.root.u.def.section; - output_section = sec->output_section; + /* When making a shared library and symbol h is the one from + the another shared library, OUTPUT_SECTION may be null. */ + if (output_section == NULL) + h->esym.asym.sc = scUndefined; + else + { + name = bfd_section_name (output_section->owner, output_section); - /* When making a shared library and symbol h is the one from - the another shared library, OUTPUT_SECTION may be null. */ - if (output_section == NULL) - h->esym.asym.sc = scUndefined; - else - { - name = bfd_section_name (output_section->owner, output_section); - - if (strcmp (name, ".text") == 0) - h->esym.asym.sc = scText; - else if (strcmp (name, ".data") == 0) - h->esym.asym.sc = scData; - else if (strcmp (name, ".sdata") == 0) - h->esym.asym.sc = scSData; - else if (strcmp (name, ".rodata") == 0 - || strcmp (name, ".rdata") == 0) - h->esym.asym.sc = scRData; - else if (strcmp (name, ".bss") == 0) - h->esym.asym.sc = scBss; - else if (strcmp (name, ".sbss") == 0) - h->esym.asym.sc = scSBss; - else if (strcmp (name, ".init") == 0) - h->esym.asym.sc = scInit; - else if (strcmp (name, ".fini") == 0) - h->esym.asym.sc = scFini; - else - h->esym.asym.sc = scAbs; - } - } + if (strcmp (name, ".text") == 0) + h->esym.asym.sc = scText; + else if (strcmp (name, ".data") == 0) + h->esym.asym.sc = scData; + else if (strcmp (name, ".sdata") == 0) + h->esym.asym.sc = scSData; + else if (strcmp (name, ".rodata") == 0 + || strcmp (name, ".rdata") == 0) + h->esym.asym.sc = scRData; + else if (strcmp (name, ".bss") == 0) + h->esym.asym.sc = scBss; + else if (strcmp (name, ".sbss") == 0) + h->esym.asym.sc = scSBss; + else if (strcmp (name, ".init") == 0) + h->esym.asym.sc = scInit; + else if (strcmp (name, ".fini") == 0) + h->esym.asym.sc = scFini; + else + h->esym.asym.sc = scAbs; + } + } h->esym.asym.reserved = 0; h->esym.asym.index = indexNil; @@ -2199,18 +2202,18 @@ || h->root.root.type == bfd_link_hash_defweak) { if (h->esym.asym.sc == scCommon) - h->esym.asym.sc = scBss; + h->esym.asym.sc = scBss; else if (h->esym.asym.sc == scSCommon) - h->esym.asym.sc = scSBss; + h->esym.asym.sc = scSBss; sec = h->root.root.u.def.section; output_section = sec->output_section; if (output_section != NULL) - h->esym.asym.value = (h->root.root.u.def.value - + sec->output_offset - + output_section->vma); + h->esym.asym.value = (h->root.root.u.def.value + + sec->output_offset + + output_section->vma); else - h->esym.asym.value = 0; + h->esym.asym.value = 0; } else if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0) { @@ -2232,8 +2235,8 @@ } if (! bfd_ecoff_debug_one_external (einfo->abfd, einfo->debug, einfo->swap, - h->root.root.root.string, - &h->esym)) + h->root.root.root.string, + &h->esym)) { einfo->failed = true; return false; @@ -2861,6 +2864,9 @@ { struct alpha_elf_got_entry *gotent; + if (h->root.root.type == bfd_link_hash_warning) + h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link; + for (gotent = h->got_entries; gotent; gotent = gotent->next) if (gotent->use_count > 0) { @@ -3038,6 +3044,9 @@ struct alpha_elf_link_hash_entry *h; struct bfd_link_info *info; { + if (h->root.root.type == bfd_link_hash_warning) + h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link; + /* If the symbol was defined as a common symbol in a regular object file, and there was no definition in any dynamic object, then the linker will have allocated space for the symbol in a common @@ -3684,6 +3693,16 @@ BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count <= srel->_cooked_size); } + goto default_reloc; + + case R_ALPHA_SREL32: + case R_ALPHA_SREL64: + /* ??? .eh_frame references to discarded sections will be smashed + to relocations against SHN_UNDEF. The .eh_frame format allows + NULL to be encoded as 0 in any format, so this works here. */ + if (r_symndx == 0) + howto = (elf64_alpha_howto_table + + (r_type - R_ALPHA_SREL32 + R_ALPHA_REFLONG)); goto default_reloc; default: diff -Nur binutils-2.12/bfd/elf64-hppa.c binutils-2.12.1/bfd/elf64-hppa.c --- binutils-2.12/bfd/elf64-hppa.c Sun Dec 16 19:52:35 2001 +++ binutils-2.12.1/bfd/elf64-hppa.c Thu Apr 4 11:20:37 2002 @@ -1,5 +1,5 @@ /* Support for HPPA 64-bit ELF - Copyright 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1022,6 +1022,9 @@ struct elf64_hppa_link_hash_table *hppa_info; hppa_info = elf64_hppa_hash_table (info); + + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; if (h && (h->root.type == bfd_link_hash_defined diff -Nur binutils-2.12/bfd/elf64-mips.c binutils-2.12.1/bfd/elf64-mips.c --- binutils-2.12/bfd/elf64-mips.c Tue Feb 19 08:10:32 2002 +++ binutils-2.12.1/bfd/elf64-mips.c Thu Apr 4 11:20:38 2002 @@ -3052,6 +3052,9 @@ struct mips_elf64_hash_sort_data *hsd = (struct mips_elf64_hash_sort_data *) data; + if (h->root.root.type == bfd_link_hash_warning) + h = (struct mips_elf64_link_hash_entry *) h->root.root.u.i.link; + /* Symbols without dynamic symbol table entries aren't interesting at all. */ if (h->root.dynindx == -1) @@ -3090,9 +3093,9 @@ hsd.min_got_dynindx = elf_hash_table (info)->dynsymcount; hsd.max_non_got_dynindx = max_local; mips_elf64_link_hash_traverse (((struct mips_elf64_link_hash_table *) - elf_hash_table (info)), - mips_elf64_sort_hash_table_f, - &hsd); + elf_hash_table (info)), + mips_elf64_sort_hash_table_f, + &hsd); /* There shoud have been enough room in the symbol table to accomodate both the GOT and non-GOT symbols. */ @@ -4685,6 +4688,9 @@ struct mips_elf64_link_hash_entry *h; PTR data ATTRIBUTE_UNUSED; { + if (h->root.root.type == bfd_link_hash_warning) + h = (struct mips_elf64_link_hash_entry *) h->root.root.u.i.link; + if (h->fn_stub != NULL && ! h->need_fn_stub) { @@ -6129,6 +6135,9 @@ boolean strip; asection *sec, *output_section; + if (h->root.root.type == bfd_link_hash_warning) + h = (struct mips_elf64_link_hash_entry *) h->root.root.u.i.link; + if (h->root.indx == -2) strip = false; else if (((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0 @@ -6619,8 +6628,8 @@ einfo.swap = swap; einfo.failed = false; mips_elf64_link_hash_traverse (mips_elf64_hash_table (info), - mips_elf64_output_extsym, - (PTR) &einfo); + mips_elf64_output_extsym, + (PTR) &einfo); if (einfo.failed) return false; diff -Nur binutils-2.12/bfd/elf64-mmix.c binutils-2.12.1/bfd/elf64-mmix.c --- binutils-2.12/bfd/elf64-mmix.c Sat Feb 9 00:04:27 2002 +++ binutils-2.12.1/bfd/elf64-mmix.c Thu May 9 10:49:00 2002 @@ -1953,16 +1953,16 @@ strlen (MMIX_LOC_SECTION_START_SYMBOL_PREFIX)) == 0) { /* See if we have another one. */ - struct elf_link_hash_entry *h - = (struct elf_link_hash_entry *) bfd_link_hash_lookup (info->hash, - *namep, - false, - false, false); + struct bfd_link_hash_entry *h = bfd_link_hash_lookup (info->hash, + *namep, + false, + false, + false); - if (h != NULL && h->root.type != bfd_link_hash_undefined) + if (h != NULL && h->type != bfd_link_hash_undefined) { /* How do we get the asymbol (or really: the filename) from h? - h->root.u.def.section->owner is NULL. */ + h->u.def.section->owner is NULL. */ ((*_bfd_error_handler) (_("%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"), bfd_get_filename (abfd), *namep, diff -Nur binutils-2.12/bfd/elf64-ppc.c binutils-2.12.1/bfd/elf64-ppc.c --- binutils-2.12/bfd/elf64-ppc.c Mon Feb 25 00:03:58 2002 +++ binutils-2.12.1/bfd/elf64-ppc.c Thu May 9 10:49:01 2002 @@ -39,7 +39,21 @@ PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); static void ppc64_elf_info_to_howto PARAMS ((bfd *abfd, arelent *cache_ptr, Elf64_Internal_Rela *dst)); -static bfd_reloc_status_type ppc64_elf_addr16_ha_reloc +static bfd_reloc_status_type ppc64_elf_ha_reloc + PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); +static bfd_reloc_status_type ppc64_elf_brtaken_reloc + PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); +static bfd_reloc_status_type ppc64_elf_sectoff_reloc + PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); +static bfd_reloc_status_type ppc64_elf_sectoff_ha_reloc + PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); +static bfd_reloc_status_type ppc64_elf_toc_reloc + PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); +static bfd_reloc_status_type ppc64_elf_toc_ha_reloc + PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); +static bfd_reloc_status_type ppc64_elf_toc64_reloc + PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); +static bfd_reloc_status_type ppc64_elf_unhandled_reloc PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); static boolean ppc64_elf_set_private_flags PARAMS ((bfd *, flagword)); @@ -101,12 +115,6 @@ PARAMS ((bfd *, struct bfd_link_info *)); -/* Mask to set RA in memory instructions. */ -#define RA_REGISTER_MASK 0x001f0000 - -/* Value to shift register by to insert RA. */ -#define RA_REGISTER_SHIFT 16 - /* The name of the dynamic interpreter. This is put in the .interp section. */ #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1" @@ -146,6 +154,10 @@ /* Pad with this. */ #define NOP 0x60000000 +/* Some other nops. */ +#define CROR_151515 0x4def7b82 +#define CROR_313131 0x4ffffb82 + /* .glink entries for the first 32k functions are two instructions. */ #define LI_R0_0 0x38000000 /* li %r0,0 */ #define B_DOT 0x48000000 /* b . */ @@ -273,7 +285,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - ppc64_elf_addr16_ha_reloc, /* special_function */ + ppc64_elf_ha_reloc, /* special_function */ "R_PPC64_ADDR16_HA", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -306,7 +318,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_brtaken_reloc, /* special_function */ "R_PPC64_ADDR14_BRTAKEN",/* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -323,7 +335,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_brtaken_reloc, /* special_function */ "R_PPC64_ADDR14_BRNTAKEN",/* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -370,7 +382,7 @@ true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_brtaken_reloc, /* special_function */ "R_PPC64_REL14_BRTAKEN", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -387,7 +399,7 @@ true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_brtaken_reloc, /* special_function */ "R_PPC64_REL14_BRNTAKEN",/* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -403,7 +415,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_GOT16", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -419,7 +431,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_GOT16_LO", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -435,7 +447,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_GOT16_HI", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -451,7 +463,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ - ppc64_elf_addr16_ha_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_GOT16_HA", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -470,7 +482,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_COPY", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -486,7 +498,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_GLOB_DAT", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -502,7 +514,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_JMP_SLOT", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -580,7 +592,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_PLT32", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -612,7 +624,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_PLT16_LO", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -628,7 +640,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_PLT16_HI", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -644,31 +656,29 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - ppc64_elf_addr16_ha_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_PLT16_HA", /* name */ false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ - /* 32-bit section relative relocation. */ - /* FIXME: Verify R_PPC64_SECTOFF. Seems strange with size=2 and - dst_mask=0. */ + /* 16-bit section relative relocation. */ HOWTO (R_PPC64_SECTOFF, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ - true, /* pc_relative */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_sectoff_reloc, /* special_function */ "R_PPC64_SECTOFF", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0, /* dst_mask */ - true), /* pcrel_offset */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ - /* 16-bit lower half section relative relocation. */ + /* Like R_PPC64_SECTOFF, but no overflow warning. */ HOWTO (R_PPC64_SECTOFF_LO, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ @@ -676,7 +686,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_sectoff_reloc, /* special_function */ "R_PPC64_SECTOFF_LO", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -691,7 +701,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_sectoff_reloc, /* special_function */ "R_PPC64_SECTOFF_HI", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -706,7 +716,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - ppc64_elf_addr16_ha_reloc, /* special_function */ + ppc64_elf_sectoff_ha_reloc, /* special_function */ "R_PPC64_SECTOFF_HA", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -714,8 +724,7 @@ false), /* pcrel_offset */ /* Like R_PPC64_REL24 without touching the two least significant - bits. */ - /* FIXME: Verify R_PPC64_ADDR30. */ + bits. Should have been named R_PPC64_REL30! */ HOWTO (R_PPC64_ADDR30, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -771,7 +780,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - ppc64_elf_addr16_ha_reloc, /* special_function */ + ppc64_elf_ha_reloc, /* special_function */ "R_PPC64_ADDR16_HIGHERA", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -802,7 +811,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - ppc64_elf_addr16_ha_reloc, /* special_function */ + ppc64_elf_ha_reloc, /* special_function */ "R_PPC64_ADDR16_HIGHESTA", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -847,7 +856,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_PLT64", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -864,7 +873,7 @@ true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_PLTREL64", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -881,7 +890,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_toc_reloc, /* special_function */ "R_PPC64_TOC16", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -898,7 +907,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_toc_reloc, /* special_function */ "R_PPC64_TOC16_LO", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -915,7 +924,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_toc_reloc, /* special_function */ "R_PPC64_TOC16_HI", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -934,7 +943,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - ppc64_elf_addr16_ha_reloc, /* special_function */ + ppc64_elf_toc_ha_reloc, /* special_function */ "R_PPC64_TOC16_HA", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -951,7 +960,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_toc64_reloc, /* special_function */ "R_PPC64_TOC", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -974,7 +983,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_PLTGOT16", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -990,7 +999,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_PLTGOT16_LO", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -1006,7 +1015,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_PLTGOT16_HI", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -1024,7 +1033,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ - ppc64_elf_addr16_ha_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_PLTGOT16_HA", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -1069,7 +1078,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_GOT16_DS", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -1084,7 +1093,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_GOT16_LO_DS", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -1099,7 +1108,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_PLT16_LO_DS", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -1107,21 +1116,19 @@ false), /* pcrel_offset */ /* Like R_PPC64_SECTOFF, but for instructions with a DS field. */ - /* FIXME: Verify R_PPC64_SECTOFF. Seems strange with size=2 and - dst_mask=0. */ HOWTO (R_PPC64_SECTOFF_DS, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ - true, /* pc_relative */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_sectoff_reloc, /* special_function */ "R_PPC64_SECTOFF_DS", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0, /* dst_mask */ - true), /* pcrel_offset */ + 0xfffc, /* dst_mask */ + false), /* pcrel_offset */ /* Like R_PPC64_SECTOFF_LO, but for instructions with a DS field. */ HOWTO (R_PPC64_SECTOFF_LO_DS, /* type */ @@ -1131,7 +1138,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_sectoff_reloc, /* special_function */ "R_PPC64_SECTOFF_LO_DS",/* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -1146,7 +1153,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_toc_reloc, /* special_function */ "R_PPC64_TOC16_DS", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -1161,7 +1168,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_toc_reloc, /* special_function */ "R_PPC64_TOC16_LO_DS", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -1177,7 +1184,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_PLTGOT16_DS", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -1193,7 +1200,7 @@ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_PLTGOT16_LO_DS",/* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -1319,7 +1326,7 @@ break; case BFD_RELOC_HI16_S_PLTOFF: ppc_reloc = R_PPC64_PLT16_HA; break; - case BFD_RELOC_32_BASEREL: ppc_reloc = R_PPC64_SECTOFF; + case BFD_RELOC_16_BASEREL: ppc_reloc = R_PPC64_SECTOFF; break; case BFD_RELOC_LO16_BASEREL: ppc_reloc = R_PPC64_SECTOFF_LO; break; @@ -1417,41 +1424,265 @@ /* Handle the R_PPC_ADDR16_HA and similar relocs. */ static bfd_reloc_status_type -ppc64_elf_addr16_ha_reloc (abfd, reloc_entry, symbol, data, input_section, - output_bfd, error_message) - bfd *abfd ATTRIBUTE_UNUSED; +ppc64_elf_ha_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message) + bfd *abfd; arelent *reloc_entry; asymbol *symbol; - PTR data ATTRIBUTE_UNUSED; + PTR data; asection *input_section; bfd *output_bfd; - char **error_message ATTRIBUTE_UNUSED; + char **error_message; { - bfd_vma relocation; + /* If this is a relocatable link (output_bfd test tells us), just + call the generic function. Any adjustment will be done at final + link time. */ + if (output_bfd != NULL) + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message); + + /* Adjust the addend for sign extension of the low 16 bits. + We won't actually be using the low 16 bits, so trashing them + doesn't matter. */ + reloc_entry->addend += 0x8000; + return bfd_reloc_continue; +} +static bfd_reloc_status_type +ppc64_elf_brtaken_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message) + bfd *abfd; + arelent *reloc_entry; + asymbol *symbol; + PTR data; + asection *input_section; + bfd *output_bfd; + char **error_message; +{ + long insn; + enum elf_ppc_reloc_type r_type; + bfd_size_type octets; + /* Disabled until we sort out how ld should choose 'y' vs 'at'. */ + boolean is_power4 = false; + + /* If this is a relocatable link (output_bfd test tells us), just + call the generic function. Any adjustment will be done at final + link time. */ if (output_bfd != NULL) + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message); + + octets = reloc_entry->address * bfd_octets_per_byte (abfd); + insn = bfd_get_32 (abfd, (bfd_byte *) data + octets); + insn &= ~(0x01 << 21); + r_type = (enum elf_ppc_reloc_type) reloc_entry->howto->type; + if (r_type == R_PPC64_ADDR14_BRTAKEN + || r_type == R_PPC64_REL14_BRTAKEN) + insn |= 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */ + + if (is_power4) + { + /* Set 'a' bit. This is 0b00010 in BO field for branch + on CR(BI) insns (BO == 001at or 011at), and 0b01000 + for branch on CTR insns (BO == 1a00t or 1a01t). */ + if ((insn & (0x14 << 21)) == (0x04 << 21)) + insn |= 0x02 << 21; + else if ((insn & (0x14 << 21)) == (0x10 << 21)) + insn |= 0x08 << 21; + else + return bfd_reloc_continue; + } + else { - reloc_entry->address += input_section->output_offset; - return bfd_reloc_ok; + bfd_vma target = 0; + bfd_vma from; + + if (!bfd_is_com_section (symbol->section)) + target = symbol->value; + target += symbol->section->output_section->vma; + target += symbol->section->output_offset; + target += reloc_entry->addend; + + from = (reloc_entry->address + + input_section->output_offset + + input_section->output_section->vma); + + /* Invert 'y' bit if not the default. */ + if ((bfd_signed_vma) (target - from) < 0) + insn ^= 0x01 << 21; } + bfd_put_32 (abfd, (bfd_vma) insn, (bfd_byte *) data + octets); + return bfd_reloc_continue; +} + +static bfd_reloc_status_type +ppc64_elf_sectoff_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message) + bfd *abfd; + arelent *reloc_entry; + asymbol *symbol; + PTR data; + asection *input_section; + bfd *output_bfd; + char **error_message; +{ + /* If this is a relocatable link (output_bfd test tells us), just + call the generic function. Any adjustment will be done at final + link time. */ + if (output_bfd != NULL) + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message); - if (reloc_entry->address > input_section->_cooked_size) - return bfd_reloc_outofrange; + /* Subtract the symbol section base address. */ + reloc_entry->addend -= symbol->section->output_section->vma; + return bfd_reloc_continue; +} - if (bfd_is_com_section (symbol->section)) - relocation = 0; - else - relocation = symbol->value; +static bfd_reloc_status_type +ppc64_elf_sectoff_ha_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message) + bfd *abfd; + arelent *reloc_entry; + asymbol *symbol; + PTR data; + asection *input_section; + bfd *output_bfd; + char **error_message; +{ + /* If this is a relocatable link (output_bfd test tells us), just + call the generic function. Any adjustment will be done at final + link time. */ + if (output_bfd != NULL) + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message); - relocation += symbol->section->output_section->vma; - relocation += symbol->section->output_offset; - relocation += reloc_entry->addend; + /* Subtract the symbol section base address. */ + reloc_entry->addend -= symbol->section->output_section->vma; - reloc_entry->addend += (relocation & 0x8000) << 1; + /* Adjust the addend for sign extension of the low 16 bits. */ + reloc_entry->addend += 0x8000; + return bfd_reloc_continue; +} +static bfd_reloc_status_type +ppc64_elf_toc_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message) + bfd *abfd; + arelent *reloc_entry; + asymbol *symbol; + PTR data; + asection *input_section; + bfd *output_bfd; + char **error_message; +{ + bfd_vma TOCstart; + + /* If this is a relocatable link (output_bfd test tells us), just + call the generic function. Any adjustment will be done at final + link time. */ + if (output_bfd != NULL) + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message); + + TOCstart = _bfd_get_gp_value (input_section->output_section->owner); + if (TOCstart == 0) + TOCstart = ppc64_elf_toc (input_section->output_section->owner); + + /* Subtract the TOC base address. */ + reloc_entry->addend -= TOCstart + TOC_BASE_OFF; return bfd_reloc_continue; } +static bfd_reloc_status_type +ppc64_elf_toc_ha_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message) + bfd *abfd; + arelent *reloc_entry; + asymbol *symbol; + PTR data; + asection *input_section; + bfd *output_bfd; + char **error_message; +{ + bfd_vma TOCstart; + + /* If this is a relocatable link (output_bfd test tells us), just + call the generic function. Any adjustment will be done at final + link time. */ + if (output_bfd != NULL) + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message); + + TOCstart = _bfd_get_gp_value (input_section->output_section->owner); + if (TOCstart == 0) + TOCstart = ppc64_elf_toc (input_section->output_section->owner); + + /* Subtract the TOC base address. */ + reloc_entry->addend -= TOCstart + TOC_BASE_OFF; + + /* Adjust the addend for sign extension of the low 16 bits. */ + reloc_entry->addend += 0x8000; + return bfd_reloc_continue; +} + +static bfd_reloc_status_type +ppc64_elf_toc64_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message) + bfd *abfd; + arelent *reloc_entry; + asymbol *symbol; + PTR data; + asection *input_section; + bfd *output_bfd; + char **error_message; +{ + bfd_vma TOCstart; + bfd_size_type octets; + + /* If this is a relocatable link (output_bfd test tells us), just + call the generic function. Any adjustment will be done at final + link time. */ + if (output_bfd != NULL) + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message); + + TOCstart = _bfd_get_gp_value (input_section->output_section->owner); + if (TOCstart == 0) + TOCstart = ppc64_elf_toc (input_section->output_section->owner); + + octets = reloc_entry->address * bfd_octets_per_byte (abfd); + bfd_put_64 (abfd, TOCstart + TOC_BASE_OFF, (bfd_byte *) data + octets); + return bfd_reloc_ok; +} + +static bfd_reloc_status_type +ppc64_elf_unhandled_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message) + bfd *abfd; + arelent *reloc_entry; + asymbol *symbol; + PTR data; + asection *input_section; + bfd *output_bfd; + char **error_message; +{ + /* If this is a relocatable link (output_bfd test tells us), just + call the generic function. Any adjustment will be done at final + link time. */ + if (output_bfd != NULL) + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message); + + if (error_message != NULL) + { + static char buf[60]; + sprintf (buf, "generic linker can't handle %s", + reloc_entry->howto->name); + *error_message = buf; + } + return bfd_reloc_dangerous; +} + /* Function to set whether a module needs the -mrelocatable bit set. */ static boolean @@ -1731,6 +1962,9 @@ /* Set on error. */ int plt_overflow; + /* Set if we detect a reference undefined weak symbol. */ + unsigned int have_undefweak; + /* Small local sym to section mapping cache. */ struct sym_sec_cache sym_sec; }; @@ -1800,6 +2034,7 @@ htab->sglink = NULL; htab->sfpr = NULL; htab->plt_overflow = 0; + htab->have_undefweak = 0; htab->sym_sec.abfd = NULL; return &htab->elf.root; @@ -2501,10 +2736,12 @@ struct bfd_link_info *info; struct ppc_link_hash_table *htab; - if (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) + if (h->root.type == bfd_link_hash_indirect) return true; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + info = (struct bfd_link_info *) inf; htab = ppc_hash_table (info); @@ -2513,6 +2750,10 @@ if (!((struct ppc_link_hash_entry *) h)->is_func) return true; + if (h->root.type == bfd_link_hash_undefweak + && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR)) + htab->have_undefweak = true; + if (h->plt.refcount > 0 && h->root.root.string[0] == '.' && h->root.root.string[1] != '\0') @@ -2608,6 +2849,7 @@ unsigned int lowest_restf = MAX_SAVE_FPR + 2; unsigned int i; struct elf_link_hash_entry *h; + bfd_byte *p; char sym[10]; htab = ppc_hash_table (info); @@ -2658,41 +2900,52 @@ } } + elf_link_hash_traverse (&htab->elf, func_desc_adjust, (PTR) info); + htab->sfpr->_raw_size = ((MAX_SAVE_FPR + 2 - lowest_savef) * 4 + (MAX_SAVE_FPR + 2 - lowest_restf) * 4); if (htab->sfpr->_raw_size == 0) { - _bfd_strip_section_from_output (info, htab->sfpr); - } - else - { - bfd_byte *p = (bfd_byte *) bfd_alloc (htab->elf.dynobj, - htab->sfpr->_raw_size); - if (p == NULL) - return false; - htab->sfpr->contents = p; - - for (i = lowest_savef; i <= MAX_SAVE_FPR; i++) + if (!htab->have_undefweak) { - unsigned int fpr = i << 21; - unsigned int stackoff = (1 << 16) - (MAX_SAVE_FPR + 1 - i) * 8; - bfd_put_32 (htab->elf.dynobj, STFD_FR0_0R1 + fpr + stackoff, p); - p += 4; + _bfd_strip_section_from_output (info, htab->sfpr); + return true; } + + htab->sfpr->_raw_size = 4; + } + + p = (bfd_byte *) bfd_alloc (htab->elf.dynobj, htab->sfpr->_raw_size); + if (p == NULL) + return false; + htab->sfpr->contents = p; + + for (i = lowest_savef; i <= MAX_SAVE_FPR; i++) + { + unsigned int fpr = i << 21; + unsigned int stackoff = (1 << 16) - (MAX_SAVE_FPR + 1 - i) * 8; + bfd_put_32 (htab->elf.dynobj, STFD_FR0_0R1 + fpr + stackoff, p); + p += 4; + } + if (lowest_savef <= MAX_SAVE_FPR) + { bfd_put_32 (htab->elf.dynobj, BLR, p); p += 4; + } - for (i = lowest_restf; i <= MAX_SAVE_FPR; i++) - { - unsigned int fpr = i << 21; - unsigned int stackoff = (1 << 16) - (MAX_SAVE_FPR + 1 - i) * 8; - bfd_put_32 (htab->elf.dynobj, LFD_FR0_0R1 + fpr + stackoff, p); - p += 4; - } - bfd_put_32 (htab->elf.dynobj, BLR, p); + for (i = lowest_restf; i <= MAX_SAVE_FPR; i++) + { + unsigned int fpr = i << 21; + unsigned int stackoff = (1 << 16) - (MAX_SAVE_FPR + 1 - i) * 8; + bfd_put_32 (htab->elf.dynobj, LFD_FR0_0R1 + fpr + stackoff, p); p += 4; } + if (lowest_restf <= MAX_SAVE_FPR + || htab->sfpr->_raw_size == 4) + { + bfd_put_32 (htab->elf.dynobj, BLR, p); + } elf_link_hash_traverse (&htab->elf, func_desc_adjust, (PTR) info); return true; @@ -2875,10 +3128,12 @@ struct ppc_link_hash_entry *eh; struct ppc_dyn_relocs *p; - if (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) + if (h->root.type == bfd_link_hash_indirect) return true; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + info = (struct bfd_link_info *) inf; htab = ppc_hash_table (info); @@ -3034,6 +3289,9 @@ struct ppc_link_hash_entry *eh; struct ppc_dyn_relocs *p; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + eh = (struct ppc_link_hash_entry *) h; for (p = eh->dyn_relocs; p != NULL; p = p->next) { @@ -3278,69 +3536,61 @@ return true; } -/* Called after we have seen all the input files/sections, but before - final symbol resolution and section placement has been determined. - - We use this hook to provide a value for TOCstart, which we store in - the output bfd elf_gp. */ +/* Called after we have determined section placement. If sections + move, we'll be called again. Provide a value for TOCstart. */ -boolean -ppc64_elf_set_toc (obfd, info) +bfd_vma +ppc64_elf_toc (obfd) bfd *obfd; - struct bfd_link_info *info; { - if (!info->relocateable) - { - asection *s; - bfd_vma TOCstart; + asection *s; + bfd_vma TOCstart; - /* The TOC consists of sections .got, .toc, .tocbss, .plt in that - order. The TOC starts where the first of these sections starts. */ - s = bfd_get_section_by_name (obfd, ".got"); - if (s == NULL) - s = bfd_get_section_by_name (obfd, ".toc"); + /* The TOC consists of sections .got, .toc, .tocbss, .plt in that + order. The TOC starts where the first of these sections starts. */ + s = bfd_get_section_by_name (obfd, ".got"); + if (s == NULL) + s = bfd_get_section_by_name (obfd, ".toc"); + if (s == NULL) + s = bfd_get_section_by_name (obfd, ".tocbss"); + if (s == NULL) + s = bfd_get_section_by_name (obfd, ".plt"); + if (s == NULL) + { + /* This may happen for + o references to TOC base (SYM@toc / TOC[tc0]) without a + .toc directive + o bad linker script + o --gc-sections and empty TOC sections + + FIXME: Warn user? */ + + /* Look for a likely section. We probably won't even be + using TOCstart. */ + for (s = obfd->sections; s != NULL; s = s->next) + if ((s->flags & (SEC_ALLOC | SEC_SMALL_DATA | SEC_READONLY)) + == (SEC_ALLOC | SEC_SMALL_DATA)) + break; if (s == NULL) - s = bfd_get_section_by_name (obfd, ".tocbss"); + for (s = obfd->sections; s != NULL; s = s->next) + if ((s->flags & (SEC_ALLOC | SEC_SMALL_DATA)) + == (SEC_ALLOC | SEC_SMALL_DATA)) + break; if (s == NULL) - s = bfd_get_section_by_name (obfd, ".plt"); + for (s = obfd->sections; s != NULL; s = s->next) + if ((s->flags & (SEC_ALLOC | SEC_READONLY)) == SEC_ALLOC) + break; if (s == NULL) - { - /* This may happen for - o references to TOC base (SYM@toc / TOC[tc0]) without a - .toc directive - o bad linker script - o --gc-sections and empty TOC sections - - FIXME: Warn user? */ - - /* Look for a likely section. We probably won't even be - using TOCstart. */ - for (s = obfd->sections; s != NULL; s = s->next) - if ((s->flags & (SEC_ALLOC | SEC_SMALL_DATA | SEC_READONLY)) - == (SEC_ALLOC | SEC_SMALL_DATA)) - break; - if (s == NULL) - for (s = obfd->sections; s != NULL; s = s->next) - if ((s->flags & (SEC_ALLOC | SEC_SMALL_DATA)) - == (SEC_ALLOC | SEC_SMALL_DATA)) - break; - if (s == NULL) - for (s = obfd->sections; s != NULL; s = s->next) - if ((s->flags & (SEC_ALLOC | SEC_READONLY)) == SEC_ALLOC) - break; - if (s == NULL) - for (s = obfd->sections; s != NULL; s = s->next) - if ((s->flags & SEC_ALLOC) == SEC_ALLOC) - break; - } + for (s = obfd->sections; s != NULL; s = s->next) + if ((s->flags & SEC_ALLOC) == SEC_ALLOC) + break; + } - TOCstart = 0; - if (s != NULL) - TOCstart = s->output_section->vma + s->output_offset; + TOCstart = 0; + if (s != NULL) + TOCstart = s->output_section->vma + s->output_offset; - elf_gp (obfd) = TOCstart; - } - return true; + return TOCstart; } /* PowerPC64 .plt entries are 24 bytes long, which doesn't divide @@ -3635,6 +3885,9 @@ /* Disabled until we sort out how ld should choose 'y' vs 'at'. */ boolean is_power4 = false; + if (info->relocateable) + return true; + /* Initialize howto table if needed. */ if (!ppc64_elf_howto_table[R_PPC64_ADDR32]) ppc_howto_init (); @@ -3661,32 +3914,11 @@ unsigned long r_symndx; bfd_vma relocation; boolean unresolved_reloc; - boolean has_nop; long insn; + bfd_vma from; r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rel->r_info); r_symndx = ELF64_R_SYM (rel->r_info); - - if (info->relocateable) - { - /* This is a relocatable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - if ((unsigned) ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sec = local_sections[r_symndx]; - rel->r_addend += sec->output_offset + sym->st_value; - } - } - continue; - } - - /* This is a final link. */ - offset = rel->r_offset; addend = rel->r_addend; r = bfd_reloc_other; @@ -3709,6 +3941,7 @@ sym_name = ""; relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); + /* rel may have changed, update our copy of addend. */ addend = rel->r_addend; } else @@ -3784,8 +4017,12 @@ } else { + from = (offset + + input_section->output_offset + + input_section->output_section->vma); + /* Invert 'y' bit if not the default. */ - if ((bfd_signed_vma) (relocation - offset) < 0) + if ((bfd_signed_vma) (relocation + addend - from) < 0) insn ^= 0x01 << 21; } @@ -3793,57 +4030,71 @@ break; case R_PPC64_REL24: - case R_PPC64_ADDR24: - /* An ADDR24 or REL24 branching to a linkage function may be - followed by a nop that we have to replace with a ld in - order to restore the TOC base pointer. Only calls to - shared objects need to alter the TOC base. These are - recognized by their need for a PLT entry. */ - has_nop = 0; + /* A REL24 branching to a linkage function is followed by a + nop. We replace the nop with a ld in order to restore + the TOC base pointer. Only calls to shared objects need + to alter the TOC base. These are recognized by their + need for a PLT entry. */ if (h != NULL && h->plt.offset != (bfd_vma) -1 && htab->sstub != NULL) { - /* plt.offset here is the offset into the stub section. */ - relocation = (htab->sstub->output_section->vma - + htab->sstub->output_offset - + h->plt.offset); - unresolved_reloc = false; + boolean can_plt_call = 0; - /* Make sure that there really is an instruction after - the branch that we can decode. */ if (offset + 8 <= input_section->_cooked_size) { - bfd_byte *pnext; - - pnext = contents + offset + 4; - insn = bfd_get_32 (input_bfd, pnext); - - if (insn == 0x60000000 /* nop (ori r0,r0,0) */ - || insn == 0x4def7b82 /* cror 15,15,15 */ - || insn == 0x4ffffb82) /* cror 31,31,31 */ + insn = bfd_get_32 (input_bfd, contents + offset + 4); + if (insn == NOP + || insn == CROR_151515 || insn == CROR_313131) { - bfd_put_32 (input_bfd, - (bfd_vma) 0xe8410028, /* ld r2,40(r1) */ - pnext); - has_nop = 1; + bfd_put_32 (input_bfd, (bfd_vma) LD_R2_40R1, + contents + offset + 4); + can_plt_call = 1; } } + + if (!can_plt_call) + { + /* If this is a plain branch rather than a branch + and link, don't require a nop. */ + insn = bfd_get_32 (input_bfd, contents + offset); + if ((insn & 1) == 0) + can_plt_call = 1; + } + + if (can_plt_call) + { + /* plt.offset here is the offset into the stub section. */ + relocation = (htab->sstub->output_section->vma + + htab->sstub->output_offset + + h->plt.offset); + addend = 0; + unresolved_reloc = false; + } } if (h != NULL && h->root.type == bfd_link_hash_undefweak - && r_type == R_PPC64_REL24 - && addend == 0 - && relocation == 0) + && relocation == 0 + && addend == 0) { - /* Tweak calls to undefined weak functions to behave as - if the "called" function immediately returns. We can - thus call to a weak function without first checking - whether the function is defined. */ - relocation = 4; - if (has_nop) - relocation = 8; + /* Tweak calls to undefined weak functions to point at a + blr. We can thus call a weak function without first + checking whether the function is defined. We have a + blr at the end of .sfpr. */ + BFD_ASSERT (htab->sfpr->_raw_size != 0); + relocation = (htab->sfpr->_raw_size - 4 + + htab->sfpr->output_offset + + htab->sfpr->output_section->vma); + from = (offset + + input_section->output_offset + + input_section->output_section->vma); + + /* But let's not be silly about it. If the blr isn't in + reach, just go to the next instruction. */ + if (relocation - from + (1 << 25) >= (1 << 26) + || htab->sfpr->_raw_size == 0) + relocation = from + 4; } break; } @@ -4586,6 +4837,7 @@ #define elf_backend_plt_header_size PLT_INITIAL_ENTRY_SIZE #define elf_backend_can_gc_sections 1 #define elf_backend_can_refcount 1 +#define elf_backend_rela_normal 1 #define bfd_elf64_bfd_reloc_type_lookup ppc64_elf_reloc_type_lookup #define bfd_elf64_bfd_set_private_flags ppc64_elf_set_private_flags diff -Nur binutils-2.12/bfd/elf64-ppc.h binutils-2.12.1/bfd/elf64-ppc.h --- binutils-2.12/bfd/elf64-ppc.h Wed Jan 16 00:50:03 2002 +++ binutils-2.12.1/bfd/elf64-ppc.h Thu May 9 10:49:01 2002 @@ -17,6 +17,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -boolean ppc64_elf_set_toc PARAMS ((bfd *, struct bfd_link_info *)); +bfd_vma ppc64_elf_toc PARAMS ((bfd *)); boolean ppc64_elf_size_stubs PARAMS ((bfd *, struct bfd_link_info *, int *)); boolean ppc64_elf_build_stubs PARAMS ((bfd *, struct bfd_link_info *)); diff -Nur binutils-2.12/bfd/elf64-s390.c binutils-2.12.1/bfd/elf64-s390.c --- binutils-2.12/bfd/elf64-s390.c Tue Feb 19 08:10:26 2002 +++ binutils-2.12.1/bfd/elf64-s390.c Thu May 9 10:49:01 2002 @@ -1,5 +1,5 @@ /* IBM S/390-specific support for 64-bit ELF - Copyright 2000, 2001 Free Software Foundation, Inc. + Copyright 2000, 2001, 2002 Free Software Foundation, Inc. Contributed Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of BFD, the Binary File Descriptor library. @@ -1169,10 +1169,12 @@ struct elf_s390_link_hash_entry *eh; struct elf_s390_dyn_relocs *p; - if (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) + if (h->root.type == bfd_link_hash_indirect) return true; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + info = (struct bfd_link_info *) inf; htab = elf_s390_hash_table (info); @@ -1339,6 +1341,9 @@ struct elf_s390_link_hash_entry *eh; struct elf_s390_dyn_relocs *p; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + eh = (struct elf_s390_link_hash_entry *) h; for (p = eh->dyn_relocs; p != NULL; p = p->next) { @@ -1582,6 +1587,9 @@ Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; + if (info->relocateable) + return true; + htab = elf_s390_hash_table (info); symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); @@ -1611,30 +1619,9 @@ bfd_set_error (bfd_error_bad_value); return false; } - howto = elf_howto_table + r_type; + howto = elf_howto_table + r_type; r_symndx = ELF64_R_SYM (rel->r_info); - - if (info->relocateable) - { - /* This is a relocateable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sec = local_sections[r_symndx]; - rel->r_addend += sec->output_offset + sym->st_value; - } - } - - continue; - } - - /* This is a final link. */ h = NULL; sym = NULL; sec = NULL; @@ -2325,7 +2312,7 @@ elf_s390_object_p (abfd) bfd *abfd; { - return bfd_default_set_arch_mach (abfd, bfd_arch_s390, bfd_mach_s390_esame); + return bfd_default_set_arch_mach (abfd, bfd_arch_s390, bfd_mach_s390_64); } /* @@ -2379,6 +2366,7 @@ #define elf_backend_want_plt_sym 0 #define elf_backend_got_header_size 24 #define elf_backend_plt_header_size PLT_ENTRY_SIZE +#define elf_backend_rela_normal 1 #define elf_info_to_howto elf_s390_info_to_howto diff -Nur binutils-2.12/bfd/elf64-sh64.c binutils-2.12.1/bfd/elf64-sh64.c --- binutils-2.12/bfd/elf64-sh64.c Fri Feb 22 05:06:17 2002 +++ binutils-2.12.1/bfd/elf64-sh64.c Thu May 9 10:49:01 2002 @@ -2929,7 +2929,8 @@ bfd_vma *valp; { /* We want to do this for relocatable as well as final linking. */ - if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL) + if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL + && info->hash->creator->flavour == bfd_target_elf_flavour) { struct elf_link_hash_entry *h; @@ -3606,6 +3607,9 @@ PTR ignore ATTRIBUTE_UNUSED; { struct elf_sh64_pcrel_relocs_copied *s; + + if (h->root.root.type == bfd_link_hash_warning) + h = (struct elf_sh64_link_hash_entry *) h->root.root.u.i.link; /* We only discard relocs for symbols defined in a regular object. */ if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) diff -Nur binutils-2.12/bfd/elf64-sparc.c binutils-2.12.1/bfd/elf64-sparc.c --- binutils-2.12/bfd/elf64-sparc.c Tue Feb 19 08:10:28 2002 +++ binutils-2.12.1/bfd/elf64-sparc.c Thu May 9 10:49:01 2002 @@ -1,5 +1,5 @@ /* SPARC-specific support for 64-bit ELF - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1385,9 +1385,8 @@ *namep = NULL; return true; } - else if (! *namep || ! **namep) - return true; - else + else if (*namep && **namep + && info->hash->creator->flavour == bfd_target_elf_flavour) { int i; struct sparc64_elf_app_reg *p; @@ -1881,6 +1880,17 @@ return true; } +/* This is the condition under which 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 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)) + /* Relocate a SPARC64 ELF section. */ static boolean @@ -1928,9 +1938,10 @@ struct elf_link_hash_entry *h; Elf_Internal_Sym *sym; asection *sec; - bfd_vma relocation; + bfd_vma relocation, off; bfd_reloc_status_type r; boolean is_plt = false; + boolean unresolved_reloc; r_type = ELF64_R_TYPE_ID (rel->r_info); if (r_type < 0 || r_type >= (int) R_SPARC_max_std) @@ -1965,6 +1976,7 @@ h = NULL; sym = NULL; sec = NULL; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -1977,116 +1989,30 @@ while (h->root.type == bfd_link_hash_indirect || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; + + relocation = 0; if (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) { - boolean skip_it = false; sec = h->root.u.def.section; - - switch (r_type) - { - case R_SPARC_WPLT30: - case R_SPARC_PLT32: - case R_SPARC_HIPLT22: - case R_SPARC_LOPLT10: - case R_SPARC_PCPLT32: - case R_SPARC_PCPLT22: - case R_SPARC_PCPLT10: - case R_SPARC_PLT64: - if (h->plt.offset != (bfd_vma) -1) - skip_it = true; - break; - - case R_SPARC_GOT10: - case R_SPARC_GOT13: - case R_SPARC_GOT22: - 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))) - skip_it = true; - break; - - case R_SPARC_PC10: - case R_SPARC_PC22: - case R_SPARC_PC_HH22: - case R_SPARC_PC_HM10: - case R_SPARC_PC_LM22: - if (!strcmp(h->root.root.string, "_GLOBAL_OFFSET_TABLE_")) - break; - /* FALLTHRU */ - - case R_SPARC_8: - case R_SPARC_16: - case R_SPARC_32: - case R_SPARC_DISP8: - case R_SPARC_DISP16: - case R_SPARC_DISP32: - case R_SPARC_WDISP30: - case R_SPARC_WDISP22: - case R_SPARC_HI22: - case R_SPARC_22: - case R_SPARC_13: - case R_SPARC_LO10: - case R_SPARC_UA32: - case R_SPARC_10: - case R_SPARC_11: - case R_SPARC_64: - case R_SPARC_OLO10: - case R_SPARC_HH22: - case R_SPARC_HM10: - case R_SPARC_LM22: - case R_SPARC_WDISP19: - case R_SPARC_WDISP16: - case R_SPARC_7: - case R_SPARC_5: - case R_SPARC_6: - case R_SPARC_DISP64: - case R_SPARC_HIX22: - case R_SPARC_LOX10: - case R_SPARC_H44: - case R_SPARC_M44: - case R_SPARC_L44: - case R_SPARC_UA64: - case R_SPARC_UA16: - if (info->shared - && ((!info->symbolic && h->dynindx != -1) - || !(h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR)) - && ((input_section->flags & SEC_ALLOC) != 0 - /* DWARF will emit R_SPARC_{32,64} relocations in - its sections against symbols defined externally - in shared libraries. We can't do anything - with them here. */ - || ((input_section->flags & SEC_DEBUGGING) != 0 - && (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_DYNAMIC) != 0))) - skip_it = true; - break; - } - - if (skip_it) - { - /* In these cases, we don't need the relocation - value. We check specially because in some - obscure cases sec->output_section will be NULL. */ - relocation = 0; - } + if (sec->output_section == NULL) + /* Set a flag that will be cleared later if we find a + relocation value for this symbol. output_section + is typically NULL for symbols satisfied by a shared + library. */ + unresolved_reloc = true; else - { - relocation = (h->root.u.def.value - + sec->output_section->vma - + sec->output_offset); - } + relocation = (h->root.u.def.value + + sec->output_section->vma + + sec->output_offset); } else if (h->root.type == bfd_link_hash_undefweak) - relocation = 0; + ; else if (info->shared && (!info->symbolic || info->allow_shlib_undefined) && !info->no_undefined && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) - relocation = 0; + ; else { if (! ((*info->callbacks->undefined_symbol) @@ -2107,7 +2033,7 @@ } } -do_dynreloc: + do_dynreloc: /* When generating a shared object, these relocations are copied into the output file to be resolved at run time. */ if (info->shared && r_symndx != 0 && (input_section->flags & SEC_ALLOC)) @@ -2126,11 +2052,11 @@ case R_SPARC_DISP8: case R_SPARC_DISP16: case R_SPARC_DISP32: + case R_SPARC_DISP64: case R_SPARC_WDISP30: case R_SPARC_WDISP22: case R_SPARC_WDISP19: case R_SPARC_WDISP16: - case R_SPARC_DISP64: if (h == NULL) break; /* Fall through. */ @@ -2219,6 +2145,18 @@ case R_SPARC_UA64: if (!(outrel.r_offset & 7)) r_type = R_SPARC_64; break; + case R_SPARC_DISP8: + case R_SPARC_DISP16: + case R_SPARC_DISP32: + case R_SPARC_DISP64: + /* If the symbol is not dynamic, we should not keep + a dynamic relocation. But an .rela.* slot has been + allocated for it, output R_SPARC_NONE. + FIXME: Add code tracking needed dynamic relocs as + e.g. i386 has. */ + if (h->dynindx == -1) + skip = true, relocate = true; + break; } if (skip) @@ -2326,14 +2264,18 @@ if (h != NULL) { - bfd_vma off = h->got.offset; + boolean dyn; + + off = h->got.offset; BFD_ASSERT (off != (bfd_vma) -1); + dyn = elf_hash_table (info)->dynamic_sections_created; - if (! elf_hash_table (info)->dynamic_sections_created + if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h) || (info->shared - && (info->symbolic || h->dynindx == -1) - && (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR))) + && (info->symbolic + || h->dynindx == -1 + || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL)) + && (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 @@ -2356,12 +2298,11 @@ h->got.offset |= 1; } } - relocation = sgot->output_offset + off - got_base; + else + unresolved_reloc = false; } else { - bfd_vma off; - BFD_ASSERT (local_got_offsets != NULL); off = local_got_offsets[r_symndx]; BFD_ASSERT (off != (bfd_vma) -1); @@ -2407,8 +2348,8 @@ else bfd_put_64 (output_bfd, relocation, sgot->contents + off); } - relocation = sgot->output_offset + off - got_base; } + relocation = sgot->output_offset + off - got_base; goto do_default; case R_SPARC_WPLT30: @@ -2440,6 +2381,7 @@ relocation = (splt->output_section->vma + splt->output_offset + sparc64_elf_plt_entry_offset (h->plt.offset)); + unresolved_reloc = false; if (r_type == R_SPARC_WPLT30) goto do_wplt30; if (r_type == R_SPARC_PLT32 || r_type == R_SPARC_PLT64) @@ -2622,6 +2564,17 @@ relocation, rel->r_addend); break; } + + if (unresolved_reloc + && !(info->shared + && (input_section->flags & SEC_DEBUGGING) != 0 + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0)) + (*_bfd_error_handler) + (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"), + bfd_archive_filename (input_bfd), + bfd_get_section_name (input_bfd, input_section), + (long) rel->r_offset, + h->root.root.string); switch (r) { diff -Nur binutils-2.12/bfd/elf64-x86-64.c binutils-2.12.1/bfd/elf64-x86-64.c --- binutils-2.12/bfd/elf64-x86-64.c Fri Feb 22 05:06:18 2002 +++ binutils-2.12.1/bfd/elf64-x86-64.c Thu May 9 10:49:02 2002 @@ -1,5 +1,5 @@ /* X86-64 specific support for 64-bit ELF - Copyright 2000, 2001 Free Software Foundation, Inc. + Copyright 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Jan Hubicka . This file is part of BFD, the Binary File Descriptor library. @@ -20,13 +20,14 @@ #include "bfd.h" #include "sysdep.h" +#include "bfdlink.h" #include "libbfd.h" #include "elf-bfd.h" #include "elf/x86-64.h" /* We use only the RELA entries. */ -#define USE_RELA +#define USE_RELA 1 /* In case we're on a 32-bit machine, construct a 64-bit "-1" value. */ #define MINUS_ONE (~ (bfd_vma) 0) @@ -127,6 +128,12 @@ static struct bfd_link_hash_table *elf64_x86_64_link_hash_table_create PARAMS ((bfd *)); static boolean elf64_x86_64_elf_object_p PARAMS ((bfd *abfd)); +static boolean create_got_section + PARAMS((bfd *, struct bfd_link_info *)); +static boolean elf64_x86_64_create_dynamic_sections + PARAMS((bfd *, struct bfd_link_info *)); +static void elf64_x86_64_copy_indirect_symbol + PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *)); static boolean elf64_x86_64_check_relocs PARAMS ((bfd *, struct bfd_link_info *, asection *sec, const Elf_Internal_Rela *)); @@ -138,11 +145,15 @@ PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *)); -static struct bfd_hash_entry *elf64_x86_64_link_hash_newfunc +static struct bfd_hash_entry *link_hash_newfunc PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); static boolean elf64_x86_64_adjust_dynamic_symbol PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); +static boolean allocate_dynrelocs + PARAMS ((struct elf_link_hash_entry *, PTR)); +static boolean readonly_dynrelocs + PARAMS ((struct elf_link_hash_entry *, PTR)); static boolean elf64_x86_64_size_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); static boolean elf64_x86_64_relocate_section @@ -235,53 +246,54 @@ }; /* The x86-64 linker needs to keep track of the number of relocs that - it decides to copy in check_relocs for each symbol. This is so - that it can discard PC relative relocs if it doesn't need them when - linking with -Bsymbolic. We store the information in a field - extending the regular ELF linker hash table. */ + it decides to copy as dynamic relocs in check_relocs for each symbol. + This is so that it can later discard them if they are found to be + unnecessary. We store the information in a field extending the + regular ELF linker hash table. */ -/* This structure keeps track of the number of PC relative relocs we - have copied for a given symbol. */ - -struct elf64_x86_64_pcrel_relocs_copied +struct elf64_x86_64_dyn_relocs { /* Next section. */ - struct elf64_x86_64_pcrel_relocs_copied *next; - /* A section in dynobj. */ - asection *section; - /* Number of relocs copied in this section. */ + struct elf64_x86_64_dyn_relocs *next; + + /* The input section of the reloc. */ + asection *sec; + + /* Total number of relocs copied for the input section. */ bfd_size_type count; + + /* Number of pc-relative relocs copied for the input section. */ + bfd_size_type pc_count; }; /* x86-64 ELF linker hash entry. */ struct elf64_x86_64_link_hash_entry { - struct elf_link_hash_entry root; + struct elf_link_hash_entry elf; - /* Number of PC relative relocs copied for this symbol. */ - struct elf64_x86_64_pcrel_relocs_copied *pcrel_relocs_copied; + /* Track dynamic relocs copied for this symbol. */ + struct elf64_x86_64_dyn_relocs *dyn_relocs; }; -/* x86-64 ELF linker hash table. */ +/* x86-64 ELF linker hash table. */ struct elf64_x86_64_link_hash_table { - struct elf_link_hash_table root; -}; - -/* Declare this now that the above structures are defined. */ + struct elf_link_hash_table elf; -static boolean elf64_x86_64_discard_copies - PARAMS ((struct elf64_x86_64_link_hash_entry *, PTR)); - -/* Traverse an x86-64 ELF linker hash table. */ + /* Short-cuts to get to dynamic linker sections. */ + asection *sgot; + asection *sgotplt; + asection *srelgot; + asection *splt; + asection *srelplt; + asection *sdynbss; + asection *srelbss; -#define elf64_x86_64_link_hash_traverse(table, func, info) \ - (elf_link_hash_traverse \ - (&(table)->root, \ - (boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \ - (info))) + /* Small local sym to section mapping cache. */ + struct sym_sec_cache sym_sec; +}; /* Get the x86-64 ELF linker hash table from a link_info structure. */ @@ -291,33 +303,32 @@ /* Create an entry in an x86-64 ELF linker hash table. */ static struct bfd_hash_entry * -elf64_x86_64_link_hash_newfunc (entry, table, string) +link_hash_newfunc (entry, table, string) struct bfd_hash_entry *entry; struct bfd_hash_table *table; const char *string; { - struct elf64_x86_64_link_hash_entry *ret = - (struct elf64_x86_64_link_hash_entry *) entry; - /* Allocate the structure if it has not already been allocated by a - subclass. */ - if (ret == (struct elf64_x86_64_link_hash_entry *) NULL) - ret = ((struct elf64_x86_64_link_hash_entry *) - bfd_hash_allocate (table, - sizeof (struct elf64_x86_64_link_hash_entry))); - if (ret == (struct elf64_x86_64_link_hash_entry *) NULL) - return (struct bfd_hash_entry *) ret; + subclass. */ + if (entry == NULL) + { + entry = bfd_hash_allocate (table, + sizeof (struct elf64_x86_64_link_hash_entry)); + if (entry == NULL) + return entry; + } /* Call the allocation method of the superclass. */ - ret = ((struct elf64_x86_64_link_hash_entry *) - _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret, - table, string)); - if (ret != (struct elf64_x86_64_link_hash_entry *) NULL) + entry = _bfd_elf_link_hash_newfunc (entry, table, string); + if (entry != NULL) { - ret->pcrel_relocs_copied = NULL; + struct elf64_x86_64_link_hash_entry *eh; + + eh = (struct elf64_x86_64_link_hash_entry *) entry; + eh->dyn_relocs = NULL; } - return (struct bfd_hash_entry *) ret; + return entry; } /* Create an X86-64 ELF linker hash table. */ @@ -329,18 +340,135 @@ struct elf64_x86_64_link_hash_table *ret; bfd_size_type amt = sizeof (struct elf64_x86_64_link_hash_table); - ret = ((struct elf64_x86_64_link_hash_table *) bfd_alloc (abfd, amt)); - if (ret == (struct elf64_x86_64_link_hash_table *) NULL) + ret = (struct elf64_x86_64_link_hash_table *) bfd_alloc (abfd, amt); + if (ret == NULL) return NULL; - if (! _bfd_elf_link_hash_table_init (&ret->root, abfd, - elf64_x86_64_link_hash_newfunc)) + if (! _bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc)) { bfd_release (abfd, ret); return NULL; } - return &ret->root.root; + ret->sgot = NULL; + ret->sgotplt = NULL; + ret->srelgot = NULL; + ret->splt = NULL; + ret->srelplt = NULL; + ret->sdynbss = NULL; + ret->srelbss = NULL; + ret->sym_sec.abfd = NULL; + + return &ret->elf.root; +} + +/* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up + shortcuts to them in our hash table. */ + +static boolean +create_got_section (dynobj, info) + bfd *dynobj; + struct bfd_link_info *info; +{ + struct elf64_x86_64_link_hash_table *htab; + + if (! _bfd_elf_create_got_section (dynobj, info)) + return false; + + htab = elf64_x86_64_hash_table (info); + htab->sgot = bfd_get_section_by_name (dynobj, ".got"); + htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt"); + if (!htab->sgot || !htab->sgotplt) + abort (); + + htab->srelgot = bfd_make_section (dynobj, ".rela.got"); + if (htab->srelgot == NULL + || ! bfd_set_section_flags (dynobj, htab->srelgot, + (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS + | SEC_IN_MEMORY | SEC_LINKER_CREATED + | SEC_READONLY)) + || ! bfd_set_section_alignment (dynobj, htab->srelgot, 3)) + return false; + return true; +} + +/* Create .plt, .rela.plt, .got, .got.plt, .rela.got, .dynbss, and + .rela.bss sections in DYNOBJ, and set up shortcuts to them in our + hash table. */ + +static boolean +elf64_x86_64_create_dynamic_sections (dynobj, info) + bfd *dynobj; + struct bfd_link_info *info; +{ + struct elf64_x86_64_link_hash_table *htab; + + htab = elf64_x86_64_hash_table (info); + if (!htab->sgot && !create_got_section (dynobj, info)) + return false; + + if (!_bfd_elf_create_dynamic_sections (dynobj, info)) + return false; + + htab->splt = bfd_get_section_by_name (dynobj, ".plt"); + htab->srelplt = bfd_get_section_by_name (dynobj, ".rela.plt"); + htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss"); + if (!info->shared) + htab->srelbss = bfd_get_section_by_name (dynobj, ".rela.bss"); + + if (!htab->splt || !htab->srelplt || !htab->sdynbss + || (!info->shared && !htab->srelbss)) + abort (); + + return true; +} + +/* Copy the extra info we tack onto an elf_link_hash_entry. */ + +static void +elf64_x86_64_copy_indirect_symbol (dir, ind) + struct elf_link_hash_entry *dir, *ind; +{ + struct elf64_x86_64_link_hash_entry *edir, *eind; + + edir = (struct elf64_x86_64_link_hash_entry *) dir; + eind = (struct elf64_x86_64_link_hash_entry *) ind; + + if (eind->dyn_relocs != NULL) + { + if (edir->dyn_relocs != NULL) + { + struct elf64_x86_64_dyn_relocs **pp; + struct elf64_x86_64_dyn_relocs *p; + + if (ind->root.type == bfd_link_hash_indirect) + abort (); + + /* Add reloc counts against the weak sym to the strong sym + list. Merge any entries against the same section. */ + for (pp = &eind->dyn_relocs; (p = *pp) != NULL; ) + { + struct elf64_x86_64_dyn_relocs *q; + + for (q = edir->dyn_relocs; q != NULL; q = q->next) + if (q->sec == p->sec) + { + q->pc_count += p->pc_count; + q->count += p->count; + *pp = p->next; + break; + } + if (q == NULL) + pp = &p->next; + } + *pp = edir->dyn_relocs; + } + + edir->dyn_relocs = eind->dyn_relocs; + eind->dyn_relocs = NULL; + } + + _bfd_elf_link_hash_copy_indirect (dir, ind); } static boolean @@ -353,8 +481,8 @@ } /* Look through the relocs for a section during the first phase, and - allocate space in the global offset table or procedure linkage - table. */ + calculate needed space in the global offset table, procedure + linkage table, and dynamic reloc sections. */ static boolean elf64_x86_64_check_relocs (abfd, info, sec, relocs) @@ -363,25 +491,22 @@ asection *sec; const Elf_Internal_Rela *relocs; { - bfd *dynobj; + struct elf64_x86_64_link_hash_table *htab; Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; - bfd_signed_vma *local_got_refcounts; const Elf_Internal_Rela *rel; const Elf_Internal_Rela *rel_end; - asection *sgot; - asection *srelgot; asection *sreloc; if (info->relocateable) return true; - dynobj = elf_hash_table (info)->dynobj; + htab = elf64_x86_64_hash_table (info); symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); - local_got_refcounts = elf_local_got_refcounts (abfd); - sgot = srelgot = sreloc = NULL; + sreloc = NULL; + rel_end = relocs + sec->reloc_count; for (rel = relocs; rel < rel_end; rel++) { @@ -389,75 +514,35 @@ struct elf_link_hash_entry *h; r_symndx = ELF64_R_SYM (rel->r_info); + + if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr)) + { + (*_bfd_error_handler) (_("%s: bad symbol index: %d"), + bfd_archive_filename (abfd), + r_symndx); + return false; + } + if (r_symndx < symtab_hdr->sh_info) h = NULL; else h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - /* Some relocs require a global offset table. */ - if (dynobj == NULL) - { - switch (ELF64_R_TYPE (rel->r_info)) - { - case R_X86_64_GOT32: - case R_X86_64_GOTPCREL: - elf_hash_table (info)->dynobj = dynobj = abfd; - if (! _bfd_elf_create_got_section (dynobj, info)) - return false; - break; - } - } - switch (ELF64_R_TYPE (rel->r_info)) { - case R_X86_64_GOTPCREL: case R_X86_64_GOT32: + case R_X86_64_GOTPCREL: /* This symbol requires a global offset table entry. */ - - if (sgot == NULL) - { - sgot = bfd_get_section_by_name (dynobj, ".got"); - BFD_ASSERT (sgot != NULL); - } - - if (srelgot == NULL && (h != NULL || info->shared)) - { - srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); - if (srelgot == NULL) - { - srelgot = bfd_make_section (dynobj, ".rela.got"); - if (srelgot == NULL - || ! bfd_set_section_flags (dynobj, srelgot, - (SEC_ALLOC - | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED - | SEC_READONLY)) - || ! bfd_set_section_alignment (dynobj, srelgot, 3)) - return false; - } - } - if (h != NULL) { - if (h->got.refcount == 0) - { - /* Make sure this symbol is output as a dynamic symbol. */ - if (h->dynindx == -1) - { - if (! bfd_elf64_link_record_dynamic_symbol (info, h)) - return false; - } - - sgot->_raw_size += GOT_ENTRY_SIZE; - srelgot->_raw_size += sizeof (Elf64_External_Rela); - } h->got.refcount += 1; } else { + bfd_signed_vma *local_got_refcounts; + /* This is a global offset table entry for a local symbol. */ + local_got_refcounts = elf_local_got_refcounts (abfd); if (local_got_refcounts == NULL) { bfd_size_type size; @@ -470,19 +555,18 @@ return false; elf_local_got_refcounts (abfd) = local_got_refcounts; } - if (local_got_refcounts[r_symndx] == 0) - { - sgot->_raw_size += GOT_ENTRY_SIZE; - if (info->shared) - { - /* If we are generating a shared object, we need to - output a R_X86_64_RELATIVE reloc so that the dynamic - linker can adjust this GOT entry. */ - srelgot->_raw_size += sizeof (Elf64_External_Rela); - } - } local_got_refcounts[r_symndx] += 1; } + /* Fall through */ + + //case R_X86_64_GOTPCREL: + if (htab->sgot == NULL) + { + if (htab->elf.dynobj == NULL) + htab->elf.dynobj = abfd; + if (!create_got_section (htab->elf.dynobj, info)) + return false; + } break; case R_X86_64_PLT32: @@ -507,9 +591,23 @@ case R_X86_64_32: case R_X86_64_64: case R_X86_64_32S: + case R_X86_64_PC8: + case R_X86_64_PC16: case R_X86_64_PC32: - if (h != NULL) - h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF; + if (h != NULL && !info->shared) + { + /* If this reloc is in a read-only section, we might + need a copy reloc. We can't check reliably at this + stage whether the section is read-only, as input + sections have not yet been mapped to output sections. + Tentatively set the flag for now, and correct in + adjust_dynamic_symbol. */ + h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF; + + /* We may need a .plt entry if the function this reloc + refers to is in a shared lib. */ + h->plt.refcount += 1; + } /* If we are creating a shared library, and this is a reloc against a global symbol, or a non PC relative reloc @@ -520,27 +618,45 @@ including in the link (i.e., DEF_REGULAR is set). At this point we have not seen all the input files, so it is possible that DEF_REGULAR is not set now but will be set - later (it is never cleared). We account for that - possibility below by storing information in the - pcrel_relocs_copied field of the hash table entry. - A similar situation occurs when creating shared libraries - and symbol visibility changes render the symbol local. */ - if (info->shared - && (sec->flags & SEC_ALLOC) != 0 - && (((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)) - || (h != NULL - && (! info->symbolic - || (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) == 0)))) - { - /* When creating a shared object, we must copy these - reloc types into the output file. We create a reloc - section in dynobj and make room for this reloc. */ + later (it is never cleared). In case of a weak definition, + DEF_REGULAR may be cleared later by a strong definition in + a shared library. We account for that possibility below by + storing information in the relocs_copied field of the hash + table entry. A similar situation occurs when creating + shared libraries and symbol visibility changes render the + symbol local. + + If on the other hand, we are creating an executable, we + may need to keep relocations for symbols satisfied by a + dynamic library if we manage to avoid copy relocs for the + symbol. */ + if ((info->shared + && (sec->flags & SEC_ALLOC) != 0 + && (((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)) + || (h != NULL + && (! info->symbolic + || h->root.type == bfd_link_hash_defweak + || (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_REGULAR) == 0)))) + || (!info->shared + && (sec->flags & SEC_ALLOC) != 0 + && h != NULL + && (h->root.type == bfd_link_hash_defweak + || (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_REGULAR) == 0))) + { + struct elf64_x86_64_dyn_relocs *p; + struct elf64_x86_64_dyn_relocs **head; + + /* We must copy these reloc types into the output file. + Create a reloc section in dynobj and make room for + this reloc. */ if (sreloc == NULL) { const char *name; + bfd *dynobj; name = (bfd_elf_string_from_elf_section (abfd, @@ -549,9 +665,19 @@ if (name == NULL) return false; - BFD_ASSERT (strncmp (name, ".rela", 5) == 0 - && strcmp (bfd_get_section_name (abfd, sec), - name + 5) == 0); + if (strncmp (name, ".rela", 5) != 0 + || strcmp (bfd_get_section_name (abfd, sec), + name + 5) != 0) + { + (*_bfd_error_handler) + (_("%s: bad relocation section name `%s\'"), + bfd_archive_filename (abfd), name); + } + + if (htab->elf.dynobj == NULL) + htab->elf.dynobj = abfd; + + dynobj = htab->elf.dynobj; sreloc = bfd_get_section_by_name (dynobj, name); if (sreloc == NULL) @@ -568,46 +694,51 @@ || ! bfd_set_section_alignment (dynobj, sreloc, 3)) return false; } - if (sec->flags & SEC_READONLY) - info->flags |= DF_TEXTREL; + elf_section_data (sec)->sreloc = sreloc; } - sreloc->_raw_size += sizeof (Elf64_External_Rela); - - /* If this is a global symbol, we count the number of PC - relative relocations we have entered for this symbol, - so that we can discard them later as necessary. Note - that this function is only called if we are using an - elf64_x86_64 linker hash table, which means that h is - really a pointer to an elf64_x86_64_link_hash_entry. */ - if (h != NULL - && ((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))) + /* If this is a global symbol, we count the number of + relocations we need for this symbol. */ + if (h != NULL) { - struct elf64_x86_64_link_hash_entry *eh; - struct elf64_x86_64_pcrel_relocs_copied *p; - - eh = (struct elf64_x86_64_link_hash_entry *) h; + head = &((struct elf64_x86_64_link_hash_entry *) h)->dyn_relocs; + } + else + { + /* Track dynamic relocs needed for local syms too. + We really need local syms available to do this + easily. Oh well. */ + + asection *s; + s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, + sec, r_symndx); + if (s == NULL) + return false; - for (p = eh->pcrel_relocs_copied; p != NULL; p = p->next) - if (p->section == sreloc) - break; + head = ((struct elf64_x86_64_dyn_relocs **) + &elf_section_data (s)->local_dynrel); + } + p = *head; + if (p == NULL || p->sec != sec) + { + bfd_size_type amt = sizeof *p; + p = ((struct elf64_x86_64_dyn_relocs *) + bfd_alloc (htab->elf.dynobj, amt)); if (p == NULL) - { - p = ((struct elf64_x86_64_pcrel_relocs_copied *) - bfd_alloc (dynobj, (bfd_size_type) sizeof *p)); - if (p == NULL) - return false; - p->next = eh->pcrel_relocs_copied; - eh->pcrel_relocs_copied = p; - p->section = sreloc; - p->count = 0; - } - - ++p->count; + return false; + p->next = *head; + *head = p; + p->sec = sec; + p->count = 0; + p->pc_count = 0; } + + p->count += 1; + if (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) + p->pc_count += 1; } break; @@ -624,6 +755,9 @@ if (!_bfd_elf64_gc_record_vtentry (abfd, sec, h, rel->r_addend)) return false; break; + + default: + break; } } @@ -637,7 +771,7 @@ elf64_x86_64_gc_mark_hook (abfd, info, rel, h, sym) bfd *abfd; struct bfd_link_info *info ATTRIBUTE_UNUSED; - Elf_Internal_Rela *rel ATTRIBUTE_UNUSED; + Elf_Internal_Rela *rel; struct elf_link_hash_entry *h; Elf_Internal_Sym *sym; { @@ -677,7 +811,7 @@ static boolean elf64_x86_64_gc_sweep_hook (abfd, info, sec, relocs) bfd *abfd; - struct bfd_link_info *info ATTRIBUTE_UNUSED; + struct bfd_link_info *info; asection *sec; const Elf_Internal_Rela *relocs; { @@ -687,21 +821,13 @@ const Elf_Internal_Rela *rel, *relend; unsigned long r_symndx; struct elf_link_hash_entry *h; - bfd *dynobj; - asection *sgot; - asection *srelgot; + + elf_section_data (sec)->local_dynrel = NULL; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); local_got_refcounts = elf_local_got_refcounts (abfd); - dynobj = elf_hash_table (info)->dynobj; - if (dynobj == NULL) - return true; - - sgot = bfd_get_section_by_name (dynobj, ".got"); - srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); - relend = relocs + sec->reloc_count; for (rel = relocs; rel < relend; rel++) switch (ELF64_R_TYPE (rel->r_info)) @@ -713,30 +839,53 @@ { h = sym_hashes[r_symndx - symtab_hdr->sh_info]; if (h->got.refcount > 0) - { - h->got.refcount -= 1; - if (h->got.refcount == 0) - { - sgot->_raw_size -= GOT_ENTRY_SIZE; - srelgot->_raw_size -= sizeof (Elf64_External_Rela); - } - } + h->got.refcount -= 1; } else if (local_got_refcounts != NULL) { if (local_got_refcounts[r_symndx] > 0) - { - 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 (Elf64_External_Rela); - } - } + local_got_refcounts[r_symndx] -= 1; } break; + case R_X86_64_8: + case R_X86_64_16: + case R_X86_64_32: + case R_X86_64_64: + case R_X86_64_32S: + case R_X86_64_PC8: + case R_X86_64_PC16: + case R_X86_64_PC32: + r_symndx = ELF64_R_SYM (rel->r_info); + if (r_symndx >= symtab_hdr->sh_info) + { + struct elf64_x86_64_link_hash_entry *eh; + struct elf64_x86_64_dyn_relocs **pp; + struct elf64_x86_64_dyn_relocs *p; + + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + + if (!info->shared && h->plt.refcount > 0) + h->plt.refcount -= 1; + + eh = (struct elf64_x86_64_link_hash_entry *) h; + + for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next) + if (p->sec == sec) + { + if (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) + p->pc_count -= 1; + p->count -= 1; + if (p->count == 0) + *pp = p->next; + break; + } + } + break; + + case R_X86_64_PLT32: r_symndx = ELF64_R_SYM (rel->r_info); if (r_symndx >= symtab_hdr->sh_info) @@ -765,33 +914,24 @@ struct bfd_link_info *info; struct elf_link_hash_entry *h; { - bfd *dynobj; + struct elf64_x86_64_link_hash_table *htab; + struct elf64_x86_64_link_hash_entry * eh; + struct elf64_x86_64_dyn_relocs *p; asection *s; unsigned int power_of_two; - dynobj = elf_hash_table (info)->dynobj; - - /* Make sure we know what is going on here. */ - BFD_ASSERT (dynobj != NULL - && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) - || h->weakdef != NULL - || ((h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_DYNAMIC) != 0 - && (h->elf_link_hash_flags - & ELF_LINK_HASH_REF_REGULAR) != 0 - && (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) == 0))); - /* If this is a function, put it in the procedure linkage table. We will fill in the contents of the procedure linkage table later, when we know the address of the .got section. */ if (h->type == STT_FUNC || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0) { - if ((! info->shared - && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0 - && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0) - || (info->shared && h->plt.refcount <= 0)) + if (h->plt.refcount <= 0 + || (! info->shared + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0 + && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0 + && h->root.type != bfd_link_hash_undefweak + && h->root.type != bfd_link_hash_undefined)) { /* This case can occur if we saw a PLT32 reloc in an input file, but the symbol was never referred to by a dynamic @@ -800,55 +940,16 @@ linkage table, and we can just do a PC32 reloc instead. */ h->plt.offset = (bfd_vma) -1; h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; - return true; - } - - /* Make sure this symbol is output as a dynamic symbol. */ - if (h->dynindx == -1) - { - if (! bfd_elf64_link_record_dynamic_symbol (info, h)) - return false; - } - - s = bfd_get_section_by_name (dynobj, ".plt"); - BFD_ASSERT (s != NULL); - - /* If this is the first .plt entry, make room for the special - first entry. */ - if (s->_raw_size == 0) - s->_raw_size = PLT_ENTRY_SIZE; - - /* If this symbol is not defined in a regular file, and we are - not generating a shared library, then set the symbol to this - location in the .plt. This is required to make function - pointers compare as equal between the normal executable and - the shared library. */ - if (! info->shared - && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) - { - h->root.u.def.section = s; - h->root.u.def.value = s->_raw_size; } - h->plt.offset = s->_raw_size; - - /* Make room for this entry. */ - s->_raw_size += PLT_ENTRY_SIZE; - - /* We also need to make an entry in the .got.plt section, which - will be placed in the .got section by the linker script. */ - s = bfd_get_section_by_name (dynobj, ".got.plt"); - BFD_ASSERT (s != NULL); - s->_raw_size += GOT_ENTRY_SIZE; - - /* We also need to make an entry in the .rela.plt section. */ - s = bfd_get_section_by_name (dynobj, ".rela.plt"); - BFD_ASSERT (s != NULL); - s->_raw_size += sizeof (Elf64_External_Rela); - return true; } else + /* It's possible that we incorrectly decided a .plt reloc was + needed for an R_X86_64_PC32 reloc to a non-function sym in + check_relocs. We can't decide accurately between function and + non-function syms in check-relocs; Objects loaded later in + the link may change h->type. So fix it now. */ h->plt.offset = (bfd_vma) -1; /* If this is a weak symbol, and there is a real definition, the @@ -878,6 +979,29 @@ if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0) return true; + /* If -z nocopyreloc was given, we won't generate them either. */ + if (info->nocopyreloc) + { + h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF; + return true; + } + + eh = (struct elf64_x86_64_link_hash_entry *) h; + for (p = eh->dyn_relocs; p != NULL; p = p->next) + { + s = p->sec->output_section; + if (s != NULL && (s->flags & SEC_READONLY) != 0) + break; + } + + /* If we didn't find any dynamic relocs in read-only sections, then + we'll be keeping the dynamic relocs and avoiding the copy reloc. */ + if (p == NULL) + { + h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF; + return true; + } + /* We must allocate the symbol in our .dynbss section, which will become part of the .bss section of the executable. There will be an entry for this symbol in the .dynsym section. The dynamic @@ -888,20 +1012,14 @@ both the dynamic object and the regular object will refer to the same memory location for the variable. */ - s = bfd_get_section_by_name (dynobj, ".dynbss"); - BFD_ASSERT (s != NULL); + htab = elf64_x86_64_hash_table (info); /* We must generate a R_X86_64_COPY reloc to tell the dynamic linker to copy the initial value out of the dynamic object and into the - runtime process image. We need to remember the offset into the - .rela.bss section we are going to use. */ + runtime process image. */ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0) { - asection *srel; - - srel = bfd_get_section_by_name (dynobj, ".rela.bss"); - BFD_ASSERT (srel != NULL); - srel->_raw_size += sizeof (Elf64_External_Rela); + htab->srelbss->_raw_size += sizeof (Elf64_External_Rela); h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY; } @@ -915,10 +1033,11 @@ power_of_two = 4; /* Apply the required alignment. */ + s = htab->sdynbss; s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two)); - if (power_of_two > bfd_get_section_alignment (dynobj, s)) + if (power_of_two > bfd_get_section_alignment (htab->elf.dynobj, s)) { - if (! bfd_set_section_alignment (dynobj, s, power_of_two)) + if (! bfd_set_section_alignment (htab->elf.dynobj, s, power_of_two)) return false; } @@ -932,6 +1051,223 @@ return true; } +/* This is the condition under which elf64_x86_64_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 elf64_x86_64_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)) + +/* Allocate space in .plt, .got and associated reloc sections for + dynamic relocs. */ + +static boolean +allocate_dynrelocs (h, inf) + struct elf_link_hash_entry *h; + PTR inf; +{ + struct bfd_link_info *info; + struct elf64_x86_64_link_hash_table *htab; + struct elf64_x86_64_link_hash_entry *eh; + struct elf64_x86_64_dyn_relocs *p; + + if (h->root.type == bfd_link_hash_indirect) + return true; + + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + + info = (struct bfd_link_info *) inf; + htab = elf64_x86_64_hash_table (info); + + if (htab->elf.dynamic_sections_created + && h->plt.refcount > 0) + { + /* Make sure this symbol is output as a dynamic symbol. + Undefined weak syms won't yet be marked as dynamic. */ + if (h->dynindx == -1 + && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) + { + if (! bfd_elf64_link_record_dynamic_symbol (info, h)) + return false; + } + + if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h)) + { + asection *s = htab->splt; + + /* If this is the first .plt entry, make room for the special + first entry. */ + if (s->_raw_size == 0) + s->_raw_size += PLT_ENTRY_SIZE; + + h->plt.offset = s->_raw_size; + + /* If this symbol is not defined in a regular file, and we are + not generating a shared library, then set the symbol to this + location in the .plt. This is required to make function + pointers compare as equal between the normal executable and + the shared library. */ + if (! info->shared + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) + { + h->root.u.def.section = s; + h->root.u.def.value = h->plt.offset; + } + + /* Make room for this entry. */ + s->_raw_size += PLT_ENTRY_SIZE; + + /* We also need to make an entry in the .got.plt section, which + will be placed in the .got section by the linker script. */ + htab->sgotplt->_raw_size += GOT_ENTRY_SIZE; + + /* We also need to make an entry in the .rela.plt section. */ + htab->srelplt->_raw_size += sizeof (Elf64_External_Rela); + } + else + { + h->plt.offset = (bfd_vma) -1; + h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; + } + } + else + { + h->plt.offset = (bfd_vma) -1; + h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; + } + + if (h->got.refcount > 0) + { + asection *s; + boolean dyn; + + /* Make sure this symbol is output as a dynamic symbol. + Undefined weak syms won't yet be marked as dynamic. */ + if (h->dynindx == -1 + && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) + { + if (! bfd_elf64_link_record_dynamic_symbol (info, h)) + return false; + } + + s = htab->sgot; + h->got.offset = s->_raw_size; + s->_raw_size += GOT_ENTRY_SIZE; + dyn = htab->elf.dynamic_sections_created; + if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h)) + htab->srelgot->_raw_size += sizeof (Elf64_External_Rela); + } + else + h->got.offset = (bfd_vma) -1; + + eh = (struct elf64_x86_64_link_hash_entry *) h; + if (eh->dyn_relocs == NULL) + return true; + + /* In the shared -Bsymbolic case, discard space allocated for + dynamic pc-relative relocs against symbols which turn out to be + defined in regular objects. For the normal shared case, discard + space for pc-relative relocs that have become local due to symbol + visibility changes. */ + + if (info->shared) + { + if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0 + && ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0 + || info->symbolic)) + { + struct elf64_x86_64_dyn_relocs **pp; + + for (pp = &eh->dyn_relocs; (p = *pp) != NULL; ) + { + p->count -= p->pc_count; + p->pc_count = 0; + if (p->count == 0) + *pp = p->next; + else + pp = &p->next; + } + } + } + else + { + /* For the non-shared case, discard space for relocs against + symbols which turn out to need copy relocs or are not + dynamic. */ + + if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0 + && (((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0 + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) + || (htab->elf.dynamic_sections_created + && (h->root.type == bfd_link_hash_undefweak + || h->root.type == bfd_link_hash_undefined)))) + { + /* Make sure this symbol is output as a dynamic symbol. + Undefined weak syms won't yet be marked as dynamic. */ + if (h->dynindx == -1 + && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) + { + if (! bfd_elf64_link_record_dynamic_symbol (info, h)) + return false; + } + + /* If that succeeded, we know we'll be keeping all the + relocs. */ + if (h->dynindx != -1) + goto keep; + } + + eh->dyn_relocs = NULL; + + keep: ; + } + + /* Finally, allocate space. */ + for (p = eh->dyn_relocs; p != NULL; p = p->next) + { + asection *sreloc = elf_section_data (p->sec)->sreloc; + sreloc->_raw_size += p->count * sizeof (Elf64_External_Rela); + } + + return true; +} + +/* Find any dynamic relocs that apply to read-only sections. */ + +static boolean +readonly_dynrelocs (h, inf) + struct elf_link_hash_entry *h; + PTR inf; +{ + struct elf64_x86_64_link_hash_entry *eh; + struct elf64_x86_64_dyn_relocs *p; + + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + + eh = (struct elf64_x86_64_link_hash_entry *) h; + for (p = eh->dyn_relocs; p != NULL; p = p->next) + { + asection *s = p->sec->output_section; + + if (s != NULL && (s->flags & SEC_READONLY) != 0) + { + struct bfd_link_info *info = (struct bfd_link_info *) inf; + + info->flags |= DF_TEXTREL; + + /* Not an error, just cut short the traversal. */ + return false; + } + } + return true; +} + /* Set the sizes of the dynamic sections. */ static boolean @@ -939,110 +1275,140 @@ bfd *output_bfd ATTRIBUTE_UNUSED; struct bfd_link_info *info; { + struct elf64_x86_64_link_hash_table *htab; bfd *dynobj; asection *s; - boolean plt; boolean relocs; + bfd *ibfd; - dynobj = elf_hash_table (info)->dynobj; - BFD_ASSERT (dynobj != NULL); + htab = elf64_x86_64_hash_table (info); + dynobj = htab->elf.dynobj; + if (dynobj == NULL) + abort (); - if (elf_hash_table (info)->dynamic_sections_created) + if (htab->elf.dynamic_sections_created) { /* Set the contents of the .interp section to the interpreter. */ if (! info->shared) { s = bfd_get_section_by_name (dynobj, ".interp"); - BFD_ASSERT (s != NULL); + if (s == NULL) + abort (); s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER; s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER; } } - else - { - /* 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. */ - s = bfd_get_section_by_name (dynobj, ".rela.got"); - if (s != NULL) - s->_raw_size = 0; - } - /* If this is a -Bsymbolic shared link, then we need to discard all - PC relative relocs against symbols defined in a regular object. - We allocated space for them in the check_relocs routine, but we - will not fill them in in the relocate_section routine. */ - if (info->shared) - elf64_x86_64_link_hash_traverse (elf64_x86_64_hash_table (info), - elf64_x86_64_discard_copies, - (PTR) info); - - /* The check_relocs and adjust_dynamic_symbol entry points have - determined the sizes of the various dynamic sections. Allocate - memory for them. */ - plt = relocs = false; - for (s = dynobj->sections; s != NULL; s = s->next) - { - const char *name; - boolean strip; + /* Set up .got offsets for local syms, and space for local dynamic + relocs. */ + for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next) + { + bfd_signed_vma *local_got; + bfd_signed_vma *end_local_got; + bfd_size_type locsymcount; + Elf_Internal_Shdr *symtab_hdr; + asection *srel; - if ((s->flags & SEC_LINKER_CREATED) == 0) + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour) continue; - /* It's OK to base decisions on the section name, because none - of the dynobj section names depend upon the input files. */ - name = bfd_get_section_name (dynobj, s); - - strip = false; - if (strcmp (name, ".plt") == 0) + for (s = ibfd->sections; s != NULL; s = s->next) { - if (s->_raw_size == 0) - { - /* Strip this section if we don't need it; see the - comment below. */ - strip = true; - } - else + struct elf64_x86_64_dyn_relocs *p; + + for (p = *((struct elf64_x86_64_dyn_relocs **) + &elf_section_data (s)->local_dynrel); + p != NULL; + p = p->next) { - /* Remember whether there is a PLT. */ - plt = true; + if (!bfd_is_abs_section (p->sec) + && bfd_is_abs_section (p->sec->output_section)) + { + /* Input section has been discarded, either because + it is a copy of a linkonce section or due to + linker script /DISCARD/, so we'll be discarding + the relocs too. */ + } + else if (p->count != 0) + { + srel = elf_section_data (p->sec)->sreloc; + srel->_raw_size += p->count * sizeof (Elf64_External_Rela); + if ((p->sec->output_section->flags & SEC_READONLY) != 0) + info->flags |= DF_TEXTREL; + + } } } - else if (strncmp (name, ".rela", 5) == 0) + + local_got = elf_local_got_refcounts (ibfd); + if (!local_got) + continue; + + symtab_hdr = &elf_tdata (ibfd)->symtab_hdr; + locsymcount = symtab_hdr->sh_info; + end_local_got = local_got + locsymcount; + s = htab->sgot; + srel = htab->srelgot; + for (; local_got < end_local_got; ++local_got) { - if (s->_raw_size == 0) + if (*local_got > 0) { - /* If we don't need this section, strip it from the - output file. This is mostly to handle .rela.bss and - .rela.plt. We must create both sections in - create_dynamic_sections, because they must be created - before the linker maps input sections to output - sections. The linker does that before - adjust_dynamic_symbol is called, and it is that - function which decides whether anything needs to go - into these sections. */ - strip = true; + *local_got = s->_raw_size; + s->_raw_size += GOT_ENTRY_SIZE; + if (info->shared) + srel->_raw_size += sizeof (Elf64_External_Rela); } else - { - if (strcmp (name, ".rela.plt") != 0) - relocs = true; + *local_got = (bfd_vma) -1; + } + } - /* We use the reloc_count field as a counter if we need - to copy relocs into the output file. */ - s->reloc_count = 0; - } + /* Allocate global sym .plt and .got entries, and space for global + sym dynamic relocs. */ + elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info); + + /* We now have determined the sizes of the various dynamic sections. + Allocate memory for them. */ + relocs = false; + for (s = dynobj->sections; s != NULL; s = s->next) + { + if ((s->flags & SEC_LINKER_CREATED) == 0) + continue; + + if (s == htab->splt + || s == htab->sgot + || s == htab->sgotplt) + { + /* Strip this section if we don't need it; see the + comment below. */ } - else if (strncmp (name, ".got", 4) != 0) + else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0) + { + if (s->_raw_size != 0 && s != htab->srelplt) + relocs = true; + + /* We use the reloc_count field as a counter if we need + to copy relocs into the output file. */ + s->reloc_count = 0; + } + else { /* It's not one of our sections, so don't allocate space. */ continue; } - if (strip) + if (s->_raw_size == 0) { + /* If we don't need this section, strip it from the + output file. This is mostly to handle .rela.bss and + .rela.plt. We must create both sections in + create_dynamic_sections, because they must be created + before the linker maps input sections to output + sections. The linker does that before + adjust_dynamic_symbol is called, and it is that + function which decides whether anything needs to go + into these sections. */ + _bfd_strip_section_from_output (info, s); continue; } @@ -1053,11 +1419,11 @@ but this way if it does, we get a R_X86_64_NONE reloc instead of garbage. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size); - if (s->contents == NULL && s->_raw_size != 0) + if (s->contents == NULL) return false; } - if (elf_hash_table (info)->dynamic_sections_created) + if (htab->elf.dynamic_sections_created) { /* Add some entries to the .dynamic section. We fill in the values later, in elf64_x86_64_finish_dynamic_sections, but we @@ -1073,7 +1439,7 @@ return false; } - if (plt) + if (htab->splt->_raw_size != 0) { if (!add_dynamic_entry (DT_PLTGOT, 0) || !add_dynamic_entry (DT_PLTRELSZ, 0) @@ -1088,12 +1454,18 @@ || !add_dynamic_entry (DT_RELASZ, 0) || !add_dynamic_entry (DT_RELAENT, sizeof (Elf64_External_Rela))) return false; - } - if ((info->flags & DF_TEXTREL) != 0) - { - if (!add_dynamic_entry (DT_TEXTREL, 0)) - return false; + /* If any dynamic relocs apply to a read-only section, + then we need a DT_TEXTREL entry. */ + if ((info->flags & DF_TEXTREL) == 0) + elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, + (PTR) info); + + if ((info->flags & DF_TEXTREL) != 0) + { + if (!add_dynamic_entry (DT_TEXTREL, 0)) + return false; + } } } #undef add_dynamic_entry @@ -1101,37 +1473,6 @@ return true; } -/* This function is called via elf64_x86_64_link_hash_traverse if we are - creating a shared object. In the -Bsymbolic case, it discards the - space allocated to copy PC relative relocs against symbols which - are defined in regular objects. For the normal non-symbolic case, - we also discard space for relocs that have become local due to - symbol visibility changes. We allocated space for them in the - check_relocs routine, but we won't fill them in in the - relocate_section routine. */ - -static boolean -elf64_x86_64_discard_copies (h, inf) - struct elf64_x86_64_link_hash_entry *h; - PTR inf; -{ - struct elf64_x86_64_pcrel_relocs_copied *s; - struct bfd_link_info *info = (struct bfd_link_info *) inf; - - /* If a symbol has been forced local or we have found a regular - definition for the symbolic link case, then we won't be needing - any relocs. */ - if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0 - && ((h->root.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0 - || info->symbolic)) - { - for (s = h->pcrel_relocs_copied; s != NULL; s = s->next) - s->section->_raw_size -= s->count * sizeof (Elf64_External_Rela); - } - - return true; -} - /* Relocate an x86_64 ELF section. */ static boolean @@ -1146,31 +1487,24 @@ Elf_Internal_Sym *local_syms; asection **local_sections; { - bfd *dynobj; + struct elf64_x86_64_link_hash_table *htab; Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; bfd_vma *local_got_offsets; - asection *sgot; - asection *splt; - asection *sreloc; - Elf_Internal_Rela *rela; + Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; - dynobj = elf_hash_table (info)->dynobj; + if (info->relocateable) + return true; + + htab = elf64_x86_64_hash_table (info); symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); local_got_offsets = elf_local_got_offsets (input_bfd); - sreloc = splt = sgot = NULL; - if (dynobj != NULL) - { - splt = bfd_get_section_by_name (dynobj, ".plt"); - sgot = bfd_get_section_by_name (dynobj, ".got"); - } - - rela = relocs; + rel = relocs; relend = relocs + input_section->reloc_count; - for (; rela < relend; rela++) + for (; rel < relend; rel++) { int r_type; reloc_howto_type *howto; @@ -1178,52 +1512,34 @@ struct elf_link_hash_entry *h; Elf_Internal_Sym *sym; asection *sec; + bfd_vma off; bfd_vma relocation; + boolean unresolved_reloc; bfd_reloc_status_type r; - unsigned int indx; - r_type = ELF64_R_TYPE (rela->r_info); + r_type = ELF64_R_TYPE (rel->r_info); if (r_type == (int) R_X86_64_GNU_VTINHERIT || r_type == (int) R_X86_64_GNU_VTENTRY) continue; - if ((indx = (unsigned) r_type) >= R_X86_64_max) + if (r_type < 0 || r_type >= R_X86_64_max) { bfd_set_error (bfd_error_bad_value); return false; } - howto = x86_64_elf_howto_table + indx; - - r_symndx = ELF64_R_SYM (rela->r_info); - - if (info->relocateable) - { - /* This is a relocateable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sec = local_sections[r_symndx]; - rela->r_addend += sec->output_offset + sym->st_value; - } - } - - continue; - } - /* This is a final link. */ + howto = x86_64_elf_howto_table + r_type; + r_symndx = ELF64_R_SYM (rel->r_info); h = NULL; sym = NULL; sec = NULL; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; sec = local_sections[r_symndx]; - relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rela); + + relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); } else { @@ -1231,50 +1547,18 @@ while (h->root.type == bfd_link_hash_indirect || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) { sec = h->root.u.def.section; - 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) - && elf_hash_table (info)->dynamic_sections_created - && (!info->shared - || (! info->symbolic && h->dynindx != -1) - || (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) == 0)) - || (info->shared - && ((! info->symbolic && h->dynindx != -1) - || (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) == 0) - && (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) - && ((input_section->flags & SEC_ALLOC) != 0 - /* DWARF will emit R_X86_64_32 relocations in its - sections against symbols defined externally - in shared libraries. We can't do anything - with them here. */ - || ((input_section->flags & SEC_DEBUGGING) != 0 - && (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_DYNAMIC) != 0)))) - { - /* In these cases, we don't need the relocation - value. We check specially because in some - obscure cases sec->output_section will be NULL. */ - relocation = 0; - } - else if (sec->output_section == NULL) + if (sec->output_section == NULL) { - (*_bfd_error_handler) - (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"), - bfd_archive_filename (input_bfd), h->root.root.string, - bfd_get_section_name (input_bfd, input_section)); + /* Set a flag that will be cleared later if we find a + relocation value for this symbol. output_section + is typically NULL for symbols satisfied by a shared + library. */ + unresolved_reloc = true; relocation = 0; } else @@ -1293,14 +1577,13 @@ { if (! ((*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, - input_section, rela->r_offset, + input_section, rel->r_offset, (!info->shared || info->no_undefined || ELF_ST_VISIBILITY (h->other))))) return false; relocation = 0; } } - /* When generating a shared object, the relocations handled here are copied into the output file to be resolved at run time. */ switch (r_type) @@ -1310,16 +1593,21 @@ offset table. */ case R_X86_64_GOTPCREL: /* Use global offset table as symbol value. */ - BFD_ASSERT (sgot != NULL); + if (htab->sgot == NULL) + abort (); if (h != NULL) { - bfd_vma off = h->got.offset; - BFD_ASSERT (off != (bfd_vma) -1); + boolean dyn; + + off = h->got.offset; + dyn = htab->elf.dynamic_sections_created; - if (! elf_hash_table (info)->dynamic_sections_created + if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h) || (info->shared - && (info->symbolic || h->dynindx == -1) + && (info->symbolic + || h->dynindx == -1 + || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL)) && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))) { /* This is actually a static link, or it is a -Bsymbolic @@ -1338,21 +1626,17 @@ else { bfd_put_64 (output_bfd, relocation, - sgot->contents + off); + htab->sgot->contents + off); h->got.offset |= 1; } } - if (r_type == R_X86_64_GOTPCREL) - relocation = sgot->output_section->vma + sgot->output_offset + off; else - relocation = sgot->output_offset + off; + unresolved_reloc = false; } else { - bfd_vma off; - - BFD_ASSERT (local_got_offsets != NULL - && local_got_offsets[r_symndx] != (bfd_vma) -1); + if (local_got_offsets == NULL) + abort (); off = local_got_offsets[r_symndx]; @@ -1363,39 +1647,42 @@ off &= ~1; else { - bfd_put_64 (output_bfd, relocation, sgot->contents + off); + bfd_put_64 (output_bfd, relocation, + htab->sgot->contents + off); if (info->shared) { asection *srelgot; Elf_Internal_Rela outrel; + Elf64_External_Rela *loc; /* 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); + srelgot = htab->srelgot; + if (srelgot == NULL) + abort (); - outrel.r_offset = (sgot->output_section->vma - + sgot->output_offset + outrel.r_offset = (htab->sgot->output_section->vma + + htab->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; + loc = (Elf64_External_Rela *) srelgot->contents; + loc += srelgot->reloc_count++; + bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc); } local_got_offsets[r_symndx] |= 1; } - - if (r_type == R_X86_64_GOTPCREL) - relocation = sgot->output_section->vma + sgot->output_offset + off; - else - relocation = sgot->output_offset + off; } + if (off >= (bfd_vma) -2) + abort (); + + relocation = htab->sgot->output_offset + off; + if (r_type == R_X86_64_GOTPCREL) + relocation += htab->sgot->output_section->vma; + break; case R_X86_64_PLT32: @@ -1407,7 +1694,8 @@ if (h == NULL) break; - if (h->plt.offset == (bfd_vma) -1 || splt == NULL) + if (h->plt.offset == (bfd_vma) -1 + || htab->splt == NULL) { /* We didn't make a PLT entry for this symbol. This happens when statically linking PIC code, or when @@ -1415,62 +1703,64 @@ break; } - relocation = (splt->output_section->vma - + splt->output_offset + relocation = (htab->splt->output_section->vma + + htab->splt->output_offset + h->plt.offset); + unresolved_reloc = false; break; case R_X86_64_PC8: case R_X86_64_PC16: case R_X86_64_PC32: - if (h == NULL || h->dynindx == -1 - || (info->symbolic - && h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)) - 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 the same when it's zeroextended to 64 bit. */ - if (info->shared - && r_symndx != 0 - && (input_section->flags & SEC_ALLOC) != 0) + + /* r_symndx will be zero only for relocs against symbols + from removed linkonce sections, or sections discarded by + a linker script. */ + if (r_symndx == 0 + || (input_section->flags & SEC_ALLOC) == 0) + break; + + if ((info->shared + && ((r_type != R_X86_64_PC8 + && r_type != R_X86_64_PC16 + && r_type != R_X86_64_PC32) + || (h != NULL + && h->dynindx != -1 + && (! info->symbolic + || (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_REGULAR) == 0)))) + || (!info->shared + && h != NULL + && h->dynindx != -1 + && (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0 + && (((h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_DYNAMIC) != 0 + && (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_REGULAR) == 0) + || h->root.type == bfd_link_hash_undefweak + || h->root.type == bfd_link_hash_undefined))) { Elf_Internal_Rela outrel; boolean skip, relocate; + asection *sreloc; + Elf64_External_Rela *loc; /* When generating a shared object, these relocations are copied into the output file to be resolved at run time. */ - if (sreloc == NULL) - { - const char *name; - - name = (bfd_elf_string_from_elf_section - (input_bfd, - elf_elfheader (input_bfd)->e_shstrndx, - elf_section_data (input_section)->rel_hdr.sh_name)); - if (name == NULL) - return false; - - BFD_ASSERT (strncmp (name, ".rela", 5) == 0 - && strcmp (bfd_get_section_name (input_bfd, - input_section), - name + 5) == 0); - - sreloc = bfd_get_section_by_name (dynobj, name); - BFD_ASSERT (sreloc != NULL); - } - skip = false; relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, - rela->r_offset); + rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) skip = true; else if (outrel.r_offset == (bfd_vma) -2) @@ -1481,65 +1771,37 @@ if (skip) memset (&outrel, 0, sizeof outrel); + /* h->dynindx may be -1 if this symbol was marked to become local. */ else if (h != NULL - && ((! info->symbolic && h->dynindx != -1) + && h->dynindx != -1 + && (r_type == R_X86_64_PC8 + || r_type == R_X86_64_PC16 + || r_type == R_X86_64_PC32 + || !info->shared + || !info->symbolic || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)) { - BFD_ASSERT (h->dynindx != -1); outrel.r_info = ELF64_R_INFO (h->dynindx, r_type); - outrel.r_addend = relocation + rela->r_addend; + outrel.r_addend = rel->r_addend; } else { - if (r_type == R_X86_64_64) - { - relocate = true; - outrel.r_info = ELF64_R_INFO (0, R_X86_64_RELATIVE); - outrel.r_addend = relocation + rela->r_addend; - } - else - { - long sindx; - - 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)) - sindx = 0; - else if (sec == NULL || sec->owner == NULL) - { - bfd_set_error (bfd_error_bad_value); - return false; - } - else - { - asection *osec; - - osec = sec->output_section; - sindx = elf_section_data (osec)->dynindx; - BFD_ASSERT (sindx > 0); - } - - outrel.r_info = ELF64_R_INFO (sindx, r_type); - outrel.r_addend = relocation + rela->r_addend; - } - + /* This symbol is local, or marked to become local. */ + relocate = true; + outrel.r_info = ELF64_R_INFO (0, R_X86_64_RELATIVE); + outrel.r_addend = relocation + rel->r_addend; } - bfd_elf64_swap_reloca_out (output_bfd, &outrel, - (((Elf64_External_Rela *) - sreloc->contents) - + sreloc->reloc_count)); - ++sreloc->reloc_count; + sreloc = elf_section_data (input_section)->sreloc; + if (sreloc == NULL) + abort (); + + loc = (Elf64_External_Rela *) sreloc->contents; + loc += sreloc->reloc_count++; + bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc); /* If this reloc is against an external symbol, we do not want to fiddle with the addend. Otherwise, we @@ -1555,39 +1817,59 @@ break; } + /* FIXME: Why do we allow debugging sections to escape this error? + More importantly, why do we not emit dynamic relocs for + R_386_32 above in debugging sections (which are ! SEC_ALLOC)? + If we had emitted the dynamic reloc, we could remove the + fudge here. */ + if (unresolved_reloc + && !(info->shared + && (input_section->flags & SEC_DEBUGGING) != 0 + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0)) + (*_bfd_error_handler) + (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"), + bfd_archive_filename (input_bfd), + bfd_get_section_name (input_bfd, input_section), + (long) rel->r_offset, + h->root.root.string); + r = _bfd_final_link_relocate (howto, input_bfd, input_section, - contents, rela->r_offset, - relocation, rela->r_addend); + contents, rel->r_offset, + relocation, rel->r_addend); if (r != bfd_reloc_ok) { - switch (r) + const char *name; + + if (h != NULL) + name = h->root.root.string; + else { - default: - case bfd_reloc_outofrange: - abort (); - case bfd_reloc_overflow: - { - const char *name; - - if (h != NULL) - name = h->root.root.string; - else - { - name = bfd_elf_string_from_elf_section (input_bfd, - symtab_hdr->sh_link, - sym->st_name); - if (name == NULL) - return false; - if (*name == '\0') - name = bfd_section_name (input_bfd, sec); - } - if (! ((*info->callbacks->reloc_overflow) - (info, name, howto->name, (bfd_vma) 0, - input_bfd, input_section, rela->r_offset))) - return false; - } - break; + name = bfd_elf_string_from_elf_section (input_bfd, + symtab_hdr->sh_link, + sym->st_name); + if (name == NULL) + return false; + if (*name == '\0') + name = bfd_section_name (input_bfd, sec); + } + + if (r == bfd_reloc_overflow) + { + + if (! ((*info->callbacks->reloc_overflow) + (info, name, howto->name, (bfd_vma) 0, + input_bfd, input_section, rel->r_offset))) + return false; + } + else + { + (*_bfd_error_handler) + (_("%s(%s+0x%lx): reloc against `%s': error %d"), + bfd_archive_filename (input_bfd), + bfd_get_section_name (input_bfd, input_section), + (long) rel->r_offset, name, (int) r); + return false; } } } @@ -1605,28 +1887,25 @@ struct elf_link_hash_entry *h; Elf_Internal_Sym *sym; { - bfd *dynobj; + struct elf64_x86_64_link_hash_table *htab; - dynobj = elf_hash_table (info)->dynobj; + htab = elf64_x86_64_hash_table (info); if (h->plt.offset != (bfd_vma) -1) { - asection *splt; - asection *sgot; - asection *srela; bfd_vma plt_index; bfd_vma got_offset; Elf_Internal_Rela rela; + Elf64_External_Rela *loc; /* This symbol has an entry in the procedure linkage table. Set it up. */ - BFD_ASSERT (h->dynindx != -1); - - splt = bfd_get_section_by_name (dynobj, ".plt"); - sgot = bfd_get_section_by_name (dynobj, ".got.plt"); - srela = bfd_get_section_by_name (dynobj, ".rela.plt"); - BFD_ASSERT (splt != NULL && sgot != NULL && srela != NULL); + if (h->dynindx == -1 + || htab->splt == NULL + || htab->sgotplt == NULL + || htab->srelplt == NULL) + abort (); /* Get the index in the procedure linkage table which corresponds to this symbol. This is the index of this symbol @@ -1640,7 +1919,7 @@ got_offset = (plt_index + 3) * GOT_ENTRY_SIZE; /* Fill in the entry in the procedure linkage table. */ - memcpy (splt->contents + h->plt.offset, elf64_x86_64_plt_entry, + memcpy (htab->splt->contents + h->plt.offset, elf64_x86_64_plt_entry, PLT_ENTRY_SIZE); /* Insert the relocation positions of the plt section. The magic @@ -1649,67 +1928,61 @@ /* 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 + (htab->sgotplt->output_section->vma + + htab->sgotplt->output_offset + got_offset - - splt->output_section->vma - - splt->output_offset + - htab->splt->output_section->vma + - htab->splt->output_offset - h->plt.offset - 6), - splt->contents + h->plt.offset + 2); + htab->splt->contents + h->plt.offset + 2); /* Put relocation index. */ bfd_put_32 (output_bfd, plt_index, - splt->contents + h->plt.offset + 7); + htab->splt->contents + h->plt.offset + 7); /* Put offset for jmp .PLT0. */ bfd_put_32 (output_bfd, - (h->plt.offset + PLT_ENTRY_SIZE), - splt->contents + h->plt.offset + 12); + htab->splt->contents + h->plt.offset + 12); /* Fill in the entry in the global offset table, initially this points to the pushq instruction in the PLT which is at offset 6. */ - bfd_put_64 (output_bfd, (splt->output_section->vma + splt->output_offset + bfd_put_64 (output_bfd, (htab->splt->output_section->vma + + htab->splt->output_offset + h->plt.offset + 6), - sgot->contents + got_offset); + htab->sgotplt->contents + got_offset); /* Fill in the entry in the .rela.plt section. */ - rela.r_offset = (sgot->output_section->vma - + sgot->output_offset + rela.r_offset = (htab->sgotplt->output_section->vma + + htab->sgotplt->output_offset + got_offset); rela.r_info = ELF64_R_INFO (h->dynindx, R_X86_64_JUMP_SLOT); rela.r_addend = 0; - bfd_elf64_swap_reloca_out (output_bfd, &rela, - ((Elf64_External_Rela *) srela->contents - + plt_index)); + loc = (Elf64_External_Rela *) htab->srelplt->contents + plt_index; + bfd_elf64_swap_reloca_out (output_bfd, &rela, loc); if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) { /* Mark the symbol as undefined, rather than as defined in - the .plt section. Leave the value alone. */ + the .plt section. Leave the value alone. This is a clue + for the dynamic linker, to make function pointer + comparisons work between an application and shared + library. */ sym->st_shndx = SHN_UNDEF; - /* 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; } } if (h->got.offset != (bfd_vma) -1) { - asection *sgot; - asection *srela; Elf_Internal_Rela rela; + Elf64_External_Rela *loc; /* 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); + if (htab->sgot == NULL || htab->srelgot == NULL) + abort (); - rela.r_offset = (sgot->output_section->vma - + sgot->output_offset + rela.r_offset = (htab->sgot->output_section->vma + + htab->sgot->output_offset + (h->got.offset &~ (bfd_vma) 1)); /* If this is a static link, or it is a -Bsymbolic link and the @@ -1717,10 +1990,11 @@ 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))) + if (info->shared + && (info->symbolic + || h->dynindx == -1 + || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL)) + && (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); @@ -1731,41 +2005,38 @@ else { BFD_ASSERT((h->got.offset & 1) == 0); - bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset); + bfd_put_64 (output_bfd, (bfd_vma) 0, + htab->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; + loc = (Elf64_External_Rela *) htab->srelgot->contents; + loc += htab->srelgot->reloc_count++; + bfd_elf64_swap_reloca_out (output_bfd, &rela, loc); } if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0) { - asection *s; Elf_Internal_Rela rela; + Elf64_External_Rela *loc; /* This symbol needs a copy reloc. Set it up. */ - BFD_ASSERT (h->dynindx != -1 - && (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak)); - - s = bfd_get_section_by_name (h->root.u.def.section->owner, - ".rela.bss"); - BFD_ASSERT (s != NULL); + if (h->dynindx == -1 + || (h->root.type != bfd_link_hash_defined + && h->root.type != bfd_link_hash_defweak) + || htab->srelbss == NULL) + abort (); rela.r_offset = (h->root.u.def.value + h->root.u.def.section->output_section->vma + h->root.u.def.section->output_offset); rela.r_info = ELF64_R_INFO (h->dynindx, R_X86_64_COPY); rela.r_addend = 0; - bfd_elf64_swap_reloca_out (output_bfd, &rela, - ((Elf64_External_Rela *) s->contents - + s->reloc_count)); - ++s->reloc_count; + loc = (Elf64_External_Rela *) htab->srelbss->contents; + loc += htab->srelbss->reloc_count++; + bfd_elf64_swap_reloca_out (output_bfd, &rela, loc); } /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */ @@ -1776,6 +2047,26 @@ return true; } +/* Used to decide how to sort relocs in an optimal manner for the + dynamic linker, before writing them out. */ + +static enum elf_reloc_type_class +elf64_x86_64_reloc_type_class (rela) + const Elf_Internal_Rela *rela; +{ + switch ((int) ELF64_R_TYPE (rela->r_info)) + { + case R_X86_64_RELATIVE: + return reloc_class_relative; + case R_X86_64_JUMP_SLOT: + return reloc_class_plt; + case R_X86_64_COPY: + return reloc_class_copy; + default: + return reloc_class_normal; + } +} + /* Finish up the dynamic sections. */ static boolean @@ -1783,29 +2074,26 @@ bfd *output_bfd; struct bfd_link_info *info; { + struct elf64_x86_64_link_hash_table *htab; bfd *dynobj; asection *sdyn; - asection *sgot; - - dynobj = elf_hash_table (info)->dynobj; - sgot = bfd_get_section_by_name (dynobj, ".got.plt"); - BFD_ASSERT (sgot != NULL); + htab = elf64_x86_64_hash_table (info); + dynobj = htab->elf.dynobj; sdyn = bfd_get_section_by_name (dynobj, ".dynamic"); - if (elf_hash_table (info)->dynamic_sections_created) + if (htab->elf.dynamic_sections_created) { - asection *splt; Elf64_External_Dyn *dyncon, *dynconend; - BFD_ASSERT (sdyn != NULL); + if (sdyn == NULL || htab->sgot == NULL) + abort (); dyncon = (Elf64_External_Dyn *) sdyn->contents; dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size); for (; dyncon < dynconend; dyncon++) { Elf_Internal_Dyn dyn; - const char *name; asection *s; bfd_elf64_swap_dyn_in (dynobj, dyncon, &dyn); @@ -1816,115 +2104,100 @@ continue; case DT_PLTGOT: - name = ".got"; - goto get_vma; + dyn.d_un.d_ptr = htab->sgot->output_section->vma; + break; case DT_JMPREL: - name = ".rela.plt"; + dyn.d_un.d_ptr = htab->srelplt->output_section->vma; + break; - get_vma: - s = bfd_get_section_by_name (output_bfd, name); - BFD_ASSERT (s != NULL); - dyn.d_un.d_ptr = s->vma; + case DT_PLTRELSZ: + s = htab->srelplt->output_section; + if (s->_cooked_size != 0) + dyn.d_un.d_val = s->_cooked_size; + else + dyn.d_un.d_val = s->_raw_size; break; case DT_RELASZ: - /* FIXME: This comment and code is from elf64-alpha.c: */ - /* My interpretation of the TIS v1.1 ELF document indicates - that RELASZ should not include JMPREL. This is not what - the rest of the BFD does. It is, however, what the - glibc ld.so wants. Do this fixup here until we found - out who is right. */ - s = bfd_get_section_by_name (output_bfd, ".rela.plt"); - if (s) + /* The procedure linkage table relocs (DT_JMPREL) should + not be included in the overall relocs (DT_RELA). + Therefore, we override the DT_RELASZ entry here to + make it not include the JMPREL relocs. Since the + linker script arranges for .rela.plt to follow all + other relocation sections, we don't have to worry + about changing the DT_RELA entry. */ + if (htab->srelplt != NULL) { - /* Subtract JMPREL size from RELASZ. */ - dyn.d_un.d_val -= - (s->_cooked_size ? s->_cooked_size : s->_raw_size); + s = htab->srelplt->output_section; + if (s->_cooked_size != 0) + dyn.d_un.d_val -= s->_cooked_size; + else + dyn.d_un.d_val -= s->_raw_size; } break; - - case DT_PLTRELSZ: - s = bfd_get_section_by_name (output_bfd, ".rela.plt"); - BFD_ASSERT (s != NULL); - dyn.d_un.d_val = - (s->_cooked_size != 0 ? s->_cooked_size : s->_raw_size); - break; } + bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon); } - /* Initialize the contents of the .plt section. */ - splt = bfd_get_section_by_name (dynobj, ".plt"); - BFD_ASSERT (splt != NULL); - if (splt->_raw_size > 0) + /* Fill in the special first entry in the procedure linkage table. */ + if (htab->splt && htab->splt->_raw_size > 0) { /* Fill in the first entry in the procedure linkage table. */ - memcpy (splt->contents, elf64_x86_64_plt0_entry, PLT_ENTRY_SIZE); + memcpy (htab->splt->contents, elf64_x86_64_plt0_entry, + PLT_ENTRY_SIZE); /* 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 + (htab->sgotplt->output_section->vma + + htab->sgotplt->output_offset + 8 - - splt->output_section->vma - - splt->output_offset + - htab->splt->output_section->vma + - htab->splt->output_offset - 6), - splt->contents + 2); + htab->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 + (htab->sgotplt->output_section->vma + + htab->sgotplt->output_offset + 16 - - splt->output_section->vma - - splt->output_offset + - htab->splt->output_section->vma + - htab->splt->output_offset - 12), - splt->contents + 8); + htab->splt->contents + 8); + elf_section_data (htab->splt->output_section)->this_hdr.sh_entsize = + PLT_ENTRY_SIZE; } - - elf_section_data (splt->output_section)->this_hdr.sh_entsize = - PLT_ENTRY_SIZE; } - /* Set the first entry in the global offset table to the address of - the dynamic section. */ - if (sgot->_raw_size > 0) + if (htab->sgotplt) { - if (sdyn == NULL) - bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents); - else - bfd_put_64 (output_bfd, - sdyn->output_section->vma + sdyn->output_offset, - sgot->contents); - /* Write GOT[1] and GOT[2], needed for the dynamic linker. */ - bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + GOT_ENTRY_SIZE); - bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + GOT_ENTRY_SIZE*2); - } + /* Fill in the first three entries in the global offset table. */ + if (htab->sgotplt->_raw_size > 0) + { + /* Set the first entry in the global offset table to the address of + the dynamic section. */ + if (sdyn == NULL) + bfd_put_64 (output_bfd, (bfd_vma) 0, htab->sgotplt->contents); + else + bfd_put_64 (output_bfd, + sdyn->output_section->vma + sdyn->output_offset, + htab->sgotplt->contents); + /* Write GOT[1] and GOT[2], needed for the dynamic linker. */ + bfd_put_64 (output_bfd, (bfd_vma) 0, htab->sgotplt->contents + GOT_ENTRY_SIZE); + bfd_put_64 (output_bfd, (bfd_vma) 0, htab->sgotplt->contents + GOT_ENTRY_SIZE*2); + } - elf_section_data (sgot->output_section)->this_hdr.sh_entsize = - GOT_ENTRY_SIZE; + elf_section_data (htab->sgotplt->output_section)->this_hdr.sh_entsize = + GOT_ENTRY_SIZE; + } return true; } -static enum elf_reloc_type_class -elf64_x86_64_reloc_type_class (rela) - const Elf_Internal_Rela *rela; -{ - switch ((int) ELF64_R_TYPE (rela->r_info)) - { - case R_X86_64_RELATIVE: - return reloc_class_relative; - case R_X86_64_JUMP_SLOT: - return reloc_class_plt; - case R_X86_64_COPY: - return reloc_class_copy; - default: - return reloc_class_normal; - } -} #define TARGET_LITTLE_SYM bfd_elf64_x86_64_vec #define TARGET_LITTLE_NAME "elf64-x86-64" @@ -1939,25 +2212,25 @@ #define elf_backend_want_plt_sym 0 #define elf_backend_got_header_size (GOT_ENTRY_SIZE*3) #define elf_backend_plt_header_size PLT_ENTRY_SIZE +#define elf_backend_rela_normal 1 #define elf_info_to_howto elf64_x86_64_info_to_howto -#define bfd_elf64_bfd_final_link _bfd_elf64_gc_common_final_link #define bfd_elf64_bfd_link_hash_table_create \ elf64_x86_64_link_hash_table_create #define bfd_elf64_bfd_reloc_type_lookup elf64_x86_64_reloc_type_lookup #define elf_backend_adjust_dynamic_symbol elf64_x86_64_adjust_dynamic_symbol #define elf_backend_check_relocs elf64_x86_64_check_relocs -#define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections -#define elf_backend_finish_dynamic_sections \ - elf64_x86_64_finish_dynamic_sections +#define elf_backend_copy_indirect_symbol elf64_x86_64_copy_indirect_symbol +#define elf_backend_create_dynamic_sections elf64_x86_64_create_dynamic_sections +#define elf_backend_finish_dynamic_sections elf64_x86_64_finish_dynamic_sections #define elf_backend_finish_dynamic_symbol elf64_x86_64_finish_dynamic_symbol #define elf_backend_gc_mark_hook elf64_x86_64_gc_mark_hook #define elf_backend_gc_sweep_hook elf64_x86_64_gc_sweep_hook +#define elf_backend_reloc_type_class elf64_x86_64_reloc_type_class #define elf_backend_relocate_section elf64_x86_64_relocate_section #define elf_backend_size_dynamic_sections elf64_x86_64_size_dynamic_sections #define elf_backend_object_p elf64_x86_64_elf_object_p -#define elf_backend_reloc_type_class elf64_x86_64_reloc_type_class #include "elf64-target.h" diff -Nur binutils-2.12/bfd/elfarm-nabi.c binutils-2.12.1/bfd/elfarm-nabi.c --- binutils-2.12/bfd/elfarm-nabi.c Tue Sep 18 05:57:24 2001 +++ binutils-2.12.1/bfd/elfarm-nabi.c Thu May 9 10:49:02 2002 @@ -138,8 +138,8 @@ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ABS16", /* name */ false, /* partial_inplace */ - 0, /* src_mask */ - 0, /* dst_mask */ + 0x0000ffff, /* src_mask */ + 0x0000ffff, /* dst_mask */ false), /* pcrel_offset */ /* 12 bit absolute */ diff -Nur binutils-2.12/bfd/elflink.c binutils-2.12.1/bfd/elflink.c --- binutils-2.12/bfd/elflink.c Wed Jan 16 00:50:02 2002 +++ binutils-2.12.1/bfd/elflink.c Thu Apr 4 11:20:41 2002 @@ -1,5 +1,5 @@ /* ELF linking support for BFD. - Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -329,6 +329,9 @@ PTR data; { size_t *count = (size_t *) data; + + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; if (h->dynindx != -1) h->dynindx = ++(*count); diff -Nur binutils-2.12/bfd/elflink.h binutils-2.12.1/bfd/elflink.h --- binutils-2.12/bfd/elflink.h Mon Feb 25 18:35:03 2002 +++ binutils-2.12.1/bfd/elflink.h Thu May 9 10:49:02 2002 @@ -57,8 +57,6 @@ PARAMS ((struct elf_link_hash_entry *, PTR)); static boolean elf_link_find_version_dependencies PARAMS ((struct elf_link_hash_entry *, PTR)); -static boolean elf_link_find_version_dependencies - PARAMS ((struct elf_link_hash_entry *, PTR)); static boolean elf_link_assign_sym_version PARAMS ((struct elf_link_hash_entry *, PTR)); static boolean elf_collect_hash_codes @@ -592,7 +590,7 @@ asection *hsec; /* This code handles the special SHN_MIPS_{TEXT,DATA} section - indices used by MIPS ELF. */ + indices used by MIPS ELF. */ switch (h->root.type) { default: @@ -702,10 +700,10 @@ && sym->st_size != h->size) { /* Since we think we have two common symbols, issue a multiple - common warning if desired. Note that we only warn if the - size is different. If the size is the same, we simply let - the old symbol override the new one as normally happens with - symbols defined in dynamic objects. */ + common warning if desired. Note that we only warn if the + size is different. If the size is the same, we simply let + the old symbol override the new one as normally happens with + symbols defined in dynamic objects. */ if (! ((*info->callbacks->multiple_common) (info, h->root.root.string, oldbfd, bfd_link_hash_common, @@ -755,10 +753,10 @@ *size_change_ok = true; /* If we get here when the old symbol is a common symbol, then - we are explicitly letting it override a weak symbol or - function in a dynamic object, and we don't want to warn about - a type change. If the old symbol is a defined symbol, a type - change warning may still be appropriate. */ + we are explicitly letting it override a weak symbol or + function in a dynamic object, and we don't want to warn about + a type change. If the old symbol is a defined symbol, a type + change warning may still be appropriate. */ if (h->root.type == bfd_link_hash_common) *type_change_ok = true; @@ -817,7 +815,7 @@ olddyncommon = false; /* We again permit a type change when a common symbol may be - overriding a function. */ + overriding a function. */ if (bfd_is_com_section (sec)) *type_change_ok = true; @@ -829,11 +827,11 @@ h->verinfo.vertree = NULL; /* In this special case, if H is the target of an indirection, - we want the caller to frob with H rather than with the - indirect symbol. That will permit the caller to redefine the - target of the indirection, rather than the indirect symbol - itself. FIXME: This will break the -y option if we store a - symbol with a different name. */ + we want the caller to frob with H rather than with the + indirect symbol. That will permit the caller to redefine the + target of the indirection, rather than the indirect symbol + itself. FIXME: This will break the -y option if we store a + symbol with a different name. */ *sym_hash = h; } @@ -856,7 +854,7 @@ return false; /* If the predumed common symbol in the dynamic object is - larger, pretend that the new symbol has its size. */ + larger, pretend that the new symbol has its size. */ if (h->size > *pvalue) *pvalue = h->size; @@ -890,8 +888,8 @@ && bind != STB_WEAK) { /* To make this work we have to frob the flags so that the rest - of the code does not think we are using the regular - definition. */ + of the code does not think we are using the regular + definition. */ if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0) h->elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR; else if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0) @@ -900,9 +898,9 @@ | ELF_LINK_HASH_DEF_DYNAMIC); /* If H is the target of an indirection, we want the caller to - use H rather than the indirect symbol. Otherwise if we are - defining a new indirect symbol we will wind up attaching it - to the entry we are overriding. */ + use H rather than the indirect symbol. Otherwise if we are + defining a new indirect symbol we will wind up attaching it + to the entry we are overriding. */ *sym_hash = h; } @@ -1047,7 +1045,7 @@ } /* Now set HI to H, so that the following code will set the - other fields correctly. */ + other fields correctly. */ hi = h; } @@ -1133,7 +1131,7 @@ & (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_DEF_REGULAR)) == 0); - (*bed->elf_backend_copy_indirect_symbol) (h, hi); + (*bed->elf_backend_copy_indirect_symbol) (h, hi); /* See if the new flags lead us to realize that the symbol must be dynamic. */ @@ -1259,8 +1257,8 @@ || h->root.type == bfd_link_hash_defweak)) { /* We don't want to issue this warning. Clobber - the section size so that the warning does not - get copied into the output file. */ + the section size so that the warning does not + get copied into the output file. */ s->_raw_size = 0; continue; } @@ -1284,7 +1282,7 @@ if (! info->relocateable) { /* Clobber the section size so that the warning does - not get copied into the output file. */ + not get copied into the output file. */ s->_raw_size = 0; } } @@ -1315,7 +1313,7 @@ goto error_return; /* Read in the symbol versions, but don't bother to convert them - to internal format. */ + to internal format. */ if (elf_dynversym (abfd) != 0) { Elf_Internal_Shdr *versymhdr; @@ -1373,10 +1371,10 @@ if (! dynamic) { /* If we are creating a shared library, create all the dynamic - sections immediately. We need to attach them to something, - so we attach them to this BFD, provided it is the right - format. FIXME: If there are no input BFD's of the same - format as the output, we can't make a shared library. */ + sections immediately. We need to attach them to something, + so we attach them to this BFD, provided it is the right + format. FIXME: If there are no input BFD's of the same + format as the output, we can't make a shared library. */ if (info->shared && is_elf_hash_table (info) && ! hash_table->dynamic_sections_created @@ -1411,7 +1409,7 @@ if (*name == '\0') { if (elf_dt_soname (abfd) != NULL) - dt_needed = true; + dt_needed = true; add_needed = false; } @@ -1531,7 +1529,7 @@ } /* Ignore DT_RPATH if we have seen DT_RUNPATH. */ if (!runpath && dyn.d_tag == DT_RPATH) - { + { struct bfd_link_needed_list *n, **pn; char *fnm, *anm; unsigned int tagv = dyn.d_un.d_val; @@ -1623,7 +1621,7 @@ } /* Save the SONAME, if there is one, because sometimes the - linker emulation code will need to know it. */ + linker emulation code will need to know it. */ if (*name == '\0') name = basename (bfd_get_filename (abfd)); elf_dt_name (abfd) = name; @@ -1764,10 +1762,10 @@ vernum = iver.vs_vers & VERSYM_VERSION; /* If this is a hidden symbol, or if it is not version - 1, we append the version name to the symbol name. - However, we do not modify a non-hidden absolute - symbol, because it might be the version symbol - itself. FIXME: What if it isn't? */ + 1, we append the version name to the symbol name. + However, we do not modify a non-hidden absolute + symbol, because it might be the version symbol + itself. FIXME: What if it isn't? */ if ((iver.vs_vers & VERSYM_HIDDEN) != 0 || (vernum > 1 && ! bfd_is_abs_section (sec))) { @@ -1866,10 +1864,10 @@ h = (struct elf_link_hash_entry *) h->root.u.i.link; /* Remember the old alignment if this is a common symbol, so - that we don't reduce the alignment later on. We can't - check later, because _bfd_generic_link_add_one_symbol - will set a default for the alignment which we want to - override. */ + that we don't reduce the alignment later on. We can't + check later, because _bfd_generic_link_add_one_symbol + will set a default for the alignment which we want to + override. */ if (h->root.type == bfd_link_hash_common) old_alignment = h->root.u.c.p->alignment_power; @@ -1950,10 +1948,10 @@ } /* If this is a common symbol, then we always want H->SIZE - to be the size of the common symbol. The code just above - won't fix the size if a common symbol becomes larger. We - don't warn about a size change here, because that is - covered by --warn-common. */ + to be the size of the common symbol. The code just above + won't fix the size if a common symbol becomes larger. We + don't warn about a size change here, because that is + covered by --warn-common. */ if (h->root.type == bfd_link_hash_common) h->size = h->root.u.c.size; @@ -1983,8 +1981,8 @@ h->other = sym.st_other; /* If neither has visibility, use the st_other of the - definition. This is an arbitrary choice, since the - other bits have no general meaning. */ + definition. This is an arbitrary choice, since the + other bits have no general meaning. */ if (!symvis && !hvis && (definition || h->other == 0)) h->other = sym.st_other; @@ -2071,7 +2069,7 @@ goto error_return; /* The symbol from a DT_NEEDED object is referenced from - the regular object to create a dynamic executable. We + the regular object to create a dynamic executable. We have to make sure there is a DT_NEEDED entry for it. */ dt_needed = false; @@ -2167,10 +2165,10 @@ } /* If the real definition is in the list of dynamic - symbols, make sure the weak definition is put there - as well. If we don't do this, then the dynamic - loader might not merge the entries for the real - definition and the weak definition. */ + symbols, make sure the weak definition is put there + as well. If we don't do this, then the dynamic + loader might not merge the entries for the real + definition and the weak definition. */ if (h->dynindx != -1 && hlook->dynindx == -1) { @@ -2795,10 +2793,6 @@ h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR; - /* When possible, keep the original type of the symbol. */ - if (h->type == STT_NOTYPE) - h->type = STT_OBJECT; - if (((h->elf_link_hash_flags & (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_DYNAMIC)) != 0 || info->shared) @@ -3140,11 +3134,11 @@ eif.failed = false; /* If we are supposed to export all symbols into the dynamic symbol - table (this is not the normal case), then do so. */ + table (this is not the normal case), then do so. */ if (info->export_dynamic) { elf_link_hash_traverse (elf_hash_table (info), elf_export_symbol, - (PTR) &eif); + (PTR) &eif); if (eif.failed) return false; } @@ -3200,6 +3194,53 @@ return false; } + if (bfd_get_section_by_name (output_bfd, ".preinit_array") != NULL) + { + /* DT_PREINIT_ARRAY is not allowed in shared library. */ + if (info->shared) + { + bfd *sub; + asection *o; + + for (sub = info->input_bfds; sub != NULL; + sub = sub->link_next) + for (o = sub->sections; o != NULL; o = o->next) + if (elf_section_data (o)->this_hdr.sh_type + == SHT_PREINIT_ARRAY) + { + (*_bfd_error_handler) + (_("%s: .preinit_array section is not allowed in DSO"), + bfd_archive_filename (sub)); + break; + } + + bfd_set_error (bfd_error_nonrepresentable_section); + return false; + } + + if (!elf_add_dynamic_entry (info, (bfd_vma) DT_PREINIT_ARRAY, + (bfd_vma) 0) + || !elf_add_dynamic_entry (info, (bfd_vma) DT_PREINIT_ARRAYSZ, + (bfd_vma) 0)) + return false; + } + if (bfd_get_section_by_name (output_bfd, ".init_array") != NULL) + { + if (!elf_add_dynamic_entry (info, (bfd_vma) DT_INIT_ARRAY, + (bfd_vma) 0) + || !elf_add_dynamic_entry (info, (bfd_vma) DT_INIT_ARRAYSZ, + (bfd_vma) 0)) + return false; + } + if (bfd_get_section_by_name (output_bfd, ".fini_array") != NULL) + { + if (!elf_add_dynamic_entry (info, (bfd_vma) DT_FINI_ARRAY, + (bfd_vma) 0) + || !elf_add_dynamic_entry (info, (bfd_vma) DT_FINI_ARRAYSZ, + (bfd_vma) 0)) + return false; + } + dynstr = bfd_get_section_by_name (dynobj, ".dynstr"); /* If .dynstr is excluded from the link, we don't want any of these tags. Strictly, we should be checking each section @@ -3239,7 +3280,7 @@ BFD_ASSERT (s != NULL); /* We may have created additional version definitions if we are - just linking a regular application. */ + just linking a regular application. */ verdefs = asvinfo.verdefs; /* Skip anonymous version tag. */ @@ -3633,10 +3674,10 @@ /* This function is used to adjust offsets into .dynstr for dynamic symbols. This is called via elf_link_hash_traverse. */ - + static boolean elf_adjust_dynstr_offsets PARAMS ((struct elf_link_hash_entry *, PTR)); - + static boolean elf_adjust_dynstr_offsets (h, data) struct elf_link_hash_entry *h; @@ -3644,6 +3685,9 @@ { struct elf_strtab_hash *dynstr = (struct elf_strtab_hash *) data; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (h->dynindx != -1) h->dynstr_index = _bfd_elf_strtab_offset (dynstr, h->dynstr_index); return true; @@ -3716,7 +3760,7 @@ bfd_size_type i; Elf_Internal_Verdef def; Elf_Internal_Verdaux defaux; - + s = bfd_get_section_by_name (dynobj, ".gnu.version_d"); p = (bfd_byte *) s->contents; do @@ -3746,7 +3790,7 @@ bfd_size_type i; Elf_Internal_Verneed need; Elf_Internal_Vernaux needaux; - + s = bfd_get_section_by_name (dynobj, ".gnu.version_r"); p = (bfd_byte *) s->contents; do @@ -3824,11 +3868,11 @@ else { /* Unfortunately, ELF_LINK_NON_ELF is only correct if the symbol - was first seen in a non-ELF file. Fortunately, if the symbol - was first seen in an ELF file, we're probably OK unless the - symbol was defined in a non-ELF file. Catch that case here. - FIXME: We're still in trouble if the symbol was first seen in - a dynamic object, and then later in a non-ELF regular object. */ + was first seen in a non-ELF file. Fortunately, if the symbol + was first seen in an ELF file, we're probably OK unless the + symbol was defined in a non-ELF file. Catch that case here. + FIXME: We're still in trouble if the symbol was first seen in + a dynamic object, and then later in a non-ELF regular object. */ if ((h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0 @@ -3923,6 +3967,17 @@ bfd *dynobj; struct elf_backend_data *bed; + if (h->root.type == bfd_link_hash_warning) + { + h->plt.offset = (bfd_vma) -1; + h->got.offset = (bfd_vma) -1; + + /* When warning symbols are created, they **replace** the "real" + entry in the hash table, thus we never get to see the real + symbol in a hash traversal. So look at it now. */ + h = (struct elf_link_hash_entry *) h->root.u.i.link; + } + /* Ignore indirect symbols. These are added by the versioning code. */ if (h->root.type == bfd_link_hash_indirect) return true; @@ -4039,6 +4094,9 @@ if (h->root.type == bfd_link_hash_indirect) return true; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (h->dynindx == -1 && (h->elf_link_hash_flags & (ELF_LINK_HASH_DEF_REGULAR | ELF_LINK_HASH_REF_REGULAR)) != 0) @@ -4068,14 +4126,14 @@ } if (!eif->verdefs) - { + { doit: if (! _bfd_elf_link_record_dynamic_symbol (eif->info, h)) { eif->failed = true; return false; } - } + } } return true; @@ -4096,6 +4154,9 @@ Elf_Internal_Vernaux *a; bfd_size_type amt; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + /* We only care about symbols defined in shared objects with version information. */ if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0 @@ -4176,6 +4237,9 @@ sinfo = (struct elf_assign_sym_version_info *) data; info = sinfo->info; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + /* Fix the symbol flags. */ eif.failed = false; eif.info = info; @@ -4201,7 +4265,7 @@ hidden = true; /* There are two consecutive ELF_VER_CHR characters if this is - not a hidden symbol. */ + not a hidden symbol. */ ++p; if (*p == ELF_VER_CHR) { @@ -4229,11 +4293,11 @@ len = p - h->root.root.string; alc = bfd_malloc ((bfd_size_type) len); if (alc == NULL) - return false; + return false; strncpy (alc, h->root.root.string, len - 1); alc[len - 1] = '\0'; if (alc[len - 2] == ELF_VER_CHR) - alc[len - 2] = '\0'; + alc[len - 2] = '\0'; h->verinfo.vertree = t; t->used = true; @@ -4247,7 +4311,7 @@ } /* See if there is anything to force this symbol to - local scope. */ + local scope. */ if (d == NULL && t->locals != NULL) { for (d = t->locals; d != NULL; d = d->next) @@ -4272,14 +4336,14 @@ } /* If we are building an application, we need to create a - version node for this version. */ + version node for this version. */ if (t == NULL && ! info->shared) { struct bfd_elf_version_tree **pp; int version_index; /* If we aren't going to export this symbol, we don't need - to worry about it. */ + to worry about it. */ if (h->dynindx == -1) return true; @@ -4315,7 +4379,7 @@ else if (t == NULL) { /* We could not find the version for a symbol when - generating a shared archive. Return an error. */ + generating a shared archive. Return an error. */ (*_bfd_error_handler) (_("%s: undefined versioned symbol name %s"), bfd_get_filename (sinfo->output_bfd), h->root.root.string); @@ -4337,8 +4401,8 @@ struct bfd_elf_version_expr *d; /* See if can find what version this symbol is in. If the - symbol is supposed to be local, then don't actually register - it. */ + symbol is supposed to be local, then don't actually register + it. */ deflt = NULL; for (t = sinfo->verdefs; t != NULL; t = t->next) { @@ -4858,8 +4922,8 @@ dynobj = elf_hash_table (info)->dynobj; emit_relocs = (info->relocateable - || info->emitrelocations - || bed->elf_backend_emit_relocs); + || info->emitrelocations + || bed->elf_backend_emit_relocs); finfo.info = info; finfo.output_bfd = abfd; @@ -4929,7 +4993,7 @@ if (info->relocateable || info->emitrelocations) o->reloc_count += sec->reloc_count; - else if (bed->elf_backend_count_relocs) + else if (bed->elf_backend_count_relocs) { Elf_Internal_Rela * relocs; @@ -4937,8 +5001,8 @@ (abfd, sec, (PTR) NULL, (Elf_Internal_Rela *) NULL, info->keep_memory)); - o->reloc_count += (*bed->elf_backend_count_relocs) - (sec, relocs); + o->reloc_count + += (*bed->elf_backend_count_relocs) (sec, relocs); if (!info->keep_memory) free (relocs); @@ -5040,10 +5104,20 @@ = elf_section_data (output_section); unsigned int *rel_count; unsigned int *rel_count2; + bfd_size_type entsize; + bfd_size_type entsize2; - /* We must be careful to add the relocation froms the + /* We must be careful to add the relocations from the input section to the right output count. */ - if (esdi->rel_hdr.sh_entsize == esdo->rel_hdr.sh_entsize) + entsize = esdi->rel_hdr.sh_entsize; + entsize2 = esdi->rel_hdr2 ? esdi->rel_hdr2->sh_entsize : 0; + BFD_ASSERT ((entsize == sizeof (Elf_External_Rel) + || entsize == sizeof (Elf_External_Rela)) + && entsize2 != entsize + && (entsize2 == 0 + || entsize2 == sizeof (Elf_External_Rel) + || entsize2 == sizeof (Elf_External_Rela))); + if (entsize == esdo->rel_hdr.sh_entsize) { rel_count = &esdo->rel_count; rel_count2 = &esdo->rel_count2; @@ -5274,10 +5348,10 @@ for (p = o->link_order_head; p != NULL; p = p->next) { if (p->type == bfd_indirect_link_order - && (bfd_get_flavour (p->u.indirect.section->owner) - == bfd_target_elf_flavour)) + && (bfd_get_flavour ((sub = p->u.indirect.section->owner)) + == bfd_target_elf_flavour) + && elf_elfheader (sub)->e_ident[EI_CLASS] == bed->s->elfclass) { - sub = p->u.indirect.section->owner; if (! sub->output_has_begun) { if (! elf_link_input_bfd (&finfo, sub)) @@ -5299,28 +5373,25 @@ } } + /* Output any global symbols that got converted to local in a + version script or due to symbol visibility. We do this in a + separate step since ELF requires all local symbols to appear + prior to any global symbols. FIXME: We should only do this if + some global symbols were, in fact, converted to become local. + FIXME: Will this work correctly with the Irix 5 linker? */ + eoinfo.failed = false; + eoinfo.finfo = &finfo; + eoinfo.localsyms = true; + elf_link_hash_traverse (elf_hash_table (info), elf_link_output_extsym, + (PTR) &eoinfo); + if (eoinfo.failed) + return false; + /* That wrote out all the local symbols. Finish up the symbol table with the global symbols. Even if we want to strip everything we can, we still need to deal with those global symbols that got converted to local in a version script. */ - if (info->shared) - { - /* Output any global symbols that got converted to local in a - version script. We do this in a separate step since ELF - requires all local symbols to appear prior to any global - symbols. FIXME: We should only do this if some global - symbols were, in fact, converted to become local. FIXME: - Will this work correctly with the Irix 5 linker? */ - eoinfo.failed = false; - eoinfo.finfo = &finfo; - eoinfo.localsyms = true; - elf_link_hash_traverse (elf_hash_table (info), elf_link_output_extsym, - (PTR) &eoinfo); - if (eoinfo.failed) - return false; - } - /* The sh_info field records the index of the first non local symbol. */ symtab_hdr->sh_info = bfd_get_symcount (abfd); @@ -5372,8 +5443,8 @@ /* Copy the internal symbol as is. Note that we saved a word of storage and overwrote - the original st_name with the dynstr_index. */ - sym = e->isym; + the original st_name with the dynstr_index. */ + sym = e->isym; if (e->isym.st_shndx != SHN_UNDEF && (e->isym.st_shndx < SHN_LORESERVE @@ -5550,6 +5621,34 @@ } break; + case DT_PREINIT_ARRAYSZ: + name = ".preinit_array"; + goto get_size; + case DT_INIT_ARRAYSZ: + name = ".init_array"; + goto get_size; + case DT_FINI_ARRAYSZ: + name = ".fini_array"; + get_size: + o = bfd_get_section_by_name (abfd, name); + BFD_ASSERT (o != NULL); + if (o->_raw_size == 0) + (*_bfd_error_handler) + (_("warning: %s section has zero size"), name); + dyn.d_un.d_val = o->_raw_size; + elf_swap_dyn_out (dynobj, &dyn, dyncon); + break; + + case DT_PREINIT_ARRAY: + name = ".preinit_array"; + goto get_vma; + case DT_INIT_ARRAY: + name = ".init_array"; + goto get_vma; + case DT_FINI_ARRAY: + name = ".fini_array"; + goto get_vma; + case DT_HASH: name = ".hash"; goto get_vma; @@ -5622,7 +5721,7 @@ if ((o->flags & SEC_LINKER_CREATED) == 0) { /* At this point, we are only interested in sections - created by elf_link_create_dynamic_sections. */ + created by elf_link_create_dynamic_sections. */ continue; } if ((elf_section_data (o->output_section)->this_hdr.sh_type @@ -5638,7 +5737,7 @@ else { /* The contents of the .dynstr section are actually in a - stringtab. */ + stringtab. */ off = elf_section_data (o->output_section)->this_hdr.sh_offset; if (bfd_seek (abfd, off, SEEK_SET) != 0 || ! _bfd_elf_strtab_emit (abfd, @@ -5694,7 +5793,7 @@ { if ((o->flags & SEC_RELOC) != 0 && elf_section_data (o)->rel_hashes != NULL) - free (elf_section_data (o)->rel_hashes); + free (elf_section_data (o)->rel_hashes); } elf_tdata (abfd)->linker = true; @@ -5745,7 +5844,7 @@ { Elf_External_Sym *dest; Elf_External_Sym_Shndx *destshndx; - + boolean (*output_symbol_hook) PARAMS ((bfd *, struct bfd_link_info *info, const char *, @@ -5841,6 +5940,9 @@ { asection *sec; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + if ((h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) && ((sec = h->root.u.def.section)->flags & SEC_MERGE) @@ -5876,6 +5978,13 @@ Elf_Internal_Sym sym; asection *input_sec; + if (h->root.type == bfd_link_hash_warning) + { + h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (h->root.type == bfd_link_hash_new) + return true; + } + /* Decide whether to output this symbol in this pass. */ if (eoinfo->localsyms) { @@ -5953,14 +6062,11 @@ { default: case bfd_link_hash_new: + case bfd_link_hash_warning: abort (); return false; case bfd_link_hash_undefined: - input_sec = bfd_und_section_ptr; - sym.st_shndx = SHN_UNDEF; - break; - case bfd_link_hash_undefweak: input_sec = bfd_und_section_ptr; sym.st_shndx = SHN_UNDEF; @@ -6011,29 +6117,22 @@ case bfd_link_hash_indirect: /* These symbols are created by symbol versioning. They point - to the decorated version of the name. For example, if the - symbol foo@@GNU_1.2 is the default, which should be used when - foo is used with no version, then we add an indirect symbol - foo which points to foo@@GNU_1.2. We ignore these symbols, - since the indirected symbol is already in the hash table. */ + to the decorated version of the name. For example, if the + symbol foo@@GNU_1.2 is the default, which should be used when + foo is used with no version, then we add an indirect symbol + foo which points to foo@@GNU_1.2. We ignore these symbols, + since the indirected symbol is already in the hash table. */ return true; - - case bfd_link_hash_warning: - /* We can't represent these symbols in ELF, although a warning - symbol may have come from a .gnu.warning.SYMBOL section. We - just put the target symbol in the hash table. If the target - symbol does not really exist, don't do anything. */ - if (h->root.u.i.link->type == bfd_link_hash_new) - return true; - return (elf_link_output_extsym - ((struct elf_link_hash_entry *) h->root.u.i.link, data)); } /* Give the processor backend a chance to tweak the symbol value, and also to finish up anything that needs to be done for this - symbol. */ + symbol. FIXME: Not calling elf_backend_finish_dynamic_symbol for + forced local syms when non-shared is due to a historical quirk. */ if ((h->dynindx != -1 || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0) + && (finfo->info->shared + || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) && elf_hash_table (finfo->info)->dynamic_sections_created) { struct elf_backend_data *bed; @@ -6287,8 +6386,8 @@ return true; emit_relocs = (finfo->info->relocateable - || finfo->info->emitrelocations - || bed->elf_backend_emit_relocs); + || finfo->info->emitrelocations + || bed->elf_backend_emit_relocs); symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; if (elf_bad_symtab (input_bfd)) @@ -6404,10 +6503,10 @@ continue; /* If this symbol is defined in a section which we are - discarding, we don't need to keep it, but note that - linker_mark is only reliable for sections that have contents. - For the benefit of the MIPS ELF linker, we check SEC_EXCLUDE - as well as linker_mark. */ + discarding, we don't need to keep it, but note that + linker_mark is only reliable for sections that have contents. + For the benefit of the MIPS ELF linker, we check SEC_EXCLUDE + as well as linker_mark. */ if ((isym->st_shndx < SHN_LORESERVE || isym->st_shndx > SHN_HIRESERVE) && isec != NULL && ((! isec->linker_mark && (isec->flags & SEC_HAS_CONTENTS) != 0) @@ -6482,9 +6581,9 @@ } /* Get the contents of the section. They have been cached by a - relaxation routine. Note that o is a section in an input - file, so the contents field will not have been set by any of - the routines which work on output files. */ + relaxation routine. Note that o is a section in an input + file, so the contents field will not have been set by any of + the routines which work on output files. */ if (elf_section_data (o)->this_hdr.contents != NULL) contents = elf_section_data (o)->this_hdr.contents; else @@ -6655,6 +6754,12 @@ void (*reloc_emitter) PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *)); + boolean rela_normal; + + input_rel_hdr = &elf_section_data (o)->rel_hdr; + rela_normal = (bed->rela_normal + && (input_rel_hdr->sh_entsize + == sizeof (Elf_External_Rela))); /* Adjust the reloc addresses and symbol indices. */ @@ -6677,7 +6782,7 @@ irela->r_offset += o->output_offset; /* Relocs in an executable have to be virtual addresses. */ - if (finfo->info->emitrelocations) + if (!finfo->info->relocateable) irela->r_offset += o->output_section->vma; r_symndx = ELF_R_SYM (irela->r_info); @@ -6728,10 +6833,9 @@ processor specific section. If we have discarded a section, the output_section will be the absolute section. */ - if (sec != NULL - && (bfd_is_abs_section (sec) - || (sec->output_section != NULL - && bfd_is_abs_section (sec->output_section)))) + if (bfd_is_abs_section (sec) + || (sec != NULL + && bfd_is_abs_section (sec->output_section))) r_symndx = 0; else if (sec == NULL || sec->owner == NULL) { @@ -6743,6 +6847,11 @@ r_symndx = sec->output_section->target_index; BFD_ASSERT (r_symndx != 0); } + + /* Adjust the addend according to where the + section winds up in the output section. */ + if (rela_normal) + irela->r_addend += sec->output_offset; } else { @@ -6794,23 +6903,23 @@ } /* Swap out the relocs. */ - if (bed->elf_backend_emit_relocs - && !(finfo->info->relocateable + if (bed->elf_backend_emit_relocs + && !(finfo->info->relocateable || finfo->info->emitrelocations)) - reloc_emitter = bed->elf_backend_emit_relocs; - else - reloc_emitter = elf_link_output_relocs; + reloc_emitter = bed->elf_backend_emit_relocs; + else + reloc_emitter = elf_link_output_relocs; - input_rel_hdr = &elf_section_data (o)->rel_hdr; - (*reloc_emitter) (output_bfd, o, input_rel_hdr, internal_relocs); + (*reloc_emitter) (output_bfd, o, input_rel_hdr, internal_relocs); input_rel_hdr = elf_section_data (o)->rel_hdr2; - if (input_rel_hdr) - { - internal_relocs += (NUM_SHDR_ENTRIES (input_rel_hdr) + if (input_rel_hdr) + { + internal_relocs += (NUM_SHDR_ENTRIES (input_rel_hdr) * bed->s->int_rels_per_ext_rel); - reloc_emitter (output_bfd, o, input_rel_hdr, internal_relocs); - } + (*reloc_emitter) (output_bfd, o, input_rel_hdr, + internal_relocs); + } } } @@ -6910,7 +7019,7 @@ struct elf_link_hash_entry *h; /* Treat a reloc against a defined symbol as though it were - actually against the section. */ + actually against the section. */ h = ((struct elf_link_hash_entry *) bfd_wrapped_link_hash_lookup (output_bfd, info, link_order->u.reloc.p->u.name, @@ -6925,8 +7034,8 @@ indx = section->output_section->target_index; *rel_hash_ptr = NULL; /* It seems that we ought to add the symbol value to the - addend here, but in practice it has already been added - because it was passed to constructor_callback. */ + addend here, but in practice it has already been added + because it was passed to constructor_callback. */ addend += section->output_section->vma + section->output_offset; } else if (h != NULL) @@ -7399,7 +7508,7 @@ if (elf_bad_symtab (input_bfd)) { nlocsyms = symtab_hdr->sh_size / sizeof (Elf_External_Sym); - extsymoff = 0; + extsymoff = 0; } else extsymoff = nlocsyms = symtab_hdr->sh_info; @@ -7461,11 +7570,11 @@ locsym_shndx + (locsym_shndx ? r_symndx : 0), &s); if (ELF_ST_BIND (s.st_info) == STB_LOCAL) - rsec = (*gc_mark_hook) (sec->owner, info, rel, NULL, &s); + rsec = (*gc_mark_hook) (sec->owner, info, rel, NULL, &s); else { - h = sym_hashes[r_symndx - extsymoff]; - rsec = (*gc_mark_hook) (sec->owner, info, rel, h, NULL); + h = sym_hashes[r_symndx - extsymoff]; + rsec = (*gc_mark_hook) (sec->owner, info, rel, h, NULL); } } else if (r_symndx >= nlocsyms) @@ -7483,11 +7592,15 @@ } if (rsec && !rsec->gc_mark) - if (!elf_gc_mark (info, rsec, gc_mark_hook)) - { - ret = false; - goto out2; - } + { + if (bfd_get_flavour (rsec->owner) != bfd_target_elf_flavour) + rsec->gc_mark = 1; + else if (!elf_gc_mark (info, rsec, gc_mark_hook)) + { + ret = false; + goto out2; + } + } } out2: @@ -7586,6 +7699,9 @@ { int *idx = (int *) idxptr; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (h->dynindx != -1 && ((h->root.type != bfd_link_hash_defined && h->root.type != bfd_link_hash_defweak) @@ -7603,6 +7719,9 @@ struct elf_link_hash_entry *h; PTR okp; { + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + /* Those that are not vtables. */ if (h->vtable_parent == NULL) return true; @@ -7636,9 +7755,9 @@ pu = h->vtable_parent->vtable_entries_used; if (pu != NULL) { - asection *sec = h->root.u.def.section; - struct elf_backend_data *bed = get_elf_backend_data (sec->owner); - int file_align = bed->s->file_align; + asection *sec = h->root.u.def.section; + struct elf_backend_data *bed = get_elf_backend_data (sec->owner); + int file_align = bed->s->file_align; n = h->vtable_parent->vtable_entries_size / file_align; while (n--) @@ -7665,6 +7784,9 @@ struct elf_backend_data *bed; int file_align; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + /* Take care of both those symbols that do not describe vtables as well as those that are not loaded. */ if (h->vtable_parent == NULL) @@ -7715,7 +7837,7 @@ bfd *sub; asection * (*gc_mark_hook) PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, - struct elf_link_hash_entry *h, Elf_Internal_Sym *)); + struct elf_link_hash_entry *h, Elf_Internal_Sym *)); if (!get_elf_backend_data (abfd)->can_gc_sections || info->relocateable || info->emitrelocations @@ -7749,7 +7871,7 @@ for (o = sub->sections; o != NULL; o = o->next) { if (o->flags & SEC_KEEP) - if (!elf_gc_mark (info, o, gc_mark_hook)) + if (!elf_gc_mark (info, o, gc_mark_hook)) return false; } } @@ -7952,6 +8074,9 @@ { bfd_vma *off = (bfd_vma *) offarg; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (h->got.refcount > 0) { h->got.offset = off[0]; @@ -7992,6 +8117,9 @@ unsigned long ha; char *alc = NULL; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + /* Ignore indirect symbols. These are added by the versioning code. */ if (h->dynindx == -1) return true; @@ -8144,7 +8272,8 @@ } stab = strip ? NULL : bfd_get_section_by_name (abfd, ".stab"); - if ((! stab || elf_section_data(stab)->sec_info_type != ELF_INFO_TYPE_STABS) + if ((! stab + || elf_section_data(stab)->sec_info_type != ELF_INFO_TYPE_STABS) && ! eh && (strip || ! bed->elf_backend_discard_info)) continue; @@ -8169,24 +8298,24 @@ freesyms = NULL; if (symtab_hdr->contents) - cookie.locsyms = (void *) symtab_hdr->contents; + cookie.locsyms = (void *) symtab_hdr->contents; else if (cookie.locsymcount == 0) - cookie.locsyms = NULL; + cookie.locsyms = NULL; else - { - bfd_size_type amt = cookie.locsymcount * sizeof (Elf_External_Sym); - cookie.locsyms = bfd_malloc (amt); - if (cookie.locsyms == NULL) + { + bfd_size_type amt = cookie.locsymcount * sizeof (Elf_External_Sym); + cookie.locsyms = bfd_malloc (amt); + if (cookie.locsyms == NULL) return false; freesyms = cookie.locsyms; if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0 - || bfd_bread (cookie.locsyms, amt, abfd) != amt) + || bfd_bread (cookie.locsyms, amt, abfd) != amt) { error_ret_free_loc: free (cookie.locsyms); return false; - } - } + } + } cookie.locsym_shndx = NULL; if (shndx_hdr->sh_size != 0 && cookie.locsymcount != 0) @@ -8232,8 +8361,7 @@ cookie.relend = NULL; if (eh->reloc_count) cookie.rels = (NAME(_bfd_elf,link_read_relocs) - (abfd, eh, (PTR) NULL, - (Elf_Internal_Rela *) NULL, + (abfd, eh, (PTR) NULL, (Elf_Internal_Rela *) NULL, info->keep_memory)); if (cookie.rels) { @@ -8262,9 +8390,7 @@ free (freesyms); } - if (ehdr - && _bfd_elf_discard_section_eh_frame_hdr (output_bfd, - info, ehdr)) + if (ehdr && _bfd_elf_discard_section_eh_frame_hdr (output_bfd, info, ehdr)) ret = true; return ret; } @@ -8273,6 +8399,8 @@ elf_section_ignore_discarded_relocs (sec) asection *sec; { + struct elf_backend_data *bed; + switch (elf_section_data (sec)->sec_info_type) { case ELF_INFO_TYPE_STABS: @@ -8281,10 +8409,10 @@ default: break; } - if ((get_elf_backend_data (sec->owner)->elf_backend_ignore_discarded_relocs - != NULL) - && (*get_elf_backend_data (sec->owner) - ->elf_backend_ignore_discarded_relocs) (sec)) + + bed = get_elf_backend_data (sec->owner); + if (bed->elf_backend_ignore_discarded_relocs != NULL + && (*bed->elf_backend_ignore_discarded_relocs) (sec)) return true; return false; diff -Nur binutils-2.12/bfd/elfxx-ia64.c binutils-2.12.1/bfd/elfxx-ia64.c --- binutils-2.12/bfd/elfxx-ia64.c Tue Feb 19 08:10:29 2002 +++ binutils-2.12.1/bfd/elfxx-ia64.c Thu May 9 10:49:03 2002 @@ -1016,9 +1016,6 @@ switch (hdr->sh_type) { case SHT_IA_64_UNWIND: - case SHT_INIT_ARRAY: - case SHT_FINI_ARRAY: - case SHT_PREINIT_ARRAY: case SHT_IA_64_HP_OPT_ANOT: break; @@ -1076,12 +1073,6 @@ } else if (strcmp (name, ELF_STRING_ia64_archext) == 0) hdr->sh_type = SHT_IA_64_EXT; - else if (strcmp (name, ".init_array") == 0) - hdr->sh_type = SHT_INIT_ARRAY; - else if (strcmp (name, ".fini_array") == 0) - hdr->sh_type = SHT_FINI_ARRAY; - else if (strcmp (name, ".preinit_array") == 0) - hdr->sh_type = SHT_PREINIT_ARRAY; else if (strcmp (name, ".HP.opt_annot") == 0) hdr->sh_type = SHT_IA_64_HP_OPT_ANOT; else if (strcmp (name, ".reloc") == 0) @@ -1719,6 +1710,9 @@ = (struct elfNN_ia64_dyn_sym_traverse_data *) xdata; struct elfNN_ia64_dyn_sym_info *dyn_i; + if (entry->root.root.type == bfd_link_hash_warning) + entry = (struct elfNN_ia64_link_hash_entry *) entry->root.root.u.i.link; + for (dyn_i = entry->info; dyn_i; dyn_i = dyn_i->next) if (! (*data->func) (dyn_i, data->data)) return false; @@ -3508,6 +3502,7 @@ elf_section_data(input_section->output_section) ->this_hdr.sh_flags |= flags; + return true; } gp_val = _bfd_get_gp_value (output_bfd); @@ -3540,29 +3535,9 @@ ret_val = false; continue; } + howto = lookup_howto (r_type); r_symndx = ELFNN_R_SYM (rel->r_info); - - if (info->relocateable) - { - /* This is a relocateable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sym_sec = local_sections[r_symndx]; - rel->r_addend += sym_sec->output_offset; - } - } - continue; - } - - /* This is a final link. */ - h = NULL; sym = NULL; sym_sec = NULL; @@ -4567,6 +4542,7 @@ #define elf_backend_copy_indirect_symbol elfNN_ia64_hash_copy_indirect #define elf_backend_hide_symbol elfNN_ia64_hash_hide_symbol #define elf_backend_reloc_type_class elfNN_ia64_reloc_type_class +#define elf_backend_rela_normal 1 #include "elfNN-target.h" diff -Nur binutils-2.12/bfd/elfxx-target.h binutils-2.12.1/bfd/elfxx-target.h --- binutils-2.12/bfd/elfxx-target.h Tue Dec 18 12:59:59 2001 +++ binutils-2.12.1/bfd/elfxx-target.h Thu May 9 10:49:03 2002 @@ -1,5 +1,5 @@ /* Target definitions for NN-bit ELF - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -390,6 +390,10 @@ #define elf_backend_default_use_rela_p !USE_REL #endif +#ifndef elf_backend_rela_normal +#define elf_backend_rela_normal 0 +#endif + #ifndef ELF_MACHINE_ALT1 #define ELF_MACHINE_ALT1 0 #endif @@ -470,6 +474,7 @@ elf_backend_may_use_rel_p, elf_backend_may_use_rela_p, elf_backend_default_use_rela_p, + elf_backend_rela_normal, elf_backend_sign_extend_vma, elf_backend_want_got_plt, elf_backend_plt_readonly, @@ -523,9 +528,9 @@ /* ar_max_namelen: maximum number of characters in an archive header FIXME: this really has nothing to do with ELF, this is a characteristic - of the archiver and should be independently tunable. This value is - a WAG (wild a** guess) */ - 14, + of the archiver and should be independently tunable. The System V ABI, + Chapter 7 (Formats & Protocols), Archive section sets this as 15. */ + 15, /* Routines to byte-swap various sized integers from the data sections */ bfd_getb64, bfd_getb_signed_64, bfd_putb64, @@ -619,9 +624,9 @@ /* ar_max_namelen: maximum number of characters in an archive header FIXME: this really has nothing to do with ELF, this is a characteristic - of the archiver and should be independently tunable. This value is - a WAG (wild a** guess) */ - 14, + of the archiver and should be independently tunable. The System V ABI, + Chapter 7 (Formats & Protocols), Archive section sets this as 15. */ + 15, /* Routines to byte-swap various sized integers from the data sections */ bfd_getl64, bfd_getl_signed_64, bfd_putl64, diff -Nur binutils-2.12/bfd/i386linux.c binutils-2.12.1/bfd/i386linux.c --- binutils-2.12/bfd/i386linux.c Tue Oct 2 01:58:41 2001 +++ binutils-2.12.1/bfd/i386linux.c Thu Apr 4 11:20:44 2002 @@ -1,5 +1,5 @@ /* BFD back-end for linux flavored i386 a.out binaries. - Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2001 + Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -437,6 +437,9 @@ int is_plt; struct linux_link_hash_entry *h1, *h2; boolean exists; + + if (h->root.root.type == bfd_link_hash_warning) + h = (struct linux_link_hash_entry *) h->root.root.u.i.link; if (h->root.root.type == bfd_link_hash_undefined && strncmp (h->root.root.root.string, NEEDS_SHRLIB, diff -Nur binutils-2.12/bfd/ihex.c binutils-2.12.1/bfd/ihex.c --- binutils-2.12/bfd/ihex.c Wed Jan 30 11:07:28 2002 +++ binutils-2.12.1/bfd/ihex.c Fri Apr 26 10:24:46 2002 @@ -873,6 +873,11 @@ } rec_addr = where - (extbase + segbase); + + /* Output records shouldn't cross 64K boundaries. */ + if (rec_addr + now > 0xffff) + now = 0x10000 - rec_addr; + if (! ihex_write_record (abfd, now, rec_addr, 0, p)) return false; diff -Nur binutils-2.12/bfd/libbfd.c binutils-2.12.1/bfd/libbfd.c --- binutils-2.12/bfd/libbfd.c Wed Jan 30 11:07:28 2002 +++ binutils-2.12.1/bfd/libbfd.c Mon Apr 1 20:28:52 2002 @@ -593,7 +593,7 @@ bfd_write_bigendian_4byte_int SYNOPSIS - void bfd_write_bigendian_4byte_int (bfd *, unsigned int); + boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int); DESCRIPTION Write a 4 byte integer @var{i} to the output BFD @var{abfd}, in big @@ -601,15 +601,14 @@ archives. */ -void +boolean bfd_write_bigendian_4byte_int (abfd, i) bfd *abfd; unsigned int i; { bfd_byte buffer[4]; bfd_putb32 ((bfd_vma) i, buffer); - if (bfd_bwrite ((PTR) buffer, (bfd_size_type) 4, abfd) != 4) - abort (); + return bfd_bwrite ((PTR) buffer, (bfd_size_type) 4, abfd) == 4; } bfd_vma diff -Nur binutils-2.12/bfd/libbfd.h binutils-2.12.1/bfd/libbfd.h --- binutils-2.12/bfd/libbfd.h Sat Feb 9 17:53:53 2002 +++ binutils-2.12.1/bfd/libbfd.h Thu May 9 10:49:06 2002 @@ -586,7 +586,7 @@ /* And more follows */ -void +boolean bfd_write_bigendian_4byte_int PARAMS ((bfd *, unsigned int)); unsigned int @@ -752,55 +752,6 @@ "BFD_RELOC_MIPS_REL16", "BFD_RELOC_MIPS_RELGOT", "BFD_RELOC_MIPS_JALR", - "BFD_RELOC_SH_GOT_LOW16", - "BFD_RELOC_SH_GOT_MEDLOW16", - "BFD_RELOC_SH_GOT_MEDHI16", - "BFD_RELOC_SH_GOT_HI16", - "BFD_RELOC_SH_GOTPLT_LOW16", - "BFD_RELOC_SH_GOTPLT_MEDLOW16", - "BFD_RELOC_SH_GOTPLT_MEDHI16", - "BFD_RELOC_SH_GOTPLT_HI16", - "BFD_RELOC_SH_PLT_LOW16", - "BFD_RELOC_SH_PLT_MEDLOW16", - "BFD_RELOC_SH_PLT_MEDHI16", - "BFD_RELOC_SH_PLT_HI16", - "BFD_RELOC_SH_GOTOFF_LOW16", - "BFD_RELOC_SH_GOTOFF_MEDLOW16", - "BFD_RELOC_SH_GOTOFF_MEDHI16", - "BFD_RELOC_SH_GOTOFF_HI16", - "BFD_RELOC_SH_GOTPC_LOW16", - "BFD_RELOC_SH_GOTPC_MEDLOW16", - "BFD_RELOC_SH_GOTPC_MEDHI16", - "BFD_RELOC_SH_GOTPC_HI16", - "BFD_RELOC_SH_COPY64", - "BFD_RELOC_SH_GLOB_DAT64", - "BFD_RELOC_SH_JMP_SLOT64", - "BFD_RELOC_SH_RELATIVE64", - "BFD_RELOC_SH_GOT10BY4", - "BFD_RELOC_SH_GOT10BY8", - "BFD_RELOC_SH_GOTPLT10BY4", - "BFD_RELOC_SH_GOTPLT10BY8", - "BFD_RELOC_SH_GOTPLT32", - "BFD_RELOC_SH_SHMEDIA_CODE", - "BFD_RELOC_SH_IMMU5", - "BFD_RELOC_SH_IMMS6", - "BFD_RELOC_SH_IMMS6BY32", - "BFD_RELOC_SH_IMMU6", - "BFD_RELOC_SH_IMMS10", - "BFD_RELOC_SH_IMMS10BY2", - "BFD_RELOC_SH_IMMS10BY4", - "BFD_RELOC_SH_IMMS10BY8", - "BFD_RELOC_SH_IMMS16", - "BFD_RELOC_SH_IMMU16", - "BFD_RELOC_SH_IMM_LOW16", - "BFD_RELOC_SH_IMM_LOW16_PCREL", - "BFD_RELOC_SH_IMM_MEDLOW16", - "BFD_RELOC_SH_IMM_MEDLOW16_PCREL", - "BFD_RELOC_SH_IMM_MEDHI16", - "BFD_RELOC_SH_IMM_MEDHI16_PCREL", - "BFD_RELOC_SH_IMM_HI16", - "BFD_RELOC_SH_IMM_HI16_PCREL", - "BFD_RELOC_SH_PT_16", "BFD_RELOC_386_GOT32", "BFD_RELOC_386_PLT32", @@ -947,6 +898,55 @@ "BFD_RELOC_SH_JMP_SLOT", "BFD_RELOC_SH_RELATIVE", "BFD_RELOC_SH_GOTPC", + "BFD_RELOC_SH_GOT_LOW16", + "BFD_RELOC_SH_GOT_MEDLOW16", + "BFD_RELOC_SH_GOT_MEDHI16", + "BFD_RELOC_SH_GOT_HI16", + "BFD_RELOC_SH_GOTPLT_LOW16", + "BFD_RELOC_SH_GOTPLT_MEDLOW16", + "BFD_RELOC_SH_GOTPLT_MEDHI16", + "BFD_RELOC_SH_GOTPLT_HI16", + "BFD_RELOC_SH_PLT_LOW16", + "BFD_RELOC_SH_PLT_MEDLOW16", + "BFD_RELOC_SH_PLT_MEDHI16", + "BFD_RELOC_SH_PLT_HI16", + "BFD_RELOC_SH_GOTOFF_LOW16", + "BFD_RELOC_SH_GOTOFF_MEDLOW16", + "BFD_RELOC_SH_GOTOFF_MEDHI16", + "BFD_RELOC_SH_GOTOFF_HI16", + "BFD_RELOC_SH_GOTPC_LOW16", + "BFD_RELOC_SH_GOTPC_MEDLOW16", + "BFD_RELOC_SH_GOTPC_MEDHI16", + "BFD_RELOC_SH_GOTPC_HI16", + "BFD_RELOC_SH_COPY64", + "BFD_RELOC_SH_GLOB_DAT64", + "BFD_RELOC_SH_JMP_SLOT64", + "BFD_RELOC_SH_RELATIVE64", + "BFD_RELOC_SH_GOT10BY4", + "BFD_RELOC_SH_GOT10BY8", + "BFD_RELOC_SH_GOTPLT10BY4", + "BFD_RELOC_SH_GOTPLT10BY8", + "BFD_RELOC_SH_GOTPLT32", + "BFD_RELOC_SH_SHMEDIA_CODE", + "BFD_RELOC_SH_IMMU5", + "BFD_RELOC_SH_IMMS6", + "BFD_RELOC_SH_IMMS6BY32", + "BFD_RELOC_SH_IMMU6", + "BFD_RELOC_SH_IMMS10", + "BFD_RELOC_SH_IMMS10BY2", + "BFD_RELOC_SH_IMMS10BY4", + "BFD_RELOC_SH_IMMS10BY8", + "BFD_RELOC_SH_IMMS16", + "BFD_RELOC_SH_IMMU16", + "BFD_RELOC_SH_IMM_LOW16", + "BFD_RELOC_SH_IMM_LOW16_PCREL", + "BFD_RELOC_SH_IMM_MEDLOW16", + "BFD_RELOC_SH_IMM_MEDLOW16_PCREL", + "BFD_RELOC_SH_IMM_MEDHI16", + "BFD_RELOC_SH_IMM_MEDHI16_PCREL", + "BFD_RELOC_SH_IMM_HI16", + "BFD_RELOC_SH_IMM_HI16_PCREL", + "BFD_RELOC_SH_PT_16", "BFD_RELOC_THUMB_PCREL_BRANCH9", "BFD_RELOC_THUMB_PCREL_BRANCH12", "BFD_RELOC_THUMB_PCREL_BRANCH23", diff -Nur binutils-2.12/bfd/linker.c binutils-2.12.1/bfd/linker.c --- binutils-2.12/bfd/linker.c Sat Sep 29 02:21:59 2001 +++ binutils-2.12.1/bfd/linker.c Thu Apr 4 11:20:45 2002 @@ -1419,7 +1419,7 @@ /* DEFW_ROW */ {DEFW, DEFW, DEFW, NOACT, NOACT, NOACT, NOACT, CYCLE }, /* COMMON_ROW */ {COM, COM, COM, CREF, COM, BIG, REFC, WARNC }, /* INDR_ROW */ {IND, IND, IND, MDEF, IND, CIND, MIND, CYCLE }, - /* WARN_ROW */ {MWARN, WARN, WARN, CWARN, CWARN, WARN, CWARN, MWARN }, + /* WARN_ROW */ {MWARN, WARN, WARN, CWARN, CWARN, WARN, CWARN, NOACT }, /* SET_ROW */ {SET, SET, SET, SET, SET, SET, CYCLE, CYCLE } }; @@ -2455,6 +2455,9 @@ struct generic_write_global_symbol_info *wginfo = (struct generic_write_global_symbol_info *) data; asymbol *sym; + + if (h->root.type == bfd_link_hash_warning) + h = (struct generic_link_hash_entry *) h->root.u.i.link; if (h->written) return true; diff -Nur binutils-2.12/bfd/m68klinux.c binutils-2.12.1/bfd/m68klinux.c --- binutils-2.12/bfd/m68klinux.c Tue Oct 2 01:58:41 2001 +++ binutils-2.12.1/bfd/m68klinux.c Thu Apr 4 11:20:45 2002 @@ -1,5 +1,5 @@ /* BFD back-end for linux flavored m68k a.out binaries. - Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001 + Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -441,6 +441,9 @@ int is_plt; struct linux_link_hash_entry *h1, *h2; boolean exists; + + if (h->root.root.type == bfd_link_hash_warning) + h = (struct linux_link_hash_entry *) h->root.root.u.i.link; if (h->root.root.type == bfd_link_hash_undefined && strncmp (h->root.root.root.string, NEEDS_SHRLIB, diff -Nur binutils-2.12/bfd/merge.c binutils-2.12.1/bfd/merge.c --- binutils-2.12/bfd/merge.c Tue Jan 15 07:52:15 2002 +++ binutils-2.12.1/bfd/merge.c Mon Apr 1 20:28:52 2002 @@ -804,6 +804,9 @@ if (secinfo) continue; + if (sinfo->htab->first == NULL) + continue; + if (sinfo->htab->strings) merge_strings (sinfo); else diff -Nur binutils-2.12/bfd/mmo.c binutils-2.12.1/bfd/mmo.c --- binutils-2.12/bfd/mmo.c Sun Feb 17 17:55:35 2002 +++ binutils-2.12.1/bfd/mmo.c Mon Apr 1 20:28:53 2002 @@ -1523,7 +1523,7 @@ entry = (mmo_data_list_type *) bfd_zalloc (sec->owner, sizeof (mmo_data_list_type) + allocated_size); if (entry == NULL) - return false; + return NULL; entry->where = vma; entry->size = size; entry->allocated_size = allocated_size; diff -Nur binutils-2.12/bfd/opncls.c binutils-2.12.1/bfd/opncls.c --- binutils-2.12/bfd/opncls.c Sun Dec 16 19:40:53 2001 +++ binutils-2.12.1/bfd/opncls.c Thu May 9 10:49:09 2002 @@ -1,6 +1,6 @@ /* opncls.c -- open and close a BFD. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, - 2001 + 2001, 2002 Free Software Foundation, Inc. Written by Cygnus Support. @@ -96,6 +96,8 @@ bfd *nbfd; nbfd = _bfd_new_bfd (); + if (nbfd == NULL) + return NULL; nbfd->xvec = obfd->xvec; nbfd->my_archive = obfd; nbfd->direction = read_direction; @@ -618,7 +620,6 @@ abfd->arch_info = &bfd_default_arch_struct; abfd->where = 0; - abfd->sections = (asection *) NULL; abfd->format = bfd_unknown; abfd->my_archive = (bfd *) NULL; abfd->origin = 0; @@ -637,6 +638,7 @@ abfd->outsymbols = 0; abfd->tdata.any = 0; + bfd_section_list_clear (abfd); bfd_check_format(abfd, bfd_object); return true; diff -Nur binutils-2.12/bfd/pdp11.c binutils-2.12.1/bfd/pdp11.c --- binutils-2.12/bfd/pdp11.c Wed Oct 17 08:01:05 2001 +++ binutils-2.12.1/bfd/pdp11.c Thu Apr 4 11:20:45 2002 @@ -1,5 +1,5 @@ /* BFD back-end for PDP-11 a.out binaries. - Copyright 2001 Free Software Foundation, Inc. + Copyright 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -4304,6 +4304,13 @@ struct external_nlist outsym; bfd_size_type indx; bfd_size_type amt; + + if (h->root.type == bfd_link_hash_warning) + { + h = (struct aout_link_hash_entry *) h->root.u.i.link; + if (h->root.type == bfd_link_hash_new) + return true; + } output_bfd = finfo->output_bfd; diff -Nur binutils-2.12/bfd/reloc.c binutils-2.12.1/bfd/reloc.c --- binutils-2.12/bfd/reloc.c Sat Feb 9 17:53:53 2002 +++ binutils-2.12.1/bfd/reloc.c Thu May 9 10:49:10 2002 @@ -2051,106 +2051,6 @@ BFD_RELOC_MIPS_JALR COMMENT COMMENT -ENUMX - BFD_RELOC_SH_GOT_LOW16 -ENUMX - BFD_RELOC_SH_GOT_MEDLOW16 -ENUMX - BFD_RELOC_SH_GOT_MEDHI16 -ENUMX - BFD_RELOC_SH_GOT_HI16 -ENUMX - BFD_RELOC_SH_GOTPLT_LOW16 -ENUMX - BFD_RELOC_SH_GOTPLT_MEDLOW16 -ENUMX - BFD_RELOC_SH_GOTPLT_MEDHI16 -ENUMX - BFD_RELOC_SH_GOTPLT_HI16 -ENUMX - BFD_RELOC_SH_PLT_LOW16 -ENUMX - BFD_RELOC_SH_PLT_MEDLOW16 -ENUMX - BFD_RELOC_SH_PLT_MEDHI16 -ENUMX - BFD_RELOC_SH_PLT_HI16 -ENUMX - BFD_RELOC_SH_GOTOFF_LOW16 -ENUMX - BFD_RELOC_SH_GOTOFF_MEDLOW16 -ENUMX - BFD_RELOC_SH_GOTOFF_MEDHI16 -ENUMX - BFD_RELOC_SH_GOTOFF_HI16 -ENUMX - BFD_RELOC_SH_GOTPC_LOW16 -ENUMX - BFD_RELOC_SH_GOTPC_MEDLOW16 -ENUMX - BFD_RELOC_SH_GOTPC_MEDHI16 -ENUMX - BFD_RELOC_SH_GOTPC_HI16 -ENUMX - BFD_RELOC_SH_COPY64 -ENUMX - BFD_RELOC_SH_GLOB_DAT64 -ENUMX - BFD_RELOC_SH_JMP_SLOT64 -ENUMX - BFD_RELOC_SH_RELATIVE64 -ENUMX - BFD_RELOC_SH_GOT10BY4 -ENUMX - BFD_RELOC_SH_GOT10BY8 -ENUMX - BFD_RELOC_SH_GOTPLT10BY4 -ENUMX - BFD_RELOC_SH_GOTPLT10BY8 -ENUMX - BFD_RELOC_SH_GOTPLT32 -COMMENT -ENUMX - BFD_RELOC_SH_SHMEDIA_CODE -ENUMX - BFD_RELOC_SH_IMMU5 -ENUMX - BFD_RELOC_SH_IMMS6 -ENUMX - BFD_RELOC_SH_IMMS6BY32 -ENUMX - BFD_RELOC_SH_IMMU6 -ENUMX - BFD_RELOC_SH_IMMS10 -ENUMX - BFD_RELOC_SH_IMMS10BY2 -ENUMX - BFD_RELOC_SH_IMMS10BY4 -ENUMX - BFD_RELOC_SH_IMMS10BY8 -ENUMX - BFD_RELOC_SH_IMMS16 -ENUMX - BFD_RELOC_SH_IMMU16 -ENUMX - BFD_RELOC_SH_IMM_LOW16 -ENUMX - BFD_RELOC_SH_IMM_LOW16_PCREL -ENUMX - BFD_RELOC_SH_IMM_MEDLOW16 -ENUMX - BFD_RELOC_SH_IMM_MEDLOW16_PCREL -ENUMX - BFD_RELOC_SH_IMM_MEDHI16 -ENUMX - BFD_RELOC_SH_IMM_MEDHI16_PCREL -ENUMX - BFD_RELOC_SH_IMM_HI16 -ENUMX - BFD_RELOC_SH_IMM_HI16_PCREL -ENUMX - BFD_RELOC_SH_PT_16 -COMMENT ENUMDOC MIPS ELF relocations. @@ -2487,6 +2387,104 @@ BFD_RELOC_SH_RELATIVE ENUMX BFD_RELOC_SH_GOTPC +ENUMX + BFD_RELOC_SH_GOT_LOW16 +ENUMX + BFD_RELOC_SH_GOT_MEDLOW16 +ENUMX + BFD_RELOC_SH_GOT_MEDHI16 +ENUMX + BFD_RELOC_SH_GOT_HI16 +ENUMX + BFD_RELOC_SH_GOTPLT_LOW16 +ENUMX + BFD_RELOC_SH_GOTPLT_MEDLOW16 +ENUMX + BFD_RELOC_SH_GOTPLT_MEDHI16 +ENUMX + BFD_RELOC_SH_GOTPLT_HI16 +ENUMX + BFD_RELOC_SH_PLT_LOW16 +ENUMX + BFD_RELOC_SH_PLT_MEDLOW16 +ENUMX + BFD_RELOC_SH_PLT_MEDHI16 +ENUMX + BFD_RELOC_SH_PLT_HI16 +ENUMX + BFD_RELOC_SH_GOTOFF_LOW16 +ENUMX + BFD_RELOC_SH_GOTOFF_MEDLOW16 +ENUMX + BFD_RELOC_SH_GOTOFF_MEDHI16 +ENUMX + BFD_RELOC_SH_GOTOFF_HI16 +ENUMX + BFD_RELOC_SH_GOTPC_LOW16 +ENUMX + BFD_RELOC_SH_GOTPC_MEDLOW16 +ENUMX + BFD_RELOC_SH_GOTPC_MEDHI16 +ENUMX + BFD_RELOC_SH_GOTPC_HI16 +ENUMX + BFD_RELOC_SH_COPY64 +ENUMX + BFD_RELOC_SH_GLOB_DAT64 +ENUMX + BFD_RELOC_SH_JMP_SLOT64 +ENUMX + BFD_RELOC_SH_RELATIVE64 +ENUMX + BFD_RELOC_SH_GOT10BY4 +ENUMX + BFD_RELOC_SH_GOT10BY8 +ENUMX + BFD_RELOC_SH_GOTPLT10BY4 +ENUMX + BFD_RELOC_SH_GOTPLT10BY8 +ENUMX + BFD_RELOC_SH_GOTPLT32 +ENUMX + BFD_RELOC_SH_SHMEDIA_CODE +ENUMX + BFD_RELOC_SH_IMMU5 +ENUMX + BFD_RELOC_SH_IMMS6 +ENUMX + BFD_RELOC_SH_IMMS6BY32 +ENUMX + BFD_RELOC_SH_IMMU6 +ENUMX + BFD_RELOC_SH_IMMS10 +ENUMX + BFD_RELOC_SH_IMMS10BY2 +ENUMX + BFD_RELOC_SH_IMMS10BY4 +ENUMX + BFD_RELOC_SH_IMMS10BY8 +ENUMX + BFD_RELOC_SH_IMMS16 +ENUMX + BFD_RELOC_SH_IMMU16 +ENUMX + BFD_RELOC_SH_IMM_LOW16 +ENUMX + BFD_RELOC_SH_IMM_LOW16_PCREL +ENUMX + BFD_RELOC_SH_IMM_MEDLOW16 +ENUMX + BFD_RELOC_SH_IMM_MEDLOW16_PCREL +ENUMX + BFD_RELOC_SH_IMM_MEDHI16 +ENUMX + BFD_RELOC_SH_IMM_MEDHI16_PCREL +ENUMX + BFD_RELOC_SH_IMM_HI16 +ENUMX + BFD_RELOC_SH_IMM_HI16_PCREL +ENUMX + BFD_RELOC_SH_PT_16 ENUMDOC Hitachi SH relocs. Not all of these appear in object files. diff -Nur binutils-2.12/bfd/rs6000-core.c binutils-2.12.1/bfd/rs6000-core.c --- binutils-2.12/bfd/rs6000-core.c Sat Jan 5 08:11:33 2002 +++ binutils-2.12.1/bfd/rs6000-core.c Mon May 13 12:18:47 2002 @@ -182,7 +182,7 @@ /* Return the c_impl field from struct core_dumpx C. */ -#ifdef AIX_CORE_DUMPX_CORE +#if defined (HAVE_ST_C_IMPL) || defined (AIX_5_CORE) # define CNEW_IMPL(c) (c).c_impl #else # define CNEW_IMPL(c) 0 diff -Nur binutils-2.12/bfd/sparclinux.c binutils-2.12.1/bfd/sparclinux.c --- binutils-2.12/bfd/sparclinux.c Tue Oct 2 01:58:41 2001 +++ binutils-2.12.1/bfd/sparclinux.c Thu Apr 4 11:20:46 2002 @@ -1,5 +1,5 @@ /* BFD back-end for linux flavored sparc a.out binaries. - Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001 + Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -438,6 +438,9 @@ int is_plt; struct linux_link_hash_entry *h1, *h2; boolean exists; + + if (h->root.root.type == bfd_link_hash_warning) + h = (struct linux_link_hash_entry *) h->root.root.u.i.link; if (h->root.root.type == bfd_link_hash_undefined && strncmp (h->root.root.root.string, NEEDS_SHRLIB, diff -Nur binutils-2.12/bfd/srec.c binutils-2.12.1/bfd/srec.c --- binutils-2.12/bfd/srec.c Sun Jan 6 02:30:35 2002 +++ binutils-2.12.1/bfd/srec.c Thu Apr 4 11:20:46 2002 @@ -167,13 +167,13 @@ } } -/* The maximum number of bytes on a line is FF. */ +/* The maximum number of address+data+crc bytes on a line is FF. */ #define MAXCHUNK 0xff /* Default size for a CHUNK. */ #define DEFAULT_CHUNK 16 -/* The number of bytes we actually fit onto a line on output. +/* The number of data bytes we actually fit onto a line on output. This variable can be modified by objcopy's --srec-len parameter. For a 0x75 byte record you should set --srec-len=0x70. */ unsigned int Chunk = DEFAULT_CHUNK; @@ -936,7 +936,7 @@ const bfd_byte *data; const bfd_byte *end; { - char buffer[MAXCHUNK]; + char buffer[2 * MAXCHUNK + 6]; unsigned int check_sum = 0; const bfd_byte *src = data; char *dst = buffer; @@ -994,15 +994,14 @@ srec_write_header (abfd) bfd *abfd; { - bfd_byte buffer[MAXCHUNK]; - bfd_byte *dst = buffer; - unsigned int i; + unsigned int len = strlen (abfd->filename); /* I'll put an arbitary 40 char limit on header size. */ - for (i = 0; i < 40 && abfd->filename[i]; i++) - *dst++ = abfd->filename[i]; + if (len > 40) + len = 40; - return srec_write_record (abfd, 0, (bfd_vma) 0, buffer, dst); + return srec_write_record (abfd, 0, (bfd_vma) 0, + abfd->filename, abfd->filename + len); } static boolean @@ -1014,6 +1013,17 @@ unsigned int octets_written = 0; bfd_byte *location = list->data; + /* Validate number of data bytes to write. The srec length byte + counts the address, data and crc bytes. S1 (tdata->type == 1) + records have two address bytes, S2 (tdata->type == 2) records + have three, and S3 (tdata->type == 3) records have four. + The total length can't exceed 255, and a zero data length will + spin for a long time. */ + if (Chunk == 0) + Chunk = 1; + else if (Chunk > MAXCHUNK - tdata->type - 2) + Chunk = MAXCHUNK - tdata->type - 2; + while (octets_written < list->size) { bfd_vma address; @@ -1043,17 +1053,14 @@ bfd *abfd; tdata_type *tdata; { - bfd_byte buffer[2]; - return srec_write_record (abfd, 10 - tdata->type, - abfd->start_address, buffer, buffer); + abfd->start_address, NULL, NULL); } static boolean srec_write_symbols (abfd) bfd *abfd; { - char buffer[MAXCHUNK]; /* Dump out the symbols of a bfd. */ int i; int count = bfd_get_symcount (abfd); @@ -1062,10 +1069,10 @@ { bfd_size_type len; asymbol **table = bfd_get_outsymbols (abfd); - sprintf (buffer, "$$ %s\r\n", abfd->filename); - - len = strlen (buffer); - if (bfd_bwrite (buffer, len, abfd) != len) + len = strlen (abfd->filename); + if (bfd_bwrite ("$$ ", (bfd_size_type) 3, abfd) != 3 + || bfd_bwrite (abfd->filename, len, abfd) != len + || bfd_bwrite ("\r\n", (bfd_size_type) 2, abfd) != 2) return false; for (i = 0; i < count; i++) @@ -1075,23 +1082,29 @@ && (s->flags & BSF_DEBUGGING) == 0) { /* Just dump out non debug symbols. */ - char buf2[40], *p; + char buf[42], *p; + + len = strlen (s->name); + if (bfd_bwrite (" ", (bfd_size_type) 2, abfd) != 2 + || bfd_bwrite (s->name, len, abfd) != len) + return false; - sprintf_vma (buf2, - s->value + s->section->output_section->lma - + s->section->output_offset); - p = buf2; + sprintf_vma (buf + 1, (s->value + + s->section->output_section->lma + + s->section->output_offset)); + p = buf + 1; while (p[0] == '0' && p[1] != 0) p++; - sprintf (buffer, " %s $%s\r\n", s->name, p); - len = strlen (buffer); - if (bfd_bwrite (buffer, len, abfd) != len) + len = strlen (p); + p[len] = '\r'; + p[len + 1] = '\n'; + *--p = ' '; + len += 3; + if (bfd_bwrite (p, len, abfd) != len) return false; } } - sprintf (buffer, "$$ \r\n"); - len = strlen (buffer); - if (bfd_bwrite (buffer, len, abfd) != len) + if (bfd_bwrite ("$$ \r\n", (bfd_size_type) 5, abfd) != 5) return false; } diff -Nur binutils-2.12/bfd/sunos.c binutils-2.12.1/bfd/sunos.c --- binutils-2.12/bfd/sunos.c Sat Jan 5 08:11:31 2002 +++ binutils-2.12.1/bfd/sunos.c Thu Apr 4 11:20:47 2002 @@ -2052,6 +2052,9 @@ { struct bfd_link_info *info = (struct bfd_link_info *) data; + if (h->root.root.type == bfd_link_hash_warning) + h = (struct sunos_link_hash_entry *) h->root.root.u.i.link; + /* Set the written flag for symbols we do not want to write out as part of the regular symbol table. This is all symbols which are not defined in a regular object file. For some reason symbols diff -Nur binutils-2.12/bfd/syms.c binutils-2.12.1/bfd/syms.c --- binutils-2.12/bfd/syms.c Wed Jan 30 13:12:16 2002 +++ binutils-2.12.1/bfd/syms.c Thu May 9 10:49:11 2002 @@ -545,23 +545,25 @@ adding entries. Since it is so short, a linear search is used. */ static const struct section_to_type stt[] = { - {"*DEBUG*", 'N'}, {".bss", 'b'}, - {"zerovars", 'b'}, /* MRI .bss */ + {"code", 't'}, /* MRI .text */ {".data", 'd'}, - {"vars", 'd'}, /* MRI .data */ + {"*DEBUG*", 'N'}, + {".debug", 'N'}, /* MSVC's .debug (non-standard debug syms) */ + {".drectve", 'i'}, /* MSVC's .drective section */ + {".edata", 'e'}, /* MSVC's .edata (export) section */ + {".fini", 't'}, /* ELF fini section */ + {".idata", 'i'}, /* MSVC's .idata (import) section */ + {".init", 't'}, /* ELF init section */ + {".pdata", 'p'}, /* MSVC's .pdata (stack unwind) section */ {".rdata", 'r'}, /* Read only data. */ {".rodata", 'r'}, /* Read only data. */ {".sbss", 's'}, /* Small BSS (uninitialized data). */ {".scommon", 'c'}, /* Small common. */ {".sdata", 'g'}, /* Small initialized data. */ {".text", 't'}, - {"code", 't'}, /* MRI .text */ - {".drectve", 'i'}, /* MSVC's .drective section */ - {".idata", 'i'}, /* MSVC's .idata (import) section */ - {".edata", 'e'}, /* MSVC's .edata (export) section */ - {".pdata", 'p'}, /* MSVC's .pdata (stack unwind) section */ - {".debug", 'N'}, /* MSVC's .debug (non-standard debug syms) */ + {"vars", 'd'}, /* MRI .data */ + {"zerovars", 'b'}, /* MRI .bss */ {0, 0} }; @@ -1236,9 +1238,11 @@ for (; stab < (indexentry+1)->stab; stab += STABSIZE) { - boolean done; + boolean done, saw_line, saw_func; bfd_vma val; + saw_line = false; + saw_func = false; done = false; switch (stab[TYPEOFF]) @@ -1259,7 +1263,11 @@ /* A line number. The value is relative to the start of the current function. */ val = indexentry->val + bfd_get_32 (abfd, stab + VALOFF); - if (val <= offset) + /* If this line starts before our desired offset, or if it's + the first line we've been able to find, use it. The + !saw_line check works around a bug in GCC 2.95.3, which emits + the first N_SLINE late. */ + if (!saw_line || val <= offset) { *pline = bfd_get_16 (abfd, stab + DESCOFF); @@ -1272,11 +1280,14 @@ } if (val > offset) done = true; + saw_line = true; break; case N_FUN: case N_SO: - done = true; + if (saw_func || saw_line) + done = true; + saw_func = true; break; } @@ -1286,7 +1297,8 @@ *pfound = true; - if (IS_ABSOLUTE_PATH(file_name) || directory_name == NULL) + if (file_name == NULL || IS_ABSOLUTE_PATH (file_name) + || directory_name == NULL) *pfilename = file_name; else { diff -Nur binutils-2.12/bfd/version.h binutils-2.12.1/bfd/version.h --- binutils-2.12/bfd/version.h Fri Feb 8 18:00:05 2002 +++ binutils-2.12.1/bfd/version.h Tue May 14 19:33:07 2002 @@ -1 +1 @@ -#define BFD_VERSION_DATE 20020209 +#define BFD_VERSION_DATE 20020514 diff -Nur binutils-2.12/bfd/xcofflink.c binutils-2.12.1/bfd/xcofflink.c --- binutils-2.12/bfd/xcofflink.c Sat Jan 5 08:11:31 2002 +++ binutils-2.12.1/bfd/xcofflink.c Thu May 9 10:49:14 2002 @@ -2114,7 +2114,7 @@ /* Remove the sections from this object, so that they do not get included in the link. */ - abfd->sections = NULL; + bfd_section_list_clear (abfd); bfd_xcoff_swap_ldhdr_in (abfd, contents, &ldhdr); @@ -3264,6 +3264,9 @@ struct xcoff_loader_info *ldinfo = (struct xcoff_loader_info *) p; bfd_size_type amt; + if (h->root.type == bfd_link_hash_warning) + h = (struct xcoff_link_hash_entry *) h->root.u.i.link; + /* __rtinit Special handling of this symbol to make is the first symbol in the loader symbol table. Make sure this pass through does not @@ -5395,6 +5398,13 @@ output_bfd = finfo->output_bfd; outsym = finfo->outsyms; + + if (h->root.type == bfd_link_hash_warning) + { + h = (struct xcoff_link_hash_entry *) h->root.u.i.link; + if (h->root.type == bfd_link_hash_new) + return true; + } /* If this symbol was garbage collected, just skip it. */ if (xcoff_hash_table (finfo->info)->gc diff -Nur binutils-2.12/binutils/ChangeLog binutils-2.12.1/binutils/ChangeLog --- binutils-2.12/binutils/ChangeLog Fri Mar 8 01:04:46 2002 +++ binutils-2.12.1/binutils/ChangeLog Sat May 11 13:32:44 2002 @@ -1,3 +1,143 @@ +2002-05-09 Alan Modra + + * configure.in: Replace `*pe' with `pe' throughout. + * configure: Regenerate. + + Merge from mainline + 2002-05-06 Alan Modra + * dlltool.c (process_def_file): Add missing prototype. + (new_directive, assemble_file, main): Likewise. + (process_def_file, new_directive): Make static. + (inform): Rewrite using VA_FIXEDARG. + * dllwrap.c (mybasename): Add missing prototype. + (strhash, main): Likewise. + (inform): Rewrite using VA_FIXEDARG. + (warn): Likewise. + (cleanup_and_exit): Use old style function definition. + (strhash): Likewise. + * windres.c (define_resource): Use one memset to clear all of + struct res_resource. + * rcparse.y: Remove newcmd rule. Move rcparse_discard_strings + call to rules that need no lookahead. Check for no lookahead. + + 2002-05-06 Borut Razem + * rclex.l (get_string): Correct "strings" list handling. + * resrc.c (read_rc_file): Discard strings. + + 2002-05-04 Bob Byrnes + * size.c (display_archive): Add last_arfile and code to close archives. + + 2002-05-01 Alan Modra + * nm.c (print_symbol): Check returned filename from + bfd_find_nearest_line is non-NULL. + + 2002-04-17 Thiemo Seufer + * arparse.y: Fix syntax warning. + + 2002-04-16 Nick Clifton + * rcparse.y: Set MEMFLAG_DISCARDABLE by default. + + 2002-04-15 Nick Clifton + * resrc.c (write_rc_dialog): If charset is non-default value + display all of the DIALOGEX parameters. + + 2002-04-15 Eric Kohl + * rcparse.y: Allow two to five parameter in FONT statement of + DIALOGEX resources. + * resbin.c (bin_to_res_dialog): Fixed read/write code for dialogex + resource data. + (res_to_bin_dialog): Likewise. + * windres.h: Added misssing charset variable to dialog_ex + structure. + + 2002-04-10 Nick Clifton + * rcparse.y: Set MEMFLAG_PURE by default. + + 2002-04-09 Bernd Herd + * rcparse.y: CLASS definitions in DIALOG resources + are quoted. + Fix typo in BEDIT warning. + Don't add default dialog style when explicit style specified. + Add WS_CAPTION dialog style if CAPTION is specified. + * rclex.l (handle_quotes): "\xhex" encoding in strings corrected. + (handle_quotes) "\a" escape (used for right justified key + definitions in menus) is encodes as binary 8. + * resrc.c (write_rc_dialog): Print style even if it is 0. + (write_rc_directory): Fix overlooked sublang shift bug. + (bin_to_res_dialog): Don't print empty dialog caption. + * resbin.c (bin_to_res_dialog): Use signature to identify + DIALOGEX. + * windres.c (main): Set default LANGUAGE to english/us. + + 2002-04-09 Gunnar Degnbol + * resrc.c: print CLASS names in quotes + +2002-04-27 Alan Modra + + Merge from mainline + 2002-04-25 Elena Zannoni + * readelf.c (get_AT_name): Handle DW_AT_GNU_vector. + + 2002-04-16 Nick Clifton + * readelf.c (fetch_location_list): Remove unused function. + * readelf.c (process_corefile_note_segment): Catch corrupt notes + and display a warning message, then exit the loop. + + 2002-04-24 Christian Groessler + * MAINTAINERS: Changed my email address. + + 2002-04-09 J"orn Rennecke + * MAINTAINERS: Update my email address. + + 2002-03-27 Peter Targett + * MAINTAINERS: Update my email address. + + 2002-03-20 Daniel Berlin + * readelf.c: Add support for displaying dwarf2 location lists. + (do_debug_loc, debug_loc_section, debug_loc_size): New. + (parse_args): Use 'O' as shorthand for displaying location list + section. + (process_section_headers): Handle debug_loc as well. + (load_debug_loc): New. + (free_debug_loc): New. + (fetch_location_list): New. + (display_debug_loc): New. + (display_debug_info): Call load_debug_loc and free_debug_loc. + (debug_displays): We can display .debug_loc now, too. + (usage): Update usage string. + (read_and_display_attr_value): Note location lists, but don't + display them inline. + + 2002-03-01 Dmitry Timoshkov + * dlltool.c (gen_exp_file): Take into account --kill-at (-k) while + generating .exp file. + + 2002-02-21 Nick Clifton + * readelf.c (dump_relocations): Fix typo. + + 2002-02-18 Timothy Daly + * readelf.c (dump_relocations): Display 2nd and 3rd reloc + types for 64-bit MIPS. Narrow some fields for 80-char + output. + (dump_relocations): Change spelling from 'unrecognised' + to 'unrecognized'. + (decode_ARM_machine_flags): Likewise. + (parse_args): Likewise. + (read_and_display_attr_value): Likewise. + (display_debug_section): Likewise. + +2002-04-04 Alan Modra + + * dep-in.sed: Cope with absolute paths. + * Makefile.am (dep.sed): Subst TOPDIR. + Run "make dep-am". + * Makefile.in: Regenerate. + +2002-03-28 Alan Modra + + * aclocal.m4: Regenerate. + * configure: Regenerate. + 2002-03-07 Daniel Jacobowitz * README: Update some version numbers. diff -Nur binutils-2.12/binutils/MAINTAINERS binutils-2.12.1/binutils/MAINTAINERS --- binutils-2.12/binutils/MAINTAINERS Tue Feb 12 04:48:51 2002 +++ binutils-2.12.1/binutils/MAINTAINERS Thu May 9 10:49:16 2002 @@ -50,7 +50,7 @@ maintainer. The first maintainer is free to devolve that responsibility among the other maintainers. - ARC Peter Targett + ARC Peter Targett ARM Nick Clifton ARM Richard Earnshaw AVR Denis Chertykov @@ -74,12 +74,13 @@ PPC Geoff Keating PPC XCOFF Tom Rix s390, s390x Martin Schwidefsky - SH Jörn Rennecke + SH Jörn Rennecke SH Hans-Peter Nilsson SH Alexandre Oliva SPARC Jakub Jelinek TIC54X Timothy Wall - z8k Christian Groessler + z8k Christian Groessler + --------- CGEN Maintainers ------------- diff -Nur binutils-2.12/binutils/Makefile.am binutils-2.12.1/binutils/Makefile.am --- binutils-2.12/binutils/Makefile.am Thu Jan 31 22:26:32 2002 +++ binutils-2.12.1/binutils/Makefile.am Thu Apr 4 11:20:11 2002 @@ -307,7 +307,8 @@ -e 's!@INCDIR@!$(INCDIR)!' \ -e 's!@BFDDIR@!$(BFDDIR)!' \ -e 's!@SRCDIR@!$(srcdir)!' \ - -e "s!@OBJDIR@!$${objdir}!" + -e "s!@OBJDIR@!$${objdir}!" \ + -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/binutils$$,,`'!' dep: DEP sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile @@ -376,11 +377,13 @@ bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h -coffdump.o: coffdump.c coffgrok.h bucomm.h config.h \ - $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h -coffgrok.o: coffgrok.c bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ - $(INCDIR)/bfdlink.h coffgrok.h +coffdump.o: coffdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h $(INCDIR)/libiberty.h coffgrok.h \ + bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h +coffgrok.o: coffgrok.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \ + $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/coff/internal.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h coffgrok.h debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h @@ -435,21 +438,24 @@ size.o: size.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ $(INCDIR)/libiberty.h -srconv.o: srconv.c bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h sysroff.h coffgrok.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h sysroff.c +srconv.o: srconv.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h sysroff.h coffgrok.h $(INCDIR)/libiberty.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + sysroff.c stabs.o: stabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \ $(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/filenames.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def strings.o: strings.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h + $(INCDIR)/symcat.h $(INCDIR)/getopt.h bucomm.h config.h \ + $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ + $(INCDIR)/safe-ctype.h sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h sysroff.h \ - sysroff.c + $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h \ + sysroff.h sysroff.c version.o: version.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h @@ -508,7 +514,8 @@ arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h arsup.h -arlex.o: arlex.c $(INCDIR)/libiberty.h arparse.h +arlex.o: arlex.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \ + arparse.h sysroff.o: sysroff.c sysinfo.o: sysinfo.c syslex.o: syslex.c sysinfo.h @@ -517,8 +524,8 @@ $(INCDIR)/fopen-same.h dlltool.h deflex.o: deflex.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ defparse.h dlltool.h -nlmheader.o: nlmheader.c $(INCDIR)/safe-ctype.h ../bfd/bfd.h \ - $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ +nlmheader.o: nlmheader.c $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \ + ../bfd/bfd.h $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ nlmconv.h rcparse.o: rcparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ diff -Nur binutils-2.12/binutils/Makefile.in binutils-2.12.1/binutils/Makefile.in --- binutils-2.12/binutils/Makefile.in Thu Jan 31 22:26:32 2002 +++ binutils-2.12.1/binutils/Makefile.in Thu Apr 4 11:20:11 2002 @@ -1032,7 +1032,8 @@ -e 's!@INCDIR@!$(INCDIR)!' \ -e 's!@BFDDIR@!$(BFDDIR)!' \ -e 's!@SRCDIR@!$(srcdir)!' \ - -e "s!@OBJDIR@!$${objdir}!" + -e "s!@OBJDIR@!$${objdir}!" \ + -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/binutils$$,,`'!' dep: DEP sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile @@ -1095,11 +1096,13 @@ bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h -coffdump.o: coffdump.c coffgrok.h bucomm.h config.h \ - $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h -coffgrok.o: coffgrok.c bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ - $(INCDIR)/bfdlink.h coffgrok.h +coffdump.o: coffdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h $(INCDIR)/libiberty.h coffgrok.h \ + bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h +coffgrok.o: coffgrok.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \ + $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/coff/internal.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h coffgrok.h debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h @@ -1154,21 +1157,24 @@ size.o: size.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ $(INCDIR)/libiberty.h -srconv.o: srconv.c bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h sysroff.h coffgrok.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h sysroff.c +srconv.o: srconv.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h sysroff.h coffgrok.h $(INCDIR)/libiberty.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + sysroff.c stabs.o: stabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \ $(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/filenames.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def strings.o: strings.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h + $(INCDIR)/symcat.h $(INCDIR)/getopt.h bucomm.h config.h \ + $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ + $(INCDIR)/safe-ctype.h sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h sysroff.h \ - sysroff.c + $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h \ + sysroff.h sysroff.c version.o: version.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h @@ -1227,7 +1233,8 @@ arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h arsup.h -arlex.o: arlex.c $(INCDIR)/libiberty.h arparse.h +arlex.o: arlex.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \ + arparse.h sysroff.o: sysroff.c sysinfo.o: sysinfo.c syslex.o: syslex.c sysinfo.h @@ -1236,8 +1243,8 @@ $(INCDIR)/fopen-same.h dlltool.h deflex.o: deflex.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ defparse.h dlltool.h -nlmheader.o: nlmheader.c $(INCDIR)/safe-ctype.h ../bfd/bfd.h \ - $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ +nlmheader.o: nlmheader.c $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \ + ../bfd/bfd.h $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ nlmconv.h rcparse.o: rcparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ diff -Nur binutils-2.12/binutils/aclocal.m4 binutils-2.12.1/binutils/aclocal.m4 --- binutils-2.12/binutils/aclocal.m4 Tue Mar 13 01:43:56 2001 +++ binutils-2.12.1/binutils/aclocal.m4 Mon Apr 1 20:28:36 2002 @@ -1,6 +1,6 @@ -dnl aclocal.m4 generated automatically by aclocal 1.4 +dnl aclocal.m4 generated automatically by aclocal 1.4-p5 -dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -37,24 +37,6 @@ AC_PROG_LEX AC_DECL_YYTEXT]) -#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"]) - ] -) - # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. @@ -64,7 +46,7 @@ dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) -AC_DEFUN(AM_INIT_AUTOMAKE, +AC_DEFUN([AM_INIT_AUTOMAKE], [AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) @@ -92,7 +74,7 @@ # Check to make sure that the build environment is sane. # -AC_DEFUN(AM_SANITY_CHECK, +AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 @@ -133,7 +115,7 @@ dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. -AC_DEFUN(AM_MISSING_PROG, +AC_DEFUN([AM_MISSING_PROG], [AC_MSG_CHECKING(for working $2) # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. @@ -149,7 +131,7 @@ # Like AC_CONFIG_HEADER, but automatically create stamp file. -AC_DEFUN(AM_CONFIG_HEADER, +AC_DEFUN([AM_CONFIG_HEADER], [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. @@ -175,7 +157,7 @@ # serial 1 -AC_DEFUN(AM_MAINTAINER_MODE, +AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, @@ -192,7 +174,7 @@ # Define a conditional. -AC_DEFUN(AM_CONDITIONAL, +AC_DEFUN([AM_CONDITIONAL], [AC_SUBST($1_TRUE) AC_SUBST($1_FALSE) if $2; then diff -Nur binutils-2.12/binutils/arparse.c binutils-2.12.1/binutils/arparse.c --- binutils-2.12/binutils/arparse.c Fri Mar 8 01:15:54 2002 +++ binutils-2.12.1/binutils/arparse.c Mon May 13 09:14:40 2002 @@ -1,5 +1,5 @@ /* A Bison parser, made from arparse.y - by GNU bison 1.33. */ + by GNU bison 1.35. */ #define YYBISON 1 /* Identify Bison output. */ @@ -65,6 +65,7 @@ } yystype; # define YYSTYPE yystype +# define YYSTYPE_IS_TRIVIAL 1 #endif #ifndef YYDEBUG # define YYDEBUG 0 @@ -141,11 +142,11 @@ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { - 0, 66, 66, 70, 72, 75, 78, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 98, 103, 108, 113, 117, 122, 127, 134, - 139, 145, 149, 156, 159, 162, 165, 169, 176, 180, - 182, 186 + 0, 66, 66, 70, 72, 75, 79, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 99, 104, 109, 114, 118, 123, 128, 135, + 140, 146, 150, 157, 160, 163, 166, 170, 177, 181, + 183, 187 }; #endif @@ -163,7 +164,7 @@ "addmod_command", "list_command", "save_command", "open_command", "create_command", "addlib_command", "directory_command", "optional_filename", "modulelist", "modulename", "optcomma", - "verbose_command", NULL + "verbose_command", 0 }; #endif @@ -283,12 +284,6 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -#ifdef __cplusplus -# define YYSTD(x) std::x -#else -# define YYSTD(x) x -#endif - #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -311,18 +306,19 @@ /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # else -# ifdef __cplusplus -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T std::size_t -# else -# ifdef __STDC__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t # endif -# define YYSTACK_ALLOC YYSTD (malloc) -# define YYSTACK_FREE YYSTD (free) +# define YYSTACK_ALLOC malloc +# define YYSTACK_FREE free # endif +#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ + + +#if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -349,24 +345,41 @@ + YYSTACK_GAP_MAX) # endif -/* Relocate the TYPE STACK from its old location to the new one. The +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Type, Stack) \ +# define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - yymemcpy ((char *) yyptr, (char *) (Stack), \ - yysize * (YYSIZE_T) sizeof (Type)); \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) -#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ +#endif #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) @@ -376,14 +389,9 @@ # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) -# ifdef __cplusplus -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T std::size_t -# else -# ifdef __STDC__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t # endif #endif #if ! defined (YYSIZE_T) @@ -462,12 +470,8 @@ #if YYDEBUG # ifndef YYFPRINTF -# ifdef __cplusplus -# include /* INFRINGES ON USER NAME SPACE */ -# else -# include /* INFRINGES ON USER NAME SPACE */ -# endif -# define YYFPRINTF YYSTD (fprintf) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ @@ -475,10 +479,8 @@ if (yydebug) \ YYFPRINTF Args; \ } while (0) -/* Nonzero means print parse trace. [The following comment makes no - sense to me. Could someone clarify it? --akim] Since this is - uninitialized, it does not stop multiple parsers from coexisting. - */ +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) @@ -504,33 +506,6 @@ # define YYMAXDEPTH 10000 #endif -#if ! defined (yyoverflow) && ! defined (yymemcpy) -# if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -# define yymemcpy __builtin_memcpy -# else /* not GNU C or C++ */ - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -# if defined (__STDC__) || defined (__cplusplus) -yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount) -# else -yymemcpy (yyto, yyfrom, yycount) - char *yyto; - const char *yyfrom; - YYSIZE_T yycount; -# endif -{ - register const char *yyf = yyfrom; - register char *yyt = yyto; - register YYSIZE_T yyi = yycount; - - while (yyi-- != 0) - *yyt++ = *yyf++; -} -# endif -#endif - #ifdef YYERROR_VERBOSE # ifndef yystrlen @@ -583,7 +558,7 @@ # endif #endif -#line 341 "/usr/share/bison/bison.simple" +#line 315 "/usr/share/bison/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed @@ -593,13 +568,13 @@ to the proper pointer type. */ #ifdef YYPARSE_PARAM -# ifdef __cplusplus +# if defined (__STDC__) || defined (__cplusplus) # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM # define YYPARSE_PARAM_DECL -# else /* !__cplusplus */ +# else # define YYPARSE_PARAM_ARG YYPARSE_PARAM # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -# endif /* !__cplusplus */ +# endif #else /* !YYPARSE_PARAM */ # define YYPARSE_PARAM_ARG # define YYPARSE_PARAM_DECL @@ -773,6 +748,9 @@ yyvs = yyvs1; } #else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyoverflowlab; +# else /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) goto yyoverflowlab; @@ -786,15 +764,16 @@ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyoverflowlab; - YYSTACK_RELOCATE (short, yyss); - YYSTACK_RELOCATE (YYSTYPE, yyvs); + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); # if YYLSP_NEEDED - YYSTACK_RELOCATE (YYLTYPE, yyls); + YYSTACK_RELOCATE (yyls); # endif # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } +# endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; @@ -981,75 +960,75 @@ { prompt(); } break; case 18: -#line 91 "arparse.y" +#line 92 "arparse.y" { ar_end(); return 0; } break; case 20: -#line 93 "arparse.y" +#line 94 "arparse.y" { yyerror("foo"); } break; case 22: -#line 100 "arparse.y" +#line 101 "arparse.y" { ar_extract(yyvsp[0].list); } break; case 23: -#line 105 "arparse.y" +#line 106 "arparse.y" { ar_replace(yyvsp[0].list); } break; case 24: -#line 110 "arparse.y" +#line 111 "arparse.y" { ar_clear(); } break; case 25: -#line 115 "arparse.y" +#line 116 "arparse.y" { ar_delete(yyvsp[0].list); } break; case 26: -#line 119 "arparse.y" +#line 120 "arparse.y" { ar_addmod(yyvsp[0].list); } break; case 27: -#line 124 "arparse.y" +#line 125 "arparse.y" { ar_list(); } break; case 28: -#line 129 "arparse.y" +#line 130 "arparse.y" { ar_save(); } break; case 29: -#line 136 "arparse.y" +#line 137 "arparse.y" { ar_open(yyvsp[0].name,0); } break; case 30: -#line 141 "arparse.y" +#line 142 "arparse.y" { ar_open(yyvsp[0].name,1); } break; case 31: -#line 147 "arparse.y" +#line 148 "arparse.y" { ar_addlib(yyvsp[-1].name,yyvsp[0].list); } break; case 32: -#line 151 "arparse.y" +#line 152 "arparse.y" { ar_directory(yyvsp[-2].name, yyvsp[-1].list, yyvsp[0].name); } break; case 33: -#line 158 "arparse.y" +#line 159 "arparse.y" { yyval.name = yyvsp[0].name; } break; case 34: -#line 159 "arparse.y" +#line 160 "arparse.y" { yyval.name = 0; } break; case 35: -#line 164 "arparse.y" +#line 165 "arparse.y" { yyval.list = yyvsp[-1].list; } break; case 36: -#line 166 "arparse.y" +#line 167 "arparse.y" { yyval.list = 0; } break; case 37: -#line 171 "arparse.y" +#line 172 "arparse.y" { struct list *n = (struct list *) malloc(sizeof(struct list)); n->next = yyvsp[-2].list; n->name = yyvsp[0].name; @@ -1057,16 +1036,16 @@ } break; case 38: -#line 176 "arparse.y" +#line 177 "arparse.y" { yyval.list = 0; } break; case 41: -#line 188 "arparse.y" +#line 189 "arparse.y" { verbose = !verbose; } break; } -#line 727 "/usr/share/bison/bison.simple" +#line 705 "/usr/share/bison/bison.simple" yyvsp -= yylen; @@ -1297,7 +1276,7 @@ #endif return yyresult; } -#line 192 "arparse.y" +#line 193 "arparse.y" static int diff -Nur binutils-2.12/binutils/arparse.h binutils-2.12.1/binutils/arparse.h --- binutils-2.12/binutils/arparse.h Fri Mar 8 01:15:54 2002 +++ binutils-2.12.1/binutils/arparse.h Mon May 13 09:14:40 2002 @@ -8,6 +8,7 @@ } yystype; # define YYSTYPE yystype +# define YYSTYPE_IS_TRIVIAL 1 #endif # define NEWLINE 257 # define VERBOSE 258 diff -Nur binutils-2.12/binutils/arparse.y binutils-2.12.1/binutils/arparse.y --- binutils-2.12/binutils/arparse.y Tue Mar 13 01:43:57 2001 +++ binutils-2.12.1/binutils/arparse.y Thu May 9 10:49:16 2002 @@ -74,6 +74,7 @@ command_line: command NEWLINE { prompt(); } + ; command: open_command diff -Nur binutils-2.12/binutils/config.in binutils-2.12.1/binutils/config.in --- binutils-2.12/binutils/config.in Tue Dec 4 05:11:22 2001 +++ binutils-2.12.1/binutils/config.in Thu May 9 10:49:17 2002 @@ -28,6 +28,9 @@ /* Define to `long' if doesn't define. */ #undef off_t +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + /* Define to `unsigned' if doesn't define. */ #undef size_t diff -Nur binutils-2.12/binutils/configure binutils-2.12.1/binutils/configure --- binutils-2.12/binutils/configure Sun Jan 27 23:59:36 2002 +++ binutils-2.12.1/binutils/configure Thu May 9 10:49:17 2002 @@ -717,49 +717,249 @@ NONENONEs,x,x, && program_prefix=${target_alias}- +# 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:724: 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 - echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 -echo "configure:723: 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:754: 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 - ac_save_LIBS="$LIBS" -LIBS="-lcposix $LIBS" -cat > conftest.$ac_ext <&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:805: 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:837: 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 848 "configure" #include "confdefs.h" -/* 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(); -int main() { -strerror() -; return 0; } +main(){return(0);} EOF -if { (eval echo configure:742: \"$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:853: \"$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 - 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:879: 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:884: 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:912: 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* -LIBS="$ac_save_LIBS" fi -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:944: 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 echo "$ac_t""yes" 1>&6 - 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 else echo "$ac_t""no" 1>&6 + ISC= fi - - BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in` # Find a good install program. We prefer a C program (faster), @@ -774,7 +974,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:778: checking for a BSD compatible install" >&5 +echo "configure:978: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -827,7 +1027,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:831: checking whether build environment is sane" >&5 +echo "configure:1031: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -884,7 +1084,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:888: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1088: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -930,7 +1130,7 @@ missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:934: checking for working aclocal" >&5 +echo "configure:1134: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -943,7 +1143,7 @@ fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:947: checking for working autoconf" >&5 +echo "configure:1147: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -956,7 +1156,7 @@ fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:960: checking for working automake" >&5 +echo "configure:1160: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -969,7 +1169,7 @@ fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:973: checking for working autoheader" >&5 +echo "configure:1173: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -982,7 +1182,7 @@ fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:986: checking for working makeinfo" >&5 +echo "configure:1186: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1065,228 +1265,6 @@ enable_fast_install=yes fi -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1072: 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:1102: 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:1153: 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:1185: 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 1196 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:1201: \"$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:1227: 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:1232: 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:1260: 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 - # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" @@ -1299,7 +1277,7 @@ if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1303: checking for ld used by GCC" >&5 +echo "configure:1281: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1329,10 +1307,10 @@ esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1333: checking for GNU ld" >&5 +echo "configure:1311: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1336: checking for non-GNU ld" >&5 +echo "configure:1314: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1367,7 +1345,7 @@ fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1371: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1349: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1384,7 +1362,7 @@ echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1388: checking for $LD option to reload object files" >&5 +echo "configure:1366: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1396,7 +1374,7 @@ test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1400: checking for BSD-compatible nm" >&5 +echo "configure:1378: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1434,7 +1412,7 @@ echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1438: checking whether ln -s works" >&5 +echo "configure:1416: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1455,7 +1433,7 @@ fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:1459: checking how to recognise dependant libraries" >&5 +echo "configure:1437: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1628,13 +1606,13 @@ deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1632: checking for object suffix" >&5 +echo "configure:1610: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1654,7 +1632,7 @@ echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1658: checking for executable suffix" >&5 +echo "configure:1636: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1664,7 +1642,7 @@ rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -1697,7 +1675,7 @@ file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:1701: checking for ${ac_tool_prefix}file" >&5 +echo "configure:1679: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1759,7 +1737,7 @@ if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:1763: checking for file" >&5 +echo "configure:1741: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1830,7 +1808,7 @@ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1834: checking for $ac_word" >&5 +echo "configure:1812: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1862,7 +1840,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1866: checking for $ac_word" >&5 +echo "configure:1844: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1897,7 +1875,7 @@ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1901: checking for $ac_word" >&5 +echo "configure:1879: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1929,7 +1907,7 @@ # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1933: checking for $ac_word" >&5 +echo "configure:1911: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1996,8 +1974,8 @@ case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 2000 "configure"' > conftest.$ac_ext - if { (eval echo configure:2001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1978 "configure"' > conftest.$ac_ext + if { (eval echo configure:1979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" @@ -2016,7 +1994,7 @@ ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo configure:2020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" @@ -2034,7 +2012,7 @@ SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:2038: checking whether the C compiler needs -belf" >&5 +echo "configure:2016: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2047,14 +2025,14 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -2227,7 +2205,7 @@ # 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:2231: checking for $ac_word" >&5 +echo "configure:2209: 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 @@ -2257,7 +2235,7 @@ # 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:2261: checking for $ac_word" >&5 +echo "configure:2239: 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 @@ -2308,7 +2286,7 @@ # 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:2312: checking for $ac_word" >&5 +echo "configure:2290: 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 @@ -2340,7 +2318,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2344: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2322: 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. @@ -2351,12 +2329,12 @@ cat > conftest.$ac_ext << EOF -#line 2355 "configure" +#line 2333 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2338: \"$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 @@ -2382,12 +2360,12 @@ { 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:2386: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2364: 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:2391: checking whether we are using GNU C" >&5 +echo "configure:2369: 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 @@ -2396,7 +2374,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2400: \"$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:2378: \"$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 @@ -2415,7 +2393,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2419: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2397: 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 @@ -2452,7 +2430,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2456: checking for $ac_word" >&5 +echo "configure:2434: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2483,7 +2461,7 @@ test -n "$YACC" || YACC="yacc" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2487: checking how to run the C preprocessor" >&5 +echo "configure:2465: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2498,13 +2476,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2515,13 +2493,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2532,13 +2510,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2568,7 +2546,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2572: checking for $ac_word" >&5 +echo "configure:2550: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2601,7 +2579,7 @@ # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2605: checking for $ac_word" >&5 +echo "configure:2583: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2635,7 +2613,7 @@ *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:2639: checking for yywrap in -l$ac_lib" >&5 +echo "configure:2617: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2643,7 +2621,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2636: \"$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" else @@ -2677,7 +2655,7 @@ fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:2681: checking lex output file root" >&5 +echo "configure:2659: checking lex output file root" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2698,7 +2676,7 @@ LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:2702: checking whether yytext is a pointer" >&5 +echo "configure:2680: checking whether yytext is a pointer" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2710,14 +2688,14 @@ ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_prog_lex_yytext_pointer=yes else @@ -2743,7 +2721,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2747: checking for $ac_word" >&5 +echo "configure:2725: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2771,12 +2749,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2775: checking for ANSI C header files" >&5 +echo "configure:2753: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2784,7 +2762,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2801,7 +2779,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2819,7 +2797,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2840,7 +2818,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2851,7 +2829,7 @@ exit (0); } EOF -if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2875,12 +2853,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2879: checking for working const" >&5 +echo "configure:2857: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2950,21 +2928,21 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2954: checking for inline" >&5 +echo "configure:2932: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2990,12 +2968,12 @@ esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2994: checking for off_t" >&5 +echo "configure:2972: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3023,12 +3001,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3027: checking for size_t" >&5 +echo "configure:3005: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3058,19 +3036,19 @@ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:3062: checking for working alloca.h" >&5 +echo "configure:3040: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -3091,12 +3069,12 @@ fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3095: checking for alloca" >&5 +echo "configure:3073: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -3156,12 +3134,12 @@ echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3160: checking whether alloca needs Cray hooks" >&5 +echo "configure:3138: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 -echo "configure:3190: checking for $ac_func" >&5 +echo "configure:3168: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3241,7 +3219,7 @@ fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3245: checking stack direction for C alloca" >&5 +echo "configure:3223: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3249,7 +3227,7 @@ ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3289,21 +3267,21 @@ fi -for ac_hdr in unistd.h +for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3297: checking for $ac_hdr" >&5 +echo "configure:3275: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3332,12 +3310,12 @@ for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3336: checking for $ac_func" >&5 +echo "configure:3314: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3385,7 +3363,7 @@ done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3389: checking for working mmap" >&5 +echo "configure:3367: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3393,7 +3371,7 @@ ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext < #include +#if HAVE_SYS_TYPES_H +# include +#endif + +#if HAVE_STDLIB_H +# include +#endif + +#if HAVE_SYS_STAT_H +# include +#endif + +#if HAVE_UNISTD_H +# include +#endif + /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H @@ -3533,7 +3524,7 @@ } EOF -if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3561,17 +3552,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3565: checking for $ac_hdr" >&5 +echo "configure:3556: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3601,12 +3592,12 @@ __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3605: checking for $ac_func" >&5 +echo "configure:3596: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3658,12 +3649,12 @@ for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3662: checking for $ac_func" >&5 +echo "configure:3653: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3720,19 +3711,19 @@ if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3724: checking for LC_MESSAGES" >&5 +echo "configure:3715: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -3753,7 +3744,7 @@ fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3757: checking whether NLS is requested" >&5 +echo "configure:3748: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -3773,7 +3764,7 @@ EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3777: checking whether included gettext is requested" >&5 +echo "configure:3768: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -3792,17 +3783,17 @@ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3796: checking for libintl.h" >&5 +echo "configure:3787: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3819,19 +3810,19 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3823: checking for gettext in libc" >&5 +echo "configure:3814: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3847,7 +3838,7 @@ if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3851: checking for bindtextdomain in -lintl" >&5 +echo "configure:3842: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3855,7 +3846,7 @@ ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3861: \"$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" else @@ -3882,19 +3873,19 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3886: checking for gettext in libintl" >&5 +echo "configure:3877: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -3922,7 +3913,7 @@ # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3926: checking for $ac_word" >&5 +echo "configure:3917: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3956,12 +3947,12 @@ for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3960: checking for $ac_func" >&5 +echo "configure:3951: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4011,7 +4002,7 @@ # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4015: checking for $ac_word" >&5 +echo "configure:4006: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4047,7 +4038,7 @@ # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4051: checking for $ac_word" >&5 +echo "configure:4042: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4079,7 +4070,7 @@ fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4119,7 +4110,7 @@ # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4123: checking for $ac_word" >&5 +echo "configure:4114: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4153,7 +4144,7 @@ # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4157: checking for $ac_word" >&5 +echo "configure:4148: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4189,7 +4180,7 @@ # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4193: checking for $ac_word" >&5 +echo "configure:4184: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4279,7 +4270,7 @@ LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4283: checking for catalogs to be installed" >&5 +echo "configure:4274: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4307,17 +4298,17 @@ if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4311: checking for linux/version.h" >&5 +echo "configure:4302: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4380,7 +4371,7 @@ echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:4384: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:4375: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -4405,7 +4396,7 @@ echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:4409: checking for executable suffix" >&5 +echo "configure:4400: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4415,7 +4406,7 @@ rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:4419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -4458,7 +4449,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4462: checking for $ac_word" >&5 +echo "configure:4453: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4497,7 +4488,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:4501: checking for a BSD compatible install" >&5 +echo "configure:4492: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4564,7 +4555,7 @@ EXEEXT_FOR_BUILD='$(EXEEXT)' else echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 -echo "configure:4568: checking for build system executable suffix" >&5 +echo "configure:4559: checking for build system executable suffix" >&5 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4599,17 +4590,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4603: checking for $ac_hdr" >&5 +echo "configure:4594: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4636,12 +4627,12 @@ done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4640: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4631: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4657,7 +4648,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4680,19 +4671,19 @@ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:4684: checking for working alloca.h" >&5 +echo "configure:4675: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:4696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -4713,12 +4704,12 @@ fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:4717: checking for alloca" >&5 +echo "configure:4708: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -4778,12 +4769,12 @@ echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:4782: checking whether alloca needs Cray hooks" >&5 +echo "configure:4773: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 -echo "configure:4812: checking for $ac_func" >&5 +echo "configure:4803: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4863,7 +4854,7 @@ fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:4867: checking stack direction for C alloca" >&5 +echo "configure:4858: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4871,7 +4862,7 @@ ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -4914,12 +4905,12 @@ for ac_func in sbrk utimes setmode getc_unlocked do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4918: checking for $ac_func" >&5 +echo "configure:4909: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4970,19 +4961,19 @@ # Check whether fopen64 is available and whether _LARGEFILE64_SOURCE # needs to be defined for it echo $ac_n "checking for fopen64""... $ac_c" 1>&6 -echo "configure:4974: checking for fopen64" >&5 +echo "configure:4965: checking for fopen64" >&5 if eval "test \"`echo '$''{'bu_cv_have_fopen64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { FILE *f = fopen64 ("/tmp/foo","r"); ; return 0; } EOF -if { (eval echo configure:4986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* bu_cv_have_fopen64=yes else @@ -4992,14 +4983,14 @@ saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" cat > conftest.$ac_ext < int main() { FILE *f = fopen64 ("/tmp/foo","r"); ; return 0; } EOF -if { (eval echo configure:5003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE" else @@ -5031,14 +5022,14 @@ # Some systems have frexp only in -lm, not in -lc. echo $ac_n "checking for library containing frexp""... $ac_c" 1>&6 -echo "configure:5035: checking for library containing frexp" >&5 +echo "configure:5026: checking for library containing frexp" >&5 if eval "test \"`echo '$''{'ac_cv_search_frexp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_frexp="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_frexp="none required" else @@ -5060,7 +5051,7 @@ test "$ac_cv_search_frexp" = "no" && for i in m; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_frexp="-l$i" break @@ -5093,19 +5084,19 @@ fi echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6 -echo "configure:5097: checking for time_t in time.h" >&5 +echo "configure:5088: checking for time_t in time.h" >&5 if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { time_t i; ; return 0; } EOF -if { (eval echo configure:5109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bu_cv_decl_time_t_time_h=yes else @@ -5126,19 +5117,19 @@ fi echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5130: checking for time_t in sys/types.h" >&5 +echo "configure:5121: checking for time_t in sys/types.h" >&5 if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { time_t i; ; return 0; } EOF -if { (eval echo configure:5142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bu_cv_decl_time_t_types_h=yes else @@ -5161,12 +5152,12 @@ # Under Next 3.2 apparently does not define struct utimbuf # by default. echo $ac_n "checking for utime.h""... $ac_c" 1>&6 -echo "configure:5165: checking for utime.h" >&5 +echo "configure:5156: checking for utime.h" >&5 if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_TIME_H @@ -5177,7 +5168,7 @@ struct utimbuf s; ; return 0; } EOF -if { (eval echo configure:5181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bu_cv_header_utime_h=yes else @@ -5198,12 +5189,12 @@ fi echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6 -echo "configure:5202: checking whether fprintf must be declared" >&5 +echo "configure:5193: checking whether fprintf must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5224,7 +5215,7 @@ char *(*pfn) = (char *(*)) fprintf ; return 0; } EOF -if { (eval echo configure:5228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_fprintf=no else @@ -5245,12 +5236,12 @@ fi echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:5249: checking whether strstr must be declared" >&5 +echo "configure:5240: checking whether strstr must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5271,7 +5262,7 @@ char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:5275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -5292,12 +5283,12 @@ fi echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6 -echo "configure:5296: checking whether sbrk must be declared" >&5 +echo "configure:5287: checking whether sbrk must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5318,7 +5309,7 @@ char *(*pfn) = (char *(*)) sbrk ; return 0; } EOF -if { (eval echo configure:5322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_sbrk=no else @@ -5339,12 +5330,12 @@ fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:5343: checking whether getenv must be declared" >&5 +echo "configure:5334: checking whether getenv must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5365,7 +5356,7 @@ char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:5369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -5386,12 +5377,12 @@ fi echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6 -echo "configure:5390: checking whether environ must be declared" >&5 +echo "configure:5381: checking whether environ must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5412,7 +5403,7 @@ char *(*pfn) = (char *(*)) environ ; return 0; } EOF -if { (eval echo configure:5416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_environ=no else @@ -5504,12 +5495,12 @@ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; - arm-*pe* | arm-*-wince) + arm-pe* | arm-*-wince) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; - thumb-*pe*) + thumb-pe*) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' @@ -5517,7 +5508,7 @@ arm*-* | xscale-* | strongarm-* | d10v-*) OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS" ;; - i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*) + i[3-6]86-pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' @@ -5527,22 +5518,22 @@ BUILD_DLLTOOL='$(DLLTOOL_PROG)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" ;; - powerpc*-*-*pe* | powerpc*-*-cygwin*) + powerpc*-*-pe* | powerpc*-*-cygwin*) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; - sh*-*-*pe) + sh*-*-pe) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; - mips*-*-*pe) + mips*-*-pe) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; - mcore-*pe) + mcore-pe) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' @@ -5731,6 +5722,7 @@ s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g +s%@CC@%$CC%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g @@ -5742,7 +5734,6 @@ s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g s%@SET_MAKE@%$SET_MAKE%g -s%@CC@%$CC%g s%@LN_S@%$LN_S%g s%@OBJEXT@%$OBJEXT%g s%@EXEEXT@%$EXEEXT%g diff -Nur binutils-2.12/binutils/configure.in binutils-2.12.1/binutils/configure.in --- binutils-2.12/binutils/configure.in Mon Jan 14 08:10:13 2002 +++ binutils-2.12.1/binutils/configure.in Thu May 9 10:49:17 2002 @@ -235,12 +235,12 @@ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; - arm-*pe* | arm-*-wince) + arm-pe* | arm-*-wince) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; - thumb-*pe*) + thumb-pe*) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' @@ -249,7 +249,7 @@ OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS" ;; changequote(,)dnl - i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*) + i[3-6]86-pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*) changequote([,])dnl BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" @@ -260,22 +260,22 @@ BUILD_DLLTOOL='$(DLLTOOL_PROG)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" ;; - powerpc*-*-*pe* | powerpc*-*-cygwin*) + powerpc*-*-pe* | powerpc*-*-cygwin*) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; - sh*-*-*pe) + sh*-*-pe) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; - mips*-*-*pe) + mips*-*-pe) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; - mcore-*pe) + mcore-pe) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' diff -Nur binutils-2.12/binutils/dep-in.sed binutils-2.12.1/binutils/dep-in.sed --- binutils-2.12/binutils/dep-in.sed Mon May 3 03:29:09 1999 +++ binutils-2.12.1/binutils/dep-in.sed Thu Apr 4 11:20:11 2002 @@ -3,7 +3,9 @@ /\\$/b loop s!@INCDIR@!$(INCDIR)!g +s!@TOPDIR@/include!$(INCDIR)!g s!@BFDDIR@!$(BFDDIR)!g +s!@TOPDIR@/bfd!$(BFDDIR)!g s!@SRCDIR@/!!g s!@OBJDIR@/!!g diff -Nur binutils-2.12/binutils/dlltool.c binutils-2.12.1/binutils/dlltool.c --- binutils-2.12/binutils/dlltool.c Wed Jan 23 11:12:55 2002 +++ binutils-2.12.1/binutils/dlltool.c Sat May 11 13:31:56 2002 @@ -1,5 +1,5 @@ /* dlltool.c -- tool to generate stuff for PE style DLLs - Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -658,6 +658,8 @@ static const char *rvaafter PARAMS ((int)); static const char *rvabefore PARAMS ((int)); static const char *asm_prefix PARAMS ((int)); +static void process_def_file PARAMS ((const char *)); +static void new_directive PARAMS ((char *)); static void append_import PARAMS ((const char *, const char *, int)); static void run PARAMS ((const char *, char *)); static void scan_drectve_symbols PARAMS ((bfd *)); @@ -674,6 +676,7 @@ static void flush_page PARAMS ((FILE *, long *, int, int)); static void gen_def_file PARAMS ((void)); static void generate_idata_ofile PARAMS ((FILE *)); +static void assemble_file PARAMS ((const char *, const char *)); static void gen_exp_file PARAMS ((void)); static const char *xlate PARAMS ((const char *)); #if 0 @@ -697,28 +700,17 @@ static void -#ifdef __STDC__ -inform (const char * message, ...) -#else -inform (message, va_alist) - const char * message; - va_dcl -#endif +inform VPARAMS ((const char *message, ...)) { - va_list args; - + VA_OPEN (args, message); + VA_FIXEDARG (args, const char *, message); + if (!verbose) return; -#ifdef __STDC__ - va_start (args, message); -#else - va_start (args); -#endif - report (message, args); - - va_end (args); + + VA_CLOSE (args); } static const char * @@ -820,7 +812,7 @@ static char **oav; -void +static void process_def_file (name) const char *name; { @@ -943,7 +935,7 @@ d_list = d; } -void +static void new_directive (dir) char *dir; { @@ -1865,7 +1857,7 @@ if (!exp->noname || show_allnames) { fprintf (f, "n%d: %s \"%s\"\n", - exp->ordinal, ASM_TEXT, exp->name); + exp->ordinal, ASM_TEXT, xlate (exp->name)); if (exp->forward != 0) fprintf (f, "f%d: %s \"%s\"\n", exp->forward, ASM_TEXT, exp->internal_name); @@ -3205,6 +3197,8 @@ {"compat-implib", no_argument, NULL, 'C'}, {NULL,0,NULL,0} }; + +int main PARAMS ((int, char **)); int main (ac, av) diff -Nur binutils-2.12/binutils/dllwrap.c binutils-2.12.1/binutils/dllwrap.c --- binutils-2.12/binutils/dllwrap.c Wed Jan 23 11:12:55 2002 +++ binutils-2.12.1/binutils/dllwrap.c Thu May 9 10:49:17 2002 @@ -115,14 +115,16 @@ static int delete_def_file = 1; static int run PARAMS ((const char *, char *)); +static char *mybasename PARAMS ((const char *)); +static int strhash PARAMS ((const char *)); static void usage PARAMS ((FILE *, int)); static void display PARAMS ((const char *, va_list)); static void inform PARAMS ((const char *, ...)); -static void warn PARAMS ((const char *format, ...)); +static void warn PARAMS ((const char *, ...)); static char *look_for_prog PARAMS ((const char *, const char *, int)); static char *deduce_name PARAMS ((const char *)); static void delete_temp_files PARAMS ((void)); -static void cleanup_and_exit PARAMS ((int status)); +static void cleanup_and_exit PARAMS ((int)); /**********************************************************************/ @@ -147,58 +149,30 @@ } -#ifdef __STDC__ static void -inform (const char * message, ...) +inform VPARAMS ((const char *message, ...)) { - va_list args; + VA_OPEN (args, message); + VA_FIXEDARG (args, const char *, message); if (!verbose) return; - va_start (args, message); display (message, args); - va_end (args); -} -static void -warn (const char *format, ...) -{ - va_list args; - - va_start (args, format); - display (format, args); - va_end (args); + VA_CLOSE (args); } -#else static void -inform (message, va_alist) - const char * message; - va_dcl +warn VPARAMS ((const char *format, ...)) { - va_list args; + VA_OPEN (args, format); + VA_FIXEDARG (args, const char *, format); - if (!verbose) - return; - - va_start (args); - display (message, args); - va_end (args); -} - -static void -warn (format, va_alist) - const char *format; - va_dcl -{ - va_list args; - - va_start (args); display (format, args); - va_end (args); + + VA_CLOSE (args); } -#endif /* Look for the program formed by concatenating PROG_NAME and the string running from PREFIX to END_PREFIX. If the concatenated @@ -375,7 +349,8 @@ } static void -cleanup_and_exit (int status) +cleanup_and_exit (status) + int status; { delete_temp_files (); exit (status); @@ -487,7 +462,8 @@ } static int -strhash (const char *str) +strhash (str) + const char *str; { const unsigned char *s; unsigned long hash; @@ -634,6 +610,8 @@ {"as", required_argument, NULL, OPTION_AS}, {0, 0, 0, 0} }; + +int main PARAMS ((int, char **)); int main (argc, argv) diff -Nur binutils-2.12/binutils/doc/Makefile.in binutils-2.12.1/binutils/doc/Makefile.in --- binutils-2.12/binutils/doc/Makefile.in Sat Jan 26 16:25:00 2002 +++ binutils-2.12.1/binutils/doc/Makefile.in Thu May 9 10:49:21 2002 @@ -175,7 +175,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff -Nur binutils-2.12/binutils/doc/addr2line.1 binutils-2.12.1/binutils/doc/addr2line.1 --- binutils-2.12/binutils/doc/addr2line.1 Fri Mar 8 01:15:55 2002 +++ binutils-2.12.1/binutils/doc/addr2line.1 Tue May 14 19:47:12 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ADDR2LINE 1" -.TH ADDR2LINE 1 "2002-03-08" "binutils-2.12" "GNU Development Tools" +.TH ADDR2LINE 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" .UC .SH "NAME" addr2line \- convert addresses into file names and line numbers. diff -Nur binutils-2.12/binutils/doc/ar.1 binutils-2.12.1/binutils/doc/ar.1 --- binutils-2.12/binutils/doc/ar.1 Fri Mar 8 01:15:55 2002 +++ binutils-2.12.1/binutils/doc/ar.1 Tue May 14 19:47:12 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "AR 1" -.TH AR 1 "2002-03-08" "binutils-2.12" "GNU Development Tools" +.TH AR 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" .UC .SH "NAME" ar \- create, modify, and extract from archives diff -Nur binutils-2.12/binutils/doc/binutils.info binutils-2.12.1/binutils/doc/binutils.info --- binutils-2.12/binutils/doc/binutils.info Fri Mar 8 14:45:06 2002 +++ binutils-2.12.1/binutils/doc/binutils.info Tue May 14 19:47:12 2002 @@ -1,4 +1,4 @@ -This is binutils.info, produced by makeinfo version 4.0f from +This is binutils.info, produced by makeinfo version 4.1 from binutils.texi. START-INFO-DIR-ENTRY @@ -32,38 +32,38 @@  Indirect: -binutils.info-1: 1670 -binutils.info-2: 44149 -binutils.info-3: 92226 +binutils.info-1: 1669 +binutils.info-2: 44150 +binutils.info-3: 92227  Tag Table: (Indirect) -Node: Top1670 -Node: ar3167 -Node: ar cmdline5341 -Node: ar scripts13473 -Node: nm19152 -Node: objcopy26561 -Node: objdump44149 -Node: ranlib55750 -Node: size56501 -Node: strings59364 -Node: strip61663 -Node: c++filt64653 -Ref: c++filt-Footnote-167595 -Node: addr2line67701 -Node: nlmconv70294 -Node: windres72897 -Node: dlltool77949 -Node: readelf87397 -Node: Selecting The Target System91209 -Node: Target Selection92226 -Node: Architecture Selection94927 -Node: Linker Emulation Selection96172 -Node: Reporting Bugs97050 -Node: Bug Criteria97826 -Node: Bug Reporting98372 -Node: GNU Free Documentation License105399 -Node: Index123827 +Node: Top1669 +Node: ar3168 +Node: ar cmdline5342 +Node: ar scripts13474 +Node: nm19153 +Node: objcopy26562 +Node: objdump44150 +Node: ranlib55751 +Node: size56502 +Node: strings59365 +Node: strip61664 +Node: c++filt64654 +Ref: c++filt-Footnote-167596 +Node: addr2line67702 +Node: nlmconv70295 +Node: windres72898 +Node: dlltool77950 +Node: readelf87398 +Node: Selecting The Target System91210 +Node: Target Selection92227 +Node: Architecture Selection94928 +Node: Linker Emulation Selection96173 +Node: Reporting Bugs97051 +Node: Bug Criteria97827 +Node: Bug Reporting98373 +Node: GNU Free Documentation License105400 +Node: Index123828  End Tag Table diff -Nur binutils-2.12/binutils/doc/binutils.info-1 binutils-2.12.1/binutils/doc/binutils.info-1 --- binutils-2.12/binutils/doc/binutils.info-1 Fri Mar 8 14:45:06 2002 +++ binutils-2.12.1/binutils/doc/binutils.info-1 Tue May 14 19:47:12 2002 @@ -1,4 +1,4 @@ -This is binutils.info, produced by makeinfo version 4.0f from +This is binutils.info, produced by makeinfo version 4.1 from binutils.texi. START-INFO-DIR-ENTRY @@ -37,7 +37,7 @@ ************ This brief manual contains preliminary documentation for the GNU -binary utilities (collectively version 2.12): +binary utilities (collectively version 2.12.1): This document is distributed under the terms of the GNU Free Documentation License. A copy of the license is included in the diff -Nur binutils-2.12/binutils/doc/binutils.info-2 binutils-2.12.1/binutils/doc/binutils.info-2 --- binutils-2.12/binutils/doc/binutils.info-2 Fri Mar 8 14:45:06 2002 +++ binutils-2.12.1/binutils/doc/binutils.info-2 Tue May 14 19:47:12 2002 @@ -1,4 +1,4 @@ -This is binutils.info, produced by makeinfo version 4.0f from +This is binutils.info, produced by makeinfo version 4.1 from binutils.texi. START-INFO-DIR-ENTRY diff -Nur binutils-2.12/binutils/doc/binutils.info-3 binutils-2.12.1/binutils/doc/binutils.info-3 --- binutils-2.12/binutils/doc/binutils.info-3 Fri Mar 8 14:45:06 2002 +++ binutils-2.12.1/binutils/doc/binutils.info-3 Tue May 14 19:47:12 2002 @@ -1,4 +1,4 @@ -This is binutils.info, produced by makeinfo version 4.0f from +This is binutils.info, produced by makeinfo version 4.1 from binutils.texi. START-INFO-DIR-ENTRY diff -Nur binutils-2.12/binutils/doc/cxxfilt.man binutils-2.12.1/binutils/doc/cxxfilt.man --- binutils-2.12/binutils/doc/cxxfilt.man Fri Mar 8 01:15:59 2002 +++ binutils-2.12.1/binutils/doc/cxxfilt.man Tue May 14 19:47:16 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "C++FILT 1" -.TH C++FILT 1 "2002-03-08" "binutils-2.12" "GNU Development Tools" +.TH C++FILT 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" .UC .SH "NAME" cxxfilt \- Demangle \*(C+ and Java symbols. diff -Nur binutils-2.12/binutils/doc/dlltool.1 binutils-2.12.1/binutils/doc/dlltool.1 --- binutils-2.12/binutils/doc/dlltool.1 Fri Mar 8 01:15:56 2002 +++ binutils-2.12.1/binutils/doc/dlltool.1 Tue May 14 19:47:13 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DLLTOOL 1" -.TH DLLTOOL 1 "2002-03-08" "binutils-2.12" "GNU Development Tools" +.TH DLLTOOL 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" .UC .SH "NAME" dlltool \- Create files needed to build and use DLLs. diff -Nur binutils-2.12/binutils/doc/nlmconv.1 binutils-2.12.1/binutils/doc/nlmconv.1 --- binutils-2.12/binutils/doc/nlmconv.1 Fri Mar 8 01:15:56 2002 +++ binutils-2.12.1/binutils/doc/nlmconv.1 Tue May 14 19:47:13 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "NLMCONV 1" -.TH NLMCONV 1 "2002-03-08" "binutils-2.12" "GNU Development Tools" +.TH NLMCONV 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" .UC .SH "NAME" nlmconv \- converts object code into an \s-1NLM\s0. diff -Nur binutils-2.12/binutils/doc/nm.1 binutils-2.12.1/binutils/doc/nm.1 --- binutils-2.12/binutils/doc/nm.1 Fri Mar 8 01:15:56 2002 +++ binutils-2.12.1/binutils/doc/nm.1 Tue May 14 19:47:13 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "NM 1" -.TH NM 1 "2002-03-08" "binutils-2.12" "GNU Development Tools" +.TH NM 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" .UC .SH "NAME" nm \- list symbols from object files diff -Nur binutils-2.12/binutils/doc/objcopy.1 binutils-2.12.1/binutils/doc/objcopy.1 --- binutils-2.12/binutils/doc/objcopy.1 Fri Mar 8 01:15:57 2002 +++ binutils-2.12.1/binutils/doc/objcopy.1 Tue May 14 19:47:14 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OBJCOPY 1" -.TH OBJCOPY 1 "2002-03-08" "binutils-2.12" "GNU Development Tools" +.TH OBJCOPY 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" .UC .SH "NAME" objcopy \- copy and translate object files diff -Nur binutils-2.12/binutils/doc/objdump.1 binutils-2.12.1/binutils/doc/objdump.1 --- binutils-2.12/binutils/doc/objdump.1 Fri Mar 8 01:15:57 2002 +++ binutils-2.12.1/binutils/doc/objdump.1 Tue May 14 19:47:14 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OBJDUMP 1" -.TH OBJDUMP 1 "2002-03-08" "binutils-2.12" "GNU Development Tools" +.TH OBJDUMP 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" .UC .SH "NAME" objdump \- display information from object files. diff -Nur binutils-2.12/binutils/doc/ranlib.1 binutils-2.12.1/binutils/doc/ranlib.1 --- binutils-2.12/binutils/doc/ranlib.1 Fri Mar 8 01:15:57 2002 +++ binutils-2.12.1/binutils/doc/ranlib.1 Tue May 14 19:47:14 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RANLIB 1" -.TH RANLIB 1 "2002-03-08" "binutils-2.12" "GNU Development Tools" +.TH RANLIB 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" .UC .SH "NAME" ranlib \- generate index to archive. diff -Nur binutils-2.12/binutils/doc/readelf.1 binutils-2.12.1/binutils/doc/readelf.1 --- binutils-2.12/binutils/doc/readelf.1 Fri Mar 8 01:15:57 2002 +++ binutils-2.12.1/binutils/doc/readelf.1 Tue May 14 19:47:15 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "READELF 1" -.TH READELF 1 "2002-03-08" "binutils-2.12" "GNU Development Tools" +.TH READELF 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" .UC .SH "NAME" readelf \- Displays information about \s-1ELF\s0 files. diff -Nur binutils-2.12/binutils/doc/size.1 binutils-2.12.1/binutils/doc/size.1 --- binutils-2.12/binutils/doc/size.1 Fri Mar 8 01:15:58 2002 +++ binutils-2.12.1/binutils/doc/size.1 Tue May 14 19:47:15 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "SIZE 1" -.TH SIZE 1 "2002-03-08" "binutils-2.12" "GNU Development Tools" +.TH SIZE 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" .UC .SH "NAME" size \- list section sizes and total size. diff -Nur binutils-2.12/binutils/doc/strings.1 binutils-2.12.1/binutils/doc/strings.1 --- binutils-2.12/binutils/doc/strings.1 Fri Mar 8 01:15:58 2002 +++ binutils-2.12.1/binutils/doc/strings.1 Tue May 14 19:47:15 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "STRINGS 1" -.TH STRINGS 1 "2002-03-08" "binutils-2.12" "GNU Development Tools" +.TH STRINGS 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" .UC .SH "NAME" strings \- print the strings of printable characters in files. diff -Nur binutils-2.12/binutils/doc/strip.1 binutils-2.12.1/binutils/doc/strip.1 --- binutils-2.12/binutils/doc/strip.1 Fri Mar 8 01:15:58 2002 +++ binutils-2.12.1/binutils/doc/strip.1 Tue May 14 19:47:15 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "STRIP 1" -.TH STRIP 1 "2002-03-08" "binutils-2.12" "GNU Development Tools" +.TH STRIP 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" .UC .SH "NAME" strip \- Discard symbols from object files. diff -Nur binutils-2.12/binutils/doc/windres.1 binutils-2.12.1/binutils/doc/windres.1 --- binutils-2.12/binutils/doc/windres.1 Fri Mar 8 01:15:58 2002 +++ binutils-2.12.1/binutils/doc/windres.1 Tue May 14 19:47:16 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "WINDRES 1" -.TH WINDRES 1 "2002-03-08" "binutils-2.12" "GNU Development Tools" +.TH WINDRES 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" .UC .SH "NAME" windres \- manipulate Windows resources. diff -Nur binutils-2.12/binutils/nm.c binutils-2.12.1/binutils/nm.c --- binutils-2.12/binutils/nm.c Wed Jan 30 00:00:07 2002 +++ binutils-2.12.1/binutils/nm.c Thu May 9 10:49:19 2002 @@ -1291,7 +1291,8 @@ bfd_asymbol_name (*r->sym_ptr_ptr)) == 0 && bfd_find_nearest_line (abfd, secs[i], syms, r->address, &filename, - &functionname, &lineno)) + &functionname, &lineno) + && filename != NULL) { /* We only print the first one we find. */ printf ("\t%s:%u", filename, lineno); diff -Nur binutils-2.12/binutils/rclex.c binutils-2.12.1/binutils/rclex.c --- binutils-2.12/binutils/rclex.c Fri Mar 8 12:01:00 2002 +++ binutils-2.12.1/binutils/rclex.c Mon May 13 09:14:44 2002 @@ -1,7 +1,7 @@ /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $Header: /cvs/src/src/binutils/Attic/rclex.c,v 1.1.6.1 2002/03/08 17:01:00 drow Exp $ + * $Header: /cvs/src/src/binutils/Attic/rclex.c,v 1.1.6.2 2002/05/11 20:00:49 drow Exp $ */ #define FLEX_SCANNER @@ -22,7 +22,7 @@ #ifdef __cplusplus #include -#ifndef _Win32 +#ifndef _WIN32 #include #else #ifndef YY_ALWAYS_INTERACTIVE @@ -643,7 +643,7 @@ #line 1 "rclex.l" #define INITIAL 0 #line 2 "rclex.l" -/* Copyright 1997, 1998, 1999, 2001 Free Software Foundation, Inc. +/* Copyright 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. @@ -2022,7 +2022,7 @@ } -#ifndef _Win32 +#ifndef _WIN32 #include #else #ifndef YY_ALWAYS_INTERACTIVE @@ -2400,11 +2400,11 @@ if (!initial_fn) { initial_fn = xmalloc (strlen (fn) + 1); - strcpy(initial_fn, fn); + strcpy (initial_fn, fn); } /* Allow the initial file, regardless of name. Suppress all other - files if they end in ".h" (this allows included "*.rc") */ + files if they end in ".h" (this allows included "*.rc"). */ if (strcmp (initial_fn, fn) == 0 || strcmp (fn + strlen (fn) - 2, ".h") != 0) suppress_cpp_data = 0; @@ -2447,7 +2447,7 @@ break; case 'a': - *s++ = ESCAPE_A; + *s++ = ESCAPE_B; /* Strange, but true... */ ++t; break; @@ -2510,9 +2510,9 @@ if (*t >= '0' && *t <= '9') ch = (ch << 4) | (*t - '0'); else if (*t >= 'a' && *t <= 'f') - ch = (ch << 4) | (*t - 'a'); + ch = (ch << 4) | (*t - 'a' + 10); else if (*t >= 'A' && *t <= 'F') - ch = (ch << 4) | (*t - 'A'); + ch = (ch << 4) | (*t - 'A' + 10); else break; ++t; @@ -2568,7 +2568,7 @@ as->s = xmalloc (len); as->next = strings; - strings = as->next; + strings = as; return as->s; } diff -Nur binutils-2.12/binutils/rclex.l binutils-2.12.1/binutils/rclex.l --- binutils-2.12/binutils/rclex.l Wed Sep 19 01:33:16 2001 +++ binutils-2.12.1/binutils/rclex.l Thu May 9 10:49:19 2002 @@ -1,5 +1,5 @@ %{ /* rclex.l -- lexer for Windows rc files parser */ -/* Copyright 1997, 1998, 1999, 2001 Free Software Foundation, Inc. +/* Copyright 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. @@ -284,11 +284,11 @@ if (!initial_fn) { initial_fn = xmalloc (strlen (fn) + 1); - strcpy(initial_fn, fn); + strcpy (initial_fn, fn); } /* Allow the initial file, regardless of name. Suppress all other - files if they end in ".h" (this allows included "*.rc") */ + files if they end in ".h" (this allows included "*.rc"). */ if (strcmp (initial_fn, fn) == 0 || strcmp (fn + strlen (fn) - 2, ".h") != 0) suppress_cpp_data = 0; @@ -331,7 +331,7 @@ break; case 'a': - *s++ = ESCAPE_A; + *s++ = ESCAPE_B; /* Strange, but true... */ ++t; break; @@ -394,9 +394,9 @@ if (*t >= '0' && *t <= '9') ch = (ch << 4) | (*t - '0'); else if (*t >= 'a' && *t <= 'f') - ch = (ch << 4) | (*t - 'a'); + ch = (ch << 4) | (*t - 'a' + 10); else if (*t >= 'A' && *t <= 'F') - ch = (ch << 4) | (*t - 'A'); + ch = (ch << 4) | (*t - 'A' + 10); else break; ++t; @@ -452,7 +452,7 @@ as->s = xmalloc (len); as->next = strings; - strings = as->next; + strings = as; return as->s; } diff -Nur binutils-2.12/binutils/rcparse.c binutils-2.12.1/binutils/rcparse.c --- binutils-2.12/binutils/rcparse.c Fri Mar 8 01:15:55 2002 +++ binutils-2.12.1/binutils/rcparse.c Mon May 13 09:14:44 2002 @@ -1,5 +1,5 @@ /* A Bison parser, made from rcparse.y - by GNU bison 1.33. */ + by GNU bison 1.35. */ #define YYBISON 1 /* Identify Bison output. */ @@ -89,7 +89,7 @@ #line 1 "rcparse.y" /* rcparse.y -- parser for Windows rc files - Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. @@ -186,6 +186,7 @@ } ss; } yystype; # define YYSTYPE yystype +# define YYSTYPE_IS_TRIVIAL 1 #endif #ifndef YYDEBUG # define YYDEBUG 0 @@ -198,7 +199,7 @@ #define YYNTBASE 99 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ -#define YYTRANSLATE(x) ((unsigned)(x) <= 339 ? yytranslate[x] : 191) +#define YYTRANSLATE(x) ((unsigned)(x) <= 339 ? yytranslate[x] : 189) /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ static const char yytranslate[] = @@ -242,126 +243,126 @@ #if YYDEBUG static const short yyprhs[] = { - 0, 0, 1, 5, 9, 13, 17, 21, 25, 29, - 33, 37, 41, 45, 49, 53, 57, 61, 62, 69, - 70, 73, 76, 81, 83, 85, 87, 91, 94, 96, - 98, 100, 102, 104, 106, 111, 116, 117, 131, 132, - 146, 147, 162, 163, 167, 168, 172, 176, 177, 182, - 186, 192, 200, 204, 208, 213, 217, 218, 221, 222, - 226, 227, 231, 232, 236, 237, 241, 242, 246, 247, - 251, 263, 276, 289, 303, 304, 308, 309, 313, 314, - 318, 319, 323, 324, 328, 335, 344, 355, 367, 368, - 372, 373, 377, 378, 382, 383, 387, 388, 392, 393, - 397, 398, 402, 403, 407, 408, 412, 413, 430, 438, - 448, 459, 460, 462, 465, 466, 470, 471, 475, 476, - 480, 481, 485, 490, 495, 499, 506, 507, 510, 515, - 518, 525, 526, 530, 533, 535, 537, 539, 541, 543, - 545, 552, 553, 556, 559, 563, 569, 572, 578, 585, - 593, 603, 608, 615, 616, 619, 620, 622, 624, 626, - 630, 634, 635, 642, 643, 647, 652, 659, 664, 671, - 672, 679, 686, 690, 694, 698, 702, 706, 707, 716, - 724, 725, 731, 732, 736, 738, 740, 742, 745, 748, - 751, 753, 754, 757, 761, 766, 770, 771, 774, 775, - 778, 780, 782, 784, 786, 788, 790, 792, 794, 796, - 798, 801, 805, 810, 812, 816, 817, 819, 822, 824, - 826, 830, 833, 836, 840, 844, 848, 852, 856, 860, - 864, 868, 871, 873, 875, 879, 882, 886, 890, 894, - 898, 902, 906, 910 + 0, 0, 1, 4, 7, 10, 13, 16, 19, 22, + 25, 28, 31, 34, 37, 40, 43, 46, 53, 54, + 57, 60, 65, 67, 69, 71, 75, 78, 80, 82, + 84, 86, 88, 90, 95, 100, 101, 115, 116, 130, + 131, 146, 147, 151, 152, 156, 160, 164, 168, 172, + 178, 185, 193, 202, 206, 210, 215, 219, 220, 223, + 224, 228, 229, 233, 234, 238, 239, 243, 244, 248, + 249, 253, 265, 278, 291, 305, 306, 310, 311, 315, + 316, 320, 321, 325, 326, 330, 337, 346, 357, 369, + 370, 374, 375, 379, 380, 384, 385, 389, 390, 394, + 395, 399, 400, 404, 405, 409, 410, 414, 415, 432, + 440, 450, 461, 462, 464, 467, 468, 472, 473, 477, + 478, 482, 483, 487, 492, 497, 501, 508, 509, 512, + 517, 520, 527, 528, 532, 535, 537, 539, 541, 543, + 545, 547, 554, 555, 558, 561, 565, 571, 574, 580, + 587, 595, 605, 610, 617, 618, 621, 622, 624, 626, + 628, 632, 636, 637, 644, 645, 649, 654, 661, 666, + 673, 674, 681, 688, 692, 696, 700, 704, 708, 709, + 718, 726, 727, 733, 734, 738, 740, 742, 744, 747, + 750, 753, 755, 756, 759, 763, 768, 772, 773, 776, + 777, 780, 782, 784, 786, 788, 790, 792, 794, 796, + 798, 800, 803, 807, 812, 814, 818, 819, 821, 824, + 826, 828, 832, 835, 838, 842, 846, 850, 854, 858, + 862, 866, 870, 873, 875, 877, 881, 884, 888, 892, + 896, 900, 904, 908, 912 }; static const short yyrhs[] = { - -1, 99, 100, 101, 0, 99, 100, 107, 0, 99, - 100, 108, 0, 99, 100, 109, 0, 99, 100, 148, - 0, 99, 100, 149, 0, 99, 100, 150, 0, 99, - 100, 151, 0, 99, 100, 156, 0, 99, 100, 159, - 0, 99, 100, 160, 0, 99, 100, 165, 0, 99, - 100, 168, 0, 99, 100, 169, 0, 99, 100, 84, - 0, 0, 174, 5, 177, 3, 102, 4, 0, 0, - 102, 103, 0, 104, 188, 0, 104, 188, 95, 105, - 0, 80, 0, 189, 0, 106, 0, 105, 95, 106, - 0, 105, 106, 0, 6, 0, 7, 0, 8, 0, - 9, 0, 10, 0, 11, 0, 174, 12, 179, 181, - 0, 174, 13, 178, 181, 0, 0, 174, 14, 179, - 113, 189, 185, 185, 185, 110, 114, 3, 116, 4, - 0, 0, 174, 15, 179, 113, 189, 185, 185, 185, - 111, 114, 3, 116, 4, 0, 0, 174, 15, 179, - 113, 189, 185, 185, 185, 185, 112, 114, 3, 116, - 4, 0, 0, 16, 96, 186, 0, 0, 114, 17, - 80, 0, 114, 18, 174, 0, 0, 114, 19, 115, - 182, 0, 114, 16, 186, 0, 114, 41, 186, 95, - 80, 0, 114, 41, 186, 95, 80, 185, 185, 0, - 114, 46, 174, 0, 114, 44, 186, 0, 114, 43, - 186, 185, 0, 114, 45, 186, 0, 0, 116, 117, - 0, 0, 20, 118, 139, 0, 0, 21, 119, 139, - 0, 0, 22, 120, 139, 0, 0, 38, 121, 139, - 0, 0, 23, 122, 139, 0, 0, 24, 123, 139, - 0, 10, 140, 186, 185, 142, 185, 185, 185, 185, - 184, 141, 0, 10, 140, 186, 185, 142, 185, 185, - 185, 185, 185, 185, 141, 0, 10, 140, 186, 95, - 80, 142, 185, 185, 185, 185, 184, 141, 0, 10, - 140, 186, 95, 80, 142, 185, 185, 185, 185, 185, - 185, 141, 0, 0, 25, 124, 139, 0, 0, 26, - 125, 139, 0, 0, 27, 126, 139, 0, 0, 28, - 127, 139, 0, 0, 39, 128, 139, 0, 42, 176, - 186, 185, 185, 141, 0, 42, 176, 186, 185, 185, - 185, 185, 141, 0, 42, 176, 186, 185, 185, 185, - 185, 144, 184, 141, 0, 42, 176, 186, 185, 185, - 185, 185, 144, 185, 185, 141, 0, 0, 40, 129, - 139, 0, 0, 29, 130, 139, 0, 0, 30, 131, - 139, 0, 0, 31, 132, 139, 0, 0, 32, 133, - 139, 0, 0, 33, 134, 139, 0, 0, 34, 135, - 139, 0, 0, 35, 136, 139, 0, 0, 36, 137, - 139, 0, 0, 37, 80, 95, 186, 95, 186, 95, - 186, 95, 186, 95, 186, 95, 138, 182, 184, 0, - 140, 186, 185, 185, 185, 185, 141, 0, 140, 186, - 185, 185, 185, 185, 146, 184, 141, 0, 140, 186, - 185, 185, 185, 185, 146, 185, 185, 141, 0, 0, - 80, 0, 80, 95, 0, 0, 3, 161, 4, 0, - 0, 95, 143, 182, 0, 0, 95, 145, 182, 0, - 0, 95, 147, 182, 0, 174, 41, 178, 181, 0, - 174, 42, 178, 181, 0, 43, 186, 185, 0, 174, - 46, 177, 3, 152, 4, 0, 0, 152, 153, 0, - 48, 80, 185, 154, 0, 48, 49, 0, 50, 80, - 154, 3, 152, 4, 0, 0, 154, 95, 155, 0, - 154, 155, 0, 51, 0, 52, 0, 53, 0, 54, - 0, 55, 0, 56, 0, 174, 47, 177, 3, 157, - 4, 0, 0, 157, 158, 0, 48, 80, 0, 48, - 80, 185, 0, 48, 80, 185, 185, 184, 0, 48, - 49, 0, 50, 80, 3, 157, 4, 0, 50, 80, - 185, 3, 157, 4, 0, 50, 80, 185, 185, 3, - 157, 4, 0, 50, 80, 185, 185, 185, 184, 3, - 157, 4, 0, 174, 57, 179, 181, 0, 174, 58, - 177, 3, 161, 4, 0, 0, 162, 163, 0, 0, - 164, 0, 83, 0, 187, 0, 164, 95, 83, 0, - 164, 95, 187, 0, 0, 59, 177, 3, 166, 167, - 4, 0, 0, 167, 186, 80, 0, 167, 186, 95, - 80, 0, 174, 174, 177, 3, 161, 4, 0, 174, - 174, 177, 181, 0, 174, 60, 170, 3, 171, 4, - 0, 0, 170, 61, 186, 185, 185, 185, 0, 170, - 62, 186, 185, 185, 185, 0, 170, 63, 186, 0, - 170, 64, 186, 0, 170, 65, 186, 0, 170, 66, - 186, 0, 170, 67, 186, 0, 0, 171, 68, 3, - 71, 3, 172, 4, 4, 0, 171, 69, 3, 70, - 80, 173, 4, 0, 0, 172, 70, 80, 95, 80, - 0, 0, 173, 185, 185, 0, 189, 0, 81, 0, - 80, 0, 80, 95, 0, 81, 95, 0, 189, 95, - 0, 175, 0, 0, 177, 180, 0, 177, 44, 186, - 0, 177, 43, 186, 185, 0, 177, 45, 186, 0, - 0, 178, 180, 0, 0, 179, 180, 0, 72, 0, - 73, 0, 74, 0, 75, 0, 76, 0, 77, 0, - 78, 0, 80, 0, 81, 0, 183, 0, 79, 183, - 0, 182, 85, 183, 0, 182, 85, 79, 183, 0, - 82, 0, 97, 186, 98, 0, 0, 185, 0, 95, - 186, 0, 187, 0, 82, 0, 97, 187, 98, 0, - 93, 187, 0, 89, 187, 0, 187, 90, 187, 0, - 187, 91, 187, 0, 187, 92, 187, 0, 187, 88, - 187, 0, 187, 89, 187, 0, 187, 87, 187, 0, - 187, 86, 187, 0, 187, 85, 187, 0, 95, 189, - 0, 190, 0, 82, 0, 97, 187, 98, 0, 93, - 187, 0, 190, 90, 187, 0, 190, 91, 187, 0, - 190, 92, 187, 0, 190, 88, 187, 0, 190, 89, - 187, 0, 190, 87, 187, 0, 190, 86, 187, 0, - 190, 85, 187, 0 + -1, 99, 100, 0, 99, 106, 0, 99, 107, 0, + 99, 108, 0, 99, 146, 0, 99, 147, 0, 99, + 148, 0, 99, 149, 0, 99, 154, 0, 99, 157, + 0, 99, 158, 0, 99, 163, 0, 99, 166, 0, + 99, 167, 0, 99, 84, 0, 172, 5, 175, 3, + 101, 4, 0, 0, 101, 102, 0, 103, 186, 0, + 103, 186, 95, 104, 0, 80, 0, 187, 0, 105, + 0, 104, 95, 105, 0, 104, 105, 0, 6, 0, + 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, + 172, 12, 177, 179, 0, 172, 13, 176, 179, 0, + 0, 172, 14, 177, 112, 187, 183, 183, 183, 109, + 113, 3, 114, 4, 0, 0, 172, 15, 177, 112, + 187, 183, 183, 183, 110, 113, 3, 114, 4, 0, + 0, 172, 15, 177, 112, 187, 183, 183, 183, 183, + 111, 113, 3, 114, 4, 0, 0, 16, 96, 184, + 0, 0, 113, 17, 80, 0, 113, 18, 172, 0, + 113, 19, 180, 0, 113, 16, 184, 0, 113, 18, + 80, 0, 113, 41, 184, 95, 80, 0, 113, 41, + 184, 95, 80, 183, 0, 113, 41, 184, 95, 80, + 183, 183, 0, 113, 41, 184, 95, 80, 183, 183, + 183, 0, 113, 46, 172, 0, 113, 44, 184, 0, + 113, 43, 184, 183, 0, 113, 45, 184, 0, 0, + 114, 115, 0, 0, 20, 116, 137, 0, 0, 21, + 117, 137, 0, 0, 22, 118, 137, 0, 0, 38, + 119, 137, 0, 0, 23, 120, 137, 0, 0, 24, + 121, 137, 0, 10, 138, 184, 183, 140, 183, 183, + 183, 183, 182, 139, 0, 10, 138, 184, 183, 140, + 183, 183, 183, 183, 183, 183, 139, 0, 10, 138, + 184, 95, 80, 140, 183, 183, 183, 183, 182, 139, + 0, 10, 138, 184, 95, 80, 140, 183, 183, 183, + 183, 183, 183, 139, 0, 0, 25, 122, 137, 0, + 0, 26, 123, 137, 0, 0, 27, 124, 137, 0, + 0, 28, 125, 137, 0, 0, 39, 126, 137, 0, + 42, 174, 184, 183, 183, 139, 0, 42, 174, 184, + 183, 183, 183, 183, 139, 0, 42, 174, 184, 183, + 183, 183, 183, 142, 182, 139, 0, 42, 174, 184, + 183, 183, 183, 183, 142, 183, 183, 139, 0, 0, + 40, 127, 137, 0, 0, 29, 128, 137, 0, 0, + 30, 129, 137, 0, 0, 31, 130, 137, 0, 0, + 32, 131, 137, 0, 0, 33, 132, 137, 0, 0, + 34, 133, 137, 0, 0, 35, 134, 137, 0, 0, + 36, 135, 137, 0, 0, 37, 80, 95, 184, 95, + 184, 95, 184, 95, 184, 95, 184, 95, 136, 180, + 182, 0, 138, 184, 183, 183, 183, 183, 139, 0, + 138, 184, 183, 183, 183, 183, 144, 182, 139, 0, + 138, 184, 183, 183, 183, 183, 144, 183, 183, 139, + 0, 0, 80, 0, 80, 95, 0, 0, 3, 159, + 4, 0, 0, 95, 141, 180, 0, 0, 95, 143, + 180, 0, 0, 95, 145, 180, 0, 172, 41, 176, + 179, 0, 172, 42, 176, 179, 0, 43, 184, 183, + 0, 172, 46, 175, 3, 150, 4, 0, 0, 150, + 151, 0, 48, 80, 183, 152, 0, 48, 49, 0, + 50, 80, 152, 3, 150, 4, 0, 0, 152, 95, + 153, 0, 152, 153, 0, 51, 0, 52, 0, 53, + 0, 54, 0, 55, 0, 56, 0, 172, 47, 175, + 3, 155, 4, 0, 0, 155, 156, 0, 48, 80, + 0, 48, 80, 183, 0, 48, 80, 183, 183, 182, + 0, 48, 49, 0, 50, 80, 3, 155, 4, 0, + 50, 80, 183, 3, 155, 4, 0, 50, 80, 183, + 183, 3, 155, 4, 0, 50, 80, 183, 183, 183, + 182, 3, 155, 4, 0, 172, 57, 177, 179, 0, + 172, 58, 175, 3, 159, 4, 0, 0, 160, 161, + 0, 0, 162, 0, 83, 0, 185, 0, 162, 95, + 83, 0, 162, 95, 185, 0, 0, 59, 175, 3, + 164, 165, 4, 0, 0, 165, 184, 80, 0, 165, + 184, 95, 80, 0, 172, 172, 175, 3, 159, 4, + 0, 172, 172, 175, 179, 0, 172, 60, 168, 3, + 169, 4, 0, 0, 168, 61, 184, 183, 183, 183, + 0, 168, 62, 184, 183, 183, 183, 0, 168, 63, + 184, 0, 168, 64, 184, 0, 168, 65, 184, 0, + 168, 66, 184, 0, 168, 67, 184, 0, 0, 169, + 68, 3, 71, 3, 170, 4, 4, 0, 169, 69, + 3, 70, 80, 171, 4, 0, 0, 170, 70, 80, + 95, 80, 0, 0, 171, 183, 183, 0, 187, 0, + 81, 0, 80, 0, 80, 95, 0, 81, 95, 0, + 187, 95, 0, 173, 0, 0, 175, 178, 0, 175, + 44, 184, 0, 175, 43, 184, 183, 0, 175, 45, + 184, 0, 0, 176, 178, 0, 0, 177, 178, 0, + 72, 0, 73, 0, 74, 0, 75, 0, 76, 0, + 77, 0, 78, 0, 80, 0, 81, 0, 181, 0, + 79, 181, 0, 180, 85, 181, 0, 180, 85, 79, + 181, 0, 82, 0, 97, 184, 98, 0, 0, 183, + 0, 95, 184, 0, 185, 0, 82, 0, 97, 185, + 98, 0, 93, 185, 0, 89, 185, 0, 185, 90, + 185, 0, 185, 91, 185, 0, 185, 92, 185, 0, + 185, 88, 185, 0, 185, 89, 185, 0, 185, 87, + 185, 0, 185, 86, 185, 0, 185, 85, 185, 0, + 95, 187, 0, 188, 0, 82, 0, 97, 185, 98, + 0, 93, 185, 0, 188, 90, 185, 0, 188, 91, + 185, 0, 188, 92, 185, 0, 188, 88, 185, 0, + 188, 89, 185, 0, 188, 87, 185, 0, 188, 86, + 185, 0, 188, 85, 185, 0 }; #endif @@ -371,30 +372,30 @@ static const short yyrline[] = { 0, 154, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 173, 182, 189, - 194, 214, 220, 231, 253, 262, 267, 272, 278, 283, - 288, 292, 296, 300, 308, 317, 326, 326, 348, 348, - 371, 371, 397, 402, 408, 410, 414, 418, 418, 424, - 428, 434, 447, 451, 455, 459, 465, 467, 477, 477, - 488, 488, 498, 498, 508, 508, 521, 521, 531, 531, - 541, 552, 561, 574, 585, 585, 595, 595, 605, 605, - 615, 615, 625, 625, 638, 643, 649, 655, 661, 661, - 674, 674, 684, 684, 694, 694, 704, 704, 714, 714, - 724, 724, 734, 734, 744, 744, 754, 754, 771, 784, - 795, 806, 811, 815, 821, 826, 834, 834, 840, 840, - 846, 846, 854, 863, 873, 882, 889, 894, 910, 915, - 919, 925, 930, 934, 940, 945, 949, 953, 957, 961, - 969, 976, 981, 997, 1002, 1006, 1010, 1014, 1018, 1022, - 1026, 1035, 1044, 1054, 1054, 1065, 1071, 1077, 1086, 1094, - 1103, 1116, 1116, 1122, 1124, 1128, 1137, 1142, 1150, 1157, - 1164, 1170, 1176, 1181, 1186, 1191, 1196, 1209, 1214, 1218, - 1224, 1229, 1235, 1240, 1248, 1254, 1269, 1274, 1278, 1285, - 1291, 1307, 1315, 1321, 1326, 1331, 1340, 1347, 1357, 1364, - 1375, 1381, 1386, 1391, 1396, 1401, 1406, 1415, 1420, 1436, - 1441, 1445, 1449, 1455, 1460, 1468, 1473, 1481, 1490, 1499, - 1504, 1508, 1513, 1518, 1523, 1528, 1533, 1538, 1543, 1548, - 1553, 1563, 1572, 1583, 1588, 1592, 1597, 1602, 1607, 1612, - 1617, 1622, 1627, 1632 + 164, 165, 166, 167, 168, 169, 170, 175, 185, 190, + 210, 216, 227, 249, 258, 263, 268, 274, 279, 284, + 288, 292, 296, 304, 316, 328, 328, 354, 354, 381, + 381, 411, 416, 422, 424, 430, 434, 439, 443, 447, + 460, 475, 490, 505, 509, 513, 517, 523, 525, 535, + 535, 546, 546, 556, 556, 566, 566, 579, 579, 589, + 589, 599, 610, 619, 632, 643, 643, 653, 653, 663, + 663, 673, 673, 683, 683, 696, 701, 707, 713, 719, + 719, 732, 732, 742, 742, 752, 752, 762, 762, 772, + 772, 782, 782, 792, 792, 802, 802, 812, 812, 829, + 842, 853, 864, 869, 873, 879, 884, 892, 892, 898, + 898, 904, 904, 912, 924, 937, 946, 956, 961, 977, + 982, 986, 992, 997, 1001, 1007, 1012, 1016, 1020, 1024, + 1028, 1036, 1046, 1051, 1067, 1072, 1076, 1080, 1084, 1088, + 1092, 1096, 1105, 1117, 1130, 1130, 1141, 1147, 1153, 1162, + 1170, 1179, 1192, 1192, 1198, 1200, 1207, 1219, 1227, 1238, + 1248, 1255, 1261, 1267, 1272, 1277, 1282, 1287, 1300, 1305, + 1309, 1315, 1320, 1326, 1331, 1339, 1345, 1360, 1365, 1369, + 1376, 1382, 1398, 1406, 1412, 1417, 1422, 1431, 1438, 1448, + 1455, 1466, 1472, 1477, 1482, 1487, 1492, 1497, 1506, 1511, + 1527, 1532, 1536, 1540, 1546, 1551, 1559, 1564, 1572, 1581, + 1590, 1595, 1599, 1604, 1609, 1614, 1619, 1624, 1629, 1634, + 1639, 1644, 1654, 1663, 1674, 1679, 1683, 1688, 1693, 1698, + 1703, 1708, 1713, 1718, 1723 }; #endif @@ -420,22 +421,22 @@ "IMPURE", "PRELOAD", "LOADONCALL", "DISCARDABLE", "NOT", "QUOTEDSTRING", "STRING", "NUMBER", "SIZEDSTRING", "IGNORED_TOKEN", "'|'", "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'", "'~'", "NEG", "','", "'='", "'('", - "')'", "input", "newcmd", "accelerator", "acc_entries", "acc_entry", - "acc_event", "acc_options", "acc_option", "bitmap", "cursor", "dialog", - "@1", "@2", "@3", "exstyle", "styles", "@4", "controls", "control", - "@5", "@6", "@7", "@8", "@9", "@10", "@11", "@12", "@13", "@14", "@15", - "@16", "@17", "@18", "@19", "@20", "@21", "@22", "@23", "@24", "@25", + "')'", "input", "accelerator", "acc_entries", "acc_entry", "acc_event", + "acc_options", "acc_option", "bitmap", "cursor", "dialog", "@1", "@2", + "@3", "exstyle", "styles", "controls", "control", "@4", "@5", "@6", + "@7", "@8", "@9", "@10", "@11", "@12", "@13", "@14", "@15", "@16", + "@17", "@18", "@19", "@20", "@21", "@22", "@23", "@24", "control_params", "optstringc", "opt_control_data", "control_styleexpr", - "@26", "icon_styleexpr", "@27", "control_params_styleexpr", "@28", + "@25", "icon_styleexpr", "@26", "control_params_styleexpr", "@27", "font", "icon", "language", "menu", "menuitems", "menuitem", "menuitem_flags", "menuitem_flag", "menuex", "menuexitems", - "menuexitem", "messagetable", "rcdata", "optrcdata_data", "@29", - "optrcdata_data_int", "rcdata_data", "stringtable", "@30", + "menuexitem", "messagetable", "rcdata", "optrcdata_data", "@28", + "optrcdata_data_int", "rcdata_data", "stringtable", "@29", "string_data", "user", "versioninfo", "fixedverinfo", "verblocks", "vervals", "vertrans", "id", "resname", "resref", "suboptions", "memflags_move_discard", "memflags_move", "memflag", "file_name", "styleexpr", "parennumber", "optcnumexpr", "cnumexpr", "numexpr", - "sizednumexpr", "cposnumexpr", "posnumexpr", "sizedposnumexpr", NULL + "sizednumexpr", "cposnumexpr", "posnumexpr", "sizedposnumexpr", 0 }; #endif @@ -443,60 +444,60 @@ static const short yyr1[] = { 0, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 100, 101, 102, - 102, 103, 103, 104, 104, 105, 105, 105, 106, 106, - 106, 106, 106, 106, 107, 108, 110, 109, 111, 109, - 112, 109, 113, 113, 114, 114, 114, 115, 114, 114, - 114, 114, 114, 114, 114, 114, 116, 116, 118, 117, - 119, 117, 120, 117, 121, 117, 122, 117, 123, 117, - 117, 117, 117, 117, 124, 117, 125, 117, 126, 117, - 127, 117, 128, 117, 117, 117, 117, 117, 129, 117, - 130, 117, 131, 117, 132, 117, 133, 117, 134, 117, - 135, 117, 136, 117, 137, 117, 138, 117, 139, 139, - 139, 140, 140, 140, 141, 141, 143, 142, 145, 144, - 147, 146, 148, 149, 150, 151, 152, 152, 153, 153, - 153, 154, 154, 154, 155, 155, 155, 155, 155, 155, - 156, 157, 157, 158, 158, 158, 158, 158, 158, 158, - 158, 159, 160, 162, 161, 163, 163, 164, 164, 164, - 164, 166, 165, 167, 167, 167, 168, 168, 169, 170, - 170, 170, 170, 170, 170, 170, 170, 171, 171, 171, - 172, 172, 173, 173, 174, 174, 175, 175, 175, 176, - 176, 177, 177, 177, 177, 177, 178, 178, 179, 179, - 180, 180, 180, 180, 180, 180, 180, 181, 181, 182, - 182, 182, 182, 183, 183, 184, 184, 185, 186, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 188, 189, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190 + 99, 99, 99, 99, 99, 99, 99, 100, 101, 101, + 102, 102, 103, 103, 104, 104, 104, 105, 105, 105, + 105, 105, 105, 106, 107, 109, 108, 110, 108, 111, + 108, 112, 112, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 114, 114, 116, + 115, 117, 115, 118, 115, 119, 115, 120, 115, 121, + 115, 115, 115, 115, 115, 122, 115, 123, 115, 124, + 115, 125, 115, 126, 115, 115, 115, 115, 115, 127, + 115, 128, 115, 129, 115, 130, 115, 131, 115, 132, + 115, 133, 115, 134, 115, 135, 115, 136, 115, 137, + 137, 137, 138, 138, 138, 139, 139, 141, 140, 143, + 142, 145, 144, 146, 147, 148, 149, 150, 150, 151, + 151, 151, 152, 152, 152, 153, 153, 153, 153, 153, + 153, 154, 155, 155, 156, 156, 156, 156, 156, 156, + 156, 156, 157, 158, 160, 159, 161, 161, 162, 162, + 162, 162, 164, 163, 165, 165, 165, 166, 166, 167, + 168, 168, 168, 168, 168, 168, 168, 168, 169, 169, + 169, 170, 170, 171, 171, 172, 172, 173, 173, 173, + 174, 174, 175, 175, 175, 175, 175, 176, 176, 177, + 177, 178, 178, 178, 178, 178, 178, 178, 179, 179, + 180, 180, 180, 180, 181, 181, 182, 182, 183, 184, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 186, 187, 188, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const short yyr2[] = { - 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 0, 6, 0, - 2, 2, 4, 1, 1, 1, 3, 2, 1, 1, - 1, 1, 1, 1, 4, 4, 0, 13, 0, 13, - 0, 14, 0, 3, 0, 3, 3, 0, 4, 3, - 5, 7, 3, 3, 4, 3, 0, 2, 0, 3, - 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, - 11, 12, 12, 13, 0, 3, 0, 3, 0, 3, - 0, 3, 0, 3, 6, 8, 10, 11, 0, 3, - 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, - 0, 3, 0, 3, 0, 3, 0, 16, 7, 9, - 10, 0, 1, 2, 0, 3, 0, 3, 0, 3, - 0, 3, 4, 4, 3, 6, 0, 2, 4, 2, - 6, 0, 3, 2, 1, 1, 1, 1, 1, 1, - 6, 0, 2, 2, 3, 5, 2, 5, 6, 7, - 9, 4, 6, 0, 2, 0, 1, 1, 1, 3, - 3, 0, 6, 0, 3, 4, 6, 4, 6, 0, - 6, 6, 3, 3, 3, 3, 3, 0, 8, 7, - 0, 5, 0, 3, 1, 1, 1, 2, 2, 2, - 1, 0, 2, 3, 4, 3, 0, 2, 0, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 3, 4, 1, 3, 0, 1, 2, 1, 1, - 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 1, 1, 3, 2, 3, 3, 3, 3, - 3, 3, 3, 3 + 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 6, 0, 2, + 2, 4, 1, 1, 1, 3, 2, 1, 1, 1, + 1, 1, 1, 4, 4, 0, 13, 0, 13, 0, + 14, 0, 3, 0, 3, 3, 3, 3, 3, 5, + 6, 7, 8, 3, 3, 4, 3, 0, 2, 0, + 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, + 3, 11, 12, 12, 13, 0, 3, 0, 3, 0, + 3, 0, 3, 0, 3, 6, 8, 10, 11, 0, + 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, + 3, 0, 3, 0, 3, 0, 3, 0, 16, 7, + 9, 10, 0, 1, 2, 0, 3, 0, 3, 0, + 3, 0, 3, 4, 4, 3, 6, 0, 2, 4, + 2, 6, 0, 3, 2, 1, 1, 1, 1, 1, + 1, 6, 0, 2, 2, 3, 5, 2, 5, 6, + 7, 9, 4, 6, 0, 2, 0, 1, 1, 1, + 3, 3, 0, 6, 0, 3, 4, 6, 4, 6, + 0, 6, 6, 3, 3, 3, 3, 3, 0, 8, + 7, 0, 5, 0, 3, 1, 1, 1, 2, 2, + 2, 1, 0, 2, 3, 4, 3, 0, 2, 0, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 3, 4, 1, 3, 0, 1, 2, 1, + 1, 3, 2, 2, 3, 3, 3, 3, 3, 3, + 3, 3, 2, 1, 1, 3, 2, 3, 3, 3, + 3, 3, 3, 3, 3 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE @@ -504,290 +505,290 @@ error. */ static const short yydefact[] = { - 1, 17, 0, 0, 191, 185, 233, 16, 0, 0, - 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 0, 184, 232, 219, 0, 0, - 0, 0, 218, 0, 235, 0, 191, 198, 196, 198, - 198, 196, 196, 191, 191, 198, 191, 169, 191, 0, - 0, 0, 0, 0, 0, 0, 0, 222, 221, 0, - 0, 124, 0, 0, 0, 0, 0, 0, 0, 0, - 161, 0, 0, 0, 200, 201, 202, 203, 204, 205, - 206, 192, 234, 0, 0, 0, 42, 42, 0, 0, - 0, 0, 0, 0, 0, 0, 243, 242, 241, 239, - 240, 236, 237, 238, 220, 217, 230, 229, 228, 226, - 227, 223, 224, 225, 163, 0, 193, 195, 19, 207, - 208, 199, 34, 197, 35, 0, 0, 0, 122, 123, - 126, 141, 151, 153, 177, 0, 0, 0, 0, 0, - 0, 0, 153, 167, 0, 194, 0, 0, 0, 0, - 0, 0, 0, 155, 0, 0, 0, 172, 173, 174, - 175, 176, 0, 162, 0, 18, 23, 20, 0, 24, - 43, 0, 0, 125, 0, 0, 127, 140, 0, 0, - 142, 152, 157, 154, 156, 158, 168, 0, 0, 0, - 0, 166, 164, 0, 0, 21, 0, 0, 129, 0, - 131, 146, 143, 0, 0, 0, 0, 0, 0, 165, - 231, 0, 36, 38, 131, 0, 144, 141, 0, 159, - 160, 0, 0, 170, 171, 28, 29, 30, 31, 32, - 33, 22, 25, 44, 44, 40, 128, 126, 134, 135, - 136, 137, 138, 139, 0, 133, 215, 0, 141, 0, - 180, 182, 0, 27, 0, 0, 44, 0, 132, 145, - 216, 147, 0, 141, 215, 0, 0, 26, 56, 0, - 0, 0, 47, 0, 0, 0, 0, 0, 56, 0, - 130, 148, 0, 0, 0, 0, 179, 0, 0, 49, - 45, 46, 0, 0, 0, 53, 55, 52, 0, 56, - 149, 141, 178, 0, 183, 37, 111, 58, 60, 62, - 66, 68, 74, 76, 78, 80, 90, 92, 94, 96, - 98, 100, 102, 104, 0, 64, 82, 88, 0, 57, - 0, 213, 0, 48, 209, 0, 54, 39, 0, 0, - 0, 112, 0, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 0, 111, 111, 111, 186, 0, 190, 0, 0, 210, - 0, 0, 50, 41, 150, 181, 113, 0, 59, 0, - 61, 63, 67, 69, 75, 77, 79, 81, 91, 93, - 95, 97, 99, 101, 103, 105, 0, 65, 83, 89, - 187, 188, 0, 189, 214, 0, 211, 0, 0, 0, - 0, 0, 0, 212, 51, 0, 116, 0, 0, 0, - 114, 0, 0, 0, 0, 0, 153, 84, 0, 0, - 117, 0, 0, 0, 0, 114, 0, 0, 114, 0, - 115, 118, 85, 215, 0, 215, 120, 108, 215, 0, - 0, 114, 216, 215, 114, 216, 0, 114, 216, 0, - 119, 86, 114, 114, 216, 70, 114, 121, 109, 114, - 0, 87, 72, 114, 71, 110, 0, 73, 106, 0, - 215, 107, 0, 0 + 1, 0, 0, 192, 186, 234, 16, 0, 0, 2, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 0, 185, 233, 220, 0, 0, 0, + 0, 219, 0, 236, 0, 192, 199, 197, 199, 199, + 197, 197, 192, 192, 199, 192, 170, 192, 0, 0, + 0, 0, 0, 0, 0, 0, 223, 222, 0, 0, + 125, 0, 0, 0, 0, 0, 0, 0, 0, 162, + 0, 0, 0, 201, 202, 203, 204, 205, 206, 207, + 193, 235, 0, 0, 0, 41, 41, 0, 0, 0, + 0, 0, 0, 0, 0, 244, 243, 242, 240, 241, + 237, 238, 239, 221, 218, 231, 230, 229, 227, 228, + 224, 225, 226, 164, 0, 194, 196, 18, 208, 209, + 200, 33, 198, 34, 0, 0, 0, 123, 124, 127, + 142, 152, 154, 178, 0, 0, 0, 0, 0, 0, + 0, 154, 168, 0, 195, 0, 0, 0, 0, 0, + 0, 0, 156, 0, 0, 0, 173, 174, 175, 176, + 177, 0, 163, 0, 17, 22, 19, 0, 23, 42, + 0, 0, 126, 0, 0, 128, 141, 0, 0, 143, + 153, 158, 155, 157, 159, 169, 0, 0, 0, 0, + 167, 165, 0, 0, 20, 0, 0, 130, 0, 132, + 147, 144, 0, 0, 0, 0, 0, 0, 166, 232, + 0, 35, 37, 132, 0, 145, 142, 0, 160, 161, + 0, 0, 171, 172, 27, 28, 29, 30, 31, 32, + 21, 24, 43, 43, 39, 129, 127, 135, 136, 137, + 138, 139, 140, 0, 134, 216, 0, 142, 0, 181, + 183, 0, 26, 0, 0, 43, 0, 133, 146, 217, + 148, 0, 142, 216, 0, 0, 25, 57, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 57, 0, 131, + 149, 0, 0, 0, 0, 180, 0, 0, 47, 44, + 48, 45, 0, 214, 0, 46, 210, 0, 0, 54, + 56, 53, 0, 57, 150, 142, 179, 0, 184, 36, + 112, 59, 61, 63, 67, 69, 75, 77, 79, 81, + 91, 93, 95, 97, 99, 101, 103, 105, 0, 65, + 83, 89, 0, 58, 211, 0, 0, 0, 55, 38, + 0, 0, 0, 113, 0, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 0, 112, 112, 112, 187, 0, 191, 0, + 0, 215, 0, 212, 49, 40, 151, 182, 114, 0, + 60, 0, 62, 64, 68, 70, 76, 78, 80, 82, + 92, 94, 96, 98, 100, 102, 104, 106, 0, 66, + 84, 90, 188, 189, 0, 190, 213, 50, 0, 0, + 0, 0, 0, 51, 0, 117, 0, 0, 0, 115, + 52, 0, 0, 0, 0, 0, 154, 85, 0, 0, + 118, 0, 0, 0, 0, 115, 0, 0, 115, 0, + 116, 119, 86, 216, 0, 216, 121, 109, 216, 0, + 0, 115, 217, 216, 115, 217, 0, 115, 217, 0, + 120, 87, 115, 115, 217, 71, 115, 122, 110, 115, + 0, 88, 73, 115, 72, 111, 0, 74, 107, 0, + 216, 108, 0, 0 }; static const short yydefgoto[] = { - 1, 2, 10, 146, 167, 168, 231, 232, 11, 12, - 13, 233, 234, 256, 126, 254, 292, 288, 329, 343, - 344, 345, 361, 346, 347, 348, 349, 350, 351, 362, - 363, 352, 353, 354, 355, 356, 357, 358, 359, 479, - 378, 379, 427, 417, 422, 443, 450, 448, 456, 14, - 15, 16, 17, 150, 176, 215, 245, 18, 151, 180, - 19, 20, 152, 153, 183, 184, 21, 114, 144, 22, - 23, 94, 154, 265, 266, 24, 366, 367, 33, 85, - 84, 81, 122, 333, 334, 259, 260, 105, 32, 195, - 25, 26 + 1, 9, 145, 166, 167, 230, 231, 10, 11, 12, + 232, 233, 255, 125, 253, 287, 333, 345, 346, 347, + 363, 348, 349, 350, 351, 352, 353, 364, 365, 354, + 355, 356, 357, 358, 359, 360, 361, 479, 380, 381, + 427, 416, 422, 443, 450, 448, 456, 13, 14, 15, + 16, 149, 175, 214, 244, 17, 150, 179, 18, 19, + 151, 152, 182, 183, 20, 113, 143, 21, 22, 93, + 153, 264, 265, 23, 368, 369, 32, 84, 83, 80, + 121, 295, 296, 258, 259, 104, 31, 194, 24, 25 }; static const short yypact[] = { - -32768, 31, 240, 241,-32768,-32768,-32768,-32768, 241, 241, + -32768, 13, 412,-32768,-32768,-32768,-32768, 412, 412,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768, 68,-32768, 578,-32768, 241, 241, - 241, -73, 586, 169,-32768, 388,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 241, - 241, 241, 241, 241, 241, 241, 241,-32768,-32768, 513, - 241,-32768, 241, 241, 241, 241, 241, 241, 241, 241, - -32768, 241, 241, 241,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768, 215, 581, 581, 268, 268, 581, 581, - 232, 275, 581, 283, 250, 156, 593, 599, 616, 98, - 98,-32768,-32768,-32768,-32768,-32768, 593, 599, 616, 98, - 98,-32768,-32768,-32768,-32768, -73,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768, -61, 290, 290,-32768,-32768, - -32768,-32768,-32768,-32768,-32768, 241, 241, 241, 241, 241, - 241, 241,-32768,-32768, 4,-32768, 5, 241, -73, -73, - 9, 92, 32, 309, 10, -73, -73,-32768,-32768,-32768, - -32768,-32768, 54,-32768, -57,-32768,-32768,-32768, -20,-32768, - -32768, -73, -73,-32768, 39, -9,-32768,-32768, 40, 11, - -32768,-32768,-32768,-32768, 36, 586,-32768, 145, 151, -73, - -73,-32768,-32768, 78, 290, 79, -73, -73,-32768, -73, - -32768,-32768, -73, 16, 365, 106, 108, -73, -73,-32768, - -32768, 686,-32768, -73,-32768, 52, -73,-32768, 17,-32768, - 586, 178, 128,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768, 34,-32768,-32768,-32768,-32768, 314,-32768,-32768,-32768, - -32768,-32768,-32768,-32768, 647,-32768, -73, 95,-32768, 18, - -32768,-32768, 686,-32768, 150, 378,-32768, 112,-32768,-32768, - -32768,-32768, 123,-32768, -73, 6, 29,-32768,-32768, 241, - 129, 281,-32768, 241, 241, 241, 241, 281,-32768, 452, - -32768,-32768, 135, 200, 213, 143,-32768, -73, 479,-32768, - -32768,-32768, 182, 91, -73,-32768,-32768,-32768, 516,-32768, - -32768,-32768,-32768, 130,-32768,-32768, 147,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768, 158,-32768,-32768,-32768, 170,-32768, - 73,-32768, 241, 154,-32768, 160,-32768,-32768, 553, 172, - 168, 161, 241, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 173, 147, 147, 147, 174, 186,-32768, 241, 187,-32768, - 196, 183, -73,-32768,-32768,-32768,-32768, 201,-32768, 241, - -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768,-32768, 241,-32768,-32768,-32768, - -32768,-32768, -73,-32768,-32768, 73,-32768, -73, 293, 202, - -73, 203, -73,-32768,-32768, 202,-32768, -73, -73, 241, - 22, -73, 182, -73, -73, 205,-32768,-32768, -73, -73, - 154, -73, -73, 241, 297, 26, -73, -73, 27, 208, - -32768,-32768,-32768, -73, -73, -73,-32768,-32768, -73, 241, - 182, 251, -73, -73, 251, -73, 182, 251, -73, 230, - 154,-32768, 251, 251, -73,-32768, 251, 154,-32768, 251, - 241,-32768,-32768, 251,-32768,-32768, 236,-32768,-32768, 182, - -11,-32768, 332,-32768 + -32768,-32768,-32768, 111,-32768, 511,-32768, 412, 412, 412, + -79, 600, 244,-32768, 562,-32768,-32768,-32768,-32768,-32768, + -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 412, 412, + 412, 412, 412, 412, 412, 412,-32768,-32768, 576, 412, + -32768, 412, 412, 412, 412, 412, 412, 412, 412,-32768, + 412, 412, 412,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768,-32768, 256, 603, 603, 297, 297, 603, 603, 280, + 337, 603, 345, 100, 231, 607, 613, 567, 172, 172, + -32768,-32768,-32768,-32768,-32768, 607, 613, 567, 172, 172, + -32768,-32768,-32768,-32768, -79,-32768,-32768,-32768,-32768,-32768, + -32768,-32768,-32768,-32768, -60, 63, 63,-32768,-32768,-32768, + -32768,-32768,-32768,-32768, 412, 412, 412, 412, 412, 412, + 412,-32768,-32768, 7,-32768, 5, 412, -79, -79, 33, + 34, 35, 254, 51, -79, -79,-32768,-32768,-32768,-32768, + -32768, 36,-32768, 60,-32768,-32768,-32768, -38,-32768,-32768, + -79, -79,-32768, -39, 11,-32768,-32768, 59, 25,-32768, + -32768,-32768,-32768, 27, 600,-32768, 127, 144, -79, -79, + -32768,-32768, 74, 63, 87, -79, -79,-32768, -79,-32768, + -32768, -79, 12, 294, 118, 128, -79, -79,-32768,-32768, + 700,-32768, -79,-32768, 22, -79,-32768, 14,-32768, 600, + 194, 121,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + 23,-32768,-32768,-32768,-32768, 309,-32768,-32768,-32768,-32768, + -32768,-32768,-32768, 661,-32768, -79, 38,-32768, 16,-32768, + -32768, 700,-32768, 383, 472,-32768, 42,-32768,-32768,-32768, + -32768, 124,-32768, -79, 10, 4,-32768,-32768, 412, 126, + 187, 99, 412, 412, 412, 412, 200,-32768, 480,-32768, + -32768, 125, 204, 207, 135,-32768, -79, 510,-32768,-32768, + -32768,-32768, 49,-32768, 412, 136,-32768, 133, -79,-32768, + -32768,-32768, 547,-32768,-32768,-32768,-32768, 134,-32768,-32768, + 152,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 153,-32768, + -32768,-32768, 374,-32768,-32768, 140, 112, 157,-32768,-32768, + 584, 138, 160, 148, 412, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 158, 152, 152, 152, 161, 163,-32768, 412, + 165,-32768, 49,-32768, -79,-32768,-32768,-32768,-32768, 170, + -32768, 412,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 412,-32768, + -32768,-32768,-32768,-32768, -79,-32768,-32768, -79, 123, 183, + -79, 184, -79, -79, 183,-32768, -79, -79, 412, 17, + -32768, -79, 99, -79, -79, 190,-32768,-32768, -79, -79, + 136, -79, -79, 412, 248, 18, -79, -79, 19, 195, + -32768,-32768,-32768, -79, -79, -79,-32768,-32768, -79, 412, + 99, 245, -79, -79, 245, -79, 99, 245, -79, 196, + 136,-32768, 245, 245, -79,-32768, 245, 136,-32768, 245, + 412,-32768,-32768, 245,-32768,-32768, 201,-32768,-32768, 99, + 64,-32768, 295,-32768 }; static const short yypgoto[] = { - -32768,-32768,-32768,-32768,-32768,-32768,-32768, -220,-32768,-32768, - -32768,-32768,-32768,-32768, 248, -222,-32768, -262,-32768,-32768, + -32768,-32768,-32768,-32768,-32768,-32768, -206,-32768,-32768,-32768, + -32768,-32768,-32768, 212, -85, -259,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - 289, 30, 159, -44,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768, 117,-32768, 163, 140,-32768, -171,-32768, - -32768,-32768, -141,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768, -22,-32768,-32768, 486, -24, - 55, 480, 316, -304, -315, -261, 8, -3, -2,-32768, - -122,-32768 + -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 281, -8, + -212, -104,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768, 78,-32768, 113, 92,-32768, -204,-32768,-32768,-32768, + -140,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768,-32768,-32768, -21,-32768,-32768, 350, 139, 175, 475, + 416, -329, -257, -258, 29, -2, -1,-32768, -122,-32768 }; -#define YYLAST 708 +#define YYLAST 717 static const short yytable[] = { - 31, 162, 48, 283, 148, 149, 34, 35, 163, 165, - 284, 253, 255, 173, 186, 369, 298, 88, 89, 217, - 248, 263, 60, 192, 169, 426, 57, 58, 59, 426, - 426, 482, 267, 286, 279, 147, 181, 338, 193, 61, - 225, 226, 227, 228, 229, 230, 247, 96, 97, 98, - 99, 100, 101, 102, 103, 237, 406, 174, 191, 175, - 106, 107, 108, 109, 110, 111, 112, 113, 115, 116, - 117, 200, 210, 36, 371, 194, 285, 262, 187, 188, - 37, 38, 39, 40, 60, 166, 27, 6, 198, 201, - 413, 203, 282, 28, 86, 87, 177, 29, 8, 261, - 92, 30, 9, 238, 239, 240, 241, 242, 243, 41, - 42, 60, 60, 60, 43, 44, 280, 60, 430, 199, - 202, 441, 446, 145, 60, 45, 46, 281, 47, 252, - 339, 204, 155, 156, 157, 158, 159, 160, 161, 300, - 178, 164, 179, 178, 170, 179, 460, 244, 205, 5, - 6, 185, 467, 268, 206, 331, 171, 172, 209, 142, - 174, 8, 175, 189, 190, 9, 269, 270, 271, 272, - 332, 178, 70, 179, 211, 480, 374, 221, 222, 196, - 197, 250, 451, 178, 454, 179, 335, 457, 67, 68, - 69, 273, 463, 274, 275, 276, 277, 207, 208, 71, - 72, 73, 220, 301, 212, 213, 368, 214, 251, 290, - 216, 218, 71, 72, 73, 223, 224, 302, 118, 481, - 178, 235, 179, 303, 246, 340, 249, 341, 74, 75, - 76, 77, 78, 79, 80, 130, 119, 120, 360, 371, - 372, 74, 75, 76, 77, 78, 79, 80, 375, 291, - 364, 365, 6, 134, 426, 297, 376, 264, 71, 72, - 73, 330, 405, 8, 331, 331, 289, 9, 396, 400, - 293, 294, 295, 296, 287, 71, 72, 73, 131, 332, - 332, 401, 403, 3, 125, 434, 133, 74, 75, 76, - 77, 78, 79, 80, 404, 304, 408, 416, 419, 4, - 433, 440, 336, 449, 74, 75, 76, 77, 78, 79, - 80, 135, 136, 137, 138, 139, 140, 141, 71, 72, - 73, 5, 6, 27, 7, 470, 71, 72, 73, 370, - 28, 478, 483, 8, 29, 127, 342, 9, 30, 377, - 74, 75, 76, 77, 78, 79, 80, 74, 75, 76, - 77, 78, 79, 80, 257, 74, 75, 76, 77, 78, - 79, 80, 5, 6, 402, 238, 239, 240, 241, 242, - 243, 421, 6, 415, 8, 27, 410, 236, 9, 0, - 407, 278, 28, 8, 258, 409, 29, 9, 0, 0, - 30, 27, 182, 411, 269, 270, 271, 272, 28, 0, - 0, 124, 29, 0, 128, 129, 30, 0, 132, 244, - 412, 143, 0, 0, 0, 414, 425, 0, 418, 273, - 420, 274, 275, 276, 277, 423, 424, 0, 428, 429, - 439, 431, 432, 0, 0, 0, 435, 436, 0, 437, - 438, 0, 0, 0, 444, 445, 459, 27, 219, 0, - 0, 452, 453, 455, 28, 299, 458, 0, 29, 0, - 462, 464, 30, 466, 0, 0, 469, 476, 269, 270, - 271, 272, 473, 62, 63, 64, 65, 66, 67, 68, - 69, 0, 0, 305, 0, 0, 82, 0, 0, 306, - 0, 0, 0, 273, 0, 274, 275, 276, 277, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 337, 328, 83, 0, 0, 0, 306, 0, 0, 90, - 91, 0, 93, 0, 95, 0, 307, 308, 309, 310, + 30, 161, 47, 147, 148, 282, 33, 34, 285, 164, + 197, 162, 246, 482, 283, 216, 59, 247, 302, 262, + 426, 426, 426, 168, 252, 236, 56, 57, 58, 224, + 225, 226, 227, 228, 229, 334, 146, 172, 176, 180, + 190, 198, 260, 261, 340, 266, 279, 95, 96, 97, + 98, 99, 100, 101, 102, 185, 2, 193, 281, 60, + 105, 106, 107, 108, 109, 110, 111, 112, 114, 115, + 116, 209, 3, 237, 238, 239, 240, 241, 242, 373, + 284, 173, 177, 174, 178, 165, 177, 5, 178, 26, + 173, 199, 174, 430, 4, 5, 27, 6, 7, 59, + 28, 341, 8, 133, 29, 202, 7, 59, 200, 59, + 8, 59, 59, 441, 446, 406, 35, 243, 251, 186, + 187, 460, 203, 36, 37, 38, 39, 467, 280, 304, + 204, 293, 154, 155, 156, 157, 158, 159, 160, 201, + 191, 163, 376, 144, 169, 5, 294, 205, 254, 336, + 480, 184, 40, 41, 208, 192, 7, 42, 43, 59, + 8, 134, 135, 136, 137, 138, 139, 140, 44, 45, + 278, 46, 177, 177, 178, 178, 170, 171, 292, 87, + 88, 293, 210, 188, 189, 451, 177, 454, 178, 220, + 457, 372, 4, 5, 293, 463, 294, 249, 221, 195, + 196, 250, 219, 414, 7, 26, 289, 305, 8, 294, + 370, 306, 27, 85, 86, 307, 28, 206, 207, 91, + 29, 336, 481, 442, 211, 212, 447, 213, 337, 342, + 215, 217, 343, 362, 141, 222, 223, 374, 371, 461, + 377, 234, 465, 378, 245, 468, 248, 69, 426, 291, + 471, 472, 440, 398, 474, 301, 402, 475, 403, 117, + 405, 477, 66, 67, 68, 408, 288, 290, 4, 5, + 297, 298, 299, 300, 70, 71, 72, 263, 415, 418, + 7, 4, 5, 129, 8, 433, 434, 70, 71, 72, + 449, 470, 335, 7, 286, 483, 478, 8, 126, 70, + 71, 72, 344, 73, 74, 75, 76, 77, 78, 79, + 421, 118, 119, 124, 256, 308, 73, 74, 75, 76, + 77, 78, 79, 70, 71, 72, 235, 338, 73, 74, + 75, 76, 77, 78, 79, 257, 26, 181, 0, 0, + 130, 0, 379, 27, 0, 0, 0, 28, 132, 0, + 0, 29, 73, 74, 75, 76, 77, 78, 79, 0, + 237, 238, 239, 240, 241, 242, 0, 404, 0, 73, + 74, 75, 76, 77, 78, 79, 26, 218, 0, 410, + 70, 71, 72, 27, 0, 82, 267, 28, 70, 71, + 72, 29, 89, 90, 0, 92, 411, 94, 0, 268, + 269, 270, 271, 407, 243, 0, 0, 0, 409, 73, + 74, 75, 76, 77, 78, 79, 425, 73, 74, 75, + 76, 77, 78, 79, 272, 0, 273, 274, 275, 276, + 0, 439, 0, 412, 0, 0, 413, 0, 0, 417, + 0, 419, 420, 0, 0, 423, 424, 459, 428, 0, + 429, 0, 431, 432, 366, 367, 5, 435, 436, 0, + 437, 438, 0, 0, 0, 444, 445, 7, 476, 0, + 0, 8, 452, 453, 455, 277, 0, 458, 0, 0, + 0, 462, 464, 303, 466, 0, 0, 469, 268, 269, + 270, 271, 0, 473, 26, 0, 268, 269, 270, 271, + 123, 27, 0, 127, 128, 28, 0, 131, 0, 29, + 142, 0, 0, 272, 309, 273, 274, 275, 276, 0, + 310, 272, 0, 273, 274, 275, 276, 0, 0, 0, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, - 321, 322, 323, 324, 325, 326, 327, 373, 328, 0, - 0, 0, 0, 306, 121, 123, 121, 121, 123, 123, - 0, 0, 121, 307, 308, 309, 310, 311, 312, 313, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, + 331, 339, 332, 0, 0, 0, 0, 310, 120, 122, + 120, 120, 122, 122, 0, 0, 120, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 442, 328, 0, 447, 62, 63, - 64, 65, 66, 67, 68, 69, 0, 0, 0, 0, - 461, 104, 0, 465, 0, 0, 468, 0, 0, 0, - 0, 471, 472, 0, 0, 474, 0, 0, 475, 0, - 0, 0, 477, 380, 381, 382, 383, 384, 385, 386, - 387, 388, 389, 390, 391, 392, 393, 394, 395, 0, - 397, 398, 399, 74, 75, 76, 77, 78, 79, 80, - 0, 119, 120, 49, 50, 51, 52, 53, 54, 55, - 56, 62, 63, 64, 65, 66, 67, 68, 69, 63, - 64, 65, 66, 67, 68, 69, 64, 65, 66, 67, - 68, 69, 225, 226, 227, 228, 229, 230, 238, 239, - 240, 241, 242, 243, 65, 66, 67, 68, 69 + 324, 325, 326, 327, 328, 329, 330, 331, 375, 332, + 0, 0, 0, 0, 310, 0, 48, 49, 50, 51, + 52, 53, 54, 55, 311, 312, 313, 314, 315, 316, + 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, + 327, 328, 329, 330, 331, 0, 332, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, + 395, 396, 397, 0, 399, 400, 401, 61, 62, 63, + 64, 65, 66, 67, 68, 64, 65, 66, 67, 68, + 81, 61, 62, 63, 64, 65, 66, 67, 68, 0, + 0, 0, 0, 0, 103, 73, 74, 75, 76, 77, + 78, 79, 0, 118, 119, 61, 62, 63, 64, 65, + 66, 67, 68, 62, 63, 64, 65, 66, 67, 68, + 63, 64, 65, 66, 67, 68, 224, 225, 226, 227, + 228, 229, 237, 238, 239, 240, 241, 242 }; static const short yycheck[] = { - 3, 142, 24, 264, 126, 127, 8, 9, 4, 4, - 4, 231, 234, 4, 4, 330, 278, 41, 42, 3, - 3, 3, 95, 80, 146, 3, 28, 29, 30, 3, - 3, 0, 252, 4, 256, 96, 4, 299, 95, 31, - 6, 7, 8, 9, 10, 11, 217, 49, 50, 51, - 52, 53, 54, 55, 56, 3, 371, 48, 4, 50, - 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, - 73, 80, 194, 5, 85, 95, 70, 248, 68, 69, - 12, 13, 14, 15, 95, 80, 82, 82, 49, 49, - 405, 80, 263, 89, 39, 40, 4, 93, 93, 4, - 45, 97, 97, 51, 52, 53, 54, 55, 56, 41, - 42, 95, 95, 95, 46, 47, 4, 95, 422, 80, - 80, 95, 95, 115, 95, 57, 58, 4, 60, 95, - 301, 95, 135, 136, 137, 138, 139, 140, 141, 4, - 48, 144, 50, 48, 147, 50, 450, 95, 3, 81, - 82, 153, 456, 3, 3, 82, 148, 149, 80, 3, - 48, 93, 50, 155, 156, 97, 16, 17, 18, 19, - 97, 48, 3, 50, 95, 479, 4, 71, 70, 171, - 172, 3, 443, 48, 445, 50, 95, 448, 90, 91, - 92, 41, 453, 43, 44, 45, 46, 189, 190, 43, - 44, 45, 204, 3, 196, 197, 328, 199, 80, 80, - 202, 203, 43, 44, 45, 207, 208, 4, 3, 480, - 48, 213, 50, 80, 216, 95, 218, 80, 72, 73, - 74, 75, 76, 77, 78, 3, 80, 81, 80, 85, - 80, 72, 73, 74, 75, 76, 77, 78, 80, 271, - 80, 81, 82, 3, 3, 277, 95, 249, 43, 44, - 45, 79, 79, 93, 82, 82, 269, 97, 95, 95, - 273, 274, 275, 276, 266, 43, 44, 45, 3, 97, - 97, 95, 95, 43, 16, 426, 3, 72, 73, 74, - 75, 76, 77, 78, 98, 287, 95, 95, 95, 59, - 95, 4, 294, 95, 72, 73, 74, 75, 76, 77, - 78, 61, 62, 63, 64, 65, 66, 67, 43, 44, - 45, 81, 82, 82, 84, 95, 43, 44, 45, 332, - 89, 95, 0, 93, 93, 87, 306, 97, 97, 342, - 72, 73, 74, 75, 76, 77, 78, 72, 73, 74, - 75, 76, 77, 78, 237, 72, 73, 74, 75, 76, - 77, 78, 81, 82, 367, 51, 52, 53, 54, 55, - 56, 415, 82, 80, 93, 82, 379, 214, 97, -1, - 372, 3, 89, 93, 244, 377, 93, 97, -1, -1, - 97, 82, 83, 396, 16, 17, 18, 19, 89, -1, - -1, 85, 93, -1, 88, 89, 97, -1, 92, 95, - 402, 95, -1, -1, -1, 407, 419, -1, 410, 41, - 412, 43, 44, 45, 46, 417, 418, -1, 420, 421, - 433, 423, 424, -1, -1, -1, 428, 429, -1, 431, - 432, -1, -1, -1, 436, 437, 449, 82, 83, -1, - -1, 443, 444, 445, 89, 3, 448, -1, 93, -1, - 452, 453, 97, 455, -1, -1, 458, 470, 16, 17, - 18, 19, 464, 85, 86, 87, 88, 89, 90, 91, - 92, -1, -1, 4, -1, -1, 98, -1, -1, 10, - -1, -1, -1, 41, -1, 43, 44, 45, 46, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 4, 42, 36, -1, -1, -1, 10, -1, -1, 43, - 44, -1, 46, -1, 48, -1, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 4, 42, -1, - -1, -1, -1, 10, 84, 85, 86, 87, 88, 89, - -1, -1, 92, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 435, 42, -1, 438, 85, 86, - 87, 88, 89, 90, 91, 92, -1, -1, -1, -1, - 451, 98, -1, 454, -1, -1, 457, -1, -1, -1, - -1, 462, 463, -1, -1, 466, -1, -1, 469, -1, - -1, -1, 473, 344, 345, 346, 347, 348, 349, 350, - 351, 352, 353, 354, 355, 356, 357, 358, 359, -1, - 361, 362, 363, 72, 73, 74, 75, 76, 77, 78, - -1, 80, 81, 85, 86, 87, 88, 89, 90, 91, - 92, 85, 86, 87, 88, 89, 90, 91, 92, 86, - 87, 88, 89, 90, 91, 92, 87, 88, 89, 90, - 91, 92, 6, 7, 8, 9, 10, 11, 51, 52, - 53, 54, 55, 56, 88, 89, 90, 91, 92 + 2, 141, 23, 125, 126, 263, 7, 8, 4, 4, + 49, 4, 216, 0, 4, 3, 95, 3, 277, 3, + 3, 3, 3, 145, 230, 3, 27, 28, 29, 6, + 7, 8, 9, 10, 11, 292, 96, 4, 4, 4, + 4, 80, 4, 247, 303, 251, 4, 48, 49, 50, + 51, 52, 53, 54, 55, 4, 43, 95, 262, 30, + 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, + 72, 193, 59, 51, 52, 53, 54, 55, 56, 336, + 70, 48, 48, 50, 50, 80, 48, 82, 50, 82, + 48, 80, 50, 422, 81, 82, 89, 84, 93, 95, + 93, 305, 97, 3, 97, 80, 93, 95, 49, 95, + 97, 95, 95, 95, 95, 372, 5, 95, 95, 68, + 69, 450, 95, 12, 13, 14, 15, 456, 4, 4, + 3, 82, 134, 135, 136, 137, 138, 139, 140, 80, + 80, 143, 4, 114, 146, 82, 97, 3, 233, 85, + 479, 152, 41, 42, 80, 95, 93, 46, 47, 95, + 97, 61, 62, 63, 64, 65, 66, 67, 57, 58, + 255, 60, 48, 48, 50, 50, 147, 148, 79, 40, + 41, 82, 95, 154, 155, 443, 48, 445, 50, 71, + 448, 79, 81, 82, 82, 453, 97, 3, 70, 170, + 171, 80, 203, 80, 93, 82, 80, 3, 97, 97, + 332, 4, 89, 38, 39, 80, 93, 188, 189, 44, + 97, 85, 480, 435, 195, 196, 438, 198, 95, 95, + 201, 202, 80, 80, 3, 206, 207, 80, 98, 451, + 80, 212, 454, 95, 215, 457, 217, 3, 3, 270, + 462, 463, 4, 95, 466, 276, 95, 469, 95, 3, + 95, 473, 90, 91, 92, 95, 268, 80, 81, 82, + 272, 273, 274, 275, 43, 44, 45, 248, 95, 95, + 93, 81, 82, 3, 97, 95, 426, 43, 44, 45, + 95, 95, 294, 93, 265, 0, 95, 97, 86, 43, + 44, 45, 310, 72, 73, 74, 75, 76, 77, 78, + 414, 80, 81, 16, 236, 286, 72, 73, 74, 75, + 76, 77, 78, 43, 44, 45, 213, 298, 72, 73, + 74, 75, 76, 77, 78, 243, 82, 83, -1, -1, + 3, -1, 344, 89, -1, -1, -1, 93, 3, -1, + -1, 97, 72, 73, 74, 75, 76, 77, 78, -1, + 51, 52, 53, 54, 55, 56, -1, 369, -1, 72, + 73, 74, 75, 76, 77, 78, 82, 83, -1, 381, + 43, 44, 45, 89, -1, 35, 3, 93, 43, 44, + 45, 97, 42, 43, -1, 45, 398, 47, -1, 16, + 17, 18, 19, 374, 95, -1, -1, -1, 379, 72, + 73, 74, 75, 76, 77, 78, 418, 72, 73, 74, + 75, 76, 77, 78, 41, -1, 43, 44, 45, 46, + -1, 433, -1, 404, -1, -1, 407, -1, -1, 410, + -1, 412, 413, -1, -1, 416, 417, 449, 419, -1, + 421, -1, 423, 424, 80, 81, 82, 428, 429, -1, + 431, 432, -1, -1, -1, 436, 437, 93, 470, -1, + -1, 97, 443, 444, 445, 3, -1, 448, -1, -1, + -1, 452, 453, 3, 455, -1, -1, 458, 16, 17, + 18, 19, -1, 464, 82, -1, 16, 17, 18, 19, + 84, 89, -1, 87, 88, 93, -1, 91, -1, 97, + 94, -1, -1, 41, 4, 43, 44, 45, 46, -1, + 10, 41, -1, 43, 44, 45, 46, -1, -1, -1, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 4, 42, -1, -1, -1, -1, 10, 83, 84, + 85, 86, 87, 88, -1, -1, 91, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 4, 42, + -1, -1, -1, -1, 10, -1, 85, 86, 87, 88, + 89, 90, 91, 92, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, -1, 42, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, + 359, 360, 361, -1, 363, 364, 365, 85, 86, 87, + 88, 89, 90, 91, 92, 88, 89, 90, 91, 92, + 98, 85, 86, 87, 88, 89, 90, 91, 92, -1, + -1, -1, -1, -1, 98, 72, 73, 74, 75, 76, + 77, 78, -1, 80, 81, 85, 86, 87, 88, 89, + 90, 91, 92, 86, 87, 88, 89, 90, 91, 92, + 87, 88, 89, 90, 91, 92, 6, 7, 8, 9, + 10, 11, 51, 52, 53, 54, 55, 56 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/share/bison/bison.simple" @@ -829,12 +830,6 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -#ifdef __cplusplus -# define YYSTD(x) std::x -#else -# define YYSTD(x) x -#endif - #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -857,18 +852,19 @@ /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # else -# ifdef __cplusplus -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T std::size_t -# else -# ifdef __STDC__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t # endif -# define YYSTACK_ALLOC YYSTD (malloc) -# define YYSTACK_FREE YYSTD (free) +# define YYSTACK_ALLOC malloc +# define YYSTACK_FREE free # endif +#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ + + +#if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -895,24 +891,41 @@ + YYSTACK_GAP_MAX) # endif -/* Relocate the TYPE STACK from its old location to the new one. The +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Type, Stack) \ +# define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - yymemcpy ((char *) yyptr, (char *) (Stack), \ - yysize * (YYSIZE_T) sizeof (Type)); \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) -#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ +#endif #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) @@ -922,14 +935,9 @@ # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) -# ifdef __cplusplus -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T std::size_t -# else -# ifdef __STDC__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t # endif #endif #if ! defined (YYSIZE_T) @@ -1008,12 +1016,8 @@ #if YYDEBUG # ifndef YYFPRINTF -# ifdef __cplusplus -# include /* INFRINGES ON USER NAME SPACE */ -# else -# include /* INFRINGES ON USER NAME SPACE */ -# endif -# define YYFPRINTF YYSTD (fprintf) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ @@ -1021,10 +1025,8 @@ if (yydebug) \ YYFPRINTF Args; \ } while (0) -/* Nonzero means print parse trace. [The following comment makes no - sense to me. Could someone clarify it? --akim] Since this is - uninitialized, it does not stop multiple parsers from coexisting. - */ +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) @@ -1050,33 +1052,6 @@ # define YYMAXDEPTH 10000 #endif -#if ! defined (yyoverflow) && ! defined (yymemcpy) -# if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -# define yymemcpy __builtin_memcpy -# else /* not GNU C or C++ */ - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -# if defined (__STDC__) || defined (__cplusplus) -yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount) -# else -yymemcpy (yyto, yyfrom, yycount) - char *yyto; - const char *yyfrom; - YYSIZE_T yycount; -# endif -{ - register const char *yyf = yyfrom; - register char *yyt = yyto; - register YYSIZE_T yyi = yycount; - - while (yyi-- != 0) - *yyt++ = *yyf++; -} -# endif -#endif - #ifdef YYERROR_VERBOSE # ifndef yystrlen @@ -1129,7 +1104,7 @@ # endif #endif -#line 341 "/usr/share/bison/bison.simple" +#line 315 "/usr/share/bison/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed @@ -1139,13 +1114,13 @@ to the proper pointer type. */ #ifdef YYPARSE_PARAM -# ifdef __cplusplus +# if defined (__STDC__) || defined (__cplusplus) # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM # define YYPARSE_PARAM_DECL -# else /* !__cplusplus */ +# else # define YYPARSE_PARAM_ARG YYPARSE_PARAM # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -# endif /* !__cplusplus */ +# endif #else /* !YYPARSE_PARAM */ # define YYPARSE_PARAM_ARG # define YYPARSE_PARAM_DECL @@ -1319,6 +1294,9 @@ yyvs = yyvs1; } #else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyoverflowlab; +# else /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) goto yyoverflowlab; @@ -1332,15 +1310,16 @@ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyoverflowlab; - YYSTACK_RELOCATE (short, yyss); - YYSTACK_RELOCATE (YYSTYPE, yyvs); + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); # if YYLSP_NEEDED - YYSTACK_RELOCATE (YYLTYPE, yyls); + YYSTACK_RELOCATE (yyls); # endif # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } +# endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; @@ -1519,26 +1498,23 @@ switch (yyn) { case 17: -#line 175 "rcparse.y" +#line 177 "rcparse.y" { + define_accelerator (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].pacc); + if (yychar != YYEMPTY) + YYERROR; rcparse_discard_strings (); } break; case 18: -#line 184 "rcparse.y" +#line 187 "rcparse.y" { - define_accelerator (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].pacc); + yyval.pacc = NULL; } break; case 19: #line 191 "rcparse.y" { - yyval.pacc = NULL; - } - break; -case 20: -#line 195 "rcparse.y" -{ struct accelerator *a; a = (struct accelerator *) res_alloc (sizeof *a); @@ -1556,15 +1532,15 @@ } } break; -case 21: -#line 216 "rcparse.y" +case 20: +#line 212 "rcparse.y" { yyval.acc = yyvsp[-1].acc; yyval.acc.id = yyvsp[0].il; } break; -case 22: -#line 221 "rcparse.y" +case 21: +#line 217 "rcparse.y" { yyval.acc = yyvsp[-3].acc; yyval.acc.id = yyvsp[-2].il; @@ -1574,8 +1550,8 @@ rcparse_warning (_("inappropriate modifiers for non-VIRTKEY")); } break; -case 23: -#line 233 "rcparse.y" +case 22: +#line 229 "rcparse.y" { const char *s = yyvsp[0].s; char ch; @@ -1597,8 +1573,8 @@ rcparse_warning (_("accelerator should only be one character")); } break; -case 24: -#line 254 "rcparse.y" +case 23: +#line 250 "rcparse.y" { yyval.acc.next = NULL; yyval.acc.flags = 0; @@ -1606,75 +1582,81 @@ yyval.acc.key = yyvsp[0].il; } break; +case 24: +#line 260 "rcparse.y" +{ + yyval.is = yyvsp[0].is; + } + break; case 25: #line 264 "rcparse.y" { - yyval.is = yyvsp[0].is; + yyval.is = yyvsp[-2].is | yyvsp[0].is; } break; case 26: -#line 268 "rcparse.y" +#line 269 "rcparse.y" { - yyval.is = yyvsp[-2].is | yyvsp[0].is; + yyval.is = yyvsp[-1].is | yyvsp[0].is; } break; case 27: -#line 273 "rcparse.y" +#line 276 "rcparse.y" { - yyval.is = yyvsp[-1].is | yyvsp[0].is; + yyval.is = ACC_VIRTKEY; } break; case 28: #line 280 "rcparse.y" { - yyval.is = ACC_VIRTKEY; + /* This is just the absence of VIRTKEY. */ + yyval.is = 0; } break; case 29: -#line 284 "rcparse.y" +#line 285 "rcparse.y" { - /* This is just the absence of VIRTKEY. */ - yyval.is = 0; + yyval.is = ACC_NOINVERT; } break; case 30: #line 289 "rcparse.y" { - yyval.is = ACC_NOINVERT; + yyval.is = ACC_SHIFT; } break; case 31: #line 293 "rcparse.y" { - yyval.is = ACC_SHIFT; + yyval.is = ACC_CONTROL; } break; case 32: #line 297 "rcparse.y" { - yyval.is = ACC_CONTROL; - } - break; -case 33: -#line 301 "rcparse.y" -{ yyval.is = ACC_ALT; } break; -case 34: -#line 310 "rcparse.y" +case 33: +#line 306 "rcparse.y" { define_bitmap (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 35: -#line 319 "rcparse.y" +case 34: +#line 318 "rcparse.y" { define_cursor (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 36: -#line 329 "rcparse.y" +case 35: +#line 331 "rcparse.y" { memset (&dialog, 0, sizeof dialog); dialog.x = yyvsp[-3].il; @@ -1689,16 +1671,20 @@ dialog.ex = NULL; dialog.controls = NULL; sub_res_info = yyvsp[-5].res_info; + style = 0; } break; -case 37: -#line 345 "rcparse.y" +case 36: +#line 348 "rcparse.y" { define_dialog (yyvsp[-12].id, &sub_res_info, &dialog); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 38: -#line 350 "rcparse.y" +case 37: +#line 356 "rcparse.y" { memset (&dialog, 0, sizeof dialog); dialog.x = yyvsp[-3].il; @@ -1715,16 +1701,20 @@ memset (dialog.ex, 0, sizeof (struct dialog_ex)); dialog.controls = NULL; sub_res_info = yyvsp[-5].res_info; + style = 0; } break; -case 39: -#line 368 "rcparse.y" +case 38: +#line 375 "rcparse.y" { define_dialog (yyvsp[-12].id, &sub_res_info, &dialog); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 40: -#line 373 "rcparse.y" +case 39: +#line 383 "rcparse.y" { memset (&dialog, 0, sizeof dialog); dialog.x = yyvsp[-4].il; @@ -1742,66 +1732,99 @@ dialog.ex->help = yyvsp[0].il; dialog.controls = NULL; sub_res_info = yyvsp[-6].res_info; + style = 0; } break; -case 41: -#line 392 "rcparse.y" +case 40: +#line 403 "rcparse.y" { define_dialog (yyvsp[-13].id, &sub_res_info, &dialog); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 42: -#line 399 "rcparse.y" +case 41: +#line 413 "rcparse.y" { yyval.il = 0; } break; -case 43: -#line 403 "rcparse.y" +case 42: +#line 417 "rcparse.y" { yyval.il = yyvsp[0].il; } break; -case 45: -#line 411 "rcparse.y" +case 44: +#line 425 "rcparse.y" { + dialog.style |= WS_CAPTION; + style |= WS_CAPTION; unicode_from_ascii ((int *) NULL, &dialog.caption, yyvsp[0].s); } break; -case 46: -#line 415 "rcparse.y" +case 45: +#line 431 "rcparse.y" { dialog.class = yyvsp[0].id; } break; +case 46: +#line 436 "rcparse.y" +{ + dialog.style = style; + } + break; case 47: -#line 419 "rcparse.y" -{ style = dialog.style; } +#line 440 "rcparse.y" +{ + dialog.exstyle = yyvsp[0].il; + } break; case 48: -#line 421 "rcparse.y" +#line 444 "rcparse.y" { - dialog.style = style; + res_string_to_id (& dialog.class, yyvsp[0].s); } break; case 49: -#line 425 "rcparse.y" +#line 448 "rcparse.y" { - dialog.exstyle = yyvsp[0].il; + dialog.style |= DS_SETFONT; + style |= DS_SETFONT; + dialog.pointsize = yyvsp[-2].il; + unicode_from_ascii ((int *) NULL, &dialog.font, yyvsp[0].s); + if (dialog.ex != NULL) + { + dialog.ex->weight = 0; + dialog.ex->italic = 0; + dialog.ex->charset = 1; + } } break; case 50: -#line 429 "rcparse.y" +#line 461 "rcparse.y" { dialog.style |= DS_SETFONT; - dialog.pointsize = yyvsp[-2].il; - unicode_from_ascii ((int *) NULL, &dialog.font, yyvsp[0].s); + style |= DS_SETFONT; + dialog.pointsize = yyvsp[-3].il; + unicode_from_ascii ((int *) NULL, &dialog.font, yyvsp[-1].s); + if (dialog.ex == NULL) + rcparse_warning (_("extended FONT requires DIALOGEX")); + else + { + dialog.ex->weight = yyvsp[0].il; + dialog.ex->italic = 0; + dialog.ex->charset = 1; + } } break; case 51: -#line 435 "rcparse.y" +#line 476 "rcparse.y" { dialog.style |= DS_SETFONT; + style |= DS_SETFONT; dialog.pointsize = yyvsp[-4].il; unicode_from_ascii ((int *) NULL, &dialog.font, yyvsp[-2].s); if (dialog.ex == NULL) @@ -1810,35 +1833,53 @@ { dialog.ex->weight = yyvsp[-1].il; dialog.ex->italic = yyvsp[0].il; + dialog.ex->charset = 1; } } break; case 52: -#line 448 "rcparse.y" +#line 491 "rcparse.y" { - dialog.menu = yyvsp[0].id; + dialog.style |= DS_SETFONT; + style |= DS_SETFONT; + dialog.pointsize = yyvsp[-5].il; + unicode_from_ascii ((int *) NULL, &dialog.font, yyvsp[-3].s); + if (dialog.ex == NULL) + rcparse_warning (_("extended FONT requires DIALOGEX")); + else + { + dialog.ex->weight = yyvsp[-2].il; + dialog.ex->italic = yyvsp[-1].il; + dialog.ex->charset = yyvsp[0].il; + } } break; case 53: -#line 452 "rcparse.y" +#line 506 "rcparse.y" { - sub_res_info.characteristics = yyvsp[0].il; + dialog.menu = yyvsp[0].id; } break; case 54: -#line 456 "rcparse.y" +#line 510 "rcparse.y" { - sub_res_info.language = yyvsp[-1].il | (yyvsp[0].il << SUBLANG_SHIFT); + sub_res_info.characteristics = yyvsp[0].il; } break; case 55: -#line 460 "rcparse.y" +#line 514 "rcparse.y" +{ + sub_res_info.language = yyvsp[-1].il | (yyvsp[0].il << SUBLANG_SHIFT); + } + break; +case 56: +#line 518 "rcparse.y" { sub_res_info.version = yyvsp[0].il; } break; -case 57: -#line 468 "rcparse.y" +case 58: +#line 526 "rcparse.y" { struct dialog_control **pp; @@ -1847,95 +1888,95 @@ *pp = yyvsp[0].dialog_control; } break; -case 58: -#line 479 "rcparse.y" +case 59: +#line 537 "rcparse.y" { default_style = BS_AUTO3STATE | WS_TABSTOP; base_style = BS_AUTO3STATE; class = CTL_BUTTON; } break; -case 59: -#line 485 "rcparse.y" +case 60: +#line 543 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 60: -#line 489 "rcparse.y" +case 61: +#line 547 "rcparse.y" { default_style = BS_AUTOCHECKBOX | WS_TABSTOP; base_style = BS_AUTOCHECKBOX; class = CTL_BUTTON; } break; -case 61: -#line 495 "rcparse.y" +case 62: +#line 553 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 62: -#line 499 "rcparse.y" +case 63: +#line 557 "rcparse.y" { default_style = BS_AUTORADIOBUTTON | WS_TABSTOP; base_style = BS_AUTORADIOBUTTON; class = CTL_BUTTON; } break; -case 63: -#line 505 "rcparse.y" +case 64: +#line 563 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 64: -#line 509 "rcparse.y" +case 65: +#line 567 "rcparse.y" { default_style = ES_LEFT | WS_BORDER | WS_TABSTOP; base_style = ES_LEFT | WS_BORDER | WS_TABSTOP; class = CTL_EDIT; } break; -case 65: -#line 515 "rcparse.y" +case 66: +#line 573 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; if (dialog.ex == NULL) - rcparse_warning (_("IEDIT requires DIALOGEX")); + rcparse_warning (_("BEDIT requires DIALOGEX")); res_string_to_id (&yyval.dialog_control->class, "BEDIT"); } break; -case 66: -#line 522 "rcparse.y" +case 67: +#line 580 "rcparse.y" { default_style = BS_CHECKBOX | WS_TABSTOP; base_style = BS_CHECKBOX | WS_TABSTOP; class = CTL_BUTTON; } break; -case 67: -#line 528 "rcparse.y" +case 68: +#line 586 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 68: -#line 532 "rcparse.y" +case 69: +#line 590 "rcparse.y" { default_style = CBS_SIMPLE | WS_TABSTOP; base_style = 0; class = CTL_COMBOBOX; } break; -case 69: -#line 538 "rcparse.y" +case 70: +#line 596 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 70: -#line 543 "rcparse.y" +case 71: +#line 601 "rcparse.y" { yyval.dialog_control = define_control (yyvsp[-9].s, yyvsp[-8].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-2].il, yyvsp[-7].il, style, yyvsp[-1].il); if (yyvsp[0].rcdata_item != NULL) @@ -1946,8 +1987,8 @@ } } break; -case 71: -#line 554 "rcparse.y" +case 72: +#line 612 "rcparse.y" { yyval.dialog_control = define_control (yyvsp[-10].s, yyvsp[-9].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-8].il, style, yyvsp[-2].il); if (dialog.ex == NULL) @@ -1956,8 +1997,8 @@ yyval.dialog_control->data = yyvsp[0].rcdata_item; } break; -case 72: -#line 563 "rcparse.y" +case 73: +#line 621 "rcparse.y" { yyval.dialog_control = define_control (yyvsp[-10].s, yyvsp[-9].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-2].il, 0, style, yyvsp[-1].il); if (yyvsp[0].rcdata_item != NULL) @@ -1967,11 +2008,11 @@ yyval.dialog_control->data = yyvsp[0].rcdata_item; } yyval.dialog_control->class.named = 1; - unicode_from_ascii(&yyval.dialog_control->class.u.n.length, &yyval.dialog_control->class.u.n.name, yyvsp[-7].s); + unicode_from_ascii (&yyval.dialog_control->class.u.n.length, &yyval.dialog_control->class.u.n.name, yyvsp[-7].s); } break; -case 73: -#line 576 "rcparse.y" +case 74: +#line 634 "rcparse.y" { yyval.dialog_control = define_control (yyvsp[-11].s, yyvsp[-10].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, 0, style, yyvsp[-2].il); if (dialog.ex == NULL) @@ -1979,75 +2020,75 @@ yyval.dialog_control->help = yyvsp[-1].il; yyval.dialog_control->data = yyvsp[0].rcdata_item; yyval.dialog_control->class.named = 1; - unicode_from_ascii(&yyval.dialog_control->class.u.n.length, &yyval.dialog_control->class.u.n.name, yyvsp[-8].s); + unicode_from_ascii (&yyval.dialog_control->class.u.n.length, &yyval.dialog_control->class.u.n.name, yyvsp[-8].s); } break; -case 74: -#line 586 "rcparse.y" +case 75: +#line 644 "rcparse.y" { default_style = SS_CENTER | WS_GROUP; base_style = SS_CENTER; class = CTL_STATIC; } break; -case 75: -#line 592 "rcparse.y" +case 76: +#line 650 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 76: -#line 596 "rcparse.y" +case 77: +#line 654 "rcparse.y" { default_style = BS_DEFPUSHBUTTON | WS_TABSTOP; base_style = BS_DEFPUSHBUTTON | WS_TABSTOP; class = CTL_BUTTON; } break; -case 77: -#line 602 "rcparse.y" +case 78: +#line 660 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 78: -#line 606 "rcparse.y" +case 79: +#line 664 "rcparse.y" { default_style = ES_LEFT | WS_BORDER | WS_TABSTOP; base_style = ES_LEFT | WS_BORDER | WS_TABSTOP; class = CTL_EDIT; } break; -case 79: -#line 612 "rcparse.y" +case 80: +#line 670 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 80: -#line 616 "rcparse.y" +case 81: +#line 674 "rcparse.y" { default_style = BS_GROUPBOX; base_style = BS_GROUPBOX; class = CTL_BUTTON; } break; -case 81: -#line 622 "rcparse.y" +case 82: +#line 680 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 82: -#line 626 "rcparse.y" +case 83: +#line 684 "rcparse.y" { default_style = ES_LEFT | WS_BORDER | WS_TABSTOP; base_style = ES_LEFT | WS_BORDER | WS_TABSTOP; class = CTL_EDIT; } break; -case 83: -#line 632 "rcparse.y" +case 84: +#line 690 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; if (dialog.ex == NULL) @@ -2055,44 +2096,44 @@ res_string_to_id (&yyval.dialog_control->class, "HEDIT"); } break; -case 84: -#line 639 "rcparse.y" +case 85: +#line 697 "rcparse.y" { yyval.dialog_control = define_icon_control (yyvsp[-4].id, yyvsp[-3].il, yyvsp[-2].il, yyvsp[-1].il, 0, 0, 0, yyvsp[0].rcdata_item, dialog.ex); } break; -case 85: -#line 645 "rcparse.y" +case 86: +#line 703 "rcparse.y" { yyval.dialog_control = define_icon_control (yyvsp[-6].id, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, 0, 0, 0, yyvsp[0].rcdata_item, dialog.ex); } break; -case 86: -#line 651 "rcparse.y" +case 87: +#line 709 "rcparse.y" { yyval.dialog_control = define_icon_control (yyvsp[-8].id, yyvsp[-7].il, yyvsp[-6].il, yyvsp[-5].il, style, yyvsp[-1].il, 0, yyvsp[0].rcdata_item, dialog.ex); } break; -case 87: -#line 657 "rcparse.y" +case 88: +#line 715 "rcparse.y" { yyval.dialog_control = define_icon_control (yyvsp[-9].id, yyvsp[-8].il, yyvsp[-7].il, yyvsp[-6].il, style, yyvsp[-2].il, yyvsp[-1].il, yyvsp[0].rcdata_item, dialog.ex); } break; -case 88: -#line 662 "rcparse.y" +case 89: +#line 720 "rcparse.y" { default_style = ES_LEFT | WS_BORDER | WS_TABSTOP; base_style = ES_LEFT | WS_BORDER | WS_TABSTOP; class = CTL_EDIT; } break; -case 89: -#line 668 "rcparse.y" +case 90: +#line 726 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; if (dialog.ex == NULL) @@ -2100,131 +2141,131 @@ res_string_to_id (&yyval.dialog_control->class, "IEDIT"); } break; -case 90: -#line 675 "rcparse.y" +case 91: +#line 733 "rcparse.y" { default_style = LBS_NOTIFY | WS_BORDER; base_style = LBS_NOTIFY | WS_BORDER; class = CTL_LISTBOX; } break; -case 91: -#line 681 "rcparse.y" +case 92: +#line 739 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 92: -#line 685 "rcparse.y" +case 93: +#line 743 "rcparse.y" { default_style = SS_LEFT | WS_GROUP; base_style = SS_LEFT; class = CTL_STATIC; } break; -case 93: -#line 691 "rcparse.y" +case 94: +#line 749 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 94: -#line 695 "rcparse.y" +case 95: +#line 753 "rcparse.y" { default_style = BS_PUSHBOX | WS_TABSTOP; base_style = BS_PUSHBOX; class = CTL_BUTTON; } break; -case 95: -#line 701 "rcparse.y" +case 96: +#line 759 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 96: -#line 705 "rcparse.y" +case 97: +#line 763 "rcparse.y" { default_style = BS_PUSHBUTTON | WS_TABSTOP; base_style = BS_PUSHBUTTON | WS_TABSTOP; class = CTL_BUTTON; } break; -case 97: -#line 711 "rcparse.y" +case 98: +#line 769 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 98: -#line 715 "rcparse.y" +case 99: +#line 773 "rcparse.y" { default_style = BS_RADIOBUTTON | WS_TABSTOP; base_style = BS_RADIOBUTTON; class = CTL_BUTTON; } break; -case 99: -#line 721 "rcparse.y" +case 100: +#line 779 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 100: -#line 725 "rcparse.y" +case 101: +#line 783 "rcparse.y" { default_style = SS_RIGHT | WS_GROUP; base_style = SS_RIGHT; class = CTL_STATIC; } break; -case 101: -#line 731 "rcparse.y" +case 102: +#line 789 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 102: -#line 735 "rcparse.y" +case 103: +#line 793 "rcparse.y" { default_style = SBS_HORZ; base_style = 0; class = CTL_SCROLLBAR; } break; -case 103: -#line 741 "rcparse.y" +case 104: +#line 799 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 104: -#line 745 "rcparse.y" +case 105: +#line 803 "rcparse.y" { default_style = BS_3STATE | WS_TABSTOP; base_style = BS_3STATE; class = CTL_BUTTON; } break; -case 105: -#line 751 "rcparse.y" +case 106: +#line 809 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; } break; -case 106: -#line 756 "rcparse.y" +case 107: +#line 814 "rcparse.y" { style = WS_CHILD | WS_VISIBLE; } break; -case 107: -#line 758 "rcparse.y" +case 108: +#line 816 "rcparse.y" { yyval.dialog_control = define_control (yyvsp[-14].s, yyvsp[-12].il, yyvsp[-10].il, yyvsp[-8].il, yyvsp[-6].il, yyvsp[-4].il, CTL_BUTTON, style, yyvsp[0].il); } break; -case 108: -#line 774 "rcparse.y" +case 109: +#line 832 "rcparse.y" { yyval.dialog_control = define_control (yyvsp[-6].s, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-2].il, yyvsp[-1].il, class, default_style | WS_CHILD | WS_VISIBLE, 0); @@ -2236,8 +2277,8 @@ } } break; -case 109: -#line 786 "rcparse.y" +case 110: +#line 844 "rcparse.y" { yyval.dialog_control = define_control (yyvsp[-8].s, yyvsp[-7].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, class, style, yyvsp[-1].il); if (yyvsp[0].rcdata_item != NULL) @@ -2248,8 +2289,8 @@ } } break; -case 110: -#line 797 "rcparse.y" +case 111: +#line 855 "rcparse.y" { yyval.dialog_control = define_control (yyvsp[-9].s, yyvsp[-8].il, yyvsp[-7].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, class, style, yyvsp[-2].il); if (dialog.ex == NULL) @@ -2258,80 +2299,89 @@ yyval.dialog_control->data = yyvsp[0].rcdata_item; } break; -case 111: -#line 808 "rcparse.y" +case 112: +#line 866 "rcparse.y" { yyval.s = NULL; } break; -case 112: -#line 812 "rcparse.y" +case 113: +#line 870 "rcparse.y" { yyval.s = yyvsp[0].s; } break; -case 113: -#line 816 "rcparse.y" +case 114: +#line 874 "rcparse.y" { yyval.s = yyvsp[-1].s; } break; -case 114: -#line 823 "rcparse.y" +case 115: +#line 881 "rcparse.y" { yyval.rcdata_item = NULL; } break; -case 115: -#line 827 "rcparse.y" +case 116: +#line 885 "rcparse.y" { yyval.rcdata_item = yyvsp[-1].rcdata.first; } break; -case 116: -#line 836 "rcparse.y" +case 117: +#line 894 "rcparse.y" { style = WS_CHILD | WS_VISIBLE; } break; -case 118: -#line 842 "rcparse.y" +case 119: +#line 900 "rcparse.y" { style = SS_ICON | WS_CHILD | WS_VISIBLE; } break; -case 120: -#line 848 "rcparse.y" +case 121: +#line 906 "rcparse.y" { style = base_style | WS_CHILD | WS_VISIBLE; } break; -case 122: -#line 856 "rcparse.y" +case 123: +#line 914 "rcparse.y" { define_font (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 123: -#line 865 "rcparse.y" +case 124: +#line 926 "rcparse.y" { define_icon (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 124: -#line 875 "rcparse.y" +case 125: +#line 939 "rcparse.y" { language = yyvsp[-1].il | (yyvsp[0].il << SUBLANG_SHIFT); } break; -case 125: -#line 884 "rcparse.y" +case 126: +#line 948 "rcparse.y" { define_menu (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].menuitem); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 126: -#line 891 "rcparse.y" +case 127: +#line 958 "rcparse.y" { yyval.menuitem = NULL; } break; -case 127: -#line 895 "rcparse.y" +case 128: +#line 962 "rcparse.y" { if (yyvsp[-1].menuitem == NULL) yyval.menuitem = yyvsp[0].menuitem; @@ -2346,92 +2396,95 @@ } } break; -case 128: -#line 912 "rcparse.y" +case 129: +#line 979 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-2].s, yyvsp[-1].il, yyvsp[0].is, 0, 0, NULL); } break; -case 129: -#line 916 "rcparse.y" +case 130: +#line 983 "rcparse.y" { yyval.menuitem = define_menuitem (NULL, 0, 0, 0, 0, NULL); } break; -case 130: -#line 920 "rcparse.y" +case 131: +#line 987 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-4].s, 0, yyvsp[-3].is, 0, 0, yyvsp[-1].menuitem); } break; -case 131: -#line 927 "rcparse.y" +case 132: +#line 994 "rcparse.y" { yyval.is = 0; } break; -case 132: -#line 931 "rcparse.y" +case 133: +#line 998 "rcparse.y" { yyval.is = yyvsp[-2].is | yyvsp[0].is; } break; -case 133: -#line 935 "rcparse.y" +case 134: +#line 1002 "rcparse.y" { yyval.is = yyvsp[-1].is | yyvsp[0].is; } break; -case 134: -#line 942 "rcparse.y" +case 135: +#line 1009 "rcparse.y" { yyval.is = MENUITEM_CHECKED; } break; -case 135: -#line 946 "rcparse.y" +case 136: +#line 1013 "rcparse.y" { yyval.is = MENUITEM_GRAYED; } break; -case 136: -#line 950 "rcparse.y" +case 137: +#line 1017 "rcparse.y" { yyval.is = MENUITEM_HELP; } break; -case 137: -#line 954 "rcparse.y" +case 138: +#line 1021 "rcparse.y" { yyval.is = MENUITEM_INACTIVE; } break; -case 138: -#line 958 "rcparse.y" +case 139: +#line 1025 "rcparse.y" { yyval.is = MENUITEM_MENUBARBREAK; } break; -case 139: -#line 962 "rcparse.y" +case 140: +#line 1029 "rcparse.y" { yyval.is = MENUITEM_MENUBREAK; } break; -case 140: -#line 971 "rcparse.y" +case 141: +#line 1038 "rcparse.y" { define_menu (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].menuitem); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 141: -#line 978 "rcparse.y" +case 142: +#line 1048 "rcparse.y" { yyval.menuitem = NULL; } break; -case 142: -#line 982 "rcparse.y" +case 143: +#line 1052 "rcparse.y" { if (yyvsp[-1].menuitem == NULL) yyval.menuitem = yyvsp[0].menuitem; @@ -2446,94 +2499,100 @@ } } break; -case 143: -#line 999 "rcparse.y" +case 144: +#line 1069 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[0].s, 0, 0, 0, 0, NULL); } break; -case 144: -#line 1003 "rcparse.y" +case 145: +#line 1073 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-1].s, yyvsp[0].il, 0, 0, 0, NULL); } break; -case 145: -#line 1007 "rcparse.y" +case 146: +#line 1077 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-3].s, yyvsp[-2].il, yyvsp[-1].il, yyvsp[0].il, 0, NULL); } break; -case 146: -#line 1011 "rcparse.y" +case 147: +#line 1081 "rcparse.y" { yyval.menuitem = define_menuitem (NULL, 0, 0, 0, 0, NULL); } break; -case 147: -#line 1015 "rcparse.y" +case 148: +#line 1085 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-3].s, 0, 0, 0, 0, yyvsp[-1].menuitem); } break; -case 148: -#line 1019 "rcparse.y" +case 149: +#line 1089 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-4].s, yyvsp[-3].il, 0, 0, 0, yyvsp[-1].menuitem); } break; -case 149: -#line 1023 "rcparse.y" +case 150: +#line 1093 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-5].s, yyvsp[-4].il, yyvsp[-3].il, 0, 0, yyvsp[-1].menuitem); } break; -case 150: -#line 1028 "rcparse.y" +case 151: +#line 1098 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-7].s, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-1].menuitem); } break; -case 151: -#line 1037 "rcparse.y" +case 152: +#line 1107 "rcparse.y" { define_messagetable (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 152: -#line 1046 "rcparse.y" +case 153: +#line 1119 "rcparse.y" { define_rcdata (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].rcdata.first); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 153: -#line 1055 "rcparse.y" +case 154: +#line 1131 "rcparse.y" { rcparse_rcdata (); } break; -case 154: -#line 1059 "rcparse.y" +case 155: +#line 1135 "rcparse.y" { rcparse_normal (); yyval.rcdata = yyvsp[0].rcdata; } break; -case 155: -#line 1067 "rcparse.y" +case 156: +#line 1143 "rcparse.y" { yyval.rcdata.first = NULL; yyval.rcdata.last = NULL; } break; -case 156: -#line 1072 "rcparse.y" +case 157: +#line 1148 "rcparse.y" { yyval.rcdata = yyvsp[0].rcdata; } break; -case 157: -#line 1079 "rcparse.y" +case 158: +#line 1155 "rcparse.y" { struct rcdata_item *ri; @@ -2542,8 +2601,8 @@ yyval.rcdata.last = ri; } break; -case 158: -#line 1087 "rcparse.y" +case 159: +#line 1163 "rcparse.y" { struct rcdata_item *ri; @@ -2552,8 +2611,8 @@ yyval.rcdata.last = ri; } break; -case 159: -#line 1095 "rcparse.y" +case 160: +#line 1171 "rcparse.y" { struct rcdata_item *ri; @@ -2563,8 +2622,8 @@ yyval.rcdata.last = ri; } break; -case 160: -#line 1104 "rcparse.y" +case 161: +#line 1180 "rcparse.y" { struct rcdata_item *ri; @@ -2574,150 +2633,165 @@ yyval.rcdata.last = ri; } break; -case 161: -#line 1118 "rcparse.y" +case 162: +#line 1194 "rcparse.y" { sub_res_info = yyvsp[-1].res_info; } break; -case 164: -#line 1125 "rcparse.y" +case 165: +#line 1201 "rcparse.y" { define_stringtable (&sub_res_info, yyvsp[-1].il, yyvsp[0].s); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 165: -#line 1129 "rcparse.y" +case 166: +#line 1208 "rcparse.y" { define_stringtable (&sub_res_info, yyvsp[-2].il, yyvsp[0].s); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 166: -#line 1139 "rcparse.y" +case 167: +#line 1221 "rcparse.y" { define_user_data (yyvsp[-5].id, yyvsp[-4].id, &yyvsp[-3].res_info, yyvsp[-1].rcdata.first); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 167: -#line 1143 "rcparse.y" +case 168: +#line 1228 "rcparse.y" { define_user_file (yyvsp[-3].id, yyvsp[-2].id, &yyvsp[-1].res_info, yyvsp[0].s); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 168: -#line 1152 "rcparse.y" +case 169: +#line 1240 "rcparse.y" { define_versioninfo (yyvsp[-5].id, language, yyvsp[-3].fixver, yyvsp[-1].verinfo); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } break; -case 169: -#line 1159 "rcparse.y" +case 170: +#line 1250 "rcparse.y" { yyval.fixver = ((struct fixed_versioninfo *) res_alloc (sizeof (struct fixed_versioninfo))); memset (yyval.fixver, 0, sizeof (struct fixed_versioninfo)); } break; -case 170: -#line 1165 "rcparse.y" +case 171: +#line 1256 "rcparse.y" { yyvsp[-5].fixver->file_version_ms = (yyvsp[-3].il << 16) | yyvsp[-2].il; yyvsp[-5].fixver->file_version_ls = (yyvsp[-1].il << 16) | yyvsp[0].il; yyval.fixver = yyvsp[-5].fixver; } break; -case 171: -#line 1171 "rcparse.y" +case 172: +#line 1262 "rcparse.y" { yyvsp[-5].fixver->product_version_ms = (yyvsp[-3].il << 16) | yyvsp[-2].il; yyvsp[-5].fixver->product_version_ls = (yyvsp[-1].il << 16) | yyvsp[0].il; yyval.fixver = yyvsp[-5].fixver; } break; -case 172: -#line 1177 "rcparse.y" +case 173: +#line 1268 "rcparse.y" { yyvsp[-2].fixver->file_flags_mask = yyvsp[0].il; yyval.fixver = yyvsp[-2].fixver; } break; -case 173: -#line 1182 "rcparse.y" +case 174: +#line 1273 "rcparse.y" { yyvsp[-2].fixver->file_flags = yyvsp[0].il; yyval.fixver = yyvsp[-2].fixver; } break; -case 174: -#line 1187 "rcparse.y" +case 175: +#line 1278 "rcparse.y" { yyvsp[-2].fixver->file_os = yyvsp[0].il; yyval.fixver = yyvsp[-2].fixver; } break; -case 175: -#line 1192 "rcparse.y" +case 176: +#line 1283 "rcparse.y" { yyvsp[-2].fixver->file_type = yyvsp[0].il; yyval.fixver = yyvsp[-2].fixver; } break; -case 176: -#line 1197 "rcparse.y" +case 177: +#line 1288 "rcparse.y" { yyvsp[-2].fixver->file_subtype = yyvsp[0].il; yyval.fixver = yyvsp[-2].fixver; } break; -case 177: -#line 1211 "rcparse.y" +case 178: +#line 1302 "rcparse.y" { yyval.verinfo = NULL; } break; -case 178: -#line 1215 "rcparse.y" +case 179: +#line 1306 "rcparse.y" { yyval.verinfo = append_ver_stringfileinfo (yyvsp[-7].verinfo, yyvsp[-4].s, yyvsp[-2].verstring); } break; -case 179: -#line 1219 "rcparse.y" +case 180: +#line 1310 "rcparse.y" { yyval.verinfo = append_ver_varfileinfo (yyvsp[-6].verinfo, yyvsp[-2].s, yyvsp[-1].vervar); } break; -case 180: -#line 1226 "rcparse.y" +case 181: +#line 1317 "rcparse.y" { yyval.verstring = NULL; } break; -case 181: -#line 1230 "rcparse.y" +case 182: +#line 1321 "rcparse.y" { yyval.verstring = append_verval (yyvsp[-4].verstring, yyvsp[-2].s, yyvsp[0].s); } break; -case 182: -#line 1237 "rcparse.y" +case 183: +#line 1328 "rcparse.y" { yyval.vervar = NULL; } break; -case 183: -#line 1241 "rcparse.y" +case 184: +#line 1332 "rcparse.y" { yyval.vervar = append_vertrans (yyvsp[-2].vervar, yyvsp[-1].il, yyvsp[0].il); } break; -case 184: -#line 1250 "rcparse.y" +case 185: +#line 1341 "rcparse.y" { yyval.id.named = 0; yyval.id.u.id = yyvsp[0].il; } break; -case 185: -#line 1255 "rcparse.y" +case 186: +#line 1346 "rcparse.y" { char *copy, *s; @@ -2729,33 +2803,33 @@ free (copy); } break; -case 186: -#line 1271 "rcparse.y" +case 187: +#line 1362 "rcparse.y" { yyval.s = yyvsp[0].s; } break; -case 187: -#line 1275 "rcparse.y" +case 188: +#line 1366 "rcparse.y" { yyval.s = yyvsp[-1].s; } break; -case 188: -#line 1279 "rcparse.y" +case 189: +#line 1370 "rcparse.y" { yyval.s = yyvsp[-1].s; } break; -case 189: -#line 1287 "rcparse.y" +case 190: +#line 1378 "rcparse.y" { yyval.id.named = 0; yyval.id.u.id = yyvsp[-1].il; } break; -case 190: -#line 1292 "rcparse.y" +case 191: +#line 1383 "rcparse.y" { char *copy, *s; @@ -2767,361 +2841,361 @@ free (copy); } break; -case 191: -#line 1309 "rcparse.y" +case 192: +#line 1400 "rcparse.y" { memset (&yyval.res_info, 0, sizeof (struct res_res_info)); yyval.res_info.language = language; /* FIXME: Is this the right default? */ - yyval.res_info.memflags = MEMFLAG_MOVEABLE; + yyval.res_info.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE; } break; -case 192: -#line 1316 "rcparse.y" +case 193: +#line 1407 "rcparse.y" { yyval.res_info = yyvsp[-1].res_info; yyval.res_info.memflags |= yyvsp[0].memflags.on; yyval.res_info.memflags &=~ yyvsp[0].memflags.off; } break; -case 193: -#line 1322 "rcparse.y" +case 194: +#line 1413 "rcparse.y" { yyval.res_info = yyvsp[-2].res_info; yyval.res_info.characteristics = yyvsp[0].il; } break; -case 194: -#line 1327 "rcparse.y" +case 195: +#line 1418 "rcparse.y" { yyval.res_info = yyvsp[-3].res_info; yyval.res_info.language = yyvsp[-1].il | (yyvsp[0].il << SUBLANG_SHIFT); } break; -case 195: -#line 1332 "rcparse.y" +case 196: +#line 1423 "rcparse.y" { yyval.res_info = yyvsp[-2].res_info; yyval.res_info.version = yyvsp[0].il; } break; -case 196: -#line 1342 "rcparse.y" +case 197: +#line 1433 "rcparse.y" { memset (&yyval.res_info, 0, sizeof (struct res_res_info)); yyval.res_info.language = language; yyval.res_info.memflags = MEMFLAG_MOVEABLE | MEMFLAG_DISCARDABLE; } break; -case 197: -#line 1348 "rcparse.y" +case 198: +#line 1439 "rcparse.y" { yyval.res_info = yyvsp[-1].res_info; yyval.res_info.memflags |= yyvsp[0].memflags.on; yyval.res_info.memflags &=~ yyvsp[0].memflags.off; } break; -case 198: -#line 1359 "rcparse.y" +case 199: +#line 1450 "rcparse.y" { memset (&yyval.res_info, 0, sizeof (struct res_res_info)); yyval.res_info.language = language; - yyval.res_info.memflags = MEMFLAG_MOVEABLE; + yyval.res_info.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE; } break; -case 199: -#line 1365 "rcparse.y" +case 200: +#line 1456 "rcparse.y" { yyval.res_info = yyvsp[-1].res_info; yyval.res_info.memflags |= yyvsp[0].memflags.on; yyval.res_info.memflags &=~ yyvsp[0].memflags.off; } break; -case 200: -#line 1377 "rcparse.y" +case 201: +#line 1468 "rcparse.y" { yyval.memflags.on = MEMFLAG_MOVEABLE; yyval.memflags.off = 0; } break; -case 201: -#line 1382 "rcparse.y" +case 202: +#line 1473 "rcparse.y" { yyval.memflags.on = 0; yyval.memflags.off = MEMFLAG_MOVEABLE; } break; -case 202: -#line 1387 "rcparse.y" +case 203: +#line 1478 "rcparse.y" { yyval.memflags.on = MEMFLAG_PURE; yyval.memflags.off = 0; } break; -case 203: -#line 1392 "rcparse.y" +case 204: +#line 1483 "rcparse.y" { yyval.memflags.on = 0; yyval.memflags.off = MEMFLAG_PURE; } break; -case 204: -#line 1397 "rcparse.y" +case 205: +#line 1488 "rcparse.y" { yyval.memflags.on = MEMFLAG_PRELOAD; yyval.memflags.off = 0; } break; -case 205: -#line 1402 "rcparse.y" +case 206: +#line 1493 "rcparse.y" { yyval.memflags.on = 0; yyval.memflags.off = MEMFLAG_PRELOAD; } break; -case 206: -#line 1407 "rcparse.y" +case 207: +#line 1498 "rcparse.y" { yyval.memflags.on = MEMFLAG_DISCARDABLE; yyval.memflags.off = 0; } break; -case 207: -#line 1417 "rcparse.y" +case 208: +#line 1508 "rcparse.y" { yyval.s = yyvsp[0].s; } break; -case 208: -#line 1421 "rcparse.y" +case 209: +#line 1512 "rcparse.y" { yyval.s = yyvsp[0].s; } break; -case 209: -#line 1438 "rcparse.y" +case 210: +#line 1529 "rcparse.y" { style |= yyvsp[0].il; } break; -case 210: -#line 1442 "rcparse.y" +case 211: +#line 1533 "rcparse.y" { style &=~ yyvsp[0].il; } break; -case 211: -#line 1446 "rcparse.y" +case 212: +#line 1537 "rcparse.y" { style |= yyvsp[0].il; } break; -case 212: -#line 1450 "rcparse.y" +case 213: +#line 1541 "rcparse.y" { style &=~ yyvsp[0].il; } break; -case 213: -#line 1457 "rcparse.y" +case 214: +#line 1548 "rcparse.y" { yyval.il = yyvsp[0].i.val; } break; -case 214: -#line 1461 "rcparse.y" +case 215: +#line 1552 "rcparse.y" { yyval.il = yyvsp[-1].il; } break; -case 215: -#line 1470 "rcparse.y" +case 216: +#line 1561 "rcparse.y" { yyval.il = 0; } break; -case 216: -#line 1474 "rcparse.y" +case 217: +#line 1565 "rcparse.y" { yyval.il = yyvsp[0].il; } break; -case 217: -#line 1483 "rcparse.y" +case 218: +#line 1574 "rcparse.y" { yyval.il = yyvsp[0].il; } break; -case 218: -#line 1492 "rcparse.y" +case 219: +#line 1583 "rcparse.y" { yyval.il = yyvsp[0].i.val; } break; -case 219: -#line 1501 "rcparse.y" +case 220: +#line 1592 "rcparse.y" { yyval.i = yyvsp[0].i; } break; -case 220: -#line 1505 "rcparse.y" +case 221: +#line 1596 "rcparse.y" { yyval.i = yyvsp[-1].i; } break; -case 221: -#line 1509 "rcparse.y" +case 222: +#line 1600 "rcparse.y" { yyval.i.val = ~ yyvsp[0].i.val; yyval.i.dword = yyvsp[0].i.dword; } break; -case 222: -#line 1514 "rcparse.y" +case 223: +#line 1605 "rcparse.y" { yyval.i.val = - yyvsp[0].i.val; yyval.i.dword = yyvsp[0].i.dword; } break; -case 223: -#line 1519 "rcparse.y" +case 224: +#line 1610 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val * yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; } break; -case 224: -#line 1524 "rcparse.y" +case 225: +#line 1615 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val / yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; } break; -case 225: -#line 1529 "rcparse.y" +case 226: +#line 1620 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val % yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; } break; -case 226: -#line 1534 "rcparse.y" +case 227: +#line 1625 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val + yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; } break; -case 227: -#line 1539 "rcparse.y" +case 228: +#line 1630 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val - yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; } break; -case 228: -#line 1544 "rcparse.y" +case 229: +#line 1635 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val & yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; } break; -case 229: -#line 1549 "rcparse.y" +case 230: +#line 1640 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val ^ yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; } break; -case 230: -#line 1554 "rcparse.y" +case 231: +#line 1645 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val | yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; } break; -case 231: -#line 1565 "rcparse.y" +case 232: +#line 1656 "rcparse.y" { yyval.il = yyvsp[0].il; } break; -case 232: -#line 1574 "rcparse.y" +case 233: +#line 1665 "rcparse.y" { yyval.il = yyvsp[0].i.val; } break; -case 233: -#line 1585 "rcparse.y" +case 234: +#line 1676 "rcparse.y" { yyval.i = yyvsp[0].i; } break; -case 234: -#line 1589 "rcparse.y" +case 235: +#line 1680 "rcparse.y" { yyval.i = yyvsp[-1].i; } break; -case 235: -#line 1593 "rcparse.y" +case 236: +#line 1684 "rcparse.y" { yyval.i.val = ~ yyvsp[0].i.val; yyval.i.dword = yyvsp[0].i.dword; } break; -case 236: -#line 1598 "rcparse.y" +case 237: +#line 1689 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val * yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; } break; -case 237: -#line 1603 "rcparse.y" +case 238: +#line 1694 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val / yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; } break; -case 238: -#line 1608 "rcparse.y" +case 239: +#line 1699 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val % yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; } break; -case 239: -#line 1613 "rcparse.y" +case 240: +#line 1704 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val + yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; } break; -case 240: -#line 1618 "rcparse.y" +case 241: +#line 1709 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val - yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; } break; -case 241: -#line 1623 "rcparse.y" +case 242: +#line 1714 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val & yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; } break; -case 242: -#line 1628 "rcparse.y" +case 243: +#line 1719 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val ^ yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; } break; -case 243: -#line 1633 "rcparse.y" +case 244: +#line 1724 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val | yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; @@ -3129,7 +3203,7 @@ break; } -#line 727 "/usr/share/bison/bison.simple" +#line 705 "/usr/share/bison/bison.simple" yyvsp -= yylen; @@ -3360,7 +3434,7 @@ #endif return yyresult; } -#line 1639 "rcparse.y" +#line 1730 "rcparse.y" /* Set the language from the command line. */ diff -Nur binutils-2.12/binutils/rcparse.h binutils-2.12.1/binutils/rcparse.h --- binutils-2.12/binutils/rcparse.h Fri Mar 8 01:15:55 2002 +++ binutils-2.12.1/binutils/rcparse.h Mon May 13 09:14:44 2002 @@ -42,6 +42,7 @@ } ss; } yystype; # define YYSTYPE yystype +# define YYSTYPE_IS_TRIVIAL 1 #endif # define BEG 257 # define END 258 diff -Nur binutils-2.12/binutils/rcparse.y binutils-2.12.1/binutils/rcparse.y --- binutils-2.12/binutils/rcparse.y Wed Sep 19 01:33:16 2001 +++ binutils-2.12.1/binutils/rcparse.y Thu May 9 10:49:19 2002 @@ -1,5 +1,5 @@ %{ /* rcparse.y -- parser for Windows rc files - Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. @@ -153,28 +153,21 @@ input: /* empty */ - | input newcmd accelerator - | input newcmd bitmap - | input newcmd cursor - | input newcmd dialog - | input newcmd font - | input newcmd icon - | input newcmd language - | input newcmd menu - | input newcmd menuex - | input newcmd messagetable - | input newcmd rcdata - | input newcmd stringtable - | input newcmd user - | input newcmd versioninfo - | input newcmd IGNORED_TOKEN - ; - -newcmd: - /* empty */ - { - rcparse_discard_strings (); - } + | input accelerator + | input bitmap + | input cursor + | input dialog + | input font + | input icon + | input language + | input menu + | input menuex + | input messagetable + | input rcdata + | input stringtable + | input user + | input versioninfo + | input IGNORED_TOKEN ; /* Accelerator resources. */ @@ -183,6 +176,9 @@ id ACCELERATORS suboptions BEG acc_entries END { define_accelerator ($1, &$3, $5); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } ; @@ -309,6 +305,9 @@ id BITMAP memflags_move file_name { define_bitmap ($1, &$3, $4); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } ; @@ -318,6 +317,9 @@ id CURSOR memflags_move_discard file_name { define_cursor ($1, &$3, $4); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } ; @@ -340,10 +342,14 @@ dialog.ex = NULL; dialog.controls = NULL; sub_res_info = $3; + style = 0; } styles BEG controls END { define_dialog ($1, &sub_res_info, &dialog); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } | id DIALOGEX memflags_move exstyle posnumexpr cnumexpr cnumexpr cnumexpr @@ -363,10 +369,14 @@ memset (dialog.ex, 0, sizeof (struct dialog_ex)); dialog.controls = NULL; sub_res_info = $3; + style = 0; } styles BEG controls END { define_dialog ($1, &sub_res_info, &dialog); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } | id DIALOGEX memflags_move exstyle posnumexpr cnumexpr cnumexpr cnumexpr cnumexpr @@ -387,10 +397,14 @@ dialog.ex->help = $9; dialog.controls = NULL; sub_res_info = $3; + style = 0; } styles BEG controls END { define_dialog ($1, &sub_res_info, &dialog); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } ; @@ -409,6 +423,8 @@ /* empty */ | styles CAPTION QUOTEDSTRING { + dialog.style |= WS_CAPTION; + style |= WS_CAPTION; unicode_from_ascii ((int *) NULL, &dialog.caption, $3); } | styles CLASS id @@ -416,7 +432,6 @@ dialog.class = $3; } | styles STYLE - { style = dialog.style; } styleexpr { dialog.style = style; @@ -425,15 +440,57 @@ { dialog.exstyle = $3; } + | styles CLASS QUOTEDSTRING + { + res_string_to_id (& dialog.class, $3); + } | styles FONT numexpr ',' QUOTEDSTRING { dialog.style |= DS_SETFONT; + style |= DS_SETFONT; dialog.pointsize = $3; unicode_from_ascii ((int *) NULL, &dialog.font, $5); + if (dialog.ex != NULL) + { + dialog.ex->weight = 0; + dialog.ex->italic = 0; + dialog.ex->charset = 1; + } + } + | styles FONT numexpr ',' QUOTEDSTRING cnumexpr + { + dialog.style |= DS_SETFONT; + style |= DS_SETFONT; + dialog.pointsize = $3; + unicode_from_ascii ((int *) NULL, &dialog.font, $5); + if (dialog.ex == NULL) + rcparse_warning (_("extended FONT requires DIALOGEX")); + else + { + dialog.ex->weight = $6; + dialog.ex->italic = 0; + dialog.ex->charset = 1; + } } | styles FONT numexpr ',' QUOTEDSTRING cnumexpr cnumexpr { dialog.style |= DS_SETFONT; + style |= DS_SETFONT; + dialog.pointsize = $3; + unicode_from_ascii ((int *) NULL, &dialog.font, $5); + if (dialog.ex == NULL) + rcparse_warning (_("extended FONT requires DIALOGEX")); + else + { + dialog.ex->weight = $6; + dialog.ex->italic = $7; + dialog.ex->charset = 1; + } + } + | styles FONT numexpr ',' QUOTEDSTRING cnumexpr cnumexpr cnumexpr + { + dialog.style |= DS_SETFONT; + style |= DS_SETFONT; dialog.pointsize = $3; unicode_from_ascii ((int *) NULL, &dialog.font, $5); if (dialog.ex == NULL) @@ -442,6 +499,7 @@ { dialog.ex->weight = $6; dialog.ex->italic = $7; + dialog.ex->charset = $8; } } | styles MENU id @@ -515,7 +573,7 @@ { $$ = $3; if (dialog.ex == NULL) - rcparse_warning (_("IEDIT requires DIALOGEX")); + rcparse_warning (_("BEDIT requires DIALOGEX")); res_string_to_id (&$$->class, "BEDIT"); } | CHECKBOX @@ -569,7 +627,7 @@ $$->data = $12; } $$->class.named = 1; - unicode_from_ascii(&$$->class.u.n.length, &$$->class.u.n.name, $5); + unicode_from_ascii (&$$->class.u.n.length, &$$->class.u.n.name, $5); } | CONTROL optstringc numexpr ',' QUOTEDSTRING control_styleexpr cnumexpr cnumexpr cnumexpr cnumexpr cnumexpr cnumexpr opt_control_data @@ -580,7 +638,7 @@ $$->help = $12; $$->data = $13; $$->class.named = 1; - unicode_from_ascii(&$$->class.u.n.length, &$$->class.u.n.name, $5); + unicode_from_ascii (&$$->class.u.n.length, &$$->class.u.n.name, $5); } | CTEXT { @@ -855,6 +913,9 @@ id FONT memflags_move_discard file_name { define_font ($1, &$3, $4); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } ; @@ -864,6 +925,9 @@ id ICON memflags_move_discard file_name { define_icon ($1, &$3, $4); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } ; @@ -883,6 +947,9 @@ id MENU suboptions BEG menuitems END { define_menu ($1, &$3, $5); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } ; @@ -970,6 +1037,9 @@ id MENUEX suboptions BEG menuexitems END { define_menu ($1, &$3, $5); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } ; @@ -1036,6 +1106,9 @@ id MESSAGETABLE memflags_move file_name { define_messagetable ($1, &$3, $4); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } ; @@ -1045,6 +1118,9 @@ id RCDATA suboptions BEG optrcdata_data END { define_rcdata ($1, &$3, $5.first); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } ; @@ -1124,10 +1200,16 @@ | string_data numexpr QUOTEDSTRING { define_stringtable (&sub_res_info, $2, $3); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } | string_data numexpr ',' QUOTEDSTRING { define_stringtable (&sub_res_info, $2, $4); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } ; @@ -1138,10 +1220,16 @@ id id suboptions BEG optrcdata_data END { define_user_data ($1, $2, &$3, $5.first); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } | id id suboptions file_name { define_user_file ($1, $2, &$3, $4); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } ; @@ -1151,6 +1239,9 @@ id VERSIONINFO fixedverinfo BEG verblocks END { define_versioninfo ($1, language, $3, $5); + if (yychar != YYEMPTY) + YYERROR; + rcparse_discard_strings (); } ; @@ -1310,7 +1401,7 @@ memset (&$$, 0, sizeof (struct res_res_info)); $$.language = language; /* FIXME: Is this the right default? */ - $$.memflags = MEMFLAG_MOVEABLE; + $$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE; } | suboptions memflag { @@ -1359,7 +1450,7 @@ { memset (&$$, 0, sizeof (struct res_res_info)); $$.language = language; - $$.memflags = MEMFLAG_MOVEABLE; + $$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE; } | memflags_move memflag { diff -Nur binutils-2.12/binutils/readelf.c binutils-2.12.1/binutils/readelf.c --- binutils-2.12/binutils/readelf.c Wed Feb 13 14:16:42 2002 +++ binutils-2.12.1/binutils/readelf.c Thu May 9 10:49:20 2002 @@ -127,6 +127,7 @@ int do_debug_frames_interp; int do_debug_macinfo; int do_debug_str; +int do_debug_loc; int do_arch; int do_notes; int is_32bit_elf; @@ -227,10 +228,13 @@ static int display_debug_frames PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *)); static int display_debug_macinfo PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *)); static int display_debug_str PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *)); +static int display_debug_loc PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *)); static unsigned char * process_abbrev_section PARAMS ((unsigned char *, unsigned char *)); static void load_debug_str PARAMS ((FILE *)); static void free_debug_str PARAMS ((void)); static const char * fetch_indirect_string PARAMS ((unsigned long)); +static void load_debug_loc PARAMS ((FILE *)); +static void free_debug_loc PARAMS ((void)); static unsigned long read_leb128 PARAMS ((unsigned char *, int *, int)); static int process_extended_line_op PARAMS ((unsigned char *, int, int)); static void reset_state_machine PARAMS ((int)); @@ -845,29 +849,49 @@ if (is_32bit_elf) { if (is_rela) - printf - (_(" Offset Info Type Symbol's Value Symbol's Name Addend\n")); + { + if (do_wide) + printf (_(" Offset Info Type Sym. Value Symbol's Name + Addend\n")); + else + printf (_(" Offset Info Type Sym.Value Sym. Name + Addend\n")); + } else - printf - (_(" Offset Info Type Symbol's Value Symbol's Name\n")); + { + if (do_wide) + printf (_(" Offset Info Type Sym. Value Symbol's Name\n")); + else + printf (_(" Offset Info Type Sym.Value Sym. Name\n")); + } } else { if (is_rela) - printf - (_(" Offset Info Type Symbol's Value Symbol's Name Addend\n")); + { + if (do_wide) + printf (_(" Offset Info Type Symbol's Value Symbol's Name + Addend\n")); + else + printf (_(" Offset Info Type Sym. Value Sym. Name + Addend\n")); + } else - printf - (_(" Offset Info Type Symbol's Value Symbol's Name\n")); + { + if (do_wide) + printf (_(" Offset Info Type Symbol's Value Symbol's Name\n")); + else + printf (_(" Offset Info Type Sym. Value Sym. Name\n")); + } } for (i = 0; i < rel_size; i++) { const char * rtype; + const char * rtype2 = NULL; + const char * rtype3 = NULL; bfd_vma offset; bfd_vma info; bfd_vma symtab_index; bfd_vma type; + bfd_vma type2 = (bfd_vma) NULL; + bfd_vma type3 = (bfd_vma) NULL; if (is_rela) { @@ -887,10 +911,16 @@ } else { - if (elf_header.e_machine == EM_SPARCV9) - type = ELF64_R_TYPE_ID (info); + if (elf_header.e_machine == EM_MIPS) + { + type = ELF64_MIPS_R_TYPE (info); + type2 = ELF64_MIPS_R_TYPE2 (info); + type3 = ELF64_MIPS_R_TYPE3 (info); + } + else if (elf_header.e_machine == EM_SPARCV9) + type = ELF64_R_TYPE_ID (info); else - type = ELF64_R_TYPE (info); + type = ELF64_R_TYPE (info); /* The #ifdef BFD64 below is to prevent a compile time warning. We know that if we do not have a 64 bit data type that we will never execute this code anyway. */ @@ -910,13 +940,18 @@ else { #ifdef _bfd_int64_low - printf ("%8.8lx%8.8lx %8.8lx%8.8lx ", + printf (do_wide + ? "%8.8lx%8.8lx %8.8lx%8.8lx " + : "%4.4lx%8.8lx %4.4lx%8.8lx ", _bfd_int64_high (offset), _bfd_int64_low (offset), _bfd_int64_high (info), _bfd_int64_low (info)); #else - printf ("%16.16lx %16.16lx ", offset, info); + printf (do_wide + ? "%16.16lx %16.16lx " + : "%12.12lx %12.12lx ", + offset, info); #endif } @@ -1006,6 +1041,11 @@ case EM_MIPS: case EM_MIPS_RS3_LE: rtype = elf_mips_reloc_type (type); + if (!is_32bit_elf) + { + rtype2 = elf_mips_reloc_type (type2); + rtype3 = elf_mips_reloc_type (type3); + } break; case EM_ALPHA: @@ -1067,12 +1107,12 @@ if (rtype == NULL) #ifdef _bfd_int64_low - printf (_("unrecognised: %-7lx"), _bfd_int64_low (type)); + printf (_("unrecognized: %-7lx"), _bfd_int64_low (type)); #else - printf (_("unrecognised: %-7lx"), type); + printf (_("unrecognized: %-7lx"), type); #endif else - printf ("%-21.21s", rtype); + printf (do_wide ? "%-21.21s" : "%-17.17s", rtype); if (symtab_index) { @@ -1086,14 +1126,14 @@ printf (" "); print_vma (psym->st_value, LONG_HEX); - printf (" "); + printf (is_32bit_elf ? " " : " "); if (psym->st_name == 0) - print_symbol (-25, SECTION_NAME (section_headers + psym->st_shndx)); + print_symbol (22, SECTION_NAME (section_headers + psym->st_shndx)); else if (strtab == NULL) printf (_(""), psym->st_name); else - print_symbol (-25, strtab + psym->st_name); + print_symbol (22, strtab + psym->st_name); if (is_rela) printf (" + %lx", (unsigned long) relas [i].r_addend); @@ -1101,7 +1141,7 @@ } else if (is_rela) { - printf ("%*c", is_32bit_elf ? 34 : 26, ' '); + printf ("%*c", is_32bit_elf ? (do_wide ? 34 : 28) : (do_wide ? 26 : 20), ' '); print_vma (relas[i].r_addend, LONG_HEX); } @@ -1110,6 +1150,33 @@ printf (" + %lx", (unsigned long) ELF64_R_TYPE_DATA (info)); putchar ('\n'); + + if (! is_32bit_elf && elf_header.e_machine == EM_MIPS) + { + printf (" Type2: "); + + if (rtype2 == NULL) +#ifdef _bfd_int64_low + printf (_("unrecognized: %-7lx"), _bfd_int64_low (type2)); +#else + printf (_("unrecognized: %-7lx"), type2); +#endif + else + printf ("%-17.17s", rtype2); + + printf("\n Type3: "); + + if (rtype3 == NULL) +#ifdef _bfd_int64_low + printf (_("unrecognized: %-7lx"), _bfd_int64_low (type3)); +#else + printf (_("unrecognized: %-7lx"), type3); +#endif + else + printf ("%-17.17s", rtype3); + + putchar ('\n'); + } } if (is_rela) @@ -1504,7 +1571,7 @@ switch (eabi) { default: - strcat (buf, ", "); + strcat (buf, ", "); if (e_flags) unknown = 1; break; @@ -2185,7 +2252,7 @@ -A --arch-specific Display architecture specific information (if any).\n\ -D --use-dynamic Use the dynamic section info when displaying symbols\n\ -x --hex-dump= Dump the contents of section \n\ - -w --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str]\n\ + -w --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str,=loc]\n\ Display the contents of DWARF2 debug sections\n")); #ifdef SUPPORT_DISASSEMBLY fprintf (stdout, _("\ @@ -2372,8 +2439,13 @@ do_debug_str = 1; break; + case 'o': + case 'O': + do_debug_loc = 1; + break; + default: - warn (_("Unrecognised debug option '%s'\n"), optarg); + warn (_("Unrecognized debug option '%s'\n"), optarg); break; } } @@ -3238,7 +3310,8 @@ } else if ((do_debugging || do_debug_info || do_debug_abbrevs || do_debug_lines || do_debug_pubnames || do_debug_aranges - || do_debug_frames || do_debug_macinfo || do_debug_str) + || do_debug_frames || do_debug_macinfo || do_debug_str + || do_debug_loc) && strncmp (name, ".debug_", 7) == 0) { name += 7; @@ -3252,6 +3325,7 @@ || (do_debug_frames && (strcmp (name, "frame") == 0)) || (do_debug_macinfo && (strcmp (name, "macinfo") == 0)) || (do_debug_str && (strcmp (name, "str") == 0)) + || (do_debug_loc && (strcmp (name, "loc") == 0)) ) request_dump (i, DEBUG_DUMP); } @@ -6455,6 +6529,7 @@ case DW_AT_src_coords: return "DW_AT_src_coords"; case DW_AT_body_begin: return "DW_AT_body_begin"; case DW_AT_body_end: return "DW_AT_body_end"; + case DW_AT_GNU_vector: return "DW_AT_GNU_vector"; default: { static char buffer [100]; @@ -7124,6 +7199,112 @@ } } +static const char * debug_loc_contents; +static bfd_vma debug_loc_size; + +static void +load_debug_loc (file) + FILE * file; +{ + Elf32_Internal_Shdr * sec; + unsigned int i; + + /* If it is already loaded, do nothing. */ + if (debug_loc_contents != NULL) + return; + + /* Locate the .debug_loc section. */ + for (i = 0, sec = section_headers; + i < elf_header.e_shnum; + i ++, sec ++) + if (strcmp (SECTION_NAME (sec), ".debug_loc") == 0) + break; + + if (i == elf_header.e_shnum || sec->sh_size == 0) + return; + + debug_loc_size = sec->sh_size; + + debug_loc_contents = ((char *) + get_data (NULL, file, sec->sh_offset, sec->sh_size, + _("debug_loc section data"))); +} + +static void +free_debug_loc () +{ + if (debug_loc_contents == NULL) + return; + + free ((char *) debug_loc_contents); + debug_loc_contents = NULL; + debug_loc_size = 0; +} + + +static int +display_debug_loc (section, start, file) + Elf32_Internal_Shdr * section; + unsigned char * start; + FILE * file ATTRIBUTE_UNUSED; +{ + unsigned char *section_end; + unsigned long bytes; + unsigned char *section_begin = start; + bfd_vma addr; + + addr = section->sh_addr; + bytes = section->sh_size; + section_end = start + bytes; + if (bytes == 0) + { + printf (_("\nThe .debug_loc section is empty.\n")); + return 0; + } + printf (_("Contents of the .debug_loc section:\n\n")); + printf (_("\n Offset Begin End Expression\n")); + while (start < section_end) + { + unsigned long begin; + unsigned long end; + unsigned short length; + unsigned long offset; + + offset = start - section_begin; + + while (1) + { + /* Normally, the lists in the debug_loc section are related to a + given compilation unit, and thus, we would use the + pointer size of that compilation unit. However, since we are + displaying it seperately here, we either have to store + pointer sizes of all compilation units, or assume they don't + change. We assume, like the debug_line display, that + it doesn't change. */ + begin = byte_get (start, debug_line_pointer_size); + start += debug_line_pointer_size; + end = byte_get (start, debug_line_pointer_size); + start += debug_line_pointer_size; + + if (begin == 0 && end == 0) + break; + + begin += addr; + end += addr; + + length = byte_get (start, 2); + start += 2; + + printf (" %8.8lx %8.8lx %8.8lx (", offset, begin, end); + decode_location_expression (start, debug_line_pointer_size, length); + printf (")\n"); + + start += length; + } + printf ("\n"); + } + return 1; +} static const char * debug_str_contents; static bfd_vma debug_str_size; @@ -7379,7 +7560,7 @@ break; default: - warn (_("Unrecognised form: %d\n"), form); + warn (_("Unrecognized form: %d\n"), form); break; } @@ -7528,6 +7709,12 @@ decode_location_expression (block_start, pointer_size, uvalue); printf (")"); } + else if (form == DW_FORM_data4) + { + printf ("("); + printf ("location list"); + printf (")"); + } break; default: @@ -7564,6 +7751,7 @@ printf (_("The section %s contains:\n\n"), SECTION_NAME (section)); load_debug_str (file); + load_debug_loc (file); while (start < end) { @@ -7748,6 +7936,7 @@ } free_debug_str (); + free_debug_loc (); printf ("\n"); @@ -8559,7 +8748,7 @@ { ".eh_frame", display_debug_frames, NULL }, { ".debug_macinfo", display_debug_macinfo, NULL }, { ".debug_str", display_debug_str, NULL }, - + { ".debug_loc", display_debug_loc, NULL }, { ".debug_pubtypes", display_debug_not_supported, NULL }, { ".debug_ranges", display_debug_not_supported, NULL }, { ".debug_static_func", display_debug_not_supported, NULL }, @@ -8602,7 +8791,7 @@ } if (i == -1) - printf (_("Unrecognised debug section: %s\n"), name); + printf (_("Unrecognized debug section: %s\n"), name); free (start); @@ -9240,6 +9429,7 @@ while (external < (Elf_External_Note *)((char *) pnotes + length)) { + Elf_External_Note * next; Elf32_Internal_Note inote; char * temp = NULL; @@ -9250,7 +9440,18 @@ inote.descdata = inote.namedata + align_power (inote.namesz, 2); inote.descpos = offset + (inote.descdata - (char *) pnotes); - external = (Elf_External_Note *)(inote.descdata + align_power (inote.descsz, 2)); + next = (Elf_External_Note *)(inote.descdata + align_power (inote.descsz, 2)); + + if (((char *) next) > (((char *) pnotes) + length)) + { + warn (_("corrupt note found at offset %x into core notes\n"), + ((char *) external) - ((char *) pnotes)); + warn (_(" type: %x, namesize: %08lx, descsize: %08lx\n"), + inote.type, inote.namesz, inote.descsz); + break; + } + + external = next; /* Verify that name is null terminated. It appears that at least one version of Linux (RedHat 6.0) generates corefiles that don't diff -Nur binutils-2.12/binutils/resbin.c binutils-2.12.1/binutils/resbin.c --- binutils-2.12/binutils/resbin.c Tue Mar 13 01:43:58 2001 +++ binutils-2.12.1/binutils/resbin.c Thu May 9 10:49:20 2002 @@ -1,5 +1,5 @@ /* resbin.c -- manipulate the Windows binary resource format. - Copyright 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright 1997, 1998, 1999, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. @@ -30,6 +30,7 @@ /* Macros to swap in values. */ +#define get_8(s) (*((unsigned char *)(s))) #define get_16(be, s) ((be) ? bfd_getb16 (s) : bfd_getl16 (s)) #define get_32(be, s) ((be) ? bfd_getb32 (s) : bfd_getl32 (s)) @@ -68,6 +69,9 @@ PARAMS ((const unsigned char *, unsigned long, int)); static struct res_resource *bin_to_res_userdata PARAMS ((const unsigned char *, unsigned long, int)); +static void get_version_header + PARAMS ((const unsigned char *, unsigned long, int, const char *, + unichar **, int *, int *, int *, int *)); /* Given a resource type ID, a pointer to data, a length, return a res_resource structure which represents that resource. The caller @@ -460,7 +464,7 @@ unsigned long length; int big_endian; { - int version; + int signature; struct dialog *d; int c, sublen, i; unsigned int off; @@ -472,8 +476,8 @@ d = (struct dialog *) res_alloc (sizeof *d); - version = get_16 (big_endian, data); - if (version != 1) + signature = get_16 (big_endian, data + 2); + if (signature != 0xffff) { d->ex = NULL; d->style = get_32 (big_endian, data); @@ -482,11 +486,11 @@ } else { - int signature; + int version; - signature = get_16 (big_endian, data + 2); - if (signature != 0xffff) - fatal (_("unexpected dialog signature %d"), signature); + version = get_16 (big_endian, data); + if (version != 1) + fatal (_("unexpected DIALOGEX version %d"), version); d->ex = (struct dialog_ex *) res_alloc (sizeof (struct dialog_ex)); d->ex->help = get_32 (big_endian, data + 4); @@ -514,6 +518,8 @@ d->caption = get_unicode (data + off, length - off, big_endian, &sublen); off += sublen * 2 + 2; + if (sublen == 0) + d->caption = NULL; if ((d->style & DS_SETFONT) == 0) { @@ -523,6 +529,7 @@ { d->ex->weight = 0; d->ex->italic = 0; + d->ex->charset = 1; /* Default charset. */ } } else @@ -538,7 +545,8 @@ if (length < off + 4) toosmall (_("dialogex font information")); d->ex->weight = get_16 (big_endian, data + off); - d->ex->italic = get_16 (big_endian, data + off + 2); + d->ex->italic = get_8 (data + off + 2); + d->ex->charset = get_8 (data + off + 3); off += 4; } @@ -808,7 +816,7 @@ bin_to_res_rcdata (data, length, big_endian) const unsigned char *data; unsigned long length; - int big_endian; + int big_endian ATTRIBUTE_UNUSED; { struct rcdata_item *ri; struct res_resource *r; @@ -1019,7 +1027,7 @@ struct res_resource *r; get_version_header (data, length, big_endian, "VS_VERSION_INFO", - (unichar *) NULL, &verlen, &vallen, &type, &off); + (unichar **) NULL, &verlen, &vallen, &type, &off); if ((unsigned int) verlen != length) fatal (_("version length %d does not match resource length %lu"), @@ -1091,7 +1099,7 @@ vi->type = VERINFO_STRING; get_version_header (data, length, big_endian, "StringFileInfo", - (unichar *) NULL, &verlen, &vallen, &type, + (unichar **) NULL, &verlen, &vallen, &type, &off); if (vallen != 0) @@ -1163,7 +1171,7 @@ vi->type = VERINFO_VAR; get_version_header (data, length, big_endian, "VarFileInfo", - (unichar *) NULL, &verlen, &vallen, &type, + (unichar **) NULL, &verlen, &vallen, &type, &off); if (vallen != 0) @@ -1231,7 +1239,7 @@ bin_to_res_userdata (data, length, big_endian) const unsigned char *data; unsigned long length; - int big_endian; + int big_endian ATTRIBUTE_UNUSED; { struct rcdata_item *ri; struct res_resource *r; @@ -1252,6 +1260,7 @@ /* Macros to swap out values. */ +#define put_8(v, s) (*((unsigned char *) (s)) = (unsigned char) (v)) #define put_16(be, v, s) ((be) ? bfd_putb16 ((v), (s)) : bfd_putl16 ((v), (s))) #define put_32(be, v, s) ((be) ? bfd_putb32 ((v), (s)) : bfd_putl32 ((v), (s))) @@ -1621,12 +1630,14 @@ if (dialog->ex == NULL) { put_16 (big_endian, 0, d->data + 2); - put_16 (big_endian, 0, d->data + 4); + put_8 (0, d->data + 4); + put_8 (1, d->data + 5); } else { put_16 (big_endian, dialog->ex->weight, d->data + 2); - put_16 (big_endian, dialog->ex->italic, d->data + 4); + put_8 (dialog->ex->italic, d->data + 4); + put_8 (dialog->ex->charset, d->data + 5); } } diff -Nur binutils-2.12/binutils/resrc.c binutils-2.12.1/binutils/resrc.c --- binutils-2.12/binutils/resrc.c Wed Sep 19 01:33:16 2001 +++ binutils-2.12.1/binutils/resrc.c Thu May 9 10:49:20 2002 @@ -1,5 +1,5 @@ /* resrc.c -- read and write Windows rc files. - Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. @@ -131,7 +131,7 @@ static char *cpp_temp_file; -/* Input stream is either a file or a pipe. */ +/* Input stream is either a file or a pipe. */ static enum {ISTREAM_PIPE, ISTREAM_FILE} istream_type; @@ -173,7 +173,7 @@ PARAMS ((FILE *, unsigned char *, unsigned long, const char *)); static void define_fontdirs PARAMS ((void)); -/* Run `cmd' and redirect the output to `redir'. */ +/* Run `cmd' and redirect the output to `redir'. */ static int run_cmd (cmd, redir) @@ -481,6 +481,7 @@ rcparse_set_language (language); yyin = cpp_pipe; yyparse (); + rcparse_discard_strings (); close_input_stream (); @@ -518,7 +519,7 @@ pclose (cpp_pipe); } - /* Since this is also run via xatexit, safeguard. */ + /* Since this is also run via xatexit, safeguard. */ cpp_pipe = NULL; cpp_temp_file = NULL; } @@ -1580,7 +1581,7 @@ case 2: /* If we're at level 2, the key of this resource is the name - we are going to use in the rc printout. */ + we are going to use in the rc printout. */ name = &re->id; break; @@ -1592,7 +1593,8 @@ && (re->id.u.id & 0xffff) == re->id.u.id) { fprintf (e, "LANGUAGE %lu, %lu\n", - re->id.u.id & 0xff, (re->id.u.id >> 8) & 0xff); + re->id.u.id & ((1 << SUBLANG_SHIFT) - 1), + (re->id.u.id >> SUBLANG_SHIFT) & 0xff); *language = re->id.u.id; } break; @@ -2052,23 +2054,26 @@ { const struct dialog_control *control; - if (dialog->style != 0) - fprintf (e, "STYLE 0x%lx\n", dialog->style); + fprintf (e, "STYLE 0x%lx\n", dialog->style); + if (dialog->exstyle != 0) fprintf (e, "EXSTYLE 0x%lx\n", dialog->exstyle); + if ((dialog->class.named && dialog->class.u.n.length > 0) || dialog->class.u.id != 0) { fprintf (e, "CLASS "); - res_id_print (e, dialog->class, 0); + res_id_print (e, dialog->class, 1); fprintf (e, "\n"); } + if (dialog->caption != NULL) { fprintf (e, "CAPTION \""); unicode_print (e, dialog->caption, -1); fprintf (e, "\"\n"); } + if ((dialog->menu.named && dialog->menu.u.n.length > 0) || dialog->menu.u.id != 0) { @@ -2076,14 +2081,18 @@ res_id_print (e, dialog->menu, 0); fprintf (e, "\n"); } + if (dialog->font != NULL) { fprintf (e, "FONT %d, \"", dialog->pointsize); unicode_print (e, dialog->font, -1); fprintf (e, "\""); if (dialog->ex != NULL - && (dialog->ex->weight != 0 || dialog->ex->italic != 0)) - fprintf (e, ", %d, %d", dialog->ex->weight, dialog->ex->italic); + && (dialog->ex->weight != 0 + || dialog->ex->italic != 0 + || dialog->ex->charset != 1)) + fprintf (e, ", %d, %d, %d", + dialog->ex->weight, dialog->ex->italic, dialog->ex->charset); fprintf (e, "\n"); } diff -Nur binutils-2.12/binutils/size.c binutils-2.12.1/binutils/size.c --- binutils-2.12/binutils/size.c Tue Jan 29 11:46:37 2002 +++ binutils-2.12.1/binutils/size.c Thu May 9 10:49:20 2002 @@ -316,6 +316,7 @@ bfd *file; { bfd *arfile = (bfd *) NULL; + bfd *last_arfile = (bfd *) NULL; for (;;) { @@ -333,8 +334,14 @@ } display_bfd (arfile); - /* Don't close the archive elements; we need them for next_archive. */ + + if (last_arfile != NULL) + bfd_close (last_arfile); + last_arfile = arfile; } + + if (last_arfile != NULL) + bfd_close (last_arfile); } static void diff -Nur binutils-2.12/binutils/testsuite/ChangeLog binutils-2.12.1/binutils/testsuite/ChangeLog --- binutils-2.12/binutils/testsuite/ChangeLog Mon Feb 18 04:19:50 2002 +++ binutils-2.12.1/binutils/testsuite/ChangeLog Thu May 9 10:49:23 2002 @@ -1,3 +1,63 @@ +2002-05-09 Alan Modra + + Merge from mainline. + 2002-04-16 Eric Kohl + * binutils-all/windres/dialog0.rc: New test case: Check default + attributes for dialogs + * binutils-all/windres/dialog0.rsd: New file: Expected output. + * binutils-all/windres/dialog1.rc: New test case: Check + DISCARDABLE flag is propogated. + * binutils-all/windres/dialog1.rsd: New file: Expected output. + + 2002-04-15 Eric Kohl + * binutils-all/windres/dlgfont.rc: New test case: Checks FONT + statement in DIALOG and DIALOGEX resources. + * binutils-all/windres/dlgfont.rsd: Expected output. + + 2002-04-10 Nick Clifton + * binutils-all/windres/capstyle.rsd: Regenerate using MSVC. + * binutils-all/windres/deflang.rsd: Regenerate using MSVC. + * binutils-all/windres/dialogsignature.rsd: Regenerate using MSVC. + * binutils-all/windres/escapea.rsd: Regenerate using MSVC. + * binutils-all/windres/escapex.rsd: Regenerate using MSVC. + * binutils-all/windres/nocaption.rsd: Regenerate using MSVC. + * binutils-all/windres/printstyle.rsd: Regenerate using MSVC. + * binutils-all/windres/sublang.rsd: Regenerate using MSVC. + + 2002-04-09 Nick Clifton + * binutils-all/windres/capstyle.rc: New test case: Set default + style for captions. + * binutils-all/windres/capstyle.rsd: Expected output. + * binutils-all/windres/deflang.rc: New test case: Check default + language. + * binutils-all/windres/deflang.rsd: Expected output. + * binutils-all/windres/dialogsignature.rc: New test case for + decoding the dialog signature. + * binutils-all/windres/dialogsignature.rsd: Expected output. + * binutils-all/windres/escapea.rc: New test case for encoding \a + escape sequence. + * binutils-all/windres/escapea.rsd: Expected output. + * binutils-all/windres/escapex.rc: New test case for hex constants + in strings. + * binutils-all/windres/escapex.rsd: Expected output + * binutils-all/windres/nocaption.rc: New test case dialogs without + captions. + * binutils-all/windres/nocaption.rsd: Expected output + * binutils-all/windres/quoteclass.rc: New test case for quoted + CLASS definitions in DIALOG resources. + * binutils-all/windres/sublang.rc: New test case: Check assignment + of sub-language. + * binutils-all/windres/sublang.rsd: Expected output. + +2002-04-27 Alan Modra + + Merge from mainline. + 2002-02-18 Timothy Daly + * binutils-all/readelf.r: Change expected output to match new, + narrowed-to-80-chars format. + * binutils-all/readelf.r-64: Change expected output to match new, + narrowed-to-80-chars format. + 2002-02-18 Hans-Peter Nilsson * binutils-all/objcopy.exp diff -Nur binutils-2.12/binutils/testsuite/binutils-all/readelf.r binutils-2.12.1/binutils/testsuite/binutils-all/readelf.r --- binutils-2.12/binutils/testsuite/binutils-all/readelf.r Tue Aug 21 11:54:16 2001 +++ binutils-2.12.1/binutils/testsuite/binutils-all/readelf.r Thu May 9 10:49:23 2002 @@ -1,4 +1,4 @@ Relocation section '.rel.*text' at offset 0x.* contains 1 entries: - Offset Info Type Symbol's Value Symbol's Name.* -00000004 [0-9A-Fa-f]+ *R_.*00000000 external_symbol.* + Offset Info Type Sym.Value Sym. Name.* +00000004 [0-9A-Fa-f]+ *R_.*00000000 external_symbol.* diff -Nur binutils-2.12/binutils/testsuite/binutils-all/readelf.r-64 binutils-2.12.1/binutils/testsuite/binutils-all/readelf.r-64 --- binutils-2.12/binutils/testsuite/binutils-all/readelf.r-64 Tue Aug 21 11:54:16 2001 +++ binutils-2.12.1/binutils/testsuite/binutils-all/readelf.r-64 Thu May 9 10:49:23 2002 @@ -1,4 +1,4 @@ Relocation section '.rel.*text' at offset 0x.* contains 1 entries: - Offset Info Type Symbol's Value Symbol's Name.* -0000000000000004 [0-9A-Fa-f]+ *R_.*0000000000000000 external_symbol.* + Offset Info Type Sym. Value Sym. Name.* +0+04 [0-9A-Fa-f]+ *R_.*0+00 external_symbol.* diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/capstyle.rc binutils-2.12.1/binutils/testsuite/binutils-all/windres/capstyle.rc --- binutils-2.12/binutils/testsuite/binutils-all/windres/capstyle.rc Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/capstyle.rc Thu May 9 07:53:28 2002 @@ -0,0 +1,5 @@ +101 DIALOG DISCARDABLE 0, 0, 186, 95 +CAPTION "" +BEGIN + DEFPUSHBUTTON "OK",1,129,7,50,14 +END diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/capstyle.rsd binutils-2.12.1/binutils/testsuite/binutils-all/windres/capstyle.rsd --- binutils-2.12/binutils/testsuite/binutils-all/windres/capstyle.rsd Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/capstyle.rsd Thu May 9 07:53:28 2002 @@ -0,0 +1,8 @@ + 0000 00000000 20000000 ffff0000 ffff0000 .... ........... + 0010 00000000 00000000 00000000 00000000 ................ + 0020 36000000 20000000 ffff0500 ffff6500 6... .........e. + 0030 00000000 30100904 00000000 00000000 ....0........... + 0040 0000c880 00000000 01000000 0000ba00 ................ + 0050 5f000000 00000000 01000150 00000000 _..........P.... + 0060 81000700 32000e00 0100ffff 80004f00 ....2.........O. + 0070 4b000000 00000000 K....... diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/deflang.rc binutils-2.12.1/binutils/testsuite/binutils-all/windres/deflang.rc --- binutils-2.12/binutils/testsuite/binutils-all/windres/deflang.rc Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/deflang.rc Thu May 9 07:53:28 2002 @@ -0,0 +1,4 @@ +101 DIALOG DISCARDABLE 0, 0, 186, 95 +BEGIN + DEFPUSHBUTTON "OK",1,129,7,50,14 +END diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/deflang.rsd binutils-2.12.1/binutils/testsuite/binutils-all/windres/deflang.rsd --- binutils-2.12/binutils/testsuite/binutils-all/windres/deflang.rsd Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/deflang.rsd Thu May 9 07:53:28 2002 @@ -0,0 +1,8 @@ + 0000 00000000 20000000 ffff0000 ffff0000 .... ........... + 0010 00000000 00000000 00000000 00000000 ................ + 0020 36000000 20000000 ffff0500 ffff6500 6... .........e. + 0030 00000000 30100904 00000000 00000000 ....0........... + 0040 00008880 00000000 01000000 0000ba00 ................ + 0050 5f000000 00000000 01000150 00000000 _..........P.... + 0060 81000700 32000e00 0100ffff 80004f00 ....2.........O. + 0070 4b000000 00000000 K....... diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/dialog0.rc binutils-2.12.1/binutils/testsuite/binutils-all/windres/dialog0.rc --- binutils-2.12/binutils/testsuite/binutils-all/windres/dialog0.rc Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/dialog0.rc Thu May 9 07:53:28 2002 @@ -0,0 +1,4 @@ +101 DIALOG 0, 0, 186, 95 +BEGIN + DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14 +END diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/dialog0.rsd binutils-2.12.1/binutils/testsuite/binutils-all/windres/dialog0.rsd --- binutils-2.12/binutils/testsuite/binutils-all/windres/dialog0.rsd Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/dialog0.rsd Thu May 9 07:53:28 2002 @@ -0,0 +1,8 @@ + 0000 00000000 20000000 ffff0000 ffff0000 .... ........... + 0010 00000000 00000000 00000000 00000000 ................ + 0020 36000000 20000000 ffff0500 ffff6500 6... .........e. + 0030 00000000 30100904 00000000 00000000 ....0........... + 0040 00008880 00000000 01000000 0000ba00 ................ + 0050 5f000000 00000000 01000150 00000000 _..........P.... + 0060 81000700 32000e00 0100ffff 80004f00 ....2.........O. + 0070 4b000000 00000000 K....... diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/dialog1.rc binutils-2.12.1/binutils/testsuite/binutils-all/windres/dialog1.rc --- binutils-2.12/binutils/testsuite/binutils-all/windres/dialog1.rc Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/dialog1.rc Thu May 9 07:53:28 2002 @@ -0,0 +1,5 @@ +101 DIALOG DISCARDABLE 0, 0, 186, 95 +BEGIN + DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14 +END + diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/dialog1.rsd binutils-2.12.1/binutils/testsuite/binutils-all/windres/dialog1.rsd --- binutils-2.12/binutils/testsuite/binutils-all/windres/dialog1.rsd Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/dialog1.rsd Thu May 9 07:53:28 2002 @@ -0,0 +1,8 @@ + 0000 00000000 20000000 ffff0000 ffff0000 .... ........... + 0010 00000000 00000000 00000000 00000000 ................ + 0020 36000000 20000000 ffff0500 ffff6500 6... .........e. + 0030 00000000 30100904 00000000 00000000 ....0........... + 0040 00008880 00000000 01000000 0000ba00 ................ + 0050 5f000000 00000000 01000150 00000000 _..........P.... + 0060 81000700 32000e00 0100ffff 80004f00 ....2.........O. + 0070 4b000000 00000000 K....... diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/dialogsignature.rc binutils-2.12.1/binutils/testsuite/binutils-all/windres/dialogsignature.rc --- binutils-2.12/binutils/testsuite/binutils-all/windres/dialogsignature.rc Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/dialogsignature.rc Thu May 9 07:53:28 2002 @@ -0,0 +1,5 @@ +101 DIALOG DISCARDABLE 0, 0, 186, 95 +STYLE 1 +BEGIN + DEFPUSHBUTTON "OK",1,129,7,50,14 +END diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/dialogsignature.rsd binutils-2.12.1/binutils/testsuite/binutils-all/windres/dialogsignature.rsd --- binutils-2.12/binutils/testsuite/binutils-all/windres/dialogsignature.rsd Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/dialogsignature.rsd Thu May 9 07:53:28 2002 @@ -0,0 +1,8 @@ + 0000 00000000 20000000 ffff0000 ffff0000 .... ........... + 0010 00000000 00000000 00000000 00000000 ................ + 0020 36000000 20000000 ffff0500 ffff6500 6... .........e. + 0030 00000000 30100904 00000000 00000000 ....0........... + 0040 01000000 00000000 01000000 0000ba00 ................ + 0050 5f000000 00000000 01000150 00000000 _..........P.... + 0060 81000700 32000e00 0100ffff 80004f00 ....2.........O. + 0070 4b000000 00000000 K....... diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/dlgfont.rc binutils-2.12.1/binutils/testsuite/binutils-all/windres/dlgfont.rc --- binutils-2.12/binutils/testsuite/binutils-all/windres/dlgfont.rc Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/dlgfont.rc Thu May 9 07:53:28 2002 @@ -0,0 +1,29 @@ +101 DIALOG DISCARDABLE 0, 0, 186, 95 +FONT 8, "Tahoma" +BEGIN + DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14 +END + +102 DIALOGEX DISCARDABLE 0, 0, 186, 95 +FONT 8, "Tahoma" +BEGIN + DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14 +END + +103 DIALOGEX DISCARDABLE 0, 0, 186, 95 +FONT 8, "Tahoma", 0 +BEGIN + DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14 +END + +104 DIALOGEX DISCARDABLE 0, 0, 186, 95 +FONT 8, "Tahoma", 0, 0 +BEGIN + DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14 +END + +105 DIALOGEX DISCARDABLE 0, 0, 186, 95 +FONT 8, "Tahoma", 0, 0, 1 +BEGIN + DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14 +END diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/dlgfont.rsd binutils-2.12.1/binutils/testsuite/binutils-all/windres/dlgfont.rsd --- binutils-2.12/binutils/testsuite/binutils-all/windres/dlgfont.rsd Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/dlgfont.rsd Thu May 9 07:53:28 2002 @@ -0,0 +1,39 @@ + 0000 00000000 20000000 ffff0000 ffff0000 .... ........... + 0010 00000000 00000000 00000000 00000000 ................ + 0020 46000000 20000000 ffff0500 ffff6500 F... .........e. + 0030 00000000 30100904 00000000 00000000 ....0........... + 0040 40008880 00000000 01000000 0000ba00 @............... + 0050 5f000000 00000000 08005400 61006800 _.........T.a.h. + 0060 6f006d00 61000000 01000150 00000000 o.m.a......P.... + 0070 81000700 32000e00 0100ffff 80004f00 ....2.........O. + 0080 4b000000 00000000 58000000 20000000 K.......X... ... + 0090 ffff0500 ffff6600 00000000 30100904 ......f.....0... + 00a0 00000000 00000000 0100ffff 00000000 ................ + 00b0 00000000 40008880 01000000 0000ba00 ....@........... + 00c0 5f000000 00000000 08000000 00015400 _.............T. + 00d0 61006800 6f006d00 61000000 00000000 a.h.o.m.a....... + 00e0 00000000 01000150 81000700 32000e00 .......P....2... + 00f0 01000000 ffff8000 4f004b00 00000000 ........O.K..... + 0100 58000000 20000000 ffff0500 ffff6700 X... .........g. + 0110 00000000 30100904 00000000 00000000 ....0........... + 0120 0100ffff 00000000 00000000 40008880 ............@... + 0130 01000000 0000ba00 5f000000 00000000 ........_....... + 0140 08000000 00015400 61006800 6f006d00 ......T.a.h.o.m. + 0150 61000000 00000000 00000000 01000150 a..............P + 0160 81000700 32000e00 01000000 ffff8000 ....2........... + 0170 4f004b00 00000000 58000000 20000000 O.K.....X... ... + 0180 ffff0500 ffff6800 00000000 30100904 ......h.....0... + 0190 00000000 00000000 0100ffff 00000000 ................ + 01a0 00000000 40008880 01000000 0000ba00 ....@........... + 01b0 5f000000 00000000 08000000 00015400 _.............T. + 01c0 61006800 6f006d00 61000000 00000000 a.h.o.m.a....... + 01d0 00000000 01000150 81000700 32000e00 .......P....2... + 01e0 01000000 ffff8000 4f004b00 00000000 ........O.K..... + 01f0 58000000 20000000 ffff0500 ffff6900 X... .........i. + 0200 00000000 30100904 00000000 00000000 ....0........... + 0210 0100ffff 00000000 00000000 40008880 ............@... + 0220 01000000 0000ba00 5f000000 00000000 ........_....... + 0230 08000000 00015400 61006800 6f006d00 ......T.a.h.o.m. + 0240 61000000 00000000 00000000 01000150 a..............P + 0250 81000700 32000e00 01000000 ffff8000 ....2........... + 0260 4f004b00 00000000 O.K..... diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/escapea.rc binutils-2.12.1/binutils/testsuite/binutils-all/windres/escapea.rc --- binutils-2.12/binutils/testsuite/binutils-all/windres/escapea.rc Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/escapea.rc Thu May 9 07:53:28 2002 @@ -0,0 +1,7 @@ +20 MENU DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Open\a^O", 17 + END +END diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/escapea.rsd binutils-2.12.1/binutils/testsuite/binutils-all/windres/escapea.rsd --- binutils-2.12/binutils/testsuite/binutils-all/windres/escapea.rsd Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/escapea.rsd Thu May 9 07:53:28 2002 @@ -0,0 +1,7 @@ + 0000 00000000 20000000 ffff0000 ffff0000 .... ........... + 0010 00000000 00000000 00000000 00000000 ................ + 0020 28000000 20000000 ffff0400 ffff1400 (... ........... + 0030 00000000 30100904 00000000 00000000 ....0........... + 0040 00000000 90002600 46006900 6c006500 ......&.F.i.l.e. + 0050 00008000 11002600 4f007000 65006e00 ......&.O.p.e.n. + 0060 08005e00 4f000000 ..^.O... diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/escapex.rc binutils-2.12.1/binutils/testsuite/binutils-all/windres/escapex.rc --- binutils-2.12/binutils/testsuite/binutils-all/windres/escapex.rc Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/escapex.rc Thu May 9 07:53:28 2002 @@ -0,0 +1,4 @@ +101 DIALOG DISCARDABLE 0, 0, 186, 95 +BEGIN + LTEXT "\xB0",-1,23,46,28,8 +END diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/escapex.rsd binutils-2.12.1/binutils/testsuite/binutils-all/windres/escapex.rsd --- binutils-2.12/binutils/testsuite/binutils-all/windres/escapex.rsd Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/escapex.rsd Thu May 9 07:53:28 2002 @@ -0,0 +1,8 @@ + 0000 00000000 20000000 ffff0000 ffff0000 .... ........... + 0010 00000000 00000000 00000000 00000000 ................ + 0020 34000000 20000000 ffff0500 ffff6500 4... .........e. + 0030 00000000 30100904 00000000 00000000 ....0........... + 0040 00008880 00000000 01000000 0000ba00 ................ + 0050 5f000000 00000000 00000250 00000000 _..........P.... + 0060 17002e00 1c000800 ffffffff 8200b000 ................ + 0070 00000000 .... diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/nocaption.rc binutils-2.12.1/binutils/testsuite/binutils-all/windres/nocaption.rc --- binutils-2.12/binutils/testsuite/binutils-all/windres/nocaption.rc Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/nocaption.rc Thu May 9 07:53:28 2002 @@ -0,0 +1,4 @@ +101 DIALOG DISCARDABLE 0, 0, 186, 95 +BEGIN + DEFPUSHBUTTON "OK",1,129,7,50,14 +END diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/nocaption.rsd binutils-2.12.1/binutils/testsuite/binutils-all/windres/nocaption.rsd --- binutils-2.12/binutils/testsuite/binutils-all/windres/nocaption.rsd Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/nocaption.rsd Thu May 9 07:53:28 2002 @@ -0,0 +1,8 @@ + 0000 00000000 20000000 ffff0000 ffff0000 .... ........... + 0010 00000000 00000000 00000000 00000000 ................ + 0020 36000000 20000000 ffff0500 ffff6500 6... .........e. + 0030 00000000 30100904 00000000 00000000 ....0........... + 0040 00008880 00000000 01000000 0000ba00 ................ + 0050 5f000000 00000000 01000150 00000000 _..........P.... + 0060 81000700 32000e00 0100ffff 80004f00 ....2.........O. + 0070 4b000000 00000000 K....... diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/printstyle.rc binutils-2.12.1/binutils/testsuite/binutils-all/windres/printstyle.rc --- binutils-2.12/binutils/testsuite/binutils-all/windres/printstyle.rc Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/printstyle.rc Thu May 9 07:53:28 2002 @@ -0,0 +1,6 @@ +101 DIALOG DISCARDABLE 0, 0, 186, 95 +STYLE 0 +BEGIN + DEFPUSHBUTTON "OK",1,129,7,50,14 +END + diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/printstyle.rsd binutils-2.12.1/binutils/testsuite/binutils-all/windres/printstyle.rsd --- binutils-2.12/binutils/testsuite/binutils-all/windres/printstyle.rsd Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/printstyle.rsd Thu May 9 07:53:28 2002 @@ -0,0 +1,8 @@ + 0000 00000000 20000000 ffff0000 ffff0000 .... ........... + 0010 00000000 00000000 00000000 00000000 ................ + 0020 36000000 20000000 ffff0500 ffff6500 6... .........e. + 0030 00000000 30100904 00000000 00000000 ....0........... + 0040 00000000 00000000 01000000 0000ba00 ................ + 0050 5f000000 00000000 01000150 00000000 _..........P.... + 0060 81000700 32000e00 0100ffff 80004f00 ....2.........O. + 0070 4b000000 00000000 K....... diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/quoteclass.rc binutils-2.12.1/binutils/testsuite/binutils-all/windres/quoteclass.rc --- binutils-2.12/binutils/testsuite/binutils-all/windres/quoteclass.rc Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/quoteclass.rc Thu May 9 07:53:28 2002 @@ -0,0 +1,8 @@ +// parse-only + +101 DIALOG DISCARDABLE 0, 0, 186, 95 +CLASS "myclass" +BEGIN + DEFPUSHBUTTON "OK",1,129,7,50,14 +END + diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/sublang.rc binutils-2.12.1/binutils/testsuite/binutils-all/windres/sublang.rc --- binutils-2.12/binutils/testsuite/binutils-all/windres/sublang.rc Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/sublang.rc Thu May 9 07:53:28 2002 @@ -0,0 +1,5 @@ +LANGUAGE 9, 1 +101 DIALOG DISCARDABLE 0, 0, 186, 95 +BEGIN + DEFPUSHBUTTON "OK",1,129,7,50,14 +END diff -Nur binutils-2.12/binutils/testsuite/binutils-all/windres/sublang.rsd binutils-2.12.1/binutils/testsuite/binutils-all/windres/sublang.rsd --- binutils-2.12/binutils/testsuite/binutils-all/windres/sublang.rsd Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/binutils/testsuite/binutils-all/windres/sublang.rsd Thu May 9 07:53:28 2002 @@ -0,0 +1,8 @@ + 0000 00000000 20000000 ffff0000 ffff0000 .... ........... + 0010 00000000 00000000 00000000 00000000 ................ + 0020 36000000 20000000 ffff0500 ffff6500 6... .........e. + 0030 00000000 30100904 00000000 00000000 ....0........... + 0040 00008880 00000000 01000000 0000ba00 ................ + 0050 5f000000 00000000 01000150 00000000 _..........P.... + 0060 81000700 32000e00 0100ffff 80004f00 ....2.........O. + 0070 4b000000 00000000 K....... diff -Nur binutils-2.12/binutils/windres.c binutils-2.12.1/binutils/windres.c --- binutils-2.12/binutils/windres.c Wed Jan 23 11:12:56 2002 +++ binutils-2.12.1/binutils/windres.c Thu May 9 10:49:21 2002 @@ -145,6 +145,8 @@ static void usage PARAMS ((FILE *, int)); static int cmp_res_entry PARAMS ((const PTR, const PTR)); static struct res_directory *sort_resources PARAMS ((struct res_directory *)); +static void reswr_init PARAMS ((void)); +static const char * quot PARAMS ((const char *)); /* When we are building a resource tree, we allocate everything onto an obstack, so that we can free it all at once if we want. */ @@ -441,11 +443,9 @@ re->u.res = ((struct res_resource *) res_alloc (sizeof (struct res_resource))); + memset (re->u.res, 0, sizeof (struct res_resource)); re->u.res->type = RES_TYPE_UNINITIALIZED; - memset (&re->u.res->res_info, 0, sizeof (struct res_res_info)); - memset (&re->u.res->coff_info, 0, sizeof (struct res_coff_info)); - return re->u.res; } @@ -765,6 +765,9 @@ return buf; } +/* This keeps gcc happy when using -Wmissing-prototypes -Wstrict-prototypes. */ +int main PARAMS ((int, char **)); + /* The main function. */ int @@ -809,7 +812,7 @@ target = NULL; preprocessor = NULL; preprocargs = NULL; - language = -1; + language = 0x409; /* LANG_ENGLISH, SUBLANG_ENGLISH_US. */ use_temp_file = 0; while ((c = getopt_long (argc, argv, "i:o:I:O:F:D:hHvV", long_options, diff -Nur binutils-2.12/binutils/windres.h binutils-2.12.1/binutils/windres.h --- binutils-2.12/binutils/windres.h Mon Jul 16 21:19:19 2001 +++ binutils-2.12.1/binutils/windres.h Thu May 9 10:49:21 2002 @@ -1,5 +1,5 @@ /* windres.h -- header file for windres program. - Copyright 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright 1997, 1998, 2000, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. @@ -315,7 +315,9 @@ /* Font weight. */ unsigned short weight; /* Whether the font is italic. */ - unsigned short italic; + unsigned char italic; + /* Character set. */ + unsigned char charset; }; /* Window style flags, from the winsup Defines.h header file. These @@ -519,7 +521,7 @@ short index; /* Length of font information. */ unsigned long length; - /* Font information. */ + /* Font information. */ const unsigned char *data; }; diff -Nur binutils-2.12/gas/ChangeLog binutils-2.12.1/gas/ChangeLog --- binutils-2.12/gas/ChangeLog Thu Mar 7 23:20:48 2002 +++ binutils-2.12.1/gas/ChangeLog Mon May 13 09:15:47 2002 @@ -1,3 +1,214 @@ +2002-05-13 Nick Clifton + + * stabs.c (s_stab_generic): Fix grammatical error in warning + message. + +2002-05-11 Nick Clifton + + * stabs.c (s_stab_generic): Warn about a description field that is + too big. + +2002-05-11 Daniel Jacobowitz + + Merge from mainline: + 2002-05-11 Nick Clifton + * config/obj-coff.c: Fix compile time warnings when compiling + without BFD_ASSEMBLER defined. + Fix formatting. + + * config/tc-sh.c (md_pcrel_from): Define for use with sh-hms + target. + (md_pcrel_from_section): Use md_pcrel_from(). + +2002-05-09 Alan Modra + + * config/tc-i386.c (md_estimate_size_before_relax) Don't lose + reloc when no_cond_jump_promotion. + + Merge from mainline + 2002-05-08 Jim Wilson + * config/tc-i960.c (md_estimate_size_before_relax): Return size of + current variable part of frag. + + 2002-05-02 Alan Modra + * config/tc-ppc.c (mapping): Map sectoff to BFD_RELOC_16_BASEREL. + (ppc_elf_validate_fix): Replace BFD_RELOC_32_BASEREL with + BFD_RELOC_16_BASEREL. + (md_assemble): Likewise. + (md_apply_fix3): Likewise. + + 2002-05-01 Andrew Macleod + * config/tc-i386.c (extra_symbol_chars): Add '[' to the list. + + 2002-04-28 Alan Modra + * config/tc-i386.c: Formatting fixes, add missing space in error + message. + +2002-05-03 Alexandre Oliva + + * config/tc-s390.c (md_gather_operands): Emit dwarf2 line-number + information for instructions. + +2002-05-02 Nick Clifton + + * config/tc-arm.c (thumb_add_sub): Do not convert a subtract of + zero into an add of zero - it is not the same. + +2002-04-27 Alan Modra + + Merge from mainline. + 2002-04-17 Martin Schwidefsky + * config/tc-s390.c (tc_s390_fix_adjustable): Prevent adjustments to + symbols in merge sections. + + 2002-02-19 Martin Schwidefsky + * config/tc-s390.c (md_parse_option): Add switches -m31 and -m64. + Make bit size independent of architecture switch. + (md_begin): Add warning for -m64 with -Aesa. + (s390_md_end): Use renamed architecture defines. + + 2002-02-19 Tom Tromey + * config/tc-xstormy16.h (DWARF2_LINE_MIN_INSN_LENGTH): Define. + + Tue Apr 9 16:45:48 2002 J"orn Rennecke + * config/tc-sh.h (TC_FIX_ADJUSTABLE): Disable adjusting if + symbol_used_in_reloc_p is true. + * config/tc-sh.c (md_apply_fix3): Don't zero relocations on big + endian hosts. + + 2002-04-03 Alan Modra + * symbols.c (resolve_symbol_value ): Derive final_seg from add_symbol. + : More final_seg twiddles. + +2002-04-24 Andreas Schwab + + * config/tc-i386.c (output_jump, output_disp) + (md_estimate_size_before_relax): Don't set fx_pcrel_adjust any + more. + (md_apply_fix3): Remember addend value for rela relocations. + (tc_gen_reloc): Correctly compute pc-relative relocation addend. + +2002-04-10 Alan Modra + + * as.c (parse_args ): Use VERSION is + BFD_VERSION_STRING unavailable. + * config/tc-i386.c (INLINE): Define (for non-BFD assembler). + +2002-04-04 Alan Modra + + * dep-in.sed: Cope with absolute paths. + * Makefile.am (dep.sed): Subst TOPDIR. + Run "make dep-am". + * Makefile.in: Regenerate. + +2002-04-01 Jessica Han + + * config/tc-ia64.c (ia64_cons_fix_new): Handle 8 byte iplt reloc + in 32-bit mode. + +2002-03-28 Alan Modra + + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + * doc/Makefile.in: Regenerate. + + Merge from mainline. + 2002-03-12 Andreas Schwab + * config/tc-ia64.c (fixup_unw_records): Clear region when seeing a + body record so that an error is given for misplaced .save + pseudo-ops. + + 2002-03-09 Alan Modra + * config/tc-i386.h (REX_OPCODE): Define. + (REX_MODE64, REX_EXTX, REX_EXTY, REX_EXTZ): Define. + (rex_byte): typedef to int. + * config/tc-i386.c: Group prototypes and vars together. + Formatting fixes. Remove occurrences of "register" keyword. + (true): Delete. + (false): Delete. + (mode_from_disp_size): Add INLINE keyword to prototype. + (fits_in_signed_byte): Likewise. + (fits_in_unsigned_byte): Likewise. + (fits_in_unsigned_word): Likewise. + (fits_in_signed_word): Likewise. + (fits_in_unsigned_long): Likewise. + (fits_in_signed_long): Likewise. + (type_names): Constify. + (intel_float_operand): Constify param. + (add_prefix): Use REX_OPCODE. + (md_assemble): Likewise. Modify for changed rex_byte. + (parse_insn): Split out of md_assemble. + (parse_operands): Likewise. + (swap_operands): Likewise. + (optimize_imm): Likewise. + (optimize_disp): Likewise. + (match_template): Likewise. + (check_string): Likewise. + (process_suffix): Likewise. + (check_byte_reg): Likewise. + (check_long_reg): Likewise. + (check_qword_reg): Likewise. + (check_word_reg): Likewise. + (finalize_imm): Likewise. + (process_operands): Likewise. + (build_modrm_byte): Likewise. + (output_insn): Likewise. + (output_branch): Likewise. + (output_jump): Likewise. + (output_interseg_jump): Likewise. + (output_disp): Likewise. + (output_imm): Likewise. + + 2002-03-06 Alan Modra + * config/tc-i386.c (tc_gen_reloc): Don't attempt to handle 8 byte + relocs except when BFD64. + * write.c (number_to_chars_bigendian): Don't abort when N is + larger than sizeof (VAL). + (number_to_chars_littleendian): Likewise. + + 2002-03-05 John David Anglin + * config/tc-hppa.c (md_apply_fix3): Add cast. + (hppa_fix_adjustable): Adjust list of selectors using e_lrsel and + e_rrsel. + + 2002-03-04 H.J. Lu + * config/obj-elf.c (special_section): Add .init_array, + .fini_array and .preinit_array. + * config/tc-ia64.h (ELF_TC_SPECIAL_SECTIONS): Remove + .init_array and .fini_array. + + 2002-03-01 Jakub Jelinek + * config/obj-elf.c (elf_copy_symbol_attributes): Don't copy + visibility. + (obj_frob_symbol): Copy visibility. + +2002-03-27 Andreas Schwab + + * config/tc-i386.c (md_assemble): Set fx_pcrel_adjust to size of + field for pc-relative fixups. + (md_estimate_size_before_relax): Likewise. + (tc_gen_reloc): Subtract fx_pcrel_adjust instead of fx_size for + pc-relative fixups in 64bit mode. + +2002-03-20 Albert Chin-A-Young + + * config/tc-arm.c (vfp_dp_reg_required_here): Fix typo + (vfp_sp_reg_pos -> vfp_dp_reg_pos). + +2002-03-19 Alexandre Oliva + + * config/tc-mips.c (md_estimate_size_before_relax): Do not modify + the EXTENDED bit here; report the estimate according to the + current size. + +2002-03-17 Hans-Peter Nilsson + + * config/tc-mmix.c (md_estimate_size_before_relax): Don't consider + a weak symbol in same section to be within reach. + 2002-03-07 Daniel Jacobowitz * doc/as.texinfo: Wrap @menu in @ifnottex, not @ifinfo. @@ -135,7 +346,7 @@ 2002-02-11 Tom Rix - * config/tc-ppc.c (md_apply_fix3): Check for insert fop invalid for + * config/tc-ppc.c (md_apply_fix3): Check for insert fop invalid for xcoff64. 2002-02-11 Alexandre Oliva @@ -353,7 +564,7 @@ BFD_RELOC_SH_PT_16>: Set lowest bit in field to be relocated to 1. (shmedia_md_convert_frag) : Set lowest bit of field to relocate to 1 and rest to empty, - if reloc is emitted. + if reloc is emitted. 2000-12-31 Hans-Peter Nilsson New options plus bugfixes. * config/tc-sh.c (md_longopts): New options "-no-expand" and @@ -662,7 +873,7 @@ * config/tc-sh.c (parse_at): Install the correct version of 2002-02-04's patch. - + * config/tc-sh.c (md_apply_fix3) : Don't assume fixP->fx_subsy is non-NULL. @@ -719,7 +930,7 @@ Support on-demand global register allocation by passing on base-plus-offset relocs to the linker. * config/tc-mmix.c: Tweak and fix typos in comments. - (allocate_undefined_gregs_in_linker): New variable. + (allocate_undefined_gregs_in_linker): New variable. (OPTION_LINKER_ALLOCATED_GREGS): New option macro. (md_longopts): Add --linker-allocated-gregs. (md_parse_option) : Imply --linker-allocated-gregs. @@ -835,7 +1046,7 @@ 2002-01-21 Jason Thorpe * configure.in (ia64-*-netbsd*): New target. - * configure: Regenerate. + * configure: Regenerate. 2002-01-21 Hans-Peter Nilsson @@ -874,7 +1085,7 @@ * NEWS: Mention new ARM command-line options and VFP support. - * config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All + * config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All uses changed. (ARM_CEXT_MAVERICK): Similarly. (ARM_ANY): Now means any core instruction. diff -Nur binutils-2.12/gas/Makefile.am binutils-2.12.1/gas/Makefile.am --- binutils-2.12/gas/Makefile.am Fri Feb 8 01:32:16 2002 +++ binutils-2.12.1/gas/Makefile.am Thu Apr 4 11:21:08 2002 @@ -921,7 +921,8 @@ sed <$(srcdir)/dep-in.sed >dep.sed \ -e "s!@INCDIR@!$${srcdir}/../include!" \ -e "s!@BFDDIR@!$${srcdir}/../bfd!" \ - -e "s!@SRCDIR@!$${srcdir}!" + -e "s!@SRCDIR@!$${srcdir}!" \ + -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gas,,`'!' dep: DEP sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \ @@ -1084,12 +1085,14 @@ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/hppa.h \ dwarf2dbg.h DEPTC_ia64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ia64.h $(INCDIR)/coff/internal.h \ + $(srcdir)/config/tc-ia64.h $(INCDIR)/opcode/ia64.h \ + $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \ dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h DEPTC_ia64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/safe-ctype.h dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h DEPTC_i370_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \ @@ -1413,15 +1416,23 @@ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h \ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h DEPTC_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \ - subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \ - dwarf2dbg.h + $(srcdir)/config/tc-v850.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/v850.h dwarf2dbg.h DEPTC_v850_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \ - $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/v850.h dwarf2dbg.h + $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \ + dwarf2dbg.h +DEPTC_sh64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/sh64-opc.h \ + $(srcdir)/config/tc-sh.c subsegs.h $(INCDIR)/obstack.h \ + $(srcdir)/../opcodes/sh-opc.h struc-symbol.h dwarf2dbg.h DEPTC_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-xstormy16.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ @@ -1787,20 +1798,6 @@ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ $(INCDIR)/aout/aout64.h -DEPTC_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \ - $(srcdir)/../opcodes/sh64-opc.h $(srcdir)/config/tc-sh.c \ - subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \ - struc-symbol.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ - dwarf2dbg.h $(INCDIR)/symcat.h -DEPOBJ_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \ - subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h $(INCDIR)/elf/sh.h -DEP_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h DEPOBJ_sparc_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h @@ -1889,6 +1886,17 @@ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ $(INCDIR)/aout/aout64.h +DEPOBJ_sh64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \ + $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_sh64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/aout/aout64.h DEPOBJ_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-xstormy16.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -2193,6 +2201,14 @@ DEP_v850_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h +DEP_sh64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h \ + $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h +DEP_sh64_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h DEP_xstormy16_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-xstormy16.h \ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ $(INCDIR)/bfdlink.h @@ -2237,8 +2253,8 @@ $(INCDIR)/safe-ctype.h input-scrub.o: input-scrub.c $(INCDIR)/symcat.h input-file.h \ sb.h -listing.o: listing.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \ - input-file.h subsegs.h +listing.o: listing.c $(INCDIR)/symcat.h $(INCDIR)/obstack.h \ + $(INCDIR)/safe-ctype.h input-file.h subsegs.h literal.o: literal.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h macro.o: macro.c $(INCDIR)/safe-ctype.h sb.h macro.h messages.o: messages.c $(INCDIR)/symcat.h @@ -2253,7 +2269,8 @@ $(INCDIR)/obstack.h subsegs.h struc-symbol.h write.o: write.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \ output-file.h dwarf2dbg.h -gasp.o: gasp.c $(INCDIR)/safe-ctype.h sb.h macro.h +gasp.o: gasp.c $(INCDIR)/getopt.h $(INCDIR)/safe-ctype.h \ + sb.h macro.h itbl-ops.o: itbl-ops.c itbl-ops.h $(INCDIR)/symcat.h e-crisaout.o: $(srcdir)/config/e-crisaout.c $(INCDIR)/symcat.h \ emul-target.h diff -Nur binutils-2.12/gas/Makefile.in binutils-2.12.1/gas/Makefile.in --- binutils-2.12/gas/Makefile.in Fri Feb 8 01:32:16 2002 +++ binutils-2.12.1/gas/Makefile.in Thu Apr 4 11:21:08 2002 @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -818,13 +818,15 @@ dwarf2dbg.h DEPTC_ia64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ia64.h $(INCDIR)/coff/internal.h \ + $(srcdir)/config/tc-ia64.h $(INCDIR)/opcode/ia64.h \ + $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \ dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h DEPTC_ia64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/safe-ctype.h dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h DEPTC_i370_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ @@ -1216,16 +1218,25 @@ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h DEPTC_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \ - subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \ - dwarf2dbg.h + $(srcdir)/config/tc-v850.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/v850.h dwarf2dbg.h DEPTC_v850_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \ - $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/v850.h dwarf2dbg.h + $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \ + dwarf2dbg.h + +DEPTC_sh64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/sh64-opc.h \ + $(srcdir)/config/tc-sh.c subsegs.h $(INCDIR)/obstack.h \ + $(srcdir)/../opcodes/sh-opc.h struc-symbol.h dwarf2dbg.h DEPTC_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-xstormy16.h $(INCDIR)/coff/internal.h \ @@ -1677,23 +1688,6 @@ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ $(INCDIR)/aout/aout64.h -DEPTC_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \ - $(srcdir)/../opcodes/sh64-opc.h $(srcdir)/config/tc-sh.c \ - subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \ - struc-symbol.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ - dwarf2dbg.h $(INCDIR)/symcat.h - -DEPOBJ_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \ - subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h $(INCDIR)/elf/sh.h - -DEP_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h - DEPOBJ_sparc_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h @@ -1803,6 +1797,19 @@ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ $(INCDIR)/aout/aout64.h +DEPOBJ_sh64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \ + $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h + +DEPOBJ_sh64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/aout/aout64.h + DEPOBJ_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-xstormy16.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -2211,6 +2218,16 @@ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h +DEP_sh64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h \ + $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h + +DEP_sh64_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h + DEP_xstormy16_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-xstormy16.h \ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ $(INCDIR)/bfdlink.h @@ -2282,7 +2299,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best SOURCES = $(itbl_test_SOURCES) $(as_new_SOURCES) $(EXTRA_as_new_SOURCES) $(gasp_new_SOURCES) OBJECTS = $(itbl_test_OBJECTS) $(as_new_OBJECTS) $(gasp_new_OBJECTS) @@ -2443,7 +2460,7 @@ dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ - test "$$subdir" = "." && dot_seen=yes; \ + test "$$subdir" != "." || dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ @@ -3076,7 +3093,8 @@ sed <$(srcdir)/dep-in.sed >dep.sed \ -e "s!@INCDIR@!$${srcdir}/../include!" \ -e "s!@BFDDIR@!$${srcdir}/../bfd!" \ - -e "s!@SRCDIR@!$${srcdir}!" + -e "s!@SRCDIR@!$${srcdir}!" \ + -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gas,,`'!' dep: DEP sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \ @@ -3124,8 +3142,8 @@ $(INCDIR)/safe-ctype.h input-scrub.o: input-scrub.c $(INCDIR)/symcat.h input-file.h \ sb.h -listing.o: listing.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \ - input-file.h subsegs.h +listing.o: listing.c $(INCDIR)/symcat.h $(INCDIR)/obstack.h \ + $(INCDIR)/safe-ctype.h input-file.h subsegs.h literal.o: literal.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h macro.o: macro.c $(INCDIR)/safe-ctype.h sb.h macro.h messages.o: messages.c $(INCDIR)/symcat.h @@ -3140,7 +3158,8 @@ $(INCDIR)/obstack.h subsegs.h struc-symbol.h write.o: write.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \ output-file.h dwarf2dbg.h -gasp.o: gasp.c $(INCDIR)/safe-ctype.h sb.h macro.h +gasp.o: gasp.c $(INCDIR)/getopt.h $(INCDIR)/safe-ctype.h \ + sb.h macro.h itbl-ops.o: itbl-ops.c itbl-ops.h $(INCDIR)/symcat.h e-crisaout.o: $(srcdir)/config/e-crisaout.c $(INCDIR)/symcat.h \ emul-target.h diff -Nur binutils-2.12/gas/aclocal.m4 binutils-2.12.1/gas/aclocal.m4 --- binutils-2.12/gas/aclocal.m4 Fri Feb 8 01:32:17 2002 +++ binutils-2.12.1/gas/aclocal.m4 Mon Apr 1 20:28:59 2002 @@ -1,6 +1,6 @@ -dnl aclocal.m4 generated automatically by aclocal 1.4 +dnl aclocal.m4 generated automatically by aclocal 1.4-p5 -dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -92,7 +92,7 @@ dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) -AC_DEFUN(AM_INIT_AUTOMAKE, +AC_DEFUN([AM_INIT_AUTOMAKE], [AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) @@ -120,7 +120,7 @@ # Check to make sure that the build environment is sane. # -AC_DEFUN(AM_SANITY_CHECK, +AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 @@ -161,7 +161,7 @@ dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. -AC_DEFUN(AM_MISSING_PROG, +AC_DEFUN([AM_MISSING_PROG], [AC_MSG_CHECKING(for working $2) # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. @@ -177,7 +177,7 @@ # Like AC_CONFIG_HEADER, but automatically create stamp file. -AC_DEFUN(AM_CONFIG_HEADER, +AC_DEFUN([AM_CONFIG_HEADER], [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. @@ -201,9 +201,9 @@ dnl AM_PROG_LEX dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT -AC_DEFUN(AM_PROG_LEX, +AC_DEFUN([AM_PROG_LEX], [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) -AC_CHECK_PROGS(LEX, flex lex, $missing_dir/missing flex) +AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex") AC_PROG_LEX AC_DECL_YYTEXT]) @@ -212,7 +212,7 @@ # serial 1 -AC_DEFUN(AM_MAINTAINER_MODE, +AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, @@ -229,7 +229,7 @@ # Define a conditional. -AC_DEFUN(AM_CONDITIONAL, +AC_DEFUN([AM_CONDITIONAL], [AC_SUBST($1_TRUE) AC_SUBST($1_FALSE) if $2; then diff -Nur binutils-2.12/gas/as.c binutils-2.12.1/gas/as.c --- binutils-2.12/gas/as.c Fri Jan 18 06:28:36 2002 +++ binutils-2.12.1/gas/as.c Fri Apr 26 10:26:59 2002 @@ -524,7 +524,11 @@ case OPTION_VERSION: /* This output is intended to follow the GNU standards document. */ +#ifdef BFD_ASSEMBLER printf (_("GNU assembler %s\n"), BFD_VERSION_STRING); +#else + printf (_("GNU assembler %s\n"), VERSION); +#endif printf (_("Copyright 2002 Free Software Foundation, Inc.\n")); printf (_("\ This program is free software; you may redistribute it under the terms of\n\ diff -Nur binutils-2.12/gas/config/obj-coff.c binutils-2.12.1/gas/config/obj-coff.c --- binutils-2.12/gas/config/obj-coff.c Thu Jan 31 12:33:00 2002 +++ binutils-2.12.1/gas/config/obj-coff.c Sat May 11 12:47:05 2002 @@ -1713,9 +1713,9 @@ int function_lineoff = -1; /* Offset in line#s where the last function started (the odd entry for line #0) */ -/* structure used to keep the filenames which +/* Structure used to keep the filenames which are too long around so that we can stick them - into the string table */ + into the string table. */ struct filename_list { char *filename; @@ -1729,39 +1729,38 @@ /* Add 4 to the real value to get the index and compensate the negatives. This vector is used by S_GET_SEGMENT to turn a coff - section number into a segment number -*/ -static symbolS *previous_file_symbol; -void c_symbol_merge (); -static int line_base; + section number into a segment number. */ -symbolS *c_section_symbol (); bfd *abfd; +static symbolS *previous_file_symbol; +static int line_base; -static void fixup_segment PARAMS ((segment_info_type *segP, - segT this_segment_type)); - -static void fixup_mdeps PARAMS ((fragS *, - object_headers *, - segT)); - -static void fill_section PARAMS ((bfd * abfd, - object_headers *, - unsigned long *)); - -static int c_line_new PARAMS ((symbolS * symbol, long paddr, - int line_number, - fragS * frag)); - -static void w_symbols PARAMS ((bfd * abfd, char *where, - symbolS * symbol_rootP)); - -static void adjust_stab_section PARAMS ((bfd *abfd, segT seg)); - +void c_symbol_merge PARAMS ((symbolS *, symbolS *)); +symbolS *c_section_symbol PARAMS ((char *, int)); +void obj_coff_section PARAMS ((int)); +void do_relocs_for PARAMS ((bfd *, object_headers *, unsigned long *)); +char * symbol_to_chars PARAMS ((bfd *, char *, symbolS *)); +void w_strings PARAMS ((char *)); + +static void fixup_segment PARAMS ((segment_info_type *, segT)); +static void fixup_mdeps PARAMS ((fragS *, object_headers *, segT)); +static void fill_section PARAMS ((bfd *, object_headers *, unsigned long *)); +static int c_line_new PARAMS ((symbolS *, long, int, fragS *)); +static void w_symbols PARAMS ((bfd *, char *, symbolS *)); +static void adjust_stab_section PARAMS ((bfd *, segT)); static void obj_coff_lcomm PARAMS ((int)); static void obj_coff_text PARAMS ((int)); static void obj_coff_data PARAMS ((int)); -void obj_coff_section PARAMS ((int)); +static unsigned int count_entries_in_chain PARAMS ((unsigned int)); +static void coff_header_append PARAMS ((bfd *, object_headers *)); +static unsigned int yank_symbols PARAMS ((void)); +static unsigned int glue_symbols PARAMS ((symbolS **, symbolS **)); +static unsigned int tie_tags PARAMS ((void)); +static void crawl_symbols PARAMS ((object_headers *, bfd *)); +static void do_linenos_for PARAMS ((bfd *, object_headers *, unsigned long *)); +static void remove_subsegs PARAMS ((void)); + + /* When not using BFD_ASSEMBLER, we permit up to 40 sections. @@ -1800,6 +1799,8 @@ #define SEG_INFO_FROM_SECTION_NUMBER(x) (seg_info_off_by_4[(x)+4]) +static relax_addressT relax_align PARAMS ((relax_addressT, long)); + static relax_addressT relax_align (address, alignment) relax_addressT address; @@ -1820,8 +1821,11 @@ return SEG_INFO_FROM_SECTION_NUMBER (x->sy_symbol.ost_entry.n_scnum); } -/* calculate the size of the frag chain and fill in the section header - to contain all of it, also fill in the addr of the sections */ +static unsigned int size_section PARAMS ((bfd *, unsigned int)); + +/* Calculate the size of the frag chain and fill in the section header + to contain all of it, also fill in the addr of the sections. */ + static unsigned int size_section (abfd, idx) bfd *abfd ATTRIBUTE_UNUSED; @@ -1830,6 +1834,7 @@ unsigned int size = 0; fragS *frag = segment_info[idx].frchainP->frch_root; + while (frag) { size = frag->fr_address; @@ -1882,7 +1887,7 @@ unsigned int nrelocs; fixS *fixup_ptr; - /* Count the relocations */ + /* Count the relocations. */ fixup_ptr = segment_info[idx].fix_root; nrelocs = 0; while (fixup_ptr != (fixS *) NULL) @@ -1908,7 +1913,8 @@ static int compare_external_relocs PARAMS ((const PTR, const PTR)); -/* AUX's ld expects relocations to be sorted */ +/* AUX's ld expects relocations to be sorted. */ + static int compare_external_relocs (x, y) const PTR x; @@ -1923,7 +1929,8 @@ #endif -/* output all the relocations for a section */ +/* Output all the relocations for a section. */ + void do_relocs_for (abfd, h, file_cursor) bfd * abfd; @@ -1961,13 +1968,12 @@ { struct internal_reloc intr; - /* Only output some of the relocations */ + /* Only output some of the relocations. */ if (fix_ptr->fx_done == 0 && TC_COUNT_RELOC (fix_ptr)) { #ifdef TC_RELOC_MANGLE TC_RELOC_MANGLE (&segment_info[idx], fix_ptr, &intr, base); - #else symbolS *dot; symbolS *symbol_ptr = fix_ptr->fx_addsy; @@ -2012,36 +2018,26 @@ as_bad (_("bad relocation: symbol `%s' not in symbol table"), S_GET_NAME (symbol_ptr)); } + dot = segment_info[S_GET_SEGMENT (symbol_ptr)].dot; if (dot) - { - intr.r_symndx = dot->sy_number; - } + intr.r_symndx = dot->sy_number; else - { - intr.r_symndx = symbol_ptr->sy_number; - } - + intr.r_symndx = symbol_ptr->sy_number; } else - { - intr.r_symndx = -1; - } + intr.r_symndx = -1; #endif - (void) bfd_coff_swap_reloc_out (abfd, &intr, ext_ptr); ext_ptr++; - #if defined(TC_A29K) - /* The 29k has a special kludge for the high 16 bit reloc. Two relocations are emited, R_IHIHALF, and R_IHCONST. The second one doesn't contain a symbol, but uses the value for offset. */ - if (intr.r_type == R_IHIHALF) { - /* now emit the second bit */ + /* Now emit the second bit. */ intr.r_type = R_IHCONST; intr.r_symndx = fix_ptr->fx_addnumber; (void) bfd_coff_swap_reloc_out (abfd, &intr, ext_ptr); @@ -2066,14 +2062,12 @@ fix_ptr = fix_ptr->fx_next; } - #ifdef TE_AUX - /* Sort the reloc table */ + /* Sort the reloc table. */ qsort ((PTR) external_reloc_vec, nrelocs, sizeof (struct external_reloc), compare_external_relocs); #endif - - /* Write out the reloc table */ + /* Write out the reloc table. */ bfd_bwrite ((PTR) external_reloc_vec, (bfd_size_type) external_reloc_size, abfd); free (external_reloc_vec); @@ -2085,25 +2079,25 @@ } else { - /* No relocs */ + /* No relocs. */ segment_info[idx].scnhdr.s_relptr = 0; } } } - /* Set relocation_size field in file headers */ + + /* Set relocation_size field in file headers. */ H_SET_RELOCATION_SIZE (h, *file_cursor - reloc_start, 0); } -/* run through a frag chain and write out the data to go with it, fill - in the scnhdrs with the info on the file postions -*/ +/* Run through a frag chain and write out the data to go with it, fill + in the scnhdrs with the info on the file postions. */ + static void fill_section (abfd, h, file_cursor) bfd * abfd; object_headers *h ATTRIBUTE_UNUSED; unsigned long *file_cursor; { - unsigned int i; unsigned int paddr = 0; @@ -2229,7 +2223,7 @@ } } -/* Coff file generation & utilities */ +/* Coff file generation & utilities. */ static void coff_header_append (abfd, h) @@ -2279,7 +2273,6 @@ string_size += strlen (segment_info[i].name) + 1; } #endif - size = bfd_coff_swap_scnhdr_out (abfd, &(segment_info[i].scnhdr), buffer); @@ -2300,13 +2293,11 @@ unsigned int i; valueT val; - /* Turn any symbols with register attributes into abs symbols */ + /* Turn any symbols with register attributes into abs symbols. */ if (S_GET_SEGMENT (symbolP) == reg_section) - { - S_SET_SEGMENT (symbolP, absolute_section); - } - /* At the same time, relocate all symbols to their output value */ + S_SET_SEGMENT (symbolP, absolute_section); + /* At the same time, relocate all symbols to their output value. */ #ifndef TE_PE val = (segment_info[S_GET_SEGMENT (symbolP)].scnhdr.s_paddr + S_GET_VALUE (symbolP)); @@ -2329,25 +2320,25 @@ S_GET_STORAGE_CLASS (symbolP), i, numaux, where); } - return where; + return where; } void coff_obj_symbol_new_hook (symbolP) symbolS *symbolP; { - char underscore = 0; /* Symbol has leading _ */ + char underscore = 0; /* Symbol has leading _ */ - /* Effective symbol */ + /* Effective symbol. */ /* Store the pointer in the offset. */ S_SET_ZEROES (symbolP, 0L); S_SET_DATA_TYPE (symbolP, T_NULL); S_SET_STORAGE_CLASS (symbolP, 0); S_SET_NUMBER_AUXILIARY (symbolP, 0); - /* Additional information */ + /* Additional information. */ symbolP->sy_symbol.ost_flags = 0; - /* Auxiliary entries */ + /* Auxiliary entries. */ memset ((char *) &symbolP->sy_symbol.ost_auxent[0], 0, AUXESZ); if (S_IS_STRING (symbolP)) @@ -2356,9 +2347,7 @@ SF_SET_LOCAL (symbolP); } -/* - * Handle .ln directives. - */ +/* Handle .ln directives. */ static void obj_coff_ln (appline) @@ -2368,10 +2357,11 @@ if (! appline && def_symbol_in_progress != NULL) { + /* Wrong context. */ as_warn (_(".ln pseudo-op inside .def/.endef: ignored.")); demand_empty_rest_of_line (); return; - } /* wrong context */ + } l = get_absolute_expression (); c_line_new (0, frag_now_fix (), l, frag_now); @@ -2395,19 +2385,14 @@ demand_empty_rest_of_line (); } -/* - * def() - * - * Handle .def directives. - * - * One might ask : why can't we symbol_new if the symbol does not - * already exist and fill it with debug information. Because of - * the C_EFCN special symbol. It would clobber the value of the - * function symbol before we have a chance to notice that it is - * a C_EFCN. And a second reason is that the code is more clear this - * way. (at least I think it is :-). - * - */ +/* Handle .def directives. + + One might ask : why can't we symbol_new if the symbol does not + already exist and fill it with debug information. Because of + the C_EFCN special symbol. It would clobber the value of the + function symbol before we have a chance to notice that it is + a C_EFCN. And a second reason is that the code is more clear this + way. (at least I think it is :-). */ #define SKIP_SEMI_COLON() while (*input_line_pointer++ != ';') #define SKIP_WHITESPACES() while (*input_line_pointer == ' ' || \ @@ -2418,9 +2403,9 @@ obj_coff_def (what) int what ATTRIBUTE_UNUSED; { - char name_end; /* Char after the end of name */ - char *symbol_name; /* Name of the debug symbol */ - char *symbol_name_copy; /* Temporary copy of the name */ + char name_end; /* Char after the end of name. */ + char *symbol_name; /* Name of the debug symbol. */ + char *symbol_name_copy; /* Temporary copy of the name. */ unsigned int symbol_name_length; if (def_symbol_in_progress != NULL) @@ -2428,7 +2413,7 @@ as_warn (_(".def pseudo-op used inside of .def/.endef: ignored.")); demand_empty_rest_of_line (); return; - } /* if not inside .def/.endef */ + } SKIP_WHITESPACES (); @@ -2444,7 +2429,7 @@ symbol_name_copy = tc_canonicalize_symbol_name (symbol_name_copy); #endif - /* Initialize the new symbol */ + /* Initialize the new symbol. */ #ifdef STRIP_UNDERSCORE S_SET_NAME (def_symbol_in_progress, (*symbol_name_copy == '_' ? symbol_name_copy + 1 @@ -2480,7 +2465,7 @@ as_warn (_(".endef pseudo-op used outside of .def/.endef: ignored.")); demand_empty_rest_of_line (); return; - } /* if not inside .def/.endef */ + } /* Set the section number according to storage class. */ switch (S_GET_STORAGE_CLASS (def_symbol_in_progress)) @@ -2489,7 +2474,8 @@ case C_ENTAG: case C_UNTAG: SF_SET_TAG (def_symbol_in_progress); - /* intentional fallthrough */ + /* Intentional fallthrough. */ + case C_FILE: case C_TPDEF: SF_SET_DEBUG (def_symbol_in_progress); @@ -2497,20 +2483,23 @@ break; case C_EFCN: - SF_SET_LOCAL (def_symbol_in_progress); /* Do not emit this symbol. */ - /* intentional fallthrough */ + /* Do not emit this symbol. */ + SF_SET_LOCAL (def_symbol_in_progress); + /* Intentional fallthrough. */ + case C_BLOCK: - SF_SET_PROCESS (def_symbol_in_progress); /* Will need processing before writing */ - /* intentional fallthrough */ + /* Will need processing before writing. */ + SF_SET_PROCESS (def_symbol_in_progress); + /* Intentional fallthrough. */ + case C_FCN: S_SET_SEGMENT (def_symbol_in_progress, SEG_E0); if (strcmp (S_GET_NAME (def_symbol_in_progress), ".bf") == 0) { /* .bf */ if (function_lineoff < 0) - { - fprintf (stderr, _("`.bf' symbol without preceding function\n")); - } /* missing function symbol */ + fprintf (stderr, _("`.bf' symbol without preceding function\n")); + SA_GET_SYM_LNNOPTR (last_line_symbol) = function_lineoff; SF_SET_PROCESS (last_line_symbol); @@ -2518,6 +2507,7 @@ SF_SET_PROCESS (def_symbol_in_progress); function_lineoff = -1; } + /* Value is always set to . */ def_symbol_in_progress->sy_frag = frag_now; S_SET_VALUE (def_symbol_in_progress, (valueT) frag_now_fix ()); @@ -2546,7 +2536,7 @@ #endif case C_STAT: case C_LABEL: - /* Valid but set somewhere else (s_comm, s_lcomm, colon) */ + /* Valid but set somewhere else (s_comm, s_lcomm, colon). */ break; case C_USTATIC: @@ -2554,7 +2544,7 @@ case C_ULABEL: as_warn (_("unexpected storage class %d"), S_GET_STORAGE_CLASS (def_symbol_in_progress)); break; - } /* switch on storage class */ + } /* Now that we have built a debug symbol, try to find if we should merge with an existing symbol or not. If a symbol is C_EFCN or @@ -2609,16 +2599,16 @@ /* For functions, and tags, and static symbols, the symbol *must* be where the debug symbol appears. Move the existing symbol to the current place. */ - /* If it already is at the end of the symbol list, do nothing */ + /* If it already is at the end of the symbol list, do nothing. */ if (def_symbol_in_progress != symbol_lastP) { symbol_remove (def_symbol_in_progress, &symbol_rootP, &symbol_lastP); symbol_append (def_symbol_in_progress, symbol_lastP, &symbol_rootP, &symbol_lastP); - } /* if not already in place */ - } /* if function */ - } /* normal or mergable */ + } + } + } if (SF_GET_TAG (def_symbol_in_progress)) { @@ -2644,8 +2634,8 @@ /* That is, if this is the first time we've seen the function... */ symbol_table_insert (def_symbol_in_progress); - } /* definition follows debug */ - } /* Create the line number entry pointing to the function being defined */ + } + } def_symbol_in_progress = NULL; demand_empty_rest_of_line (); @@ -2662,7 +2652,7 @@ as_warn (_(".dim pseudo-op used outside of .def/.endef: ignored.")); demand_empty_rest_of_line (); return; - } /* if not inside .def/.endef */ + } S_SET_NUMBER_AUXILIARY (def_symbol_in_progress, 1); @@ -2680,7 +2670,8 @@ default: as_warn (_("badly formed .dim directive ignored")); - /* intentional fallthrough */ + /* Intentional fallthrough. */ + case '\n': case ';': dim_index = DIMNUM; @@ -2715,17 +2706,13 @@ #if 0 /* XXX Can we ever have line numbers going backwards? */ if (this_base > line_base) #endif - { - line_base = this_base; - } + line_base = this_base; #ifndef NO_LISTING { extern int listing; if (listing) - { - listing_source_line ((unsigned int) line_base); - } + listing_source_line ((unsigned int) line_base); } #endif } @@ -2745,7 +2732,7 @@ as_warn (_(".size pseudo-op used outside of .def/.endef ignored.")); demand_empty_rest_of_line (); return; - } /* if not inside .def/.endef */ + } S_SET_NUMBER_AUXILIARY (def_symbol_in_progress, 1); SA_SET_SYM_SIZE (def_symbol_in_progress, get_absolute_expression ()); @@ -2761,7 +2748,7 @@ as_warn (_(".scl pseudo-op used outside of .def/.endef ignored.")); demand_empty_rest_of_line (); return; - } /* if not inside .def/.endef */ + } S_SET_STORAGE_CLASS (def_symbol_in_progress, get_absolute_expression ()); demand_empty_rest_of_line (); @@ -2793,9 +2780,7 @@ SA_SET_SYM_TAGNDX (def_symbol_in_progress, (long) tag_find_or_make (symbol_name)); if (SA_GET_SYM_TAGNDX (def_symbol_in_progress) == 0L) - { - as_warn (_("tag not found for .tag %s"), symbol_name); - } /* not defined */ + as_warn (_("tag not found for .tag %s"), symbol_name); SF_SET_TAGGED (def_symbol_in_progress); *input_line_pointer = name_end; @@ -2812,15 +2797,13 @@ as_warn (_(".type pseudo-op used outside of .def/.endef ignored.")); demand_empty_rest_of_line (); return; - } /* if not inside .def/.endef */ + } S_SET_DATA_TYPE (def_symbol_in_progress, get_absolute_expression ()); if (ISFCN (S_GET_DATA_TYPE (def_symbol_in_progress)) && S_GET_STORAGE_CLASS (def_symbol_in_progress) != C_TPDEF) - { - SF_SET_FUNCTION (def_symbol_in_progress); - } /* is a function */ + SF_SET_FUNCTION (def_symbol_in_progress); demand_empty_rest_of_line (); } @@ -2834,7 +2817,7 @@ as_warn (_(".val pseudo-op used outside of .def/.endef ignored.")); demand_empty_rest_of_line (); return; - } /* if not inside .def/.endef */ + } if (is_name_beginner (*input_line_pointer)) { @@ -2849,7 +2832,7 @@ { def_symbol_in_progress->sy_frag = frag_now; S_SET_VALUE (def_symbol_in_progress, (valueT) frag_now_fix ()); - /* If the .val is != from the .def (e.g. statics) */ + /* If the .val is != from the .def (e.g. statics). */ } else if (strcmp (S_GET_NAME (def_symbol_in_progress), symbol_name)) { @@ -2918,13 +2901,13 @@ } /* This function runs through the symbol table and puts all the - externals onto another chain */ + externals onto another chain. */ /* The chain of globals. */ symbolS *symbol_globalP; symbolS *symbol_global_lastP; -/* The chain of externals */ +/* The chain of externals. */ symbolS *symbol_externP; symbolS *symbol_extern_lastP; @@ -2961,7 +2944,7 @@ if (!SF_GET_DEBUG (symbolP)) { - /* Debug symbols do not need all this rubbish */ + /* Debug symbols do not need all this rubbish. */ symbolS *real_symbolP; /* L* and C_EFCN symbols never merge. */ @@ -2980,20 +2963,18 @@ list.) Because some pointers refer to the real symbol whereas no pointers refer to the debug symbol. */ c_symbol_merge (symbolP, real_symbolP); - /* Replace the current symbol by the real one */ + /* Replace the current symbol by the real one. */ /* The symbols will never be the last or the first because : 1st symbol is .file and 3 last symbols are - .text, .data, .bss */ + .text, .data, .bss. */ symbol_remove (real_symbolP, &symbol_rootP, &symbol_lastP); symbol_insert (real_symbolP, symbolP, &symbol_rootP, &symbol_lastP); symbol_remove (symbolP, &symbol_rootP, &symbol_lastP); symbolP = real_symbolP; - } /* if not local but dup'd */ + } if (flag_readonly_data_in_text && (S_GET_SEGMENT (symbolP) == SEG_E1)) - { - S_SET_SEGMENT (symbolP, SEG_E0); - } /* push data into text */ + S_SET_SEGMENT (symbolP, SEG_E0); resolve_symbol_value (symbolP); @@ -3003,17 +2984,15 @@ { S_SET_EXTERNAL (symbolP); } + else if (S_GET_SEGMENT (symbolP) == SEG_E0) - { - S_SET_STORAGE_CLASS (symbolP, C_LABEL); - } + S_SET_STORAGE_CLASS (symbolP, C_LABEL); + else - { - S_SET_STORAGE_CLASS (symbolP, C_STAT); - } + S_SET_STORAGE_CLASS (symbolP, C_STAT); } - /* Mainly to speed up if not -g */ + /* Mainly to speed up if not -g. */ if (SF_GET_PROCESS (symbolP)) { /* Handle the nested blocks auxiliary info. */ @@ -3022,8 +3001,10 @@ if (!strcmp (S_GET_NAME (symbolP), ".bb")) stack_push (block_stack, (char *) &symbolP); else - { /* .eb */ - register symbolS *begin_symbolP; + { + /* .eb */ + symbolS *begin_symbolP; + begin_symbolP = *(symbolS **) stack_pop (block_stack); if (begin_symbolP == (symbolS *) 0) as_warn (_("mismatched .eb")); @@ -3041,13 +3022,11 @@ last_functionP = symbolP; if (S_GET_NUMBER_AUXILIARY (symbolP) < 1) - { - S_SET_NUMBER_AUXILIARY (symbolP, 1); - } /* make it at least 1 */ + S_SET_NUMBER_AUXILIARY (symbolP, 1); /* Clobber possible stale .dim information. */ #if 0 - /* Iffed out by steve - this fries the lnnoptr info too */ + /* Iffed out by steve - this fries the lnnoptr info too. */ bzero (symbolP->sy_symbol.ost_auxent[0].x_sym.x_fcnary.x_ary.x_dimen, sizeof (symbolP->sy_symbol.ost_auxent[0].x_sym.x_fcnary.x_ary.x_dimen)); #endif @@ -3078,19 +3057,19 @@ else if (SF_GET_TAG (symbolP)) { /* First descriptor of a structure must point to - the first slot after the structure description. */ + the first slot after the structure description. */ last_tagP = symbolP; } else if (S_GET_STORAGE_CLASS (symbolP) == C_EOS) { - /* +2 take in account the current symbol */ + /* +2 take in account the current symbol. */ SA_SET_SYM_ENDNDX (last_tagP, symbol_number + 2); } else if (S_GET_STORAGE_CLASS (symbolP) == C_FILE) { /* If the filename was too long to fit in the - auxent, put it in the string table */ + auxent, put it in the string table. */ if (SA_GET_FILE_FNAME_ZEROS (symbolP) == 0 && SA_GET_FILE_FNAME_OFFSET (symbolP) != 0) { @@ -3102,8 +3081,8 @@ { S_SET_VALUE (symbolP, last_file_symno); last_file_symno = symbol_number; - } /* no one points at the first .file symbol */ - } /* if debug or tag or eos or file */ + } + } #ifdef tc_frob_coff_symbol tc_frob_coff_symbol (symbolP); @@ -3122,8 +3101,8 @@ if (SF_GET_LOCAL (symbolP)) { - /* remove C_EFCN and LOCAL (L...) symbols */ - /* next pointer remains valid */ + /* Remove C_EFCN and LOCAL (L...) symbols. */ + /* Next pointer remains valid. */ symbol_remove (symbolP, &symbol_rootP, &symbol_lastP); } @@ -3143,7 +3122,7 @@ #endif || S_GET_STORAGE_CLASS (symbolP) == C_WEAKEXT)) { - /* if external, Remove from the list */ + /* If external, Remove from the list. */ symbolS *hold = symbol_previous (symbolP); symbol_remove (symbolP, &symbol_rootP, &symbol_lastP); @@ -3165,7 +3144,6 @@ /* The O'Reilly COFF book says that defined global symbols come at the end of the symbol table, just before undefined global symbols. */ - symbol_remove (symbolP, &symbol_rootP, &symbol_lastP); symbol_clear_list_pointers (symbolP); symbol_append (symbolP, symbol_global_lastP, &symbol_globalP, @@ -3182,14 +3160,14 @@ else { symbolP->sy_name_offset = 0; - } /* fix "long" names */ + } symbolP->sy_number = symbol_number; symbol_number += 1 + S_GET_NUMBER_AUXILIARY (symbolP); - } /* if local symbol */ - } /* traverse the symbol list */ - return symbol_number; + } + } + return symbol_number; } static unsigned int @@ -3203,11 +3181,11 @@ { symbolS *tmp = *head; - /* append */ + /* Append. */ symbol_remove (tmp, head, tail); symbol_append (tmp, symbol_lastP, &symbol_rootP, &symbol_lastP); - /* and process */ + /* Process. */ if (SF_GET_STRING (tmp)) { tmp->sy_name_offset = string_byte_count; @@ -3215,12 +3193,13 @@ } else { + /* Fix "long" names. */ tmp->sy_name_offset = 0; - } /* fix "long" names */ + } tmp->sy_number = symbol_number; symbol_number += 1 + S_GET_NUMBER_AUXILIARY (tmp); - } /* append the entire extern chain */ + } return symbol_number; } @@ -3248,6 +3227,7 @@ return symbol_number; } + static void crawl_symbols (h, abfd) object_headers *h; @@ -3255,40 +3235,35 @@ { unsigned int i; - /* Initialize the stack used to keep track of the matching .bb .be */ + /* Initialize the stack used to keep track of the matching .bb .be. */ block_stack = stack_init (512, sizeof (symbolS *)); /* The symbol list should be ordered according to the following sequence - * order : - * . .file symbol - * . debug entries for functions - * . fake symbols for the sections, including .text .data and .bss - * . defined symbols - * . undefined symbols - * But this is not mandatory. The only important point is to put the - * undefined symbols at the end of the list. - */ + order : + . .file symbol + . debug entries for functions + . fake symbols for the sections, including .text .data and .bss + . defined symbols + . undefined symbols + But this is not mandatory. The only important point is to put the + undefined symbols at the end of the list. */ /* Is there a .file symbol ? If not insert one at the beginning. */ if (symbol_rootP == NULL || S_GET_STORAGE_CLASS (symbol_rootP) != C_FILE) - { - c_dot_file_symbol ("fake"); - } + c_dot_file_symbol ("fake"); - /* - * Build up static symbols for the sections, they are filled in later - */ + /* Build up static symbols for the sections, they are filled in later. */ for (i = SEG_E0; i < SEG_LAST; i++) if (segment_info[i].scnhdr.s_name[0]) - segment_info[i].dot = c_section_symbol (segment_info[i].name, + segment_info[i].dot = c_section_symbol ((char *) segment_info[i].name, i - SEG_E0 + 1); - /* Take all the externals out and put them into another chain */ + /* Take all the externals out and put them into another chain. */ H_SET_SYMBOL_TABLE_SIZE (h, yank_symbols ()); - /* Take the externals and glue them onto the end.*/ + /* Take the externals and glue them onto the end. */ H_SET_SYMBOL_TABLE_SIZE (h, (H_GET_SYMBOL_COUNT (h) + glue_symbols (&symbol_globalP, @@ -3303,9 +3278,7 @@ know (symbol_extern_lastP == NULL); } -/* - * Find strings by crawling along symbol table chain. - */ +/* Find strings by crawling along symbol table chain. */ void w_strings (where) @@ -3314,7 +3287,7 @@ symbolS *symbolP; struct filename_list *filename_list_scan = filename_list_head; - /* Gotta do md_ byte-ordering stuff for string_byte_count first - KWK */ + /* Gotta do md_ byte-ordering stuff for string_byte_count first - KWK. */ md_number_to_chars (where, (valueT) string_byte_count, 4); where += 4; @@ -3386,7 +3359,7 @@ struct external_lineno *dst = buffer; /* Run through the table we've built and turn it into its external - form, take this chance to remove duplicates */ + form, take this chance to remove duplicates. */ for (line_ptr = s->lineno_list_head; line_ptr != (struct lineno_list *) NULL; @@ -3401,13 +3374,10 @@ ((symbolS *) line_ptr->line.l_addr.l_symndx)->sy_number; } else - { - line_ptr->line.l_addr.l_paddr += ((struct frag *) (line_ptr->frag))->fr_address; - } + line_ptr->line.l_addr.l_paddr += ((struct frag *) (line_ptr->frag))->fr_address; (void) bfd_coff_swap_lineno_out (abfd, &(line_ptr->line), dst); dst++; - } s->scnhdr.s_lnnoptr = *file_cursor; @@ -3418,12 +3388,13 @@ *file_cursor += s->scnhdr.s_nlnno * LINESZ; } } + H_SET_LINENO_SIZE (h, *file_cursor - start); } /* Now we run through the list of frag chains in a segment and make all the subsegment frags appear at the end of the - list, as if the seg 0 was extra long */ + list, as if the seg 0 was extra long. */ static void remove_subsegs () @@ -3448,6 +3419,7 @@ unsigned long machine; int coff_flags; + extern void write_object_file () { @@ -3506,9 +3478,7 @@ remove_subsegs (); for (i = SEG_E0; i < SEG_UNKNOWN; i++) - { - relax_segment (segment_info[i].frchainP->frch_root, i); - } + relax_segment (segment_info[i].frchainP->frch_root, i); /* Relaxation has completed. Freeze all syms. */ finalize_syms = 1; @@ -3562,7 +3532,7 @@ H_SET_BSS_SIZE (&headers, size); } - /* Turn the gas native symbol table shape into a coff symbol table */ + /* Turn the gas native symbol table shape into a coff symbol table. */ crawl_symbols (&headers, abfd); if (string_byte_count == 4) @@ -3596,8 +3566,7 @@ bfd_seek (abfd, (file_ptr) file_cursor, 0); - /* Plant the data */ - + /* Plant the data. */ fill_section (abfd, &headers, &file_cursor); do_relocs_for (abfd, &headers, &file_cursor); @@ -3692,28 +3661,26 @@ return (segT) i; } -/* - * implement the .section pseudo op: - * .section name {, "flags"} - * ^ ^ - * | +--- optional flags: 'b' for bss - * | 'i' for info - * +-- section name 'l' for lib - * 'n' for noload - * 'o' for over - * 'w' for data - * 'd' (apparently m88k for data) - * 'x' for text - * 'r' for read-only data - * But if the argument is not a quoted string, treat it as a - * subsegment number. - */ +/* Implement the .section pseudo op: + .section name {, "flags"} + ^ ^ + | +--- optional flags: 'b' for bss + | 'i' for info + +-- section name 'l' for lib + 'n' for noload + 'o' for over + 'w' for data + 'd' (apparently m88k for data) + 'x' for text + 'r' for read-only data + But if the argument is not a quoted string, treat it as a + subsegment number. */ void obj_coff_section (ignore) int ignore ATTRIBUTE_UNUSED; { - /* Strip out the section name */ + /* Strip out the section name. */ char *section_name, *name; char c; unsigned int exp; @@ -3810,11 +3777,12 @@ obj_coff_ident (ignore) int ignore ATTRIBUTE_UNUSED; { - segT current_seg = now_seg; /* save current seg */ + segT current_seg = now_seg; /* Save current seg. */ subsegT current_subseg = now_subseg; - subseg_new (".comment", 0); /* .comment seg */ - stringer (1); /* read string */ - subseg_set (current_seg, current_subseg); /* restore current seg */ + + subseg_new (".comment", 0); /* .comment seg. */ + stringer (1); /* Read string. */ + subseg_set (current_seg, current_subseg); /* Restore current seg. */ } void @@ -3826,20 +3794,16 @@ S_SET_STORAGE_CLASS (normal, S_GET_STORAGE_CLASS (debug)); if (S_GET_NUMBER_AUXILIARY (debug) > S_GET_NUMBER_AUXILIARY (normal)) - { - S_SET_NUMBER_AUXILIARY (normal, S_GET_NUMBER_AUXILIARY (debug)); - } /* take the most we have */ + S_SET_NUMBER_AUXILIARY (normal, S_GET_NUMBER_AUXILIARY (debug)); if (S_GET_NUMBER_AUXILIARY (debug) > 0) - { - memcpy ((char *) &normal->sy_symbol.ost_auxent[0], - (char *) &debug->sy_symbol.ost_auxent[0], - (unsigned int) (S_GET_NUMBER_AUXILIARY (debug) * AUXESZ)); - } /* Move all the auxiliary information */ + memcpy ((char *) &normal->sy_symbol.ost_auxent[0], + (char *) &debug->sy_symbol.ost_auxent[0], + (unsigned int) (S_GET_NUMBER_AUXILIARY (debug) * AUXESZ)); /* Move the debug flags. */ SF_SET_DEBUG_FIELD (normal, SF_GET_DEBUG_FIELD (debug)); -} /* c_symbol_merge() */ +} static int c_line_new (symbol, paddr, line_number, frag) @@ -3868,13 +3832,10 @@ new_line->next = (struct lineno_list *) NULL; if (s->lineno_list_head == (struct lineno_list *) NULL) - { - s->lineno_list_head = new_line; - } + s->lineno_list_head = new_line; else - { - s->lineno_list_tail->next = new_line; - } + s->lineno_list_tail->next = new_line; + s->lineno_list_tail = new_line; return LINESZ * s->scnhdr.s_nlnno++; } @@ -3898,7 +3859,7 @@ /* Filename is too long to fit into an auxent, we stick it into the string table instead. We keep a linked list of the filenames we find so we can emit - them later.*/ + them later. */ struct filename_list *f = ((struct filename_list *) xmalloc (sizeof (struct filename_list))); @@ -3922,29 +3883,23 @@ { extern int listing; if (listing) - { - listing_source_file (filename); - } - + listing_source_file (filename); } - #endif SF_SET_DEBUG (symbolP); S_SET_VALUE (symbolP, (valueT) previous_file_symbol); previous_file_symbol = symbolP; - /* Make sure that the symbol is first on the symbol chain */ + /* Make sure that the symbol is first on the symbol chain. */ if (symbol_rootP != symbolP) { symbol_remove (symbolP, &symbol_rootP, &symbol_lastP); symbol_insert (symbolP, symbol_rootP, &symbol_rootP, &symbol_lastP); } -} /* c_dot_file_symbol() */ +} -/* - * Build a 'section static' symbol. - */ +/* Build a 'section static' symbol. */ symbolS * c_section_symbol (name, idx) @@ -4004,7 +3959,7 @@ #endif /* TE_PE */ return symbolP; -} /* c_section_symbol() */ +} static void w_symbols (abfd, where, symbol_rootP) @@ -4015,7 +3970,7 @@ symbolS *symbolP; unsigned int i; - /* First fill in those values we have only just worked out */ + /* First fill in those values we have only just worked out. */ for (i = SEG_E0; i < SEG_LAST; i++) { symbolP = segment_info[i].dot; @@ -4027,23 +3982,19 @@ } } - /* - * Emit all symbols left in the symbol chain. - */ + /* Emit all symbols left in the symbol chain. */ for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP)) { /* Used to save the offset of the name. It is used to point - to the string in memory but must be a file offset. */ - register char *temp; + to the string in memory but must be a file offset. */ + char *temp; /* We can't fix the lnnoptr field in yank_symbols with the other adjustments, because we have to wait until we know where they go in the file. */ if (SF_GET_ADJ_LNNOPTR (symbolP)) - { - SA_GET_SYM_LNNOPTR (symbolP) += - segment_info[S_GET_SEGMENT (symbolP)].scnhdr.s_lnnoptr; - } + SA_GET_SYM_LNNOPTR (symbolP) += + segment_info[S_GET_SEGMENT (symbolP)].scnhdr.s_lnnoptr; tc_coff_symbol_emit_hook (symbolP); @@ -4061,8 +4012,7 @@ where = symbol_to_chars (abfd, where, symbolP); S_SET_NAME (symbolP, temp); } - -} /* w_symbols() */ +} static void obj_coff_lcomm (ignore) @@ -4112,7 +4062,7 @@ if (! need_pass_2) { char *p; - segT current_seg = now_seg; /* save current seg */ + segT current_seg = now_seg; /* Save current seg. */ subsegT current_subseg = now_subseg; subseg_set (SEG_E2, 1); @@ -4120,7 +4070,7 @@ p = frag_var(rs_org, 1, 1, (relax_substateT)0, symbolP, (offsetT) temp, (char *) 0); *p = 0; - subseg_set (current_seg, current_subseg); /* restore current seg */ + subseg_set (current_seg, current_subseg); /* Restore current seg. */ S_SET_SEGMENT (symbolP, SEG_E2); S_SET_STORAGE_CLASS (symbolP, C_STAT); } @@ -4139,6 +4089,7 @@ segT this_segment; { subseg_change (this_segment, 0); + while (frags) { switch (frags->fr_type) @@ -4177,16 +4128,16 @@ segment_info_type * segP; segT this_segment_type; { - register fixS * fixP; - register symbolS *add_symbolP; - register symbolS *sub_symbolP; + fixS * fixP; + symbolS *add_symbolP; + symbolS *sub_symbolP; long add_number; - register int size; - register char *place; - register long where; - register char pcrel; - register fragS *fragP; - register segT add_symbol_segment = absolute_section; + int size; + char *place; + long where; + char pcrel; + fragS *fragP; + segT add_symbol_segment = absolute_section; for (fixP = segP->fix_root; fixP; fixP = fixP->fx_next) { @@ -4274,9 +4225,7 @@ } if (add_symbolP) - { - add_symbol_segment = S_GET_SEGMENT (add_symbolP); - } /* if there is an addend */ + add_symbol_segment = S_GET_SEGMENT (add_symbolP); if (sub_symbolP) { @@ -4307,7 +4256,7 @@ } /* not absolute */ /* if sub_symbol is in the same segment that add_symbol - and add_symbol is either in DATA, TEXT, BSS or ABSOLUTE */ + and add_symbol is either in DATA, TEXT, BSS or ABSOLUTE. */ } else if (S_GET_SEGMENT (sub_symbolP) == add_symbol_segment && SEG_NORMAL (add_symbol_segment)) @@ -4319,10 +4268,8 @@ /* Makes no sense to use the difference of 2 arbitrary symbols as the target of a call instruction. */ if (fixP->fx_tcbit) - { - as_bad_where (fixP->fx_file, fixP->fx_line, - _("callj to difference of 2 symbols")); - } + as_bad_where (fixP->fx_file, fixP->fx_line, + _("callj to difference of 2 symbols")); #endif /* TC_I960 */ add_number += S_GET_VALUE (add_symbolP) - S_GET_VALUE (sub_symbolP); @@ -4345,9 +4292,8 @@ know (!(S_IS_EXTERNAL (sub_symbolP) && (S_GET_SEGMENT (sub_symbolP) == absolute_section))); if ((S_GET_SEGMENT (sub_symbolP) == absolute_section)) - { - add_number -= S_GET_VALUE (sub_symbolP); - } + add_number -= S_GET_VALUE (sub_symbolP); + #ifdef DIFF_EXPR_OK else if (S_GET_SEGMENT (sub_symbolP) == this_segment_type #if 0 /* Okay for 68k, at least... */ @@ -4371,25 +4317,22 @@ segment_name (S_GET_SEGMENT (sub_symbolP)), S_GET_NAME (sub_symbolP), (long) (fragP->fr_address + where)); - } /* if absolute */ + } } - } /* if sub_symbolP */ + } if (add_symbolP) { if (add_symbol_segment == this_segment_type && pcrel) { - /* - * This fixup was made when the symbol's segment was - * SEG_UNKNOWN, but it is now in the local segment. - * So we know how to do the address without relocation. - */ + /* This fixup was made when the symbol's segment was + SEG_UNKNOWN, but it is now in the local segment. + So we know how to do the address without relocation. */ #ifdef TC_I960 /* reloc_callj() may replace a 'call' with a 'calls' or a 'bal', - * in which cases it modifies *fixP as appropriate. In the case - * of a 'calls', no further work is required, and *fixP has been - * set up to make the rest of the code below a no-op. - */ + in which cases it modifies *fixP as appropriate. In the case + of a 'calls', no further work is required, and *fixP has been + set up to make the rest of the code below a no-op. */ reloc_callj (fixP); #endif /* TC_I960 */ @@ -4423,7 +4366,8 @@ { case absolute_section: #ifdef TC_I960 - reloc_callj (fixP); /* See comment about reloc_callj() above*/ + /* See comment about reloc_callj() above. */ + reloc_callj (fixP); #endif /* TC_I960 */ add_number += S_GET_VALUE (add_symbolP); add_symbolP = NULL; @@ -4451,16 +4395,15 @@ if ((int) fixP->fx_bit_fixP == 13) { /* This is a COBR instruction. They have only a - * 13-bit displacement and are only to be used - * for local branches: flag as error, don't generate - * relocation. - */ + 13-bit displacement and are only to be used + for local branches: flag as error, don't generate + relocation. */ as_bad_where (fixP->fx_file, fixP->fx_line, _("can't use COBR format with external label")); fixP->fx_addsy = NULL; fixP->fx_done = 1; continue; - } /* COBR */ + } #endif /* TC_I960 */ #if ((defined (TC_I386) || defined (TE_LYNX) || defined (TE_AUX)) && !defined(TE_PE)) || defined (COFF_COMMON_ADDEND) /* 386 COFF uses a peculiar format in which the @@ -4476,9 +4419,9 @@ #endif break; - } /* switch on symbol seg */ - } /* if not in local seg */ - } /* if there was a + symbol */ + } + } + } if (pcrel) { @@ -4488,9 +4431,7 @@ add_number -= md_pcrel_from (fixP); #endif if (add_symbolP == 0) - { - fixP->fx_addsy = &abs_symbol; - } /* if there's an add_symbol */ + fixP->fx_addsy = &abs_symbol; #if defined (TC_I386) || defined (TE_LYNX) || defined (TC_I960) || defined (TC_M68K) /* On the 386 we must adjust by the segment vaddr as well. Ian Taylor. @@ -4510,7 +4451,7 @@ add_number -= segP->scnhdr.s_vaddr; #endif - } /* if pcrel */ + } md_apply_fix3 (fixP, (valueT *) & add_number, this_segment_type); @@ -4549,9 +4490,9 @@ (long) add_number, (unsigned long) (fragP->fr_address + where)); #endif - } /* not a bit fix */ - } /* For each fixS in this segment. */ -} /* fixup_segment() */ + } + } +} #endif diff -Nur binutils-2.12/gas/config/obj-elf.c binutils-2.12.1/gas/config/obj-elf.c --- binutils-2.12/gas/config/obj-elf.c Mon Jan 28 08:34:39 2002 +++ binutils-2.12.1/gas/config/obj-elf.c Mon Apr 1 20:28:59 2002 @@ -595,6 +595,27 @@ { ".rodata", SHT_PROGBITS, SHF_ALLOC }, { ".rodata1", SHT_PROGBITS, SHF_ALLOC }, { ".text", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, +#if 0 + /* FIXME: The current gcc, as of 2002-03-03, will emit + + .section .init_array,"aw",@progbits + + for __attribute__ ((section (".init_array"))). "@progbits" marks + the incorrect section type. For now, we make them with + SHT_PROGBITS. BFD will fix the section type. Gcc should be changed + to emit + + .section .init_array + + */ + { ".init_array",SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE }, + { ".fini_array",SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE }, + { ".preinit_array",SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE }, +#else + { ".init_array",SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, + { ".fini_array",SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, + { ".preinit_array",SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +#endif #ifdef ELF_TC_SPECIAL_SECTIONS ELF_TC_SPECIAL_SECTIONS @@ -1408,7 +1429,9 @@ destelf->size = NULL; } S_SET_SIZE (dest, S_GET_SIZE (src)); - S_SET_OTHER (dest, S_GET_OTHER (src)); + /* Don't copy visibility. */ + S_SET_OTHER (dest, (ELF_ST_VISIBILITY (S_GET_OTHER (dest)) + | (S_GET_OTHER (src) & ~ELF_ST_VISIBILITY (-1)))); } void @@ -1838,6 +1861,8 @@ /* This will copy over the size information. */ copy_symbol_attributes (symp2, symp); + + S_SET_OTHER (symp2, S_GET_OTHER (symp)); if (S_IS_WEAK (symp)) S_SET_WEAK (symp2); diff -Nur binutils-2.12/gas/config/tc-arm.c binutils-2.12.1/gas/config/tc-arm.c --- binutils-2.12/gas/config/tc-arm.c Sat Jan 19 09:52:01 2002 +++ binutils-2.12.1/gas/config/tc-arm.c Sat May 11 11:13:29 2002 @@ -521,7 +521,7 @@ unsigned long regno; }; -static const struct vfp_reg vfp_regs[] = +static const struct vfp_reg vfp_regs[] = { {"fpsid", 0x00000000}, {"FPSID", 0x00000000}, @@ -842,7 +842,7 @@ static void do_mav_binops_3b PARAMS ((char *)); static void do_mav_binops_3c PARAMS ((char *)); static void do_mav_binops_3d PARAMS ((char *)); -static void do_mav_triple PARAMS ((char *, int, enum arm_reg_type, +static void do_mav_triple PARAMS ((char *, int, enum arm_reg_type, enum arm_reg_type, enum arm_reg_type)); static void do_mav_triple_4a PARAMS ((char *)); @@ -855,7 +855,7 @@ static void do_mav_triple_5f PARAMS ((char *)); static void do_mav_triple_5g PARAMS ((char *)); static void do_mav_triple_5h PARAMS ((char *)); -static void do_mav_quad PARAMS ((char *, int, enum arm_reg_type, +static void do_mav_quad PARAMS ((char *, int, enum arm_reg_type, enum arm_reg_type, enum arm_reg_type, enum arm_reg_type)); @@ -1106,7 +1106,7 @@ {"strh", 0xe00000b0, 3, ARM_EXT_V4, do_ldstv4}, /* ARM Architecture 4T. */ - /* Note: bx (and blx) are required on V5, even if the processor does + /* Note: bx (and blx) are required on V5, even if the processor does not support Thumb. */ {"bx", 0xe12fff10, 2, ARM_EXT_V4T | ARM_EXT_V5, do_bx}, @@ -6425,7 +6425,7 @@ static int vfp_dp_reg_required_here (str, pos) char **str; - enum vfp_sp_reg_pos pos; + enum vfp_dp_reg_pos pos; { int reg; char *start = *str; @@ -7447,7 +7447,9 @@ return; } } - else + /* Note - you cannot convert a subtract of 0 into an + add of 0 because the carry flag is set differently. */ + else if (offset > 0) subtract = 0; if (Rd == REG_SP) @@ -7927,7 +7929,7 @@ /* Restore the start point. */ *str = start; - + /* In the few cases where we might be able to accept something else this error can be overridden. */ inst.error = _(all_reg_maps[regtype].expected); diff -Nur binutils-2.12/gas/config/tc-hppa.c binutils-2.12.1/gas/config/tc-hppa.c --- binutils-2.12/gas/config/tc-hppa.c Sun Feb 17 18:12:09 2002 +++ binutils-2.12.1/gas/config/tc-hppa.c Mon Apr 1 20:29:02 2002 @@ -4459,7 +4459,7 @@ return; } - buf = fixP->fx_frag->fr_literal + fixP->fx_where; + buf = (unsigned char *) (fixP->fx_frag->fr_literal + fixP->fx_where); insn = bfd_get_32 (stdoutput, buf); fmt = bfd_hppa_insn2fmt (stdoutput, insn); @@ -8398,13 +8398,8 @@ { /* Relocation types which use e_lrsel. */ case R_PARISC_DIR21L: - case R_PARISC_DLTIND21L: case R_PARISC_DLTREL21L: case R_PARISC_DPREL21L: - case R_PARISC_LTOFF_FPTR21L: - case R_PARISC_LTOFF_TP21L: - case R_PARISC_PCREL21L: - case R_PARISC_PLABEL21L: case R_PARISC_PLTOFF21L: /* Relocation types which use e_rrsel. */ @@ -8412,24 +8407,15 @@ case R_PARISC_DIR14DR: case R_PARISC_DIR14WR: case R_PARISC_DIR17R: - case R_PARISC_DLTIND14R: - case R_PARISC_DLTIND14DR: - case R_PARISC_DLTIND14WR: case R_PARISC_DLTREL14R: case R_PARISC_DLTREL14DR: case R_PARISC_DLTREL14WR: case R_PARISC_DPREL14R: case R_PARISC_DPREL14DR: case R_PARISC_DPREL14WR: - case R_PARISC_PCREL14R: - case R_PARISC_PCREL17R: - case R_PARISC_PLABEL14R: - case R_PARISC_LTOFF_FPTR14R: - case R_PARISC_LTOFF_FPTR14DR: - case R_PARISC_LTOFF_FPTR14WR: - case R_PARISC_LTOFF_TP14R: - case R_PARISC_LTOFF_TP14DR: - case R_PARISC_LTOFF_TP14WR: + case R_PARISC_PLTOFF14R: + case R_PARISC_PLTOFF14DR: + case R_PARISC_PLTOFF14WR: /* Other types that we reject for reduction. */ case R_PARISC_GNU_VTENTRY: diff -Nur binutils-2.12/gas/config/tc-i386.c binutils-2.12.1/gas/config/tc-i386.c --- binutils-2.12/gas/config/tc-i386.c Fri Feb 15 09:21:07 2002 +++ binutils-2.12.1/gas/config/tc-i386.c Thu May 9 10:49:39 2002 @@ -48,20 +48,31 @@ #define SCALE1_WHEN_NO_INDEX 1 #endif -#ifndef true -#define true 1 +#ifdef BFD_ASSEMBLER +#define RELOC_ENUM enum bfd_reloc_code_real +#else +#define RELOC_ENUM int +#endif + +#ifndef DEFAULT_ARCH +#define DEFAULT_ARCH "i386" +#endif + +#ifndef INLINE +#if __GNUC__ >= 2 +#define INLINE __inline__ +#else +#define INLINE #endif -#ifndef false -#define false 0 #endif -static unsigned int mode_from_disp_size PARAMS ((unsigned int)); -static int fits_in_signed_byte PARAMS ((offsetT)); -static int fits_in_unsigned_byte PARAMS ((offsetT)); -static int fits_in_unsigned_word PARAMS ((offsetT)); -static int fits_in_signed_word PARAMS ((offsetT)); -static int fits_in_unsigned_long PARAMS ((offsetT)); -static int fits_in_signed_long PARAMS ((offsetT)); +static INLINE unsigned int mode_from_disp_size PARAMS ((unsigned int)); +static INLINE int fits_in_signed_byte PARAMS ((offsetT)); +static INLINE int fits_in_unsigned_byte PARAMS ((offsetT)); +static INLINE int fits_in_unsigned_word PARAMS ((offsetT)); +static INLINE int fits_in_signed_word PARAMS ((offsetT)); +static INLINE int fits_in_unsigned_long PARAMS ((offsetT)); +static INLINE int fits_in_signed_long PARAMS ((offsetT)); static int smallest_imm_type PARAMS ((offsetT)); static offsetT offset_in_range PARAMS ((offsetT, int)); static int add_prefix PARAMS ((unsigned int)); @@ -69,18 +80,36 @@ static void set_16bit_gcc_code_flag PARAMS ((int)); static void set_intel_syntax PARAMS ((int)); static void set_cpu_arch PARAMS ((int)); - -#ifdef BFD_ASSEMBLER -static bfd_reloc_code_real_type reloc - PARAMS ((int, int, int, bfd_reloc_code_real_type)); -#define RELOC_ENUM enum bfd_reloc_code_real -#else -#define RELOC_ENUM int +static char *output_invalid PARAMS ((int c)); +static int i386_operand PARAMS ((char *operand_string)); +static int i386_intel_operand PARAMS ((char *operand_string, int got_a_float)); +static const reg_entry *parse_register PARAMS ((char *reg_string, + char **end_op)); +static char *parse_insn PARAMS ((char *, char *)); +static char *parse_operands PARAMS ((char *, const char *)); +static void swap_operands PARAMS ((void)); +static void optimize_imm PARAMS ((void)); +static void optimize_disp PARAMS ((void)); +static int match_template PARAMS ((void)); +static int check_string PARAMS ((void)); +static int process_suffix PARAMS ((void)); +static int check_byte_reg PARAMS ((void)); +static int check_long_reg PARAMS ((void)); +static int check_qword_reg PARAMS ((void)); +static int check_word_reg PARAMS ((void)); +static int finalize_imm PARAMS ((void)); +static int process_operands PARAMS ((void)); +static const seg_entry *build_modrm_byte PARAMS ((void)); +static void output_insn PARAMS ((void)); +static void output_branch PARAMS ((void)); +static void output_jump PARAMS ((void)); +static void output_interseg_jump PARAMS ((void)); +static void output_imm PARAMS ((void)); +static void output_disp PARAMS ((void)); +#ifndef I386COFF +static void s_bss PARAMS ((int)); #endif -#ifndef DEFAULT_ARCH -#define DEFAULT_ARCH "i386" -#endif static const char *default_arch = DEFAULT_ARCH; /* 'md_assemble ()' gathers together information and puts it into a @@ -153,22 +182,20 @@ /* List of chars besides those in app.c:symbol_chars that can start an operand. Used to prevent the scrubber eating vital white-space. */ #ifdef LEX_AT -const char extra_symbol_chars[] = "*%-(@"; +const char extra_symbol_chars[] = "*%-(@["; #else -const char extra_symbol_chars[] = "*%-("; +const char extra_symbol_chars[] = "*%-(["; #endif +#if (defined (TE_I386AIX) \ + || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \ + && !defined (TE_LINUX) \ + && !defined (TE_FreeBSD) \ + && !defined (TE_NetBSD))) /* This array holds the chars that always start a comment. If the pre-processor is disabled, these aren't very useful. */ -#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && ! defined (TE_LINUX) && !defined(TE_FreeBSD) && !defined(TE_NetBSD)) -/* Putting '/' here makes it impossible to use the divide operator. - However, we need it for compatibility with SVR4 systems. */ const char comment_chars[] = "#/"; #define PREFIX_SEPARATOR '\\' -#else -const char comment_chars[] = "#"; -#define PREFIX_SEPARATOR '/' -#endif /* This array holds the chars that only start a comment at the beginning of a line. If the line seems to have the form '# 123 filename' @@ -178,9 +205,14 @@ #NO_APP at the beginning of its output. Also note that comments started like this one will always work if '/' isn't otherwise defined. */ -#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && ! defined (TE_LINUX) && !defined(TE_FreeBSD) && !defined(TE_NetBSD)) const char line_comment_chars[] = ""; + #else +/* Putting '/' here makes it impossible to use the divide operator. + However, we need it for compatibility with SVR4 systems. */ +const char comment_chars[] = "#"; +#define PREFIX_SEPARATOR '/' + const char line_comment_chars[] = "/"; #endif @@ -275,12 +307,15 @@ static const char *cpu_arch_name = NULL; /* CPU feature flags. */ -static unsigned int cpu_arch_flags = CpuUnknownFlags|CpuNo64; +static unsigned int cpu_arch_flags = CpuUnknownFlags | CpuNo64; /* If set, conditional jumps are not automatically promoted to handle larger than a byte offset. */ static unsigned int no_cond_jump_promotion = 0; +/* Pre-defined "_GLOBAL_OFFSET_TABLE_". */ +symbolS *GOT_symbol; + /* Interface to relax_segment. There are 3 major relax states for 386 jump insns because the different types of jumps add different sizes to frags when we're @@ -294,9 +329,9 @@ /* Sizes. */ #define CODE16 1 #define SMALL 0 -#define SMALL16 (SMALL|CODE16) +#define SMALL16 (SMALL | CODE16) #define BIG 2 -#define BIG16 (BIG|CODE16) +#define BIG16 (BIG | CODE16) #ifndef INLINE #ifdef __GNUC__ @@ -377,6 +412,43 @@ {NULL, 0 } }; +const pseudo_typeS md_pseudo_table[] = +{ +#if !defined(OBJ_AOUT) && !defined(USE_ALIGN_PTWO) + {"align", s_align_bytes, 0}, +#else + {"align", s_align_ptwo, 0}, +#endif + {"arch", set_cpu_arch, 0}, +#ifndef I386COFF + {"bss", s_bss, 0}, +#endif + {"ffloat", float_cons, 'f'}, + {"dfloat", float_cons, 'd'}, + {"tfloat", float_cons, 'x'}, + {"value", cons, 2}, + {"noopt", s_ignore, 0}, + {"optim", s_ignore, 0}, + {"code16gcc", set_16bit_gcc_code_flag, CODE_16BIT}, + {"code16", set_code_flag, CODE_16BIT}, + {"code32", set_code_flag, CODE_32BIT}, + {"code64", set_code_flag, CODE_64BIT}, + {"intel_syntax", set_intel_syntax, 1}, + {"att_syntax", set_intel_syntax, 0}, + {"file", dwarf2_directive_file, 0}, + {"loc", dwarf2_directive_loc, 0}, + {0, 0, 0} +}; + +/* For interface with expression (). */ +extern char *input_line_pointer; + +/* Hash table for instruction mnemonic lookup. */ +static struct hash_control *op_hash; + +/* Hash table for register lookup. */ +static struct hash_control *reg_hash; + void i386_align_code (fragP, count) fragS *fragP; @@ -471,18 +543,6 @@ } } -static char *output_invalid PARAMS ((int c)); -static int i386_operand PARAMS ((char *operand_string)); -static int i386_intel_operand PARAMS ((char *operand_string, int got_a_float)); -static const reg_entry *parse_register PARAMS ((char *reg_string, - char **end_op)); - -#ifndef I386COFF -static void s_bss PARAMS ((int)); -#endif - -symbolS *GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_". */ - static INLINE unsigned int mode_from_disp_size (t) unsigned int t; @@ -610,7 +670,8 @@ int ret = 1; int q; - if (prefix >= 0x40 && prefix < 0x50 && flag_code == CODE_64BIT) + if (prefix >= REX_OPCODE && prefix < REX_OPCODE + 16 + && flag_code == CODE_64BIT) q = REX_PREFIX; else switch (prefix) @@ -648,7 +709,7 @@ break; } - if (i.prefix[q]) + if (i.prefix[q] != 0) { as_bad (_("same type of prefix used twice")); return 0; @@ -695,7 +756,7 @@ int ask_naked_reg = 0; SKIP_WHITESPACE (); - if (! is_end_of_line[(unsigned char) *input_line_pointer]) + if (!is_end_of_line[(unsigned char) *input_line_pointer]) { char *string = input_line_pointer; int e = get_symbol_end (); @@ -732,7 +793,7 @@ { SKIP_WHITESPACE (); - if (! is_end_of_line[(unsigned char) *input_line_pointer]) + if (!is_end_of_line[(unsigned char) *input_line_pointer]) { char *string = input_line_pointer; int e = get_symbol_end (); @@ -758,7 +819,7 @@ no_cond_jump_promotion = 0; if (*input_line_pointer == ',' - && ! is_end_of_line[(unsigned char) input_line_pointer[1]]) + && !is_end_of_line[(unsigned char) input_line_pointer[1]]) { char *string = ++input_line_pointer; int e = get_symbol_end (); @@ -776,43 +837,6 @@ demand_empty_rest_of_line (); } -const pseudo_typeS md_pseudo_table[] = -{ -#if !defined(OBJ_AOUT) && !defined(USE_ALIGN_PTWO) - {"align", s_align_bytes, 0}, -#else - {"align", s_align_ptwo, 0}, -#endif - {"arch", set_cpu_arch, 0}, -#ifndef I386COFF - {"bss", s_bss, 0}, -#endif - {"ffloat", float_cons, 'f'}, - {"dfloat", float_cons, 'd'}, - {"tfloat", float_cons, 'x'}, - {"value", cons, 2}, - {"noopt", s_ignore, 0}, - {"optim", s_ignore, 0}, - {"code16gcc", set_16bit_gcc_code_flag, CODE_16BIT}, - {"code16", set_code_flag, CODE_16BIT}, - {"code32", set_code_flag, CODE_32BIT}, - {"code64", set_code_flag, CODE_64BIT}, - {"intel_syntax", set_intel_syntax, 1}, - {"att_syntax", set_intel_syntax, 0}, - {"file", dwarf2_directive_file, 0}, - {"loc", dwarf2_directive_loc, 0}, - {0, 0, 0} -}; - -/* For interface with expression (). */ -extern char *input_line_pointer; - -/* Hash table for instruction mnemonic lookup. */ -static struct hash_control *op_hash; - -/* Hash table for register lookup. */ -static struct hash_control *reg_hash; - #ifdef BFD_ASSEMBLER unsigned long i386_mach () @@ -835,8 +859,8 @@ op_hash = hash_new (); { - register const template *optab; - register templates *core_optab; + const template *optab; + templates *core_optab; /* Setup for loop. */ optab = i386_optab; @@ -872,7 +896,7 @@ /* Initialize reg_hash hash table. */ reg_hash = hash_new (); { - register const reg_entry *regtab; + const reg_entry *regtab; for (regtab = i386_regtab; regtab < i386_regtab + sizeof (i386_regtab) / sizeof (i386_regtab[0]); @@ -888,8 +912,8 @@ /* Fill in lexical tables: mnemonic_chars, operand_chars. */ { - register int c; - register char *p; + int c; + char *p; for (c = 0; c < 256; c++) { @@ -978,7 +1002,10 @@ fprintf (stdout, " sib: base %x index %x scale %x\n", x->sib.base, x->sib.index, x->sib.scale); fprintf (stdout, " rex: 64bit %x extX %x extY %x extZ %x\n", - x->rex.mode64, x->rex.extX, x->rex.extY, x->rex.extZ); + (x->rex & REX_MODE64) != 0, + (x->rex & REX_EXTX) != 0, + (x->rex & REX_EXTY) != 0, + (x->rex & REX_EXTZ) != 0); for (i = 0; i < x->operands; i++) { fprintf (stdout, " #%d: ", i + 1); @@ -1053,7 +1080,7 @@ char *tname; } -type_names[] = +static const type_names[] = { { Reg8, "r8" }, { Reg16, "r16" }, @@ -1093,7 +1120,7 @@ pt (t) unsigned int t; { - register struct type_name *ty; + const struct type_name *ty; for (ty = type_names; ty->mask; ty++) if (t & ty->mask) @@ -1119,6 +1146,8 @@ } #ifdef BFD_ASSEMBLER +static bfd_reloc_code_real_type reloc + PARAMS ((int, int, int, bfd_reloc_code_real_type)); static bfd_reloc_code_real_type reloc (size, pcrel, sign, other) @@ -1212,11 +1241,11 @@ #define BFD_RELOC_X86_64_GOTPCREL 0 #endif -static int intel_float_operand PARAMS ((char *mnemonic)); +static int intel_float_operand PARAMS ((const char *mnemonic)); static int intel_float_operand (mnemonic) - char *mnemonic; + const char *mnemonic; { if (mnemonic[0] == 'f' && mnemonic[1] == 'i') return 2; @@ -1235,11 +1264,7 @@ md_assemble (line) char *line; { - /* Points to template once we've found it. */ - const template *t; - int j; - char mnemonic[MAX_MNEM_SIZE]; /* Initialize globals. */ @@ -1253,1908 +1278,2075 @@ /* First parse an instruction mnemonic & call i386_operand for the operands. We assume that the scrubber has arranged it so that line[0] is the valid start of a (possibly prefixed) mnemonic. */ - { - char *l = line; - char *token_start = l; - char *mnem_p; - /* Non-zero if we found a prefix only acceptable with string insns. */ - const char *expecting_string_instruction = NULL; + line = parse_insn (line, mnemonic); + if (line == NULL) + return; + + line = parse_operands (line, mnemonic); + if (line == NULL) + return; - while (1) - { - mnem_p = mnemonic; - while ((*mnem_p = mnemonic_chars[(unsigned char) *l]) != 0) - { - mnem_p++; - if (mnem_p >= mnemonic + sizeof (mnemonic)) - { - as_bad (_("no such instruction: `%s'"), token_start); - return; - } - l++; - } - if (!is_space_char (*l) - && *l != END_OF_INSN - && *l != PREFIX_SEPARATOR - && *l != ',') - { - as_bad (_("invalid character %s in mnemonic"), - output_invalid (*l)); - return; - } - if (token_start == l) - { - if (*l == PREFIX_SEPARATOR) - as_bad (_("expecting prefix; got nothing")); - else - as_bad (_("expecting mnemonic; got nothing")); - return; - } + /* Now we've parsed the mnemonic into a set of templates, and have the + operands at hand. */ - /* Look up instruction (or prefix) via hash table. */ - current_templates = hash_find (op_hash, mnemonic); + /* All intel opcodes have reversed operands except for "bound" and + "enter". We also don't reverse intersegment "jmp" and "call" + instructions with 2 immediate operands so that the immediate segment + precedes the offset, as it does when in AT&T mode. "enter" and the + intersegment "jmp" and "call" instructions are the only ones that + have two immediate operands. */ + if (intel_syntax && i.operands > 1 + && (strcmp (mnemonic, "bound") != 0) + && !((i.types[0] & Imm) && (i.types[1] & Imm))) + swap_operands (); - if (*l != END_OF_INSN - && (! is_space_char (*l) || l[1] != END_OF_INSN) - && current_templates - && (current_templates->start->opcode_modifier & IsPrefix)) - { - /* If we are in 16-bit mode, do not allow addr16 or data16. - Similarly, in 32-bit mode, do not allow addr32 or data32. */ - if ((current_templates->start->opcode_modifier & (Size16 | Size32)) - && flag_code != CODE_64BIT - && (((current_templates->start->opcode_modifier & Size32) != 0) - ^ (flag_code == CODE_16BIT))) - { - as_bad (_("redundant %s prefix"), - current_templates->start->name); - return; - } - /* Add prefix, checking for repeated prefixes. */ - switch (add_prefix (current_templates->start->base_opcode)) - { - case 0: - return; - case 2: - expecting_string_instruction = current_templates->start->name; - break; - } - /* Skip past PREFIX_SEPARATOR and reset token_start. */ - token_start = ++l; - } - else - break; - } + if (i.imm_operands) + optimize_imm (); - if (!current_templates) - { - /* See if we can get a match by trimming off a suffix. */ - switch (mnem_p[-1]) - { - case WORD_MNEM_SUFFIX: - case BYTE_MNEM_SUFFIX: - case QWORD_MNEM_SUFFIX: - i.suffix = mnem_p[-1]; - mnem_p[-1] = '\0'; - current_templates = hash_find (op_hash, mnemonic); - break; - case SHORT_MNEM_SUFFIX: - case LONG_MNEM_SUFFIX: - if (!intel_syntax) - { - i.suffix = mnem_p[-1]; - mnem_p[-1] = '\0'; - current_templates = hash_find (op_hash, mnemonic); - } - break; + if (i.disp_operands) + optimize_disp (); - /* Intel Syntax. */ - case 'd': - if (intel_syntax) - { - if (intel_float_operand (mnemonic)) - i.suffix = SHORT_MNEM_SUFFIX; - else - i.suffix = LONG_MNEM_SUFFIX; - mnem_p[-1] = '\0'; - current_templates = hash_find (op_hash, mnemonic); - } - break; - } - if (!current_templates) - { - as_bad (_("no such instruction: `%s'"), token_start); - return; - } - } + /* Next, we find a template that matches the given insn, + making sure the overlap of the given operands types is consistent + with the template operand types. */ - if (current_templates->start->opcode_modifier & (Jump | JumpByte)) - { - /* Check for a branch hint. We allow ",pt" and ",pn" for - predict taken and predict not taken respectively. - I'm not sure that branch hints actually do anything on loop - and jcxz insns (JumpByte) for current Pentium4 chips. They - may work in the future and it doesn't hurt to accept them - now. */ - if (l[0] == ',' && l[1] == 'p') - { - if (l[2] == 't') - { - if (! add_prefix (DS_PREFIX_OPCODE)) - return; - l += 3; - } - else if (l[2] == 'n') - { - if (! add_prefix (CS_PREFIX_OPCODE)) - return; - l += 3; - } - } - } - /* Any other comma loses. */ - if (*l == ',') - { - as_bad (_("invalid character %s in mnemonic"), - output_invalid (*l)); + if (!match_template ()) + return; + + /* Undo SYSV386_COMPAT brokenness when in Intel mode. See i386.h */ + if (SYSV386_COMPAT + && intel_syntax + && (i.tm.base_opcode & 0xfffffde0) == 0xdce0) + i.tm.base_opcode ^= FloatR; + + if (i.tm.opcode_modifier & FWait) + if (!add_prefix (FWAIT_OPCODE)) + return; + + /* Check string instruction segment overrides. */ + if ((i.tm.opcode_modifier & IsString) != 0 && i.mem_operands != 0) + { + if (!check_string ()) return; - } + } - /* Check if instruction is supported on specified architecture. */ - if ((current_templates->start->cpu_flags & ~(Cpu64 | CpuNo64)) - & ~(cpu_arch_flags & ~(Cpu64 | CpuNo64))) - { - as_warn (_("`%s' is not supported on `%s'"), - current_templates->start->name, cpu_arch_name); - } - else if ((Cpu386 & ~cpu_arch_flags) && (flag_code != CODE_16BIT)) - { - as_warn (_("use .code16 to ensure correct addressing mode")); - } + if (!process_suffix ()) + return; - /* Check for rep/repne without a string instruction. */ - if (expecting_string_instruction - && !(current_templates->start->opcode_modifier & IsString)) - { - as_bad (_("expecting string instruction after `%s'"), - expecting_string_instruction); + /* Make still unresolved immediate matches conform to size of immediate + given in i.suffix. */ + if (!finalize_imm ()) + return; + + if (i.types[0] & Imm1) + i.imm_operands = 0; /* kludge for shift insns. */ + if (i.types[0] & ImplicitRegister) + i.reg_operands--; + if (i.types[1] & ImplicitRegister) + i.reg_operands--; + if (i.types[2] & ImplicitRegister) + i.reg_operands--; + + if (i.tm.opcode_modifier & ImmExt) + { + /* These AMD 3DNow! and Intel Katmai New Instructions have an + opcode suffix which is coded in the same place as an 8-bit + immediate field would be. Here we fake an 8-bit immediate + operand from the opcode suffix stored in tm.extension_opcode. */ + + expressionS *exp; + + assert (i.imm_operands == 0 && i.operands <= 2 && 2 < MAX_OPERANDS); + + exp = &im_expressions[i.imm_operands++]; + i.op[i.operands].imms = exp; + i.types[i.operands++] = Imm8; + exp->X_op = O_constant; + exp->X_add_number = i.tm.extension_opcode; + i.tm.extension_opcode = None; + } + + /* For insns with operands there are more diddles to do to the opcode. */ + if (i.operands) + { + if (!process_operands ()) return; - } + } + else if (!quiet_warnings && (i.tm.opcode_modifier & Ugh) != 0) + { + /* UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc. */ + as_warn (_("translating to `%sp'"), i.tm.name); + } - /* There may be operands to parse. */ - if (*l != END_OF_INSN) - { - /* 1 if operand is pending after ','. */ - unsigned int expecting_operand = 0; + /* Handle conversion of 'int $3' --> special int3 insn. */ + if (i.tm.base_opcode == INT_OPCODE && i.op[0].imms->X_add_number == 3) + { + i.tm.base_opcode = INT3_OPCODE; + i.imm_operands = 0; + } - /* Non-zero if operand parens not balanced. */ - unsigned int paren_not_balanced; + if ((i.tm.opcode_modifier & (Jump | JumpByte | JumpDword)) + && i.op[0].disps->X_op == O_constant) + { + /* Convert "jmp constant" (and "call constant") to a jump (call) to + the absolute address given by the constant. Since ix86 jumps and + calls are pc relative, we need to generate a reloc. */ + i.op[0].disps->X_add_symbol = &abs_symbol; + i.op[0].disps->X_op = O_symbol; + } - do - { - /* Skip optional white space before operand. */ - if (is_space_char (*l)) - ++l; - if (!is_operand_char (*l) && *l != END_OF_INSN) - { - as_bad (_("invalid character %s before operand %d"), - output_invalid (*l), - i.operands + 1); - return; - } - token_start = l; /* after white space */ - paren_not_balanced = 0; - while (paren_not_balanced || *l != ',') - { - if (*l == END_OF_INSN) - { - if (paren_not_balanced) - { - if (!intel_syntax) - as_bad (_("unbalanced parenthesis in operand %d."), - i.operands + 1); - else - as_bad (_("unbalanced brackets in operand %d."), - i.operands + 1); - return; - } - else - break; /* we are done */ - } - else if (!is_operand_char (*l) && !is_space_char (*l)) - { - as_bad (_("invalid character %s in operand %d"), - output_invalid (*l), - i.operands + 1); - return; - } - if (!intel_syntax) - { - if (*l == '(') - ++paren_not_balanced; - if (*l == ')') - --paren_not_balanced; - } - else - { - if (*l == '[') - ++paren_not_balanced; - if (*l == ']') - --paren_not_balanced; - } - l++; - } - if (l != token_start) - { /* Yes, we've read in another operand. */ - unsigned int operand_ok; - this_operand = i.operands++; - if (i.operands > MAX_OPERANDS) - { - as_bad (_("spurious operands; (%d operands/instruction max)"), - MAX_OPERANDS); - return; - } - /* Now parse operand adding info to 'i' as we go along. */ - END_STRING_AND_SAVE (l); - - if (intel_syntax) - operand_ok = - i386_intel_operand (token_start, - intel_float_operand (mnemonic)); - else - operand_ok = i386_operand (token_start); - - RESTORE_END_STRING (l); - if (!operand_ok) - return; - } - else - { - if (expecting_operand) - { - expecting_operand_after_comma: - as_bad (_("expecting operand after ','; got nothing")); - return; - } - if (*l == ',') - { - as_bad (_("expecting operand before ','; got nothing")); - return; - } - } + if ((i.tm.opcode_modifier & Rex64) != 0) + i.rex |= REX_MODE64; - /* Now *l must be either ',' or END_OF_INSN. */ - if (*l == ',') - { - if (*++l == END_OF_INSN) - { - /* Just skip it, if it's \n complain. */ - goto expecting_operand_after_comma; - } - expecting_operand = 1; - } - } - while (*l != END_OF_INSN); - } - } + /* For 8 bit registers we need an empty rex prefix. Also if the + instruction already has a prefix, we need to convert old + registers to new ones. */ + + if (((i.types[0] & Reg8) != 0 + && (i.op[0].regs->reg_flags & RegRex64) != 0) + || ((i.types[1] & Reg8) != 0 + && (i.op[1].regs->reg_flags & RegRex64) != 0) + || (((i.types[0] & Reg8) != 0 || (i.types[1] & Reg8) != 0) + && i.rex != 0)) + { + int x; - /* Now we've parsed the mnemonic into a set of templates, and have the - operands at hand. + i.rex |= REX_OPCODE; + for (x = 0; x < 2; x++) + { + /* Look for 8 bit operand that uses old registers. */ + if ((i.types[x] & Reg8) != 0 + && (i.op[x].regs->reg_flags & RegRex64) == 0) + { + /* In case it is "hi" register, give up. */ + if (i.op[x].regs->reg_num > 3) + as_bad (_("can't encode register '%%%s' in an instruction requiring REX prefix.\n"), + i.op[x].regs->reg_name); - Next, we find a template that matches the given insn, - making sure the overlap of the given operands types is consistent - with the template operand types. */ + /* Otherwise it is equivalent to the extended register. + Since the encoding doesn't change this is merely + cosmetic cleanup for debug output. */ -#define MATCH(overlap, given, template) \ - ((overlap & ~JumpAbsolute) \ - && ((given) & (BaseIndex|JumpAbsolute)) == ((overlap) & (BaseIndex|JumpAbsolute))) + i.op[x].regs = i.op[x].regs + 8; + } + } + } - /* If given types r0 and r1 are registers they must be of the same type - unless the expected operand type register overlap is null. - Note that Acc in a template matches every size of reg. */ -#define CONSISTENT_REGISTER_MATCH(m0, g0, t0, m1, g1, t1) \ - ( ((g0) & Reg) == 0 || ((g1) & Reg) == 0 || \ - ((g0) & Reg) == ((g1) & Reg) || \ - ((((m0) & Acc) ? Reg : (t0)) & (((m1) & Acc) ? Reg : (t1)) & Reg) == 0 ) + if (i.rex != 0) + add_prefix (REX_OPCODE | i.rex); - { - register unsigned int overlap0, overlap1; - unsigned int overlap2; - unsigned int found_reverse_match; - int suffix_check; - - /* All intel opcodes have reversed operands except for "bound" and - "enter". We also don't reverse intersegment "jmp" and "call" - instructions with 2 immediate operands so that the immediate segment - precedes the offset, as it does when in AT&T mode. "enter" and the - intersegment "jmp" and "call" instructions are the only ones that - have two immediate operands. */ - if (intel_syntax && i.operands > 1 - && (strcmp (mnemonic, "bound") != 0) - && !((i.types[0] & Imm) && (i.types[1] & Imm))) - { - union i386_op temp_op; - unsigned int temp_type; - RELOC_ENUM temp_reloc; - int xchg1 = 0; - int xchg2 = 0; + /* We are ready to output the insn. */ + output_insn (); +} - if (i.operands == 2) - { - xchg1 = 0; - xchg2 = 1; - } - else if (i.operands == 3) - { - xchg1 = 0; - xchg2 = 2; - } - temp_type = i.types[xchg2]; - i.types[xchg2] = i.types[xchg1]; - i.types[xchg1] = temp_type; - temp_op = i.op[xchg2]; - i.op[xchg2] = i.op[xchg1]; - i.op[xchg1] = temp_op; - temp_reloc = i.reloc[xchg2]; - i.reloc[xchg2] = i.reloc[xchg1]; - i.reloc[xchg1] = temp_reloc; +static char * +parse_insn (line, mnemonic) + char *line; + char *mnemonic; +{ + char *l = line; + char *token_start = l; + char *mnem_p; - if (i.mem_operands == 2) - { - const seg_entry *temp_seg; - temp_seg = i.seg[0]; - i.seg[0] = i.seg[1]; - i.seg[1] = temp_seg; - } - } + /* Non-zero if we found a prefix only acceptable with string insns. */ + const char *expecting_string_instruction = NULL; - if (i.imm_operands) - { - /* Try to ensure constant immediates are represented in the smallest - opcode possible. */ - char guess_suffix = 0; - int op; - - if (i.suffix) - guess_suffix = i.suffix; - else if (i.reg_operands) - { - /* Figure out a suffix from the last register operand specified. - We can't do this properly yet, ie. excluding InOutPortReg, - but the following works for instructions with immediates. - In any case, we can't set i.suffix yet. */ - for (op = i.operands; --op >= 0;) - if (i.types[op] & Reg) - { - if (i.types[op] & Reg8) - guess_suffix = BYTE_MNEM_SUFFIX; - else if (i.types[op] & Reg16) - guess_suffix = WORD_MNEM_SUFFIX; - else if (i.types[op] & Reg32) - guess_suffix = LONG_MNEM_SUFFIX; - else if (i.types[op] & Reg64) - guess_suffix = QWORD_MNEM_SUFFIX; - break; - } - } - else if ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0)) - guess_suffix = WORD_MNEM_SUFFIX; + while (1) + { + mnem_p = mnemonic; + while ((*mnem_p = mnemonic_chars[(unsigned char) *l]) != 0) + { + mnem_p++; + if (mnem_p >= mnemonic + MAX_MNEM_SIZE) + { + as_bad (_("no such instruction: `%s'"), token_start); + return NULL; + } + l++; + } + if (!is_space_char (*l) + && *l != END_OF_INSN + && *l != PREFIX_SEPARATOR + && *l != ',') + { + as_bad (_("invalid character %s in mnemonic"), + output_invalid (*l)); + return NULL; + } + if (token_start == l) + { + if (*l == PREFIX_SEPARATOR) + as_bad (_("expecting prefix; got nothing")); + else + as_bad (_("expecting mnemonic; got nothing")); + return NULL; + } - for (op = i.operands; --op >= 0;) - if (i.types[op] & Imm) + /* Look up instruction (or prefix) via hash table. */ + current_templates = hash_find (op_hash, mnemonic); + + if (*l != END_OF_INSN + && (!is_space_char (*l) || l[1] != END_OF_INSN) + && current_templates + && (current_templates->start->opcode_modifier & IsPrefix)) + { + /* If we are in 16-bit mode, do not allow addr16 or data16. + Similarly, in 32-bit mode, do not allow addr32 or data32. */ + if ((current_templates->start->opcode_modifier & (Size16 | Size32)) + && flag_code != CODE_64BIT + && (((current_templates->start->opcode_modifier & Size32) != 0) + ^ (flag_code == CODE_16BIT))) { - switch (i.op[op].imms->X_op) - { - case O_constant: - /* If a suffix is given, this operand may be shortened. */ - switch (guess_suffix) - { - case LONG_MNEM_SUFFIX: - i.types[op] |= Imm32 | Imm64; - break; - case WORD_MNEM_SUFFIX: - i.types[op] |= Imm16 | Imm32S | Imm32 | Imm64; - break; - case BYTE_MNEM_SUFFIX: - i.types[op] |= Imm16 | Imm8 | Imm8S | Imm32S | Imm32 | Imm64; - break; - } + as_bad (_("redundant %s prefix"), + current_templates->start->name); + return NULL; + } + /* Add prefix, checking for repeated prefixes. */ + switch (add_prefix (current_templates->start->base_opcode)) + { + case 0: + return NULL; + case 2: + expecting_string_instruction = current_templates->start->name; + break; + } + /* Skip past PREFIX_SEPARATOR and reset token_start. */ + token_start = ++l; + } + else + break; + } - /* If this operand is at most 16 bits, convert it - to a signed 16 bit number before trying to see - whether it will fit in an even smaller size. - This allows a 16-bit operand such as $0xffe0 to - be recognised as within Imm8S range. */ - if ((i.types[op] & Imm16) - && (i.op[op].imms->X_add_number & ~(offsetT) 0xffff) == 0) - { - i.op[op].imms->X_add_number = - (((i.op[op].imms->X_add_number & 0xffff) ^ 0x8000) - 0x8000); - } - if ((i.types[op] & Imm32) - && (i.op[op].imms->X_add_number & ~(((offsetT) 2 << 31) - 1)) == 0) - { - i.op[op].imms->X_add_number = - (i.op[op].imms->X_add_number ^ ((offsetT) 1 << 31)) - ((addressT) 1 << 31); - } - i.types[op] |= smallest_imm_type (i.op[op].imms->X_add_number); - /* We must avoid matching of Imm32 templates when 64bit only immediate is available. */ - if (guess_suffix == QWORD_MNEM_SUFFIX) - i.types[op] &= ~Imm32; - break; - case O_absent: - case O_register: - abort (); - /* Symbols and expressions. */ - default: - /* Convert symbolic operand to proper sizes for matching. */ - switch (guess_suffix) - { - case QWORD_MNEM_SUFFIX: - i.types[op] = Imm64 | Imm32S; - break; - case LONG_MNEM_SUFFIX: - i.types[op] = Imm32 | Imm64; - break; - case WORD_MNEM_SUFFIX: - i.types[op] = Imm16 | Imm32 | Imm64; - break; - break; - case BYTE_MNEM_SUFFIX: - i.types[op] = Imm8 | Imm8S | Imm16 | Imm32S | Imm32; - break; - break; - } - break; - } + if (!current_templates) + { + /* See if we can get a match by trimming off a suffix. */ + switch (mnem_p[-1]) + { + case WORD_MNEM_SUFFIX: + case BYTE_MNEM_SUFFIX: + case QWORD_MNEM_SUFFIX: + i.suffix = mnem_p[-1]; + mnem_p[-1] = '\0'; + current_templates = hash_find (op_hash, mnemonic); + break; + case SHORT_MNEM_SUFFIX: + case LONG_MNEM_SUFFIX: + if (!intel_syntax) + { + i.suffix = mnem_p[-1]; + mnem_p[-1] = '\0'; + current_templates = hash_find (op_hash, mnemonic); } - } + break; - if (i.disp_operands) - { - /* Try to use the smallest displacement type too. */ - int op; + /* Intel Syntax. */ + case 'd': + if (intel_syntax) + { + if (intel_float_operand (mnemonic)) + i.suffix = SHORT_MNEM_SUFFIX; + else + i.suffix = LONG_MNEM_SUFFIX; + mnem_p[-1] = '\0'; + current_templates = hash_find (op_hash, mnemonic); + } + break; + } + if (!current_templates) + { + as_bad (_("no such instruction: `%s'"), token_start); + return NULL; + } + } - for (op = i.operands; --op >= 0;) - if ((i.types[op] & Disp) - && i.op[op].disps->X_op == O_constant) + if (current_templates->start->opcode_modifier & (Jump | JumpByte)) + { + /* Check for a branch hint. We allow ",pt" and ",pn" for + predict taken and predict not taken respectively. + I'm not sure that branch hints actually do anything on loop + and jcxz insns (JumpByte) for current Pentium4 chips. They + may work in the future and it doesn't hurt to accept them + now. */ + if (l[0] == ',' && l[1] == 'p') + { + if (l[2] == 't') { - offsetT disp = i.op[op].disps->X_add_number; + if (!add_prefix (DS_PREFIX_OPCODE)) + return NULL; + l += 3; + } + else if (l[2] == 'n') + { + if (!add_prefix (CS_PREFIX_OPCODE)) + return NULL; + l += 3; + } + } + } + /* Any other comma loses. */ + if (*l == ',') + { + as_bad (_("invalid character %s in mnemonic"), + output_invalid (*l)); + return NULL; + } - if (i.types[op] & Disp16) - { - /* We know this operand is at most 16 bits, so - convert to a signed 16 bit number before trying - to see whether it will fit in an even smaller - size. */ + /* Check if instruction is supported on specified architecture. */ + if ((current_templates->start->cpu_flags & ~(Cpu64 | CpuNo64)) + & ~(cpu_arch_flags & ~(Cpu64 | CpuNo64))) + { + as_warn (_("`%s' is not supported on `%s'"), + current_templates->start->name, cpu_arch_name); + } + else if ((Cpu386 & ~cpu_arch_flags) && (flag_code != CODE_16BIT)) + { + as_warn (_("use .code16 to ensure correct addressing mode")); + } - disp = (((disp & 0xffff) ^ 0x8000) - 0x8000); - } - else if (i.types[op] & Disp32) - { - /* We know this operand is at most 32 bits, so convert to a - signed 32 bit number before trying to see whether it will - fit in an even smaller size. */ - disp &= (((offsetT) 2 << 31) - 1); - disp = (disp ^ ((offsetT) 1 << 31)) - ((addressT) 1 << 31); - } - if (flag_code == CODE_64BIT) + /* Check for rep/repne without a string instruction. */ + if (expecting_string_instruction + && !(current_templates->start->opcode_modifier & IsString)) + { + as_bad (_("expecting string instruction after `%s'"), + expecting_string_instruction); + return NULL; + } + + return l; +} + +static char * +parse_operands (l, mnemonic) + char *l; + const char *mnemonic; +{ + char *token_start; + + /* 1 if operand is pending after ','. */ + unsigned int expecting_operand = 0; + + /* Non-zero if operand parens not balanced. */ + unsigned int paren_not_balanced; + + while (*l != END_OF_INSN) + { + /* Skip optional white space before operand. */ + if (is_space_char (*l)) + ++l; + if (!is_operand_char (*l) && *l != END_OF_INSN) + { + as_bad (_("invalid character %s before operand %d"), + output_invalid (*l), + i.operands + 1); + return NULL; + } + token_start = l; /* after white space */ + paren_not_balanced = 0; + while (paren_not_balanced || *l != ',') + { + if (*l == END_OF_INSN) + { + if (paren_not_balanced) { - if (fits_in_signed_long (disp)) - i.types[op] |= Disp32S; - if (fits_in_unsigned_long (disp)) - i.types[op] |= Disp32; + if (!intel_syntax) + as_bad (_("unbalanced parenthesis in operand %d."), + i.operands + 1); + else + as_bad (_("unbalanced brackets in operand %d."), + i.operands + 1); + return NULL; } - if ((i.types[op] & (Disp32 | Disp32S | Disp16)) - && fits_in_signed_byte (disp)) - i.types[op] |= Disp8; + else + break; /* we are done */ } - } + else if (!is_operand_char (*l) && !is_space_char (*l)) + { + as_bad (_("invalid character %s in operand %d"), + output_invalid (*l), + i.operands + 1); + return NULL; + } + if (!intel_syntax) + { + if (*l == '(') + ++paren_not_balanced; + if (*l == ')') + --paren_not_balanced; + } + else + { + if (*l == '[') + ++paren_not_balanced; + if (*l == ']') + --paren_not_balanced; + } + l++; + } + if (l != token_start) + { /* Yes, we've read in another operand. */ + unsigned int operand_ok; + this_operand = i.operands++; + if (i.operands > MAX_OPERANDS) + { + as_bad (_("spurious operands; (%d operands/instruction max)"), + MAX_OPERANDS); + return NULL; + } + /* Now parse operand adding info to 'i' as we go along. */ + END_STRING_AND_SAVE (l); - overlap0 = 0; - overlap1 = 0; - overlap2 = 0; - found_reverse_match = 0; - suffix_check = (i.suffix == BYTE_MNEM_SUFFIX - ? No_bSuf - : (i.suffix == WORD_MNEM_SUFFIX - ? No_wSuf - : (i.suffix == SHORT_MNEM_SUFFIX - ? No_sSuf - : (i.suffix == LONG_MNEM_SUFFIX - ? No_lSuf - : (i.suffix == QWORD_MNEM_SUFFIX - ? No_qSuf - : (i.suffix == LONG_DOUBLE_MNEM_SUFFIX ? No_xSuf : 0)))))); - - for (t = current_templates->start; - t < current_templates->end; - t++) - { - /* Must have right number of operands. */ - if (i.operands != t->operands) - continue; + if (intel_syntax) + operand_ok = + i386_intel_operand (token_start, + intel_float_operand (mnemonic)); + else + operand_ok = i386_operand (token_start); + + RESTORE_END_STRING (l); + if (!operand_ok) + return NULL; + } + else + { + if (expecting_operand) + { + expecting_operand_after_comma: + as_bad (_("expecting operand after ','; got nothing")); + return NULL; + } + if (*l == ',') + { + as_bad (_("expecting operand before ','; got nothing")); + return NULL; + } + } - /* Check the suffix, except for some instructions in intel mode. */ - if ((t->opcode_modifier & suffix_check) - && !(intel_syntax - && (t->opcode_modifier & IgnoreSize)) - && !(intel_syntax - && t->base_opcode == 0xd9 - && (t->extension_opcode == 5 /* 0xd9,5 "fldcw" */ - || t->extension_opcode == 7))) /* 0xd9,7 "f{n}stcw" */ - continue; + /* Now *l must be either ',' or END_OF_INSN. */ + if (*l == ',') + { + if (*++l == END_OF_INSN) + { + /* Just skip it, if it's \n complain. */ + goto expecting_operand_after_comma; + } + expecting_operand = 1; + } + } + return l; +} - /* Do not verify operands when there are none. */ - else if (!t->operands) - { - if (t->cpu_flags & ~cpu_arch_flags) - continue; - /* We've found a match; break out of loop. */ +static void +swap_operands () +{ + union i386_op temp_op; + unsigned int temp_type; + RELOC_ENUM temp_reloc; + int xchg1 = 0; + int xchg2 = 0; + + if (i.operands == 2) + { + xchg1 = 0; + xchg2 = 1; + } + else if (i.operands == 3) + { + xchg1 = 0; + xchg2 = 2; + } + temp_type = i.types[xchg2]; + i.types[xchg2] = i.types[xchg1]; + i.types[xchg1] = temp_type; + temp_op = i.op[xchg2]; + i.op[xchg2] = i.op[xchg1]; + i.op[xchg1] = temp_op; + temp_reloc = i.reloc[xchg2]; + i.reloc[xchg2] = i.reloc[xchg1]; + i.reloc[xchg1] = temp_reloc; + + if (i.mem_operands == 2) + { + const seg_entry *temp_seg; + temp_seg = i.seg[0]; + i.seg[0] = i.seg[1]; + i.seg[1] = temp_seg; + } +} + +/* Try to ensure constant immediates are represented in the smallest + opcode possible. */ +static void +optimize_imm () +{ + char guess_suffix = 0; + int op; + + if (i.suffix) + guess_suffix = i.suffix; + else if (i.reg_operands) + { + /* Figure out a suffix from the last register operand specified. + We can't do this properly yet, ie. excluding InOutPortReg, + but the following works for instructions with immediates. + In any case, we can't set i.suffix yet. */ + for (op = i.operands; --op >= 0;) + if (i.types[op] & Reg) + { + if (i.types[op] & Reg8) + guess_suffix = BYTE_MNEM_SUFFIX; + else if (i.types[op] & Reg16) + guess_suffix = WORD_MNEM_SUFFIX; + else if (i.types[op] & Reg32) + guess_suffix = LONG_MNEM_SUFFIX; + else if (i.types[op] & Reg64) + guess_suffix = QWORD_MNEM_SUFFIX; break; } + } + else if ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0)) + guess_suffix = WORD_MNEM_SUFFIX; - overlap0 = i.types[0] & t->operand_types[0]; - switch (t->operands) + for (op = i.operands; --op >= 0;) + if (i.types[op] & Imm) + { + switch (i.op[op].imms->X_op) { - case 1: - if (!MATCH (overlap0, i.types[0], t->operand_types[0])) - continue; - break; - case 2: - case 3: - overlap1 = i.types[1] & t->operand_types[1]; - if (!MATCH (overlap0, i.types[0], t->operand_types[0]) - || !MATCH (overlap1, i.types[1], t->operand_types[1]) - || !CONSISTENT_REGISTER_MATCH (overlap0, i.types[0], - t->operand_types[0], - overlap1, i.types[1], - t->operand_types[1])) + case O_constant: + /* If a suffix is given, this operand may be shortened. */ + switch (guess_suffix) { - /* Check if other direction is valid ... */ - if ((t->opcode_modifier & (D|FloatD)) == 0) - continue; + case LONG_MNEM_SUFFIX: + i.types[op] |= Imm32 | Imm64; + break; + case WORD_MNEM_SUFFIX: + i.types[op] |= Imm16 | Imm32S | Imm32 | Imm64; + break; + case BYTE_MNEM_SUFFIX: + i.types[op] |= Imm16 | Imm8 | Imm8S | Imm32S | Imm32 | Imm64; + break; + } - /* Try reversing direction of operands. */ - overlap0 = i.types[0] & t->operand_types[1]; - overlap1 = i.types[1] & t->operand_types[0]; - if (!MATCH (overlap0, i.types[0], t->operand_types[1]) - || !MATCH (overlap1, i.types[1], t->operand_types[0]) - || !CONSISTENT_REGISTER_MATCH (overlap0, i.types[0], - t->operand_types[1], - overlap1, i.types[1], - t->operand_types[0])) - { - /* Does not match either direction. */ - continue; - } - /* found_reverse_match holds which of D or FloatDR - we've found. */ - found_reverse_match = t->opcode_modifier & (D|FloatDR); + /* If this operand is at most 16 bits, convert it + to a signed 16 bit number before trying to see + whether it will fit in an even smaller size. + This allows a 16-bit operand such as $0xffe0 to + be recognised as within Imm8S range. */ + if ((i.types[op] & Imm16) + && (i.op[op].imms->X_add_number & ~(offsetT) 0xffff) == 0) + { + i.op[op].imms->X_add_number = + (((i.op[op].imms->X_add_number & 0xffff) ^ 0x8000) - 0x8000); } - /* Found a forward 2 operand match here. */ - else if (t->operands == 3) + if ((i.types[op] & Imm32) + && ((i.op[op].imms->X_add_number & ~(((offsetT) 2 << 31) - 1)) + == 0)) { - /* Here we make use of the fact that there are no - reverse match 3 operand instructions, and all 3 - operand instructions only need to be checked for - register consistency between operands 2 and 3. */ - overlap2 = i.types[2] & t->operand_types[2]; - if (!MATCH (overlap2, i.types[2], t->operand_types[2]) - || !CONSISTENT_REGISTER_MATCH (overlap1, i.types[1], - t->operand_types[1], - overlap2, i.types[2], - t->operand_types[2])) - - continue; + i.op[op].imms->X_add_number = ((i.op[op].imms->X_add_number + ^ ((offsetT) 1 << 31)) + - ((offsetT) 1 << 31)); } - /* Found either forward/reverse 2 or 3 operand match here: - slip through to break. */ - } - if (t->cpu_flags & ~cpu_arch_flags) - { - found_reverse_match = 0; - continue; - } - /* We've found a match; break out of loop. */ - break; - } - if (t == current_templates->end) - { - /* We found no match. */ - as_bad (_("suffix or operands invalid for `%s'"), - current_templates->start->name); - return; - } - - if (!quiet_warnings) - { - if (!intel_syntax - && ((i.types[0] & JumpAbsolute) - != (t->operand_types[0] & JumpAbsolute))) - { - as_warn (_("indirect %s without `*'"), t->name); - } + i.types[op] |= smallest_imm_type (i.op[op].imms->X_add_number); - if ((t->opcode_modifier & (IsPrefix|IgnoreSize)) - == (IsPrefix|IgnoreSize)) - { - /* Warn them that a data or address size prefix doesn't - affect assembly of the next line of code. */ - as_warn (_("stand-alone `%s' prefix"), t->name); - } - } - - /* Copy the template we found. */ - i.tm = *t; - if (found_reverse_match) - { - /* If we found a reverse match we must alter the opcode - direction bit. found_reverse_match holds bits to change - (different for int & float insns). */ + /* We must avoid matching of Imm32 templates when 64bit + only immediate is available. */ + if (guess_suffix == QWORD_MNEM_SUFFIX) + i.types[op] &= ~Imm32; + break; - i.tm.base_opcode ^= found_reverse_match; + case O_absent: + case O_register: + abort (); - i.tm.operand_types[0] = t->operand_types[1]; - i.tm.operand_types[1] = t->operand_types[0]; + /* Symbols and expressions. */ + default: + /* Convert symbolic operand to proper sizes for matching. */ + switch (guess_suffix) + { + case QWORD_MNEM_SUFFIX: + i.types[op] = Imm64 | Imm32S; + break; + case LONG_MNEM_SUFFIX: + i.types[op] = Imm32 | Imm64; + break; + case WORD_MNEM_SUFFIX: + i.types[op] = Imm16 | Imm32 | Imm64; + break; + break; + case BYTE_MNEM_SUFFIX: + i.types[op] = Imm8 | Imm8S | Imm16 | Imm32S | Imm32; + break; + break; + } + break; + } } +} - /* Undo SYSV386_COMPAT brokenness when in Intel mode. See i386.h */ - if (SYSV386_COMPAT - && intel_syntax - && (i.tm.base_opcode & 0xfffffde0) == 0xdce0) - i.tm.base_opcode ^= FloatR; - - if (i.tm.opcode_modifier & FWait) - if (! add_prefix (FWAIT_OPCODE)) - return; +/* Try to use the smallest displacement type too. */ +static void +optimize_disp () +{ + int op; - /* Check string instruction segment overrides. */ - if ((i.tm.opcode_modifier & IsString) != 0 && i.mem_operands != 0) + for (op = i.operands; --op >= 0;) + if ((i.types[op] & Disp) && i.op[op].disps->X_op == O_constant) { - int mem_op = (i.types[0] & AnyMem) ? 0 : 1; - if ((i.tm.operand_types[mem_op] & EsSeg) != 0) + offsetT disp = i.op[op].disps->X_add_number; + + if (i.types[op] & Disp16) { - if (i.seg[0] != NULL && i.seg[0] != &es) - { - as_bad (_("`%s' operand %d must use `%%es' segment"), - i.tm.name, - mem_op + 1); - return; - } - /* There's only ever one segment override allowed per instruction. - This instruction possibly has a legal segment override on the - second operand, so copy the segment to where non-string - instructions store it, allowing common code. */ - i.seg[0] = i.seg[1]; + /* We know this operand is at most 16 bits, so + convert to a signed 16 bit number before trying + to see whether it will fit in an even smaller + size. */ + + disp = (((disp & 0xffff) ^ 0x8000) - 0x8000); } - else if ((i.tm.operand_types[mem_op + 1] & EsSeg) != 0) + else if (i.types[op] & Disp32) { - if (i.seg[1] != NULL && i.seg[1] != &es) - { - as_bad (_("`%s' operand %d must use `%%es' segment"), - i.tm.name, - mem_op + 2); - return; - } + /* We know this operand is at most 32 bits, so convert to a + signed 32 bit number before trying to see whether it will + fit in an even smaller size. */ + disp &= (((offsetT) 2 << 31) - 1); + disp = (disp ^ ((offsetT) 1 << 31)) - ((addressT) 1 << 31); } + if (flag_code == CODE_64BIT) + { + if (fits_in_signed_long (disp)) + i.types[op] |= Disp32S; + if (fits_in_unsigned_long (disp)) + i.types[op] |= Disp32; + } + if ((i.types[op] & (Disp32 | Disp32S | Disp16)) + && fits_in_signed_byte (disp)) + i.types[op] |= Disp8; } +} - /* If matched instruction specifies an explicit instruction mnemonic - suffix, use it. */ - if (i.tm.opcode_modifier & (Size16 | Size32 | Size64)) - { - if (i.tm.opcode_modifier & Size16) - i.suffix = WORD_MNEM_SUFFIX; - else if (i.tm.opcode_modifier & Size64) - i.suffix = QWORD_MNEM_SUFFIX; - else - i.suffix = LONG_MNEM_SUFFIX; - } - else if (i.reg_operands) - { - /* If there's no instruction mnemonic suffix we try to invent one - based on register operands. */ - if (!i.suffix) - { - /* We take i.suffix from the last register operand specified, - Destination register type is more significant than source - register type. */ - int op; - for (op = i.operands; --op >= 0;) - if ((i.types[op] & Reg) - && !(i.tm.operand_types[op] & InOutPortReg)) - { - i.suffix = ((i.types[op] & Reg8) ? BYTE_MNEM_SUFFIX : - (i.types[op] & Reg16) ? WORD_MNEM_SUFFIX : - (i.types[op] & Reg64) ? QWORD_MNEM_SUFFIX : - LONG_MNEM_SUFFIX); - break; - } - } - else if (i.suffix == BYTE_MNEM_SUFFIX) - { - int op; - for (op = i.operands; --op >= 0;) - { - /* If this is an eight bit register, it's OK. If it's - the 16 or 32 bit version of an eight bit register, - we will just use the low portion, and that's OK too. */ - if (i.types[op] & Reg8) - continue; +static int +match_template () +{ + /* Points to template once we've found it. */ + const template *t; + unsigned int overlap0, overlap1, overlap2; + unsigned int found_reverse_match; + int suffix_check; + +#define MATCH(overlap, given, template) \ + ((overlap & ~JumpAbsolute) \ + && (((given) & (BaseIndex | JumpAbsolute)) \ + == ((overlap) & (BaseIndex | JumpAbsolute)))) - /* movzx and movsx should not generate this warning. */ - if (intel_syntax - && (i.tm.base_opcode == 0xfb7 - || i.tm.base_opcode == 0xfb6 - || i.tm.base_opcode == 0x63 - || i.tm.base_opcode == 0xfbe - || i.tm.base_opcode == 0xfbf)) - continue; + /* If given types r0 and r1 are registers they must be of the same type + unless the expected operand type register overlap is null. + Note that Acc in a template matches every size of reg. */ +#define CONSISTENT_REGISTER_MATCH(m0, g0, t0, m1, g1, t1) \ + (((g0) & Reg) == 0 || ((g1) & Reg) == 0 \ + || ((g0) & Reg) == ((g1) & Reg) \ + || ((((m0) & Acc) ? Reg : (t0)) & (((m1) & Acc) ? Reg : (t1)) & Reg) == 0 ) + + overlap0 = 0; + overlap1 = 0; + overlap2 = 0; + found_reverse_match = 0; + suffix_check = (i.suffix == BYTE_MNEM_SUFFIX + ? No_bSuf + : (i.suffix == WORD_MNEM_SUFFIX + ? No_wSuf + : (i.suffix == SHORT_MNEM_SUFFIX + ? No_sSuf + : (i.suffix == LONG_MNEM_SUFFIX + ? No_lSuf + : (i.suffix == QWORD_MNEM_SUFFIX + ? No_qSuf + : (i.suffix == LONG_DOUBLE_MNEM_SUFFIX + ? No_xSuf : 0)))))); + + for (t = current_templates->start; + t < current_templates->end; + t++) + { + /* Must have right number of operands. */ + if (i.operands != t->operands) + continue; + + /* Check the suffix, except for some instructions in intel mode. */ + if ((t->opcode_modifier & suffix_check) + && !(intel_syntax + && (t->opcode_modifier & IgnoreSize)) + && !(intel_syntax + && t->base_opcode == 0xd9 + && (t->extension_opcode == 5 /* 0xd9,5 "fldcw" */ + || t->extension_opcode == 7))) /* 0xd9,7 "f{n}stcw" */ + continue; - if ((i.types[op] & WordReg) && i.op[op].regs->reg_num < 4 -#if 0 - /* Check that the template allows eight bit regs - This kills insns such as `orb $1,%edx', which - maybe should be allowed. */ - && (i.tm.operand_types[op] & (Reg8|InOutPortReg)) -#endif - ) - { - /* Prohibit these changes in the 64bit mode, since - the lowering is more complicated. */ - if (flag_code == CODE_64BIT - && (i.tm.operand_types[op] & InOutPortReg) == 0) - as_bad (_("Incorrect register `%%%s' used with`%c' suffix"), - i.op[op].regs->reg_name, - i.suffix); -#if REGISTER_WARNINGS - if (!quiet_warnings - && (i.tm.operand_types[op] & InOutPortReg) == 0) - as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), - (i.op[op].regs - + (i.types[op] & Reg16 - ? REGNAM_AL - REGNAM_AX - : REGNAM_AL - REGNAM_EAX))->reg_name, - i.op[op].regs->reg_name, - i.suffix); -#endif - continue; - } - /* Any other register is bad. */ - if (i.types[op] & (Reg | RegMMX | RegXMM - | SReg2 | SReg3 - | Control | Debug | Test - | FloatReg | FloatAcc)) - { - as_bad (_("`%%%s' not allowed with `%s%c'"), - i.op[op].regs->reg_name, - i.tm.name, - i.suffix); - return; - } - } - } - else if (i.suffix == LONG_MNEM_SUFFIX) - { - int op; + /* Do not verify operands when there are none. */ + else if (!t->operands) + { + if (t->cpu_flags & ~cpu_arch_flags) + continue; + /* We've found a match; break out of loop. */ + break; + } - for (op = i.operands; --op >= 0;) - /* Reject eight bit registers, except where the template - requires them. (eg. movzb) */ - if ((i.types[op] & Reg8) != 0 - && (i.tm.operand_types[op] & (Reg16 | Reg32 | Acc)) != 0) - { - as_bad (_("`%%%s' not allowed with `%s%c'"), - i.op[op].regs->reg_name, - i.tm.name, - i.suffix); - return; - } - /* Warn if the e prefix on a general reg is missing. */ - else if ((!quiet_warnings || flag_code == CODE_64BIT) - && (i.types[op] & Reg16) != 0 - && (i.tm.operand_types[op] & (Reg32|Acc)) != 0) - { - /* Prohibit these changes in the 64bit mode, since - the lowering is more complicated. */ - if (flag_code == CODE_64BIT) - as_bad (_("Incorrect register `%%%s' used with`%c' suffix"), - i.op[op].regs->reg_name, - i.suffix); -#if REGISTER_WARNINGS - else - as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), - (i.op[op].regs + REGNAM_EAX - REGNAM_AX)->reg_name, - i.op[op].regs->reg_name, - i.suffix); -#endif - } - /* Warn if the r prefix on a general reg is missing. */ - else if ((i.types[op] & Reg64) != 0 - && (i.tm.operand_types[op] & (Reg32|Acc)) != 0) + overlap0 = i.types[0] & t->operand_types[0]; + switch (t->operands) + { + case 1: + if (!MATCH (overlap0, i.types[0], t->operand_types[0])) + continue; + break; + case 2: + case 3: + overlap1 = i.types[1] & t->operand_types[1]; + if (!MATCH (overlap0, i.types[0], t->operand_types[0]) + || !MATCH (overlap1, i.types[1], t->operand_types[1]) + || !CONSISTENT_REGISTER_MATCH (overlap0, i.types[0], + t->operand_types[0], + overlap1, i.types[1], + t->operand_types[1])) + { + /* Check if other direction is valid ... */ + if ((t->opcode_modifier & (D | FloatD)) == 0) + continue; + + /* Try reversing direction of operands. */ + overlap0 = i.types[0] & t->operand_types[1]; + overlap1 = i.types[1] & t->operand_types[0]; + if (!MATCH (overlap0, i.types[0], t->operand_types[1]) + || !MATCH (overlap1, i.types[1], t->operand_types[0]) + || !CONSISTENT_REGISTER_MATCH (overlap0, i.types[0], + t->operand_types[1], + overlap1, i.types[1], + t->operand_types[0])) { - as_bad (_("Incorrect register `%%%s' used with`%c' suffix"), - i.op[op].regs->reg_name, - i.suffix); + /* Does not match either direction. */ + continue; } - } - else if (i.suffix == QWORD_MNEM_SUFFIX) - { - int op; + /* found_reverse_match holds which of D or FloatDR + we've found. */ + found_reverse_match = t->opcode_modifier & (D | FloatDR); + } + /* Found a forward 2 operand match here. */ + else if (t->operands == 3) + { + /* Here we make use of the fact that there are no + reverse match 3 operand instructions, and all 3 + operand instructions only need to be checked for + register consistency between operands 2 and 3. */ + overlap2 = i.types[2] & t->operand_types[2]; + if (!MATCH (overlap2, i.types[2], t->operand_types[2]) + || !CONSISTENT_REGISTER_MATCH (overlap1, i.types[1], + t->operand_types[1], + overlap2, i.types[2], + t->operand_types[2])) - for (op = i.operands; --op >= 0; ) - /* Reject eight bit registers, except where the template - requires them. (eg. movzb) */ - if ((i.types[op] & Reg8) != 0 - && (i.tm.operand_types[op] & (Reg16|Reg32|Acc)) != 0) - { - as_bad (_("`%%%s' not allowed with `%s%c'"), - i.op[op].regs->reg_name, - i.tm.name, - i.suffix); - return; - } - /* Warn if the e prefix on a general reg is missing. */ - else if (((i.types[op] & Reg16) != 0 - || (i.types[op] & Reg32) != 0) - && (i.tm.operand_types[op] & (Reg32|Acc)) != 0) - { - /* Prohibit these changes in the 64bit mode, since - the lowering is more complicated. */ - as_bad (_("Incorrect register `%%%s' used with`%c' suffix"), - i.op[op].regs->reg_name, - i.suffix); - } - } - else if (i.suffix == WORD_MNEM_SUFFIX) - { - int op; - for (op = i.operands; --op >= 0;) - /* Reject eight bit registers, except where the template - requires them. (eg. movzb) */ - if ((i.types[op] & Reg8) != 0 - && (i.tm.operand_types[op] & (Reg16|Reg32|Acc)) != 0) - { - as_bad (_("`%%%s' not allowed with `%s%c'"), - i.op[op].regs->reg_name, - i.tm.name, - i.suffix); - return; - } - /* Warn if the e prefix on a general reg is present. */ - else if ((!quiet_warnings || flag_code == CODE_64BIT) - && (i.types[op] & Reg32) != 0 - && (i.tm.operand_types[op] & (Reg16|Acc)) != 0) - { - /* Prohibit these changes in the 64bit mode, since - the lowering is more complicated. */ - if (flag_code == CODE_64BIT) - as_bad (_("Incorrect register `%%%s' used with`%c' suffix"), - i.op[op].regs->reg_name, - i.suffix); - else + continue; + } + /* Found either forward/reverse 2 or 3 operand match here: + slip through to break. */ + } + if (t->cpu_flags & ~cpu_arch_flags) + { + found_reverse_match = 0; + continue; + } + /* We've found a match; break out of loop. */ + break; + } + + if (t == current_templates->end) + { + /* We found no match. */ + as_bad (_("suffix or operands invalid for `%s'"), + current_templates->start->name); + return 0; + } + + if (!quiet_warnings) + { + if (!intel_syntax + && ((i.types[0] & JumpAbsolute) + != (t->operand_types[0] & JumpAbsolute))) + { + as_warn (_("indirect %s without `*'"), t->name); + } + + if ((t->opcode_modifier & (IsPrefix | IgnoreSize)) + == (IsPrefix | IgnoreSize)) + { + /* Warn them that a data or address size prefix doesn't + affect assembly of the next line of code. */ + as_warn (_("stand-alone `%s' prefix"), t->name); + } + } + + /* Copy the template we found. */ + i.tm = *t; + if (found_reverse_match) + { + /* If we found a reverse match we must alter the opcode + direction bit. found_reverse_match holds bits to change + (different for int & float insns). */ + + i.tm.base_opcode ^= found_reverse_match; + + i.tm.operand_types[0] = t->operand_types[1]; + i.tm.operand_types[1] = t->operand_types[0]; + } + + return 1; +} + +static int +check_string () +{ + int mem_op = (i.types[0] & AnyMem) ? 0 : 1; + if ((i.tm.operand_types[mem_op] & EsSeg) != 0) + { + if (i.seg[0] != NULL && i.seg[0] != &es) + { + as_bad (_("`%s' operand %d must use `%%es' segment"), + i.tm.name, + mem_op + 1); + return 0; + } + /* There's only ever one segment override allowed per instruction. + This instruction possibly has a legal segment override on the + second operand, so copy the segment to where non-string + instructions store it, allowing common code. */ + i.seg[0] = i.seg[1]; + } + else if ((i.tm.operand_types[mem_op + 1] & EsSeg) != 0) + { + if (i.seg[1] != NULL && i.seg[1] != &es) + { + as_bad (_("`%s' operand %d must use `%%es' segment"), + i.tm.name, + mem_op + 2); + return 0; + } + } + return 1; +} + +static int +process_suffix () +{ + /* If matched instruction specifies an explicit instruction mnemonic + suffix, use it. */ + if (i.tm.opcode_modifier & (Size16 | Size32 | Size64)) + { + if (i.tm.opcode_modifier & Size16) + i.suffix = WORD_MNEM_SUFFIX; + else if (i.tm.opcode_modifier & Size64) + i.suffix = QWORD_MNEM_SUFFIX; + else + i.suffix = LONG_MNEM_SUFFIX; + } + else if (i.reg_operands) + { + /* If there's no instruction mnemonic suffix we try to invent one + based on register operands. */ + if (!i.suffix) + { + /* We take i.suffix from the last register operand specified, + Destination register type is more significant than source + register type. */ + int op; + for (op = i.operands; --op >= 0;) + if ((i.types[op] & Reg) + && !(i.tm.operand_types[op] & InOutPortReg)) + { + i.suffix = ((i.types[op] & Reg8) ? BYTE_MNEM_SUFFIX : + (i.types[op] & Reg16) ? WORD_MNEM_SUFFIX : + (i.types[op] & Reg64) ? QWORD_MNEM_SUFFIX : + LONG_MNEM_SUFFIX); + break; + } + } + else if (i.suffix == BYTE_MNEM_SUFFIX) + { + if (!check_byte_reg ()) + return 0; + } + else if (i.suffix == LONG_MNEM_SUFFIX) + { + if (!check_long_reg ()) + return 0; + } + else if (i.suffix == QWORD_MNEM_SUFFIX) + { + if (!check_qword_reg ()) + return 0; + } + else if (i.suffix == WORD_MNEM_SUFFIX) + { + if (!check_word_reg ()) + return 0; + } + else if (intel_syntax && (i.tm.opcode_modifier & IgnoreSize)) + /* Do nothing if the instruction is going to ignore the prefix. */ + ; + else + abort (); + } + else if ((i.tm.opcode_modifier & DefaultSize) && !i.suffix) + { + i.suffix = stackop_size; + } + + /* Change the opcode based on the operand size given by i.suffix; + We need not change things for byte insns. */ + + if (!i.suffix && (i.tm.opcode_modifier & W)) + { + as_bad (_("no instruction mnemonic suffix given and no register operands; can't size instruction")); + return 0; + } + + /* For movzx and movsx, need to check the register type. */ + if (intel_syntax + && (i.tm.base_opcode == 0xfb6 || i.tm.base_opcode == 0xfbe) + && i.suffix == BYTE_MNEM_SUFFIX) + { + unsigned int prefix = DATA_PREFIX_OPCODE; + + if ((i.op[1].regs->reg_type & Reg16) != 0) + if (!add_prefix (prefix)) + return 0; + } + + if (i.suffix && i.suffix != BYTE_MNEM_SUFFIX) + { + /* It's not a byte, select word/dword operation. */ + if (i.tm.opcode_modifier & W) + { + if (i.tm.opcode_modifier & ShortForm) + i.tm.base_opcode |= 8; + else + i.tm.base_opcode |= 1; + } + + /* Now select between word & dword operations via the operand + size prefix, except for instructions that will ignore this + prefix anyway. */ + if (i.suffix != QWORD_MNEM_SUFFIX + && (i.suffix == LONG_MNEM_SUFFIX) == (flag_code == CODE_16BIT) + && !(i.tm.opcode_modifier & IgnoreSize)) + { + unsigned int prefix = DATA_PREFIX_OPCODE; + if (i.tm.opcode_modifier & JumpByte) /* jcxz, loop */ + prefix = ADDR_PREFIX_OPCODE; + + if (!add_prefix (prefix)) + return 0; + } + + if (i.suffix != QWORD_MNEM_SUFFIX && (flag_code == CODE_64BIT) + && !(i.tm.opcode_modifier & IgnoreSize) + && (i.tm.opcode_modifier & JumpByte)) + { + if (!add_prefix (ADDR_PREFIX_OPCODE)) + return 0; + } + + /* Set mode64 for an operand. */ + if (i.suffix == QWORD_MNEM_SUFFIX + && (i.tm.opcode_modifier & NoRex64) == 0) + { + i.rex |= REX_MODE64; + if (flag_code < CODE_64BIT) + { + as_bad (_("64bit operations available only in 64bit modes.")); + return 0; + } + } + + /* Size floating point instruction. */ + if (i.suffix == LONG_MNEM_SUFFIX) + { + if (i.tm.opcode_modifier & FloatMF) + i.tm.base_opcode ^= 4; + } + } + + return 1; +} + +static int +check_byte_reg () +{ + int op; + for (op = i.operands; --op >= 0;) + { + /* If this is an eight bit register, it's OK. If it's the 16 or + 32 bit version of an eight bit register, we will just use the + low portion, and that's OK too. */ + if (i.types[op] & Reg8) + continue; + + /* movzx and movsx should not generate this warning. */ + if (intel_syntax + && (i.tm.base_opcode == 0xfb7 + || i.tm.base_opcode == 0xfb6 + || i.tm.base_opcode == 0x63 + || i.tm.base_opcode == 0xfbe + || i.tm.base_opcode == 0xfbf)) + continue; + + if ((i.types[op] & WordReg) && i.op[op].regs->reg_num < 4 +#if 0 + /* Check that the template allows eight bit regs. This + kills insns such as `orb $1,%edx', which maybe should be + allowed. */ + && (i.tm.operand_types[op] & (Reg8 | InOutPortReg)) +#endif + ) + { + /* Prohibit these changes in the 64bit mode, since the + lowering is more complicated. */ + if (flag_code == CODE_64BIT + && (i.tm.operand_types[op] & InOutPortReg) == 0) + { + as_bad (_("Incorrect register `%%%s' used with `%c' suffix"), + i.op[op].regs->reg_name, + i.suffix); + return 0; + } #if REGISTER_WARNINGS - as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), - (i.op[op].regs + REGNAM_AX - REGNAM_EAX)->reg_name, - i.op[op].regs->reg_name, - i.suffix); + if (!quiet_warnings + && (i.tm.operand_types[op] & InOutPortReg) == 0) + as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), + (i.op[op].regs + (i.types[op] & Reg16 + ? REGNAM_AL - REGNAM_AX + : REGNAM_AL - REGNAM_EAX))->reg_name, + i.op[op].regs->reg_name, + i.suffix); #endif - } - } - else if (intel_syntax && (i.tm.opcode_modifier & IgnoreSize)) - /* Do nothing if the instruction is going to ignore the prefix. */ - ; - else - abort (); - } - else if ((i.tm.opcode_modifier & DefaultSize) && !i.suffix) + continue; + } + /* Any other register is bad. */ + if (i.types[op] & (Reg | RegMMX | RegXMM + | SReg2 | SReg3 + | Control | Debug | Test + | FloatReg | FloatAcc)) + { + as_bad (_("`%%%s' not allowed with `%s%c'"), + i.op[op].regs->reg_name, + i.tm.name, + i.suffix); + return 0; + } + } + return 1; +} + +static int +check_long_reg () +{ + int op; + + for (op = i.operands; --op >= 0;) + /* Reject eight bit registers, except where the template requires + them. (eg. movzb) */ + if ((i.types[op] & Reg8) != 0 + && (i.tm.operand_types[op] & (Reg16 | Reg32 | Acc)) != 0) { - i.suffix = stackop_size; + as_bad (_("`%%%s' not allowed with `%s%c'"), + i.op[op].regs->reg_name, + i.tm.name, + i.suffix); + return 0; } - /* Make still unresolved immediate matches conform to size of immediate - given in i.suffix. Note: overlap2 cannot be an immediate! */ - if ((overlap0 & (Imm8 | Imm8S | Imm16 | Imm32 | Imm32S)) - && overlap0 != Imm8 && overlap0 != Imm8S - && overlap0 != Imm16 && overlap0 != Imm32S - && overlap0 != Imm32 && overlap0 != Imm64) + /* Warn if the e prefix on a general reg is missing. */ + else if ((!quiet_warnings || flag_code == CODE_64BIT) + && (i.types[op] & Reg16) != 0 + && (i.tm.operand_types[op] & (Reg32 | Acc)) != 0) { - if (i.suffix) - { - overlap0 &= (i.suffix == BYTE_MNEM_SUFFIX ? (Imm8 | Imm8S) : - (i.suffix == WORD_MNEM_SUFFIX ? Imm16 : - (i.suffix == QWORD_MNEM_SUFFIX ? Imm64 | Imm32S : Imm32))); - } - else if (overlap0 == (Imm16 | Imm32S | Imm32) - || overlap0 == (Imm16 | Imm32) - || overlap0 == (Imm16 | Imm32S)) - { - overlap0 = - ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32S; - } - if (overlap0 != Imm8 && overlap0 != Imm8S - && overlap0 != Imm16 && overlap0 != Imm32S - && overlap0 != Imm32 && overlap0 != Imm64) + /* Prohibit these changes in the 64bit mode, since the + lowering is more complicated. */ + if (flag_code == CODE_64BIT) { - as_bad (_("no instruction mnemonic suffix given; can't determine immediate size")); - return; + as_bad (_("Incorrect register `%%%s' used with `%c' suffix"), + i.op[op].regs->reg_name, + i.suffix); + return 0; } +#if REGISTER_WARNINGS + else + as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), + (i.op[op].regs + REGNAM_EAX - REGNAM_AX)->reg_name, + i.op[op].regs->reg_name, + i.suffix); +#endif } - if ((overlap1 & (Imm8 | Imm8S | Imm16 | Imm32S | Imm32)) - && overlap1 != Imm8 && overlap1 != Imm8S - && overlap1 != Imm16 && overlap1 != Imm32S - && overlap1 != Imm32 && overlap1 != Imm64) + /* Warn if the r prefix on a general reg is missing. */ + else if ((i.types[op] & Reg64) != 0 + && (i.tm.operand_types[op] & (Reg32 | Acc)) != 0) { - if (i.suffix) - { - overlap1 &= (i.suffix == BYTE_MNEM_SUFFIX ? (Imm8 | Imm8S) : - (i.suffix == WORD_MNEM_SUFFIX ? Imm16 : - (i.suffix == QWORD_MNEM_SUFFIX ? Imm64 | Imm32S : Imm32))); - } - else if (overlap1 == (Imm16 | Imm32 | Imm32S) - || overlap1 == (Imm16 | Imm32) - || overlap1 == (Imm16 | Imm32S)) - { - overlap1 = - ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32S; - } - if (overlap1 != Imm8 && overlap1 != Imm8S - && overlap1 != Imm16 && overlap1 != Imm32S - && overlap1 != Imm32 && overlap1 != Imm64) - { - as_bad (_("no instruction mnemonic suffix given; can't determine immediate size %x %c"),overlap1, i.suffix); - return; - } + as_bad (_("Incorrect register `%%%s' used with `%c' suffix"), + i.op[op].regs->reg_name, + i.suffix); + return 0; } - assert ((overlap2 & Imm) == 0); + return 1; +} - i.types[0] = overlap0; - if (overlap0 & ImplicitRegister) - i.reg_operands--; - if (overlap0 & Imm1) - i.imm_operands = 0; /* kludge for shift insns. */ - - i.types[1] = overlap1; - if (overlap1 & ImplicitRegister) - i.reg_operands--; - - i.types[2] = overlap2; - if (overlap2 & ImplicitRegister) - i.reg_operands--; +static int +check_qword_reg () +{ + int op; - /* Finalize opcode. First, we change the opcode based on the operand - size given by i.suffix: We need not change things for byte insns. */ + for (op = i.operands; --op >= 0; ) + /* Reject eight bit registers, except where the template requires + them. (eg. movzb) */ + if ((i.types[op] & Reg8) != 0 + && (i.tm.operand_types[op] & (Reg16 | Reg32 | Acc)) != 0) + { + as_bad (_("`%%%s' not allowed with `%s%c'"), + i.op[op].regs->reg_name, + i.tm.name, + i.suffix); + return 0; + } + /* Warn if the e prefix on a general reg is missing. */ + else if (((i.types[op] & Reg16) != 0 + || (i.types[op] & Reg32) != 0) + && (i.tm.operand_types[op] & (Reg32 | Acc)) != 0) + { + /* Prohibit these changes in the 64bit mode, since the + lowering is more complicated. */ + as_bad (_("Incorrect register `%%%s' used with `%c' suffix"), + i.op[op].regs->reg_name, + i.suffix); + return 0; + } + return 1; +} - if (!i.suffix && (i.tm.opcode_modifier & W)) +static int +check_word_reg () +{ + int op; + for (op = i.operands; --op >= 0;) + /* Reject eight bit registers, except where the template requires + them. (eg. movzb) */ + if ((i.types[op] & Reg8) != 0 + && (i.tm.operand_types[op] & (Reg16 | Reg32 | Acc)) != 0) { - as_bad (_("no instruction mnemonic suffix given and no register operands; can't size instruction")); - return; + as_bad (_("`%%%s' not allowed with `%s%c'"), + i.op[op].regs->reg_name, + i.tm.name, + i.suffix); + return 0; + } + /* Warn if the e prefix on a general reg is present. */ + else if ((!quiet_warnings || flag_code == CODE_64BIT) + && (i.types[op] & Reg32) != 0 + && (i.tm.operand_types[op] & (Reg16 | Acc)) != 0) + { + /* Prohibit these changes in the 64bit mode, since the + lowering is more complicated. */ + if (flag_code == CODE_64BIT) + { + as_bad (_("Incorrect register `%%%s' used with `%c' suffix"), + i.op[op].regs->reg_name, + i.suffix); + return 0; + } + else +#if REGISTER_WARNINGS + as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), + (i.op[op].regs + REGNAM_AX - REGNAM_EAX)->reg_name, + i.op[op].regs->reg_name, + i.suffix); +#endif } + return 1; +} - /* For movzx and movsx, need to check the register type. */ - if (intel_syntax - && (i.tm.base_opcode == 0xfb6 || i.tm.base_opcode == 0xfbe)) - if (i.suffix && i.suffix == BYTE_MNEM_SUFFIX) - { - unsigned int prefix = DATA_PREFIX_OPCODE; +static int +finalize_imm () +{ + unsigned int overlap0, overlap1, overlap2; - if ((i.op[1].regs->reg_type & Reg16) != 0) - if (!add_prefix (prefix)) - return; + overlap0 = i.types[0] & i.tm.operand_types[0]; + if ((overlap0 & (Imm8 | Imm8S | Imm16 | Imm32 | Imm32S)) + && overlap0 != Imm8 && overlap0 != Imm8S + && overlap0 != Imm16 && overlap0 != Imm32S + && overlap0 != Imm32 && overlap0 != Imm64) + { + if (i.suffix) + { + overlap0 &= (i.suffix == BYTE_MNEM_SUFFIX + ? Imm8 | Imm8S + : (i.suffix == WORD_MNEM_SUFFIX + ? Imm16 + : (i.suffix == QWORD_MNEM_SUFFIX + ? Imm64 | Imm32S + : Imm32))); } + else if (overlap0 == (Imm16 | Imm32S | Imm32) + || overlap0 == (Imm16 | Imm32) + || overlap0 == (Imm16 | Imm32S)) + { + overlap0 = ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0) + ? Imm16 : Imm32S); + } + if (overlap0 != Imm8 && overlap0 != Imm8S + && overlap0 != Imm16 && overlap0 != Imm32S + && overlap0 != Imm32 && overlap0 != Imm64) + { + as_bad (_("no instruction mnemonic suffix given; can't determine immediate size")); + return 0; + } + } + i.types[0] = overlap0; - if (i.suffix && i.suffix != BYTE_MNEM_SUFFIX) - { - /* It's not a byte, select word/dword operation. */ - if (i.tm.opcode_modifier & W) - { - if (i.tm.opcode_modifier & ShortForm) - i.tm.base_opcode |= 8; - else - i.tm.base_opcode |= 1; - } - /* Now select between word & dword operations via the operand - size prefix, except for instructions that will ignore this - prefix anyway. */ - if (i.suffix != QWORD_MNEM_SUFFIX - && (i.suffix == LONG_MNEM_SUFFIX) == (flag_code == CODE_16BIT) - && !(i.tm.opcode_modifier & IgnoreSize)) - { - unsigned int prefix = DATA_PREFIX_OPCODE; - if (i.tm.opcode_modifier & JumpByte) /* jcxz, loop */ - prefix = ADDR_PREFIX_OPCODE; + overlap1 = i.types[1] & i.tm.operand_types[1]; + if ((overlap1 & (Imm8 | Imm8S | Imm16 | Imm32S | Imm32)) + && overlap1 != Imm8 && overlap1 != Imm8S + && overlap1 != Imm16 && overlap1 != Imm32S + && overlap1 != Imm32 && overlap1 != Imm64) + { + if (i.suffix) + { + overlap1 &= (i.suffix == BYTE_MNEM_SUFFIX + ? Imm8 | Imm8S + : (i.suffix == WORD_MNEM_SUFFIX + ? Imm16 + : (i.suffix == QWORD_MNEM_SUFFIX + ? Imm64 | Imm32S + : Imm32))); + } + else if (overlap1 == (Imm16 | Imm32 | Imm32S) + || overlap1 == (Imm16 | Imm32) + || overlap1 == (Imm16 | Imm32S)) + { + overlap1 = ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0) + ? Imm16 : Imm32S); + } + if (overlap1 != Imm8 && overlap1 != Imm8S + && overlap1 != Imm16 && overlap1 != Imm32S + && overlap1 != Imm32 && overlap1 != Imm64) + { + as_bad (_("no instruction mnemonic suffix given; can't determine immediate size %x %c"),overlap1, i.suffix); + return 0; + } + } + i.types[1] = overlap1; - if (! add_prefix (prefix)) - return; - } + overlap2 = i.types[2] & i.tm.operand_types[2]; + assert ((overlap2 & Imm) == 0); + i.types[2] = overlap2; - if (i.suffix != QWORD_MNEM_SUFFIX && (flag_code == CODE_64BIT) - && !(i.tm.opcode_modifier & IgnoreSize) - && (i.tm.opcode_modifier & JumpByte)) - { - if (! add_prefix (ADDR_PREFIX_OPCODE)) - return; - } + return 1; +} - /* Set mode64 for an operand. */ - if (i.suffix == QWORD_MNEM_SUFFIX - && !(i.tm.opcode_modifier & NoRex64)) - { - i.rex.mode64 = 1; - if (flag_code < CODE_64BIT) - { - as_bad (_("64bit operations available only in 64bit modes.")); - return; - } - } +static int +process_operands () +{ + /* Default segment register this instruction will use for memory + accesses. 0 means unknown. This is only for optimizing out + unnecessary segment overrides. */ + const seg_entry *default_seg = 0; + + /* The imul $imm, %reg instruction is converted into + imul $imm, %reg, %reg, and the clr %reg instruction + is converted into xor %reg, %reg. */ + if (i.tm.opcode_modifier & regKludge) + { + unsigned int first_reg_op = (i.types[0] & Reg) ? 0 : 1; + /* Pretend we saw the extra register operand. */ + assert (i.op[first_reg_op + 1].regs == 0); + i.op[first_reg_op + 1].regs = i.op[first_reg_op].regs; + i.types[first_reg_op + 1] = i.types[first_reg_op]; + i.reg_operands = 2; + } + + if (i.tm.opcode_modifier & ShortForm) + { + /* The register or float register operand is in operand 0 or 1. */ + unsigned int op = (i.types[0] & (Reg | FloatReg)) ? 0 : 1; + /* Register goes in low 3 bits of opcode. */ + i.tm.base_opcode |= i.op[op].regs->reg_num; + if ((i.op[op].regs->reg_flags & RegRex) != 0) + i.rex |= REX_EXTZ; + if (!quiet_warnings && (i.tm.opcode_modifier & Ugh) != 0) + { + /* Warn about some common errors, but press on regardless. + The first case can be generated by gcc (<= 2.8.1). */ + if (i.operands == 2) + { + /* Reversed arguments on faddp, fsubp, etc. */ + as_warn (_("translating to `%s %%%s,%%%s'"), i.tm.name, + i.op[1].regs->reg_name, + i.op[0].regs->reg_name); + } + else + { + /* Extraneous `l' suffix on fp insn. */ + as_warn (_("translating to `%s %%%s'"), i.tm.name, + i.op[0].regs->reg_name); + } + } + } + else if (i.tm.opcode_modifier & Modrm) + { + /* The opcode is completed (modulo i.tm.extension_opcode which + must be put into the modrm byte). + Now, we make the modrm & index base bytes based on all the + info we've collected. */ - /* Size floating point instruction. */ - if (i.suffix == LONG_MNEM_SUFFIX) - { - if (i.tm.opcode_modifier & FloatMF) - i.tm.base_opcode ^= 4; - } - } + default_seg = build_modrm_byte (); + } + else if (i.tm.opcode_modifier & (Seg2ShortForm | Seg3ShortForm)) + { + if (i.tm.base_opcode == POP_SEG_SHORT + && i.op[0].regs->reg_num == 1) + { + as_bad (_("you can't `pop %%cs'")); + return 0; + } + i.tm.base_opcode |= (i.op[0].regs->reg_num << 3); + if ((i.op[0].regs->reg_flags & RegRex) != 0) + i.rex |= REX_EXTZ; + } + else if ((i.tm.base_opcode & ~(D | W)) == MOV_AX_DISP32) + { + default_seg = &ds; + } + else if ((i.tm.opcode_modifier & IsString) != 0) + { + /* For the string instructions that allow a segment override + on one of their operands, the default segment is ds. */ + default_seg = &ds; + } - if (i.tm.opcode_modifier & ImmExt) - { - /* These AMD 3DNow! and Intel Katmai New Instructions have an - opcode suffix which is coded in the same place as an 8-bit - immediate field would be. Here we fake an 8-bit immediate - operand from the opcode suffix stored in tm.extension_opcode. */ - - expressionS *exp; - - assert (i.imm_operands == 0 && i.operands <= 2 && 2 < MAX_OPERANDS); - - exp = &im_expressions[i.imm_operands++]; - i.op[i.operands].imms = exp; - i.types[i.operands++] = Imm8; - exp->X_op = O_constant; - exp->X_add_number = i.tm.extension_opcode; - i.tm.extension_opcode = None; - } + /* If a segment was explicitly specified, + and the specified segment is not the default, + use an opcode prefix to select it. + If we never figured out what the default segment is, + then default_seg will be zero at this point, + and the specified segment prefix will always be used. */ + if ((i.seg[0]) && (i.seg[0] != default_seg)) + { + if (!add_prefix (i.seg[0]->seg_prefix)) + return 0; + } + return 1; +} - /* For insns with operands there are more diddles to do to the opcode. */ - if (i.operands) - { - /* Default segment register this instruction will use - for memory accesses. 0 means unknown. - This is only for optimizing out unnecessary segment overrides. */ - const seg_entry *default_seg = 0; - - /* The imul $imm, %reg instruction is converted into - imul $imm, %reg, %reg, and the clr %reg instruction - is converted into xor %reg, %reg. */ - if (i.tm.opcode_modifier & regKludge) - { - unsigned int first_reg_op = (i.types[0] & Reg) ? 0 : 1; - /* Pretend we saw the extra register operand. */ - assert (i.op[first_reg_op + 1].regs == 0); - i.op[first_reg_op + 1].regs = i.op[first_reg_op].regs; - i.types[first_reg_op + 1] = i.types[first_reg_op]; - i.reg_operands = 2; - } +static const seg_entry * +build_modrm_byte () +{ + const seg_entry *default_seg = 0; - if (i.tm.opcode_modifier & ShortForm) - { - /* The register or float register operand is in operand 0 or 1. */ - unsigned int op = (i.types[0] & (Reg | FloatReg)) ? 0 : 1; - /* Register goes in low 3 bits of opcode. */ - i.tm.base_opcode |= i.op[op].regs->reg_num; - if (i.op[op].regs->reg_flags & RegRex) - i.rex.extZ = 1; - if (!quiet_warnings && (i.tm.opcode_modifier & Ugh) != 0) - { - /* Warn about some common errors, but press on regardless. - The first case can be generated by gcc (<= 2.8.1). */ - if (i.operands == 2) - { - /* Reversed arguments on faddp, fsubp, etc. */ - as_warn (_("translating to `%s %%%s,%%%s'"), i.tm.name, - i.op[1].regs->reg_name, - i.op[0].regs->reg_name); - } - else - { - /* Extraneous `l' suffix on fp insn. */ - as_warn (_("translating to `%s %%%s'"), i.tm.name, - i.op[0].regs->reg_name); - } - } - } - else if (i.tm.opcode_modifier & Modrm) - { - /* The opcode is completed (modulo i.tm.extension_opcode which - must be put into the modrm byte). - Now, we make the modrm & index base bytes based on all the - info we've collected. */ - - /* i.reg_operands MUST be the number of real register operands; - implicit registers do not count. */ - if (i.reg_operands == 2) - { - unsigned int source, dest; - source = ((i.types[0] - & (Reg | RegMMX | RegXMM - | SReg2 | SReg3 - | Control | Debug | Test)) - ? 0 : 1); - dest = source + 1; - - i.rm.mode = 3; - /* One of the register operands will be encoded in the - i.tm.reg field, the other in the combined i.tm.mode - and i.tm.regmem fields. If no form of this - instruction supports a memory destination operand, - then we assume the source operand may sometimes be - a memory operand and so we need to store the - destination in the i.rm.reg field. */ - if ((i.tm.operand_types[dest] & AnyMem) == 0) - { - i.rm.reg = i.op[dest].regs->reg_num; - i.rm.regmem = i.op[source].regs->reg_num; - if (i.op[dest].regs->reg_flags & RegRex) - i.rex.extX = 1; - if (i.op[source].regs->reg_flags & RegRex) - i.rex.extZ = 1; - } - else - { - i.rm.reg = i.op[source].regs->reg_num; - i.rm.regmem = i.op[dest].regs->reg_num; - if (i.op[dest].regs->reg_flags & RegRex) - i.rex.extZ = 1; - if (i.op[source].regs->reg_flags & RegRex) - i.rex.extX = 1; - } - } - else - { /* If it's not 2 reg operands... */ - if (i.mem_operands) - { - unsigned int fake_zero_displacement = 0; - unsigned int op = ((i.types[0] & AnyMem) - ? 0 - : (i.types[1] & AnyMem) ? 1 : 2); + /* i.reg_operands MUST be the number of real register operands; + implicit registers do not count. */ + if (i.reg_operands == 2) + { + unsigned int source, dest; + source = ((i.types[0] + & (Reg | RegMMX | RegXMM + | SReg2 | SReg3 + | Control | Debug | Test)) + ? 0 : 1); + dest = source + 1; + + i.rm.mode = 3; + /* One of the register operands will be encoded in the i.tm.reg + field, the other in the combined i.tm.mode and i.tm.regmem + fields. If no form of this instruction supports a memory + destination operand, then we assume the source operand may + sometimes be a memory operand and so we need to store the + destination in the i.rm.reg field. */ + if ((i.tm.operand_types[dest] & AnyMem) == 0) + { + i.rm.reg = i.op[dest].regs->reg_num; + i.rm.regmem = i.op[source].regs->reg_num; + if ((i.op[dest].regs->reg_flags & RegRex) != 0) + i.rex |= REX_EXTX; + if ((i.op[source].regs->reg_flags & RegRex) != 0) + i.rex |= REX_EXTZ; + } + else + { + i.rm.reg = i.op[source].regs->reg_num; + i.rm.regmem = i.op[dest].regs->reg_num; + if ((i.op[dest].regs->reg_flags & RegRex) != 0) + i.rex |= REX_EXTZ; + if ((i.op[source].regs->reg_flags & RegRex) != 0) + i.rex |= REX_EXTX; + } + } + else + { /* If it's not 2 reg operands... */ + if (i.mem_operands) + { + unsigned int fake_zero_displacement = 0; + unsigned int op = ((i.types[0] & AnyMem) + ? 0 + : (i.types[1] & AnyMem) ? 1 : 2); - default_seg = &ds; + default_seg = &ds; - if (! i.base_reg) - { - i.rm.mode = 0; - if (! i.disp_operands) + if (i.base_reg == 0) + { + i.rm.mode = 0; + if (!i.disp_operands) + fake_zero_displacement = 1; + if (i.index_reg == 0) + { + /* Operand is just */ + if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0) + && (flag_code != CODE_64BIT)) + { + i.rm.regmem = NO_BASE_REGISTER_16; + i.types[op] &= ~Disp; + i.types[op] |= Disp16; + } + else if (flag_code != CODE_64BIT + || (i.prefix[ADDR_PREFIX] != 0)) + { + i.rm.regmem = NO_BASE_REGISTER; + i.types[op] &= ~Disp; + i.types[op] |= Disp32; + } + else + { + /* 64bit mode overwrites the 32bit absolute + addressing by RIP relative addressing and + absolute addressing is encoded by one of the + redundant SIB forms. */ + i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING; + i.sib.base = NO_BASE_REGISTER; + i.sib.index = NO_INDEX_REGISTER; + i.types[op] &= ~Disp; + i.types[op] |= Disp32S; + } + } + else /* !i.base_reg && i.index_reg */ + { + i.sib.index = i.index_reg->reg_num; + i.sib.base = NO_BASE_REGISTER; + i.sib.scale = i.log2_scale_factor; + i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING; + i.types[op] &= ~Disp; + if (flag_code != CODE_64BIT) + i.types[op] |= Disp32; /* Must be 32 bit */ + else + i.types[op] |= Disp32S; + if ((i.index_reg->reg_flags & RegRex) != 0) + i.rex |= REX_EXTY; + } + } + /* RIP addressing for 64bit mode. */ + else if (i.base_reg->reg_type == BaseIndex) + { + i.rm.regmem = NO_BASE_REGISTER; + i.types[op] &= ~Disp; + i.types[op] |= Disp32S; + i.flags[op] = Operand_PCrel; + } + else if (i.base_reg->reg_type & Reg16) + { + switch (i.base_reg->reg_num) + { + case 3: /* (%bx) */ + if (i.index_reg == 0) + i.rm.regmem = 7; + else /* (%bx,%si) -> 0, or (%bx,%di) -> 1 */ + i.rm.regmem = i.index_reg->reg_num - 6; + break; + case 5: /* (%bp) */ + default_seg = &ss; + if (i.index_reg == 0) + { + i.rm.regmem = 6; + if ((i.types[op] & Disp) == 0) + { + /* fake (%bp) into 0(%bp) */ + i.types[op] |= Disp8; fake_zero_displacement = 1; - if (! i.index_reg) - { - /* Operand is just */ - if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0) - && (flag_code != CODE_64BIT)) - { - i.rm.regmem = NO_BASE_REGISTER_16; - i.types[op] &= ~Disp; - i.types[op] |= Disp16; - } - else if (flag_code != CODE_64BIT - || (i.prefix[ADDR_PREFIX] != 0)) - { - i.rm.regmem = NO_BASE_REGISTER; - i.types[op] &= ~Disp; - i.types[op] |= Disp32; - } - else - { - /* 64bit mode overwrites the 32bit - absolute addressing by RIP relative - addressing and absolute addressing - is encoded by one of the redundant - SIB forms. */ - - i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING; - i.sib.base = NO_BASE_REGISTER; - i.sib.index = NO_INDEX_REGISTER; - i.types[op] &= ~Disp; - i.types[op] |= Disp32S; - } - } - else /* ! i.base_reg && i.index_reg */ - { - i.sib.index = i.index_reg->reg_num; - i.sib.base = NO_BASE_REGISTER; - i.sib.scale = i.log2_scale_factor; - i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING; - i.types[op] &= ~Disp; - if (flag_code != CODE_64BIT) - i.types[op] |= Disp32; /* Must be 32 bit */ - else - i.types[op] |= Disp32S; - if (i.index_reg->reg_flags & RegRex) - i.rex.extY = 1; - } - } - /* RIP addressing for 64bit mode. */ - else if (i.base_reg->reg_type == BaseIndex) - { - i.rm.regmem = NO_BASE_REGISTER; - i.types[op] &= ~Disp; - i.types[op] |= Disp32S; - i.flags[op] = Operand_PCrel; - } - else if (i.base_reg->reg_type & Reg16) - { - switch (i.base_reg->reg_num) - { - case 3: /* (%bx) */ - if (! i.index_reg) - i.rm.regmem = 7; - else /* (%bx,%si) -> 0, or (%bx,%di) -> 1 */ - i.rm.regmem = i.index_reg->reg_num - 6; - break; - case 5: /* (%bp) */ - default_seg = &ss; - if (! i.index_reg) - { - i.rm.regmem = 6; - if ((i.types[op] & Disp) == 0) - { - /* fake (%bp) into 0(%bp) */ - i.types[op] |= Disp8; - fake_zero_displacement = 1; - } - } - else /* (%bp,%si) -> 2, or (%bp,%di) -> 3 */ - i.rm.regmem = i.index_reg->reg_num - 6 + 2; - break; - default: /* (%si) -> 4 or (%di) -> 5 */ - i.rm.regmem = i.base_reg->reg_num - 6 + 4; - } - i.rm.mode = mode_from_disp_size (i.types[op]); - } - else /* i.base_reg and 32/64 bit mode */ - { - if (flag_code == CODE_64BIT - && (i.types[op] & Disp)) - { - if (i.types[op] & Disp8) - i.types[op] = Disp8 | Disp32S; - else - i.types[op] = Disp32S; - } - i.rm.regmem = i.base_reg->reg_num; - if (i.base_reg->reg_flags & RegRex) - i.rex.extZ = 1; - i.sib.base = i.base_reg->reg_num; - /* x86-64 ignores REX prefix bit here to avoid - decoder complications. */ - if ((i.base_reg->reg_num & 7) == EBP_REG_NUM) - { - default_seg = &ss; - if (i.disp_operands == 0) - { - fake_zero_displacement = 1; - i.types[op] |= Disp8; - } - } - else if (i.base_reg->reg_num == ESP_REG_NUM) - { - default_seg = &ss; - } - i.sib.scale = i.log2_scale_factor; - if (! i.index_reg) - { - /* (%esp) becomes two byte modrm - with no index register. We've already - stored the code for esp in i.rm.regmem - ie. ESCAPE_TO_TWO_BYTE_ADDRESSING. Any - base register besides %esp will not use - the extra modrm byte. */ - i.sib.index = NO_INDEX_REGISTER; -#if ! SCALE1_WHEN_NO_INDEX - /* Another case where we force the second - modrm byte. */ - if (i.log2_scale_factor) - i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING; + } + } + else /* (%bp,%si) -> 2, or (%bp,%di) -> 3 */ + i.rm.regmem = i.index_reg->reg_num - 6 + 2; + break; + default: /* (%si) -> 4 or (%di) -> 5 */ + i.rm.regmem = i.base_reg->reg_num - 6 + 4; + } + i.rm.mode = mode_from_disp_size (i.types[op]); + } + else /* i.base_reg and 32/64 bit mode */ + { + if (flag_code == CODE_64BIT + && (i.types[op] & Disp)) + { + if (i.types[op] & Disp8) + i.types[op] = Disp8 | Disp32S; + else + i.types[op] = Disp32S; + } + i.rm.regmem = i.base_reg->reg_num; + if ((i.base_reg->reg_flags & RegRex) != 0) + i.rex |= REX_EXTZ; + i.sib.base = i.base_reg->reg_num; + /* x86-64 ignores REX prefix bit here to avoid decoder + complications. */ + if ((i.base_reg->reg_num & 7) == EBP_REG_NUM) + { + default_seg = &ss; + if (i.disp_operands == 0) + { + fake_zero_displacement = 1; + i.types[op] |= Disp8; + } + } + else if (i.base_reg->reg_num == ESP_REG_NUM) + { + default_seg = &ss; + } + i.sib.scale = i.log2_scale_factor; + if (i.index_reg == 0) + { + /* (%esp) becomes two byte modrm with no index + register. We've already stored the code for esp + in i.rm.regmem ie. ESCAPE_TO_TWO_BYTE_ADDRESSING. + Any base register besides %esp will not use the + extra modrm byte. */ + i.sib.index = NO_INDEX_REGISTER; +#if !SCALE1_WHEN_NO_INDEX + /* Another case where we force the second modrm byte. */ + if (i.log2_scale_factor) + i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING; #endif - } - else - { - i.sib.index = i.index_reg->reg_num; - i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING; - if (i.index_reg->reg_flags & RegRex) - i.rex.extY = 1; - } - i.rm.mode = mode_from_disp_size (i.types[op]); - } + } + else + { + i.sib.index = i.index_reg->reg_num; + i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING; + if ((i.index_reg->reg_flags & RegRex) != 0) + i.rex |= REX_EXTY; + } + i.rm.mode = mode_from_disp_size (i.types[op]); + } + + if (fake_zero_displacement) + { + /* Fakes a zero displacement assuming that i.types[op] + holds the correct displacement size. */ + expressionS *exp; + + assert (i.op[op].disps == 0); + exp = &disp_expressions[i.disp_operands++]; + i.op[op].disps = exp; + exp->X_op = O_constant; + exp->X_add_number = 0; + exp->X_add_symbol = (symbolS *) 0; + exp->X_op_symbol = (symbolS *) 0; + } + } + + /* Fill in i.rm.reg or i.rm.regmem field with register operand + (if any) based on i.tm.extension_opcode. Again, we must be + careful to make sure that segment/control/debug/test/MMX + registers are coded into the i.rm.reg field. */ + if (i.reg_operands) + { + unsigned int op = + ((i.types[0] + & (Reg | RegMMX | RegXMM + | SReg2 | SReg3 + | Control | Debug | Test)) + ? 0 + : ((i.types[1] + & (Reg | RegMMX | RegXMM + | SReg2 | SReg3 + | Control | Debug | Test)) + ? 1 + : 2)); + /* If there is an extension opcode to put here, the register + number must be put into the regmem field. */ + if (i.tm.extension_opcode != None) + { + i.rm.regmem = i.op[op].regs->reg_num; + if ((i.op[op].regs->reg_flags & RegRex) != 0) + i.rex |= REX_EXTZ; + } + else + { + i.rm.reg = i.op[op].regs->reg_num; + if ((i.op[op].regs->reg_flags & RegRex) != 0) + i.rex |= REX_EXTX; + } - if (fake_zero_displacement) - { - /* Fakes a zero displacement assuming that i.types[op] - holds the correct displacement size. */ - expressionS *exp; - - assert (i.op[op].disps == 0); - exp = &disp_expressions[i.disp_operands++]; - i.op[op].disps = exp; - exp->X_op = O_constant; - exp->X_add_number = 0; - exp->X_add_symbol = (symbolS *) 0; - exp->X_op_symbol = (symbolS *) 0; - } - } + /* Now, if no memory operand has set i.rm.mode = 0, 1, 2 we + must set it to 3 to indicate this is a register operand + in the regmem field. */ + if (!i.mem_operands) + i.rm.mode = 3; + } - /* Fill in i.rm.reg or i.rm.regmem field with register - operand (if any) based on i.tm.extension_opcode. - Again, we must be careful to make sure that - segment/control/debug/test/MMX registers are coded - into the i.rm.reg field. */ - if (i.reg_operands) - { - unsigned int op = - ((i.types[0] - & (Reg | RegMMX | RegXMM - | SReg2 | SReg3 - | Control | Debug | Test)) - ? 0 - : ((i.types[1] - & (Reg | RegMMX | RegXMM - | SReg2 | SReg3 - | Control | Debug | Test)) - ? 1 - : 2)); - /* If there is an extension opcode to put here, the - register number must be put into the regmem field. */ - if (i.tm.extension_opcode != None) - { - i.rm.regmem = i.op[op].regs->reg_num; - if (i.op[op].regs->reg_flags & RegRex) - i.rex.extZ = 1; - } - else - { - i.rm.reg = i.op[op].regs->reg_num; - if (i.op[op].regs->reg_flags & RegRex) - i.rex.extX = 1; - } + /* Fill in i.rm.reg field with extension opcode (if any). */ + if (i.tm.extension_opcode != None) + i.rm.reg = i.tm.extension_opcode; + } + return default_seg; +} - /* Now, if no memory operand has set i.rm.mode = 0, 1, 2 - we must set it to 3 to indicate this is a register - operand in the regmem field. */ - if (!i.mem_operands) - i.rm.mode = 3; - } - - /* Fill in i.rm.reg field with extension opcode (if any). */ - if (i.tm.extension_opcode != None) - i.rm.reg = i.tm.extension_opcode; - } - } - else if (i.tm.opcode_modifier & (Seg2ShortForm | Seg3ShortForm)) - { - if (i.tm.base_opcode == POP_SEG_SHORT - && i.op[0].regs->reg_num == 1) - { - as_bad (_("you can't `pop %%cs'")); - return; - } - i.tm.base_opcode |= (i.op[0].regs->reg_num << 3); - if (i.op[0].regs->reg_flags & RegRex) - i.rex.extZ = 1; - } - else if ((i.tm.base_opcode & ~(D|W)) == MOV_AX_DISP32) - { - default_seg = &ds; - } - else if ((i.tm.opcode_modifier & IsString) != 0) - { - /* For the string instructions that allow a segment override - on one of their operands, the default segment is ds. */ - default_seg = &ds; - } +static void +output_branch () +{ + char *p; + int code16; + int prefix; + relax_substateT subtype; + symbolS *sym; + offsetT off; + + code16 = 0; + if (flag_code == CODE_16BIT) + code16 = CODE16; + + prefix = 0; + if (i.prefix[DATA_PREFIX] != 0) + { + prefix = 1; + i.prefixes -= 1; + code16 ^= CODE16; + } + /* Pentium4 branch hints. */ + if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE /* not taken */ + || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE /* taken */) + { + prefix++; + i.prefixes--; + } + if (i.prefix[REX_PREFIX] != 0) + { + prefix++; + i.prefixes--; + } + + if (i.prefixes != 0 && !intel_syntax) + as_warn (_("skipping prefixes on this instruction")); + + /* It's always a symbol; End frag & setup for relax. + Make sure there is enough room in this frag for the largest + instruction we may generate in md_convert_frag. This is 2 + bytes for the opcode and room for the prefix and largest + displacement. */ + frag_grow (prefix + 2 + 4); + /* Prefix and 1 opcode byte go in fr_fix. */ + p = frag_more (prefix + 1); + if (i.prefix[DATA_PREFIX] != 0) + *p++ = DATA_PREFIX_OPCODE; + if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE + || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE) + *p++ = i.prefix[SEG_PREFIX]; + if (i.prefix[REX_PREFIX] != 0) + *p++ = i.prefix[REX_PREFIX]; + *p = i.tm.base_opcode; + + if ((unsigned char) *p == JUMP_PC_RELATIVE) + subtype = ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL); + else if ((cpu_arch_flags & Cpu386) != 0) + subtype = ENCODE_RELAX_STATE (COND_JUMP, SMALL); + else + subtype = ENCODE_RELAX_STATE (COND_JUMP86, SMALL); + subtype |= code16; - /* If a segment was explicitly specified, - and the specified segment is not the default, - use an opcode prefix to select it. - If we never figured out what the default segment is, - then default_seg will be zero at this point, - and the specified segment prefix will always be used. */ - if ((i.seg[0]) && (i.seg[0] != default_seg)) - { - if (! add_prefix (i.seg[0]->seg_prefix)) - return; - } - } - else if (!quiet_warnings && (i.tm.opcode_modifier & Ugh) != 0) - { - /* UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc. */ - as_warn (_("translating to `%sp'"), i.tm.name); - } - } + sym = i.op[0].disps->X_add_symbol; + off = i.op[0].disps->X_add_number; - /* Handle conversion of 'int $3' --> special int3 insn. */ - if (i.tm.base_opcode == INT_OPCODE && i.op[0].imms->X_add_number == 3) + if (i.op[0].disps->X_op != O_constant + && i.op[0].disps->X_op != O_symbol) { - i.tm.base_opcode = INT3_OPCODE; - i.imm_operands = 0; + /* Handle complex expressions. */ + sym = make_expr_symbol (i.op[0].disps); + off = 0; } - if ((i.tm.opcode_modifier & (Jump | JumpByte | JumpDword)) - && i.op[0].disps->X_op == O_constant) - { - /* Convert "jmp constant" (and "call constant") to a jump (call) to - the absolute address given by the constant. Since ix86 jumps and - calls are pc relative, we need to generate a reloc. */ - i.op[0].disps->X_add_symbol = &abs_symbol; - i.op[0].disps->X_op = O_symbol; - } + /* 1 possible extra opcode + 4 byte displacement go in var part. + Pass reloc in fr_var. */ + frag_var (rs_machine_dependent, 5, i.reloc[0], subtype, sym, off, p); +} - if (i.tm.opcode_modifier & Rex64) - i.rex.mode64 = 1; +static void +output_jump () +{ + char *p; + int size; - /* For 8bit registers we would need an empty rex prefix. - Also in the case instruction is already having prefix, - we need to convert old registers to new ones. */ - - if (((i.types[0] & Reg8) && (i.op[0].regs->reg_flags & RegRex64)) - || ((i.types[1] & Reg8) && (i.op[1].regs->reg_flags & RegRex64)) - || ((i.rex.mode64 || i.rex.extX || i.rex.extY || i.rex.extZ || i.rex.empty) - && ((i.types[0] & Reg8) || (i.types[1] & Reg8)))) + if (i.tm.opcode_modifier & JumpByte) { - int x; - i.rex.empty = 1; - for (x = 0; x < 2; x++) + /* This is a loop or jecxz type instruction. */ + size = 1; + if (i.prefix[ADDR_PREFIX] != 0) { - /* Look for 8bit operand that does use old registers. */ - if (i.types[x] & Reg8 - && !(i.op[x].regs->reg_flags & RegRex64)) - { - /* In case it is "hi" register, give up. */ - if (i.op[x].regs->reg_num > 3) - as_bad (_("Can't encode registers '%%%s' in the instruction requiring REX prefix.\n"), - i.op[x].regs->reg_name); - - /* Otherwise it is equivalent to the extended register. - Since the encoding don't change this is merely cosmetical - cleanup for debug output. */ - - i.op[x].regs = i.op[x].regs + 8; - } + FRAG_APPEND_1_CHAR (ADDR_PREFIX_OPCODE); + i.prefixes -= 1; + } + /* 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--; } } + else + { + int code16; - if (i.rex.mode64 || i.rex.extX || i.rex.extY || i.rex.extZ || i.rex.empty) - add_prefix (0x40 - | (i.rex.mode64 ? 8 : 0) - | (i.rex.extX ? 4 : 0) - | (i.rex.extY ? 2 : 0) - | (i.rex.extZ ? 1 : 0)); - - /* We are ready to output the insn. */ - { - register char *p; - - /* 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); - - /* Output jumps. */ - if (i.tm.opcode_modifier & Jump) - { - int code16; - int prefix; - relax_substateT subtype; - symbolS *sym; - offsetT off; - - code16 = 0; - if (flag_code == CODE_16BIT) - code16 = CODE16; + code16 = 0; + if (flag_code == CODE_16BIT) + code16 = CODE16; - prefix = 0; - if (i.prefix[DATA_PREFIX]) - { - prefix = 1; - i.prefixes -= 1; - code16 ^= CODE16; - } - /* Pentium4 branch hints. */ - if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE /* not taken */ - || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE /* taken */) - { - prefix++; - i.prefixes--; - } - if (i.prefix[REX_PREFIX]) - { - prefix++; - i.prefixes--; - } + if (i.prefix[DATA_PREFIX] != 0) + { + FRAG_APPEND_1_CHAR (DATA_PREFIX_OPCODE); + i.prefixes -= 1; + code16 ^= CODE16; + } - if (i.prefixes != 0 && !intel_syntax) - as_warn (_("skipping prefixes on this instruction")); + size = 4; + if (code16) + size = 2; + } - /* It's always a symbol; End frag & setup for relax. - Make sure there is enough room in this frag for the largest - instruction we may generate in md_convert_frag. This is 2 - bytes for the opcode and room for the prefix and largest - displacement. */ - frag_grow (prefix + 2 + 4); - /* Prefix and 1 opcode byte go in fr_fix. */ - p = frag_more (prefix + 1); - if (i.prefix[DATA_PREFIX]) - *p++ = DATA_PREFIX_OPCODE; - if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE - || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE) - *p++ = i.prefix[SEG_PREFIX]; - if (i.prefix[REX_PREFIX]) - *p++ = i.prefix[REX_PREFIX]; - *p = i.tm.base_opcode; - - if ((unsigned char) *p == JUMP_PC_RELATIVE) - subtype = ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL); - else if ((cpu_arch_flags & Cpu386) != 0) - subtype = ENCODE_RELAX_STATE (COND_JUMP, SMALL); - else - subtype = ENCODE_RELAX_STATE (COND_JUMP86, SMALL); - subtype |= code16; + if (i.prefix[REX_PREFIX] != 0) + { + FRAG_APPEND_1_CHAR (i.prefix[REX_PREFIX]); + i.prefixes -= 1; + } - sym = i.op[0].disps->X_add_symbol; - off = i.op[0].disps->X_add_number; + if (i.prefixes != 0 && !intel_syntax) + as_warn (_("skipping prefixes on this instruction")); - if (i.op[0].disps->X_op != O_constant - && i.op[0].disps->X_op != O_symbol) - { - /* Handle complex expressions. */ - sym = make_expr_symbol (i.op[0].disps); - off = 0; - } + p = frag_more (1 + size); + *p++ = i.tm.base_opcode; - /* 1 possible extra opcode + 4 byte displacement go in var part. - Pass reloc in fr_var. */ - frag_var (rs_machine_dependent, 5, i.reloc[0], subtype, sym, off, p); - } - else if (i.tm.opcode_modifier & (JumpByte | JumpDword)) - { - int size; + fix_new_exp (frag_now, p - frag_now->fr_literal, size, + i.op[0].disps, 1, reloc (size, 1, 1, i.reloc[0])); +} - if (i.tm.opcode_modifier & JumpByte) - { - /* This is a loop or jecxz type instruction. */ - size = 1; - if (i.prefix[ADDR_PREFIX]) - { - FRAG_APPEND_1_CHAR (ADDR_PREFIX_OPCODE); - i.prefixes -= 1; - } - /* 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--; - } - } - else - { - int code16; +static void +output_interseg_jump () +{ + char *p; + int size; + int prefix; + int code16; - code16 = 0; - if (flag_code == CODE_16BIT) - code16 = CODE16; + code16 = 0; + if (flag_code == CODE_16BIT) + code16 = CODE16; - if (i.prefix[DATA_PREFIX]) - { - FRAG_APPEND_1_CHAR (DATA_PREFIX_OPCODE); - i.prefixes -= 1; - code16 ^= CODE16; - } + prefix = 0; + if (i.prefix[DATA_PREFIX] != 0) + { + prefix = 1; + i.prefixes -= 1; + code16 ^= CODE16; + } + if (i.prefix[REX_PREFIX] != 0) + { + prefix++; + i.prefixes -= 1; + } - size = 4; - if (code16) - size = 2; - } + size = 4; + if (code16) + size = 2; - if (i.prefix[REX_PREFIX]) - { - FRAG_APPEND_1_CHAR (i.prefix[REX_PREFIX]); - i.prefixes -= 1; - } + if (i.prefixes != 0 && !intel_syntax) + as_warn (_("skipping prefixes on this instruction")); - if (i.prefixes != 0 && !intel_syntax) - as_warn (_("skipping prefixes on this instruction")); + /* 1 opcode; 2 segment; offset */ + p = frag_more (prefix + 1 + 2 + size); - p = frag_more (1 + size); - *p++ = i.tm.base_opcode; + if (i.prefix[DATA_PREFIX] != 0) + *p++ = DATA_PREFIX_OPCODE; - fix_new_exp (frag_now, p - frag_now->fr_literal, size, - i.op[0].disps, 1, reloc (size, 1, 1, i.reloc[0])); - } - else if (i.tm.opcode_modifier & JumpInterSegment) - { - int size; - int prefix; - int code16; - - code16 = 0; - if (flag_code == CODE_16BIT) - code16 = CODE16; + if (i.prefix[REX_PREFIX] != 0) + *p++ = i.prefix[REX_PREFIX]; - prefix = 0; - if (i.prefix[DATA_PREFIX]) - { - prefix = 1; - i.prefixes -= 1; - code16 ^= CODE16; - } - if (i.prefix[REX_PREFIX]) - { - prefix++; - i.prefixes -= 1; - } + *p++ = i.tm.base_opcode; + if (i.op[1].imms->X_op == O_constant) + { + offsetT n = i.op[1].imms->X_add_number; - size = 4; - if (code16) - size = 2; + if (size == 2 + && !fits_in_unsigned_word (n) + && !fits_in_signed_word (n)) + { + as_bad (_("16-bit jump out of range")); + return; + } + md_number_to_chars (p, n, size); + } + else + fix_new_exp (frag_now, p - frag_now->fr_literal, size, + i.op[1].imms, 0, reloc (size, 0, 0, i.reloc[1])); + if (i.op[0].imms->X_op != O_constant) + as_bad (_("can't handle non absolute segment in `%s'"), + i.tm.name); + md_number_to_chars (p + size, (valueT) i.op[0].imms->X_add_number, 2); +} - if (i.prefixes != 0 && !intel_syntax) - as_warn (_("skipping prefixes on this instruction")); +static void +output_insn () +{ + /* 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); + + /* Output jumps. */ + if (i.tm.opcode_modifier & Jump) + output_branch (); + else if (i.tm.opcode_modifier & (JumpByte | JumpDword)) + output_jump (); + else if (i.tm.opcode_modifier & JumpInterSegment) + output_interseg_jump (); + else + { + /* Output normal instructions here. */ + char *p; + unsigned char *q; - /* 1 opcode; 2 segment; offset */ - p = frag_more (prefix + 1 + 2 + size); + /* All opcodes on i386 have either 1 or 2 bytes. We may use third + byte for the SSE instructions to specify a prefix they require. */ + if (i.tm.base_opcode & 0xff0000) + add_prefix ((i.tm.base_opcode >> 16) & 0xff); + + /* The prefix bytes. */ + for (q = i.prefix; + q < i.prefix + sizeof (i.prefix) / sizeof (i.prefix[0]); + q++) + { + if (*q) + { + p = frag_more (1); + md_number_to_chars (p, (valueT) *q, 1); + } + } - if (i.prefix[DATA_PREFIX]) - *p++ = DATA_PREFIX_OPCODE; + /* Now the opcode; be careful about word order here! */ + if (fits_in_unsigned_byte (i.tm.base_opcode)) + { + FRAG_APPEND_1_CHAR (i.tm.base_opcode); + } + else + { + p = frag_more (2); + /* Put out high byte first: can't use md_number_to_chars! */ + *p++ = (i.tm.base_opcode >> 8) & 0xff; + *p = i.tm.base_opcode & 0xff; + } - if (i.prefix[REX_PREFIX]) - *p++ = i.prefix[REX_PREFIX]; + /* Now the modrm byte and sib byte (if present). */ + if (i.tm.opcode_modifier & Modrm) + { + p = frag_more (1); + md_number_to_chars (p, + (valueT) (i.rm.regmem << 0 + | i.rm.reg << 3 + | i.rm.mode << 6), + 1); + /* If i.rm.regmem == ESP (4) + && i.rm.mode != (Register mode) + && not 16 bit + ==> need second modrm byte. */ + if (i.rm.regmem == ESCAPE_TO_TWO_BYTE_ADDRESSING + && i.rm.mode != 3 + && !(i.base_reg && (i.base_reg->reg_type & Reg16) != 0)) + { + p = frag_more (1); + md_number_to_chars (p, + (valueT) (i.sib.base << 0 + | i.sib.index << 3 + | i.sib.scale << 6), + 1); + } + } - *p++ = i.tm.base_opcode; - if (i.op[1].imms->X_op == O_constant) - { - offsetT n = i.op[1].imms->X_add_number; + if (i.disp_operands) + output_disp (); - if (size == 2 - && !fits_in_unsigned_word (n) - && !fits_in_signed_word (n)) - { - as_bad (_("16-bit jump out of range")); - return; - } - md_number_to_chars (p, n, size); - } - else - fix_new_exp (frag_now, p - frag_now->fr_literal, size, - i.op[1].imms, 0, reloc (size, 0, 0, i.reloc[1])); - if (i.op[0].imms->X_op != O_constant) - as_bad (_("can't handle non absolute segment in `%s'"), - i.tm.name); - md_number_to_chars (p + size, (valueT) i.op[0].imms->X_add_number, 2); - } - else - { - /* Output normal instructions here. */ - unsigned char *q; + if (i.imm_operands) + output_imm (); + } - /* All opcodes on i386 have eighter 1 or 2 bytes. We may use third - byte for the SSE instructions to specify prefix they require. */ - if (i.tm.base_opcode & 0xff0000) - add_prefix ((i.tm.base_opcode >> 16) & 0xff); - - /* The prefix bytes. */ - for (q = i.prefix; - q < i.prefix + sizeof (i.prefix) / sizeof (i.prefix[0]); - q++) - { - if (*q) - { - p = frag_more (1); - md_number_to_chars (p, (valueT) *q, 1); - } - } +#ifdef DEBUG386 + if (flag_debug) + { + pi (line, &i); + } +#endif /* DEBUG386 */ +} - /* Now the opcode; be careful about word order here! */ - if (fits_in_unsigned_byte (i.tm.base_opcode)) - { - FRAG_APPEND_1_CHAR (i.tm.base_opcode); - } - else - { - p = frag_more (2); - /* Put out high byte first: can't use md_number_to_chars! */ - *p++ = (i.tm.base_opcode >> 8) & 0xff; - *p = i.tm.base_opcode & 0xff; - } +static void +output_disp () +{ + char *p; + unsigned int n; - /* Now the modrm byte and sib byte (if present). */ - if (i.tm.opcode_modifier & Modrm) - { - p = frag_more (1); - md_number_to_chars (p, - (valueT) (i.rm.regmem << 0 - | i.rm.reg << 3 - | i.rm.mode << 6), - 1); - /* If i.rm.regmem == ESP (4) - && i.rm.mode != (Register mode) - && not 16 bit - ==> need second modrm byte. */ - if (i.rm.regmem == ESCAPE_TO_TWO_BYTE_ADDRESSING - && i.rm.mode != 3 - && !(i.base_reg && (i.base_reg->reg_type & Reg16) != 0)) - { - p = frag_more (1); - md_number_to_chars (p, - (valueT) (i.sib.base << 0 - | i.sib.index << 3 - | i.sib.scale << 6), - 1); - } - } + for (n = 0; n < i.operands; n++) + { + if (i.types[n] & Disp) + { + if (i.op[n].disps->X_op == O_constant) + { + int size; + offsetT val; - if (i.disp_operands) - { - register unsigned int n; + size = 4; + if (i.types[n] & (Disp8 | Disp16 | Disp64)) + { + size = 2; + if (i.types[n] & Disp8) + size = 1; + if (i.types[n] & Disp64) + size = 8; + } + val = offset_in_range (i.op[n].disps->X_add_number, + size); + p = frag_more (size); + md_number_to_chars (p, val, size); + } + else + { + int size = 4; + int sign = 0; + int pcrel = (i.flags[n] & Operand_PCrel) != 0; + + /* The PC relative address is computed relative + to the instruction boundary, so in case immediate + fields follows, we need to adjust the value. */ + if (pcrel && i.imm_operands) + { + int imm_size = 4; + unsigned int n1; - for (n = 0; n < i.operands; n++) - { - if (i.types[n] & Disp) - { - if (i.op[n].disps->X_op == O_constant) + for (n1 = 0; n1 < i.operands; n1++) + if (i.types[n1] & Imm) { - int size; - offsetT val; - - size = 4; - if (i.types[n] & (Disp8 | Disp16 | Disp64)) + if (i.types[n1] & (Imm8 | Imm8S | Imm16 | Imm64)) { - size = 2; - if (i.types[n] & Disp8) - size = 1; - if (i.types[n] & Disp64) - size = 8; + imm_size = 2; + if (i.types[n1] & (Imm8 | Imm8S)) + imm_size = 1; + if (i.types[n1] & Imm64) + imm_size = 8; } - val = offset_in_range (i.op[n].disps->X_add_number, - size); - p = frag_more (size); - md_number_to_chars (p, val, size); + break; } - else - { - int size = 4; - int sign = 0; - int pcrel = (i.flags[n] & Operand_PCrel) != 0; - - /* The PC relative address is computed relative - to the instruction boundary, so in case immediate - fields follows, we need to adjust the value. */ - if (pcrel && i.imm_operands) - { - int imm_size = 4; - register unsigned int n1; - - for (n1 = 0; n1 < i.operands; n1++) - if (i.types[n1] & Imm) - { - if (i.types[n1] & (Imm8 | Imm8S | Imm16 | Imm64)) - { - imm_size = 2; - if (i.types[n1] & (Imm8 | Imm8S)) - imm_size = 1; - if (i.types[n1] & Imm64) - imm_size = 8; - } - break; - } - /* We should find the immediate. */ - if (n1 == i.operands) - abort (); - i.op[n].disps->X_add_number -= imm_size; - } + /* We should find the immediate. */ + if (n1 == i.operands) + abort (); + i.op[n].disps->X_add_number -= imm_size; + } - if (i.types[n] & Disp32S) - sign = 1; + if (i.types[n] & Disp32S) + sign = 1; - if (i.types[n] & (Disp16 | Disp64)) - { - size = 2; - if (i.types[n] & Disp64) - size = 8; - } + if (i.types[n] & (Disp16 | Disp64)) + { + size = 2; + if (i.types[n] & Disp64) + size = 8; + } - p = frag_more (size); - fix_new_exp (frag_now, p - frag_now->fr_literal, size, - i.op[n].disps, pcrel, - reloc (size, pcrel, sign, i.reloc[n])); - } - } - } - } + p = frag_more (size); + fix_new_exp (frag_now, p - frag_now->fr_literal, size, + i.op[n].disps, pcrel, + reloc (size, pcrel, sign, i.reloc[n])); + } + } + } +} - /* Output immediate. */ - if (i.imm_operands) - { - register unsigned int n; +static void +output_imm () +{ + char *p; + unsigned int n; - for (n = 0; n < i.operands; n++) - { - if (i.types[n] & Imm) - { - if (i.op[n].imms->X_op == O_constant) - { - int size; - offsetT val; + for (n = 0; n < i.operands; n++) + { + if (i.types[n] & Imm) + { + if (i.op[n].imms->X_op == O_constant) + { + int size; + offsetT val; - size = 4; - if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64)) - { - size = 2; - if (i.types[n] & (Imm8 | Imm8S)) - size = 1; - else if (i.types[n] & Imm64) - size = 8; - } - val = offset_in_range (i.op[n].imms->X_add_number, - size); - p = frag_more (size); - md_number_to_chars (p, val, size); - } - else - { - /* Not absolute_section. - Need a 32-bit fixup (don't support 8bit - non-absolute imms). Try to support other - sizes ... */ - RELOC_ENUM reloc_type; - int size = 4; - int sign = 0; - - if ((i.types[n] & (Imm32S)) - && i.suffix == QWORD_MNEM_SUFFIX) - sign = 1; - if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64)) - { - size = 2; - if (i.types[n] & (Imm8 | Imm8S)) - size = 1; - if (i.types[n] & Imm64) - size = 8; - } + size = 4; + if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64)) + { + size = 2; + if (i.types[n] & (Imm8 | Imm8S)) + size = 1; + else if (i.types[n] & Imm64) + size = 8; + } + val = offset_in_range (i.op[n].imms->X_add_number, + size); + p = frag_more (size); + md_number_to_chars (p, val, size); + } + else + { + /* Not absolute_section. + Need a 32-bit fixup (don't support 8bit + non-absolute imms). Try to support other + sizes ... */ + RELOC_ENUM reloc_type; + int size = 4; + int sign = 0; + + if ((i.types[n] & (Imm32S)) + && i.suffix == QWORD_MNEM_SUFFIX) + sign = 1; + if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64)) + { + size = 2; + if (i.types[n] & (Imm8 | Imm8S)) + size = 1; + if (i.types[n] & Imm64) + size = 8; + } - p = frag_more (size); - reloc_type = reloc (size, 0, sign, i.reloc[n]); + p = frag_more (size); + reloc_type = reloc (size, 0, sign, i.reloc[n]); #ifdef BFD_ASSEMBLER - if (reloc_type == BFD_RELOC_32 - && GOT_symbol - && GOT_symbol == i.op[n].imms->X_add_symbol - && (i.op[n].imms->X_op == O_symbol - || (i.op[n].imms->X_op == O_add - && ((symbol_get_value_expression - (i.op[n].imms->X_op_symbol)->X_op) - == O_subtract)))) - { - /* We don't support dynamic linking on x86-64 yet. */ - if (flag_code == CODE_64BIT) - abort (); - reloc_type = BFD_RELOC_386_GOTPC; - i.op[n].imms->X_add_number += 3; - } + if (reloc_type == BFD_RELOC_32 + && GOT_symbol + && GOT_symbol == i.op[n].imms->X_add_symbol + && (i.op[n].imms->X_op == O_symbol + || (i.op[n].imms->X_op == O_add + && ((symbol_get_value_expression + (i.op[n].imms->X_op_symbol)->X_op) + == O_subtract)))) + { + /* We don't support dynamic linking on x86-64 yet. */ + if (flag_code == CODE_64BIT) + abort (); + reloc_type = BFD_RELOC_386_GOTPC; + i.op[n].imms->X_add_number += 3; + } #endif - fix_new_exp (frag_now, p - frag_now->fr_literal, size, - i.op[n].imms, 0, reloc_type); - } - } - } - } - } - -#ifdef DEBUG386 - if (flag_debug) - { - pi (line, &i); - } -#endif /* DEBUG386 */ - } + fix_new_exp (frag_now, p - frag_now->fr_literal, size, + i.op[n].imms, 0, reloc_type); + } + } + } } #ifndef LEX_AT @@ -3426,7 +3618,7 @@ input_line_pointer = save; return NULL; } - if (i.log2_scale_factor != 0 && ! i.index_reg) + if (i.log2_scale_factor != 0 && i.index_reg == 0) { as_warn (_("scale factor of %d without an index register"), 1 << i.log2_scale_factor); @@ -3446,7 +3638,7 @@ char *disp_start; char *disp_end; { - register expressionS *exp; + expressionS *exp; segT exp_seg = 0; char *save_input_line_pointer; #ifndef LEX_AT @@ -3456,8 +3648,8 @@ if (flag_code == CODE_64BIT) { - if (!i.prefix[ADDR_PREFIX]) - bigdisp = Disp64; + if (i.prefix[ADDR_PREFIX] == 0) + bigdisp = Disp64; } else if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0)) bigdisp = Disp16; @@ -3557,9 +3749,9 @@ exp->X_op = O_subtract; exp->X_op_symbol = GOT_symbol; if (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL) - i.reloc[this_operand] = BFD_RELOC_32_PCREL; + i.reloc[this_operand] = BFD_RELOC_32_PCREL; else - i.reloc[this_operand] = BFD_RELOC_32; + i.reloc[this_operand] = BFD_RELOC_32; } #endif @@ -3623,8 +3815,8 @@ && (i.base_reg->reg_type != BaseIndex || i.index_reg)) || (i.index_reg - && ((i.index_reg->reg_type & (Reg64|BaseIndex)) - != (Reg64|BaseIndex)))) + && ((i.index_reg->reg_type & (Reg64 | BaseIndex)) + != (Reg64 | BaseIndex)))) ok = 0; } else @@ -3633,8 +3825,8 @@ if ((i.base_reg && (i.base_reg->reg_type & (Reg32 | RegRex)) != Reg32) || (i.index_reg - && ((i.index_reg->reg_type & (Reg32|BaseIndex|RegRex)) - != (Reg32|BaseIndex)))) + && ((i.index_reg->reg_type & (Reg32 | BaseIndex | RegRex)) + != (Reg32 | BaseIndex)))) ok = 0; } } @@ -3644,15 +3836,15 @@ { /* 16bit checks. */ if ((i.base_reg - && ((i.base_reg->reg_type & (Reg16|BaseIndex|RegRex)) - != (Reg16|BaseIndex))) + && ((i.base_reg->reg_type & (Reg16 | BaseIndex | RegRex)) + != (Reg16 | BaseIndex))) || (i.index_reg - && (((i.index_reg->reg_type & (Reg16|BaseIndex)) - != (Reg16|BaseIndex)) - || ! (i.base_reg - && i.base_reg->reg_num < 6 - && i.index_reg->reg_num >= 6 - && i.log2_scale_factor == 0)))) + && (((i.index_reg->reg_type & (Reg16 | BaseIndex)) + != (Reg16 | BaseIndex)) + || !(i.base_reg + && i.base_reg->reg_num < 6 + && i.index_reg->reg_num >= 6 + && i.log2_scale_factor == 0)))) ok = 0; } else @@ -3661,8 +3853,8 @@ if ((i.base_reg && (i.base_reg->reg_type & (Reg32 | RegRex)) != Reg32) || (i.index_reg - && ((i.index_reg->reg_type & (Reg32|BaseIndex|RegRex)) - != (Reg32|BaseIndex)))) + && ((i.index_reg->reg_type & (Reg32 | BaseIndex | RegRex)) + != (Reg32 | BaseIndex)))) ok = 0; } } @@ -3679,8 +3871,8 @@ FIXME. There doesn't seem to be any real need for separate Disp16 and Disp32 flags. The same goes for Imm16 and Imm32. Removing them would probably clean up the code quite a lot. */ - if (i.types[this_operand] & (Disp16|Disp32)) - i.types[this_operand] ^= (Disp16|Disp32); + if (i.types[this_operand] & (Disp16 | Disp32)) + i.types[this_operand] ^= (Disp16 | Disp32); fudged = 1; goto tryprefix; } @@ -3999,8 +4191,8 @@ int md_estimate_size_before_relax (fragP, segment) - register fragS *fragP; - register segT segment; + fragS *fragP; + segT segment; { /* We've already got fragP->fr_subtype right; all we have to do is check for un-relaxable symbols. On an ELF system, we can't relax @@ -4043,10 +4235,8 @@ break; case COND_JUMP86: - if (no_cond_jump_promotion) - goto relax_guess; - - if (size == 2) + if (size == 2 + && (!no_cond_jump_promotion || fragP->fr_var != NO_RELOC)) { /* Negate the condition, and branch past an unconditional jump. */ @@ -4066,8 +4256,15 @@ /* Fall through. */ case COND_JUMP: - if (no_cond_jump_promotion) - goto relax_guess; + if (no_cond_jump_promotion && fragP->fr_var == NO_RELOC) + { + fragP->fr_fix += 1; + fix_new (fragP, old_fr_fix, 1, + fragP->fr_symbol, + fragP->fr_offset, 1, + BFD_RELOC_8_PCREL); + break; + } /* This changes the byte-displacement jump 0x7N to the (d)word-displacement jump 0x0f,0x8N. */ @@ -4089,7 +4286,6 @@ return fragP->fr_fix - old_fr_fix; } - 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 @@ -4113,16 +4309,16 @@ md_convert_frag (headers, sec, fragP) object_headers *headers ATTRIBUTE_UNUSED; segT sec ATTRIBUTE_UNUSED; - register fragS *fragP; + fragS *fragP; #else void md_convert_frag (abfd, sec, fragP) bfd *abfd ATTRIBUTE_UNUSED; segT sec ATTRIBUTE_UNUSED; - register fragS *fragP; + fragS *fragP; #endif { - register unsigned char *opcode; + unsigned char *opcode; unsigned char *where_to_put_displacement = NULL; offsetT target_address; offsetT opcode_address; @@ -4304,10 +4500,10 @@ if ((fseg == seg || (symbol_section_p (fixP->fx_addsy) && fseg != absolute_section)) - && ! S_IS_EXTERNAL (fixP->fx_addsy) - && ! S_IS_WEAK (fixP->fx_addsy) + && !S_IS_EXTERNAL (fixP->fx_addsy) + && !S_IS_WEAK (fixP->fx_addsy) && S_IS_DEFINED (fixP->fx_addsy) - && ! S_IS_COMMON (fixP->fx_addsy)) + && !S_IS_COMMON (fixP->fx_addsy)) { /* Yes, we add the values in twice. This is because bfd_perform_relocation subtracts them out again. I think @@ -4407,6 +4603,8 @@ else if (use_rela_relocations) { fixP->fx_no_overflow = 1; + /* Remember value for tc_gen_reloc. */ + fixP->fx_addnumber = value; value = 0; } #endif @@ -4545,7 +4743,7 @@ } if (r != NULL - && r->reg_flags & (RegRex64|RegRex) + && (r->reg_flags & (RegRex64 | RegRex)) != 0 && flag_code != CODE_64BIT) { return (const reg_entry *) NULL; @@ -4599,7 +4797,7 @@ case 's': /* -s: On i386 Solaris, this tells the native assembler to use - .stab instead of .stab.excl. We always use .stab anyhow. */ + .stab instead of .stab.excl. We always use .stab anyhow. */ break; case OPTION_64: @@ -4796,7 +4994,7 @@ s_bss (ignore) int ignore ATTRIBUTE_UNUSED; { - register int temp; + int temp; temp = get_absolute_expression (); subseg_set (bss_section, (subsegT) temp); @@ -4882,7 +5080,9 @@ case 1: code = BFD_RELOC_8; break; case 2: code = BFD_RELOC_16; break; case 4: code = BFD_RELOC_32; break; +#ifdef BFD64 case 8: code = BFD_RELOC_64; break; +#endif } } break; @@ -4918,9 +5118,23 @@ /* Use the rela in 64bit mode. */ else { - rel->addend = fixp->fx_offset; - if (fixp->fx_pcrel) - rel->addend -= fixp->fx_size; + if (!fixp->fx_pcrel) + rel->addend = fixp->fx_offset; + else + switch (code) + { + case BFD_RELOC_X86_64_PLT32: + case BFD_RELOC_X86_64_GOT32: + case BFD_RELOC_X86_64_GOTPCREL: + rel->addend = fixp->fx_offset - fixp->fx_size; + break; + default: + rel->addend = (section->vma + - fixp->fx_size + + fixp->fx_addnumber + + md_pcrel_from (fixp)); + break; + } } rel->howto = bfd_reloc_type_lookup (stdoutput, code); @@ -4937,7 +5151,7 @@ return rel; } -#else /* ! BFD_ASSEMBLER */ +#else /* !BFD_ASSEMBLER */ #if (defined(OBJ_AOUT) | defined(OBJ_BOUT)) void @@ -5003,7 +5217,7 @@ #endif /* I386COFF */ -#endif /* ! BFD_ASSEMBLER */ +#endif /* !BFD_ASSEMBLER */ /* Parse operands using Intel syntax. This implements a recursive descent parser based on the BNF grammar published in Appendix B of the MASM 6.1 diff -Nur binutils-2.12/gas/config/tc-i386.h binutils-2.12.1/gas/config/tc-i386.h --- binutils-2.12/gas/config/tc-i386.h Thu Nov 15 16:28:55 2001 +++ binutils-2.12.1/gas/config/tc-i386.h Mon Apr 1 20:29:02 2002 @@ -467,15 +467,17 @@ modrm_byte; /* x86-64 extension prefix. */ -typedef struct - { - unsigned int mode64; - unsigned int extX; /* Used to extend modrm reg field. */ - unsigned int extY; /* Used to extend SIB index field. */ - unsigned int extZ; /* Used to extend modrm reg/mem, SIB base, modrm base fields. */ - unsigned int empty; /* Used to old-style byte registers to new style. */ - } -rex_byte; +typedef int rex_byte; +#define REX_OPCODE 0x40 + +/* Indicates 64 bit operand size. */ +#define REX_MODE64 8 +/* High extension to reg field of modrm byte. */ +#define REX_EXTX 4 +/* High extension to SIB index field. */ +#define REX_EXTY 2 +/* High extension to base field of modrm or SIB, or reg field of opcode. */ +#define REX_EXTZ 1 /* 386 opcode byte to code indirect addressing. */ typedef struct diff -Nur binutils-2.12/gas/config/tc-i960.c binutils-2.12.1/gas/config/tc-i960.c --- binutils-2.12/gas/config/tc-i960.c Thu Nov 15 16:28:56 2001 +++ binutils-2.12.1/gas/config/tc-i960.c Thu May 9 10:49:39 2002 @@ -1,6 +1,6 @@ /* tc-i960.c - All the i80960-specific stuff Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001 + 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GAS. @@ -1085,7 +1085,8 @@ relax_cobr (fragP); return 4; } - return 0; + + return md_relax_table[fragP->fr_subtype].rlx_length; } /* md_estimate_size_before_relax() */ #if defined(OBJ_AOUT) | defined(OBJ_BOUT) diff -Nur binutils-2.12/gas/config/tc-ia64.c binutils-2.12.1/gas/config/tc-ia64.c --- binutils-2.12/gas/config/tc-ia64.c Fri Feb 22 06:57:38 2002 +++ binutils-2.12.1/gas/config/tc-ia64.c Mon Apr 1 20:29:03 2002 @@ -2709,7 +2709,11 @@ size = (slot_index (last_addr, last_frag, first_addr, first_frag) + dir_len); rlen = ptr->r.record.r.rlen = size; - region = ptr; + if (ptr->r.type == body) + /* End of region. */ + region = 0; + else + region = ptr; break; } case epilogue: @@ -3250,7 +3254,7 @@ size = output_unw_records (unwind.list, (void **) &unw_rec); if (size % md.pointer_size != 0) as_bad ("Unwind record is not a multiple of %d bytes.", md.pointer_size); - + /* If there are unwind records, switch sections, and output the info. */ if (size != 0) { @@ -9982,11 +9986,26 @@ break; case 8: - if (target_big_endian) - code = BFD_RELOC_IA64_DIR64MSB; - else - code = BFD_RELOC_IA64_DIR64LSB; - break; + /* In 32-bit mode, data8 could mean function descriptors too. */ + if (exp->X_op == O_pseudo_fixup + && exp->X_op_symbol + && S_GET_VALUE (exp->X_op_symbol) == FUNC_IPLT_RELOC + && !(md.flags & EF_IA_64_ABI64)) + { + if (target_big_endian) + code = BFD_RELOC_IA64_IPLTMSB; + else + code = BFD_RELOC_IA64_IPLTLSB; + exp->X_op = O_symbol; + break; + } + else { + if (target_big_endian) + code = BFD_RELOC_IA64_DIR64MSB; + else + code = BFD_RELOC_IA64_DIR64LSB; + break; + } case 16: if (exp->X_op == O_pseudo_fixup diff -Nur binutils-2.12/gas/config/tc-ia64.h binutils-2.12.1/gas/config/tc-ia64.h --- binutils-2.12/gas/config/tc-ia64.h Fri Jan 11 04:27:39 2002 +++ binutils-2.12.1/gas/config/tc-ia64.h Mon Apr 1 20:29:03 2002 @@ -124,8 +124,6 @@ #define WORKING_DOT_WORD /* don't do broken word processing for now */ #define ELF_TC_SPECIAL_SECTIONS \ -{ ".init_array",SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE }, \ -{ ".fini_array",SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE }, \ { ".sbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT }, \ { ".sdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT }, diff -Nur binutils-2.12/gas/config/tc-mips.c binutils-2.12.1/gas/config/tc-mips.c --- binutils-2.12/gas/config/tc-mips.c Tue Feb 26 17:25:38 2002 +++ binutils-2.12.1/gas/config/tc-mips.c Mon Apr 1 20:29:04 2002 @@ -12153,18 +12153,9 @@ boolean linkonce = false; if (RELAX_MIPS16_P (fragp->fr_subtype)) - { - if (mips16_extended_frag (fragp, segtype, 0)) - { - fragp->fr_subtype = RELAX_MIPS16_MARK_EXTENDED (fragp->fr_subtype); - return 4; - } - else - { - fragp->fr_subtype = RELAX_MIPS16_CLEAR_EXTENDED (fragp->fr_subtype); - return 2; - } - } + /* We don't want to modify the EXTENDED bit here; it might get us + into infinite loops. We change it only in mips_relax_frag(). */ + return (RELAX_MIPS16_EXTENDED (fragp->fr_subtype) ? 4 : 2); if (mips_pic == NO_PIC) { diff -Nur binutils-2.12/gas/config/tc-mmix.c binutils-2.12.1/gas/config/tc-mmix.c --- binutils-2.12/gas/config/tc-mmix.c Sun Feb 3 23:03:15 2002 +++ binutils-2.12.1/gas/config/tc-mmix.c Mon Apr 1 20:29:05 2002 @@ -2172,7 +2172,8 @@ #define HANDLE_RELAXABLE(state) \ case ENCODE_RELAX (state, STATE_UNDF): \ if (fragP->fr_symbol != NULL \ - && S_GET_SEGMENT (fragP->fr_symbol) == segment) \ + && S_GET_SEGMENT (fragP->fr_symbol) == segment \ + && !S_IS_WEAK (fragP->fr_symbol)) \ { \ /* The symbol lies in the same segment - a relaxable case. */ \ fragP->fr_subtype \ diff -Nur binutils-2.12/gas/config/tc-ppc.c binutils-2.12.1/gas/config/tc-ppc.c --- binutils-2.12/gas/config/tc-ppc.c Mon Feb 25 00:05:30 2002 +++ binutils-2.12.1/gas/config/tc-ppc.c Thu May 9 10:49:40 2002 @@ -1374,7 +1374,7 @@ MAP ("plt@h", (int) BFD_RELOC_HI16_PLTOFF), MAP ("plt@ha", (int) BFD_RELOC_HI16_S_PLTOFF), MAP ("sdarel", (int) BFD_RELOC_GPREL16), - MAP ("sectoff", (int) BFD_RELOC_32_BASEREL), + MAP ("sectoff", (int) BFD_RELOC_16_BASEREL), MAP ("sectoff@l", (int) BFD_RELOC_LO16_BASEREL), MAP ("sectoff@h", (int) BFD_RELOC_HI16_BASEREL), MAP ("sectoff@ha", (int) BFD_RELOC_HI16_S_BASEREL), @@ -1683,7 +1683,7 @@ && fixp->fx_r_type != BFD_RELOC_HI16_GOTOFF && fixp->fx_r_type != BFD_RELOC_LO16_GOTOFF && fixp->fx_r_type != BFD_RELOC_HI16_S_GOTOFF - && fixp->fx_r_type != BFD_RELOC_32_BASEREL + && fixp->fx_r_type != BFD_RELOC_16_BASEREL && fixp->fx_r_type != BFD_RELOC_LO16_BASEREL && fixp->fx_r_type != BFD_RELOC_HI16_BASEREL && fixp->fx_r_type != BFD_RELOC_HI16_S_BASEREL @@ -2236,7 +2236,7 @@ case BFD_RELOC_LO16_PLTOFF: reloc = BFD_RELOC_PPC64_PLT16_LO_DS; break; - case BFD_RELOC_32_BASEREL: + case BFD_RELOC_16_BASEREL: reloc = BFD_RELOC_PPC64_SECTOFF_DS; break; case BFD_RELOC_LO16_BASEREL: @@ -5280,7 +5280,6 @@ case BFD_RELOC_RVA: case BFD_RELOC_32_PCREL: - case BFD_RELOC_32_BASEREL: case BFD_RELOC_PPC_EMB_NADDR32: md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, value, 4); @@ -5305,6 +5304,7 @@ case BFD_RELOC_LO16_GOTOFF: case BFD_RELOC_HI16_GOTOFF: case BFD_RELOC_HI16_S_GOTOFF: + case BFD_RELOC_16_BASEREL: case BFD_RELOC_LO16_BASEREL: case BFD_RELOC_HI16_BASEREL: case BFD_RELOC_HI16_S_BASEREL: diff -Nur binutils-2.12/gas/config/tc-s390.c binutils-2.12.1/gas/config/tc-s390.c --- binutils-2.12/gas/config/tc-s390.c Thu Nov 15 16:28:58 2001 +++ binutils-2.12.1/gas/config/tc-s390.c Thu May 9 10:49:40 2002 @@ -1,5 +1,5 @@ /* tc-s390.c -- Assemble for the S390 - Copyright 2000, 2001 Free Software Foundation, Inc. + Copyright 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of GAS, the GNU Assembler. @@ -373,6 +373,12 @@ else if (arg != NULL && strcmp (arg, "warn-areg-zero") == 0) warn_areg_zero = TRUE; + else if (arg != NULL && strcmp (arg, "31") == 0) + s390_arch_size = 31; + + else if (arg != NULL && strcmp (arg, "64") == 0) + s390_arch_size = 64; + else { as_bad (_("invalid switch -m%s"), arg); @@ -382,15 +388,9 @@ case 'A': if (arg != NULL && strcmp (arg, "esa") == 0) - { - current_architecture = S390_OPCODE_ESA; - s390_arch_size = 32; - } + current_architecture = S390_OPCODE_ESA; else if (arg != NULL && strcmp (arg, "esame") == 0) - { - current_architecture = S390_OPCODE_ESAME; - s390_arch_size = 64; - } + current_architecture = S390_OPCODE_ESAME; else as_bad ("invalid architecture -A%s", arg); current_arch_mask = 1 << current_architecture; @@ -422,7 +422,9 @@ S390 options:\n\ -mregnames Allow symbolic names for registers\n\ -mwarn-areg-zero Warn about zero base/index registers\n\ - -mno-regnames Do not allow symbolic names for registers\n")); + -mno-regnames Do not allow symbolic names for registers\n\ + -m31 Set file format to 31 bit format\n\ + -m64 Set file format to 64 bit format\n")); fprintf (stream, _("\ -V print assembler version number\n\ -Qy, -Qn ignored\n")); @@ -440,6 +442,10 @@ boolean dup_insn = false; const char *retval; + /* Give a warning if the combination -m64-bit and -Aesa is used. */ + if (s390_arch_size == 64 && current_arch_mask == (1 << S390_OPCODE_ESA)) + as_warn ("The 64 bit file format is used without esame instructions."); + /* Set the ELF flags if desired. */ if (s390_flags) bfd_set_private_flags (stdoutput, s390_flags); @@ -487,9 +493,9 @@ s390_md_end () { if (s390_arch_size == 64) - bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_esame); + bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_64); else - bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_esa); + bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_31); } void @@ -1221,6 +1227,7 @@ /* Write out the instruction. */ f = frag_more (opcode->oplen); memcpy (f, insn, opcode->oplen); + dwarf2_emit_insn (opcode->oplen); /* Create any fixups. At this point we do not use a bfd_reloc_code_real_type, but instead just use the @@ -1623,6 +1630,10 @@ if (S_IS_EXTERN (fixP->fx_addsy)) return 0; if (S_IS_WEAK (fixP->fx_addsy)) + return 0; + /* Don't adjust pc-relative references to merge sections. */ + if ((S_GET_SEGMENT(fixP->fx_addsy)->flags & SEC_MERGE) != 0 + && fixP->fx_pcrel) return 0; /* adjust_reloc_syms doesn't know about the GOT. */ if ( fixP->fx_r_type == BFD_RELOC_32_GOTOFF diff -Nur binutils-2.12/gas/config/tc-sh.c binutils-2.12.1/gas/config/tc-sh.c --- binutils-2.12/gas/config/tc-sh.c Mon Feb 11 01:15:10 2002 +++ binutils-2.12.1/gas/config/tc-sh.c Sat May 11 12:45:25 2002 @@ -2453,14 +2453,14 @@ void tc_crawl_symbol_chain (headers) - object_headers *headers; + object_headers *headers ATTRIBUTE_UNUSED; { printf (_("call to tc_crawl_symbol_chain \n")); } void tc_headers_hook (headers) - object_headers *headers; + object_headers *headers ATTRIBUTE_UNUSED; { printf (_("call to tc_headers_hook \n")); } @@ -2903,7 +2903,7 @@ #ifdef BFD_ASSEMBLER bfd *headers ATTRIBUTE_UNUSED; #else - object_headers *headers; + object_headers *headers ATTRIBUTE_UNUSED; #endif segT seg; fragS *fragP; @@ -3310,7 +3310,7 @@ char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; int lowbyte = target_big_endian ? 1 : 0; int highbyte = target_big_endian ? 0 : 1; - long val = * (long *) valP; + long val = (long) *valP; long max, min; int shift; @@ -3659,6 +3659,16 @@ number_to_chars_bigendian (ptr, use, nbytes); } +/* This version is used in obj-coff.c when not using BFD_ASSEMBLER. + eg for the sh-hms target. */ + +long +md_pcrel_from (fixP) + fixS *fixP; +{ + return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address + 2; +} + long md_pcrel_from_section (fixP, sec) fixS *fixP; @@ -3677,7 +3687,7 @@ return fixP->fx_subsy ? fixP->fx_where + fixP->fx_frag->fr_address : 0; } - return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address + 2; + return md_pcrel_from (fixP); } #ifdef OBJ_COFF diff -Nur binutils-2.12/gas/config/tc-sh.h binutils-2.12.1/gas/config/tc-sh.h --- binutils-2.12/gas/config/tc-sh.h Wed Jan 23 21:59:16 2002 +++ binutils-2.12.1/gas/config/tc-sh.h Thu May 9 10:49:40 2002 @@ -68,7 +68,12 @@ /* This arranges for gas/write.c to not apply a relocation if obj_fix_adjustable() says it is not adjustable. */ -#define TC_FIX_ADJUSTABLE(fixP) obj_fix_adjustable (fixP) +/* ??? fixups with symbols in SEC_MERGE sections are marked with + obj_fix_adjustable and have a non-section symbol, as in + "vwxyz"+1 in execute/string-opt-6.c . Maybe the test of + (symbol_used_in_reloc_p should be done in the machine-independent code. */ +#define TC_FIX_ADJUSTABLE(fixP) \ + (! symbol_used_in_reloc_p (fixP->fx_addsy) && obj_fix_adjustable (fixP)) #endif #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC) diff -Nur binutils-2.12/gas/config/tc-xstormy16.h binutils-2.12.1/gas/config/tc-xstormy16.h --- binutils-2.12/gas/config/tc-xstormy16.h Fri Dec 7 22:45:55 2001 +++ binutils-2.12.1/gas/config/tc-xstormy16.h Thu May 9 10:49:40 2002 @@ -1,5 +1,5 @@ /* tc-xstormy16.h -- Header file for tc-xstormy16.c. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -67,3 +67,6 @@ extern void xstormy16_cons_fix_new PARAMS ((fragS *f, int, int, expressionS *)); #define md_cgen_record_fixup_exp xstormy16_cgen_record_fixup_exp + +/* Minimum instruction is two bytes. */ +#define DWARF2_LINE_MIN_INSN_LENGTH 2 diff -Nur binutils-2.12/gas/config.in binutils-2.12.1/gas/config.in --- binutils-2.12/gas/config.in Wed Oct 17 01:38:42 2001 +++ binutils-2.12.1/gas/config.in Mon Apr 1 20:28:59 2002 @@ -130,6 +130,9 @@ /* Define if you have the header file. */ #undef HAVE_SYS_PARAM_H +/* Define if you have the header file. */ +#undef HAVE_SYS_STAT_H + /* Define if you have the header file. */ #undef HAVE_SYS_TYPES_H diff -Nur binutils-2.12/gas/dep-in.sed binutils-2.12.1/gas/dep-in.sed --- binutils-2.12/gas/dep-in.sed Thu Jun 22 09:01:42 2000 +++ binutils-2.12.1/gas/dep-in.sed Thu Apr 4 11:21:09 2002 @@ -4,9 +4,12 @@ s! \.\./! !g s!@INCDIR@!$(INCDIR)!g +s!@TOPDIR@/include!$(INCDIR)!g s!@BFDDIR@!$(BFDDIR)!g +s!@TOPDIR@/bfd!$(BFDDIR)!g s!@SRCDIR@/config!$(srcdir)/config!g s!@SRCDIR@/\.\./opcodes!$(srcdir)/../opcodes!g +s!@TOPDIR@/opcodes!$(srcdir)/../opcodes!g s!@SRCDIR@/!!g s! \$(INCDIR)/ansidecl\.h!!g s! \$(INCDIR)/fopen-same\.h!!g diff -Nur binutils-2.12/gas/doc/Makefile.in binutils-2.12.1/gas/doc/Makefile.in --- binutils-2.12/gas/doc/Makefile.in Sun Feb 10 18:38:12 2002 +++ binutils-2.12.1/gas/doc/Makefile.in Mon Apr 1 20:29:05 2002 @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -281,7 +281,7 @@ else ii=; fi; \ list='$(INFO_DEPS)'; \ for file in $$list; do \ - test -z "$ii" \ + test -z "$$ii" \ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ done @$(NORMAL_UNINSTALL) diff -Nur binutils-2.12/gas/doc/as.1 binutils-2.12.1/gas/doc/as.1 --- binutils-2.12/gas/doc/as.1 Fri Mar 8 01:16:02 2002 +++ binutils-2.12.1/gas/doc/as.1 Tue May 14 19:47:18 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "AS 1" -.TH AS 1 "2002-03-08" "binutils-2.12" "GNU Development Tools" +.TH AS 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" .UC .SH "NAME" \&\s-1AS\s0 \- the portable \s-1GNU\s0 assembler. diff -Nur binutils-2.12/gas/doc/as.info binutils-2.12.1/gas/doc/as.info --- binutils-2.12/gas/doc/as.info Fri Mar 8 14:45:08 2002 +++ binutils-2.12.1/gas/doc/as.info Tue May 14 19:47:18 2002 @@ -1,4 +1,4 @@ -This is as.info, produced by makeinfo version 4.0f from as.texinfo. +This is as.info, produced by makeinfo version 4.1 from as.texinfo. START-INFO-DIR-ENTRY * As: (as). The GNU assembler. @@ -19,411 +19,411 @@  Indirect: -as.info-1: 747 -as.info-2: 50358 -as.info-3: 100149 -as.info-4: 149856 -as.info-5: 199764 -as.info-6: 249184 -as.info-7: 298854 -as.info-8: 348734 -as.info-9: 398558 -as.info-10: 444194 +as.info-1: 746 +as.info-2: 50359 +as.info-3: 100150 +as.info-4: 149857 +as.info-5: 199765 +as.info-6: 249185 +as.info-7: 298855 +as.info-8: 348735 +as.info-9: 398559 +as.info-10: 444195  Tag Table: (Indirect) -Node: Top747 -Node: Overview1667 -Node: Manual18856 -Node: GNU Assembler19795 -Node: Object Formats20961 -Node: Command Line21408 -Node: Input Files22490 -Node: Object24469 -Node: Errors25416 -Node: Invoking26606 -Node: a28512 -Node: D30271 -Node: f30491 -Node: I30994 -Node: K31533 -Node: L31832 -Node: listing32664 -Node: M34250 -Node: MD38646 -Node: o39065 -Node: R39513 -Node: statistics40529 -Node: traditional-format40929 -Node: v41395 -Node: W41663 -Node: Z42563 -Node: Syntax43078 -Node: Preprocessing43668 -Node: Whitespace45228 -Node: Comments45618 -Node: Symbol Intro47761 -Node: Statements48444 -Node: Constants50358 -Node: Characters50984 -Node: Strings51477 -Node: Chars53630 -Node: Numbers54371 -Node: Integers54902 -Node: Bignums55545 -Node: Flonums55888 -Node: Sections57621 -Node: Secs Background57995 -Node: Ld Sections63021 -Node: As Sections65417 -Node: Sub-Sections66322 -Node: bss69321 -Node: Symbols70266 -Node: Labels70913 -Node: Setting Symbols71639 -Node: Symbol Names72004 -Node: Dot76477 -Node: Symbol Attributes76919 -Node: Symbol Value77651 -Node: Symbol Type78687 -Node: a.out Symbols79066 -Node: Symbol Desc79316 -Node: Symbol Other79598 -Node: COFF Symbols79754 -Node: SOM Symbols80383 -Node: Expressions80816 -Node: Empty Exprs81564 -Node: Integer Exprs81906 -Node: Arguments82296 -Node: Operators83393 -Node: Prefix Ops83719 -Node: Infix Ops84038 -Node: Pseudo Ops86426 -Node: Abort91245 -Node: ABORT91646 -Node: Align91908 -Node: Ascii94097 -Node: Asciz94398 -Node: Balign94638 -Node: Byte96496 -Node: Comm96729 -Node: Data98088 -Node: Def98398 -Node: Desc98766 -Node: Dim99259 -Node: Double99650 -Node: Eject99981 -Node: Else100149 -Node: Elseif100439 -Node: End100723 -Node: Endef100931 -Node: Endfunc101254 -Node: Endif101422 -Node: Equ101675 -Node: Equiv101978 -Node: Err102374 -Node: Exitm102677 -Node: Extern102837 -Node: Fail103091 -Node: File103529 -Node: Fill104138 -Node: Float105095 -Node: Func105429 -Node: Global106009 -Node: Hidden106752 -Node: hword107321 -Node: Ident107642 -Node: If107942 -Node: Incbin110533 -Node: Include111221 -Node: Int111765 -Node: Internal112139 -Node: Irp112774 -Node: Irpc113573 -Node: Lcomm114392 -Node: Lflags115133 -Node: Line115320 -Node: Linkonce116343 -Node: Ln117563 -Node: MRI117711 -Node: List118038 -Node: Long118641 -Node: Macro118811 -Node: Nolist121195 -Node: Octa121611 -Node: Org121937 -Node: P2align123212 -Node: Previous125133 -Node: PopSection125820 -Node: Print126321 -Node: Protected126543 -Node: Psize127180 -Node: Purgem127857 -Node: PushSection128071 -Node: Quad128654 -Node: Rept129100 -Node: Sbttl129506 -Node: Scl129864 -Node: Section130360 -Node: Set134058 -Node: Short134610 -Node: Single134923 -Node: Size135260 -Node: Sleb128135997 -Node: Skip136312 -Node: Space136627 -Node: Stab137512 -Node: String139507 -Node: Struct139926 -Node: SubSection140642 -Node: Symver141196 -Node: Tag143580 -Node: Text144088 -Node: Title144400 -Node: Type144772 -Node: Uleb128145879 -Node: Val146194 -Node: Version146555 -Node: VTableEntry146821 -Node: VTableInherit147102 -Node: Weak147536 -Node: Word147797 -Node: Deprecated149631 -Node: Machine Dependencies149856 -Node: AMD29K-Dependent152332 -Node: AMD29K Options152715 -Node: AMD29K Syntax152889 -Node: AMD29K-Macros153153 -Node: AMD29K-Chars153404 -Node: AMD29K-Regs153667 -Node: AMD29K Floating Point154931 -Node: AMD29K Directives155137 -Node: AMD29K Opcodes156545 -Node: Alpha-Dependent156881 -Node: Alpha Notes157312 -Node: Alpha Options157584 -Node: Alpha Syntax159734 -Node: Alpha-Chars160194 -Node: Alpha-Regs160412 -Node: Alpha-Relocs160783 -Node: Alpha Floating Point164818 -Node: Alpha Directives165031 -Node: Alpha Opcodes170057 -Node: ARC-Dependent170343 -Node: ARC Options170718 -Node: ARC Syntax171770 -Node: ARC-Chars171990 -Node: ARC-Regs172109 -Node: ARC Floating Point172220 -Node: ARC Directives172522 -Node: ARC Opcodes173804 -Node: ARM-Dependent174004 -Node: ARM Options174378 -Node: ARM Syntax179513 -Node: ARM-Chars179733 -Node: ARM-Regs180244 -Node: ARM Floating Point180416 -Node: ARM Directives180606 -Node: ARM Opcodes182673 -Node: CRIS-Dependent184723 -Node: CRIS-Opts185025 -Node: CRIS-Expand186763 -Node: CRIS-Syntax187588 -Node: CRIS-Chars187914 -Node: CRIS-Pic188452 -Ref: crispic188635 -Node: CRIS-Regs192150 -Node: CRIS-Pseudos192554 -Ref: crisnous193317 -Node: D10V-Dependent194379 -Node: D10V-Opts194722 -Node: D10V-Syntax195676 -Node: D10V-Size196196 -Node: D10V-Subs197156 -Node: D10V-Chars198178 -Node: D10V-Regs199764 -Node: D10V-Addressing200795 -Node: D10V-Word201468 -Node: D10V-Float201969 -Node: D10V-Opcodes202271 -Node: D30V-Dependent202655 -Node: D30V-Opts203000 -Node: D30V-Syntax203666 -Node: D30V-Size204189 -Node: D30V-Subs205147 -Node: D30V-Chars206169 -Node: D30V-Guarded208454 -Node: D30V-Regs209122 -Node: D30V-Addressing210248 -Node: D30V-Float210903 -Node: D30V-Opcodes211205 -Node: H8/300-Dependent211589 -Node: H8/300 Options211993 -Node: H8/300 Syntax212174 -Node: H8/300-Chars212461 -Node: H8/300-Regs212745 -Node: H8/300-Addressing213649 -Node: H8/300 Floating Point214675 -Node: H8/300 Directives214991 -Node: H8/300 Opcodes215511 -Node: H8/500-Dependent223864 -Node: H8/500 Options224268 -Node: H8/500 Syntax224449 -Node: H8/500-Chars224736 -Node: H8/500-Regs225027 -Node: H8/500-Addressing225783 -Node: H8/500 Floating Point226400 -Node: H8/500 Directives226716 -Node: H8/500 Opcodes227035 -Node: HPPA-Dependent232148 -Node: HPPA Notes232573 -Node: HPPA Options233320 -Node: HPPA Syntax233504 -Node: HPPA Floating Point234763 -Node: HPPA Directives234958 -Node: HPPA Opcodes241549 -Node: ESA/390-Dependent241797 -Node: ESA/390 Notes242247 -Node: ESA/390 Options243027 -Node: ESA/390 Syntax243226 -Node: ESA/390 Floating Point245387 -Node: ESA/390 Directives245656 -Node: ESA/390 Opcodes248933 -Node: i386-Dependent249184 -Node: i386-Options250242 -Node: i386-Syntax250853 -Node: i386-Mnemonics253256 -Node: i386-Regs255710 -Node: i386-Prefixes257744 -Node: i386-Memory260492 -Node: i386-Jumps263418 -Node: i386-Float264528 -Node: i386-SIMD266346 -Node: i386-16bit267444 -Node: i386-Bugs269469 -Node: i386-Arch270208 -Node: i386-Notes272072 -Node: i860-Dependent272917 -Node: Notes-i860273303 -Node: Options-i860273797 -Node: Directives-i860274802 -Node: Opcodes for i860275464 -Node: i960-Dependent277583 -Node: Options-i960277975 -Node: Floating Point-i960281856 -Node: Directives-i960282113 -Node: Opcodes for i960284133 -Node: callj-i960284739 -Node: Compare-and-branch-i960285214 -Node: M32R-Dependent287103 -Node: M32R-Opts287366 -Node: M32R-Warnings289118 -Node: M68K-Dependent292106 -Node: M68K-Opts292563 -Node: M68K-Syntax298854 -Node: M68K-Moto-Syntax300682 -Node: M68K-Float303260 -Node: M68K-Directives303769 -Node: M68K-opcodes304364 -Node: M68K-Branch304576 -Node: M68K-Chars308762 -Node: M68HC11-Dependent309157 -Node: M68HC11-Opts309560 -Node: M68HC11-Syntax312263 -Node: M68HC11-Float313079 -Node: M68HC11-opcodes313592 -Node: M68HC11-Branch313760 -Node: M88K-Dependent316267 -Node: M88K Directives316508 -Node: MIPS-Dependent318016 -Node: MIPS Opts318917 -Node: MIPS Object324498 -Node: MIPS Stabs326053 -Node: MIPS ISA326764 -Node: MIPS autoextend327894 -Node: MIPS insn328605 -Node: MIPS option stack329091 -Node: MMIX-Dependent329804 -Node: MMIX-Opts330170 -Node: MMIX-Expand332989 -Node: MMIX-Syntax334293 -Ref: mmixsite334432 -Node: MMIX-Chars335480 -Node: MMIX-Symbols336119 -Node: MMIX-Regs338172 -Node: MMIX-Pseudos339182 -Ref: MMIX-loc339305 -Ref: MMIX-local340385 -Ref: MMIX-is340917 -Ref: MMIX-greg341188 -Ref: GREG-base341480 -Ref: MMIX-byte343424 -Ref: MMIX-constants343895 -Ref: MMIX-prefix344540 -Ref: MMIX-spec344914 -Node: MMIX-mmixal345248 -Node: PDP-11-Dependent348734 -Node: PDP-11-Options349113 -Node: PDP-11-Pseudos354110 -Node: PDP-11-Syntax354444 -Node: PDP-11-Mnemonics355184 -Node: PDP-11-Synthetic355475 -Node: PJ-Dependent355682 -Node: PJ Options355897 -Node: PPC-Dependent356164 -Node: PowerPC-Opts356380 -Node: SH-Dependent358232 -Node: SH Options358614 -Node: SH Syntax359046 -Node: SH-Chars359305 -Node: SH-Regs359584 -Node: SH-Addressing360183 -Node: SH Floating Point361077 -Node: SH Directives361373 -Node: SH Opcodes361729 -Node: SH64-Dependent365976 -Node: SH64 Options366331 -Node: SH64 Syntax367756 -Node: SH64-Chars368025 -Node: SH64-Regs368310 -Node: SH64-Addressing369391 -Node: SH64 Directives370559 -Node: SH64 Opcodes371656 -Node: Sparc-Dependent372360 -Node: Sparc-Opts372733 -Node: Sparc-Aligned-Data374979 -Node: Sparc-Float375823 -Node: Sparc-Directives376013 -Node: Z8000-Dependent377962 -Node: Z8000 Options378921 -Node: Z8000 Syntax379096 -Node: Z8000-Chars379372 -Node: Z8000-Regs379590 -Node: Z8000-Addressing380380 -Node: Z8000 Directives381323 -Node: Z8000 Opcodes382921 -Node: Vax-Dependent392857 -Node: VAX-Opts393364 -Node: VAX-float397088 -Node: VAX-directives397709 -Node: VAX-opcodes398558 -Node: VAX-branch398936 -Node: VAX-operands401432 -Node: VAX-no402184 -Node: V850-Dependent402410 -Node: V850 Options402796 -Node: V850 Syntax404609 -Node: V850-Chars404835 -Node: V850-Regs404985 -Node: V850 Floating Point406522 -Node: V850 Directives406717 -Node: V850 Opcodes407617 -Node: Reporting Bugs412902 -Node: Bug Criteria413625 -Node: Bug Reporting414385 -Node: Acknowledgements420953 -Ref: Acknowledgements-Footnote-1425744 -Node: GNU Free Documentation License425770 -Node: Index444194 +Node: Top746 +Node: Overview1668 +Node: Manual18857 +Node: GNU Assembler19796 +Node: Object Formats20962 +Node: Command Line21409 +Node: Input Files22491 +Node: Object24470 +Node: Errors25417 +Node: Invoking26607 +Node: a28513 +Node: D30272 +Node: f30492 +Node: I30995 +Node: K31534 +Node: L31833 +Node: listing32665 +Node: M34251 +Node: MD38647 +Node: o39066 +Node: R39514 +Node: statistics40530 +Node: traditional-format40930 +Node: v41396 +Node: W41664 +Node: Z42564 +Node: Syntax43079 +Node: Preprocessing43669 +Node: Whitespace45229 +Node: Comments45619 +Node: Symbol Intro47762 +Node: Statements48445 +Node: Constants50359 +Node: Characters50985 +Node: Strings51478 +Node: Chars53631 +Node: Numbers54372 +Node: Integers54903 +Node: Bignums55546 +Node: Flonums55889 +Node: Sections57622 +Node: Secs Background57996 +Node: Ld Sections63022 +Node: As Sections65418 +Node: Sub-Sections66323 +Node: bss69322 +Node: Symbols70267 +Node: Labels70914 +Node: Setting Symbols71640 +Node: Symbol Names72005 +Node: Dot76478 +Node: Symbol Attributes76920 +Node: Symbol Value77652 +Node: Symbol Type78688 +Node: a.out Symbols79067 +Node: Symbol Desc79317 +Node: Symbol Other79599 +Node: COFF Symbols79755 +Node: SOM Symbols80384 +Node: Expressions80817 +Node: Empty Exprs81565 +Node: Integer Exprs81907 +Node: Arguments82297 +Node: Operators83394 +Node: Prefix Ops83720 +Node: Infix Ops84039 +Node: Pseudo Ops86427 +Node: Abort91246 +Node: ABORT91647 +Node: Align91909 +Node: Ascii94098 +Node: Asciz94399 +Node: Balign94639 +Node: Byte96497 +Node: Comm96730 +Node: Data98089 +Node: Def98399 +Node: Desc98767 +Node: Dim99260 +Node: Double99651 +Node: Eject99982 +Node: Else100150 +Node: Elseif100440 +Node: End100724 +Node: Endef100932 +Node: Endfunc101255 +Node: Endif101423 +Node: Equ101676 +Node: Equiv101979 +Node: Err102375 +Node: Exitm102678 +Node: Extern102838 +Node: Fail103092 +Node: File103530 +Node: Fill104139 +Node: Float105096 +Node: Func105430 +Node: Global106010 +Node: Hidden106753 +Node: hword107322 +Node: Ident107643 +Node: If107943 +Node: Incbin110534 +Node: Include111222 +Node: Int111766 +Node: Internal112140 +Node: Irp112775 +Node: Irpc113574 +Node: Lcomm114393 +Node: Lflags115134 +Node: Line115321 +Node: Linkonce116344 +Node: Ln117564 +Node: MRI117712 +Node: List118039 +Node: Long118642 +Node: Macro118812 +Node: Nolist121196 +Node: Octa121612 +Node: Org121938 +Node: P2align123213 +Node: Previous125134 +Node: PopSection125821 +Node: Print126322 +Node: Protected126544 +Node: Psize127181 +Node: Purgem127858 +Node: PushSection128072 +Node: Quad128655 +Node: Rept129101 +Node: Sbttl129507 +Node: Scl129865 +Node: Section130361 +Node: Set134059 +Node: Short134611 +Node: Single134924 +Node: Size135261 +Node: Sleb128135998 +Node: Skip136313 +Node: Space136628 +Node: Stab137513 +Node: String139508 +Node: Struct139927 +Node: SubSection140643 +Node: Symver141197 +Node: Tag143581 +Node: Text144089 +Node: Title144401 +Node: Type144773 +Node: Uleb128145880 +Node: Val146195 +Node: Version146556 +Node: VTableEntry146822 +Node: VTableInherit147103 +Node: Weak147537 +Node: Word147798 +Node: Deprecated149632 +Node: Machine Dependencies149857 +Node: AMD29K-Dependent152333 +Node: AMD29K Options152716 +Node: AMD29K Syntax152890 +Node: AMD29K-Macros153154 +Node: AMD29K-Chars153405 +Node: AMD29K-Regs153668 +Node: AMD29K Floating Point154932 +Node: AMD29K Directives155138 +Node: AMD29K Opcodes156546 +Node: Alpha-Dependent156882 +Node: Alpha Notes157313 +Node: Alpha Options157585 +Node: Alpha Syntax159735 +Node: Alpha-Chars160195 +Node: Alpha-Regs160413 +Node: Alpha-Relocs160784 +Node: Alpha Floating Point164819 +Node: Alpha Directives165032 +Node: Alpha Opcodes170058 +Node: ARC-Dependent170344 +Node: ARC Options170719 +Node: ARC Syntax171771 +Node: ARC-Chars171991 +Node: ARC-Regs172110 +Node: ARC Floating Point172221 +Node: ARC Directives172523 +Node: ARC Opcodes173805 +Node: ARM-Dependent174005 +Node: ARM Options174379 +Node: ARM Syntax179514 +Node: ARM-Chars179734 +Node: ARM-Regs180245 +Node: ARM Floating Point180417 +Node: ARM Directives180607 +Node: ARM Opcodes182674 +Node: CRIS-Dependent184724 +Node: CRIS-Opts185026 +Node: CRIS-Expand186764 +Node: CRIS-Syntax187589 +Node: CRIS-Chars187915 +Node: CRIS-Pic188453 +Ref: crispic188636 +Node: CRIS-Regs192151 +Node: CRIS-Pseudos192555 +Ref: crisnous193318 +Node: D10V-Dependent194380 +Node: D10V-Opts194723 +Node: D10V-Syntax195677 +Node: D10V-Size196197 +Node: D10V-Subs197157 +Node: D10V-Chars198179 +Node: D10V-Regs199765 +Node: D10V-Addressing200796 +Node: D10V-Word201469 +Node: D10V-Float201970 +Node: D10V-Opcodes202272 +Node: D30V-Dependent202656 +Node: D30V-Opts203001 +Node: D30V-Syntax203667 +Node: D30V-Size204190 +Node: D30V-Subs205148 +Node: D30V-Chars206170 +Node: D30V-Guarded208455 +Node: D30V-Regs209123 +Node: D30V-Addressing210249 +Node: D30V-Float210904 +Node: D30V-Opcodes211206 +Node: H8/300-Dependent211590 +Node: H8/300 Options211994 +Node: H8/300 Syntax212175 +Node: H8/300-Chars212462 +Node: H8/300-Regs212746 +Node: H8/300-Addressing213650 +Node: H8/300 Floating Point214676 +Node: H8/300 Directives214992 +Node: H8/300 Opcodes215512 +Node: H8/500-Dependent223865 +Node: H8/500 Options224269 +Node: H8/500 Syntax224450 +Node: H8/500-Chars224737 +Node: H8/500-Regs225028 +Node: H8/500-Addressing225784 +Node: H8/500 Floating Point226401 +Node: H8/500 Directives226717 +Node: H8/500 Opcodes227036 +Node: HPPA-Dependent232149 +Node: HPPA Notes232574 +Node: HPPA Options233321 +Node: HPPA Syntax233505 +Node: HPPA Floating Point234764 +Node: HPPA Directives234959 +Node: HPPA Opcodes241550 +Node: ESA/390-Dependent241798 +Node: ESA/390 Notes242248 +Node: ESA/390 Options243028 +Node: ESA/390 Syntax243227 +Node: ESA/390 Floating Point245388 +Node: ESA/390 Directives245657 +Node: ESA/390 Opcodes248934 +Node: i386-Dependent249185 +Node: i386-Options250243 +Node: i386-Syntax250854 +Node: i386-Mnemonics253257 +Node: i386-Regs255711 +Node: i386-Prefixes257745 +Node: i386-Memory260493 +Node: i386-Jumps263419 +Node: i386-Float264529 +Node: i386-SIMD266347 +Node: i386-16bit267445 +Node: i386-Bugs269470 +Node: i386-Arch270209 +Node: i386-Notes272073 +Node: i860-Dependent272918 +Node: Notes-i860273304 +Node: Options-i860273798 +Node: Directives-i860274803 +Node: Opcodes for i860275465 +Node: i960-Dependent277584 +Node: Options-i960277976 +Node: Floating Point-i960281857 +Node: Directives-i960282114 +Node: Opcodes for i960284134 +Node: callj-i960284740 +Node: Compare-and-branch-i960285215 +Node: M32R-Dependent287104 +Node: M32R-Opts287367 +Node: M32R-Warnings289119 +Node: M68K-Dependent292107 +Node: M68K-Opts292564 +Node: M68K-Syntax298855 +Node: M68K-Moto-Syntax300683 +Node: M68K-Float303261 +Node: M68K-Directives303770 +Node: M68K-opcodes304365 +Node: M68K-Branch304577 +Node: M68K-Chars308763 +Node: M68HC11-Dependent309158 +Node: M68HC11-Opts309561 +Node: M68HC11-Syntax312264 +Node: M68HC11-Float313080 +Node: M68HC11-opcodes313593 +Node: M68HC11-Branch313761 +Node: M88K-Dependent316268 +Node: M88K Directives316509 +Node: MIPS-Dependent318017 +Node: MIPS Opts318918 +Node: MIPS Object324499 +Node: MIPS Stabs326054 +Node: MIPS ISA326765 +Node: MIPS autoextend327895 +Node: MIPS insn328606 +Node: MIPS option stack329092 +Node: MMIX-Dependent329805 +Node: MMIX-Opts330171 +Node: MMIX-Expand332990 +Node: MMIX-Syntax334294 +Ref: mmixsite334433 +Node: MMIX-Chars335481 +Node: MMIX-Symbols336120 +Node: MMIX-Regs338173 +Node: MMIX-Pseudos339183 +Ref: MMIX-loc339306 +Ref: MMIX-local340386 +Ref: MMIX-is340918 +Ref: MMIX-greg341189 +Ref: GREG-base341481 +Ref: MMIX-byte343425 +Ref: MMIX-constants343896 +Ref: MMIX-prefix344541 +Ref: MMIX-spec344915 +Node: MMIX-mmixal345249 +Node: PDP-11-Dependent348735 +Node: PDP-11-Options349114 +Node: PDP-11-Pseudos354111 +Node: PDP-11-Syntax354445 +Node: PDP-11-Mnemonics355185 +Node: PDP-11-Synthetic355476 +Node: PJ-Dependent355683 +Node: PJ Options355898 +Node: PPC-Dependent356165 +Node: PowerPC-Opts356381 +Node: SH-Dependent358233 +Node: SH Options358615 +Node: SH Syntax359047 +Node: SH-Chars359306 +Node: SH-Regs359585 +Node: SH-Addressing360184 +Node: SH Floating Point361078 +Node: SH Directives361374 +Node: SH Opcodes361730 +Node: SH64-Dependent365977 +Node: SH64 Options366332 +Node: SH64 Syntax367757 +Node: SH64-Chars368026 +Node: SH64-Regs368311 +Node: SH64-Addressing369392 +Node: SH64 Directives370560 +Node: SH64 Opcodes371657 +Node: Sparc-Dependent372361 +Node: Sparc-Opts372734 +Node: Sparc-Aligned-Data374980 +Node: Sparc-Float375824 +Node: Sparc-Directives376014 +Node: Z8000-Dependent377963 +Node: Z8000 Options378922 +Node: Z8000 Syntax379097 +Node: Z8000-Chars379373 +Node: Z8000-Regs379591 +Node: Z8000-Addressing380381 +Node: Z8000 Directives381324 +Node: Z8000 Opcodes382922 +Node: Vax-Dependent392858 +Node: VAX-Opts393365 +Node: VAX-float397089 +Node: VAX-directives397710 +Node: VAX-opcodes398559 +Node: VAX-branch398937 +Node: VAX-operands401433 +Node: VAX-no402185 +Node: V850-Dependent402411 +Node: V850 Options402797 +Node: V850 Syntax404610 +Node: V850-Chars404836 +Node: V850-Regs404986 +Node: V850 Floating Point406523 +Node: V850 Directives406718 +Node: V850 Opcodes407618 +Node: Reporting Bugs412903 +Node: Bug Criteria413626 +Node: Bug Reporting414386 +Node: Acknowledgements420954 +Ref: Acknowledgements-Footnote-1425745 +Node: GNU Free Documentation License425771 +Node: Index444195  End Tag Table diff -Nur binutils-2.12/gas/doc/as.info-1 binutils-2.12.1/gas/doc/as.info-1 --- binutils-2.12/gas/doc/as.info-1 Fri Mar 8 14:45:08 2002 +++ binutils-2.12.1/gas/doc/as.info-1 Tue May 14 19:47:18 2002 @@ -1,4 +1,4 @@ -This is as.info, produced by makeinfo version 4.0f from as.texinfo. +This is as.info, produced by makeinfo version 4.1 from as.texinfo. START-INFO-DIR-ENTRY * As: (as). The GNU assembler. @@ -23,7 +23,7 @@ Using as ******** - This file is a user guide to the GNU assembler `as' version 2.12. + This file is a user guide to the GNU assembler `as' version 2.12.1. This document is distributed under the terms of the GNU Free Documentation License. A copy of the license is included in the diff -Nur binutils-2.12/gas/doc/as.info-10 binutils-2.12.1/gas/doc/as.info-10 --- binutils-2.12/gas/doc/as.info-10 Fri Mar 8 14:45:08 2002 +++ binutils-2.12.1/gas/doc/as.info-10 Tue May 14 19:47:18 2002 @@ -1,4 +1,4 @@ -This is as.info, produced by makeinfo version 4.0f from as.texinfo. +This is as.info, produced by makeinfo version 4.1 from as.texinfo. START-INFO-DIR-ENTRY * As: (as). The GNU assembler. diff -Nur binutils-2.12/gas/doc/as.info-2 binutils-2.12.1/gas/doc/as.info-2 --- binutils-2.12/gas/doc/as.info-2 Fri Mar 8 14:45:08 2002 +++ binutils-2.12.1/gas/doc/as.info-2 Tue May 14 19:47:18 2002 @@ -1,4 +1,4 @@ -This is as.info, produced by makeinfo version 4.0f from as.texinfo. +This is as.info, produced by makeinfo version 4.1 from as.texinfo. START-INFO-DIR-ENTRY * As: (as). The GNU assembler. diff -Nur binutils-2.12/gas/doc/as.info-3 binutils-2.12.1/gas/doc/as.info-3 --- binutils-2.12/gas/doc/as.info-3 Fri Mar 8 14:45:08 2002 +++ binutils-2.12.1/gas/doc/as.info-3 Tue May 14 19:47:18 2002 @@ -1,4 +1,4 @@ -This is as.info, produced by makeinfo version 4.0f from as.texinfo. +This is as.info, produced by makeinfo version 4.1 from as.texinfo. START-INFO-DIR-ENTRY * As: (as). The GNU assembler. diff -Nur binutils-2.12/gas/doc/as.info-4 binutils-2.12.1/gas/doc/as.info-4 --- binutils-2.12/gas/doc/as.info-4 Fri Mar 8 14:45:08 2002 +++ binutils-2.12.1/gas/doc/as.info-4 Tue May 14 19:47:18 2002 @@ -1,4 +1,4 @@ -This is as.info, produced by makeinfo version 4.0f from as.texinfo. +This is as.info, produced by makeinfo version 4.1 from as.texinfo. START-INFO-DIR-ENTRY * As: (as). The GNU assembler. diff -Nur binutils-2.12/gas/doc/as.info-5 binutils-2.12.1/gas/doc/as.info-5 --- binutils-2.12/gas/doc/as.info-5 Fri Mar 8 14:45:08 2002 +++ binutils-2.12.1/gas/doc/as.info-5 Tue May 14 19:47:18 2002 @@ -1,4 +1,4 @@ -This is as.info, produced by makeinfo version 4.0f from as.texinfo. +This is as.info, produced by makeinfo version 4.1 from as.texinfo. START-INFO-DIR-ENTRY * As: (as). The GNU assembler. diff -Nur binutils-2.12/gas/doc/as.info-6 binutils-2.12.1/gas/doc/as.info-6 --- binutils-2.12/gas/doc/as.info-6 Fri Mar 8 14:45:08 2002 +++ binutils-2.12.1/gas/doc/as.info-6 Tue May 14 19:47:18 2002 @@ -1,4 +1,4 @@ -This is as.info, produced by makeinfo version 4.0f from as.texinfo. +This is as.info, produced by makeinfo version 4.1 from as.texinfo. START-INFO-DIR-ENTRY * As: (as). The GNU assembler. diff -Nur binutils-2.12/gas/doc/as.info-7 binutils-2.12.1/gas/doc/as.info-7 --- binutils-2.12/gas/doc/as.info-7 Fri Mar 8 14:45:08 2002 +++ binutils-2.12.1/gas/doc/as.info-7 Tue May 14 19:47:18 2002 @@ -1,4 +1,4 @@ -This is as.info, produced by makeinfo version 4.0f from as.texinfo. +This is as.info, produced by makeinfo version 4.1 from as.texinfo. START-INFO-DIR-ENTRY * As: (as). The GNU assembler. diff -Nur binutils-2.12/gas/doc/as.info-8 binutils-2.12.1/gas/doc/as.info-8 --- binutils-2.12/gas/doc/as.info-8 Fri Mar 8 14:45:08 2002 +++ binutils-2.12.1/gas/doc/as.info-8 Tue May 14 19:47:18 2002 @@ -1,4 +1,4 @@ -This is as.info, produced by makeinfo version 4.0f from as.texinfo. +This is as.info, produced by makeinfo version 4.1 from as.texinfo. START-INFO-DIR-ENTRY * As: (as). The GNU assembler. diff -Nur binutils-2.12/gas/doc/as.info-9 binutils-2.12.1/gas/doc/as.info-9 --- binutils-2.12/gas/doc/as.info-9 Fri Mar 8 14:45:08 2002 +++ binutils-2.12.1/gas/doc/as.info-9 Tue May 14 19:47:18 2002 @@ -1,4 +1,4 @@ -This is as.info, produced by makeinfo version 4.0f from as.texinfo. +This is as.info, produced by makeinfo version 4.1 from as.texinfo. START-INFO-DIR-ENTRY * As: (as). The GNU assembler. diff -Nur binutils-2.12/gas/doc/gasver.texi binutils-2.12.1/gas/doc/gasver.texi --- binutils-2.12/gas/doc/gasver.texi Fri Mar 8 14:45:08 2002 +++ binutils-2.12.1/gas/doc/gasver.texi Tue May 14 19:47:17 2002 @@ -1 +1 @@ -@set VERSION 2.12 +@set VERSION 2.12.1 diff -Nur binutils-2.12/gas/stabs.c binutils-2.12.1/gas/stabs.c --- binutils-2.12/gas/stabs.c Tue Dec 4 18:07:26 2001 +++ binutils-2.12.1/gas/stabs.c Mon May 13 09:15:50 2002 @@ -240,6 +240,14 @@ other = longint; desc = get_absolute_expression (); + + if ((desc > 0xffff) || (desc < -0x8000)) + /* This could happen for example with a source file with a huge + number of lines. The only cure is to use a different debug + format, probably DWARF. */ + as_warn (_(".stab%c: description field '%x' too big, try a different debug format"), + what, desc); + if (what == 's' || what == 'n') { if (*input_line_pointer != ',') diff -Nur binutils-2.12/gas/symbols.c binutils-2.12.1/gas/symbols.c --- binutils-2.12/gas/symbols.c Wed Sep 19 01:33:20 2001 +++ binutils-2.12.1/gas/symbols.c Thu May 9 10:49:38 2002 @@ -986,6 +986,7 @@ case O_bit_not: case O_logical_not: left = resolve_symbol_value (add_symbol); + seg_left = S_GET_SEGMENT (add_symbol); if (op == O_uminus) left = -left; @@ -996,7 +997,7 @@ final_val += left + symp->sy_frag->fr_address; if (final_seg == expr_section || final_seg == undefined_section) - final_seg = absolute_section; + final_seg = seg_left; resolved = symbol_resolved_p (add_symbol); break; @@ -1062,15 +1063,19 @@ Don't emit messages unless we're finalizing the symbol value, otherwise we may get the same message multiple times. */ - if (op != O_eq && op != O_ne - && (seg_left != absolute_section - || seg_right != absolute_section) - && ((op != O_subtract - && op != O_lt && op != O_le && op != O_ge && op != O_gt) - || seg_left != seg_right - || (seg_left == undefined_section - && add_symbol != op_symbol)) - && finalize_syms) + if ((op == O_eq || op == O_ne) + || ((op == O_subtract + || op == O_lt || op == O_le || op == O_ge || op == O_gt) + && seg_left == seg_right + && (seg_left != undefined_section + || add_symbol == op_symbol)) + || (seg_left == absolute_section + && seg_right == absolute_section)) + { + if (final_seg == expr_section || final_seg == undefined_section) + final_seg = absolute_section; + } + else if (finalize_syms) { char *file; unsigned int line; @@ -1105,6 +1110,9 @@ as_bad (_("invalid section for operation setting `%s'"), S_GET_NAME (symp)); } + /* Prevent the error propagating. */ + if (final_seg == expr_section || final_seg == undefined_section) + final_seg = absolute_section; } /* Check for division by zero. */ @@ -1160,7 +1168,15 @@ final_val += symp->sy_frag->fr_address + left; if (final_seg == expr_section || final_seg == undefined_section) - final_seg = absolute_section; + { + if (seg_left == undefined_section + || seg_right == undefined_section) + final_seg = undefined_section; + else if (seg_left == absolute_section) + final_seg = seg_right; + else + final_seg = seg_left; + } resolved = (symbol_resolved_p (add_symbol) && symbol_resolved_p (op_symbol)); break; diff -Nur binutils-2.12/gas/testsuite/ChangeLog binutils-2.12.1/gas/testsuite/ChangeLog --- binutils-2.12/gas/testsuite/ChangeLog Tue Feb 26 17:24:42 2002 +++ binutils-2.12.1/gas/testsuite/ChangeLog Thu May 9 10:49:42 2002 @@ -1,3 +1,44 @@ +2002-05-09 Alan Modra + + Merge from mainline. + 2002-04-17 matthew green + * gas/ppc/altivec.d: Fix dssall test. + * gas/ppc/altivec.s: Likewise. + +2002-04-30 Chris Demetriou + + Merge from mainline: + 2002-03-15 Chris G. Demetriou + * gas/mips/mips.exp: Use elf-rel2 and elfel-rel2 for + mipsisa32*-*-* targets, rather than e32-rel2 and e32el-rel2. + +2002-04-27 Alan Modra + + Merge from mainline. + 2002-04-23 H.J. Lu + * gas/hppa/parse/parse.exp: Don't expect failure on line separator + test on hppa*-*-linux* nor hppa*-*-netbsd*. + + 2002-03-19 Bo Thorsen + * gas/i386/x86-64-opcode.d: More test cases for x86-64 opcodes. + * gas/i386/x86-64-opcode.s: Likewise + + 2002-02-24 Hans-Peter Nilsson + * gas/mmix/bspec-1.d, gas/mmix/bspec-2.d, gas/mmix/comment-1.d: + Adjust to changes in readelf output. + + 2002-02-22 Bo Thorsen + * i386.exp: Add x86-64-opcode (checks valid opcodes) and x86-64-inval + (checks invalid opcodes) checks + * x86-64-inval.l: New file. + * x86-64-inval.s: New file. + * x86-64-opcode.d: New file. + * x86-64-opcode.s: New file. + +2002-03-17 Hans-Peter Nilsson + + * gas/mmix/weak1.d, gas/mmix/weak1.d: New test. + 2002-02-26 Chris Demetriou * gas/mips/empic2.d: Adjust for the fact that relocations on diff -Nur binutils-2.12/gas/testsuite/gas/hppa/parse/parse.exp binutils-2.12.1/gas/testsuite/gas/hppa/parse/parse.exp --- binutils-2.12/gas/testsuite/gas/hppa/parse/parse.exp Fri Nov 23 11:18:14 2001 +++ binutils-2.12.1/gas/testsuite/gas/hppa/parse/parse.exp Thu May 9 10:49:47 2002 @@ -119,8 +119,11 @@ } if [istarget hppa*-*-*] then { - # GAS-2.0 does not always parse ! as a line separator when it should. - setup_xfail hppa*-*-* + if { ![istarget hppa*-*-linux*] + && ![istarget hppa*-*-netbsd*] } { + # GAS-2.0 does not always parse ! as a line separator when it should. + setup_xfail hppa*-*-* + } gas_test "linesepbug.s" "" "" "line separator bug" # Make sure GAS accepts syntax for accessing static data. diff -Nur binutils-2.12/gas/testsuite/gas/i386/i386.exp binutils-2.12.1/gas/testsuite/gas/i386/i386.exp --- binutils-2.12/gas/testsuite/gas/i386/i386.exp Sun Sep 30 00:09:35 2001 +++ binutils-2.12.1/gas/testsuite/gas/i386/i386.exp Thu May 9 10:49:47 2002 @@ -87,6 +87,8 @@ set ASFLAGS "$ASFLAGS --64" run_dump_test "x86_64" + run_dump_test "x86-64-opcode" + run_list_test "x86-64-inval" "-al" set ASFLAGS "$old_ASFLAGS" } diff -Nur binutils-2.12/gas/testsuite/gas/i386/x86-64-inval.l binutils-2.12.1/gas/testsuite/gas/i386/x86-64-inval.l --- binutils-2.12/gas/testsuite/gas/i386/x86-64-inval.l Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/gas/testsuite/gas/i386/x86-64-inval.l Sat Apr 27 08:46:10 2002 @@ -0,0 +1,30 @@ +.*: Assembler messages: +.*:3: Error: .* +.*:4: Error: .* +.*:5: Error: .* +.*:6: Error: .* +.*:7: Error: .* +.*:8: Error: .* +.*:9: Error: .* +.*:10: Error: .* +.*:11: Error: .* +.*:12: Error: .* +.*:13: Error: .* +.*:14: Error: .* +GAS LISTING .* + + + 1 [ ]* .text + 2 [ ]*# All the following should be illegal for x86-64 + 3 [ ]*calll \*%eax # 32-bit data size not allowed + 4 [ ]*calll \*\(%ax\) # 32-bit data size not allowed + 5 [ ]*calll \*\(%eax\) # 32-bit data size not allowed + 6 [ ]*calll \*\(%r8\) # 32-bit data size not allowed + 7 [ ]*calll \*\(%rax\) # 32-bit data size not allowed + 8 [ ]*callq \*\(%ax\) # 32-bit data size not allowed + 9 [ ]*callw \*\(%ax\) # no 16-bit addressing + 10 [ ]*foo:[ ]*jcxz foo # No prefix exists to select CX as a counter + 11 [ ]*popl %eax # can\'t have 32-bit stack operands + 12 [ ]*pushl %eax # can\'t have 32-bit stack operands + 13 [ ]*pushfl # can\'t have 32-bit stack operands + 14 [ ]*popfl # can\'t have 32-bit stack operands diff -Nur binutils-2.12/gas/testsuite/gas/i386/x86-64-inval.s binutils-2.12.1/gas/testsuite/gas/i386/x86-64-inval.s --- binutils-2.12/gas/testsuite/gas/i386/x86-64-inval.s Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/gas/testsuite/gas/i386/x86-64-inval.s Sat Apr 27 08:46:10 2002 @@ -0,0 +1,14 @@ + .text +# All the following should be illegal for x86-64 + calll *%eax # 32-bit data size not allowed + calll *(%ax) # 32-bit data size not allowed + calll *(%eax) # 32-bit data size not allowed + calll *(%r8) # 32-bit data size not allowed + calll *(%rax) # 32-bit data size not allowed + callq *(%ax) # 32-bit data size not allowed + callw *(%ax) # no 16-bit addressing +foo: jcxz foo # No prefix exists to select CX as a counter + popl %eax # can't have 32-bit stack operands + pushl %eax # can't have 32-bit stack operands + pushfl # can't have 32-bit stack operands + popfl # can't have 32-bit stack operands diff -Nur binutils-2.12/gas/testsuite/gas/i386/x86-64-opcode.d binutils-2.12.1/gas/testsuite/gas/i386/x86-64-opcode.d --- binutils-2.12/gas/testsuite/gas/i386/x86-64-opcode.d Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/gas/testsuite/gas/i386/x86-64-opcode.d Sat Apr 27 08:46:10 2002 @@ -0,0 +1,271 @@ +#as: -J +#objdump: -drw +#name: x86-64 opcode + +.*: +file format elf64-x86-64 + +Disassembly of section .text: + +0+000 <.text>: +[ ]*0:[ ]+41 ff 10[ ]+callq[ ]+\*\(%r8\)[ ]*(#.*)* +[ ]*3:[ ]+ff 10[ ]+callq[ ]+\*\(%rax\)[ ]*(#.*)* +[ ]*5:[ ]+41 ff 10[ ]+callq[ ]+\*\(%r8\)[ ]*(#.*)* +[ ]*8:[ ]+ff 10[ ]+callq[ ]+\*\(%rax\)[ ]*(#.*)* +[ ]*a:[ ]+cb[ ]+lret[ ]*(#.*)* +[ ]*b:[ ]+c3[ ]+retq[ ]*(#.*)* +[ ]*c:[ ]+cf[ ]+iret[ ]*(#.*)* +[ ]*d:[ ]+66 cf[ ]+iretw[ ]*(#.*)* +[ ]*f:[ ]+48 cf[ ]+iretq[ ]*(#.*)* +[ ]*11:[ ]+66 41 8c 08[ ]+movw[ ]+%cs,\(%r8\)[ ]*(#.*)* +[ ]*15:[ ]+66 8c 08[ ]+movw[ ]+%cs,\(%rax\)[ ]*(#.*)* +[ ]*18:[ ]+66 41 8c 10[ ]+movw[ ]+%ss,\(%r8\)[ ]*(#.*)* +[ ]*1c:[ ]+66 8c 10[ ]+movw[ ]+%ss,\(%rax\)[ ]*(#.*)* +[ ]*1f:[ ]+66 41 8c 20[ ]+movw[ ]+%fs,\(%r8\)[ ]*(#.*)* +[ ]*23:[ ]+66 8c 20[ ]+movw[ ]+%fs,\(%rax\)[ ]*(#.*)* +[ ]*26:[ ]+41 8c 08[ ]+movl[ ]+%cs,\(%r8\)[ ]*(#.*)* +[ ]*29:[ ]+8c 08[ ]+movl[ ]+%cs,\(%rax\)[ ]*(#.*)* +[ ]*2b:[ ]+41 8c 10[ ]+movl[ ]+%ss,\(%r8\)[ ]*(#.*)* +[ ]*2e:[ ]+8c 10[ ]+movl[ ]+%ss,\(%rax\)[ ]*(#.*)* +[ ]*30:[ ]+41 8c 20[ ]+movl[ ]+%fs,\(%r8\)[ ]*(#.*)* +[ ]*33:[ ]+8c 20[ ]+movl[ ]+%fs,\(%rax\)[ ]*(#.*)* +[ ]*35:[ ]+41 8e 10[ ]+movl[ ]+\(%r8\),%ss[ ]*(#.*)* +[ ]*38:[ ]+8e 10[ ]+movl[ ]+\(%rax\),%ss[ ]*(#.*)* +[ ]*3a:[ ]+41 8e 20[ ]+movl[ ]+\(%r8\),%fs[ ]*(#.*)* +[ ]*3d:[ ]+8e 20[ ]+movl[ ]+\(%rax\),%fs[ ]*(#.*)* +[ ]*3f:[ ]+41 c6 00 00[ ]+movb[ ]+\$0[x0]*,\(%r8\)[ ]*(#.*)* +[ ]*43:[ ]+c6 00 00[ ]+movb[ ]+\$0[x0]*,\(%rax\)[ ]*(#.*)* +[ ]*46:[ ]+66 41 c7 00 00 70[ ]+movw[ ]+\$0x7000,\(%r8\)[ ]*(#.*)* +[ ]*4c:[ ]+66 c7 00 00 70[ ]+movw[ ]+\$0x7000,\(%rax\)[ ]*(#.*)* +[ ]*51:[ ]+41 c7 00 00 00 00 70[ ]+movl[ ]+\$0x70000000,\(%r8\)[ ]*(#.*)* +[ ]*58:[ ]+c7 00 00 00 00 70[ ]+movl[ ]+\$0x70000000,\(%rax\)[ ]*(#.*)* +[ ]*5e:[ ]+41 c6 00 00[ ]+movb[ ]+\$0[x0]*,\(%r8\)[ ]*(#.*)* +[ ]*62:[ ]+c6 00 00[ ]+movb[ ]+\$0[x0]*,\(%rax\)[ ]*(#.*)* +[ ]*65:[ ]+66 41 c7 00 00 70[ ]+movw[ ]+\$0x7000,\(%r8\)[ ]*(#.*)* +[ ]*6b:[ ]+66 c7 00 00 70[ ]+movw[ ]+\$0x7000,\(%rax\)[ ]*(#.*)* +[ ]*70:[ ]+c7 00 00 00 00 70[ ]+movl[ ]+\$0x70000000,\(%rax\)[ ]*(#.*)* +[ ]*76:[ ]+41 c6 00 00[ ]+movb[ ]+\$0[x0]*,\(%r8\)[ ]*(#.*)* +[ ]*7a:[ ]+c6 00 00[ ]+movb[ ]+\$0[x0]*,\(%rax\)[ ]*(#.*)* +[ ]*7d:[ ]+66 41 c7 00 00 70[ ]+movw[ ]+\$0x7000,\(%r8\)[ ]*(#.*)* +[ ]*83:[ ]+66 c7 00 00 70[ ]+movw[ ]+\$0x7000,\(%rax\)[ ]*(#.*)* +[ ]*88:[ ]+41 c7 00 00 00 00 70[ ]+movl[ ]+\$0x70000000,\(%r8\)[ ]*(#.*)* +[ ]*8f:[ ]+c7 00 00 00 00 70[ ]+movl[ ]+\$0x70000000,\(%rax\)[ ]*(#.*)* +[ ]*95:[ ]+49 c7 00 00 00 00 70[ ]+movq[ ]+\$0x70000000,\(%r8\)[ ]*(#.*)* +[ ]*9c:[ ]+48 c7 00 00 00 00 70[ ]+movq[ ]+\$0x70000000,\(%rax\)[ ]*(#.*)* +[ ]*a3:[ ]+41 0f c3 00[ ]+movnti[ ]+%eax,\(%r8\)[ ]*(#.*)* +[ ]*a7:[ ]+0f c3 00[ ]+movnti[ ]+%eax,\(%rax\)[ ]*(#.*)* +[ ]*aa:[ ]+49 0f c3 00[ ]+movnti[ ]+%rax,\(%r8\)[ ]*(#.*)* +[ ]*ae:[ ]+48 0f c3 00[ ]+movnti[ ]+%rax,\(%rax\)[ ]*(#.*)* +[ ]*b2:[ ]+4d 0f c3 00[ ]+movnti[ ]+%r8,\(%r8\)[ ]*(#.*)* +[ ]*b6:[ ]+4c 0f c3 00[ ]+movnti[ ]+%r8,\(%rax\)[ ]*(#.*)* +[ ]*ba:[ ]+41 f6 38[ ]+idivb[ ]+\(%r8\)[ ]*(#.*)* +[ ]*bd:[ ]+f6 38[ ]+idivb[ ]+\(%rax\)[ ]*(#.*)* +[ ]*bf:[ ]+66 41 f7 38[ ]+idivw[ ]+\(%r8\)[ ]*(#.*)* +[ ]*c3:[ ]+66 f7 38[ ]+idivw[ ]+\(%rax\)[ ]*(#.*)* +[ ]*c6:[ ]+41 f7 38[ ]+idivl[ ]+\(%r8\)[ ]*(#.*)* +[ ]*c9:[ ]+f7 38[ ]+idivl[ ]+\(%rax\)[ ]*(#.*)* +[ ]*cb:[ ]+49 f7 38[ ]+idivq[ ]+\(%r8\)[ ]*(#.*)* +[ ]*ce:[ ]+48 f7 38[ ]+idivq[ ]+\(%rax\)[ ]*(#.*)* +[ ]*d1:[ ]+41 f6 28[ ]+imulb[ ]+\(%r8\)[ ]*(#.*)* +[ ]*d4:[ ]+f6 28[ ]+imulb[ ]+\(%rax\)[ ]*(#.*)* +[ ]*d6:[ ]+66 41 f7 28[ ]+imulw[ ]+\(%r8\)[ ]*(#.*)* +[ ]*da:[ ]+66 f7 28[ ]+imulw[ ]+\(%rax\)[ ]*(#.*)* +[ ]*dd:[ ]+41 f7 28[ ]+imull[ ]+\(%r8\)[ ]*(#.*)* +[ ]*e0:[ ]+f7 28[ ]+imull[ ]+\(%rax\)[ ]*(#.*)* +[ ]*e2:[ ]+49 f7 28[ ]+imulq[ ]+\(%r8\)[ ]*(#.*)* +[ ]*e5:[ ]+48 f7 28[ ]+imulq[ ]+\(%rax\)[ ]*(#.*)* +[ ]*e8:[ ]+66 41 0f 58 00[ ]+addpd[ ]+\(%r8\),%xmm0[ ]*(#.*)* +[ ]*ed:[ ]+66 0f 58 00[ ]+addpd[ ]+\(%rax\),%xmm0[ ]*(#.*)* +[ ]*f1:[ ]+66 45 0f 58 38[ ]+addpd[ ]+\(%r8\),%xmm15[ ]*(#.*)* +[ ]*f6:[ ]+66 44 0f 58 38[ ]+addpd[ ]+\(%rax\),%xmm15[ ]*(#.*)* +[ ]*fb:[ ]+66 45 0f 58 00[ ]+addpd[ ]+\(%r8\),%xmm8[ ]*(#.*)* +[ ]*100:[ ]+66 44 0f 58 00[ ]+addpd[ ]+\(%rax\),%xmm8[ ]*(#.*)* +[ ]*105:[ ]+66 41 0f 58 38[ ]+addpd[ ]+\(%r8\),%xmm7[ ]*(#.*)* +[ ]*10a:[ ]+66 0f 58 38[ ]+addpd[ ]+\(%rax\),%xmm7[ ]*(#.*)* +[ ]*10e:[ ]+66 0f 58 c0[ ]+addpd[ ]+%xmm0,%xmm0[ ]*(#.*)* +[ ]*112:[ ]+66 45 0f 58 ff[ ]+addpd[ ]+%xmm15,%xmm15[ ]*(#.*)* +[ ]*117:[ ]+66 45 0f 58 c7[ ]+addpd[ ]+%xmm15,%xmm8[ ]*(#.*)* +[ ]*11c:[ ]+f2 49 0f 2d 00[ ]+cvtsd2siq[ ]+\(%r8\),%rax[ ]*(#.*)* +[ ]*121:[ ]+f2 48 0f 2d 00[ ]+cvtsd2siq[ ]+\(%rax\),%rax[ ]*(#.*)* +[ ]*126:[ ]+f2 4d 0f 2d 00[ ]+cvtsd2siq[ ]+\(%r8\),%r8[ ]*(#.*)* +[ ]*12b:[ ]+f2 4c 0f 2d 00[ ]+cvtsd2siq[ ]+\(%rax\),%r8[ ]*(#.*)* +[ ]*130:[ ]+f2 48 0f 2d c0[ ]+cvtsd2siq[ ]+%xmm0,%rax[ ]*(#.*)* +[ ]*135:[ ]+f2 4d 0f 2d c7[ ]+cvtsd2siq[ ]+%xmm15,%r8[ ]*(#.*)* +[ ]*13a:[ ]+f2 49 0f 2d c7[ ]+cvtsd2siq[ ]+%xmm15,%rax[ ]*(#.*)* +[ ]*13f:[ ]+f2 4d 0f 2d c0[ ]+cvtsd2siq[ ]+%xmm8,%r8[ ]*(#.*)* +[ ]*144:[ ]+f2 49 0f 2d c0[ ]+cvtsd2siq[ ]+%xmm8,%rax[ ]*(#.*)* +[ ]*149:[ ]+f2 4c 0f 2d c7[ ]+cvtsd2siq[ ]+%xmm7,%r8[ ]*(#.*)* +[ ]*14e:[ ]+f2 48 0f 2d c7[ ]+cvtsd2siq[ ]+%xmm7,%rax[ ]*(#.*)* +[ ]*153:[ ]+f2 4c 0f 2d c0[ ]+cvtsd2siq[ ]+%xmm0,%r8[ ]*(#.*)* +[ ]*158:[ ]+f2 49 0f 2c 00[ ]+cvttsd2siq[ ]+\(%r8\),%rax[ ]*(#.*)* +[ ]*15d:[ ]+f2 48 0f 2c 00[ ]+cvttsd2siq[ ]+\(%rax\),%rax[ ]*(#.*)* +[ ]*162:[ ]+f2 4d 0f 2c 00[ ]+cvttsd2siq[ ]+\(%r8\),%r8[ ]*(#.*)* +[ ]*167:[ ]+f2 4c 0f 2c 00[ ]+cvttsd2siq[ ]+\(%rax\),%r8[ ]*(#.*)* +[ ]*16c:[ ]+f2 48 0f 2c c0[ ]+cvttsd2siq[ ]+%xmm0,%rax[ ]*(#.*)* +[ ]*171:[ ]+f2 4d 0f 2c c7[ ]+cvttsd2siq[ ]+%xmm15,%r8[ ]*(#.*)* +[ ]*176:[ ]+f2 49 0f 2c c7[ ]+cvttsd2siq[ ]+%xmm15,%rax[ ]*(#.*)* +[ ]*17b:[ ]+f2 4d 0f 2c c0[ ]+cvttsd2siq[ ]+%xmm8,%r8[ ]*(#.*)* +[ ]*180:[ ]+f2 49 0f 2c c0[ ]+cvttsd2siq[ ]+%xmm8,%rax[ ]*(#.*)* +[ ]*185:[ ]+f2 4c 0f 2c c7[ ]+cvttsd2siq[ ]+%xmm7,%r8[ ]*(#.*)* +[ ]*18a:[ ]+f2 48 0f 2c c7[ ]+cvttsd2siq[ ]+%xmm7,%rax[ ]*(#.*)* +[ ]*18f:[ ]+f2 4c 0f 2c c0[ ]+cvttsd2siq[ ]+%xmm0,%r8[ ]*(#.*)* +[ ]*194:[ ]+f3 49 0f 2d 00[ ]+cvtss2siq[ ]+\(%r8\),%rax[ ]*(#.*)* +[ ]*199:[ ]+f3 48 0f 2d 00[ ]+cvtss2siq[ ]+\(%rax\),%rax[ ]*(#.*)* +[ ]*19e:[ ]+f3 4d 0f 2d 00[ ]+cvtss2siq[ ]+\(%r8\),%r8[ ]*(#.*)* +[ ]*1a3:[ ]+f3 4c 0f 2d 00[ ]+cvtss2siq[ ]+\(%rax\),%r8[ ]*(#.*)* +[ ]*1a8:[ ]+f3 48 0f 2d c0[ ]+cvtss2siq[ ]+%xmm0,%rax[ ]*(#.*)* +[ ]*1ad:[ ]+f3 4d 0f 2d c7[ ]+cvtss2siq[ ]+%xmm15,%r8[ ]*(#.*)* +[ ]*1b2:[ ]+f3 49 0f 2d c7[ ]+cvtss2siq[ ]+%xmm15,%rax[ ]*(#.*)* +[ ]*1b7:[ ]+f3 4d 0f 2d c0[ ]+cvtss2siq[ ]+%xmm8,%r8[ ]*(#.*)* +[ ]*1bc:[ ]+f3 49 0f 2d c0[ ]+cvtss2siq[ ]+%xmm8,%rax[ ]*(#.*)* +[ ]*1c1:[ ]+f3 4c 0f 2d c7[ ]+cvtss2siq[ ]+%xmm7,%r8[ ]*(#.*)* +[ ]*1c6:[ ]+f3 48 0f 2d c7[ ]+cvtss2siq[ ]+%xmm7,%rax[ ]*(#.*)* +[ ]*1cb:[ ]+f3 4c 0f 2d c0[ ]+cvtss2siq[ ]+%xmm0,%r8[ ]*(#.*)* +[ ]*1d0:[ ]+f3 49 0f 2c 00[ ]+cvttss2siq[ ]+\(%r8\),%rax[ ]*(#.*)* +[ ]*1d5:[ ]+f3 48 0f 2c 00[ ]+cvttss2siq[ ]+\(%rax\),%rax[ ]*(#.*)* +[ ]*1da:[ ]+f3 4d 0f 2c 00[ ]+cvttss2siq[ ]+\(%r8\),%r8[ ]*(#.*)* +[ ]*1df:[ ]+f3 4c 0f 2c 00[ ]+cvttss2siq[ ]+\(%rax\),%r8[ ]*(#.*)* +[ ]*1e4:[ ]+f3 48 0f 2c c0[ ]+cvttss2siq[ ]+%xmm0,%rax[ ]*(#.*)* +[ ]*1e9:[ ]+f3 4d 0f 2c c7[ ]+cvttss2siq[ ]+%xmm15,%r8[ ]*(#.*)* +[ ]*1ee:[ ]+f3 49 0f 2c c7[ ]+cvttss2siq[ ]+%xmm15,%rax[ ]*(#.*)* +[ ]*1f3:[ ]+f3 4d 0f 2c c0[ ]+cvttss2siq[ ]+%xmm8,%r8[ ]*(#.*)* +[ ]*1f8:[ ]+f3 49 0f 2c c0[ ]+cvttss2siq[ ]+%xmm8,%rax[ ]*(#.*)* +[ ]*1fd:[ ]+f3 4c 0f 2c c7[ ]+cvttss2siq[ ]+%xmm7,%r8[ ]*(#.*)* +[ ]*202:[ ]+f3 48 0f 2c c7[ ]+cvttss2siq[ ]+%xmm7,%rax[ ]*(#.*)* +[ ]*207:[ ]+f3 4c 0f 2c c0[ ]+cvttss2siq[ ]+%xmm0,%r8[ ]*(#.*)* +[ ]*20c:[ ]+f3 41 0f 2a 00[ ]+cvtsi2ss[ ]+\(%r8\),%xmm0[ ]*(#.*)* +[ ]*211:[ ]+f3 0f 2a 00[ ]+cvtsi2ss[ ]+\(%rax\),%xmm0[ ]*(#.*)* +[ ]*215:[ ]+f3 45 0f 2a 38[ ]+cvtsi2ss[ ]+\(%r8\),%xmm15[ ]*(#.*)* +[ ]*21a:[ ]+f3 44 0f 2a 38[ ]+cvtsi2ss[ ]+\(%rax\),%xmm15[ ]*(#.*)* +[ ]*21f:[ ]+f3 45 0f 2a 00[ ]+cvtsi2ss[ ]+\(%r8\),%xmm8[ ]*(#.*)* +[ ]*224:[ ]+f3 44 0f 2a 00[ ]+cvtsi2ss[ ]+\(%rax\),%xmm8[ ]*(#.*)* +[ ]*229:[ ]+f3 41 0f 2a 38[ ]+cvtsi2ss[ ]+\(%r8\),%xmm7[ ]*(#.*)* +[ ]*22e:[ ]+f3 0f 2a 38[ ]+cvtsi2ss[ ]+\(%rax\),%xmm7[ ]*(#.*)* +[ ]*232:[ ]+f3 0f 2a c0[ ]+cvtsi2ss[ ]+%eax,%xmm0[ ]*(#.*)* +[ ]*236:[ ]+f3 44 0f 2a f8[ ]+cvtsi2ss[ ]+%eax,%xmm15[ ]*(#.*)* +[ ]*23b:[ ]+f3 44 0f 2a c0[ ]+cvtsi2ss[ ]+%eax,%xmm8[ ]*(#.*)* +[ ]*240:[ ]+f3 0f 2a f8[ ]+cvtsi2ss[ ]+%eax,%xmm7[ ]*(#.*)* +[ ]*244:[ ]+f3 41 0f 2a 00[ ]+cvtsi2ss[ ]+\(%r8\),%xmm0[ ]*(#.*)* +[ ]*249:[ ]+f3 0f 2a 00[ ]+cvtsi2ss[ ]+\(%rax\),%xmm0[ ]*(#.*)* +[ ]*24d:[ ]+f3 45 0f 2a 38[ ]+cvtsi2ss[ ]+\(%r8\),%xmm15[ ]*(#.*)* +[ ]*252:[ ]+f3 44 0f 2a 38[ ]+cvtsi2ss[ ]+\(%rax\),%xmm15[ ]*(#.*)* +[ ]*257:[ ]+f3 45 0f 2a 00[ ]+cvtsi2ss[ ]+\(%r8\),%xmm8[ ]*(#.*)* +[ ]*25c:[ ]+f3 44 0f 2a 00[ ]+cvtsi2ss[ ]+\(%rax\),%xmm8[ ]*(#.*)* +[ ]*261:[ ]+f3 41 0f 2a 38[ ]+cvtsi2ss[ ]+\(%r8\),%xmm7[ ]*(#.*)* +[ ]*266:[ ]+f3 0f 2a 38[ ]+cvtsi2ss[ ]+\(%rax\),%xmm7[ ]*(#.*)* +[ ]*26a:[ ]+f2 41 0f 2a 00[ ]+cvtsi2sd[ ]+\(%r8\),%xmm0[ ]*(#.*)* +[ ]*26f:[ ]+f2 0f 2a 00[ ]+cvtsi2sd[ ]+\(%rax\),%xmm0[ ]*(#.*)* +[ ]*273:[ ]+f2 45 0f 2a 38[ ]+cvtsi2sd[ ]+\(%r8\),%xmm15[ ]*(#.*)* +[ ]*278:[ ]+f2 44 0f 2a 38[ ]+cvtsi2sd[ ]+\(%rax\),%xmm15[ ]*(#.*)* +[ ]*27d:[ ]+f2 45 0f 2a 00[ ]+cvtsi2sd[ ]+\(%r8\),%xmm8[ ]*(#.*)* +[ ]*282:[ ]+f2 44 0f 2a 00[ ]+cvtsi2sd[ ]+\(%rax\),%xmm8[ ]*(#.*)* +[ ]*287:[ ]+f2 41 0f 2a 38[ ]+cvtsi2sd[ ]+\(%r8\),%xmm7[ ]*(#.*)* +[ ]*28c:[ ]+f2 0f 2a 38[ ]+cvtsi2sd[ ]+\(%rax\),%xmm7[ ]*(#.*)* +[ ]*290:[ ]+f2 0f 2a c0[ ]+cvtsi2sd[ ]+%eax,%xmm0[ ]*(#.*)* +[ ]*294:[ ]+f2 44 0f 2a f8[ ]+cvtsi2sd[ ]+%eax,%xmm15[ ]*(#.*)* +[ ]*299:[ ]+f2 44 0f 2a c0[ ]+cvtsi2sd[ ]+%eax,%xmm8[ ]*(#.*)* +[ ]*29e:[ ]+f2 0f 2a f8[ ]+cvtsi2sd[ ]+%eax,%xmm7[ ]*(#.*)* +[ ]*2a2:[ ]+f2 41 0f 2a 00[ ]+cvtsi2sd[ ]+\(%r8\),%xmm0[ ]*(#.*)* +[ ]*2a7:[ ]+f2 0f 2a 00[ ]+cvtsi2sd[ ]+\(%rax\),%xmm0[ ]*(#.*)* +[ ]*2ab:[ ]+f2 45 0f 2a 38[ ]+cvtsi2sd[ ]+\(%r8\),%xmm15[ ]*(#.*)* +[ ]*2b0:[ ]+f2 44 0f 2a 38[ ]+cvtsi2sd[ ]+\(%rax\),%xmm15[ ]*(#.*)* +[ ]*2b5:[ ]+f2 45 0f 2a 00[ ]+cvtsi2sd[ ]+\(%r8\),%xmm8[ ]*(#.*)* +[ ]*2ba:[ ]+f2 44 0f 2a 00[ ]+cvtsi2sd[ ]+\(%rax\),%xmm8[ ]*(#.*)* +[ ]*2bf:[ ]+f2 41 0f 2a 38[ ]+cvtsi2sd[ ]+\(%r8\),%xmm7[ ]*(#.*)* +[ ]*2c4:[ ]+f2 0f 2a 38[ ]+cvtsi2sd[ ]+\(%rax\),%xmm7[ ]*(#.*)* +[ ]*2c8:[ ]+66 41 0f 6e 00[ ]+movd[ ]+\(%r8\),%xmm0[ ]*(#.*)* +[ ]*2cd:[ ]+66 0f 6e 00[ ]+movd[ ]+\(%rax\),%xmm0[ ]*(#.*)* +[ ]*2d1:[ ]+66 45 0f 6e 38[ ]+movd[ ]+\(%r8\),%xmm15[ ]*(#.*)* +[ ]*2d6:[ ]+66 44 0f 6e 38[ ]+movd[ ]+\(%rax\),%xmm15[ ]*(#.*)* +[ ]*2db:[ ]+66 45 0f 6e 00[ ]+movd[ ]+\(%r8\),%xmm8[ ]*(#.*)* +[ ]*2e0:[ ]+66 44 0f 6e 00[ ]+movd[ ]+\(%rax\),%xmm8[ ]*(#.*)* +[ ]*2e5:[ ]+66 41 0f 6e 38[ ]+movd[ ]+\(%r8\),%xmm7[ ]*(#.*)* +[ ]*2ea:[ ]+66 0f 6e 38[ ]+movd[ ]+\(%rax\),%xmm7[ ]*(#.*)* +[ ]*2ee:[ ]+66 0f 6e c0[ ]+movd[ ]+%eax,%xmm0[ ]*(#.*)* +[ ]*2f2:[ ]+66 44 0f 6e f8[ ]+movd[ ]+%eax,%xmm15[ ]*(#.*)* +[ ]*2f7:[ ]+66 44 0f 6e c0[ ]+movd[ ]+%eax,%xmm8[ ]*(#.*)* +[ ]*2fc:[ ]+66 0f 6e f8[ ]+movd[ ]+%eax,%xmm7[ ]*(#.*)* +[ ]*300:[ ]+66 41 0f 7e 00[ ]+movd[ ]+%xmm0,\(%r8\)[ ]*(#.*)* +[ ]*305:[ ]+66 0f 7e 00[ ]+movd[ ]+%xmm0,\(%rax\)[ ]*(#.*)* +[ ]*309:[ ]+66 45 0f 7e 38[ ]+movd[ ]+%xmm15,\(%r8\)[ ]*(#.*)* +[ ]*30e:[ ]+66 44 0f 7e 38[ ]+movd[ ]+%xmm15,\(%rax\)[ ]*(#.*)* +[ ]*313:[ ]+66 45 0f 7e 00[ ]+movd[ ]+%xmm8,\(%r8\)[ ]*(#.*)* +[ ]*318:[ ]+66 44 0f 7e 00[ ]+movd[ ]+%xmm8,\(%rax\)[ ]*(#.*)* +[ ]*31d:[ ]+66 41 0f 7e 38[ ]+movd[ ]+%xmm7,\(%r8\)[ ]*(#.*)* +[ ]*322:[ ]+66 0f 7e 38[ ]+movd[ ]+%xmm7,\(%rax\)[ ]*(#.*)* +[ ]*326:[ ]+66 0f 7e c0[ ]+movd[ ]+%xmm0,%eax[ ]*(#.*)* +[ ]*32a:[ ]+66 44 0f 7e f8[ ]+movd[ ]+%xmm15,%eax[ ]*(#.*)* +[ ]*32f:[ ]+66 44 0f 7e c0[ ]+movd[ ]+%xmm8,%eax[ ]*(#.*)* +[ ]*334:[ ]+66 0f 7e f8[ ]+movd[ ]+%xmm7,%eax[ ]*(#.*)* +[ ]*338:[ ]+f3 41 0f 7e 00[ ]+movq[ ]+\(%r8\),%xmm0[ ]*(#.*)* +[ ]*33d:[ ]+f3 0f 7e 00[ ]+movq[ ]+\(%rax\),%xmm0[ ]*(#.*)* +[ ]*341:[ ]+f3 45 0f 7e 38[ ]+movq[ ]+\(%r8\),%xmm15[ ]*(#.*)* +[ ]*346:[ ]+f3 44 0f 7e 38[ ]+movq[ ]+\(%rax\),%xmm15[ ]*(#.*)* +[ ]*34b:[ ]+f3 45 0f 7e 00[ ]+movq[ ]+\(%r8\),%xmm8[ ]*(#.*)* +[ ]*350:[ ]+f3 44 0f 7e 00[ ]+movq[ ]+\(%rax\),%xmm8[ ]*(#.*)* +[ ]*355:[ ]+f3 41 0f 7e 38[ ]+movq[ ]+\(%r8\),%xmm7[ ]*(#.*)* +[ ]*35a:[ ]+f3 0f 7e 38[ ]+movq[ ]+\(%rax\),%xmm7[ ]*(#.*)* +[ ]*35e:[ ]+f3 0f 7e c0[ ]+movq[ ]+%xmm0,%xmm0[ ]*(#.*)* +[ ]*362:[ ]+f3 45 0f 7e ff[ ]+movq[ ]+%xmm15,%xmm15[ ]*(#.*)* +[ ]*367:[ ]+f3 45 0f 7e c7[ ]+movq[ ]+%xmm15,%xmm8[ ]*(#.*)* +[ ]*36c:[ ]+f3 41 0f 7e ff[ ]+movq[ ]+%xmm15,%xmm7[ ]*(#.*)* +[ ]*371:[ ]+f3 41 0f 7e c7[ ]+movq[ ]+%xmm15,%xmm0[ ]*(#.*)* +[ ]*376:[ ]+f3 45 0f 7e f8[ ]+movq[ ]+%xmm8,%xmm15[ ]*(#.*)* +[ ]*37b:[ ]+f3 45 0f 7e c0[ ]+movq[ ]+%xmm8,%xmm8[ ]*(#.*)* +[ ]*380:[ ]+f3 41 0f 7e f8[ ]+movq[ ]+%xmm8,%xmm7[ ]*(#.*)* +[ ]*385:[ ]+f3 41 0f 7e c0[ ]+movq[ ]+%xmm8,%xmm0[ ]*(#.*)* +[ ]*38a:[ ]+f3 44 0f 7e ff[ ]+movq[ ]+%xmm7,%xmm15[ ]*(#.*)* +[ ]*38f:[ ]+f3 44 0f 7e c7[ ]+movq[ ]+%xmm7,%xmm8[ ]*(#.*)* +[ ]*394:[ ]+f3 0f 7e ff[ ]+movq[ ]+%xmm7,%xmm7[ ]*(#.*)* +[ ]*398:[ ]+f3 0f 7e c7[ ]+movq[ ]+%xmm7,%xmm0[ ]*(#.*)* +[ ]*39c:[ ]+f3 44 0f 7e f8[ ]+movq[ ]+%xmm0,%xmm15[ ]*(#.*)* +[ ]*3a1:[ ]+f3 44 0f 7e c0[ ]+movq[ ]+%xmm0,%xmm8[ ]*(#.*)* +[ ]*3a6:[ ]+f3 0f 7e f8[ ]+movq[ ]+%xmm0,%xmm7[ ]*(#.*)* +[ ]*3aa:[ ]+66 41 0f d6 00[ ]+movq[ ]+%xmm0,\(%r8\)[ ]*(#.*)* +[ ]*3af:[ ]+66 0f d6 00[ ]+movq[ ]+%xmm0,\(%rax\)[ ]*(#.*)* +[ ]*3b3:[ ]+66 45 0f d6 38[ ]+movq[ ]+%xmm15,\(%r8\)[ ]*(#.*)* +[ ]*3b8:[ ]+66 44 0f d6 38[ ]+movq[ ]+%xmm15,\(%rax\)[ ]*(#.*)* +[ ]*3bd:[ ]+66 45 0f d6 00[ ]+movq[ ]+%xmm8,\(%r8\)[ ]*(#.*)* +[ ]*3c2:[ ]+66 44 0f d6 00[ ]+movq[ ]+%xmm8,\(%rax\)[ ]*(#.*)* +[ ]*3c7:[ ]+66 41 0f d6 38[ ]+movq[ ]+%xmm7,\(%r8\)[ ]*(#.*)* +[ ]*3cc:[ ]+41 0f 6e 00[ ]+movd[ ]+\(%r8\),%mm0[ ]*(#.*)* +[ ]*3d0:[ ]+0f 6e 00[ ]+movd[ ]+\(%rax\),%mm0[ ]*(#.*)* +[ ]*3d3:[ ]+41 0f 6e 38[ ]+movd[ ]+\(%r8\),%mm7[ ]*(#.*)* +[ ]*3d7:[ ]+0f 6e 38[ ]+movd[ ]+\(%rax\),%mm7[ ]*(#.*)* +[ ]*3da:[ ]+0f 6e c0[ ]+movd[ ]+%eax,%mm0[ ]*(#.*)* +[ ]*3dd:[ ]+0f 6e f8[ ]+movd[ ]+%eax,%mm7[ ]*(#.*)* +[ ]*3e0:[ ]+41 0f 7e 00[ ]+movd[ ]+%mm0,\(%r8\)[ ]*(#.*)* +[ ]*3e4:[ ]+0f 7e 00[ ]+movd[ ]+%mm0,\(%rax\)[ ]*(#.*)* +[ ]*3e7:[ ]+41 0f 7e 38[ ]+movd[ ]+%mm7,\(%r8\)[ ]*(#.*)* +[ ]*3eb:[ ]+0f 7e 38[ ]+movd[ ]+%mm7,\(%rax\)[ ]*(#.*)* +[ ]*3ee:[ ]+0f 7e c0[ ]+movd[ ]+%mm0,%eax[ ]*(#.*)* +[ ]*3f1:[ ]+0f 7e f8[ ]+movd[ ]+%mm7,%eax[ ]*(#.*)* +[ ]*3f4:[ ]+41 0f 6f 00[ ]+movq[ ]+\(%r8\),%mm0[ ]*(#.*)* +[ ]*3f8:[ ]+0f 6f 00[ ]+movq[ ]+\(%rax\),%mm0[ ]*(#.*)* +[ ]*3fb:[ ]+41 0f 6f 38[ ]+movq[ ]+\(%r8\),%mm7[ ]*(#.*)* +[ ]*3ff:[ ]+0f 6f 38[ ]+movq[ ]+\(%rax\),%mm7[ ]*(#.*)* +[ ]*402:[ ]+41 0f 7f 00[ ]+movq[ ]+%mm0,\(%r8\)[ ]*(#.*)* +[ ]*406:[ ]+0f 7f 00[ ]+movq[ ]+%mm0,\(%rax\)[ ]*(#.*)* +[ ]*409:[ ]+41 0f 7f 38[ ]+movq[ ]+%mm7,\(%r8\)[ ]*(#.*)* +[ ]*40d:[ ]+0f 7f 38[ ]+movq[ ]+%mm7,\(%rax\)[ ]*(#.*)* +[ ]*410:[ ]+41 8f 00[ ]+popq[ ]+\(%r8\)[ ]*(#.*)* +[ ]*413:[ ]+8f 00[ ]+popq[ ]+\(%rax\)[ ]*(#.*)* +[ ]*415:[ ]+9d[ ]+popfq[ ]*(#.*)* +[ ]*416:[ ]+41 ff 30[ ]+pushq[ ]+\(%r8\)[ ]*(#.*)* +[ ]*419:[ ]+ff 30[ ]+pushq[ ]+\(%rax\)[ ]*(#.*)* +[ ]*41b:[ ]+9c[ ]+pushfq[ ]*(#.*)* +[ ]*41c:[ ]+0f 77[ ]+emms[ ]*(#.*)* +[ ]*41e:[ ]+0f 0e[ ]+femms[ ]*(#.*)* +[ ]*420:[ ]+0f 08[ ]+invd[ ]*(#.*)* +[ ]*422:[ ]+41 0f 01 38[ ]+invlpg[ ]+\(%r8\)[ ]*(#.*)* +[ ]*426:[ ]+0f 01 38[ ]+invlpg[ ]+\(%rax\)[ ]*(#.*)* +[ ]*429:[ ]+41 0f 01 38[ ]+invlpg[ ]+\(%r8\)[ ]*(#.*)* +[ ]*42d:[ ]+0f 01 38[ ]+invlpg[ ]+\(%rax\)[ ]*(#.*)* +[ ]*430:[ ]+41 0f 01 38[ ]+invlpg[ ]+\(%r8\)[ ]*(#.*)* +[ ]*434:[ ]+0f 01 38[ ]+invlpg[ ]+\(%rax\)[ ]*(#.*)* +[ ]*437:[ ]+0f 00 c0[ ]+sldt[ ]+%eax[ ]*(#.*)* +[ ]*43a:[ ]+e6 00[ ]+out[ ]+%al,\$0[x0]*[ ]*(#.*)* +[ ]*43c:[ ]+66 e7 00[ ]+out[ ]+%ax,\$0[x0]*[ ]*(#.*)* +[ ]*43f:[ ]+e7 00[ ]+out[ ]+%eax,\$0[x0]*[ ]*(#.*)* +.*nop.* +.*nop.* +.*nop.* diff -Nur binutils-2.12/gas/testsuite/gas/i386/x86-64-opcode.s binutils-2.12.1/gas/testsuite/gas/i386/x86-64-opcode.s --- binutils-2.12/gas/testsuite/gas/i386/x86-64-opcode.s Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/gas/testsuite/gas/i386/x86-64-opcode.s Sat Apr 27 08:46:10 2002 @@ -0,0 +1,388 @@ +.text + # Prefixes + # O16 A32 OV REX OPCODE ; NOTES + + # CALL + CALLq *(%r8) # -- -- -- 41 FF 10 ; REX to access upper reg. + CALLq *(%rax) # -- -- -- -- FF 10 + CALLq *(%r8) # -- -- -- 41 FF 10 ; REX to access upper reg. + CALLq *(%rax) # -- -- -- -- FF 10 + + # RET + lret # -- -- -- -- CB + retq # -- -- -- -- C3 + + # IRET + IRET # -- -- -- -- CF ; 32-bit operand size + IRETW # 66 -- -- -- CF ; O16 for 16-bit operand size + IRETQ # -- -- -- 48 CF ; REX for 64-bit operand size + + # CMP + + # MOV + MOVw %cs,(%r8) # 66 -- -- 41 8C 08 ; REX to access upper reg. O16 for 16-bit operand size + MOVw %cs,(%rax) # 66 -- -- -- 8C 08 ; O16 for 16-bit operand size + MOVw %ss,(%r8) # 66 -- -- 41 8C 10 ; REX to access upper reg. O16 for 16-bit operand size + MOVw %ss,(%rax) # 66 -- -- -- 8C 10 ; O16 for 16-bit operand size + MOVw %fs,(%r8) # 66 -- -- 41 8C 20 ; REX to access upper reg. O16 for 16-bit operand size + MOVw %fs,(%rax) # 66 -- -- -- 8C 20 ; O16 for 16-bit operand size + MOVl %cs,(%r8) # -- -- -- 41 8C 08 ; REX to access upper reg. + MOVl %cs,(%rax) # -- -- -- -- 8C 08 + MOVl %ss,(%r8) # -- -- -- 41 8C 10 ; REX to access upper reg. + MOVl %ss,(%rax) # -- -- -- -- 8C 10 + MOVl %fs,(%r8) # -- -- -- 41 8C 20 ; REX to access upper reg. + MOVl %fs,(%rax) # -- -- -- -- 8C 20 + MOVl (%r8),%ss # -- -- -- 41 8E 10 ; REX to access upper reg. + MOVl (%rax),%ss # -- -- -- -- 8E 10 + MOVl (%r8),%fs # -- -- -- 41 8E 20 ; REX to access upper reg. + MOVl (%rax),%fs # -- -- -- -- 8E 20 + MOVb $0,(%r8) # -- -- -- 41 C6 00 00 ; REX to access upper reg. + MOVb $0,(%rax) # -- -- -- -- C6 00 00 + MOVw $0x7000,(%r8) # 66 -- -- 41 C7 00 00 70 ; REX to access upper reg. O16 for 16-bit operand size + MOVw $0x7000,(%rax) # 66 -- -- -- C7 00 00 70 ; O16 for 16-bit operand size + MOVl $0x70000000,(%r8) # -- -- -- 41 C7 00 00 00 00 70 ; REX to access upper reg. + MOVl $0x70000000,(%rax) # -- -- -- -- C7 00 00 00 00 70 + MOVb $0,(%r8) # -- -- -- 41 C6 00 00 ; REX to access upper reg. + MOVb $0,(%rax) # -- -- -- -- C6 00 00 + MOVw $0x7000,(%r8) # 66 -- -- -- 41 C7 00 00 70 ; O16 for 16-bit operand size + MOVw $0x7000,(%rax) # 66 -- -- -- C7 00 00 70 ; O16 for 16-bit operand size + MOVl $0x70000000,(%rax) # -- -- -- -- C7 00 00 00 00 70 + MOVb $0,(%r8) # -- -- -- 41 C6 00 00 ; REX to access upper reg. + MOVb $0,(%rax) # -- -- -- -- C6 00 00 + MOVw $0x7000,(%r8) # 66 -- -- 41 C7 00 00 70 ; REX to access upper reg. O16 for 16-bit operand size + MOVw $0x7000,(%rax) # 66 -- -- -- C7 00 00 70 ; O16 for 16-bit operand size + MOVl $0x70000000,(%r8) # -- -- -- 41 C7 00 00 00 00 70 ; REX to access upper reg. + MOVl $0x70000000,(%rax) # -- -- -- -- C7 00 00 00 00 70 + MOVq $0x70000000,(%r8) # -- -- -- 49 C7 00 00 00 00 70 ; REX for 64-bit operand size. REX to access upper reg. + MOVq $0x70000000,(%rax) # -- -- -- 48 C7 00 00 00 00 70 ; REX for 64-bit operand size + + # MOVNTI + MOVNTI %eax,(%r8) # -- -- -- 41 0f c3 00 ; REX to access upper reg. + MOVNTI %eax,(%rax) # -- -- -- -- 0f c3 00 + MOVNTI %rax,(%r8) # -- -- -- 49 0F C3 00 ; REX to access upper reg. REX for 64-bit operand size + MOVNTI %rax,(%rax) # -- -- -- 48 0F C3 00 ; REX for 64-bit operand size. REX to access upper reg. + MOVNTI %r8,(%r8) # -- -- -- 4D 0F C3 00 ; REX to access upper reg. REX for 64-bit operand size + MOVNTI %r8,(%rax) # -- -- -- 4C 0F C3 00 ; REX to access upper reg. REX for 64-bit operand size + + # Conditionals + + # LOOP + + + # Jcc + # 66 -- -- -- 77 FD ; A16 override: (Addr64) = ZEXT(Addr16) + # 66 -- -- -- 0F 87 F9 FF FF FF ; A16 override: (Addr64) = ZEXT(Addr16) + + # J*CXZ + # 66 67 -- -- E3 FC ; ECX used as counter. A16 override: (Addr64) = ZEXT(Addr16) + # 66 -- -- -- E3 FD ; A16 override: (Addr64) = ZEXT(Addr16) + + + + # Integer + + # IDIV + + IDIVb (%r8) # -- -- -- 41 F6 38 ; Sign extended result. REX to access upper reg. + IDIVb (%rax) # -- -- -- -- F6 38 ; Sign extended result + IDIVw (%r8) # 66 -- -- 41 F7 38 ; Sign extended result. REX to access upper reg. O16 for 16-bit + IDIVw (%rax) # 66 -- -- -- F7 38 ; Sign extended result. O16 for 16-bit operand size + IDIVl (%r8) # -- -- -- 41 F7 38 ; Sign extended result. REX to access upper reg + IDIVl (%rax) # -- -- -- -- F7 38 ; Sign extended result + IDIVq (%r8) # -- -- -- 49 F7 38 ; Sign extended result. REX for 64-bit operand size. REX to access u + IDIVq (%rax) # -- -- -- 48 F7 38 ; Sign extended result. REX for 64-bit operand size + + # IMUL + IMULb (%r8) # -- -- -- 41 F6 28 ; Sign extended result. REX to access upper reg + IMULb (%rax) # -- -- -- -- F6 28 ; Sign extended result + IMULw (%r8) # 66 -- -- 41 F7 28 ; Sign extended result. O16 for 16-bit operand size. REX to access + IMULw (%rax) # 66 -- -- -- F7 28 ; Sign extended result. O16 for 16-bit operand size + IMULl (%r8) # -- -- -- 41 F7 28 ; Sign extended result. REX to access upper reg + IMULl (%rax) # -- -- -- -- F7 28 ; Sign extended result + IMULq (%r8) # -- -- -- 49 F7 28 ; Sign extended result. REX for 64-bit operand size. REX to access u + IMULq (%rax) # -- -- -- 48 F7 28 ; Sign extended result. REX for 64-bit operand size + + + + # SIMD/SSE + + # ADDPD + ADDPD (%r8),%xmm0 # -- -- 66 41 0F 58 00 ; REX to access upper reg. OVR 128bit MMinstr. + ADDPD (%rax),%xmm0 # -- -- 66 -- 0F 58 00 ; OVR 128bit MMinstr. + ADDPD (%r8),%xmm15 # -- -- 66 45 0F 58 38 ; REX to access upper XMM reg. REX to access upper reg. OVR 128bit MMinstr. + ADDPD (%rax),%xmm15 # -- -- 66 44 0F 58 38 ; REX to access upper XMM reg. OVR 128bit MMinstr. + ADDPD (%r8),%xmm8 # -- -- 66 45 0F 58 00 ; REX to access upper XMM reg. REX to access upper reg. OVR 128bit MMinstr. + ADDPD (%rax),%xmm8 # -- -- 66 44 0F 58 00 ; REX to access upper XMM reg. OVR 128bit MMinstr. + ADDPD (%r8),%xmm7 # -- -- 66 41 0F 58 38 ; REX to access upper reg. OVR 128bit MMinstr. + ADDPD (%rax),%xmm7 # -- -- 66 -- 0F 58 38 ; OVR 128bit MMinstr. + ADDPD %xmm0,%xmm0 # -- -- 66 -- 0F 58 C0 ; OVR 128bit MMinstr. + ADDPD %xmm15,%xmm15 # -- -- 66 45 0F 58 FF ; REX to access upper XMM reg. OVR 128bit MMinstr. + ADDPD %xmm15,%xmm8 # -- -- 66 45 0F 58 C7 ; REX to access upper XMM reg. OVR 128bit MMinstr. + + # CMPPD + + # CVTSD2SI + CVTSD2SIq (%r8),%rax # -- -- F2 49 0f 2d 00 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper reg. + CVTSD2SIq (%rax),%rax # -- -- F2 48 0f 2d 00 ; OVR 128-bit media instruction override REX for 64-bit operand size + CVTSD2SIq (%r8),%r8 # -- -- F2 4D 0f 2d 00 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper reg. + CVTSD2SIq (%rax),%r8 # -- -- F2 4C 0f 2d 00 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper reg. + CVTSD2SIq %xmm0,%rax # -- -- F2 48 0f 2d c0 ; OVR 128-bit media instruction override REX for 64-bit operand size + CVTSD2SIq %xmm15,%r8 # -- -- F2 4D 0f 2d c7 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper XMM reg REX to access upper reg. + CVTSD2SIq %xmm15,%rax # -- -- F2 49 0f 2d c7 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper XMM reg + CVTSD2SIq %xmm8,%r8 # -- -- F2 4D 0f 2d c0 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper XMM reg REX to access upper reg. + CVTSD2SIq %xmm8,%rax # -- -- F2 49 0f 2d c0 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper XMM reg + CVTSD2SIq %xmm7,%r8 # -- -- F2 4C 0f 2d c7 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper reg. + CVTSD2SIq %xmm7,%rax # -- -- F2 48 0f 2d c7 ; OVR 128-bit media instruction override REX for 64-bit operand size + CVTSD2SIq %xmm0,%r8 # -- -- F2 4C 0f 2d c0 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper reg. + + # CVTTSD2SI + CVTTSD2SIq (%r8),%rax # -- -- F2 49 0f 2c 00 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper reg. + CVTTSD2SIq (%rax),%rax # -- -- F2 48 0f 2c 00 ; OVR 128-bit media instruction override REX for 64-bit operand size + CVTTSD2SIq (%r8),%r8 # -- -- F2 4D 0f 2c 00 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper reg. + CVTTSD2SIq (%rax),%r8 # -- -- F2 4C 0f 2c 00 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper reg. + CVTTSD2SIq %xmm0,%rax # -- -- F2 48 0f 2c c0 ; OVR 128-bit media instruction override REX for 64-bit operand size + CVTTSD2SIq %xmm15,%r8 # -- -- F2 4D 0f 2c c7 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper XMM reg REX to access upper reg. + CVTTSD2SIq %xmm15,%rax # -- -- F2 49 0f 2c c7 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper XMM reg + CVTTSD2SIq %xmm8,%r8 # -- -- F2 4D 0f 2c c0 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper XMM reg REX to access upper reg. + CVTTSD2SIq %xmm8,%rax # -- -- F2 49 0f 2c c0 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper XMM reg + CVTTSD2SIq %xmm7,%r8 # -- -- F2 4C 0f 2c c7 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper reg. + CVTTSD2SIq %xmm7,%rax # -- -- F2 48 0f 2c c7 ; OVR 128-bit media instruction override REX for 64-bit operand size + CVTTSD2SIq %xmm0,%r8 # -- -- F2 4C 0f 2c c0 ; OVR 128-bit media instruction override REX for 64-bit operand size REX to access upper reg. + + # CVTSS2SI + CVTSS2SIq (%r8),%rax # -- -- F3 49 0f 2d 00 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size REX to access upper reg. + CVTSS2SIq (%rax),%rax # -- -- F3 48 0f 2d 00 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size + CVTSS2SIq (%r8),%r8 # -- -- F3 4D 0f 2d 00 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size REX to access upper reg. + CVTSS2SIq (%rax),%r8 # -- -- F3 4C 0f 2d 00 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size REX to access upper reg. + CVTSS2SIq %xmm0,%rax # -- -- F3 48 0f 2d c0 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size + CVTSS2SIq %xmm15,%r8 # -- -- F3 4D 0f 2d c7 ; OVR 128-bit media instruction override Result is sign extended REX to access upper XMM reg REX to access upper reg. + CVTSS2SIq %xmm15,%rax # -- -- F3 49 0f 2d c7 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size REX to access upper XMM reg + CVTSS2SIq %xmm8,%r8 # -- -- F3 4D 0f 2d c0 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size REX to access upper XMM reg REX to access upper reg. + CVTSS2SIq %xmm8,%rax # -- -- F3 49 0f 2d c0 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size + CVTSS2SIq %xmm7,%r8 # -- -- F3 4C 0f 2d c7 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size REX to access upper reg. + CVTSS2SIq %xmm7,%rax # -- -- F3 48 0f 2d c7 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size + CVTSS2SIq %xmm0,%r8 # -- -- F3 4C 0f 2d c0 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size REX to access upper reg. + + # CVTTSS2SI + CVTTSS2SIq (%r8),%rax # -- -- F3 49 0f 2c 00 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size REX to access upper reg. + CVTTSS2SIq (%rax),%rax # -- -- F3 48 0f 2c 00 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size + CVTTSS2SIq (%r8),%r8 # -- -- F3 4D 0f 2c 00 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size REX to access upper reg. + CVTTSS2SIq (%rax),%r8 # -- -- F3 4C 0f 2c 00 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size REX to access upper reg. + CVTTSS2SIq %xmm0,%rax # -- -- F3 48 0f 2c c0 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size + CVTTSS2SIq %xmm15,%r8 # -- -- F3 4D 0f 2c c7 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size REX to access upper XMM reg REX to access upper reg. + CVTTSS2SIq %xmm15,%rax # -- -- F3 49 0f 2c c7 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size REX to access upper XMM reg + CVTTSS2SIq %xmm8,%r8 # -- -- F3 4D 0f 2c c0 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size REX to access upper XMM reg REX to access upper reg. + CVTTSS2SIq %xmm8,%rax # -- -- F3 49 0f 2c c0 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size + CVTTSS2SIq %xmm7,%r8 # -- -- F3 4C 0f 2c c7 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size REX to access upper reg. + CVTTSS2SIq %xmm7,%rax # -- -- F3 48 0f 2c c7 ; OVR 128-bit media instruction override Result is sign extended + CVTTSS2SIq %xmm0,%r8 # -- -- F3 4C 0f 2c c0 ; OVR 128-bit media instruction override Result is sign extended REX for 64-bit operand size REX to access upper reg. + + # CVTSI2SS + CVTSI2SS (%r8),%xmm0 # -- -- F3 41 0f 2a 00 ; OVR 128-bit media instruction override REX to access upper reg. + CVTSI2SS (%rax),%xmm0 # -- -- F3 -- 0f 2a 00 ; OVR 128-bit media instruction override + CVTSI2SS (%r8),%xmm15 # -- -- F3 45 0f 2a 38 ; OVR 128-bit media instruction override REX to access upper XMM reg REX to access upper reg. + CVTSI2SS (%rax),%xmm15 # -- -- F3 44 0f 2a 38 ; OVR 128-bit media instruction override REX to access upper XMM reg + CVTSI2SS (%r8),%xmm8 # -- -- F3 45 0f 2a 00 ; OVR 128-bit media instruction override REX to access upper XMM reg REX to access upper reg. + CVTSI2SS (%rax),%xmm8 # -- -- F3 44 0f 2a 00 ; OVR 128-bit media instruction override REX to access upper XMM reg + CVTSI2SS (%r8),%xmm7 # -- -- F3 41 0f 2a 38 ; OVR 128-bit media instruction override REX to access upper reg. + CVTSI2SS (%rax),%xmm7 # -- -- F3 -- 0f 2a 38 ; OVR 128-bit media instruction override + CVTSI2SS %eax,%xmm0 # -- -- F3 -- 0f 2a c0 ; OVR 128-bit media instruction override + CVTSI2SS %eax,%xmm15 # -- -- F3 44 0f 2a f8 ; OVR 128-bit media instruction override REX to access upper XMM reg + CVTSI2SS %eax,%xmm8 # -- -- F3 44 0f 2a c0 ; OVR 128-bit media instruction override REX to access upper XMM reg + CVTSI2SS %eax,%xmm7 # -- -- F3 -- 0f 2a f8 ; OVR 128-bit media instruction override + CVTSI2SS (%r8),%xmm0 # -- -- F3 41 0f 2a 00 ; OVR 128-bit media instruction override REX to access upper reg. + CVTSI2SS (%rax),%xmm0 # -- -- F3 -- 0f 2a 00 ; OVR 128-bit media instruction override + CVTSI2SS (%r8),%xmm15 # -- -- F3 45 0f 2a 38 ; OVR 128-bit media instruction override REX to access upper XMM reg REX to access upper reg. + CVTSI2SS (%rax),%xmm15 # -- -- F3 44 0f 2a 38 ; OVR 128-bit media instruction override REX to access upper XMM reg + CVTSI2SS (%r8),%xmm8 # -- -- F3 45 0f 2a 00 ; OVR 128-bit media instruction override REX to access upper XMM reg REX to access upper reg. + CVTSI2SS (%rax),%xmm8 # -- -- F3 44 0f 2a 00 ; OVR 128-bit media instruction override REX to access upper XMM reg + CVTSI2SS (%r8),%xmm7 # -- -- F3 41 0f 2a 38 ; OVR 128-bit media instruction override REX to access upper reg. + CVTSI2SS (%rax),%xmm7 # -- -- F3 -- 0f 2a 38 ; OVR 128-bit media instruction override + + # CVTSI2SD + CVTSI2SD (%r8),%xmm0 # -- -- F2 41 0F 2A 00 ; REX to access upper reg. OVR 128bit MMinstr. + CVTSI2SD (%rax),%xmm0 # -- -- F2 -- 0F 2A 00 ; OVR 128bit MMinstr. + CVTSI2SD (%r8),%xmm15 # -- -- F2 45 0F 2A 38 ; REX to access upper XMM reg. REX to access upper reg. OVR 128bit MMinstr. + CVTSI2SD (%rax),%xmm15 # -- -- F2 44 0F 2A 38 ; REX to access upper XMM reg. OVR 128bit MMinstr. + CVTSI2SD (%r8),%xmm8 # -- -- F2 45 0F 2A 00 ; REX to access upper XMM reg. REX to access upper reg. OVR 128bit MMinstr. + CVTSI2SD (%rax),%xmm8 # -- -- F2 44 0F 2A 00 ; REX to access upper XMM reg. OVR 128bit MMinstr. + CVTSI2SD (%r8),%xmm7 # -- -- F2 41 0F 2A 38 ; REX to access upper reg. OVR 128bit MMinstr. + CVTSI2SD (%rax),%xmm7 # -- -- F2 -- 0F 2A 38 ; OVR 128bit MMinstr. + CVTSI2SD %eax,%xmm0 # -- -- F2 -- 0F 2A C0 ; OVR 128bit MMinstr. + CVTSI2SD %eax,%xmm15 # -- -- F2 44 0F 2A F8 ; REX to access upper XMM reg. OVR 128bit MMinstr. + CVTSI2SD %eax,%xmm8 # -- -- F2 44 0F 2A C0 ; REX to access upper XMM reg. OVR 128bit MMinstr. + CVTSI2SD %eax,%xmm7 # -- -- F2 -- 0F 2A F8 ; OVR 128bit MMinstr. + CVTSI2SD (%r8),%xmm0 # -- -- F2 41 0F 2A 00 ; REX to access upper reg. OVR 128bit MMinstr. + CVTSI2SD (%rax),%xmm0 # -- -- F2 -- 0F 2A 00 ; OVR 128bit MMinstr. + CVTSI2SD (%r8),%xmm15 # -- -- F2 45 0F 2A 38 ; REX to access upper XMM reg. REX to access upper reg. OVR 128bit MMinstr. + CVTSI2SD (%rax),%xmm15 # -- -- F2 44 0F 2A 38 ; REX to access upper XMM reg. OVR 128bit MMinstr. + CVTSI2SD (%r8),%xmm8 # -- -- F2 45 0F 2A 00 ; REX to access upper XMM reg. REX to access upper reg. OVR 128bit MMinstr. + CVTSI2SD (%rax),%xmm8 # -- -- F2 44 0F 2A 00 ; REX to access upper XMM reg. OVR 128bit MMinstr. + CVTSI2SD (%r8),%xmm7 # -- -- F2 41 0F 2A 38 ; REX to access upper reg. OVR 128bit MMinstr. + CVTSI2SD (%rax),%xmm7 # -- -- F2 -- 0F 2A 38 ; OVR 128bit MMinstr. + + # MOVD + MOVD (%r8),%xmm0 # -- -- 66 41 0F 6E 00 ; REX to access upper reg. Data128 = ZEXT(Data32). OVR 128bit MMinstr. + MOVD (%rax),%xmm0 # -- -- 66 -- 0F 6E 00 ; Data128 = ZEXT(Data32). OVR 128bit MMinstr. + MOVD (%r8),%xmm15 # -- -- 66 45 0F 6E 38 ; REX to access upper XMM reg. REX to access upper reg. Data128 = ZEXT(Data32) + MOVD (%rax),%xmm15 # -- -- 66 44 0F 6E 38 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVD (%r8),%xmm8 # -- -- 66 45 0F 6E 00 ; REX to access upper XMM reg. REX to access upper reg. Data128 = ZEXT(Data32) + MOVD (%rax),%xmm8 # -- -- 66 44 0F 6E 00 ; REX to access upper XMM reg. Data128 = ZEXT(Data32). OVR 128bit MMinstr. + MOVD (%r8),%xmm7 # -- -- 66 41 0F 6E 38 ; REX to access upper reg. Data128 = ZEXT(Data32). OVR 128bit MMinstr. + MOVD (%rax),%xmm7 # -- -- 66 -- 0F 6E 38 ; Data128 = ZEXT(Data32). OVR 128bit MMinstr. + MOVD %eax,%xmm0 # -- -- 66 -- 0F 6E C0 ; Data128 = ZEXT(Data32). OVR 128bit MMinstr. + MOVD %eax,%xmm15 # -- -- 66 44 0F 6E F8 ; REX to access upper XMM reg. Data128 = ZEXT(Data32). OVR 128bit MMinstr. + MOVD %eax,%xmm8 # -- -- 66 44 0F 6E C0 ; REX to access upper XMM reg. Data128 = ZEXT(Data32). OVR 128bit MMinstr. + MOVD %eax,%xmm7 # -- -- 66 -- 0F 6E F8 ; Data128 = ZEXT(Data32). OVR 128bit MMinstr. + MOVD %xmm0,(%r8) # -- -- 66 41 0F 7E 00 ; REX to access upper reg. OVR 128bit MMinstr. + MOVD %xmm0,(%rax) # -- -- 66 -- 0F 7E 00 ; OVR 128bit MMinstr. + MOVD %xmm15,(%r8) # -- -- 66 45 0F 7E 38 ; REX to access upper XMM reg. REX to access upper reg. OVR 128bit MMinstr. + MOVD %xmm15,(%rax) # -- -- 66 44 0F 7E 38 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVD %xmm8,(%r8) # -- -- 66 45 0F 7E 00 ; REX to access upper XMM reg. REX to access upper reg. OVR 128bit MMinstr. + MOVD %xmm8,(%rax) # -- -- 66 44 0F 7E 00 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVD %xmm7,(%r8) # -- -- 66 41 0F 7E 38 ; REX to access upper reg. OVR 128bit MMinstr. + MOVD %xmm7,(%rax) # -- -- 66 -- 0F 7E 38 ; OVR 128bit MMinstr. + MOVD %xmm0,%eax # -- -- 66 -- 0F 7E C0 ; OVR 128bit MMinstr. + MOVD %xmm15,%eax # -- -- 66 44 0F 7E F8 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVD %xmm8,%eax # -- -- 66 44 0F 7E C0 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVD %xmm7,%eax # -- -- 66 -- 0F 7E F8 ; OVR 128bit MMinstr. + + # MOVQ + MOVQ (%r8),%xmm0 # -- -- F3 41 0F 7E 00 ; REX to access upper reg. Data128 = ZEXT(Data64). OVR 128bit MMinstr. + MOVQ (%rax),%xmm0 # -- -- F3 -- 0F 7E 00 ; Data128 = ZEXT(Data64). OVR 128bit MMinstr. + MOVQ (%r8),%xmm15 # -- -- F3 45 0F 7E 38 ; REX to access upper XMM reg. REX to access upper reg. Data128 = ZEXT(Data64) + MOVQ (%rax),%xmm15 # -- -- F3 44 0F 7E 38 ; REX to access upper XMM reg. Data128 = ZEXT(Data64). OVR 128bit MMinstr. + MOVQ (%r8),%xmm8 # -- -- F3 45 0F 7E 00 ; REX to access upper XMM reg. REX to access upper reg. Data128 = ZEXT(Data64) + MOVQ (%rax),%xmm8 # -- -- F3 44 0F 7E 00 ; REX to access upper XMM reg. Data128 = ZEXT(Data64). OVR 128bit MMinstr. + MOVQ (%r8),%xmm7 # -- -- F3 41 0F 7E 38 ; REX to access upper reg. Data128 = ZEXT(Data64). OVR 128bit MMinstr. + MOVQ (%rax),%xmm7 # -- -- F3 -- 0F 7E 38 ; Data128 = ZEXT(Data64). OVR 128bit MMinstr. + MOVQ %xmm0,%xmm0 # -- -- F3 -- 0F 7E C0 ; OVR 128bit MMinstr. + MOVQ %xmm15,%xmm15 # -- -- F3 45 0F 7E FF ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVQ %xmm15,%xmm8 # -- -- F3 45 0F 7E C7 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVQ %xmm15,%xmm7 # -- -- F3 41 0F 7E FF ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVQ %xmm15,%xmm0 # -- -- F3 41 0F 7E C7 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVQ %xmm8,%xmm15 # -- -- F3 45 0F 7E F8 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVQ %xmm8,%xmm8 # -- -- F3 45 0F 7E C0 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVQ %xmm8,%xmm7 # -- -- F3 41 0F 7E F8 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVQ %xmm8,%xmm0 # -- -- F3 41 0F 7E C0 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVQ %xmm7,%xmm15 # -- -- F3 44 0F 7E FF ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVQ %xmm7,%xmm8 # -- -- F3 44 0F 7E C7 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVQ %xmm7,%xmm7 # -- -- F3 -- 0F 7E FF ; OVR 128bit MMinstr. + MOVQ %xmm7,%xmm0 # -- -- F3 -- 0F 7E C7 ; OVR 128bit MMinstr. + MOVQ %xmm0,%xmm15 # -- -- F3 44 0F 7E F8 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVQ %xmm0,%xmm8 # -- -- F3 44 0F 7E C0 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVQ %xmm0,%xmm7 # -- -- F3 -- 0F 7E F8 ; OVR 128bit MMinstr. + MOVQ %xmm0,(%r8) # -- -- 66 41 0F D6 00 ; REX to access upper reg. OVR 128bit MMinstr. + MOVQ %xmm0,(%rax) # -- -- 66 -- 0F D6 00 ; OVR 128bit MMinstr. + MOVQ %xmm15,(%r8) # -- -- 66 45 0F D6 38 ; REX to access upper reg. OVR 128bit MMinstr. + MOVQ %xmm15,(%rax) # -- -- 66 44 0F D6 38 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVQ %xmm8,(%r8) # -- -- 66 45 0F D6 00 ; REX to access upper XMM reg. REX to access upper reg. OVR 128bit MMinstr. + MOVQ %xmm8,(%rax) # -- -- 66 44 0F D6 00 ; REX to access upper XMM reg. OVR 128bit MMinstr. + MOVQ %xmm7,(%r8) # -- -- 66 41 0F D6 38 ; REX to access upper reg. OVR 128bit MMinstr. + + # 64-bit MMX + + # CVTPD2PI + + # MOVD + MOVD (%r8),%mm0 # -- -- -- 41 0F 6E 00 ; REX to access upper reg. Data64 = ZEXT(Data32) + MOVD (%rax),%mm0 # -- -- -- -- 0F 6E 00 ; Data64 = ZEXT(Data32) + MOVD (%r8),%mm7 # -- -- -- 41 0F 6E 38 ; REX to access upper reg. Data64 = ZEXT(Data32) + MOVD (%rax),%mm7 # -- -- -- -- 0F 6E 38 ; Data64 = ZEXT(Data32) + MOVD %eax,%mm0 # -- -- -- -- 0F 6E C0 ; Data64 = ZEXT(Data32) + MOVD %eax,%mm7 # -- -- -- -- 0F 6E F8 ; Data64 = ZEXT(Data32) + MOVD %mm0,(%r8) # -- -- -- 41 0F 7E 00 ; REX to access upper reg. + MOVD %mm0,(%rax) # -- -- -- -- 0F 7E 00 + MOVD %mm7,(%r8) # -- -- -- 41 0F 7E 38 ; REX to access upper reg. + MOVD %mm7,(%rax) # -- -- -- -- 0F 7E 38 + MOVD %mm0,%eax # -- -- -- -- 0F 7E C0 + MOVD %mm7,%eax # -- -- -- -- 0F 7E F8 + + # MOVQ + MOVQ (%r8),%mm0 # -- -- -- 41 0F 6F 00 ; REX to access upper reg. + MOVQ (%rax),%mm0 # -- -- -- -- 0F 6F 00 + MOVQ (%r8),%mm7 # -- -- -- 41 0F 6F 38 ; REX to access upper reg. + MOVQ (%rax),%mm7 # -- -- -- -- 0F 6F 38 + MOVQ %mm0,(%r8) # -- -- -- 41 0F 7F 00 ; REX to access upper reg. + MOVQ %mm0,(%rax) # -- -- -- -- 0F 7F 00 + MOVQ %mm7,(%r8) # -- -- -- 41 0F 7F 38 ; REX to access upper reg. + MOVQ %mm7,(%rax) # -- -- -- -- 0F 7F 38 + + # X87 + # FADDP + + + # FDIV + + # Stack Operations + + # POP + POPq (%r8) # -- -- -- 41 8F 00 ; REX to access upper reg. + POPq (%rax) # -- -- -- -- 8F 00 + POPFQ # -- -- -- -- 9D + + # PUSH + PUSHq (%r8) # -- -- -- 41 FF 30 ; REX to access upper reg. + PUSHq (%rax) # -- -- -- -- FF 30 + PUSHFQ # -- -- -- -- 9C + + + + + + # MMX/XMM/x87 State + # FNSAVE + # FRSTOR + # FSAVE + # FXRSTOR + # FXSAVE + # EMMS + EMMS # -- -- -- -- 0F 77 + # FEMMS + FEMMS # -- -- -- -- 0F 0E + + # LEA calculation + + # MISC System Instructions + # CLFLUSH + + # INVD + INVD # -- -- -- -- 0F 08 + + # INVLPG + INVLPG (%r8) # -- -- -- 41 0F 01 38 ; REX to access upper reg. + INVLPG (%rax) # -- -- -- -- 0F 01 38 + INVLPG (%r8) # -- -- -- 41 0F 01 38 ; REX to access upper reg. + INVLPG (%rax) # -- -- -- -- 0F 01 38 + INVLPG (%r8) # -- -- -- 41 0F 01 38 ; REX to access upper reg. + INVLPG (%rax) # -- -- -- -- 0F 01 38 + + # LAR + + # LGDT + + # LIDT + + + # LLDT + + # SGDT + + # SIDT + + # SLDT +# SLDT (%eax) # -- 67 -- -- 0F 00 00 ; A32 override: (Addr64) = ZEXT(Addr32 ) + SLDT %eax # -- -- -- -- 0F 00 C0 + + # SWAPGS + + + + # IO + + # OUT + OUT %al,$0 # -- -- -- -- E6 00 + OUT %ax,$0 # 66 -- -- -- E7 00 ; O16 for 16-bit operand size + OUT %eax,$0 # -- -- -- -- E7 00 + + # IN diff -Nur binutils-2.12/gas/testsuite/gas/mips/mips.exp binutils-2.12.1/gas/testsuite/gas/mips/mips.exp --- binutils-2.12/gas/testsuite/gas/mips/mips.exp Tue Feb 26 17:24:46 2002 +++ binutils-2.12.1/gas/testsuite/gas/mips/mips.exp Thu May 9 10:49:54 2002 @@ -179,14 +179,17 @@ run_dump_test "mips-abi32-pic" run_dump_test "elf${el}-rel" - if [istarget mips64*-*-*] { + if {[istarget mips64*-*-*] || [istarget mipsisa32*-*-*]} { run_dump_test "elf${el}-rel2" - run_dump_test "elf-rel4" - } { + } else { run_dump_test "e32${el}-rel2" - run_dump_test "e32-rel4" } run_dump_test "elf${el}-rel3" + if {[istarget mips64*-*-*]} { + run_dump_test "elf-rel4" + } else { + run_dump_test "e32-rel4" + } run_dump_test "elf-rel5" run_dump_test "${tmips}${el}empic" run_dump_test "empic2" diff -Nur binutils-2.12/gas/testsuite/gas/mmix/bspec-1.d binutils-2.12.1/gas/testsuite/gas/mmix/bspec-1.d --- binutils-2.12/gas/testsuite/gas/mmix/bspec-1.d Sun Nov 11 06:29:22 2001 +++ binutils-2.12.1/gas/testsuite/gas/mmix/bspec-1.d Thu May 9 10:49:55 2002 @@ -7,8 +7,8 @@ 0+18 0+18 7 4 8 #... Relocation section '\.rela\.MMIX\.spec_data\.2' at offset 0x... contains 1 entries: -[ ]+Offset[ ]+Info[ ]+Type[ ]+Symbol's Value[ ]+Symbol's Name[ ]+Addend -0+ 0+500000004 R_MMIX_32 0+ forw \+ 0 +.* +0+ 0+500000004 R_MMIX_32 +0+ +forw +\+ 0 Symbol table '\.symtab' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name diff -Nur binutils-2.12/gas/testsuite/gas/mmix/bspec-2.d binutils-2.12.1/gas/testsuite/gas/mmix/bspec-2.d --- binutils-2.12/gas/testsuite/gas/mmix/bspec-2.d Sun Nov 11 06:29:22 2001 +++ binutils-2.12.1/gas/testsuite/gas/mmix/bspec-2.d Thu May 9 10:49:55 2002 @@ -11,13 +11,13 @@ 0+18 0+18 9 6 8 #... Relocation section '\.rela\.MMIX\.spec_data\.2' at offset 0x4.. contains 2 entries: -[ ]+Offset[ ]+Info[ ]+Type[ ]+Symbol's Value[ ]+Symbol's Name[ ]+Addend -0+ 0+600000004 R_MMIX_32 0+ forw \+ 0 -0+8 0+700000005 R_MMIX_64 0+ other \+ 0 +.* +0+ 0+600000004 R_MMIX_32 +0+ +forw +\+ 0 +0+8 0+700000005 R_MMIX_64 +0+ +other +\+ 0 Relocation section '\.rela\.MMIX\.spec_data\.3' at offset 0x4.. contains 1 entries: -[ ]+Offset[ ]+Info[ ]+Type[ ]+Symbol's Value[ ]+Symbol's Name[ ]+Addend -0+ 0+700000005 R_MMIX_64 0+ other \+ 0 +.* +0+ 0+700000005 R_MMIX_64 +0+ +other +\+ 0 Hex dump of section '\.text': 0x0+ fd010203 .* diff -Nur binutils-2.12/gas/testsuite/gas/mmix/comment-1.d binutils-2.12.1/gas/testsuite/gas/mmix/comment-1.d --- binutils-2.12/gas/testsuite/gas/mmix/comment-1.d Sun Nov 11 06:29:22 2001 +++ binutils-2.12.1/gas/testsuite/gas/mmix/comment-1.d Thu May 9 10:49:55 2002 @@ -8,12 +8,12 @@ 0+8 0+ W 0 0 1 #... Relocation section '\.rela\.text' at offset 0x... contains 5 entries: -[ ]+Offset[ ]+Info[ ]+Type[ ]+Symbol's Value[ ]+Symbol's Name[ ]+Addend -0+34 0+90000001e R_MMIX_ADDR19 0+ target \+ 2c -0+46 0+a00000002 R_MMIX_16 0+ target2 \+ 30 -0+48 0+b0000001f R_MMIX_ADDR27 0+ target3 \+ 38 -0+54 0+b0000001e R_MMIX_ADDR19 0+ target3 \+ 0 -0+78 0+23 R_MMIX_LOCAL 0+30 +.* +0+34 0+90000001e R_MMIX_ADDR19 +0+ +target +\+ 2c +0+46 0+a00000002 R_MMIX_16 +0+ +target2 +\+ 30 +0+48 0+b0000001f R_MMIX_ADDR27 +0+ +target3 +\+ 38 +0+54 0+b0000001e R_MMIX_ADDR19 +0+ +target3 +\+ 0 +0+78 0+23 R_MMIX_LOCAL +0+30 Symbol table '\.symtab' contains 12 entries: Num: Value Size Type Bind Vis Ndx Name diff -Nur binutils-2.12/gas/testsuite/gas/mmix/weak1.d binutils-2.12.1/gas/testsuite/gas/mmix/weak1.d --- binutils-2.12/gas/testsuite/gas/mmix/weak1.d Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/gas/testsuite/gas/mmix/weak1.d Sun Mar 17 17:49:40 2002 @@ -0,0 +1,23 @@ +#as: -x +#objdump: -str + +# Relaxation thought a weak symbol was within reach. + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+ l d \.text 0+ +0+ l d \.data 0+ +0+ l d \.bss 0+ +0+ w \.text 0+ foo +0+4 g \.text 0+ main + +RELOCATION RECORDS FOR \[\.text\]: +OFFSET TYPE VALUE +0+18 R_MMIX_64 foo +0+4 R_MMIX_PUSHJ foo + +Contents of section \.text: + 0000 f8010000 f20f0000 fd000000 fd000000 .* + 0010 fd000000 fd000000 00000000 00000000 .* +Contents of section \.data: diff -Nur binutils-2.12/gas/testsuite/gas/mmix/weak1.s binutils-2.12.1/gas/testsuite/gas/mmix/weak1.s --- binutils-2.12/gas/testsuite/gas/mmix/weak1.s Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/gas/testsuite/gas/mmix/weak1.s Sun Mar 17 17:49:41 2002 @@ -0,0 +1,7 @@ + .weak foo +foo: + POP 1,0 + .global main +main: + PUSHJ $15,foo + .quad foo diff -Nur binutils-2.12/gas/testsuite/gas/ppc/altivec.d binutils-2.12.1/gas/testsuite/gas/ppc/altivec.d --- binutils-2.12/gas/testsuite/gas/ppc/altivec.d Wed Oct 17 09:13:15 2001 +++ binutils-2.12.1/gas/testsuite/gas/ppc/altivec.d Thu May 9 10:50:00 2002 @@ -8,7 +8,7 @@ 00000000 : 0: 7c 60 06 6c dss 3 - 4: 7e 40 06 6c dssall 2 + 4: 7e 00 06 6c dssall 8: 7c 25 22 ac dst r5,r4,1 c: 7e 08 3a ac dstt r8,r7,0 10: 7c 65 32 ec dstst r5,r6,3 diff -Nur binutils-2.12/gas/testsuite/gas/ppc/altivec.s binutils-2.12.1/gas/testsuite/gas/ppc/altivec.s --- binutils-2.12/gas/testsuite/gas/ppc/altivec.s Wed Oct 17 09:13:15 2001 +++ binutils-2.12.1/gas/testsuite/gas/ppc/altivec.s Thu May 9 10:50:00 2002 @@ -3,7 +3,7 @@ .section ".text" start: dss 3 - dssall 2 + dssall dst 5,4,1 dstt 8,7,0 dstst 5,6,3 diff -Nur binutils-2.12/gas/write.c binutils-2.12.1/gas/write.c --- binutils-2.12/gas/write.c Sat Jan 5 08:13:16 2002 +++ binutils-2.12.1/gas/write.c Mon Apr 1 20:28:59 2002 @@ -2923,7 +2923,7 @@ valueT val; int n; { - if ((size_t) n > sizeof (val) || n <= 0) + if (n <= 0) abort (); while (n--) { @@ -2938,7 +2938,7 @@ valueT val; int n; { - if ((size_t) n > sizeof (val) || n <= 0) + if (n <= 0) abort (); while (n--) { diff -Nur binutils-2.12/gprof/ChangeLog binutils-2.12.1/gprof/ChangeLog --- binutils-2.12/gprof/ChangeLog Thu Mar 7 23:20:05 2002 +++ binutils-2.12.1/gprof/ChangeLog Thu Apr 4 11:21:20 2002 @@ -1,3 +1,15 @@ +2002-04-04 Alan Modra + + * dep-in.sed: Cope with absolute paths. + * Makefile.am (dep.sed): Subst TOPDIR. + Run "make dep-am". + * Makefile.in: Regenerate. + +2002-03-28 Alan Modra + + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + 2002-03-07 Daniel Jacobowitz * gprof.texi: Wrap @menu in @ifnottex, not @ifinfo. diff -Nur binutils-2.12/gprof/Makefile.am binutils-2.12.1/gprof/Makefile.am --- binutils-2.12/gprof/Makefile.am Fri Feb 1 03:41:57 2002 +++ binutils-2.12.1/gprof/Makefile.am Thu Apr 4 11:21:20 2002 @@ -100,7 +100,8 @@ -e 's!@INCDIR@!$(INCDIR)!' \ -e 's!@BFDDIR@!$(BFDDIR)!' \ -e 's!@SRCDIR@!$(srcdir)!' \ - -e "s!@OBJDIR@!$${objdir}!" + -e "s!@OBJDIR@!$${objdir}!" \ + -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gprof$$,,`'!' dep: DEP sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile @@ -162,13 +163,12 @@ search_list.h source.h symtab.h cg_arcs.h basic_blocks.h \ corefile.h call_graph.h gmon_io.h gmon_out.h gmon.h \ hertz.h hist.h $(INCDIR)/libiberty.h -gprof.o: gprof.c $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \ - $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \ - $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h \ - source.h symtab.h basic_blocks.h call_graph.h cg_arcs.h \ - cg_print.h corefile.h gmon_io.h hertz.h hist.h sym_ids.h \ - $(INCDIR)/demangle.h +gprof.o: gprof.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ + gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ + $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \ + gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \ + symtab.h basic_blocks.h call_graph.h cg_arcs.h cg_print.h \ + corefile.h gmon_io.h hertz.h hist.h sym_ids.h $(INCDIR)/demangle.h hertz.o: hertz.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \ ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \ ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \ @@ -196,10 +196,11 @@ $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \ $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h \ source.h symtab.h cg_arcs.h sym_ids.h -utils.o: utils.c $(INCDIR)/demangle.h gprof.h $(BFDDIR)/sysdep.h \ - ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \ - ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \ - search_list.h source.h symtab.h cg_arcs.h utils.h +utils.o: utils.c $(INCDIR)/demangle.h $(INCDIR)/ansidecl.h \ + gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ + $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \ + gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \ + symtab.h cg_arcs.h utils.h i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \ ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \ ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \ @@ -230,7 +231,7 @@ ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \ search_list.h source.h symtab.h cg_arcs.h corefile.h \ hist.h -flat_bl.o: flat_bl.c -bsd_callg_bl.o: bsd_callg_bl.c -fsf_callg_bl.o: fsf_callg_bl.c +flat_bl.o: flat_bl.c $(INCDIR)/ansidecl.h +bsd_callg_bl.o: bsd_callg_bl.c $(INCDIR)/ansidecl.h +fsf_callg_bl.o: fsf_callg_bl.c $(INCDIR)/ansidecl.h # IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff -Nur binutils-2.12/gprof/Makefile.in binutils-2.12.1/gprof/Makefile.in --- binutils-2.12/gprof/Makefile.in Fri Feb 1 03:41:57 2002 +++ binutils-2.12.1/gprof/Makefile.in Thu Apr 4 11:21:20 2002 @@ -764,7 +764,8 @@ -e 's!@INCDIR@!$(INCDIR)!' \ -e 's!@BFDDIR@!$(BFDDIR)!' \ -e 's!@SRCDIR@!$(srcdir)!' \ - -e "s!@OBJDIR@!$${objdir}!" + -e "s!@OBJDIR@!$${objdir}!" \ + -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gprof$$,,`'!' dep: DEP sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile @@ -824,13 +825,12 @@ search_list.h source.h symtab.h cg_arcs.h basic_blocks.h \ corefile.h call_graph.h gmon_io.h gmon_out.h gmon.h \ hertz.h hist.h $(INCDIR)/libiberty.h -gprof.o: gprof.c $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \ - $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \ - $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h \ - source.h symtab.h basic_blocks.h call_graph.h cg_arcs.h \ - cg_print.h corefile.h gmon_io.h hertz.h hist.h sym_ids.h \ - $(INCDIR)/demangle.h +gprof.o: gprof.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ + gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ + $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \ + gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \ + symtab.h basic_blocks.h call_graph.h cg_arcs.h cg_print.h \ + corefile.h gmon_io.h hertz.h hist.h sym_ids.h $(INCDIR)/demangle.h hertz.o: hertz.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \ ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \ ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \ @@ -858,10 +858,11 @@ $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \ $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h \ source.h symtab.h cg_arcs.h sym_ids.h -utils.o: utils.c $(INCDIR)/demangle.h gprof.h $(BFDDIR)/sysdep.h \ - ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \ - ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \ - search_list.h source.h symtab.h cg_arcs.h utils.h +utils.o: utils.c $(INCDIR)/demangle.h $(INCDIR)/ansidecl.h \ + gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ + $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \ + gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \ + symtab.h cg_arcs.h utils.h i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \ ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \ ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \ @@ -892,9 +893,9 @@ ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \ search_list.h source.h symtab.h cg_arcs.h corefile.h \ hist.h -flat_bl.o: flat_bl.c -bsd_callg_bl.o: bsd_callg_bl.c -fsf_callg_bl.o: fsf_callg_bl.c +flat_bl.o: flat_bl.c $(INCDIR)/ansidecl.h +bsd_callg_bl.o: bsd_callg_bl.c $(INCDIR)/ansidecl.h +fsf_callg_bl.o: fsf_callg_bl.c $(INCDIR)/ansidecl.h # IF YOU PUT ANYTHING HERE IT WILL GO AWAY # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nur binutils-2.12/gprof/dep-in.sed binutils-2.12.1/gprof/dep-in.sed --- binutils-2.12/gprof/dep-in.sed Fri May 26 10:14:21 2000 +++ binutils-2.12.1/gprof/dep-in.sed Thu Apr 4 11:21:20 2002 @@ -3,7 +3,9 @@ /\\$/b loop s!@INCDIR@!$(INCDIR)!g +s!@TOPDIR@/include!$(INCDIR)!g s!@BFDDIR@!$(BFDDIR)!g +s!@TOPDIR@/bfd!$(BFDDIR)!g s!@SRCDIR@/!!g s!@OBJDIR@/!!g diff -Nur binutils-2.12/gprof/gprof.1 binutils-2.12.1/gprof/gprof.1 --- binutils-2.12/gprof/gprof.1 Fri Mar 8 01:16:04 2002 +++ binutils-2.12.1/gprof/gprof.1 Tue May 14 19:47:19 2002 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "GPROF 1" -.TH GPROF 1 "2002-03-08" "binutils-2.12" "GNU" +.TH GPROF 1 "2002-05-14" "binutils-2.12.1" "GNU" .UC .SH "NAME" gprof \- display call graph profile data diff -Nur binutils-2.12/gprof/gprof.info binutils-2.12.1/gprof/gprof.info --- binutils-2.12/gprof/gprof.info Fri Mar 8 01:16:03 2002 +++ binutils-2.12.1/gprof/gprof.info Tue May 14 19:47:19 2002 @@ -1,4 +1,4 @@ -This is gprof.info, produced by makeinfo version 4.0f from gprof.texi. +This is gprof.info, produced by makeinfo version 4.1 from gprof.texi. START-INFO-DIR-ENTRY * gprof: (gprof). Profiling your program's execution @@ -18,41 +18,41 @@  Indirect: -gprof.info-1: 708 -gprof.info-2: 48150 -gprof.info-3: 82287 +gprof.info-1: 707 +gprof.info-2: 48149 +gprof.info-3: 82286  Tag Table: (Indirect) -Node: Top708 -Node: Introduction1950 -Node: Compiling4279 -Node: Executing6940 -Node: Invoking9304 -Node: Output Options10718 -Node: Analysis Options17530 -Node: Miscellaneous Options20723 -Node: Deprecated Options21884 -Node: Symspecs23954 -Node: Output25775 -Node: Flat Profile26800 -Node: Call Graph31730 -Node: Primary34945 -Node: Callers37477 -Node: Subroutines39585 -Node: Cycles41385 -Node: Line-by-line48150 -Node: Annotated Source51949 -Node: Inaccuracy54810 -Node: Sampling Error55064 -Node: Assumptions57629 -Node: How do I?59097 -Node: Incompatibilities60315 -Node: Details61782 -Node: Implementation62171 -Node: File Format68063 -Node: Internals72321 -Node: Debugging80691 -Node: GNU Free Documentation License82287 +Node: Top707 +Node: Introduction1949 +Node: Compiling4278 +Node: Executing6939 +Node: Invoking9303 +Node: Output Options10717 +Node: Analysis Options17529 +Node: Miscellaneous Options20722 +Node: Deprecated Options21883 +Node: Symspecs23953 +Node: Output25774 +Node: Flat Profile26799 +Node: Call Graph31729 +Node: Primary34944 +Node: Callers37476 +Node: Subroutines39584 +Node: Cycles41384 +Node: Line-by-line48149 +Node: Annotated Source51948 +Node: Inaccuracy54809 +Node: Sampling Error55063 +Node: Assumptions57628 +Node: How do I?59096 +Node: Incompatibilities60314 +Node: Details61781 +Node: Implementation62170 +Node: File Format68062 +Node: Internals72320 +Node: Debugging80690 +Node: GNU Free Documentation License82286  End Tag Table diff -Nur binutils-2.12/gprof/gprof.info-1 binutils-2.12.1/gprof/gprof.info-1 --- binutils-2.12/gprof/gprof.info-1 Fri Mar 8 01:16:03 2002 +++ binutils-2.12.1/gprof/gprof.info-1 Tue May 14 19:47:19 2002 @@ -1,4 +1,4 @@ -This is gprof.info, produced by makeinfo version 4.0f from gprof.texi. +This is gprof.info, produced by makeinfo version 4.1 from gprof.texi. START-INFO-DIR-ENTRY * gprof: (gprof). Profiling your program's execution diff -Nur binutils-2.12/gprof/gprof.info-2 binutils-2.12.1/gprof/gprof.info-2 --- binutils-2.12/gprof/gprof.info-2 Fri Mar 8 01:16:03 2002 +++ binutils-2.12.1/gprof/gprof.info-2 Tue May 14 19:47:19 2002 @@ -1,4 +1,4 @@ -This is gprof.info, produced by makeinfo version 4.0f from gprof.texi. +This is gprof.info, produced by makeinfo version 4.1 from gprof.texi. START-INFO-DIR-ENTRY * gprof: (gprof). Profiling your program's execution diff -Nur binutils-2.12/gprof/gprof.info-3 binutils-2.12.1/gprof/gprof.info-3 --- binutils-2.12/gprof/gprof.info-3 Fri Mar 8 01:16:03 2002 +++ binutils-2.12.1/gprof/gprof.info-3 Tue May 14 19:47:19 2002 @@ -1,4 +1,4 @@ -This is gprof.info, produced by makeinfo version 4.0f from gprof.texi. +This is gprof.info, produced by makeinfo version 4.1 from gprof.texi. START-INFO-DIR-ENTRY * gprof: (gprof). Profiling your program's execution diff -Nur binutils-2.12/include/elf/ChangeLog binutils-2.12.1/include/elf/ChangeLog --- binutils-2.12/include/elf/ChangeLog Wed Feb 13 14:16:45 2002 +++ binutils-2.12.1/include/elf/ChangeLog Thu May 9 10:50:44 2002 @@ -1,3 +1,9 @@ +2002-04-2 Alan Modra + + Merge from mainline. + 2002-04-24 Elena Zannoni + * dwarf2.h: Add DW_AT_GNU_vector. + 2002-02-13 Matt Fredette * m68k.h (EF_M68000): Define. diff -Nur binutils-2.12/include/elf/dwarf2.h binutils-2.12.1/include/elf/dwarf2.h --- binutils-2.12/include/elf/dwarf2.h Mon Jan 28 18:26:53 2002 +++ binutils-2.12.1/include/elf/dwarf2.h Thu May 9 10:50:44 2002 @@ -328,6 +328,7 @@ DW_AT_src_coords = 0x2104, DW_AT_body_begin = 0x2105, DW_AT_body_end = 0x2106, + DW_AT_GNU_vector = 0x2107, /* VMS Extensions. */ DW_AT_VMS_rtnbeg_pd_address = 0x2201 }; diff -Nur binutils-2.12/include/opcode/ChangeLog binutils-2.12.1/include/opcode/ChangeLog --- binutils-2.12/include/opcode/ChangeLog Mon Feb 25 00:03:12 2002 +++ binutils-2.12.1/include/opcode/ChangeLog Thu May 9 10:50:44 2002 @@ -1,3 +1,10 @@ +2002-04-27 Alan Modra + + Merge from mainline + 2002-04-11 Alan Modra + * i386.h: Add intel mode cmpsd and movsd. + Put them before SSE2 insns, so that rep prefix works. + 2002-02-25 Alan Modra * ppc.h (PPC_OPCODE_POWER4, PPC_OPCODE_NOPOWER4): Define. diff -Nur binutils-2.12/include/opcode/i386.h binutils-2.12.1/include/opcode/i386.h --- binutils-2.12/include/opcode/i386.h Mon Feb 18 11:30:43 2002 +++ binutils-2.12.1/include/opcode/i386.h Thu May 9 10:50:44 2002 @@ -1231,6 +1231,9 @@ {"cmpunordpd",2, 0x660fc2, 3, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } }, {"cmpunordsd",2, 0xf20fc2, 3, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } }, {"cmppd", 3, 0x660fc2, X, CpuSSE2, FP|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } }, +/* Intel mode string compare. */ +{"cmpsd", 0, 0xa7, X, 0, NoSuf|Size32|IsString, { 0, 0, 0} }, +{"cmpsd", 2, 0xa7, X, 0, NoSuf|Size32|IsString, { AnyMem, AnyMem|EsSeg, 0} }, {"cmpsd", 3, 0xf20fc2, X, CpuSSE2, FP|Modrm, { Imm8, RegXMM|LongMem, RegXMM } }, {"comisd", 2, 0x660f2f, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } }, {"cvtpi2pd", 2, 0x660f2a, X, CpuSSE2, FP|Modrm, { RegMMX|LLongMem, RegXMM, 0 } }, @@ -1249,6 +1252,9 @@ {"movlpd", 2, 0x660f13, X, CpuSSE2, FP|Modrm, { RegXMM, LLongMem, 0 } }, {"movmskpd", 2, 0x660f50, X, CpuSSE2, lq_Suf|IgnoreSize|Modrm, { RegXMM|InvMem, Reg32|Reg64, 0 } }, {"movntpd", 2, 0x660f2b, X, CpuSSE2, FP|Modrm, { RegXMM, LLongMem, 0 } }, +/* Intel mode string move. */ +{"movsd", 0, 0xa5, X, 0, NoSuf|Size32|IsString, { 0, 0, 0} }, +{"movsd", 2, 0xa5, X, 0, NoSuf|Size32|IsString, { AnyMem, AnyMem|EsSeg, 0} }, {"movsd", 2, 0xf20f10, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } }, {"movsd", 2, 0xf20f11, X, CpuSSE2, FP|Modrm, { RegXMM, RegXMM|LongMem, 0 } }, {"movupd", 2, 0x660f10, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, diff -Nur binutils-2.12/ld/ChangeLog binutils-2.12.1/ld/ChangeLog --- binutils-2.12/ld/ChangeLog Thu Mar 7 23:05:18 2002 +++ binutils-2.12.1/ld/ChangeLog Sat May 11 11:13:35 2002 @@ -1,3 +1,101 @@ +2002-05-09 Alan Modra + + Merge from mainline. + 2002-05-02 Alan Modra + * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation): + Adjust for ppc64_elf_set_toc change. #include libbfd.h. + + 2002-04-28 Alan Modra + * Makefile.am (mpw): New maintainer mode rule to make mpw-*.c files. + * Makefile.in: Regenerate. + * mpw-elfmips.c: Delete. + * mpw-eppcmac.c: Delete. + * mpw-esh.c: Delete. + * mpw-idtmips.c: Delete. + +2002-04-27 Alan Modra + + Merge from mainline + 2002-04-08 Alan Modra + * ldlang.c (lang_size_sections): Don't complain about + SEC_NEVER_LOAD sections having no memory region specified. + * ld.texinfo (Format Commands ): Typo fix. + + 2002-04-07 matthew green + * ld/configure.host (*-*-netbsd*): Add support for NetBSD/ELF. + + 2002-02-19 Martin Schwidefsky + * emulparams/elf64_s390.sh (ARCH): Change to "s390:64-bit". + * emulparams/elf_s390.sh (ARCH): Change to "s390:31-bit". + +2002-04-11 Nick Clifton + + * emultempl/armelf.em (PARSE_AND_LIST_SHORTOPTS): Add 'n' in order + to prevent "-n" from being taken as an abbreviation for + "--no-pipeline-knowledge". + +2002-04-04 Alan Modra + + * dep-in.sed: Cope with absolute paths. + * Makefile.am (dep.sed): Subst TOPDIR and BFDDIR. + Run "make dep-am". + * Makefile.in: Regenerate. + + Merge from mainline. + 2002-03-28 Alan Modra + * configure.host: Set up for generic hosts first, then tweak as + necessary in more specific targets. + (HOSTING_LIBS): Include libgcc_eh.a if found. + +2002-03-28 Alan Modra + + Merge from mainline. + 2002-03-21 Albert Chin-A-Young + * genscripts.sh (LIB_SEARCH_DIRS): Quote path. + + 2002-03-20 Alan Modra + * ldlang.c (ldlang_add_undef): If the output bfd has been opened, + add the symbol to the linker hash table immediately. + (lang_place_undefineds): Split symbol creation out.. + (insert_undefined): ..to here. + + 2002-03-18 Alan Modra + * ldmain.c (main): Move .text readonly flag fudges from here.. + * ldlang.c (lang_process): ..to here. + + 2002-03-14 Alan Modra + * ldlang.c (lang_check): Remove the word size check added in last + change. Treat emitrelocations case as for relocatable links. + + 2002-03-13 Alan Modra + * ldlang.c (lang_check): Do relocatable link checks first, so that + warn_mismatch can't override. Check compatible and word size too. + + 2002-03-04 H.J. Lu + * scripttempl/elf.sc: Put .preinit_array, .init_array and + .fini_array in the data segment. + + 2002-03-04 Alan Modra + * scripttempl/elf.sc: Correct syntax errors in 2002-03-01 commit. + + 2002-03-01 David Mosberger + * scripttempl/elf.sc (SECTIONS): Add entries for .preinit_array, + .init_array, and .fini_array. + +2002-03-18 David O'Brien + + * emultempl/elf32.em: Use lbasename vs. basename to fix problem where + the contents of the buffer returned from basename function will are + getting overwritten while still being used. + +Mon Mar 18 18:07:20 CET 2002 Jan Hubicka + Andreas Jaeger + Andreas Schwab + + * configure.tgt (x86_64-*-linux-gnu*): Configure i386 as native. + * elf_x86_64.sh (ARCH): Set to i386:x86-64 + set libraries to default to lib64 paths. + 2002-03-07 Daniel Jacobowitz * ld.texinfo: Wrap @menu in @ifnottex, not @ifinfo. diff -Nur binutils-2.12/ld/Makefile.am binutils-2.12.1/ld/Makefile.am --- binutils-2.12/ld/Makefile.am Wed Feb 20 01:56:00 2002 +++ binutils-2.12.1/ld/Makefile.am Thu May 9 10:50:49 2002 @@ -1175,7 +1175,9 @@ dep.sed: dep-in.sed config.status sed <$(srcdir)/dep-in.sed >dep.sed \ -e 's!@INCDIR@!$(INCDIR)!' \ - -e 's!@SRCDIR@!$(srcdir)!' + -e 's!@BFDDIR@!$(BFDDIR)!' \ + -e 's!@SRCDIR@!$(srcdir)!' \ + -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/ld$$,,`'!' dep: DEP sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile @@ -1194,6 +1196,29 @@ .PHONY: dep dep-in dep-am +@MAINT@.PHONY: mpw +@MAINT@mpw: $(srcdir)/mpw-ei386go32.c $(srcdir)/mpw-elfmips.c \ +@MAINT@ $(srcdir)/mpw-em68kcoff.c $(srcdir)/mpw-eppcmac.c \ +@MAINT@ $(srcdir)/mpw-esh.c $(srcdir)/mpw-idtmips.c +@MAINT@ +@MAINT@$(srcdir)/mpw-ei386go32.c: ei386go32.c +@MAINT@ $(srcdir)/../move-if-change $< $@ +@MAINT@ +@MAINT@$(srcdir)/mpw-elfmips.c: eelf32ebmip.c +@MAINT@ $(srcdir)/../move-if-change $< $@ +@MAINT@ +@MAINT@$(srcdir)/mpw-em68kcoff.c: em68kcoff.c +@MAINT@ $(srcdir)/../move-if-change $< $@ +@MAINT@ +@MAINT@$(srcdir)/mpw-eppcmac.c: eppcmacos.c +@MAINT@ $(srcdir)/../move-if-change $< $@ +@MAINT@ +@MAINT@$(srcdir)/mpw-esh.c: esh.c +@MAINT@ $(srcdir)/../move-if-change $< $@ +@MAINT@ +@MAINT@$(srcdir)/mpw-idtmips.c: emipsidt.c +@MAINT@ $(srcdir)/../move-if-change $< $@ + # What appears below is generated by a hacked mkdep using gcc -MM. # DO NOT DELETE THIS LINE -- mkdep uses it. @@ -1258,16 +1283,17 @@ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \ ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldwrite.h \ ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \ - ../bfd/libcoff.h deffile.h pe-dll.h + $(BFDDIR)/libcoff.h deffile.h pe-dll.h ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \ $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \ ldver.h ldlang.h ldfile.h ldemul.h ldmisc.h ldmain.h \ mri.h ldctor.h ldlex.h -ldlex.o: ldlex.c ../bfd/bfd.h $(INCDIR)/symcat.h sysdep.h \ - config.h $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h \ - ld.h $(INCDIR)/bin-bugs.h ldgram.h ldmisc.h ldexp.h \ - ldlang.h ldfile.h ldlex.h ldmain.h $(INCDIR)/libiberty.h +ldlex.o: ldlex.c $(INCDIR)/ansidecl.h ../bfd/bfd.h \ + $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \ + $(INCDIR)/safe-ctype.h ld.h $(INCDIR)/bin-bugs.h ldgram.h \ + ldmisc.h ldexp.h ldlang.h ldfile.h ldlex.h ldmain.h \ + $(INCDIR)/libiberty.h deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ $(INCDIR)/safe-ctype.h ../bfd/bfd.h $(INCDIR)/symcat.h \ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \ diff -Nur binutils-2.12/ld/Makefile.in binutils-2.12.1/ld/Makefile.in --- binutils-2.12/ld/Makefile.in Wed Feb 20 00:26:22 2002 +++ binutils-2.12.1/ld/Makefile.in Thu May 9 10:50:49 2002 @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -507,7 +507,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES) OBJECTS = $(ld_new_OBJECTS) @@ -695,7 +695,7 @@ else ii=; fi; \ list='$(INFO_DEPS)'; \ for file in $$list; do \ - test -z "$ii" \ + test -z "$$ii" \ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ done @$(NORMAL_UNINSTALL) @@ -808,7 +808,7 @@ dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ - test "$$subdir" = "." && dot_seen=yes; \ + test "$$subdir" != "." || dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ @@ -1870,7 +1870,9 @@ dep.sed: dep-in.sed config.status sed <$(srcdir)/dep-in.sed >dep.sed \ -e 's!@INCDIR@!$(INCDIR)!' \ - -e 's!@SRCDIR@!$(srcdir)!' + -e 's!@BFDDIR@!$(BFDDIR)!' \ + -e 's!@SRCDIR@!$(srcdir)!' \ + -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/ld$$,,`'!' dep: DEP sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile @@ -1889,6 +1891,29 @@ .PHONY: dep dep-in dep-am +@MAINT@.PHONY: mpw +@MAINT@mpw: $(srcdir)/mpw-ei386go32.c $(srcdir)/mpw-elfmips.c \ +@MAINT@ $(srcdir)/mpw-em68kcoff.c $(srcdir)/mpw-eppcmac.c \ +@MAINT@ $(srcdir)/mpw-esh.c $(srcdir)/mpw-idtmips.c +@MAINT@ +@MAINT@$(srcdir)/mpw-ei386go32.c: ei386go32.c +@MAINT@ $(srcdir)/../move-if-change $< $@ +@MAINT@ +@MAINT@$(srcdir)/mpw-elfmips.c: eelf32ebmip.c +@MAINT@ $(srcdir)/../move-if-change $< $@ +@MAINT@ +@MAINT@$(srcdir)/mpw-em68kcoff.c: em68kcoff.c +@MAINT@ $(srcdir)/../move-if-change $< $@ +@MAINT@ +@MAINT@$(srcdir)/mpw-eppcmac.c: eppcmacos.c +@MAINT@ $(srcdir)/../move-if-change $< $@ +@MAINT@ +@MAINT@$(srcdir)/mpw-esh.c: esh.c +@MAINT@ $(srcdir)/../move-if-change $< $@ +@MAINT@ +@MAINT@$(srcdir)/mpw-idtmips.c: emipsidt.c +@MAINT@ $(srcdir)/../move-if-change $< $@ + # What appears below is generated by a hacked mkdep using gcc -MM. # DO NOT DELETE THIS LINE -- mkdep uses it. @@ -1953,16 +1978,17 @@ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \ ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldwrite.h \ ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \ - ../bfd/libcoff.h deffile.h pe-dll.h + $(BFDDIR)/libcoff.h deffile.h pe-dll.h ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \ $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \ ldver.h ldlang.h ldfile.h ldemul.h ldmisc.h ldmain.h \ mri.h ldctor.h ldlex.h -ldlex.o: ldlex.c ../bfd/bfd.h $(INCDIR)/symcat.h sysdep.h \ - config.h $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h \ - ld.h $(INCDIR)/bin-bugs.h ldgram.h ldmisc.h ldexp.h \ - ldlang.h ldfile.h ldlex.h ldmain.h $(INCDIR)/libiberty.h +ldlex.o: ldlex.c $(INCDIR)/ansidecl.h ../bfd/bfd.h \ + $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \ + $(INCDIR)/safe-ctype.h ld.h $(INCDIR)/bin-bugs.h ldgram.h \ + ldmisc.h ldexp.h ldlang.h ldfile.h ldlex.h ldmain.h \ + $(INCDIR)/libiberty.h deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ $(INCDIR)/safe-ctype.h ../bfd/bfd.h $(INCDIR)/symcat.h \ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \ diff -Nur binutils-2.12/ld/configure.host binutils-2.12.1/ld/configure.host --- binutils-2.12/ld/configure.host Wed Dec 19 14:58:28 2001 +++ binutils-2.12.1/ld/configure.host Thu May 9 10:50:50 2002 @@ -11,11 +11,51 @@ HDEFINES= HOSTING_CRT0=/lib/crt0.o -HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc' +HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ]; then libgcc=../gcc/libgcc.a; else libgcc=\`${CC} -print-libgcc-file-name\`; fi; if [ -f ../gcc/libgcc_eh.a ]; then libgcc="$libgcc ../gcc/libgcc_eh.a"; else libgcc_eh=\`${CC} -print-file-name=libgcc_eh.a\`; if [ x"$libgcc_eh" != xlibgcc_eh.a ]; then libgcc="$libgcc $libgcc_eh"; fi; fi; echo $libgcc -lc $libgcc`' NATIVE_LIB_DIRS= +# +# Generic configurations: +# + +case "${host}" in + +*-*-freebsd*) + NATIVE_LIB_DIRS=/usr/lib + # Older versions of gcc do not use a specs file. In those cases, + # gcc -print-file-name=specs will simply print specs. We create a + # dummy specs files to handle this. + echo "-dynamic-linker `${CC} --print-file-name=ld-elf.so.1`" > specs + HOSTING_CRT0='-dynamic-linker `${CC} --print-file-name=ld-elf.so.1` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `${CC} --print-file-name=crtbegin.o`' + HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' + ;; + +*-*-linux*aout* | *-*-linux*oldld) + HOSTING_CRT0=/usr/lib/crt0.o + ;; + +*-*-linux*libc1*) + HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' + HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o' + ;; + +*-*-linux*) + HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*\.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' + HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' + ;; + +esac + +# +# Now more specific configurations +# + case "${host}" in +*-*-linux*aout* | *-*-linux*oldld | *-*-linux*libc1*) + # No further tweaking needed + ;; + alpha*-*-netbsd*) # The new BSD `make' has a bug: it doesn't pass empty arguments in # shell commands. So we need to make this value non-empty in order @@ -26,8 +66,7 @@ ;; arm*-*-linux-gnu*) - HOSTING_CRT0='-p -dynamic-linker `fgrep ld-linux.so \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld-linux.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' + HOSTING_CRT0='-p '`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux,g"` ;; i[3456]86-*-bsd* | i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12]\.* | i[34567]86-*-freebsd*aout* | i[3456]86-*-netbsd*) @@ -41,23 +80,23 @@ i[3456]86-*-sysv4*) HOSTING_CRT0='/usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /usr/ccs/lib/crtn.o' + HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /usr/ccs/lib/crtn.o' NATIVE_LIB_DIRS=/usr/ccs/lib ;; i[3456]86-sequent-ptx* | i[3456]86-sequent-sysv*) HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi`' + HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi`' ;; i[3456]86-*-sysv*) HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; fi` /lib/crtn.o' + HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; fi` /lib/crtn.o' ;; i[3456]86-*-solaris*) HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`' + HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`' NATIVE_LIB_DIRS=/usr/ccs/lib ;; @@ -73,46 +112,31 @@ ${CC} -c crtend.c -o crtend.o rm -f crtend.c HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /lib/crtn.o' - ;; - -i[3456]86-*-linux*aout* | i[3456]86-*-linux*oldld) - HOSTING_CRT0=/usr/lib/crt0.o - ;; - -i[3456]86-*-linux*libc1*) - HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o' - ;; - -i[3456]86-*-linux-gnu*) - HOSTING_CRT0='-dynamic-linker `fgrep ld-linux.so \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld-linux.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' + HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /lib/crtn.o' ;; i[3456]86-*-lynxos*) HOSTING_CRT0=/lib/init1.o - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc -lm /lib/initn.o' + HOSTING_LIBS="$HOSTING_LIBS"' -lm /lib/initn.o' ;; i[3456]86-pc-interix*) HOSTING_CRT0='$$INTERIX_ROOT/usr/lib/crt0.o' NATIVE_LIB_DIRS='$$INTERIX_ROOT/usr/lib/' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L $$X/local_bin -L $$INTERIX_ROOT/usr/lib -lc -lcpsx -lc -lcpsx $$INTERIX_ROOT/usr/lib/psxdll.a $$INTERIX_ROOT/usr/lib/psxdll2.a' + HOSTING_LIBS='-L $$X/local_bin -L $$INTERIX_ROOT/usr/lib '"$HOSTING_LIBS"' -lcpsx -lc -lcpsx $$INTERIX_ROOT/usr/lib/psxdll.a $$INTERIX_ROOT/usr/lib/psxdll2.a' ;; i[3456]86-*-cygwin*) - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`' + HOSTING_LIBS="$HOSTING_LIBS"' -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`' ;; ia64-*-linux-gnu*) - HOSTING_CRT0='-dynamic-linker `egrep "ld-linux-ia64.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld-linux-ia64.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' + HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux-ia64,g"` ;; ia64-*-aix*) HOSTING_CRT0='-dynamic-linker `egrep "libc.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/libc.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' + HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' NATIVE_LIB_DIRS=/usr/lib/ia64l64 ;; @@ -120,48 +144,32 @@ HOSTING_CRT0=/usr/lib/crt0.o ;; -mips*-sgi-irix4*) +mips*-sgi-irix4* | mips*-sgi-irix5*) HOSTING_CRT0=/usr/lib/crt1.o - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o' - ;; - -mips*-sgi-irix5*) - HOSTING_CRT0=/usr/lib/crt1.o - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o' + HOSTING_LIBS="$HOSTING_LIBS"' /usr/lib/crtn.o' ;; mips*-sgi-irix6*) HOSTING_CRT0='/usr/lib32/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o ; else ${CC} -print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L/usr/lib32 -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o ; else ${CC} -print-file-name=crtend.o; fi` /usr/lib32/crtn.o -init __do_global_ctors -fini __do_global_dtors' + HOSTING_LIBS='-L/usr/lib32 '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o ; else ${CC} -print-file-name=crtend.o; fi` /usr/lib32/crtn.o -init __do_global_ctors -fini __do_global_dtors' ;; mips*-*-linux-gnu*) - HOSTING_CRT0='-dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o' - ;; - -m68*-*-linux*aout*) - HOSTING_CRT0=/usr/lib/crt0.o - ;; - -m68*-*-linux*libc1*) - HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o' + HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"` ;; m68*-*-linux-gnu*) - HOSTING_CRT0='-dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o' + HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"` ;; m68*-*-lynxos*) HOSTING_CRT0=/lib/init1.o - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc -lm /lib/initn.o' + HOSTING_LIBS="$HOSTING_LIBS"' -lm /lib/initn.o' ;; m68*-motorola-sysv) HOSTING_CRT0='`if [ -f ../gcc/crt0.o ]; then echo ../gcc/crt0.o; elif [ -f \`${CC} -print-file-name=\`crt0.o ]; then echo \`${CC} -print-file-name=\`crt0.o; else echo /lib/crt0.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc881 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`' + HOSTING_LIBS=`echo "$HOSTING_LIBS" | sed -e "s,-lc,-lc881,"` ;; m68*-sun-*) @@ -176,62 +184,50 @@ m88*-motorola-sysv3) HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`' + HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi`' ;; powerpc*-*-linux-gnu*) - HOSTING_CRT0='-dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o' + HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"` ;; s390x-*-linux-gnu*) - HOSTING_CRT0='-dynamic-linker /lib/ld64.so.1 `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L `dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' + HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld64.so.1,"` ;; s390-*-linux-gnu*) - HOSTING_CRT0='-dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o' + HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"` ;; sparc*-*-solaris2*) HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`' + HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`' NATIVE_LIB_DIRS=/usr/ccs/lib ;; sparc-*-linux-gnu*) - HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.2 `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' + HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld-linux.so.2,"` ;; sparc64-*-linux-gnu*) - HOSTING_CRT0='-dynamic-linker /lib64/ld-linux.so.2 `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' + HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld-linux.so.2,"` ;; x86_64-*-linux-gnu*) - HOSTING_CRT0='-dynamic-linker /lib64/ld-linux-x86-64.so.2 `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' + HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld-linux-x86-64.so.2,"` ;; -# -# Generic configurations: -# - *-*-freebsd*) - NATIVE_LIB_DIRS=/usr/lib - # Older versions of gcc do not use a specs file. In those cases, - # gcc -print-file-name=specs will simply print specs. We create a - # dummy specs files to handle this. - echo "-dynamic-linker `${CC} --print-file-name=ld-elf.so.1`" > specs - HOSTING_CRT0='-dynamic-linker `${CC} --print-file-name=ld-elf.so.1` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `${CC} --print-file-name=crtbegin.o`' - HOSTING_LIBS='`${CC} -print-libgcc-file-name` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `${CC} -print-libgcc-file-name` `${CC} --print-file-name=crtend.o` `${CC} --print-file-name=crtn.o`' ;; *-*-linux*) - HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' + ;; + +*-*-netbsd*) + NATIVE_LIB_DIRS=/usr/lib + # NetBSD typically does not use the GCC crtstuff, so ignore it. + HOSTING_CRT0='-dynamic-linker /usr/libexec/ld.elf_so /usr/lib/crt0.o /usr/lib/crtbegin.o' + HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` /usr/lib/crtend.o' ;; alpha*-*-*) diff -Nur binutils-2.12/ld/configure.tgt binutils-2.12.1/ld/configure.tgt --- binutils-2.12/ld/configure.tgt Wed Feb 20 00:26:22 2002 +++ binutils-2.12.1/ld/configure.tgt Mon Apr 1 20:29:20 2002 @@ -145,7 +145,9 @@ ;; x86_64-*-linux-gnu*) targ_emul=elf_x86_64 targ_extra_emuls="elf_i386 i386linux" - tdir_i386linux=${targ_alias}aout + targ_extra_libpath=elf_i386 + tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'` + tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;; i[3456]86-*-sysv[45]*) targ_emul=elf_i386 ;; i[3456]86-*-solaris2*) targ_emul=elf_i386_ldso diff -Nur binutils-2.12/ld/dep-in.sed binutils-2.12.1/ld/dep-in.sed --- binutils-2.12/ld/dep-in.sed Wed Apr 19 22:13:01 2000 +++ binutils-2.12.1/ld/dep-in.sed Thu Apr 4 11:21:22 2002 @@ -3,6 +3,9 @@ /\\$/b loop s!@INCDIR@!$(INCDIR)!g +s!@TOPDIR@/include!$(INCDIR)!g +s!@BFDDIR@!$(BFDDIR)!g +s!@TOPDIR@/bfd!$(BFDDIR)!g s!@SRCDIR@/!!g s! \.\./bfd/hosts/[^ ]*\.h! !g diff -Nur binutils-2.12/ld/emulparams/elf64_s390.sh binutils-2.12.1/ld/emulparams/elf64_s390.sh --- binutils-2.12/ld/emulparams/elf64_s390.sh Fri Aug 17 05:51:07 2001 +++ binutils-2.12.1/ld/emulparams/elf64_s390.sh Thu May 9 10:52:01 2002 @@ -4,7 +4,7 @@ TEXT_START_ADDR=0x80000000 MAXPAGESIZE=0x1000 NONPAGED_TEXT_START_ADDR=0x80000000 -ARCH="s390:esame" +ARCH="s390:64-bit" MACHINE= NOP=0x07070707 TEMPLATE_NAME=elf32 diff -Nur binutils-2.12/ld/emulparams/elf_s390.sh binutils-2.12.1/ld/emulparams/elf_s390.sh --- binutils-2.12/ld/emulparams/elf_s390.sh Fri Aug 17 05:51:07 2001 +++ binutils-2.12.1/ld/emulparams/elf_s390.sh Thu May 9 10:52:01 2002 @@ -3,7 +3,7 @@ TEXT_START_ADDR=0x00400000 MAXPAGESIZE=0x1000 NONPAGED_TEXT_START_ADDR=0x00400000 -ARCH=s390 +ARCH="s390:31-bit" MACHINE= NOP=0x07070707 TEMPLATE_NAME=elf32 diff -Nur binutils-2.12/ld/emulparams/elf_x86_64.sh binutils-2.12.1/ld/emulparams/elf_x86_64.sh --- binutils-2.12/ld/emulparams/elf_x86_64.sh Tue Nov 27 14:06:07 2001 +++ binutils-2.12.1/ld/emulparams/elf_x86_64.sh Mon Apr 1 20:29:23 2002 @@ -4,9 +4,40 @@ TEXT_START_ADDR=0x400000 MAXPAGESIZE=0x100000 NONPAGED_TEXT_START_ADDR=0x400000 -ARCH=i386 +ARCH="i386:x86-64" MACHINE= NOP=0x90909090 TEMPLATE_NAME=elf32 GENERATE_SHLIB_SCRIPT=yes NO_SMALL_DATA=yes + +if [ "x${host}" = "x${target}" ]; then + case " $EMULATION_LIBPATH " in + *" ${EMULATION_NAME} "*) + # Native, and default or emulation requesting LIB_PATH. + + # Linux modify the default library search path to first include + # a 64-bit specific directory. + case "$target" in + x86_64*-linux*) + suffix=64 ;; + esac + + if [ -n "${suffix}" ]; then + + LIB_PATH=/lib${suffix}:/lib + LIB_PATH=${LIB_PATH}:/usr/lib${suffix}:/usr/lib + if [ -n "${NATIVE_LIB_DIRS}" ]; then + LIB_PATH=${LIB_PATH}:`echo ${NATIVE_LIB_DIRS} | sed s_:_${suffix}:_g`${suffix}:${NATIVE_LIB_DIRS} + fi + if [ "${libdir}" != /usr/lib ]; then + LIB_PATH=${LIB_PATH}:${libdir}${suffix}:${libdir} + fi + if [ "${libdir}" != /usr/local/lib ]; then + LIB_PATH=${LIB_PATH}:/usr/local/lib${suffix}:/usr/local/lib + fi + + fi + ;; + esac +fi diff -Nur binutils-2.12/ld/emultempl/armelf.em binutils-2.12.1/ld/emultempl/armelf.em --- binutils-2.12/ld/emultempl/armelf.em Thu Nov 15 07:44:03 2001 +++ binutils-2.12.1/ld/emultempl/armelf.em Sat May 11 11:13:36 2002 @@ -156,7 +156,12 @@ #define OPTION_THUMB_ENTRY 301 ' -PARSE_AND_LIST_SHORTOPTS=p +# Note we add 'n' to the short option list in order to prevent +# getopt_long_only from thinking that -n is a unique abbreviation +# for --no-pipeline-knowledge. There is no case to handle 'n' here +# however, so instead it will be passed back to parse_args() in +# lexsup.c where it will be handled. +PARSE_AND_LIST_SHORTOPTS=pn PARSE_AND_LIST_LONGOPTS=' { "no-pipeline-knowledge", no_argument, NULL, '\'p\''}, diff -Nur binutils-2.12/ld/emultempl/elf32.em binutils-2.12.1/ld/emultempl/elf32.em --- binutils-2.12/ld/emultempl/elf32.em Tue Feb 5 01:52:17 2002 +++ binutils-2.12.1/ld/emultempl/elf32.em Mon Apr 1 20:29:23 2002 @@ -165,7 +165,7 @@ soname = bfd_elf_get_dt_soname (s->the_bfd); if (soname == NULL) - soname = basename (bfd_get_filename (s->the_bfd)); + soname = lbasename (bfd_get_filename (s->the_bfd)); for (l = global_vercheck_needed; l != NULL; l = l->next) { @@ -247,7 +247,7 @@ soname = bfd_elf_get_dt_soname (s->the_bfd); if (soname == NULL) - soname = basename (s->filename); + soname = lbasename (s->filename); if (strncmp (soname, global_needed->name, suffix - global_needed->name) == 0) einfo ("%P: warning: %s, needed by %B, may conflict with %s\n", @@ -351,7 +351,7 @@ einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd); /* First strip off everything before the last '/'. */ - soname = basename (abfd->filename); + soname = lbasename (abfd->filename); if (trace_file_tries) info_msg (_("found %s at %s\n"), soname, name); @@ -369,9 +369,6 @@ DT_NEEDED entry for this file. */ bfd_elf_set_dt_needed_name (abfd, ""); - /* Previos basename call was clobbered in lang_for_each_input_file. */ - soname = basename (abfd->filename); - /* Tell the ELF backend that the output file needs a DT_NEEDED entry for this file if it is used to resolve the reference in a regular object. */ @@ -976,7 +973,7 @@ /* Rather than duplicating the logic above. Just use the filename we recorded earlier. */ - filename = xstrdup (basename (entry->filename)); + filename = lbasename (entry->filename); bfd_elf_set_dt_needed_name (entry->the_bfd, filename); } diff -Nur binutils-2.12/ld/emultempl/ppc64elf.em binutils-2.12.1/ld/emultempl/ppc64elf.em --- binutils-2.12/ld/emultempl/ppc64elf.em Sun Feb 10 18:05:33 2002 +++ binutils-2.12.1/ld/emultempl/ppc64elf.em Thu May 9 10:52:01 2002 @@ -23,6 +23,7 @@ # cat >>e${EMULATION_NAME}.c <name = xstrdup (name); + + if (output_bfd != NULL) + insert_undefined (new->name); +} + +/* Insert NAME as undefined in the symbol table. */ + +static void +insert_undefined (name) + const char *name; +{ + struct bfd_link_hash_entry *h; + + h = bfd_link_hash_lookup (link_info.hash, name, true, false, true); + if (h == (struct bfd_link_hash_entry *) NULL) + einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n")); + if (h->type == bfd_link_hash_new) + { + h->type = bfd_link_hash_undefined; + h->u.undef.abfd = NULL; + bfd_link_add_undef (link_info.hash, h); + } } /* Run through the list of undefineds created above and place them @@ -2043,17 +2070,7 @@ ptr != (ldlang_undef_chain_list_type *) NULL; ptr = ptr->next) { - struct bfd_link_hash_entry *h; - - h = bfd_link_hash_lookup (link_info.hash, ptr->name, true, false, true); - if (h == (struct bfd_link_hash_entry *) NULL) - einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n")); - if (h->type == bfd_link_hash_new) - { - h->type = bfd_link_hash_undefined; - h->u.undef.abfd = NULL; - bfd_link_add_undef (link_info.hash, h); - } + insert_undefined (ptr->name); } } @@ -2897,6 +2914,8 @@ defined, issue a warning. */ if ((bfd_get_section_flags (output_bfd, os->bfd_section) & (SEC_ALLOC | SEC_LOAD)) != 0 + && (bfd_get_section_flags (output_bfd, os->bfd_section) + & SEC_NEVER_LOAD) == 0 && ! link_info.relocateable && strcmp (os->region->name, "*default*") == 0 && lang_memory_region_list != NULL @@ -3517,8 +3536,25 @@ file = file->input_statement.next) { input_bfd = file->input_statement.the_bfd; - compatible = bfd_arch_get_compatible (input_bfd, - output_bfd); + compatible = bfd_arch_get_compatible (input_bfd, output_bfd); + + /* In general it is not possible to perform a relocatable + link between differing object formats when the input + file has relocations, because the relocations in the + input format may not have equivalent representations in + the output format (and besides BFD does not translate + relocs for other link purposes than a final link). */ + if ((link_info.relocateable || link_info.emitrelocations) + && (compatible == NULL + || bfd_get_flavour (input_bfd) != bfd_get_flavour (output_bfd)) + && (bfd_get_file_flags (input_bfd) & HAS_RELOC) != 0) + { + einfo (_("%P%F: Relocatable linking with relocations from format %s (%B) to format %s (%B) is not supported\n"), + bfd_get_target (input_bfd), input_bfd, + bfd_get_target (output_bfd), output_bfd); + /* einfo with %F exits. */ + } + if (compatible == NULL) { if (command_line.warn_mismatch) @@ -3526,18 +3562,6 @@ bfd_printable_name (input_bfd), input_bfd, bfd_printable_name (output_bfd)); } - else if (link_info.relocateable - /* In general it is not possible to perform a relocatable - link between differing object formats when the input - file has relocations, because the relocations in the - input format may not have equivalent representations in - the output format (and besides BFD does not translate - relocs for other link purposes than a final link). */ - && bfd_get_flavour (input_bfd) != bfd_get_flavour (output_bfd) - && (bfd_get_file_flags (input_bfd) & HAS_RELOC) != 0) - einfo (_("%P%F: Relocatable linking with relocations from format %s (%B) to format %s (%B) is not supported\n"), - bfd_get_target (input_bfd), input_bfd, - bfd_get_target (output_bfd), output_bfd); else if (bfd_count_sections (input_bfd)) { /* If the input bfd has no contents, it shouldn't set the @@ -4141,6 +4165,22 @@ /* Find any sections not attached explicitly and handle them. */ lang_place_orphans (); + if (! link_info.relocateable) + { + /* Look for a text section and set the readonly attribute in it. */ + asection *found = bfd_get_section_by_name (output_bfd, ".text"); + + if (found != (asection *) NULL) + { + if (config.text_read_only) + found->flags |= SEC_READONLY; + else + found->flags &= ~SEC_READONLY; + } + } + + /* Do anything special before sizing sections. This is where ELF + and other back-ends size dynamic sections. */ ldemul_before_allocation (); /* We must record the program headers before we try to fix the diff -Nur binutils-2.12/ld/ldmain.c binutils-2.12.1/ld/ldmain.c --- binutils-2.12/ld/ldmain.c Sun Feb 10 14:10:34 2002 +++ binutils-2.12.1/ld/ldmain.c Mon Apr 1 20:29:23 2002 @@ -404,20 +404,6 @@ /* Print error messages for any missing symbols, for any warning symbols, and possibly multiple definitions. */ - if (! link_info.relocateable) - { - /* Look for a text section and switch the readonly attribute in it. */ - asection *found = bfd_get_section_by_name (output_bfd, ".text"); - - if (found != (asection *) NULL) - { - if (config.text_read_only) - found->flags |= SEC_READONLY; - else - found->flags &= ~SEC_READONLY; - } - } - if (link_info.relocateable) output_bfd->flags &= ~EXEC_P; else diff -Nur binutils-2.12/ld/ldver.texi binutils-2.12.1/ld/ldver.texi --- binutils-2.12/ld/ldver.texi Fri Mar 8 14:45:08 2002 +++ binutils-2.12.1/ld/ldver.texi Tue May 14 19:47:18 2002 @@ -1 +1 @@ -@set VERSION 2.12 +@set VERSION 2.12.1 diff -Nur binutils-2.12/ld/mpw-elfmips.c binutils-2.12.1/ld/mpw-elfmips.c --- binutils-2.12/ld/mpw-elfmips.c Wed Sep 19 01:33:33 2001 +++ binutils-2.12.1/ld/mpw-elfmips.c Wed Dec 31 19:00:00 1969 @@ -1,1441 +0,0 @@ -/* This file is is generated by a shell script. DO NOT EDIT! */ - -/* 32 bit ELF emulation code for elf32ebmip - Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001 - Free Software Foundation, Inc. - Written by Steve Chamberlain - ELF support by Ian Lance Taylor - -This file is part of GLD, the Gnu Linker. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#define TARGET_IS_elf32ebmip - -#include "bfd.h" -#include "sysdep.h" -#include "safe-ctype.h" - -#include "bfdlink.h" - -#include "ld.h" -#include "ldmain.h" -#include "ldmisc.h" -#include "ldexp.h" -#include "ldlang.h" -#include "ldgram.h" -#include "ldfile.h" -#include "ldemul.h" - -static void gldelf32ebmip_before_parse PARAMS ((void)); -static boolean gldelf32ebmip_open_dynamic_archive - PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *)); -static void gldelf32ebmip_after_open PARAMS ((void)); -static void gldelf32ebmip_check_needed - PARAMS ((lang_input_statement_type *)); -static void gldelf32ebmip_stat_needed - PARAMS ((lang_input_statement_type *)); -static boolean gldelf32ebmip_search_needed - PARAMS ((const char *, const char *)); -static boolean gldelf32ebmip_try_needed PARAMS ((const char *)); -static void gldelf32ebmip_before_allocation PARAMS ((void)); -static void gldelf32ebmip_find_statement_assignment - PARAMS ((lang_statement_union_type *)); -static void gldelf32ebmip_find_exp_assignment PARAMS ((etree_type *)); -static boolean gldelf32ebmip_place_orphan - PARAMS ((lang_input_statement_type *, asection *)); -static void gldelf32ebmip_place_section - PARAMS ((lang_statement_union_type *)); -static char *gldelf32ebmip_get_script PARAMS ((int *isfile)); - -static void -gldelf32ebmip_before_parse() -{ - ldfile_output_architecture = bfd_arch_mips; - config.dynamic_link = true; -} - -/* Try to open a dynamic archive. This is where we know that ELF - dynamic libraries have an extension of .so. */ - -static boolean -gldelf32ebmip_open_dynamic_archive (arch, search, entry) - const char *arch; - search_dirs_type *search; - lang_input_statement_type *entry; -{ - const char *filename; - char *string; - - if (! entry->is_archive) - return false; - - filename = entry->filename; - - string = (char *) xmalloc (strlen (search->name) - + strlen (filename) - + strlen (arch) - + sizeof "/lib.so"); - - sprintf (string, "%s/lib%s%s.so", search->name, filename, arch); - - if (! ldfile_try_open_bfd (string, entry)) - { - free (string); - return false; - } - - entry->filename = string; - - /* We have found a dynamic object to include in the link. The ELF - backend linker will create a DT_NEEDED entry in the .dynamic - section naming this file. If this file includes a DT_SONAME - entry, it will be used. Otherwise, the ELF linker will just use - the name of the file. For an archive found by searching, like - this one, the DT_NEEDED entry should consist of just the name of - the file, without the path information used to find it. Note - that we only need to do this if we have a dynamic object; an - archive will never be referenced by a DT_NEEDED entry. - - FIXME: This approach--using bfd_elf_set_dt_needed_name--is not - very pretty. I haven't been able to think of anything that is - pretty, though. */ - if (bfd_check_format (entry->the_bfd, bfd_object) - && (entry->the_bfd->flags & DYNAMIC) != 0) - { - char *needed_name; - - ASSERT (entry->is_archive && entry->search_dirs_flag); - needed_name = (char *) xmalloc (strlen (filename) - + strlen (arch) - + sizeof "lib.so"); - sprintf (needed_name, "lib%s%s.so", filename, arch); - bfd_elf_set_dt_needed_name (entry->the_bfd, needed_name); - } - - return true; -} - - -/* These variables are required to pass information back and forth - between after_open and check_needed and stat_needed. */ - -static struct bfd_link_needed_list *global_needed; -static struct stat global_stat; -static boolean global_found; - -/* This is called after all the input files have been opened. */ - -static void -gldelf32ebmip_after_open () -{ - struct bfd_link_needed_list *needed, *l; - - /* We only need to worry about this when doing a final link. */ - if (link_info.relocateable || link_info.shared) - return; - - /* Get the list of files which appear in DT_NEEDED entries in - dynamic objects included in the link (often there will be none). - For each such file, we want to track down the corresponding - library, and include the symbol table in the link. This is what - the runtime dynamic linker will do. Tracking the files down here - permits one dynamic object to include another without requiring - special action by the person doing the link. Note that the - needed list can actually grow while we are stepping through this - loop. */ - needed = bfd_elf_get_needed_list (output_bfd, &link_info); - for (l = needed; l != NULL; l = l->next) - { - struct bfd_link_needed_list *ll; - const char *lib_path; - size_t len; - search_dirs_type *search; - - /* If we've already seen this file, skip it. */ - for (ll = needed; ll != l; ll = ll->next) - if (strcmp (ll->name, l->name) == 0) - break; - if (ll != l) - continue; - - /* See if this file was included in the link explicitly. */ - global_needed = l; - global_found = false; - lang_for_each_input_file (gldelf32ebmip_check_needed); - if (global_found) - continue; - - /* We need to find this file and include the symbol table. We - want to search for the file in the same way that the dynamic - linker will search. That means that we want to use - rpath_link, rpath, then the environment variable - LD_LIBRARY_PATH (native only), then the linker script - LIB_SEARCH_DIRS. We do not search using the -L arguments. */ - if (gldelf32ebmip_search_needed (command_line.rpath_link, - l->name)) - continue; - if (gldelf32ebmip_search_needed (command_line.rpath, l->name)) - continue; - if (command_line.rpath_link == NULL - && command_line.rpath == NULL) - { - lib_path = (const char *) getenv ("LD_RUN_PATH"); - if (gldelf32ebmip_search_needed (lib_path, l->name)) - continue; - } - len = strlen (l->name); - for (search = search_head; search != NULL; search = search->next) - { - char *filename; - - if (search->cmdline) - continue; - filename = (char *) xmalloc (strlen (search->name) + len + 2); - sprintf (filename, "%s/%s", search->name, l->name); - if (gldelf32ebmip_try_needed (filename)) - break; - free (filename); - } - if (search != NULL) - continue; - - einfo (_("%P: warning: %s, needed by %B, not found\n"), - l->name, l->by); - } -} - -/* Search for a needed file in a path. */ - -static boolean -gldelf32ebmip_search_needed (path, name) - const char *path; - const char *name; -{ - const char *s; - size_t len; - - if (path == NULL || *path == '\0') - return false; - len = strlen (name); - while (1) - { - char *filename, *sset; - - s = strchr (path, ':'); - if (s == NULL) - s = path + strlen (path); - - filename = (char *) xmalloc (s - path + len + 2); - if (s == path) - sset = filename; - else - { - memcpy (filename, path, s - path); - filename[s - path] = '/'; - sset = filename + (s - path) + 1; - } - strcpy (sset, name); - - if (gldelf32ebmip_try_needed (filename)) - return true; - - free (filename); - - if (*s == '\0') - break; - path = s + 1; - } - - return false; -} - -/* This function is called for each possible name for a dynamic object - named by a DT_NEEDED entry. */ - -static boolean -gldelf32ebmip_try_needed (name) - const char *name; -{ - bfd *abfd; - - abfd = bfd_openr (name, bfd_get_target (output_bfd)); - if (abfd == NULL) - return false; - if (! bfd_check_format (abfd, bfd_object)) - { - (void) bfd_close (abfd); - return false; - } - if ((bfd_get_file_flags (abfd) & DYNAMIC) == 0) - { - (void) bfd_close (abfd); - return false; - } - - /* We've found a dynamic object matching the DT_NEEDED entry. */ - - /* We have already checked that there is no other input file of the - same name. We must now check again that we are not including the - same file twice. We need to do this because on many systems - libc.so is a symlink to, e.g., libc.so.1. The SONAME entry will - reference libc.so.1. If we have already included libc.so, we - don't want to include libc.so.1 if they are the same file, and we - can only check that using stat. */ - - if (bfd_stat (abfd, &global_stat) != 0) - einfo (_("%F%P:%B: bfd_stat failed: %E\n"), abfd); - global_found = false; - lang_for_each_input_file (gldelf32ebmip_stat_needed); - if (global_found) - { - /* Return true to indicate that we found the file, even though - we aren't going to do anything with it. */ - return true; - } - - /* Tell the ELF backend that don't want the output file to have a - DT_NEEDED entry for this file. */ - bfd_elf_set_dt_needed_name (abfd, ""); - - /* Add this file into the symbol table. */ - if (! bfd_link_add_symbols (abfd, &link_info)) - einfo (_("%F%B: could not read symbols: %E\n"), abfd); - - return true; -} - -/* See if an input file matches a DT_NEEDED entry by name. */ - -static void -gldelf32ebmip_check_needed (s) - lang_input_statement_type *s; -{ - if (global_found) - return; - - if (s->filename != NULL - && strcmp (s->filename, global_needed->name) == 0) - { - global_found = true; - return; - } - - if (s->the_bfd != NULL) - { - const char *soname; - - soname = bfd_elf_get_dt_soname (s->the_bfd); - if (soname != NULL - && strcmp (soname, global_needed->name) == 0) - { - global_found = true; - return; - } - } - - if (s->search_dirs_flag - && s->filename != NULL - && strchr (global_needed->name, '/') == NULL) - { - const char *f; - - f = strrchr (s->filename, '/'); - if (f != NULL - && strcmp (f + 1, global_needed->name) == 0) - { - global_found = true; - return; - } - } -} - -/* See if an input file matches a DT_NEEDED entry by running stat on - the file. */ - -static void -gldelf32ebmip_stat_needed (s) - lang_input_statement_type *s; -{ - struct stat st; - const char *suffix; - const char *soname; - const char *f; - - if (global_found) - return; - if (s->the_bfd == NULL) - return; - - if (bfd_stat (s->the_bfd, &st) != 0) - { - einfo (_("%P:%B: bfd_stat failed: %E\n"), s->the_bfd); - return; - } - - if (st.st_dev == global_stat.st_dev - && st.st_ino == global_stat.st_ino) - { - global_found = true; - return; - } - - /* We issue a warning if it looks like we are including two - different versions of the same shared library. For example, - there may be a problem if -lc picks up libc.so.6 but some other - shared library has a DT_NEEDED entry of libc.so.5. This is a - hueristic test, and it will only work if the name looks like - NAME.so.VERSION. FIXME: Depending on file names is error-prone. - If we really want to issue warnings about mixing version numbers - of shared libraries, we need to find a better way. */ - - if (strchr (global_needed->name, '/') != NULL) - return; - suffix = strstr (global_needed->name, ".so."); - if (suffix == NULL) - return; - suffix += sizeof ".so." - 1; - - soname = bfd_elf_get_dt_soname (s->the_bfd); - if (soname == NULL) - soname = s->filename; - - f = strrchr (soname, '/'); - if (f != NULL) - ++f; - else - f = soname; - - if (strncmp (f, global_needed->name, suffix - global_needed->name) == 0) - einfo (_("%P: warning: %s, needed by %B, may conflict with %s\n"), - global_needed->name, global_needed->by, f); -} - -/* This is called after the sections have been attached to output - sections, but before any sizes or addresses have been set. */ - -static void -gldelf32ebmip_before_allocation () -{ - const char *rpath; - asection *sinterp; - - /* If we are going to make any variable assignments, we need to let - the ELF backend know about them in case the variables are - referred to by dynamic objects. */ - lang_for_each_statement (gldelf32ebmip_find_statement_assignment); - - /* Let the ELF backend work out the sizes of any sections required - by dynamic linking. */ - rpath = command_line.rpath; - if (rpath == NULL) - rpath = (const char *) getenv ("LD_RUN_PATH"); - if (! (bfd_elf32_size_dynamic_sections - (output_bfd, command_line.soname, rpath, - command_line.filter_shlib, - (const char * const *) command_line.auxiliary_filters, - &link_info, &sinterp, lang_elf_version_info))) - einfo (_("%P%F: failed to set dynamic section sizes: %E\n")); - - /* Let the user override the dynamic linker we are using. */ - if (command_line.interpreter != NULL - && sinterp != NULL) - { - sinterp->contents = (bfd_byte *) command_line.interpreter; - sinterp->_raw_size = strlen (command_line.interpreter) + 1; - } - - /* Look for any sections named .gnu.warning. As a GNU extensions, - we treat such sections as containing warning messages. We print - out the warning message, and then zero out the section size so - that it does not get copied into the output file. */ - - { - LANG_FOR_EACH_INPUT_STATEMENT (is) - { - asection *s; - bfd_size_type sz; - char *msg; - boolean ret; - - if (is->just_syms_flag) - continue; - - s = bfd_get_section_by_name (is->the_bfd, ".gnu.warning"); - if (s == NULL) - continue; - - sz = bfd_section_size (is->the_bfd, s); - msg = xmalloc ((size_t) sz + 1); - if (! bfd_get_section_contents (is->the_bfd, s, msg, (file_ptr) 0, sz)) - einfo (_("%F%B: Can't read contents of section .gnu.warning: %E\n"), - is->the_bfd); - msg[sz] = '\0'; - ret = link_info.callbacks->warning (&link_info, msg, - (const char *) NULL, - is->the_bfd, (asection *) NULL, - (bfd_vma) 0); - ASSERT (ret); - free (msg); - - /* Clobber the section size, so that we don't waste copying the - warning into the output file. */ - s->_raw_size = 0; - } - } -} - -/* This is called by the before_allocation routine via - lang_for_each_statement. It locates any assignment statements, and - tells the ELF backend about them, in case they are assignments to - symbols which are referred to by dynamic objects. */ - -static void -gldelf32ebmip_find_statement_assignment (s) - lang_statement_union_type *s; -{ - if (s->header.type == lang_assignment_statement_enum) - gldelf32ebmip_find_exp_assignment (s->assignment_statement.exp); -} - -/* Look through an expression for an assignment statement. */ - -static void -gldelf32ebmip_find_exp_assignment (exp) - etree_type *exp; -{ - struct bfd_link_hash_entry *h; - - switch (exp->type.node_class) - { - case etree_provide: - case etree_provided: - h = bfd_link_hash_lookup (link_info.hash, exp->assign.dst, - false, false, false); - if (h == NULL) - break; - - /* We call record_link_assignment even if the symbol is defined. - This is because if it is defined by a dynamic object, we - actually want to use the value defined by the linker script, - not the value from the dynamic object (because we are setting - symbols like etext). If the symbol is defined by a regular - object, then, as it happens, calling record_link_assignment - will do no harm. */ - - /* Fall through. */ - case etree_assign: - if (strcmp (exp->assign.dst, ".") != 0) - { - if (! (bfd_elf32_record_link_assignment - (output_bfd, &link_info, exp->assign.dst, - exp->type.node_class != etree_assign ? true : false))) - einfo (_("%P%F: failed to record assignment to %s: %E\n"), - exp->assign.dst); - } - gldelf32ebmip_find_exp_assignment (exp->assign.src); - break; - - case etree_binary: - gldelf32ebmip_find_exp_assignment (exp->binary.lhs); - gldelf32ebmip_find_exp_assignment (exp->binary.rhs); - break; - - case etree_trinary: - gldelf32ebmip_find_exp_assignment (exp->trinary.cond); - gldelf32ebmip_find_exp_assignment (exp->trinary.lhs); - gldelf32ebmip_find_exp_assignment (exp->trinary.rhs); - break; - - case etree_unary: - gldelf32ebmip_find_exp_assignment (exp->unary.child); - break; - - default: - break; - } -} - -/* Place an orphan section. We use this to put random SHF_ALLOC - sections in the right segment. */ - -static asection *hold_section; -static lang_output_section_statement_type *hold_use; -static lang_output_section_statement_type *hold_text; -static lang_output_section_statement_type *hold_rodata; -static lang_output_section_statement_type *hold_data; -static lang_output_section_statement_type *hold_bss; -static lang_output_section_statement_type *hold_rel; - -/*ARGSUSED*/ -static boolean -gldelf32ebmip_place_orphan (file, s) - lang_input_statement_type *file; - asection *s; -{ - lang_output_section_statement_type *place; - asection *snew, **pps; - lang_statement_list_type *old; - lang_statement_list_type add; - etree_type *address; - const char *secname, *ps; - lang_output_section_statement_type *os; - - if ((s->flags & SEC_ALLOC) == 0) - return false; - - /* Look through the script to see where to place this section. */ - hold_section = s; - hold_use = NULL; - lang_for_each_statement (gldelf32ebmip_place_section); - - if (hold_use != NULL) - { - /* We have already placed a section with this name. */ - lang_add_section (&hold_use->children, s, hold_use, file); - return true; - } - - secname = bfd_get_section_name (s->owner, s); - - /* If this is a final link, then always put .gnu.warning.SYMBOL - sections into the .text section to get them out of the way. */ - if (! link_info.shared - && ! link_info.relocateable - && strncmp (secname, ".gnu.warning.", sizeof ".gnu.warning." - 1) == 0 - && hold_text != NULL) - { - lang_add_section (&hold_text->children, s, hold_text, file); - return true; - } - - /* Decide which segment the section should go in based on the - section name and section flags. */ - place = NULL; - if ((s->flags & SEC_HAS_CONTENTS) == 0 - && hold_bss != NULL) - place = hold_bss; - else if ((s->flags & SEC_READONLY) == 0 - && hold_data != NULL) - place = hold_data; - else if (strncmp (secname, ".rel", 4) == 0 - && hold_rel != NULL) - place = hold_rel; - else if ((s->flags & SEC_CODE) == 0 - && (s->flags & SEC_READONLY) != 0 - && hold_rodata != NULL) - place = hold_rodata; - else if ((s->flags & SEC_READONLY) != 0 - && hold_text != NULL) - place = hold_text; - if (place == NULL) - return false; - - /* Create the section in the output file, and put it in the right - place. This shuffling is to make the output file look neater. */ - snew = bfd_make_section (output_bfd, secname); - if (snew == NULL) - einfo (_("%P%F: output format %s cannot represent section called %s\n"), - output_bfd->xvec->name, secname); - if (place->bfd_section != NULL) - { - for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next) - ; - *pps = snew->next; - snew->next = place->bfd_section->next; - place->bfd_section->next = snew; - } - - /* Start building a list of statements for this section. */ - old = stat_ptr; - stat_ptr = &add; - lang_list_init (stat_ptr); - - /* If the name of the section is representable in C, then create - symbols to mark the start and the end of the section. */ - for (ps = secname; *ps != '\0'; ps++) - if (! ISALNUM (*ps) && *ps != '_') - break; - if (*ps == '\0' && config.build_constructors) - { - char *symname; - - symname = (char *) xmalloc (ps - secname + sizeof "__start_"); - sprintf (symname, "__start_%s", secname); - lang_add_assignment (exp_assop ('=', symname, - exp_unop (ALIGN_K, - exp_intop ((bfd_vma) 1 - << s->alignment_power)))); - } - - if (! link_info.relocateable) - address = NULL; - else - address = exp_intop ((bfd_vma) 0); - - lang_enter_output_section_statement (secname, address, 0, - (bfd_vma) 0, - (etree_type *) NULL, - (etree_type *) NULL, - (etree_type *) NULL); - - os = lang_output_section_statement_lookup (secname); - lang_add_section (&os->children, s, os, file); - - lang_leave_output_section_statement - ((bfd_vma) 0, "*default*", - (struct lang_output_section_phdr_list *) NULL, "*default*"); - stat_ptr = &add; - - if (*ps == '\0' && config.build_constructors) - { - char *symname; - - symname = (char *) xmalloc (ps - secname + sizeof "__stop_"); - sprintf (symname, "__stop_%s", secname); - lang_add_assignment (exp_assop ('=', symname, - exp_nameop (NAME, "."))); - } - - /* Now stick the new statement list right after PLACE. */ - *add.tail = place->header.next; - place->header.next = add.head; - - stat_ptr = old; - - return true; -} - -static void -gldelf32ebmip_place_section (s) - lang_statement_union_type *s; -{ - lang_output_section_statement_type *os; - - if (s->header.type != lang_output_section_statement_enum) - return; - - os = &s->output_section_statement; - - if (strcmp (os->name, hold_section->name) == 0) - hold_use = os; - - if (strcmp (os->name, ".text") == 0) - hold_text = os; - else if (strcmp (os->name, ".rodata") == 0) - hold_rodata = os; - else if (strcmp (os->name, ".data") == 0) - hold_data = os; - else if (strcmp (os->name, ".bss") == 0) - hold_bss = os; - else if (hold_rel == NULL - && os->bfd_section != NULL - && strncmp (os->name, ".rel", 4) == 0) - hold_rel = os; -} - -static char * -gldelf32ebmip_get_script(isfile) - int *isfile; -{ - *isfile = 0; - - if (link_info.relocateable == true && config.build_constructors == true) - return "OUTPUT_FORMAT(\"elf32-bigmips\", \"elf32-bigmips\",\n\ - \"elf32-littlemips\")\n\ -OUTPUT_ARCH(mips)\n\ -ENTRY(_start)\n\ - /* For some reason, the Solaris linker makes bad executables\n\ - if gld -r is used and the intermediate file has sections starting\n\ - at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld\n\ - bug. But for now assigning the zero vmas works. */\n\ -SECTIONS\n\ -{\n\ - /* Read-only sections, merged into text segment: */\n\ - .interp 0 : { *(.interp) }\n\ - .reginfo 0 : { *(.reginfo) }\n\ - .dynamic 0 : { *(.dynamic) }\n\ - .dynstr 0 : { *(.dynstr) }\n\ - .dynsym 0 : { *(.dynsym) }\n\ - .hash 0 : { *(.hash) }\n\ - .rel.text 0 : { *(.rel.text) }\n\ - .rela.text 0 : { *(.rela.text) }\n\ - .rel.data 0 : { *(.rel.data) }\n\ - .rela.data 0 : { *(.rela.data) }\n\ - .rel.rodata 0 : { *(.rel.rodata) }\n\ - .rela.rodata 0 : { *(.rela.rodata) }\n\ - .rel.got 0 : { *(.rel.got) }\n\ - .rela.got 0 : { *(.rela.got) }\n\ - .rel.ctors 0 : { *(.rel.ctors) }\n\ - .rela.ctors 0 : { *(.rela.ctors) }\n\ - .rel.dtors 0 : { *(.rel.dtors) }\n\ - .rela.dtors 0 : { *(.rela.dtors) }\n\ - .rel.init 0 : { *(.rel.init) }\n\ - .rela.init 0 : { *(.rela.init) }\n\ - .rel.fini 0 : { *(.rel.fini) }\n\ - .rela.fini 0 : { *(.rela.fini) }\n\ - .rel.bss 0 : { *(.rel.bss) }\n\ - .rela.bss 0 : { *(.rela.bss) }\n\ - .rel.plt 0 : { *(.rel.plt) }\n\ - .rela.plt 0 : { *(.rela.plt) }\n\ - .rodata 0 : { *(.rodata) }\n\ - .rodata1 0 : { *(.rodata1) }\n\ - .init 0 : { *(.init) } =0\n\ - .text 0 :\n\ - {\n\ - *(.text)\n\ - *(.stub)\n\ - /* .gnu.warning sections are handled specially by elf32.em. */\n\ - *(.gnu.warning)\n\ - } =0\n\ - .fini 0 : { *(.fini) } =0\n\ - /* Adjust the address for the data segment. We want to adjust up to\n\ - the same address within the page on the next page up. It would\n\ - be more correct to do this:\n\ - The current expression does not correctly handle the case of a\n\ - text segment ending precisely at the end of a page; it causes the\n\ - data segment to skip a page. The above expression does not have\n\ - this problem, but it will currently (2/95) cause BFD to allocate\n\ - a single segment, combining both text and data, for this case.\n\ - This will prevent the text segment from being shared among\n\ - multiple executions of the program; I think that is more\n\ - important than losing a page of the virtual address space (note\n\ - that no actual memory is lost; the page which is skipped can not\n\ - be referenced). */\n\ - .data 0 :\n\ - {\n\ - *(.data)\n\ - CONSTRUCTORS\n\ - }\n\ - .data1 0 : { *(.data1) }\n\ - .ctors 0 : { *(.ctors) }\n\ - .dtors 0 : { *(.dtors) }\n\ - .got 0 :\n\ - {\n\ - *(.got.plt) *(.got)\n\ - }\n\ - /* We want the small data sections together, so single-instruction offsets\n\ - can access them all, and initialized data all before uninitialized, so\n\ - we can shorten the on-disk segment size. */\n\ - .sdata 0 : { *(.sdata) }\n\ - .sbss 0 : { *(.sbss) *(.scommon) }\n\ - .bss 0 :\n\ - {\n\ - *(.dynbss)\n\ - *(.bss)\n\ - *(COMMON)\n\ - }\n\ - /* These are needed for ELF backends which have not yet been\n\ - converted to the new style linker. */\n\ - .stab 0 : { *(.stab) }\n\ - .stabstr 0 : { *(.stabstr) }\n\ - /* DWARF debug sections.\n\ - Symbols in the .debug DWARF section are relative to the beginning of the\n\ - section so we begin .debug at 0. It's not clear yet what needs to happen\n\ - for the others. */\n\ - .debug 0 : { *(.debug) }\n\ - .debug_srcinfo 0 : { *(.debug_srcinfo) }\n\ - .debug_aranges 0 : { *(.debug_aranges) }\n\ - .debug_pubnames 0 : { *(.debug_pubnames) }\n\ - .debug_sfnames 0 : { *(.debug_sfnames) }\n\ - .line 0 : { *(.line) }\n\ - /* These must appear regardless of . */\n\ - .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }\n\ - .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }\n\ -}\n\n"; - else if (link_info.relocateable == true) - return "OUTPUT_FORMAT(\"elf32-bigmips\", \"elf32-bigmips\",\n\ - \"elf32-littlemips\")\n\ -OUTPUT_ARCH(mips)\n\ -ENTRY(_start)\n\ - /* For some reason, the Solaris linker makes bad executables\n\ - if gld -r is used and the intermediate file has sections starting\n\ - at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld\n\ - bug. But for now assigning the zero vmas works. */\n\ -SECTIONS\n\ -{\n\ - /* Read-only sections, merged into text segment: */\n\ - .interp 0 : { *(.interp) }\n\ - .reginfo 0 : { *(.reginfo) }\n\ - .dynamic 0 : { *(.dynamic) }\n\ - .dynstr 0 : { *(.dynstr) }\n\ - .dynsym 0 : { *(.dynsym) }\n\ - .hash 0 : { *(.hash) }\n\ - .rel.text 0 : { *(.rel.text) }\n\ - .rela.text 0 : { *(.rela.text) }\n\ - .rel.data 0 : { *(.rel.data) }\n\ - .rela.data 0 : { *(.rela.data) }\n\ - .rel.rodata 0 : { *(.rel.rodata) }\n\ - .rela.rodata 0 : { *(.rela.rodata) }\n\ - .rel.got 0 : { *(.rel.got) }\n\ - .rela.got 0 : { *(.rela.got) }\n\ - .rel.ctors 0 : { *(.rel.ctors) }\n\ - .rela.ctors 0 : { *(.rela.ctors) }\n\ - .rel.dtors 0 : { *(.rel.dtors) }\n\ - .rela.dtors 0 : { *(.rela.dtors) }\n\ - .rel.init 0 : { *(.rel.init) }\n\ - .rela.init 0 : { *(.rela.init) }\n\ - .rel.fini 0 : { *(.rel.fini) }\n\ - .rela.fini 0 : { *(.rela.fini) }\n\ - .rel.bss 0 : { *(.rel.bss) }\n\ - .rela.bss 0 : { *(.rela.bss) }\n\ - .rel.plt 0 : { *(.rel.plt) }\n\ - .rela.plt 0 : { *(.rela.plt) }\n\ - .rodata 0 : { *(.rodata) }\n\ - .rodata1 0 : { *(.rodata1) }\n\ - .init 0 : { *(.init) } =0\n\ - .text 0 :\n\ - {\n\ - *(.text)\n\ - *(.stub)\n\ - /* .gnu.warning sections are handled specially by elf32.em. */\n\ - *(.gnu.warning)\n\ - } =0\n\ - .fini 0 : { *(.fini) } =0\n\ - /* Adjust the address for the data segment. We want to adjust up to\n\ - the same address within the page on the next page up. It would\n\ - be more correct to do this:\n\ - The current expression does not correctly handle the case of a\n\ - text segment ending precisely at the end of a page; it causes the\n\ - data segment to skip a page. The above expression does not have\n\ - this problem, but it will currently (2/95) cause BFD to allocate\n\ - a single segment, combining both text and data, for this case.\n\ - This will prevent the text segment from being shared among\n\ - multiple executions of the program; I think that is more\n\ - important than losing a page of the virtual address space (note\n\ - that no actual memory is lost; the page which is skipped can not\n\ - be referenced). */\n\ - .data 0 :\n\ - {\n\ - *(.data)\n\ - }\n\ - .data1 0 : { *(.data1) }\n\ - .ctors 0 : { *(.ctors) }\n\ - .dtors 0 : { *(.dtors) }\n\ - .got 0 :\n\ - {\n\ - *(.got.plt) *(.got)\n\ - }\n\ - /* We want the small data sections together, so single-instruction offsets\n\ - can access them all, and initialized data all before uninitialized, so\n\ - we can shorten the on-disk segment size. */\n\ - .sdata 0 : { *(.sdata) }\n\ - .sbss 0 : { *(.sbss) *(.scommon) }\n\ - .bss 0 :\n\ - {\n\ - *(.dynbss)\n\ - *(.bss)\n\ - *(COMMON)\n\ - }\n\ - /* These are needed for ELF backends which have not yet been\n\ - converted to the new style linker. */\n\ - .stab 0 : { *(.stab) }\n\ - .stabstr 0 : { *(.stabstr) }\n\ - /* DWARF debug sections.\n\ - Symbols in the .debug DWARF section are relative to the beginning of the\n\ - section so we begin .debug at 0. It's not clear yet what needs to happen\n\ - for the others. */\n\ - .debug 0 : { *(.debug) }\n\ - .debug_srcinfo 0 : { *(.debug_srcinfo) }\n\ - .debug_aranges 0 : { *(.debug_aranges) }\n\ - .debug_pubnames 0 : { *(.debug_pubnames) }\n\ - .debug_sfnames 0 : { *(.debug_sfnames) }\n\ - .line 0 : { *(.line) }\n\ - /* These must appear regardless of . */\n\ - .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }\n\ - .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }\n\ -}\n\n"; - else if (!config.text_read_only) - return "OUTPUT_FORMAT(\"elf32-bigmips\", \"elf32-bigmips\",\n\ - \"elf32-littlemips\")\n\ -OUTPUT_ARCH(mips)\n\ -ENTRY(_start)\n\ - SEARCH_DIR(/usr/local/mips-elf/lib);\n\ -/* Do we need any of these for elf?\n\ - __DYNAMIC = 0; */\n\ -SECTIONS\n\ -{\n\ - /* Read-only sections, merged into text segment: */\n\ - . = 0x0400000;\n\ - .interp : { *(.interp) }\n\ - .reginfo : { *(.reginfo) }\n\ - .dynamic : { *(.dynamic) }\n\ - .dynstr : { *(.dynstr) }\n\ - .dynsym : { *(.dynsym) }\n\ - .hash : { *(.hash) }\n\ - .rel.text : { *(.rel.text) }\n\ - .rela.text : { *(.rela.text) }\n\ - .rel.data : { *(.rel.data) }\n\ - .rela.data : { *(.rela.data) }\n\ - .rel.rodata : { *(.rel.rodata) }\n\ - .rela.rodata : { *(.rela.rodata) }\n\ - .rel.got : { *(.rel.got) }\n\ - .rela.got : { *(.rela.got) }\n\ - .rel.ctors : { *(.rel.ctors) }\n\ - .rela.ctors : { *(.rela.ctors) }\n\ - .rel.dtors : { *(.rel.dtors) }\n\ - .rela.dtors : { *(.rela.dtors) }\n\ - .rel.init : { *(.rel.init) }\n\ - .rela.init : { *(.rela.init) }\n\ - .rel.fini : { *(.rel.fini) }\n\ - .rela.fini : { *(.rela.fini) }\n\ - .rel.bss : { *(.rel.bss) }\n\ - .rela.bss : { *(.rela.bss) }\n\ - .rel.plt : { *(.rel.plt) }\n\ - .rela.plt : { *(.rela.plt) }\n\ - .rodata : { *(.rodata) }\n\ - .rodata1 : { *(.rodata1) }\n\ - .init : { *(.init) } =0\n\ - .text :\n\ - {\n\ - _ftext = . ;\n\ - *(.text)\n\ - *(.stub)\n\ - /* .gnu.warning sections are handled specially by elf32.em. */\n\ - *(.gnu.warning)\n\ - } =0\n\ - _etext = .;\n\ - PROVIDE (etext = .);\n\ - .fini : { *(.fini) } =0\n\ - /* Adjust the address for the data segment. We want to adjust up to\n\ - the same address within the page on the next page up. It would\n\ - be more correct to do this:\n\ - . = .;\n\ - The current expression does not correctly handle the case of a\n\ - text segment ending precisely at the end of a page; it causes the\n\ - data segment to skip a page. The above expression does not have\n\ - this problem, but it will currently (2/95) cause BFD to allocate\n\ - a single segment, combining both text and data, for this case.\n\ - This will prevent the text segment from being shared among\n\ - multiple executions of the program; I think that is more\n\ - important than losing a page of the virtual address space (note\n\ - that no actual memory is lost; the page which is skipped can not\n\ - be referenced). */\n\ - . += . - 0x0400000;\n\ - .data :\n\ - {\n\ - _fdata = . ;\n\ - *(.data)\n\ - CONSTRUCTORS\n\ - }\n\ - .data1 : { *(.data1) }\n\ - .ctors : { *(.ctors) }\n\ - .dtors : { *(.dtors) }\n\ - _gp = ALIGN(16) + 0x7ff0;\n\ - .got :\n\ - {\n\ - *(.got.plt) *(.got)\n\ - }\n\ - /* We want the small data sections together, so single-instruction offsets\n\ - can access them all, and initialized data all before uninitialized, so\n\ - we can shorten the on-disk segment size. */\n\ - .sdata : { *(.sdata) }\n\ - .lit8 : { *(.lit8) }\n\ - .lit4 : { *(.lit4) }\n\ - _edata = .;\n\ - PROVIDE (edata = .);\n\ - __bss_start = .;\n\ - _fbss = .;\n\ - .sbss : { *(.sbss) *(.scommon) }\n\ - .bss :\n\ - {\n\ - *(.dynbss)\n\ - *(.bss)\n\ - *(COMMON)\n\ - }\n\ - _end = . ;\n\ - PROVIDE (end = .);\n\ - /* These are needed for ELF backends which have not yet been\n\ - converted to the new style linker. */\n\ - .stab 0 : { *(.stab) }\n\ - .stabstr 0 : { *(.stabstr) }\n\ - /* DWARF debug sections.\n\ - Symbols in the .debug DWARF section are relative to the beginning of the\n\ - section so we begin .debug at 0. It's not clear yet what needs to happen\n\ - for the others. */\n\ - .debug 0 : { *(.debug) }\n\ - .debug_srcinfo 0 : { *(.debug_srcinfo) }\n\ - .debug_aranges 0 : { *(.debug_aranges) }\n\ - .debug_pubnames 0 : { *(.debug_pubnames) }\n\ - .debug_sfnames 0 : { *(.debug_sfnames) }\n\ - .line 0 : { *(.line) }\n\ - /* These must appear regardless of . */\n\ - .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }\n\ - .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }\n\ -}\n\n"; - else if (!config.magic_demand_paged) - return "OUTPUT_FORMAT(\"elf32-bigmips\", \"elf32-bigmips\",\n\ - \"elf32-littlemips\")\n\ -OUTPUT_ARCH(mips)\n\ -ENTRY(_start)\n\ - SEARCH_DIR(/usr/local/mips-elf/lib);\n\ -/* Do we need any of these for elf?\n\ - __DYNAMIC = 0; */\n\ -SECTIONS\n\ -{\n\ - /* Read-only sections, merged into text segment: */\n\ - . = 0x0400000;\n\ - .interp : { *(.interp) }\n\ - .reginfo : { *(.reginfo) }\n\ - .dynamic : { *(.dynamic) }\n\ - .dynstr : { *(.dynstr) }\n\ - .dynsym : { *(.dynsym) }\n\ - .hash : { *(.hash) }\n\ - .rel.text : { *(.rel.text) }\n\ - .rela.text : { *(.rela.text) }\n\ - .rel.data : { *(.rel.data) }\n\ - .rela.data : { *(.rela.data) }\n\ - .rel.rodata : { *(.rel.rodata) }\n\ - .rela.rodata : { *(.rela.rodata) }\n\ - .rel.got : { *(.rel.got) }\n\ - .rela.got : { *(.rela.got) }\n\ - .rel.ctors : { *(.rel.ctors) }\n\ - .rela.ctors : { *(.rela.ctors) }\n\ - .rel.dtors : { *(.rel.dtors) }\n\ - .rela.dtors : { *(.rela.dtors) }\n\ - .rel.init : { *(.rel.init) }\n\ - .rela.init : { *(.rela.init) }\n\ - .rel.fini : { *(.rel.fini) }\n\ - .rela.fini : { *(.rela.fini) }\n\ - .rel.bss : { *(.rel.bss) }\n\ - .rela.bss : { *(.rela.bss) }\n\ - .rel.plt : { *(.rel.plt) }\n\ - .rela.plt : { *(.rela.plt) }\n\ - .rodata : { *(.rodata) }\n\ - .rodata1 : { *(.rodata1) }\n\ - .init : { *(.init) } =0\n\ - .text :\n\ - {\n\ - _ftext = . ;\n\ - *(.text)\n\ - *(.stub)\n\ - /* .gnu.warning sections are handled specially by elf32.em. */\n\ - *(.gnu.warning)\n\ - } =0\n\ - _etext = .;\n\ - PROVIDE (etext = .);\n\ - .fini : { *(.fini) } =0\n\ - /* Adjust the address for the data segment. We want to adjust up to\n\ - the same address within the page on the next page up. It would\n\ - be more correct to do this:\n\ - . = 0x10000000;\n\ - The current expression does not correctly handle the case of a\n\ - text segment ending precisely at the end of a page; it causes the\n\ - data segment to skip a page. The above expression does not have\n\ - this problem, but it will currently (2/95) cause BFD to allocate\n\ - a single segment, combining both text and data, for this case.\n\ - This will prevent the text segment from being shared among\n\ - multiple executions of the program; I think that is more\n\ - important than losing a page of the virtual address space (note\n\ - that no actual memory is lost; the page which is skipped can not\n\ - be referenced). */\n\ - . += 0x10000000 - 0x0400000;\n\ - .data :\n\ - {\n\ - _fdata = . ;\n\ - *(.data)\n\ - CONSTRUCTORS\n\ - }\n\ - .data1 : { *(.data1) }\n\ - .ctors : { *(.ctors) }\n\ - .dtors : { *(.dtors) }\n\ - _gp = ALIGN(16) + 0x7ff0;\n\ - .got :\n\ - {\n\ - *(.got.plt) *(.got)\n\ - }\n\ - /* We want the small data sections together, so single-instruction offsets\n\ - can access them all, and initialized data all before uninitialized, so\n\ - we can shorten the on-disk segment size. */\n\ - .sdata : { *(.sdata) }\n\ - .lit8 : { *(.lit8) }\n\ - .lit4 : { *(.lit4) }\n\ - _edata = .;\n\ - PROVIDE (edata = .);\n\ - __bss_start = .;\n\ - _fbss = .;\n\ - .sbss : { *(.sbss) *(.scommon) }\n\ - .bss :\n\ - {\n\ - *(.dynbss)\n\ - *(.bss)\n\ - *(COMMON)\n\ - }\n\ - _end = . ;\n\ - PROVIDE (end = .);\n\ - /* These are needed for ELF backends which have not yet been\n\ - converted to the new style linker. */\n\ - .stab 0 : { *(.stab) }\n\ - .stabstr 0 : { *(.stabstr) }\n\ - /* DWARF debug sections.\n\ - Symbols in the .debug DWARF section are relative to the beginning of the\n\ - section so we begin .debug at 0. It's not clear yet what needs to happen\n\ - for the others. */\n\ - .debug 0 : { *(.debug) }\n\ - .debug_srcinfo 0 : { *(.debug_srcinfo) }\n\ - .debug_aranges 0 : { *(.debug_aranges) }\n\ - .debug_pubnames 0 : { *(.debug_pubnames) }\n\ - .debug_sfnames 0 : { *(.debug_sfnames) }\n\ - .line 0 : { *(.line) }\n\ - /* These must appear regardless of . */\n\ - .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }\n\ - .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }\n\ -}\n\n"; - else if (link_info.shared) - return "OUTPUT_FORMAT(\"elf32-bigmips\", \"elf32-bigmips\",\n\ - \"elf32-littlemips\")\n\ -OUTPUT_ARCH(mips)\n\ -ENTRY(_start)\n\ - SEARCH_DIR(/usr/local/mips-elf/lib);\n\ -/* Do we need any of these for elf?\n\ - __DYNAMIC = 0; */\n\ -SECTIONS\n\ -{\n\ - /* Read-only sections, merged into text segment: */\n\ - . = 0x5ffe0000 + SIZEOF_HEADERS;\n\ - .reginfo : { *(.reginfo) }\n\ - .dynamic : { *(.dynamic) }\n\ - .dynstr : { *(.dynstr) }\n\ - .dynsym : { *(.dynsym) }\n\ - .hash : { *(.hash) }\n\ - .rel.text : { *(.rel.text) }\n\ - .rela.text : { *(.rela.text) }\n\ - .rel.data : { *(.rel.data) }\n\ - .rela.data : { *(.rela.data) }\n\ - .rel.rodata : { *(.rel.rodata) }\n\ - .rela.rodata : { *(.rela.rodata) }\n\ - .rel.got : { *(.rel.got) }\n\ - .rela.got : { *(.rela.got) }\n\ - .rel.ctors : { *(.rel.ctors) }\n\ - .rela.ctors : { *(.rela.ctors) }\n\ - .rel.dtors : { *(.rel.dtors) }\n\ - .rela.dtors : { *(.rela.dtors) }\n\ - .rel.init : { *(.rel.init) }\n\ - .rela.init : { *(.rela.init) }\n\ - .rel.fini : { *(.rel.fini) }\n\ - .rela.fini : { *(.rela.fini) }\n\ - .rel.bss : { *(.rel.bss) }\n\ - .rela.bss : { *(.rela.bss) }\n\ - .rel.plt : { *(.rel.plt) }\n\ - .rela.plt : { *(.rela.plt) }\n\ - .rodata : { *(.rodata) }\n\ - .rodata1 : { *(.rodata1) }\n\ - .init : { *(.init) } =0\n\ - .text :\n\ - {\n\ - *(.text)\n\ - *(.stub)\n\ - /* .gnu.warning sections are handled specially by elf32.em. */\n\ - *(.gnu.warning)\n\ - } =0\n\ - .fini : { *(.fini) } =0\n\ - /* Adjust the address for the data segment. We want to adjust up to\n\ - the same address within the page on the next page up. It would\n\ - be more correct to do this:\n\ - . = 0x10000000;\n\ - The current expression does not correctly handle the case of a\n\ - text segment ending precisely at the end of a page; it causes the\n\ - data segment to skip a page. The above expression does not have\n\ - this problem, but it will currently (2/95) cause BFD to allocate\n\ - a single segment, combining both text and data, for this case.\n\ - This will prevent the text segment from being shared among\n\ - multiple executions of the program; I think that is more\n\ - important than losing a page of the virtual address space (note\n\ - that no actual memory is lost; the page which is skipped can not\n\ - be referenced). */\n\ - . += 0x10000;\n\ - .data :\n\ - {\n\ - *(.data)\n\ - CONSTRUCTORS\n\ - }\n\ - .data1 : { *(.data1) }\n\ - .ctors : { *(.ctors) }\n\ - .dtors : { *(.dtors) }\n\ - _gp = ALIGN(16) + 0x7ff0;\n\ - .got :\n\ - {\n\ - *(.got.plt) *(.got)\n\ - }\n\ - /* We want the small data sections together, so single-instruction offsets\n\ - can access them all, and initialized data all before uninitialized, so\n\ - we can shorten the on-disk segment size. */\n\ - .sdata : { *(.sdata) }\n\ - .lit8 : { *(.lit8) }\n\ - .lit4 : { *(.lit4) }\n\ - .sbss : { *(.sbss) *(.scommon) }\n\ - .bss :\n\ - {\n\ - *(.dynbss)\n\ - *(.bss)\n\ - *(COMMON)\n\ - }\n\ - /* These are needed for ELF backends which have not yet been\n\ - converted to the new style linker. */\n\ - .stab 0 : { *(.stab) }\n\ - .stabstr 0 : { *(.stabstr) }\n\ - /* DWARF debug sections.\n\ - Symbols in the .debug DWARF section are relative to the beginning of the\n\ - section so we begin .debug at 0. It's not clear yet what needs to happen\n\ - for the others. */\n\ - .debug 0 : { *(.debug) }\n\ - .debug_srcinfo 0 : { *(.debug_srcinfo) }\n\ - .debug_aranges 0 : { *(.debug_aranges) }\n\ - .debug_pubnames 0 : { *(.debug_pubnames) }\n\ - .debug_sfnames 0 : { *(.debug_sfnames) }\n\ - .line 0 : { *(.line) }\n\ - /* These must appear regardless of . */\n\ - .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }\n\ - .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }\n\ -}\n\n"; - else - return "OUTPUT_FORMAT(\"elf32-bigmips\", \"elf32-bigmips\",\n\ - \"elf32-littlemips\")\n\ -OUTPUT_ARCH(mips)\n\ -ENTRY(_start)\n\ - SEARCH_DIR(/usr/local/mips-elf/lib);\n\ -/* Do we need any of these for elf?\n\ - __DYNAMIC = 0; */\n\ -SECTIONS\n\ -{\n\ - /* Read-only sections, merged into text segment: */\n\ - . = 0x0400000;\n\ - .interp : { *(.interp) }\n\ - .reginfo : { *(.reginfo) }\n\ - .dynamic : { *(.dynamic) }\n\ - .dynstr : { *(.dynstr) }\n\ - .dynsym : { *(.dynsym) }\n\ - .hash : { *(.hash) }\n\ - .rel.text : { *(.rel.text) }\n\ - .rela.text : { *(.rela.text) }\n\ - .rel.data : { *(.rel.data) }\n\ - .rela.data : { *(.rela.data) }\n\ - .rel.rodata : { *(.rel.rodata) }\n\ - .rela.rodata : { *(.rela.rodata) }\n\ - .rel.got : { *(.rel.got) }\n\ - .rela.got : { *(.rela.got) }\n\ - .rel.ctors : { *(.rel.ctors) }\n\ - .rela.ctors : { *(.rela.ctors) }\n\ - .rel.dtors : { *(.rel.dtors) }\n\ - .rela.dtors : { *(.rela.dtors) }\n\ - .rel.init : { *(.rel.init) }\n\ - .rela.init : { *(.rela.init) }\n\ - .rel.fini : { *(.rel.fini) }\n\ - .rela.fini : { *(.rela.fini) }\n\ - .rel.bss : { *(.rel.bss) }\n\ - .rela.bss : { *(.rela.bss) }\n\ - .rel.plt : { *(.rel.plt) }\n\ - .rela.plt : { *(.rela.plt) }\n\ - .rodata : { *(.rodata) }\n\ - .rodata1 : { *(.rodata1) }\n\ - .init : { *(.init) } =0\n\ - .text :\n\ - {\n\ - _ftext = . ;\n\ - *(.text)\n\ - *(.stub)\n\ - /* .gnu.warning sections are handled specially by elf32.em. */\n\ - *(.gnu.warning)\n\ - } =0\n\ - _etext = .;\n\ - PROVIDE (etext = .);\n\ - .fini : { *(.fini) } =0\n\ - /* Adjust the address for the data segment. We want to adjust up to\n\ - the same address within the page on the next page up. It would\n\ - be more correct to do this:\n\ - . = 0x10000000;\n\ - The current expression does not correctly handle the case of a\n\ - text segment ending precisely at the end of a page; it causes the\n\ - data segment to skip a page. The above expression does not have\n\ - this problem, but it will currently (2/95) cause BFD to allocate\n\ - a single segment, combining both text and data, for this case.\n\ - This will prevent the text segment from being shared among\n\ - multiple executions of the program; I think that is more\n\ - important than losing a page of the virtual address space (note\n\ - that no actual memory is lost; the page which is skipped can not\n\ - be referenced). */\n\ - . += 0x10000000 - 0x0400000;\n\ - .data :\n\ - {\n\ - _fdata = . ;\n\ - *(.data)\n\ - CONSTRUCTORS\n\ - }\n\ - .data1 : { *(.data1) }\n\ - .ctors : { *(.ctors) }\n\ - .dtors : { *(.dtors) }\n\ - _gp = ALIGN(16) + 0x7ff0;\n\ - .got :\n\ - {\n\ - *(.got.plt) *(.got)\n\ - }\n\ - /* We want the small data sections together, so single-instruction offsets\n\ - can access them all, and initialized data all before uninitialized, so\n\ - we can shorten the on-disk segment size. */\n\ - .sdata : { *(.sdata) }\n\ - .lit8 : { *(.lit8) }\n\ - .lit4 : { *(.lit4) }\n\ - _edata = .;\n\ - PROVIDE (edata = .);\n\ - __bss_start = .;\n\ - _fbss = .;\n\ - .sbss : { *(.sbss) *(.scommon) }\n\ - .bss :\n\ - {\n\ - *(.dynbss)\n\ - *(.bss)\n\ - *(COMMON)\n\ - }\n\ - _end = . ;\n\ - PROVIDE (end = .);\n\ - /* These are needed for ELF backends which have not yet been\n\ - converted to the new style linker. */\n\ - .stab 0 : { *(.stab) }\n\ - .stabstr 0 : { *(.stabstr) }\n\ - /* DWARF debug sections.\n\ - Symbols in the .debug DWARF section are relative to the beginning of the\n\ - section so we begin .debug at 0. It's not clear yet what needs to happen\n\ - for the others. */\n\ - .debug 0 : { *(.debug) }\n\ - .debug_srcinfo 0 : { *(.debug_srcinfo) }\n\ - .debug_aranges 0 : { *(.debug_aranges) }\n\ - .debug_pubnames 0 : { *(.debug_pubnames) }\n\ - .debug_sfnames 0 : { *(.debug_sfnames) }\n\ - .line 0 : { *(.line) }\n\ - /* These must appear regardless of . */\n\ - .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }\n\ - .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }\n\ -}\n\n"; -} - -struct ld_emulation_xfer_struct ld_elf32ebmip_emulation = -{ - gldelf32ebmip_before_parse, - syslib_default, - hll_default, - after_parse_default, - gldelf32ebmip_after_open, - after_allocation_default, - set_output_arch_default, - ldemul_default_target, - gldelf32ebmip_before_allocation, - gldelf32ebmip_get_script, - "elf32ebmip", - "elf32-bigmips", - NULL, - NULL, - gldelf32ebmip_open_dynamic_archive, - gldelf32ebmip_place_orphan -}; diff -Nur binutils-2.12/ld/mpw-eppcmac.c binutils-2.12.1/ld/mpw-eppcmac.c --- binutils-2.12/ld/mpw-eppcmac.c Wed Sep 19 01:33:33 2001 +++ binutils-2.12.1/ld/mpw-eppcmac.c Wed Dec 31 19:00:00 1969 @@ -1,1224 +0,0 @@ -/* This file is is generated by a shell script. DO NOT EDIT! */ - -/* AIX emulation code for ppcmacos - Copyright 1991, 1993, 1995, 1996, 1997, 2000, 2001 - Free Software Foundation, Inc. - Written by Steve Chamberlain - AIX support by Ian Lance Taylor - -This file is part of GLD, the Gnu Linker. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#define TARGET_IS_ppcmacos - -#include "bfd.h" -#include "sysdep.h" -#include "libiberty.h" -#include "safe-ctype.h" -#include "getopt.h" -#include "bfdlink.h" - -#include "ld.h" -#include "ldmain.h" -#include "ldmisc.h" -#include "ldexp.h" -#include "ldlang.h" -#include "ldctor.h" -#include "ldgram.h" -#include "ldfile.h" -#include "ldemul.h" - -static void gldppcmacos_before_parse PARAMS ((void)); -static int gldppcmacos_parse_args PARAMS ((int, char **)); -static void gldppcmacos_after_open PARAMS ((void)); -static void gldppcmacos_before_allocation PARAMS ((void)); -static void gldppcmacos_read_file PARAMS ((const char *, boolean)); -static void gldppcmacos_free PARAMS ((PTR)); -static void gldppcmacos_find_relocs - PARAMS ((lang_statement_union_type *)); -static void gldppcmacos_find_exp_assignment PARAMS ((etree_type *)); -static char *gldppcmacos_get_script PARAMS ((int *isfile)); - -/* The file alignment required for each section. */ -static unsigned long file_align; - -/* The maximum size the stack is permitted to grow. This is stored in - the a.out header. */ -static unsigned long maxstack; - -/* The maximum data size. This is stored in the a.out header. */ -static unsigned long maxdata; - -/* Whether to perform garbage collection. */ -static int gc = 1; - -/* The module type to use. */ -static unsigned short modtype = ('1' << 8) | 'L'; - -/* Whether the .text section must be read-only (i.e., no relocs - permitted). */ -static int textro; - -/* Whether to implement Unix like linker semantics. */ -static int unix_ld; - -/* Structure used to hold import file list. */ - -struct filelist -{ - struct filelist *next; - const char *name; -}; - -/* List of import files. */ -static struct filelist *import_files; - -/* List of export symbols read from the export files. */ - -struct export_symbol_list -{ - struct export_symbol_list *next; - const char *name; - boolean syscall; -}; - -static struct export_symbol_list *export_symbols; - -/* This routine is called before anything else is done. */ - -static void -gldppcmacos_before_parse() -{ -#ifndef TARGET_ /* I.e., if not generic. */ - ldfile_output_architecture = bfd_arch_powerpc; -#endif /* not TARGET_ */ -} - -/* Handle AIX specific options. */ - -static int -gldppcmacos_parse_args (argc, argv) - int argc; - char **argv; -{ - int prevoptind = optind; - int prevopterr = opterr; - int indx; - int longind; - int optc; - long val; - char *end; - -#define OPTION_IGNORE (300) -#define OPTION_AUTOIMP (OPTION_IGNORE + 1) -#define OPTION_ERNOTOK (OPTION_AUTOIMP + 1) -#define OPTION_EROK (OPTION_ERNOTOK + 1) -#define OPTION_EXPORT (OPTION_EROK + 1) -#define OPTION_IMPORT (OPTION_EXPORT + 1) -#define OPTION_LOADMAP (OPTION_IMPORT + 1) -#define OPTION_MAXDATA (OPTION_LOADMAP + 1) -#define OPTION_MAXSTACK (OPTION_MAXDATA + 1) -#define OPTION_MODTYPE (OPTION_MAXSTACK + 1) -#define OPTION_NOAUTOIMP (OPTION_MODTYPE + 1) -#define OPTION_NOSTRCMPCT (OPTION_NOAUTOIMP + 1) -#define OPTION_PD (OPTION_NOSTRCMPCT + 1) -#define OPTION_PT (OPTION_PD + 1) -#define OPTION_STRCMPCT (OPTION_PT + 1) -#define OPTION_UNIX (OPTION_STRCMPCT + 1) - - static struct option longopts[] = { - {"basis", no_argument, NULL, OPTION_IGNORE}, - {"bautoimp", no_argument, NULL, OPTION_AUTOIMP}, - {"bcomprld", no_argument, NULL, OPTION_IGNORE}, - {"bcrld", no_argument, NULL, OPTION_IGNORE}, - {"bcror31", no_argument, NULL, OPTION_IGNORE}, - {"bD", required_argument, NULL, OPTION_MAXDATA}, - {"bE", required_argument, NULL, OPTION_EXPORT}, - {"bernotok", no_argument, NULL, OPTION_ERNOTOK}, - {"berok", no_argument, NULL, OPTION_EROK}, - {"berrmsg", no_argument, NULL, OPTION_IGNORE}, - {"bexport", required_argument, NULL, OPTION_EXPORT}, - {"bf", no_argument, NULL, OPTION_ERNOTOK}, - {"bgc", no_argument, &gc, 1}, - {"bh", required_argument, NULL, OPTION_IGNORE}, - {"bhalt", required_argument, NULL, OPTION_IGNORE}, - {"bI", required_argument, NULL, OPTION_IMPORT}, - {"bimport", required_argument, NULL, OPTION_IMPORT}, - {"bl", required_argument, NULL, OPTION_LOADMAP}, - {"bloadmap", required_argument, NULL, OPTION_LOADMAP}, - {"bmaxdata", required_argument, NULL, OPTION_MAXDATA}, - {"bmaxstack", required_argument, NULL, OPTION_MAXSTACK}, - {"bM", required_argument, NULL, OPTION_MODTYPE}, - {"bmodtype", required_argument, NULL, OPTION_MODTYPE}, - {"bnoautoimp", no_argument, NULL, OPTION_NOAUTOIMP}, - {"bnodelcsect", no_argument, NULL, OPTION_IGNORE}, - {"bnoentry", no_argument, NULL, OPTION_IGNORE}, - {"bnogc", no_argument, &gc, 0}, - {"bnso", no_argument, NULL, OPTION_NOAUTOIMP}, - {"bnostrcmpct", no_argument, NULL, OPTION_NOSTRCMPCT}, - {"bnotextro", no_argument, &textro, 0}, - {"bnro", no_argument, &textro, 0}, - {"bpD", required_argument, NULL, OPTION_PD}, - {"bpT", required_argument, NULL, OPTION_PT}, - {"bro", no_argument, &textro, 1}, - {"bS", required_argument, NULL, OPTION_MAXSTACK}, - {"bso", no_argument, NULL, OPTION_AUTOIMP}, - {"bstrcmpct", no_argument, NULL, OPTION_STRCMPCT}, - {"btextro", no_argument, &textro, 1}, - {"static", no_argument, NULL, OPTION_NOAUTOIMP}, - {"unix", no_argument, NULL, OPTION_UNIX}, - {NULL, no_argument, NULL, 0} - }; - - /* Options supported by the AIX linker which we do not support: -f, - -S, -v, -Z, -bbindcmds, -bbinder, -bbindopts, -bcalls, -bcaps, - -bcror15, -bdebugopt, -bdbg, -bdelcsect, -bex?, -bfilelist, -bfl, - -bgcbypass, -bglink, -binsert, -bi, -bloadmap, -bl, -bmap, -bnl, - -bnobind, -bnocomprld, -bnocrld, -bnoerrmsg, -bnoglink, - -bnoloadmap, -bnl, -bnoobjreorder, -bnoquiet, -bnoreorder, - -bnotypchk, -bnox, -bquiet, -bR, -brename, -breorder, -btypchk, - -bx, -bX, -bxref. */ - - /* If the current option starts with -b, change the first : to an =. - The AIX linker uses : to separate the option from the argument; - changing it to = lets us treat it as a getopt option. */ - indx = optind; - if (indx == 0) - indx = 1; - if (indx < argc && strncmp (argv[indx], "-b", 2) == 0) - { - char *s; - - for (s = argv[indx]; *s != '\0'; s++) - { - if (*s == ':') - { - *s = '='; - break; - } - } - } - - opterr = 0; - optc = getopt_long_only (argc, argv, "-D:H:KT:z", longopts, &longind); - opterr = prevopterr; - - switch (optc) - { - default: - optind = prevoptind; - return 0; - - case 0: - /* Long option which just sets a flag. */ - break; - - case 'D': - val = strtol (optarg, &end, 0); - if (*end != '\0') - einfo (_("%P: warning: ignoring invalid -D number %s\n"), optarg); - else if (val != -1) - lang_section_start (".data", exp_intop (val)); - break; - - case 'H': - val = strtoul (optarg, &end, 0); - if (*end != '\0' - || (val & (val - 1)) != 0) - einfo (_("%P: warning: ignoring invalid -H number %s\n"), optarg); - else - file_align = val; - break; - - case 'K': - case 'z': - /* FIXME: This should use the page size for the target system. */ - file_align = 4096; - break; - - case 'T': - /* On AIX this is the same as GNU ld -Ttext. When we see -T - number, we assume the AIX option is intended. Otherwise, we - assume the usual GNU ld -T option is intended. We can't just - ignore the AIX option, because gcc passes it to the linker. */ - val = strtoul (optarg, &end, 0); - if (*end != '\0') - { - optind = prevoptind; - return 0; - } - lang_section_start (".text", exp_intop (val)); - break; - - case OPTION_IGNORE: - break; - - case OPTION_AUTOIMP: - link_info.static_link = false; - break; - - case OPTION_ERNOTOK: - force_make_executable = false; - break; - - case OPTION_EROK: - force_make_executable = true; - break; - - case OPTION_EXPORT: - gldppcmacos_read_file (optarg, false); - break; - - case OPTION_IMPORT: - { - struct filelist *n; - struct filelist **flpp; - - n = (struct filelist *) xmalloc (sizeof (struct filelist)); - n->next = NULL; - n->name = optarg; - flpp = &import_files; - while (*flpp != NULL) - flpp = &(*flpp)->next; - *flpp = n; - } - break; - - case OPTION_LOADMAP: - config.map_filename = optarg; - break; - - case OPTION_MAXDATA: - val = strtoul (optarg, &end, 0); - if (*end != '\0') - einfo (_("%P: warning: ignoring invalid -bmaxdata number %s\n"), - optarg); - else - maxdata = val; - break; - - case OPTION_MAXSTACK: - val = strtoul (optarg, &end, 0); - if (*end != '\0') - einfo (_("%P: warning: ignoring invalid -bmaxstack number %s\n"), - optarg); - else - maxstack = val; - break; - - case OPTION_MODTYPE: - if (*optarg == 'S') - { - link_info.shared = true; - ++optarg; - } - if (*optarg == '\0' || optarg[1] == '\0') - einfo (_("%P: warning: ignoring invalid module type %s\n"), optarg); - else - modtype = (*optarg << 8) | optarg[1]; - break; - - case OPTION_NOAUTOIMP: - link_info.static_link = true; - break; - - case OPTION_NOSTRCMPCT: - link_info.traditional_format = true; - break; - - case OPTION_PD: - /* This sets the page that the .data section is supposed to - start on. The offset within the page should still be the - offset within the file, so we need to build an appropriate - expression. */ - val = strtoul (optarg, &end, 0); - if (*end != '\0') - einfo (_("%P: warning: ignoring invalid -pD number %s\n"), optarg); - else - { - etree_type *t; - - t = exp_binop ('+', - exp_intop (val), - exp_binop ('&', - exp_nameop (NAME, "."), - exp_intop (0xfff))); - t = exp_binop ('&', - exp_binop ('+', t, exp_intop (7)), - exp_intop (~ (bfd_vma) 7)); - lang_section_start (".data", t); - } - break; - - case OPTION_PT: - /* This set the page that the .text section is supposed to start - on. The offset within the page should still be the offset - within the file. */ - val = strtoul (optarg, &end, 0); - if (*end != '\0') - einfo (_("%P: warning: ignoring invalid -pT number %s\n"), optarg); - else - { - etree_type *t; - - t = exp_binop ('+', - exp_intop (val), - exp_nameop (SIZEOF_HEADERS, NULL)); - t = exp_binop ('&', - exp_binop ('+', t, exp_intop (7)), - exp_intop (~ (bfd_vma) 7)); - lang_section_start (".text", t); - } - break; - - case OPTION_STRCMPCT: - link_info.traditional_format = false; - break; - - case OPTION_UNIX: - unix_ld = true; - break; - } - - return 1; -} - -/* This is called when an input file can not be recognized as a BFD - object or an archive. If the file starts with #!, we must treat it - as an import file. This is for AIX compatibility. */ - -static boolean -gldppcmacos_unrecognized_file (entry) - lang_input_statement_type *entry; -{ - FILE *e; - boolean ret; - - e = fopen (entry->filename, FOPEN_RT); - if (e == NULL) - return false; - - ret = false; - - if (getc (e) == '#' && getc (e) == '!') - { - struct filelist *n; - struct filelist **flpp; - - n = (struct filelist *) xmalloc (sizeof (struct filelist)); - n->next = NULL; - n->name = entry->filename; - flpp = &import_files; - while (*flpp != NULL) - flpp = &(*flpp)->next; - *flpp = n; - - ret = true; - entry->loaded = true; - } - - fclose (e); - - return ret; -} - -/* This is called after the input files have been opened. */ - -static void -gldppcmacos_after_open () -{ - boolean r; - struct set_info *p; - - /* Call ldctor_build_sets, after pretending that this is a - relocateable link. We do this because AIX requires relocation - entries for all references to symbols, even in a final - executable. Of course, we only want to do this if we are - producing an XCOFF output file. */ - r = link_info.relocateable; - if (strstr (bfd_get_target (output_bfd), "xcoff") != NULL) - link_info.relocateable = true; - ldctor_build_sets (); - link_info.relocateable = r; - - /* For each set, record the size, so that the XCOFF backend can - output the correct csect length. */ - for (p = sets; p != (struct set_info *) NULL; p = p->next) - { - bfd_size_type size; - - /* If the symbol is defined, we may have been invoked from - collect, and the sets may already have been built, so we do - not do anything. */ - if (p->h->type == bfd_link_hash_defined - || p->h->type == bfd_link_hash_defweak) - continue; - - if (p->reloc != BFD_RELOC_CTOR) - { - /* Handle this if we need to. */ - abort (); - } - - size = (p->count + 2) * 4; - if (! bfd_xcoff_link_record_set (output_bfd, &link_info, p->h, size)) - einfo (_("%F%P: bfd_xcoff_link_record_set failed: %E\n")); - } -} - -/* This is called after the sections have been attached to output - sections, but before any sizes or addresses have been set. */ - -static void -gldppcmacos_before_allocation () -{ - struct filelist *fl; - struct export_symbol_list *el; - char *libpath; - asection *special_sections[6]; - int i; - - /* Handle the import and export files, if any. */ - for (fl = import_files; fl != NULL; fl = fl->next) - gldppcmacos_read_file (fl->name, true); - for (el = export_symbols; el != NULL; el = el->next) - { - struct bfd_link_hash_entry *h; - - h = bfd_link_hash_lookup (link_info.hash, el->name, false, false, false); - if (h == NULL) - einfo (_("%P%F: bfd_link_hash_lookup of export symbol failed: %E\n")); - if (! bfd_xcoff_export_symbol (output_bfd, &link_info, h, el->syscall)) - einfo (_("%P%F: bfd_xcoff_export_symbol failed: %E\n")); - } - - /* Track down all relocations called for by the linker script (these - are typically constructor/destructor entries created by - CONSTRUCTORS) and let the backend know it will need to create - .loader relocs for them. */ - lang_for_each_statement (gldppcmacos_find_relocs); - - /* We need to build LIBPATH from the -L arguments. If any -rpath - arguments were used, though, we use -rpath instead, as a GNU - extension. */ - if (command_line.rpath != NULL) - libpath = command_line.rpath; - else if (search_head == NULL) - libpath = (char *) ""; - else - { - size_t len; - search_dirs_type *search; - - len = strlen (search_head->name); - libpath = xmalloc (len + 1); - strcpy (libpath, search_head->name); - for (search = search_head->next; search != NULL; search = search->next) - { - size_t nlen; - - nlen = strlen (search->name); - libpath = xrealloc (libpath, len + nlen + 2); - libpath[len] = ':'; - strcpy (libpath + len + 1, search->name); - len += nlen + 1; - } - } - - /* Let the XCOFF backend set up the .loader section. */ - if (! bfd_xcoff_size_dynamic_sections (output_bfd, &link_info, libpath, - entry_symbol, file_align, - maxstack, maxdata, - gc && ! unix_ld ? true : false, - modtype, - textro ? true : false, - unix_ld, - special_sections)) - einfo (_("%P%F: failed to set dynamic section sizes: %E\n")); - - /* Look through the special sections, and put them in the right - place in the link ordering. This is especially magic. */ - for (i = 0; i < 6; i++) - { - asection *sec; - lang_output_section_statement_type *os; - lang_statement_union_type **pls; - lang_input_section_type *is; - const char *oname; - boolean start; - - sec = special_sections[i]; - if (sec == NULL) - continue; - - /* Remove this section from the list of the output section. - This assumes we know what the script looks like. */ - is = NULL; - os = lang_output_section_find (sec->output_section->name); - if (os == NULL) - einfo (_("%P%F: can't find output section %s\n"), - sec->output_section->name); - for (pls = &os->children.head; *pls != NULL; pls = &(*pls)->header.next) - { - if ((*pls)->header.type == lang_input_section_enum - && (*pls)->input_section.section == sec) - { - is = (lang_input_section_type *) *pls; - *pls = (*pls)->header.next; - break; - } - if ((*pls)->header.type == lang_wild_statement_enum) - { - lang_statement_union_type **pwls; - - for (pwls = &(*pls)->wild_statement.children.head; - *pwls != NULL; - pwls = &(*pwls)->header.next) - { - if ((*pwls)->header.type == lang_input_section_enum - && (*pwls)->input_section.section == sec) - { - is = (lang_input_section_type *) *pwls; - *pwls = (*pwls)->header.next; - break; - } - } - if (is != NULL) - break; - } - } - - if (is == NULL) - einfo (_("%P%F: can't find %s in output section\n"), - bfd_get_section_name (sec->owner, sec)); - - /* Now figure out where the section should go. */ - switch (i) - { - default: /* to avoid warnings */ - case 0: - /* _text */ - oname = ".text"; - start = true; - break; - case 1: - /* _etext */ - oname = ".text"; - start = false; - break; - case 2: - /* _data */ - oname = ".data"; - start = true; - break; - case 3: - /* _edata */ - oname = ".data"; - start = false; - break; - case 4: - case 5: - /* _end and end */ - oname = ".bss"; - start = false; - break; - } - - os = lang_output_section_find (oname); - - if (start) - { - is->header.next = os->children.head; - os->children.head = (lang_statement_union_type *) is; - } - else - { - is->header.next = NULL; - lang_statement_append (&os->children, - (lang_statement_union_type *) is, - &is->header.next); - } - } -} - -/* Read an import or export file. For an import file, this is called - by the before_allocation emulation routine. For an export file, - this is called by the parse_args emulation routine. */ - -static void -gldppcmacos_read_file (filename, import) - const char *filename; - boolean import; -{ - struct obstack *o; - FILE *f; - int lineno; - int c; - boolean keep; - const char *imppath; - const char *impfile; - const char *impmember; - - o = (struct obstack *) xmalloc (sizeof (struct obstack)); - obstack_specify_allocation (o, 0, 0, xmalloc, gldppcmacos_free); - - f = fopen (filename, FOPEN_RT); - if (f == NULL) - { - bfd_set_error (bfd_error_system_call); - einfo ("%F%s: %E\n", filename); - } - - keep = false; - - imppath = NULL; - impfile = NULL; - impmember = NULL; - - lineno = 0; - while ((c = getc (f)) != EOF) - { - char *s; - char *symname; - boolean syscall; - bfd_vma address; - struct bfd_link_hash_entry *h; - - if (c != '\n') - { - obstack_1grow (o, c); - continue; - } - - obstack_1grow (o, '\0'); - ++lineno; - - s = (char *) obstack_base (o); - while (ISSPACE (*s)) - ++s; - if (*s == '\0' - || *s == '*' - || (*s == '#' && s[1] == ' ') - || (! import && *s == '#' && s[1] == '!')) - { - obstack_free (o, obstack_base (o)); - continue; - } - - if (*s == '#' && s[1] == '!') - { - s += 2; - while (ISSPACE (*s)) - ++s; - if (*s == '\0') - { - imppath = NULL; - impfile = NULL; - impmember = NULL; - obstack_free (o, obstack_base (o)); - } - else if (*s == '(') - einfo (_("%F%s%d: #! ([member]) is not supported in import files\n"), - filename, lineno); - else - { - char cs; - char *file; - - (void) obstack_finish (o); - keep = true; - imppath = s; - file = NULL; - while (! ISSPACE (*s) && *s != '(' && *s != '\0') - { - if (*s == '/') - file = s + 1; - ++s; - } - if (file != NULL) - { - file[-1] = '\0'; - impfile = file; - if (imppath == file - 1) - imppath = "/"; - } - else - { - impfile = imppath; - imppath = ""; - } - cs = *s; - *s = '\0'; - while (ISSPACE (cs)) - { - ++s; - cs = *s; - } - if (cs != '(') - { - impmember = ""; - if (cs != '\0') - einfo (_("%s:%d: warning: syntax error in import file\n"), - filename, lineno); - } - else - { - ++s; - impmember = s; - while (*s != ')' && *s != '\0') - ++s; - if (*s == ')') - *s = '\0'; - else - einfo (_("%s:%d: warning: syntax error in import file\n"), - filename, lineno); - } - } - - continue; - } - - /* This is a symbol to be imported or exported. */ - symname = s; - syscall = false; - address = (bfd_vma) -1; - - while (! ISSPACE (*s) && *s != '\0') - ++s; - if (*s != '\0') - { - char *se; - - *s++ = '\0'; - - while (ISSPACE (*s)) - ++s; - - se = s; - while (! ISSPACE (*se) && *se != '\0') - ++se; - if (*se != '\0') - { - *se++ = '\0'; - while (ISSPACE (*se)) - ++se; - if (*se != '\0') - einfo (_("%s%d: warning: syntax error in import/export file\n"), - filename, lineno); - } - - if (strcasecmp (s, "svc") == 0 - || strcasecmp (s, "syscall") == 0) - syscall = true; - else - { - char *end; - - address = strtoul (s, &end, 0); - if (*end != '\0') - einfo (_("%s:%d: warning: syntax error in import/export file\n"), - filename, lineno); - } - } - - if (! import) - { - struct export_symbol_list *n; - - ldlang_add_undef (symname); - n = ((struct export_symbol_list *) - xmalloc (sizeof (struct export_symbol_list))); - n->next = export_symbols; - n->name = xstrdup (symname); - n->syscall = syscall; - export_symbols = n; - } - else - { - h = bfd_link_hash_lookup (link_info.hash, symname, false, false, - true); - if (h == NULL || h->type == bfd_link_hash_new) - { - /* We can just ignore attempts to import an unreferenced - symbol. */ - } - else - { - if (! bfd_xcoff_import_symbol (output_bfd, &link_info, h, - address, imppath, impfile, - impmember)) - einfo (_("%X%s:%d: failed to import symbol %s: %E\n"), - filename, lineno, symname); - } - } - - obstack_free (o, obstack_base (o)); - } - - if (obstack_object_size (o) > 0) - { - einfo (_("%s:%d: warning: ignoring unterminated last line\n"), - filename, lineno); - obstack_free (o, obstack_base (o)); - } - - if (! keep) - { - obstack_free (o, NULL); - free (o); - } -} - -/* This routine saves us from worrying about declaring free. */ - -static void -gldppcmacos_free (p) - PTR p; -{ - free (p); -} - -/* This is called by the before_allocation routine via - lang_for_each_statement. It looks for relocations and assignments - to symbols. */ - -static void -gldppcmacos_find_relocs (s) - lang_statement_union_type *s; -{ - if (s->header.type == lang_reloc_statement_enum) - { - lang_reloc_statement_type *rs; - - rs = &s->reloc_statement; - if (rs->name == NULL) - einfo (_("%F%P: only relocations against symbols are permitted\n")); - if (! bfd_xcoff_link_count_reloc (output_bfd, &link_info, rs->name)) - einfo (_("%F%P: bfd_xcoff_link_count_reloc failed: %E\n")); - } - - if (s->header.type == lang_assignment_statement_enum) - gldppcmacos_find_exp_assignment (s->assignment_statement.exp); -} - -/* Look through an expression for an assignment statement. */ - -static void -gldppcmacos_find_exp_assignment (exp) - etree_type *exp; -{ - struct bfd_link_hash_entry *h; - - switch (exp->type.node_class) - { - case etree_provide: - h = bfd_link_hash_lookup (link_info.hash, exp->assign.dst, - false, false, false); - if (h == NULL) - break; - /* Fall through. */ - case etree_assign: - if (strcmp (exp->assign.dst, ".") != 0) - { - if (! bfd_xcoff_record_link_assignment (output_bfd, &link_info, - exp->assign.dst)) - einfo (_("%P%F: failed to record assignment to %s: %E\n"), - exp->assign.dst); - } - gldppcmacos_find_exp_assignment (exp->assign.src); - break; - - case etree_binary: - gldppcmacos_find_exp_assignment (exp->binary.lhs); - gldppcmacos_find_exp_assignment (exp->binary.rhs); - break; - - case etree_trinary: - gldppcmacos_find_exp_assignment (exp->trinary.cond); - gldppcmacos_find_exp_assignment (exp->trinary.lhs); - gldppcmacos_find_exp_assignment (exp->trinary.rhs); - break; - - case etree_unary: - gldppcmacos_find_exp_assignment (exp->unary.child); - break; - - default: - break; - } -} - -static char * -gldppcmacos_get_script(isfile) - int *isfile; -{ - *isfile = 0; - - if (link_info.relocateable == true && config.build_constructors == true) - return -"OUTPUT_FORMAT(\"xcoff-powermac\")\n\ -OUTPUT_ARCH(powerpc)\n\ -ENTRY(__start)\n\ -SECTIONS\n\ -{\n\ - .pad 0 : { *(.pad) }\n\ - .text 0 : {\n\ - *(.text)\n\ - *(.pr)\n\ - *(.ro)\n\ - *(.db)\n\ - *(.gl)\n\ - *(.xo)\n\ - *(.ti)\n\ - *(.tb)\n\ - }\n\ - .data 0 : {\n\ - *(.data)\n\ - *(.rw)\n\ - *(.sv)\n\ - *(.ua)\n\ - . = ALIGN(4);\n\ - CONSTRUCTORS\n\ - *(.ds)\n\ - *(.tc0)\n\ - *(.tc)\n\ - *(.td)\n\ - }\n\ - .bss : {\n\ - *(.bss)\n\ - *(.bs)\n\ - *(.uc)\n\ - *(COMMON)\n\ - }\n\ - .loader 0 : {\n\ - *(.loader)\n\ - }\n\ - .debug 0 : {\n\ - *(.debug)\n\ - }\n\ -}\n\n" - ; else if (link_info.relocateable == true) return -"OUTPUT_FORMAT(\"xcoff-powermac\")\n\ -OUTPUT_ARCH(powerpc)\n\ -ENTRY(__start)\n\ -SECTIONS\n\ -{\n\ - .pad 0 : { *(.pad) }\n\ - .text 0 : {\n\ - *(.text)\n\ - *(.pr)\n\ - *(.ro)\n\ - *(.db)\n\ - *(.gl)\n\ - *(.xo)\n\ - *(.ti)\n\ - *(.tb)\n\ - }\n\ - .data 0 : {\n\ - *(.data)\n\ - *(.rw)\n\ - *(.sv)\n\ - *(.ua)\n\ - . = ALIGN(4);\n\ - *(.ds)\n\ - *(.tc0)\n\ - *(.tc)\n\ - *(.td)\n\ - }\n\ - .bss : {\n\ - *(.bss)\n\ - *(.bs)\n\ - *(.uc)\n\ - *(COMMON)\n\ - }\n\ - .loader 0 : {\n\ - *(.loader)\n\ - }\n\ - .debug 0 : {\n\ - *(.debug)\n\ - }\n\ -}\n\n" - ; else if (!config.text_read_only) return -"OUTPUT_FORMAT(\"xcoff-powermac\")\n\ -OUTPUT_ARCH(powerpc)\n\ - SEARCH_DIR(/usr/local/powerpc-apple-macos/lib);\n\ -ENTRY(__start)\n\ -SECTIONS\n\ -{\n\ - .pad 0 : { *(.pad) }\n\ - .text : {\n\ - PROVIDE (_text = .);\n\ - *(.text)\n\ - *(.pr)\n\ - *(.ro)\n\ - *(.db)\n\ - *(.gl)\n\ - *(.xo)\n\ - *(.ti)\n\ - *(.tb)\n\ - PROVIDE (_etext = .);\n\ - }\n\ - .data 0 : {\n\ - PROVIDE (_data = .);\n\ - *(.data)\n\ - *(.rw)\n\ - *(.sv)\n\ - *(.ua)\n\ - . = ALIGN(4);\n\ - CONSTRUCTORS\n\ - *(.ds)\n\ - *(.tc0)\n\ - *(.tc)\n\ - *(.td)\n\ - PROVIDE (_edata = .);\n\ - }\n\ - .bss : {\n\ - *(.bss)\n\ - *(.bs)\n\ - *(.uc)\n\ - *(COMMON)\n\ - PROVIDE (_end = .);\n\ - PROVIDE (end = .);\n\ - }\n\ - .loader 0 : {\n\ - *(.loader)\n\ - }\n\ - .debug 0 : {\n\ - *(.debug)\n\ - }\n\ -}\n\n" - ; else if (!config.magic_demand_paged) return -"OUTPUT_FORMAT(\"xcoff-powermac\")\n\ -OUTPUT_ARCH(powerpc)\n\ - SEARCH_DIR(/usr/local/powerpc-apple-macos/lib);\n\ -ENTRY(__start)\n\ -SECTIONS\n\ -{\n\ - .pad 0 : { *(.pad) }\n\ - .text : {\n\ - PROVIDE (_text = .);\n\ - *(.text)\n\ - *(.pr)\n\ - *(.ro)\n\ - *(.db)\n\ - *(.gl)\n\ - *(.xo)\n\ - *(.ti)\n\ - *(.tb)\n\ - PROVIDE (_etext = .);\n\ - }\n\ - .data 0 : {\n\ - PROVIDE (_data = .);\n\ - *(.data)\n\ - *(.rw)\n\ - *(.sv)\n\ - *(.ua)\n\ - . = ALIGN(4);\n\ - CONSTRUCTORS\n\ - *(.ds)\n\ - *(.tc0)\n\ - *(.tc)\n\ - *(.td)\n\ - PROVIDE (_edata = .);\n\ - }\n\ - .bss : {\n\ - *(.bss)\n\ - *(.bs)\n\ - *(.uc)\n\ - *(COMMON)\n\ - PROVIDE (_end = .);\n\ - PROVIDE (end = .);\n\ - }\n\ - .loader 0 : {\n\ - *(.loader)\n\ - }\n\ - .debug 0 : {\n\ - *(.debug)\n\ - }\n\ -}\n\n" - ; else return -"OUTPUT_FORMAT(\"xcoff-powermac\")\n\ -OUTPUT_ARCH(powerpc)\n\ - SEARCH_DIR(/usr/local/powerpc-apple-macos/lib);\n\ -ENTRY(__start)\n\ -SECTIONS\n\ -{\n\ - .pad 0 : { *(.pad) }\n\ - .text : {\n\ - PROVIDE (_text = .);\n\ - *(.text)\n\ - *(.pr)\n\ - *(.ro)\n\ - *(.db)\n\ - *(.gl)\n\ - *(.xo)\n\ - *(.ti)\n\ - *(.tb)\n\ - PROVIDE (_etext = .);\n\ - }\n\ - .data 0 : {\n\ - PROVIDE (_data = .);\n\ - *(.data)\n\ - *(.rw)\n\ - *(.sv)\n\ - *(.ua)\n\ - . = ALIGN(4);\n\ - CONSTRUCTORS\n\ - *(.ds)\n\ - *(.tc0)\n\ - *(.tc)\n\ - *(.td)\n\ - PROVIDE (_edata = .);\n\ - }\n\ - .bss : {\n\ - *(.bss)\n\ - *(.bs)\n\ - *(.uc)\n\ - *(COMMON)\n\ - PROVIDE (_end = .);\n\ - PROVIDE (end = .);\n\ - }\n\ - .loader 0 : {\n\ - *(.loader)\n\ - }\n\ - .debug 0 : {\n\ - *(.debug)\n\ - }\n\ -}\n\n" -; } - -struct ld_emulation_xfer_struct ld_ppcmacos_emulation = -{ - gldppcmacos_before_parse, - syslib_default, - hll_default, - after_parse_default, - gldppcmacos_after_open, - after_allocation_default, - set_output_arch_default, - ldemul_default_target, - gldppcmacos_before_allocation, - gldppcmacos_get_script, - "ppcmacos", - "xcoff-powermac", - 0, /* finish */ - 0, /* create_output_section_statements */ - 0, /* open_dynamic_archive */ - 0, /* place_orphan */ - 0, /* set_symbols */ - gldppcmacos_parse_args, - gldppcmacos_unrecognized_file -}; diff -Nur binutils-2.12/ld/mpw-esh.c binutils-2.12.1/ld/mpw-esh.c --- binutils-2.12/ld/mpw-esh.c Tue Mar 13 01:14:27 2001 +++ binutils-2.12.1/ld/mpw-esh.c Wed Dec 31 19:00:00 1969 @@ -1,318 +0,0 @@ -/* This file is is generated by a shell script. DO NOT EDIT! */ - -/* emulate the original gld for the given sh - Copyright 1991, 1993, 1995, 2000 Free Software Foundation, Inc. - Written by Steve Chamberlain steve@cygnus.com - -This file is part of GLD, the Gnu Linker. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#define TARGET_IS_sh - -#include "libiberty.h" -#include "bfd.h" -#include "sysdep.h" -#include "bfdlink.h" - -#include "ld.h" -#include "ldmain.h" -#include "ldmisc.h" - -#include "ldexp.h" -#include "ldlang.h" -#include "ldfile.h" -#include "ldemul.h" - -static void gldsh_before_parse PARAMS ((void)); -static char *gldsh_get_script PARAMS ((int *isfile)); - -static void -gldsh_before_parse() -{ -#ifndef TARGET_ /* I.e., if not generic. */ - ldfile_output_architecture = bfd_arch_sh; -#endif /* not TARGET_ */ -} - -static char * -gldsh_get_script(isfile) - int *isfile; -{ - *isfile = 0; - - if (link_info.relocateable == true && config.build_constructors == true) - return -concat( -"OUTPUT_FORMAT(\"coff-sh\")\n\ -OUTPUT_ARCH(sh)\n\ -MEMORY\n\ -{\n\ - ram : o = 0x1000, l = 512k\n\ -}\n\ - "," SECTIONS\n\ -{\n\ - "," .text :\n\ - {\n\ - *(.text)\n\ - *(.strings)\n\ - } \n\ - .tors :\n\ - {\n\ - ___ctors = . ;\n\ - *(.ctors)\n\ - ___ctors_end = . ;\n\ - ___dtors = . ;\n\ - *(.dtors)\n\ - ___dtors_end = . ;\n\ - } \n\ - "," .data :\n\ - {\n\ - *(.data)\n\ - } \n\ - "," .bss :\n\ - {\n\ - *(.bss)\n\ - *(COMMON)\n\ - } \n\ - "," .stack :\n\ - {\n\ - *(.stack)\n\ - } \n\ - "," .stab 0 :\n\ - {\n\ - *(.stab)\n\ - }\n\ - "," .stabstr 0 :\n\ - {\n\ - *(.stabstr)\n\ - }\n\ -}\n\n", NULL) - ; else if (link_info.relocateable == true) return -concat ( -"OUTPUT_FORMAT(\"coff-sh\")\n\ -OUTPUT_ARCH(sh)\n\ - "," MEMORY\n\ -{\n\ - ram : o = 0x1000, l = 512k\n\ -}\n\ - "," SECTIONS\n\ -{\n\ - "," .text :\n\ - {\n\ - *(.text)\n\ - *(.strings)\n\ - } \n\ - "," .tors :\n\ - {\n\ - ___ctors = . ;\n\ - *(.ctors)\n\ - ___ctors_end = . ;\n\ - ___dtors = . ;\n\ - *(.dtors)\n\ - ___dtors_end = . ;\n\ - } \n\ - "," .data :\n\ - {\n\ - *(.data)\n\ - } \n\ - "," .bss :\n\ - {\n\ - *(.bss)\n\ - *(COMMON)\n\ - } \n\ - "," .stack :\n\ - {\n\ - *(.stack)\n\ - } \n\ - "," .stab 0 :\n\ - {\n\ - *(.stab)\n\ - }\n\ - "," .stabstr 0 :\n\ - {\n\ - *(.stabstr)\n\ - }\n\ -}\n\n", NULL) - ; else if (!config.text_read_only) return -concat ( -"OUTPUT_FORMAT(\"coff-sh\")\n\ -OUTPUT_ARCH(sh)\n\ -MEMORY\n\ -{\n\ - ram : o = 0x1000, l = 512k\n\ -}\n\ -SECTIONS\n\ -{\n\ - "," .text :\n\ - {\n\ - *(.text)\n\ - *(.strings)\n\ - _etext = . ; \n\ - } > ram\n\ - "," .tors :\n\ - {\n\ - ___ctors = . ;\n\ - *(.ctors)\n\ - ___ctors_end = . ;\n\ - ___dtors = . ;\n\ - *(.dtors)\n\ - ___dtors_end = . ;\n\ - } > ram\n\ - "," .data :\n\ - {\n\ - *(.data)\n\ - _edata = . ; \n\ - } > ram\n\ - "," .bss :\n\ - {\n\ - _bss_start = . ; \n\ - *(.bss)\n\ - *(COMMON)\n\ - _end = . ; \n\ - } > ram\n\ - "," .stack 0x30000 :\n\ - {\n\ - _stack = . ; \n\ - *(.stack)\n\ - } > ram\n\ - "," .stab 0 (NOLOAD) :\n\ - {\n\ - *(.stab)\n\ - }\n\ - "," .stabstr 0 (NOLOAD) :\n\ - {\n\ - *(.stabstr)\n\ - }\n\ -}\n\n", NULL) - ; else if (!config.magic_demand_paged) return -concat ( -"OUTPUT_FORMAT(\"coff-sh\")\n\ -OUTPUT_ARCH(sh)\n\ -MEMORY\n\ -{\n\ - ram : o = 0x1000, l = 512k\n\ -}\n\ -SECTIONS\n\ -{\n\ - "," .text :\n\ - {\n\ - *(.text)\n\ - *(.strings)\n\ - _etext = . ; \n\ - } > ram\n\ - "," .tors :\n\ - {\n\ - ___ctors = . ;\n\ - *(.ctors)\n\ - ___ctors_end = . ;\n\ - ___dtors = . ;\n\ - *(.dtors)\n\ - ___dtors_end = . ;\n\ - } > ram\n\ - "," .data :\n\ - {\n\ - *(.data)\n\ - _edata = . ; \n\ - } > ram\n\ - "," .bss :\n\ - {\n\ - _bss_start = . ; \n\ - *(.bss)\n\ - *(COMMON)\n\ - _end = . ; \n\ - } > ram\n\ - "," .stack 0x30000 :\n\ - {\n\ - _stack = . ; \n\ - *(.stack)\n\ - } > ram\n\ - "," .stab 0 (NOLOAD) :\n\ - {\n\ - *(.stab)\n\ - }\n\ - "," .stabstr 0 (NOLOAD) :\n\ - {\n\ - *(.stabstr)\n\ - }\n\ -}\n\n", NULL) - ; else return -concat ( -"OUTPUT_FORMAT(\"coff-sh\")\n\ -OUTPUT_ARCH(sh)\n\ -MEMORY\n\ -{\n\ - ram : o = 0x1000, l = 512k\n\ -}\n\ -SECTIONS\n\ -{\n\ - "," .text :\n\ - {\n\ - *(.text)\n\ - *(.strings)\n\ - _etext = . ; \n\ - } > ram\n\ - "," .tors :\n\ - {\n\ - ___ctors = . ;\n\ - *(.ctors)\n\ - ___ctors_end = . ;\n\ - ___dtors = . ;\n\ - *(.dtors)\n\ - ___dtors_end = . ;\n\ - } > ram\n\ - "," .data :\n\ - {\n\ - *(.data)\n\ - _edata = . ; \n\ - } > ram\n\ - "," .bss :\n\ - {\n\ - _bss_start = . ; \n\ - *(.bss)\n\ - *(COMMON)\n\ - _end = . ; \n\ - } > ram\n\ - "," .stack 0x30000 :\n\ - {\n\ - _stack = . ; \n\ - *(.stack)\n\ - } > ram\n\ - "," .stab 0 (NOLOAD) :\n\ - {\n\ - *(.stab)\n\ - }\n\ - "," .stabstr 0 (NOLOAD) :\n\ - {\n\ - *(.stabstr)\n\ - }\n\ -}\n\n", NULL) -; } - -struct ld_emulation_xfer_struct ld_sh_emulation = -{ - gldsh_before_parse, - syslib_default, - hll_default, - after_parse_default, - after_open_default, - after_allocation_default, - set_output_arch_default, - ldemul_default_target, - before_allocation_default, - gldsh_get_script, - "sh", - "coff-sh" -}; diff -Nur binutils-2.12/ld/mpw-idtmips.c binutils-2.12.1/ld/mpw-idtmips.c --- binutils-2.12/ld/mpw-idtmips.c Tue Mar 13 01:14:27 2001 +++ binutils-2.12.1/ld/mpw-idtmips.c Wed Dec 31 19:00:00 1969 @@ -1,433 +0,0 @@ -/* This file is is generated by a shell script. DO NOT EDIT! */ - -/* Handle embedded relocs for MIPS. - Copyright 1994, 1997, 2000 Free Software Foundation, Inc. - Written by Ian Lance Taylor based on generic.em. - -This file is part of GLD, the Gnu Linker. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#define TARGET_IS_mipsidt - -#include "libiberty.h" -#include "bfd.h" -#include "sysdep.h" -#include "bfdlink.h" - -#include "ld.h" -#include "ldmain.h" -#include "ldmisc.h" - -#include "ldexp.h" -#include "ldlang.h" -#include "ldfile.h" -#include "ldemul.h" - -static void gldmipsidt_before_parse PARAMS ((void)); -static void gldmipsidt_after_open PARAMS ((void)); -static void check_sections PARAMS ((bfd *, asection *, PTR)); -static void gldmipsidt_after_allocation PARAMS ((void)); -static char *gldmipsidt_get_script PARAMS ((int *isfile)); - -static void -gldmipsidt_before_parse() -{ -#ifndef TARGET_ /* I.e., if not generic. */ - ldfile_output_architecture = bfd_arch_mips; -#endif /* not TARGET_ */ -} - -/* This function is run after all the input files have been opened. - We create a .rel.sdata section for each input file with a non zero - .sdata section. The BFD backend will fill in these sections with - magic numbers which can be used to relocate the data section at run - time. This will only do the right thing if all the input files - have been compiled using -membedded-pic. */ - -static void -gldmipsidt_after_open () -{ - bfd *abfd; - - if (! command_line.embedded_relocs - || link_info.relocateable) - return; - - for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next) - { - asection *datasec; - - datasec = bfd_get_section_by_name (abfd, ".sdata"); - - /* Note that we assume that the reloc_count field has already - been set up. We could call bfd_get_reloc_upper_bound, but - that returns the size of a memory buffer rather than a reloc - count. We do not want to call bfd_canonicalize_reloc, - because although it would always work it would force us to - read in the relocs into BFD canonical form, which would waste - a significant amount of time and memory. */ - if (datasec != NULL && datasec->reloc_count > 0) - { - asection *relsec; - - relsec = bfd_make_section (abfd, ".rel.sdata"); - if (relsec == NULL - || ! bfd_set_section_flags (abfd, relsec, - (SEC_ALLOC - | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY)) - || ! bfd_set_section_alignment (abfd, relsec, 2) - || ! bfd_set_section_size (abfd, relsec, - datasec->reloc_count * 4)) - einfo (_("%F%B: can not create .rel.sdata section: %E\n")); - } - - /* Double check that all other data sections are empty, as is - required for embedded PIC code. */ - bfd_map_over_sections (abfd, check_sections, (PTR) datasec); - } -} - -/* Check that of the data sections, only the .sdata section has - relocs. This is called via bfd_map_over_sections. */ - -static void -check_sections (abfd, sec, sdatasec) - bfd *abfd; - asection *sec; - PTR sdatasec; -{ - if ((bfd_get_section_flags (abfd, sec) & SEC_CODE) == 0 - && sec != (asection *) sdatasec - && sec->reloc_count != 0) - einfo (_("%F%X: section %s has relocs; can not use --embedded-relocs\n"), - abfd, bfd_get_section_name (abfd, sec)); -} - -/* This function is called after the section sizes and offsets have - been set. If we are generating embedded relocs, it calls a special - BFD backend routine to do the work. */ - -static void -gldmipsidt_after_allocation () -{ - bfd *abfd; - - if (! command_line.embedded_relocs - || link_info.relocateable) - return; - - for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next) - { - asection *datasec, *relsec; - char *errmsg; - - datasec = bfd_get_section_by_name (abfd, ".sdata"); - - if (datasec == NULL || datasec->reloc_count == 0) - continue; - - relsec = bfd_get_section_by_name (abfd, ".rel.sdata"); - ASSERT (relsec != NULL); - - if (! bfd_mips_ecoff_create_embedded_relocs (abfd, &link_info, - datasec, relsec, - &errmsg)) - { - if (errmsg == NULL) - einfo (_("%B%X: can not create runtime reloc information: %E\n"), - abfd); - else - einfo (_("%X%B: can not create runtime reloc information: %s\n"), - abfd, errmsg); - } - } -} - -static char * -gldmipsidt_get_script(isfile) - int *isfile; -{ - *isfile = 0; - - if (link_info.relocateable == true && config.build_constructors == true) - return -concat( -"OUTPUT_FORMAT(\"ecoff-bigmips\", \"ecoff-bigmips\",\n\ - \"ecoff-littlemips\")\n\ - SEARCH_DIR(/usr/local/mips-idt-ecoff/lib);\n\ -ENTRY(start)\n\ -SECTIONS\n\ -{\n\ - .text : {\n\ - ;\n\ - *(.init)\n\ - ;\n\ - *(.text)\n\ - *(.rel.sdata)\n\ - *(.fini)\n\ - ;\n\ - ;\n\ - }\n\ - "," .rdata : {\n\ - *(.rdata)\n\ - }\n\ - .data : {\n\ - *(.data)\n\ - CONSTRUCTORS\n\ - }\n\ - .lit8 : {\n\ - *(.lit8)\n\ - }\n\ - .lit4 : {\n\ - *(.lit4)\n\ - }\n\ - "," .sdata : {\n\ - *(.sdata)\n\ - }\n\ - .sbss : {\n\ - *(.sbss)\n\ - *(.scommon)\n\ - }\n\ - .bss : {\n\ - *(.bss)\n\ - *(COMMON)\n\ - }\n\ -}\n\n", NULL) - ; else if (link_info.relocateable == true) return -"OUTPUT_FORMAT(\"ecoff-bigmips\", \"ecoff-bigmips\",\n\ - \"ecoff-littlemips\")\n\ - SEARCH_DIR(/usr/local/mips-idt-ecoff/lib);\n\ -ENTRY(start)\n\ -SECTIONS\n\ -{\n\ - .text : {\n\ - ;\n\ - *(.init)\n\ - ;\n\ - *(.text)\n\ - *(.rel.sdata)\n\ - *(.fini)\n\ - ;\n\ - ;\n\ - }\n\ - .rdata : {\n\ - *(.rdata)\n\ - }\n\ - .data : {\n\ - *(.data)\n\ - }\n\ - .lit8 : {\n\ - *(.lit8)\n\ - }\n\ - .lit4 : {\n\ - *(.lit4)\n\ - }\n\ - .sdata : {\n\ - *(.sdata)\n\ - }\n\ - .sbss : {\n\ - *(.sbss)\n\ - *(.scommon)\n\ - }\n\ - .bss : {\n\ - *(.bss)\n\ - *(COMMON)\n\ - }\n\ -}\n\n" - ; else if (!config.text_read_only) return -concat( -"OUTPUT_FORMAT(\"ecoff-bigmips\", \"ecoff-bigmips\",\n\ - \"ecoff-littlemips\")\n\ - SEARCH_DIR(/usr/local/mips-idt-ecoff/lib);\n\ -ENTRY(start)\n\ -SECTIONS\n\ -{\n\ - . = 0xa0012000;\n\ - .text : {\n\ - _ftext = . ;\n\ - *(.init)\n\ - eprol = .;\n\ - *(.text)\n\ - PROVIDE (__runtime_reloc_start = .);\n\ - *(.rel.sdata)\n\ - PROVIDE (__runtime_reloc_stop = .);\n\ - *(.fini)\n\ - etext = .;\n\ - _etext = .;\n\ -"," }\n\ - . = .;\n\ - .rdata : {\n\ - *(.rdata)\n\ - }\n\ - _fdata = ALIGN(16);\n\ - .data : {\n\ - *(.data)\n\ - CONSTRUCTORS\n\ - }\n\ - _gp = ALIGN(16) + 0x8000;\n\ - .lit8 : {\n\ - *(.lit8)\n\ - }\n\ - .lit4 : {\n\ - *(.lit4)\n\ - }\n\ - .sdata : {\n\ - *(.sdata)\n\ - }\n\ -"," edata = .;\n\ - _edata = .;\n\ - _fbss = .;\n\ - .sbss : {\n\ - *(.sbss)\n\ - *(.scommon)\n\ - }\n\ - .bss : {\n\ - *(.bss)\n\ - *(COMMON)\n\ - }\n\ - end = .;\n\ - _end = .;\n\ -}\n\n" -, NULL) - ; else if (!config.magic_demand_paged) return -concat ( -"OUTPUT_FORMAT(\"ecoff-bigmips\", \"ecoff-bigmips\",\n\ - \"ecoff-littlemips\")\n\ - SEARCH_DIR(/usr/local/mips-idt-ecoff/lib);\n\ -ENTRY(start)\n\ -SECTIONS\n\ -{\n\ - . = 0xa0012000;\n\ - .text : {\n\ - _ftext = . ;\n\ - *(.init)\n\ - eprol = .;\n\ - *(.text)\n\ - PROVIDE (__runtime_reloc_start = .);\n\ - *(.rel.sdata)\n\ - PROVIDE (__runtime_reloc_stop = .);\n\ - *(.fini)\n\ - etext = .;\n\ - _etext = .;\n\ - "," }\n\ - . = .;\n\ - .rdata : {\n\ - *(.rdata)\n\ - }\n\ - _fdata = ALIGN(16);\n\ - .data : {\n\ - *(.data)\n\ - CONSTRUCTORS\n\ - }\n\ - _gp = ALIGN(16) + 0x8000;\n\ - .lit8 : {\n\ - *(.lit8)\n\ - "," }\n\ - .lit4 : {\n\ - *(.lit4)\n\ - }\n\ - .sdata : {\n\ - *(.sdata)\n\ - }\n\ - edata = .;\n\ - _edata = .;\n\ - _fbss = .;\n\ - .sbss : {\n\ - *(.sbss)\n\ - *(.scommon)\n\ - "," }\n\ - .bss : {\n\ - *(.bss)\n\ - *(COMMON)\n\ - }\n\ - end = .;\n\ - _end = .;\n\ -}\n\n" -, NULL) - ; else return -concat ( -"OUTPUT_FORMAT(\"ecoff-bigmips\", \"ecoff-bigmips\",\n\ - \"ecoff-littlemips\")\n\ - SEARCH_DIR(/usr/local/mips-idt-ecoff/lib);\n\ -ENTRY(start)\n\ -SECTIONS\n\ -{\n\ - . = 0xa0012000;\n\ - .text : {\n\ - _ftext = . ;\n\ - *(.init)\n\ - eprol = .;\n\ - *(.text)\n\ - PROVIDE (__runtime_reloc_start = .);\n\ - *(.rel.sdata)\n\ - PROVIDE (__runtime_reloc_stop = .);\n\ - *(.fini)\n\ - etext = .;\n\ - _etext = .;\n\ - "," }\n\ - . = .;\n\ - .rdata : {\n\ - *(.rdata)\n\ - }\n\ - _fdata = ALIGN(16);\n\ - .data : {\n\ - *(.data)\n\ - CONSTRUCTORS\n\ - }\n\ - _gp = ALIGN(16) + 0x8000;\n\ - .lit8 : {\n\ - *(.lit8)\n\ - }\n\ - .lit4 : {\n\ - *(.lit4)\n\ - "," }\n\ - .sdata : {\n\ - *(.sdata)\n\ - }\n\ - edata = .;\n\ - _edata = .;\n\ - _fbss = .;\n\ - .sbss : {\n\ - *(.sbss)\n\ - *(.scommon)\n\ - }\n\ - .bss : {\n\ - *(.bss)\n\ - *(COMMON)\n\ - }\n\ - end = .;\n\ - _end = .;\n\ -}\n\n" -, NULL) -; } - -struct ld_emulation_xfer_struct ld_mipsidt_emulation = -{ - gldmipsidt_before_parse, - syslib_default, - hll_default, - after_parse_default, - gldmipsidt_after_open, - gldmipsidt_after_allocation, - set_output_arch_default, - ldemul_default_target, - before_allocation_default, - gldmipsidt_get_script, - "mipsidt", - "ecoff-bigmips" -}; diff -Nur binutils-2.12/ld/scripttempl/elf.sc binutils-2.12.1/ld/scripttempl/elf.sc --- binutils-2.12/ld/scripttempl/elf.sc Thu Dec 13 06:09:34 2001 +++ binutils-2.12.1/ld/scripttempl/elf.sc Mon Apr 1 20:29:24 2002 @@ -272,6 +272,23 @@ ${CREATE_SHLIB-${RELOCATING+. = ${DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}} ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}} + /* Ensure the __preinit_array_start label is properly aligned. We + could instead move the label definition inside the section, but + the linker would then create the section even if it turns out to + be empty, which isn't pretty. */ + ${RELOCATING+. = ALIGN(${ALIGNMENT});} + ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_start = .);}} + .preinit_array ${RELOCATING-0} : { *(.preinit_array) } + ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_end = .);}} + + ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_start = .);}} + .init_array ${RELOCATING-0} : { *(.init_array) } + ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_end = .);}} + + ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_start = .);}} + .fini_array ${RELOCATING-0} : { *(.fini_array) } + ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_end = .);}} + .data ${RELOCATING-0} : { ${RELOCATING+${DATA_START_SYMBOLS}} diff -Nur binutils-2.12/ld/testsuite/ChangeLog binutils-2.12.1/ld/testsuite/ChangeLog --- binutils-2.12/ld/testsuite/ChangeLog Mon Feb 18 18:25:52 2002 +++ binutils-2.12.1/ld/testsuite/ChangeLog Thu May 9 10:52:01 2002 @@ -1,3 +1,31 @@ +2002-04-27 Alan Modra + + Merge from mainline + 2002-03-19 Hans-Peter Nilsson + * ld-mmix/bpo-1.d: Tweak for type of linker-script-symbols no + longer set to object. + * ld-mmix/undef-3.d, ld-mmix/start-1.d, ld-mmix/locto-1.d, + ld-mmix/loct-1.d, ld-mmix/locdo-1.d, ld-mmix/local7.d, + ld-mmix/local5.d, ld-mmix/local3.d, ld-mmix/local1.d, + ld-mmix/loc6.d, ld-mmix/loc4.d, ld-mmix/loc3.d, ld-mmix/loc2.d, + ld-mmix/loc1.d, ld-mmix/greg-7.d, ld-mmix/greg-6.d, + ld-mmix/greg-5.d, ld-mmix/greg-4.d, ld-mmix/greg-3.d, + ld-mmix/greg-2.d, ld-mmix/greg-19.d, ld-mmix/greg-1.d, + ld-mmix/bspec2.d, ld-mmix/bspec1.d, ld-mmix/bpo-9.d, + ld-mmix/bpo-6.d, ld-mmix/bpo-5.d, ld-mmix/bpo-4.d, + ld-mmix/bpo-3.d, ld-mmix/bpo-2.d, ld-mmix/bpo-19.d, + ld-mmix/bpo-18.d, ld-mmix/bpo-17.d, ld-mmix/bpo-16.d, + ld-mmix/bpo-14.d, ld-mmix/bpo-11.d, ld-mmix/bpo-10.d: Ditto. + + 2002-03-11 Andreas Jaeger + * ld-elfweak/strongdata.sym: Allow bss section for GCC 3.2 that + places zero initialized data in the bss. + * ld-elfweak/lddsodata.dsym: Likewise. + +2002-04-06 Hans-Peter Nilsson + + * ld-cris/libdso-2.d, ld-cris/dso-2.s, ld-cris/hide1: New test. + 2002-02-18 Daniel Jacobowitz * ld-elfvsb/sh1.c: Fix typo in last change. diff -Nur binutils-2.12/ld/testsuite/ld-cris/dso-2.s binutils-2.12.1/ld/testsuite/ld-cris/dso-2.s --- binutils-2.12/ld/testsuite/ld-cris/dso-2.s Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/ld/testsuite/ld-cris/dso-2.s Fri Apr 5 19:09:55 2002 @@ -0,0 +1,6 @@ + .text + .global export_1 + .type export_1,@function +export_1: + jump [$r1+dsofn:GOTPLT16] + jump [$r1+dsofn:GOTPLT] diff -Nur binutils-2.12/ld/testsuite/ld-cris/hide1 binutils-2.12.1/ld/testsuite/ld-cris/hide1 --- binutils-2.12/ld/testsuite/ld-cris/hide1 Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/ld/testsuite/ld-cris/hide1 Fri Apr 5 19:09:55 2002 @@ -0,0 +1 @@ +TST1 { global: export_*; local: *; }; diff -Nur binutils-2.12/ld/testsuite/ld-cris/libdso-2.d binutils-2.12.1/ld/testsuite/ld-cris/libdso-2.d --- binutils-2.12/ld/testsuite/ld-cris/libdso-2.d Wed Dec 31 19:00:00 1969 +++ binutils-2.12.1/ld/testsuite/ld-cris/libdso-2.d Fri Apr 5 19:09:55 2002 @@ -0,0 +1,75 @@ +#source: dso-1.s +#source: dso-2.s +#as: --pic --no-underscore +#ld: --shared -m crislinux --version-script $srcdir/$subdir/hide1 +#readelf: -S -s -r + +# Use "dsofn" from dso-1 in a GOTPLT reloc, but hide it in a +# version script. This will change the incoming GOTPLT reloc to +# instead be a (local) GOT reloc. There are no other .rela.got +# entries. This formerly SEGV:ed because .rela.got was created +# too late to have it mapped to an output section. + +There are 15 section headers.* +#... + \[ 1\] \.hash HASH [0-9a-f]+ [0-9a-f]+ 00004c 04 A 2 0 4 + \[ 2\] \.dynsym DYNSYM [0-9a-f]+ [0-9a-f]+ 0000e0 10 A 3 c 4 + \[ 3\] \.dynstr STRTAB [0-9a-f]+ [0-9a-f]+ 000014 00 A 0 0 1 + \[ 4\] \.gnu\.version VERSYM [0-9a-f]+ [0-9a-f]+ 00001c 02 A 2 0 2 + \[ 5\] \.gnu\.version_d VERDEF [0-9a-f]+ [0-9a-f]+ 000038 00 A 3 2 4 + \[ 6\] \.rela\.got RELA [0-9a-f]+ [0-9a-f]+ 00000c 0c A 2 a 4 + \[ 7\] \.text PROGBITS [0-9a-f]+ [0-9a-f]+ 000014 00 AX 0 0 1 + \[ 8\] \.data PROGBITS [0-9a-f]+ [0-9a-f]+ 000000 00 WA 0 0 1 + \[ 9\] \.dynamic DYNAMIC [0-9a-f]+ [0-9a-f]+ 000088 08 WA 3 0 4 + \[10\] \.got PROGBITS [0-9a-f]+ [0-9a-f]+ 000010 04 WA 0 0 4 + \[11\] \.bss NOBITS [0-9a-f]+ [0-9a-f]+ 000008 00 WA 0 0 1 + \[12\] \.shstrtab STRTAB [0-9a-f]+ [0-9a-f]+ 000071 00 0 0 1 + \[13\] \.symtab SYMTAB [0-9a-f]+ [0-9a-f]+ 000170 10 14 15 4 + \[14\] \.strtab STRTAB [0-9a-f]+ [0-9a-f]+ 00004c 00 0 0 1 +#... +Relocation section '\.rela\.got' at offset 0x[0-9a-f]+ contains 1 entries: +#... +000022f4 0000000c R_CRIS_RELATIVE 00000234 +#... +Symbol table '\.dynsym' contains 14 entries: + Num: Value Size Type Bind Vis Ndx Name + 0: 0+ 0 NOTYPE LOCAL DEFAULT UND + 1: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 1 + 2: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 2 + 3: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 3 + 4: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 4 + 5: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 5 + 6: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 6 + 7: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 7 + 8: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 8 + 9: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 9 + 10: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 10 + 11: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 11 + 12: 0+ 0 OBJECT GLOBAL DEFAULT ABS TST1 + 13: 0+238 0 FUNC GLOBAL DEFAULT 7 export_1@@TST1 + +Symbol table '\.symtab' contains 23 entries: + Num: Value Size Type Bind Vis Ndx Name + 0: 0+ 0 NOTYPE LOCAL DEFAULT UND + 1: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 1 + 2: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 2 + 3: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 3 + 4: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 4 + 5: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 5 + 6: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 6 + 7: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 7 + 8: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 8 + 9: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 9 + 10: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 10 + 11: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 11 + 12: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 12 + 13: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 13 + 14: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 14 + 15: 0+2260 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC + 16: 0+22f8 0 NOTYPE LOCAL DEFAULT ABS __bss_start + 17: 0+22f8 0 NOTYPE LOCAL DEFAULT ABS _edata + 18: 0+22e8 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ + 19: 0+2300 0 NOTYPE LOCAL DEFAULT ABS _end + 20: 0+234 0 FUNC LOCAL DEFAULT 7 dsofn + 21: 0+ 0 OBJECT GLOBAL DEFAULT ABS TST1 + 22: 0+238 0 FUNC GLOBAL DEFAULT 7 export_1 diff -Nur binutils-2.12/ld/testsuite/ld-elfweak/dsodata.dsym binutils-2.12.1/ld/testsuite/ld-elfweak/dsodata.dsym --- binutils-2.12/ld/testsuite/ld-elfweak/dsodata.dsym Tue Sep 25 16:24:00 2001 +++ binutils-2.12.1/ld/testsuite/ld-elfweak/dsodata.dsym Thu May 9 10:52:02 2002 @@ -1,2 +1,2 @@ -[0-9a-f]*[ ]+g[ ]+DO[ ]+.(s|)data[ ]+[0-9a-f]*[ ]+(Base[ ]+|[ ]*)deallocate_foo +[0-9a-f]*[ ]+g[ ]+DO[ ]+.(s|)(data|bss)[ ]+[0-9a-f]*[ ]+(Base[ ]+|[ ]*)deallocate_foo [0-9a-f]*[ ]+g[ ]+DF[ ]+.text[ ]+[0-9a-f]*[ ]+(Base[ ]+|[ ]*)(0x[0-9a-f]*|)[ ]*foo diff -Nur binutils-2.12/ld/testsuite/ld-elfweak/strongdata.sym binutils-2.12.1/ld/testsuite/ld-elfweak/strongdata.sym --- binutils-2.12/ld/testsuite/ld-elfweak/strongdata.sym Tue Sep 25 16:24:00 2001 +++ binutils-2.12.1/ld/testsuite/ld-elfweak/strongdata.sym Thu May 9 10:52:02 2002 @@ -1,2 +1,2 @@ -[0-9a-f]*[ ]+g[ ]+O[ ]+.(s|)data[ ]+[0-9a-f]*[ ]+deallocate_foo +[0-9a-f]*[ ]+g[ ]+O[ ]+.(s|)(data|bss)[ ]+[0-9a-f]*[ ]+deallocate_foo [0-9a-f]*[ ]+g[ ]+F[ ]+.text[ ]+[0-9a-f]*[ ]+(0x[0-9a-f]*|)[ ]*foo diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bpo-1.d binutils-2.12.1/ld/testsuite/ld-mmix/bpo-1.d --- binutils-2.12/ld/testsuite/ld-mmix/bpo-1.d Fri Feb 1 03:30:12 2002 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bpo-1.d Thu May 9 10:52:02 2002 @@ -19,11 +19,7 @@ 0+ l d \*ABS\* 0+ 0+4 l \.text 0+ x 0+ g \.text 0+ _start -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+ g O \.text 0+ _start\. - +#... Contents of section \.text: 0000 e3fd0001 232afe00 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bpo-10.d binutils-2.12.1/ld/testsuite/ld-mmix/bpo-10.d --- binutils-2.12/ld/testsuite/ld-mmix/bpo-10.d Fri Feb 1 03:30:12 2002 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bpo-10.d Thu May 9 10:52:02 2002 @@ -21,10 +21,10 @@ 0+ l \.init 0+ _start 0+ g \*ABS\* 0+ 0+ g \*ABS\* 0+ -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+4 g O \.text 0+ _start\. +2000000000000000 g \*ABS\* 0+ __bss_start +2000000000000000 g \*ABS\* 0+ _edata +2000000000000000 g \*ABS\* 0+ _end +0+4 g \.text 0+ _start\. Contents of section \.init: 0000 e37704a6 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bpo-11.d binutils-2.12.1/ld/testsuite/ld-mmix/bpo-11.d --- binutils-2.12/ld/testsuite/ld-mmix/bpo-11.d Fri Feb 1 03:30:12 2002 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bpo-11.d Thu May 9 10:52:02 2002 @@ -22,11 +22,11 @@ 0+ l \.init 0+ _start 0+14 g \.text 0+ x 0+10 g \.text 0+ x2 -2000000000000000 g O \*ABS\* 0+ __bss_start +2000000000000000 g \*ABS\* 0+ __bss_start 0+ g \*ABS\* 0+ -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+10 g O \.text 0+ _start\. +2000000000000000 g \*ABS\* 0+ _edata +2000000000000000 g \*ABS\* 0+ _end +0+10 g \.text 0+ _start\. Contents of section \.init: diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bpo-14.d binutils-2.12.1/ld/testsuite/ld-mmix/bpo-14.d --- binutils-2.12/ld/testsuite/ld-mmix/bpo-14.d Fri Feb 1 03:30:12 2002 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bpo-14.d Thu May 9 10:52:02 2002 @@ -20,10 +20,7 @@ 0+ l d \*ABS\* 0+ 0+ g \.text 0+ _start 0+8 g \.text 0+ areg -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+ g O \.text 0+ _start\. +#... Contents of section \.text: 0000 e3fd0001 234dfe00 fd040810 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bpo-16.d binutils-2.12.1/ld/testsuite/ld-mmix/bpo-16.d --- binutils-2.12/ld/testsuite/ld-mmix/bpo-16.d Fri Feb 1 03:30:12 2002 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bpo-16.d Thu May 9 10:52:02 2002 @@ -21,10 +21,7 @@ 0+ l d \*ABS\* 0+ 0+ g \.text 0+ _start 0+c g \.text 0+ areg -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+ g O \.text 0+ _start\. +#... Contents of section \.text: 0000 e3fd0001 234dfe00 234dfe00 fd040810 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bpo-17.d binutils-2.12.1/ld/testsuite/ld-mmix/bpo-17.d --- binutils-2.12/ld/testsuite/ld-mmix/bpo-17.d Fri Feb 1 03:30:12 2002 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bpo-17.d Thu May 9 10:52:02 2002 @@ -20,10 +20,7 @@ 0+ l d \*ABS\* 0+ 0+ g \.text 0+ _start 0+10 g \.text 0+ areg -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+ g O \.text 0+ _start\. +#... Contents of section \.text: 0000 e3fd0001 2336fe00 00000000 0000000c .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bpo-18.d binutils-2.12.1/ld/testsuite/ld-mmix/bpo-18.d --- binutils-2.12/ld/testsuite/ld-mmix/bpo-18.d Sun Feb 3 23:38:53 2002 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bpo-18.d Thu May 9 10:52:02 2002 @@ -20,7 +20,7 @@ 0+ l d \*ABS\* 0+ 4000000000001064 l \.text\.away 0+ x 0+100 g \.text 0+ x -4000000000001060 g O \.text\.away 0+ Main +4000000000001060 g \.text\.away 0+ Main 0+104 g \.text 0+ x2 4000000000001060 g \.text\.away 0+ _start 4000000000001068 g \.text\.away 0+ y diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bpo-19.d binutils-2.12.1/ld/testsuite/ld-mmix/bpo-19.d --- binutils-2.12/ld/testsuite/ld-mmix/bpo-19.d Sun Feb 3 23:38:53 2002 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bpo-19.d Thu May 9 10:52:02 2002 @@ -20,10 +20,7 @@ 0+ l d \*ABS\* 0+ 0+37c l \*ABS\* 0+ i 0+ g \.text 0+ _start -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+ g O \.text 0+ _start\. +#... Contents of section \.text: 0000 e3fd0001 230b2000 230b2040 230b2080 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bpo-2.d binutils-2.12.1/ld/testsuite/ld-mmix/bpo-2.d --- binutils-2.12/ld/testsuite/ld-mmix/bpo-2.d Fri Feb 1 03:30:12 2002 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bpo-2.d Thu May 9 10:52:02 2002 @@ -21,10 +21,7 @@ 0+4 l \.text 0+ x 0+ g \.text 0+ _start 0+fe g \*REG\* 0+ areg -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+ g O \.text 0+ _start\. +#... Contents of section \.text: 0000 e3fd0001 232afd00 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bpo-3.d binutils-2.12.1/ld/testsuite/ld-mmix/bpo-3.d --- binutils-2.12/ld/testsuite/ld-mmix/bpo-3.d Fri Feb 1 03:30:12 2002 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bpo-3.d Thu May 9 10:52:02 2002 @@ -20,11 +20,9 @@ 0+ l d \*ABS\* 0+ 0+4 l \.text 0+ x 0+ g \.text 0+ _start -2000000000000000 g O \*ABS\* 0+ __bss_start +#... 0+8 g \.text 0+ y -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+ g O \.text 0+ _start\. +#... Contents of section \.text: 0000 e3fd0001 232afe1e 2321fe00 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bpo-4.d binutils-2.12.1/ld/testsuite/ld-mmix/bpo-4.d --- binutils-2.12/ld/testsuite/ld-mmix/bpo-4.d Fri Feb 1 03:30:12 2002 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bpo-4.d Thu May 9 10:52:02 2002 @@ -22,10 +22,7 @@ 0+8 l \.text 0+ x 0+ g \.text 0+ _start 0+fe g \*REG\* 0+ areg -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+ g O \.text 0+ _start\. +#... Contents of section \.text: 0000 e3fd0001 8f79fd00 232afc00 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bpo-5.d binutils-2.12.1/ld/testsuite/ld-mmix/bpo-5.d --- binutils-2.12/ld/testsuite/ld-mmix/bpo-5.d Fri Feb 1 03:30:12 2002 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bpo-5.d Thu May 9 10:52:02 2002 @@ -21,11 +21,9 @@ 0+ l d \*ABS\* 0+ 0+4 l \.text 0+ x 0+ g \.text 0+ _start -2000000000000000 g O \*ABS\* 0+ __bss_start +#... 0+c g \.text 0+ y -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+ g O \.text 0+ _start\. +#... Contents of section \.text: 0000 e3fd0001 232afd1a 8f79fe00 2321fd00 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bpo-6.d binutils-2.12.1/ld/testsuite/ld-mmix/bpo-6.d --- binutils-2.12/ld/testsuite/ld-mmix/bpo-6.d Fri Feb 1 03:30:12 2002 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bpo-6.d Thu May 9 10:52:02 2002 @@ -19,10 +19,7 @@ 0+ l d \*ABS\* 0+ 0+df l \*ABS\* 0+ i 0+ g \.text 0+ _start -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+ g O \.text 0+ _start\. +#... Contents of section \.text: 0000 e3fd0001 230b2000 230b2100 230b2200 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bpo-9.d binutils-2.12.1/ld/testsuite/ld-mmix/bpo-9.d --- binutils-2.12/ld/testsuite/ld-mmix/bpo-9.d Fri Feb 1 03:30:12 2002 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bpo-9.d Thu May 9 10:52:02 2002 @@ -21,10 +21,7 @@ 0+ l \.init 0+ _start 0+14 g \.text 0+ x 0+10 g \.text 0+ x2 -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+10 g O \.text 0+ _start\. +#... Contents of section \.init: 0000 00000000 0000003d 00000000 0000003a .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bspec1.d binutils-2.12.1/ld/testsuite/ld-mmix/bspec1.d --- binutils-2.12/ld/testsuite/ld-mmix/bspec1.d Tue Oct 30 10:20:13 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bspec1.d Thu May 9 10:52:02 2002 @@ -46,10 +46,7 @@ 8: 0+ 0 SECTION LOCAL DEFAULT 8 9: 0+ 0 FUNC GLOBAL DEFAULT 1 Main 10: 0+ 0 NOTYPE GLOBAL DEFAULT 1 _start - 11: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS __bss_start - 12: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _edata - 13: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _end - 14: 0+ 0 OBJECT GLOBAL DEFAULT 1 _start\. +#... Hex dump of section '\.text': 0x0+ e3fd0001 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/bspec2.d binutils-2.12.1/ld/testsuite/ld-mmix/bspec2.d --- binutils-2.12/ld/testsuite/ld-mmix/bspec2.d Tue Oct 30 10:20:13 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/bspec2.d Thu May 9 10:52:02 2002 @@ -53,10 +53,7 @@ 10: 0+ 0 FUNC GLOBAL DEFAULT 1 Main 11: 0+fc 0 NOTYPE GLOBAL DEFAULT ABS ext1 12: 0+ 0 NOTYPE GLOBAL DEFAULT 1 _start - 13: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS __bss_start - 14: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _edata - 15: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _end - 16: 0+ 0 OBJECT GLOBAL DEFAULT 1 _start\. +#... Hex dump of section '\.text': 0x0+ e3fd0001 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/greg-1.d binutils-2.12.1/ld/testsuite/ld-mmix/greg-1.d --- binutils-2.12/ld/testsuite/ld-mmix/greg-1.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/greg-1.d Thu May 9 10:52:02 2002 @@ -20,10 +20,7 @@ 0+ l d \*ABS\* 0+ 0+c g \.text 0+ _start 0+fe g \*REG\* 0+ areg -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+c g O \.text 0+ _start\. +#... Disassembly of section \.text: diff -Nur binutils-2.12/ld/testsuite/ld-mmix/greg-19.d binutils-2.12.1/ld/testsuite/ld-mmix/greg-19.d --- binutils-2.12/ld/testsuite/ld-mmix/greg-19.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/greg-19.d Thu May 9 10:52:02 2002 @@ -18,10 +18,7 @@ 0+ g F \.text 0+ Main 0+ g \.text 0+ _start 0+fe g \*REG\* 0+ areg -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+ g O \.text 0+ _start\. +#... Contents of section \.text: 0+ e3fd0001 8f03fe10 8e0307fe 8f05fe04 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/greg-2.d binutils-2.12.1/ld/testsuite/ld-mmix/greg-2.d --- binutils-2.12/ld/testsuite/ld-mmix/greg-2.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/greg-2.d Thu May 9 10:52:02 2002 @@ -26,10 +26,7 @@ 0+20 g \.text 0+ _start 0+fc g \*REG\* 0+ areg 0+fd g \*REG\* 0+ c -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+20 g O \.text 0+ _start\. +#... 0+1c g \.text 0+ a Disassembly of section \.text: diff -Nur binutils-2.12/ld/testsuite/ld-mmix/greg-3.d binutils-2.12.1/ld/testsuite/ld-mmix/greg-3.d --- binutils-2.12/ld/testsuite/ld-mmix/greg-3.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/greg-3.d Thu May 9 10:52:02 2002 @@ -24,10 +24,7 @@ 0+ l d \*ABS\* 0+ 0+10 g \.text 0+ _start 0+fe g \*REG\* 0+ areg -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+10 g O \.text 0+ _start\. +#... 0+14 g \.text 0+ a Disassembly of section \.text: diff -Nur binutils-2.12/ld/testsuite/ld-mmix/greg-4.d binutils-2.12.1/ld/testsuite/ld-mmix/greg-4.d --- binutils-2.12/ld/testsuite/ld-mmix/greg-4.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/greg-4.d Thu May 9 10:52:02 2002 @@ -21,10 +21,7 @@ 0+ l d \*ABS\* 0+ 0+18 g \.text 0+ _start 0+fe g \*REG\* 0+ areg -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+18 g O \.text 0+ _start\. +#... 0+1c g \.text 0+ a Disassembly of section \.text: diff -Nur binutils-2.12/ld/testsuite/ld-mmix/greg-5.d binutils-2.12.1/ld/testsuite/ld-mmix/greg-5.d --- binutils-2.12/ld/testsuite/ld-mmix/greg-5.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/greg-5.d Thu May 9 10:52:02 2002 @@ -21,10 +21,7 @@ 0+ l d \*ABS\* 0+ 0+14 g \.text 0+ _start 0+fe g \*REG\* 0+ areg -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+14 g O \.text 0+ _start\. +#... 0+18 g \.text 0+ a Disassembly of section \.text: diff -Nur binutils-2.12/ld/testsuite/ld-mmix/greg-6.d binutils-2.12.1/ld/testsuite/ld-mmix/greg-6.d --- binutils-2.12/ld/testsuite/ld-mmix/greg-6.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/greg-6.d Thu May 9 10:52:02 2002 @@ -271,10 +271,10 @@ 0+fd l \*REG\* 0+ lsym 0+14 g \.text 0+ _start 0+fe g \*REG\* 0+ areg -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+14 g O \.text 0+ _start\. +2000000000000000 g \*ABS\* 0+ __bss_start +2000000000000000 g \*ABS\* 0+ _edata +2000000000000000 g \*ABS\* 0+ _end +0+14 g \.text 0+ _start\. 0+10 g \.text 0+ a Disassembly of section \.text: diff -Nur binutils-2.12/ld/testsuite/ld-mmix/greg-7.d binutils-2.12.1/ld/testsuite/ld-mmix/greg-7.d --- binutils-2.12/ld/testsuite/ld-mmix/greg-7.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/greg-7.d Thu May 9 10:52:02 2002 @@ -271,10 +271,10 @@ 0+fe l \*REG\* 0+ lsym 0+14 g \.text 0+ _start 0+20 g \*REG\* 0+ areg -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+14 g O \.text 0+ _start\. +2000000000000000 g \*ABS\* 0+ __bss_start +2000000000000000 g \*ABS\* 0+ _edata +2000000000000000 g \*ABS\* 0+ _end +0+14 g \.text 0+ _start\. 0+10 g \.text 0+ a Disassembly of section \.text: diff -Nur binutils-2.12/ld/testsuite/ld-mmix/loc1.d binutils-2.12.1/ld/testsuite/ld-mmix/loc1.d --- binutils-2.12/ld/testsuite/ld-mmix/loc1.d Wed Oct 31 00:42:51 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/loc1.d Thu May 9 10:52:02 2002 @@ -16,10 +16,10 @@ 0+ l d \*ABS\* 0+ 0+1000 g \.text 0+ loc1 0+1000 g \*ABS\* 0+ __\.MMIX\.start\.\.text -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+1000 g O \.text 0+ _start\. +2000000000000000 g \*ABS\* 0+ __bss_start +2000000000000000 g \*ABS\* 0+ _edata +2000000000000000 g \*ABS\* 0+ _end +0+1000 g \.text 0+ _start\. Contents of section \.text: 1000 fd030303 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/loc2.d binutils-2.12.1/ld/testsuite/ld-mmix/loc2.d --- binutils-2.12/ld/testsuite/ld-mmix/loc2.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/loc2.d Thu May 9 10:52:02 2002 @@ -18,10 +18,10 @@ 0+1004 g \.text 0+ _start 0+1000 g \.text 0+ loc1 0+1000 g \*ABS\* 0+ __\.MMIX\.start\.\.text -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+1004 g O \.text 0+ _start\. +2000000000000000 g \*ABS\* 0+ __bss_start +2000000000000000 g \*ABS\* 0+ _edata +2000000000000000 g \*ABS\* 0+ _end +0+1004 g \.text 0+ _start\. Contents of section \.text: 1000 fd030303 e3fd0001 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/loc3.d binutils-2.12.1/ld/testsuite/ld-mmix/loc3.d --- binutils-2.12/ld/testsuite/ld-mmix/loc3.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/loc3.d Thu May 9 10:52:02 2002 @@ -18,10 +18,10 @@ 0+1000 g \.text 0+ _start 0+1004 g \.text 0+ loc1 0+1000 g \*ABS\* 0+ __\.MMIX\.start\.\.text -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+1000 g O \.text 0+ _start\. +2000000000000000 g \*ABS\* 0+ __bss_start +2000000000000000 g \*ABS\* 0+ _edata +2000000000000000 g \*ABS\* 0+ _end +0+1000 g \.text 0+ _start\. Contents of section \.text: 1000 e3fd0001 fd030303 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/loc4.d binutils-2.12.1/ld/testsuite/ld-mmix/loc4.d --- binutils-2.12/ld/testsuite/ld-mmix/loc4.d Wed Oct 31 00:42:51 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/loc4.d Thu May 9 10:52:02 2002 @@ -22,10 +22,10 @@ 0+1004 g \.text 0+ _start 0+1000 g \.text 0+ loc1 0+1000 g \*ABS\* 0+ __\.MMIX\.start\.\.text -2000000000000008 g O \*ABS\* 0+ __bss_start -2000000000000008 g O \*ABS\* 0+ _edata -2000000000000008 g O \*ABS\* 0+ _end -0+1004 g O \.text 0+ _start\. +2000000000000008 g \*ABS\* 0+ __bss_start +2000000000000008 g \*ABS\* 0+ _edata +2000000000000008 g \*ABS\* 0+ _end +0+1004 g \.text 0+ _start\. Contents of section \.text: 1000 fd030303 e3fd0001 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/loc6.d binutils-2.12.1/ld/testsuite/ld-mmix/loc6.d --- binutils-2.12/ld/testsuite/ld-mmix/loc6.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/loc6.d Thu May 9 10:52:02 2002 @@ -18,10 +18,10 @@ 2000000000000200 g \.data 0+ dloc1 2000000000000200 g \*ABS\* 0+ __\.MMIX\.start\.\.data 0+ g \.text 0+ _start -200000000000020c g O \*ABS\* 0+ __bss_start -200000000000020c g O \*ABS\* 0+ _edata -2000000000000210 g O \*ABS\* 0+ _end -0+ g O \.text 0+ _start\. +200000000000020c g \*ABS\* 0+ __bss_start +200000000000020c g \*ABS\* 0+ _edata +2000000000000210 g \*ABS\* 0+ _end +0+ g \.text 0+ _start\. Contents of section \.text: 0000 e3fd0001 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/local1.d binutils-2.12.1/ld/testsuite/ld-mmix/local1.d --- binutils-2.12/ld/testsuite/ld-mmix/local1.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/local1.d Thu May 9 10:52:02 2002 @@ -53,10 +53,7 @@ 10: 0+fe 0 NOTYPE LOCAL DEFAULT PRC lsym 11: 0+fc 0 NOTYPE GLOBAL DEFAULT PRC ext1 12: 0+4 0 NOTYPE GLOBAL DEFAULT 1 _start - 13: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS __bss_start - 14: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _edata - 15: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _end - 16: 0+4 0 OBJECT GLOBAL DEFAULT 1 _start\. +#... Hex dump of section '\.text': 0x0+ fd030201 e3fd0001 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/local3.d binutils-2.12.1/ld/testsuite/ld-mmix/local3.d --- binutils-2.12/ld/testsuite/ld-mmix/local3.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/local3.d Thu May 9 10:52:02 2002 @@ -51,10 +51,7 @@ 10: 0+fe 0 NOTYPE LOCAL DEFAULT PRC lsym 11: 0+fc 0 NOTYPE GLOBAL DEFAULT ABS ext1 12: 0+4 0 NOTYPE GLOBAL DEFAULT 1 _start - 13: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS __bss_start - 14: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _edata - 15: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _end - 16: 0+4 0 OBJECT GLOBAL DEFAULT 1 _start\. +#... Hex dump of section '\.text': 0x0+ fd030201 e3fd0001 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/local5.d binutils-2.12.1/ld/testsuite/ld-mmix/local5.d --- binutils-2.12/ld/testsuite/ld-mmix/local5.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/local5.d Thu May 9 10:52:02 2002 @@ -52,10 +52,7 @@ 10: 0+fe 0 NOTYPE LOCAL DEFAULT PRC lsym 11: 0+fc 0 NOTYPE GLOBAL DEFAULT PRC ext1 12: 0+8 0 NOTYPE GLOBAL DEFAULT 1 _start - 13: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS __bss_start - 14: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _edata - 15: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _end - 16: 0+8 0 OBJECT GLOBAL DEFAULT 1 _start\. +#... Hex dump of section '\.text': 0x0+ fd020202 fd030201 e3fd0001 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/local7.d binutils-2.12.1/ld/testsuite/ld-mmix/local7.d --- binutils-2.12/ld/testsuite/ld-mmix/local7.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/local7.d Thu May 9 10:52:02 2002 @@ -53,10 +53,7 @@ 10: 0+fe 0 NOTYPE LOCAL DEFAULT PRC lsym 11: 0+fc 0 NOTYPE GLOBAL DEFAULT ABS ext1 12: 0+8 0 NOTYPE GLOBAL DEFAULT 1 _start - 13: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS __bss_start - 14: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _edata - 15: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _end - 16: 0+8 0 OBJECT GLOBAL DEFAULT 1 _start\. +#... Hex dump of section '\.text': 0x0+ fd030201 fd020202 e3fd0001 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/locdo-1.d binutils-2.12.1/ld/testsuite/ld-mmix/locdo-1.d --- binutils-2.12/ld/testsuite/ld-mmix/locdo-1.d Wed Oct 31 00:52:41 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/locdo-1.d Thu May 9 10:52:02 2002 @@ -16,11 +16,11 @@ 2000000000000008 g \*ABS\* 0+ __\.MMIX\.start\.\.data 2000000000000008 g \.data 0+ od 0+ g \.text 0+ _start -2000000000000010 g O \*ABS\* 0+ __bss_start +2000000000000010 g \*ABS\* 0+ __bss_start 2000000000000000 g \*ABS\* 0+ Data_Segment -2000000000000010 g O \*ABS\* 0+ _edata -2000000000000010 g O \*ABS\* 0+ _end -0+ g O \.text 0+ _start\. +2000000000000010 g \*ABS\* 0+ _edata +2000000000000010 g \*ABS\* 0+ _end +0+ g \.text 0+ _start\. Contents of section \.text: 0000 e3fd0001 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/loct-1.d binutils-2.12.1/ld/testsuite/ld-mmix/loct-1.d --- binutils-2.12/ld/testsuite/ld-mmix/loct-1.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/loct-1.d Thu May 9 10:52:02 2002 @@ -16,10 +16,10 @@ 0+1004 l \.text 0+ t 0+100c g \.text 0+ _start 0+1004 g \*ABS\* 0+ __\.MMIX\.start\.\.text -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+100c g O \.text 0+ _start\. +2000000000000000 g \*ABS\* 0+ __bss_start +2000000000000000 g \*ABS\* 0+ _edata +2000000000000000 g \*ABS\* 0+ _end +0+100c g \.text 0+ _start\. Contents of section \.text: 1004 fd000000 00001004 e3fd0001 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/locto-1.d binutils-2.12.1/ld/testsuite/ld-mmix/locto-1.d --- binutils-2.12/ld/testsuite/ld-mmix/locto-1.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/locto-1.d Thu May 9 10:52:02 2002 @@ -16,10 +16,10 @@ 0+1008 g \.text 0+ od 0+1010 g \.text 0+ _start 0+1008 g \*ABS\* 0+ __\.MMIX\.start\.\.text -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+1010 g O \.text 0+ _start\. +2000000000000000 g \*ABS\* 0+ __bss_start +2000000000000000 g \*ABS\* 0+ _edata +2000000000000000 g \*ABS\* 0+ _end +0+1010 g \.text 0+ _start\. Contents of section \.text: 1008 00000000 00001008 e3fd0001 .* diff -Nur binutils-2.12/ld/testsuite/ld-mmix/start-1.d binutils-2.12.1/ld/testsuite/ld-mmix/start-1.d --- binutils-2.12/ld/testsuite/ld-mmix/start-1.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/start-1.d Thu May 9 10:52:02 2002 @@ -13,10 +13,10 @@ 0+ l d \*ABS\* 0+ 0+ l d \*ABS\* 0+ 0+4 g \.text 0+ _start -2000000000000000 g O \*ABS\* 0+ __bss_start -2000000000000000 g O \*ABS\* 0+ _edata -2000000000000000 g O \*ABS\* 0+ _end -0+4 g O \.text 0+ _start\. +2000000000000000 g \*ABS\* 0+ __bss_start +2000000000000000 g \*ABS\* 0+ _edata +2000000000000000 g \*ABS\* 0+ _end +0+4 g \.text 0+ _start\. Disassembly of section \.text: diff -Nur binutils-2.12/ld/testsuite/ld-mmix/undef-3.d binutils-2.12.1/ld/testsuite/ld-mmix/undef-3.d --- binutils-2.12/ld/testsuite/ld-mmix/undef-3.d Tue Oct 30 10:20:14 2001 +++ binutils-2.12.1/ld/testsuite/ld-mmix/undef-3.d Thu May 9 10:52:02 2002 @@ -40,7 +40,7 @@ 7: 0+ 0 SECTION LOCAL DEFAULT 7 8: 0+ 0 NOTYPE GLOBAL DEFAULT UND undefd 9: 0+ 0 NOTYPE GLOBAL DEFAULT 1 _start - 10: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS __bss_start - 11: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _edata - 12: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _end - 13: 0+ 0 OBJECT GLOBAL DEFAULT 1 _start\. + 10: 2000000000000000 0 NOTYPE GLOBAL DEFAULT ABS __bss_start + 11: 2000000000000000 0 NOTYPE GLOBAL DEFAULT ABS _edata + 12: 2000000000000000 0 NOTYPE GLOBAL DEFAULT ABS _end + 13: 0+ 0 NOTYPE GLOBAL DEFAULT 1 _start\. diff -Nur binutils-2.12/md5.sum binutils-2.12.1/md5.sum --- binutils-2.12/md5.sum Fri Mar 8 14:45:13 2002 +++ binutils-2.12.1/md5.sum Tue May 14 19:47:24 2002 @@ -2,11 +2,11 @@ f30a9716ef3762e3467a2f62bf790f0a COPYING.LIB 51515d7446400d54a8055052d86378dc Makefile.in 07c33a285703b40cd6f93a478e97e03b README -c2c475b293d0af08dad135ca02be9b21 bfd/ChangeLog +3f117f70703b6a6a6f094d068989b773 bfd/ChangeLog ceab81aa1f02825092808fdafba0239d bfd/COPYING -9a334d566cfc5e1684910b1b67cfa6c5 bfd/doc/ChangeLog +baa94c123abed90cb17f942bfa3b3a69 bfd/doc/ChangeLog 481b62b7a89022dbc1eaaaeb39e04232 bfd/doc/Makefile.am -da4b4b71a5732c228f871059b875d137 bfd/doc/Makefile.in +fcb9fe00a1b4b91103086da4d64c52f4 bfd/doc/Makefile.in 866d3cc188c3a5d18ee81f8f727e8203 bfd/doc/bfd.texinfo f5dcaa77731001af5500f70c97690337 bfd/doc/bfdint.texi 5ee7f8ae8b0ec33c7baf2e004084aaa1 bfd/doc/bfdsumm.texi @@ -17,7 +17,17 @@ d7a37304ccd7b245f93df4be02797477 bfd/doc/proto.str 0fbe144d8d1782e0379db812371c6a57 bfd/doc/aoutx.texi 6f34186ad28a5b230efc088a709560de bfd/doc/archive.texi -e4184fb49672f8f3d9b6964b71e01ebe bfd/doc/archures.texi +90a047bf4bdda583bf2926be5a879352 bfd/doc/archures.texi +5c0374aa1ec3eae90e06873e9a4f7ddd bfd/doc/bfd.info +17ab4a506f79478a3b2b89eb93be6c37 bfd/doc/bfd.info-1 +983e214d8acb68a5993614f4068b6469 bfd/doc/bfd.info-2 +e88864e2705ecdeea2bea32cfd1dc871 bfd/doc/bfd.info-3 +432bf0c4a3f4770504283c8132ea6891 bfd/doc/bfd.info-4 +22f0a78aa656769ca649f60afdaf752f bfd/doc/bfd.info-5 +179405fe61339be34cf24abad1609f65 bfd/doc/bfd.info-6 +c8e1cdd26ac606e8a202ae5fe0f1f7ed bfd/doc/bfd.info-7 +ba76b2ea934a457ab9d870274152fd95 bfd/doc/bfd.info-8 +34d73ebc255bbc0cd749641f30c7d066 bfd/doc/bfd.info-9 ae37556de5146ff854bf7a27dd6acc30 bfd/doc/bfdt.texi a08da988e834eaa44ce036daed384f3f bfd/doc/cache.texi e515efbf0156ee160e0a699b7da87711 bfd/doc/coffcode.texi @@ -25,26 +35,17 @@ c60b298f07f5a175f2325d48bd009bdb bfd/doc/elf.texi d41d8cd98f00b204e9800998ecf8427e bfd/doc/elfcode.texi 2ef6063d5f375a52c2a2d059c50dce17 bfd/doc/format.texi -85f81c1e690c2a1c970207e338ae1904 bfd/doc/libbfd.texi +1d846f321c1f04f609386d3c31201c93 bfd/doc/hash.texi +7ac9a36b8a72594048188cd4ee5012dc bfd/doc/init.texi +6792bcb9046edfcbfcc6069a0780e6c2 bfd/doc/libbfd.texi +6f212b00766abadea5b686c91c024f16 bfd/doc/linker.texi +4b178141d4ecb16c4fd528a79a4e7d93 bfd/doc/mmo.texi e1afa3d81cb98cb795b7dfeb7117b531 bfd/doc/opncls.texi -bc6ecd55ac10d784f34f837792f25ce4 bfd/doc/reloc.texi +8a9a1d0f61a6e50d3386a5e745f9d244 bfd/doc/reloc.texi 3b00de19f8fd725460824f4c8ffeb479 bfd/doc/section.texi b66f30d48fec6491aaa7ebcc994781e3 bfd/doc/syms.texi 25f3306e6b3311b8df9ec42742cf8b97 bfd/doc/targets.texi -7ac9a36b8a72594048188cd4ee5012dc bfd/doc/init.texi -1d846f321c1f04f609386d3c31201c93 bfd/doc/hash.texi -6f212b00766abadea5b686c91c024f16 bfd/doc/linker.texi -4b178141d4ecb16c4fd528a79a4e7d93 bfd/doc/mmo.texi -48e89f780c953c26331e91594938138d bfd/doc/bfd.info -67ae782c6c2f5e5e5cc8850824d46200 bfd/doc/bfd.info-1 -5225384c0ac6f40cbaffffe5fe17fabd bfd/doc/bfd.info-2 -f1f78fd2d816237c81614d73339e7bd1 bfd/doc/bfd.info-3 -2b5ff41bdc2e8bfd82cdb38aeb8d5246 bfd/doc/bfd.info-4 -784a0ee571c2aa96e2483be81db61c64 bfd/doc/bfd.info-5 -9e0cdfa7c8bd5f73dbf29467d6c39996 bfd/doc/bfd.info-6 -ad1bd4c0e3f11218ff6592c9f14c0bff bfd/doc/bfd.info-7 -76ce7e3173171b1f42978d0427d097f1 bfd/doc/bfd.info-8 -1d1943af49f64b2c1dbcbc404ef47a37 bfd/doc/bfd.info-9 +e5f0cebc0fabf83368f3592383ed3da0 bfd/po/es.gmo b9c5a43c08d47586c6e2ada63d9293ad bfd/po/.cvsignore 019de43ec4b4669224435b59c3fe63c4 bfd/po/BLD-POTFILES.in 04dffac0afc3c819881fbf8a9354d4b3 bfd/po/Make-in @@ -55,24 +56,23 @@ 73b8653e71ee27028caea3884743f7de bfd/po/ja.po 25863bedc7caecd45599e22542ac65fd bfd/po/sv.po 76312a435f7755581daa834ca293467d bfd/po/tr.po -e5f0cebc0fabf83368f3592383ed3da0 bfd/po/es.gmo 06b64d559f077d7405e9f2556b3e255a bfd/po/fr.gmo 95a86001b071eb80f4745adba10a289a bfd/po/ja.gmo f89da03e8017b61c6cf45932eb56eae2 bfd/po/sv.gmo d1198425eeef31fb4acac98f63d98b9d bfd/po/tr.gmo 9d091109fe526140efce9a4d0f55884c bfd/ChangeLog-0001 8dcb7ce2e45911e21ceb6e457e69eacf bfd/ChangeLog-9193 -2699955bffeffb24db6fd69ae4db6689 bfd/ChangeLog-9495 +6d37ec6ee5f57a1188a0717f2fa5deb0 bfd/ChangeLog-9495 b7ad288235bf6a3e015e01cb6096cbe7 bfd/ChangeLog-9697 dbb0d89c90d6c0ec79eb003a5b63f923 bfd/ChangeLog-9899 d618facc3e8ce8bf3d02ba452e1be6ab bfd/MAINTAINERS -6513d01cc8c2ac06a7729d22b6d94256 bfd/Makefile.am -5b3ec91893fcb3fb636da10be95d9172 bfd/Makefile.in +92086d91fc6e7ce86ad1b339bc57ad32 bfd/Makefile.am +6a0e16955760476a04d7739c18229719 bfd/Makefile.in 6455e3c85b31e588ecb75f7d3c945c8d bfd/PORTING 2d6a5be3f5d1b33251fe9a8570e943d8 bfd/README cd26654c6eb30680694867e434e40044 bfd/TODO fa9dc5a90d06b56e4fc7388caa0936f2 bfd/acinclude.m4 -3d436bc3696617e5f5539e46fbb81763 bfd/aclocal.m4 +0a0c1c48f07ec783af036c2a64de4ff1 bfd/aclocal.m4 e36d6da3d2ddb35d3f8ad17707972b4b bfd/aix386-core.c d50575cb2f86442dc3e4e83bfb205b54 bfd/aout-adobe.c 4200805eaa8a5287e047c4d235c8200e bfd/aout-arm.c @@ -86,13 +86,13 @@ 710ff75a0a234773691c069654dd8ba6 bfd/aout32.c cae169ce11deb6f450104c569c23c853 bfd/aout64.c 34d6e488b5a649d93e78255104866c21 bfd/aoutf1.h -5b57f954647ca545dfb2dfcc86f6092b bfd/aoutx.h -16becac7a49cdcd691ff9d6d37d89c24 bfd/archive.c +cb51cb5de8cca1ace66734b4e5480118 bfd/aoutx.h +0b8b7388c4e85eb8edda763f3a7ebbf9 bfd/archive.c 7fd042eae83c50aed693a5f1a69fe8b8 bfd/archive64.c -f6e44fbeb16800f454a0e0a739bc6e46 bfd/archures.c +d81849866b36ccae366550c2f07e6b21 bfd/archures.c ed021dedac4b4b6ce002c783be091a61 bfd/armnetbsd.c e3d1bc5a0f12000ec6a69af1bef069d5 bfd/bfd-in.h -cd74f55510e0ebbcd620efec1d42d5be bfd/bfd-in2.h +69a0ce3b2afa8f04154970cf000f7d5a bfd/bfd-in2.h f1d633c9e6b0299b2b9ad57fa3a477e2 bfd/bfd.c b0914856428660a831648bfccbfc63b8 bfd/binary.c d36558b8452fe0d62d73425e0bfcbdf1 bfd/bout.c @@ -104,7 +104,7 @@ 118f6c271cbc5aeb1eec90d10b62094d bfd/coff-a29k.c 22d64c306b4e7a704216a562d669242f bfd/coff-alpha.c cd8cc8470eefa71a61a58ba3990c495d bfd/coff-apollo.c -696361cb69c3d079c30fe11c45663a49 bfd/coff-arm.c +efa72577ac1da8becb12b10e1dc197ee bfd/coff-arm.c 04d8d5fe37fd8bdbf2c70031ff92db80 bfd/coff-aux.c b7572dbbd820acf00c9d5571af08f2e5 bfd/coff-go32.c 86c05f734c34a5bc4a53d3e7a1fcc077 bfd/coff-h8300.c @@ -120,8 +120,8 @@ 36c5e93b67e69504906d68adc1e6a50b bfd/coff-or32.c 0fe98f356a19d05611fa133c217e77e5 bfd/coff-pmac.c b42fe39c903c10c295d5114861b6edc5 bfd/coff-ppc.c -810145687a6d17e1cf985149565b6ae1 bfd/coff-rs6000.c -d1abcf9b5f2963d1f055f5072682354b bfd/coff-sh.c +c7d117f96f9aaa8d9fc61b8fb6107059 bfd/coff-rs6000.c +4ea77efbdca37f99ec6b78b755c585bb bfd/coff-sh.c 8485a47e7021f51f954486b3addf17e8 bfd/coff-sparc.c 0be969288399ff5acad2e135ace3fbe2 bfd/coff-stgo32.c 0a6bcb90289a5f62cb39fb0ec0858560 bfd/coff-svm68k.c @@ -132,17 +132,17 @@ 7452b985931660ed9a0df0ed3c7f8b7d bfd/coff-w65.c d958f107aae4a2592d9bbc57e2fc50c5 bfd/coff-we32k.c 9c3e1d51dde0e574935773e27fa5593a bfd/coff-z8k.c -1da7b27d93db6d866084ee941d3da24b bfd/coff64-rs6000.c -ba57742006500b8d4d53971630cea4f7 bfd/coffcode.h +82c598707da9eeda6dd49e6988cf0a3f bfd/coff64-rs6000.c +3a0258b005e63c0f57ae8bd33251f773 bfd/coffcode.h d404c41a9fcfae9bac9ff26bd93019a0 bfd/coffgen.c -4180a1090c5a88c371535004a7d5a075 bfd/cofflink.c +e3b9da2023107449a2332e3c86896316 bfd/cofflink.c 0c54b999534d6377e0d4d042a39011f9 bfd/coffswap.h 9dd95d1a82046fdf18df9d06e2e8bd5c bfd/config.bfd -2ebfc42d5d2a4668d364f1b54968b4bc bfd/config.in -99816727e0049d3ac7f082a95a322e01 bfd/configure +495f77dc7fde4331d359704d84ec793c bfd/config.in +6dfb36bbca8ed4bdeb4c5d5781766799 bfd/configure a8485b69f68d81f4ef2f29b51bb36d85 bfd/configure.com e1898a405c4da9e0439761da79aa5e30 bfd/configure.host -9dc8cebb85fc31121c67298fd287b7c8 bfd/configure.in +affda9f0c3ca6191501c0fd0c79fbccb bfd/configure.in 12989d3e621c09475ccfc8945dce62d3 bfd/corefile.c 6bc9b90664a2ebdf2b85f19dce0b7f11 bfd/cpu-a29k.c f93b02f976ea91934c4118be4ed019d4 bfd/cpu-alpha.c @@ -153,11 +153,11 @@ 6c476a3781d45cdca390650b9273d3ed bfd/cpu-d10v.c 7a7d89b109710f951f825992832fb422 bfd/cpu-d30v.c fe25690c8c53442b507f5247c9635748 bfd/cpu-fr30.c -9dc53bfdf886e923e235d43d63f02d52 bfd/cpu-h8300.c +90e59cbd5f10965c5674178b2910089b bfd/cpu-h8300.c 221b7aea56b3e32297dac993e53a7e65 bfd/cpu-h8500.c 5e942a325f1b1a2e50767f070ce3895c bfd/cpu-hppa.c -5020c76b76859038dd5a92a46647a667 bfd/cpu-i370.c -d9a9869f1bc2c8a8c97bf04590fedb21 bfd/cpu-i386.c +305204b5ff6994ad07547b75edebc0eb bfd/cpu-i370.c +0ede594adb1e2bfdcfe471cb8e6526cd bfd/cpu-i386.c b6d0fbb65c82465573f28353a930b3b6 bfd/cpu-i860.c b363adb512ec41d5f5c38850f577bf0a bfd/cpu-i960.c defbc205e79c5a9ffe69ffb2d942ff16 bfd/cpu-ia64-opc.c @@ -170,18 +170,18 @@ 431570536021941e2fb8658707a8deba bfd/cpu-m68k.c 480b3bebf9d0b948bc3d51c23fbd511f bfd/cpu-m88k.c ecc303dc3afabbc076d866c4b1d40191 bfd/cpu-mcore.c -80ec090acbc5066f38399588e24adc36 bfd/cpu-mips.c +b1262b33761e2c532ba945d18cd88ca4 bfd/cpu-mips.c 1bc5fb68879479a8c9816442f4491cae bfd/cpu-mmix.c 8d9d6ec5a51b647cbeeed536447b9c0e bfd/cpu-ns32k.c 8c0617c42068358ec9f040ca5ed2c677 bfd/cpu-openrisc.c d036dc6a3217e20cfe97bd29db00b49e bfd/cpu-or32.c bfcfa53927ddb7049822992ee418e1f3 bfd/cpu-pdp11.c d9bff0626933e118aa8b50bb86b8477d bfd/cpu-pj.c -ceedde8a1a3b167c841993406af4e30a bfd/cpu-powerpc.c +3b693df5efd77ea5f4220959ad3ba7eb bfd/cpu-powerpc.c 2634d322a7c1b737c5ba95d727e70d5c bfd/cpu-rs6000.c -fb6e8f48966e4fd5fb3771d6e4887462 bfd/cpu-s390.c +9c5e4148db70354c326b2cb5ef651ec8 bfd/cpu-s390.c ae463157133dd1273a69373dd6450d05 bfd/cpu-sh.c -6c1f0f9816581e6654cfb4476ec51386 bfd/cpu-sparc.c +4b3699bb2e2aaab880c962c2b207af51 bfd/cpu-sparc.c 4a7876d7cfd8a37c9e37f95d0968e7b4 bfd/cpu-tic30.c b43f6e6ead72cff7ff28c87cec93a33a bfd/cpu-tic54x.c 424e7a355ca4b115f657609a91ade54e bfd/cpu-tic80.c @@ -192,77 +192,77 @@ 0a39df54cde1b293eccb41979994497e bfd/cpu-xstormy16.c dbd9363228c44546617020b92b3b6e0c bfd/cpu-z8k.c e03c6141f7dfc11bf97d902b02c543f8 bfd/demo64.c -bf0ee99919ef363a9775204499c8e4f8 bfd/dep-in.sed +b4759437993f4e11d17f2123e4468713 bfd/dep-in.sed 3a5c93b368ddb072e094004a763ec650 bfd/dwarf1.c -553e5f464d89ab9a49aa671bd087ac35 bfd/dwarf2.c -a79f27050cb9361753f42837be5788e5 bfd/ecoff.c +e981698598c04d9a8e8cadf0977cd23a bfd/dwarf2.c +a542b73c30a0c53f72f3c5a8929c0bad bfd/ecoff.c 6ccf6f87c89c15e2e5a9581392501cb4 bfd/ecofflink.c 553f5dc1b02cfe7ff4f70af53eb71cf8 bfd/ecoffswap.h 35a5d5aa67cdcb354a57872bd6abf5ab bfd/efi-app-ia32.c e11d2ca6f1bb770ed54aa40386f69b6b bfd/efi-app-ia64.c -9c0b020dc4ec85ed91d334f025115b9e bfd/elf-bfd.h -9bc3f9b58478638ed5a680ebc423c785 bfd/elf-eh-frame.c -ec0114d21c6ea85fc9875bdacd312576 bfd/elf-hppa.h -bcf59a262c90102af8e0ebcc467a4eae bfd/elf-m10200.c -e549e5bba3d5bca67b2add9ccd749ac4 bfd/elf-m10300.c +443bd06bd08be4d3ffd16e1074082e29 bfd/elf-bfd.h +eba24fd2ec8c1bf2516b4268c0a07ed8 bfd/elf-eh-frame.c +c62399d872453f23387d518ac4c2bd3e bfd/elf-hppa.h +72f054fbc122ef3d40495970b9039cb8 bfd/elf-m10200.c +c57b17870689fde33873f9d2517a1f0c bfd/elf-m10300.c 8a90af9a14df5e2ad197c63bccfaf669 bfd/elf-strtab.c -b792f79fb2dc3d64f6a1d504ae6a997e bfd/elf.c +7fd202f070d5a7030947bffeb3ee931b bfd/elf.c a94e1cbc4ad5047964740843989c2681 bfd/elf32-arc.c -427bbb05414ac862e450c75533d3176b bfd/elf32-arm.h +ac7bdc7da70b0627239dd6f1c80fe1fa bfd/elf32-arm.h d889c51d850aba32949005d022fd6bfd bfd/elf32-avr.c -ecd62a30c955908d06237d0e8ad9fd69 bfd/elf32-cris.c +642dcb58a6e3faaba1deb78f0472197c bfd/elf32-cris.c 2e83e2a81af4c590bff269c1b9f629d4 bfd/elf32-d10v.c 23e1c9f0cd19b9336b1d556f1879d3fb bfd/elf32-d30v.c -f5765166c38811f12b2c0bb5fb6dc5ad bfd/elf32-fr30.c +5c25208d49cb7574574df611b22d336a bfd/elf32-fr30.c bb463d453f8dda4c0c1f32d41a72a672 bfd/elf32-gen.c 7f43c8effea9a735895a6b957e58d033 bfd/elf32-h8300.c -5c9b135bbdba94091cc29d2c9b45c4ab bfd/elf32-hppa.c +f6613576fe6b3d746d8d88f0bedb4759 bfd/elf32-hppa.c 0a8d9d216752c7bf497cd4ebd0f48645 bfd/elf32-hppa.h -a9742c7b888e1a40d34c8bff046ab72e bfd/elf32-i370.c -22bf14e10f025fa6a77906269e9484a1 bfd/elf32-i386.c -f30f2275bc1453df2e0b7486c0a1a128 bfd/elf32-i860.c +78f69c444dc73ed2be3d878b99f048cc bfd/elf32-i370.c +2cce29b2f62eee2ddbf35187cbcf472b bfd/elf32-i386.c +c246be7c2127d1de3bf07c2f752eb01d bfd/elf32-i860.c df9b2375de823fcd3f0dc6b4be680a41 bfd/elf32-i960.c -accef1d01a8b1ec97044e7ac7bd0e506 bfd/elf32-m32r.c +259cf61a24e05f38c9e00c45ecb3adae bfd/elf32-m32r.c 3ac813e93933b49eb51dc510faff890b bfd/elf32-m68hc11.c ebbf73fbb693283520892daf4eaed2de bfd/elf32-m68hc12.c -dfbb7b0ee8405e27510aa70b920e998e bfd/elf32-m68k.c +abcad101421997e63943cedbb225f52b bfd/elf32-m68k.c 6d08a2b4a53db400e322f8f712aa9498 bfd/elf32-m88k.c -42ea8bb1cb399ff0a08d1b482ea803e6 bfd/elf32-mcore.c -6d96b2b2dca0b366fb14cea639f313ea bfd/elf32-mips.c -bec4c8e39165d47e2ec5a32ea522084c bfd/elf32-openrisc.c +c85d7e0151e6a99599637f004301514a bfd/elf32-mcore.c +d9d5499980cb9e4500f16656d50f324e bfd/elf32-mips.c +0680938bd67d76d2626b3b2d870adb5a bfd/elf32-openrisc.c 2e2cca42abd562247ee1702a7c46449b bfd/elf32-or32.c 333e0b0498d13e5e769ca6632412a3c5 bfd/elf32-pj.c -29d88997fd10433c876db442c970f20b bfd/elf32-ppc.c -bb7d982246eaec0037d752ce1cb38ceb bfd/elf32-s390.c +2a9224520c59cf405b7f2640aa29d2a2 bfd/elf32-ppc.c +f84c007a12f2b9ab41b8d2a2c484f72d bfd/elf32-s390.c ec581c24aeee8f1a05ee05aaa3b2be04 bfd/elf32-sh-lin.c 9088d733310640900b928afbe15b9888 bfd/elf32-sh-nbsd.c -69aebb9766f5fea743fd41d43eb42902 bfd/elf32-sh.c -97435df52aea2d1ff7596de17ddbec58 bfd/elf32-sh64.c -3a0627e6c151418c86dc24b9bbbc8fd6 bfd/elf32-sparc.c +f2ee6b21a0d55d693c0af092d36d29da bfd/elf32-sh.c +7e98b3019d9b362c4a2754cddc5a3ada bfd/elf32-sh64.c +379c0efaf168c0a1b41fbfa2c0b4221d bfd/elf32-sparc.c 4268c644f127de3dcd1fe3b708440400 bfd/elf32-v850.c -e88f075e31b0fad847aa3a42096c7343 bfd/elf32-xstormy16.c +399edf7af865ab98525c8028a6882771 bfd/elf32-xstormy16.c ed57bd460ee2d4a61a5c445f280f295c bfd/elf32.c -793ec077212bf5b8d8ee98ae33cc108c bfd/elf64-alpha.c +88466000fc3530d5cb8532fb05f8a741 bfd/elf64-alpha.c 41f035cb562e77826140640c3138bcba bfd/elf64-gen.c -88cb5cd7a9146de90a97b5cd771ac638 bfd/elf64-hppa.c +99ac6b6007262cfb12be9bd027de75e6 bfd/elf64-hppa.c fbf7f46376d56c745331fa9e25e19042 bfd/elf64-hppa.h -ea461123c40d1567399a4f52be1b7000 bfd/elf64-mips.c -5a0338029c48aef0736455412a5dbc88 bfd/elf64-mmix.c -3acb9b3a22127d414736ed2f00d2cdd4 bfd/elf64-ppc.c -3029ec86f2be650be1d53b21bfe5ec3f bfd/elf64-ppc.h -c39fb1464257e9e961ab8f2ee6eee2fc bfd/elf64-s390.c -7b4e5d60671ff7c92ec4fd9169c9a275 bfd/elf64-sh64.c -2133766510580d5e95f0b3e6a460bf4d bfd/elf64-sparc.c -3871ec088bb553af5a90dc5aca67624f bfd/elf64-x86-64.c +68dff0c967f3a1fb542057b3e0b86a1f bfd/elf64-mips.c +9b6a55784e107480f61d5ad78abd47af bfd/elf64-mmix.c +221615f7ecd5f2e4c8ff2c38eae9b949 bfd/elf64-ppc.c +5dc1df36becf4265914615d4e7fecc5c bfd/elf64-ppc.h +63446783675d7e044e7ef30233d710df bfd/elf64-s390.c +a7e32a10256234dbe3e51db660aa4142 bfd/elf64-sh64.c +6660a0f5ccd2bdc7ce3d84b18a9e52da bfd/elf64-sparc.c +39c643f53a953f47261e22d2de04f9c6 bfd/elf64-x86-64.c 0df4bff9f99908d451625f14be3dc667 bfd/elf64.c -bfc821647e8635702eec5e5069f5a168 bfd/elfarm-nabi.c +f251d2837c5d49a31553700acba302a6 bfd/elfarm-nabi.c 6e72034bb4153408bb2886ad34e92e5a bfd/elfarm-oabi.c f7daf40b9ff33a5b1e898275045f02b5 bfd/elfcode.h c7746a136c2b2199b323544f273eac5d bfd/elfcore.h -42c7d831c11eef525314a784a4186748 bfd/elflink.c -88c875cb01b4ffa55a597e7cdceb8661 bfd/elflink.h -74cd986bca9fb94750ef6386bbc50d93 bfd/elfxx-ia64.c -4b6a9115256dfb9fa182522408326615 bfd/elfxx-target.h +d31576f2e4cc9553e340187b603c9fdf bfd/elflink.c +ece813cd772edd8c3ea7b8e413bb9a4d bfd/elflink.h +fab9540d3173cc30dd86e3782dfe3a84 bfd/elfxx-ia64.c +c18852547636fb5a3d9219220f26f7a0 bfd/elfxx-target.h 5f9b71e52009091cb901280cbe42283c bfd/epoc-pe-arm.c c9f006f05a9b9f4d6be5fa84dcad8b6a bfd/epoc-pei-arm.c 8853c8f4a25621b025d9f43e53f5aa9d bfd/format.c @@ -280,20 +280,20 @@ 5b01cdc5ee8b0e9cd3fa57cfa577d57e bfd/i386bsd.c fd31bd229306ee8fc9914395932866a2 bfd/i386dynix.c c91f2b6fb802a0bf53bcd57c3faaccbf bfd/i386freebsd.c -40bec07b2a74954b3c99aaa31b4f38a5 bfd/i386linux.c +3abb00a4b645149374ea70fe7b829b0e bfd/i386linux.c 419d182379298720853c1d3d172b40e1 bfd/i386lynx.c 93a78c9f722e6cbe1cbcf60c520e2740 bfd/i386mach3.c 1a7d32c19b6f1968d0cb3449336a6e8b bfd/i386msdos.c 82991f62026cee0823a00ec99fffafc3 bfd/i386netbsd.c 0215801b88f529b5d300097d734c97b7 bfd/i386os9k.c 7aa71efc21067a8d39ee010db645761d bfd/ieee.c -2c1969292e8b835f5120b77b8104ac22 bfd/ihex.c +c01fedba8269714656f1b4ccfae6fd2d bfd/ihex.c 35b7f1acea0a7c53f6785b40d6970b93 bfd/init.c 3144d337d7f3af035ec0ca8ffe980fbf bfd/irix-core.c cb3fbb4489ef4714314c454ea68a9266 bfd/libaout.h ac335ebf89b515e11c3f9688ee9145d8 bfd/libbfd-in.h -89913c0a2baf2f333f04c8b7dd05280b bfd/libbfd.c -49d369148c7785c7d1ec760d0d6049c8 bfd/libbfd.h +6595d44678158c5d07699778062d0cf3 bfd/libbfd.c +af92fc3e2d0c11317910b8d7e47e2d26 bfd/libbfd.h d31f2a1d51f813fbf781da0607ea2046 bfd/libcoff-in.h 3819cf3a726a0b5a3d004169d833a55b bfd/libcoff.h 47e6fd449d0df69cce183c4eeaaa82fa bfd/libecoff.h @@ -303,17 +303,17 @@ 85a8008401af9b2ba92de57c32eee942 bfd/liboasys.h dd27c6dd10d7473edd375f616e5a9de5 bfd/libpei.h 2a40391d771fb3cae7a5959567568511 bfd/libxcoff.h -1dc0a3433f95d87080c2e17e9e509fd2 bfd/linker.c +8dd07dc9656a48c2fc40cf3e5f69080c bfd/linker.c 7251cefdc6675be93cff2dc1b1fcdc1a bfd/lynx-core.c c3280d53f54733eb0f5ff70b3c3b9664 bfd/m68k4knetbsd.c -923a9cc3e624f09dada7fedb2bdc8fb0 bfd/m68klinux.c +7e16096059e80f6d378067a0086d7612 bfd/m68klinux.c 70d807515fd38badd3e70b62cb83aef9 bfd/m68klynx.c 9f5840c8286074b9e22b6c075862bb02 bfd/m68knetbsd.c b5d04d6d672cf0e69731f395234f5a41 bfd/m88kmach3.c 5de4da6a9169effb512e6ba4d014d420 bfd/makefile.vms -550a5c4ac317d0862c7f21753ea9023a bfd/merge.c +bc70820bfaa3377401ecf863b724eaac bfd/merge.c 8524446c33d085e9a0def3545fc3cf58 bfd/mipsbsd.c -1c0564aa5a6b012b76d667b82ab9f5c4 bfd/mmo.c +acbde8318a2cc8d038d1669fbac35292 bfd/mmo.c 5971cd61d7c10702978519aa5ed41474 bfd/mpw-config.in 85bd791a2ac9c9d7c2bea1932665d568 bfd/mpw-make.sed fb63b1b467bc1d98299fd42e9096806c bfd/netbsd-core.c @@ -332,10 +332,10 @@ 0a3cf5330fbfb28c501c5a9e90537693 bfd/ns32k.h c11bad41f6847ac2a07aa6db3a51d115 bfd/ns32knetbsd.c 8a5b30b6bdf6349a2f0910e25dabf9b6 bfd/oasys.c -e3bf85cab63bf2d426bd2db4af8f46fa bfd/opncls.c +90df9bb65ededb61601b20fefac5afe9 bfd/opncls.c 6c9a97d5e12e04724f59fdf387711ce1 bfd/osf-core.c 1abe901032b79ca45cfa2557e87233d4 bfd/pc532-mach.c -1b28811661b8ba697b0b75c68a09bfe9 bfd/pdp11.c +deefa29fc1742e7f7f553aa82e0619e3 bfd/pdp11.c 28eb753042c518eb7613dc0c07a9d712 bfd/pe-arm.c 46dc4c0e41d9ac58d901ba24bf87ec58 bfd/pe-i386.c eac157e8749a4d566f023fc73ad2701b bfd/pe-mcore.c @@ -352,23 +352,23 @@ b68bbcc240f3e1a222e5ea4562e052f9 bfd/peicode.h 12e002e0d9def85755c1883cce581643 bfd/ppcboot.c e4fc5cc1dbba863cfee358ebce71e39b bfd/ptrace-core.c -d183487f1e4c3fbecc808911a26cbb75 bfd/reloc.c +07562ef9e18050d5876fd840e00cbfda bfd/reloc.c 69378f15d0449ac4ba00d3f7f91258b2 bfd/reloc16.c 21ab21981f05c64c70331ddb57a75d39 bfd/riscix.c -e5bc1ba6006cd720267f5909ce5a03c6 bfd/rs6000-core.c +ecb8c3728bd0f2142d4ceec88e2d4fbc bfd/rs6000-core.c 815b41325948585f0b72c17f3a68ee15 bfd/sco5-core.c 1027b879f75802320685aeca208cd73a bfd/section.c 2b4a3714b2825df0bc8d69dac990bb8f bfd/som.c 847c0de62f7811422ba0f7f4deac9edb bfd/som.h -f903debfcd411583c99894540ceb2074 bfd/sparclinux.c +cacb52d719a4479688427d3880abcbbf bfd/sparclinux.c 48f794a26bac22b93ecae76955969366 bfd/sparclynx.c 62254a4618ab4151c1d4a331f6b93e6b bfd/sparcnetbsd.c -59e66c1008a9152874ab8cc1fd71e151 bfd/srec.c +ccd787a7c3d557300c7de2cdc9ac8a3f bfd/srec.c 891289f18ef687556cab8f090331e3fe bfd/stab-syms.c 9c11bc8a51cc8c3c928a1ec9cdfa1baf bfd/stabs.c 1ded054093de910d9786c62bc4fe8cc6 bfd/stamp-h.in -473a9d4b1929782b3e71e9a870e650a6 bfd/sunos.c -b165a64117246260875ecbcd2bc74089 bfd/syms.c +224b9af65868e41652e4c717af7eb6f7 bfd/sunos.c +5ca4e3519e9001e89b31d05a52edb6c0 bfd/syms.c 886e293ca7cce276694d1e4c70ad6eac bfd/sysdep.h 9ecde2db7d31efe5a94c9d06476b2491 bfd/targets.c 53357a9b87dd158b90cf790c316fd438 bfd/targmatch.sed @@ -376,7 +376,7 @@ d438eda84dea807c94c54f92cc726be6 bfd/trad-core.c 243f63337922812858c73ab67403bbaf bfd/vaxnetbsd.c afcb92a16ff87cd8066768e4810b148f bfd/versados.c -b32018bfbefe241a7c7e1d799d1ee765 bfd/version.h +bde6a417a2a5ea9ea050a9d96c6971cf bfd/version.h fe345eb7025d9f8873c4325b6842d7d7 bfd/vms-gsd.c 02f6d5016088d7619cc4c4ae8f01f960 bfd/vms-hdr.c 318ff74fe0872d66059b492b72e445c3 bfd/vms-misc.c @@ -384,7 +384,7 @@ 541553fd164f14cf89bed3deec2a8fc2 bfd/vms.c 786441d825676c8dd37ede1975656c6b bfd/vms.h 63805a2022c299fc39e71f11b1820368 bfd/xcoff-target.h -7525f75d7cb787a63e04c74e6e01328e bfd/xcofflink.c +0bf344a9de9b7d775b7d8c4035eab73d bfd/xcofflink.c 74b9e8377ce5ef7f2ad8914ad5e1dd41 bfd/hosts/alphalinux.h edf185d0ea2cb0350a58f4224a0d7ccb bfd/hosts/alphavms.h 70e1a59995604c3b804469fa27b92d94 bfd/hosts/decstation.h @@ -411,26 +411,27 @@ 9b476271b3bc5815a37f6b887c092090 bfd/hosts/vaxult.h 9b476271b3bc5815a37f6b887c092090 bfd/hosts/vaxult2.h 050e8594a583ce0b5e4c23edf00704f6 binutils/doc/Makefile.am -e068622fbee3016a6ee61c9d1bf11261 binutils/doc/Makefile.in +f24d2b2668c3ebc5afdcbfc94fbd0864 binutils/doc/Makefile.in 0491b330f098a9660c910f9df7d2225d binutils/doc/binutils.texi -b977d73f3f5814e5d0953a74b286c076 binutils/doc/binutils.info -b93af1b095dc53c178e9b5922299f741 binutils/doc/binutils.info-1 -bce2c8377aa3bd2c684ea8323ffc659b binutils/doc/binutils.info-2 -8f5e17c68324afbb93edd07992395c38 binutils/doc/binutils.info-3 -d2481f3d31fcf6233644458ea234f81f binutils/doc/addr2line.1 -a9293e689ed183e517e58eadedae9a2d binutils/doc/ar.1 -f37dc5668cafab259547aad15e5fb885 binutils/doc/dlltool.1 -297b02e032204e18432aa29fb03e00f8 binutils/doc/nlmconv.1 -4f02addb099a2b9218be838ebf4173ad binutils/doc/nm.1 -9465d9e0550086cebc4ebea88829f919 binutils/doc/objcopy.1 -2a3b166d1daaf43369e906c36da245fb binutils/doc/objdump.1 -84109e29104f14d11fce1f25430f7308 binutils/doc/ranlib.1 -2642175ab62ce031c6cb02b9125ff96c binutils/doc/readelf.1 -015eda0a4478597446f2b5c046293b80 binutils/doc/size.1 -97170ba9a94cfe384ecc4cd3bee22f07 binutils/doc/strings.1 -54947dcf2cbff71db283ad4ebb4cddc0 binutils/doc/strip.1 -7dd806d39680d0bb78423f370dbc2e88 binutils/doc/windres.1 -483dd52957894383c11ef0ee1a16464b binutils/doc/cxxfilt.man +0262446d7a2755273252461864af0037 binutils/doc/addr2line.1 +03459a78feb51ad31450bdec0fdb3ec9 binutils/doc/ar.1 +b335a665a32ace18fc158e1914d26866 binutils/doc/binutils.info +bc815a7bba2eb0a179502f45a6c478eb binutils/doc/binutils.info-1 +e46e3df3d74022df12e5e22d7bc509f2 binutils/doc/binutils.info-2 +0473765e77ec1c3c087887ffaad17010 binutils/doc/binutils.info-3 +e0bbdf3bff890cfbd8fdf01704f1c7c5 binutils/doc/cxxfilt.man +7de66d7da5a3fb2978c7ecf5c9e36097 binutils/doc/dlltool.1 +6be71ce439ad0310cad609f278f082c0 binutils/doc/nlmconv.1 +2f3ac7b71bcfa863e1f7c16330e72784 binutils/doc/nm.1 +52e197dab0f49fbc953c57d11af69dd1 binutils/doc/objcopy.1 +fd0833ebbded5d388471247d6b23d971 binutils/doc/objdump.1 +af3f261b747daa65ae73de0c6e704c02 binutils/doc/ranlib.1 +5fcf784c57faba92f79dc10f7dbc57cf binutils/doc/readelf.1 +67e571f0e4e16a929f12c266b0bae208 binutils/doc/size.1 +10ee6a1cee9e9d5e10cafc0cd546036e binutils/doc/strings.1 +cc1935126d4c3558f3b7d0519d034863 binutils/doc/strip.1 +c94353717014425f446d559261686db2 binutils/doc/windres.1 +d4eeb9fc770a8e497ac56f5dd3ed2e63 binutils/po/es.gmo b9c5a43c08d47586c6e2ada63d9293ad binutils/po/.cvsignore bfb5c178c2404196ab54d7532a61e3d4 binutils/po/Make-in 9fd8ff8120f96817fe7b034b4ed9b4f5 binutils/po/POTFILES.in @@ -439,24 +440,23 @@ d3ebf5f01d1b74b06b5fc58e8b096faa binutils/po/fr.po 008a22c13bf680dd75e6fba7d1e879bf binutils/po/ja.po d6743094636d2c3d5056691e4b86a192 binutils/po/tr.po -d4eeb9fc770a8e497ac56f5dd3ed2e63 binutils/po/es.gmo 389e36652ccac8c53b636cb8123d3966 binutils/po/fr.gmo 26b4f4f699d635fad6df05148dd68cb5 binutils/po/ja.gmo 6ccb152270137af2b0990d4128023dff binutils/po/tr.gmo -941be04384a3c2dde1cc26006f61507d binutils/ChangeLog +9bf796e115fee6d65bdb38380f7a3166 binutils/ChangeLog b5cdad82744fc980cc7b7b089d07fc43 binutils/ChangeLog-9197 14304b5ca4a2273914dfcad6be18564e binutils/ChangeLog-9899 -dc750d1b7465f608bb0c139ecf188e47 binutils/MAINTAINERS -b44afb6280773318d2da5cd5e6bf505a binutils/Makefile.am -48b1b37b42123ecb120efc55bad18417 binutils/Makefile.in +f4b1134eaff4b3f7ee41d80b3e4fba0f binutils/MAINTAINERS +f9ad72a1d08ab75de80a159dffba0aae binutils/Makefile.am +a3dbf74cd77985e0f99c732420038865 binutils/Makefile.in 02b4e7f7a43f859cf413bbe7380ef169 binutils/NEWS c482556fefea3b070793f1fe5abea58b binutils/README 949ae831863e3d2d546a13e90598af7d binutils/acinclude.m4 -c081cf7cf4da88a321ddd8efe08f5d2f binutils/aclocal.m4 +9748ed9e4454471a5045034a20ce86c9 binutils/aclocal.m4 eec03203ee0e9aabb35d574ed8c1a26b binutils/addr2line.c e0723361fe2ede1138a958273e39e77a binutils/ar.c 53d2435f6e356c5ef57cbe7daf92de70 binutils/arlex.l -5e234398e134240a685477dd35dfa867 binutils/arparse.y +348b15dd2ecdc1de405d3aec06c263d1 binutils/arparse.y 80b0492ece2d07126846e2e611d8d022 binutils/arsup.c 8d0b184698d58971b7b74fce630bbfb9 binutils/arsup.h 6ab44945d77ea125a8b557ec3417c1a8 binutils/bucomm.c @@ -465,18 +465,18 @@ 0be712b067926615f603674639c76aac binutils/coffdump.c 94e3b7c0523a42ce0ae61f172b441a10 binutils/coffgrok.c 9eed28014242953167ba70db6eb6c772 binutils/coffgrok.h -058b18d2253de11b64a4478ba3de137a binutils/config.in -eaf7188494eeb80261eaf7c0296c67e6 binutils/configure +3568c790376d0dffc9713d6081c1d5dc binutils/config.in +ab95b0d50f87eeb002ce97dff1085684 binutils/configure 0df24a539b5dcfb1c9b147d28b80e05d binutils/configure.com -17fe30234cc9027b0085b4ac08b0b89f binutils/configure.in +ef0afade065de86eaffa82307c6f5b85 binutils/configure.in bd5c323adf047cfa77d61ab3a1d30948 binutils/debug.c d067535d0ee0e2dfef7c101ae9ed5afd binutils/debug.h f3bc4c49528dbeb97029c901b2a1cfeb binutils/deflex.l 8bcb206c1d8f44c8b39c560bd2f4dff7 binutils/defparse.y -fb7920a70d8eba8b94fd446da371604e binutils/dep-in.sed -d0b43663e32b11a1230b23375aca287f binutils/dlltool.c +9c2fd2da768ed77f3756c24da7b8a3e1 binutils/dep-in.sed +0c9f07f1a0ab599bed3c49ae0802147d binutils/dlltool.c fcd4c7531e0ae0b27cc707d49df82bda binutils/dlltool.h -3ba783b114ed117ee20a0510f7cc191a binutils/dllwrap.c +3cf3591c76ae414f0b7c7cd1a86d97bc binutils/dllwrap.c d7bd6f5d07c781caf5cd1a0b20633900 binutils/filemode.c 321ff0d85aa4e062bb891eba8f971734 binutils/ieee.c 4d04341c680f1136f390abd07d49caef binutils/is-ranlib.c @@ -490,25 +490,25 @@ 63bcb6ff23933514164dfc5517d27db9 binutils/nlmconv.c cf949369d105afd57bab40a2101f089b binutils/nlmconv.h ef7054abf6dd9de5728bde127b5f719a binutils/nlmheader.y -0db2db4f16811e7b27cc8d4b462a27cd binutils/nm.c +bcb46477d1bea96984d259cf179f452c binutils/nm.c b3c63de023675571764212902c24ee77 binutils/not-ranlib.c 7b521296e81503ee1a37cc77039dc203 binutils/not-strip.c f3947d53ae90dc9dd7b8fbcd1e988553 binutils/objcopy.c f6a1e7e1f4defc036148b83571263b88 binutils/objdump.c f9e36e9e0cd55ab620e09fdebeca42cb binutils/prdbg.c bec38036243f76c13fa87b092c0292e4 binutils/ranlib.sh -070ec13ab8190e03aa734bd0614bef8a binutils/rclex.l -88ddd329e62fecf378b49260eff95b23 binutils/rcparse.y +c3882d6eabad7a8413e75561d12fccea binutils/rclex.l +c1aa8b9245907b00714b1155c1546b69 binutils/rcparse.y ddd9b9d17599b40e8eb39c954503ee6b binutils/rdcoff.c c13b08d97206def27a7f8612f0b73e89 binutils/rddbg.c -9df242376767b853fb0a4092e05c5683 binutils/readelf.c +bc972ae0889600334b51204444854e0d binutils/readelf.c 301dda393ce6198dab5c0fd289e3d333 binutils/rename.c -d128d999bb8a16ffc6c6a8d10eb05a41 binutils/resbin.c +d17bafc375f6bdd3f4c201c1cdb76b34 binutils/resbin.c 616cbfbe6d9e4a292c807f7fd9b8f993 binutils/rescoff.c -4b5323abfb64ae9c8bdb6d10aa616cda binutils/resrc.c +6699f30780acb4185577625025673d3d binutils/resrc.c dc61a15e502cb48be57445b304ce2158 binutils/resres.c b62e62e9c7d29e37c5968c1a005f3eae binutils/sanity.sh -5cdbab9760c92af2cdaa8091d10ded2f binutils/size.c +c5c737b25982625ca572c7508c8efacd binutils/size.c 1dbc37e17196ddc56d2d7e10278e514e binutils/srconv.c 13bb0308fa155e46eb89671b6dbf9d81 binutils/stabs.c 1ded054093de910d9786c62bc4fe8cc6 binutils/stamp-h.in @@ -520,8 +520,8 @@ ae478fcb692bbeea3704a61d603cf694 binutils/unwind-ia64.c 836ad638b88e86bdb20e53e885f778a2 binutils/unwind-ia64.h 5c57b5026a34ce18e19e3a29a1037ce3 binutils/version.c -c09766067791071fda5e9c193bf24801 binutils/windres.c -915f3426e6f536a043c0b068ad03ab53 binutils/windres.h +5c90e724b793f3c4ae2176c04aa2a033 binutils/windres.c +0661599c2712d4fccef26a36b97a8ebc binutils/windres.h d0bda9419e98de93a8f0adf09e9a3999 binutils/winduni.c 656d6daadd2719e5d0c7fe398114e95a binutils/winduni.h ae70fc3e3a4b06b464f1cff343f8e6ae binutils/wrstabs.c @@ -535,8 +535,8 @@ c4443cc7bdb7c3b91b37745189fadc1b binutils/testsuite/binutils-all/objdump.exp 351c894b152905ec2f4ebf3641355685 binutils/testsuite/binutils-all/readelf.exp fd5d39184621cf8c2e7ff6b2404d299d binutils/testsuite/binutils-all/readelf.h -9605cd1eae02714122e2be0b0861717d binutils/testsuite/binutils-all/readelf.r -234964c690faae11a00a9178e949f8d4 binutils/testsuite/binutils-all/readelf.r-64 +21cb9025a426c8a27de071549d4ef28d binutils/testsuite/binutils-all/readelf.r +db24a07247dc8cd58f7d1987a549d485 binutils/testsuite/binutils-all/readelf.r-64 93a710740488294f2458be7b750ccadb binutils/testsuite/binutils-all/readelf.s affe0898106440ea3eb943b6e78f6884 binutils/testsuite/binutils-all/readelf.s-64 b1d2f987e8bc3b99c2f25d3b1ad0ba7d binutils/testsuite/binutils-all/readelf.ss @@ -556,24 +556,47 @@ 1f7bc9a6f7a05e70001fc557f9cdf976 binutils/testsuite/binutils-all/windres/strtab1.rc 453c4b4299fb6238d70482f45bd5acae binutils/testsuite/binutils-all/windres/strtab1.rsd 1b830cc7474b7d15f588a5ee5b0cbf23 binutils/testsuite/binutils-all/windres/windres.exp -9a011fa9d1657d5a97394e29018a64ff binutils/testsuite/ChangeLog +c9c4373f416e2d2321e55e88e7de75d8 binutils/testsuite/binutils-all/windres/capstyle.rc +2cbe0a310f92d1c5c565041be2f5afab binutils/testsuite/binutils-all/windres/capstyle.rsd +ac38823599885e755f2487efa5e214f3 binutils/testsuite/binutils-all/windres/deflang.rc +ec150037bb58aed9e172b35e56641493 binutils/testsuite/binutils-all/windres/deflang.rsd +5e29fa118e3e03e87d839cd18fa13f66 binutils/testsuite/binutils-all/windres/dialog0.rc +ec150037bb58aed9e172b35e56641493 binutils/testsuite/binutils-all/windres/dialog0.rsd +ac7fafe088ed3f14887a21e8f6c3022e binutils/testsuite/binutils-all/windres/dialog1.rc +ec150037bb58aed9e172b35e56641493 binutils/testsuite/binutils-all/windres/dialog1.rsd +c3efb314b67227f2ae24c087c3b22716 binutils/testsuite/binutils-all/windres/dialogsignature.rc +99d0d7339a83b8e7bc1442ad005028e3 binutils/testsuite/binutils-all/windres/dialogsignature.rsd +bdfda752dd00993588658c343d5db784 binutils/testsuite/binutils-all/windres/dlgfont.rc +44ded16fd8aa5d243d77021e0c63ee5c binutils/testsuite/binutils-all/windres/dlgfont.rsd +bd13c4e0cc1c8cf49e20f0f62a5d2ce0 binutils/testsuite/binutils-all/windres/escapea.rc +75762cb5686cfca0a273cd77d6034a3f binutils/testsuite/binutils-all/windres/escapea.rsd +d89135fb6f7b032a74a47b697e3cea11 binutils/testsuite/binutils-all/windres/escapex.rc +1abf5fdcd19714aa098f988aba7ff124 binutils/testsuite/binutils-all/windres/escapex.rsd +ac38823599885e755f2487efa5e214f3 binutils/testsuite/binutils-all/windres/nocaption.rc +ec150037bb58aed9e172b35e56641493 binutils/testsuite/binutils-all/windres/nocaption.rsd +c895fab04cbfecb4fdb0479474afa20b binutils/testsuite/binutils-all/windres/printstyle.rc +c9677c01c151e304240fc99f06ef71c2 binutils/testsuite/binutils-all/windres/printstyle.rsd +b538b353dad0e50d7daec45b6014a7dc binutils/testsuite/binutils-all/windres/quoteclass.rc +a9d96ba138857d78e87ecb5facd8e77c binutils/testsuite/binutils-all/windres/sublang.rc +ec150037bb58aed9e172b35e56641493 binutils/testsuite/binutils-all/windres/sublang.rsd +b355c626bf3f93cfc8dc433e7e07095b binutils/testsuite/ChangeLog eae967cd04024ac1b6dbd0110c65b24b binutils/testsuite/config/default.exp 332890f8e08b7aa8c60bb35f6065c211 binutils/testsuite/config/hppa.sed 88875f5e0e9526d0c4ac77959dc3f982 binutils/testsuite/lib/utils-lib.exp -ae22b11f723c2397383192b97ff78e20 binutils/arparse.c -8378def3603dbdb08335249693635f17 binutils/arparse.h +eed105a774bb37c622e38b3c84f252d9 binutils/arparse.c 43f543ff4d9670d213b73a7f31e74c90 binutils/arlex.c +67a9eef3d2d67d371685afe297766bc7 binutils/arparse.h +73cb4915c023d02ef6d380adb0b113fc binutils/deflex.c +c63e89cc9b94d5d9ab674cc680f8cf3a binutils/defparse.c +5ca091ca7f8dc98fc073cf2f020f0de8 binutils/defparse.h 23dc9cf528351ba948b8168e9eca683a binutils/nlmheader.c dd15590f03664399390b1224c7a4b2d8 binutils/nlmheader.h +416b6ba0209b96519becdf46aa3b7d4b binutils/rclex.c +0bdf71afad646eb194974942f81ad044 binutils/rcparse.c +cddaffef3907c9174e41ba273b383daa binutils/rcparse.h 66595561811361471467de04e761be88 binutils/sysinfo.c b5cde5a2c92898c1947056a42df702bb binutils/sysinfo.h 0a818f4c61bd561b19ba7a5b61bd75ca binutils/syslex.c -73cb4915c023d02ef6d380adb0b113fc binutils/deflex.c -c63e89cc9b94d5d9ab674cc680f8cf3a binutils/defparse.c -5ca091ca7f8dc98fc073cf2f020f0de8 binutils/defparse.h -4d9fba3d8a2a3a9d9b3266bea2610cef binutils/rclex.c -d4b9056c0580c43c3c7ad97b04f4f165 binutils/rcparse.c -655a9d3b46fafa3c394d4bbe9e384275 binutils/rcparse.h bf1e177862ddef9aa6970474ca011825 config/mpw/ChangeLog 43d2a9ca5ff1a5f5acd3390b7b082830 config/mpw/MoveIfChange d9387d651ddbc91875c97259d0fc35af config/mpw/README @@ -691,11 +714,11 @@ 06b407be57cbacc7ba05787f8072be7d gas/config/obj-aout.h 0654ef94f64494daa7edd22ba6de505f gas/config/obj-bout.c fdc8729ecc7985ac4dc9531bf8ef8e77 gas/config/obj-bout.h -3d4d78495587f5096f1ccd472a2ba496 gas/config/obj-coff.c +3c2ed4acb265d27459e92305a1ba6da6 gas/config/obj-coff.c 19970876bce8955420dbf1b8abab0ded gas/config/obj-coff.h 25ba6eeea447fa63a75135e1d0065294 gas/config/obj-ecoff.c 39d1ce7b5d484ca95d660c2a1e4eebd0 gas/config/obj-ecoff.h -ff5c1e36a9ce9351982b8806a1b566ab gas/config/obj-elf.c +650f9296104555d3e9095147defa92e7 gas/config/obj-elf.c e42110a7d8d0cf015fb7d62f2125182b gas/config/obj-elf.h fc5244809078292ed69543b590057d60 gas/config/obj-evax.c 409f2700494fb5da88cd17bd13787e30 gas/config/obj-evax.h @@ -717,7 +740,7 @@ 6c2cb2264111b13e073a83edc063fd76 gas/config/tc-alpha.h cb66ba5e7597601010e4a1fd84197b05 gas/config/tc-arc.c 6e32c9de29a25fb2d90793fe952fdcae gas/config/tc-arc.h -60ddfa96a7f268f0607b7358da7c91bc gas/config/tc-arm.c +498662193a4af7f3b6615c89494ec239 gas/config/tc-arm.c dbf98bb550befb2e7bff847057a52935 gas/config/tc-arm.h 938ba68443279a512c0a6d763c9ce736 gas/config/tc-avr.c f73db565c4364bada2eb99782cac41d7 gas/config/tc-avr.h @@ -735,18 +758,18 @@ df431317459075fa195308c7a8364e84 gas/config/tc-h8300.h 47c48f36afbae1ca7f55e187e84c9d91 gas/config/tc-h8500.c 664c496490b0f88854b345cb940eca9d gas/config/tc-h8500.h -64193f5f9e3e6cf6b3e13d525eaee103 gas/config/tc-hppa.c +2f8e0e7cf45c7c710a793d830bb4f797 gas/config/tc-hppa.c e8640b54618c4f482d3ee0e0bbe58200 gas/config/tc-hppa.h da664657627a3a35180d4375c68bec82 gas/config/tc-i370.c 86f64b933530141bad823efdbbdbe273 gas/config/tc-i370.h -1a9c0fe6686d5833844d3939537fc392 gas/config/tc-i386.c -a571fdca6af0c644e3a1664988149717 gas/config/tc-i386.h +3f8aaf040d24f81377429c2f64a732a5 gas/config/tc-i386.c +c0bd0589b70e14b4656f86f6181f2576 gas/config/tc-i386.h 021f0f3f7d1a2f996d3f369a86f102af gas/config/tc-i860.c f01806b4d906e071b0a0855834fd2276 gas/config/tc-i860.h -e11b2ea7c533e8e1e9f534fdec4d20f9 gas/config/tc-i960.c +ac30d9f3e47ebc3f36c6d682861849f8 gas/config/tc-i960.c f631d3da92f20c538f295b5906cc7a33 gas/config/tc-i960.h -4f6572fca0d1fdd1e89bb0b16d18dbc0 gas/config/tc-ia64.c -310ae7d64eb5e98a7f5e91ae44cbb2a6 gas/config/tc-ia64.h +edaec14ca63fcf4b719dcaff83403f5a gas/config/tc-ia64.c +60967e6c79f23703d99b3d8cb0dbdf95 gas/config/tc-ia64.h 41e5fadfe2e338b844694c518ad448c8 gas/config/tc-m32r.c 93f4d986a0d76e4552b4d4a6f2243aee gas/config/tc-m32r.h a12bd005331953eec47146cd4b2fcbb3 gas/config/tc-m68851.h @@ -758,9 +781,9 @@ 107c3b50693b48561ea3e1f21427f814 gas/config/tc-m88k.h e36d5477ea749cef1d168c7aaa120fbc gas/config/tc-mcore.c b3a6cfa6fd73aa02d1ebd6bc7b8fa987 gas/config/tc-mcore.h -9ce2fc522234928d6dfe3c7d56bbdd7f gas/config/tc-mips.c +3c829175b1437722f2bcc03eeff30b01 gas/config/tc-mips.c 4b13aad14adc6b080a89466c63362e62 gas/config/tc-mips.h -8944da558ebbf7a01f517ded249dec0b gas/config/tc-mmix.c +29073d40383f2fc0d7a31289cae7dfbb gas/config/tc-mmix.c cf91fef839ee83733fab1152c19c807a gas/config/tc-mmix.h 238de1b2164f8721eac05ba107fca4ba gas/config/tc-mn10200.c ddfa9f2944199d59c5a1137643f3fee0 gas/config/tc-mn10200.h @@ -776,12 +799,12 @@ a1da5e3f769e365e626eb4b358fe8a2d gas/config/tc-pdp11.h 6a8cab7c4b6408426bc0e1bf28e71409 gas/config/tc-pj.c 581c2ff25424db08e16882dbe7a45dfe gas/config/tc-pj.h -4146caf6f9177151c51264ff8d0ae8aa gas/config/tc-ppc.c +4736620c4ace3d728e7ff330e22ac9b0 gas/config/tc-ppc.c f6edba715948e72644ebaa7a07b9004b gas/config/tc-ppc.h -49e0ffd753b58b99ff02d6c520898ba9 gas/config/tc-s390.c +5500ff57d224762e4830c567f70e119a gas/config/tc-s390.c bd574e71c3d93edaf5767dfec1189ac7 gas/config/tc-s390.h -16ab475709ca3c735feccb00c22d57cf gas/config/tc-sh.c -0fe9669521297d844bc7d390f75fe902 gas/config/tc-sh.h +54acf70b542ab6bc83ae1128cbe5dc46 gas/config/tc-sh.c +d54fcb91846ca2025744c70a413b0c36 gas/config/tc-sh.h e448404a8fae41ee7f240937000dfe7d gas/config/tc-sh64.c f4a03883dc1f6633ae02b3461b5d3a06 gas/config/tc-sh64.h cebe7198178107d6bf26b54796c947e5 gas/config/tc-sparc.c @@ -801,7 +824,7 @@ e15c09ed821d9617eaa67298e72733b8 gas/config/tc-w65.c 231d1e1a8dec70bfc45b3b57ed56306e gas/config/tc-w65.h 999f2aaf2182f63b76e6d97a6d2970e6 gas/config/tc-xstormy16.c -abee034db7e5af8ce1737ff6e3f3af40 gas/config/tc-xstormy16.h +b7be551bf7110b752dfab18c496d1027 gas/config/tc-xstormy16.h 8a57ebc5db7e6bdccfffcb22c71d898c gas/config/tc-z8k.c b985cc503b319a201bc0ddf5a2e9cb23 gas/config/tc-z8k.h 40b4f0d89e0f7a47828f7e6b2eb98cf8 gas/config/te-386bsd.h @@ -846,21 +869,21 @@ ed8248ba3c34b041f1d8942b285d6196 gas/config/vms-conf.h de47a876f200861dcb2d222f6641f960 gas/CONTRIBUTORS ceab81aa1f02825092808fdafba0239d gas/COPYING -01003d9d32b4aab8f0e3951f4af39ecc gas/ChangeLog +3be000c9a22f10d21c183ca5555c9638 gas/ChangeLog 9ecb01297d27a4e8565104c1eb0f1d01 gas/ChangeLog-0001 7d8ca9ba3eaab0c7d27c86fb7d9b394c gas/ChangeLog-9295 00c130a2ca3989987e76f520e90a94d0 gas/ChangeLog-9697 b09e1a0dcfe76f2925e7ff322422c1f4 gas/ChangeLog-9899 d618facc3e8ce8bf3d02ba452e1be6ab gas/MAINTAINERS -ead3f3950cff8d089bdea548c396b57c gas/Makefile.am -73ca1287c470d4c2e59e5cd24ca8e9be gas/Makefile.in +02b8ec73d1eddd77d26d3178c972a3ad gas/Makefile.am +091bd10a46ef8437e475a3d5bbda32eb gas/Makefile.in 473bb217479269a3a40373cd901a03fe gas/NEWS 590233e5d8a532995b777fb7f7a8b5c2 gas/README e8b1e941cbf0b441da52f38fd2ea9725 gas/README-vms c66ab308e6d86fac0000d1a9322838b1 gas/acinclude.m4 -8ab60a188dd0dee549dc7113f3656365 gas/aclocal.m4 +2888e3525b35c5ba4cf302ff552e84c9 gas/aclocal.m4 b82382f92c25433558ec2c1e8a0d3e61 gas/app.c -fd2d91acc37a58c8f953c87ea0b48ac8 gas/as.c +8fb8e82fcb8f761363fced1e6c279b60 gas/as.c eaee7bda149be5a99a88210240ecae15 gas/as.h 70eee11ef3b99a2aef25cc4e5355cf38 gas/asintl.h 3a04f2a058fbbe2a901ea8a0b40efdcc gas/atof-generic.c @@ -871,11 +894,11 @@ 7718ed6a94e867a37ccaaf65b224a7f4 gas/cgen.h c26b49d1e2802d0a5f092382e6340b42 gas/cond.c e46511c2ddcf00256c007081122f6678 gas/config-gas.com -04dddaf407d64ff4cfe5b1c09e7c985a gas/config.in +d6e13c01db8ce1707b64a7112714f6e8 gas/config.in b7a3774cb25522cda555c928d40dae06 gas/configure 04836f16b09607f3ef4cbb4c1a09eaee gas/configure.in 454732b991bc3adfbaed197eb7e87709 gas/debug.c -402433baaaa08f73e6ec935228d2e751 gas/dep-in.sed +e2610e535d13ee6f21a73eb82fbc4a50 gas/dep-in.sed 3592168d024ee221c282c7f51898b5ce gas/depend.c aa26c21ae85e44c2c6150721ef727a68 gas/dwarf2dbg.c 191371b169a1a50bf4cfb6e95875f083 gas/dwarf2dbg.h @@ -921,19 +944,19 @@ 43a3a23b7c6a20f9d5a11ea2ffeab388 gas/read.h e7258e74de805cdf31e919271531c1b7 gas/sb.c cff195f2e145a3038579a1501e9fdbf5 gas/sb.h -46641897816f50a0521a3b0a855aa4ab gas/stabs.c +38450641279402255e322b3bf986ad08 gas/stabs.c 1ded054093de910d9786c62bc4fe8cc6 gas/stamp-h.in b1d5b512fa4024715392a3ea14e3f8f9 gas/struc-symbol.h 8a5eb9c132a9636a59fa720ea8563561 gas/subsegs.c 260af34792338267f3927dc44a3a8197 gas/subsegs.h -5f2033ca3a31b20bf02fcbcf8d287744 gas/symbols.c +d3ac1e1905dacc4455d27974eef1d7de gas/symbols.c 754355227d097d115728124325fe6e8d gas/symbols.h 1fe7e371de1a5f3416387a17cb8d1e8b gas/tc.h df57d3e0b2752e5caab5294b3acee98c gas/vmsconf.sh -43434dca06a5765035c69a0fcb1c6903 gas/write.c +4826081cfe6e9db9c6d8e5d6ea05672f gas/write.c 317dde246bbca73361da6bbb7cecc3d9 gas/write.h 777171485e6b54ce2f4bf982d0924499 gas/doc/Makefile.am -59dc0b36446038be393f5f723f82b29f gas/doc/Makefile.in +75d24328416984dc2621e87ccd7ffc90 gas/doc/Makefile.in 1c9d2cce0767576ae2e109fdf85d7b19 gas/doc/all.texi b8c5ba4d735c4be0b6cfb40d11007c4b gas/doc/as.texinfo a59215bdf94de57a0285409852af014d gas/doc/c-a29k.texi @@ -970,20 +993,21 @@ 8ba1c8507b412944e6c7bdc67da6d964 gas/doc/gasp.texi 73b674cd9bd9d15802cc28334b6a25e1 gas/doc/h8.texi 94abf814b4676b9b0cab4a53f0c83d10 gas/doc/internals.texi -d6ead02b2c10313a98369ba713078bd3 gas/doc/gasver.texi -b53fb1fcc11572ef784d8d5a89a173ff gas/doc/as.info -92f76feec5ad7ad26c5b7a206e3bfcd7 gas/doc/as.info-1 -7014bf9f239fe2b926c6860a48e452fc gas/doc/as.info-2 -f347f3f96626e217e891507a0c215b19 gas/doc/as.info-3 -8ebbd39976537574f3e8a8d083e6f2ff gas/doc/as.info-4 -c17fb5cb26e29e6c7785352d0c49ce09 gas/doc/as.info-5 -aebcc5174f9d71669e9f5c9edc6d4846 gas/doc/as.info-6 -cff98b06e8926642a4a3478393667d66 gas/doc/as.info-7 -2945dd7e5f0f0aca0aa249428ceb23aa gas/doc/as.info-8 -c113626f81c3a19438f85a5c4cc340fb gas/doc/as.info-9 -cfeb8d6015594c25bfcb3c7828d5f66b gas/doc/as.info-10 +ea24fb80ec784eb9d5d0264029575c21 gas/doc/as.1 +631e503ded9552f9415ca61952d5ea4e gas/doc/as.info +66645c07ee69d08c426dada21580ec32 gas/doc/as.info-1 +141bf0ea7d190f6b9f35c73b386ce37c gas/doc/as.info-2 +ec1661892271481948b279c35efcb50b gas/doc/as.info-3 +392efde510635f786ab41f0e0ec8376c gas/doc/as.info-4 +2509484d801d337fdedd0eeaae7c2750 gas/doc/as.info-5 +5570c608c62fe7ec34b0319fa8e5733a gas/doc/as.info-6 +47449f315134a112a0edb955180e1f9f gas/doc/as.info-7 +aab4432886d976d1927fb7437f736613 gas/doc/as.info-8 +0a376949d91743934911771c3291b044 gas/doc/as.info-9 +a84ad58eaa4fbeea31faa6abb76cc2bb gas/doc/as.info-10 cf484d6c7ee2ac775600a5b5ed4fbd0c gas/doc/gasp.info -72705166b1c54828bca81a07576dc85d gas/doc/as.1 +230f6c7c3cd3d3af7422e5d4d5589053 gas/doc/gasver.texi +2eaed328a4ed8d4a54c915d914b79ddd gas/po/es.gmo b9c5a43c08d47586c6e2ada63d9293ad gas/po/.cvsignore bfb5c178c2404196ab54d7532a61e3d4 gas/po/Make-in 5d4614054ecf7bb166bdf21ab471427f gas/po/POTFILES.in @@ -991,11 +1015,10 @@ 98ea85a90fb846c8f6f892e829dfb9a7 gas/po/fr.po 76cd38d0ca23d6fc2b330960008f1f6a gas/po/gas.pot 9120326b02c49d251f7d5da8509d09c9 gas/po/tr.po -2eaed328a4ed8d4a54c915d914b79ddd gas/po/es.gmo b99dc67d6803c989d944c29f98e7097d gas/po/fr.gmo 83437c4ca06c7189b8d99f04aa58e769 gas/po/tr.gmo 189b37e66fa0d5345240ac619d9c94c3 gas/testsuite/config/default.exp -74a4b43cb625e864ae05edc71691038c gas/testsuite/ChangeLog +2166c1b633adbfa6bd051503c737626d gas/testsuite/ChangeLog 6fdc3af8b63d5c8dd0a98137215d3753 gas/testsuite/gas/all/cofftag.d acc0977114e4b9e65b9d2aa95c35ff8f gas/testsuite/gas/all/align.d a60277af402def6d8b222eb7aa29fd72 gas/testsuite/gas/all/align.s @@ -1458,7 +1481,7 @@ 500906f02f2d8b74365d5c87cf1c4cc4 gas/testsuite/gas/hppa/parse/linesepbug.s adf3dd32e97d184fa3a923e977ac0f20 gas/testsuite/gas/hppa/parse/lselbug.s e09d99b9bb0cc52546de922bf02a3a13 gas/testsuite/gas/hppa/parse/nosubspace.s -9cc426a4386effaef7b9f5a77f941ca0 gas/testsuite/gas/hppa/parse/parse.exp +cb6938a696828bd48361b92b868df296 gas/testsuite/gas/hppa/parse/parse.exp 030b7a7332dca245ae8a65a00ab8e169 gas/testsuite/gas/hppa/parse/procbug.s ba4a443e4362a957c9eda52f33e9ed56 gas/testsuite/gas/hppa/parse/regpopbug.s b19738063af645b6f2231ee644131542 gas/testsuite/gas/hppa/parse/spacebug.s @@ -1503,7 +1526,7 @@ 481a82666e24dd35712ddbe1953070fc gas/testsuite/gas/i386/float.l 0df7ab956e3209428d665890983ef957 gas/testsuite/gas/i386/float.s c6f32143c1a338a7e3c688cadb2a27b3 gas/testsuite/gas/i386/general.s -9ecaf2e289bc75b7db78a8151b8afb5f gas/testsuite/gas/i386/i386.exp +ac28c59246b1df920be9853cfea60c5e gas/testsuite/gas/i386/i386.exp 655971c98893f502e2bc6ac8e3ba6164 gas/testsuite/gas/i386/intel.d 19173fe8ed78eaf92af5f4e7219aed51 gas/testsuite/gas/i386/intel.s 734d748810614b19b03ac10dfde2b1f4 gas/testsuite/gas/i386/intelpic.d @@ -1536,6 +1559,10 @@ 305b7d730a90ea5ac8fb330a3bf13fec gas/testsuite/gas/i386/white.s ce6e4697a15d14342aaeb844266d6585 gas/testsuite/gas/i386/x86_64.d 167651a8472e8240a82c364ac9738761 gas/testsuite/gas/i386/x86_64.s +956f8bf80e3f9f992bf979d91241aeb3 gas/testsuite/gas/i386/x86-64-inval.l +96241d4dff1eecb9d1cd8a2376325e8a gas/testsuite/gas/i386/x86-64-inval.s +969d10396ba4e548307e0f3d98ee7ac1 gas/testsuite/gas/i386/x86-64-opcode.d +0dd13f6dff7c541b872d48ca75a0c809 gas/testsuite/gas/i386/x86-64-opcode.s dbbf38f460db18779a5e3b6d064eb499 gas/testsuite/gas/ia64/dv-branch.d ec058dd65d1af91fe84f41b725857462 gas/testsuite/gas/ia64/dv-branch.s 956561267da937b1be0fada7c6ea25c7 gas/testsuite/gas/ia64/dv-entry-err.l @@ -1794,7 +1821,7 @@ 49eaf79b46ed3df73a7bd49dda0611ed gas/testsuite/gas/mips/mips-gp64-fp64-pic.s a3109a5d073e5998c268442044397c4e gas/testsuite/gas/mips/mips-gp64-fp64.d 0bba7e49525b335ca7a88ea75cb22c73 gas/testsuite/gas/mips/mips-gp64-fp64.s -375c347872e403b0d22836e5efc06376 gas/testsuite/gas/mips/mips.exp +a343358e8e88f74524c59df59f23be18 gas/testsuite/gas/mips/mips.exp 4f445ce50926b956d4558a0b89dd512f gas/testsuite/gas/mips/mips16-e.d 4785c49a602347865df48551df7121fc gas/testsuite/gas/mips/mips16-e.s 6d7a5a9da49ca90cf4eecd02b17633f9 gas/testsuite/gas/mips/mips16-f.d @@ -1889,9 +1916,9 @@ 05d195120b5515ee53b3684af0886c8f gas/testsuite/gas/mmix/basep-8.s 534821529ee48571e9b8c871e6f9b8a2 gas/testsuite/gas/mmix/basep-9.d a6c575e157fa1cc3b59fe0673bfdb774 gas/testsuite/gas/mmix/basep-9.s -690aa1d70e204d384002df6bdddfe68e gas/testsuite/gas/mmix/bspec-1.d +c40c7620b6807156d402256d0fc41f8f gas/testsuite/gas/mmix/bspec-1.d 3b3451908e6ec6497534ad8235de53ed gas/testsuite/gas/mmix/bspec-1.s -a7ef6f4c4e07b5215931ff79108cdc1d gas/testsuite/gas/mmix/bspec-2.d +120e2bbe9b145da971ab609a40465a55 gas/testsuite/gas/mmix/bspec-2.d f179d58461561c9d5fe4a315ba7279be gas/testsuite/gas/mmix/bspec-2.s 1456f99ee48ac42b4003bc2bd70d3e73 gas/testsuite/gas/mmix/builtin1.d 686fcfd029e0d7ae40eb9d1ebd2a555f gas/testsuite/gas/mmix/builtin1.s @@ -1901,7 +1928,7 @@ 213a0515cb4eabca23e4b8085a9a1541 gas/testsuite/gas/mmix/byte-1.s 5c24095f5ad2a37e791f29a01e03f345 gas/testsuite/gas/mmix/bz-c.d 19eb7e29b6312fb84cd4b8369206e437 gas/testsuite/gas/mmix/bz-c.s -bd44f3b2df5c655188ffe58d91d76717 gas/testsuite/gas/mmix/comment-1.d +e61096fdaadb1695b39590fc39796e22 gas/testsuite/gas/mmix/comment-1.d 2b581d9ded37c949d0f9cd141cedde94 gas/testsuite/gas/mmix/comment-1.s bc91b8f10942d61b868e093e3b2e5a37 gas/testsuite/gas/mmix/comment-2.d d9246d1719c9b5d96f744ae8a5d335a0 gas/testsuite/gas/mmix/comment-2.s @@ -2135,6 +2162,8 @@ f5d6823ab550c4ea97a04f14883a0c0d gas/testsuite/gas/mmix/unsave-op.s 2a8ad7ce58111df46b6503b325124cc5 gas/testsuite/gas/mmix/zerop-1.d f2a213b73ea27ef622ba39f9ec2987ec gas/testsuite/gas/mmix/zerop-1.s +b0f0c8e9a965c78836bc9a18690a99f0 gas/testsuite/gas/mmix/weak1.d +64ee02ee7066364e0eadac9c2c9508d6 gas/testsuite/gas/mmix/weak1.s b00b8e50d58ac967e8e84c9dc8df9075 gas/testsuite/gas/mn10200/basic.exp c58581edb3ac95b306f040bbc2c16678 gas/testsuite/gas/mn10200/add.s b117e36f812c2eb416156d441f26185e gas/testsuite/gas/mn10200/logical.s @@ -2228,10 +2257,10 @@ f3a7124485548781ba12a81c18199e29 gas/testsuite/gas/pj/ops.d 308d2177ed3b3b087d977e46c924fc0c gas/testsuite/gas/pj/ops.s a6667ed6fc7b116477f95ef897bc5444 gas/testsuite/gas/pj/pj.exp -aa79c3eefbad774c4dd2034a36d1d1c9 gas/testsuite/gas/ppc/altivec.d +c54bedb0fa44309e1eeca9503e40e24b gas/testsuite/gas/ppc/altivec.d d58bde36c5710dc2dc3b85859434d5a5 gas/testsuite/gas/ppc/aix.exp 1144f1624f81b2bf57bc44af8e76f9bb gas/testsuite/gas/ppc/align.s -3f847dfd28877382321ade661d58082e gas/testsuite/gas/ppc/altivec.s +da75a2b442b5537342a3fb0ae74a0510 gas/testsuite/gas/ppc/altivec.s 96a9890816c6c3314d3862d35fe59f3f gas/testsuite/gas/ppc/astest.d 5254d1fc440f434a46e97eb96b2735c1 gas/testsuite/gas/ppc/astest.s b9b4926634e4c4e6e812b47b38a2f84b gas/testsuite/gas/ppc/astest2.d @@ -2726,12 +2755,13 @@ 6ea8384ec634ba0ab82858ca26a8e3e4 gas/testsuite/lib/gas-defs.exp d78aaf1191d033531d00fa9888214ee0 gas/testsuite/lib/gas-dg.exp 499042a4448e4b2d3bd2b2a1b0b5d859 gas/testsuite/lib/run -b905aee5c2a099f7d2579459121c7e2b gas/make-gas.com +35a31c2385808a0555abdfeeb65a0655 gas/itbl-lex.c 93ad99ac6b3d8b35edf8a9b2c2f51b52 gas/itbl-parse.c -6fefa7589cf144ae9e9afbe3b8542637 gas/m68k-parse.c eccdbcefc28b249b2268297f99dc4266 gas/itbl-parse.h -35a31c2385808a0555abdfeeb65a0655 gas/itbl-lex.c +6fefa7589cf144ae9e9afbe3b8542637 gas/m68k-parse.c +b905aee5c2a099f7d2579459121c7e2b gas/make-gas.com 13826625656aba07bca01dcb42d3deae gettext.m4 +a320cb30d245d09de69749ba4d42b35b gprof/po/es.gmo b9c5a43c08d47586c6e2ada63d9293ad gprof/po/.cvsignore bfb5c178c2404196ab54d7532a61e3d4 gprof/po/Make-in 954b09a7062a564dc338de22ef52c6e2 gprof/po/POTFILES.in @@ -2740,15 +2770,14 @@ c5a8e39d802a78d18fecf40133fa2871 gprof/po/gprof.pot 7860a0fa29f4d38bff4a8067488efa9d gprof/po/sv.po d5ea750e39931c44405fa7a5d20d464e gprof/po/tr.po -a320cb30d245d09de69749ba4d42b35b gprof/po/es.gmo e74dfa40a445d7ed1f2803e382e625fc gprof/po/fr.gmo 866bc22b9ebe6dd63139365742307d22 gprof/po/sv.gmo f4f0e771eec358fa327201e993151342 gprof/po/tr.gmo b167dc5dcf583c07feecea0f8003e647 gprof/.gdbinit -b2e59fbfae71d8bfbe93523da9f2d345 gprof/ChangeLog +8efda13619338f7c1369215e21969987 gprof/ChangeLog d618facc3e8ce8bf3d02ba452e1be6ab gprof/MAINTAINERS -e4705fcbc0174a792a09d5eef71d9b26 gprof/Makefile.am -6081ee2b8c56573e7e0105ed2e2d05de gprof/Makefile.in +109805b6c63492d54554783780a96033 gprof/Makefile.am +00e7977fdf042fc76b2e7065bafd7c38 gprof/Makefile.in 43648972d2edef291b8576a493fba059 gprof/README 84c06350a03466660f0f691ed1220657 gprof/TEST 6ad1234ccac48218eab0cd8e116d7a63 gprof/TODO @@ -2772,7 +2801,7 @@ 6fea5ff4a197d7b828f5244e134cc43a gprof/configure.in 8a0b190099c34100b5ba397ad222cef7 gprof/corefile.c 6f4a5466ff54dd94121335d5fc4dee94 gprof/corefile.h -fb7920a70d8eba8b94fd446da371604e gprof/dep-in.sed +9c2fd2da768ed77f3756c24da7b8a3e1 gprof/dep-in.sed d6498bb2d3ec24087785cd109c215067 gprof/flat_bl.m 609bbce6f5cedf6b0c8d25c3061b582a gprof/fsf_callg_bl.m fa5e0fd0ebd9b3de9ffeb03bea705837 gprof/gconfig.in @@ -2804,14 +2833,14 @@ 3443f1b8ed8ea025b8f3e4894f476f9c gprof/utils.c 9174a73ed79e0d552e57d09390065985 gprof/utils.h 4d595675c8878f3a272c91246527e4ed gprof/vax.c -ef57c2b72bec8ee097e57bdb88c8e326 gprof/flat_bl.c 4709a87f53bbb02123c07fc07a70872b gprof/bsd_callg_bl.c +ef57c2b72bec8ee097e57bdb88c8e326 gprof/flat_bl.c e3b32696628289ee3c8830e98e91d21f gprof/fsf_callg_bl.c -4868c271908833b5c5b85004eb252c62 gprof/gprof.info -7116ab98a6111837e748ee421f953b62 gprof/gprof.info-1 -2f6dfeee5b7685859866323e7ab089ef gprof/gprof.info-2 -82751719ff4d5ecd6265a59a4e678135 gprof/gprof.info-3 -b4c76b0c14fd4a5d81a86ba9755d74fb gprof/gprof.1 +3eef781c6e8c00642897bf3bd0c5011e gprof/gprof.1 +834feee6f550490820607198282df4da gprof/gprof.info +fc8e51252672be635718dd4f5f90bfe3 gprof/gprof.info-1 +2a0c8c9bde41084e01730b946269e784 gprof/gprof.info-2 +fb76cfbd6e7460017128d75ab30d3348 gprof/gprof.info-3 ef0638f3dc2a7905e93d9e9413dd2614 include/ChangeLog 94d55d512a9ba36caa9b7df079bae19f include/COPYING 5f53a7c3a1ee076b7aaaf281c7b65972 include/aout/ChangeLog @@ -2906,7 +2935,7 @@ c38b82bb82381011919906bfc101a973 include/ternary.h 9e4da3ee24c6f11a47fa7d5cae9a03d0 include/xregex.h 4e64756c788701e3cf8120aef5659343 include/xregex2.h -d00497fa6ece0b35faf0336f00e91500 include/elf/ChangeLog +e3dfb2ae15d9707f4000b509b1e9c508 include/elf/ChangeLog 6c018dfcadf31138ad7e161493e19ee1 include/elf/alpha.h 3bf4ae3474c9c4b8310da4a84aec1dca include/elf/arc.h 626789209bed25b0a19f5c8bef7dfac8 include/elf/arm.h @@ -2916,7 +2945,7 @@ f65a19cb8f5a2d53a4c0f71c90bef0e7 include/elf/d10v.h e1bbf4eba14b2efe2dd202e9a7038bd1 include/elf/d30v.h d350084ff96d123c4ee539745ed1ef2c include/elf/dwarf.h -77a356bdf95d181b29f7b994f4fa2ade include/elf/dwarf2.h +ec52e660d1bc2937db38e4d35f974457 include/elf/dwarf2.h 20316b2e92bdd15eb226c7c081bee941 include/elf/external.h 2adb44173bb9ba06c13aef464c4701a3 include/elf/fr30.h f798a607aa48d56dbd707b053dde2117 include/elf/h8.h @@ -2972,7 +3001,7 @@ 83eee47917743f8eadb3cab94449dbee include/nlm/internal.h 5446642ff3b9fee027d46b00a0cd9383 include/nlm/ppc-ext.h 12311cd52e4c3cbb45b2f8eb775cc8c4 include/nlm/sparc32-ext.h -b2686893f9ccc3ba45a54636e64a8af1 include/opcode/ChangeLog +b22b3eeaa75d1c1eae3c4bf51e1488e2 include/opcode/ChangeLog 462ffbe74d2be5d6f8607b4f072e53f5 include/opcode/a29k.h acc2af1775c73fcefe695b8dbd64ff53 include/opcode/alpha.h b240ba7bdef123bc90c1d6761fb19819 include/opcode/arc.h @@ -2986,7 +3015,7 @@ 89b0fa6455f06e2285c498a257b6f855 include/opcode/h8300.h 9097a3d1d1d5fc978faed5a230cd451e include/opcode/hppa.h 7e3c952acc4568fdd1d873147e3c0d2d include/opcode/i370.h -0bc5d9cd4dd25cc1aa28b604005a15b7 include/opcode/i386.h +90f56c06d3848bc7fb058cfd83e1fbff include/opcode/i386.h b2d9c35e0647c729335b50866309ed9b include/opcode/i860.h 10654d7ed7402428c40546e33e5f147c include/opcode/i960.h 05bf164aa56c4c5ab3dcb35d8785aac1 include/opcode/ia64.h @@ -3107,7 +3136,7 @@ 5fcdee017635036a1bad0795d1c85026 ld/emulparams/elf64_aix.sh 335cbaf17b8d2133857e53d03db6ebf8 ld/emulparams/elf64_ia64.sh 88380c2933879fad08bbbfc26f675d7b ld/emulparams/elf64_ia64_fbsd.sh -c188f4c8148736f425484e10e8abb1bb ld/emulparams/elf64_s390.sh +0a3080c8c64660e0498bcab5ab40c474 ld/emulparams/elf64_s390.sh a9ad23b1718711e564c68ba4e73c67c1 ld/emulparams/elf64_sparc.sh b3fd407c41289e537f36340b67d41a82 ld/emulparams/elf64_sparc_fbsd.sh 632a6f086f9dd0e7c5a773241fa24c61 ld/emulparams/elf64alpha.sh @@ -3126,8 +3155,8 @@ 1e1c7793dfab5f3b159bd597f8014356 ld/emulparams/elf_i386_chaos.sh b2bbfb3b8aea41b2e4f983dabe9bd4e8 ld/emulparams/elf_i386_fbsd.sh ad494b6673b84ee39ef9413399901332 ld/emulparams/elf_i386_ldso.sh -6dc1b91829fc60716048f199fe6d77a3 ld/emulparams/elf_s390.sh -cd95c375e252e1b72a2cf3ceae85ea3c ld/emulparams/elf_x86_64.sh +bee2b6329946d70ef14dc6e6880bdce6 ld/emulparams/elf_s390.sh +e718a2a9fe9285a0ea6a322b37b3fb34 ld/emulparams/elf_x86_64.sh f9c682042feddeb572b6e9571bdf4c90 ld/emulparams/elf_x86_64_fbsd.sh a12d58b36cd6e31986d7515c77fec3af ld/emulparams/gld960.sh 16e204dd1b3a385eb2dcf14ccddaa50a ld/emulparams/gld960coff.sh @@ -3234,12 +3263,12 @@ 7efc4f8c9d1eca2e14084bcd65535b9a ld/emulparams/w65.sh cd93ec9e7e74cadfaf8044cca1581111 ld/emulparams/z8001.sh 8890ef4fad0e25044c8d3200a9e77ee7 ld/emulparams/z8002.sh -b35d79570460503702d64a6096238ae4 ld/ChangeLog +9a17157c4a1fa9f84bc462c5de216cc3 ld/ChangeLog 2e04f27f0a15ad7ce7206acabe5ed684 ld/ChangeLog-9197 b73f002c7cc445237e97e9ed358922e6 ld/ChangeLog-9899 d618facc3e8ce8bf3d02ba452e1be6ab ld/MAINTAINERS -cd3598b7ebdb1c900f38115e08ded8a6 ld/Makefile.am -6a4f366507f7049b4d2fc5ebfb34ef82 ld/Makefile.in +a0a0367844dbe06aaed03c4e22bcd1e8 ld/Makefile.am +a585fd08141fe1c3b0d80408281a27d4 ld/Makefile.in fc1caff82c2a6cf2d8d13b85f01a59e8 ld/NEWS 8c9d5c9236dc0e5ada0d35bb40a32512 ld/README 01627b664c7e61ab5dc202bb72913e0a ld/TODO @@ -3247,17 +3276,17 @@ df19be866c0bd06bccbc703554c6d50c ld/aclocal.m4 a9d8b30559e65bf763c35a6798aa0309 ld/config.in 7947d7c1714c17873559d8f51e6bf5bd ld/configure -d7c8cea88f766d1a55aa2f84fa39fb9a ld/configure.host +ce51ffbf9b59b616264773534f301398 ld/configure.host 4cc398d0cc2b97b268c3229fa01bcdb9 ld/configure.in -051ec783084611bdcd800b2cc0ab8486 ld/configure.tgt +714ae3f8e5ee7fd12d85189d2a3929db ld/configure.tgt d3d9eb4581bec474a3cf465160b1371e ld/deffile.h d1c9772b3e705e7e32ddf409e48fcf69 ld/deffilep.y -93fbfa053ffcf82c36613c2e7ca30eda ld/dep-in.sed +252363e6aaf08946f9143c5649036a68 ld/dep-in.sed 1d2f69fe0f7caf6fd83325beeb818de0 ld/gen-doc.texi -170bb2293f08519615fc3b4cc0f1ef61 ld/genscripts.sh +54999d94e61aed3ada2d0cb5241c6baa ld/genscripts.sh d3d6fc53e5f8d5e5f962266911f0441b ld/h8-doc.texi c16e747497abdc220115c58a580e5151 ld/ld.h -d38b2adc8c02249a1c83a9111c201491 ld/ld.texinfo +0f4a12ee0a289d6982f0427aabc161d7 ld/ld.texinfo 980ddb61f9775a7a3def830ffff63b2b ld/ldcref.c 7385d94e16995ee6b0a23e96a71f9414 ld/ldctor.c 5feb38f9fdfff03477a2e903ab3b0a9a ld/ldctor.h @@ -3269,11 +3298,11 @@ 16f4a7510b084d57d6bdaf97da6193f8 ld/ldfile.h a43b51acfdfe1cdaba953cbe71938e03 ld/ldgram.y 595a97fb8d32b7490ebc8af914aa0016 ld/ldint.texinfo -f92cb66bce5bce7bc084fbea2f670096 ld/ldlang.c +e83ea998ac0d8049f34ff82e0a902891 ld/ldlang.c db98702c510e54e417510f84049c8ef6 ld/ldlang.h 695387a63964774ce8bad66fa3cbc3ac ld/ldlex.h baf43880be9aeb328e2c0e623ba3b350 ld/ldlex.l -718d1a61dbe8ff879bb7d8410c9ad9d0 ld/ldmain.c +5c4729972e18d699080c53707856bae8 ld/ldmain.c 9bf1eb955e180d436f5179fba53a1582 ld/ldmain.h 04a636a677ca753dddf2ed16974e4338 ld/ldmisc.c cbd05e987f0cde4cbdc05c7b866609f1 ld/ldmisc.h @@ -3284,10 +3313,6 @@ 9f7cd25b5a40c623259fff13bbd743c2 ld/lexsup.c d2c2ef9b2c8b24061720ae93db1c4908 ld/mac-ld.r 26d2c38dee9ec69444252636bb0f6cc9 ld/mpw-config.in -96261b03da1fae3497d76ac0f4308253 ld/mpw-elfmips.c -3b57178fc80725a3731189c60a54e2bb ld/mpw-eppcmac.c -d59f31235ae0e62676d70df668146a3a ld/mpw-esh.c -b20a61570cea5126bbe2247bbf21b3c6 ld/mpw-idtmips.c 01eb948a7c267f614ce2d08c8270170f ld/mpw-make.sed 0e8e6ba5ad775fb80de9ead01a26f304 ld/mri.c 2ad4dc287abf549ea050d6ff283d603c ld/mri.h @@ -3298,11 +3323,11 @@ e5756a395e4489a96d8a2973c702587d ld/emultempl/armcoff.em b812a798c37d8d5f5901f1821a8a648a ld/emultempl/README 808ec076751b9f096c6c2f3d18cc61e3 ld/emultempl/aix.em -05e4c9dcaf51d44ed17a2cf1b3de600f ld/emultempl/armelf.em +ea91816e5ef47a6615193e973f697c10 ld/emultempl/armelf.em e399485f782850c8abe2bb99f66e11b2 ld/emultempl/armelf_oabi.em 995bbfc228460e4eef6eef52a09384a9 ld/emultempl/astring.sed 9bdc3dac0784da8c6a29ef61b8746ff3 ld/emultempl/beos.em -3d8b234ef739e80286d126ead90c74af ld/emultempl/elf32.em +1be6fee86be725d81052b7253befbcfd ld/emultempl/elf32.em 642477e1c75a7bfadf23784ebc2e451f ld/emultempl/generic.em a28c59b3d491f427b5c79f806475b3e6 ld/emultempl/gld960.em 914745486c94aa96f3bb14a54322833d ld/emultempl/gld960c.em @@ -3319,11 +3344,12 @@ 2ffbec9d9b62304c995da6c41e87ecf0 ld/emultempl/needrelax.em a8190e4a0b5cca5b8677d8bb2d39940f ld/emultempl/ostring.sed e4ba4ebc470798f9af75408514d154f0 ld/emultempl/pe.em -e011d17597c4b3c1996e028bf728ec39 ld/emultempl/ppc64elf.em +7582dc97dfcf9d65142884ed3beff6a8 ld/emultempl/ppc64elf.em 7ca21756cb9671a6345c2d7252139425 ld/emultempl/sh64elf.em ae174036bad50c6a65c6dae9923cc3a5 ld/emultempl/sunos.em e21fa8d986017ca6352be94fdff217bd ld/emultempl/ticoff.em cd1f37a7eb916d75d3c854c54b81fab2 ld/emultempl/vanilla.em +565d7561bd9543e7fa10940886840b07 ld/po/es.gmo b9c5a43c08d47586c6e2ada63d9293ad ld/po/.cvsignore ea2baddf1654fa8df40eb033d33b6068 ld/po/Make-in 63397aaa2c2074aa7be7ffe57b2e6c69 ld/po/POTFILES.in @@ -3332,7 +3358,6 @@ a453ef5712c6ec0fdf1baed55ffd0bd1 ld/po/ld.pot 9237dfd7f5f0b19066a8e6952f86092d ld/po/sv.po 89e1ab0bf6e1969c2ff9be7e836ab326 ld/po/tr.po -565d7561bd9543e7fa10940886840b07 ld/po/es.gmo 946a401638982431e3434b9f9424dbb6 ld/po/fr.gmo 9d1bace9b9f60b985053a8144b42417d ld/po/sv.gmo acd9b7d3ef7a8510426c501a230b6f56 ld/po/tr.gmo @@ -3346,7 +3371,7 @@ 119e975ce8b1005742840a9152c03a99 ld/scripttempl/crisaout.sc 3fb69113f5952434021a5fc481d5b417 ld/scripttempl/delta68.sc a4e630a7a2094f2b44f19e41069e4433 ld/scripttempl/ebmon29k.sc -f8a9d80b7bae781e8ad5647f72adb09c ld/scripttempl/elf.sc +8c0d720289307df42ea22bb315c4c162 ld/scripttempl/elf.sc 71e798bde2505bf50e081596880ba861 ld/scripttempl/elf32avr.sc 1586dfcb82c22ba7dfd02efb5d44fc0f ld/scripttempl/elfd10v.sc 3fbad8aa63ac419350e7d4fbb2cd1202 ld/scripttempl/elfd30v.sc @@ -3399,7 +3424,7 @@ 19fc005c493ed8c15d6f56378393bd94 ld/scripttempl/xstormy16.sc 474b1c82cd04327e7433dd108c93e239 ld/scripttempl/z8000.sc 8dd62cbb8659ad55e0bc71d0da55c95e ld/testsuite/config/default.exp -1a9dbb0ea79c6938e5e57a9910371e05 ld/testsuite/ChangeLog +904f4e5a2aac6dda88d271abf5bf2133 ld/testsuite/ChangeLog b358617ebde76a25613823bcdeabd4c7 ld/testsuite/ld-bootstrap/bootstrap.exp 4b9f7ea09166acbf0b5d72c88c5b3956 ld/testsuite/ld-cdtest/cdtest-bar.cc 7d245ef3c98762296b516547243311d0 ld/testsuite/ld-cdtest/cdtest-foo.cc @@ -3420,6 +3445,9 @@ 16ac0aa5032e8dc85780bb8073131840 ld/testsuite/ld-cris/gotrel2.s cb1b0dc3ba966f9f3617815efc38245f ld/testsuite/ld-cris/libdso-1.d 28656f01bde008d2c5356c23fdf75cd7 ld/testsuite/ld-cris/weakref1.d +f73d09ac7bd8fdc83362c30cec088e28 ld/testsuite/ld-cris/dso-2.s +0a2c0b67fcb79af873992b8aa6721e5b ld/testsuite/ld-cris/hide1 +459f9902833038f03f73447a295ba36d ld/testsuite/ld-cris/libdso-2.d 55c36e2d1bdc4d2243d617626e930afa ld/testsuite/ld-discard/discard.exp 74f98f91da03fdfbe4b598fa78509f21 ld/testsuite/ld-discard/discard.ld d95f137c185228fc640405e1e2d14ec2 ld/testsuite/ld-discard/exit.s @@ -3512,7 +3540,7 @@ 96221199fd09def3e578f62aaa264c39 ld/testsuite/ld-elfweak/bar1a.c 0e4106aabff604c09aa201ce238d54dd ld/testsuite/ld-elfweak/bar1b.c 9f3b2607071ce0deb9d70f4e65b9cf9e ld/testsuite/ld-elfweak/bar1c.c -968884bb5ab9010dd05ce08ed989437c ld/testsuite/ld-elfweak/dsodata.dsym +44d2701e2241d6fc3ece7a49d12f085c ld/testsuite/ld-elfweak/dsodata.dsym cbbdd3edc5eb0d196f3d93751ef56b02 ld/testsuite/ld-elfweak/dsow.dsym b9f26bfe37f848850a37b69eb732eb0e ld/testsuite/ld-elfweak/dsowdata.dsym fa389af98953ab959ea2d5dcd4275ae0 ld/testsuite/ld-elfweak/elfweak.exp @@ -3525,7 +3553,7 @@ de6f7a14da56939c6761b60222718890 ld/testsuite/ld-elfweak/strong.sym fddc5be8a7bda224817c3fa41096c8f3 ld/testsuite/ld-elfweak/strongcomm.sym 5a6dd36b14499e59820a074213e6c5df ld/testsuite/ld-elfweak/strongdata.dat -476fb73a86ec8d887114441badb5242d ld/testsuite/ld-elfweak/strongdata.sym +2ffd77b575b3bd0706ab4ba163259b46 ld/testsuite/ld-elfweak/strongdata.sym dcf5e53a281f26dbad477cdba407e168 ld/testsuite/ld-elfweak/weak.dat cbbdd3edc5eb0d196f3d93751ef56b02 ld/testsuite/ld-elfweak/weak.dsym 40040714fbc533439a8346bed87f39be ld/testsuite/ld-elfweak/weakdata.dat @@ -3614,46 +3642,46 @@ c611d61d69d4f6525b97bf73f8ceb803 ld/testsuite/ld-mmix/b-widec2.s b0e738d0cadbba73f2fcb8d0e5db1017 ld/testsuite/ld-mmix/b-widec3.d 538c648f35ef9b9744f3451d4b634614 ld/testsuite/ld-mmix/b-widec3.s -ce6745d133516a32fd9ce16740254bf4 ld/testsuite/ld-mmix/bpo-1.d +be39d4830842e61b71927d9a0f405496 ld/testsuite/ld-mmix/bpo-1.d 727b1769bece675574da8a7fe3fd7c78 ld/testsuite/ld-mmix/bpo-1.s -ac5241e6ffa1954f2c8d65236791a691 ld/testsuite/ld-mmix/bpo-10.d +e81504d24f69ed2c0de765443ab8aeed ld/testsuite/ld-mmix/bpo-10.d 7806bfb4f80d0b995147abaef5043324 ld/testsuite/ld-mmix/bpo-10.s -2390d91952a4132a651f60c6375a5aa8 ld/testsuite/ld-mmix/bpo-11.d +2c47593737a9920128ee34e59ac0ece9 ld/testsuite/ld-mmix/bpo-11.d 6ffe6aa6c222b341fd60298d70f6c096 ld/testsuite/ld-mmix/bpo-11.s 77b4f4eb49346620239ae760d080a897 ld/testsuite/ld-mmix/bpo-12.d 8de7a3ef3b7bd942d63c83ee837ab9ef ld/testsuite/ld-mmix/bpo-12m.d 3dedc8a556ca8e2e36516b6d401573ec ld/testsuite/ld-mmix/bpo-13.d 548c55bffd4c89b7677633e176ce7642 ld/testsuite/ld-mmix/bpo-13m.d -00eaeec5da1b11b125ce2daf66741fb6 ld/testsuite/ld-mmix/bpo-14.d +6d9d3944ed2a8c491898f19914b0cfa0 ld/testsuite/ld-mmix/bpo-14.d c643669175f64da8335666d98707d371 ld/testsuite/ld-mmix/bpo-14m.d 8f6569e3f528d5faa6667c06e373d4e6 ld/testsuite/ld-mmix/bpo-15.d 98df5bb5f63901bb65b4da989825bee6 ld/testsuite/ld-mmix/bpo-15m.d -7c5a4a55b1c807daf75be47f761427a3 ld/testsuite/ld-mmix/bpo-16.d +8df9df0ff442a7dfa58bf441c5d7b17a ld/testsuite/ld-mmix/bpo-16.d 46c733f1f9d6891c280bd33a7a8ee49e ld/testsuite/ld-mmix/bpo-16m.d -1c6c3b77f836f028fc8bb66eb93aaa72 ld/testsuite/ld-mmix/bpo-17.d +7e720fa691149686b18c0cfd76085253 ld/testsuite/ld-mmix/bpo-17.d 2bd56eebb6f7f2557192b4218267e936 ld/testsuite/ld-mmix/bpo-17m.d -f91ff0e4f9d128b3753ba77267148097 ld/testsuite/ld-mmix/bpo-18.d +c337e22126638d230a2618cd50f7e89a ld/testsuite/ld-mmix/bpo-18.d f6bf49adf280576f36265c714068a2c5 ld/testsuite/ld-mmix/bpo-18m.d -3e73e18c40d512d0dc9e050bb7c23691 ld/testsuite/ld-mmix/bpo-19.d +5e60e3c846f9da840c896a7b57125eee ld/testsuite/ld-mmix/bpo-19.d 2ab4fef8dc7d80065a78ea7b0e9ed0b3 ld/testsuite/ld-mmix/bpo-19m.d b2f2ffc9ebee61c08b8536ee393bf60d ld/testsuite/ld-mmix/bpo-1m.d -38adbd9c13f511112771e4e0ed0851e4 ld/testsuite/ld-mmix/bpo-2.d +e893038392fc597e5342453bc656e046 ld/testsuite/ld-mmix/bpo-2.d 941fdc1afbccc34132056c79cffd53a7 ld/testsuite/ld-mmix/bpo-2.s 0fb61489c12f3b583e2c08ade6e8d653 ld/testsuite/ld-mmix/bpo-20.d fffb35a7fced3331a800461bc1ce9094 ld/testsuite/ld-mmix/bpo-20m.d 5e8683bae8c6b6898f64e06e23abbccd ld/testsuite/ld-mmix/bpo-21.d 73573410160cb6b280768902b3043b90 ld/testsuite/ld-mmix/bpo-21m.d 263c76b6afbb38eab584434d4d6c6c2b ld/testsuite/ld-mmix/bpo-2m.d -4ce15509c1d928abd3f64430b25902a9 ld/testsuite/ld-mmix/bpo-3.d +1fb3e88b0bceb734a24d8960724c3145 ld/testsuite/ld-mmix/bpo-3.d 18a744b115278b7722c291d0ffb50d7f ld/testsuite/ld-mmix/bpo-3.s bcdf1e512c4aee70c59fdd3660145af7 ld/testsuite/ld-mmix/bpo-3m.d -691581cb3b6468bd52e6d7df5771c8d0 ld/testsuite/ld-mmix/bpo-4.d +49511af2aad2343f26ef08bcac90c7b0 ld/testsuite/ld-mmix/bpo-4.d 27298e0392d3668044115ab5ab2d8f96 ld/testsuite/ld-mmix/bpo-4.s dd0d4ed3e462ccc4d407b1bf742d14be ld/testsuite/ld-mmix/bpo-4m.d -5c28447d7a7ef081e7cd0b95dcb0d591 ld/testsuite/ld-mmix/bpo-5.d +14b43eb0a8991349614421ca4b78a62e ld/testsuite/ld-mmix/bpo-5.d 7dbb13569ce91e34215372124be85954 ld/testsuite/ld-mmix/bpo-5.s ee7b15e113e1e43245843f5a67e4bd06 ld/testsuite/ld-mmix/bpo-5m.d -386fa01de7504ca3910685489e5d9965 ld/testsuite/ld-mmix/bpo-6.d +843c03348354d891454d92074203f35b ld/testsuite/ld-mmix/bpo-6.d f2cceac4fc47fe392c8e4dc429f07561 ld/testsuite/ld-mmix/bpo-6.s 2d7d7f08884d9c6f8b665361608621a0 ld/testsuite/ld-mmix/bpo-6m.d 8bf2119bfa9a8f8ab1ad3a31ecc33e99 ld/testsuite/ld-mmix/bpo-7.d @@ -3662,14 +3690,14 @@ 4015cf8cce9a13b50227b5182b063c63 ld/testsuite/ld-mmix/bpo-8.d ebfa497b551fca4227045bd9c52591d7 ld/testsuite/ld-mmix/bpo-8.s 1cb46b3bff8a3455f444bf47be753ebe ld/testsuite/ld-mmix/bpo-8m.d -198a8752376114a3c7dc8867dce244b1 ld/testsuite/ld-mmix/bpo-9.d +fa4fb4a03ce325ae5a1a45d5c892d46e ld/testsuite/ld-mmix/bpo-9.d e6417328f720ed4af73d532d5578d4dc ld/testsuite/ld-mmix/bpo-9.s 3f41674c05910b601b6428d93d075bf8 ld/testsuite/ld-mmix/bpo-9m.d 31df213f14a88392ba820c0d322b2bf1 ld/testsuite/ld-mmix/bpo64addr.ld -8cef4b95cf571cca3a1d73af6c60f1a5 ld/testsuite/ld-mmix/bspec1.d +4783fc9c790c9ef8c831198dcadab8e7 ld/testsuite/ld-mmix/bspec1.d 819de3680e13af74f5cc05450ba88c45 ld/testsuite/ld-mmix/bspec1.s 9e65233ea9e683673fca19c9a7ac4146 ld/testsuite/ld-mmix/bspec1m.d -ea5394cf3add44928f7612fedc98256a ld/testsuite/ld-mmix/bspec2.d +e2c230d34500562cb12e1d71f3f1901f ld/testsuite/ld-mmix/bspec2.d 39f50619e3525dbc7bb1a57004fa7af8 ld/testsuite/ld-mmix/bspec2.s 2264252fbee703755ad9ef0a84805b6e ld/testsuite/ld-mmix/bspec2m.d bf1d3c052201115389f9bf0d72b01dd1 ld/testsuite/ld-mmix/bspec801.s @@ -3713,7 +3741,7 @@ 955393ce5664bd2add2eb31ba04ad921 ld/testsuite/ld-mmix/getaa12f.d 6b07d5a2c862f5af1282295c5d1a1ed2 ld/testsuite/ld-mmix/getaa14b.d de882c759ecf566680b05ac17232d9ac ld/testsuite/ld-mmix/getaa14f.d -8f7d7032e3d56fa2f7bb3eed4fc9acfa ld/testsuite/ld-mmix/greg-1.d +dc460af38f955316afe0168895a00374 ld/testsuite/ld-mmix/greg-1.d 09bdeabfdc8bad2aa2102a69f2acec6c ld/testsuite/ld-mmix/greg-1.s 3e8753750bd03d1b8cc47973bf0c5fa8 ld/testsuite/ld-mmix/greg-10.d 52fbd6227f7f3e5728b8350c69d33742 ld/testsuite/ld-mmix/greg-11.d @@ -3725,18 +3753,18 @@ a3ff1f310992ee435c7e2635d8d29460 ld/testsuite/ld-mmix/greg-16.d d01503c2c69d7f452f4eefacaa68899d ld/testsuite/ld-mmix/greg-17.d b11ff19d10f01e1e3f56e46144a2221f ld/testsuite/ld-mmix/greg-18.d -d7f81e7cd1427fe4c33af6ab015186e9 ld/testsuite/ld-mmix/greg-19.d -ff65e367bb68d9f7664e5b4726ae78b2 ld/testsuite/ld-mmix/greg-2.d +a6b1dbf1fa045306a28a040fba161298 ld/testsuite/ld-mmix/greg-19.d +678ba9e8f44b1f2421d7fb6fdb0d4d93 ld/testsuite/ld-mmix/greg-2.d d32fe386de0bb7cbeae911f55b74f28c ld/testsuite/ld-mmix/greg-2.s f7a8dad75521d024520597ea106b9aea ld/testsuite/ld-mmix/greg-20.d -c84caabf76918a7e8c3260057e8f2cec ld/testsuite/ld-mmix/greg-3.d +4c92b36f8cb105382d5a6e5a8f3a9608 ld/testsuite/ld-mmix/greg-3.d fd8c230efbb1e8e9644f278fc55956d1 ld/testsuite/ld-mmix/greg-3.s -25bcdfe2f0030ac479aad358309d10a7 ld/testsuite/ld-mmix/greg-4.d +6c789d73e1dbc493e9ce5a255ca05124 ld/testsuite/ld-mmix/greg-4.d ca83717a845f3471de058678cd3d768d ld/testsuite/ld-mmix/greg-4.s -6ee1b6cbdc41412d2c2a823e65fd2d4f ld/testsuite/ld-mmix/greg-5.d +45d534b96b868720dbbbc6e259c1046c ld/testsuite/ld-mmix/greg-5.d 6480362111f72bcd1075662b96302bda ld/testsuite/ld-mmix/greg-5.s -3f8b4cc7839de4c81ecd041cddb86419 ld/testsuite/ld-mmix/greg-6.d -6b507a868141899e939a8f93a397c2f6 ld/testsuite/ld-mmix/greg-7.d +bd62253b3dbb995e4c70edc6402be21b ld/testsuite/ld-mmix/greg-6.d +b987e99f0f5b4df03aa71b12e3ad97c0 ld/testsuite/ld-mmix/greg-7.d 59e0e7eb634040c0b9cbd93f668ccc98 ld/testsuite/ld-mmix/greg-8.d d93fac49ebe47c54143f6d735cbd0d2b ld/testsuite/ld-mmix/greg-9.d 52303123f40dff47906913e8da9c286e ld/testsuite/ld-mmix/gregbza1.s @@ -3770,23 +3798,23 @@ ddb26bcaaaaa6d50847383e563b4d3bc ld/testsuite/ld-mmix/jumpa13f.d ec8eb31b1d5509c113b95b69c16cd0fb ld/testsuite/ld-mmix/jumpa14b.d c09889c85aa28fc627e38923e2151630 ld/testsuite/ld-mmix/jumpa14f.d -a445da06d39903526441b07b626f8690 ld/testsuite/ld-mmix/loc1.d +aa72f287a229585cc6009cf22c816b9c ld/testsuite/ld-mmix/loc1.d b56a23c50b6ddbff1f3794283f3277f1 ld/testsuite/ld-mmix/loc1.s fb75bea1a25c34bbf8e30d990a432d97 ld/testsuite/ld-mmix/loc1m.d -2a9704912f0520f25976bd985068dda4 ld/testsuite/ld-mmix/loc2.d +a280d519bdfba2afdc252ab0d0238d88 ld/testsuite/ld-mmix/loc2.d 3c356ecff8149f5f58b96419632abe2d ld/testsuite/ld-mmix/loc2.s 499e0b02ab9cde3ceb84ef08a360c969 ld/testsuite/ld-mmix/loc2m.d -53d31bcb0f0be125438d23132ee3ff79 ld/testsuite/ld-mmix/loc3.d +2b7ebd1eb76140ee2b0cc7316042e500 ld/testsuite/ld-mmix/loc3.d d57db0d8ece842d7e871c26f0165ace0 ld/testsuite/ld-mmix/loc3m.d -3926e85888f1053e11845600a5c72ebe ld/testsuite/ld-mmix/loc4.d +c196913754c0f00a0a8db3257d175676 ld/testsuite/ld-mmix/loc4.d bec6bb8c211f6781408cd6cf9a3465a3 ld/testsuite/ld-mmix/loc4m.d 6bce3b0517b052d03c4c4f6ff493fa86 ld/testsuite/ld-mmix/loc5.d b5bb17720ffd70fe284c562e7302dd3f ld/testsuite/ld-mmix/loc5m.d -b1606f2314d698d9173f6333db7d8803 ld/testsuite/ld-mmix/loc6.d +971ffbcc985dedb48a4d01ccd01ac4d3 ld/testsuite/ld-mmix/loc6.d 4cd6c469df725742fb44b2dd1dd18859 ld/testsuite/ld-mmix/loc6m.d 82f045e44234bb0c8c17b511462c5ea9 ld/testsuite/ld-mmix/loc7.d 9c15aa64a5b8f8693882f01d28db4ef0 ld/testsuite/ld-mmix/loc7m.d -f8e96fafc20e549567052050d33e8992 ld/testsuite/ld-mmix/local1.d +afef4613d12e1c4f9d350b54350237d3 ld/testsuite/ld-mmix/local1.d d707f849fbe9f63a5f2c01fd2566e038 ld/testsuite/ld-mmix/local1.s 7ece63c1f6d1bf57eb22577253170a37 ld/testsuite/ld-mmix/local10.d 04997ac752692c6b8804cd4e39a0ea58 ld/testsuite/ld-mmix/local10m.d @@ -3798,25 +3826,25 @@ 509fc476ca1023f3ccf69f809616de98 ld/testsuite/ld-mmix/local2.d e162c55691230b3ef6099eace547e1b4 ld/testsuite/ld-mmix/local2.s f9779e43410c476cfa2b2450f8b2639d ld/testsuite/ld-mmix/local2m.d -1e9b94f5edd4474b66876b2814cb9363 ld/testsuite/ld-mmix/local3.d +6a7aaaec344a851208cefc9c28dc71b8 ld/testsuite/ld-mmix/local3.d 84414c509524b98f37bc39f6bcb0403c ld/testsuite/ld-mmix/local3m.d 18cc28d324964767918c7071b53b80df ld/testsuite/ld-mmix/local4.d 06f51156a11dc9114232e16ea38ee99a ld/testsuite/ld-mmix/local4m.d -957f312fbc5a680b16203e837de7ac6c ld/testsuite/ld-mmix/local5.d +fcd2b9ea51ea7520a678ded953ca3061 ld/testsuite/ld-mmix/local5.d f025bba412c428db6d7fe5d4e90528c4 ld/testsuite/ld-mmix/local5m.d eb4d717d242d7cd8ccc98b6350c95fd2 ld/testsuite/ld-mmix/local6.d f355a139634c881acf82d620115d829a ld/testsuite/ld-mmix/local6m.d -c62067888ecdf3585d3c6a629aff102c ld/testsuite/ld-mmix/local7.d +2847e57f14bc16f665f634b772d1ac87 ld/testsuite/ld-mmix/local7.d b7ed816019fd284d6e048ebfd47420dc ld/testsuite/ld-mmix/local7m.d 099f86d65a29acd85ad462039776b43f ld/testsuite/ld-mmix/local8.d d779355656462b041e143cc4e2b98726 ld/testsuite/ld-mmix/local8m.d 133c44093006e1390646457d69e680c5 ld/testsuite/ld-mmix/local9.d ab244ec4c684d78029caca3dc30d9bfb ld/testsuite/ld-mmix/local9m.d -9cbce0df41573aa6627b47e0a7dfdb26 ld/testsuite/ld-mmix/locdo-1.d +bc7f8cec45bef3ec89ba1eec2bbd7d60 ld/testsuite/ld-mmix/locdo-1.d d6727f0db8cd2c9e50ae8bf7b22eaeaa ld/testsuite/ld-mmix/locdo.s -b6c6412f4b93e873066ac6f3d1e82b91 ld/testsuite/ld-mmix/loct-1.d +af1ed1153a9726a5c9618a47ccff7203 ld/testsuite/ld-mmix/loct-1.d 022fa8e6f9b0b5e7125cf1ef50101a2b ld/testsuite/ld-mmix/loct.s -7de7334096dad677479564f87b782d05 ld/testsuite/ld-mmix/locto-1.d +7b0bdfdcfd19f63b060f00871ae2b626 ld/testsuite/ld-mmix/locto-1.d 3d1a25d72e6ab244d8e39098981c9740 ld/testsuite/ld-mmix/locto.s 64980a23a389e2541da0ffe38b717379 ld/testsuite/ld-mmix/main1.s ade6b155976f6fc3800923cd65b8e2a5 ld/testsuite/ld-mmix/mmix.exp @@ -3866,7 +3894,7 @@ 84cffd78be8db74361744a6020d0b935 ld/testsuite/ld-mmix/spec806.d 3a7269cc833533540d010a6d2e457568 ld/testsuite/ld-mmix/spec807.d 6841b9483399655f05a88f9e4cd58ec7 ld/testsuite/ld-mmix/spec808.d -1ae3363020b92428835ac5e8a14b2dee ld/testsuite/ld-mmix/start-1.d +a5cbe3be172b916446e9a99b557518f2 ld/testsuite/ld-mmix/start-1.d 4be3976267833ea3c34b0f798a8c1485 ld/testsuite/ld-mmix/start-2.d be36292d5a752d8e3594c19f02c2438a ld/testsuite/ld-mmix/start.s c99cb759a47ad31cda97850838a8521d ld/testsuite/ld-mmix/start2.s @@ -3881,7 +3909,7 @@ 442d8e36bccc5a0b2c509ae050688162 ld/testsuite/ld-mmix/undef-2.d a41b27d14532da2a3129fcc4caf5c055 ld/testsuite/ld-mmix/undef-2.s 8f55b70c5902ca731fa760d513930a89 ld/testsuite/ld-mmix/undef-2m.d -66092e71801b7c2499b96c4ab39ed97c ld/testsuite/ld-mmix/undef-3.d +aba53f2c4a380f5c82fefb45152c3b67 ld/testsuite/ld-mmix/undef-3.d 0c0fa2fe0d0853b92b35546f57987868 ld/testsuite/ld-mmix/undef-3m.d f5db3424f4d1af1a04dfa7b2a7fb96fd ld/testsuite/ld-mmix/x.s 84d1266b09e13010463fef99f2a5ca43 ld/testsuite/ld-mmix/y.s @@ -4029,19 +4057,19 @@ 7020c6c2928c89ca798f517226862f1c ld/testsuite/ld-versados/t2.ld fb1e9ddf26ad5af0d34950d762f68ed9 ld/testsuite/ld-versados/t2.ook 7a0974b938c1d434dc27f7a72f2354e8 ld/testsuite/lib/ld-lib.exp +2112fc0c609f39cd8b41ab46a59a9011 ld/ld.info +7a7fe41b1681f5d6ea3a6a4cf9118269 ld/ld.1 +65af77d42e78e95fc827572069e6387f ld/ld.info-1 +896d88c53223cb808da60606769ee98a ld/ld.info-2 1d2f69fe0f7caf6fd83325beeb818de0 ld/configdoc.texi -d6ead02b2c10313a98369ba713078bd3 ld/ldver.texi -322efb038c7e66f9f701d1542e156ec3 ld/ld.info -b23bc59e68f08c00750ef26b4ea42089 ld/ld.info-1 -ecd111175e741cf76774531c53e94a14 ld/ld.info-2 -0b4dbd501e0beb6c04f8fe24960460bc ld/ld.info-3 -77cdf1fe8ff5fd522156f568a8103e22 ld/ld.info-4 -44df9fc99fbbfd203611d1e8a272db01 ld/ld.info-5 -33796df42c42d18dfd46c0c3b2a40f34 ld/ld.info-6 -cafa962fa9ba9b53dbded7ace7f83258 ld/ld.1 +3413114932f68a58c2ab4955d85ae1e9 ld/ld.info-3 +76a3d7977ee547fdb0a889bf94fda6b5 ld/ld.info-4 +9b2ed67e4369eb9f243a1dbfe12c0542 ld/ld.info-5 dd587fb75230026c50476f4210b128bd ld/ldgram.c bea140f3d44f799f3957a54a03da6439 ld/ldgram.h c46cb30a408f05406b656f3dff8ed8df ld/ldlex.c +230f6c7c3cd3d3af7422e5d4d5589053 ld/ldver.texi +7c8b7cab2945d02fcec1df20e1c56005 ld/ld.info-6 7b65854f594c84e80295173de277b3dc libiberty/config/mh-cxux7 4004fdcde347fda58406b4b84a995c66 libiberty/config/mh-aix 044204f5b4bcac5eae2face0602129ae libiberty/config/mh-fbsd21 @@ -4172,6 +4200,7 @@ 5479cbb3e13987fe2170b7a403b82e8f mpw-config.in d186332a893eacec29defecdc3524ecf mpw-configure 96312bdd41def6a5946784d468dc29d3 mpw-install +1583e91dec16df0e8b69632b886e716d opcodes/po/da.gmo b9c5a43c08d47586c6e2ada63d9293ad opcodes/po/.cvsignore bfb5c178c2404196ab54d7532a61e3d4 opcodes/po/Make-in 1b38a7ec90301a4c2c66360d3302e158 opcodes/po/POTFILES.in @@ -4182,21 +4211,20 @@ ee8a30cbb6670c5c89d4595b30fb9bdd opcodes/po/opcodes.pot 6041c22f902c359760e74e12a90ab5fd opcodes/po/sv.po d0d56ec3a0150b46fb96f71048c8a550 opcodes/po/tr.po -1583e91dec16df0e8b69632b886e716d opcodes/po/da.gmo 09793cea9e1ec540a5157e6a4c38ce43 opcodes/po/de.gmo c1cc88fca8d047fbdfe5c98c9d11af6b opcodes/po/es.gmo ee4374295b6a2bba06f4e5aa0fdafd71 opcodes/po/fr.gmo 8770db4dec85b6b402c6b8bda18546d2 opcodes/po/sv.gmo 3b5962a38549b51f7b8da869d84db639 opcodes/po/tr.gmo -010596b62787b20036f8d448eebc32ba opcodes/ChangeLog +d725da71f38a0fd3b3e3fba8470eae8e opcodes/ChangeLog 568db2b4641150f46a18da55529d8d3b opcodes/ChangeLog-9297 fc3adcd099179b77d2adb79ada21a89c opcodes/ChangeLog-9899 d618facc3e8ce8bf3d02ba452e1be6ab opcodes/MAINTAINERS -5f0cfc07eea38148d634a0597bc87578 opcodes/Makefile.am -e09363f944b450a6d027c661a0211a4c opcodes/Makefile.in +7b958cc686d0fcc656f60ccf4c3927d0 opcodes/Makefile.am +dbd86f3d2b53be726124a478fa8f2239 opcodes/Makefile.in 47fa4c9d9f5548d9f4ed065a4bd5f3b3 opcodes/a29k-dis.c 901749e9292ba1f5f109f5cc195bfe8b opcodes/acinclude.m4 -2c4e12d715daf0bfab0df7edb2ee8c14 opcodes/aclocal.m4 +8c716d529e28aaf255e395a7e58c6642 opcodes/aclocal.m4 d89dfd8cdfd22d6d4e7256cbf738f5e2 opcodes/alpha-dis.c 2201d6f5904fe93602d9be7e77b76cbb opcodes/alpha-opc.c ef7d827537776f02a718b00a19425803 opcodes/arc-dis.c @@ -4214,8 +4242,8 @@ b79210593ceb346affe0654c9fe2aaa2 opcodes/cgen-ibld.in a2c2b7f92c11b7f2f4db964d1ccad9d1 opcodes/cgen-opc.c 95f1a3447a2b756b0f3a2b1cbdb98a16 opcodes/cgen.sh -b024616c6675ea3b85d3ffd3fa19fe1d opcodes/config.in -cb051ef5f331d10fb3730b476f5df245 opcodes/configure +47f45c3815efd7d348e135778909e53c opcodes/config.in +93c1a34ba0fad9d21828d4eace911d9a opcodes/configure 55e1c22ca2c122a3bcb7c84079e9c7a2 opcodes/configure.in 7f3621bf8f431b0b3c36e4f8054d0753 opcodes/cris-dis.c 1252380a0061667febf108ef3b0a5d62 opcodes/cris-opc.c @@ -4223,7 +4251,7 @@ 50cd578f495c027f2b85d4973baef3ef opcodes/d10v-opc.c 1fe9373513a310691a268364ed4c8b9d opcodes/d30v-dis.c 0eebf1cce2cfd05039625773a97b8d40 opcodes/d30v-opc.c -003af092c5d632b4f4d90904faecd02e opcodes/dep-in.sed +5688b71e3a604d472e4722d463c0873a opcodes/dep-in.sed 647aa578917a41d48c4d988dca8b9319 opcodes/dis-buf.c 92c1d514f94645529bb05bbb20119fe8 opcodes/disassemble.c 1dc4984f9446fe51873bd9c2458a7ff5 opcodes/fr30-asm.c @@ -4279,8 +4307,8 @@ d129eed92c6947db4372b285656ef9a1 opcodes/makefile.vms e49efcb1e230a68bcb897a5e79575a93 opcodes/mcore-dis.c 5d1d73c7fcd371c3a4bb39d4a8e5cb44 opcodes/mcore-opc.h -0961c39427d566ca74fd5e8093445611 opcodes/mips-dis.c -1c60f1e291fceca881030a0fc8fff50a opcodes/mips-opc.c +85b38eb8421f0e91a6c6fb70edb45a23 opcodes/mips-dis.c +6c099fa473c8b2db7d6eefc5538e4ecb opcodes/mips-opc.c c5f2a79141b09a53e3430582f3559b7b opcodes/mips16-opc.c 4ebdf53237735acb65acb5ccb190423f opcodes/mmix-dis.c 25a329219f58cb7f791e747dbacd5fd7 opcodes/mmix-opc.c @@ -4302,8 +4330,8 @@ 3f677d7b67f8ef6ff346c987471e40d2 opcodes/pj-dis.c 7d29ed3a2cb830feadb1382aa3895b6f opcodes/pj-opc.c 2dc8e69ff4bc32fc497dbbacc1bd3f44 opcodes/ppc-dis.c -855ef4df5e3d491ba4166895978b6413 opcodes/ppc-opc.c -deaa00f2583cb49beaced76362eeb73d opcodes/s390-dis.c +d324ddeb5871c30c90345fc320945e4a opcodes/ppc-opc.c +5aa47f268993f90c1dd2f38e35d6615c opcodes/s390-dis.c df79cd67b7feb9ea2b7ab2b7921e89d3 opcodes/s390-mkopc.c 241dfb300c98082c651434eaa781f350 opcodes/s390-opc.c dd9099f59bbd03dc2efe69a8069768a2 opcodes/s390-opc.txt diff -Nur binutils-2.12/opcodes/ChangeLog binutils-2.12.1/opcodes/ChangeLog --- binutils-2.12/opcodes/ChangeLog Tue Feb 26 05:35:30 2002 +++ binutils-2.12.1/opcodes/ChangeLog Thu May 9 10:51:44 2002 @@ -1,3 +1,65 @@ +2002-05-09 Anton Blanchard + + * ppc-opc.c: Add "tlbiel" for POWER4. + +2002-05-09 Alan Modra + + Merge from mainline. + 2002-05-01 Alan Modra + * ppc-opc.c: Add "tlbsx." and "tlbsxe." for booke. + + 2002-04-17 matthew green + * ppc-opc.c (powerpc_opcode): Fix dssall operand list. + +2002-04-29 Chris Demetriou + + Merge from mainline: + 2002-03-06 Chris Demetriou + * mips-opc.c (mips_builtin_opcodes): Mark "pref" as being + present on I4. + + Merge from mainline: + 2002-03-06 Chris Demetriou + * mips-opc.c (mips_builtin_opcodes): Add "movn.ps" and "movz.ps". + + Merge from mainline: + 2002-03-15 Chris Demetriou + * mips-dis.c (is_newabi): Fix ABI decoding. + +2002-04-04 Alan Modra + + * dep-in.sed: Cope with absolute paths. + * Makefile.am (dep.sed): Subst TOPDIR. + Run "make dep-am". + * Makefile.in: Regenerate. + + Merge from mainline + 2002-02-19 Martin Schwidefsky + * s390-dis.c (init_disasm): Use renamed architecture defines. + +2002-03-28 Alan Modra + + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * configure: Regenerate. + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + + Merge from mainline. + 2002-03-23 matthew green + * ppc-opc.c (vmaddfp): Fix operand order. + + 2002-03-21 Anton Blanchard + * ppc-opc.c: Add optional field to mtmsrd. + (MTMSRD_L, XRLARB_MASK): Define. + + 2002-03-13 Alan Modra + * ppc-opc.c: Add optional `L' field to tlbie. + (XRTLRA_MASK): Define. + + 2002-02-20 Tom Rix + * ppc-opc.c (powerpc_operands): Add WS feild. Use for tlbre, tlbwe. + 2002-02-26 Nick Clifton * configure.in (LINGUAS): Add de.po. diff -Nur binutils-2.12/opcodes/Makefile.am binutils-2.12.1/opcodes/Makefile.am --- binutils-2.12/opcodes/Makefile.am Fri Feb 8 00:51:02 2002 +++ binutils-2.12.1/opcodes/Makefile.am Thu Apr 4 11:20:14 2002 @@ -374,7 +374,8 @@ -e 's!@BFD_H@!$(BFD_H)!' \ -e 's!@INCDIR@!$(INCDIR)!' \ -e 's!@BFDDIR@!$(BFDDIR)!' \ - -e 's!@SRCDIR@!$(srcdir)!' + -e 's!@SRCDIR@!$(srcdir)!' \ + -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/opcodes$$,,`'!' dep: DEP sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile @@ -404,11 +405,11 @@ alpha-opc.lo: alpha-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/alpha.h $(BFD_H) $(INCDIR)/symcat.h \ opintl.h -arc-dis.lo: arc-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ - $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h $(BFDDIR)/elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \ - opintl.h arc-dis.h arc-ext.h +arc-dis.lo: arc-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \ + $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h \ + $(INCDIR)/elf/reloc-macros.h opintl.h arc-dis.h arc-ext.h arc-opc.lo: arc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/arc.h arc-ext.lo: arc-ext.c sysdep.h config.h $(INCDIR)/ansidecl.h \ @@ -486,19 +487,25 @@ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ia64-dis.lo: ia64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/ia64.h -ia64-opc-a.lo: ia64-opc-a.c ia64-opc.h $(INCDIR)/opcode/ia64.h -ia64-opc-b.lo: ia64-opc-b.c ia64-opc.h $(INCDIR)/opcode/ia64.h -ia64-opc-f.lo: ia64-opc-f.c ia64-opc.h $(INCDIR)/opcode/ia64.h -ia64-opc-i.lo: ia64-opc-i.c ia64-opc.h $(INCDIR)/opcode/ia64.h -ia64-opc-m.lo: ia64-opc-m.c ia64-opc.h $(INCDIR)/opcode/ia64.h +ia64-opc-a.lo: ia64-opc-a.c ia64-opc.h $(INCDIR)/opcode/ia64.h \ + $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h +ia64-opc-b.lo: ia64-opc-b.c ia64-opc.h $(INCDIR)/opcode/ia64.h \ + $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h +ia64-opc-f.lo: ia64-opc-f.c ia64-opc.h $(INCDIR)/opcode/ia64.h \ + $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h +ia64-opc-i.lo: ia64-opc-i.c ia64-opc.h $(INCDIR)/opcode/ia64.h \ + $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h +ia64-opc-m.lo: ia64-opc-m.c ia64-opc.h $(INCDIR)/opcode/ia64.h \ + $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h ia64-opc-d.lo: ia64-opc-d.c ia64-opc.lo: ia64-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \ sysdep.h config.h ia64-asmtab.h $(INCDIR)/opcode/ia64.h \ - ia64-asmtab.c + $(BFD_H) $(INCDIR)/symcat.h ia64-asmtab.c ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \ $(INCDIR)/safe-ctype.h sysdep.h config.h ia64-opc.h \ - $(INCDIR)/opcode/ia64.h ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c \ - ia64-opc-b.c ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c + $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/symcat.h \ + ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \ + ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c ia64-asmtab.lo: ia64-asmtab.c m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \ @@ -526,7 +533,7 @@ $(INCDIR)/opcode/m68hc11.h m68k-dis.lo: m68k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/floatformat.h \ - opintl.h $(INCDIR)/opcode/m68k.h + $(INCDIR)/libiberty.h opintl.h $(INCDIR)/opcode/m68k.h m68k-opc.lo: m68k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/m68k.h m88k-dis.lo: m88k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ @@ -627,6 +634,12 @@ vax-dis.lo: vax-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/vax.h $(INCDIR)/dis-asm.h $(BFD_H) \ $(INCDIR)/symcat.h +sh64-dis.lo: sh64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ + $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \ + sh64-opc.h $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h +sh64-opc.lo: sh64-opc.c sh64-opc.h w65-dis.lo: w65-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ w65-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-asm.lo: xstormy16-asm.c sysdep.h config.h \ diff -Nur binutils-2.12/opcodes/Makefile.in binutils-2.12.1/opcodes/Makefile.in --- binutils-2.12/opcodes/Makefile.in Fri Feb 8 00:51:02 2002 +++ binutils-2.12.1/opcodes/Makefile.in Thu Apr 4 11:20:14 2002 @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -416,7 +416,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES) OBJECTS = libopcodes.a.$(OBJEXT) $(libopcodes_la_OBJECTS) @@ -581,7 +581,7 @@ dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ - test "$$subdir" = "." && dot_seen=yes; \ + test "$$subdir" != "." || dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ @@ -885,7 +885,8 @@ -e 's!@BFD_H@!$(BFD_H)!' \ -e 's!@INCDIR@!$(INCDIR)!' \ -e 's!@BFDDIR@!$(BFDDIR)!' \ - -e 's!@SRCDIR@!$(srcdir)!' + -e 's!@SRCDIR@!$(srcdir)!' \ + -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/opcodes$$,,`'!' dep: DEP sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile @@ -915,11 +916,11 @@ alpha-opc.lo: alpha-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/alpha.h $(BFD_H) $(INCDIR)/symcat.h \ opintl.h -arc-dis.lo: arc-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ - $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h $(BFDDIR)/elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \ - opintl.h arc-dis.h arc-ext.h +arc-dis.lo: arc-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \ + $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h \ + $(INCDIR)/elf/reloc-macros.h opintl.h arc-dis.h arc-ext.h arc-opc.lo: arc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/arc.h arc-ext.lo: arc-ext.c sysdep.h config.h $(INCDIR)/ansidecl.h \ @@ -997,19 +998,25 @@ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ia64-dis.lo: ia64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/ia64.h -ia64-opc-a.lo: ia64-opc-a.c ia64-opc.h $(INCDIR)/opcode/ia64.h -ia64-opc-b.lo: ia64-opc-b.c ia64-opc.h $(INCDIR)/opcode/ia64.h -ia64-opc-f.lo: ia64-opc-f.c ia64-opc.h $(INCDIR)/opcode/ia64.h -ia64-opc-i.lo: ia64-opc-i.c ia64-opc.h $(INCDIR)/opcode/ia64.h -ia64-opc-m.lo: ia64-opc-m.c ia64-opc.h $(INCDIR)/opcode/ia64.h +ia64-opc-a.lo: ia64-opc-a.c ia64-opc.h $(INCDIR)/opcode/ia64.h \ + $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h +ia64-opc-b.lo: ia64-opc-b.c ia64-opc.h $(INCDIR)/opcode/ia64.h \ + $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h +ia64-opc-f.lo: ia64-opc-f.c ia64-opc.h $(INCDIR)/opcode/ia64.h \ + $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h +ia64-opc-i.lo: ia64-opc-i.c ia64-opc.h $(INCDIR)/opcode/ia64.h \ + $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h +ia64-opc-m.lo: ia64-opc-m.c ia64-opc.h $(INCDIR)/opcode/ia64.h \ + $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h ia64-opc-d.lo: ia64-opc-d.c ia64-opc.lo: ia64-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \ sysdep.h config.h ia64-asmtab.h $(INCDIR)/opcode/ia64.h \ - ia64-asmtab.c + $(BFD_H) $(INCDIR)/symcat.h ia64-asmtab.c ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \ $(INCDIR)/safe-ctype.h sysdep.h config.h ia64-opc.h \ - $(INCDIR)/opcode/ia64.h ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c \ - ia64-opc-b.c ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c + $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/symcat.h \ + ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \ + ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c ia64-asmtab.lo: ia64-asmtab.c m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \ @@ -1037,7 +1044,7 @@ $(INCDIR)/opcode/m68hc11.h m68k-dis.lo: m68k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/floatformat.h \ - opintl.h $(INCDIR)/opcode/m68k.h + $(INCDIR)/libiberty.h opintl.h $(INCDIR)/opcode/m68k.h m68k-opc.lo: m68k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/m68k.h m88k-dis.lo: m88k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ @@ -1138,6 +1145,12 @@ vax-dis.lo: vax-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/vax.h $(INCDIR)/dis-asm.h $(BFD_H) \ $(INCDIR)/symcat.h +sh64-dis.lo: sh64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ + $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \ + sh64-opc.h $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h +sh64-opc.lo: sh64-opc.c sh64-opc.h w65-dis.lo: w65-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ w65-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-asm.lo: xstormy16-asm.c sysdep.h config.h \ diff -Nur binutils-2.12/opcodes/aclocal.m4 binutils-2.12.1/opcodes/aclocal.m4 --- binutils-2.12/opcodes/aclocal.m4 Sat Dec 16 17:01:44 2000 +++ binutils-2.12.1/opcodes/aclocal.m4 Mon Apr 1 20:28:42 2002 @@ -1,6 +1,6 @@ -dnl aclocal.m4 generated automatically by aclocal 1.4 +dnl aclocal.m4 generated automatically by aclocal 1.4-p5 -dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -28,24 +28,6 @@ AC_SUBST(INTLLIBS) ]) -#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"]) - ] -) - # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. @@ -55,7 +37,7 @@ dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) -AC_DEFUN(AM_INIT_AUTOMAKE, +AC_DEFUN([AM_INIT_AUTOMAKE], [AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) @@ -83,7 +65,7 @@ # Check to make sure that the build environment is sane. # -AC_DEFUN(AM_SANITY_CHECK, +AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 @@ -124,7 +106,7 @@ dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. -AC_DEFUN(AM_MISSING_PROG, +AC_DEFUN([AM_MISSING_PROG], [AC_MSG_CHECKING(for working $2) # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. @@ -140,7 +122,7 @@ # Like AC_CONFIG_HEADER, but automatically create stamp file. -AC_DEFUN(AM_CONFIG_HEADER, +AC_DEFUN([AM_CONFIG_HEADER], [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. @@ -166,7 +148,7 @@ # serial 1 -AC_DEFUN(AM_MAINTAINER_MODE, +AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, @@ -183,7 +165,7 @@ # Define a conditional. -AC_DEFUN(AM_CONDITIONAL, +AC_DEFUN([AM_CONDITIONAL], [AC_SUBST($1_TRUE) AC_SUBST($1_FALSE) if $2; then diff -Nur binutils-2.12/opcodes/config.in binutils-2.12.1/opcodes/config.in --- binutils-2.12/opcodes/config.in Fri Apr 27 09:33:27 2001 +++ binutils-2.12.1/opcodes/config.in Mon Apr 1 20:28:42 2002 @@ -25,6 +25,9 @@ /* Define to `long' if doesn't define. */ #undef off_t +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + /* Define to `unsigned' if doesn't define. */ #undef size_t @@ -105,6 +108,12 @@ /* Define if you have the header file. */ #undef HAVE_SYS_PARAM_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_TYPES_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H diff -Nur binutils-2.12/opcodes/configure binutils-2.12.1/opcodes/configure --- binutils-2.12/opcodes/configure Tue Feb 26 05:35:30 2002 +++ binutils-2.12.1/opcodes/configure Mon Apr 1 20:28:42 2002 @@ -719,49 +719,249 @@ NONENONEs,x,x, && program_prefix=${target_alias}- +# 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:726: 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 - echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 -echo "configure:725: 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:756: 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 - ac_save_LIBS="$LIBS" -LIBS="-lcposix $LIBS" -cat > conftest.$ac_ext <&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:807: 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:839: 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 850 "configure" #include "confdefs.h" -/* 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(); -int main() { -strerror() -; return 0; } +main(){return(0);} EOF -if { (eval echo configure:744: \"$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:855: \"$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 - 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:881: 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:886: 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:914: 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* -LIBS="$ac_save_LIBS" fi -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:946: 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 echo "$ac_t""yes" 1>&6 - 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 else echo "$ac_t""no" 1>&6 + ISC= fi - - # We currently only use the version number for the name of any shared # library. For user convenience, we always use the same version @@ -780,7 +980,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:784: checking for a BSD compatible install" >&5 +echo "configure:984: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -833,7 +1033,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:837: checking whether build environment is sane" >&5 +echo "configure:1037: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -890,7 +1090,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:894: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1094: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -936,7 +1136,7 @@ missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:940: checking for working aclocal" >&5 +echo "configure:1140: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -949,7 +1149,7 @@ fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:953: checking for working autoconf" >&5 +echo "configure:1153: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -962,7 +1162,7 @@ fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:966: checking for working automake" >&5 +echo "configure:1166: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -975,7 +1175,7 @@ fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:979: checking for working autoheader" >&5 +echo "configure:1179: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -988,7 +1188,7 @@ fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:992: checking for working makeinfo" >&5 +echo "configure:1192: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1011,7 +1211,7 @@ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1015: checking for $ac_word" >&5 +echo "configure:1215: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1043,7 +1243,7 @@ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1047: checking for $ac_word" >&5 +echo "configure:1247: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1075,7 +1275,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1079: checking for $ac_word" >&5 +echo "configure:1279: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1178,228 +1378,6 @@ enable_fast_install=yes fi -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1185: 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:1215: 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:1266: 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:1298: 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 1309 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:1314: \"$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:1340: 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:1345: 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:1373: 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 - # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" @@ -1412,7 +1390,7 @@ if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1416: checking for ld used by GCC" >&5 +echo "configure:1394: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1442,10 +1420,10 @@ esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1446: checking for GNU ld" >&5 +echo "configure:1424: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1449: checking for non-GNU ld" >&5 +echo "configure:1427: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1480,7 +1458,7 @@ fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1484: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1462: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1497,7 +1475,7 @@ echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1501: checking for $LD option to reload object files" >&5 +echo "configure:1479: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1509,7 +1487,7 @@ test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1513: checking for BSD-compatible nm" >&5 +echo "configure:1491: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1547,7 +1525,7 @@ echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1551: checking whether ln -s works" >&5 +echo "configure:1529: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1568,7 +1546,7 @@ fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:1572: checking how to recognise dependant libraries" >&5 +echo "configure:1550: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1741,13 +1719,13 @@ deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1745: checking for object suffix" >&5 +echo "configure:1723: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1767,7 +1745,7 @@ echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1771: checking for executable suffix" >&5 +echo "configure:1749: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1777,7 +1755,7 @@ rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -1804,7 +1782,7 @@ file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:1808: checking for ${ac_tool_prefix}file" >&5 +echo "configure:1786: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1866,7 +1844,7 @@ if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:1870: checking for file" >&5 +echo "configure:1848: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1937,7 +1915,7 @@ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1941: checking for $ac_word" >&5 +echo "configure:1919: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1969,7 +1947,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1973: checking for $ac_word" >&5 +echo "configure:1951: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2004,7 +1982,7 @@ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2008: checking for $ac_word" >&5 +echo "configure:1986: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2036,7 +2014,7 @@ # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2040: checking for $ac_word" >&5 +echo "configure:2018: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2103,8 +2081,8 @@ case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 2107 "configure"' > conftest.$ac_ext - if { (eval echo configure:2108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 2085 "configure"' > conftest.$ac_ext + if { (eval echo configure:2086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" @@ -2123,7 +2101,7 @@ ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo configure:2127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:2105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" @@ -2141,7 +2119,7 @@ SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:2145: checking whether the C compiler needs -belf" >&5 +echo "configure:2123: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2154,14 +2132,14 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -2329,7 +2307,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:2333: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:2311: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -2354,7 +2332,7 @@ echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2358: checking for executable suffix" >&5 +echo "configure:2336: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2364,7 +2342,7 @@ rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -2390,7 +2368,7 @@ # 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:2394: checking for $ac_word" >&5 +echo "configure:2372: 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 @@ -2420,7 +2398,7 @@ # 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:2424: checking for $ac_word" >&5 +echo "configure:2402: 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 @@ -2471,7 +2449,7 @@ # 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:2475: checking for $ac_word" >&5 +echo "configure:2453: 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 @@ -2503,7 +2481,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2507: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2485: 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. @@ -2514,12 +2492,12 @@ cat > conftest.$ac_ext << EOF -#line 2518 "configure" +#line 2496 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2501: \"$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 @@ -2545,12 +2523,12 @@ { 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:2549: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2527: 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:2554: checking whether we are using GNU C" >&5 +echo "configure:2532: 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 @@ -2559,7 +2537,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2563: \"$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:2541: \"$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 @@ -2578,7 +2556,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2582: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2560: 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 @@ -2612,7 +2590,7 @@ ALL_LINGUAS="fr sv tr es da de" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2616: checking how to run the C preprocessor" >&5 +echo "configure:2594: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2627,13 +2605,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2644,13 +2622,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2661,13 +2639,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2694,7 +2672,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2698: checking for $ac_word" >&5 +echo "configure:2676: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2722,12 +2700,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2726: checking for ANSI C header files" >&5 +echo "configure:2704: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2735,7 +2713,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2752,7 +2730,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2770,7 +2748,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2791,7 +2769,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2802,7 +2780,7 @@ exit (0); } EOF -if { (eval echo configure:2806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2826,12 +2804,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2830: checking for working const" >&5 +echo "configure:2808: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2901,21 +2879,21 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2905: checking for inline" >&5 +echo "configure:2883: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2941,12 +2919,12 @@ esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2945: checking for off_t" >&5 +echo "configure:2923: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2974,12 +2952,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2978: checking for size_t" >&5 +echo "configure:2956: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3009,19 +2987,19 @@ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:3013: checking for working alloca.h" >&5 +echo "configure:2991: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -3042,12 +3020,12 @@ fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3046: checking for alloca" >&5 +echo "configure:3024: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -3107,12 +3085,12 @@ echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3111: checking whether alloca needs Cray hooks" >&5 +echo "configure:3089: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 -echo "configure:3141: checking for $ac_func" >&5 +echo "configure:3119: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3192,7 +3170,7 @@ fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3196: checking stack direction for C alloca" >&5 +echo "configure:3174: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3200,7 +3178,7 @@ ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3244,17 +3222,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3248: checking for $ac_hdr" >&5 +echo "configure:3226: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3283,12 +3261,12 @@ for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3287: checking for $ac_func" >&5 +echo "configure:3265: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3336,7 +3314,7 @@ done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3340: checking for working mmap" >&5 +echo "configure:3318: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3344,7 +3322,7 @@ ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3525,17 +3503,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3529: checking for $ac_hdr" >&5 +echo "configure:3507: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3565,12 +3543,12 @@ __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3569: checking for $ac_func" >&5 +echo "configure:3547: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3622,12 +3600,12 @@ for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3626: checking for $ac_func" >&5 +echo "configure:3604: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3684,19 +3662,19 @@ if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3688: checking for LC_MESSAGES" >&5 +echo "configure:3666: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -3717,7 +3695,7 @@ fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3721: checking whether NLS is requested" >&5 +echo "configure:3699: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -3737,7 +3715,7 @@ EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3741: checking whether included gettext is requested" >&5 +echo "configure:3719: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -3756,17 +3734,17 @@ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3760: checking for libintl.h" >&5 +echo "configure:3738: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3783,19 +3761,19 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3787: checking for gettext in libc" >&5 +echo "configure:3765: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3811,7 +3789,7 @@ if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3815: checking for bindtextdomain in -lintl" >&5 +echo "configure:3793: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3819,7 +3797,7 @@ ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3812: \"$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" else @@ -3846,19 +3824,19 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3850: checking for gettext in libintl" >&5 +echo "configure:3828: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -3886,7 +3864,7 @@ # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3890: checking for $ac_word" >&5 +echo "configure:3868: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3920,12 +3898,12 @@ for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3924: checking for $ac_func" >&5 +echo "configure:3902: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3975,7 +3953,7 @@ # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3979: checking for $ac_word" >&5 +echo "configure:3957: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4011,7 +3989,7 @@ # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4015: checking for $ac_word" >&5 +echo "configure:3993: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4043,7 +4021,7 @@ fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4083,7 +4061,7 @@ # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4087: checking for $ac_word" >&5 +echo "configure:4065: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4117,7 +4095,7 @@ # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4121: checking for $ac_word" >&5 +echo "configure:4099: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4153,7 +4131,7 @@ # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4157: checking for $ac_word" >&5 +echo "configure:4135: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4243,7 +4221,7 @@ LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4247: checking for catalogs to be installed" >&5 +echo "configure:4225: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4271,17 +4249,17 @@ if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4275: checking for linux/version.h" >&5 +echo "configure:4253: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4359,7 +4337,7 @@ EXEEXT_FOR_BUILD='$(EXEEXT)' else echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 -echo "configure:4363: checking for build system executable suffix" >&5 +echo "configure:4341: checking for build system executable suffix" >&5 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4396,7 +4374,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:4400: checking for a BSD compatible install" >&5 +echo "configure:4378: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4453,17 +4431,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4457: checking for $ac_hdr" >&5 +echo "configure:4435: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4834,6 +4812,7 @@ s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g +s%@CC@%$CC%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g @@ -4847,7 +4826,6 @@ s%@SET_MAKE@%$SET_MAKE%g s%@AR@%$AR%g s%@RANLIB@%$RANLIB%g -s%@CC@%$CC%g s%@LN_S@%$LN_S%g s%@OBJEXT@%$OBJEXT%g s%@EXEEXT@%$EXEEXT%g diff -Nur binutils-2.12/opcodes/dep-in.sed binutils-2.12.1/opcodes/dep-in.sed --- binutils-2.12/opcodes/dep-in.sed Mon May 3 03:28:59 1999 +++ binutils-2.12.1/opcodes/dep-in.sed Thu Apr 4 11:20:15 2002 @@ -6,7 +6,9 @@ s!\.o:!.lo:! s! @BFD_H@! $(BFD_H)!g s!@INCDIR@!$(INCDIR)!g +s!@TOPDIR@/include!$(INCDIR)!g s!@BFDDIR@!$(BFDDIR)!g +s!@TOPDIR@/bfd!$(BFDDIR)!g s!@SRCDIR@/!!g s/\\\n */ /g diff -Nur binutils-2.12/opcodes/mips-dis.c binutils-2.12.1/opcodes/mips-dis.c --- binutils-2.12/opcodes/mips-dis.c Sun Nov 4 22:07:51 2001 +++ binutils-2.12.1/opcodes/mips-dis.c Thu May 9 10:51:45 2002 @@ -397,10 +397,14 @@ is_newabi (header) Elf_Internal_Ehdr *header; { - if ((header->e_flags - & (E_MIPS_ABI_EABI32 | E_MIPS_ABI_EABI64 | EF_MIPS_ABI2)) != 0 - || (header->e_ident[EI_CLASS] == ELFCLASS64 - && (header->e_flags & E_MIPS_ABI_O64) == 0)) + /* There are no old-style ABIs which use 64-bit ELF. */ + if (header->e_ident[EI_CLASS] == ELFCLASS64) + return 1; + + /* If a 32-bit ELF file, N32, EABI32, and EABI64 are new-style ABIs. */ + if ((header->e_flags & EF_MIPS_ABI2) != 0 + || (header->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_EABI32 + || (header->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_EABI64) return 1; return 0; diff -Nur binutils-2.12/opcodes/mips-opc.c binutils-2.12.1/opcodes/mips-opc.c --- binutils-2.12/opcodes/mips-opc.c Tue Oct 23 15:20:27 2001 +++ binutils-2.12.1/opcodes/mips-opc.c Thu May 9 10:51:45 2002 @@ -114,7 +114,7 @@ them first. The assemblers uses a hash table based on the instruction name anyhow. */ /* name, args, match, mask, pinfo, membership */ -{"pref", "k,o(b)", 0xcc000000, 0xfc000000, RD_b, I32|G3 }, +{"pref", "k,o(b)", 0xcc000000, 0xfc000000, RD_b, I4|I32|G3 }, {"prefx", "h,t(b)", 0x4c00000f, 0xfc0007ff, RD_b|RD_t, I4 }, {"nop", "", 0x00000000, 0xffffffff, 0, I1 }, {"ssnop", "", 0x00000040, 0xffffffff, 0, I32 }, @@ -583,6 +583,7 @@ {"ffc", "d,v", 0x0000000b, 0xfc1f07ff, WR_d|RD_s, L1 }, {"movn.d", "D,S,t", 0x46200013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, I4|I32 }, {"movn.s", "D,S,t", 0x46000013, 0xffe0003f, WR_D|RD_S|RD_t|FP_S, I4|I32 }, +{"movn.ps", "D,S,t", 0x46c00013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, I5 }, {"movt", "d,s,N", 0x00010001, 0xfc0307ff, WR_d|RD_s|RD_CC, I4|I32 }, {"movt.d", "D,S,N", 0x46210011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, I4|I32 }, {"movt.s", "D,S,N", 0x46010011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S, I4|I32 }, @@ -591,6 +592,7 @@ {"ffs", "d,v", 0x0000000a, 0xfc1f07ff, WR_d|RD_s, L1 }, {"movz.d", "D,S,t", 0x46200012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, I4|I32 }, {"movz.s", "D,S,t", 0x46000012, 0xffe0003f, WR_D|RD_S|RD_t|FP_S, I4|I32 }, +{"movz.ps", "D,S,t", 0x46c00012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, I5 }, /* move is at the top of the table. */ {"msub.d", "D,R,S,T", 0x4c000029, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I4 }, {"msub.s", "D,R,S,T", 0x4c000028, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, I4 }, diff -Nur binutils-2.12/opcodes/ppc-opc.c binutils-2.12.1/opcodes/ppc-opc.c --- binutils-2.12/opcodes/ppc-opc.c Mon Feb 25 00:04:55 2002 +++ binutils-2.12.1/opcodes/ppc-opc.c Thu May 9 10:51:46 2002 @@ -504,6 +504,16 @@ /* The SHB field in a VA form instruction. */ #define SHB UIMM + 1 { 4, 6, 0, 0, 0 }, + + /* The WS field. */ +#define WS SHB + 1 +#define WS_MASK (0x7 << 11) + { 3, 11, 0, 0, 0 }, + + /* The L field in an mtmsrd instruction */ +#define MTMSRD_L WS + 1 + { 1, 16, 0, 0, PPC_OPERAND_OPTIONAL }, + }; /* The functions used to insert and extract complicated operands. */ @@ -1406,9 +1416,15 @@ /* An X_MASK with the RA and RB fields fixed. */ #define XRARB_MASK (X_MASK | RA_MASK | RB_MASK) +/* An XRARB_MASK, but with the L bit clear. */ +#define XRLARB_MASK (XRARB_MASK & ~((unsigned long) 1 << 16)) + /* An X_MASK with the RT and RA fields fixed. */ #define XRTRA_MASK (X_MASK | RT_MASK | RA_MASK) +/* An XRTRA_MASK, but with L bit clear. */ +#define XRTLRA_MASK (XRTRA_MASK & ~((unsigned long) 1 << 21)) + /* An X form comparison instruction. */ #define XCMPL(op, xop, l) (X ((op), (xop)) | ((((unsigned long)(l)) & 1) << 21)) @@ -1797,7 +1813,7 @@ { "vctuxs", VX(4, 906), VX_MASK, PPCVEC, { VD, VB, UIMM } }, { "vexptefp", VX(4, 394), VX_MASK, PPCVEC, { VD, VB } }, { "vlogefp", VX(4, 458), VX_MASK, PPCVEC, { VD, VB } }, -{ "vmaddfp", VXA(4, 46), VXA_MASK, PPCVEC, { VD, VA, VB, VC } }, +{ "vmaddfp", VXA(4, 46), VXA_MASK, PPCVEC, { VD, VA, VC, VB } }, { "vmaxfp", VX(4, 1034), VX_MASK, PPCVEC, { VD, VA, VB } }, { "vmaxsb", VX(4, 258), VX_MASK, PPCVEC, { VD, VA, VB } }, { "vmaxsh", VX(4, 322), VX_MASK, PPCVEC, { VD, VA, VB } }, @@ -2941,7 +2957,7 @@ { "wrteei", X(31,163), XE_MASK, PPC403, { E } }, { "wrteei", X(31,163), XE_MASK, BOOKE, { E } }, -{ "mtmsrd", X(31,178), XRARB_MASK, PPC64, { RS } }, +{ "mtmsrd", X(31,178), XRLARB_MASK, PPC64, { RS, MTMSRD_L } }, { "stdux", X(31,181), X_MASK, PPC64, { RS, RAS, RB } }, @@ -3049,6 +3065,8 @@ { "addo.", XO(31,266,1,1), XO_MASK, PPCCOM, { RT, RA, RB } }, { "caxo.", XO(31,266,1,1), XO_MASK, PWRCOM, { RT, RA, RB } }, +{ "tlbiel", X(31,274), XRTRA_MASK, POWER4, { RB } }, + { "mfapidi", X(31,275), X_MASK, BOOKE, { RT, RA } }, { "lscbx", XRC(31,277,0), X_MASK, M601, { RT, RA, RB } }, @@ -3065,7 +3083,7 @@ { "lhzxe", X(31,287), X_MASK, BOOKE64, { RT, RA, RB } }, -{ "tlbie", X(31,306), XRTRA_MASK, PPC, { RB } }, +{ "tlbie", X(31,306), XRTLRA_MASK, PPC, { RB, L } }, { "tlbi", X(31,306), XRT_MASK, POWER, { RA, RB } }, { "eciwx", X(31,310), X_MASK, PPC, { RT, RA, RB } }, @@ -3656,7 +3674,7 @@ { "rac", X(31,818), X_MASK, PWRCOM, { RT, RA, RB } }, { "dss", XDSS(31,822,0), XDSS_MASK, PPCVEC, { STRM } }, -{ "dssall", XDSS(31,822,1), XDSS_MASK, PPCVEC, { STRM } }, +{ "dssall", XDSS(31,822,1), XDSS_MASK, PPCVEC, { 0 } }, { "srawi", XRC(31,824,0), X_MASK, PPCCOM, { RA, RS, SH } }, { "srai", XRC(31,824,0), X_MASK, PWRCOM, { RA, RS, SH } }, @@ -3672,7 +3690,9 @@ { "tlbsx.", XRC(31,914,1), X_MASK, PPC403, { RT, RA, RB } }, { "tlbsx", XRC(31,914,0), X_MASK, BOOKE, { RA, RB } }, +{ "tlbsx.", XRC(31,914,1), X_MASK, BOOKE, { RA, RB } }, { "tlbsxe", XRC(31,915,0), X_MASK, BOOKE, { RA, RB } }, +{ "tlbsxe.", XRC(31,915,1), X_MASK, BOOKE, { RA, RB } }, { "slbmfee", X(31,915), XRA_MASK, PPC64, { RT, RB } }, @@ -3693,7 +3713,7 @@ { "stdxe", X(31,927), X_MASK, BOOKE64, { RS, RA, RB } }, -{ "tlbre", X(31,946), X_MASK, BOOKE, { RT, RA, SH } }, +{ "tlbre", X(31,946), X_MASK, BOOKE, { RT, RA, WS } }, { "tlbrehi", XTLB(31,946,0), XTLB_MASK, PPC403, { RT, RA } }, { "tlbrelo", XTLB(31,946,1), XTLB_MASK, PPC403, { RT, RA } }, @@ -3714,7 +3734,7 @@ { "tlbwelo", XTLB(31,978,1), XTLB_MASK, PPC403, { RT, RA } }, { "tlbwe", X(31,978), X_MASK, PPC403, { RS, RA, SH } }, -{ "tlbwe", X(31,978), X_MASK, BOOKE, { RT, RA, SH } }, +{ "tlbwe", X(31,978), X_MASK, BOOKE, { RT, RA, WS } }, { "icbi", X(31,982), XRT_MASK, PPC, { RA, RB } }, diff -Nur binutils-2.12/opcodes/s390-dis.c binutils-2.12.1/opcodes/s390-dis.c --- binutils-2.12/opcodes/s390-dis.c Tue Aug 21 04:42:28 2001 +++ binutils-2.12.1/opcodes/s390-dis.c Thu Apr 4 11:20:18 2002 @@ -1,5 +1,5 @@ /* s390-dis.c -- Disassemble S390 instructions - Copyright 2000, 2001 Free Software Foundation, Inc. + Copyright 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of GDB, GAS and the GNU binutils. @@ -53,10 +53,10 @@ } switch (info->mach) { - case bfd_mach_s390_esa: + case bfd_mach_s390_31: current_arch_mask = 1 << S390_OPCODE_ESA; break; - case bfd_mach_s390_esame: + case bfd_mach_s390_64: current_arch_mask = 1 << S390_OPCODE_ESAME; break; default: