diff -uprN binutils-2.11.92.0.10/.cvsignore binutils-2.11.92.0.12/.cvsignore --- binutils-2.11.92.0.10/.cvsignore Tue Jun 20 10:24:18 2000 +++ binutils-2.11.92.0.12/.cvsignore Fri Nov 16 14:05:51 2001 @@ -29,4 +29,4 @@ dir.info Makefile lost+found update.out - +update.sourceware diff -uprN binutils-2.11.92.0.10/COPYING.NEWLIB binutils-2.11.92.0.12/COPYING.NEWLIB --- binutils-2.11.92.0.10/COPYING.NEWLIB Fri Feb 23 21:09:50 2001 +++ binutils-2.11.92.0.12/COPYING.NEWLIB Wed Nov 21 15:35:32 2001 @@ -112,7 +112,20 @@ of the software without specific, writte Hewlett-Packard Company makes no representations about the suitability of this software for any purpose. -(9) Unless otherwise stated in each remaining newlib file, the remaining +(9) Hans-Peter Nilsson + +Copyright (C) 2001 Hans-Peter Nilsson + +Permission to use, copy, modify, and distribute this software is +freely granted, provided that the above copyright notice, this notice +and the following disclaimer are preserved with no changes. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. + +(10) Unless otherwise stated in each remaining newlib file, the remaining files in the newlib subdirectory are governed by the following copyright. Copyright (c) 1994, 1997, 2001 Red Hat Incorporated. diff -uprN binutils-2.11.92.0.10/ChangeLog binutils-2.11.92.0.12/ChangeLog --- binutils-2.11.92.0.10/ChangeLog Thu Oct 4 14:35:42 2001 +++ binutils-2.11.92.0.12/ChangeLog Wed Nov 21 15:35:32 2001 @@ -1,3 +1,51 @@ +2001-11-20 Nick Clifton + + * Makefile.in (do-proto-toplev): Use msgfmt to generate .gmo + files from .po files for a distribution. + +2001-11-19 Hans-Peter Nilsson + + * COPYING.NEWLIB: Mention preserved notice in specific parts. + +2001-11-13 Jeff Holcomb + + Merged from net gcc: + 2001-07-30 Jeff Sturm + * ltcf-c.sh: Use $objext, not $ac_objext. + 2001-07-27 Mark Kettenis + * ltcf-cxx.sh: Add support for GNU. + 2001-07-22 Timothy Wall + * ltcf-c.sh: Don't disable shared libraries for AIX5/IA64. Preserve + default settings if using GNU tools with that configuration. + * ltcf-cxx.sh: Ditto. + * ltcf-gcj.sh: Ditto. + 2001-07-21 Michael Chastain + * ltconfig: Set max_cmd_len to a maximum of 512Kb, as it seems some + HPUX 11.0 systems have trouble with 1MB. Mark as gcc-local. + * ltmain.sh: Mark as gcc-local. + +2001-11-13 Jeff Holcomb + + * Makefile.in (all-bison): Revert 2001-10-24. + Don't depend on texinfo. + +2001-11-12 Hans-Peter Nilsson + + * COPYING.NEWLIB: Add BSD-style license/copyright blurb for my work. + +2001-11-08 Phil Edwards + + * configure.in (--enable-languages): Be more permissive about + syntax. Check for empty lists better. Warn about $LANGUAGES. + +2001-11-06 Hans-Peter Nilsson + + * Makefile.in (MAKEINFO): Use "missing" for makeinfo older than 4.0. + +2001-10-24 Jeff Holcomb + + Makefile.in (all-bison): Don't depend on texinfo. + 2001-10-03 Alan Modra * gettext.m4: Test po/POTFILES.in exists before trying to read. diff -uprN binutils-2.11.92.0.10/ChangeLog.linux binutils-2.11.92.0.12/ChangeLog.linux --- binutils-2.11.92.0.10/ChangeLog.linux Mon Oct 22 10:25:11 2001 +++ binutils-2.11.92.0.12/ChangeLog.linux Fri Nov 16 14:05:51 2001 @@ -1,3 +1,7 @@ +2001-11-06 H.J. Lu + + * binutils.spec.in: Apply binutils-mips-isa.patch for mips. + 2001-10-22 H.J. Lu * ltmain.sh: Allow link against an archive when building a diff -uprN binutils-2.11.92.0.10/Makefile.in binutils-2.11.92.0.12/Makefile.in --- binutils-2.11.92.0.10/Makefile.in Mon Oct 1 15:25:20 2001 +++ binutils-2.11.92.0.12/Makefile.in Wed Nov 21 15:35:32 2001 @@ -141,9 +141,13 @@ M4 = `if [ -f $$r/m4/m4 ] ; \ then echo $$r/m4/m4 ; \ else echo ${DEFAULT_M4} ; fi` +# For an installed makeinfo, we require it to be from texinfo 4 or +# higher, else we use the "missing" dummy. MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \ then echo $$r/texinfo/makeinfo/makeinfo ; \ - else echo makeinfo ; fi` + else if (makeinfo --version \ + | egrep 'texinfo[^0-9]*([1-3][0-9]|[4-9])') >/dev/null 2>&1; \ + then echo makeinfo; else echo $$s/missing makeinfo; fi; fi` # This just becomes part of the MAKEINFO definition passed down to # sub-makes. It lets flags be given on the command line while still @@ -1860,6 +1864,11 @@ do-proto-toplev: $(DEVO_SUPPORT) $(SUPPO else true; fi chmod -R og=u . || chmod og=u `find . -print` # + # Create .gmo files from .po files. + for f in `find . -name '*.po' -type f -print`; do \ + msgfmt -o `echo $$f | sed -e 's/\.po$$/.gmo/'` $$f ; \ + done + # -rm -f $(PACKAGE)-$(VER) ln -s proto-toplev $(PACKAGE)-$(VER) diff -uprN binutils-2.11.92.0.10/bfd/ChangeLog binutils-2.11.92.0.12/bfd/ChangeLog --- binutils-2.11.92.0.10/bfd/ChangeLog Sun Oct 21 16:24:32 2001 +++ binutils-2.11.92.0.12/bfd/ChangeLog Wed Nov 21 15:35:32 2001 @@ -1,6 +1,548 @@ +2001-11-21 Alan Modra + + * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather + than sym_sec->output_section to detect relocs against discarded + sections. + +2001-11-19 H.J. Lu + + * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when + discarding relocations. + +2001-11-19 Nick Clifton + + * section.c (bfd_is_const_section): New macro. Return true if the + given seciton is one of the special, constant, sections. + * bfd-in2.h: Regenerate. + * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section. + (coff_write_native_symbol): Use bfd_is_const_section. + +2001-11-19 Alan Modra + + * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount. + + * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined + millicode syms as candidates for import stubs. + + * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete. + (allocate_PIC_calls): Rename to allocate_plt_static. + (allocate_dynrelocs): Move most of code handling .plt entries to.. + (allocate_plt_static): ..here. Don't drop plabel entries. + +2001-11-19 Hans-Peter Nilsson + + * mmo.c: Adjust documentation tags to use texinfo 4 features. + +2001-11-16 Nick Clifton + + * section.c (bfd_is_const_section): New macro. Return true if the + section pointer refers to one of the special, constant sections. + * bfd-in2.h: Regenerate. + + * coffgen.c (coff_count_linenumbers): Only update the line number + count in non-special sections. + (coff_write_native_symbol): Only update the line number file + position in non-special sections. + +2001-11-15 Daniel Jacobowitz + + * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against + local syms from discarded sections. Update comment. + +2001-11-15 Alan Modra + + * po/SRC-POTFILES.in: Regenerate. + + * elflink.h (elf_link_input_bfd): Complain about all relocs + against local syms from discarded sections. K&R fixes. + (elf_reloc_symbol_deleted_p): Don't try to swap in external syms. + K&R fixes. + +2001-11-15 Alexandre Oliva + + * elf64-sparc.c (sparc64_elf_relocate_section): Disregard + overflows in the .stab section. + +2001-11-14 Daniel Jacobowitz + + * bfd-in.h (bfd_elf32_discard_info): Add prototype. + (bfd_elf64_discard_info): Likewise. + * bfd-in2.h: Regenerate. + * elf-bfd.h (struct elf_reloc_cookie): New. + (struct elf_backend_data): Add elf_backend_discard_info, + elf_backend_ignore_discarded_relocs, and elf_backend_write_section. + (_bfd_elf32_reloc_symbol_deleted_p): Add prototype. + (_bfd_elf64_reloc_symbol_deleted_p): Likewise. + * elf32-mips.c (_bfd_elf32_mips_discard_info): New. + (_bfd_elf32_mips_ignore_discarded_relocs): New. + (_bfd_elf32_mips_write_section): New. + (elf_backend_discard_info): Define. + (elf_backend_ignore_discarded_relocs): Define. + (elf_backend_write_section): Define. + * elfcode.h (elf_bfd_discard_info): Define. + (elf_reloc_symbol_deleted_p): Define. + * elflink.h (elf_link_input_bfd): Check + elf_section_ignore_discarded_relocs. Call + bed->elf_backend_write_section if available. + (elf_reloc_symbol_deleted_p): New. + (elf_bfd_discard_info): New. + (elf_section_ignore_discarded_relocs): New. + * elfxx-target.h (elf_backend_discard_info): Define. + (elf_backend_ignore_discarded_relocs): Define. + (elf_backend_write_section): Define. + (elfNN_bed): Add elf_backend_discard_info, + elf_backend_ignore_discarded_relocs, and + elf_backend_write_section. + * libbfd-in.h (_bfd_discard_section_stabs): Add prototype. + * libbfd.h: Regenerate. + * stabs.c (_bfd_discard_section_stabs): New. + +2001-11-14 Martin Schwidefsky + + * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc" + scheme to get rid of an ugly complicated test. + * elf64-s390.c (elf_s390_relocate_section): Likewise. + +2001-11-14 Andreas Jaeger + + * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use + x86-64 for display. + +2001-11-14 Jakub Jelinek + + * dwarf2.c (struct line_head) [total_length]: Change type to + bfd_vma. + (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size. + (struct comp_unit): Add stash and offset_size. + (read_8_bytes): Return bfd_vma. + (read_indirect_string): New. + (read_attribute): Handle DW_FORM_strp. + (decode_line_info): Support 64-bit DWARF format. + (_bfd_dwarf2_find_nearest_line): Likewise. + (parse_comp_unit): Set offset_size and stash. + +2001-11-13 Keith Walker + + * dwarf2.c (read_attribute_value): New function to handle + DW_FORM_indirect. + (read_attribute): Use it. + +2001-11-13 Geoffrey Keating + + * dwarf2.c (decode_line_info): Properly deal with unknown standard + opcodes. + +2001-11-13 John Marshall + Alan Modra + + * section.c (bfd_make_section_anyway): Don't increment section_id + and the BFD's section_count if adding the section failed. + * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway + change. + +2001-11-12 Orjan Friberg + + * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new + core dump format. + +2001-11-11 H.J. Lu + + * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call + _bfd_elf_strtab_size instead of _bfd_stringtab_size. + + * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change + dynstr type to `struct elf_strtab_hash *'. + +2001-11-11 Hans-Peter Nilsson + + * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i + size_t. Rename second i to j. + +Sat Nov 10 08:56:02 2001 Jeffrey A Law (law@cygnus.com) + + * binary.c: Include safe-ctype.h after bfd.h and sysdep.h. + +2001-11-10 Alan Modra + + * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF + relocs into shared libs. + * elf32-cris.c (cris_elf_relocate_section): Likewise. + * elf32-i370.c (i370_elf_relocate_section): Likewise. + * elf32-m68k.c (elf_m68k_relocate_section): Likewise. + * elf32-mips.c (mips_elf_calculate_relocation): Likewise. + * elf32-ppc.c (ppc_elf_relocate_section): Likewise. + * elf32-sh.c (sh_elf_relocate_section): Likewise. + * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. + * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. + * elf64-s390.c (elf_s390_relocate_section): Likewise. + * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. + * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. + * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. + + * elf.c (bfd_section_from_r_symndx): New function. + * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define. + (struct sym_sec_cache): New. + (bfd_section_from_r_symndx): Declare. + (struct bfd_elf_section_data): Change local_dynrel type to PTR. + * elflink.h (elf_link_input_bfd): Don't test for removed linkonce + relocs when relocatable. Don't zero entire reloc, just zero the + addend and sym. + * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec. + (elf32_hppa_link_hash_table_create): Init it. + (elf32_hppa_check_relocs): Track dynamic relocs needed for local + syms on a per-section basis as we do for globals. + (elf32_hppa_gc_sweep_hook): Update for local_dynrel change. + (allocate_dynrelocs): Warning fix. + (elf32_hppa_size_dynamic_sections): Don't allocate relocs when + section has been discarded. + (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs + into shared libs. + * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec. + (elf_i386_link_hash_table_create): Init it. + (elf_i386_check_relocs): Track dynamic relocs needed for local + syms on a per-section basis as we do for globals. + (elf_i386_gc_sweep_hook): Update for local_dynrel change. + Remove dead code. + (allocate_dynrelocs): Warning fix. + (elf_i386_size_dynamic_sections): Don't allocate relocs when + section has been discarded. + (elf_i386_relocate_section): Don't copy STN_UNDEF relocs + into shared libs. + * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec. + (elf_s390_link_hash_table_create): Init it. + (elf_s390_check_relocs): Track dynamic relocs needed for local + syms on a per-section basis as we do for globals. + (elf_s390_gc_sweep_hook): Update for local_dynrel change. + Remove dead code. + (allocate_dynrelocs): Warning fix. + (elf_s390_size_dynamic_sections): Don't allocate relocs when + section has been discarded. + (elf_s390_relocate_section): Don't copy STN_UNDEF relocs + into shared libs. + * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec. + (ppc64_link_hash_table_create): Init it. + (ppc64_elf_check_relocs): Track dynamic relocs needed for local + syms on a per-section basis as we do for globals. + (ppc64_elf_gc_sweep_hook): Update for local_dynrel change. + (allocate_dynrelocs): Call the correct record_dynamic_dymbol + function. Warning fix. + (ppc64_elf_size_dynamic_sections): Don't allocate relocs when + section has been discarded. + (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs + into shared libs. + * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec. + (elf_s390_link_hash_table_create): Init it. + (elf_s390_check_relocs): Track dynamic relocs needed for local + syms on a per-section basis as we do for globals. + (elf_s390_gc_sweep_hook): Update for local_dynrel change. + Remove dead code. + (allocate_dynrelocs): Warning fix. + (elf_s390_size_dynamic_sections): Don't allocate relocs when + section has been discarded. + (elf_s390_relocate_section): Don't copy STN_UNDEF relocs + into shared libs. + +2001-11-08 Martin Schwidefsky + + * elf32-s390: Major rework that introduces all recent changes to + the s390 backends. Get a closer match to elf32-i386. + (elf_s390_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. Reinstate fudge for unresolved relocs + in debugging sections. + (elf32_s390_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. Discard .plt entries for everything with + plt.refcount <= 0. + (elf_s390_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. Remove separate switch stmt for creating .got + section. Initialise local_got_refcounts to 0. Cache pointer to + "sreloc" section in elf_section_data. Tweak condition under which .got + created. Report files with bad relocation section names. + (elf_s390_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 elf_s390_relocate_section. Expand SHN_UNDEF + comment. Move expressions out of function calls. Replace BFD_ASSERT + with abort. + (elf_s390_finish_dynamic_sections): Migrate common code out of switch + statement. Replace BFD_ASSERT with abort. + (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i" + to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag + instead of looking up section names for DT_TEXTREL. Replace + BFD_ASSERT with abort. Zero out the dynamic allocated content space. + Add a comment to remind us that one day this ought to be fixed. + (struct elf_s390_link_hash_entry): Rename "root" to "elf". + (struct elf_s390_link_hash_table): Likewise. + (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get + rid of unnecessary casts. + (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields. + Remove "section" field. + (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel. + Reference count possible .plt entries. Don't deallocate .got and + .relgot space here. + (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs. + Update comment. + (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to + dyn_relocs. + (elf_s390_discard_copies): Delete. + (elf_s390_link_hash_traverse): Delete. + (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link + rather than gc variety). + (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt, + srelplt, sdynbss, srelbss fields. + (elf_s390_link_hash_table_create): Init them. + (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define. + (allocate_dynrelocs): New function. + (create_got_section): New function. + (elf_backend_can_refcount): Define. + (elf_backend_copy_indirect_symbol): Define. + (elf_s390_copy_indirect_symbol): New function. + (elf_s390_create_dynamic_sections): New function. + (readonly_dynrelocs): New function. + * elf64-s390.c: Likewise. + +2001-11-07 Jakub Jelinek + + * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo. + (BFD32_BACKENDS_CFILES): Add elf-strtab.c. + (elf-strtab.lo): Add rule. + * Makefile.in: Rebuilt. + * configure.in (elf): Add elf-strtab.lo. + * configure: Rebuilt. + * elf-bfd.h (elf_strtab_hash): Forward declare. + (struct elf_link_hash_table): Change dynstr type to + struct elf_strtab_hash *. + (struct elf_obj_tdata): Change strtab_ptr type to + struct elf_strtab_hash *. + (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add, + _bfd_elf_strtab_addref, _bfd_elf_strtab_delref, + _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size, + _bfd_elf_strtab_offset, _bfd_elf_strtab_emit, + _bfd_elf_strtab_finalize): New prototypes. + * elf-strtab.c: New file. + * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add + and _bfd_elf_strtab_size instead of _bfd_stringtab calls. + Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or + when forcing dynamic symbol to local. + (elf_link_create_dynamic_sections): Call + _bfd_elf_strtab_init instead of elf_stringtab_init. + (elf_link_record_local_dynamic_symbol): Likewise, change + dynstr type. Use _bfd_elf_strtab functions instead of + _bfd_stringtab calls. + (size_dynamic_sections): Use _bfd_elf_strtab functions instead of + _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields, + call _bfd_elf_strtab_addref. Call elf_finalize_dynstr. + (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions. + (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing + dynamic symbol to local. + (elf_link_assign_sym_version): Likewise. + (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of + _bfd_stringtab_emit. + * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr + type. Call _bfd_elf_strtab functions instead of + _bfd_stringtab functions. + * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise. + * elf.c (_bfd_elf_init_reloc_shdr): Likewise. + (elf_fake_sections): Likewise. + (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs + on shstrtab hash table, call _bfd_elf_strtab_addref on each section + name in the output. Call _bfd_elf_strtab_finalize and + use _bfd_elf_strtab_offset to finalize sh_name section header fields. + (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size + instead of _bfd_stringtab_size. + (prep_headers): Change shstrtab type. + Use _bfd_elf_strtab calls instead of _bfd_stringtab calls. + +2001-11-07 Alan Modra + + * elflink.h (elf_link_input_bfd ): Fix + bad symtab segfault. Formatting and warning fixes. Improve + error message for internationalisation. + +2001-11-06 H.J. Lu (hjl@gnu.org) + + * elflink.h (elf_link_input_bfd): Complain about relocs against + discarded sections. + +2001-11-03 Alan Modra + + * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order. + +2001-11-02 H.J. Lu + + * elf32-mips.c (mips_elf_calculate_relocation): Don't create + dynamic relocation for symbols defined in regular objects when + creating executables. + +2001-11-02 Nick Clifton + + * configure.in (ALL_LINGUAS): Add "fr". + * configure: Regenerate. + * po/fr.po: New file. + + * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch. + +2001-11-02 John David Anglin + + * som.c (setup_sections): Initialize subspace_sections. + +2001-11-02 H.J. Lu (hjl@gnu.org) + + * coffgen.c (coff_object_p): Return 0 if the header is too big. + +2001-11-02 Hans-Peter Nilsson + + * elfcore.h (elf_core_file_p): Preserve and clear abfd section + information. Save bfd arch and mach values. Restore on error. + +2001-11-02 Alan Modra + + * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls. + (allocate_PIC_calls): New function. + (allocate_dynrelocs): Don't allocate pic_call plt entries here. + (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls. + (elf32_hppa_finish_dynamic_symbol): Remove dead code. + +2001-11-02 Hans-Peter Nilsson + + * elf32-cris.c (cris_elf_grok_prstatus): New function. + (cris_elf_grok_psinfo): New function. + (elf_backend_grok_prstatus): Define. + (elf_backend_grok_psinfo): Define. + +2001-11-01 Alan Modra + + * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch + prediction bits. + +2001-10-31 Chris Demetriou + + * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative + relocations properly. + +2001-10-31 H.J. Lu + + * elflink.h (elf_link_output_extsym): Don't clear the visibility + field for relocateable. + +2001-11-01 Alan Modra + + * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count + .plt relocs in DT_RELASZ. + +2001-10-29 NIIBE Yutaka + + * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu + targets. + +2001-10-31 Nick Clifton + + * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec. + +2001-10-30 Hans-Peter Nilsson + + * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo. + (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo. + (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c. + Regenerate dependencies. + * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors. + * config.bfd: [BFD64] (mmix-*-*): New case. + * cpu-mmix.c, mmo.c, elf64-mmix.c: New files. + * archures.c (enum bfd_architecture): Add bfd_arch_mmix. + (bfd_mmix_arch): Declare. + (bfd_archures_list): Add bfd_mmix_arch. + * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour. + (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare. + (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and + bfd_mmo_mmix_vec. + * reloc.c: Add MMIX relocations. + * bfd.c (struct _bfd, tdata): Add mmo_data. + * Makefile.in: Regenerate. + * configure: Regenerate. + * libbfd.h: Regenerate. + * bfd-in2.h: Regenerate. + * configure: Rebuild. + +2001-10-30 Richard Earnshaw (rearnsha@arm.com) + + * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the + p_paddr of the segment that contains it. + (copy_private_bfd_data): If the LMA for a segment is known, use it + for matching sections to segments. + (assign_file_positions_for_segments): Use the LMA when adjusting + for inter-section alignment padding. + +2001-10-29 Kazu Hirata + + * README: Fix a typo. + +2001-10-24 Richard Henderson + + * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy + timestamp to time_t for ctime. + +2001-10-24 Hans-Peter Nilsson + + * elf32-cris.c (cris_reloc_type_lookup): Change loop to use + unsigned, increasing index. + +2001-10-23 H.J. Lu + + * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check + m != NULL before accessing it. + +2001-10-23 Alan Modra + + * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing + bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup + doesn't accept BFD_RELOC_* on some targets, eg. hppa. + + * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs. + (hppa_link_hash_newfunc): Likewise. + (elf32_hppa_finish_dynamic_symbol): Likewise. + (allocate_dynrelocs): Always allocate .got relocs if shared. + (elf32_hppa_relocate_section): Output them too. Similarly + consolidate .plt reloc code, and no longer initialise .plt + when a reloc is output. + (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries + when no reloc is output. + + From Herbert Xu + * elf32-hppa.c (final_link_relocate): Call bfd_set_error for + unreachable branches. + +2001-10-22 H.J. Lu + + * configure.in (WIN32LIBADD): Use -L../libiberty for + mips*-*-linux*. + * configure: Rebuild. + +2001-10-21 H.J. Lu + + * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty + if shared library is enabled only for Linux hosts. + * configure: Rebuild. + +2001-10-21 H.J. Lu + + * configure.in (WIN32LIBADD): Check if PICFLAG is defined in + ../libiberty/Makefile instead of $enable_shared. + * configure: Rebuild. + 2001-10-21 H.J. Lu - * elf32-cris.c (cris_reloc_type_lookup): Use int for index. + * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover + index 0. 2001-10-20 H.J. Lu diff -uprN binutils-2.11.92.0.10/bfd/ChangeLog.linux binutils-2.11.92.0.12/bfd/ChangeLog.linux --- binutils-2.11.92.0.10/bfd/ChangeLog.linux Mon Oct 22 10:25:11 2001 +++ binutils-2.11.92.0.12/bfd/ChangeLog.linux Sun Nov 25 12:11:17 2001 @@ -1,3 +1,10 @@ +2001-11-26 H.J. Lu + + * elflink.h (elf_add_default_symbol): New. + (elf_link_add_object_symbols): Call elf_add_default_symbol () + to create an indirect symbol from the default for the symbol + with the default version if needed. + 2001-10-22 H.J. Lu * configure.in (WIN32LIBADD): Use -L../libiberty for diff -uprN binutils-2.11.92.0.10/bfd/Makefile.am binutils-2.11.92.0.12/bfd/Makefile.am --- binutils-2.11.92.0.10/bfd/Makefile.am Thu Oct 4 14:35:43 2001 +++ binutils-2.11.92.0.12/bfd/Makefile.am Fri Nov 16 14:05:51 2001 @@ -68,6 +68,7 @@ ALL_MACHINES = \ cpu-m10300.lo \ cpu-mcore.lo \ cpu-mips.lo \ + cpu-mmix.lo \ cpu-ns32k.lo \ cpu-openrisc.lo \ cpu-pdp11.lo \ @@ -113,6 +114,7 @@ ALL_MACHINES_CFILES = \ cpu-m10300.c \ cpu-mcore.c \ cpu-mips.c \ + cpu-mmix.c \ cpu-ns32k.c \ cpu-openrisc.c \ cpu-pdp11.c \ @@ -213,6 +215,7 @@ BFD32_BACKENDS = \ elf32-v850.lo \ elf32.lo \ elflink.lo \ + elf-strtab.lo \ epoc-pe-arm.lo \ epoc-pei-arm.lo \ hp300bsd.lo \ @@ -353,6 +356,7 @@ BFD32_BACKENDS_CFILES = \ elf32-v850.c \ elf32.c \ elflink.c \ + elf-strtab.c \ epoc-pe-arm.c \ epoc-pei-arm.c \ hp300bsd.c \ @@ -428,10 +432,12 @@ BFD64_BACKENDS = \ elf64-ia64.lo \ elf64-gen.lo \ elf64-mips.lo \ + elf64-mmix.lo \ elf64-ppc.lo \ elf64-s390.lo \ elf64-sparc.lo \ elf64.lo \ + mmo.lo \ nlm32-alpha.lo \ nlm64.lo \ pepigen.lo @@ -447,10 +453,12 @@ BFD64_BACKENDS_CFILES = \ elf64-hppa.c \ elf64-gen.c \ elf64-mips.c \ + elf64-mmix.c \ elf64-ppc.c \ elf64-s390.c \ elf64-sparc.c \ elf64.c \ + mmo.c \ nlm32-alpha.c \ nlm64.c @@ -824,6 +832,7 @@ cpu-m10200.lo: cpu-m10200.c $(INCDIR)/fi cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h +cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h @@ -1122,6 +1131,7 @@ elf32.lo: elf32.c elfcode.h $(INCDIR)/fi elflink.lo: elflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h +elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c $(INCDIR)/filenames.h \ coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ @@ -1346,6 +1356,10 @@ elf64-mips.lo: elf64-mips.c $(INCDIR)/fi $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \ ecoffswap.h elf64-target.h +elf64-mmix.lo: elf64-mmix.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/opcode/mmix.h elf64-target.h elf64-ppc.lo: elf64-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \ @@ -1363,6 +1377,8 @@ elf64.lo: elf64.c elfcode.h $(INCDIR)/fi $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \ elflink.h +mmo.lo: mmo.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ + $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \ $(INCDIR)/nlm/alpha-ext.h libnlm.h $(INCDIR)/nlm/common.h \ $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \ diff -uprN binutils-2.11.92.0.10/bfd/Makefile.in binutils-2.11.92.0.12/bfd/Makefile.in --- binutils-2.11.92.0.10/bfd/Makefile.in Thu Oct 4 14:35:43 2001 +++ binutils-2.11.92.0.12/bfd/Makefile.in Fri Nov 16 14:05:51 2001 @@ -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. @@ -193,6 +193,7 @@ ALL_MACHINES = \ cpu-m10300.lo \ cpu-mcore.lo \ cpu-mips.lo \ + cpu-mmix.lo \ cpu-ns32k.lo \ cpu-openrisc.lo \ cpu-pdp11.lo \ @@ -239,6 +240,7 @@ ALL_MACHINES_CFILES = \ cpu-m10300.c \ cpu-mcore.c \ cpu-mips.c \ + cpu-mmix.c \ cpu-ns32k.c \ cpu-openrisc.c \ cpu-pdp11.c \ @@ -340,6 +342,7 @@ BFD32_BACKENDS = \ elf32-v850.lo \ elf32.lo \ elflink.lo \ + elf-strtab.lo \ epoc-pe-arm.lo \ epoc-pei-arm.lo \ hp300bsd.lo \ @@ -481,6 +484,7 @@ BFD32_BACKENDS_CFILES = \ elf32-v850.c \ elf32.c \ elflink.c \ + elf-strtab.c \ epoc-pe-arm.c \ epoc-pei-arm.c \ hp300bsd.c \ @@ -557,10 +561,12 @@ BFD64_BACKENDS = \ elf64-ia64.lo \ elf64-gen.lo \ elf64-mips.lo \ + elf64-mmix.lo \ elf64-ppc.lo \ elf64-s390.lo \ elf64-sparc.lo \ elf64.lo \ + mmo.lo \ nlm32-alpha.lo \ nlm64.lo \ pepigen.lo @@ -577,10 +583,12 @@ BFD64_BACKENDS_CFILES = \ elf64-hppa.c \ elf64-gen.c \ elf64-mips.c \ + elf64-mmix.c \ elf64-ppc.c \ elf64-s390.c \ elf64-sparc.c \ elf64.c \ + mmo.c \ nlm32-alpha.c \ nlm64.c @@ -716,7 +724,7 @@ configure.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES) OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS) @@ -883,7 +891,7 @@ maintainer-clean-recursive: 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//`; \ @@ -1367,6 +1375,7 @@ cpu-m10200.lo: cpu-m10200.c $(INCDIR)/fi cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h +cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h @@ -1665,6 +1674,7 @@ elf32.lo: elf32.c elfcode.h $(INCDIR)/fi elflink.lo: elflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h +elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c $(INCDIR)/filenames.h \ coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ @@ -1889,6 +1899,10 @@ elf64-mips.lo: elf64-mips.c $(INCDIR)/fi $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \ ecoffswap.h elf64-target.h +elf64-mmix.lo: elf64-mmix.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/opcode/mmix.h elf64-target.h elf64-ppc.lo: elf64-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \ @@ -1906,6 +1920,8 @@ elf64.lo: elf64.c elfcode.h $(INCDIR)/fi $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \ elflink.h +mmo.lo: mmo.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ + $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \ $(INCDIR)/nlm/alpha-ext.h libnlm.h $(INCDIR)/nlm/common.h \ $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \ diff -uprN binutils-2.11.92.0.10/bfd/README binutils-2.11.92.0.12/bfd/README --- binutils-2.11.92.0.10/bfd/README Tue Jan 23 10:59:33 2001 +++ binutils-2.11.92.0.12/bfd/README Fri Nov 16 14:05:51 2001 @@ -1,4 +1,4 @@ -BFD is a an object file library. It permits applications to use the +BFD is an object file library. It permits applications to use the same routines to process object files regardless of their format. BFD is used by the GNU debugger, assembler, linker, and the binary diff -uprN binutils-2.11.92.0.10/bfd/archures.c binutils-2.11.92.0.12/bfd/archures.c --- binutils-2.11.92.0.10/bfd/archures.c Mon Oct 1 15:25:20 2001 +++ binutils-2.11.92.0.12/bfd/archures.c Fri Nov 16 14:05:51 2001 @@ -258,6 +258,7 @@ DESCRIPTION .#define bfd_mach_s390_esa 0 .#define bfd_mach_s390_esame 1 . bfd_arch_openrisc, {* OpenRISC *} +. bfd_arch_mmix, {* Donald Knuth's educational processor *} . bfd_arch_last . }; */ @@ -336,6 +337,7 @@ extern const bfd_arch_info_type bfd_avr_ extern const bfd_arch_info_type bfd_ia64_arch; extern const bfd_arch_info_type bfd_s390_arch; extern const bfd_arch_info_type bfd_openrisc_arch; +extern const bfd_arch_info_type bfd_mmix_arch; static const bfd_arch_info_type * const bfd_archures_list[] = { #ifdef SELECT_ARCHITECTURES @@ -383,6 +385,7 @@ static const bfd_arch_info_type * const &bfd_ia64_arch, &bfd_s390_arch, &bfd_openrisc_arch, + &bfd_mmix_arch, #endif 0 }; diff -uprN binutils-2.11.92.0.10/bfd/bfd-in.h binutils-2.11.92.0.12/bfd/bfd-in.h --- binutils-2.11.92.0.10/bfd/bfd-in.h Thu Oct 4 14:35:43 2001 +++ binutils-2.11.92.0.12/bfd/bfd-in.h Fri Nov 16 14:05:51 2001 @@ -635,6 +635,10 @@ extern void bfd_elf_set_dt_needed_soname extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *)); extern struct bfd_link_needed_list *bfd_elf_get_runpath_list PARAMS ((bfd *, struct bfd_link_info *)); +extern boolean bfd_elf32_discard_info + PARAMS ((struct bfd_link_info *)); +extern boolean bfd_elf64_discard_info + PARAMS ((struct bfd_link_info *)); /* Return an upper bound on the number of bytes required to store a copy of ABFD's program header table entries. Return -1 if an error diff -uprN binutils-2.11.92.0.10/bfd/bfd-in2.h binutils-2.11.92.0.12/bfd/bfd-in2.h --- binutils-2.11.92.0.10/bfd/bfd-in2.h Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/bfd-in2.h Wed Nov 21 15:35:32 2001 @@ -641,6 +641,10 @@ extern void bfd_elf_set_dt_needed_soname extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *)); extern struct bfd_link_needed_list *bfd_elf_get_runpath_list PARAMS ((bfd *, struct bfd_link_info *)); +extern boolean bfd_elf32_discard_info + PARAMS ((struct bfd_link_info *)); +extern boolean bfd_elf64_discard_info + PARAMS ((struct bfd_link_info *)); /* Return an upper bound on the number of bytes required to store a copy of ABFD's program header table entries. Return -1 if an error @@ -1350,6 +1354,12 @@ extern const asection bfd_ind_section; #define bfd_ind_section_ptr ((asection *) &bfd_ind_section) #define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +#define bfd_is_const_section(SEC) \ + ( ((SEC) == bfd_abs_section_ptr) \ + || ((SEC) == bfd_und_section_ptr) \ + || ((SEC) == bfd_com_section_ptr) \ + || ((SEC) == bfd_ind_section_ptr)) + extern const struct symbol_cache_entry * const bfd_abs_symbol; extern const struct symbol_cache_entry * const bfd_com_symbol; extern const struct symbol_cache_entry * const bfd_und_symbol; @@ -1601,6 +1611,7 @@ enum bfd_architecture #define bfd_mach_s390_esa 0 #define bfd_mach_s390_esame 1 bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_mmix, /* Donald Knuth's educational processor */ bfd_arch_last }; @@ -2566,6 +2577,54 @@ short offset into 11 bits. */ BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2, BFD_RELOC_MCORE_RVA, +/* These are relocations for the GETA instruction. */ + BFD_RELOC_MMIX_GETA, + BFD_RELOC_MMIX_GETA_1, + BFD_RELOC_MMIX_GETA_2, + BFD_RELOC_MMIX_GETA_3, + +/* These are relocations for a conditional branch instruction. */ + BFD_RELOC_MMIX_CBRANCH, + BFD_RELOC_MMIX_CBRANCH_J, + BFD_RELOC_MMIX_CBRANCH_1, + BFD_RELOC_MMIX_CBRANCH_2, + BFD_RELOC_MMIX_CBRANCH_3, + +/* These are relocations for the PUSHJ instruction. */ + BFD_RELOC_MMIX_PUSHJ, + BFD_RELOC_MMIX_PUSHJ_1, + BFD_RELOC_MMIX_PUSHJ_2, + BFD_RELOC_MMIX_PUSHJ_3, + +/* These are relocations for the JMP instruction. */ + BFD_RELOC_MMIX_JMP, + BFD_RELOC_MMIX_JMP_1, + BFD_RELOC_MMIX_JMP_2, + BFD_RELOC_MMIX_JMP_3, + +/* This is a relocation for a relative address as in a GETA instruction or +a branch. */ + BFD_RELOC_MMIX_ADDR19, + +/* This is a relocation for a relative address as in a JMP instruction. */ + BFD_RELOC_MMIX_ADDR27, + +/* This is a relocation for an instruction field that may be a general +register or a value 0..255. */ + BFD_RELOC_MMIX_REG_OR_BYTE, + +/* This is a relocation for an instruction field that may be a general +register. */ + BFD_RELOC_MMIX_REG, + +/* This is a relocation for two instruction fields holding a register and +an offset, the equivalent of the relocation. */ + BFD_RELOC_MMIX_BASE_PLUS_OFFSET, + +/* This relocation is an assertion that the expression is not allocated as +a global register. It does not modify contents. */ + BFD_RELOC_MMIX_LOCAL, + /* This is a 16 bit reloc for the AVR that stores 8 bit pc relative short offset into 7 bits. */ BFD_RELOC_AVR_7_PCREL, @@ -3166,6 +3225,7 @@ struct _bfd struct elf_obj_tdata *elf_obj_data; struct nlm_obj_tdata *nlm_obj_data; struct bout_data_struct *bout_data; + struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; struct trad_core_struct *trad_core_data; @@ -3425,7 +3485,8 @@ enum bfd_flavour { bfd_target_versados_flavour, bfd_target_msdos_flavour, bfd_target_ovax_flavour, - bfd_target_evax_flavour + bfd_target_evax_flavour, + bfd_target_mmo_flavour }; enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN }; diff -uprN binutils-2.11.92.0.10/bfd/bfd.c binutils-2.11.92.0.12/bfd/bfd.c --- binutils-2.11.92.0.10/bfd/bfd.c Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/bfd.c Fri Nov 16 14:05:51 2001 @@ -167,6 +167,7 @@ CODE_FRAGMENT . struct elf_obj_tdata *elf_obj_data; . struct nlm_obj_tdata *nlm_obj_data; . struct bout_data_struct *bout_data; +. struct mmo_data_struct *mmo_data; . struct sun_core_struct *sun_core_data; . struct sco5_core_struct *sco5_core_data; . struct trad_core_struct *trad_core_data; diff -uprN binutils-2.11.92.0.10/bfd/binary.c binutils-2.11.92.0.12/bfd/binary.c --- binutils-2.11.92.0.10/bfd/binary.c Mon Oct 1 15:25:20 2001 +++ binutils-2.11.92.0.12/bfd/binary.c Fri Nov 16 14:05:51 2001 @@ -32,9 +32,9 @@ Foundation, Inc., 59 Temple Place - Suit the file. objcopy cooperates by specially setting the start address to zero by default. */ -#include "safe-ctype.h" #include "bfd.h" #include "sysdep.h" +#include "safe-ctype.h" #include "libbfd.h" /* Any bfd we create by reading a binary file has three symbols: diff -uprN binutils-2.11.92.0.10/bfd/coffgen.c binutils-2.11.92.0.12/bfd/coffgen.c --- binutils-2.11.92.0.10/bfd/coffgen.c Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/coffgen.c Wed Nov 21 15:35:32 2001 @@ -280,7 +280,16 @@ coff_object_p (abfd) bfd_coff_swap_filehdr_in (abfd, filehdr, &internal_f); bfd_release (abfd, filehdr); - if (bfd_coff_bad_format_hook (abfd, &internal_f) == false) + /* The XCOFF format has two sizes for the f_opthdr. SMALL_AOUTSZ + (less than aoutsz) used in object files and AOUTSZ (equal to + aoutsz) in executables. The bfd_coff_swap_aouthdr_in function + expects this header to be aoutsz bytes in length, so we use that + value in the call to bfd_alloc below. But we must be careful to + only read in f_opthdr bytes in the call to bfd_bread. We should + also attempt to catch corrupt or non-COFF binaries with a strange + value for f_opthdr. */ + if (bfd_coff_bad_format_hook (abfd, &internal_f) == false + || internal_f.f_opthdr > aoutsz) { bfd_set_error (bfd_error_wrong_format); return 0; @@ -293,7 +302,7 @@ coff_object_p (abfd) opthdr = bfd_alloc (abfd, aoutsz); if (opthdr == NULL) - return 0;; + return 0; if (bfd_bread (opthdr, (bfd_size_type) internal_f.f_opthdr, abfd) != internal_f.f_opthdr) { @@ -546,15 +555,18 @@ coff_count_linenumbers (abfd) section's linenumber count. */ alent *l = q->lineno; - ++q->symbol.section->output_section->lineno_count; - ++total; - ++l; - while (l->line_number != 0) + do { + asection * sec = q->symbol.section->output_section; + + /* Do not try to update fields in read-only sections. */ + if (! bfd_is_const_section (sec)) + sec->lineno_count ++; + ++total; - ++q->symbol.section->output_section->lineno_count; ++l; } + while (l->line_number != 0); } } } @@ -1136,8 +1148,9 @@ coff_write_native_symbol (abfd, symbol, } symbol->done_lineno = true; - symbol->symbol.section->output_section->moving_line_filepos += - count * bfd_coff_linesz (abfd); + if (! bfd_is_const_section (symbol->symbol.section->output_section)) + symbol->symbol.section->output_section->moving_line_filepos += + count * bfd_coff_linesz (abfd); } return coff_write_symbol (abfd, &(symbol->symbol), native, written, diff -uprN binutils-2.11.92.0.10/bfd/config.bfd binutils-2.11.92.0.12/bfd/config.bfd --- binutils-2.11.92.0.10/bfd/config.bfd Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/config.bfd Fri Nov 16 14:05:51 2001 @@ -31,31 +31,32 @@ targ_underscore=no targ_cpu=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` case "${targ_cpu}" in -alpha*) targ_archs=bfd_alpha_arch ;; -arm*) targ_archs=bfd_arm_arch ;; -strongarm*) targ_archs=bfd_arm_arch ;; -thumb*) targ_archs=bfd_arm_arch ;; -xscale*) targ_archs=bfd_arm_arch ;; -c30*) targ_archs=bfd_tic30_arch ;; -c54x*) targ_archs=bfd_tic54x_arch ;; -hppa*) targ_archs=bfd_hppa_arch ;; -x86_64) targ_archs=bfd_i386_arch ;; -i[3456]86) targ_archs=bfd_i386_arch ;; -i370) targ_archs=bfd_i370_arch ;; +alpha*) targ_archs=bfd_alpha_arch ;; +arm*) targ_archs=bfd_arm_arch ;; +c30*) targ_archs=bfd_tic30_arch ;; +c54x*) targ_archs=bfd_tic54x_arch ;; +hppa*) targ_archs=bfd_hppa_arch ;; +i[3456]86) targ_archs=bfd_i386_arch ;; +i370) targ_archs=bfd_i370_arch ;; m6811*|m68hc11*) targ_archs="bfd_m68hc11_arch bfd_m68hc12_arch" ;; m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch" ;; -m68*) targ_archs=bfd_m68k_arch ;; -m88*) targ_archs=bfd_m88k_arch ;; -mips*) targ_archs=bfd_mips_arch ;; -pdp11*) targ_archs=bfd_pdp11_arch ;; -pj*) targ_archs="bfd_pj_arch bfd_i386_arch";; -powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;; -s390*) targ_archs=bfd_s390_arch ;; -rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;; -sparc*) targ_archs=bfd_sparc_arch ;; -v850*) targ_archs=bfd_v850_arch ;; -z8k*) targ_archs=bfd_z8k_arch ;; -*) targ_archs=bfd_${targ_cpu}_arch ;; +m68*) targ_archs=bfd_m68k_arch ;; +m88*) targ_archs=bfd_m88k_arch ;; +mips*) targ_archs=bfd_mips_arch ;; +pdp11*) targ_archs=bfd_pdp11_arch ;; +pj*) targ_archs="bfd_pj_arch bfd_i386_arch";; +powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;; +rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;; +s390*) targ_archs=bfd_s390_arch ;; +sh*) targ_archs=bfd_sh_arch ;; +sparc*) targ_archs=bfd_sparc_arch ;; +strongarm*) targ_archs=bfd_arm_arch ;; +thumb*) targ_archs=bfd_arm_arch ;; +v850*) targ_archs=bfd_v850_arch ;; +x86_64) targ_archs=bfd_i386_arch ;; +xscale*) targ_archs=bfd_arm_arch ;; +z8k*) targ_archs=bfd_z8k_arch ;; +*) targ_archs=bfd_${targ_cpu}_arch ;; esac @@ -710,6 +711,12 @@ case "${targ}" in targ_defvec=bfd_elf32_tradbigmips_vec targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" ;; +#ifdef BFD64 + mmix-*-*) + targ_defvec=bfd_elf64_mmix_vec + targ_selvecs=bfd_mmo_vec + ;; +#endif mn10200-*-*) targ_defvec=bfd_elf32_mn10200_vec ;; @@ -808,6 +815,12 @@ case "${targ}" in targ_defvec=bfd_elf32_shblin_vec targ_selvecs=bfd_elf32_shlin_vec ;; + sh*eb-*-linux*) + targ_defvec=bfd_elf32_shblin_vec + ;; + sh*-*-linux*) + targ_defvec=bfd_elf32_shlin_vec + ;; sh-*-elf* | sh-*-rtemself*) targ_defvec=bfd_elf32_sh_vec diff -uprN binutils-2.11.92.0.10/bfd/configure binutils-2.11.92.0.12/bfd/configure --- binutils-2.11.92.0.10/bfd/configure Mon Oct 22 10:25:11 2001 +++ binutils-2.11.92.0.12/bfd/configure Wed Nov 21 15:35:32 2001 @@ -1116,7 +1116,7 @@ fi PACKAGE=bfd -VERSION=2.11.92.0.10 +VERSION=2.11.92.0.12 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; } @@ -2593,7 +2593,7 @@ else fi -ALL_LINGUAS= +ALL_LINGUAS="fr" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:2599: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. @@ -5904,7 +5904,7 @@ selarchs="$f" # Target backend .o files. tb= -elf="elf.lo elflink.lo dwarf1.lo" +elf="elf.lo elflink.lo elf-strtab.lo dwarf1.lo" for vec in $selvecs do @@ -5995,6 +5995,7 @@ do bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; @@ -6002,6 +6003,7 @@ do bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;; + bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;; bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; @@ -6189,17 +6191,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6193: checking for $ac_hdr" >&5 +echo "configure:6195: 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:6203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6205: \"$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* @@ -6228,12 +6230,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6232: checking for $ac_func" >&5 +echo "configure:6234: 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:6262: \"$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 @@ -6281,7 +6283,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:6285: checking for working mmap" >&5 +echo "configure:6287: 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 @@ -6289,7 +6291,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6435: \"$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 @@ -6454,12 +6456,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6458: checking for $ac_func" >&5 +echo "configure:6460: 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:6488: \"$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 -uprN binutils-2.11.92.0.10/bfd/configure.in binutils-2.11.92.0.12/bfd/configure.in --- binutils-2.11.92.0.10/bfd/configure.in Mon Oct 22 10:25:11 2001 +++ binutils-2.11.92.0.12/bfd/configure.in Wed Nov 21 15:35:32 2001 @@ -7,7 +7,7 @@ AC_INIT(libbfd.c) AC_CANONICAL_SYSTEM AC_ISC_POSIX -AM_INIT_AUTOMAKE(bfd, 2.11.92.0.10) +AM_INIT_AUTOMAKE(bfd, 2.11.92.0.12) # Uncomment the next line to remove the date from the reported bfd version #is_release=y @@ -108,7 +108,7 @@ bfd_default_target_size=32 AC_PROG_CC -ALL_LINGUAS= +ALL_LINGUAS="fr" CY_GNU_GETTEXT # Permit host specific settings. @@ -503,7 +503,7 @@ selarchs="$f" # Target backend .o files. tb= -elf="elf.lo elflink.lo dwarf1.lo" +elf="elf.lo elflink.lo elf-strtab.lo dwarf1.lo" for vec in $selvecs do @@ -594,6 +594,7 @@ do bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; @@ -601,6 +602,7 @@ do bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;; + bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;; bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; diff -uprN binutils-2.11.92.0.10/bfd/cpu-i386.c binutils-2.11.92.0.12/bfd/cpu-i386.c --- binutils-2.11.92.0.10/bfd/cpu-i386.c Fri Mar 9 11:15:43 2001 +++ binutils-2.11.92.0.12/bfd/cpu-i386.c Fri Nov 16 14:05:51 2001 @@ -44,8 +44,8 @@ const bfd_arch_info_type bfd_x86_64_arch 8, /* 8 bits in a byte */ bfd_arch_i386, bfd_mach_x86_64_intel_syntax, - "x86_64:intel", - "x86_64:intel", + "x86-64:intel", + "x86-64:intel", 3, true, bfd_default_compatible, @@ -75,8 +75,8 @@ const bfd_arch_info_type bfd_x86_64_arch 8, /* 8 bits in a byte */ bfd_arch_i386, bfd_mach_x86_64, - "x86_64", - "x86_64", + "x86-64", + "x86-64", 3, true, bfd_default_compatible, diff -uprN binutils-2.11.92.0.10/bfd/cpu-mmix.c binutils-2.11.92.0.12/bfd/cpu-mmix.c --- binutils-2.11.92.0.10/bfd/cpu-mmix.c Wed Dec 31 16:00:00 1969 +++ binutils-2.11.92.0.12/bfd/cpu-mmix.c Fri Nov 16 14:05:51 2001 @@ -0,0 +1,41 @@ +/* BFD library support routines for MMIX. + Copyright (C) 2001 Free Software Foundation, Inc. + Contributed by Hans-Peter Nilsson (hp@bitrange.com) + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" + +const bfd_arch_info_type +bfd_mmix_arch = + { + 64, /* 64 bits in a word. */ + 64, /* 64 bits in an address. */ + 8, /* 8 bits in a byte. */ + bfd_arch_mmix, /* Architecture. */ + 0, /* Machine number - 0 for now. */ + /* Sorry, these are by custom and creeping assumption lower-case. */ + "mmix", /* Architecture name. */ + "mmix", /* Printable name. */ + 3, /* Section align power. */ + true, /* This is the default architecture. */ + bfd_default_compatible, /* Architecture comparison function. */ + bfd_default_scan, /* String to architecture conversion. */ + NULL /* Next in list. */ +}; diff -uprN binutils-2.11.92.0.10/bfd/doc/ChangeLog binutils-2.11.92.0.12/bfd/doc/ChangeLog --- binutils-2.11.92.0.10/bfd/doc/ChangeLog Thu Oct 4 14:35:43 2001 +++ binutils-2.11.92.0.12/bfd/doc/ChangeLog Fri Nov 16 14:05:51 2001 @@ -1,3 +1,21 @@ +2001-10-30 Hans-Peter Nilsson + + * doc/bfdint.texi (BFD target vector miscellaneous): Add + bfd_target_mmo_flavour. + * doc/bfd.texinfo (BFD back ends): Add entry for mmo. + * doc/Makefile.am (DOCFILES): Add mmo.texi. + (SRCDOC): Add mmo.c. + (s-mmo, mmo.texi): New rules. + +2001-10-29 Kazu Hirata + + * bfdsumm.texi: Fix a typo. + +2001-10-26 Nick Clifton + + * bfd.texinfo: Change footer to refer to FSF. Change subtitle + to refer to original creation date. + 2001-10-03 Alan Modra * Makefile.am (BFD_H_DEP): Add ../version.h. diff -uprN binutils-2.11.92.0.10/bfd/doc/Makefile.am binutils-2.11.92.0.12/bfd/doc/Makefile.am --- binutils-2.11.92.0.10/bfd/doc/Makefile.am Thu Oct 4 14:35:43 2001 +++ binutils-2.11.92.0.12/bfd/doc/Makefile.am Fri Nov 16 14:05:51 2001 @@ -6,7 +6,8 @@ DOCFILES = aoutx.texi archive.texi arch bfdt.texi cache.texi coffcode.texi \ core.texi elf.texi elfcode.texi format.texi libbfd.texi \ opncls.texi reloc.texi section.texi \ - syms.texi targets.texi init.texi hash.texi linker.texi + syms.texi targets.texi init.texi hash.texi linker.texi \ + mmo.texi PROTOS = archive.p archures.p bfd.p \ core.p format.p \ @@ -27,7 +28,8 @@ SRCDOC = $(srcdir)/../aoutx.h $(srcdir) $(srcdir)/../libbfd.c $(srcdir)/../opncls.c \ $(srcdir)/../reloc.c $(srcdir)/../section.c \ $(srcdir)/../syms.c $(srcdir)/../targets.c \ - $(srcdir)/../hash.c $(srcdir)/../linker.c + $(srcdir)/../hash.c $(srcdir)/../linker.c \ + $(srcdir)/../mmo.c SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \ $(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c \ @@ -123,6 +125,12 @@ s-elfcode: $(MKDOC) $(srcdir)/../elfcode touch s-elfcode elfcode.texi: s-elfcode +s-mmo: $(MKDOC) $(srcdir)/../mmo.c $(srcdir)/doc.str + ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../mmo.c >mmo.tmp + $(srcdir)/../../move-if-change mmo.tmp mmo.texi + touch s-mmo +mmo.texi: s-mmo + s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp $(srcdir)/../../move-if-change format.tmp format.texi diff -uprN binutils-2.11.92.0.10/bfd/doc/Makefile.in binutils-2.11.92.0.12/bfd/doc/Makefile.in --- binutils-2.11.92.0.10/bfd/doc/Makefile.in Thu Oct 4 14:35:43 2001 +++ binutils-2.11.92.0.12/bfd/doc/Makefile.in Fri Nov 16 14:05:51 2001 @@ -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. @@ -130,7 +130,8 @@ DOCFILES = aoutx.texi archive.texi arch bfdt.texi cache.texi coffcode.texi \ core.texi elf.texi elfcode.texi format.texi libbfd.texi \ opncls.texi reloc.texi section.texi \ - syms.texi targets.texi init.texi hash.texi linker.texi + syms.texi targets.texi init.texi hash.texi linker.texi \ + mmo.texi PROTOS = archive.p archures.p bfd.p \ @@ -153,7 +154,8 @@ SRCDOC = $(srcdir)/../aoutx.h $(srcdir) $(srcdir)/../libbfd.c $(srcdir)/../opncls.c \ $(srcdir)/../reloc.c $(srcdir)/../section.c \ $(srcdir)/../syms.c $(srcdir)/../targets.c \ - $(srcdir)/../hash.c $(srcdir)/../linker.c + $(srcdir)/../hash.c $(srcdir)/../linker.c \ + $(srcdir)/../mmo.c SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \ @@ -239,7 +241,7 @@ DIST_COMMON = ChangeLog Makefile.am Mak DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: @@ -325,7 +327,7 @@ uninstall-info: 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) @@ -529,6 +531,12 @@ s-elfcode: $(MKDOC) $(srcdir)/../elfcode touch s-elfcode elfcode.texi: s-elfcode +s-mmo: $(MKDOC) $(srcdir)/../mmo.c $(srcdir)/doc.str + ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../mmo.c >mmo.tmp + $(srcdir)/../../move-if-change mmo.tmp mmo.texi + touch s-mmo +mmo.texi: s-mmo + s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp $(srcdir)/../../move-if-change format.tmp format.texi diff -uprN binutils-2.11.92.0.10/bfd/doc/bfd.texinfo binutils-2.11.92.0.12/bfd/doc/bfd.texinfo --- binutils-2.11.92.0.10/bfd/doc/bfd.texinfo Fri Mar 9 11:16:11 2001 +++ binutils-2.11.92.0.12/bfd/doc/bfd.texinfo Fri Nov 16 14:05:51 2001 @@ -30,7 +30,7 @@ END-INFO-DIR-ENTRY @ifinfo This file documents the BFD library. -Copyright (C) 1991, 2000 Free Software Foundation, Inc. +Copyright (C) 1991, 2000, 2001 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 @@ -56,18 +56,18 @@ notice identical to this one except for @title{libbfd} @subtitle{The Binary File Descriptor Library} @sp 1 -@subtitle First Edition---BFD version < 3.0 -@subtitle April 1991 +@subtitle First Edition---BFD version < 3.0 % Since no product is stable berfore version 3.0 :-) +@subtitle Original Document Created: April 1991 @author {Steve Chamberlain} @author {Cygnus Support} @page @tex \def\$#1${{#1}} % Kluge: collect RCS revision info without $...$ -\xdef\manvers{\$Revision: 1.3 $} % For use in headers, footers too +\xdef\manvers{\$Revision: 1.5 $} % For use in headers, footers too {\parskip=0pt -\hfill Cygnus Support\par -\hfill sac\@cygnus.com\par +\hfill Free Software Foundation\par +\hfill sac\@www.gnu.org\par \hfill {\it BFD}, \manvers\par \hfill \TeX{}info \texinfoversion\par } @@ -75,7 +75,7 @@ notice identical to this one except for @end tex @vskip 0pt plus 1filll -Copyright @copyright{} 1991 Free Software Foundation, Inc. +Copyright @copyright{} 1991, 2001 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 @@ -298,6 +298,7 @@ structures. * aout :: a.out backends * coff :: coff backends * elf :: elf backends +* mmo :: mmo backend @ignore * oasys :: oasys backends * ieee :: ieee backend @@ -313,11 +314,14 @@ All of BFD lives in one directory. @node coff, elf, aout, BFD back ends @include coffcode.texi -@node elf, , coff, BFD back ends +@node elf, mmo, coff, BFD back ends @include elf.texi @c Leave this out until the file has some actual contents... @c @include elfcode.texi +@node mmo, , elf, BFD back ends +@include mmo.texi + @node GNU Free Documentation License, Index, BFD back ends, Top @chapter GNU Free Documentation License @cindex GNU Free Documentation License diff -uprN binutils-2.11.92.0.10/bfd/doc/bfdint.texi binutils-2.11.92.0.12/bfd/doc/bfdint.texi --- binutils-2.11.92.0.10/bfd/doc/bfdint.texi Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/bfd/doc/bfdint.texi Fri Nov 16 14:05:51 2001 @@ -335,6 +335,8 @@ VERSAdos. MS-DOS. @item bfd_target_evax_flavour openVMS. +@item bfd_target_mmo_flavour +Donald Knuth's MMIXware object format. @end table @item byteorder diff -uprN binutils-2.11.92.0.10/bfd/doc/bfdsumm.texi binutils-2.11.92.0.12/bfd/doc/bfdsumm.texi --- binutils-2.11.92.0.10/bfd/doc/bfdsumm.texi Thu Jun 3 11:01:55 1999 +++ binutils-2.11.92.0.12/bfd/doc/bfdsumm.texi Fri Nov 16 14:05:51 2001 @@ -4,7 +4,7 @@ the format of the input object file. Th memory with pointers to routines that will be used to access elements of the object file's data structures. -As different information from the the object files is required, +As different information from the object files is required, BFD reads from different sections of the file and processes them. For example, a very common operation for the linker is processing symbol tables. Each BFD back end provides a routine for converting diff -uprN binutils-2.11.92.0.10/bfd/dwarf2.c binutils-2.11.92.0.12/bfd/dwarf2.c --- binutils-2.11.92.0.10/bfd/dwarf2.c Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/dwarf2.c Fri Nov 16 14:05:51 2001 @@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suit struct line_head { - unsigned int total_length; + bfd_vma total_length; unsigned short version; unsigned int prologue_length; unsigned char minimum_instruction_length; @@ -115,6 +115,12 @@ struct dwarf2_debug /* Length of the loaded .debug_line section. */ unsigned long dwarf_line_size; + + /* Pointer to the .debug_str section loaded into memory. */ + char* dwarf_str_buffer; + + /* Length of the loaded .debug_str section. */ + unsigned long dwarf_str_size; }; struct arange @@ -169,8 +175,14 @@ struct comp_unit /* A list of the functions found in this comp. unit. */ struct funcinfo* function_table; + /* Pointer to dwarf2_debug structure. */ + struct dwarf2_debug *stash; + /* Address size for this unit - from unit header. */ unsigned char addr_size; + + /* Offset size for this unit - from unit header. */ + unsigned char offset_size; }; /* This data structure holds the information of an abbrev. */ @@ -201,9 +213,10 @@ static unsigned int read_1_byte PARAMS ( static int read_1_signed_byte PARAMS ((bfd *, char *)); static unsigned int read_2_bytes PARAMS ((bfd *, char *)); static unsigned int read_4_bytes PARAMS ((bfd *, char *)); -static unsigned int read_8_bytes PARAMS ((bfd *, char *)); +static bfd_vma read_8_bytes PARAMS ((bfd *, char *)); static char *read_n_bytes PARAMS ((bfd *, char *, unsigned int)); static char *read_string PARAMS ((bfd *, char *, unsigned int *)); +static char *read_indirect_string PARAMS ((struct comp_unit *, char *, unsigned int *)); static unsigned int read_unsigned_leb128 PARAMS ((bfd *, char *, unsigned int *)); static int read_signed_leb128 @@ -216,6 +229,9 @@ static struct abbrev_info **read_abbrevs static char *read_attribute PARAMS ((struct attribute *, struct attr_abbrev *, struct comp_unit *, char *)); +static char *read_attribute_value + PARAMS ((struct attribute *, unsigned, + struct comp_unit *, char *)); static void add_line_info PARAMS ((struct line_info_table *, bfd_vma, char *, unsigned int, unsigned int, int)); @@ -301,7 +317,7 @@ read_4_signed_bytes (abfd, buf) #endif -static unsigned int +static bfd_vma read_8_bytes (abfd, buf) bfd *abfd; char *buf; @@ -327,9 +343,7 @@ read_string (abfd, buf, bytes_read_ptr) char *buf; unsigned int *bytes_read_ptr; { - /* If the size of a host char is 8 bits, we can return a pointer - to the string, otherwise we have to copy the string to a buffer - allocated on the temporary obstack. */ + /* Return a pointer to the embedded string. */ if (*buf == '\0') { *bytes_read_ptr = 1; @@ -340,6 +354,59 @@ read_string (abfd, buf, bytes_read_ptr) return buf; } +static char * +read_indirect_string (unit, buf, bytes_read_ptr) + struct comp_unit* unit; + char *buf; + unsigned int *bytes_read_ptr; +{ + bfd_vma offset; + struct dwarf2_debug *stash = unit->stash; + + if (unit->offset_size == 4) + offset = read_4_bytes (unit->abfd, buf); + else + offset = read_8_bytes (unit->abfd, buf); + *bytes_read_ptr = unit->offset_size; + + if (! stash->dwarf_str_buffer) + { + asection *msec; + bfd *abfd = unit->abfd; + + msec = bfd_get_section_by_name (abfd, ".debug_str"); + if (! msec) + { + (*_bfd_error_handler) + (_("Dwarf Error: Can't find .debug_str section.")); + bfd_set_error (bfd_error_bad_value); + return NULL; + } + + stash->dwarf_str_size = msec->_raw_size; + stash->dwarf_str_buffer = (char*) bfd_alloc (abfd, msec->_raw_size); + if (! stash->dwarf_abbrev_buffer) + return NULL; + + if (! bfd_get_section_contents (abfd, msec, stash->dwarf_str_buffer, + (bfd_vma) 0, msec->_raw_size)) + return NULL; + } + + 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_set_error (bfd_error_bad_value); + return NULL; + } + + buf = stash->dwarf_str_buffer + offset; + if (*buf == '\0') + return NULL; + return buf; +} + static unsigned int read_unsigned_leb128 (abfd, buf, bytes_read_ptr) bfd *abfd ATTRIBUTE_UNUSED; @@ -564,12 +631,12 @@ read_abbrevs (abfd, offset, stash) return abbrevs; } -/* Read an attribute described by an abbreviated attribute. */ +/* Read an attribute value described by an attribute form. */ static char * -read_attribute (attr, abbrev, unit, info_ptr) +read_attribute_value (attr, form, unit, info_ptr) struct attribute *attr; - struct attr_abbrev *abbrev; + unsigned form; struct comp_unit *unit; char *info_ptr; { @@ -578,12 +645,12 @@ read_attribute (attr, abbrev, unit, info struct dwarf_block *blk; bfd_size_type amt; - attr->name = abbrev->name; - attr->form = abbrev->form; + attr->form = form; - switch (abbrev->form) + switch (form) { case DW_FORM_addr: + /* FIXME: DWARF3 draft sais DW_FORM_ref_addr is offset_size. */ case DW_FORM_ref_addr: DW_ADDR (attr) = read_address (unit, info_ptr); info_ptr += unit->addr_size; @@ -622,6 +689,10 @@ read_attribute (attr, abbrev, unit, info DW_STRING (attr) = read_string (abfd, info_ptr, &bytes_read); info_ptr += bytes_read; break; + case DW_FORM_strp: + DW_STRING (attr) = read_indirect_string (unit, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; case DW_FORM_block: amt = sizeof (struct dwarf_block); blk = (struct dwarf_block *) bfd_alloc (abfd, amt); @@ -676,16 +747,33 @@ read_attribute (attr, abbrev, unit, info DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); info_ptr += bytes_read; break; - case DW_FORM_strp: case DW_FORM_indirect: + form = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + info_ptr = read_attribute_value (attr, form, unit, info_ptr); + break; default: (*_bfd_error_handler) (_("Dwarf Error: Invalid or unhandled FORM value: %d."), - abbrev->form); + form); bfd_set_error (bfd_error_bad_value); } return info_ptr; } +/* Read an attribute described by an abbreviated attribute. */ + +static char * +read_attribute (attr, abbrev, unit, info_ptr) + struct attribute *attr; + struct attr_abbrev *abbrev; + struct comp_unit *unit; + char *info_ptr; +{ + attr->name = abbrev->name; + info_ptr = read_attribute_value (attr, abbrev->form, unit, info_ptr); + return info_ptr; +} + /* Source line information table routines. */ #define FILE_ALLOC_CHUNK 5 @@ -826,7 +914,7 @@ decode_line_info (unit, stash) char *line_ptr; char *line_end; struct line_head lh; - unsigned int i, bytes_read; + unsigned int i, bytes_read, offset_size; char *cur_file, *cur_dir; unsigned char op_code, extended_op, adj_opcode; bfd_size_type amt; @@ -886,11 +974,21 @@ decode_line_info (unit, stash) /* Read in the prologue. */ lh.total_length = read_4_bytes (abfd, line_ptr); line_ptr += 4; + offset_size = 4; + if (lh.total_length == 0xffffffff) + { + lh.total_length = read_8_bytes (abfd, line_ptr); + line_ptr += 8; + offset_size = 8; + } line_end = line_ptr + lh.total_length; lh.version = read_2_bytes (abfd, line_ptr); line_ptr += 2; - lh.prologue_length = read_4_bytes (abfd, line_ptr); - line_ptr += 4; + if (offset_size == 4) + lh.prologue_length = read_4_bytes (abfd, line_ptr); + else + lh.prologue_length = read_8_bytes (abfd, line_ptr); + line_ptr += offset_size; lh.minimum_instruction_length = read_1_byte (abfd, line_ptr); line_ptr += 1; lh.default_is_stmt = read_1_byte (abfd, line_ptr); @@ -979,7 +1077,22 @@ decode_line_info (unit, stash) op_code = read_1_byte (abfd, line_ptr); line_ptr += 1; - switch (op_code) + if (op_code >= lh.opcode_base) + { /* Special operand. */ + adj_opcode = op_code - lh.opcode_base; + address += (adj_opcode / lh.line_range) + * lh.minimum_instruction_length; + line += lh.line_base + (adj_opcode % lh.line_range); + /* Append row to matrix using current values. */ + add_line_info (table, address, filename, line, column, 0); + basic_block = 1; + if (need_low_pc) + { + need_low_pc = 0; + low_pc = address; + } + } + else switch (op_code) { case DW_LNS_extended_op: line_ptr += 1; /* Ignore length. */ @@ -1079,19 +1192,15 @@ decode_line_info (unit, stash) address += read_2_bytes (abfd, line_ptr); line_ptr += 2; break; - default: /* Special operand. */ - adj_opcode = op_code - lh.opcode_base; - address += (adj_opcode / lh.line_range) - * lh.minimum_instruction_length; - line += lh.line_base + (adj_opcode % lh.line_range); - /* Append row to matrix using current values. */ - add_line_info (table, address, filename, line, column, 0); - basic_block = 1; - if (need_low_pc) - { - need_low_pc = 0; - low_pc = address; - } + default: + { /* Unknown standard opcode, ignore it. */ + int i; + for (i = 0; i < lh.standard_opcode_lengths[op_code]; i++) + { + (void) read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + } + } } } } @@ -1334,18 +1443,17 @@ find_rela_addend (abfd, sec, offset, sym includes the compilation unit header that proceeds the DIE's, but does not include the length field that preceeds each compilation unit header. END_PTR points one past the end of this comp unit. - If ABBREV_LENGTH is 0, then the length of the abbreviation offset - is assumed to be four bytes. Otherwise, it it is the size given. + OFFSET_SIZE is the size of DWARF2 offsets (either 4 or 8 bytes). This routine does not read the whole compilation unit; only enough to get to the line number information for the compilation unit. */ static struct comp_unit * -parse_comp_unit (abfd, stash, unit_length, abbrev_length) +parse_comp_unit (abfd, stash, unit_length, offset_size) bfd* abfd; struct dwarf2_debug *stash; bfd_vma unit_length; - unsigned int abbrev_length; + unsigned int offset_size; { struct comp_unit* unit; @@ -1365,12 +1473,10 @@ parse_comp_unit (abfd, stash, unit_lengt version = read_2_bytes (abfd, info_ptr); info_ptr += 2; - BFD_ASSERT (abbrev_length == 0 - || abbrev_length == 4 - || abbrev_length == 8); - if (abbrev_length == 0 || abbrev_length == 4) + BFD_ASSERT (offset_size == 4 || offset_size == 8); + if (offset_size == 4) abbrev_offset = read_4_bytes (abfd, info_ptr); - else if (abbrev_length == 8) + else abbrev_offset = read_8_bytes (abfd, info_ptr); /* The abbrev offset is generally a relocation pointing to .debug_abbrev+offset. On RELA targets, we have to find the @@ -1378,7 +1484,7 @@ parse_comp_unit (abfd, stash, unit_lengt abbrev_offset, so do it here. */ off = info_ptr - stash->sec_info_ptr; abbrev_offset += find_rela_addend (abfd, stash->sec, off, stash->syms); - info_ptr += abbrev_length; + info_ptr += offset_size; addr_size = read_1_byte (abfd, info_ptr); info_ptr += 1; @@ -1433,8 +1539,10 @@ parse_comp_unit (abfd, stash, unit_lengt unit = (struct comp_unit*) bfd_zalloc (abfd, amt); unit->abfd = abfd; unit->addr_size = addr_size; + unit->offset_size = offset_size; unit->abbrevs = abbrevs; unit->end_ptr = end_ptr; + unit->stash = stash; for (i = 0; i < abbrev->num_attrs; ++i) { @@ -1745,16 +1853,25 @@ _bfd_dwarf2_find_nearest_line (abfd, sec { bfd_vma length; boolean found; + unsigned int offset_size = addr_size; if (addr_size == 4) - length = read_4_bytes (abfd, stash->info_ptr); + { + length = read_4_bytes (abfd, stash->info_ptr); + if (length == 0xffffffff) + { + offset_size = 8; + length = read_8_bytes (abfd, stash->info_ptr + 4); + stash->info_ptr += 8; + } + } else length = read_8_bytes (abfd, stash->info_ptr); stash->info_ptr += addr_size; if (length > 0) { - each = parse_comp_unit (abfd, stash, length, addr_size); + each = parse_comp_unit (abfd, stash, length, offset_size); stash->info_ptr += length; if ((bfd_vma) (stash->info_ptr - stash->sec_info_ptr) diff -uprN binutils-2.11.92.0.10/bfd/elf-bfd.h binutils-2.11.92.0.12/bfd/elf-bfd.h --- binutils-2.11.92.0.10/bfd/elf-bfd.h Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/elf-bfd.h Fri Nov 16 14:05:51 2001 @@ -79,6 +79,8 @@ typedef struct } elf_symbol_type; +struct elf_strtab_hash; + /* ELF linker hash table entries. */ struct elf_link_hash_entry @@ -254,7 +256,7 @@ struct elf_link_hash_table /* The string table of dynamic symbols, which becomes the .dynstr section. */ - struct bfd_strtab_hash *dynstr; + struct elf_strtab_hash *dynstr; /* The number of buckets in the hash table in the .hash section. This is based on the number of dynamic symbols. */ @@ -305,6 +307,16 @@ struct elf_link_hash_table /* Returns true if the hash table is a struct elf_link_hash_table. */ #define is_elf_hash_table(p) \ ((p)->hash->type == bfd_link_elf_hash_table) + +/* Used by bfd_section_from_r_symndx to cache a small number of local + symbol to section mappings. */ +#define LOCAL_SYM_CACHE_SIZE 32 +struct sym_sec_cache +{ + bfd *abfd; + unsigned long indx[LOCAL_SYM_CACHE_SIZE]; + asection *sec[LOCAL_SYM_CACHE_SIZE]; +}; /* Constant information held for an ELF backend. */ @@ -377,6 +389,17 @@ enum elf_reloc_type_class { reloc_class_copy }; +struct elf_reloc_cookie +{ + Elf_Internal_Rela *rels, *rel, *relend; + void *locsyms; + bfd *abfd; + size_t locsymcount; + size_t extsymoff; + struct elf_link_hash_entry **sym_hashes; + boolean bad_symtab; +}; + struct elf_backend_data { /* The architecture for this backend. */ @@ -699,6 +722,21 @@ struct elf_backend_data enum elf_reloc_type_class (*elf_backend_reloc_type_class) PARAMS ((const Elf_Internal_Rela *)); + /* This function, if defined, removes information about discarded functions + from other sections which mention them. */ + boolean (*elf_backend_discard_info) + PARAMS ((bfd *, struct elf_reloc_cookie *, struct bfd_link_info *)); + + /* This function, if defined, signals that the function above has removed + the discarded relocations for this section. */ + boolean (*elf_backend_ignore_discarded_relocs) + PARAMS ((asection *)); + + /* This function, if defined, may write out the given section. + Returns true if it did so and false if the caller should. */ + boolean (*elf_backend_write_section) + PARAMS ((bfd *, asection *, bfd_byte *)); + /* The swapping table to use when dealing with ECOFF information. Used for the MIPS ELF .mdebug section. */ const struct ecoff_debug_swap *elf_backend_ecoff_debug_swap; @@ -784,8 +822,9 @@ struct bfd_elf_section_data /* The number of relocations currently assigned to REL_HDR2. */ unsigned int rel_count2; - /* The number of dynamic relocs copied for local symbols. */ - unsigned int local_dynrel; + /* A pointer to a linked list tracking dynamic relocs copied for + local symbols. */ + PTR local_dynrel; /* A pointer to the bfd section used for dynamic relocs. */ asection *sreloc; @@ -899,7 +938,7 @@ struct elf_obj_tdata Elf_Internal_Shdr **elf_sect_ptr; Elf_Internal_Phdr *phdr; struct elf_segment_map *segment_map; - struct bfd_strtab_hash *strtab_ptr; + struct elf_strtab_hash *strtab_ptr; int num_locals; int num_globals; int num_section_syms; @@ -1204,12 +1243,36 @@ extern boolean bfd_section_from_phdr extern int _bfd_elf_symbol_from_bfd_symbol PARAMS ((bfd *, asymbol **)); +extern asection *bfd_section_from_r_symndx + PARAMS ((bfd *, struct sym_sec_cache *, asection *, unsigned long)); extern asection *bfd_section_from_elf_index PARAMS ((bfd *, unsigned int)); extern boolean _bfd_elf_create_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); extern struct bfd_strtab_hash *_bfd_elf_stringtab_init PARAMS ((void)); + +extern struct elf_strtab_hash * _bfd_elf_strtab_init + PARAMS ((void)); +extern void _bfd_elf_strtab_free + PARAMS ((struct elf_strtab_hash *)); +extern bfd_size_type _bfd_elf_strtab_add + PARAMS ((struct elf_strtab_hash *, const char *, boolean)); +extern void _bfd_elf_strtab_addref + PARAMS ((struct elf_strtab_hash *, bfd_size_type)); +extern void _bfd_elf_strtab_delref + PARAMS ((struct elf_strtab_hash *, bfd_size_type)); +extern void _bfd_elf_strtab_clear_all_refs + PARAMS ((struct elf_strtab_hash *)); +extern bfd_size_type _bfd_elf_strtab_size + PARAMS ((struct elf_strtab_hash *)); +extern bfd_size_type _bfd_elf_strtab_offset + PARAMS ((struct elf_strtab_hash *, bfd_size_type)); +extern boolean _bfd_elf_strtab_emit + PARAMS ((bfd *, struct elf_strtab_hash *)); +extern void _bfd_elf_strtab_finalize + PARAMS ((struct elf_strtab_hash *)); + extern boolean _bfd_elf_link_record_dynamic_symbol PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); extern long _bfd_elf_link_lookup_local_dynindx @@ -1408,6 +1471,11 @@ extern boolean _bfd_elf64_gc_record_vtin extern boolean _bfd_elf64_gc_record_vtentry PARAMS ((bfd *, asection *, struct elf_link_hash_entry *, bfd_vma)); +extern boolean _bfd_elf32_reloc_symbol_deleted_p + PARAMS ((bfd_vma, PTR)); +extern boolean _bfd_elf64_reloc_symbol_deleted_p + PARAMS ((bfd_vma, PTR)); + /* MIPS ELF specific routines. */ extern boolean _bfd_mips_elf_object_p diff -uprN binutils-2.11.92.0.10/bfd/elf-strtab.c binutils-2.11.92.0.12/bfd/elf-strtab.c --- binutils-2.11.92.0.10/bfd/elf-strtab.c Wed Dec 31 16:00:00 1969 +++ binutils-2.11.92.0.12/bfd/elf-strtab.c Fri Nov 16 14:05:51 2001 @@ -0,0 +1,465 @@ +/* ELF strtab with GC and suffix merging support. + Copyright 2001 Free Software Foundation, Inc. + Written by Jakub Jelinek . + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" +#include "elf-bfd.h" +#include "hashtab.h" + +/* An entry in the strtab hash table. */ + +struct elf_strtab_hash_entry +{ + struct bfd_hash_entry root; + /* Length of this entry. */ + unsigned int len; + unsigned int refcount; + union { + /* Index within the merged section. */ + bfd_size_type index; + /* Entry this is a suffix of (if len is 0). */ + struct elf_strtab_hash_entry *suffix; + } u; +}; + +/* The strtab hash table. */ + +struct elf_strtab_hash +{ + struct bfd_hash_table table; + /* Next available index. */ + bfd_size_type size; + /* Number of array entries alloced. */ + bfd_size_type alloced; + /* Final strtab size. */ + bfd_size_type sec_size; + /* Array of pointers to strtab entries. */ + struct elf_strtab_hash_entry **array; +}; + +static struct bfd_hash_entry *elf_strtab_hash_newfunc + PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); +static int cmplengthentry PARAMS ((const PTR, const PTR)); +static int last4_eq PARAMS ((const PTR, const PTR)); +static int last_eq PARAMS ((const PTR, const PTR)); + +/* Routine to create an entry in a section merge hashtab. */ + +static struct bfd_hash_entry * +elf_strtab_hash_newfunc (entry, table, string) + struct bfd_hash_entry *entry; + struct bfd_hash_table *table; + const char *string; +{ + struct elf_strtab_hash_entry *ret = (struct elf_strtab_hash_entry *) entry; + + /* Allocate the structure if it has not already been allocated by a + subclass. */ + if (ret == (struct elf_strtab_hash_entry *) NULL) + ret = ((struct elf_strtab_hash_entry *) + bfd_hash_allocate (table, sizeof (struct elf_strtab_hash_entry))); + if (ret == (struct elf_strtab_hash_entry *) NULL) + return NULL; + + /* Call the allocation method of the superclass. */ + ret = ((struct elf_strtab_hash_entry *) + bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string)); + + if (ret) + { + /* Initialize the local fields. */ + ret->u.index = -1; + ret->refcount = 0; + ret->len = 0; + } + + return (struct bfd_hash_entry *)ret; +} + +/* Create a new hash table. */ + +struct elf_strtab_hash * +_bfd_elf_strtab_init () +{ + struct elf_strtab_hash *table; + bfd_size_type amt = sizeof (struct elf_strtab_hash); + + table = (struct elf_strtab_hash *) bfd_malloc (amt); + if (table == NULL) + return NULL; + + if (! bfd_hash_table_init (&table->table, elf_strtab_hash_newfunc)) + { + free (table); + return NULL; + } + + table->sec_size = 0; + table->size = 1; + table->alloced = 64; + amt = sizeof (struct elf_strtab_hasn_entry *); + table->array = (struct elf_strtab_hash_entry **) + bfd_malloc (table->alloced * amt); + if (table->array == NULL) + { + free (table); + return NULL; + } + + table->array[0] = NULL; + + return table; +} + +/* Free a strtab. */ + +void +_bfd_elf_strtab_free (tab) + struct elf_strtab_hash *tab; +{ + bfd_hash_table_free (&tab->table); + free (tab->array); + free (tab); +} + +/* Get the index of an entity in a hash table, adding it if it is not + already present. */ + +bfd_size_type +_bfd_elf_strtab_add (tab, str, copy) + struct elf_strtab_hash *tab; + const char *str; + boolean copy; +{ + register struct elf_strtab_hash_entry *entry; + + /* We handle this specially, since we don't want to do refcounting + on it. */ + if (*str == '\0') + return 0; + + BFD_ASSERT (tab->sec_size == 0); + entry = (struct elf_strtab_hash_entry *) + bfd_hash_lookup (&tab->table, str, true, copy); + + if (entry == NULL) + return (bfd_size_type) -1; + + entry->refcount++; + if (entry->len == 0) + { + entry->len = strlen (str) + 1; + if (tab->size == tab->alloced) + { + bfd_size_type amt = sizeof (struct elf_strtab_hash_entry *); + tab->alloced *= 2; + tab->array = (struct elf_strtab_hash_entry **) + bfd_realloc (tab->array, tab->alloced * amt); + if (tab->array == NULL) + return (bfd_size_type) -1; + } + + entry->u.index = tab->size++; + tab->array[entry->u.index] = entry; + } + return entry->u.index; +} + +void +_bfd_elf_strtab_addref (tab, idx) + struct elf_strtab_hash *tab; + bfd_size_type idx; +{ + if (idx == 0 || idx == (bfd_size_type) -1) + return; + BFD_ASSERT (tab->sec_size == 0); + BFD_ASSERT (idx < tab->size); + ++tab->array[idx]->refcount; +} + +void +_bfd_elf_strtab_delref (tab, idx) + struct elf_strtab_hash *tab; + bfd_size_type idx; +{ + if (idx == 0 || idx == (bfd_size_type) -1) + return; + BFD_ASSERT (tab->sec_size == 0); + BFD_ASSERT (idx < tab->size); + BFD_ASSERT (tab->array[idx]->refcount > 0); + --tab->array[idx]->refcount; +} + +void +_bfd_elf_strtab_clear_all_refs (tab) + struct elf_strtab_hash *tab; +{ + bfd_size_type idx; + + for (idx = 1; idx < tab->size; ++idx) + tab->array[idx]->refcount = 0; +} + +bfd_size_type +_bfd_elf_strtab_size (tab) + struct elf_strtab_hash *tab; +{ + return tab->sec_size ? tab->sec_size : tab->size; +} + +bfd_size_type +_bfd_elf_strtab_offset (tab, idx) + struct elf_strtab_hash *tab; + bfd_size_type idx; +{ + struct elf_strtab_hash_entry *entry; + + if (idx == 0) + return 0; + BFD_ASSERT (idx < tab->size); + BFD_ASSERT (tab->sec_size); + entry = tab->array[idx]; + BFD_ASSERT (entry->refcount > 0); + entry->refcount--; + return tab->array[idx]->u.index; +} + +boolean +_bfd_elf_strtab_emit (abfd, tab) + register bfd *abfd; + struct elf_strtab_hash *tab; +{ + bfd_size_type off = 1, i; + + if (bfd_bwrite ("", 1, abfd) != 1) + return false; + + for (i = 1; i < tab->size; ++i) + { + register const char *str; + register size_t len; + + str = tab->array[i]->root.string; + len = tab->array[i]->len; + BFD_ASSERT (tab->array[i]->refcount == 0); + if (len == 0) + continue; + + if (bfd_bwrite ((PTR) str, (bfd_size_type) len, abfd) != len) + return false; + + off += len; + } + + BFD_ASSERT (off == tab->sec_size); + return true; +} + +/* Compare two elf_strtab_hash_entry structures. This is called via qsort. */ + +static int +cmplengthentry (a, b) + const PTR a; + const PTR b; +{ + struct elf_strtab_hash_entry * A = *(struct elf_strtab_hash_entry **) a; + struct elf_strtab_hash_entry * B = *(struct elf_strtab_hash_entry **) b; + + if (A->len < B->len) + return 1; + else if (A->len > B->len) + return -1; + + return memcmp (A->root.string, B->root.string, A->len); +} + +static int +last4_eq (a, b) + const PTR a; + const PTR b; +{ + struct elf_strtab_hash_entry * A = (struct elf_strtab_hash_entry *) a; + struct elf_strtab_hash_entry * B = (struct elf_strtab_hash_entry *) b; + + if (memcmp (A->root.string + A->len - 5, B->root.string + B->len - 5, 4) + != 0) + /* This was a hashtable collision. */ + return 0; + + if (A->len <= B->len) + /* B cannot be a suffix of A unless A is equal to B, which is guaranteed + not to be equal by the hash table. */ + return 0; + + return memcmp (A->root.string + (A->len - B->len), + B->root.string, B->len - 5) == 0; +} + +static int +last_eq (a, b) + const PTR a; + const PTR b; +{ + struct elf_strtab_hash_entry * A = (struct elf_strtab_hash_entry *) a; + struct elf_strtab_hash_entry * B = (struct elf_strtab_hash_entry *) b; + + if (B->len >= 5) + /* Longer strings are just pushed into the hash table, + they'll be used when looking up for very short strings. */ + return 0; + + if (memcmp (A->root.string + A->len - 2, B->root.string + B->len - 2, 1) + != 0) + /* This was a hashtable collision. */ + return 0; + + if (A->len <= B->len) + /* B cannot be a suffix of A unless A is equal to B, which is guaranteed + not to be equal by the hash table. */ + return 0; + + return memcmp (A->root.string + (A->len - B->len), + B->root.string, B->len - 2) == 0; +} + +/* This function assigns final string table offsets for used strings, + merging strings matching suffixes of longer strings if possible. */ + +void +_bfd_elf_strtab_finalize (tab) + struct elf_strtab_hash *tab; +{ + struct elf_strtab_hash_entry **array, **a, **end, *e; + htab_t lasttab = NULL, last4tab = NULL; + bfd_size_type size, amt; + + /* GCC 2.91.66 (egcs-1.1.2) on i386 miscompiles this function when i is + a 64-bit bfd_size_type: a 64-bit target or --enable-64-bit-bfd. + Besides, indexing with a long long wouldn't give anything but extra + cycles. */ + size_t i; + + /* Now sort the strings by length, longest first. */ + array = NULL; + amt = tab->size * sizeof (struct elf_strtab_hash_entry *); + array = (struct elf_strtab_hash_entry **) bfd_malloc (amt); + if (array == NULL) + goto alloc_failure; + + for (i = 1, a = array; i < tab->size; ++i) + if (tab->array[i]->refcount) + *a++ = tab->array[i]; + else + tab->array[i]->len = 0; + + size = a - array; + + qsort (array, size, sizeof (struct elf_strtab_hash_entry *), cmplengthentry); + + last4tab = htab_create (size * 4, NULL, last4_eq, NULL); + lasttab = htab_create (size * 4, NULL, last_eq, NULL); + if (lasttab == NULL || last4tab == NULL) + goto alloc_failure; + + /* Now insert the strings into hash tables (strings with last 4 characters + and strings with last character equal), look for longer strings which + we're suffix of. */ + for (a = array, end = array + size; a < end; a++) + { + register hashval_t hash; + unsigned int c; + unsigned int j; + const unsigned char *s; + PTR *p; + + e = *a; + if (e->len > 4) + { + s = e->root.string + e->len - 1; + hash = 0; + for (j = 0; j < 4; j++) + { + c = *--s; + hash += c + (c << 17); + hash ^= hash >> 2; + } + p = htab_find_slot_with_hash (last4tab, e, hash, INSERT); + if (p == NULL) + goto alloc_failure; + if (*p) + { + struct elf_strtab_hash_entry *ent; + + ent = (struct elf_strtab_hash_entry *) *p; + e->u.suffix = ent; + e->len = 0; + continue; + } + else + *p = (PTR) e; + } + c = (unsigned char) e->root.string[e->len - 1]; + p = htab_find_slot_with_hash (lasttab, e, c, INSERT); + if (p == NULL) + goto alloc_failure; + if (*p) + { + struct elf_strtab_hash_entry *ent; + + ent = (struct elf_strtab_hash_entry *) *p; + e->u.suffix = ent; + e->len = 0; + } + else + *p = (PTR) e; + } + +alloc_failure: + if (array) + free (array); + if (lasttab) + htab_delete (lasttab); + if (last4tab) + htab_delete (last4tab); + + /* Now assign positions to the strings we want to keep. */ + size = 1; + for (i = 1; i < tab->size; ++i) + { + e = tab->array[i]; + if (e->refcount && e->len) + { + e->u.index = size; + size += e->len; + } + } + + tab->sec_size = size; + + /* And now adjust the rest. */ + for (i = 1; i < tab->size; ++i) + { + e = tab->array[i]; + if (e->refcount && ! e->len) + e->u.index = e->u.suffix->u.index + + (e->u.suffix->len - strlen (e->root.string) - 1); + } +} diff -uprN binutils-2.11.92.0.10/bfd/elf.c binutils-2.11.92.0.12/bfd/elf.c --- binutils-2.11.92.0.10/bfd/elf.c Fri Oct 19 23:57:48 2001 +++ binutils-2.11.92.0.12/bfd/elf.c Fri Nov 16 14:05:51 2001 @@ -40,6 +40,7 @@ SECTION #include "libbfd.h" #define ARCH_SIZE 0 #include "elf-bfd.h" +#include "libiberty.h" static INLINE struct elf_segment_map *make_mapping PARAMS ((bfd *, asection **, unsigned int, unsigned int, boolean)); @@ -466,7 +467,7 @@ setup_group (abfd, hdr, newsect) while (--n_elt != 0) if ((++idx)->shdr == hdr) { - asection *s; + asection *s = NULL; /* We are a member of this group. Go looking through other members to see if any others are linked via @@ -599,7 +600,7 @@ _bfd_elf_make_section_from_shdr (abfd, h }; int i; - for (i = sizeof (debug_sec_names) / sizeof (debug_sec_names[0]); i--;) + for (i = ARRAY_SIZE (debug_sec_names); i--;) if (strncmp (name, debug_sec_names[i], strlen (debug_sec_names[i])) == 0) break; @@ -643,17 +644,30 @@ _bfd_elf_make_section_from_shdr (abfd, h phdr = elf_tdata (abfd)->phdr; for (i = 0; i < elf_elfheader (abfd)->e_phnum; i++, phdr++) { + /* This section is part of this segment if its file + 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. */ if (phdr->p_type == PT_LOAD - && phdr->p_vaddr != phdr->p_paddr - && phdr->p_vaddr <= hdr->sh_addr - && (phdr->p_vaddr + phdr->p_memsz - >= hdr->sh_addr + hdr->sh_size) + && 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 <= (bfd_vma) hdr->sh_offset - && (phdr->p_offset + phdr->p_filesz - >= hdr->sh_offset + hdr->sh_size)))) + || (phdr->p_offset + phdr->p_filesz + >= hdr->sh_offset + hdr->sh_size))) { - newsect->lma += phdr->p_paddr - phdr->p_vaddr; + /* 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; } } @@ -1734,6 +1748,62 @@ bfd_section_from_shdr (abfd, shindex) return true; } +/* Return the section for the local symbol specified by ABFD, R_SYMNDX. + Return SEC for sections that have no elf section, and NULL on error. */ + +asection * +bfd_section_from_r_symndx (abfd, cache, sec, r_symndx) + bfd *abfd; + struct sym_sec_cache *cache; + asection *sec; + unsigned long r_symndx; +{ + unsigned char esym_shndx[2]; + unsigned int isym_shndx; + Elf_Internal_Shdr *symtab_hdr; + file_ptr pos; + bfd_size_type amt; + unsigned int ent = r_symndx % LOCAL_SYM_CACHE_SIZE; + + if (cache->abfd == abfd && cache->indx[ent] == r_symndx) + return cache->sec[ent]; + + symtab_hdr = &elf_tdata (abfd)->symtab_hdr; + pos = symtab_hdr->sh_offset; + if (get_elf_backend_data (abfd)->s->sizeof_sym + == sizeof (Elf64_External_Sym)) + { + pos += r_symndx * sizeof (Elf64_External_Sym); + pos += offsetof (Elf64_External_Sym, st_shndx); + } + else + { + pos += r_symndx * sizeof (Elf32_External_Sym); + pos += offsetof (Elf32_External_Sym, st_shndx); + } + amt = sizeof (esym_shndx); + if (bfd_seek (abfd, pos, SEEK_SET) != 0 + || bfd_bread ((PTR) esym_shndx, amt, abfd) != amt) + return NULL; + isym_shndx = H_GET_16 (abfd, esym_shndx); + + if (cache->abfd != abfd) + { + memset (cache->indx, -1, sizeof (cache->indx)); + cache->abfd = abfd; + } + cache->indx[ent] = r_symndx; + cache->sec[ent] = sec; + if (isym_shndx > 0 && isym_shndx < SHN_LORESERVE) + { + asection *s; + s = bfd_section_from_elf_index (abfd, isym_shndx); + if (s != NULL) + cache->sec[ent] = s; + } + return cache->sec[ent]; +} + /* Given an ELF section number, retrieve the corresponding BFD section. */ @@ -1926,8 +1996,8 @@ _bfd_elf_init_reloc_shdr (abfd, rel_hdr, return false; sprintf (name, "%s%s", use_rela_p ? ".rela" : ".rel", asect->name); rel_hdr->sh_name = - (unsigned int) _bfd_stringtab_add (elf_shstrtab (abfd), name, - true, false); + (unsigned int) _bfd_elf_strtab_add (elf_shstrtab (abfd), name, + false); if (rel_hdr->sh_name == (unsigned int) -1) return false; rel_hdr->sh_type = use_rela_p ? SHT_RELA : SHT_REL; @@ -1964,9 +2034,8 @@ elf_fake_sections (abfd, asect, failedpt this_hdr = &elf_section_data (asect)->this_hdr; - this_hdr->sh_name = (unsigned long) _bfd_stringtab_add (elf_shstrtab (abfd), - asect->name, - true, false); + this_hdr->sh_name = (unsigned long) _bfd_elf_strtab_add (elf_shstrtab (abfd), + asect->name, false); if (this_hdr->sh_name == (unsigned long) -1) { *failedptr = true; @@ -2187,38 +2256,51 @@ assign_section_numbers (abfd) { struct elf_obj_tdata *t = elf_tdata (abfd); asection *sec; - unsigned int section_number; + unsigned int section_number, secn; Elf_Internal_Shdr **i_shdrp; bfd_size_type amt; section_number = 1; + _bfd_elf_strtab_clear_all_refs (elf_shstrtab (abfd)); + for (sec = abfd->sections; sec; sec = sec->next) { struct bfd_elf_section_data *d = elf_section_data (sec); d->this_idx = section_number++; + _bfd_elf_strtab_addref (elf_shstrtab (abfd), d->this_hdr.sh_name); if ((sec->flags & SEC_RELOC) == 0) d->rel_idx = 0; else - d->rel_idx = section_number++; + { + d->rel_idx = section_number++; + _bfd_elf_strtab_addref (elf_shstrtab (abfd), d->rel_hdr.sh_name); + } if (d->rel_hdr2) - d->rel_idx2 = section_number++; + { + d->rel_idx2 = section_number++; + _bfd_elf_strtab_addref (elf_shstrtab (abfd), d->rel_hdr2->sh_name); + } else d->rel_idx2 = 0; } t->shstrtab_section = section_number++; + _bfd_elf_strtab_addref (elf_shstrtab (abfd), t->shstrtab_hdr.sh_name); elf_elfheader (abfd)->e_shstrndx = t->shstrtab_section; - t->shstrtab_hdr.sh_size = _bfd_stringtab_size (elf_shstrtab (abfd)); if (bfd_get_symcount (abfd) > 0) { t->symtab_section = section_number++; + _bfd_elf_strtab_addref (elf_shstrtab (abfd), t->symtab_hdr.sh_name); t->strtab_section = section_number++; + _bfd_elf_strtab_addref (elf_shstrtab (abfd), t->strtab_hdr.sh_name); } + _bfd_elf_strtab_finalize (elf_shstrtab (abfd)); + t->shstrtab_hdr.sh_size = _bfd_elf_strtab_size (elf_shstrtab (abfd)); elf_elfheader (abfd)->e_shnum = section_number; /* Set up the list of section header pointers, in agreement with the @@ -2355,6 +2437,10 @@ assign_section_numbers (abfd) } } + for (secn = 1; secn < section_number; ++secn) + i_shdrp[secn]->sh_name = _bfd_elf_strtab_offset (elf_shstrtab (abfd), + i_shdrp[secn]->sh_name); + return true; } @@ -2616,7 +2702,7 @@ _bfd_elf_compute_section_file_positions shstrtab_hdr->sh_type = SHT_STRTAB; shstrtab_hdr->sh_flags = 0; shstrtab_hdr->sh_addr = 0; - shstrtab_hdr->sh_size = _bfd_stringtab_size (elf_shstrtab (abfd)); + shstrtab_hdr->sh_size = _bfd_elf_strtab_size (elf_shstrtab (abfd)); shstrtab_hdr->sh_entsize = 0; shstrtab_hdr->sh_link = 0; shstrtab_hdr->sh_info = 0; @@ -3249,10 +3335,10 @@ assign_file_positions_for_segments (abfd /* The section may have artificial alignment forced by a link script. Notice this case by the gap between the - cumulative phdr vma and the section's vma. */ - if (p->p_vaddr + p->p_memsz < sec->vma) + cumulative phdr lma and the section's lma. */ + if (p->p_paddr + p->p_memsz < sec->lma) { - bfd_vma adjust = sec->vma - (p->p_vaddr + p->p_memsz); + bfd_vma adjust = sec->lma - (p->p_paddr + p->p_memsz); p->p_memsz += adjust; off += adjust; @@ -3607,13 +3693,13 @@ prep_headers (abfd) Elf_Internal_Phdr *i_phdrp = 0; /* Program header table, internal form */ Elf_Internal_Shdr **i_shdrp; /* Section header table, internal form */ int count; - struct bfd_strtab_hash *shstrtab; + struct elf_strtab_hash *shstrtab; struct elf_backend_data *bed = get_elf_backend_data (abfd); i_ehdrp = elf_elfheader (abfd); i_shdrp = elf_elfsections (abfd); - shstrtab = _bfd_elf_stringtab_init (); + shstrtab = _bfd_elf_strtab_init (); if (shstrtab == NULL) return false; @@ -3699,11 +3785,11 @@ prep_headers (abfd) } elf_tdata (abfd)->symtab_hdr.sh_name = - (unsigned int) _bfd_stringtab_add (shstrtab, ".symtab", true, false); + (unsigned int) _bfd_elf_strtab_add (shstrtab, ".symtab", false); elf_tdata (abfd)->strtab_hdr.sh_name = - (unsigned int) _bfd_stringtab_add (shstrtab, ".strtab", true, false); + (unsigned int) _bfd_elf_strtab_add (shstrtab, ".strtab", false); elf_tdata (abfd)->shstrtab_hdr.sh_name = - (unsigned int) _bfd_stringtab_add (shstrtab, ".shstrtab", true, false); + (unsigned int) _bfd_elf_strtab_add (shstrtab, ".shstrtab", false); if (elf_tdata (abfd)->symtab_hdr.sh_name == (unsigned int) -1 || elf_tdata (abfd)->symtab_hdr.sh_name == (unsigned int) -1 || elf_tdata (abfd)->shstrtab_hdr.sh_name == (unsigned int) -1) @@ -3782,7 +3868,7 @@ _bfd_elf_write_object_contents (abfd) /* Write out the section header names. */ if (bfd_seek (abfd, elf_tdata (abfd)->shstrtab_hdr.sh_offset, SEEK_SET) != 0 - || ! _bfd_stringtab_emit (abfd, elf_shstrtab (abfd))) + || ! _bfd_elf_strtab_emit (abfd, elf_shstrtab (abfd))) return false; if (bed->elf_backend_final_write_processing) @@ -3981,16 +4067,19 @@ copy_private_bfd_data (ibfd, obfd) /* Decide if the given section should be included in the given segment. A section will be included if: - 1. It is within the address space of the segment, + 1. It is within the address space of the segment -- we use the LMA + if that is set for the segment and the VMA otherwise, 2. It is an allocated segment, 3. There is an output section associated with it, 4. The section has not already been allocated to a previous segment. */ -#define INCLUDE_SECTION_IN_SEGMENT(section, segment) \ - ((((IS_CONTAINED_BY_VMA (section, segment) \ - || IS_SOLARIS_PT_INTERP (segment, section)) \ - && (section->flags & SEC_ALLOC) != 0) \ - || IS_COREFILE_NOTE (segment, section)) \ - && section->output_section != NULL \ +#define INCLUDE_SECTION_IN_SEGMENT(section, segment) \ + (((((segment->p_paddr \ + ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \ + : IS_CONTAINED_BY_VMA (section, segment)) \ + || IS_SOLARIS_PT_INTERP (segment, section)) \ + && (section->flags & SEC_ALLOC) != 0) \ + || IS_COREFILE_NOTE (segment, section)) \ + && section->output_section != NULL \ && section->segment_mark == false) /* Returns true iff seg1 starts after the end of seg2. */ @@ -5533,7 +5622,7 @@ _bfd_elf_close_and_cleanup (abfd) if (bfd_get_format (abfd) == bfd_object) { if (elf_shstrtab (abfd) != NULL) - _bfd_stringtab_free (elf_shstrtab (abfd)); + _bfd_elf_strtab_free (elf_shstrtab (abfd)); } return _bfd_generic_close_and_cleanup (abfd); diff -uprN binutils-2.11.92.0.10/bfd/elf32-arm.h binutils-2.11.92.0.12/bfd/elf32-arm.h --- binutils-2.11.92.0.10/bfd/elf32-arm.h Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/elf32-arm.h Fri Nov 16 14:05:51 2001 @@ -1116,6 +1116,7 @@ elf32_arm_final_link_relocate (howto, in /* 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 && (r_type != R_ARM_PC24 || (h != NULL && h->dynindx != -1 diff -uprN binutils-2.11.92.0.10/bfd/elf32-cris.c binutils-2.11.92.0.12/bfd/elf32-cris.c --- binutils-2.11.92.0.10/bfd/elf32-cris.c Sun Oct 21 16:24:32 2001 +++ binutils-2.11.92.0.12/bfd/elf32-cris.c Fri Nov 16 14:05:51 2001 @@ -33,6 +33,12 @@ static reloc_howto_type * cris_reloc_typ static void cris_info_to_howto_rela PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *)); +static boolean cris_elf_grok_prstatus + PARAMS ((bfd *abfd, Elf_Internal_Note *note)); + +static boolean cris_elf_grok_psinfo + PARAMS ((bfd *abfd, Elf_Internal_Note *note)); + static boolean cris_elf_relocate_section PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); @@ -437,10 +443,9 @@ cris_reloc_type_lookup (abfd, code) bfd * abfd ATTRIBUTE_UNUSED; bfd_reloc_code_real_type code; { - int i; + unsigned int i; - for (i = sizeof (cris_reloc_map) / sizeof (cris_reloc_map[0]); - --i >= 0;) + for (i = 0; i < sizeof (cris_reloc_map) / sizeof (cris_reloc_map[0]); i++) if (cris_reloc_map [i].bfd_reloc_val == code) return & cris_elf_howto_table [cris_reloc_map[i].cris_reloc_val]; @@ -462,6 +467,72 @@ cris_info_to_howto_rela (abfd, cache_ptr cache_ptr->howto = & cris_elf_howto_table [r_type]; } +/* Support for core dump NOTE sections. */ + +static boolean +cris_elf_grok_prstatus (abfd, note) + bfd *abfd; + Elf_Internal_Note *note; +{ + int offset; + size_t raw_size; + + switch (note->descsz) + { + default: + return false; + + case 214: /* Linux/CRIS */ + /* pr_cursig */ + elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12); + + /* pr_pid */ + elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 22); + + /* pr_reg */ + offset = 70; + raw_size = 140; + + break; + } + + /* Make a ".reg/999" section. */ + return _bfd_elfcore_make_pseudosection (abfd, ".reg", + raw_size, note->descpos + offset); +} + +static boolean +cris_elf_grok_psinfo (abfd, note) + bfd *abfd; + Elf_Internal_Note *note; +{ + switch (note->descsz) + { + default: + return false; + + case 124: /* Linux/CRIS elf_prpsinfo */ + elf_tdata (abfd)->core_program + = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16); + elf_tdata (abfd)->core_command + = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80); + } + + /* Note that for some reason, a spurious space is tacked + onto the end of the args in some (at least one anyway) + implementations, so strip it off if it exists. */ + + { + char *command = elf_tdata (abfd)->core_command; + int n = strlen (command); + + if (0 < n && command[n - 1] == ' ') + command[n - 1] = '\0'; + } + + return true; +} + /* The name of the dynamic interpreter. This is put in the .interp section. */ @@ -1162,6 +1233,7 @@ cris_elf_relocate_section (output_bfd, i case R_CRIS_16: case R_CRIS_32: if (info->shared + && r_symndx != 0 && (input_section->flags & SEC_ALLOC) != 0 && ((r_type != R_CRIS_8_PCREL && r_type != R_CRIS_16_PCREL @@ -2998,6 +3070,8 @@ elf_cris_reloc_type_class (rela) #define elf_backend_gc_mark_hook cris_elf_gc_mark_hook #define elf_backend_gc_sweep_hook cris_elf_gc_sweep_hook #define elf_backend_check_relocs cris_elf_check_relocs +#define elf_backend_grok_prstatus cris_elf_grok_prstatus +#define elf_backend_grok_psinfo cris_elf_grok_psinfo #define elf_backend_can_gc_sections 1 #define elf_backend_can_refcount 1 diff -uprN binutils-2.11.92.0.10/bfd/elf32-hppa.c binutils-2.11.92.0.12/bfd/elf32-hppa.c --- binutils-2.11.92.0.10/bfd/elf32-hppa.c Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/elf32-hppa.c Wed Nov 21 15:35:32 2001 @@ -114,7 +114,6 @@ Foundation, Inc., 59 Temple Place - Suit : be,n 0(%sr0,%rp) ; inter-space return */ #define PLT_ENTRY_SIZE 8 -#define PLABEL_PLT_ENTRY_SIZE PLT_ENTRY_SIZE #define GOT_ENTRY_SIZE 4 #define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1" @@ -213,10 +212,6 @@ struct elf32_hppa_link_hash_entry { /* Set if this symbol is used by a plabel reloc. */ unsigned int plabel:1; - - /* Set if this symbol is an init or fini function and thus should - use an absolute reloc. */ - unsigned int plt_abs:1; }; struct elf32_hppa_link_hash_table { @@ -267,6 +262,9 @@ struct elf32_hppa_link_hash_table { /* Set if we need a .plt stub to support lazy dynamic linking. */ unsigned int need_plt_stub:1; + + /* Small local sym to section mapping cache. */ + struct sym_sec_cache sym_sec; }; /* Various hash macros and functions. */ @@ -342,7 +340,10 @@ static void elf32_hppa_hide_symbol static boolean elf32_hppa_adjust_dynamic_symbol PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); -static boolean hppa_handle_PIC_calls +static boolean mark_PIC_calls + PARAMS ((struct elf_link_hash_entry *, PTR)); + +static boolean allocate_plt_static PARAMS ((struct elf_link_hash_entry *, PTR)); static boolean allocate_dynrelocs @@ -462,7 +463,6 @@ hppa_link_hash_newfunc (entry, table, st eh->maybe_pic_call = 0; eh->pic_call = 0; eh->plabel = 0; - eh->plt_abs = 0; } return entry; @@ -509,6 +509,7 @@ elf32_hppa_link_hash_table_create (abfd) ret->has_12bit_branch = 0; ret->has_17bit_branch = 0; ret->need_plt_stub = 0; + ret->sym_sec.abfd = NULL; return &ret->elf.root; } @@ -1516,6 +1517,9 @@ elf32_hppa_check_relocs (abfd, info, sec || (h->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0))) { + struct elf32_hppa_dyn_reloc_entry *p; + struct elf32_hppa_dyn_reloc_entry **head; + /* Create a reloc section in dynobj and make room for this reloc. */ if (sreloc == NULL) @@ -1563,36 +1567,46 @@ elf32_hppa_check_relocs (abfd, info, sec relocations we need for this symbol. */ if (h != NULL) { - struct elf32_hppa_dyn_reloc_entry *p; + head = &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; - p = h->dyn_relocs; - if (p == NULL || p->sec != sec) - { - p = ((struct elf32_hppa_dyn_reloc_entry *) - bfd_alloc (htab->elf.dynobj, - (bfd_size_type) sizeof *p)); - if (p == NULL) - return false; - p->next = h->dyn_relocs; - h->dyn_relocs = p; - p->sec = sec; - p->count = 0; + head = ((struct elf32_hppa_dyn_reloc_entry **) + &elf_section_data (s)->local_dynrel); + } + + p = *head; + if (p == NULL || p->sec != sec) + { + p = ((struct elf32_hppa_dyn_reloc_entry *) + bfd_alloc (htab->elf.dynobj, + (bfd_size_type) sizeof *p)); + if (p == NULL) + return false; + p->next = *head; + *head = p; + p->sec = sec; + p->count = 0; #if RELATIVE_DYNRELOCS - p->relative_count = 0; + p->relative_count = 0; #endif - } + } - p->count += 1; + p->count += 1; #if RELATIVE_DYNRELOCS - if (!IS_ABSOLUTE_RELOC (rtype)) - p->relative_count += 1; + if (!IS_ABSOLUTE_RELOC (rtype)) + p->relative_count += 1; #endif - } - else - { - /* Track dynamic relocs needed for local syms too. */ - elf_section_data (sec)->local_dynrel += 1; - } } } } @@ -1668,7 +1682,7 @@ elf32_hppa_gc_sweep_hook (abfd, info, se struct elf32_hppa_link_hash_table *htab; bfd *dynobj; - elf_section_data (sec)->local_dynrel = 0; + elf_section_data (sec)->local_dynrel = NULL; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -1972,7 +1986,7 @@ elf32_hppa_adjust_dynamic_symbol (info, the first part of elf32_hppa_adjust_dynamic_symbol. */ static boolean -hppa_handle_PIC_calls (h, inf) +mark_PIC_calls (h, inf) struct elf_link_hash_entry *h; PTR inf ATTRIBUTE_UNUSED; { @@ -1993,19 +2007,17 @@ hppa_handle_PIC_calls (h, inf) return true; } -/* Allocate space in .plt, .got and associated reloc sections for - global syms. */ +/* Allocate space in the .plt for entries that won't have relocations. + ie. pic_call and plabel entries. */ static boolean -allocate_dynrelocs (h, inf) +allocate_plt_static (h, inf) struct elf_link_hash_entry *h; PTR inf; { struct bfd_link_info *info; struct elf32_hppa_link_hash_table *htab; asection *s; - 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) @@ -2013,46 +2025,42 @@ allocate_dynrelocs (h, inf) info = (struct bfd_link_info *) inf; htab = hppa_link_hash_table (info); - if ((htab->elf.dynamic_sections_created - && h->plt.refcount > 0) - || ((struct elf32_hppa_link_hash_entry *) h)->pic_call) + 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. */ + s = htab->splt; + h->plt.offset = s->_raw_size; + s->_raw_size += PLT_ENTRY_SIZE; + } + else 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 - && h->type != STT_PARISC_MILLI - && !((struct elf32_hppa_link_hash_entry *) h)->pic_call) + && h->type != STT_PARISC_MILLI) { if (! bfd_elf32_link_record_dynamic_symbol (info, h)) return false; } - if (((struct elf32_hppa_link_hash_entry *) h)->pic_call - || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h)) + if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h)) + { + /* Allocate these later. */ + } + else if (((struct elf32_hppa_link_hash_entry *) h)->plabel) { - /* Make an entry in the .plt section. */ + /* Make an entry in the .plt section for plabel references + that won't have a .plt entry for other reasons. */ s = htab->splt; h->plt.offset = s->_raw_size; - if (PLABEL_PLT_ENTRY_SIZE != PLT_ENTRY_SIZE - && ((struct elf32_hppa_link_hash_entry *) h)->plabel - && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) - { - /* Add some extra space for the dynamic linker to use. */ - s->_raw_size += PLABEL_PLT_ENTRY_SIZE; - } - else - s->_raw_size += PLT_ENTRY_SIZE; - - if (! ((struct elf32_hppa_link_hash_entry *) h)->pic_call) - { - /* We also need to make an entry in the .rela.plt section. */ - htab->srelplt->_raw_size += sizeof (Elf32_External_Rela); - htab->need_plt_stub = 1; - } + s->_raw_size += PLT_ENTRY_SIZE; } else { + /* No .plt entry needed. */ h->plt.offset = (bfd_vma) -1; h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; } @@ -2063,10 +2071,46 @@ allocate_dynrelocs (h, inf) h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; } + return true; +} + +/* Allocate space in .plt, .got and associated reloc sections for + global syms. */ + +static boolean +allocate_dynrelocs (h, inf) + struct elf_link_hash_entry *h; + PTR inf; +{ + struct bfd_link_info *info; + struct elf32_hppa_link_hash_table *htab; + asection *s; + 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) + return true; + + 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)) + { + /* Make an entry in the .plt section. */ + s = htab->splt; + h->plt.offset = s->_raw_size; + s->_raw_size += PLT_ENTRY_SIZE; + + /* We also need to make an entry in the .rela.plt section. */ + htab->srelplt->_raw_size += sizeof (Elf32_External_Rela); + htab->need_plt_stub = 1; + } + if (h->got.refcount > 0) { - 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 @@ -2080,9 +2124,13 @@ allocate_dynrelocs (h, inf) 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 (Elf32_External_Rela); + if (htab->elf.dynamic_sections_created + && (info->shared + || (h->dynindx != -1 + && h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)) + { + htab->srelgot->_raw_size += sizeof (Elf32_External_Rela); + } } else h->got.offset = (bfd_vma) -1; @@ -2148,7 +2196,7 @@ allocate_dynrelocs (h, inf) eh->dyn_relocs = NULL; return true; - keep: + keep: ; } /* Finally, allocate space. */ @@ -2177,9 +2225,13 @@ clobber_millicode_symbols (h, info) Therefore we do not leave ELF_LINK_FORCED_LOCAL set. */ if (h->type == STT_PARISC_MILLI) { + struct elf32_hppa_link_hash_table *htab; unsigned short oldflags = h->elf_link_hash_flags; + h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; elf32_hppa_hide_symbol (info, h); + htab = hppa_link_hash_table (info); + _bfd_elf_strtab_delref (htab->elf.dynstr, h->dynstr_index); h->elf_link_hash_flags &= ~ELF_LINK_FORCED_LOCAL; h->elf_link_hash_flags |= oldflags & ELF_LINK_FORCED_LOCAL; } @@ -2252,12 +2304,10 @@ elf32_hppa_size_dynamic_sections (output else { /* Run through the function symbols, looking for any that are - PIC, and allocate space for the necessary .plt entries so - that %r19 will be set up. */ + PIC, and mark them as needing .plt entries so that %r19 will + be set up. */ if (! info->shared) - elf_link_hash_traverse (&htab->elf, - hppa_handle_PIC_calls, - info); + elf_link_hash_traverse (&htab->elf, mark_PIC_calls, (PTR) info); } /* Set up .got and .plt offsets for local syms, and space for local @@ -2277,12 +2327,26 @@ elf32_hppa_size_dynamic_sections (output for (s = ibfd->sections; s != NULL; s = s->next) { - bfd_size_type count = elf_section_data (s)->local_dynrel; + struct elf32_hppa_dyn_reloc_entry *p; - if (count != 0) + for (p = ((struct elf32_hppa_dyn_reloc_entry *) + elf_section_data (s)->local_dynrel); + p != NULL; + p = p->next) { - srel = elf_section_data (s)->sreloc; - srel->_raw_size += count * sizeof (Elf32_External_Rela); + 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 + { + srel = elf_section_data (p->sec)->sreloc; + srel->_raw_size += p->count * sizeof (Elf32_External_Rela); + } } } @@ -2335,6 +2399,11 @@ elf32_hppa_size_dynamic_sections (output } } + /* Do all the .plt entries without relocs first. The dynamic linker + uses the last .plt reloc to find the end of the .plt (and hence + the start of the .got) for lazy linking. */ + elf_link_hash_traverse (&htab->elf, allocate_plt_static, (PTR) info); + /* Allocate global sym .plt and .got entries, and space for global sym dynamic relocs. */ elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info); @@ -2960,7 +3029,8 @@ elf32_hppa_size_stubs (output_bfd, stub_ if (! (info->shared && !info->no_undefined && (ELF_ST_VISIBILITY (hash->elf.other) - == STV_DEFAULT))) + == STV_DEFAULT) + && hash->elf.type != STT_PARISC_MILLI)) continue; } else @@ -3468,6 +3538,7 @@ final_link_relocate (input_section, cont input_section->name, (long) rel->r_offset, stub_entry->root.string); + bfd_set_error (bfd_error_bad_value); return bfd_reloc_notsupported; } @@ -3539,7 +3610,6 @@ elf32_hppa_relocate_section (output_bfd, bfd_reloc_status_type r; const char *sym_name; boolean plabel; - bfd_vma off; r_type = ELF32_R_TYPE (rel->r_info); if (r_type >= (unsigned int) R_PARISC_UNIMPLEMENTED) @@ -3639,87 +3709,88 @@ elf32_hppa_relocate_section (output_bfd, case R_PARISC_DLTIND14F: case R_PARISC_DLTIND14R: case R_PARISC_DLTIND21L: - /* Relocation is to the entry for this symbol in the global - offset table. */ - if (h != NULL) - { - boolean dyn; - - off = h->elf.got.offset; - dyn = htab->elf.dynamic_sections_created; - if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, &h->elf)) - { - /* This is actually a static link, or it is a - -Bsymbolic link and the symbol is defined - locally, or the symbol was forced to be local - because of a version file. We must initialize - this entry in the global offset table. Since the - offset must always be a multiple of 4, we use the - least significant bit to record whether we have - initialized it already. - - When doing a dynamic link, we create a .rela.got - relocation entry to initialize the value. This - is done in the finish_dynamic_symbol routine. */ - if ((off & 1) != 0) - off &= ~1; - else - { - bfd_put_32 (output_bfd, relocation, - htab->sgot->contents + off); - h->elf.got.offset |= 1; - } - } - } - else - { - /* Local symbol case. */ - if (local_got_offsets == NULL) - abort (); + { + bfd_vma off; + boolean do_got = 0; - off = local_got_offsets[r_symndx]; + /* Relocation is to the entry for this symbol in the + global offset table. */ + if (h != NULL) + { + boolean dyn; + + off = h->elf.got.offset; + dyn = htab->elf.dynamic_sections_created; + if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, &h->elf)) + { + /* If we aren't going to call finish_dynamic_symbol, + then we need to handle initialisation of the .got + entry and create needed relocs here. Since the + offset must always be a multiple of 4, we use the + least significant bit to record whether we have + initialised it already. */ + if ((off & 1) != 0) + off &= ~1; + else + { + h->elf.got.offset |= 1; + do_got = 1; + } + } + } + else + { + /* Local symbol case. */ + if (local_got_offsets == NULL) + abort (); + + off = local_got_offsets[r_symndx]; + + /* The offset must always be a multiple of 4. We use + the least significant bit to record whether we have + already generated the necessary reloc. */ + if ((off & 1) != 0) + off &= ~1; + else + { + local_got_offsets[r_symndx] |= 1; + do_got = 1; + } + } - /* The offset must always be a multiple of 4. We use - the least significant bit to record whether we have - already generated the necessary reloc. */ - if ((off & 1) != 0) - off &= ~1; - else - { + if (do_got) + { + if (info->shared) + { + /* Output a dynamic relocation for this GOT entry. + In this case it is relative to the base of the + object because the symbol index is zero. */ + Elf_Internal_Rela outrel; + asection *srelgot = htab->srelgot; + Elf32_External_Rela *loc; + + outrel.r_offset = (off + + htab->sgot->output_offset + + htab->sgot->output_section->vma); + outrel.r_info = ELF32_R_INFO (0, R_PARISC_DIR32); + outrel.r_addend = relocation; + loc = (Elf32_External_Rela *) srelgot->contents; + loc += srelgot->reloc_count++; + bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc); + } + else bfd_put_32 (output_bfd, relocation, htab->sgot->contents + off); + } - if (info->shared) - { - /* Output a dynamic relocation for this GOT - entry. In this case it is relative to the - base of the object because the symbol index - is zero. */ - Elf_Internal_Rela outrel; - asection *srelgot = htab->srelgot; - Elf32_External_Rela *loc; - - outrel.r_offset = (off - + htab->sgot->output_offset - + htab->sgot->output_section->vma); - outrel.r_info = ELF32_R_INFO (0, R_PARISC_DIR32); - outrel.r_addend = relocation; - loc = (Elf32_External_Rela *) srelgot->contents; - loc += srelgot->reloc_count++; - bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc); - } - - local_got_offsets[r_symndx] |= 1; - } - } - - if (off >= (bfd_vma) -2) - abort (); + if (off >= (bfd_vma) -2) + abort (); - /* Add the base of the GOT to the relocation value. */ - relocation = (off - + htab->sgot->output_offset - + htab->sgot->output_section->vma); + /* Add the base of the GOT to the relocation value. */ + relocation = (off + + htab->sgot->output_offset + + htab->sgot->output_section->vma); + } break; case R_PARISC_SEGREL32: @@ -3734,6 +3805,9 @@ elf32_hppa_relocate_section (output_bfd, case R_PARISC_PLABEL32: if (htab->elf.dynamic_sections_created) { + bfd_vma off; + boolean do_plt = 0; + /* If we have a global symbol with a PLT slot, then redirect this relocation to it. */ if (h != NULL) @@ -3748,13 +3822,8 @@ elf32_hppa_relocate_section (output_bfd, off &= ~1; else { - bfd_put_32 (output_bfd, - relocation, - htab->splt->contents + off); - bfd_put_32 (output_bfd, - elf_gp (htab->splt->output_section->owner), - htab->splt->contents + off + 4); h->elf.plt.offset |= 1; + do_plt = 1; } } } @@ -3775,32 +3844,38 @@ elf32_hppa_relocate_section (output_bfd, off &= ~1; else { + local_plt_offsets[r_symndx] |= 1; + do_plt = 1; + } + } + + if (do_plt) + { + if (info->shared) + { + /* Output a dynamic IPLT relocation for this + PLT entry. */ + Elf_Internal_Rela outrel; + asection *srelplt = htab->srelplt; + Elf32_External_Rela *loc; + + outrel.r_offset = (off + + htab->splt->output_offset + + htab->splt->output_section->vma); + outrel.r_info = ELF32_R_INFO (0, R_PARISC_IPLT); + outrel.r_addend = relocation; + loc = (Elf32_External_Rela *) srelplt->contents; + loc += srelplt->reloc_count++; + bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc); + } + else + { bfd_put_32 (output_bfd, relocation, htab->splt->contents + off); bfd_put_32 (output_bfd, elf_gp (htab->splt->output_section->owner), htab->splt->contents + off + 4); - - if (info->shared) - { - /* Output a dynamic IPLT relocation for this - PLT entry. */ - Elf_Internal_Rela outrel; - asection *srelplt = htab->srelplt; - Elf32_External_Rela *loc; - - outrel.r_offset = (off - + htab->splt->output_offset - + htab->splt->output_section->vma); - outrel.r_info = ELF32_R_INFO (0, R_PARISC_IPLT); - outrel.r_addend = relocation; - loc = (Elf32_External_Rela *) srelplt->contents; - loc += srelplt->reloc_count++; - bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc); - } - - local_plt_offsets[r_symndx] |= 1; } } @@ -3835,12 +3910,19 @@ elf32_hppa_relocate_section (output_bfd, case R_PARISC_DPREL14R: case R_PARISC_DPREL21L: case R_PARISC_DIR32: + /* 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; + /* The reloc types handled here and this conditional expression must match the code in ..check_relocs and - ..discard_relocs. ie. We need exactly the same condition + allocate_dynrelocs. ie. We need exactly the same condition as in ..check_relocs, with some extra conditions (dynindx test in this case) to cater for relocs removed by - ..discard_relocs. If you squint, the non-shared test + allocate_dynrelocs. If you squint, the non-shared test here does indeed match the one in ..check_relocs, the difference being that here we test DEF_DYNAMIC as well as !DEF_REGULAR. All common syms end up with !DEF_REGULAR, @@ -3848,7 +3930,6 @@ elf32_hppa_relocate_section (output_bfd, Conversely, DEF_DYNAMIC can't be used in check_relocs as there all files have not been loaded. */ if ((info->shared - && (input_section->flags & SEC_ALLOC) != 0 && (IS_ABSOLUTE_RELOC (r_type) || (h != NULL && h->elf.dynindx != -1 @@ -3856,7 +3937,6 @@ elf32_hppa_relocate_section (output_bfd, || (h->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)))) || (!info->shared - && (input_section->flags & SEC_ALLOC) != 0 && h != NULL && h->elf.dynindx != -1 && (h->elf.elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0 @@ -3881,6 +3961,8 @@ elf32_hppa_relocate_section (output_bfd, skip = false; if (elf_section_data (input_section)->stab_info != NULL) { + bfd_vma off; + off = (_bfd_stab_section_offset (output_bfd, &htab->elf.stab_info, input_section, @@ -4076,18 +4158,8 @@ elf32_hppa_finish_dynamic_symbol (output rel.r_offset = (h->plt.offset + htab->splt->output_offset + htab->splt->output_section->vma); - if (! ((struct elf32_hppa_link_hash_entry *) h)->plt_abs - && h->dynindx != -1) + if (h->dynindx != -1) { - /* To support lazy linking, the function pointer is - initialised to point to a special stub stored at the - end of the .plt. This is not done for plt entries - with a base-relative dynamic relocation. */ - value = (htab->splt->output_offset - + htab->splt->output_section->vma - + htab->splt->_raw_size - - sizeof (plt_stub) - + PLT_STUB_ENTRY); rel.r_info = ELF32_R_INFO (h->dynindx, R_PARISC_IPLT); rel.r_addend = 0; } @@ -4104,19 +4176,14 @@ elf32_hppa_finish_dynamic_symbol (output bfd_elf32_swap_reloca_out (htab->splt->output_section->owner, &rel, loc); } - - bfd_put_32 (htab->splt->owner, - value, - htab->splt->contents + h->plt.offset); - bfd_put_32 (htab->splt->owner, - elf_gp (htab->splt->output_section->owner), - htab->splt->contents + h->plt.offset + 4); - if (PLABEL_PLT_ENTRY_SIZE != PLT_ENTRY_SIZE - && ((struct elf32_hppa_link_hash_entry *) h)->plabel - && h->dynindx != -1) + else { - memset (htab->splt->contents + h->plt.offset + 8, - 0, PLABEL_PLT_ENTRY_SIZE - PLT_ENTRY_SIZE); + bfd_put_32 (htab->splt->owner, + value, + htab->splt->contents + h->plt.offset); + bfd_put_32 (htab->splt->owner, + elf_gp (htab->splt->output_section->owner), + htab->splt->contents + h->plt.offset + 4); } if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) @@ -4278,6 +4345,19 @@ elf32_hppa_finish_dynamic_sections (outp else dyn.d_un.d_val = s->_raw_size; break; + + case DT_RELASZ: + /* Don't count procedure linkage table relocs in the + overall reloc count. */ + if (htab->srelplt != NULL) + { + 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; } bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); diff -uprN binutils-2.11.92.0.10/bfd/elf32-i370.c binutils-2.11.92.0.12/bfd/elf32-i370.c --- binutils-2.11.92.0.10/bfd/elf32-i370.c Fri Oct 19 23:57:48 2001 +++ binutils-2.11.92.0.12/bfd/elf32-i370.c Fri Nov 16 14:05:51 2001 @@ -1449,7 +1449,8 @@ i370_elf_relocate_section (output_bfd, i object. */ case (int)R_I370_ADDR31: case (int)R_I370_ADDR16: - if (info->shared) + if (info->shared + && r_symndx != 0) { Elf_Internal_Rela outrel; boolean skip; diff -uprN binutils-2.11.92.0.10/bfd/elf32-i386.c binutils-2.11.92.0.12/bfd/elf32-i386.c --- binutils-2.11.92.0.10/bfd/elf32-i386.c Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/elf32-i386.c Fri Nov 16 14:05:51 2001 @@ -497,6 +497,9 @@ struct elf_i386_link_hash_table asection *srelplt; asection *sdynbss; asection *srelbss; + + /* Small local sym to section mapping cache. */ + struct sym_sec_cache sym_sec; }; /* Get the i386 ELF linker hash table from a link_info structure. */ @@ -561,6 +564,7 @@ elf_i386_link_hash_table_create (abfd) ret->srelplt = NULL; ret->sdynbss = NULL; ret->srelbss = NULL; + ret->sym_sec.abfd = NULL; return &ret->elf.root; } @@ -833,6 +837,9 @@ elf_i386_check_relocs (abfd, info, sec, || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0))) { + struct elf_i386_dyn_relocs *p; + struct elf_i386_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. */ @@ -883,35 +890,42 @@ elf_i386_check_relocs (abfd, info, sec, relocations we need for this symbol. */ if (h != NULL) { - struct elf_i386_link_hash_entry *eh; - struct elf_i386_dyn_relocs *p; - - eh = (struct elf_i386_link_hash_entry *) h; - p = eh->dyn_relocs; - - if (p == NULL || p->sec != sec) - { - bfd_size_type amt = sizeof *p; - p = ((struct elf_i386_dyn_relocs *) - bfd_alloc (htab->elf.dynobj, amt)); - if (p == NULL) - return false; - p->next = eh->dyn_relocs; - eh->dyn_relocs = p; - p->sec = sec; - p->count = 0; - p->pc_count = 0; - } - - p->count += 1; - if (ELF32_R_TYPE (rel->r_info) == R_386_PC32) - p->pc_count += 1; + head = &((struct elf_i386_link_hash_entry *) h)->dyn_relocs; } else { - /* Track dynamic relocs needed for local syms too. */ - elf_section_data (sec)->local_dynrel += 1; + /* 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; + + head = ((struct elf_i386_dyn_relocs **) + &elf_section_data (s)->local_dynrel); + } + + p = *head; + if (p == NULL || p->sec != sec) + { + bfd_size_type amt = sizeof *p; + p = ((struct elf_i386_dyn_relocs *) + bfd_alloc (htab->elf.dynobj, amt)); + if (p == NULL) + return false; + p->next = *head; + *head = p; + p->sec = sec; + p->count = 0; + p->pc_count = 0; } + + p->count += 1; + if (ELF32_R_TYPE (rel->r_info) == R_386_PC32) + p->pc_count += 1; } break; @@ -1000,13 +1014,8 @@ elf_i386_gc_sweep_hook (abfd, info, sec, const Elf_Internal_Rela *rel, *relend; unsigned long r_symndx; struct elf_link_hash_entry *h; - bfd *dynobj; - elf_section_data (sec)->local_dynrel = 0; - - dynobj = elf_hash_table (info)->dynobj; - if (dynobj == NULL) - return true; + elf_section_data (sec)->local_dynrel = NULL; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -1393,7 +1402,7 @@ allocate_dynrelocs (h, inf) eh->dyn_relocs = NULL; - keep: + keep: ; } /* Finally, allocate space. */ @@ -1480,12 +1489,26 @@ elf_i386_size_dynamic_sections (output_b for (s = ibfd->sections; s != NULL; s = s->next) { - bfd_size_type count = elf_section_data (s)->local_dynrel; + struct elf_i386_dyn_relocs *p; - if (count != 0) + for (p = *((struct elf_i386_dyn_relocs **) + &elf_section_data (s)->local_dynrel); + p != NULL; + p = p->next) { - srel = elf_section_data (s)->sreloc; - srel->_raw_size += count * sizeof (Elf32_External_Rel); + 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 + { + srel = elf_section_data (p->sec)->sreloc; + srel->_raw_size += p->count * sizeof (Elf32_External_Rel); + } } } @@ -1924,8 +1947,14 @@ elf_i386_relocate_section (output_bfd, i case R_386_32: case R_386_PC32: + /* 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 - && (input_section->flags & SEC_ALLOC) != 0 && (r_type != R_386_PC32 || (h != NULL && h->dynindx != -1 @@ -1933,7 +1962,6 @@ elf_i386_relocate_section (output_bfd, i || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)))) || (!info->shared - && (input_section->flags & SEC_ALLOC) != 0 && h != NULL && h->dynindx != -1 && (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0 @@ -2010,7 +2038,6 @@ elf_i386_relocate_section (output_bfd, i if (! relocate) continue; } - break; default: diff -uprN binutils-2.11.92.0.10/bfd/elf32-m68k.c binutils-2.11.92.0.12/bfd/elf32-m68k.c --- binutils-2.11.92.0.10/bfd/elf32-m68k.c Fri Oct 19 23:57:48 2001 +++ binutils-2.11.92.0.12/bfd/elf32-m68k.c Fri Nov 16 14:05:51 2001 @@ -1644,6 +1644,7 @@ elf_m68k_relocate_section (output_bfd, i case R_68K_16: case R_68K_32: if (info->shared + && r_symndx != 0 && (input_section->flags & SEC_ALLOC) != 0 && ((r_type != R_68K_PC8 && r_type != R_68K_PC16 diff -uprN binutils-2.11.92.0.10/bfd/elf32-mips.c binutils-2.11.92.0.12/bfd/elf32-mips.c --- binutils-2.11.92.0.10/bfd/elf32-mips.c Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/elf32-mips.c Fri Nov 16 14:05:51 2001 @@ -219,6 +219,12 @@ static boolean _bfd_elf32_mips_grok_prst PARAMS ((bfd *, Elf_Internal_Note *)); static boolean _bfd_elf32_mips_grok_psinfo PARAMS ((bfd *, Elf_Internal_Note *)); +static boolean _bfd_elf32_mips_discard_info + PARAMS ((bfd *, struct elf_reloc_cookie *, struct bfd_link_info *)); +static boolean _bfd_elf32_mips_ignore_discarded_relocs + PARAMS ((asection *)); +static boolean _bfd_elf32_mips_write_section + PARAMS ((bfd *, asection *, bfd_byte *)); extern const bfd_target bfd_elf32_tradbigmips_vec; extern const bfd_target bfd_elf32_tradlittlemips_vec; @@ -1190,6 +1196,8 @@ _bfd_mips_elf_hi16_reloc (abfd, relocation += symbol->section->output_section->vma; relocation += symbol->section->output_offset; relocation += reloc_entry->addend; + if (reloc_entry->howto->pc_relative) + relocation -= reloc_entry->address; if (reloc_entry->address > input_section->_cooked_size) return bfd_reloc_outofrange; @@ -3510,7 +3518,7 @@ _bfd_mips_elf_modify_segment_map (abfd) if ((*pm)->p_type == PT_DYNAMIC) break; m = *pm; - if (IRIX_COMPAT (abfd) == ict_none) + if (m != NULL && IRIX_COMPAT (abfd) == ict_none) { /* For a normal mips executable the permissions for the PT_DYNAMIC segment are read, write and execute. We do that here since @@ -6323,6 +6331,7 @@ mips_elf_calculate_relocation (abfd, & ELF_LINK_HASH_DEF_DYNAMIC) != 0) && ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0))) + && r_symndx != 0 && (input_section->flags & SEC_ALLOC) != 0) { /* If we're creating a shared library, or this relocation is @@ -8926,7 +8935,7 @@ _bfd_mips_elf_finish_dynamic_sections (o case DT_STRSZ: /* Rewrite DT_STRSZ. */ dyn.d_un.d_val = - _bfd_stringtab_size (elf_hash_table (info)->dynstr); + _bfd_elf_strtab_size (elf_hash_table (info)->dynstr); break; case DT_PLTGOT: @@ -9223,6 +9232,114 @@ _bfd_elf32_mips_grok_psinfo (abfd, note) return true; } +#define PDR_SIZE 32 + +static boolean +_bfd_elf32_mips_discard_info (abfd, cookie, info) + bfd *abfd; + struct elf_reloc_cookie *cookie; + struct bfd_link_info *info; +{ + asection *o; + struct elf_backend_data *bed = get_elf_backend_data (abfd); + boolean ret = false; + unsigned char *tdata; + size_t i, skip; + + o = bfd_get_section_by_name (abfd, ".pdr"); + if (! o) + return false; + if (o->_raw_size == 0) + return false; + if (o->_raw_size % PDR_SIZE != 0) + return false; + if (o->output_section != NULL + && bfd_is_abs_section (o->output_section)) + return false; + + tdata = bfd_zmalloc (o->_raw_size / PDR_SIZE); + if (! tdata) + return false; + + cookie->rels = _bfd_elf32_link_read_relocs (abfd, o, (PTR) NULL, + (Elf_Internal_Rela *) NULL, + info->keep_memory); + if (!cookie->rels) + { + free (tdata); + return false; + } + + cookie->rel = cookie->rels; + cookie->relend = + cookie->rels + o->reloc_count * bed->s->int_rels_per_ext_rel; + + for (i = 0, skip = 0; i < o->_raw_size; i ++) + { + if (_bfd_elf32_reloc_symbol_deleted_p (i * PDR_SIZE, cookie)) + { + tdata[i] = 1; + skip ++; + } + } + + if (skip != 0) + { + elf_section_data (o)->tdata = tdata; + o->_cooked_size = o->_raw_size - skip * PDR_SIZE; + ret = true; + } + else + free (tdata); + + if (! info->keep_memory) + free (cookie->rels); + + return ret; +} + +static boolean +_bfd_elf32_mips_ignore_discarded_relocs (sec) + asection *sec; +{ + if (strcmp (sec->name, ".pdr") == 0) + return true; + return false; +} + +static boolean +_bfd_elf32_mips_write_section (output_bfd, sec, contents) + bfd *output_bfd; + asection *sec; + bfd_byte *contents; +{ + bfd_byte *to, *from, *end; + int i; + + if (strcmp (sec->name, ".pdr") != 0) + return false; + + if (elf_section_data (sec)->tdata == NULL) + return false; + + to = contents; + end = contents + sec->_raw_size; + for (from = contents, i = 0; + from < end; + from += PDR_SIZE, i++) + { + if (((unsigned char *)elf_section_data (sec)->tdata)[i] == 1) + continue; + if (to != from) + memcpy (to, from, PDR_SIZE); + to += PDR_SIZE; + } + bfd_set_section_contents (output_bfd, sec->output_section, contents, + (file_ptr) sec->output_offset, + sec->_cooked_size); + return true; +} + /* This is almost identical to bfd_generic_get_... except that some MIPS relocations need to be handled specially. Sigh. */ @@ -9513,6 +9630,11 @@ static const struct ecoff_debug_swap mip #define elf_backend_grok_prstatus _bfd_elf32_mips_grok_prstatus #define elf_backend_grok_psinfo _bfd_elf32_mips_grok_psinfo +#define elf_backend_discard_info _bfd_elf32_mips_discard_info +#define elf_backend_ignore_discarded_relocs \ + _bfd_elf32_mips_ignore_discarded_relocs +#define elf_backend_write_section _bfd_elf32_mips_write_section + #define bfd_elf32_bfd_is_local_label_name \ mips_elf_is_local_label_name #define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line diff -uprN binutils-2.11.92.0.10/bfd/elf32-ppc.c binutils-2.11.92.0.12/bfd/elf32-ppc.c --- binutils-2.11.92.0.10/bfd/elf32-ppc.c Fri Oct 19 23:57:48 2001 +++ binutils-2.11.92.0.12/bfd/elf32-ppc.c Fri Nov 16 14:05:51 2001 @@ -3175,7 +3175,8 @@ ppc_elf_relocate_section (output_bfd, in case (int) R_PPC_ADDR14: case (int) R_PPC_UADDR32: case (int) R_PPC_UADDR16: - if (info->shared && (input_section->flags & SEC_ALLOC) != 0) + if (info->shared && r_symndx != 0 + && (input_section->flags & SEC_ALLOC) != 0) { Elf_Internal_Rela outrel; boolean skip; diff -uprN binutils-2.11.92.0.10/bfd/elf32-s390.c binutils-2.11.92.0.12/bfd/elf32-s390.c --- binutils-2.11.92.0.10/bfd/elf32-s390.c Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/elf32-s390.c Fri Nov 16 14:05:51 2001 @@ -29,22 +29,33 @@ static reloc_howto_type *elf_s390_reloc_ PARAMS ((bfd *, bfd_reloc_code_real_type)); static void elf_s390_info_to_howto PARAMS ((bfd *, arelent *, Elf_Internal_Rela *)); -static boolean elf_s390_is_local_label_name PARAMS ((bfd *, const char *)); -static struct bfd_hash_entry *elf_s390_link_hash_newfunc +static boolean elf_s390_is_local_label_name + PARAMS ((bfd *, const char *)); +static struct bfd_hash_entry *link_hash_newfunc PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); static struct bfd_link_hash_table *elf_s390_link_hash_table_create PARAMS ((bfd *)); +static boolean create_got_section + PARAMS((bfd *, struct bfd_link_info *)); +static boolean elf_s390_create_dynamic_sections + PARAMS((bfd *, struct bfd_link_info *)); +static void elf_s390_copy_indirect_symbol + PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *)); static boolean elf_s390_check_relocs PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *)); static asection *elf_s390_gc_mark_hook PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, - struct elf_link_hash_entry *, Elf_Internal_Sym *sym)); + struct elf_link_hash_entry *, Elf_Internal_Sym *)); static boolean elf_s390_gc_sweep_hook PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *)); static boolean elf_s390_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 elf_s390_size_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); static boolean elf_s390_relocate_section @@ -53,11 +64,11 @@ static boolean elf_s390_relocate_section static boolean elf_s390_finish_dynamic_symbol PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, Elf_Internal_Sym *)); +static enum elf_reloc_type_class elf_s390_reloc_type_class + PARAMS ((const Elf_Internal_Rela *)); static boolean elf_s390_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); static boolean elf_s390_object_p PARAMS ((bfd *)); -static enum elf_reloc_type_class elf_s390_reloc_type_class - PARAMS ((const Elf_Internal_Rela *)); #define USE_RELA 1 /* We want RELA relocations, not REL. */ @@ -112,54 +123,55 @@ elf_s390_reloc_type_lookup (abfd, code) bfd *abfd ATTRIBUTE_UNUSED; bfd_reloc_code_real_type code; { - switch (code) { - case BFD_RELOC_NONE: - return &elf_howto_table[(int) R_390_NONE]; - case BFD_RELOC_8: - return &elf_howto_table[(int) R_390_8]; - case BFD_RELOC_390_12: - return &elf_howto_table[(int) R_390_12]; - case BFD_RELOC_16: - return &elf_howto_table[(int) R_390_16]; - case BFD_RELOC_32: - return &elf_howto_table[(int) R_390_32]; - case BFD_RELOC_CTOR: - return &elf_howto_table[(int) R_390_32]; - case BFD_RELOC_32_PCREL: - return &elf_howto_table[(int) R_390_PC32]; - case BFD_RELOC_390_GOT12: - return &elf_howto_table[(int) R_390_GOT12]; - case BFD_RELOC_32_GOT_PCREL: - return &elf_howto_table[(int) R_390_GOT32]; - case BFD_RELOC_390_PLT32: - return &elf_howto_table[(int) R_390_PLT32]; - case BFD_RELOC_390_COPY: - return &elf_howto_table[(int) R_390_COPY]; - case BFD_RELOC_390_GLOB_DAT: - return &elf_howto_table[(int) R_390_GLOB_DAT]; - case BFD_RELOC_390_JMP_SLOT: - return &elf_howto_table[(int) R_390_JMP_SLOT]; - case BFD_RELOC_390_RELATIVE: - return &elf_howto_table[(int) R_390_RELATIVE]; - case BFD_RELOC_32_GOTOFF: - return &elf_howto_table[(int) R_390_GOTOFF]; - case BFD_RELOC_390_GOTPC: - return &elf_howto_table[(int) R_390_GOTPC]; - case BFD_RELOC_390_GOT16: - return &elf_howto_table[(int) R_390_GOT16]; - case BFD_RELOC_16_PCREL: - return &elf_howto_table[(int) R_390_PC16]; - case BFD_RELOC_390_PC16DBL: - return &elf_howto_table[(int) R_390_PC16DBL]; - case BFD_RELOC_390_PLT16DBL: - return &elf_howto_table[(int) R_390_PLT16DBL]; - case BFD_RELOC_VTABLE_INHERIT: - return &elf32_s390_vtinherit_howto; - case BFD_RELOC_VTABLE_ENTRY: - return &elf32_s390_vtentry_howto; - default: - break; - } + switch (code) + { + case BFD_RELOC_NONE: + return &elf_howto_table[(int) R_390_NONE]; + case BFD_RELOC_8: + return &elf_howto_table[(int) R_390_8]; + case BFD_RELOC_390_12: + return &elf_howto_table[(int) R_390_12]; + case BFD_RELOC_16: + return &elf_howto_table[(int) R_390_16]; + case BFD_RELOC_32: + return &elf_howto_table[(int) R_390_32]; + case BFD_RELOC_CTOR: + return &elf_howto_table[(int) R_390_32]; + case BFD_RELOC_32_PCREL: + return &elf_howto_table[(int) R_390_PC32]; + case BFD_RELOC_390_GOT12: + return &elf_howto_table[(int) R_390_GOT12]; + case BFD_RELOC_32_GOT_PCREL: + return &elf_howto_table[(int) R_390_GOT32]; + case BFD_RELOC_390_PLT32: + return &elf_howto_table[(int) R_390_PLT32]; + case BFD_RELOC_390_COPY: + return &elf_howto_table[(int) R_390_COPY]; + case BFD_RELOC_390_GLOB_DAT: + return &elf_howto_table[(int) R_390_GLOB_DAT]; + case BFD_RELOC_390_JMP_SLOT: + return &elf_howto_table[(int) R_390_JMP_SLOT]; + case BFD_RELOC_390_RELATIVE: + return &elf_howto_table[(int) R_390_RELATIVE]; + case BFD_RELOC_32_GOTOFF: + return &elf_howto_table[(int) R_390_GOTOFF]; + case BFD_RELOC_390_GOTPC: + return &elf_howto_table[(int) R_390_GOTPC]; + case BFD_RELOC_390_GOT16: + return &elf_howto_table[(int) R_390_GOT16]; + case BFD_RELOC_16_PCREL: + return &elf_howto_table[(int) R_390_PC16]; + case BFD_RELOC_390_PC16DBL: + return &elf_howto_table[(int) R_390_PC16DBL]; + case BFD_RELOC_390_PLT16DBL: + return &elf_howto_table[(int) R_390_PLT16DBL]; + case BFD_RELOC_VTABLE_INHERIT: + return &elf32_s390_vtinherit_howto; + case BFD_RELOC_VTABLE_ENTRY: + return &elf32_s390_vtentry_howto; + default: + break; + } return 0; } @@ -206,11 +218,6 @@ elf_s390_is_local_label_name (abfd, name #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1" -/* The nop opcode we use. */ - -#define s390_NOP 0x07070707 - - /* The size in bytes of the first entry in the procedure linkage table. */ #define PLT_FIRST_ENTRY_SIZE 32 /* The size in bytes of an entry in the procedure linkage table. */ @@ -365,53 +372,53 @@ PLT0: #define PLT_FIRST_ENTRY_WORD5 0x07f10000 /* The s390 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. */ - -/* This structure keeps track of the number of PC relative relocs we - have copied for a given symbol. */ - -struct elf_s390_pcrel_relocs_copied -{ - /* Next section. */ - struct elf_s390_pcrel_relocs_copied *next; - /* A section in dynobj. */ - asection *section; - /* Number of relocs copied in this section. */ + 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. */ + +struct elf_s390_dyn_relocs +{ + struct elf_s390_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; }; /* s390 ELF linker hash entry. */ struct elf_s390_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 elf_s390_pcrel_relocs_copied *pcrel_relocs_copied; + /* Track dynamic relocs copied for this symbol. */ + struct elf_s390_dyn_relocs *dyn_relocs; }; /* s390 ELF linker hash table. */ struct elf_s390_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 elf_s390_discard_copies - PARAMS ((struct elf_s390_link_hash_entry *, PTR)); - -/* Traverse an s390 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 elf_s390_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 s390 ELF linker hash table from a link_info structure. */ @@ -421,33 +428,32 @@ static boolean elf_s390_discard_copies /* Create an entry in an s390 ELF linker hash table. */ static struct bfd_hash_entry * -elf_s390_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 elf_s390_link_hash_entry *ret = - (struct elf_s390_link_hash_entry *) entry; - /* Allocate the structure if it has not already been allocated by a subclass. */ - if (ret == (struct elf_s390_link_hash_entry *) NULL) - ret = ((struct elf_s390_link_hash_entry *) - bfd_hash_allocate (table, - sizeof (struct elf_s390_link_hash_entry))); - if (ret == (struct elf_s390_link_hash_entry *) NULL) - return (struct bfd_hash_entry *) ret; + if (entry == NULL) + { + entry = bfd_hash_allocate (table, + sizeof (struct elf_s390_link_hash_entry)); + if (entry == NULL) + return entry; + } /* Call the allocation method of the superclass. */ - ret = ((struct elf_s390_link_hash_entry *) - _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret, - table, string)); - if (ret != (struct elf_s390_link_hash_entry *) NULL) + entry = _bfd_elf_link_hash_newfunc (entry, table, string); + if (entry != NULL) { - ret->pcrel_relocs_copied = NULL; + struct elf_s390_link_hash_entry *eh; + + eh = (struct elf_s390_link_hash_entry *) entry; + eh->dyn_relocs = NULL; } - return (struct bfd_hash_entry *) ret; + return entry; } /* Create an s390 ELF linker hash table. */ @@ -460,19 +466,135 @@ elf_s390_link_hash_table_create (abfd) bfd_size_type amt = sizeof (struct elf_s390_link_hash_table); ret = (struct elf_s390_link_hash_table *) bfd_alloc (abfd, amt); - if (ret == (struct elf_s390_link_hash_table *) NULL) + if (ret == NULL) return NULL; - if (! _bfd_elf_link_hash_table_init (&ret->root, abfd, - elf_s390_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 elf_s390_link_hash_table *htab; + + if (! _bfd_elf_create_got_section (dynobj, info)) + return false; + + htab = elf_s390_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, 2)) + 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 +elf_s390_create_dynamic_sections (dynobj, info) + bfd *dynobj; + struct bfd_link_info *info; +{ + struct elf_s390_link_hash_table *htab; + + htab = elf_s390_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 +elf_s390_copy_indirect_symbol (dir, ind) + struct elf_link_hash_entry *dir, *ind; +{ + struct elf_s390_link_hash_entry *edir, *eind; + + edir = (struct elf_s390_link_hash_entry *) dir; + eind = (struct elf_s390_link_hash_entry *) ind; + + if (eind->dyn_relocs != NULL) + { + if (edir->dyn_relocs != NULL) + { + struct elf_s390_dyn_relocs **pp; + struct elf_s390_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 elf_s390_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); +} /* Look through the relocs for a section during the first phase, and allocate space in the global offset table or procedure linkage @@ -485,26 +607,20 @@ elf_s390_check_relocs (abfd, info, sec, asection *sec; const Elf_Internal_Rela *relocs; { - bfd *dynobj; + struct elf_s390_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 = elf_s390_hash_table (info); symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); - local_got_refcounts = elf_local_got_offsets (abfd); - sgot = NULL; - srelgot = NULL; sreloc = NULL; rel_end = relocs + sec->reloc_count; @@ -515,110 +631,60 @@ elf_s390_check_relocs (abfd, info, sec, r_symndx = ELF32_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 (ELF32_R_TYPE (rel->r_info)) - { - case R_390_GOT12: - case R_390_GOT16: - case R_390_GOT32: - case R_390_GOTOFF: - case R_390_GOTPC: - elf_hash_table (info)->dynobj = dynobj = abfd; - if (! _bfd_elf_create_got_section (dynobj, info)) - return false; - break; - - default: - break; - } - } - - switch (ELF32_R_TYPE (rel->r_info)) { case R_390_GOT12: case R_390_GOT16: case R_390_GOT32: /* 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, 2)) - 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_elf32_link_record_dynamic_symbol (info, h)) - return false; - } - - sgot->_raw_size += 4; - srelgot->_raw_size += sizeof (Elf32_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; size = symtab_hdr->sh_info; size *= sizeof (bfd_signed_vma); - local_got_refcounts = (bfd_signed_vma *) - bfd_zalloc (abfd, size); + local_got_refcounts = ((bfd_signed_vma *) + bfd_zalloc (abfd, size)); if (local_got_refcounts == NULL) return false; elf_local_got_refcounts (abfd) = local_got_refcounts; } - if (local_got_refcounts[r_symndx] == 0) - { - sgot->_raw_size += 4; - if (info->shared) - { - /* If we are generating a shared object, we need to - output a R_390_RELATIVE reloc so that the dynamic - linker can adjust this GOT entry. */ - srelgot->_raw_size += sizeof (Elf32_External_Rela); - } - } local_got_refcounts[r_symndx] += 1; } + /* Fall through */ + + case R_390_GOTOFF: + case R_390_GOTPC: + 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_390_PLT16DBL: @@ -645,37 +711,69 @@ elf_s390_check_relocs (abfd, info, sec, case R_390_PC16: case R_390_PC16DBL: case R_390_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 - against a local symbol, then we need to copy the reloc - into the shared library. However, if we are linking with - -Bsymbolic, we do not need to copy a reloc against a - global symbol which is defined in an object we are - 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. */ - if (info->shared - && (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_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. */ + against a global symbol, or a non PC relative reloc + against a local symbol, then we need to copy the reloc + into the shared library. However, if we are linking with + -Bsymbolic, we do not need to copy a reloc against a + global symbol which is defined in an object we are + 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). 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 + && ((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_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 elf_s390_dyn_relocs *p; + struct elf_s390_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, @@ -684,10 +782,19 @@ elf_s390_check_relocs (abfd, info, sec, 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) { @@ -703,50 +810,52 @@ elf_s390_check_relocs (abfd, info, sec, || ! bfd_set_section_alignment (dynobj, sreloc, 2)) return false; } - if (sec->flags & SEC_READONLY) - info->flags |= DF_TEXTREL; + elf_section_data (sec)->sreloc = sreloc; } - sreloc->_raw_size += sizeof (Elf32_External_Rela); - - /* If we are linking with -Bsymbolic, and 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 again if the symbol is later - defined by a regular object. Note that this function - is only called if we are using an elf_s390 linker - hash table, which means that h is really a pointer to - an elf_s390_link_hash_entry. */ - if (h != NULL - && (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_PC32)) + /* If this is a global symbol, we count the number of + relocations we need for this symbol. */ + if (h != NULL) { - struct elf_s390_link_hash_entry *eh; - struct elf_s390_pcrel_relocs_copied *p; - - eh = (struct elf_s390_link_hash_entry *) h; + head = &((struct elf_s390_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 elf_s390_dyn_relocs **) + &elf_section_data (s)->local_dynrel); + } + p = *head; + if (p == NULL || p->sec != sec) + { + bfd_size_type amt = sizeof *p; + p = ((struct elf_s390_dyn_relocs *) + bfd_alloc (htab->elf.dynobj, amt)); if (p == NULL) - { - p = ((struct elf_s390_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 (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_PC32) + p->pc_count += 1; + } break; /* This relocation describes the C++ object vtable hierarchy. @@ -759,7 +868,7 @@ elf_s390_check_relocs (abfd, info, sec, /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_390_GNU_VTENTRY: - if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend)) + if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_offset)) return false; break; @@ -823,10 +932,10 @@ elf_s390_gc_mark_hook (abfd, info, rel, static boolean elf_s390_gc_sweep_hook (abfd, info, sec, relocs) - bfd *abfd ATTRIBUTE_UNUSED; - struct bfd_link_info *info ATTRIBUTE_UNUSED; - asection *sec ATTRIBUTE_UNUSED; - const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED; + bfd *abfd; + struct bfd_link_info *info; + asection *sec; + const Elf_Internal_Rela *relocs; { Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; @@ -834,21 +943,13 @@ elf_s390_gc_sweep_hook (abfd, info, sec, 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 (ELF32_R_TYPE (rel->r_info)) @@ -863,27 +964,48 @@ elf_s390_gc_sweep_hook (abfd, info, sec, { 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 -= 4; - srelgot->_raw_size -= sizeof (Elf32_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 -= 4; - if (info->shared) - srelgot->_raw_size -= sizeof (Elf32_External_Rela); - } - } + local_got_refcounts[r_symndx] -= 1; + } + break; + + case R_390_8: + case R_390_12: + case R_390_16: + case R_390_32: + case R_390_PC16: + case R_390_PC16DBL: + case R_390_PC32: + r_symndx = ELF32_R_SYM (rel->r_info); + if (r_symndx >= symtab_hdr->sh_info) + { + struct elf_s390_link_hash_entry *eh; + struct elf_s390_dyn_relocs **pp; + struct elf_s390_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 elf_s390_link_hash_entry *) h; + + for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next) + if (p->sec == sec) + { + 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_PC32) + p->pc_count -= 1; + p->count -= 1; + if (p->count == 0) + *pp = p->next; + break; + } } break; @@ -916,33 +1038,22 @@ elf_s390_adjust_dynamic_symbol (info, h) struct bfd_link_info *info; struct elf_link_hash_entry *h; { - bfd *dynobj; + struct elf_s390_link_hash_table *htab; + struct elf_s390_link_hash_entry * eh; + struct elf_s390_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 (although we could actually do it here). */ 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)) { /* This case can occur if we saw a PLT32 reloc in an input file, but the symbol was never referred to by a dynamic @@ -951,54 +1062,16 @@ elf_s390_adjust_dynamic_symbol (info, h) 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_elf32_link_record_dynamic_symbol (info, h)) - return false; - } - - s = bfd_get_section_by_name (dynobj, ".plt"); - BFD_ASSERT (s != NULL); - - /* The first entry in .plt is reserved. */ - if (s->_raw_size == 0) - s->_raw_size = PLT_FIRST_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 (Elf32_External_Rela); - return true; } else + /* It's possible that we incorrectly decided a .plt reloc was + needed for an R_390_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 @@ -1028,6 +1101,29 @@ elf_s390_adjust_dynamic_symbol (info, h) 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 elf_s390_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 @@ -1038,20 +1134,14 @@ elf_s390_adjust_dynamic_symbol (info, h) 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 = elf_s390_hash_table (info); - /* We must generate a R_390_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 - .rel.bss section we are going to use. */ + /* We must generate a R_390_COPY reloc to tell the dynamic linker to + copy the initial value out of the dynamic object and into the + 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 (Elf32_External_Rela); + htab->srelbss->_raw_size += sizeof (Elf32_External_Rela); h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY; } @@ -1062,11 +1152,11 @@ elf_s390_adjust_dynamic_symbol (info, h) power_of_two = 3; /* Apply the required alignment. */ - 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)) + 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 (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; } @@ -1080,6 +1170,218 @@ elf_s390_adjust_dynamic_symbol (info, h) return true; } +/* This is the condition under which elf_s390_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 elf_s390_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 elf_s390_link_hash_table *htab; + 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) + return true; + + info = (struct bfd_link_info *) inf; + htab = elf_s390_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_elf32_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_FIRST_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 (Elf32_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_elf32_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 (Elf32_External_Rela); + } + else + h->got.offset = (bfd_vma) -1; + + eh = (struct elf_s390_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 elf_s390_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_elf32_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 (Elf32_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 elf_s390_link_hash_entry *eh; + struct elf_s390_dyn_relocs *p; + + eh = (struct elf_s390_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 @@ -1087,125 +1389,152 @@ elf_s390_size_dynamic_sections (output_b bfd *output_bfd ATTRIBUTE_UNUSED; struct bfd_link_info *info; { + struct elf_s390_link_hash_table *htab; bfd *dynobj; asection *s; boolean relocs; - boolean plt; + bfd *ibfd; - dynobj = elf_hash_table (info)->dynobj; - BFD_ASSERT (dynobj != NULL); + htab = elf_s390_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) - elf_s390_link_hash_traverse (elf_s390_hash_table (info), - elf_s390_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 = false; - 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 *srela; - 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 elf_s390_dyn_relocs *p; + + for (p = *((struct elf_s390_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 + { + srela = elf_section_data (p->sec)->sreloc; + srela->_raw_size += p->count * sizeof (Elf32_External_Rela); + } } } - 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; + srela = 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 to handle .rela.bss and - .rel.plt. We must create it in - create_dynamic_sections, because it 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) + srela->_raw_size += sizeof (Elf32_External_Rela); } else - { - /* Remember whether there are any reloc sections other - than .rela.plt. */ - if (strcmp (name, ".rela.plt") != 0) - 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; - } + *local_got = (bfd_vma) -1; } - else if (strncmp (name, ".got", 4) != 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 (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 to handle .rela.bss and + .rela.plt. We must create it in + create_dynamic_sections, because it 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; } - /* Allocate memory for the section contents. */ - s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size); - if (s->contents == NULL && s->_raw_size != 0) + /* Allocate memory for the section contents. We use bfd_zalloc + here in case unused entries are not reclaimed before the + section's contents are written out. This should not happen, + but this way if it does, we get a R_390_NONE reloc instead + of garbage. */ + s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size); + 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 elf_s390_finish_dynamic_sections, but we @@ -1221,7 +1550,7 @@ elf_s390_size_dynamic_sections (output_b return false; } - if (plt) + if (htab->splt->_raw_size != 0) { if (!add_dynamic_entry (DT_PLTGOT, 0) || !add_dynamic_entry (DT_PLTRELSZ, 0) @@ -1236,13 +1565,16 @@ elf_s390_size_dynamic_sections (output_b || !add_dynamic_entry (DT_RELASZ, 0) || !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela))) return false; - } - if ((info->flags & DF_TEXTREL) != 0) - { - if (!add_dynamic_entry (DT_TEXTREL, 0)) - return false; - info->flags |= DF_TEXTREL; + /* If any dynamic relocs apply to a read-only section, + then we need a DT_TEXTREL entry. */ + 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 @@ -1250,34 +1582,6 @@ elf_s390_size_dynamic_sections (output_b return true; } -/* This function is called via elf_s390_link_hash_traverse if we are - creating a shared object with -Bsymbolic. It discards the space - allocated to copy PC relative relocs against symbols which are - defined in regular objects. We allocated space for them in the - check_relocs routine, but we won't fill them in in the - relocate_section routine. */ - -/*ARGSUSED*/ -static boolean -elf_s390_discard_copies (h, inf) - struct elf_s390_link_hash_entry *h; - PTR inf; -{ - struct elf_s390_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 (Elf32_External_Rela); - } - return true; -} /* Relocate a 390 ELF section. */ static boolean @@ -1292,30 +1596,18 @@ elf_s390_relocate_section (output_bfd, i Elf_Internal_Sym *local_syms; asection **local_sections; { - bfd *dynobj; + struct elf_s390_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 *rel; Elf_Internal_Rela *relend; - dynobj = elf_hash_table (info)->dynobj; + htab = elf_s390_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); - sgot = NULL; - splt = NULL; - sreloc = NULL; - if (dynobj != NULL) - { - splt = bfd_get_section_by_name (dynobj, ".plt"); - sgot = bfd_get_section_by_name (dynobj, ".got"); - } - rel = relocs; relend = relocs + input_section->reloc_count; for (; rel < relend; rel++) @@ -1326,7 +1618,9 @@ elf_s390_relocate_section (output_bfd, i 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; r_type = ELF32_R_TYPE (rel->r_info); @@ -1365,6 +1659,7 @@ elf_s390_relocate_section (output_bfd, i h = NULL; sym = NULL; sec = NULL; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -1379,53 +1674,18 @@ elf_s390_relocate_section (output_bfd, i 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_390_GOTPC - || ((r_type == R_390_PLT16DBL || - r_type == R_390_PLT32) - && splt != NULL - && h->plt.offset != (bfd_vma) -1) - || ((r_type == R_390_GOT12 || - r_type == R_390_GOT16 || - r_type == R_390_GOT32) - && 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_390_8 || - r_type == R_390_16 || - r_type == R_390_32 || - r_type == R_390_PC16 || - r_type == R_390_PC16DBL || - r_type == R_390_PC32) - && ((input_section->flags & SEC_ALLOC) != 0 - /* DWARF will emit R_386_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)))) + if (sec->output_section == NULL) { - /* 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) - { - (*_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 @@ -1445,8 +1705,8 @@ elf_s390_relocate_section (output_bfd, i if (! ((*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, input_section, rel->r_offset, - (!info->shared || info->no_undefined - || ELF_ST_VISIBILITY (h->other))))) + (!info->shared || info->no_undefined + || ELF_ST_VISIBILITY (h->other))))) return false; relocation = 0; } @@ -1459,18 +1719,20 @@ elf_s390_relocate_section (output_bfd, i case R_390_GOT32: /* Relocation is to the entry for this symbol in the global offset table. */ - BFD_ASSERT (sgot != NULL); + if (htab->sgot == NULL) + abort (); if (h != NULL) { - bfd_vma off; + boolean dyn; off = h->got.offset; - BFD_ASSERT (off != (bfd_vma) -1); - - if (! elf_hash_table (info)->dynamic_sections_created + dyn = htab->elf.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 @@ -1490,18 +1752,17 @@ elf_s390_relocate_section (output_bfd, i else { bfd_put_32 (output_bfd, relocation, - sgot->contents + off); + htab->sgot->contents + off); h->got.offset |= 1; } } - relocation = sgot->output_offset + off; + else + 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]; @@ -1512,67 +1773,55 @@ elf_s390_relocate_section (output_bfd, i off &= ~1; else { - bfd_put_32 (output_bfd, relocation, sgot->contents + off); + bfd_put_32 (output_bfd, relocation, + htab->sgot->contents + off); if (info->shared) { asection *srelgot; Elf_Internal_Rela outrel; + Elf32_External_Rela *loc; - 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 = ELF32_R_INFO (0, R_390_RELATIVE); outrel.r_addend = relocation; - bfd_elf32_swap_reloca_out (output_bfd, &outrel, - (((Elf32_External_Rela *) - srelgot->contents) - + srelgot->reloc_count)); - ++srelgot->reloc_count; + loc = (Elf32_External_Rela *) srelgot->contents; + loc += srelgot->reloc_count++; + bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc); } local_got_offsets[r_symndx] |= 1; } - - relocation = sgot->output_offset + off; } + if (off >= (bfd_vma) -2) + abort (); + relocation = htab->sgot->output_offset + off; break; case R_390_GOTOFF: /* Relocation is relative to the start of the global offset table. */ - if (sgot == NULL) - { - sgot = bfd_get_section_by_name (dynobj, ".got"); - BFD_ASSERT (sgot != NULL); - } - /* Note that sgot->output_offset is not involved in this calculation. We always want the start of .got. If we defined _GLOBAL_OFFSET_TABLE in a different way, as is permitted by the ABI, we might have to change this calculation. */ - relocation -= sgot->output_section->vma; - + relocation -= htab->sgot->output_section->vma; break; case R_390_GOTPC: /* Use global offset table as symbol value. */ - - if (sgot == NULL) - { - sgot = bfd_get_section_by_name (dynobj, ".got"); - BFD_ASSERT (sgot != NULL); - } - - relocation = sgot->output_section->vma; - + relocation = htab->sgot->output_section->vma; + unresolved_reloc = false; break; case R_390_PLT16DBL: @@ -1585,7 +1834,8 @@ elf_s390_relocate_section (output_bfd, i 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 @@ -1593,10 +1843,10 @@ elf_s390_relocate_section (output_bfd, i 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_390_8: @@ -1605,43 +1855,41 @@ elf_s390_relocate_section (output_bfd, i case R_390_PC16: case R_390_PC16DBL: case R_390_PC32: - if (info->shared - && (input_section->flags & SEC_ALLOC) != 0 - && ((r_type != R_390_PC16 && - r_type != R_390_PC16DBL && - r_type != R_390_PC32) - || (h != NULL - && h->dynindx != -1 - && (! info->symbolic - || (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) == 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_390_PC16 + && r_type != R_390_PC16DBL + && r_type != R_390_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; + Elf32_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); - } + /* When generating a shared object, these relocations + are copied into the output file to be resolved at run + time. */ skip = false; @@ -1649,11 +1897,8 @@ elf_s390_relocate_section (output_bfd, i outrel.r_offset = rel->r_offset; else { - bfd_vma off; - off = (_bfd_stab_section_offset - (output_bfd, &elf_hash_table (info)->stab_info, - input_section, + (output_bfd, htab->elf.stab_info, input_section, &elf_section_data (input_section)->stab_info, rel->r_offset)); if (off == (bfd_vma) -1) @@ -1669,42 +1914,35 @@ elf_s390_relocate_section (output_bfd, i memset (&outrel, 0, sizeof outrel); relocate = false; } - else if (r_type == R_390_PC16 || - r_type == R_390_PC16DBL || - r_type == R_390_PC32) + else if (h != NULL + && h->dynindx != -1 + && (r_type == R_390_PC16 + || r_type == R_390_PC16DBL + || r_type == R_390_PC32 + || !info->shared + || !info->symbolic + || (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_REGULAR) == 0)) { - BFD_ASSERT (h != NULL && h->dynindx != -1); relocate = false; outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); - outrel.r_addend = relocation + rel->r_addend; + outrel.r_addend = rel->r_addend; } else { - /* h->dynindx may be -1 if this symbol was marked to - become local. */ - if (h == NULL - || ((info->symbolic || h->dynindx == -1) - && (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) != 0)) - { - relocate = true; - outrel.r_info = ELF32_R_INFO (0, R_390_RELATIVE); - outrel.r_addend = relocation + rel->r_addend; - } - else - { - BFD_ASSERT (h->dynindx != -1); - relocate = false; - outrel.r_info = ELF32_R_INFO (h->dynindx, R_390_32); - outrel.r_addend = relocation + rel->r_addend; - } + /* This symbol is local, or marked to become local. */ + relocate = true; + outrel.r_info = ELF32_R_INFO (0, R_390_RELATIVE); + outrel.r_addend = relocation + rel->r_addend; } - bfd_elf32_swap_reloca_out (output_bfd, &outrel, - (((Elf32_External_Rela *) - sreloc->contents) - + sreloc->reloc_count)); - ++sreloc->reloc_count; + sreloc = elf_section_data (input_section)->sreloc; + if (sreloc == NULL) + abort (); + + loc = (Elf32_External_Rela *) sreloc->contents; + loc += sreloc->reloc_count++; + bfd_elf32_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 @@ -1713,46 +1951,60 @@ elf_s390_relocate_section (output_bfd, i if (! relocate) continue; } + break; - break; + default: + break; + } - default: - 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); r = _bfd_final_link_relocate (howto, input_bfd, input_section, - contents, rel->r_offset, - relocation, rel->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, rel->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; } } } @@ -1770,29 +2022,26 @@ elf_s390_finish_dynamic_symbol (output_b struct elf_link_hash_entry *h; Elf_Internal_Sym *sym; { - bfd *dynobj; + struct elf_s390_link_hash_table *htab; - dynobj = elf_hash_table (info)->dynobj; + htab = elf_s390_hash_table (info); if (h->plt.offset != (bfd_vma) -1) { - asection *splt; - asection *srela; + bfd_vma plt_index; + bfd_vma got_offset; Elf_Internal_Rela rela; + Elf32_External_Rela *loc; bfd_vma relative_offset; - bfd_vma got_offset; - bfd_vma plt_index; - asection *sgot; /* 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 (); /* Calc. index no. Current offset - size first entry / entry size. */ @@ -1813,122 +2062,122 @@ elf_s390_finish_dynamic_symbol (output_b /* Fill in the entry in the procedure linkage table. */ if (!info->shared) - { - bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD0, - splt->contents + h->plt.offset); - bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD1, - splt->contents + h->plt.offset + 4); - bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD2, - splt->contents + h->plt.offset + 8); - bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD3, - splt->contents + h->plt.offset + 12); - bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD4, - splt->contents + h->plt.offset + 16); - bfd_put_32 (output_bfd, (bfd_vma) 0 + (relative_offset << 16), - splt->contents + h->plt.offset + 20); - bfd_put_32 (output_bfd, - (sgot->output_section->vma - + sgot->output_offset - + got_offset), - splt->contents + h->plt.offset + 24); - } + { + bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD0, + htab->splt->contents + h->plt.offset); + bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD1, + htab->splt->contents + h->plt.offset + 4); + bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD2, + htab->splt->contents + h->plt.offset + 8); + bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD3, + htab->splt->contents + h->plt.offset + 12); + bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD4, + htab->splt->contents + h->plt.offset + 16); + bfd_put_32 (output_bfd, (bfd_vma) 0+(relative_offset << 16), + htab->splt->contents + h->plt.offset + 20); + bfd_put_32 (output_bfd, + (htab->sgotplt->output_section->vma + + htab->sgotplt->output_offset + + got_offset), + htab->splt->contents + h->plt.offset + 24); + } else if (got_offset < 4096) - { - bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC12_ENTRY_WORD0 + got_offset, - splt->contents + h->plt.offset); - bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC12_ENTRY_WORD1, - splt->contents + h->plt.offset + 4); - bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC12_ENTRY_WORD2, - splt->contents + h->plt.offset + 8); - bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC12_ENTRY_WORD3, - splt->contents + h->plt.offset + 12); - bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC12_ENTRY_WORD4, - splt->contents + h->plt.offset + 16); - bfd_put_32 (output_bfd, (bfd_vma) 0 + (relative_offset << 16), - splt->contents + h->plt.offset + 20); - bfd_put_32 (output_bfd, (bfd_vma) 0, - splt->contents + h->plt.offset + 24); - } + { + bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC12_ENTRY_WORD0 + got_offset, + htab->splt->contents + h->plt.offset); + bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC12_ENTRY_WORD1, + htab->splt->contents + h->plt.offset + 4); + bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC12_ENTRY_WORD2, + htab->splt->contents + h->plt.offset + 8); + bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC12_ENTRY_WORD3, + htab->splt->contents + h->plt.offset + 12); + bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC12_ENTRY_WORD4, + htab->splt->contents + h->plt.offset + 16); + bfd_put_32 (output_bfd, (bfd_vma) 0+(relative_offset << 16), + htab->splt->contents + h->plt.offset + 20); + bfd_put_32 (output_bfd, (bfd_vma) 0, + htab->splt->contents + h->plt.offset + 24); + } else if (got_offset < 32768) - { - bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC16_ENTRY_WORD0 + got_offset, - splt->contents + h->plt.offset); - bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC16_ENTRY_WORD1, - splt->contents + h->plt.offset + 4); - bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC16_ENTRY_WORD2, - splt->contents + h->plt.offset + 8); - bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC16_ENTRY_WORD3, - splt->contents + h->plt.offset + 12); - bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC16_ENTRY_WORD4, - splt->contents + h->plt.offset + 16); - bfd_put_32 (output_bfd, (bfd_vma) 0 + (relative_offset << 16), - splt->contents + h->plt.offset + 20); - bfd_put_32 (output_bfd, (bfd_vma) 0, - splt->contents + h->plt.offset + 24); - } + { + bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC16_ENTRY_WORD0 + got_offset, + htab->splt->contents + h->plt.offset); + bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC16_ENTRY_WORD1, + htab->splt->contents + h->plt.offset + 4); + bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC16_ENTRY_WORD2, + htab->splt->contents + h->plt.offset + 8); + bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC16_ENTRY_WORD3, + htab->splt->contents + h->plt.offset + 12); + bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC16_ENTRY_WORD4, + htab->splt->contents + h->plt.offset + 16); + bfd_put_32 (output_bfd, (bfd_vma) 0+(relative_offset << 16), + htab->splt->contents + h->plt.offset + 20); + bfd_put_32 (output_bfd, (bfd_vma) 0, + htab->splt->contents + h->plt.offset + 24); + } else - { - bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_ENTRY_WORD0, - splt->contents + h->plt.offset); - bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_ENTRY_WORD1, - splt->contents + h->plt.offset + 4); - bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_ENTRY_WORD2, - splt->contents + h->plt.offset + 8); - bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_ENTRY_WORD3, - splt->contents + h->plt.offset + 12); - bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_ENTRY_WORD4, - splt->contents + h->plt.offset + 16); - bfd_put_32 (output_bfd, (bfd_vma) 0 + (relative_offset << 16), - splt->contents + h->plt.offset + 20); - bfd_put_32 (output_bfd, got_offset, - splt->contents + h->plt.offset + 24); - } + { + bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_ENTRY_WORD0, + htab->splt->contents + h->plt.offset); + bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_ENTRY_WORD1, + htab->splt->contents + h->plt.offset + 4); + bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_ENTRY_WORD2, + htab->splt->contents + h->plt.offset + 8); + bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_ENTRY_WORD3, + htab->splt->contents + h->plt.offset + 12); + bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_ENTRY_WORD4, + htab->splt->contents + h->plt.offset + 16); + bfd_put_32 (output_bfd, (bfd_vma) 0+(relative_offset << 16), + htab->splt->contents + h->plt.offset + 20); + bfd_put_32 (output_bfd, got_offset, + htab->splt->contents + h->plt.offset + 24); + } /* Insert offset into reloc. table here. */ bfd_put_32 (output_bfd, plt_index * sizeof (Elf32_External_Rela), - splt->contents + h->plt.offset + 28); - /* Fill in the entry in the .rela.plt section. */ - rela.r_offset = (sgot->output_section->vma - + sgot->output_offset - + got_offset); - rela.r_info = ELF32_R_INFO (h->dynindx, R_390_JMP_SLOT); - rela.r_addend = 0; - bfd_elf32_swap_reloca_out (output_bfd, &rela, - ((Elf32_External_Rela *) srela->contents - + plt_index )); + htab->splt->contents + h->plt.offset + 28); /* Fill in the entry in the global offset table. Points to instruction after GOT offset. */ bfd_put_32 (output_bfd, - (splt->output_section->vma - + splt->output_offset + (htab->splt->output_section->vma + + htab->splt->output_offset + h->plt.offset + 12), - sgot->contents + got_offset); + htab->sgotplt->contents + got_offset); + /* Fill in the entry in the .rela.plt section. */ + rela.r_offset = (htab->sgotplt->output_section->vma + + htab->sgotplt->output_offset + + got_offset); + rela.r_info = ELF32_R_INFO (h->dynindx, R_390_JMP_SLOT); + rela.r_addend = 0; + loc = (Elf32_External_Rela *) htab->srelplt->contents + plt_index; + bfd_elf32_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 (h->got.offset != (bfd_vma) -1) { - asection *sgot; - asection *srela; Elf_Internal_Rela rela; + Elf32_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 @@ -1936,55 +2185,52 @@ elf_s390_finish_dynamic_symbol (output_b 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))) - { - rela.r_info = ELF32_R_INFO (0, R_390_RELATIVE); - rela.r_addend = (h->root.u.def.value + 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 = ELF32_R_INFO (0, R_390_RELATIVE); + rela.r_addend = (h->root.u.def.value + h->root.u.def.section->output_section->vma + h->root.u.def.section->output_offset); } else { BFD_ASSERT((h->got.offset & 1) == 0); - bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset); + bfd_put_32 (output_bfd, (bfd_vma) 0, htab->sgot->contents + h->got.offset); rela.r_info = ELF32_R_INFO (h->dynindx, R_390_GLOB_DAT); rela.r_addend = 0; } - bfd_elf32_swap_reloca_out (output_bfd, &rela, - ((Elf32_External_Rela *) srela->contents - + srela->reloc_count)); - ++srela->reloc_count; + loc = (Elf32_External_Rela *) htab->srelgot->contents; + loc += htab->srelgot->reloc_count++; + bfd_elf32_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; + Elf32_External_Rela *loc; /* This symbols 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 = ELF32_R_INFO (h->dynindx, R_390_COPY); rela.r_addend = 0; - bfd_elf32_swap_reloca_out (output_bfd, &rela, - ((Elf32_External_Rela *) s->contents - + s->reloc_count)); - ++s->reloc_count; + loc = (Elf32_External_Rela *) htab->srelbss->contents; + loc += htab->srelbss->reloc_count++; + bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); } /* Mark some specially defined symbols as absolute. */ @@ -1996,6 +2242,26 @@ elf_s390_finish_dynamic_symbol (output_b 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 +elf_s390_reloc_type_class (rela) + const Elf_Internal_Rela *rela; +{ + switch ((int) ELF32_R_TYPE (rela->r_info)) + { + case R_390_RELATIVE: + return reloc_class_relative; + case R_390_JMP_SLOT: + return reloc_class_plt; + case R_390_COPY: + return reloc_class_copy; + default: + return reloc_class_normal; + } +} + /* Finish up the dynamic sections. */ static boolean @@ -2003,29 +2269,26 @@ elf_s390_finish_dynamic_sections (output bfd *output_bfd; struct bfd_link_info *info; { + struct elf_s390_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 = elf_s390_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; Elf32_External_Dyn *dyncon, *dynconend; - BFD_ASSERT (sdyn != NULL); + if (sdyn == NULL || htab->sgot == NULL) + abort (); dyncon = (Elf32_External_Dyn *) sdyn->contents; dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size); for (; dyncon < dynconend; dyncon++) { Elf_Internal_Dyn dyn; - const char *name; asection *s; bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn); @@ -2033,92 +2296,88 @@ elf_s390_finish_dynamic_sections (output switch (dyn.d_tag) { default: - break; + 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"; - get_vma: - s = bfd_get_section_by_name(output_bfd, name); - BFD_ASSERT (s != NULL); - dyn.d_un.d_ptr = s->vma; - bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); + dyn.d_un.d_ptr = htab->srelplt->output_section->vma; break; case DT_PLTRELSZ: - s = bfd_get_section_by_name (output_bfd, ".rela.plt"); - BFD_ASSERT (s != NULL); + 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; - bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); break; } + + bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); } /* Fill in the special first entry in the procedure linkage table. */ - splt = bfd_get_section_by_name (dynobj, ".plt"); - if (splt && splt->_raw_size > 0) + if (htab->splt && htab->splt->_raw_size > 0) { - memset (splt->contents, 0, PLT_FIRST_ENTRY_SIZE); + memset (htab->splt->contents, 0, PLT_FIRST_ENTRY_SIZE); if (info->shared) - { + { bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_FIRST_ENTRY_WORD0, - splt->contents ); + htab->splt->contents ); bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_FIRST_ENTRY_WORD1, - splt->contents + 4 ); + htab->splt->contents +4 ); bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_FIRST_ENTRY_WORD2, - splt->contents + 8 ); + htab->splt->contents +8 ); bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_FIRST_ENTRY_WORD3, - splt->contents + 12 ); + htab->splt->contents +12 ); bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_FIRST_ENTRY_WORD4, - splt->contents + 16 ); + htab->splt->contents +16 ); } else { - bfd_put_32 (output_bfd, (bfd_vma) PLT_FIRST_ENTRY_WORD0, - splt->contents ); + bfd_put_32 (output_bfd, (bfd_vma)PLT_FIRST_ENTRY_WORD0, + htab->splt->contents ); bfd_put_32 (output_bfd, (bfd_vma) PLT_FIRST_ENTRY_WORD1, - splt->contents + 4 ); + htab->splt->contents +4 ); bfd_put_32 (output_bfd, (bfd_vma) PLT_FIRST_ENTRY_WORD2, - splt->contents + 8 ); + htab->splt->contents +8 ); bfd_put_32 (output_bfd, (bfd_vma) PLT_FIRST_ENTRY_WORD3, - splt->contents + 12 ); + htab->splt->contents +12 ); bfd_put_32 (output_bfd, (bfd_vma) PLT_FIRST_ENTRY_WORD4, - splt->contents + 16 ); + htab->splt->contents +16 ); bfd_put_32 (output_bfd, (bfd_vma) PLT_FIRST_ENTRY_WORD5, - splt->contents + 20 ); + htab->splt->contents +20 ); bfd_put_32 (output_bfd, - sgot->output_section->vma + sgot->output_offset, - splt->contents + 24); + htab->sgotplt->output_section->vma + + htab->sgotplt->output_offset, + htab->splt->contents + 24); } - elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4; + elf_section_data (htab->splt->output_section) + ->this_hdr.sh_entsize = 4; } } - /* 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_32 (output_bfd, (bfd_vma) 0, sgot->contents); - else - bfd_put_32 (output_bfd, - sdyn->output_section->vma + sdyn->output_offset, - sgot->contents); + /* Fill in the first three entries in the global offset table. */ + if (htab->sgotplt->_raw_size > 0) + { + bfd_put_32 (output_bfd, + (sdyn == NULL ? (bfd_vma) 0 + : sdyn->output_section->vma + sdyn->output_offset), + htab->sgotplt->contents); + /* One entry for shared object struct ptr. */ + bfd_put_32 (output_bfd, (bfd_vma) 0, htab->sgotplt->contents + 4); + /* One entry for _dl_runtime_resolve. */ + bfd_put_32 (output_bfd, (bfd_vma) 0, htab->sgotplt->contents + 8); + } - /* One entry for shared object struct ptr. */ - bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 4); - /* One entry for _dl_runtime_resolve. */ - bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 8); + elf_section_data (htab->sgotplt->output_section) + ->this_hdr.sh_entsize = 4; } - - elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4; - return true; } @@ -2129,23 +2388,6 @@ elf_s390_object_p (abfd) return bfd_default_set_arch_mach (abfd, bfd_arch_s390, bfd_mach_s390_esa); } -static enum elf_reloc_type_class -elf_s390_reloc_type_class (rela) - const Elf_Internal_Rela *rela; -{ - switch ((int) ELF32_R_TYPE (rela->r_info)) - { - case R_390_RELATIVE: - return reloc_class_relative; - case R_390_JMP_SLOT: - return reloc_class_plt; - case R_390_COPY: - return reloc_class_copy; - default: - return reloc_class_normal; - } -} - #define TARGET_BIG_SYM bfd_elf32_s390_vec #define TARGET_BIG_NAME "elf32-s390" #define ELF_ARCH bfd_arch_s390 @@ -2163,18 +2405,19 @@ elf_s390_reloc_type_class (rela) #define elf_info_to_howto elf_s390_info_to_howto -#define bfd_elf32_bfd_final_link _bfd_elf32_gc_common_final_link #define bfd_elf32_bfd_is_local_label_name elf_s390_is_local_label_name #define bfd_elf32_bfd_link_hash_table_create elf_s390_link_hash_table_create #define bfd_elf32_bfd_reloc_type_lookup elf_s390_reloc_type_lookup #define elf_backend_adjust_dynamic_symbol elf_s390_adjust_dynamic_symbol #define elf_backend_check_relocs elf_s390_check_relocs -#define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections +#define elf_backend_copy_indirect_symbol elf_s390_copy_indirect_symbol +#define elf_backend_create_dynamic_sections elf_s390_create_dynamic_sections #define elf_backend_finish_dynamic_sections elf_s390_finish_dynamic_sections #define elf_backend_finish_dynamic_symbol elf_s390_finish_dynamic_symbol #define elf_backend_gc_mark_hook elf_s390_gc_mark_hook #define elf_backend_gc_sweep_hook elf_s390_gc_sweep_hook +#define elf_backend_reloc_type_class elf_s390_reloc_type_class #define elf_backend_relocate_section elf_s390_relocate_section #define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections #define elf_backend_reloc_type_class elf_s390_reloc_type_class diff -uprN binutils-2.11.92.0.10/bfd/elf32-sh.c binutils-2.11.92.0.12/bfd/elf32-sh.c --- binutils-2.11.92.0.10/bfd/elf32-sh.c Fri Oct 19 23:57:48 2001 +++ binutils-2.11.92.0.12/bfd/elf32-sh.c Fri Nov 16 14:05:51 2001 @@ -3216,6 +3216,7 @@ sh_elf_relocate_section (output_bfd, inf case R_SH_DIR32: case R_SH_REL32: if (info->shared + && r_symndx != 0 && (input_section->flags & SEC_ALLOC) != 0 && (r_type != R_SH_REL32 || (h != NULL diff -uprN binutils-2.11.92.0.10/bfd/elf32-sparc.c binutils-2.11.92.0.12/bfd/elf32-sparc.c --- binutils-2.11.92.0.10/bfd/elf32-sparc.c Mon Oct 1 15:25:21 2001 +++ binutils-2.11.92.0.12/bfd/elf32-sparc.c Fri Nov 16 14:05:51 2001 @@ -1409,7 +1409,9 @@ elf32_sparc_relocate_section (output_bfd case R_SPARC_LO10: case R_SPARC_UA16: case R_SPARC_UA32: - if (info->shared && (input_section->flags & SEC_ALLOC)) + if (info->shared + && r_symndx != 0 + && (input_section->flags & SEC_ALLOC)) { Elf_Internal_Rela outrel; boolean skip; diff -uprN binutils-2.11.92.0.10/bfd/elf64-alpha.c binutils-2.11.92.0.12/bfd/elf64-alpha.c --- binutils-2.11.92.0.10/bfd/elf64-alpha.c Fri Oct 19 23:57:48 2001 +++ binutils-2.11.92.0.12/bfd/elf64-alpha.c Fri Nov 16 14:05:51 2001 @@ -3516,7 +3516,9 @@ elf64_alpha_relocate_section (output_bfd outrel.r_addend = addend; addend = 0, relocation = 0; } - else if (info->shared && (input_section->flags & SEC_ALLOC)) + else if (info->shared + && r_symndx != 0 + && (input_section->flags & SEC_ALLOC)) { outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE); outrel.r_addend = relocation + addend; diff -uprN binutils-2.11.92.0.10/bfd/elf64-mmix.c binutils-2.11.92.0.12/bfd/elf64-mmix.c --- binutils-2.11.92.0.10/bfd/elf64-mmix.c Wed Dec 31 16:00:00 1969 +++ binutils-2.11.92.0.12/bfd/elf64-mmix.c Fri Nov 16 14:05:51 2001 @@ -0,0 +1,1739 @@ +/* MMIX-specific support for 64-bit ELF. + Copyright (C) 2001 Free Software Foundation, Inc. + Contributed by Hans-Peter Nilsson + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* No specific ABI or "processor-specific supplement" defined. */ + +/* TODO: + - Linker relaxation. + - On-demand register allocation (from R_MMIX_BASE_PLUS_OFFSET). */ + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" +#include "elf-bfd.h" +#include "elf/mmix.h" +#include "opcode/mmix.h" + +#define MINUS_ONE (((bfd_vma) 0) - 1) + +/* Put these everywhere in new code. */ +#define FATAL_DEBUG \ + _bfd_abort (__FILE__, __LINE__, \ + "Internal: Non-debugged code (test-case missing)") + +#define BAD_CASE(x) \ + _bfd_abort (__FILE__, __LINE__, \ + "bad case for " #x) + +static boolean mmix_elf_link_output_symbol_hook + PARAMS ((bfd *, struct bfd_link_info *, const char *, + Elf_Internal_Sym *, asection *)); + +static bfd_reloc_status_type mmix_elf_reloc + PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); + +static reloc_howto_type *bfd_elf64_bfd_reloc_type_lookup + PARAMS ((bfd *, bfd_reloc_code_real_type)); + +static void mmix_info_to_howto_rela + PARAMS ((bfd *, arelent *, Elf64_Internal_Rela *)); + +static int mmix_elf_sort_relocs PARAMS ((const PTR, const PTR)); + +static boolean mmix_elf_check_relocs + PARAMS ((bfd *, struct bfd_link_info *, asection *, + const Elf_Internal_Rela *)); + +static boolean mmix_elf_relocate_section + PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, + Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); + +static asection * mmix_elf_gc_mark_hook + PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, + struct elf_link_hash_entry *, Elf_Internal_Sym *)); + +static bfd_reloc_status_type mmix_final_link_relocate + PARAMS ((reloc_howto_type *, asection *, bfd_byte *, + bfd_vma, bfd_signed_vma, bfd_vma, const char *, asection *)); + +static bfd_reloc_status_type mmix_elf_perform_relocation + PARAMS ((asection *, reloc_howto_type *, PTR, bfd_vma, bfd_vma)); + +static boolean mmix_elf_section_from_bfd_section + PARAMS ((bfd *, Elf64_Internal_Shdr *, asection *, int *)); + +static boolean mmix_elf_add_symbol_hook + PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *, + const char **, flagword *, asection **, bfd_vma *)); + +static boolean mmix_elf_is_local_label_name + PARAMS ((bfd *, const char *)); + +extern boolean mmix_elf_final_link PARAMS ((bfd *, struct bfd_link_info *)); + +extern void mmix_elf_symbol_processing PARAMS ((bfd *, asymbol *)); + +/* Watch out: this currently needs to have elements with the same index as + their R_MMIX_ number. */ +static reloc_howto_type elf_mmix_howto_table[] = + { + /* This reloc does nothing. */ + HOWTO (R_MMIX_NONE, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_MMIX_NONE", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + false), /* pcrel_offset */ + + /* An 8 bit absolute relocation. */ + HOWTO (R_MMIX_8, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_MMIX_8", /* name */ + false, /* partial_inplace */ + 0xff, /* src_mask */ + 0xff, /* dst_mask */ + false), /* pcrel_offset */ + + /* An 16 bit absolute relocation. */ + HOWTO (R_MMIX_16, /* type */ + 0, /* rightshift */ + 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_MMIX_16", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* An 24 bit absolute relocation. */ + HOWTO (R_MMIX_24, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 24, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_MMIX_24", /* name */ + false, /* partial_inplace */ + 0xffffff, /* src_mask */ + 0xffffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A 32 bit absolute relocation. */ + HOWTO (R_MMIX_32, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_MMIX_32", /* name */ + false, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* 64 bit relocation. */ + HOWTO (R_MMIX_64, /* type */ + 0, /* rightshift */ + 4, /* size (0 = byte, 1 = short, 2 = long) */ + 64, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_MMIX_64", /* name */ + false, /* partial_inplace */ + MINUS_ONE, /* src_mask */ + MINUS_ONE, /* dst_mask */ + false), /* pcrel_offset */ + + /* An 8 bit PC-relative relocation. */ + HOWTO (R_MMIX_PC_8, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_MMIX_PC_8", /* name */ + false, /* partial_inplace */ + 0xff, /* src_mask */ + 0xff, /* dst_mask */ + true), /* pcrel_offset */ + + /* An 16 bit PC-relative relocation. */ + HOWTO (R_MMIX_PC_16, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_MMIX_PC_16", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* An 24 bit PC-relative relocation. */ + HOWTO (R_MMIX_PC_24, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 24, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_MMIX_PC_24", /* name */ + false, /* partial_inplace */ + 0xffffff, /* src_mask */ + 0xffffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* A 32 bit absolute PC-relative relocation. */ + HOWTO (R_MMIX_PC_32, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_MMIX_PC_32", /* name */ + false, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* 64 bit PC-relative relocation. */ + HOWTO (R_MMIX_PC_64, /* type */ + 0, /* rightshift */ + 4, /* size (0 = byte, 1 = short, 2 = long) */ + 64, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_MMIX_PC_64", /* name */ + false, /* partial_inplace */ + MINUS_ONE, /* src_mask */ + MINUS_ONE, /* dst_mask */ + true), /* pcrel_offset */ + + /* GNU extension to record C++ vtable hierarchy. */ + HOWTO (R_MMIX_GNU_VTINHERIT, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + NULL, /* special_function */ + "R_MMIX_GNU_VTINHERIT", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + true), /* pcrel_offset */ + + /* GNU extension to record C++ vtable member usage. */ + HOWTO (R_MMIX_GNU_VTENTRY, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + _bfd_elf_rel_vtable_reloc_fn, /* special_function */ + "R_MMIX_GNU_VTENTRY", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + false), /* pcrel_offset */ + + /* The GETA relocation is supposed to get any address that could + possibly be reached by the GETA instruction. It can silently expand + to get a 64-bit operand, but will complain if any of the two least + significant bits are set. The howto members reflect a simple GETA. */ + HOWTO (R_MMIX_GETA, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 19, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_GETA", /* name */ + false, /* partial_inplace */ + 0x0100ffff, /* src_mask */ + 0x0100ffff, /* dst_mask */ + true), /* pcrel_offset */ + + HOWTO (R_MMIX_GETA_1, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 19, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_GETA_1", /* name */ + false, /* partial_inplace */ + 0x0100ffff, /* src_mask */ + 0x0100ffff, /* dst_mask */ + true), /* pcrel_offset */ + + HOWTO (R_MMIX_GETA_2, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 19, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_GETA_2", /* name */ + false, /* partial_inplace */ + 0x0100ffff, /* src_mask */ + 0x0100ffff, /* dst_mask */ + true), /* pcrel_offset */ + + HOWTO (R_MMIX_GETA_3, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 19, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_GETA_3", /* name */ + false, /* partial_inplace */ + 0x0100ffff, /* src_mask */ + 0x0100ffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* The conditional branches are supposed to reach any (code) address. + It can silently expand to a 64-bit operand, but will emit an error if + any of the two least significant bits are set. The howto members + reflect a simple branch. */ + HOWTO (R_MMIX_CBRANCH, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 19, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_CBRANCH", /* name */ + false, /* partial_inplace */ + 0x0100ffff, /* src_mask */ + 0x0100ffff, /* dst_mask */ + true), /* pcrel_offset */ + + HOWTO (R_MMIX_CBRANCH_J, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 19, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_CBRANCH_J", /* name */ + false, /* partial_inplace */ + 0x0100ffff, /* src_mask */ + 0x0100ffff, /* dst_mask */ + true), /* pcrel_offset */ + + HOWTO (R_MMIX_CBRANCH_1, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 19, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_CBRANCH_1", /* name */ + false, /* partial_inplace */ + 0x0100ffff, /* src_mask */ + 0x0100ffff, /* dst_mask */ + true), /* pcrel_offset */ + + HOWTO (R_MMIX_CBRANCH_2, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 19, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_CBRANCH_2", /* name */ + false, /* partial_inplace */ + 0x0100ffff, /* src_mask */ + 0x0100ffff, /* dst_mask */ + true), /* pcrel_offset */ + + HOWTO (R_MMIX_CBRANCH_3, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 19, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_CBRANCH_3", /* name */ + false, /* partial_inplace */ + 0x0100ffff, /* src_mask */ + 0x0100ffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* The PUSHJ instruction can reach any (code) address, as long as it's + the beginning of a function (no usable restriction). It can silently + expand to a 64-bit operand, but will emit an error if any of the two + least significant bits are set. The howto members reflect a simple + PUSHJ. */ + HOWTO (R_MMIX_PUSHJ, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 19, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_PUSHJ", /* name */ + false, /* partial_inplace */ + 0x0100ffff, /* src_mask */ + 0x0100ffff, /* dst_mask */ + true), /* pcrel_offset */ + + HOWTO (R_MMIX_PUSHJ_1, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 19, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_PUSHJ_1", /* name */ + false, /* partial_inplace */ + 0x0100ffff, /* src_mask */ + 0x0100ffff, /* dst_mask */ + true), /* pcrel_offset */ + + HOWTO (R_MMIX_PUSHJ_2, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 19, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_PUSHJ_2", /* name */ + false, /* partial_inplace */ + 0x0100ffff, /* src_mask */ + 0x0100ffff, /* dst_mask */ + true), /* pcrel_offset */ + + HOWTO (R_MMIX_PUSHJ_3, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 19, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_PUSHJ_3", /* name */ + false, /* partial_inplace */ + 0x0100ffff, /* src_mask */ + 0x0100ffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* A JMP is supposed to reach any (code) address. By itself, it can + reach +-64M; the expansion can reach all 64 bits. Note that the 64M + limit is soon reached if you link the program in wildly different + memory segments. The howto members reflect a trivial JMP. */ + HOWTO (R_MMIX_JMP, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 27, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_JMP", /* name */ + false, /* partial_inplace */ + 0x1ffffff, /* src_mask */ + 0x1ffffff, /* dst_mask */ + true), /* pcrel_offset */ + + HOWTO (R_MMIX_JMP_1, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 27, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_JMP_1", /* name */ + false, /* partial_inplace */ + 0x1ffffff, /* src_mask */ + 0x1ffffff, /* dst_mask */ + true), /* pcrel_offset */ + + HOWTO (R_MMIX_JMP_2, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 27, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_JMP_2", /* name */ + false, /* partial_inplace */ + 0x1ffffff, /* src_mask */ + 0x1ffffff, /* dst_mask */ + true), /* pcrel_offset */ + + HOWTO (R_MMIX_JMP_3, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 27, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_JMP_3", /* name */ + false, /* partial_inplace */ + 0x1ffffff, /* src_mask */ + 0x1ffffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* When we don't emit link-time-relaxable code from the assembler, or + when relaxation has done all it can do, these relocs are used. For + GETA/PUSHJ/branches. */ + HOWTO (R_MMIX_ADDR19, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 19, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_ADDR19", /* name */ + false, /* partial_inplace */ + 0x0100ffff, /* src_mask */ + 0x0100ffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* For JMP. */ + HOWTO (R_MMIX_ADDR27, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 27, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_ADDR27", /* name */ + false, /* partial_inplace */ + 0x1ffffff, /* src_mask */ + 0x1ffffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* A general register or the value 0..255. If a value, then the + instruction (offset -3) needs adjusting. */ + HOWTO (R_MMIX_REG_OR_BYTE, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_REG_OR_BYTE", /* name */ + false, /* partial_inplace */ + 0xff, /* src_mask */ + 0xff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A general register. */ + HOWTO (R_MMIX_REG, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_REG", /* name */ + false, /* partial_inplace */ + 0xff, /* src_mask */ + 0xff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A register plus an index, corresponding to the relocation expression. + The sizes must correspond to the valid range of the expression, while + the bitmasks correspond to what we store in the image. */ + HOWTO (R_MMIX_BASE_PLUS_OFFSET, /* type */ + 0, /* rightshift */ + 4, /* size (0 = byte, 1 = short, 2 = long) */ + 64, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_BASE_PLUS_OFFSET", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A "magic" relocation for a LOCAL expression, asserting that the + expression is less than the number of global registers. No actual + modification of the contents is done. Implementing this as a + relocation was less intrusive than e.g. putting such expressions in a + section to discard *after* relocation. */ + HOWTO (R_MMIX_LOCAL, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + mmix_elf_reloc, /* special_function */ + "R_MMIX_LOCAL", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + false), /* pcrel_offset */ + }; + + +/* Map BFD reloc types to MMIX ELF reloc types. */ + +struct mmix_reloc_map + { + bfd_reloc_code_real_type bfd_reloc_val; + enum elf_mmix_reloc_type elf_reloc_val; + }; + + +static const struct mmix_reloc_map mmix_reloc_map[] = + { + {BFD_RELOC_NONE, R_MMIX_NONE}, + {BFD_RELOC_8, R_MMIX_8}, + {BFD_RELOC_16, R_MMIX_16}, + {BFD_RELOC_24, R_MMIX_24}, + {BFD_RELOC_32, R_MMIX_32}, + {BFD_RELOC_64, R_MMIX_64}, + {BFD_RELOC_8_PCREL, R_MMIX_PC_8}, + {BFD_RELOC_16_PCREL, R_MMIX_PC_16}, + {BFD_RELOC_24_PCREL, R_MMIX_PC_24}, + {BFD_RELOC_32_PCREL, R_MMIX_PC_32}, + {BFD_RELOC_64_PCREL, R_MMIX_PC_64}, + {BFD_RELOC_VTABLE_INHERIT, R_MMIX_GNU_VTINHERIT}, + {BFD_RELOC_VTABLE_ENTRY, R_MMIX_GNU_VTENTRY}, + {BFD_RELOC_MMIX_GETA, R_MMIX_GETA}, + {BFD_RELOC_MMIX_CBRANCH, R_MMIX_CBRANCH}, + {BFD_RELOC_MMIX_PUSHJ, R_MMIX_PUSHJ}, + {BFD_RELOC_MMIX_JMP, R_MMIX_JMP}, + {BFD_RELOC_MMIX_ADDR19, R_MMIX_ADDR19}, + {BFD_RELOC_MMIX_ADDR27, R_MMIX_ADDR27}, + {BFD_RELOC_MMIX_REG_OR_BYTE, R_MMIX_REG_OR_BYTE}, + {BFD_RELOC_MMIX_REG, R_MMIX_REG}, + {BFD_RELOC_MMIX_BASE_PLUS_OFFSET, R_MMIX_BASE_PLUS_OFFSET}, + {BFD_RELOC_MMIX_LOCAL, R_MMIX_LOCAL} + }; + +static reloc_howto_type * +bfd_elf64_bfd_reloc_type_lookup (abfd, code) + bfd *abfd ATTRIBUTE_UNUSED; + bfd_reloc_code_real_type code; +{ + unsigned int i; + + for (i = 0; + i < sizeof (mmix_reloc_map) / sizeof (mmix_reloc_map[0]); + i++) + { + if (mmix_reloc_map[i].bfd_reloc_val == code) + return &elf_mmix_howto_table[mmix_reloc_map[i].elf_reloc_val]; + } + + return NULL; +} + + +/* This function performs the actual bitfiddling and sanity check for a + final relocation. Each relocation gets its *worst*-case expansion + in size when it arrives here; any reduction in size should have been + caught in linker relaxation earlier. When we get here, the relocation + looks like the smallest instruction with SWYM:s (nop:s) appended to the + max size. We fill in those nop:s. + + R_MMIX_GETA: (FIXME: Relaxation should break this up in 1, 2, 3 tetra) + GETA $N,foo + -> + SETL $N,foo & 0xffff + INCML $N,(foo >> 16) & 0xffff + INCMH $N,(foo >> 32) & 0xffff + INCH $N,(foo >> 48) & 0xffff + + R_MMIX_CBRANCH: (FIXME: Relaxation should break this up, but + condbranches needing relaxation might be rare enough to not be + worthwhile.) + [P]Bcc $N,foo + -> + [~P]B~cc $N,.+20 + SETL $255,foo & ... + INCML ... + INCMH ... + INCH ... + GO $255,$255,0 + + R_MMIX_PUSHJ: (FIXME: Relaxation...) + PUSHJ $N,foo + -> + SETL $255,foo & ... + INCML ... + INCMH ... + INCH ... + PUSHGO $N,$255,0 + + R_MMIX_JMP: (FIXME: Relaxation...) + JMP foo + -> + SETL $255,foo & ... + INCML ... + INCMH ... + INCH ... + GO $255,$255,0 + + R_MMIX_ADDR19 and R_MMIX_ADDR27 are just filled in. */ + +static bfd_reloc_status_type +mmix_elf_perform_relocation (isec, howto, datap, addr, value) + asection *isec; + reloc_howto_type *howto; + PTR datap; + bfd_vma addr ATTRIBUTE_UNUSED; + bfd_vma value; +{ + bfd *abfd = isec->owner; + bfd_reloc_status_type flag = bfd_reloc_ok; + bfd_reloc_status_type r; + int offs = 0; + int reg = 255; + + /* The worst case bits are all similar SETL/INCML/INCMH/INCH sequences. + We handle the differences here and the common sequence later. */ + switch (howto->type) + { + case R_MMIX_GETA: + offs = 0; + reg = bfd_get_8 (abfd, (bfd_byte *) datap + 1); + + /* We change to an absolute value. */ + value += addr; + break; + + case R_MMIX_CBRANCH: + { + int in1 = bfd_get_16 (abfd, (bfd_byte *) datap) << 16; + + /* Invert the condition and prediction bit, and set the offset + to five instructions ahead. + + We *can* do better if we want to. If the branch is found to be + within limits, we could leave the branch as is; there'll just + be a bunch of NOP:s after it. But we shouldn't see this + sequence often enough that it's worth doing it. */ + + bfd_put_32 (abfd, + (((in1 ^ ((PRED_INV_BIT | COND_INV_BIT) << 24)) & ~0xffff) + | (24/4)), + (bfd_byte *) datap); + + /* Put a "GO $255,$255,0" after the common sequence. */ + bfd_put_32 (abfd, + ((GO_INSN_BYTE | IMM_OFFSET_BIT) << 24) | 0xffff00, + (bfd_byte *) datap + 20); + + /* Common sequence starts at offset 4. */ + offs = 4; + + /* We change to an absolute value. */ + value += addr; + } + break; + + case R_MMIX_PUSHJ: + { + int inreg = bfd_get_8 (abfd, (bfd_byte *) datap + 1); + + /* Put a "PUSHGO $N,$255,0" after the common sequence. */ + bfd_put_32 (abfd, + ((PUSHGO_INSN_BYTE | IMM_OFFSET_BIT) << 24) + | (inreg << 16) + | 0xff00, + (bfd_byte *) datap + 16); + + /* We change to an absolute value. */ + value += addr; + } + break; + + case R_MMIX_JMP: + /* This one is a little special. If we get here on a non-relaxing + link, and the destination is actually in range, we don't need to + execute the nops. + If so, we fall through to the bit-fiddling relocs. + + FIXME: bfd_check_overflow seems broken; the relocation is + rightshifted before testing, so supply a zero rightshift. */ + + if (! ((value & 3) == 0 + && (r = bfd_check_overflow (complain_overflow_signed, + howto->bitsize, + 0, + bfd_arch_bits_per_address (abfd), + value)) == bfd_reloc_ok)) + { + /* If the relocation doesn't fit in a JMP, we let the NOP:s be + modified below, and put a "GO $255,$255,0" after the + address-loading sequence. */ + bfd_put_32 (abfd, + ((GO_INSN_BYTE | IMM_OFFSET_BIT) << 24) + | 0xffff00, + (bfd_byte *) datap + 16); + + /* We change to an absolute value. */ + value += addr; + break; + } + /* FALLTHROUGH. */ + case R_MMIX_ADDR19: + case R_MMIX_ADDR27: + /* These must be in range, or else we emit an error. */ + if ((value & 3) == 0 + /* Note rightshift 0; see above. */ + && (r = bfd_check_overflow (complain_overflow_signed, + howto->bitsize, + 0, + bfd_arch_bits_per_address (abfd), + value)) == bfd_reloc_ok) + { + bfd_vma in1 + = bfd_get_32 (abfd, (bfd_byte *) datap); + bfd_vma highbit; + + if ((bfd_signed_vma) value < 0) + { + highbit = (1 << 24); + value += (1 << (howto->bitsize - 1)); + } + else + highbit = 0; + + value >>= 2; + + bfd_put_32 (abfd, + (in1 & ~howto->src_mask) + | highbit + | (value & howto->dst_mask), + (bfd_byte *) datap); + + return bfd_reloc_ok; + } + else + return bfd_reloc_overflow; + + case R_MMIX_REG_OR_BYTE: + case R_MMIX_REG: + if (value > 255) + return bfd_reloc_overflow; + bfd_put_8 (abfd, value, datap); + return bfd_reloc_ok; + + default: + BAD_CASE (howto->type); + } + + /* This code adds the common SETL/INCML/INCMH/INCH worst-case + sequence. */ + + /* Lowest two bits must be 0. We return bfd_reloc_overflow for + everything that looks strange. */ + if (value & 3) + flag = bfd_reloc_overflow; + + bfd_put_32 (abfd, + (SETL_INSN_BYTE << 24) | (value & 0xffff) | (reg << 16), + (bfd_byte *) datap + offs); + bfd_put_32 (abfd, + (INCML_INSN_BYTE << 24) | ((value >> 16) & 0xffff) | (reg << 16), + (bfd_byte *) datap + offs + 4); + bfd_put_32 (abfd, + (INCMH_INSN_BYTE << 24) | ((value >> 32) & 0xffff) | (reg << 16), + (bfd_byte *) datap + offs + 8); + bfd_put_32 (abfd, + (INCH_INSN_BYTE << 24) | ((value >> 48) & 0xffff) | (reg << 16), + (bfd_byte *) datap + offs + 12); + + return flag; +} + +/* Set the howto pointer for an MMIX ELF reloc (type RELA). */ + +static void +mmix_info_to_howto_rela (abfd, cache_ptr, dst) + bfd *abfd ATTRIBUTE_UNUSED; + arelent *cache_ptr; + Elf64_Internal_Rela *dst; +{ + unsigned int r_type; + + r_type = ELF64_R_TYPE (dst->r_info); + BFD_ASSERT (r_type < (unsigned int) R_MMIX_max); + cache_ptr->howto = &elf_mmix_howto_table[r_type]; +} + +/* Any MMIX-specific relocation gets here at assembly time or when linking + to other formats (such as mmo); this is the relocation function from + the reloc_table. We don't get here for final pure ELF linking. */ + +static bfd_reloc_status_type +mmix_elf_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 ATTRIBUTE_UNUSED; +{ + bfd_vma relocation; + bfd_reloc_status_type r; + asection *reloc_target_output_section; + bfd_reloc_status_type flag = bfd_reloc_ok; + bfd_vma output_base = 0; + bfd_vma addr; + + r = bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message); + + /* If that was all that was needed (i.e. this isn't a final link, only + some segment adjustments), we're done. */ + if (r != bfd_reloc_continue) + return r; + + if (bfd_is_und_section (symbol->section) + && (symbol->flags & BSF_WEAK) == 0 + && output_bfd == (bfd *) NULL) + return bfd_reloc_undefined; + + /* Is the address of the relocation really within the section? */ + if (reloc_entry->address > input_section->_cooked_size) + return bfd_reloc_outofrange; + + /* Work out which section the relocation is targetted at and the + initial relocation command value. */ + + /* Get symbol value. (Common symbols are special.) */ + if (bfd_is_com_section (symbol->section)) + relocation = 0; + else + relocation = symbol->value; + + reloc_target_output_section = bfd_get_output_section (symbol); + + /* Here the variable relocation holds the final address of the symbol we + are relocating against, plus any addend. */ + if (output_bfd) + output_base = 0; + else + output_base = reloc_target_output_section->vma; + + relocation += output_base + symbol->section->output_offset; + + /* Get position of relocation. */ + addr = (reloc_entry->address + input_section->output_section->vma + + input_section->output_offset); + if (output_bfd != (bfd *) NULL) + { + /* Add in supplied addend. */ + relocation += reloc_entry->addend; + + /* This is a partial relocation, and we want to apply the + relocation to the reloc entry rather than the raw data. + Modify the reloc inplace to reflect what we now know. */ + reloc_entry->addend = relocation; + reloc_entry->address += input_section->output_offset; + return flag; + } + + return mmix_final_link_relocate (reloc_entry->howto, input_section, + data, reloc_entry->address, + reloc_entry->addend, relocation, + bfd_asymbol_name (symbol), + reloc_target_output_section); +} + +/* Relocate an MMIX ELF section. Modified from elf32-fr30.c; look to it + for guidance if you're thinking of copying this. */ + +static boolean +mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section, + contents, relocs, local_syms, local_sections) + bfd *output_bfd ATTRIBUTE_UNUSED; + struct bfd_link_info *info; + bfd *input_bfd; + asection *input_section; + bfd_byte *contents; + Elf_Internal_Rela *relocs; + Elf_Internal_Sym *local_syms; + asection **local_sections; +{ + Elf_Internal_Shdr *symtab_hdr; + struct elf_link_hash_entry **sym_hashes; + Elf_Internal_Rela *rel; + Elf_Internal_Rela *relend; + + symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; + sym_hashes = elf_sym_hashes (input_bfd); + relend = relocs + input_section->reloc_count; + + for (rel = relocs; rel < relend; rel ++) + { + reloc_howto_type *howto; + unsigned long r_symndx; + Elf_Internal_Sym *sym; + asection *sec; + struct elf_link_hash_entry *h; + bfd_vma relocation; + bfd_reloc_status_type r; + const char *name = NULL; + int r_type; + boolean undefined_signalled = false; + + r_type = ELF64_R_TYPE (rel->r_info); + + if (r_type == R_MMIX_GNU_VTINHERIT + || r_type == R_MMIX_GNU_VTENTRY) + continue; + + 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. */ + howto = elf_mmix_howto_table + ELF64_R_TYPE (rel->r_info); + h = NULL; + sym = NULL; + sec = NULL; + + if (r_symndx < symtab_hdr->sh_info) + { + sym = local_syms + r_symndx; + sec = local_sections [r_symndx]; + relocation = (sec->output_section->vma + + sec->output_offset + + sym->st_value); + + name = bfd_elf_string_from_elf_section + (input_bfd, symtab_hdr->sh_link, sym->st_name); + name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name; + } + else + { + h = sym_hashes [r_symndx - symtab_hdr->sh_info]; + + while (h->root.type == bfd_link_hash_indirect + || h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + + name = h->root.root.string; + + if (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + { + sec = h->root.u.def.section; + relocation = (h->root.u.def.value + + sec->output_section->vma + + sec->output_offset); + } + else if (h->root.type == bfd_link_hash_undefweak) + relocation = 0; + else if (info->shared + && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) + relocation = 0; + else + { + /* The test on undefined_signalled is redundant at the + moment, but kept for symmetry. */ + if (! undefined_signalled + && ! ((*info->callbacks->undefined_symbol) + (info, h->root.root.string, input_bfd, + input_section, rel->r_offset, true))) + return false; + undefined_signalled = true; + relocation = 0; + } + } + + r = mmix_final_link_relocate (howto, input_section, + contents, rel->r_offset, + rel->r_addend, relocation, name, sec); + + if (r != bfd_reloc_ok) + { + boolean check_ok = true; + const char * msg = (const char *) NULL; + + switch (r) + { + case bfd_reloc_overflow: + check_ok = info->callbacks->reloc_overflow + (info, name, howto->name, (bfd_vma) 0, + input_bfd, input_section, rel->r_offset); + break; + + case bfd_reloc_undefined: + /* We may have sent this message above. */ + if (! undefined_signalled) + check_ok = info->callbacks->undefined_symbol + (info, name, input_bfd, input_section, rel->r_offset, + true); + undefined_signalled = true; + break; + + case bfd_reloc_outofrange: + msg = _("internal error: out of range error"); + break; + + case bfd_reloc_notsupported: + msg = _("internal error: unsupported relocation error"); + break; + + case bfd_reloc_dangerous: + msg = _("internal error: dangerous relocation"); + break; + + default: + msg = _("internal error: unknown error"); + break; + } + + if (msg) + check_ok = info->callbacks->warning + (info, msg, name, input_bfd, input_section, rel->r_offset); + + if (! check_ok) + return false; + } + } + + return true; +} + +/* Perform a single relocation. By default we use the standard BFD + routines. A few relocs we have to do ourselves. */ + +static bfd_reloc_status_type +mmix_final_link_relocate (howto, input_section, contents, + r_offset, r_addend, relocation, symname, symsec) + reloc_howto_type *howto; + asection *input_section; + bfd_byte *contents; + bfd_vma r_offset; + bfd_signed_vma r_addend; + bfd_vma relocation; + const char *symname; + asection *symsec; +{ + bfd_reloc_status_type r = bfd_reloc_ok; + bfd_vma addr + = (input_section->output_section->vma + + input_section->output_offset + + r_offset); + bfd_signed_vma srel + = (bfd_signed_vma) relocation + r_addend; + + switch (howto->type) + { + /* All these are PC-relative. */ + case R_MMIX_PUSHJ: + case R_MMIX_CBRANCH: + case R_MMIX_ADDR19: + case R_MMIX_GETA: + case R_MMIX_ADDR27: + case R_MMIX_JMP: + contents += r_offset; + + srel -= (input_section->output_section->vma + + input_section->output_offset + + r_offset); + + r = mmix_elf_perform_relocation (input_section, howto, contents, + addr, srel); + break; + + case R_MMIX_REG_OR_BYTE: + case R_MMIX_REG: + /* For now, we handle these alike. They must refer to an register + symbol, which is either relative to the register section and in + the range 0..255, or is in the register contents section with vma + regno * 8. */ + + /* FIXME: A better way to check for reg contents section? + FIXME: Postpone section->scaling to mmix_elf_perform_relocation? */ + if (symsec == NULL) + return bfd_reloc_undefined; + + if (strcmp (bfd_get_section_name (symsec->owner, symsec), + MMIX_REG_CONTENTS_SECTION_NAME) == 0) + { + if ((srel & 7) != 0 || srel < 32*8 || srel > 255*8) + { + /* The bfd_reloc_outofrange return value, though intuitively + a better value, will not get us an error. */ + return bfd_reloc_overflow; + } + srel /= 8; + } + else if (strcmp (bfd_get_section_name (symsec->owner, symsec), + MMIX_REG_SECTION_NAME) == 0) + { + if (srel < 0 || srel > 255) + /* The bfd_reloc_outofrange return value, though intuitively a + better value, will not get us an error. */ + return bfd_reloc_overflow; + } + else + { + (*_bfd_error_handler) + (_("%s: register relocation against non-register symbol: %s in %s"), + bfd_get_filename (input_section->owner), + symname == NULL || *symname == 0 ? _("(unknown)") : symname, + bfd_get_section_name (symsec->owner, symsec)); + + /* The bfd_reloc_outofrange return value, though intuitively a + better value, will not get us an error. */ + return bfd_reloc_overflow; + } + contents += r_offset; + r = mmix_elf_perform_relocation (input_section, howto, contents, + addr, srel); + break; + + case R_MMIX_LOCAL: + /* This isn't a real relocation, it's just an assertion that the + final relocation value corresponds to a local register. We + ignore the actual relocation; nothing is changed. */ + { + asection *regsec + = bfd_get_section_by_name (input_section->output_section->owner, + MMIX_REG_CONTENTS_SECTION_NAME); + bfd_vma first_global; + + /* Check that this is an absolute value, or a reference to the + register contents section or the register (symbol) section. + Absolute numbers can get here as undefined section. Undefined + symbols are signalled elsewhere, so there's no conflict in us + accidentally handling it. */ + if (!bfd_is_abs_section (symsec) + && !bfd_is_und_section (symsec) + && strcmp (bfd_get_section_name (symsec->owner, symsec), + MMIX_REG_CONTENTS_SECTION_NAME) != 0 + && strcmp (bfd_get_section_name (symsec->owner, symsec), + MMIX_REG_SECTION_NAME) != 0) + { + (*_bfd_error_handler) + (_("%s: directive LOCAL valid only with a register or absolute value"), + bfd_get_filename (input_section->owner)); + + return bfd_reloc_overflow; + } + + /* If we don't have a register contents section, then $255 is the + first global register. */ + if (regsec == NULL) + first_global = 255; + else + { + first_global = bfd_get_section_vma (abfd, regsec) / 8; + if (strcmp (bfd_get_section_name (symsec->owner, symsec), + MMIX_REG_CONTENTS_SECTION_NAME) == 0) + { + if ((srel & 7) != 0 || srel < 32*8 || srel > 255*8) + /* The bfd_reloc_outofrange return value, though + intuitively a better value, will not get us an error. */ + return bfd_reloc_overflow; + srel /= 8; + } + } + + if ((bfd_vma) srel >= first_global) + { + /* FIXME: Better error message. */ + (*_bfd_error_handler) + (_("%s: LOCAL directive: Register $%ld is not a local register. First global register is $%ld."), + bfd_get_filename (input_section->owner), (long) srel, (long) first_global); + + return bfd_reloc_overflow; + } + } + r = bfd_reloc_ok; + break; + + default: + r = _bfd_final_link_relocate (howto, input_section->owner, input_section, + contents, r_offset, + relocation, r_addend); + } + + return r; +} + +/* Return the section that should be marked against GC for a given + relocation. */ + +static asection * +mmix_elf_gc_mark_hook (abfd, info, rel, h, sym) + bfd *abfd; + struct bfd_link_info *info ATTRIBUTE_UNUSED; + Elf_Internal_Rela *rel; + struct elf_link_hash_entry *h; + Elf_Internal_Sym *sym; +{ + if (h != NULL) + { + switch (ELF64_R_TYPE (rel->r_info)) + { + case R_MMIX_GNU_VTINHERIT: + case R_MMIX_GNU_VTENTRY: + break; + + default: + switch (h->root.type) + { + case bfd_link_hash_defined: + case bfd_link_hash_defweak: + return h->root.u.def.section; + + case bfd_link_hash_common: + return h->root.u.c.p->section; + + default: + break; + } + } + } + else + { + if (!(elf_bad_symtab (abfd) + && ELF_ST_BIND (sym->st_info) != STB_LOCAL) + && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE) + && sym->st_shndx != SHN_COMMON)) + { + return bfd_section_from_elf_index (abfd, sym->st_shndx); + } + } + + return NULL; +} + +/* Sort register relocs to come before expanding relocs. */ + +static int +mmix_elf_sort_relocs (p1, p2) + const PTR p1; + const PTR p2; +{ + const Elf_Internal_Rela *r1 = (const Elf_Internal_Rela *) p1; + const Elf_Internal_Rela *r2 = (const Elf_Internal_Rela *) p2; + int r1_is_reg, r2_is_reg; + + /* Sort primarily on r_offset & ~3, so relocs are done to consecutive + insns. */ + if ((r1->r_offset & ~(bfd_vma) 3) > (r2->r_offset & ~(bfd_vma) 3)) + return 1; + else if ((r1->r_offset & ~(bfd_vma) 3) < (r2->r_offset & ~(bfd_vma) 3)) + return -1; + + r1_is_reg + = (ELF64_R_TYPE (r1->r_info) == R_MMIX_REG_OR_BYTE + || ELF64_R_TYPE (r1->r_info) == R_MMIX_REG); + r2_is_reg + = (ELF64_R_TYPE (r2->r_info) == R_MMIX_REG_OR_BYTE + || ELF64_R_TYPE (r2->r_info) == R_MMIX_REG); + if (r1_is_reg != r2_is_reg) + return r2_is_reg - r1_is_reg; + + /* Neither or both are register relocs. Then sort on full offset. */ + if (r1->r_offset > r2->r_offset) + return 1; + else if (r1->r_offset < r2->r_offset) + return -1; + return 0; +} + +/* Look through the relocs for a section during the first phase. */ + +static boolean +mmix_elf_check_relocs (abfd, info, sec, relocs) + bfd *abfd; + struct bfd_link_info *info; + asection *sec; + const Elf_Internal_Rela *relocs; +{ + Elf_Internal_Shdr *symtab_hdr; + struct elf_link_hash_entry **sym_hashes, **sym_hashes_end; + const Elf_Internal_Rela *rel; + const Elf_Internal_Rela *rel_end; + + if (info->relocateable) + return true; + + symtab_hdr = &elf_tdata (abfd)->symtab_hdr; + sym_hashes = elf_sym_hashes (abfd); + sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf64_External_Sym); + if (!elf_bad_symtab (abfd)) + sym_hashes_end -= symtab_hdr->sh_info; + + /* First we sort the relocs so that any register relocs come before + expansion-relocs to the same insn. FIXME: Not done for mmo. */ + qsort ((PTR) relocs, sec->reloc_count, sizeof (Elf_Internal_Rela), + mmix_elf_sort_relocs); + + rel_end = relocs + sec->reloc_count; + for (rel = relocs; rel < rel_end; rel++) + { + struct elf_link_hash_entry *h; + unsigned long r_symndx; + + r_symndx = ELF64_R_SYM (rel->r_info); + if (r_symndx < symtab_hdr->sh_info) + h = NULL; + else + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + + switch (ELF64_R_TYPE (rel->r_info)) + { + /* This relocation describes the C++ object vtable hierarchy. + Reconstruct it for later use during GC. */ + case R_MMIX_GNU_VTINHERIT: + if (!_bfd_elf64_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) + return false; + break; + + /* This relocation describes which C++ vtable entries are actually + used. Record for later use during GC. */ + case R_MMIX_GNU_VTENTRY: + if (!_bfd_elf64_gc_record_vtentry (abfd, sec, h, rel->r_addend)) + return false; + break; + } + } + + return true; +} + +/* Change symbols relative to the reg contents section to instead be to + the register section, and scale them down to correspond to the register + number. */ + +static boolean +mmix_elf_link_output_symbol_hook (abfd, info, name, sym, input_sec) + bfd *abfd ATTRIBUTE_UNUSED; + struct bfd_link_info *info ATTRIBUTE_UNUSED; + const char *name ATTRIBUTE_UNUSED; + Elf_Internal_Sym *sym; + asection *input_sec; +{ + if (input_sec != NULL + && input_sec->name != NULL + && ELF_ST_TYPE (sym->st_info) != STT_SECTION + && strcmp (input_sec->name, MMIX_REG_CONTENTS_SECTION_NAME) == 0) + { + sym->st_value /= 8; + sym->st_shndx = SHN_REGISTER; + } + + return true; +} + +/* We fake a register section that holds values that are register numbers. + Having a SHN_REGISTER and register section translates better to other + formats (e.g. mmo) than for example a STT_REGISTER attribute. + This section faking is based on a construct in elf32-mips.c. */ +static asection mmix_elf_reg_section; +static asymbol mmix_elf_reg_section_symbol; +static asymbol *mmix_elf_reg_section_symbol_ptr; + +/* Handle the special MIPS section numbers that a symbol may use. + This is used for both the 32-bit and the 64-bit ABI. */ + +void +mmix_elf_symbol_processing (abfd, asym) + bfd *abfd ATTRIBUTE_UNUSED; + asymbol *asym; +{ + elf_symbol_type *elfsym; + + elfsym = (elf_symbol_type *) asym; + switch (elfsym->internal_elf_sym.st_shndx) + { + case SHN_REGISTER: + if (mmix_elf_reg_section.name == NULL) + { + /* Initialize the register section. */ + mmix_elf_reg_section.name = MMIX_REG_SECTION_NAME; + mmix_elf_reg_section.flags = SEC_NO_FLAGS; + mmix_elf_reg_section.output_section = &mmix_elf_reg_section; + mmix_elf_reg_section.symbol = &mmix_elf_reg_section_symbol; + mmix_elf_reg_section.symbol_ptr_ptr = &mmix_elf_reg_section_symbol_ptr; + mmix_elf_reg_section_symbol.name = MMIX_REG_SECTION_NAME; + mmix_elf_reg_section_symbol.flags = BSF_SECTION_SYM; + mmix_elf_reg_section_symbol.section = &mmix_elf_reg_section; + mmix_elf_reg_section_symbol_ptr = &mmix_elf_reg_section_symbol; + } + asym->section = &mmix_elf_reg_section; + break; + + default: + break; + } +} + +/* Given a BFD section, try to locate the corresponding ELF section + index. */ + +static boolean +mmix_elf_section_from_bfd_section (abfd, hdr, sec, retval) + bfd * abfd ATTRIBUTE_UNUSED; + Elf64_Internal_Shdr * hdr ATTRIBUTE_UNUSED; + asection * sec; + int * retval; +{ + if (strcmp (bfd_get_section_name (abfd, sec), MMIX_REG_SECTION_NAME) == 0) + *retval = SHN_REGISTER; + else + return false; + + return true; +} + +/* Hook called by the linker routine which adds symbols from an object + file. We must handle the special SHN_REGISTER section number here. + + We also check that we only have *one* each of the section-start + symbols, since otherwise having two with the same value would cause + them to be "merged", but with the contents serialized. */ + +boolean +mmix_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) + bfd *abfd; + struct bfd_link_info *info ATTRIBUTE_UNUSED; + const Elf_Internal_Sym *sym; + const char **namep ATTRIBUTE_UNUSED; + flagword *flagsp ATTRIBUTE_UNUSED; + asection **secp; + bfd_vma *valp ATTRIBUTE_UNUSED; +{ + if (sym->st_shndx == SHN_REGISTER) + *secp = bfd_make_section_old_way (abfd, MMIX_REG_SECTION_NAME); + else if ((*namep)[0] == '_' && (*namep)[1] == '_' && (*namep)[2] == '.' + && strncmp (*namep, MMIX_LOC_SECTION_START_SYMBOL_PREFIX, + 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); + + if (h != NULL && h->root.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. */ + ((*_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, + *namep + strlen (MMIX_LOC_SECTION_START_SYMBOL_PREFIX))); + bfd_set_error (bfd_error_bad_value); + return false; + } + } + + return true; +} + +/* We consider symbols matching "L.*:[0-9]+" to be local symbols. */ + +boolean +mmix_elf_is_local_label_name (abfd, name) + bfd *abfd; + const char *name; +{ + const char *colpos; + int digits; + + /* Also include the default local-label definition. */ + if (_bfd_elf_is_local_label_name (abfd, name)) + return true; + + if (*name != 'L') + return false; + + /* If there's no ":", or more than one, it's not a local symbol. */ + colpos = strchr (name, ':'); + if (colpos == NULL || strchr (colpos + 1, ':') != NULL) + return false; + + /* Check that there are remaining characters and that they are digits. */ + if (colpos[1] == 0) + return false; + + digits = strspn (colpos + 1, "0123456789"); + return digits != 0 && colpos[1 + digits] == 0; +} + +/* We get rid of the register section here. */ + +boolean +mmix_elf_final_link (abfd, info) + bfd *abfd; + struct bfd_link_info *info; +{ + /* We never output a register section, though we create one for + temporary measures. Check that nobody entered contents into it. */ + asection *reg_section; + asection **secpp; + + reg_section = bfd_get_section_by_name (abfd, MMIX_REG_SECTION_NAME); + + if (reg_section != NULL) + { + /* FIXME: Pass error state gracefully. */ + if (bfd_get_section_flags (abfd, reg_section) & SEC_HAS_CONTENTS) + _bfd_abort (__FILE__, __LINE__, _("Register section has contents\n")); + + /* FIXME: This does not seem like the proper way to kill a section, + but it's the way it's done elsewhere, like elf64-alpha.c. */ + /* Really remove the section. */ + for (secpp = &abfd->sections; + *secpp != reg_section; + secpp = &(*secpp)->next) + ; + *secpp = (*secpp)->next; + --abfd->section_count; + } + + if (! bfd_elf64_bfd_final_link (abfd, info)) + return false; + + return true; +} + +#define ELF_ARCH bfd_arch_mmix +#define ELF_MACHINE_CODE EM_MMIX + +/* According to mmix-doc page 36 (paragraph 45), this should be (1LL << 48LL). + However, that's too much for something somewhere in the linker part of + BFD; perhaps the start-address has to be a non-zero multiple of this + number, or larger than this number. The symptom is that the linker + complains: "warning: allocated section `.text' not in segment". We + settle for 64k; the page-size used in examples is 8k. + #define ELF_MAXPAGESIZE 0x10000 + + Unfortunately, this causes excessive padding in the supposedly small + for-education programs that are the expected usage (where people would + inspect output). We stick to 256 bytes just to have *some* default + alignment. */ +#define ELF_MAXPAGESIZE 0x100 + +#define TARGET_BIG_SYM bfd_elf64_mmix_vec +#define TARGET_BIG_NAME "elf64-mmix" + +#define elf_info_to_howto_rel NULL +#define elf_info_to_howto mmix_info_to_howto_rela +#define elf_backend_relocate_section mmix_elf_relocate_section +#define elf_backend_gc_mark_hook mmix_elf_gc_mark_hook +#define elf_backend_link_output_symbol_hook \ + mmix_elf_link_output_symbol_hook +#define elf_backend_add_symbol_hook mmix_elf_add_symbol_hook + +#define elf_backend_check_relocs mmix_elf_check_relocs +#define elf_backend_symbol_processing mmix_elf_symbol_processing + +#define bfd_elf64_bfd_is_local_label_name \ + mmix_elf_is_local_label_name + +#define elf_backend_may_use_rel_p 0 +#define elf_backend_may_use_rela_p 1 +#define elf_backend_default_use_rela_p 1 + +#define elf_backend_can_gc_sections 1 +#define elf_backend_section_from_bfd_section \ + mmix_elf_section_from_bfd_section + +#define bfd_elf64_bfd_final_link mmix_elf_final_link + +#include "elf64-target.h" diff -uprN binutils-2.11.92.0.10/bfd/elf64-ppc.c binutils-2.11.92.0.12/bfd/elf64-ppc.c --- binutils-2.11.92.0.10/bfd/elf64-ppc.c Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/elf64-ppc.c Fri Nov 16 14:05:51 2001 @@ -92,9 +92,6 @@ static boolean ppc64_elf_finish_dynamic_ PARAMS ((bfd *, struct bfd_link_info *)); -/* Branch prediction bit for branch taken relocs. */ -#define BRANCH_PREDICT_BIT 0x200000 - /* Mask to set RA in memory instructions. */ #define RA_REGISTER_MASK 0x001f0000 @@ -1642,6 +1639,9 @@ struct ppc_link_hash_table asection *sdynbss; asection *srelbss; asection *sglink; + + /* Small local sym to section mapping cache. */ + struct sym_sec_cache sym_sec; }; /* Get the ppc64 ELF linker hash table from a link_info structure. */ @@ -1704,6 +1704,7 @@ ppc64_elf_link_hash_table_create (abfd) htab->sdynbss = NULL; htab->srelbss = NULL; htab->sglink = NULL; + htab->sym_sec.abfd = NULL; return &htab->elf.root; } @@ -2038,6 +2039,9 @@ ppc64_elf_check_relocs (abfd, info, sec, || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0))) { + struct ppc_dyn_relocs *p; + struct ppc_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. */ @@ -2088,35 +2092,42 @@ ppc64_elf_check_relocs (abfd, info, sec, relocations we need for this symbol. */ if (h != NULL) { - struct ppc_link_hash_entry *eh; - struct ppc_dyn_relocs *p; - - eh = (struct ppc_link_hash_entry *) h; - p = eh->dyn_relocs; - - if (p == NULL || p->sec != sec) - { - p = ((struct ppc_dyn_relocs *) - bfd_alloc (htab->elf.dynobj, - (bfd_size_type) sizeof *p)); - if (p == NULL) - return false; - p->next = eh->dyn_relocs; - eh->dyn_relocs = p; - p->sec = sec; - p->count = 0; - p->pc_count = 0; - } - - p->count += 1; - if (!IS_ABSOLUTE_RELOC (r_type)) - p->pc_count += 1; + head = &((struct ppc_link_hash_entry *) h)->dyn_relocs; } else { - /* Track dynamic relocs needed for local syms too. */ - elf_section_data (sec)->local_dynrel += 1; + /* 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; + + head = ((struct ppc_dyn_relocs **) + &elf_section_data (s)->local_dynrel); + } + + p = *head; + if (p == NULL || p->sec != sec) + { + p = ((struct ppc_dyn_relocs *) + bfd_alloc (htab->elf.dynobj, + (bfd_size_type) sizeof *p)); + if (p == NULL) + return false; + p->next = *head; + *head = p; + p->sec = sec; + p->count = 0; + p->pc_count = 0; } + + p->count += 1; + if (!IS_ABSOLUTE_RELOC (r_type)) + p->pc_count += 1; } break; @@ -2193,6 +2204,8 @@ ppc64_elf_gc_sweep_hook (abfd, info, sec bfd_signed_vma *local_got_refcounts; const Elf_Internal_Rela *rel, *relend; + 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); @@ -2663,7 +2676,7 @@ allocate_dynrelocs (h, inf) if (h->dynindx == -1 && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) { - if (! bfd_elf32_link_record_dynamic_symbol (info, h)) + if (! bfd_elf64_link_record_dynamic_symbol (info, h)) return false; } @@ -2675,7 +2688,7 @@ allocate_dynrelocs (h, inf) eh->dyn_relocs = NULL; - keep: + keep: ; } /* Finally, allocate space. */ @@ -2762,12 +2775,26 @@ ppc64_elf_size_dynamic_sections (output_ for (s = ibfd->sections; s != NULL; s = s->next) { - bfd_size_type count = elf_section_data (s)->local_dynrel; + struct ppc_dyn_relocs *p; - if (count != 0) + for (p = *((struct ppc_dyn_relocs **) + &elf_section_data (s)->local_dynrel); + p != NULL; + p = p->next) { - srel = elf_section_data (s)->sreloc; - srel->_raw_size += count * sizeof (Elf64_External_Rela); + 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 + { + srel = elf_section_data (p->sec)->sreloc; + srel->_raw_size += p->count * sizeof (Elf64_External_Rela); + } } } @@ -3161,6 +3188,7 @@ ppc64_elf_relocate_section (output_bfd, } /* First handle relocations that tweak non-addend part of insn. */ + insn = 0; switch (r_type) { default: @@ -3169,22 +3197,23 @@ ppc64_elf_relocate_section (output_bfd, /* Branch taken prediction relocations. */ case R_PPC64_ADDR14_BRTAKEN: case R_PPC64_REL14_BRTAKEN: - insn = bfd_get_32 (output_bfd, contents + offset); - if ((relocation - offset) & 0x8000) - insn &= ~BRANCH_PREDICT_BIT; - else - insn |= BRANCH_PREDICT_BIT; - bfd_put_32 (output_bfd, (bfd_vma) insn, contents + offset); - break; + insn = 0x01 << 21; /* Set 't' bit, lowest bit of BO field. */ + /* Fall thru. */ - /* Branch not taken predicition relocations. */ + /* Branch not taken prediction relocations. */ case R_PPC64_ADDR14_BRNTAKEN: case R_PPC64_REL14_BRNTAKEN: - insn = bfd_get_32 (output_bfd, contents + offset); - if ((relocation - offset) & 0x8000) - insn |= BRANCH_PREDICT_BIT; + insn |= bfd_get_32 (output_bfd, contents + offset) & ~(0x01 << 21); + /* 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 - insn &= ~BRANCH_PREDICT_BIT; + break; + bfd_put_32 (output_bfd, (bfd_vma) insn, contents + offset); break; @@ -3430,8 +3459,14 @@ ppc64_elf_relocate_section (output_bfd, case R_PPC64_UADDR32: case R_PPC64_UADDR64: case R_PPC64_TOC: + /* 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 - && (input_section->flags & SEC_ALLOC) != 0 && (IS_ABSOLUTE_RELOC (r_type) || (h != NULL && h->dynindx != -1 @@ -3439,7 +3474,6 @@ ppc64_elf_relocate_section (output_bfd, || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)))) || (!info->shared - && (input_section->flags & SEC_ALLOC) != 0 && h != NULL && h->dynindx != -1 && (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0 diff -uprN binutils-2.11.92.0.10/bfd/elf64-s390.c binutils-2.11.92.0.12/bfd/elf64-s390.c --- binutils-2.11.92.0.10/bfd/elf64-s390.c Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/elf64-s390.c Fri Nov 16 14:05:51 2001 @@ -29,11 +29,18 @@ static reloc_howto_type *elf_s390_reloc_ PARAMS ((bfd *, bfd_reloc_code_real_type)); static void elf_s390_info_to_howto PARAMS ((bfd *, arelent *, Elf_Internal_Rela *)); -static boolean elf_s390_is_local_label_name PARAMS ((bfd *, const char *)); -static struct bfd_hash_entry *elf_s390_link_hash_newfunc +static boolean elf_s390_is_local_label_name + PARAMS ((bfd *, const char *)); +static struct bfd_hash_entry *link_hash_newfunc PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); static struct bfd_link_hash_table *elf_s390_link_hash_table_create PARAMS ((bfd *)); +static boolean create_got_section + PARAMS((bfd *, struct bfd_link_info *)); +static boolean elf_s390_create_dynamic_sections + PARAMS((bfd *, struct bfd_link_info *)); +static void elf_s390_copy_indirect_symbol + PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *)); static boolean elf_s390_check_relocs PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *)); @@ -45,6 +52,10 @@ static boolean elf_s390_gc_sweep_hook const Elf_Internal_Rela *)); static boolean elf_s390_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 elf_s390_size_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); static boolean elf_s390_relocate_section @@ -53,11 +64,11 @@ static boolean elf_s390_relocate_section static boolean elf_s390_finish_dynamic_symbol PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, Elf_Internal_Sym *)); +static enum elf_reloc_type_class elf_s390_reloc_type_class + PARAMS ((const Elf_Internal_Rela *)); static boolean elf_s390_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); static boolean elf_s390_object_p PARAMS ((bfd *)); -static enum elf_reloc_type_class elf_s390_reloc_type_class - PARAMS ((const Elf_Internal_Rela *)); #define USE_RELA 1 /* We want RELA relocations, not REL. */ @@ -123,70 +134,71 @@ elf_s390_reloc_type_lookup (abfd, code) bfd *abfd ATTRIBUTE_UNUSED; bfd_reloc_code_real_type code; { - switch (code) { - case BFD_RELOC_NONE: - return &elf_howto_table[(int) R_390_NONE]; - case BFD_RELOC_8: - return &elf_howto_table[(int) R_390_8]; - case BFD_RELOC_390_12: - return &elf_howto_table[(int) R_390_12]; - case BFD_RELOC_16: - return &elf_howto_table[(int) R_390_16]; - case BFD_RELOC_32: - return &elf_howto_table[(int) R_390_32]; - case BFD_RELOC_CTOR: - return &elf_howto_table[(int) R_390_32]; - case BFD_RELOC_32_PCREL: - return &elf_howto_table[(int) R_390_PC32]; - case BFD_RELOC_390_GOT12: - return &elf_howto_table[(int) R_390_GOT12]; - case BFD_RELOC_32_GOT_PCREL: - return &elf_howto_table[(int) R_390_GOT32]; - case BFD_RELOC_390_PLT32: - return &elf_howto_table[(int) R_390_PLT32]; - case BFD_RELOC_390_COPY: - return &elf_howto_table[(int) R_390_COPY]; - case BFD_RELOC_390_GLOB_DAT: - return &elf_howto_table[(int) R_390_GLOB_DAT]; - case BFD_RELOC_390_JMP_SLOT: - return &elf_howto_table[(int) R_390_JMP_SLOT]; - case BFD_RELOC_390_RELATIVE: - return &elf_howto_table[(int) R_390_RELATIVE]; - case BFD_RELOC_32_GOTOFF: - return &elf_howto_table[(int) R_390_GOTOFF]; - case BFD_RELOC_390_GOTPC: - return &elf_howto_table[(int) R_390_GOTPC]; - case BFD_RELOC_390_GOT16: - return &elf_howto_table[(int) R_390_GOT16]; - case BFD_RELOC_16_PCREL: - return &elf_howto_table[(int) R_390_PC16]; - case BFD_RELOC_390_PC16DBL: - return &elf_howto_table[(int) R_390_PC16DBL]; - case BFD_RELOC_390_PLT16DBL: - return &elf_howto_table[(int) R_390_PLT16DBL]; - case BFD_RELOC_VTABLE_INHERIT: - return &elf64_s390_vtinherit_howto; - case BFD_RELOC_VTABLE_ENTRY: - return &elf64_s390_vtentry_howto; - 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_64: - return &elf_howto_table[(int) R_390_64]; - case BFD_RELOC_64_PCREL: - return &elf_howto_table[(int) R_390_PC64]; - case BFD_RELOC_390_GOT64: - return &elf_howto_table[(int) R_390_GOT64]; - case BFD_RELOC_390_PLT64: - return &elf_howto_table[(int) R_390_PLT64]; - case BFD_RELOC_390_GOTENT: - return &elf_howto_table[(int) R_390_GOTENT]; - default: - break; - } + switch (code) + { + case BFD_RELOC_NONE: + return &elf_howto_table[(int) R_390_NONE]; + case BFD_RELOC_8: + return &elf_howto_table[(int) R_390_8]; + case BFD_RELOC_390_12: + return &elf_howto_table[(int) R_390_12]; + case BFD_RELOC_16: + return &elf_howto_table[(int) R_390_16]; + case BFD_RELOC_32: + return &elf_howto_table[(int) R_390_32]; + case BFD_RELOC_CTOR: + return &elf_howto_table[(int) R_390_32]; + case BFD_RELOC_32_PCREL: + return &elf_howto_table[(int) R_390_PC32]; + case BFD_RELOC_390_GOT12: + return &elf_howto_table[(int) R_390_GOT12]; + case BFD_RELOC_32_GOT_PCREL: + return &elf_howto_table[(int) R_390_GOT32]; + case BFD_RELOC_390_PLT32: + return &elf_howto_table[(int) R_390_PLT32]; + case BFD_RELOC_390_COPY: + return &elf_howto_table[(int) R_390_COPY]; + case BFD_RELOC_390_GLOB_DAT: + return &elf_howto_table[(int) R_390_GLOB_DAT]; + case BFD_RELOC_390_JMP_SLOT: + return &elf_howto_table[(int) R_390_JMP_SLOT]; + case BFD_RELOC_390_RELATIVE: + return &elf_howto_table[(int) R_390_RELATIVE]; + case BFD_RELOC_32_GOTOFF: + return &elf_howto_table[(int) R_390_GOTOFF]; + case BFD_RELOC_390_GOTPC: + return &elf_howto_table[(int) R_390_GOTPC]; + case BFD_RELOC_390_GOT16: + return &elf_howto_table[(int) R_390_GOT16]; + case BFD_RELOC_16_PCREL: + return &elf_howto_table[(int) R_390_PC16]; + case BFD_RELOC_390_PC16DBL: + return &elf_howto_table[(int) R_390_PC16DBL]; + case BFD_RELOC_390_PLT16DBL: + return &elf_howto_table[(int) R_390_PLT16DBL]; + case BFD_RELOC_VTABLE_INHERIT: + return &elf64_s390_vtinherit_howto; + case BFD_RELOC_VTABLE_ENTRY: + return &elf64_s390_vtentry_howto; + 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_64: + return &elf_howto_table[(int) R_390_64]; + case BFD_RELOC_64_PCREL: + return &elf_howto_table[(int) R_390_PC64]; + case BFD_RELOC_390_GOT64: + return &elf_howto_table[(int) R_390_GOT64]; + case BFD_RELOC_390_PLT64: + return &elf_howto_table[(int) R_390_PLT64]; + case BFD_RELOC_390_GOTENT: + return &elf_howto_table[(int) R_390_GOTENT]; + default: + break; + } return 0; } @@ -233,11 +245,6 @@ elf_s390_is_local_label_name (abfd, name #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1" -/* The nop opcode we use. */ - -#define s390_NOP 0x07070707 - - /* The size in bytes of the first entry in the procedure linkage table. */ #define PLT_FIRST_ENTRY_SIZE 32 /* The size in bytes of an entry in the procedure linkage table. */ @@ -324,53 +331,53 @@ elf_s390_is_local_label_name (abfd, name #define PLT_FIRST_ENTRY_WORD7 (bfd_vma) 0x07000700 /* The s390 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. */ - -/* This structure keeps track of the number of PC relative relocs we - have copied for a given symbol. */ - -struct elf_s390_pcrel_relocs_copied -{ - /* Next section. */ - struct elf_s390_pcrel_relocs_copied *next; - /* A section in dynobj. */ - asection *section; - /* Number of relocs copied in this section. */ + 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. */ + +struct elf_s390_dyn_relocs +{ + struct elf_s390_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; }; /* s390 ELF linker hash entry. */ struct elf_s390_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 elf_s390_pcrel_relocs_copied *pcrel_relocs_copied; + /* Track dynamic relocs copied for this symbol. */ + struct elf_s390_dyn_relocs *dyn_relocs; }; /* s390 ELF linker hash table. */ struct elf_s390_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 elf_s390_discard_copies - PARAMS ((struct elf_s390_link_hash_entry *, PTR)); - -/* Traverse an s390 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 elf_s390_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 s390 ELF linker hash table from a link_info structure. */ @@ -380,33 +387,32 @@ static boolean elf_s390_discard_copies /* Create an entry in an s390 ELF linker hash table. */ static struct bfd_hash_entry * -elf_s390_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 elf_s390_link_hash_entry *ret = - (struct elf_s390_link_hash_entry *) entry; - /* Allocate the structure if it has not already been allocated by a subclass. */ - if (ret == (struct elf_s390_link_hash_entry *) NULL) - ret = ((struct elf_s390_link_hash_entry *) - bfd_hash_allocate (table, - sizeof (struct elf_s390_link_hash_entry))); - if (ret == (struct elf_s390_link_hash_entry *) NULL) - return (struct bfd_hash_entry *) ret; + if (entry == NULL) + { + entry = bfd_hash_allocate (table, + sizeof (struct elf_s390_link_hash_entry)); + if (entry == NULL) + return entry; + } /* Call the allocation method of the superclass. */ - ret = ((struct elf_s390_link_hash_entry *) - _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret, - table, string)); - if (ret != (struct elf_s390_link_hash_entry *) NULL) + entry = _bfd_elf_link_hash_newfunc (entry, table, string); + if (entry != NULL) { - ret->pcrel_relocs_copied = NULL; + struct elf_s390_link_hash_entry *eh; + + eh = (struct elf_s390_link_hash_entry *) entry; + eh->dyn_relocs = NULL; } - return (struct bfd_hash_entry *) ret; + return entry; } /* Create an s390 ELF linker hash table. */ @@ -418,20 +424,136 @@ elf_s390_link_hash_table_create (abfd) struct elf_s390_link_hash_table *ret; bfd_size_type amt = sizeof (struct elf_s390_link_hash_table); - ret = ((struct elf_s390_link_hash_table *) bfd_alloc (abfd, amt)); - if (ret == (struct elf_s390_link_hash_table *) NULL) + ret = (struct elf_s390_link_hash_table *) bfd_alloc (abfd, amt); + if (ret == NULL) return NULL; - if (! _bfd_elf_link_hash_table_init (&ret->root, abfd, - elf_s390_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 elf_s390_link_hash_table *htab; + + if (! _bfd_elf_create_got_section (dynobj, info)) + return false; + + htab = elf_s390_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, 2)) + 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 +elf_s390_create_dynamic_sections (dynobj, info) + bfd *dynobj; + struct bfd_link_info *info; +{ + struct elf_s390_link_hash_table *htab; + + htab = elf_s390_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 +elf_s390_copy_indirect_symbol (dir, ind) + struct elf_link_hash_entry *dir, *ind; +{ + struct elf_s390_link_hash_entry *edir, *eind; + + edir = (struct elf_s390_link_hash_entry *) dir; + eind = (struct elf_s390_link_hash_entry *) ind; + + if (eind->dyn_relocs != NULL) + { + if (edir->dyn_relocs != NULL) + { + struct elf_s390_dyn_relocs **pp; + struct elf_s390_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 elf_s390_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); +} /* Look through the relocs for a section during the first phase, and allocate space in the global offset table or procedure linkage @@ -444,26 +566,20 @@ elf_s390_check_relocs (abfd, info, sec, asection *sec; const Elf_Internal_Rela *relocs; { - bfd *dynobj; + struct elf_s390_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 = elf_s390_hash_table (info); symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); - local_got_refcounts = elf_local_got_offsets (abfd); - sgot = NULL; - srelgot = NULL; sreloc = NULL; rel_end = relocs + sec->reloc_count; @@ -474,35 +590,19 @@ elf_s390_check_relocs (abfd, info, sec, 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_390_GOT12: - case R_390_GOT16: - case R_390_GOT32: - case R_390_GOT64: - case R_390_GOTOFF: - case R_390_GOTPC: - case R_390_GOTPCDBL: - case R_390_GOTENT: - elf_hash_table (info)->dynobj = dynobj = abfd; - if (! _bfd_elf_create_got_section (dynobj, info)) - return false; - break; - - default: - break; - } - } - - switch (ELF64_R_TYPE (rel->r_info)) { case R_390_GOT12: @@ -511,77 +611,42 @@ elf_s390_check_relocs (abfd, info, sec, case R_390_GOT64: case R_390_GOTENT: /* 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, 2)) - 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 += 8; - 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; - size = symtab_hdr->sh_info * sizeof (bfd_vma); + size = symtab_hdr->sh_info; + size *= sizeof (bfd_signed_vma); local_got_refcounts = ((bfd_signed_vma *) bfd_zalloc (abfd, size)); if (local_got_refcounts == NULL) return false; elf_local_got_refcounts (abfd) = local_got_refcounts; } - if (local_got_refcounts[r_symndx] == 0) - { - sgot->_raw_size += 8; - if (info->shared) - { - /* If we are generating a shared object, we need to - output a R_390_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_390_GOTOFF: + case R_390_GOTPC: + case R_390_GOTPCDBL: + 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_390_PLT16DBL: @@ -613,39 +678,71 @@ elf_s390_check_relocs (abfd, info, sec, case R_390_PC32: case R_390_PC32DBL: case R_390_PC64: - 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 - against a local symbol, then we need to copy the reloc - into the shared library. However, if we are linking with - -Bsymbolic, we do not need to copy a reloc against a - global symbol which is defined in an object we are - 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. */ - if (info->shared - && (sec->flags & SEC_ALLOC) != 0 - && (ELF64_R_TYPE (rel->r_info) == R_390_8 - || ELF64_R_TYPE (rel->r_info) == R_390_16 - || ELF64_R_TYPE (rel->r_info) == R_390_32 - || ELF64_R_TYPE (rel->r_info) == R_390_64 - || (h != NULL - && h->dynindx != -1 - && (! info->symbolic - || (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) == 0)))) + against a global symbol, or a non PC relative reloc + against a local symbol, then we need to copy the reloc + into the shared library. However, if we are linking with + -Bsymbolic, we do not need to copy a reloc against a + global symbol which is defined in an object we are + 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). 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_390_PC16 + && ELF64_R_TYPE (rel->r_info) != R_390_PC16DBL + && ELF64_R_TYPE (rel->r_info) != R_390_PC32 + && ELF64_R_TYPE (rel->r_info) != R_390_PC32DBL + && ELF64_R_TYPE (rel->r_info) != R_390_PC64) + || (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))) { - /* 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. */ + struct elf_s390_dyn_relocs *p; + struct elf_s390_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, @@ -654,10 +751,19 @@ elf_s390_check_relocs (abfd, info, sec, 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) { @@ -673,52 +779,54 @@ elf_s390_check_relocs (abfd, info, sec, || ! bfd_set_section_alignment (dynobj, sreloc, 2)) 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 we are linking with -Bsymbolic, and 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 again if the symbol is later - defined by a regular object. Note that this function - is only called if we are using an elf64_s390 linker - hash table, which means that h is really a pointer to - an elf64_s390_link_hash_entry. */ - if (h != NULL - && (ELF64_R_TYPE (rel->r_info) == R_390_PC16 || - ELF64_R_TYPE (rel->r_info) == R_390_PC16DBL || - ELF64_R_TYPE (rel->r_info) == R_390_PC32 || - ELF64_R_TYPE (rel->r_info) == R_390_PC32DBL || - ELF64_R_TYPE (rel->r_info) == R_390_PC64)) + /* If this is a global symbol, we count the number of + relocations we need for this symbol. */ + if (h != NULL) { - struct elf_s390_link_hash_entry *eh; - struct elf_s390_pcrel_relocs_copied *p; - - eh = (struct elf_s390_link_hash_entry *) h; + head = &((struct elf_s390_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 elf_s390_dyn_relocs **) + &elf_section_data (s)->local_dynrel); + } + p = *head; + if (p == NULL || p->sec != sec) + { + bfd_size_type amt = sizeof *p; + p = ((struct elf_s390_dyn_relocs *) + bfd_alloc (htab->elf.dynobj, amt)); if (p == NULL) - { - p = ((struct elf_s390_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_390_PC16 + || ELF64_R_TYPE (rel->r_info) == R_390_PC16DBL + || ELF64_R_TYPE (rel->r_info) == R_390_PC32 + || ELF64_R_TYPE (rel->r_info) == R_390_PC32DBL + || ELF64_R_TYPE (rel->r_info) == R_390_PC64) + p->pc_count += 1; + } break; /* This relocation describes the C++ object vtable hierarchy. @@ -731,7 +839,7 @@ elf_s390_check_relocs (abfd, info, sec, /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_390_GNU_VTENTRY: - if (!_bfd_elf64_gc_record_vtentry (abfd, sec, h, rel->r_addend)) + if (!_bfd_elf64_gc_record_vtentry (abfd, sec, h, rel->r_offset)) return false; break; @@ -795,10 +903,10 @@ elf_s390_gc_mark_hook (abfd, info, rel, static boolean elf_s390_gc_sweep_hook (abfd, info, sec, relocs) - bfd *abfd ATTRIBUTE_UNUSED; - struct bfd_link_info *info ATTRIBUTE_UNUSED; - asection *sec ATTRIBUTE_UNUSED; - const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED; + bfd *abfd; + struct bfd_link_info *info; + asection *sec; + const Elf_Internal_Rela *relocs; { Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; @@ -806,21 +914,13 @@ elf_s390_gc_sweep_hook (abfd, info, sec, 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)) @@ -838,27 +938,51 @@ elf_s390_gc_sweep_hook (abfd, info, sec, { 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 -= 8; - 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 -= 8; - if (info->shared) - srelgot->_raw_size -= sizeof (Elf64_External_Rela); - } - } + local_got_refcounts[r_symndx] -= 1; + } + break; + + case R_390_8: + case R_390_12: + case R_390_16: + case R_390_32: + case R_390_64: + case R_390_PC16: + case R_390_PC16DBL: + case R_390_PC32: + case R_390_PC32DBL: + case R_390_PC64: + r_symndx = ELF64_R_SYM (rel->r_info); + if (r_symndx >= symtab_hdr->sh_info) + { + struct elf_s390_link_hash_entry *eh; + struct elf_s390_dyn_relocs **pp; + struct elf_s390_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 elf_s390_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_390_PC16 + || ELF64_R_TYPE (rel->r_info) == R_390_PC16DBL + || ELF64_R_TYPE (rel->r_info) == R_390_PC32) + p->pc_count -= 1; + p->count -= 1; + if (p->count == 0) + *pp = p->next; + break; + } } break; @@ -893,90 +1017,40 @@ elf_s390_adjust_dynamic_symbol (info, h) struct bfd_link_info *info; struct elf_link_hash_entry *h; { - bfd *dynobj; + struct elf_s390_link_hash_table *htab; + struct elf_s390_link_hash_entry * eh; + struct elf_s390_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 (although we could actually do it here). */ 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)) { /* This case can occur if we saw a PLT32 reloc in an input file, but the symbol was never referred to by a dynamic - object. In such a case, we don't actually need to build - a procedure linkage table, and we can just do a PC32 - reloc instead. */ + object, or if all references were garbage collected. In + such a case, we don't actually need to build a procedure + 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); - - - /* The first entry in .plt is reserved. */ - if (s->_raw_size == 0) - s->_raw_size = PLT_FIRST_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_390_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 @@ -1006,6 +1080,29 @@ elf_s390_adjust_dynamic_symbol (info, h) 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 elf_s390_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 @@ -1016,20 +1113,14 @@ elf_s390_adjust_dynamic_symbol (info, h) 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 = elf_s390_hash_table (info); - /* We must generate a R_390_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 - .rel.bss section we are going to use. */ + /* We must generate a R_390_COPY reloc to tell the dynamic linker to + copy the initial value out of the dynamic object and into the + 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; } @@ -1040,11 +1131,11 @@ elf_s390_adjust_dynamic_symbol (info, h) power_of_two = 3; /* Apply the required alignment. */ - 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)) + 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 (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; } @@ -1058,6 +1149,218 @@ elf_s390_adjust_dynamic_symbol (info, h) return true; } +/* This is the condition under which elf_s390_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 elf_s390_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 elf_s390_link_hash_table *htab; + 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) + return true; + + info = (struct bfd_link_info *) inf; + htab = elf_s390_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_FIRST_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 elf_s390_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 elf_s390_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 elf_s390_link_hash_entry *eh; + struct elf_s390_dyn_relocs *p; + + eh = (struct elf_s390_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 @@ -1065,125 +1368,152 @@ elf_s390_size_dynamic_sections (output_b bfd *output_bfd ATTRIBUTE_UNUSED; struct bfd_link_info *info; { + struct elf_s390_link_hash_table *htab; bfd *dynobj; asection *s; boolean relocs; - boolean plt; + bfd *ibfd; - dynobj = elf_hash_table (info)->dynobj; - BFD_ASSERT (dynobj != NULL); + htab = elf_s390_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) - elf_s390_link_hash_traverse (elf_s390_hash_table (info), - elf_s390_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 = false; - 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 *srela; - 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 elf_s390_dyn_relocs *p; + + for (p = *((struct elf_s390_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 + { + srela = elf_section_data (p->sec)->sreloc; + srela->_raw_size += p->count * sizeof (Elf64_External_Rela); + } } } - 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; + srela = 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 to handle .rela.bss and - .rel.plt. We must create it in - create_dynamic_sections, because it 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) + srela->_raw_size += sizeof (Elf64_External_Rela); } else - { - /* Remember whether there are any reloc sections other - than .rela.plt. */ - if (strcmp (name, ".rela.plt") != 0) - 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; - } + *local_got = (bfd_vma) -1; } - else if (strncmp (name, ".got", 4) != 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 (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 to handle .rela.bss and + .rela.plt. We must create it in + create_dynamic_sections, because it 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; } - /* Allocate memory for the section contents. */ - s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size); - if (s->contents == NULL && s->_raw_size != 0) + /* Allocate memory for the section contents. We use bfd_zalloc + here in case unused entries are not reclaimed before the + section's contents are written out. This should not happen, + but this way if it does, we get a R_390_NONE reloc instead + of garbage. */ + s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size); + 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 elf_s390_finish_dynamic_sections, but we @@ -1199,7 +1529,7 @@ elf_s390_size_dynamic_sections (output_b return false; } - if (plt) + if (htab->splt->_raw_size != 0) { if (!add_dynamic_entry (DT_PLTGOT, 0) || !add_dynamic_entry (DT_PLTRELSZ, 0) @@ -1214,13 +1544,16 @@ elf_s390_size_dynamic_sections (output_b || !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; - info->flags |= DF_TEXTREL; + /* If any dynamic relocs apply to a read-only section, + then we need a DT_TEXTREL entry. */ + 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 @@ -1228,35 +1561,6 @@ elf_s390_size_dynamic_sections (output_b return true; } -/* This function is called via elf64_s390_link_hash_traverse if we are - creating a shared object with -Bsymbolic. It discards the space - allocated to copy PC relative relocs against symbols which are - defined in regular objects. We allocated space for them in the - check_relocs routine, but we won't fill them in in the - relocate_section routine. */ - -/*ARGSUSED*/ -static boolean -elf_s390_discard_copies (h, inf) - struct elf_s390_link_hash_entry *h; - PTR inf; -{ - struct elf_s390_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 a 390 ELF section. */ static boolean @@ -1271,30 +1575,18 @@ elf_s390_relocate_section (output_bfd, i Elf_Internal_Sym *local_syms; asection **local_sections; { - bfd *dynobj; + struct elf_s390_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 *rel; Elf_Internal_Rela *relend; - dynobj = elf_hash_table (info)->dynobj; + htab = elf_s390_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); - sgot = NULL; - splt = NULL; - sreloc = NULL; - if (dynobj != NULL) - { - splt = bfd_get_section_by_name (dynobj, ".plt"); - sgot = bfd_get_section_by_name (dynobj, ".got"); - } - rel = relocs; relend = relocs + input_section->reloc_count; for (; rel < relend; rel++) @@ -1305,12 +1597,14 @@ elf_s390_relocate_section (output_bfd, i 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; r_type = ELF64_R_TYPE (rel->r_info); - if (r_type == R_390_GNU_VTINHERIT - || r_type == R_390_GNU_VTENTRY) + if (r_type == (int) R_390_GNU_VTINHERIT + || r_type == (int) R_390_GNU_VTENTRY) continue; if (r_type < 0 || r_type >= (int) R_390_max) { @@ -1344,6 +1638,7 @@ elf_s390_relocate_section (output_bfd, i h = NULL; sym = NULL; sec = NULL; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -1358,61 +1653,18 @@ elf_s390_relocate_section (output_bfd, i 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_390_GOTPC - || r_type == R_390_GOTPCDBL) - || ((r_type == R_390_PLT16DBL || - r_type == R_390_PLT32 || - r_type == R_390_PLT32DBL || - r_type == R_390_PLT64) - && splt != NULL - && h->plt.offset != (bfd_vma) -1) - || ((r_type == R_390_GOT12 || - r_type == R_390_GOT16 || - r_type == R_390_GOT32 || - r_type == R_390_GOT64 || - r_type == R_390_GOTENT) - && 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_390_8 || - r_type == R_390_16 || - r_type == R_390_32 || - r_type == R_390_64 || - r_type == R_390_PC16 || - r_type == R_390_PC16DBL || - r_type == R_390_PC32 || - r_type == R_390_PC32DBL || - r_type == R_390_PC64) - && ((input_section->flags & SEC_ALLOC) != 0 - /* DWARF will emit R_386_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)))) + if (sec->output_section == NULL) { - /* 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) - { - (*_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 @@ -1431,9 +1683,9 @@ elf_s390_relocate_section (output_bfd, i { if (! ((*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, - (!info->shared || info->no_undefined - || ELF_ST_VISIBILITY (h->other))))) + input_section, rel->r_offset, + (!info->shared || info->no_undefined + || ELF_ST_VISIBILITY (h->other))))) return false; relocation = 0; } @@ -1448,18 +1700,20 @@ elf_s390_relocate_section (output_bfd, i case R_390_GOTENT: /* Relocation is to the entry for this symbol in the global offset table. */ - BFD_ASSERT (sgot != NULL); + if (htab->sgot == NULL) + abort (); if (h != NULL) { - bfd_vma off; + boolean dyn; off = h->got.offset; - BFD_ASSERT (off != (bfd_vma) -1); - - if (! elf_hash_table (info)->dynamic_sections_created + dyn = htab->elf.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 @@ -1479,18 +1733,17 @@ elf_s390_relocate_section (output_bfd, i else { bfd_put_64 (output_bfd, relocation, - sgot->contents + off); + htab->sgot->contents + off); h->got.offset |= 1; } } - relocation = sgot->output_offset + off; + else + 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]; @@ -1501,34 +1754,38 @@ elf_s390_relocate_section (output_bfd, i 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; - 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_390_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; } - - relocation = sgot->output_offset + off; } + if (off >= (bfd_vma) -2) + 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 @@ -1536,7 +1793,7 @@ elf_s390_relocate_section (output_bfd, i * add the vma of the GOT to get the correct value. */ if (r_type == R_390_GOTENT) - relocation += sgot->output_section->vma; + relocation += htab->sgot->output_section->vma; break; @@ -1544,34 +1801,21 @@ elf_s390_relocate_section (output_bfd, i /* Relocation is relative to the start of the global offset table. */ - if (sgot == NULL) - { - sgot = bfd_get_section_by_name (dynobj, ".got"); - BFD_ASSERT (sgot != NULL); - } - /* Note that sgot->output_offset is not involved in this calculation. We always want the start of .got. If we defined _GLOBAL_OFFSET_TABLE in a different way, as is permitted by the ABI, we might have to change this calculation. */ - relocation -= sgot->output_section->vma; + relocation -= htab->sgot->output_section->vma; break; case R_390_GOTPC: case R_390_GOTPCDBL: /* Use global offset table as symbol value. */ - - if (sgot == NULL) - { - sgot = bfd_get_section_by_name (dynobj, ".got"); - BFD_ASSERT (sgot != NULL); - } - - relocation = sgot->output_section->vma; - - break; + relocation = htab->sgot->output_section->vma; + unresolved_reloc = false; + break; case R_390_PLT16DBL: case R_390_PLT32: @@ -1585,7 +1829,8 @@ elf_s390_relocate_section (output_bfd, i 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 @@ -1593,10 +1838,10 @@ elf_s390_relocate_section (output_bfd, i 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_390_8: @@ -1608,56 +1853,52 @@ elf_s390_relocate_section (output_bfd, i case R_390_PC32: case R_390_PC32DBL: case R_390_PC64: - if (info->shared - && (input_section->flags & SEC_ALLOC) != 0 - && (r_type == R_390_8 - || r_type == R_390_16 - || r_type == R_390_32 - || r_type == R_390_64 - || (h != NULL - && h->dynindx != -1 - && (! info->symbolic - || (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) == 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_390_PC16 + && r_type != R_390_PC16DBL + && r_type != R_390_PC32 + && r_type != R_390_PC32DBL + && r_type != R_390_PC64) + || (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; if (elf_section_data (input_section)->stab_info == NULL) outrel.r_offset = rel->r_offset; else { - bfd_vma off; - off = (_bfd_stab_section_offset - (output_bfd, &elf_hash_table (info)->stab_info, - input_section, + (output_bfd, htab->elf.stab_info, input_section, &elf_section_data (input_section)->stab_info, rel->r_offset)); if (off == (bfd_vma) -1) @@ -1673,44 +1914,37 @@ elf_s390_relocate_section (output_bfd, i memset (&outrel, 0, sizeof outrel); relocate = false; } - else if (r_type == R_390_PC16 || - r_type == R_390_PC16DBL || - r_type == R_390_PC32 || - r_type == R_390_PC32DBL || - r_type == R_390_PC64) + else if (h != NULL + && h->dynindx != -1 + && (r_type == R_390_PC16 + || r_type == R_390_PC16DBL + || r_type == R_390_PC32 + || r_type == R_390_PC32DBL + || r_type == R_390_PC64 + || !info->shared + || !info->symbolic + || (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_REGULAR) == 0)) { - BFD_ASSERT (h != NULL && h->dynindx != -1); relocate = false; outrel.r_info = ELF64_R_INFO (h->dynindx, r_type); - outrel.r_addend = relocation + rel->r_addend; + outrel.r_addend = rel->r_addend; } else { - /* h->dynindx may be -1 if this symbol was marked to - become local. */ - if (h == NULL - || ((info->symbolic || h->dynindx == -1) - && (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) != 0)) - { - relocate = true; - outrel.r_info = ELF64_R_INFO (0, R_390_RELATIVE); - outrel.r_addend = relocation + rel->r_addend; - } - else - { - BFD_ASSERT (h->dynindx != -1); - relocate = false; - outrel.r_info = ELF64_R_INFO (h->dynindx, R_390_64); - outrel.r_addend = relocation + rel->r_addend; - } - } + /* This symbol is local, or marked to become local. */ + relocate = true; + outrel.r_info = ELF64_R_INFO (0, R_390_RELATIVE); + outrel.r_addend = relocation + rel->r_addend; + } + + sreloc = elf_section_data (input_section)->sreloc; + if (sreloc == NULL) + abort (); - bfd_elf64_swap_reloca_out (output_bfd, &outrel, - (((Elf64_External_Rela *) - sreloc->contents) - + sreloc->reloc_count)); - ++sreloc->reloc_count; + 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 @@ -1726,39 +1960,54 @@ elf_s390_relocate_section (output_bfd, i 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); + r = _bfd_final_link_relocate (howto, input_bfd, input_section, 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, rel->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; } } } @@ -1776,28 +2025,25 @@ elf_s390_finish_dynamic_symbol (output_b struct elf_link_hash_entry *h; Elf_Internal_Sym *sym; { - bfd *dynobj; + struct elf_s390_link_hash_table *htab; - dynobj = elf_hash_table (info)->dynobj; + htab = elf_s390_hash_table (info); if (h->plt.offset != (bfd_vma) -1) { - asection *splt; - asection *srela; - Elf_Internal_Rela rela; - bfd_vma got_offset; bfd_vma plt_index; - asection *sgot; + 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 (); /* Calc. index no. Current offset - size first entry / entry size. */ @@ -1808,78 +2054,78 @@ elf_s390_finish_dynamic_symbol (output_b got_offset = (plt_index + 3) * GOT_ENTRY_SIZE; /* Fill in the blueprint of a PLT. */ - bfd_put_32 (output_bfd, PLT_ENTRY_WORD0, - splt->contents + h->plt.offset); - bfd_put_32 (output_bfd, PLT_ENTRY_WORD1, - splt->contents + h->plt.offset + 4); - bfd_put_32 (output_bfd, PLT_ENTRY_WORD2, - splt->contents + h->plt.offset + 8); - bfd_put_32 (output_bfd, PLT_ENTRY_WORD3, - splt->contents + h->plt.offset + 12); - bfd_put_32 (output_bfd, PLT_ENTRY_WORD4, - splt->contents + h->plt.offset + 16); - bfd_put_32 (output_bfd, PLT_ENTRY_WORD5, - splt->contents + h->plt.offset + 20); - bfd_put_32 (output_bfd, PLT_ENTRY_WORD6, - splt->contents + h->plt.offset + 24); - bfd_put_32 (output_bfd, PLT_ENTRY_WORD7, - splt->contents + h->plt.offset + 28); + bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD0, + htab->splt->contents + h->plt.offset); + bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD1, + htab->splt->contents + h->plt.offset + 4); + bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD2, + htab->splt->contents + h->plt.offset + 8); + bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD3, + htab->splt->contents + h->plt.offset + 12); + bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD4, + htab->splt->contents + h->plt.offset + 16); + bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD5, + htab->splt->contents + h->plt.offset + 20); + bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD6, + htab->splt->contents + h->plt.offset + 24); + bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD7, + htab->splt->contents + h->plt.offset + 28); /* Fixup the relative address to the GOT entry */ bfd_put_32 (output_bfd, - (sgot->output_section->vma + sgot->output_offset + got_offset - - (splt->output_section->vma + h->plt.offset))/2, - splt->contents + h->plt.offset + 2); + (htab->sgotplt->output_section->vma + + htab->sgotplt->output_offset + got_offset + - (htab->splt->output_section->vma + h->plt.offset))/2, + htab->splt->contents + h->plt.offset + 2); /* Fixup the relative branch to PLT 0 */ bfd_put_32 (output_bfd, - (PLT_FIRST_ENTRY_SIZE + (PLT_ENTRY_SIZE * plt_index) + 22)/2, - splt->contents + h->plt.offset + 24); + htab->splt->contents + h->plt.offset + 24); /* Fixup offset into symbol table */ bfd_put_32 (output_bfd, plt_index * sizeof (Elf64_External_Rela), - splt->contents + h->plt.offset + 28); - - /* Fill in the entry in the .rela.plt section. */ - rela.r_offset = (sgot->output_section->vma - + sgot->output_offset - + got_offset); - rela.r_info = ELF64_R_INFO (h->dynindx, R_390_JMP_SLOT); - rela.r_addend = 0; - bfd_elf64_swap_reloca_out (output_bfd, &rela, - ((Elf64_External_Rela *) srela->contents - + plt_index )); + htab->splt->contents + h->plt.offset + 28); /* Fill in the entry in the global offset table. Points to instruction after GOT offset. */ bfd_put_64 (output_bfd, - (splt->output_section->vma - + splt->output_offset + (htab->splt->output_section->vma + + htab->splt->output_offset + h->plt.offset + 14), - sgot->contents + got_offset); + htab->sgotplt->contents + got_offset); + /* Fill in the entry in the .rela.plt section. */ + rela.r_offset = (htab->sgotplt->output_section->vma + + htab->sgotplt->output_offset + + got_offset); + rela.r_info = ELF64_R_INFO (h->dynindx, R_390_JMP_SLOT); + rela.r_addend = 0; + 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 (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 @@ -1887,11 +2133,13 @@ elf_s390_finish_dynamic_symbol (output_b 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_390_RELATIVE); rela.r_addend = (h->root.u.def.value + h->root.u.def.section->output_section->vma @@ -1900,42 +2148,37 @@ elf_s390_finish_dynamic_symbol (output_b 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_390_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 symbols 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_390_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 some specially defined symbols as absolute. */ @@ -1947,6 +2190,26 @@ elf_s390_finish_dynamic_symbol (output_b 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 +elf_s390_reloc_type_class (rela) + const Elf_Internal_Rela *rela; +{ + switch ((int) ELF64_R_TYPE (rela->r_info)) + { + case R_390_RELATIVE: + return reloc_class_relative; + case R_390_JMP_SLOT: + return reloc_class_plt; + case R_390_COPY: + return reloc_class_copy; + default: + return reloc_class_normal; + } +} + /* Finish up the dynamic sections. */ static boolean @@ -1954,29 +2217,26 @@ elf_s390_finish_dynamic_sections (output bfd *output_bfd; struct bfd_link_info *info; { + struct elf_s390_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 = elf_s390_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); @@ -1984,28 +2244,22 @@ elf_s390_finish_dynamic_sections (output switch (dyn.d_tag) { default: - break; + 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"; - get_vma: - s = bfd_get_section_by_name(output_bfd, name); - BFD_ASSERT (s != NULL); - dyn.d_un.d_ptr = s->vma; - bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon); + dyn.d_un.d_ptr = htab->srelplt->output_section->vma; break; case DT_PLTRELSZ: - s = bfd_get_section_by_name (output_bfd, ".rela.plt"); - BFD_ASSERT (s != NULL); + 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; - bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon); break; case DT_RELASZ: @@ -2016,68 +2270,64 @@ elf_s390_finish_dynamic_sections (output linker script arranges for .rela.plt to follow all other relocation sections, we don't have to worry about changing the DT_RELA entry. */ - s = bfd_get_section_by_name (output_bfd, ".rela.plt"); - if (s != NULL) - { - if (s->_cooked_size != 0) - dyn.d_un.d_val -= s->_cooked_size; - else - dyn.d_un.d_val -= s->_raw_size; - } - bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon); + 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; } + + bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon); } /* Fill in the special first entry in the procedure linkage table. */ - splt = bfd_get_section_by_name (dynobj, ".plt"); - if (splt && splt->_raw_size > 0) + if (htab->splt && htab->splt->_raw_size > 0) { /* fill in blueprint for plt 0 entry */ - bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD0, - splt->contents ); - bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD1, - splt->contents +4 ); - bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD3, - splt->contents +12 ); - bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD4, - splt->contents +16 ); - bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD5, - splt->contents +20 ); - bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD6, - splt->contents + 24); - bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD7, - splt->contents + 28 ); + bfd_put_32 (output_bfd, (bfd_vma) PLT_FIRST_ENTRY_WORD0, + htab->splt->contents ); + bfd_put_32 (output_bfd, (bfd_vma) PLT_FIRST_ENTRY_WORD1, + htab->splt->contents +4 ); + bfd_put_32 (output_bfd, (bfd_vma) PLT_FIRST_ENTRY_WORD3, + htab->splt->contents +12 ); + bfd_put_32 (output_bfd, (bfd_vma) PLT_FIRST_ENTRY_WORD4, + htab->splt->contents +16 ); + bfd_put_32 (output_bfd, (bfd_vma) PLT_FIRST_ENTRY_WORD5, + htab->splt->contents +20 ); + bfd_put_32 (output_bfd, (bfd_vma) PLT_FIRST_ENTRY_WORD6, + htab->splt->contents + 24); + bfd_put_32 (output_bfd, (bfd_vma) PLT_FIRST_ENTRY_WORD7, + htab->splt->contents + 28 ); /* Fixup relative address to start of GOT */ bfd_put_32 (output_bfd, - (sgot->output_section->vma + sgot->output_offset - - splt->output_section->vma - 6)/2, - splt->contents + 8); + (htab->sgotplt->output_section->vma + + htab->sgotplt->output_offset + - htab->splt->output_section->vma - 6)/2, + htab->splt->contents + 8); } - - elf_section_data (splt->output_section)->this_hdr.sh_entsize = - PLT_ENTRY_SIZE; + elf_section_data (htab->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); + /* Fill in the first three entries in the global offset table. */ + if (htab->sgotplt->_raw_size > 0) + { + bfd_put_64 (output_bfd, + (sdyn == NULL ? (bfd_vma) 0 + : sdyn->output_section->vma + sdyn->output_offset), + htab->sgotplt->contents); + /* One entry for shared object struct ptr. */ + bfd_put_64 (output_bfd, (bfd_vma) 0, htab->sgotplt->contents + 8); + /* One entry for _dl_runtime_resolve. */ + bfd_put_64 (output_bfd, (bfd_vma) 0, htab->sgotplt->contents + 12); + } - /* One entry for shared object struct ptr. */ - bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + 8); - /* One entry for _dl_runtime_resolve. */ - bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + 12); + elf_section_data (htab->sgot->output_section) + ->this_hdr.sh_entsize = 8; } - - elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 8; - return true; } @@ -2088,24 +2338,6 @@ elf_s390_object_p (abfd) return bfd_default_set_arch_mach (abfd, bfd_arch_s390, bfd_mach_s390_esame); } - -static enum elf_reloc_type_class -elf_s390_reloc_type_class (rela) - const Elf_Internal_Rela *rela; -{ - switch ((int) ELF64_R_TYPE (rela->r_info)) - { - case R_390_RELATIVE: - return reloc_class_relative; - case R_390_JMP_SLOT: - return reloc_class_plt; - case R_390_COPY: - return reloc_class_copy; - default: - return reloc_class_normal; - } -} - /* * Why was the hash table entry size definition changed from * ARCH_SIZE/8 to 4? This breaks the 64 bit dynamic linker and @@ -2160,18 +2392,19 @@ const struct elf_size_info s390_elf64_si #define elf_info_to_howto elf_s390_info_to_howto -#define bfd_elf64_bfd_final_link _bfd_elf64_gc_common_final_link #define bfd_elf64_bfd_is_local_label_name elf_s390_is_local_label_name #define bfd_elf64_bfd_link_hash_table_create elf_s390_link_hash_table_create #define bfd_elf64_bfd_reloc_type_lookup elf_s390_reloc_type_lookup #define elf_backend_adjust_dynamic_symbol elf_s390_adjust_dynamic_symbol #define elf_backend_check_relocs elf_s390_check_relocs -#define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections +#define elf_backend_copy_indirect_symbol elf_s390_copy_indirect_symbol +#define elf_backend_create_dynamic_sections elf_s390_create_dynamic_sections #define elf_backend_finish_dynamic_sections elf_s390_finish_dynamic_sections #define elf_backend_finish_dynamic_symbol elf_s390_finish_dynamic_symbol #define elf_backend_gc_mark_hook elf_s390_gc_mark_hook #define elf_backend_gc_sweep_hook elf_s390_gc_sweep_hook +#define elf_backend_reloc_type_class elf_s390_reloc_type_class #define elf_backend_relocate_section elf_s390_relocate_section #define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections #define elf_backend_reloc_type_class elf_s390_reloc_type_class diff -uprN binutils-2.11.92.0.10/bfd/elf64-sparc.c binutils-2.11.92.0.12/bfd/elf64-sparc.c --- binutils-2.11.92.0.10/bfd/elf64-sparc.c Mon Oct 1 15:25:21 2001 +++ binutils-2.11.92.0.12/bfd/elf64-sparc.c Fri Nov 16 14:05:51 2001 @@ -1786,7 +1786,7 @@ sparc64_elf_size_dynamic_sections (outpu int reg; struct sparc64_elf_app_reg * app_regs; - struct bfd_strtab_hash *dynstr; + struct elf_strtab_hash *dynstr; struct elf_link_hash_table *eht = elf_hash_table (info); if (!info->shared) @@ -1840,7 +1840,7 @@ sparc64_elf_size_dynamic_sections (outpu entry->isym.st_size = 0; if (*app_regs [reg].name != '\0') entry->isym.st_name - = _bfd_stringtab_add (dynstr, app_regs[reg].name, true, false); + = _bfd_elf_strtab_add (dynstr, app_regs[reg].name, false); else entry->isym.st_name = 0; entry->isym.st_other = 0; @@ -2103,7 +2103,7 @@ sparc64_elf_relocate_section (output_bfd /* When generating a shared object, these relocations are copied into the output file to be resolved at run time. */ - if (info->shared && (input_section->flags & SEC_ALLOC)) + if (info->shared && r_symndx != 0 && (input_section->flags & SEC_ALLOC)) { switch (r_type) { @@ -2627,6 +2627,16 @@ sparc64_elf_relocate_section (output_bfd { const char *name; + /* The Solaris native linker silently disregards + overflows. We don't, but this breaks stabs debugging + info, whose relocations are only 32-bits wide. Ignore + overflows in this case. */ + if (r_type == R_SPARC_32 + && (input_section->flags & SEC_DEBUGGING) != 0 + && strcmp (bfd_section_name (input_bfd, input_section), + ".stab") == 0) + break; + if (h != NULL) { if (h->root.type == bfd_link_hash_undefweak diff -uprN binutils-2.11.92.0.10/bfd/elf64-x86-64.c binutils-2.11.92.0.12/bfd/elf64-x86-64.c --- binutils-2.11.92.0.10/bfd/elf64-x86-64.c Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/elf64-x86-64.c Fri Nov 16 14:05:51 2001 @@ -1442,7 +1442,9 @@ elf64_x86_64_relocate_section (output_bf 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 && (input_section->flags & SEC_ALLOC) != 0) + if (info->shared + && r_symndx != 0 + && (input_section->flags & SEC_ALLOC) != 0) { Elf_Internal_Rela outrel; boolean skip, relocate; diff -uprN binutils-2.11.92.0.10/bfd/elfcode.h binutils-2.11.92.0.12/bfd/elfcode.h --- binutils-2.11.92.0.10/bfd/elfcode.h Fri Oct 19 23:57:48 2001 +++ binutils-2.11.92.0.12/bfd/elfcode.h Fri Nov 16 14:05:51 2001 @@ -123,6 +123,8 @@ Foundation, Inc., 59 Temple Place - Suit #define elf_slurp_reloc_table NAME(bfd_elf,slurp_reloc_table) #define elf_link_create_dynamic_sections \ NAME(bfd_elf,link_create_dynamic_sections) +#define elf_bfd_discard_info NAME(bfd_elf,discard_info) +#define elf_reloc_symbol_deleted_p NAME(_bfd_elf,reloc_symbol_deleted_p) #define elf_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol #define elf_bfd_final_link NAME(bfd_elf,bfd_final_link) #define elf_create_pointer_linker_section NAME(bfd_elf,create_pointer_linker_section) diff -uprN binutils-2.11.92.0.10/bfd/elfcore.h binutils-2.11.92.0.12/bfd/elfcore.h --- binutils-2.11.92.0.10/bfd/elfcore.h Mon Oct 1 15:25:21 2001 +++ binutils-2.11.92.0.12/bfd/elfcore.h Fri Nov 16 14:05:51 2001 @@ -85,9 +85,18 @@ elf_core_file_p (abfd) unsigned int phindex; struct elf_backend_data *ebd; struct elf_obj_tdata *preserved_tdata = elf_tdata (abfd); + struct sec *preserved_sections = abfd->sections; + unsigned int preserved_section_count = abfd->section_count; + enum bfd_architecture previous_arch = bfd_get_arch (abfd); + unsigned long previous_mach = bfd_get_mach (abfd); struct elf_obj_tdata *new_tdata = NULL; bfd_size_type amt; + /* Clear section information, since there might be a recognized bfd that + we now check if we can replace, and we don't want to append to it. */ + abfd->sections = NULL; + abfd->section_count = 0; + /* Read in the ELF header in external format. */ if (bfd_bread ((PTR) &x_ehdr, (bfd_size_type) sizeof (x_ehdr), abfd) != sizeof (x_ehdr)) @@ -234,6 +243,16 @@ elf_core_file_p (abfd) return abfd->xvec; wrong: + /* There is way too much undoing of half-known state here. The caller, + bfd_check_format_matches, really shouldn't iterate on live bfd's to + check match/no-match like it does. We have to rely on that a call to + bfd_default_set_arch_mach with the previously known mach, undoes what + was done by the first bfd_default_set_arch_mach (with mach 0) here. + For this to work, only elf-data and the mach may be changed by the + target-specific elf_backend_object_p function. Note that saving the + whole bfd here and restoring it would be even worse; the first thing + you notice is that the cached bfd file position gets out of sync. */ + bfd_default_set_arch_mach (abfd, previous_arch, previous_mach); bfd_set_error (bfd_error_wrong_format); fail: if (i_phdrp != NULL) @@ -241,5 +260,7 @@ fail: if (new_tdata != NULL) bfd_release (abfd, new_tdata); elf_tdata (abfd) = preserved_tdata; + abfd->sections = preserved_sections; + abfd->section_count = preserved_section_count; return NULL; } diff -uprN binutils-2.11.92.0.10/bfd/elflink.c binutils-2.11.92.0.12/bfd/elflink.c --- binutils-2.11.92.0.10/bfd/elflink.c Mon Oct 1 15:25:21 2001 +++ binutils-2.11.92.0.12/bfd/elflink.c Fri Nov 16 14:05:51 2001 @@ -230,7 +230,7 @@ _bfd_elf_link_record_dynamic_symbol (inf { if (h->dynindx == -1) { - struct bfd_strtab_hash *dynstr; + struct elf_strtab_hash *dynstr; char *p, *alc; const char *name; boolean copy; @@ -262,7 +262,7 @@ _bfd_elf_link_record_dynamic_symbol (inf if (dynstr == NULL) { /* Create a strtab to hold the dynamic symbol names. */ - elf_hash_table (info)->dynstr = dynstr = _bfd_elf_stringtab_init (); + elf_hash_table (info)->dynstr = dynstr = _bfd_elf_strtab_init (); if (dynstr == NULL) return false; } @@ -287,7 +287,7 @@ _bfd_elf_link_record_dynamic_symbol (inf copy = true; } - indx = _bfd_stringtab_add (dynstr, name, true, copy); + indx = _bfd_elf_strtab_add (dynstr, name, copy); if (alc != NULL) free (alc); diff -uprN binutils-2.11.92.0.10/bfd/elflink.h binutils-2.11.92.0.12/bfd/elflink.h --- binutils-2.11.92.0.10/bfd/elflink.h Fri Oct 19 23:57:48 2001 +++ binutils-2.11.92.0.12/bfd/elflink.h Sun Nov 25 12:11:17 2001 @@ -39,11 +39,18 @@ static boolean elf_link_add_object_symbo static boolean elf_link_add_archive_symbols PARAMS ((bfd *, struct bfd_link_info *)); static boolean elf_merge_symbol - PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *, - asection **, bfd_vma *, struct elf_link_hash_entry **, - boolean *, boolean *, boolean *, boolean)); + PARAMS ((bfd *, struct bfd_link_info *, const char *, + Elf_Internal_Sym *, asection **, bfd_vma *, + struct elf_link_hash_entry **, boolean *, boolean *, + boolean *, boolean)); +static boolean elf_add_default_symbol + PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, + const char *, Elf_Internal_Sym *, asection **, bfd_vma *, + boolean *, boolean, boolean)); static boolean elf_export_symbol PARAMS ((struct elf_link_hash_entry *, PTR)); +static boolean elf_finalize_dynstr + PARAMS ((bfd *, struct bfd_link_info *)); static boolean elf_fix_symbol_flags PARAMS ((struct elf_link_hash_entry *, struct elf_info_failed *)); static boolean elf_adjust_dynamic_symbol @@ -73,6 +80,8 @@ static int elf_link_sort_cmp2 PARAMS ((const void *, const void *)); static size_t elf_link_sort_relocs PARAMS ((bfd *, struct bfd_link_info *, asection **)); +static boolean elf_section_ignore_discarded_relocs + PARAMS ((asection *)); static boolean elf_link_check_versioned_symbol PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); @@ -1042,6 +1051,243 @@ elf_merge_symbol (abfd, info, name, sym, return true; } +/* This function is called to create an indirect symbol from the + default for the symbol with the default version if needed. The + symbol is described by H, NAME, SYM, SEC, VALUE, and OVERRIDE. We + set DYNSYM if the new indirect symbol is dynamic. DT_NEEDED + indicates if it comes from a DT_NEEDED entry of a shared object. */ + +static boolean +elf_add_default_symbol (abfd, info, h, name, sym, sec, value, + dynsym, override, dt_needed) + bfd *abfd; + struct bfd_link_info *info; + struct elf_link_hash_entry *h; + const char *name; + Elf_Internal_Sym *sym; + asection **sec; + bfd_vma *value; + boolean *dynsym; + boolean override; + boolean dt_needed; +{ + boolean type_change_ok; + boolean size_change_ok; + char *shortname; + struct elf_link_hash_entry *hi; + struct elf_backend_data *bed; + boolean collect; + boolean dynamic; + char *p; + + /* If this symbol has a version, and it is the default version, we + create an indirect symbol from the default name to the fully + decorated name. This will cause external references which do not + specify a version to be bound to this version of the symbol. */ + p = strchr (name, ELF_VER_CHR); + if (p == NULL || p[1] != ELF_VER_CHR) + return true; + + if (override) + { + /* We are overridden by an old defition. We need to check if we + need to crreate the indirect symbol from the default name. */ + hi = elf_link_hash_lookup (elf_hash_table (info), name, true, + false, false); + BFD_ASSERT (hi != NULL); + if (hi == h) + return true; + while (hi->root.type == bfd_link_hash_indirect + || hi->root.type == bfd_link_hash_warning) + { + hi = (struct elf_link_hash_entry *) hi->root.u.i.link; + if (hi == h) + return true; + } + } + + bed = get_elf_backend_data (abfd); + collect = bed->collect; + dynamic = (abfd->flags & DYNAMIC) != 0; + + shortname = bfd_hash_allocate (&info->hash->table, + (size_t) (p - name + 1)); + if (shortname == NULL) + return false; + strncpy (shortname, name, (size_t) (p - name)); + shortname [p - name] = '\0'; + + /* We are going to create a new symbol. Merge it with any existing + symbol with this name. For the purposes of the merge, act as + though we were defining the symbol we just defined, although we + actually going to define an indirect symbol. */ + type_change_ok = false; + size_change_ok = false; + if (! elf_merge_symbol (abfd, info, shortname, sym, sec, value, + &hi, &override, &type_change_ok, + &size_change_ok, dt_needed)) + return false; + + if (! override) + { + if (! (_bfd_generic_link_add_one_symbol + (info, abfd, shortname, BSF_INDIRECT, bfd_ind_section_ptr, + (bfd_vma) 0, name, false, collect, + (struct bfd_link_hash_entry **) &hi))) + return false; + } + else + { + /* In this case the symbol named SHORTNAME is overriding the + indirect symbol we want to add. We were planning on making + SHORTNAME an indirect symbol referring to NAME. SHORTNAME + is the name without a version. NAME is the fully versioned + name, and it is the default version. + + Overriding means that we already saw a definition for the + symbol SHORTNAME in a regular object, and it is overriding + the symbol defined in the dynamic object. + + When this happens, we actually want to change NAME, the + symbol we just added, to refer to SHORTNAME. This will cause + references to NAME in the shared object to become references + to SHORTNAME in the regular object. This is what we expect + when we override a function in a shared object: that the + references in the shared object will be mapped to the + definition in the regular object. */ + + while (hi->root.type == bfd_link_hash_indirect + || hi->root.type == bfd_link_hash_warning) + hi = (struct elf_link_hash_entry *) hi->root.u.i.link; + + h->root.type = bfd_link_hash_indirect; + h->root.u.i.link = (struct bfd_link_hash_entry *) hi; + if (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) + { + h->elf_link_hash_flags &=~ ELF_LINK_HASH_DEF_DYNAMIC; + hi->elf_link_hash_flags |= ELF_LINK_HASH_REF_DYNAMIC; + if (hi->elf_link_hash_flags + & (ELF_LINK_HASH_REF_REGULAR + | ELF_LINK_HASH_DEF_REGULAR)) + { + if (! _bfd_elf_link_record_dynamic_symbol (info, hi)) + return false; + } + } + + /* Now set HI to H, so that the following code will set the + other fields correctly. */ + hi = h; + } + + /* If there is a duplicate definition somewhere, then HI may not + point to an indirect symbol. We will have reported an error to + the user in that case. */ + + if (hi->root.type == bfd_link_hash_indirect) + { + struct elf_link_hash_entry *ht; + + /* If the symbol became indirect, then we assume that we have + not seen a definition before. */ + BFD_ASSERT ((hi->elf_link_hash_flags + & (ELF_LINK_HASH_DEF_DYNAMIC + | ELF_LINK_HASH_DEF_REGULAR)) == 0); + + ht = (struct elf_link_hash_entry *) hi->root.u.i.link; + (*bed->elf_backend_copy_indirect_symbol) (ht, hi); + + /* See if the new flags lead us to realize that the symbol must + be dynamic. */ + if (! *dynsym) + { + if (! dynamic) + { + if (info->shared + || ((hi->elf_link_hash_flags + & ELF_LINK_HASH_REF_DYNAMIC) != 0)) + *dynsym = true; + } + else + { + if ((hi->elf_link_hash_flags + & ELF_LINK_HASH_REF_REGULAR) != 0) + *dynsym = true; + } + } + } + + /* We also need to define an indirection from the nondefault version + of the symbol. */ + + shortname = bfd_hash_allocate (&info->hash->table, strlen (name)); + if (shortname == NULL) + return false; + strncpy (shortname, name, (size_t) (p - name)); + strcpy (shortname + (p - name), p + 1); + + /* Once again, merge with any existing symbol. */ + type_change_ok = false; + size_change_ok = false; + if (! elf_merge_symbol (abfd, info, shortname, sym, sec, value, + &hi, &override, &type_change_ok, + &size_change_ok, dt_needed)) + return false; + + if (override) + { + /* Here SHORTNAME is a versioned name, so we don't expect to see + the type of override we do in the case above. */ + (*_bfd_error_handler) + (_("%s: warning: unexpected redefinition of `%s'"), + bfd_archive_filename (abfd), shortname); + } + else + { + if (! (_bfd_generic_link_add_one_symbol + (info, abfd, shortname, BSF_INDIRECT, + bfd_ind_section_ptr, (bfd_vma) 0, name, false, + collect, (struct bfd_link_hash_entry **) &hi))) + return false; + + /* If there is a duplicate definition somewhere, then HI may not + point to an indirect symbol. We will have reported an error + to the user in that case. */ + + if (hi->root.type == bfd_link_hash_indirect) + { + /* If the symbol became indirect, then we assume that we have + not seen a definition before. */ + BFD_ASSERT ((hi->elf_link_hash_flags + & (ELF_LINK_HASH_DEF_DYNAMIC + | ELF_LINK_HASH_DEF_REGULAR)) == 0); + + (*bed->elf_backend_copy_indirect_symbol) (h, hi); + + /* See if the new flags lead us to realize that the symbol + must be dynamic. */ + if (! *dynsym) + { + if (! dynamic) + { + if (info->shared + || ((hi->elf_link_hash_flags + & ELF_LINK_HASH_REF_DYNAMIC) != 0)) + *dynsym = true; + } + else + { + if ((hi->elf_link_hash_flags + & ELF_LINK_HASH_REF_REGULAR) != 0) + *dynsym = true; + } + } + } + } + + return true; +} + /* Add symbols from an ELF object file to the linker hash table. */ static boolean @@ -1446,13 +1692,12 @@ elf_link_add_object_symbols (abfd, info) if (add_needed) { /* Add a DT_NEEDED entry for this dynamic object. */ - oldsize = _bfd_stringtab_size (hash_table->dynstr); - strindex = _bfd_stringtab_add (hash_table->dynstr, name, - true, false); + oldsize = _bfd_elf_strtab_size (hash_table->dynstr); + strindex = _bfd_elf_strtab_add (hash_table->dynstr, name, false); if (strindex == (bfd_size_type) -1) goto error_return; - if (oldsize == _bfd_stringtab_size (hash_table->dynstr)) + if (oldsize == _bfd_elf_strtab_size (hash_table->dynstr)) { asection *sdyn; Elf_External_Dyn *dyncon, *dynconend; @@ -1480,6 +1725,7 @@ elf_link_add_object_symbols (abfd, info) free (buf); if (extversym != NULL) free (extversym); + _bfd_elf_strtab_delref (hash_table->dynstr, strindex); return true; } } @@ -1521,6 +1767,9 @@ elf_link_add_object_symbols (abfd, info) boolean size_change_ok, type_change_ok; boolean new_weakdef; unsigned int old_alignment; + boolean override; + + override = false; elf_swap_symbol_in (abfd, esym, &sym); @@ -1611,7 +1860,6 @@ elf_link_add_object_symbols (abfd, info) { Elf_Internal_Versym iver; unsigned int vernum = 0; - boolean override; if (ever != NULL) { @@ -1883,217 +2131,13 @@ elf_link_add_object_symbols (abfd, info) h->elf_link_hash_flags |= new_flag; - /* If this symbol has a version, and it is the default - version, we create an indirect symbol from the default - name to the fully decorated name. This will cause - external references which do not specify a version to be - bound to this version of the symbol. */ + /* Check to see if we need to add an indirect symbol for + the default name. */ if (definition || h->root.type == bfd_link_hash_common) - { - char *p; - - p = strchr (name, ELF_VER_CHR); - if (p != NULL && p[1] == ELF_VER_CHR) - { - char *shortname; - struct elf_link_hash_entry *hi; - boolean override; - - shortname = bfd_hash_allocate (&info->hash->table, - (size_t) (p - name + 1)); - if (shortname == NULL) - goto error_return; - strncpy (shortname, name, (size_t) (p - name)); - shortname[p - name] = '\0'; - - /* We are going to create a new symbol. Merge it - with any existing symbol with this name. For the - purposes of the merge, act as though we were - defining the symbol we just defined, although we - actually going to define an indirect symbol. */ - type_change_ok = false; - size_change_ok = false; - if (! elf_merge_symbol (abfd, info, shortname, &sym, &sec, - &value, &hi, &override, - &type_change_ok, - &size_change_ok, dt_needed)) - goto error_return; - - if (! override) - { - if (! (_bfd_generic_link_add_one_symbol - (info, abfd, shortname, BSF_INDIRECT, - bfd_ind_section_ptr, (bfd_vma) 0, name, false, - collect, (struct bfd_link_hash_entry **) &hi))) - goto error_return; - } - else - { - /* In this case the symbol named SHORTNAME is - overriding the indirect symbol we want to - add. We were planning on making SHORTNAME an - indirect symbol referring to NAME. SHORTNAME - is the name without a version. NAME is the - fully versioned name, and it is the default - version. - - Overriding means that we already saw a - definition for the symbol SHORTNAME in a - regular object, and it is overriding the - symbol defined in the dynamic object. - - When this happens, we actually want to change - NAME, the symbol we just added, to refer to - SHORTNAME. This will cause references to - NAME in the shared object to become - references to SHORTNAME in the regular - object. This is what we expect when we - override a function in a shared object: that - the references in the shared object will be - mapped to the definition in the regular - object. */ - - while (hi->root.type == bfd_link_hash_indirect - || hi->root.type == bfd_link_hash_warning) - hi = (struct elf_link_hash_entry *) hi->root.u.i.link; - - h->root.type = bfd_link_hash_indirect; - h->root.u.i.link = (struct bfd_link_hash_entry *) hi; - if (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) - { - h->elf_link_hash_flags &=~ ELF_LINK_HASH_DEF_DYNAMIC; - hi->elf_link_hash_flags |= ELF_LINK_HASH_REF_DYNAMIC; - if (hi->elf_link_hash_flags - & (ELF_LINK_HASH_REF_REGULAR - | ELF_LINK_HASH_DEF_REGULAR)) - { - if (! _bfd_elf_link_record_dynamic_symbol (info, - hi)) - goto error_return; - } - } - - /* Now set HI to H, so that the following code - will set the other fields correctly. */ - hi = h; - } - - /* If there is a duplicate definition somewhere, - then HI may not point to an indirect symbol. We - will have reported an error to the user in that - case. */ - - if (hi->root.type == bfd_link_hash_indirect) - { - struct elf_link_hash_entry *ht; - - /* If the symbol became indirect, then we assume - that we have not seen a definition before. */ - BFD_ASSERT ((hi->elf_link_hash_flags - & (ELF_LINK_HASH_DEF_DYNAMIC - | ELF_LINK_HASH_DEF_REGULAR)) - == 0); - - ht = (struct elf_link_hash_entry *) hi->root.u.i.link; - (*bed->elf_backend_copy_indirect_symbol) (ht, hi); - - /* See if the new flags lead us to realize that - the symbol must be dynamic. */ - if (! dynsym) - { - if (! dynamic) - { - if (info->shared - || ((hi->elf_link_hash_flags - & ELF_LINK_HASH_REF_DYNAMIC) - != 0)) - dynsym = true; - } - else - { - if ((hi->elf_link_hash_flags - & ELF_LINK_HASH_REF_REGULAR) != 0) - dynsym = true; - } - } - } - - /* We also need to define an indirection from the - nondefault version of the symbol. */ - - shortname = bfd_hash_allocate (&info->hash->table, - strlen (name)); - if (shortname == NULL) - goto error_return; - strncpy (shortname, name, (size_t) (p - name)); - strcpy (shortname + (p - name), p + 1); - - /* Once again, merge with any existing symbol. */ - type_change_ok = false; - size_change_ok = false; - if (! elf_merge_symbol (abfd, info, shortname, &sym, &sec, - &value, &hi, &override, - &type_change_ok, - &size_change_ok, dt_needed)) - goto error_return; - - if (override) - { - /* Here SHORTNAME is a versioned name, so we - don't expect to see the type of override we - do in the case above. */ - (*_bfd_error_handler) - (_("%s: warning: unexpected redefinition of `%s'"), - bfd_archive_filename (abfd), shortname); - } - else - { - if (! (_bfd_generic_link_add_one_symbol - (info, abfd, shortname, BSF_INDIRECT, - bfd_ind_section_ptr, (bfd_vma) 0, name, false, - collect, (struct bfd_link_hash_entry **) &hi))) - goto error_return; - - /* If there is a duplicate definition somewhere, - then HI may not point to an indirect symbol. - We will have reported an error to the user in - that case. */ - - if (hi->root.type == bfd_link_hash_indirect) - { - /* If the symbol became indirect, then we - assume that we have not seen a definition - before. */ - BFD_ASSERT ((hi->elf_link_hash_flags - & (ELF_LINK_HASH_DEF_DYNAMIC - | ELF_LINK_HASH_DEF_REGULAR)) - == 0); - - (*bed->elf_backend_copy_indirect_symbol) (h, hi); - - /* See if the new flags lead us to realize - that the symbol must be dynamic. */ - if (! dynsym) - { - if (! dynamic) - { - if (info->shared - || ((hi->elf_link_hash_flags - & ELF_LINK_HASH_REF_DYNAMIC) - != 0)) - dynsym = true; - } - else - { - if ((hi->elf_link_hash_flags - & ELF_LINK_HASH_REF_REGULAR) != 0) - dynsym = true; - } - } - } - } - } - } + if (! elf_add_default_symbol (abfd, info, h, name, &sym, + &sec, &value, &dynsym, + override, dt_needed)) + goto error_return; if (dynsym && h->dynindx == -1) { @@ -2117,6 +2161,8 @@ elf_link_add_object_symbols (abfd, info) case STV_HIDDEN: h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; (*bed->elf_backend_hide_symbol) (info, h); + _bfd_elf_strtab_delref (hash_table->dynstr, + h->dynstr_index); break; } @@ -2135,15 +2181,13 @@ elf_link_add_object_symbols (abfd, info) have to make sure there is a DT_NEEDED entry for it. */ dt_needed = false; - oldsize = _bfd_stringtab_size (hash_table->dynstr); - strindex = _bfd_stringtab_add (hash_table->dynstr, - elf_dt_soname (abfd), - true, false); + oldsize = _bfd_elf_strtab_size (hash_table->dynstr); + strindex = _bfd_elf_strtab_add (hash_table->dynstr, + elf_dt_soname (abfd), false); if (strindex == (bfd_size_type) -1) goto error_return; - if (oldsize - == _bfd_stringtab_size (hash_table->dynstr)) + if (oldsize == _bfd_elf_strtab_size (hash_table->dynstr)) { asection *sdyn; Elf_External_Dyn *dyncon, *dynconend; @@ -2458,7 +2502,7 @@ elf_link_create_dynamic_sections (abfd, /* Create a strtab to hold the dynamic symbol names. */ if (elf_hash_table (info)->dynstr == NULL) { - elf_hash_table (info)->dynstr = elf_stringtab_init (); + elf_hash_table (info)->dynstr = _bfd_elf_strtab_init (); if (elf_hash_table (info)->dynstr == NULL) return false; } @@ -2558,7 +2602,7 @@ elf_link_record_local_dynamic_symbol (in { struct elf_link_local_dynamic_entry *entry; struct elf_link_hash_table *eht; - struct bfd_strtab_hash *dynstr; + struct elf_strtab_hash *dynstr; Elf_External_Sym esym; unsigned long dynstr_index; char *name; @@ -2594,12 +2638,12 @@ elf_link_record_local_dynamic_symbol (in if (dynstr == NULL) { /* Create a strtab to hold the dynamic symbol names. */ - elf_hash_table (info)->dynstr = dynstr = _bfd_elf_stringtab_init (); + elf_hash_table (info)->dynstr = dynstr = _bfd_elf_strtab_init (); if (dynstr == NULL) return false; } - dynstr_index = _bfd_stringtab_add (dynstr, name, true, false); + dynstr_index = _bfd_elf_strtab_add (dynstr, name, false); if (dynstr_index == (unsigned long) -1) return false; entry->isym.st_name = dynstr_index; @@ -3117,8 +3161,8 @@ NAME(bfd_elf,size_dynamic_sections) (out if (soname != NULL) { - soname_indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr, - soname, true, true); + soname_indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, + soname, true); if (soname_indx == (bfd_size_type) -1 || ! elf_add_dynamic_entry (info, (bfd_vma) DT_SONAME, soname_indx)) @@ -3137,8 +3181,10 @@ NAME(bfd_elf,size_dynamic_sections) (out { bfd_size_type indx; - indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr, rpath, - true, true); + indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, rpath, + true); + if (info->new_dtags) + _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr, indx); if (indx == (bfd_size_type) -1 || ! elf_add_dynamic_entry (info, (bfd_vma) DT_RPATH, indx) || (info->new_dtags @@ -3151,8 +3197,8 @@ NAME(bfd_elf,size_dynamic_sections) (out { bfd_size_type indx; - indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr, - filter_shlib, true, true); + indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, + filter_shlib, true); if (indx == (bfd_size_type) -1 || ! elf_add_dynamic_entry (info, (bfd_vma) DT_FILTER, indx)) return false; @@ -3166,8 +3212,8 @@ NAME(bfd_elf,size_dynamic_sections) (out { bfd_size_type indx; - indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr, - *p, true, true); + indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, + *p, true); if (indx == (bfd_size_type) -1 || ! elf_add_dynamic_entry (info, (bfd_vma) DT_AUXILIARY, indx)) @@ -3249,7 +3295,7 @@ NAME(bfd_elf,size_dynamic_sections) (out { bfd_size_type strsize; - strsize = _bfd_stringtab_size (elf_hash_table (info)->dynstr); + strsize = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr); if (! elf_add_dynamic_entry (info, (bfd_vma) DT_HASH, (bfd_vma) 0) || ! elf_add_dynamic_entry (info, (bfd_vma) DT_STRTAB, (bfd_vma) 0) || ! elf_add_dynamic_entry (info, (bfd_vma) DT_SYMTAB, (bfd_vma) 0) @@ -3332,6 +3378,8 @@ NAME(bfd_elf,size_dynamic_sections) (out if (soname_indx != (bfd_size_type) -1) { + _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr, + soname_indx); def.vd_hash = bfd_elf_hash (soname); defaux.vda_name = soname_indx; } @@ -3342,8 +3390,8 @@ NAME(bfd_elf,size_dynamic_sections) (out name = basename (output_bfd->filename); def.vd_hash = bfd_elf_hash (name); - indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr, - name, true, false); + indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, + name, false); if (indx == (bfd_size_type) -1) return false; defaux.vda_name = indx; @@ -3402,6 +3450,8 @@ NAME(bfd_elf,size_dynamic_sections) (out p += sizeof (Elf_External_Verdef); defaux.vda_name = h->dynstr_index; + _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr, + h->dynstr_index); if (t->deps == NULL) defaux.vda_next = 0; else @@ -3421,7 +3471,11 @@ NAME(bfd_elf,size_dynamic_sections) (out defaux.vda_name = 0; } else - defaux.vda_name = n->version_needed->name_indx; + { + defaux.vda_name = n->version_needed->name_indx; + _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr, + defaux.vda_name); + } if (n->next == NULL) defaux.vda_next = 0; else @@ -3520,14 +3574,11 @@ NAME(bfd_elf,size_dynamic_sections) (out t->vn_version = VER_NEED_CURRENT; t->vn_cnt = caux; - if (elf_dt_name (t->vn_bfd) != NULL) - indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr, - elf_dt_name (t->vn_bfd), - true, false); - else - indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr, - basename (t->vn_bfd->filename), - true, false); + indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, + elf_dt_name (t->vn_bfd) != NULL + ? elf_dt_name (t->vn_bfd) + : basename (t->vn_bfd->filename), + false); if (indx == (bfd_size_type) -1) return false; t->vn_file = indx; @@ -3545,8 +3596,8 @@ NAME(bfd_elf,size_dynamic_sections) (out for (a = t->vn_auxptr; a != NULL; a = a->vna_nextptr) { a->vna_hash = bfd_elf_hash (a->vna_nodename); - indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr, - a->vna_nodename, true, false); + indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, + a->vna_nodename, false); if (indx == (bfd_size_type) -1) return false; a->vna_name = indx; @@ -3650,7 +3701,10 @@ NAME(bfd_elf,size_dynamic_sections) (out s = bfd_get_section_by_name (dynobj, ".dynstr"); BFD_ASSERT (s != NULL); - s->_raw_size = _bfd_stringtab_size (elf_hash_table (info)->dynstr); + + elf_finalize_dynstr (output_bfd, info); + + s->_raw_size = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr); for (dtagcount = 0; dtagcount <= info->spare_dynamic_tags; ++dtagcount) if (! elf_add_dynamic_entry (info, (bfd_vma) DT_NULL, (bfd_vma) 0)) @@ -3660,6 +3714,150 @@ NAME(bfd_elf,size_dynamic_sections) (out return true; } +/* 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; + PTR data; +{ + struct elf_strtab_hash *dynstr = (struct elf_strtab_hash *) data; + + if (h->dynindx != -1) + h->dynstr_index = _bfd_elf_strtab_offset (dynstr, h->dynstr_index); + return true; +} + +/* Assign string offsets in .dynstr, update all structures referencing + them. */ + +static boolean +elf_finalize_dynstr (output_bfd, info) + bfd *output_bfd; + struct bfd_link_info *info; +{ + struct elf_link_local_dynamic_entry *entry; + struct elf_strtab_hash *dynstr = elf_hash_table (info)->dynstr; + bfd *dynobj = elf_hash_table (info)->dynobj; + asection *sdyn; + bfd_size_type size; + Elf_External_Dyn *dyncon, *dynconend; + + _bfd_elf_strtab_finalize (dynstr); + size = _bfd_elf_strtab_size (dynstr); + + /* Update all .dynamic entries referencing .dynstr strings. */ + sdyn = bfd_get_section_by_name (dynobj, ".dynamic"); + BFD_ASSERT (sdyn != NULL); + + dyncon = (Elf_External_Dyn *) sdyn->contents; + dynconend = (Elf_External_Dyn *) (sdyn->contents + + sdyn->_raw_size); + for (; dyncon < dynconend; dyncon++) + { + Elf_Internal_Dyn dyn; + + elf_swap_dyn_in (dynobj, dyncon, & dyn); + switch (dyn.d_tag) + { + case DT_STRSZ: + dyn.d_un.d_val = size; + elf_swap_dyn_out (dynobj, & dyn, dyncon); + break; + case DT_NEEDED: + case DT_SONAME: + case DT_RPATH: + case DT_RUNPATH: + case DT_FILTER: + case DT_AUXILIARY: + dyn.d_un.d_val = _bfd_elf_strtab_offset (dynstr, dyn.d_un.d_val); + elf_swap_dyn_out (dynobj, & dyn, dyncon); + break; + default: + break; + } + } + + /* Now update local dynamic symbols. */ + for (entry = elf_hash_table (info)->dynlocal; entry ; entry = entry->next) + entry->isym.st_name = _bfd_elf_strtab_offset (dynstr, + entry->isym.st_name); + + /* And the rest of dynamic symbols. */ + elf_link_hash_traverse (elf_hash_table (info), + elf_adjust_dynstr_offsets, dynstr); + + /* Adjust version definitions. */ + if (elf_tdata (output_bfd)->cverdefs) + { + asection *s; + bfd_byte *p; + 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 + { + _bfd_elf_swap_verdef_in (output_bfd, (Elf_External_Verdef *) p, + &def); + p += sizeof (Elf_External_Verdef); + for (i = 0; i < def.vd_cnt; ++i) + { + _bfd_elf_swap_verdaux_in (output_bfd, + (Elf_External_Verdaux *) p, &defaux); + defaux.vda_name = _bfd_elf_strtab_offset (dynstr, + defaux.vda_name); + _bfd_elf_swap_verdaux_out (output_bfd, + &defaux, (Elf_External_Verdaux *) p); + p += sizeof (Elf_External_Verdaux); + } + } + while (def.vd_next); + } + + /* Adjust version references. */ + if (elf_tdata (output_bfd)->verref) + { + asection *s; + bfd_byte *p; + 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 + { + _bfd_elf_swap_verneed_in (output_bfd, (Elf_External_Verneed *) p, + &need); + need.vn_file = _bfd_elf_strtab_offset (dynstr, need.vn_file); + _bfd_elf_swap_verneed_out (output_bfd, &need, + (Elf_External_Verneed *) p); + p += sizeof (Elf_External_Verneed); + for (i = 0; i < need.vn_cnt; ++i) + { + _bfd_elf_swap_vernaux_in (output_bfd, + (Elf_External_Vernaux *) p, &needaux); + needaux.vna_name = _bfd_elf_strtab_offset (dynstr, + needaux.vna_name); + _bfd_elf_swap_vernaux_out (output_bfd, + &needaux, + (Elf_External_Vernaux *) p); + p += sizeof (Elf_External_Vernaux); + } + } + while (need.vn_next); + } + + return true; +} + /* Fix up the flags for a symbol. This handles various cases which can only be fixed after all the input files are seen. This is currently called by both adjust_dynamic_symbol and @@ -3759,7 +3957,11 @@ elf_fix_symbol_flags (h, eif) bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj); if (ELF_ST_VISIBILITY (h->other) == STV_INTERNAL || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN) - h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; + { + h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; + _bfd_elf_strtab_delref (elf_hash_table (eif->info)->dynstr, + h->dynstr_index); + } (*bed->elf_backend_hide_symbol) (eif->info, h); } @@ -4144,9 +4346,8 @@ elf_link_assign_sym_version (h, data) { h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; (*bed->elf_backend_hide_symbol) (info, h); - /* FIXME: The name of the symbol has - already been recorded in the dynamic - string table section. */ + _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr, + h->dynstr_index); } break; @@ -4257,9 +4458,8 @@ elf_link_assign_sym_version (h, data) { h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; (*bed->elf_backend_hide_symbol) (info, h); - /* FIXME: The name of the symbol has already - been recorded in the dynamic string table - section. */ + _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr, + h->dynstr_index); } break; } @@ -4279,8 +4479,8 @@ elf_link_assign_sym_version (h, data) { h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; (*bed->elf_backend_hide_symbol) (info, h); - /* FIXME: The name of the symbol has already been - recorded in the dynamic string table section. */ + _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr, + h->dynstr_index); } } } @@ -5476,8 +5676,8 @@ elf_bfd_final_link (abfd, info) stringtab. */ off = elf_section_data (o->output_section)->this_hdr.sh_offset; if (bfd_seek (abfd, off, SEEK_SET) != 0 - || ! _bfd_stringtab_emit (abfd, - elf_hash_table (info)->dynstr)) + || ! _bfd_elf_strtab_emit (abfd, + elf_hash_table (info)->dynstr)) goto error_return; } } @@ -5877,7 +6077,8 @@ elf_link_output_extsym (h, data) /* If a symbol is not defined locally, we clear the visibility field. */ - if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) + if (! finfo->info->relocateable + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) sym.st_other ^= ELF_ST_VISIBILITY (sym.st_other); /* If this symbol should be put in the .dynsym section, then put it @@ -6078,8 +6279,7 @@ elf_link_input_bfd (finfo, input_bfd) asection *o; struct elf_backend_data *bed; boolean emit_relocs; - reloc_howto_type *none_howto; - bfd_vma none_r_info; + struct elf_link_hash_entry **sym_hashes; output_bfd = finfo->output_bfd; bed = get_elf_backend_data (output_bfd); @@ -6251,10 +6451,8 @@ elf_link_input_bfd (finfo, input_bfd) return false; } - none_howto = bfd_reloc_type_lookup (output_bfd, BFD_RELOC_NONE); - none_r_info = ELF_R_INFO (0, none_howto->type); - /* Relocate the contents of each section. */ + sym_hashes = elf_sym_hashes (input_bfd); for (o = input_bfd->sections; o != NULL; o = o->next) { bfd_byte *contents; @@ -6302,52 +6500,120 @@ elf_link_input_bfd (finfo, input_bfd) && o->reloc_count > 0) return false; -#if BFD_VERSION_DATE < 20031005 - { - Elf_Internal_Rela *rel, *relend; - /* Run through the relocs looking for any against section - symbols from removed link-once sections. Set any such - relocs to be against 0. We should really complain if - anything in the final link tries to use it, but - DWARF-based exception handling might have an entry in - .eh_frame to describe a routine in the linkonce section, - and it turns out to be hard to remove the .eh_frame entry - too. FIXME. */ - rel = internal_relocs; - relend = rel + o->reloc_count * bed->s->int_rels_per_ext_rel; - for ( ; rel < relend; rel++) - { - unsigned long r_symndx = ELF_R_SYM (rel->r_info); + /* Run through the relocs looking for any against symbols + from discarded sections and section symbols from + removed link-once sections. Complain about relocs + against discarded sections. Zero relocs against removed + link-once sections. We should really complain if + anything in the final link tries to use it, but + DWARF-based exception handling might have an entry in + .eh_frame to describe a routine in the linkonce section, + and it turns out to be hard to remove the .eh_frame + entry too. FIXME. */ + if (!finfo->info->relocateable + && !elf_section_ignore_discarded_relocs (o)) + { + Elf_Internal_Rela *rel, *relend; + + rel = internal_relocs; + relend = rel + o->reloc_count * bed->s->int_rels_per_ext_rel; + for ( ; rel < relend; rel++) + { + unsigned long r_symndx = ELF_R_SYM (rel->r_info); - if (r_symndx < locsymcount - && (!elf_bad_symtab (input_bfd) - || finfo->sections[r_symndx] != NULL)) - { - isym = finfo->internal_syms + r_symndx; - if (ELF_ST_TYPE (isym->st_info) == STT_SECTION) - { - asection *sec = finfo->sections[r_symndx]; + if (r_symndx >= locsymcount + || (elf_bad_symtab (input_bfd) + && finfo->sections[r_symndx] == NULL)) + { + struct elf_link_hash_entry *h; - if (sec != NULL - && (sec->flags & SEC_LINK_ONCE) != 0 - && bfd_is_abs_section (sec->output_section)) - { - rel->r_info = none_r_info; + h = sym_hashes[r_symndx - extsymoff]; + 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; + + /* Complain if the definition comes from a + discarded section. */ + if ((h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + && ! bfd_is_abs_section (h->root.u.def.section) + && bfd_is_abs_section (h->root.u.def.section + ->output_section)) + { +#if BFD_VERSION_DATE < 20031005 + if ((o->flags & SEC_DEBUGGING) != 0) + { +#if BFD_VERSION_DATE > 20021005 + (*finfo->info->callbacks->warning) + (finfo->info, + _("warning: relocation against removed section; zeroing"), + NULL, input_bfd, o, rel->r_offset); +#endif + BFD_ASSERT (r_symndx != 0); + memset (rel, 0, sizeof (*rel)); + } + else +#endif + { + if (! ((*finfo->info->callbacks->undefined_symbol) + (finfo->info, h->root.root.string, + input_bfd, o, rel->r_offset, + true))) + return false; + } + } + } + else + { + asection *sec = finfo->sections[r_symndx]; + if (sec != NULL + && ! bfd_is_abs_section (sec) + && bfd_is_abs_section (sec->output_section)) + { +#if BFD_VERSION_DATE < 20031005 + if ((o->flags & SEC_DEBUGGING) != 0 + || (sec->flags & SEC_LINK_ONCE) != 0) + { #if BFD_VERSION_DATE > 20021005 - (*finfo->info->callbacks->warning) - (finfo->info, - _("warning: relocation against removed section; zeroing"), - NULL, input_bfd, o, rel->r_offset); + (*finfo->info->callbacks->warning) + (finfo->info, + _("warning: relocation against removed section"), + NULL, input_bfd, o, rel->r_offset); #endif - } - } - } - } - } -#else -#error "This kludge ought to be fixed properly in gcc by now" + BFD_ASSERT (r_symndx != 0); + rel->r_info + = ELF_R_INFO (0, ELF_R_TYPE (rel->r_info)); + rel->r_addend = 0; + } + else #endif + { + boolean ok; + const char *msg + = _("local symbols in discarded section %s"); + bfd_size_type amt + = strlen (sec->name) + strlen (msg) - 1; + char *buf = (char *) bfd_malloc (amt); + + if (buf != NULL) + sprintf (buf, msg, sec->name); + else + buf = (char *) sec->name; + ok = (*finfo->info->callbacks + ->undefined_symbol) (finfo->info, buf, + input_bfd, o, + rel->r_offset, + true); + if (buf != sec->name) + free (buf); + if (!ok) + return false; + } + } + } + } + } /* Relocate the section by invoking a back end routine. @@ -6547,7 +6813,12 @@ elf_link_input_bfd (finfo, input_bfd) } /* Write out the modified section contents. */ - if (elf_section_data (o)->stab_info) + if (bed->elf_backend_write_section + && (*bed->elf_backend_write_section) (output_bfd, o, contents)) + { + /* Section written out. */ + } + else if (elf_section_data (o)->stab_info) { if (! (_bfd_write_section_stabs (output_bfd, &elf_hash_table (finfo->info)->stab_info, @@ -7712,3 +7983,197 @@ elf_collect_hash_codes (h, data) return true; } + +boolean +elf_reloc_symbol_deleted_p (offset, cookie) + bfd_vma offset; + PTR cookie; +{ + struct elf_reloc_cookie *rcookie = (struct elf_reloc_cookie *)cookie; + + if (rcookie->bad_symtab) + rcookie->rel = rcookie->rels; + + for (; rcookie->rel < rcookie->relend; rcookie->rel++) + { + unsigned long r_symndx = ELF_R_SYM (rcookie->rel->r_info); + Elf_Internal_Sym isym; + + if (! rcookie->bad_symtab) + if (rcookie->rel->r_offset > offset) + return false; + if (rcookie->rel->r_offset != offset) + continue; + + if (rcookie->locsyms && r_symndx < rcookie->locsymcount) + elf_swap_symbol_in (rcookie->abfd, + (Elf_External_Sym *) rcookie->locsyms + r_symndx, + &isym); + + if (r_symndx >= rcookie->locsymcount + || (rcookie->locsyms + && ELF_ST_BIND (isym.st_info) != STB_LOCAL)) + { + struct elf_link_hash_entry *h; + + h = rcookie->sym_hashes[r_symndx - rcookie->extsymoff]; + + 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) + && ! bfd_is_abs_section (h->root.u.def.section) + && bfd_is_abs_section (h->root.u.def.section + ->output_section)) + return true; + else + return false; + } + else if (rcookie->locsyms) + { + /* It's not a relocation against a global symbol, + but it could be a relocation against a local + symbol for a discarded section. */ + asection *isec; + + /* Need to: get the symbol; get the section. */ + if (isym.st_shndx > 0 && isym.st_shndx < SHN_LORESERVE) + { + isec = section_from_elf_index (rcookie->abfd, isym.st_shndx); + if (isec != NULL + && ! bfd_is_abs_section (isec) + && bfd_is_abs_section (isec->output_section)) + return true; + } + } + return false; + } + return false; +} + +/* Discard unneeded references to discarded sections. + Returns true if any section's size was changed. */ +/* This function assumes that the relocations are in sorted order, + which is true for all known assemblers. */ + +boolean +elf_bfd_discard_info (info) + struct bfd_link_info *info; +{ + struct elf_reloc_cookie cookie; + asection *o; + Elf_Internal_Shdr *symtab_hdr; + Elf_External_Sym *freesyms; + struct elf_backend_data *bed; + bfd *abfd; + boolean ret = false; + + if (info->relocateable + || info->traditional_format + || info->hash->creator->flavour != bfd_target_elf_flavour + || ! is_elf_hash_table (info) + || info->strip == strip_all + || info->strip == strip_debugger) + return false; + for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next) + { + bed = get_elf_backend_data (abfd); + + if ((abfd->flags & DYNAMIC) != 0) + continue; + + o = bfd_get_section_by_name (abfd, ".stab"); + if (! o && ! bed->elf_backend_discard_info) + continue; + + symtab_hdr = &elf_tdata (abfd)->symtab_hdr; + + cookie.abfd = abfd; + cookie.sym_hashes = elf_sym_hashes (abfd); + cookie.bad_symtab = elf_bad_symtab (abfd); + if (cookie.bad_symtab) + { + cookie.locsymcount = + symtab_hdr->sh_size / sizeof (Elf_External_Sym); + cookie.extsymoff = 0; + } + else + { + cookie.locsymcount = symtab_hdr->sh_info; + cookie.extsymoff = symtab_hdr->sh_info; + } + + freesyms = NULL; + if (symtab_hdr->contents) + cookie.locsyms = (void *) symtab_hdr->contents; + else if (cookie.locsymcount == 0) + cookie.locsyms = NULL; + else + { + bfd_size_type amt = cookie.locsymcount * sizeof (Elf_External_Sym); + cookie.locsyms = bfd_malloc (amt); + if (cookie.locsyms == NULL + || bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0 + || bfd_bread (cookie.locsyms, amt, abfd) != amt) + { + /* Something is very wrong - but we can still do our job for + global symbols, so don't give up. */ + if (cookie.locsyms) + free (cookie.locsyms); + cookie.locsyms = NULL; + } + else + { + freesyms = cookie.locsyms; + } + } + + if (o) + { + cookie.rels = (NAME(_bfd_elf,link_read_relocs) + (abfd, o, (PTR) NULL, + (Elf_Internal_Rela *) NULL, + info->keep_memory)); + if (cookie.rels) + { + cookie.rel = cookie.rels; + cookie.relend = + cookie.rels + o->reloc_count * bed->s->int_rels_per_ext_rel; + if (_bfd_discard_section_stabs (abfd, o, + elf_section_data (o)->stab_info, + elf_reloc_symbol_deleted_p, + &cookie)) + ret = true; + if (! info->keep_memory) + free (cookie.rels); + } + } + + if (bed->elf_backend_discard_info) + { + if (bed->elf_backend_discard_info (abfd, &cookie, info)) + ret = true; + } + + if (freesyms) + free (freesyms); + } + return ret; +} + +static boolean +elf_section_ignore_discarded_relocs (sec) + asection *sec; +{ + if (strcmp (sec->name, ".stab") == 0) + return true; + else 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)) + return true; + else + return false; +} diff -uprN binutils-2.11.92.0.10/bfd/elfxx-ia64.c binutils-2.11.92.0.12/bfd/elfxx-ia64.c --- binutils-2.11.92.0.10/bfd/elfxx-ia64.c Fri Oct 19 23:57:48 2001 +++ binutils-2.11.92.0.12/bfd/elfxx-ia64.c Wed Nov 21 15:35:32 2001 @@ -3560,6 +3560,7 @@ elfNN_ia64_relocate_section (output_bfd, /* Don't emit relocs for __GLOB_DATA_PTR on AIX. */ && (!h || strcmp (h->root.root.string, "__GLOB_DATA_PTR") != 0))) + && r_symndx != 0 && (input_section->flags & SEC_ALLOC) != 0) { unsigned int dyn_r_type; @@ -3754,8 +3755,9 @@ elfNN_ia64_relocate_section (output_bfd, case R_IA64_PCREL64MSB: case R_IA64_PCREL64LSB: /* Install a dynamic relocation for this reloc. */ - if (dynamic_symbol_p - || elfNN_ia64_aix_vec (info->hash->creator)) + if ((dynamic_symbol_p + || elfNN_ia64_aix_vec (info->hash->creator)) + && r_symndx != 0) { BFD_ASSERT (srel != NULL); @@ -3833,47 +3835,48 @@ elfNN_ia64_relocate_section (output_bfd, case R_IA64_SEGREL32LSB: case R_IA64_SEGREL64MSB: case R_IA64_SEGREL64LSB: - { - struct elf_segment_map *m; - Elf_Internal_Phdr *p; + if (r_symndx == 0) + { + /* If the input section was discarded from the output, then + do nothing. */ + r = bfd_reloc_ok; + } + else + { + struct elf_segment_map *m; + Elf_Internal_Phdr *p; - /* Find the segment that contains the output_section. */ - for (m = elf_tdata (output_bfd)->segment_map, - p = elf_tdata (output_bfd)->phdr; - m != NULL; - m = m->next, p++) - { - int i; - for (i = m->count - 1; i >= 0; i--) - if (m->sections[i] == sym_sec->output_section) + /* Find the segment that contains the output_section. */ + for (m = elf_tdata (output_bfd)->segment_map, + p = elf_tdata (output_bfd)->phdr; + m != NULL; + m = m->next, p++) + { + int i; + for (i = m->count - 1; i >= 0; i--) + if (m->sections[i] == sym_sec->output_section) + break; + if (i >= 0) break; - if (i >= 0) - break; - } - - if (m == NULL) - { - /* If the input section was discarded from the output, then - do nothing. */ + } - if (bfd_is_abs_section (sym_sec->output_section)) - r = bfd_reloc_ok; - else + if (m == NULL) + { r = bfd_reloc_notsupported; - } - else - { - /* The VMA of the segment is the vaddr of the associated - program header. */ - if (value > p->p_vaddr) - value -= p->p_vaddr; - else - value = 0; - r = elfNN_ia64_install_value (output_bfd, hit_addr, value, - r_type); - } - break; - } + } + else + { + /* The VMA of the segment is the vaddr of the associated + program header. */ + if (value > p->p_vaddr) + value -= p->p_vaddr; + else + value = 0; + r = elfNN_ia64_install_value (output_bfd, hit_addr, value, + r_type); + } + break; + } case R_IA64_SECREL32MSB: case R_IA64_SECREL32LSB: diff -uprN binutils-2.11.92.0.10/bfd/elfxx-target.h binutils-2.11.92.0.12/bfd/elfxx-target.h --- binutils-2.11.92.0.10/bfd/elfxx-target.h Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/elfxx-target.h Fri Nov 16 14:05:51 2001 @@ -66,6 +66,9 @@ Foundation, Inc., 59 Temple Place - Suit #ifndef elf_backend_got_symbol_offset #define elf_backend_got_symbol_offset (bfd_vma) 0 #endif +#ifndef elf_backend_can_refcount +#define elf_backend_can_refcount 0 +#endif #ifndef elf_backend_want_got_plt #define elf_backend_want_got_plt 0 #endif @@ -355,6 +358,15 @@ Foundation, Inc., 59 Temple Place - Suit #ifndef elf_backend_reloc_type_class #define elf_backend_reloc_type_class _bfd_elf_reloc_type_class #endif +#ifndef elf_backend_discard_info +#define elf_backend_discard_info NULL +#endif +#ifndef elf_backend_ignore_discarded_relocs +#define elf_backend_ignore_discarded_relocs NULL +#endif +#ifndef elf_backend_write_section +#define elf_backend_write_section NULL +#endif /* Previously, backends could only use SHT_REL or SHT_RELA relocation sections, but not both. They defined USE_REL to indicate SHT_REL @@ -443,6 +455,9 @@ static const struct elf_backend_data elf elf_backend_sprintf_vma, elf_backend_fprintf_vma, elf_backend_reloc_type_class, + elf_backend_discard_info, + elf_backend_ignore_discarded_relocs, + elf_backend_write_section, elf_backend_ecoff_debug_swap, ELF_MACHINE_ALT1, ELF_MACHINE_ALT2, @@ -463,8 +478,8 @@ static const struct elf_backend_data elf elf_backend_plt_alignment, elf_backend_can_gc_sections, elf_backend_can_refcount, - elf_backend_want_dynbss, - elf_backend_want_got_sym + elf_backend_want_got_sym, + elf_backend_want_dynbss }; #endif diff -uprN binutils-2.11.92.0.10/bfd/libbfd-in.h binutils-2.11.92.0.12/bfd/libbfd-in.h --- binutils-2.11.92.0.10/bfd/libbfd-in.h Mon Oct 1 15:25:21 2001 +++ binutils-2.11.92.0.12/bfd/libbfd-in.h Fri Nov 16 14:05:51 2001 @@ -446,6 +446,11 @@ extern bfd_reloc_status_type _bfd_reloca extern boolean _bfd_link_section_stabs PARAMS ((bfd *, PTR *, asection *, asection *, PTR *)); +/* Eliminate stabs for discarded functions and symbols. */ +extern boolean _bfd_discard_section_stabs + PARAMS ((bfd *, asection *, PTR, + boolean (*) (bfd_vma, PTR), PTR)); + /* Write out the .stab section when linking stabs in sections. */ extern boolean _bfd_write_section_stabs diff -uprN binutils-2.11.92.0.10/bfd/libbfd.h binutils-2.11.92.0.12/bfd/libbfd.h --- binutils-2.11.92.0.10/bfd/libbfd.h Mon Oct 1 15:25:21 2001 +++ binutils-2.11.92.0.12/bfd/libbfd.h Fri Nov 16 14:05:51 2001 @@ -451,6 +451,11 @@ extern bfd_reloc_status_type _bfd_reloca extern boolean _bfd_link_section_stabs PARAMS ((bfd *, PTR *, asection *, asection *, PTR *)); +/* Eliminate stabs for discarded functions and symbols. */ +extern boolean _bfd_discard_section_stabs + PARAMS ((bfd *, asection *, PTR, + boolean (*) (bfd_vma, PTR), PTR)); + /* Write out the .stab section when linking stabs in sections. */ extern boolean _bfd_write_section_stabs @@ -954,6 +959,29 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_MCORE_PCREL_32", "BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2", "BFD_RELOC_MCORE_RVA", + "BFD_RELOC_MMIX_GETA", + "BFD_RELOC_MMIX_GETA_1", + "BFD_RELOC_MMIX_GETA_2", + "BFD_RELOC_MMIX_GETA_3", + "BFD_RELOC_MMIX_CBRANCH", + "BFD_RELOC_MMIX_CBRANCH_J", + "BFD_RELOC_MMIX_CBRANCH_1", + "BFD_RELOC_MMIX_CBRANCH_2", + "BFD_RELOC_MMIX_CBRANCH_3", + "BFD_RELOC_MMIX_PUSHJ", + "BFD_RELOC_MMIX_PUSHJ_1", + "BFD_RELOC_MMIX_PUSHJ_2", + "BFD_RELOC_MMIX_PUSHJ_3", + "BFD_RELOC_MMIX_JMP", + "BFD_RELOC_MMIX_JMP_1", + "BFD_RELOC_MMIX_JMP_2", + "BFD_RELOC_MMIX_JMP_3", + "BFD_RELOC_MMIX_ADDR19", + "BFD_RELOC_MMIX_ADDR27", + "BFD_RELOC_MMIX_REG_OR_BYTE", + "BFD_RELOC_MMIX_REG", + "BFD_RELOC_MMIX_BASE_PLUS_OFFSET", + "BFD_RELOC_MMIX_LOCAL", "BFD_RELOC_AVR_7_PCREL", "BFD_RELOC_AVR_13_PCREL", "BFD_RELOC_AVR_16_PM", diff -uprN binutils-2.11.92.0.10/bfd/mmo.c binutils-2.11.92.0.12/bfd/mmo.c --- binutils-2.11.92.0.10/bfd/mmo.c Wed Dec 31 16:00:00 1969 +++ binutils-2.11.92.0.12/bfd/mmo.c Wed Nov 21 15:35:32 2001 @@ -0,0 +1,3274 @@ +/* BFD back-end for mmo objects (MMIX-specific object-format). + Copyright 2001 + Free Software Foundation, Inc. + Written by Hans-Peter Nilsson (hp@bitrange.com). + Infrastructure and other bits originally copied from srec.c and + binary.c. + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* +SECTION + mmo backend + + The mmo object format is used exclusively together with Professor + Donald E.@: Knuth's educational 64-bit processor MMIX. The simulator + @command{mmix} which is available at + @url{http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz} + understands this format. That package also includes a combined + assembler and linker called @command{mmixal}. The mmo format has + no advantages feature-wise compared to e.g. ELF. It is a simple + non-relocatable object format with no support for archives or + debugging information, except for symbol value information and + line numbers (which is not yet implemented in BFD). See + @url{http://www-cs-faculty.stanford.edu/~knuth/mmix.html} for more + information about MMIX. The ELF format is used for intermediate + object files in the BFD implementation. + +@c We want to xref the symbol table node. A feature in "chew" +@c requires that "commands" do not contain spaces in the +@c arguments. Hence the hyphen in "Symbol-table". +@menu +@* File layout:: +@* Symbol-table:: +@* mmo section mapping:: +@end menu + +INODE +File layout, Symbol-table, mmo, mmo +SUBSECTION + File layout + + The mmo file contents is not partitioned into named sections as + with e.g.@: ELF. Memory areas is formed by specifying the + location of the data that follows. Only the memory area + @samp{0x0000@dots{}00} to @samp{0x01ff@dots{}ff} is executable, so + it is used for code (and constants) and the area + @samp{0x2000@dots{}00} to @samp{0x20ff@dots{}ff} is used for + writable data. @xref{mmo section mapping}. + + Contents is entered as 32-bit words, xor:ed over previous + contents, always zero-initialized. A word that starts with the + byte @samp{0x98} forms a command called a @samp{lopcode}, where + the next byte distinguished between the thirteen lopcodes. The + two remaining bytes, called the @samp{Y} and @samp{Z} fields, or + the @samp{YZ} field (a 16-bit big-endian number), are used for + various purposes different for each lopcode. As documented in + @url{http://www-cs-faculty.stanford.edu/~knuth/mmixal-intro.ps.gz}, + the lopcodes are: + + There is provision for specifying ``special data'' of 65536 + different types. We use type 80 (decimal), arbitrarily chosen the + same as the ELF <> number for MMIX, filling it with + section information normally found in ELF objects. @xref{mmo + section mapping}. + + @table @code + @item lop_quote + 0x98000001. The next word is contents, regardless of whether it + starts with 0x98 or not. + + @item lop_loc + 0x9801YYZZ, where @samp{Z} is 1 or 2. This is a location + directive, setting the location for the next data to the next + 32-bit word (for @math{Z = 1}) or 64-bit word (for @math{Z = 2}), + plus @math{Y * 2^56}. Normally @samp{Y} is 0 for the text segment + and 2 for the data segment. + + @item lop_skip + 0x9802YYZZ. Increase the current location by @samp{YZ} bytes. + + @item lop_fixo + 0x9803YYZZ, where @samp{Z} is 1 or 2. Store the current location + as 64 bits into the location pointed to by the next 32-bit + (@math{Z = 1}) or 64-bit (@math{Z = 2}) word, plus @math{Y * + 2^56}. + + @item lop_fixr + 0x9804YYZZ. @samp{YZ} is stored into the current location plus + @math{2 - 4 * YZ}. + + @item lop_fixrx + 0x980500ZZ. @samp{Z} is 16 or 24. A value @samp{L} derived from + the following 32-bit word are used in a manner similar to + @samp{YZ} in lop_fixr: it is xor:ed into the current location + minus @math{4 * L}. The first byte of the word is 0 or 1. If it + is 1, then @math{L = (@var{lowest 24 bits of word}) - 2^Z}, if 0, + then @math{L = (@var{lowest 24 bits of word})}. + + @item lop_file + 0x9806YYZZ. @samp{Y} is the file number, @samp{Z} is count of + 32-bit words. Set the file number to @samp{Y} and the line + counter to 0. The next @math{Z * 4} bytes contain the file name, + padded with zeros if the count is not a multiple of four. The + same @samp{Y} may occur multiple times, but @samp{Z} must be 0 for + all but the first occurrence. + + @item lop_line + 0x9807YYZZ. @samp{YZ} is the line number. Together with + lop_file, it forms the source location for the next 32-bit word. + Note that for each non-lopcode 32-bit word, line numbers are + assumed incremented by one. + + @item lop_spec + 0x9808YYZZ. @samp{YZ} is the type number. Data until the next + lopcode other than lop_quote forms special data of type @samp{YZ}. + @xref{mmo section mapping}. + + Other types than 80, (or type 80 with a content that does not + parse) is stored in sections named <<.MMIX.spec_data.@var{n}>> + where @var{n} is the @samp{YZ}-type. The flags for such a + sections say not to allocate or load the data. The vma is 0. + Contents of multiple occurrences of special data @var{n} is + concatenated to the data of the previous lop_spec @var{n}s. The + location in data or code at which the lop_spec occurred is lost. + + @item lop_pre + 0x980901ZZ. The first lopcode in a file. The @samp{Z} field forms the + length of header information in 32-bit words, where the first word + tells the time in seconds since @samp{00:00:00 GMT Jan 1 1970}. + + @item lop_post + 0x980a00ZZ. @math{Z > 32}. This lopcode follows after all + content-generating lopcodes in a program. The @samp{Z} field + denotes the value of @samp{rG} at the beginning of the program. + The following @math{256 - Z} big-endian 64-bit words are loaded + into global registers @samp{$G} @dots{} @samp{$255}. + + @item lop_stab + 0x980b0000. The next-to-last lopcode in a program. Must follow + immediately after the lop_post lopcode and its data. After this + lopcode follows all symbols in a compressed format + (@pxref{Symbol-table}). + + @item lop_end + 0x980cYYZZ. The last lopcode in a program. It must follow the + lop_stab lopcode and its data. The @samp{YZ} field contains the + number of 32-bit words of symbol table information after the + preceding lop_stab lopcode. + @end table + + Note that the lopcode "fixups"; <>, <> and + <> are not generated by BFD, but are handled. They are + generated by <>. + +EXAMPLE + This trivial one-label, one-instruction file: + +| :Main TRAP 1,2,3 + + can be represented this way in mmo: + +| 0x98090101 - lop_pre, one 32-bit word with timestamp. +| +| 0x98010002 - lop_loc, text segment, using a 64-bit address. +| Note that mmixal does not emit this for the file above. +| 0x00000000 - Address, high 32 bits. +| 0x00000000 - Address, low 32 bits. +| 0x98060002 - lop_file, 2 32-bit words for file-name. +| 0x74657374 - "test" +| 0x2e730000 - ".s\0\0" +| 0x98070001 - lop_line, line 1. +| 0x00010203 - TRAP 1,2,3 +| 0x980a00ff - lop_post, setting $255 to 0. +| 0x00000000 +| 0x00000000 +| 0x980b0000 - lop_stab for ":Main" = 0, serial 1. +| 0x203a4040 @xref{Symbol-table}. +| 0x10404020 +| 0x4d206120 +| 0x69016e00 +| 0x81000000 +| 0x980c0005 - lop_end; symbol table contained five 32-bit words. */ + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" +#include "libiberty.h" +#include "elf/mmix.h" +#include "opcode/mmix.h" +#include + +#define LOP 0x98 +#define LOP_QUOTE 0 +#define LOP_LOC 1 +#define LOP_SKIP 2 +#define LOP_FIXO 3 +#define LOP_FIXR 4 +#define LOP_FIXRX 5 +#define LOP_FILE 6 +#define LOP_LINE 7 +#define LOP_SPEC 8 +#define LOP_PRE 9 +#define LOP_POST 10 +#define LOP_STAB 11 +#define LOP_END 12 + +#define LOP_QUOTE_NEXT ((LOP << 24) | (LOP_QUOTE << 16) | 1) +#define SPEC_DATA_SECTION 80 +#define LOP_SPEC_SECTION \ + ((LOP << 24) | (LOP_SPEC << 16) | SPEC_DATA_SECTION) + +/* Must be a power of two. If you change this to be >= 64k, you need a + new test-case; the ld test b-loc64k.d touches chunk-size problem areas. */ +#define MMO_SEC_CONTENTS_CHUNK_SIZE (1 << 15) + +/* An arbitrary number for the maximum length section name size. */ +#define MAX_SECTION_NAME_SIZE (1024 * 1024) + +/* A quite arbitrary number for the maximum length section size. */ +#define MAX_ARTIFICIAL_SECTION_SIZE (1024 * 1024 * 1024) + +#define MMO3_WCHAR 0x80 +#define MMO3_LEFT 0x40 +#define MMO3_MIDDLE 0x20 +#define MMO3_RIGHT 0x10 +#define MMO3_TYPEBITS 0xf +#define MMO3_REGQUAL_BITS 0xf +#define MMO3_UNDEF 2 +#define MMO3_DATA 8 +#define MMO3_SYMBITS 0x2f + +/* Put these everywhere in new code. */ +#define FATAL_DEBUG \ + _bfd_abort (__FILE__, __LINE__, \ + "Internal: Non-debugged code (test-case missing)") + +#define BAD_CASE(x) \ + _bfd_abort (__FILE__, __LINE__, \ + "bad case for " #x) + +enum mmo_sym_type { mmo_reg_sym, mmo_undef_sym, mmo_data_sym, mmo_abs_sym}; + +/* When scanning the mmo file, a linked list of mmo_symbol + structures is built to represent the symbol table (if there is + one). */ + +struct mmo_symbol + { + struct mmo_symbol *next; + CONST char *name; + bfd_vma value; + enum mmo_sym_type sym_type; + unsigned int serno; + }; + +struct mmo_data_list_struct + { + struct mmo_data_list_struct *next; + bfd_vma where; + bfd_size_type size; + bfd_size_type allocated_size; + bfd_byte data[1]; + }; + +typedef struct mmo_data_list_struct mmo_data_list_type; + +struct mmo_symbol_trie + { + struct mmo_symbol_trie *left; + struct mmo_symbol_trie *right; + struct mmo_symbol_trie *middle; + + bfd_byte symchar; + + /* A zero name means there's nothing here. */ + struct mmo_symbol sym; + }; + +/* The mmo tdata information. */ + +struct mmo_data_struct + { + struct mmo_symbol *symbols; + struct mmo_symbol *symtail; + asymbol *csymbols; + + /* File representation of time (NULL) when this file was created. */ + bfd_byte created[4]; + + /* When we're reading bytes recursively, check this occasionally. + Also holds write errors. */ + boolean have_error; + + /* Max symbol length that may appear in the lop_stab table. Note that + this table might just hold a subset of symbols for not-really large + programs, as it can only be 65536 * 4 bytes large. */ + int max_symbol_length; + + /* Here's the symbol we build in lop_stab. */ + char *lop_stab_symbol; + + /* Index into lop_stab_symbol for the next character when parsing the + symbol information. */ + int symbol_position; + + /* When creating arbitrary sections, we need to count section numbers. */ + int sec_no; + + /* When writing or reading byte-wise, we need to count the bytes + within a 32-bit word. */ + int byte_no; + + /* We also need a buffer to hold the bytes we count reading or writing. */ + bfd_byte buf[4]; + }; + +typedef struct mmo_data_struct tdata_type; + +struct mmo_section_data_struct + { + mmo_data_list_type *head; + mmo_data_list_type *tail; + }; + +/* These structures are used in bfd_map_over_sections constructs. */ + +/* Used when writing out sections; all but the register contents section + which is stored in reg_section. */ +struct mmo_write_sec_info + { + asection *reg_section; + boolean retval; + }; + +/* Used when trying to find a section corresponding to addr. */ +struct mmo_find_sec_info + { + asection *sec; + bfd_vma addr; + }; + +static boolean mmo_bfd_copy_private_bfd_data PARAMS ((bfd *, bfd *)); +static void mmo_write_section_unless_reg_contents + PARAMS ((bfd *, asection *, PTR)); +static void mmo_find_sec_w_addr PARAMS ((bfd *, asection *, PTR)); +static void mmo_find_sec_w_addr_grow PARAMS ((bfd *, asection *, PTR)); +static asection *mmo_make_section PARAMS ((bfd *, CONST char *)); +static void mmo_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *)); +static void mmo_print_symbol + PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type)); +static void mmo_init PARAMS ((void)); +static boolean mmo_mkobject PARAMS ((bfd *)); +static boolean mmo_scan PARAMS ((bfd *)); +static asection *mmo_decide_section PARAMS ((bfd *, bfd_vma)); +static asection *mmo_get_generic_spec_data_section PARAMS ((bfd *, int)); +static asection *mmo_get_spec_section PARAMS ((bfd *, int)); +static INLINE bfd_byte *mmo_get_loc PARAMS ((asection *, bfd_vma, int)); +static void mmo_xore_64 PARAMS ((asection *, bfd_vma vma, bfd_vma value)); +static void mmo_xore_32 PARAMS ((asection *, bfd_vma vma, unsigned int)); +static void mmo_xore_16 PARAMS ((asection *, bfd_vma vma, unsigned int)); +static CONST bfd_target *mmo_object_p PARAMS ((bfd *)); +static void mmo_map_set_sizes PARAMS ((bfd *, asection *, PTR)); +static boolean mmo_get_symbols PARAMS ((bfd *)); +static boolean mmo_create_symbol PARAMS ((bfd *, CONST char *, bfd_vma, + enum mmo_sym_type, unsigned int)); +static boolean mmo_get_section_contents + PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type)); +static long mmo_get_symtab_upper_bound PARAMS ((bfd *)); +static long mmo_get_symtab PARAMS ((bfd *, asymbol **)); +static asymbol *mmo_make_empty_symbol PARAMS ((bfd *)); +static void mmo_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *)); +static void mmo_print_symbol PARAMS ((bfd *, PTR, asymbol *, + bfd_print_symbol_type)); +static boolean mmo_set_section_contents + PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type)); +static int mmo_sizeof_headers PARAMS ((bfd *, boolean)); +static long mmo_get_reloc_upper_bound PARAMS ((bfd *, asection *)); + +static boolean mmo_internal_write_header PARAMS ((bfd *)); +static boolean mmo_internal_write_post PARAMS ((bfd *, int, asection *)); +static boolean mmo_internal_add_3_sym + PARAMS ((bfd *, struct mmo_symbol_trie *, CONST struct mmo_symbol *)); +static unsigned int mmo_internal_3_length + PARAMS ((bfd *, struct mmo_symbol_trie *)); +static void mmo_internal_3_dump + PARAMS ((bfd *, struct mmo_symbol_trie *)); +static void mmo_beb128_out PARAMS ((bfd *, int, int)); +static boolean mmo_internal_write_section + PARAMS ((bfd *, asection *)); +static void mmo_write_tetra PARAMS ((bfd *, unsigned int)); +static void mmo_write_tetra_raw PARAMS ((bfd *, unsigned int)); +static void mmo_write_octa PARAMS ((bfd *, bfd_vma)); +static void mmo_write_octa_raw PARAMS ((bfd *, bfd_vma)); +static boolean mmo_write_chunk + PARAMS ((bfd *, CONST bfd_byte *, unsigned int)); +static boolean mmo_write_loc_chunk + PARAMS ((bfd *, bfd_vma, CONST bfd_byte *, unsigned int)); +static boolean mmo_write_chunk_list PARAMS ((bfd *, mmo_data_list_type *)); +static boolean mmo_write_loc_chunk_list + PARAMS ((bfd *, mmo_data_list_type *)); +static boolean mmo_write_symbols_and_terminator PARAMS ((bfd *)); +static flagword mmo_sec_flags_from_bfd_flags PARAMS ((flagword)); +static flagword bfd_sec_flags_from_mmo_flags PARAMS ((flagword)); +static bfd_byte mmo_get_byte PARAMS ((bfd *)); +static void mmo_write_byte PARAMS ((bfd *, bfd_byte)); +static boolean mmo_new_section_hook PARAMS ((bfd *, asection *)); +static int mmo_sort_mmo_symbols PARAMS ((CONST PTR, CONST PTR)); +static boolean mmo_write_object_contents PARAMS ((bfd *)); +static long mmo_canonicalize_reloc + PARAMS ((bfd *, sec_ptr, arelent **, asymbol **)); + +/* Global "const" variables initialized once. Must not depend on + particular input or caller; put such things into the bfd or elsewhere. + Look ma, no static per-invocation data! */ + +static unsigned +char valid_mmo_symbol_character_set[/* A-Z a-z (we assume consecutive + codes; sorry EBCDIC:ers!). */ + + 'Z' - 'A' + 1 + 'z' - 'a' + 1 + /* Digits. */ + + 10 + /* ':' and '_'. */ + + 1 + 1 + /* Codes higher than 126. */ + + 256 - 126 + /* Ending zero. */ + + 1]; + + +/* Get section SECNAME or create one if it doesn't exist. When creating + one, new memory for the name is allocated. */ + +static asection * +mmo_make_section (abfd, secname) + bfd *abfd; + CONST char *secname; +{ + asection *sec = bfd_get_section_by_name (abfd, secname); + + if (sec == NULL) + { + char *newsecname = strdup (secname); + + if (newsecname == NULL) + { + (*_bfd_error_handler) + (_("%s: No core to allocate section name %s\n"), + bfd_get_filename (abfd), secname); + bfd_set_error (bfd_error_system_call); + return NULL; + } + sec = bfd_make_section (abfd, newsecname); + } + + return sec; +} + +/* Nothing to do, but keep as a placeholder if we need it. + Note that state that might differ between bfd:s must not be initialized + here, nor must it be static. Add it to tdata information instead. */ + +static void +mmo_init () +{ + static boolean inited = false; + int i = 0; + int j = 0; + static const char letters[] + = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789:_"; + + if (inited == false) + { + inited = true; + } + + /* Fill in the set of valid symbol characters. */ + strcpy (valid_mmo_symbol_character_set, letters); + i = strlen (letters); + + for (j = 126; j < 256; j++) + valid_mmo_symbol_character_set[i++] = j; +} + +/* Check whether an existing file is an mmo file. */ + +static CONST bfd_target * +mmo_object_p (abfd) + bfd *abfd; +{ + struct stat statbuf; + bfd_byte b[4]; + + mmo_init (); + + if (bfd_stat (abfd, &statbuf) < 0 + || bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 + || bfd_bread (b, 4, abfd) != 4) + goto bad_final; + + /* All mmo files are a multiple of four bytes long. + Only recognize version one. */ + if ((statbuf.st_size % 4) != 0 + || b[0] != LOP || b[1] != LOP_PRE || b[2] != 1) + goto bad_format; + + /* Get the last 32-bit word. */ + if (bfd_seek (abfd, (file_ptr) statbuf.st_size - 4, SEEK_SET) != 0 + || bfd_bread (b, 4, abfd) != 4) + goto bad_final; + + /* Check if the file ends in a lop_end lopcode. */ + if (b[0] != LOP || b[1] != LOP_END || ! mmo_mkobject (abfd)) + goto bad_format; + + /* Compute an upper bound on the max symbol length. Not really + important as all of the symbol information can only be 256k. */ + abfd->tdata.mmo_data->max_symbol_length = (b[2] * 256 + b[3]) * 4; + abfd->tdata.mmo_data->lop_stab_symbol + = bfd_malloc (abfd->tdata.mmo_data->max_symbol_length + 1); + + if (abfd->tdata.mmo_data->lop_stab_symbol == NULL) + { + (*_bfd_error_handler) + (_("%s: No core to allocate a symbol %d bytes long\n"), + bfd_get_filename (abfd), abfd->tdata.mmo_data->max_symbol_length); + goto bad_final; + } + + /* Read in everything. */ + if (! mmo_scan (abfd)) + goto bad_format_free; + + if (abfd->symcount > 0) + abfd->flags |= HAS_SYMS; + + /* You'll have to tweak this if you want to use this format for other + arches (not recommended due to its small-size limitations). Look at + the ELF format for how to make it target-generic. */ + if (! bfd_default_set_arch_mach (abfd, bfd_arch_mmix, 0)) + goto bad_format_free; + + return abfd->xvec; + + bad_format_free: + free (abfd->tdata.mmo_data->lop_stab_symbol); + bad_format: + bfd_set_error (bfd_error_wrong_format); + bad_final: + return NULL; +} + +/* Set up the mmo tdata information. */ + +static boolean +mmo_mkobject (abfd) + bfd *abfd; +{ + mmo_init (); + + if (abfd->tdata.mmo_data == NULL) + { + time_t created; + + /* All fields are zero-initialized, so we don't have to explicitly + initialize most. */ + tdata_type *tdata = (tdata_type *) bfd_zmalloc (sizeof (tdata_type)); + if (tdata == NULL) + return false; + + created = time (NULL); + bfd_put_32 (abfd, created, tdata->created); + + abfd->tdata.mmo_data = tdata; + } + + return true; +} + +static boolean +mmo_bfd_copy_private_bfd_data (ibfd, obfd) + bfd *ibfd; + bfd *obfd; +{ + if (bfd_get_flavour (ibfd) != bfd_target_mmo_flavour + || bfd_get_flavour (obfd) != bfd_target_mmo_flavour) + return true; + + /* Copy the time the copied-from file was created. If people want the + time the file was last *modified*, they have that in the normal file + information. */ + memcpy (obfd->tdata.mmo_data->created, ibfd->tdata.mmo_data->created, + sizeof (obfd->tdata.mmo_data->created)); + return true; +} + +/* Helper functions for mmo_decide_section, used through + bfd_map_over_sections. */ + +static void +mmo_find_sec_w_addr (abfd, sec, p) + bfd *abfd ATTRIBUTE_UNUSED; + asection *sec; + PTR p; +{ + struct mmo_find_sec_info *infop = (struct mmo_find_sec_info *) p; + bfd_vma vma = bfd_get_section_vma (abfd, sec); + + /* Ignore sections that aren't loaded. */ + if ((bfd_get_section_flags (abfd, sec) & (SEC_LOAD | SEC_ALLOC)) + != (SEC_LOAD | SEC_ALLOC)) + return; + + if (infop->addr >= vma && infop->addr < vma + sec->_raw_size) + infop->sec = sec; +} + +static void +mmo_find_sec_w_addr_grow (abfd, sec, p) + bfd *abfd ATTRIBUTE_UNUSED; + asection *sec; + PTR p; +{ + struct mmo_find_sec_info *infop = (struct mmo_find_sec_info *) p; + bfd_vma vma = bfd_get_section_vma (abfd, sec); + + /* Ignore sections that aren't loaded. */ + if ((bfd_get_section_flags (abfd, sec) & (SEC_LOAD | SEC_ALLOC)) + != (SEC_LOAD | SEC_ALLOC)) + return; + + if (infop->addr >= vma && infop->addr < vma + MAX_ARTIFICIAL_SECTION_SIZE) + infop->sec = sec; +} + +/* Find a section that corresponds to a VMA. Automatically create .text + or .data and set current section to it, depending on what vma. If we + can't deduce a section, make one up as ".MMIX.sec.N", where N is an + increasing number. */ + +static asection * +mmo_decide_section (abfd, vma) + bfd *abfd; + bfd_vma vma; +{ + asection *sec = NULL; + char sec_name[sizeof (".MMIX.sec.") + 20]; + struct mmo_find_sec_info info; + + info.addr = vma; + info.sec = NULL; + + /* First see if there's a section that would match exactly. */ + bfd_map_over_sections (abfd, mmo_find_sec_w_addr, &info); + + if (info.sec != NULL) + return info.sec; + + /* If there's no such section, try and expand one of the existing ones, + up to a limit. Make sure we have .text and .data before we try that; + create them corresponding to expected addresses and set flags to make + them match the "loaded and with contents" expectation. */ + if ((vma >> 56) == 0) + { + sec = bfd_make_section_old_way (abfd, MMO_TEXT_SECTION_NAME); + + if (sec == NULL) + return NULL; + + if (! sec->user_set_vma) + bfd_set_section_vma (abfd, sec, vma); + if (! bfd_set_section_flags (abfd, sec, + bfd_get_section_flags (abfd, sec) + | SEC_CODE | SEC_LOAD | SEC_ALLOC)) + return NULL; + } + else if ((vma >> 56) == 0x20) + { + sec = bfd_make_section_old_way (abfd, MMO_DATA_SECTION_NAME); + + if (sec == NULL) + return NULL; + + if (! sec->user_set_vma) + bfd_set_section_vma (abfd, sec, vma); + if (! bfd_set_section_flags (abfd, sec, + bfd_get_section_flags (abfd, sec) + | SEC_LOAD | SEC_ALLOC)) + return NULL; + } + + bfd_map_over_sections (abfd, mmo_find_sec_w_addr_grow, &info); + + if (info.sec != NULL) + return info.sec; + + /* If there's still no suitable section, make a new one. */ + sprintf (sec_name, ".MMIX.sec.%d", abfd->tdata.mmo_data->sec_no++); + sec = mmo_make_section (abfd, sec_name); + if (! sec->user_set_vma) + bfd_set_section_vma (abfd, sec, vma); + + if (! bfd_set_section_flags (abfd, sec, + bfd_get_section_flags (abfd, sec) + | SEC_LOAD | SEC_ALLOC)) + return NULL; + return sec; +} + +/* Xor in a 64-bit value VALUE at VMA. */ + +static INLINE void +mmo_xore_64 (sec, vma, value) + asection *sec; + bfd_vma vma; + bfd_vma value; +{ + bfd_byte *loc = mmo_get_loc (sec, vma, 8); + bfd_vma prev = bfd_get_64 (sec->owner, loc); + + value ^= prev; + bfd_put_64 (sec->owner, value, loc); +} + +/* Xor in a 32-bit value VALUE at VMA. */ + +static INLINE void +mmo_xore_32 (sec, vma, value) + asection *sec; + bfd_vma vma; + unsigned int value; +{ + bfd_byte *loc = mmo_get_loc (sec, vma, 4); + unsigned int prev = bfd_get_32 (sec->owner, loc); + + value ^= prev; + bfd_put_32 (sec->owner, value, loc); +} + +/* Xor in a 16-bit value VALUE at VMA. */ + +static INLINE void +mmo_xore_16 (sec, vma, value) + asection *sec; + bfd_vma vma; + unsigned int value; +{ + bfd_byte *loc = mmo_get_loc (sec, vma, 2); + unsigned int prev = bfd_get_16 (sec->owner, loc); + + value ^= prev; + bfd_put_16 (sec->owner, value, loc); +} + +/* Write a 32-bit word to output file, no lop_quote generated. */ + +static INLINE void +mmo_write_tetra_raw (abfd, value) + bfd *abfd; + unsigned int value; +{ + bfd_byte buf[4]; + + bfd_put_32 (abfd, value, buf); + + if (bfd_bwrite ((PTR) buf, 4, abfd) != 4) + abfd->tdata.mmo_data->have_error = true; +} + +/* Write a 32-bit word to output file; lop_quote if necessary. */ + +static INLINE void +mmo_write_tetra (abfd, value) + bfd *abfd; + unsigned int value; +{ + if (((value >> 24) & 0xff) == LOP) + mmo_write_tetra_raw (abfd, LOP_QUOTE_NEXT); + + mmo_write_tetra_raw (abfd, value); +} + +/* Write a 64-bit word to output file, perhaps with lop_quoting. */ + +static INLINE void +mmo_write_octa (abfd, value) + bfd *abfd; + bfd_vma value; +{ + mmo_write_tetra (abfd, (unsigned int) (value >> 32)); + mmo_write_tetra (abfd, (unsigned int) value); +} + +/* Write a 64-bit word to output file, without lop_quoting. */ + +static INLINE void +mmo_write_octa_raw (abfd, value) + bfd *abfd; + bfd_vma value; +{ + mmo_write_tetra_raw (abfd, (unsigned int) (value >> 32)); + mmo_write_tetra_raw (abfd, (unsigned int) value); +} + +/* Write quoted contents, zero filled. */ + +static INLINE boolean +mmo_write_chunk (abfd, loc, len) + bfd *abfd; + CONST bfd_byte *loc; + unsigned int len; +{ + boolean retval = true; + bfd_byte buf[4] = {0, 0, 0, 0}; + + while (len >= 4) + { + if (loc[0] == LOP) + mmo_write_tetra_raw (abfd, LOP_QUOTE_NEXT); + + retval + = (retval == true + && abfd->tdata.mmo_data->have_error == false + && 4 == bfd_bwrite ((PTR) loc, 4, abfd)); + + loc += 4; + len -= 4; + } + + if (len) + { + memcpy (buf, loc, len); + if (buf[0] == LOP) + mmo_write_tetra_raw (abfd, LOP_QUOTE_NEXT); + + retval + = (retval == true + && abfd->tdata.mmo_data->have_error == false + && 4 == bfd_bwrite ((PTR) buf, 4, abfd)); + } + + return retval; +} + +/* Same, but from a list. */ + +static INLINE boolean +mmo_write_chunk_list (abfd, datap) + bfd *abfd; + mmo_data_list_type *datap; +{ + for (; datap != NULL; datap = datap->next) + if (! mmo_write_chunk (abfd, datap->data, datap->size)) + return false; + + return true; +} + +/* Write a lop_loc and some contents. */ + +static boolean +mmo_write_loc_chunk (abfd, vma, loc, len) + bfd *abfd; + bfd_vma vma; + CONST bfd_byte *loc; + unsigned int len; +{ + /* We always write the location as 64 bits; no use saving bytes here. */ + mmo_write_tetra_raw (abfd, (LOP << 24) | (LOP_LOC << 16) | 2); + + /* Find an initial and trailing section of zero tetras; we don't need to + write out zeros. FIXME: When we do this, we should emit section size + and address specifiers, else objcopy can't perform a unity + translation. */ + while (len >= 4 && bfd_get_32 (abfd, loc) == 0) + { + vma += 4; + len -= 4; + loc += 4; + } + + while (len >= 4 && bfd_get_32 (abfd, loc + len - 4) == 0) + len -= 4; + + mmo_write_octa_raw (abfd, vma); + return + abfd->tdata.mmo_data->have_error == false + && mmo_write_chunk (abfd, loc, len); +} + +/* Same, but from a list. */ + +static INLINE boolean +mmo_write_loc_chunk_list (abfd, datap) + bfd *abfd; + mmo_data_list_type *datap; +{ + for (; datap != NULL; datap = datap->next) + if (! mmo_write_loc_chunk (abfd, datap->where, datap->data, datap->size)) + return false; + + return true; +} + +/* Make a .MMIX.spec_data.N section. */ + +static asection * +mmo_get_generic_spec_data_section (abfd, spec_data_number) + bfd *abfd; + int spec_data_number; +{ + asection *sec; + char secname[sizeof (MMIX_OTHER_SPEC_SECTION_PREFIX) + 20] + = MMIX_OTHER_SPEC_SECTION_PREFIX; + + sprintf (secname + strlen (MMIX_OTHER_SPEC_SECTION_PREFIX), + "%d", spec_data_number); + + sec = mmo_make_section (abfd, secname); + + return sec; +} + +/* Make a special section for SPEC_DATA_NUMBER. If it is the one we use + ourselves, parse some of its data to get at the section name. */ + +static asection * +mmo_get_spec_section (abfd, spec_data_number) + bfd *abfd; + int spec_data_number; +{ + bfd_byte *secname; + asection *sec; + bfd_byte buf[4]; + unsigned int secname_length; + unsigned int i; + bfd_vma section_length; + bfd_vma section_vma; + mmo_data_list_type *loc; + flagword flags; + long orig_pos; + + /* If this isn't the "special" special data, then make a placeholder + section. */ + if (spec_data_number != SPEC_DATA_SECTION) + return mmo_get_generic_spec_data_section (abfd, spec_data_number); + + /* Seek back to this position if there was a format error. */ + orig_pos = bfd_tell (abfd); + + /* Read the length (in 32-bit words). */ + if (bfd_bread (buf, 4, abfd) != 4) + goto format_error; + + if (buf[0] == LOP) + { + if (buf[1] != LOP_QUOTE) + goto format_error; + + if (bfd_bread (buf, 4, abfd) != 4) + goto format_error; + } + + /* We don't care to keep the name length accurate. It's + zero-terminated. */ + secname_length = bfd_get_32 (abfd, buf) * 4; + + /* Check section name length for sanity. */ + if (secname_length > MAX_SECTION_NAME_SIZE) + goto format_error; + + /* This should be free'd regardless if a section is created. */ + secname = bfd_malloc (secname_length + 1); + secname[secname_length] = 0; + + for (i = 0; i < secname_length / 4; i++) + { + if (bfd_bread (secname + i * 4, 4, abfd) != 4) + goto format_error_free; + + if (secname[i * 4] == LOP) + { + /* A bit of overkill, but we handle char 0x98 in a section name, + and recognize misparsing. */ + if (secname[i * 4 + 1] != LOP_QUOTE + || bfd_bread (secname + i * 4, 4, abfd) != 4) + /* Whoops. We thought this was a name, and now we found a + non-lop_quote lopcode before we parsed the whole length of + the name. Signal end-of-file in the same manner. */ + goto format_error_free; + } + } + + /* Get the section flags. */ + if (bfd_bread (buf, 4, abfd) != 4 + || (buf[0] == LOP + && (buf[1] != LOP_QUOTE || bfd_bread (buf, 4, abfd) != 4))) + goto format_error_free; + + flags = bfd_get_32 (abfd, buf); + + /* Get the section length. */ + if (bfd_bread (buf, 4, abfd) != 4 + || (buf[0] == LOP + && (buf[1] != LOP_QUOTE || bfd_bread (buf, 4, abfd) != 4))) + goto format_error_free; + + section_length = (bfd_vma) bfd_get_32 (abfd, buf) << 32; + + /* That's the first, high-part. Now get the low part. */ + + if (bfd_bread (buf, 4, abfd) != 4 + || (buf[0] == LOP + && (buf[1] != LOP_QUOTE || bfd_bread (buf, 4, abfd) != 4))) + goto format_error_free; + + section_length |= (bfd_vma) bfd_get_32 (abfd, buf); + + /* Check the section length for sanity. */ + if (section_length > MAX_ARTIFICIAL_SECTION_SIZE) + goto format_error_free; + + /* Get the section VMA. */ + if (bfd_bread (buf, 4, abfd) != 4 + || (buf[0] == LOP + && (buf[1] != LOP_QUOTE || bfd_bread (buf, 4, abfd) != 4))) + goto format_error_free; + + section_vma = (bfd_vma) bfd_get_32 (abfd, buf) << 32; + + /* That's the first, high-part. Now get the low part. */ + if (bfd_bread (buf, 4, abfd) != 4 + || (buf[0] == LOP + && (buf[1] != LOP_QUOTE || bfd_bread (buf, 4, abfd) != 4))) + goto format_error_free; + + section_vma |= (bfd_vma) bfd_get_32 (abfd, buf); + + sec = mmo_make_section (abfd, secname); + free (secname); + if (sec == NULL) + goto format_error; + + /* We allocate a buffer here for the advertised size, with head room for + tetrabyte alignment. */ + loc = bfd_zmalloc (section_length + 3 + + sizeof (struct mmo_data_list_struct)); + if (loc == NULL) + goto format_error; + + /* Use a TETRA-rounded size for the allocated buffer; we set the + "visible" section size below. */ + loc->size = (section_length + 3) & ~3; + + /* Add in the section flags we found to those bfd entered during this + process and set the contents. */ + if (! bfd_set_section_flags (abfd, sec, + bfd_sec_flags_from_mmo_flags (flags) + | bfd_get_section_flags (abfd, sec) + | (section_length != 0 ? SEC_HAS_CONTENTS : 0)) + || ! bfd_set_section_size (abfd, sec, + sec->_cooked_size + section_length) + /* Set VMA only for the first occurrence. */ + || (! sec->user_set_vma + && ! bfd_set_section_vma (abfd, sec, section_vma))) + { + /* If we get an error for any of the calls above, signal more than + just a format error for the spec section. */ + return NULL; + } + + loc->next = NULL; + if (((struct mmo_section_data_struct *) (sec->used_by_bfd))->tail != NULL) + ((struct mmo_section_data_struct *) (sec->used_by_bfd))->tail->next + = loc; + else + ((struct mmo_section_data_struct *) (sec->used_by_bfd))->head = loc; + ((struct mmo_section_data_struct *) (sec->used_by_bfd))->tail = loc; + loc->where = section_vma; + + return sec; + + format_error_free: + free (secname); + format_error: + if (bfd_seek (abfd, orig_pos, SEEK_SET) != 0) + return NULL; + + return mmo_get_generic_spec_data_section (abfd, spec_data_number); +} + +/* Read a byte, but read from file in multiples of 32-bit words. */ + +static bfd_byte +mmo_get_byte (abfd) + bfd *abfd; +{ + bfd_byte retval; + + if (abfd->tdata.mmo_data->byte_no == 0) + { + if (abfd->tdata.mmo_data->have_error == false + && bfd_bread (abfd->tdata.mmo_data->buf, 4, abfd) != 4) + { + abfd->tdata.mmo_data->have_error = true; + + /* A value somewhat safe against tripping on some inconsistency + when mopping up after this error. */ + return 128; + } + } + + retval = abfd->tdata.mmo_data->buf[abfd->tdata.mmo_data->byte_no]; + abfd->tdata.mmo_data->byte_no = (abfd->tdata.mmo_data->byte_no + 1) % 4; + + return retval; +} + +/* Write a byte, in multiples of 32-bit words. */ + +static void +mmo_write_byte (abfd, value) + bfd *abfd; + bfd_byte value; +{ + abfd->tdata.mmo_data->buf[(abfd->tdata.mmo_data->byte_no++ % 4)] = value; + if ((abfd->tdata.mmo_data->byte_no % 4) == 0) + { + if (abfd->tdata.mmo_data->have_error == false + && bfd_bwrite (abfd->tdata.mmo_data->buf, 4, abfd) != 4) + abfd->tdata.mmo_data->have_error = true; + } +} + +/* Create a symbol. */ + +static boolean +mmo_create_symbol (abfd, symname, addr, sym_type, serno) + bfd *abfd; + CONST char *symname; + bfd_vma addr; + enum mmo_sym_type sym_type; + unsigned int serno; +{ + struct mmo_symbol *n; + + n = (struct mmo_symbol *) bfd_alloc (abfd, sizeof (struct mmo_symbol)); + if (n == NULL) + return false; + + n->name = bfd_alloc (abfd, strlen (symname) + 1); + if (n->name == NULL) + return false; + + strcpy ((PTR) n->name, symname); + + n->value = addr; + n->sym_type = sym_type; + n->serno = serno; + + if (abfd->tdata.mmo_data->symbols == NULL) + abfd->tdata.mmo_data->symbols = n; + else + abfd->tdata.mmo_data->symtail->next = n; + abfd->tdata.mmo_data->symtail = n; + n->next = NULL; + + ++abfd->symcount; + + /* Check that :Main equals the last octa of the .MMIX.reg_contents + section, as it's the one place we're sure to pass when reading a mmo + object. For written objects, we do it while setting the symbol + table. */ + if (strcmp (symname, MMIX_START_SYMBOL_NAME) == 0 + && bfd_get_start_address (abfd) != addr) + { + (*_bfd_error_handler) + (_("%s: invalid mmo file: initialization value for $255 is not `Main'\n"), + bfd_get_filename (abfd)); + bfd_set_error (bfd_error_bad_value); + return false; + } + + return true; +} + +/* Read in symbols. */ + +static boolean +mmo_get_symbols (abfd) + bfd *abfd; +{ +/* +INODE +Symbol-table, mmo section mapping, File layout, mmo +SUBSECTION + Symbol table format + + From mmixal.w (or really, the generated mmixal.tex) in + @url{http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz}): + ``Symbols are stored and retrieved by means of a @samp{ternary + search trie}, following ideas of Bentley and Sedgewick. (See + ACM--SIAM Symp.@: on Discrete Algorithms @samp{8} (1997), 360--369; + R.@:Sedgewick, @samp{Algorithms in C} (Reading, Mass.@: + Addison--Wesley, 1998), @samp{15.4}.) Each trie node stores a + character, and there are branches to subtries for the cases where + a given character is less than, equal to, or greater than the + character in the trie. There also is a pointer to a symbol table + entry if a symbol ends at the current node.'' + + So it's a tree encoded as a stream of bytes. The stream of bytes + acts on a single virtual global symbol, adding and removing + characters and signalling complete symbol points. Here, we read + the stream and create symbols at the completion points. + + First, there's a control byte <>. If any of the listed bits + in <> is nonzero, we execute what stands at the right, in + the listed order: + +| (MMO3_LEFT) +| 0x40 - Traverse left trie. +| (Read a new command byte and recurse.) +| +| (MMO3_SYMBITS) +| 0x2f - Read the next byte as a character and store it in the +| current character position; increment character position. +| Test the bits of <>: +| +| (MMO3_WCHAR) +| 0x80 - The character is 16-bit (so read another byte, +| merge into current character. +| +| (MMO3_TYPEBITS) +| 0xf - We have a complete symbol; parse the type, value +| and serial number and do what should be done +| with a symbol. The type and length information +| is in j = (m & 0xf). +| +| (MMO3_REGQUAL_BITS) +| j == 0xf: A register variable. The following +| byte tells which register. +| j <= 8: An absolute symbol. Read j bytes as the +| big-endian number the symbol equals. +| A j = 2 with two zero bytes denotes an +| unknown symbol. +| j > 8: As with j <= 8, but add (0x20 << 56) +| to the value in the following j - 8 +| bytes. +| +| Then comes the serial number, as a variant of +| uleb128, but better named ubeb128: +| Read bytes and shift the previous value left 7 +| (multiply by 128). Add in the new byte, repeat +| until a byte has bit 7 set. The serial number +| is the computed value minus 128. +| +| (MMO3_MIDDLE) +| 0x20 - Traverse middle trie. (Read a new command byte +| and recurse.) Decrement character position. +| +| (MMO3_RIGHT) +| 0x10 - Traverse right trie. (Read a new command byte and +| recurse.) + + Let's look again at the <> for the trivial file + (@pxref{File layout}). + +| 0x980b0000 - lop_stab for ":Main" = 0, serial 1. +| 0x203a4040 +| 0x10404020 +| 0x4d206120 +| 0x69016e00 +| 0x81000000 + + This forms the trivial trie (note that the path between ``:'' and + ``M'' is redundant): + +| 203a ":" +| 40 / +| 40 / +| 10 \ +| 40 / +| 40 / +| 204d "M" +| 2061 "a" +| 2069 "i" +| 016e "n" is the last character in a full symbol, and +| with a value represented in one byte. +| 00 The value is 0. +| 81 The serial number is 1. */ + + bfd_byte m = mmo_get_byte (abfd); + + /* Check first if we have a bad hair day. */ + if (abfd->tdata.mmo_data->have_error == true) + return false; + + if (m & MMO3_LEFT) + /* Traverse left trie. */ + mmo_get_symbols (abfd); + + if (m & MMO3_SYMBITS) + { + bfd_byte c = mmo_get_byte (abfd); + bfd_byte j = m & MMO3_TYPEBITS; + bfd_vma addr = 0; + enum mmo_sym_type sym_type; + unsigned int serno = 0; + bfd_byte k; + + if (m & MMO3_WCHAR) + { + bfd_byte c2 = mmo_get_byte (abfd); + + /* A two-byte character. We can't grok this, but neither can + mmotype, for other cases than the second byte being zero. */ + + if (c != 0) + { + abfd->tdata.mmo_data->lop_stab_symbol + [abfd->tdata.mmo_data->symbol_position] = 0; + + (*_bfd_error_handler) + (_("%s: unsupported wide character sequence\ + 0x%02X 0x%02X after symbol name starting with `%s'\n"), + bfd_get_filename (abfd), c, c2, + abfd->tdata.mmo_data->lop_stab_symbol); + bfd_set_error (bfd_error_bad_value); + abfd->tdata.mmo_data->have_error = true; + return false; + } + else + c = c2; + } + + abfd->tdata.mmo_data->lop_stab_symbol[abfd->tdata.mmo_data->symbol_position++] = c; + abfd->tdata.mmo_data->lop_stab_symbol[abfd->tdata.mmo_data->symbol_position] = 0; + + if (j & MMO3_REGQUAL_BITS) + { + if (j == MMO3_REGQUAL_BITS) + { + sym_type = mmo_reg_sym; + addr = mmo_get_byte (abfd); + } + else if (j <= 8) + { + unsigned int i; + + for (i = 0; i < j; i++) + addr = (addr << 8) + mmo_get_byte (abfd); + + if (addr == 0 && j == MMO3_UNDEF) + sym_type = mmo_undef_sym; + else + sym_type = mmo_abs_sym; + } + else + { + unsigned int i; + + for (i = MMO3_DATA; i < j; i++) + addr = (addr << 8) + mmo_get_byte (abfd); + + addr += (bfd_vma) 0x20 << 56; + sym_type = mmo_data_sym; + } + + /* Get the serial number. */ + do + { + k = mmo_get_byte (abfd); + serno = (serno << 7) + k; + } + while (k < 128); + serno -= 128; + + /* Got it. Now enter it. Skip a leading ":". */ + if (abfd->tdata.mmo_data->have_error == false + && ! mmo_create_symbol (abfd, + abfd->tdata.mmo_data->lop_stab_symbol + + 1, + addr, sym_type, serno)) + abfd->tdata.mmo_data->have_error = true; + } + + if (m & MMO3_MIDDLE) + /* Traverse middle trie. */ + mmo_get_symbols (abfd); + + abfd->tdata.mmo_data->symbol_position--; + } + + if (m & MMO3_RIGHT) + /* Traverse right trie. */ + mmo_get_symbols (abfd); + + return abfd->tdata.mmo_data->have_error == false; +} + +/* Get the location of memory area [VMA..VMA + SIZE - 1], which we think + is in section SEC. Adjust and reallocate zero-initialized contents. + If there's new contents, allocate to the next multiple of + MMO_SEC_CONTENTS_CHUNK_SIZE. */ + +static INLINE bfd_byte * +mmo_get_loc (sec, vma, size) + asection *sec; + bfd_vma vma; + int size; +{ + bfd_size_type allocated_size; + struct mmo_section_data_struct *sdatap + = (struct mmo_section_data_struct *) sec->used_by_bfd; + struct mmo_data_list_struct *datap = sdatap->head; + struct mmo_data_list_struct *entry; + + for (; datap != NULL; datap = datap->next) + { + if (datap->where <= vma + && datap->where + datap->size >= vma + size) + return datap->data + vma - datap->where; + else if (datap->where <= vma + && datap->where + datap->allocated_size >= vma + size + /* Only munch on the "allocated size" if it does not + overlap the next chunk. */ + && (datap->next == NULL || datap->next->where >= vma + size)) + { + /* There was room allocated, but the size wasn't set to include + it. Do that now. */ + datap->size += (vma + size) - (datap->where + datap->size); + + /* Update the section size. */ + if (vma + size > sec->vma + sec->_raw_size) + sec->_raw_size += (vma + size) - (sec->vma + sec->_raw_size); + + return datap->data + vma - datap->where; + } + } + + /* Not found; allocate a new block. First check in case we get a + request for a size split up over several blocks; we'll have to return + NULL for those cases, requesting the caller to split up the request. + Requests with an address aligned on MMO_SEC_CONTENTS_CHUNK_SIZE bytes and + for no more than MMO_SEC_CONTENTS_CHUNK_SIZE will always get resolved. */ + + for (datap = sdatap->head; datap != NULL; datap = datap->next) + if ((datap->where <= vma && datap->where + datap->size > vma) + || (datap->where < vma + size + && datap->where + datap->size >= vma + size)) + return NULL; + + allocated_size + = (size + MMO_SEC_CONTENTS_CHUNK_SIZE - 1) & ~(MMO_SEC_CONTENTS_CHUNK_SIZE - 1); + entry = (mmo_data_list_type *) + bfd_zalloc (sec->owner, sizeof (mmo_data_list_type) + allocated_size); + if (entry == NULL) + return false; + entry->where = vma; + entry->size = size; + entry->allocated_size = allocated_size; + + datap = sdatap->head; + + /* Sort the records by address. Optimize for the common case of adding + a record to the end of the list. */ + if (sdatap->tail != NULL && entry->where >= sdatap->tail->where) + { + sdatap->tail->next = entry; + entry->next = NULL; + sdatap->tail = entry; + } + else + { + mmo_data_list_type **look; + for (look = &sdatap->head; + *look != NULL && (*look)->where < entry->where; + look = &(*look)->next) + ; + entry->next = *look; + *look = entry; + if (entry->next == NULL) + { + sdatap->tail = entry; + + /* We get here for the first time (at other times too) for this + section. Say we have contents. */ + if (! bfd_set_section_flags (sec->owner, sec, + bfd_get_section_flags (sec->owner, sec) + | SEC_HAS_CONTENTS)) + return NULL; + } + } + + /* Update the section size. */ + if (vma + size > sec->vma + sec->_raw_size) + sec->_raw_size += (vma + size) - (sec->vma + sec->_raw_size); + return entry->data; +} + +/* Set sizes once we've read in all sections. */ + +static void +mmo_map_set_sizes (abfd, sec, ignored) + bfd *abfd ATTRIBUTE_UNUSED; + asection *sec; + PTR ignored ATTRIBUTE_UNUSED; +{ + sec->_cooked_size = sec->_raw_size; + sec->lma = sec->vma; +} + +/* Read the mmo file and turn it into sections. */ + +static boolean +mmo_scan (abfd) + bfd *abfd; +{ + unsigned int i; + unsigned int lineno = 1; + boolean error = false; + bfd_vma vma = 0; + asection *sec = bfd_make_section_old_way (abfd, MMO_TEXT_SECTION_NAME); + asection *non_spec_sec = NULL; + bfd_vma non_spec_vma = 0; + char *current_filename = NULL; + bfd_size_type nbytes_read = 0; + /* Buffer with room to read a 64-bit value. */ + bfd_byte buf[8]; + long stab_loc = -1; + char *file_names[256]; + + memset (file_names, 0, sizeof (file_names)); + + if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) + goto error_return; + + while ((nbytes_read = bfd_bread (buf, 4, abfd)) == 4) + { + if (buf[0] == LOP) + { + unsigned int y = bfd_get_8 (abfd, buf + 2); + unsigned int z = bfd_get_8 (abfd, buf + 3); + + /* Change back to the original section for lopcodes other + than LOP_QUOTE that comes after a LOP_SPEC. */ + if ((buf[1] != LOP_QUOTE || y != 0 || z != 1) + && non_spec_sec != NULL) + { + sec = non_spec_sec; + vma = non_spec_vma; + non_spec_sec = NULL; + } + + switch (buf[1]) + { + default: + (*_bfd_error_handler) + (_("%s: invalid mmo file: unsupported lopcode `%d'\n"), + bfd_get_filename (abfd), buf[1]); + bfd_set_error (bfd_error_bad_value); + goto error_return; + + case LOP_QUOTE: + /* Quote the next 32-bit word. */ + if (y != 0 || z != 1) + { + (*_bfd_error_handler) + (_("%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"), + bfd_get_filename (abfd), y*256+z); + bfd_set_error (bfd_error_bad_value); + goto error_return; + } + if (bfd_bread (buf, 4, abfd) != 4) + goto error_return; + + mmo_xore_32 (sec, vma, bfd_get_32 (abfd, buf)); + vma += 4; + vma &= ~3; + lineno++; + break; + + case LOP_LOC: + /* Set vma (and section). */ + vma = (bfd_vma) y << 56; + if (z == 1) + { + /* Get a 32-bit value. */ + if (bfd_bread (buf, 4, abfd) != 4) + goto error_return; + + vma += bfd_get_32 (abfd, buf); + } + else if (z == 2) + { + /* Get a 64-bit value. */ + if (bfd_bread (buf, 8, abfd) != 8) + goto error_return; + + vma += bfd_get_64 (abfd, buf); + } + else + { + (*_bfd_error_handler) + (_("%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"), + bfd_get_filename (abfd), z); + bfd_set_error (bfd_error_bad_value); + goto error_return; + } + + sec = mmo_decide_section (abfd, vma); + if (sec == NULL) + goto error_return; + break; + + case LOP_SKIP: + /* Move forward within the same section. */ + vma += y * 256 + z; + + sec = mmo_decide_section (abfd, vma); + if (sec == NULL) + goto error_return; + break; + + case LOP_FIXO: + /* A fixup: Store the current vma somewhere. Position using + same format as LOP_LOC. */ + { + bfd_vma p = (bfd_vma) y << 56; + asection *fixosec; + + if (z == 1) + { + /* Get a 32-bit value. */ + if (bfd_bread (buf, 4, abfd) != 4) + goto error_return; + + p += bfd_get_32 (abfd, buf); + } + else if (z == 2) + { + /* Get a 64-bit value. */ + if (bfd_bread (buf, 8, abfd) != 8) + goto error_return; + + p += bfd_get_64 (abfd, buf); + } + else + { + (*_bfd_error_handler) + (_("%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"), + bfd_get_filename (abfd), z); + bfd_set_error (bfd_error_bad_value); + goto error_return; + } + + /* The section where we store this address might be a + different one than the current section. */ + fixosec = mmo_decide_section (abfd, p); + if (fixosec == NULL) + goto error_return; + mmo_xore_64 (fixosec, p, vma); + } + break; + + case LOP_FIXR: + /* A fixup: Store YZ of this lopcode into YZ at vma - 4 * yz. */ + { + unsigned int yz = (y * 256 + z); + bfd_vma p = vma + 2 - 4 * yz; + asection *fixrsec = mmo_decide_section (abfd, p); + if (fixrsec == NULL) + goto error_return; + mmo_xore_16 (fixrsec, p, yz); + } + break; + + case LOP_FIXRX: + /* A fixup, similar to lop_fixr, but taking larger numbers + and can change branches into the opposite direction + (gasp!). */ + { + bfd_vma delta; + bfd_vma p; + asection *fixrsec; + + if (y != 0) + { + (*_bfd_error_handler) + (_("%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"), + bfd_get_filename (abfd), y); + bfd_set_error (bfd_error_bad_value); + goto error_return; + } + + if (z != 16 && z != 24) + { + (*_bfd_error_handler) + (_("%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"), + bfd_get_filename (abfd), z); + bfd_set_error (bfd_error_bad_value); + goto error_return; + } + + /* Get the next 32-bit value. */ + if (bfd_bread (buf, 4, abfd) != 4) + goto error_return; + + delta = bfd_get_32 (abfd, buf); + + /* Do an, ehm, involved calculation for the location of + the fixup. See mmixal documentation for a verbose + explanation. We follow it verbosely here for the + readers delight. */ + if (buf[0] == 0) + p = vma - 4 * delta; + else if (buf[0] == 1) + p = vma - 4 * ((delta & 0xffffff) - (1 << z)); + else + { + (*_bfd_error_handler) + (_("%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"), + bfd_get_filename (abfd), buf[0]); + bfd_set_error (bfd_error_bad_value); + goto error_return; + } + + fixrsec = mmo_decide_section (abfd, vma); + if (fixrsec == NULL) + goto error_return; + mmo_xore_32 (fixrsec, p, delta); + } + break; + + case LOP_FILE: + /* Set current file and perhaps the file name. Reset line + number. */ + if (z != 0) + { + char *fname = bfd_malloc (z * 4 + 1); + + if (fname == NULL) + { + (*_bfd_error_handler) + (_("%s: cannot allocate file name for file number %d, %d bytes\n"), + bfd_get_filename (abfd), y, z * 4 + 1); + bfd_set_error (bfd_error_system_call); + goto error_return; + } + + fname[z * 4] = 0; + + for (i = 0; i < z; i++) + { + if (bfd_bread (fname + i * 4, 4, abfd) != 4) + { + free (fname); + goto error_return; + } + } + + if (file_names[y] != NULL) + { + (*_bfd_error_handler) + (_("%s: invalid mmo file: file number %d `%s',\ + was already entered as `%s'\n"), + bfd_get_filename (abfd), y, fname, file_names[y]); + bfd_set_error (bfd_error_bad_value); + goto error_return; + } + + file_names[y] = fname; + } + + if (file_names[y] == NULL) + { + (*_bfd_error_handler) + (_("%s: invalid mmo file: file name for number %d\ + was not specified before use\n"), + bfd_get_filename (abfd), y); + bfd_set_error (bfd_error_bad_value); + goto error_return; + } + + current_filename = file_names[y]; + lineno = 0; + break; + + case LOP_LINE: + /* Set line number. */ + lineno = y * 256 + z; + /* FIXME: Create a sequence of mmo-specific line number + entries for each section, then translate into canonical + format. */ + break; + + case LOP_SPEC: + /* Special data follows until the next non-lop_quote + lopcode. */ + non_spec_sec = sec; + non_spec_vma = vma; + sec = mmo_get_spec_section (abfd, y * 256 + z); + if (sec == NULL) + goto error_return; + + vma = sec->vma; + break; + + case LOP_PRE: + { + /* We ignore header information, except we read in the + creation time from the first 32-bit word with the time + in seconds since era. */ + if (z >= 1 + && bfd_bread (abfd->tdata.mmo_data->created, 4, + abfd) != 4) + goto error_return; + + for (i = 1; i < z; i++) + if (bfd_bread (buf, 4, abfd) != 4) + goto error_return; + } + break; + + case LOP_POST: + /* This tells of the contents of registers $Z..$255 at + startup. We make a section out of it, with VMA = Z * 8, + but only if Z != 255 or the contents is non-zero. */ + { + asection *rsec; + bfd_byte *loc; + bfd_vma first_octa; + bfd_vma startaddr_octa; + + /* Read first octaword outside loop to simplify logic when + excluding the Z == 255, octa == 0 case. */ + if (bfd_bread (buf, 8, abfd) != 8) + goto error_return; + + first_octa = bfd_get_64 (abfd, buf); + + /* Don't emit contents for the trivial case which is + always present; $255 pointing to Main. */ + if (z != 255) + { + rsec + = bfd_make_section_old_way (abfd, + MMIX_REG_CONTENTS_SECTION_NAME); + rsec->vma = z * 8; + loc = mmo_get_loc (rsec, z * 8, (255 - z) * 8); + bfd_put_64 (abfd, first_octa, loc); + + for (i = z + 1; i < 255; i++) + { + if (bfd_bread (loc + (i - z) * 8, 8, abfd) != 8) + goto error_return; + } + + /* Read out the last octabyte, and use it to set the + start address. */ + if (bfd_bread (buf, 8, abfd) != 8) + goto error_return; + + startaddr_octa = bfd_get_64 (abfd, buf); + } + else + startaddr_octa = first_octa; + + if (! bfd_set_start_address (abfd, startaddr_octa)) + { + /* Currently this can't fail, but this should handle + future failures. */ + bfd_set_error (bfd_error_bad_value); + goto error_return; + } + } + break; + + case LOP_STAB: + /* We read in the symbols now, not later. */ + if (y != 0 || z != 0) + { + (*_bfd_error_handler) + (_("%s: invalid mmo file: fields y and z of lop_stab\ + non-zero, y: %d, z: %d\n"), + bfd_get_filename (abfd), y, z); + bfd_set_error (bfd_error_bad_value); + goto error_return; + } + + /* Save the location, so we can check that YZ in the LOP_END + is correct. */ + stab_loc = bfd_tell (abfd); + + /* It's not said that an MMO can be without symbols (though + mmixal will refuse to assemble files without Main), but + it seems it would still be a valid mmo-file, so allow it. + We detect the absence of a symbol area in that the upper + limit is computed (from the lop_end YZ field) as 0. + Don't call mmo_get_symbols; it can only detect the end of + a valid symbol trie, not the absence of one. */ + if (abfd->tdata.mmo_data->max_symbol_length != 0 + && ! mmo_get_symbols (abfd)) + goto error_return; + break; + + case LOP_END: + { + /* This must be the last 32-bit word in an mmo file. + Let's find out. */ + struct stat statbuf; + long curpos = bfd_tell (abfd); + + if (bfd_stat (abfd, &statbuf) < 0) + goto error_return; + + if (statbuf.st_size != curpos) + { + (*_bfd_error_handler) + (_("%s: invalid mmo file: lop_end not last item in\ + file\n"), + bfd_get_filename (abfd)); + bfd_set_error (bfd_error_bad_value); + goto error_return; + } + + /* Check that the YZ field is right. Subtract the size of + this LOP_END in the calculation; YZ does not include + it. */ + if ((long) (y * 256 + z) * 4 != (curpos - stab_loc) - 4) + { + (*_bfd_error_handler) + (_("%s: invalid mmo file: YZ of lop_end (%ld)\ + not equal to the number of tetras to the preceding lop_stab (%ld)\n"), + bfd_get_filename (abfd), (long) (y * 256 + z), + (curpos - stab_loc - 4)/4); + bfd_set_error (bfd_error_bad_value); + goto error_return; + } + + bfd_map_over_sections (abfd, mmo_map_set_sizes, NULL); + goto done; + } + } + } + else + { + /* This wasn't a lopcode, so store it in the current section. */ + mmo_xore_32 (sec, vma & ~3, bfd_get_32 (abfd, buf)); + vma += 4; + vma &= ~3; + lineno++; + } + } + + /* We know this file is a multiple of four bytes (checked in + mmo_object_p), so if we got something other than 0, this was a bad + file (although it's more likely we'll get 0 in that case too). + If we got end-of-file, then there was no lop_stab, so the file has + invalid format. */ + + if (nbytes_read != 0) + bfd_set_error (bfd_error_system_call); + else + bfd_set_error (bfd_error_bad_value); + + error_return: + error = true; + done: + /* Mark the .text and .data section with their normal attribute if they + contain anything. This is not redundant wrt. mmo_decide_section, + since that code might never execute, and conversely the alloc+code + section flags must be set then. */ + sec = bfd_get_section_by_name (abfd, MMO_TEXT_SECTION_NAME); + if (sec != NULL + && (bfd_get_section_flags (abfd, sec) & SEC_HAS_CONTENTS) + && ! bfd_set_section_flags (abfd, sec, + bfd_get_section_flags (abfd, sec) + | SEC_ALLOC | SEC_LOAD | SEC_CODE)) + error = true; + + sec = bfd_get_section_by_name (abfd, MMO_DATA_SECTION_NAME); + if (sec != NULL + && (bfd_get_section_flags (abfd, sec) & SEC_HAS_CONTENTS) + && ! bfd_set_section_flags (abfd, sec, + bfd_get_section_flags (abfd, sec) + | SEC_ALLOC | SEC_LOAD)) + error = true; + + /* Free whatever resources we took. */ + for (i = 0; i < sizeof (file_names) / sizeof (file_names[0]); i++) + if (file_names[i]) + free (file_names[i]); + return error ? false : true; +} + +/* A hook to set up object file dependent section information. For mmo, + we point out the shape of allocated section contents. */ + +static boolean +mmo_new_section_hook (abfd, newsect) + bfd *abfd ATTRIBUTE_UNUSED; + asection *newsect; +{ + /* We zero-fill all fields and assume NULL is represented by an all + zero-bit pattern. */ + newsect->used_by_bfd = + (PTR) bfd_zalloc (abfd, sizeof (struct mmo_section_data_struct)); + + if (!newsect->used_by_bfd) + return false; + + /* Always align to at least 32-bit words. */ + newsect->alignment_power = 2; + return true; +} + +/* We already have section contents loaded for sections that have + contents. */ + +static boolean +mmo_get_section_contents (abfd, sec, location, offset, bytes_to_do) + bfd *abfd ATTRIBUTE_UNUSED; + asection *sec ATTRIBUTE_UNUSED; + PTR location ATTRIBUTE_UNUSED; + file_ptr offset ATTRIBUTE_UNUSED; + bfd_size_type bytes_to_do ATTRIBUTE_UNUSED; +{ + /* Iterate over diminishing chunk sizes, copying contents, like + mmo_set_section_contents. */ + while (bytes_to_do) + { + /* A minor song-and-dance to make sure we're not bitten by the + distant possibility of the cast from bfd_vma to int making the + chunk zero-sized. */ + int chunk_size + = (int) bytes_to_do != 0 ? bytes_to_do : MMO_SEC_CONTENTS_CHUNK_SIZE; + bfd_byte *loc; + + do + loc = mmo_get_loc (sec, sec->vma + offset, chunk_size); + while (loc == NULL && (chunk_size /= 2) != 0); + + if (chunk_size == 0) + return false; + + memcpy (location, loc, chunk_size); + + location += chunk_size; + bytes_to_do -= chunk_size; + offset += chunk_size; + } + return true; +} + +/* Return the amount of memory needed to read the symbol table. */ + +static long +mmo_get_symtab_upper_bound (abfd) + bfd *abfd ATTRIBUTE_UNUSED; +{ + return (abfd->symcount + 1) * sizeof (asymbol *); +} + +/* Sort mmo symbols by serial number. */ + +static int +mmo_sort_mmo_symbols (arg1, arg2) + CONST PTR arg1; + CONST PTR arg2; +{ + CONST struct mmo_symbol *sym1 = *(CONST struct mmo_symbol **) arg1; + CONST struct mmo_symbol *sym2 = *(CONST struct mmo_symbol **) arg2; + + /* Sort by serial number first. */ + if (sym1->serno < sym2->serno) + return -1; + else if (sym1->serno > sym2->serno) + return 1; + + /* Then sort by address of the table entries. */ + return ((CONST char *) arg1 - (CONST char *) arg2); +} + +/* Translate the symbol table. */ + +static long +mmo_get_symtab (abfd, alocation) + bfd *abfd; + asymbol **alocation; +{ + unsigned int symcount = bfd_get_symcount (abfd); + asymbol *csymbols; + unsigned int i; + + csymbols = abfd->tdata.mmo_data->csymbols; + if (csymbols == NULL) + { + asymbol *c; + struct mmo_symbol *s; + struct mmo_symbol **msp; + + /* First we store the symbols into the table we'll return, then we + qsort it on the serial number, with secondary on the address of + the symbol, to preserve order if there would be non-unique serial + numbers. */ + for (s = abfd->tdata.mmo_data->symbols, + msp = (struct mmo_symbol **) alocation; + s != NULL; + s = s->next, ++msp) + *msp = s; + + *msp = NULL; + + qsort (alocation, symcount, sizeof (struct mmo_symbol *), + mmo_sort_mmo_symbols); + + csymbols = (asymbol *) bfd_alloc (abfd, symcount * sizeof (asymbol)); + if (csymbols == NULL && symcount != 0) + return false; + abfd->tdata.mmo_data->csymbols = csymbols; + + for (msp = (struct mmo_symbol **) alocation, c = csymbols; + *msp != NULL; + msp++, ++c) + { + s = *msp; + c->the_bfd = abfd; + c->name = s->name; + c->value = s->value; + c->flags = BSF_GLOBAL; + + if (s->sym_type == mmo_data_sym) + { + c->section + = bfd_get_section_by_name (abfd, MMO_DATA_SECTION_NAME); + + if (c->section == NULL) + c->section = bfd_abs_section_ptr; + else + c->value -= c->section->vma; + } + else if (s->sym_type == mmo_undef_sym) + c->section = bfd_und_section_ptr; + else if (s->sym_type == mmo_reg_sym) + { + c->section + = bfd_make_section_old_way (abfd, MMIX_REG_SECTION_NAME); + } + else + { + asection *textsec + = bfd_get_section_by_name (abfd, MMO_TEXT_SECTION_NAME); + + if (textsec != NULL + && c->value >= textsec->vma + && c->value <= textsec->vma + textsec->_cooked_size) + { + c->section = textsec; + c->value -= c->section->vma; + } + else + c->section = bfd_abs_section_ptr; + } + + c->udata.p = NULL; + } + } + + /* Last, overwrite the incoming table with the right-type entries. */ + for (i = 0; i < symcount; i++) + *alocation++ = csymbols++; + *alocation = NULL; + + return symcount; +} + +/* Make an empty symbol. */ + +static asymbol * +mmo_make_empty_symbol (abfd) + bfd *abfd; +{ + asymbol *new = (asymbol *) bfd_zalloc (abfd, sizeof (asymbol)); + + if (new) + new->the_bfd = abfd; + return new; +} + +/* Get information about a symbol. */ + +static void +mmo_get_symbol_info (ignore_abfd, symbol, ret) + bfd *ignore_abfd ATTRIBUTE_UNUSED; + asymbol *symbol; + symbol_info *ret; +{ + bfd_symbol_info (symbol, ret); +} + +static void +mmo_print_symbol (abfd, afile, symbol, how) + bfd *abfd; + PTR afile; + asymbol *symbol; + bfd_print_symbol_type how; +{ + FILE *file = (FILE *) afile; + + switch (how) + { + case bfd_print_symbol_name: + fprintf (file, "%s", symbol->name); + break; + default: + bfd_print_symbol_vandf (abfd, (PTR) file, symbol); + + fprintf (file, " %-5s %s", + symbol->section->name, + symbol->name); + } +} + +/* We can't map a file directly into executable code, so the + size of header information is irrelevant. */ + +static int +mmo_sizeof_headers (abfd, exec) + bfd *abfd ATTRIBUTE_UNUSED; + boolean exec ATTRIBUTE_UNUSED; +{ + return 0; +} + +/* Write the (section-neutral) file preamble. */ + +static boolean +mmo_internal_write_header (abfd) + bfd *abfd; +{ + CONST char lop_pre_bfd[] = { LOP, LOP_PRE, 1, 1}; + + if (bfd_bwrite (lop_pre_bfd, 4, abfd) != 4) + return false; + + /* Copy creation time of original file. */ + if (bfd_bwrite (abfd->tdata.mmo_data->created, 4, abfd) != 4) + return false; + + return true; +} + +/* Write the LOP_POST record, with global register initializations. + Z is the Z field of the LOP_POST, corresponding to 255 - number of + registers at DATA. The Z = 255 field is filled in with the + start-address. */ + +static boolean +mmo_internal_write_post (abfd, z, sec) + bfd *abfd; + int z; + asection *sec; +{ + int i; + bfd_byte buf[8]; + mmo_write_tetra_raw (abfd, (LOP << 24) | (LOP_POST << 16) | z); + + for (i = z; i < 255; i++) + { + bfd_byte *data = mmo_get_loc (sec, i * 8, 8); + + if (bfd_bwrite (data, 8, abfd) != 8) + return false; + } + + /* For Z == $255, we always emit the start location; supposedly Main, + but we have it handy at bfd_get_start_address. If we're called with + Z == 255, don't assume DATA is valid. */ + bfd_put_64 (abfd, bfd_get_start_address (abfd), buf); + + return + abfd->tdata.mmo_data->have_error == false + && bfd_bwrite (buf, 8, abfd) == 8; +} + +/* Translate to and from BFD flags. This is to make sure that we don't + get bitten by BFD flag number changes. */ + +static flagword +mmo_sec_flags_from_bfd_flags (flags) + flagword flags; +{ + flagword oflags = 0; + + if (flags & SEC_ALLOC) + oflags |= MMO_SEC_ALLOC; + if (flags & SEC_LOAD) + oflags |= MMO_SEC_LOAD; + if (flags & SEC_RELOC) + oflags |= MMO_SEC_RELOC; + if (flags & SEC_READONLY) + oflags |= MMO_SEC_READONLY; + if (flags & SEC_CODE) + oflags |= MMO_SEC_CODE; + if (flags & SEC_DATA) + oflags |= MMO_SEC_DATA; + if (flags & SEC_NEVER_LOAD) + oflags |= MMO_SEC_NEVER_LOAD; + if (flags & SEC_IS_COMMON) + oflags |= MMO_SEC_IS_COMMON; + if (flags & SEC_DEBUGGING) + oflags |= MMO_SEC_DEBUGGING; + + return oflags; +} + +static flagword +bfd_sec_flags_from_mmo_flags (flags) + flagword flags; +{ + flagword oflags = 0; + + if (flags & MMO_SEC_ALLOC) + oflags |= SEC_ALLOC; + if (flags & MMO_SEC_LOAD) + oflags |= SEC_LOAD; + if (flags & MMO_SEC_RELOC) + oflags |= SEC_RELOC; + if (flags & MMO_SEC_READONLY) + oflags |= SEC_READONLY; + if (flags & MMO_SEC_CODE) + oflags |= SEC_CODE; + if (flags & MMO_SEC_DATA) + oflags |= SEC_DATA; + if (flags & MMO_SEC_NEVER_LOAD) + oflags |= SEC_NEVER_LOAD; + if (flags & MMO_SEC_IS_COMMON) + oflags |= SEC_IS_COMMON; + if (flags & MMO_SEC_DEBUGGING) + oflags |= SEC_DEBUGGING; + + return oflags; +} + +/* Write a section. */ + +static boolean +mmo_internal_write_section (abfd, sec) + bfd *abfd; + asection *sec; +{ + /* We do it differently depending on what section this is: + + ".text": Output, prepended by information about the first source file + (not yet implemented.) + + ".data": Output. + + (".MMIX.reg_contents": Not handled here.) + + Anything else: Output inside a lop_spec 80, in the format described + above. */ + + if (strcmp (sec->name, MMO_TEXT_SECTION_NAME) == 0) + /* FIXME: Output source file name and line number. */ + return + mmo_write_loc_chunk_list (abfd, + ((struct mmo_section_data_struct *) + (sec->used_by_bfd))->head); + else if (strcmp (sec->name, MMO_DATA_SECTION_NAME) == 0) + return + mmo_write_loc_chunk_list (abfd, + ((struct mmo_section_data_struct *) + (sec->used_by_bfd))->head); + else if (strcmp (sec->name, MMIX_REG_CONTENTS_SECTION_NAME) == 0) + /* Not handled here. */ + { + /* This would normally be an abort call since this can't happen, but + we don't do that. */ + bfd_set_error (bfd_error_bad_value); + return false; + } + else if (strncmp (sec->name, MMIX_OTHER_SPEC_SECTION_PREFIX, + strlen (MMIX_OTHER_SPEC_SECTION_PREFIX)) == 0) + { + int n = atoi (sec->name + strlen (MMIX_OTHER_SPEC_SECTION_PREFIX)); + mmo_write_tetra_raw (abfd, (LOP << 24) | (LOP_SPEC << 16) | n); + return + abfd->tdata.mmo_data->have_error == false + && mmo_write_chunk_list (abfd, + ((struct mmo_section_data_struct *) + (sec->used_by_bfd))->head); + } + /* Ignore sections that are just allocated or empty; we write out + _contents_ here. */ + else if ((bfd_get_section_flags (abfd, sec) & SEC_HAS_CONTENTS) != 0 + && sec->_raw_size != 0) + { + /* Keep the document-comment formatted the way it is. */ +/* +INODE +mmo section mapping, , Symbol-table, mmo +SUBSECTION + mmo section mapping + + The implementation in BFD uses special data type 80 (decimal) to + encapsulate and describe named sections, containing e.g.@: debug + information. If needed, any datum in the encapsulation will be + quoted using lop_quote. First comes a 32-bit word holding the + number of 32-bit words containing the zero-terminated zero-padded + segment name. After the name there's a 32-bit word holding flags + describing the section type. Then comes a 64-bit big-endian word + with the section length (in bytes), then another with the section + start address. Depending on the type of section, the contents + might follow, zero-padded to 32-bit boundary. For a loadable + section (such as data or code), the contents might follow at some + later point, not necessarily immediately, as a lop_loc with the + same start address as in the section description, followed by the + contents. This in effect forms a descriptor that must be emitted + before the actual contents. Sections described this way must not + overlap. + + For areas that don't have such descriptors, synthetic sections are + formed by BFD. Consecutive contents in the two memory areas + @samp{0x0000@dots{}00} to @samp{0x01ff@dots{}ff} and + @samp{0x2000@dots{}00} to @samp{0x20ff@dots{}ff} are entered in + sections named <<.text>> and <<.data>> respectively. If an area + is not otherwise described, but would together with a neighboring + lower area be less than @samp{0x40000000} bytes long, it is joined + with the lower area and the gap is zero-filled. For other cases, + a new section is formed, named <<.MMIX.sec.@var{n}>>. Here, + @var{n} is a number, a running count through the mmo file, + starting at 0. + +EXAMPLE + A loadable section specified as: + +| .section secname,"ax" +| TETRA 1,2,3,4,-1,-2009 +| BYTE 80 + + and linked to address @samp{0x4}, is represented by the sequence: + +| 0x98080050 - lop_spec 80 +| 0x00000002 - two 32-bit words for the section name +| 0x7365636e - "secn" +| 0x616d6500 - "ame\0" +| 0x00000033 - flags CODE, READONLY, LOAD, ALLOC +| 0x00000000 - high 32 bits of section length +| 0x0000001c - section length is 28 bytes; 6 * 4 + 1 + alignment to 32 bits +| 0x00000000 - high 32 bits of section address +| 0x00000004 - section address is 4 +| 0x98010002 - 64 bits with address of following data +| 0x00000000 - high 64 bits of address +| 0x00000004 - data starts at address 4 +| 0x00000001 - 1 +| 0x00000002 - 2 +| 0x00000003 - 3 +| 0x00000004 - 4 +| 0xffffffff - -1 +| 0xfffff827 - -2009 +| 0x50000000 - 80 as a byte, padded with zeros. + + Note that the lop_spec wrapping does not include the section + contents. Compare this to a non-loaded section specified as: + +| .section thirdsec +| TETRA 200001,100002 +| BYTE 38,40 + + This, when linked to address @samp{0x200000000000001c}, is + represented by: + +| 0x98080050 - lop_spec 80 +| 0x00000002 - two 32-bit words for the section name +| 0x7365636e - "thir" +| 0x616d6500 - "dsec" +| 0x00000010 - flag READONLY +| 0x00000000 - high 32 bits of section length +| 0x0000000c - section length is 12 bytes; 2 * 4 + 2 + alignment to 32 bits +| 0x20000000 - high 64 bits of address +| 0x0000001c - low 64 bits of address 0x200000000000001c +| 0x00030d41 - 200001 +| 0x000186a2 - 100002 +| 0x26280000 - 38, 40 as bytes, padded with zeros + + For the latter example, the section contents must not to appear + loaded in memory, and is therefore specified as part of the + special data. The address is usually unimportant but might + provide information for e.g.@: the DWARF 2 debugging format. */ + + mmo_write_tetra_raw (abfd, LOP_SPEC_SECTION); + mmo_write_tetra (abfd, (strlen (sec->name) + 3) / 4); + mmo_write_chunk (abfd, sec->name, strlen (sec->name)); + /* FIXME: We can get debug sections (.debug_line & Co.) with a + section flag still having SEC_RELOC set. Investigate. This + might be true for all alien sections; perhaps mmo.em should clear + that flag. Might be related to weak references. */ + mmo_write_tetra (abfd, + mmo_sec_flags_from_bfd_flags + (bfd_get_section_flags (abfd, sec))); + mmo_write_octa (abfd, sec->_raw_size); + mmo_write_octa (abfd, bfd_get_section_vma (abfd, sec)); + + /* Writing a LOP_LOC ends the LOP_SPEC data, and makes data actually + loaded. */ + if (bfd_get_section_flags (abfd, sec) & SEC_LOAD) + return + abfd->tdata.mmo_data->have_error == false + && mmo_write_loc_chunk_list (abfd, + ((struct mmo_section_data_struct *) + (sec->used_by_bfd))->head); + return + abfd->tdata.mmo_data->have_error == false + && mmo_write_chunk_list (abfd, + ((struct mmo_section_data_struct *) + (sec->used_by_bfd))->head); + } + return true; +} + +/* We save up all data before output. */ + +static boolean +mmo_set_section_contents (abfd, sec, location, offset, bytes_to_do) + bfd *abfd ATTRIBUTE_UNUSED; + sec_ptr sec; + PTR location; + file_ptr offset; + bfd_size_type bytes_to_do; +{ + /* Iterate over diminishing chunk sizes, copying contents. */ + while (bytes_to_do) + { + /* A minor song-and-dance to make sure we're not bitten by the + distant possibility of the cast from bfd_vma to int making the + chunk zero-sized. */ + int chunk_size + = (int) bytes_to_do != 0 ? bytes_to_do : MMO_SEC_CONTENTS_CHUNK_SIZE; + bfd_byte *loc; + + do + loc = mmo_get_loc (sec, sec->vma + offset, chunk_size); + while (loc == NULL && (chunk_size /= 2) != 0); + + if (chunk_size == 0) + return false; + + memcpy (loc, location, chunk_size); + + location += chunk_size; + bytes_to_do -= chunk_size; + offset += chunk_size; + } + return true; +} + +/* Add a symbol to a trie-tree. */ + +static boolean +mmo_internal_add_3_sym (abfd, rootp, symp) + bfd *abfd; + struct mmo_symbol_trie *rootp; + CONST struct mmo_symbol *symp; +{ + CONST char *name = symp->name; + struct mmo_symbol_trie *trie = rootp; + struct mmo_symbol_trie **triep = NULL; + + while (*name && trie != NULL) + { + if (*name < trie->symchar) + { + triep = &trie->left; + trie = trie->left; + } + else if (*name > trie->symchar) + { + triep = &trie->right; + trie = trie->right; + } + else if (*name == trie->symchar) + { + triep = &trie->middle; + name++; + + /* Make sure "trie" points to where we should fill in the + current symbol whenever we've iterated through "name". We + would lose the right position if we encounter "foobar" then + "foo". */ + if (*name) + trie = trie->middle; + } + } + + while (*name != 0) + { + /* Create middle branches for the rest of the characters. */ + trie = bfd_zalloc (abfd, sizeof (struct mmo_symbol_trie)); + *triep = trie; + trie->symchar = *name++; + triep = &trie->middle; + } + + /* We discover a duplicate symbol rather late in the process, but still; + we discover it and bail out. */ + if (trie->sym.name != NULL) + { + (*_bfd_error_handler) + (_("%s: invalid symbol table: duplicate symbol `%s'\n"), + bfd_get_filename (abfd), trie->sym.name); + bfd_set_error (bfd_error_bad_value); + return false; + } + + memcpy (&trie->sym, symp, sizeof *symp); + return true; +} + +/* Find out the length of the serialized version of a trie in bytes. */ + +static unsigned int +mmo_internal_3_length (abfd, trie) + bfd *abfd; + struct mmo_symbol_trie *trie; +{ + /* First, one for the control byte. */ + unsigned int length = 1; + + if (trie == NULL) + return 0; + + /* Add in the recursion to the left. */ + length += mmo_internal_3_length (abfd, trie->left); + + /* Add in the middle trie and the character. */ + length += 1 + mmo_internal_3_length (abfd, trie->middle); + + /* Add in the recursion to the right. */ + length += mmo_internal_3_length (abfd, trie->right); + + /* Add in bytes for the symbol (if this is an endnode). */ + if (trie->sym.name != NULL) + { + unsigned int serno = trie->sym.serno; + + /* First what it takes to encode the value. */ + if (trie->sym.sym_type == mmo_reg_sym) + length++; + else if (trie->sym.sym_type == mmo_undef_sym) + length += 2; + else + { + bfd_vma value = trie->sym.value; + + /* Coded in one to eight following bytes. */ + if (trie->sym.sym_type == mmo_data_sym) + value -= (bfd_vma) 0x20 << 56; + + do + { + value >>= 8; + length++; + } + while (value != 0); + } + + /* Find out what it takes to encode the serial number. */ + do + { + serno >>= 7; + length++; + } + while (serno != 0); + } + + return length; +} + +/* Helper function for outputting the serial number of a symbol, output as + a variant of leb128 (see dwarf2 documentation) which could be called + beb128. Using a helper function and recursion simplifies debugging. */ + +static void +mmo_beb128_out (abfd, serno, marker) + bfd *abfd; + int serno; + int marker; +{ + if (serno & ~0x7f) + mmo_beb128_out (abfd, serno >> 7, 0); + mmo_write_byte (abfd, marker | (serno & 0x7f)); +} + +/* Serialize a trie. */ + +static void +mmo_internal_3_dump (abfd, trie) + bfd *abfd; + struct mmo_symbol_trie *trie; +{ + bfd_byte control = 0; + + if (trie == NULL) + return; + + if (trie->left) + control |= MMO3_LEFT; + + if (trie->middle) + control |= MMO3_MIDDLE; + + if (trie->right) + control |= MMO3_RIGHT; + + if (trie->sym.name != NULL) + { + /* Encode the symbol type and length of value bytes. */ + if (trie->sym.sym_type == mmo_reg_sym) + control |= MMO3_REGQUAL_BITS; + else if (trie->sym.sym_type == mmo_undef_sym) + control |= MMO3_UNDEF; + else + { + bfd_vma value = trie->sym.value; + + /* Coded in 1..8 following bytes. */ + if (trie->sym.sym_type == mmo_data_sym) + { + control |= MMO3_DATA; + value -= (bfd_vma) 0x20 << 56; + } + + do + { + value >>= 8; + control++; + } + while (value != 0); + } + } + + /* The control byte is output before recursing. */ + mmo_write_byte (abfd, control); + + mmo_internal_3_dump (abfd, trie->left); + + if (control & MMO3_SYMBITS) + { + mmo_write_byte (abfd, trie->symchar); + + if (trie->sym.name != NULL) + { + if (trie->sym.sym_type == mmo_reg_sym) + mmo_write_byte (abfd, trie->sym.value); + else if (trie->sym.sym_type == mmo_undef_sym) + { + mmo_write_byte (abfd, 0); + mmo_write_byte (abfd, 0); + } + else + { + bfd_vma value = trie->sym.value; + + bfd_byte byte_n = control & 15; + + /* Coded in 1..8 following bytes. Note that the value is + shifted out big-endian. */ + if (trie->sym.sym_type == mmo_data_sym) + { + value -= (bfd_vma) 0x20 << 56; + byte_n -= 8; + } + + do + { + mmo_write_byte (abfd, (value >> ((byte_n - 1) * 8)) & 0xff); + byte_n--; + } + while (byte_n != 0); + } + + mmo_beb128_out (abfd, trie->sym.serno, 128); + } + mmo_internal_3_dump (abfd, trie->middle); + } + mmo_internal_3_dump (abfd, trie->right); +} + +/* Write symbols, either in mmo format or hidden in a lop_spec 80 section. + Write the lop_end terminator also. */ + +static boolean +mmo_write_symbols_and_terminator (abfd) + bfd *abfd; +{ + int count = bfd_get_symcount (abfd); + asymbol *fakemain[2]; + asymbol **table; + int serno = 2; + struct mmo_symbol_trie root; + int trie_len; + int i; + bfd_byte buf[4]; + + /* Create a symbol for "Main". */ + asymbol *mainsym = bfd_make_empty_symbol (abfd); + + mainsym->flags = BSF_GLOBAL; + mainsym->value = bfd_get_start_address (abfd); + mainsym->name = MMIX_START_SYMBOL_NAME; + mainsym->section = bfd_abs_section_ptr; + fakemain[0] = mainsym; + fakemain[1] = NULL; + + memset (&root, 0, sizeof (root)); + + /* Make all symbols take a left turn. */ + root.symchar = 0xff; + + /* There must always be a ":Main", so we'll add one + if there are no symbols. */ + if (count == 0) + { + table = fakemain; + count = 1; + } + else + table = bfd_get_outsymbols (abfd); + + for (i = 0; i < count && table[i] != NULL; i++) + { + asymbol *s = table[i]; + + /* It's not enough to consult bfd_is_local_label, since it does not + mean "local" in the sense of linkable-and-observable-after-link. + Let's just check the BSF_GLOBAL flag. + + Also, don't export symbols with characters not in the allowed set. */ + if ((s->flags & (BSF_DEBUGGING|BSF_GLOBAL)) == BSF_GLOBAL + && strspn (s->name, + valid_mmo_symbol_character_set) == strlen (s->name)) + { + struct mmo_symbol sym; + memset (&sym, 0, sizeof (sym)); + + sym.name = s->name; + sym.value = + s->value + + s->section->output_section->vma + + s->section->output_offset; + + if (bfd_is_und_section (s->section)) + sym.sym_type = mmo_undef_sym; + else if (strcmp (s->section->name, MMO_DATA_SECTION_NAME) == 0 + /* The encoding of data symbols require that the "rest" + of the value fits in 6 bytes, so the upper two bytes + must be 0x2000. All other symbols get to be the + absolute type. */ + && (sym.value >> 48) == 0x2000) + sym.sym_type = mmo_data_sym; + else if (strcmp (s->section->name, MMIX_REG_SECTION_NAME) == 0) + sym.sym_type = mmo_reg_sym; + else if (strcmp (s->section->name, + MMIX_REG_CONTENTS_SECTION_NAME) == 0) + { + sym.sym_type = mmo_reg_sym; + sym.value /= 8; + } + else + sym.sym_type = mmo_abs_sym; + + /* FIXME: We assume the order of the received symbols is an + ordered mapping of the serial numbers. This is not + necessarily true if we e.g. objcopy a mmo file to another and + there are gaps in the numbering. Note sure if this can + happen. Not sure what to do. */ + /* Make sure Main has serial number 1; others start at 2. */ + if (strcmp (s->name, MMIX_START_SYMBOL_NAME) == 0) + { + sym.serno = 1; + + /* Check that the value assigned to :Main is the same as the + entry address. The default linker script asserts this. + This is as good a place as any to check this consistency. */ + if (sym.value != bfd_get_start_address (abfd)) + { + /* Arbitrary buffer to hold the printable representation + of a vma. */ + char vmas_main[40]; + char vmas_start[40]; + bfd_vma vma_start = bfd_get_start_address (abfd); + + sprintf_vma (vmas_main, s->value); + sprintf_vma (vmas_start, vma_start); + + (*_bfd_error_handler) + (_("%s: Bad symbol definition: `Main' set to %s rather\ + than the start address %s\n"), + bfd_get_filename (abfd), vmas_main, vmas_start); + bfd_set_error (bfd_error_bad_value); + return false; + } + } + else + sym.serno = serno++; + + if (! mmo_internal_add_3_sym (abfd, &root, &sym)) + return false; + } + } + + /* Change the root node to be a ":"-prefix. */ + root.symchar = ':'; + root.middle = root.left; + root.right = NULL; + root.left = NULL; + + /* We have to find out if we can fit the whole symbol table in the mmo + symtab. It would be bad to assume we can always fit it in 262144 + bytes. If we can't, just leave the Main symbol. */ + trie_len = (mmo_internal_3_length (abfd, &root) + 3)/4; + + if (trie_len > 0xffff) + { + /* Test this code by using a lower limit in the test above and check + that the single "Main" symbol is emitted and handled properly. + There's no specific test-case. */ + struct mmo_symbol sym; + + (*_bfd_error_handler) + (_("%s: warning: symbol table too large for mmo, larger than 65535\ + 32-bit words: %d. Only `Main' will be emitted.\n"), + bfd_get_filename (abfd), trie_len); + + memset (&sym, 0, sizeof (sym)); + sym.sym_type = mmo_abs_sym; + sym.name = MMIX_START_SYMBOL_NAME; + sym.serno = 1; + sym.value = bfd_get_start_address (abfd); + + /* Then patch up a symbol table to be just the ":Main" symbol. */ + memset (&root, 0, sizeof (root)); + root.left = root.middle; + root.symchar = 0xff; + root.middle = NULL; + root.right = NULL; + + if (! mmo_internal_add_3_sym (abfd, &root, &sym)) + return false; + + root.symchar = ':'; + root.middle = root.left; + root.right = NULL; + root.left = NULL; + + trie_len = (mmo_internal_3_length (abfd, &root) + 3)/4; + } + + /* Reset the written-bytes counter. */ + abfd->tdata.mmo_data->byte_no = 0; + + /* Put out the lop_stab mark. */ + bfd_put_32 (abfd, (LOP << 24) | (LOP_STAB << 16), buf); + if (bfd_bwrite (buf, 4, abfd) != 4) + return false; + + /* Dump out symbols. */ + mmo_internal_3_dump (abfd, &root); + + if (trie_len != (abfd->tdata.mmo_data->byte_no + 3)/4) + { + /* I haven't seen this trig. It seems no use claiming this case + isn't debugged and abort if we get here. Instead emit a + diagnostic and fail "normally". */ + (*_bfd_error_handler) + (_("%s: internal error, symbol table changed size from %d to %d\ + words\n"), + bfd_get_filename (abfd), trie_len, + (abfd->tdata.mmo_data->byte_no + 3)/4); + bfd_set_error (bfd_error_bad_value); + return false; + } + + /* Dump out remaining bytes in the buffer and handle I/O errors by + propagating errors. */ + if ((abfd->tdata.mmo_data->byte_no % 4) != 0 + || abfd->tdata.mmo_data->have_error) + { + memset (abfd->tdata.mmo_data->buf + (abfd->tdata.mmo_data->byte_no % 4), + 0, 4 - (abfd->tdata.mmo_data->byte_no % 4)); + + if (abfd->tdata.mmo_data->have_error + || bfd_bwrite (abfd->tdata.mmo_data->buf, 4, abfd) != 4) + return false; + } + + bfd_put_32 (abfd, (LOP << 24) | (LOP_END << 16) | trie_len, buf); + return bfd_bwrite (buf, 4, abfd) == 4; +} + +/* Write section unless it is the register contents section. For that, we + instead store the section in the supplied pointer. This function is + used through bfd_map_over_sections. */ + +static void +mmo_write_section_unless_reg_contents (abfd, sec, p) + bfd *abfd; + asection *sec; + PTR p; +{ + struct mmo_write_sec_info *infop = (struct mmo_write_sec_info *) p; + + if (infop->retval == false) + return; + + if (strcmp (sec->name, MMIX_REG_CONTENTS_SECTION_NAME) == 0) + { + infop->reg_section = sec; + return; + } + + /* Exclude the convenience register section. */ + if (strcmp (sec->name, MMIX_REG_SECTION_NAME) == 0) + { + if (bfd_get_section_flags (abfd, sec) & SEC_HAS_CONTENTS) + { + /* Make sure it hasn't got contents. It seems impossible to + make it carry contents, so we don't have a test-case for + this. */ + (*_bfd_error_handler) + (_("%s: internal error, internal register section %s had\ + contents\n"), + bfd_get_filename (abfd), sec->name); + bfd_set_error (bfd_error_bad_value); + infop->retval = false; + return; + } + + return; + } + + infop->retval = mmo_internal_write_section (abfd, sec); +} + +/* Do the actual output of a file. Assumes mmo_set_section_contents is + already called. */ + +static boolean +mmo_write_object_contents (abfd) + bfd *abfd; +{ + struct mmo_write_sec_info wsecinfo; + + /* First, there are a few words of preamble. */ + if (! mmo_internal_write_header (abfd)) + return false; + + wsecinfo.reg_section = NULL; + wsecinfo.retval = true; + + bfd_map_over_sections (abfd, mmo_write_section_unless_reg_contents, + (PTR) &wsecinfo); + + if (wsecinfo.retval == false) + return false; + + if (wsecinfo.reg_section != NULL) + { + asection *sec = wsecinfo.reg_section; + unsigned int z = (unsigned int) (sec->vma / 8); + + /* Registers 0..31 must not be global. Do sanity check on the "vma" + of the register contents section and check that it corresponds to + the length of the section. */ + if (z < 32 || z >= 255 || (sec->vma & 7) != 0 + || sec->vma != 256 * 8 - sec->_raw_size - 8) + { + bfd_set_error (bfd_error_bad_value); + + if (sec->_raw_size == 0) + /* There must always be at least one such register. */ + (*_bfd_error_handler) + (_("%s: no initialized registers; section length 0\n"), + bfd_get_filename (abfd)); + else if (sec->vma > (256 - 32) * 8) + /* Provide better error message for the case of too many + global registers. */ + (*_bfd_error_handler) + (_("%s: too many initialized registers; section length %ld\n"), + bfd_get_filename (abfd), + (long) sec->_raw_size); + else + (*_bfd_error_handler) + (_("%s: invalid start address for initialized registers of\ + length %ld: 0x%lx%08lx\n"), + bfd_get_filename (abfd), + (long) sec->_raw_size, + (unsigned long) (sec->vma >> 32), (unsigned long) (sec->vma)); + + return false; + } + + if (! mmo_internal_write_post (abfd, z, sec)) + return false; + } + else + if (! mmo_internal_write_post (abfd, 255, NULL)) + return false; + + return mmo_write_symbols_and_terminator (abfd); +} + +/* Return the size of a NULL pointer, so we support linking in an mmo + object. */ + +static long +mmo_get_reloc_upper_bound (abfd, sec) + bfd *abfd ATTRIBUTE_UNUSED; + asection *sec ATTRIBUTE_UNUSED; +{ + return sizeof (PTR); +} + +/* Similarly canonicalize relocs to empty, filling in the terminating NULL + pointer. */ + +long +mmo_canonicalize_reloc (abfd, section, relptr, symbols) + bfd *abfd ATTRIBUTE_UNUSED; + sec_ptr section ATTRIBUTE_UNUSED; + arelent **relptr; + asymbol **symbols ATTRIBUTE_UNUSED; +{ + *relptr = NULL; + return 0; +} + +/* If there's anything in particular in a mmo bfd that we want to free, + make this a real function. Only do this if you see major memory + thrashing; zealous free:ing will cause unwanted behavior, especially if + you "free" memory allocated with "bfd_alloc", or even "bfd_release" a + block allocated with "bfd_alloc"; they're really allocated from an + obstack, and we don't know what was allocated there since this + particular allocation. */ + +#define mmo_close_and_cleanup _bfd_generic_close_and_cleanup +#define mmo_bfd_free_cached_info _bfd_generic_bfd_free_cached_info + +/* Perhaps we need to adjust this one; mmo labels (originally) without a + leading ':' might more appropriately be called local. */ +#define mmo_bfd_is_local_label_name bfd_generic_is_local_label_name + +/* Is this one really used or defined by anyone? */ +#define mmo_get_lineno _bfd_nosymbols_get_lineno + +/* FIXME: We can do better on this one, if we have a dwarf2 .debug_line + section or if MMO line numbers are implemented. */ +#define mmo_find_nearest_line _bfd_nosymbols_find_nearest_line +#define mmo_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol +#define mmo_read_minisymbols _bfd_generic_read_minisymbols +#define mmo_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol + +#define mmo_get_section_contents_in_window \ + _bfd_generic_get_section_contents_in_window +#define mmo_bfd_get_relocated_section_contents \ + bfd_generic_get_relocated_section_contents +#define mmo_bfd_gc_sections bfd_generic_gc_sections +#define mmo_bfd_link_hash_table_create _bfd_generic_link_hash_table_create +#define mmo_bfd_link_add_symbols _bfd_generic_link_add_symbols +#define mmo_bfd_final_link _bfd_generic_final_link +#define mmo_bfd_link_split_section _bfd_generic_link_split_section + +/* Strictly speaking, only MMIX uses this restricted format, but let's not + stop anybody from shooting themselves in the foot. */ +#define mmo_set_arch_mach bfd_default_set_arch_mach +#define mmo_bfd_relax_section bfd_generic_relax_section +#define mmo_bfd_merge_sections bfd_generic_merge_sections + +/* objcopy will be upset if we return -1 from bfd_get_reloc_upper_bound by + using BFD_JUMP_TABLE_RELOCS (_bfd_norelocs) rather than 0. FIXME: Most + likely a bug in the _bfd_norelocs definition. + + On the other hand, we smuggle in an mmo object (because setting up ELF + is too cumbersome) when linking (from other formats, presumably ELF) to + represent the g255 entry. We need to link that object, so need to say + it has no relocs. Upper bound for the size of the relocation table is + the size of a NULL pointer, and we support "canonicalization" for that + pointer. */ +#define mmo_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup + +/* We want to copy time of creation, otherwise we'd use + BFD_JUMP_TABLE_COPY (_bfd_generic). */ +#define mmo_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data +#define mmo_bfd_copy_private_section_data _bfd_generic_bfd_copy_private_section_data +#define mmo_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data +#define mmo_bfd_set_private_flags _bfd_generic_bfd_set_private_flags +#define mmo_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data + +CONST bfd_target bfd_mmo_vec = +{ + "mmo", /* name */ + bfd_target_mmo_flavour, + BFD_ENDIAN_BIG, /* target byte order */ + BFD_ENDIAN_BIG, /* target headers byte order */ + + /* FIXME: Might need adjustments. */ + (HAS_RELOC | EXEC_P | /* object flags */ + HAS_LINENO | HAS_DEBUG | + HAS_SYMS | HAS_LOCALS | WP_TEXT), + + /* FIXME: Might need adjustments. */ + (SEC_CODE | SEC_DATA | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD + | SEC_READONLY | SEC_EXCLUDE | SEC_DEBUGGING | SEC_IN_MEMORY), + /* section flags */ + 0, /* leading underscore */ + ' ', /* ar_pad_char */ + 16, /* ar_max_namelen */ + bfd_getb64, bfd_getb_signed_64, bfd_putb64, + bfd_getb32, bfd_getb_signed_32, bfd_putb32, + bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */ + bfd_getb64, bfd_getb_signed_64, bfd_putb64, + bfd_getb32, bfd_getb_signed_32, bfd_putb32, + bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */ + + { + _bfd_dummy_target, + mmo_object_p, /* bfd_check_format */ + _bfd_dummy_target, + _bfd_dummy_target, + }, + { + bfd_false, + mmo_mkobject, + bfd_false, + bfd_false, + }, + { /* bfd_write_contents */ + bfd_false, + mmo_write_object_contents, + bfd_false, + bfd_false, + }, + + BFD_JUMP_TABLE_GENERIC (mmo), + BFD_JUMP_TABLE_COPY (mmo), + BFD_JUMP_TABLE_CORE (_bfd_nocore), + BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), + BFD_JUMP_TABLE_SYMBOLS (mmo), + /* We have to provide a valid method for getting relocs, returning zero, + so we can't say BFD_JUMP_TABLE_RELOCS (_bfd_norelocs). */ + BFD_JUMP_TABLE_RELOCS (mmo), + BFD_JUMP_TABLE_WRITE (mmo), + BFD_JUMP_TABLE_LINK (mmo), + BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), + + NULL, + + NULL +}; diff -uprN binutils-2.11.92.0.10/bfd/peXXigen.c binutils-2.11.92.0.12/bfd/peXXigen.c --- binutils-2.11.92.0.10/bfd/peXXigen.c Mon Oct 1 15:25:21 2001 +++ binutils-2.11.92.0.12/bfd/peXXigen.c Fri Nov 16 14:05:51 2001 @@ -1767,7 +1767,10 @@ _bfd_XX_print_private_bfd_data_common (a #undef PF /* ctime implies '\n'. */ - fprintf (file, "\nTime/Date\t\t%s", ctime (&pe->coff.timestamp)); + { + time_t t = pe->coff.timestamp; + fprintf (file, "\nTime/Date\t\t%s", ctime (&t)); + } fprintf (file, "\nImageBase\t\t"); fprintf_vma (file, i->ImageBase); fprintf (file, "\nSectionAlignment\t"); diff -uprN binutils-2.11.92.0.10/bfd/po/SRC-POTFILES.in binutils-2.11.92.0.12/bfd/po/SRC-POTFILES.in --- binutils-2.11.92.0.10/bfd/po/SRC-POTFILES.in Thu Oct 4 14:35:43 2001 +++ binutils-2.11.92.0.12/bfd/po/SRC-POTFILES.in Fri Nov 16 14:05:51 2001 @@ -80,6 +80,7 @@ cpu-m68k.c cpu-m88k.c cpu-mcore.c cpu-mips.c +cpu-mmix.c cpu-ns32k.c cpu-openrisc.c cpu-pdp11.c @@ -109,6 +110,7 @@ elf-bfd.h elf-hppa.h elf-m10200.c elf-m10300.c +elf-strtab.c elf.c elf32-arc.c elf32-arm.h @@ -146,6 +148,7 @@ elf64-gen.c elf64-hppa.c elf64-hppa.h elf64-mips.c +elf64-mmix.c elf64-ppc.c elf64-s390.c elf64-sparc.c @@ -201,6 +204,7 @@ m68knetbsd.c m88kmach3.c merge.c mipsbsd.c +mmo.c netbsd.h newsos3.c nlm-target.h diff -uprN binutils-2.11.92.0.10/bfd/po/bfd.pot binutils-2.11.92.0.12/bfd/po/bfd.pot --- binutils-2.11.92.0.10/bfd/po/bfd.pot Tue Jun 19 11:57:33 2001 +++ binutils-2.11.92.0.12/bfd/po/bfd.pot Fri Nov 16 14:05:51 2001 @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2001-06-13 12:48+0100\n" +"POT-Creation-Date: 2001-10-12 22:46+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -14,151 +14,155 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" -#: aout-adobe.c:189 +#: aout-adobe.c:196 #, c-format msgid "%s: Unknown section type in a.out.adobe file: %x\n" msgstr "" -#: aout-cris.c:207 +#: aout-cris.c:208 #, c-format msgid "%s: Invalid relocation type exported: %d" msgstr "" -#: aout-cris.c:251 +#: aout-cris.c:252 #, c-format msgid "%s: Invalid relocation type imported: %d" msgstr "" -#: aout-cris.c:262 +#: aout-cris.c:263 #, c-format msgid "%s: Bad relocation record imported: %d" msgstr "" -#: aoutx.h:1265 aoutx.h:1679 +#: aoutx.h:1282 aoutx.h:1699 #, c-format msgid "%s: can not represent section `%s' in a.out object file format" msgstr "" -#: aoutx.h:1649 +#: aoutx.h:1669 #, c-format msgid "" "%s: can not represent section for symbol `%s' in a.out object file format" msgstr "" -#: aoutx.h:1651 +#: aoutx.h:1671 msgid "*unknown*" msgstr "" -#: aoutx.h:3688 +#: aoutx.h:3735 #, c-format msgid "%s: relocateable link from %s to %s not supported" msgstr "" -#: archive.c:1821 +#: archive.c:1839 msgid "Warning: writing archive was slow: rewriting timestamp\n" msgstr "" -#: archive.c:2087 +#: archive.c:2106 msgid "Reading archive file mod timestamp" msgstr "" #. FIXME: bfd can't call perror. -#: archive.c:2114 +#: archive.c:2133 msgid "Writing updated armap timestamp" msgstr "" -#: bfd.c:273 +#: bfd.c:274 msgid "No error" msgstr "" -#: bfd.c:274 +#: bfd.c:275 msgid "System call error" msgstr "" -#: bfd.c:275 +#: bfd.c:276 msgid "Invalid bfd target" msgstr "" -#: bfd.c:276 +#: bfd.c:277 msgid "File in wrong format" msgstr "" -#: bfd.c:277 +#: bfd.c:278 +msgid "Archive object file in wrong format" +msgstr "" + +#: bfd.c:279 msgid "Invalid operation" msgstr "" -#: bfd.c:278 +#: bfd.c:280 msgid "Memory exhausted" msgstr "" -#: bfd.c:279 +#: bfd.c:281 msgid "No symbols" msgstr "" -#: bfd.c:280 +#: bfd.c:282 msgid "Archive has no index; run ranlib to add one" msgstr "" -#: bfd.c:281 +#: bfd.c:283 msgid "No more archived files" msgstr "" -#: bfd.c:282 +#: bfd.c:284 msgid "Malformed archive" msgstr "" -#: bfd.c:283 +#: bfd.c:285 msgid "File format not recognized" msgstr "" -#: bfd.c:284 +#: bfd.c:286 msgid "File format is ambiguous" msgstr "" -#: bfd.c:285 +#: bfd.c:287 msgid "Section has no contents" msgstr "" -#: bfd.c:286 +#: bfd.c:288 msgid "Nonrepresentable section on output" msgstr "" -#: bfd.c:287 +#: bfd.c:289 msgid "Symbol needs debug section which does not exist" msgstr "" -#: bfd.c:288 +#: bfd.c:290 msgid "Bad value" msgstr "" -#: bfd.c:289 +#: bfd.c:291 msgid "File truncated" msgstr "" -#: bfd.c:290 +#: bfd.c:292 msgid "File too big" msgstr "" -#: bfd.c:291 +#: bfd.c:293 msgid "#" msgstr "" -#: bfd.c:675 +#: bfd.c:700 #, c-format -msgid "bfd assertion fail %s:%d" +msgid "BFD %s assertion fail %s:%d" msgstr "" -#: bfd.c:693 +#: bfd.c:719 #, c-format -msgid "BFD internal error, aborting at %s line %d in %s\n" +msgid "BFD %s internal error, aborting at %s line %d in %s\n" msgstr "" -#: bfd.c:697 +#: bfd.c:723 #, c-format -msgid "BFD internal error, aborting at %s line %d\n" +msgid "BFD %sinternal error, aborting at %s line %d\n" msgstr "" -#: bfd.c:699 +#: bfd.c:725 msgid "Please report this bug.\n" msgstr "" @@ -167,38 +171,38 @@ msgstr "" msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx." msgstr "" -#: coff-rs6000.c:2517 coff64-rs6000.c:1074 +#: coff-rs6000.c:2578 coff64-rs6000.c:1161 #, c-format msgid "%s: unsupported relocation type 0x%02x" msgstr "" -#: coff-rs6000.c:2563 coff64-rs6000.c:1120 +#: coff-rs6000.c:2624 coff64-rs6000.c:1207 #, c-format msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry" msgstr "" -#: coff-rs6000.c:2809 coff64-rs6000.c:1955 +#: coff-rs6000.c:2874 coff64-rs6000.c:2057 #, c-format msgid "%s: symbol `%s' has unrecognized smclas %d" msgstr "" -#: coff-a29k.c:123 +#: coff-a29k.c:119 msgid "Missing IHCONST" msgstr "" -#: coff-a29k.c:183 +#: coff-a29k.c:180 msgid "Missing IHIHALF" msgstr "" -#: coff-a29k.c:215 +#: coff-a29k.c:212 msgid "Unrecognized reloc" msgstr "" -#: coff-a29k.c:427 +#: coff-a29k.c:408 msgid "missing IHCONST reloc" msgstr "" -#: coff-a29k.c:518 +#: coff-a29k.c:498 msgid "missing IHIHALF reloc" msgstr "" @@ -206,137 +210,137 @@ msgstr "" msgid "GP relative relocation used when GP not defined" msgstr "" -#: coff-alpha.c:1487 elf64-alpha.c:4045 +#: coff-alpha.c:1485 msgid "using multiple gp values" msgstr "" -#: coff-alpha.c:1993 coff-mips.c:1434 +#: coff-alpha.c:1989 coff-mips.c:1433 msgid "GP relative relocation when GP not defined" msgstr "" -#: coff-arm.c:1019 elf32-arm.h:246 +#: coff-arm.c:1051 elf32-arm.h:285 #, c-format msgid "%s: unable to find THUMB glue '%s' for `%s'" msgstr "" -#: coff-arm.c:1048 elf32-arm.h:281 +#: coff-arm.c:1080 elf32-arm.h:320 #, c-format msgid "%s: unable to find ARM glue '%s' for `%s'" msgstr "" -#: coff-arm.c:1342 coff-arm.c:1437 elf32-arm.h:841 elf32-arm.h:946 +#: coff-arm.c:1375 coff-arm.c:1470 elf32-arm.h:886 elf32-arm.h:990 #, c-format msgid "%s(%s): warning: interworking not enabled." msgstr "" -#: coff-arm.c:1346 elf32-arm.h:949 +#: coff-arm.c:1379 elf32-arm.h:993 #, c-format msgid " first occurrence: %s: arm call to thumb" msgstr "" -#: coff-arm.c:1441 elf32-arm.h:844 +#: coff-arm.c:1474 elf32-arm.h:889 #, c-format msgid " first occurrence: %s: thumb call to arm" msgstr "" -#: coff-arm.c:1444 +#: coff-arm.c:1477 msgid " consider relinking with --support-old-code enabled" msgstr "" -#: coff-arm.c:1732 coff-tic80.c:682 cofflink.c:2992 +#: coff-arm.c:1767 coff-tic80.c:686 cofflink.c:3017 #, c-format msgid "%s: bad reloc address 0x%lx in section `%s'" msgstr "" -#: coff-arm.c:2069 +#: coff-arm.c:2107 #, c-format msgid "%s: illegal symbol index in reloc: %d" msgstr "" -#: coff-arm.c:2197 +#: coff-arm.c:2235 #, c-format msgid "%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d" msgstr "" -#: coff-arm.c:2212 +#: coff-arm.c:2250 #, c-format msgid "" "%s: ERROR: passes floats in float registers whereas target %s uses integer " "registers" msgstr "" -#: coff-arm.c:2215 +#: coff-arm.c:2253 #, c-format msgid "" "%s: ERROR: passes floats in integer registers whereas target %s uses float " "registers" msgstr "" -#: coff-arm.c:2230 +#: coff-arm.c:2268 #, c-format msgid "" "%s: ERROR: compiled as position independent code, whereas target %s is " "absolute position" msgstr "" -#: coff-arm.c:2233 +#: coff-arm.c:2271 #, c-format msgid "" "%s: ERROR: compiled as absolute position code, whereas target %s is position " "independent" msgstr "" -#: coff-arm.c:2262 +#: coff-arm.c:2300 #, c-format msgid "Warning: input file %s supports interworking, whereas %s does not." msgstr "" -#: coff-arm.c:2265 +#: coff-arm.c:2303 #, c-format msgid "Warning: input file %s does not support interworking, whereas %s does." msgstr "" -#: coff-arm.c:2292 +#: coff-arm.c:2330 #, c-format msgid "private flags = %x:" msgstr "" -#: coff-arm.c:2300 elf32-arm.h:2234 +#: coff-arm.c:2338 elf32-arm.h:2293 msgid " [floats passed in float registers]" msgstr "" -#: coff-arm.c:2302 +#: coff-arm.c:2340 msgid " [floats passed in integer registers]" msgstr "" -#: coff-arm.c:2305 elf32-arm.h:2237 +#: coff-arm.c:2343 elf32-arm.h:2296 msgid " [position independent]" msgstr "" -#: coff-arm.c:2307 +#: coff-arm.c:2345 msgid " [absolute position]" msgstr "" -#: coff-arm.c:2311 +#: coff-arm.c:2349 msgid " [interworking flag not initialised]" msgstr "" -#: coff-arm.c:2313 +#: coff-arm.c:2351 msgid " [interworking supported]" msgstr "" -#: coff-arm.c:2315 +#: coff-arm.c:2353 msgid " [interworking not supported]" msgstr "" -#: coff-arm.c:2363 +#: coff-arm.c:2401 #, c-format msgid "" "Warning: Not setting interworking flag of %s, since it has already been " "specified as non-interworking" msgstr "" -#: coff-arm.c:2367 +#: coff-arm.c:2405 #, c-format msgid "Warning: Clearing the interworking flag of %s due to outside request" msgstr "" @@ -346,47 +350,47 @@ msgstr "" msgid "%s (%s): Section flag %s (0x%x) ignored" msgstr "" -#: coffcode.h:2180 +#: coffcode.h:2117 #, c-format msgid "Unrecognized TI COFF target id '0x%x'" msgstr "" -#: coffcode.h:4252 +#: coffcode.h:4199 #, c-format msgid "%s: warning: illegal symbol index %ld in line numbers" msgstr "" -#: coffcode.h:4266 +#: coffcode.h:4213 #, c-format msgid "%s: warning: duplicate line number information for `%s'" msgstr "" -#: coffcode.h:4626 +#: coffcode.h:4572 #, c-format msgid "%s: Unrecognized storage class %d for %s symbol `%s'" msgstr "" -#: coffcode.h:4757 +#: coffcode.h:4703 #, c-format msgid "warning: %s: local symbol `%s' has no section" msgstr "" -#: coff-tic54x.c:376 coffcode.h:4868 +#: coff-tic54x.c:390 coffcode.h:4810 #, c-format msgid "%s: warning: illegal symbol index %ld in relocs" msgstr "" -#: coffcode.h:4906 +#: coffcode.h:4848 #, c-format msgid "%s: illegal relocation type %d at address 0x%lx" msgstr "" -#: coffgen.c:1640 +#: coffgen.c:1648 #, c-format msgid "%s: bad string table size %lu" msgstr "" -#: coffgen.c:2110 +#: coffgen.c:2125 #, c-format msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld" msgstr "" @@ -395,1118 +399,1127 @@ msgstr "" msgid "uncertain calling convention for non-COFF symbol" msgstr "" -#: cofflink.c:527 elflink.h:1651 +#: cofflink.c:536 elflink.h:1670 #, c-format msgid "Warning: type of symbol `%s' changed from %d to %d in %s" msgstr "" -#: cofflink.c:2290 +#: cofflink.c:2317 #, c-format msgid "%s: relocs in section `%s', but it has no contents" msgstr "" -#: cofflink.c:2629 coffswap.h:895 +#: cofflink.c:2653 coffswap.h:889 #, c-format msgid "%s: %s: reloc overflow: 0x%lx > 0xffff" msgstr "" -#: cofflink.c:2638 coffswap.h:881 +#: cofflink.c:2662 coffswap.h:876 #, c-format msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff" msgstr "" -#: coff-m68k.c:475 coff-mips.c:2432 elf32-m68k.c:2272 +#: coff-m68k.c:481 coff-mips.c:2431 elf32-m68k.c:2238 msgid "unsupported reloc type" msgstr "" -#: coff-mips.c:875 elf32-mips.c:1435 +#: coff-mips.c:875 elf32-mips.c:1448 msgid "GP relative relocation when _gp not defined" msgstr "" #. No other sections should appear in -membedded-pic #. code. -#: coff-mips.c:2469 +#: coff-mips.c:2468 msgid "reloc against unsupported section" msgstr "" -#: coff-mips.c:2477 +#: coff-mips.c:2476 msgid "reloc not properly aligned" msgstr "" -#: coff-tic54x.c:263 coff-tic80.c:445 +#: coff-tic54x.c:279 coff-tic80.c:449 #, c-format msgid "Unrecognized reloc type 0x%x" msgstr "" -#: coff-w65.c:369 +#: coff-w65.c:363 #, c-format msgid "ignoring reloc %s\n" msgstr "" -#: dwarf2.c:424 +#: dwarf2.c:475 msgid "Dwarf Error: Can't find .debug_abbrev section." msgstr "" -#: dwarf2.c:442 +#: dwarf2.c:492 #, c-format msgid "" "Dwarf Error: Abbrev offset (%u) greater than or equal to abbrev size (%u)." msgstr "" -#: dwarf2.c:625 +#: dwarf2.c:682 #, c-format msgid "Dwarf Error: Invalid or unhandled FORM value: %d." msgstr "" -#: dwarf2.c:698 +#: dwarf2.c:755 msgid "Dwarf Error: mangled line number section (bad file number)." msgstr "" -#: dwarf2.c:783 +#: dwarf2.c:841 msgid "Dwarf Error: Can't find .debug_line section." msgstr "" -#: dwarf2.c:807 +#: dwarf2.c:864 #, c-format msgid "Dwarf Error: Line offset (%u) greater than or equal to line size (%u)." msgstr "" -#: dwarf2.c:974 +#: dwarf2.c:1030 msgid "Dwarf Error: mangled line number section." msgstr "" -#: dwarf2.c:1153 dwarf2.c:1307 +#: dwarf2.c:1209 dwarf2.c:1426 #, c-format msgid "Dwarf Error: Could not find abbrev number %d." msgstr "" -#: dwarf2.c:1268 +#: dwarf2.c:1387 #, c-format msgid "" "Dwarf Error: found dwarf version '%hu', this reader only handles version 2 " "information." msgstr "" -#: dwarf2.c:1275 +#: dwarf2.c:1394 #, c-format msgid "" "Dwarf Error: found address size '%u', this reader can not handle sizes " "greater than '%u'." msgstr "" -#: dwarf2.c:1298 +#: dwarf2.c:1417 #, c-format msgid "Dwarf Error: Bad abbrev number: %d." msgstr "" -#: ecoff.c:1323 +#: ecoff.c:1328 #, c-format msgid "Unknown basic type %d" msgstr "" -#: ecoff.c:1592 +#: ecoff.c:1597 #, c-format msgid "" "\n" " End+1 symbol: %ld" msgstr "" -#: ecoff.c:1599 ecoff.c:1602 +#: ecoff.c:1604 ecoff.c:1607 #, c-format msgid "" "\n" " First symbol: %ld" msgstr "" -#: ecoff.c:1614 +#: ecoff.c:1619 #, c-format msgid "" "\n" " End+1 symbol: %-7ld Type: %s" msgstr "" -#: ecoff.c:1621 +#: ecoff.c:1626 #, c-format msgid "" "\n" " Local symbol: %ld" msgstr "" -#: ecoff.c:1629 +#: ecoff.c:1634 #, c-format msgid "" "\n" " struct; End+1 symbol: %ld" msgstr "" -#: ecoff.c:1634 +#: ecoff.c:1639 #, c-format msgid "" "\n" " union; End+1 symbol: %ld" msgstr "" -#: ecoff.c:1639 +#: ecoff.c:1644 #, c-format msgid "" "\n" " enum; End+1 symbol: %ld" msgstr "" -#: ecoff.c:1645 +#: ecoff.c:1650 #, c-format msgid "" "\n" " Type: %s" msgstr "" -#: elf32-arm.h:1191 +#: elf32-arm.h:1234 #, c-format msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'." msgstr "" -#: elf32-arm.h:1387 +#: elf32-arm.h:1430 #, c-format msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'." msgstr "" -#: elf-hppa.h:1369 elf-hppa.h:1402 elf32-arm.h:1877 elf32-ppc.c:3093 -#: elf32-s390.c:1442 elf32-sh.c:3107 elf64-s390.c:1431 elf64-x86-64.c:1296 +#: elf32-arm.h:1927 #, c-format msgid "" -"%s: warning: unresolvable relocation against symbol `%s' from %s section" +"%s: warning: unresolvable relocation %d against symbol `%s' from %s section" msgstr "" -#: elf-m10200.c:451 elf-m10300.c:663 elf32-arm.h:1951 elf32-avr.c:842 -#: elf32-cris.c:1335 elf32-d10v.c:478 elf32-fr30.c:648 elf32-i860.c:1049 -#: elf32-m32r.c:1266 elf32-openrisc.c:449 elf32-v850.c:1681 +#: elf-m10200.c:465 elf-m10300.c:681 elf32-arm.h:2003 elf32-avr.c:842 +#: elf32-cris.c:1333 elf32-d10v.c:490 elf32-fr30.c:655 elf32-h8300.c:549 +#: elf32-i860.c:1050 elf32-m32r.c:1276 elf32-openrisc.c:456 elf32-v850.c:1695 msgid "internal error: out of range error" msgstr "" -#: elf-m10200.c:455 elf-m10300.c:667 elf32-arm.h:1955 elf32-avr.c:846 -#: elf32-cris.c:1339 elf32-d10v.c:482 elf32-fr30.c:652 elf32-i860.c:1053 -#: elf32-m32r.c:1270 elf32-mips.c:7049 elf32-openrisc.c:453 elf32-v850.c:1685 +#: elf-m10200.c:469 elf-m10300.c:685 elf32-arm.h:2007 elf32-avr.c:846 +#: elf32-cris.c:1337 elf32-d10v.c:494 elf32-fr30.c:659 elf32-h8300.c:553 +#: elf32-i860.c:1054 elf32-m32r.c:1280 elf32-mips.c:7061 elf32-openrisc.c:460 +#: elf32-v850.c:1699 msgid "internal error: unsupported relocation error" msgstr "" -#: elf-m10200.c:459 elf-m10300.c:671 elf32-arm.h:1959 elf32-d10v.c:486 -#: elf32-m32r.c:1274 +#: elf-m10200.c:473 elf-m10300.c:689 elf32-arm.h:2011 elf32-d10v.c:498 +#: elf32-h8300.c:557 elf32-m32r.c:1284 msgid "internal error: dangerous error" msgstr "" -#: elf-m10200.c:463 elf-m10300.c:675 elf32-arm.h:1963 elf32-avr.c:854 -#: elf32-cris.c:1347 elf32-d10v.c:490 elf32-fr30.c:660 elf32-i860.c:1061 -#: elf32-m32r.c:1278 elf32-openrisc.c:461 elf32-v850.c:1705 +#: elf-m10200.c:477 elf-m10300.c:693 elf32-arm.h:2015 elf32-avr.c:854 +#: elf32-cris.c:1345 elf32-d10v.c:502 elf32-fr30.c:667 elf32-h8300.c:561 +#: elf32-i860.c:1062 elf32-m32r.c:1288 elf32-openrisc.c:468 elf32-v850.c:1719 msgid "internal error: unknown error" msgstr "" -#: elf32-arm.h:1991 +#: elf32-arm.h:2043 #, c-format msgid "" "Warning: Not setting interwork flag of %s since it has already been " "specified as non-interworking" msgstr "" -#: elf32-arm.h:1995 +#: elf32-arm.h:2047 #, c-format msgid "Warning: Clearing the interwork flag of %s due to outside request" msgstr "" -#: elf32-arm.h:2043 +#: elf32-arm.h:2095 #, c-format msgid "" "Warning: Clearing the interwork flag in %s because non-interworking code in " "%s has been linked with it" msgstr "" -#: elf32-arm.h:2137 +#: elf32-arm.h:2190 #, c-format msgid "" "Error: %s compiled for EABI version %d, whereas %s is compiled for version %d" msgstr "" -#: elf32-arm.h:2151 +#: elf32-arm.h:2204 #, c-format msgid "Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d" msgstr "" -#: elf32-arm.h:2162 -#, c-format -msgid "" -"Error: %s passes floats in %s registers, whereas %s passes them in %s " -"registers" -msgstr "" - -#: elf32-arm.h:2165 elf32-arm.h:2167 +#: elf32-arm.h:2215 elf32-arm.h:2216 msgid "float" msgstr "" -#: elf32-arm.h:2165 elf32-arm.h:2167 +#: elf32-arm.h:2215 elf32-arm.h:2216 msgid "integer" msgstr "" -#: elf32-arm.h:2174 +#: elf32-arm.h:2218 #, c-format -msgid "Error: %s uses %s floating point, whereas %s uses %s floating point" +msgid "" +"Error: %s passes floats in %s registers, whereas %s passes them in %s " +"registers" msgstr "" -#: elf32-arm.h:2177 elf32-arm.h:2179 +#: elf32-arm.h:2228 elf32-arm.h:2229 msgid "soft" msgstr "" -#: elf32-arm.h:2177 elf32-arm.h:2179 +#: elf32-arm.h:2228 elf32-arm.h:2229 msgid "hard" msgstr "" -#: elf32-arm.h:2186 +#: elf32-arm.h:2231 #, c-format -msgid "Warning: %s %s interworking, whereas %s %s" +msgid "Error: %s uses %s floating point, whereas %s uses %s floating point" msgstr "" -#: elf32-arm.h:2189 +#: elf32-arm.h:2243 msgid "supports" msgstr "" -#: elf32-arm.h:2189 +#: elf32-arm.h:2243 msgid "does not support" msgstr "" -#: elf32-arm.h:2191 +#: elf32-arm.h:2244 msgid "does" msgstr "" -#: elf32-arm.h:2191 +#: elf32-arm.h:2244 msgid "does not" msgstr "" +#: elf32-arm.h:2246 +#, c-format +msgid "Warning: %s %s interworking, whereas %s %s" +msgstr "" + #. Ignore init flag - it may not be set, despite the flags field #. containing valid data. -#: elf32-arm.h:2217 elf32-cris.c:2968 elf32-m68k.c:430 elf32-mips.c:2721 +#: elf32-arm.h:2276 elf32-cris.c:2917 elf32-m68k.c:432 elf32-mips.c:2714 #, c-format msgid "private flags = %lx:" msgstr "" -#: elf32-arm.h:2226 +#: elf32-arm.h:2285 msgid " [interworking enabled]" msgstr "" -#: elf32-arm.h:2229 +#: elf32-arm.h:2288 msgid " [APCS-26]" msgstr "" -#: elf32-arm.h:2231 +#: elf32-arm.h:2290 msgid " [APCS-32]" msgstr "" -#: elf32-arm.h:2240 +#: elf32-arm.h:2299 msgid " [new ABI]" msgstr "" -#: elf32-arm.h:2243 +#: elf32-arm.h:2302 msgid " [old ABI]" msgstr "" -#: elf32-arm.h:2246 +#: elf32-arm.h:2305 msgid " [software FP]" msgstr "" -#: elf32-arm.h:2253 +#: elf32-arm.h:2312 msgid " [Version1 EABI]" msgstr "" -#: elf32-arm.h:2256 elf32-arm.h:2267 +#: elf32-arm.h:2315 elf32-arm.h:2326 msgid " [sorted symbol table]" msgstr "" -#: elf32-arm.h:2258 elf32-arm.h:2269 +#: elf32-arm.h:2317 elf32-arm.h:2328 msgid " [unsorted symbol table]" msgstr "" -#: elf32-arm.h:2264 +#: elf32-arm.h:2323 msgid " [Version2 EABI]" msgstr "" -#: elf32-arm.h:2272 +#: elf32-arm.h:2331 msgid " [dynamic symbols use segment index]" msgstr "" -#: elf32-arm.h:2275 +#: elf32-arm.h:2334 msgid " [mapping symbols precede others]" msgstr "" -#: elf32-arm.h:2282 +#: elf32-arm.h:2341 msgid " " msgstr "" -#: elf32-arm.h:2289 +#: elf32-arm.h:2348 msgid " [relocatable executable]" msgstr "" -#: elf32-arm.h:2292 +#: elf32-arm.h:2351 msgid " [has entry point]" msgstr "" -#: elf32-arm.h:2297 +#: elf32-arm.h:2356 msgid "" msgstr "" -#: elf32-avr.c:850 elf32-cris.c:1343 elf32-fr30.c:656 elf32-i860.c:1057 -#: elf32-openrisc.c:457 elf32-v850.c:1689 +#: elf32-avr.c:850 elf32-cris.c:1341 elf32-fr30.c:663 elf32-i860.c:1058 +#: elf32-openrisc.c:464 elf32-v850.c:1703 msgid "internal error: dangerous relocation" msgstr "" -#: elf32-cris.c:874 -#, c-format -msgid "%s(%s): unresolvable relocation %s against symbol `%s' from %s section" -msgstr "" - -#: elf32-cris.c:882 +#: elf32-cris.c:880 #, c-format msgid "%s: unresolvable relocation %s against symbol `%s' from %s section" msgstr "" -#: elf32-cris.c:945 +#: elf32-cris.c:943 #, c-format msgid "" "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section" msgstr "" -#: elf32-cris.c:948 elf32-cris.c:1075 +#: elf32-cris.c:946 elf32-cris.c:1073 msgid "[whose name is lost]" msgstr "" -#: elf32-cris.c:1064 +#: elf32-cris.c:1062 #, c-format msgid "" "%s: relocation %s with non-zero addend %d against local symbol from %s " "section" msgstr "" -#: elf32-cris.c:1071 +#: elf32-cris.c:1069 #, c-format msgid "" "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section" msgstr "" -#: elf32-cris.c:1089 +#: elf32-cris.c:1087 #, c-format msgid "" "%s: relocation %s is not allowed for global symbol: `%s' from %s section" msgstr "" -#: elf32-cris.c:1207 +#: elf32-cris.c:1205 #, c-format msgid "%s: Internal inconsistency; no relocation section %s" msgstr "" -#: elf32-cris.c:2469 -#, c-format -msgid "" -"%s(%s), section %s:\n" -" relocation %s should not be used in a shared object; recompile with -fPIC" -msgstr "" - -#: elf32-cris.c:2476 +#: elf32-cris.c:2455 #, c-format msgid "" "%s, section %s:\n" " relocation %s should not be used in a shared object; recompile with -fPIC" msgstr "" -#: elf32-cris.c:2971 +#: elf32-cris.c:2920 msgid " [symbols have a _ prefix]" msgstr "" -#: elf32-cris.c:3010 +#: elf32-cris.c:2959 #, c-format msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols" msgstr "" -#: elf32-cris.c:3011 +#: elf32-cris.c:2960 #, c-format msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols" msgstr "" -#: elf32-gen.c:76 elf64-gen.c:76 -#, c-format -msgid "%s(%s): Relocations in generic ELF (EM: %d)" -msgstr "" - -#: elf32-gen.c:81 elf64-gen.c:81 +#: elf32-gen.c:82 elf64-gen.c:82 #, c-format msgid "%s: Relocations in generic ELF (EM: %d)" msgstr "" -#: elf32-hppa.c:633 +#: elf32-hppa.c:596 #, c-format msgid "%s(%s+0x%lx): cannot find stub entry %s" msgstr "" -#: elf32-hppa.c:694 +#: elf32-hppa.c:657 #, c-format msgid "%s: cannot create stub entry %s" msgstr "" -#: elf32-hppa.c:888 -#, c-format -msgid "%s(%s+0x%lx): cannot relocate %s, recompile with -ffunction-sections" -msgstr "" - -#: elf32-hppa.c:901 elf32-hppa.c:1615 -#, c-format -msgid "Could not find relocation section for %s" -msgstr "" - -#: elf32-hppa.c:1046 elf32-hppa.c:3510 +#: elf32-hppa.c:948 elf32-hppa.c:3436 #, c-format msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections" msgstr "" -#: elf32-hppa.c:1386 +#: elf32-hppa.c:1295 #, c-format msgid "" "%s: relocation %s can not be used when making a shared object; recompile " "with -fPIC" msgstr "" -#: elf32-hppa.c:1406 +#: elf32-hppa.c:1315 #, c-format msgid "" "%s: relocation %s should not be used when making a shared object; recompile " "with -fPIC" msgstr "" -#: elf32-hppa.c:2811 +#: elf32-hppa.c:1505 +#, c-format +msgid "Could not find relocation section for %s" +msgstr "" + +#: elf32-hppa.c:2759 #, c-format msgid "%s: duplicate export stub %s" msgstr "" -#: elf32-hppa.c:3394 +#: elf32-hppa.c:3320 #, c-format msgid "%s(%s+0x%lx): fixing %s" msgstr "" -#: elf32-hppa.c:4032 +#: elf32-hppa.c:3955 #, c-format msgid "%s(%s+0x%lx): cannot handle %s for %s" msgstr "" -#: elf32-hppa.c:4355 +#: elf32-hppa.c:4295 msgid ".got section not immediately after .plt section" msgstr "" -#: elf32-i386.c:280 +#: elf32-i386.c:298 #, c-format msgid "%s: invalid relocation type %d" msgstr "" -#: elf32-i386.c:577 -#, c-format -msgid "%s(%s): bad symbol index: %d" -msgstr "" - -#: elf32-i386.c:582 +#: elf32-i386.c:688 #, c-format msgid "%s: bad symbol index: %d" msgstr "" -#: elf32-i386.c:735 elf32-i386.c:1759 -#, c-format -msgid "%s(%s): bad relocation section name `%s'" -msgstr "" - -#: elf32-i386.c:740 elf32-i386.c:1764 +#: elf32-i386.c:830 elf64-ppc.c:2035 #, c-format msgid "%s: bad relocation section name `%s'" msgstr "" -#: elf32-i386.c:1562 +#: elf32-i386.c:2004 elf64-ppc.c:3608 #, c-format msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'" msgstr "" -#: elf32-m32r.c:917 +#: elf32-m32r.c:926 msgid "SDA relocation when _SDA_BASE_ not defined" msgstr "" -#: elf32-ia64.c:3416 elf32-m32r.c:1001 elf32-ppc.c:2960 elf64-ia64.c:3416 +#: elf32-ia64.c:3445 elf32-m32r.c:1010 elf32-ppc.c:2953 elf64-ia64.c:3445 #, c-format msgid "%s: unknown relocation type %d" msgstr "" -#: elf32-m32r.c:1209 +#: elf32-m32r.c:1219 #, c-format msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)" msgstr "" -#: elf32-m32r.c:2011 +#: elf32-m32r.c:2021 #, c-format msgid "%s: Instruction set mismatch with previous modules" msgstr "" -#: elf32-m32r.c:2034 +#: elf32-m32r.c:2044 #, c-format msgid "private flags = %lx" msgstr "" -#: elf32-m32r.c:2039 +#: elf32-m32r.c:2049 msgid ": m32r instructions" msgstr "" -#: elf32-m32r.c:2040 +#: elf32-m32r.c:2050 msgid ": m32rx instructions" msgstr "" -#: elf32-m68k.c:433 +#: elf32-m68k.c:435 msgid " [cpu32]" msgstr "" -#: elf32-mcore.c:364 elf32-mcore.c:490 +#: elf32-mcore.c:373 elf32-mcore.c:499 #, c-format msgid "%s: Relocation %s (%d) is not currently supported.\n" msgstr "" -#: elf32-mcore.c:449 +#: elf32-mcore.c:458 #, c-format msgid "%s: Unknown relocation type %d\n" msgstr "" -#: elf32-mips.c:1594 +#: elf32-mips.c:1607 msgid "32bits gp relative relocation occurs for an external symbol" msgstr "" -#: elf32-mips.c:1743 +#: elf32-mips.c:1756 #, c-format msgid "Linking mips16 objects into %s format is not supported" msgstr "" -#: elf32-mips.c:2608 +#: elf32-mips.c:2601 #, c-format msgid "%s: linking PIC files with non-PIC files" msgstr "" -#: elf32-mips.c:2618 +#: elf32-mips.c:2611 #, c-format msgid "%s: linking abicalls files with non-abicalls files" msgstr "" -#: elf32-mips.c:2647 +#: elf32-mips.c:2640 #, c-format msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)" msgstr "" -#: elf32-mips.c:2656 +#: elf32-mips.c:2649 #, c-format msgid "%s: ISA mismatch (%d) with previous modules (%d)" msgstr "" -#: elf32-mips.c:2679 +#: elf32-mips.c:2672 #, c-format msgid "%s: ABI mismatch: linking %s module with previous %s modules" msgstr "" -#: elf32-mips.c:2693 elf32-ppc.c:1478 elf64-sparc.c:2997 +#: elf32-mips.c:2686 elf32-ppc.c:1489 elf64-ppc.c:1541 elf64-sparc.c:3030 #, c-format msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" msgstr "" -#: elf32-mips.c:2724 +#: elf32-mips.c:2717 msgid " [abi=O32]" msgstr "" -#: elf32-mips.c:2726 +#: elf32-mips.c:2719 msgid " [abi=O64]" msgstr "" -#: elf32-mips.c:2728 +#: elf32-mips.c:2721 msgid " [abi=EABI32]" msgstr "" -#: elf32-mips.c:2730 +#: elf32-mips.c:2723 msgid " [abi=EABI64]" msgstr "" -#: elf32-mips.c:2732 +#: elf32-mips.c:2725 msgid " [abi unknown]" msgstr "" -#: elf32-mips.c:2734 +#: elf32-mips.c:2727 msgid " [abi=N32]" msgstr "" -#: elf32-mips.c:2736 +#: elf32-mips.c:2729 msgid " [abi=64]" msgstr "" -#: elf32-mips.c:2738 +#: elf32-mips.c:2731 msgid " [no abi set]" msgstr "" -#: elf32-mips.c:2741 +#: elf32-mips.c:2734 msgid " [mips1]" msgstr "" -#: elf32-mips.c:2743 +#: elf32-mips.c:2736 msgid " [mips2]" msgstr "" -#: elf32-mips.c:2745 +#: elf32-mips.c:2738 msgid " [mips3]" msgstr "" -#: elf32-mips.c:2747 +#: elf32-mips.c:2740 msgid " [mips4]" msgstr "" -#: elf32-mips.c:2749 +#: elf32-mips.c:2742 msgid " [mips5]" msgstr "" -#: elf32-mips.c:2751 +#: elf32-mips.c:2744 msgid " [mips32]" msgstr "" -#: elf32-mips.c:2753 +#: elf32-mips.c:2746 msgid " [mips64]" msgstr "" -#: elf32-mips.c:2755 +#: elf32-mips.c:2748 msgid " [unknown ISA]" msgstr "" -#: elf32-mips.c:2758 +#: elf32-mips.c:2751 msgid " [32bitmode]" msgstr "" -#: elf32-mips.c:2760 +#: elf32-mips.c:2753 msgid " [not 32bitmode]" msgstr "" -#: elf32-mips.c:4428 +#: elf32-mips.c:4429 msgid "static procedure (no name)" msgstr "" -#: elf32-mips.c:5045 elf64-alpha.c:4418 +#: elf32-mips.c:5047 #, c-format msgid "%s: illegal section name `%s'" msgstr "" -#: elf32-mips.c:5610 +#: elf32-mips.c:5614 msgid "not enough GOT space for local GOT entries" msgstr "" -#: elf32-mips.c:6726 +#: elf32-mips.c:6734 #, c-format msgid "%s: %s+0x%lx: jump to stub routine which is not jal" msgstr "" -#: elf32-mips.c:7715 +#: elf32-mips.c:7733 #, c-format -msgid "Malformed reloc detected for section %s" +msgid "%s: Malformed reloc detected for section %s" msgstr "" -#: elf32-mips.c:7792 +#: elf32-mips.c:7811 #, c-format msgid "%s: CALL16 reloc at 0x%lx not against global symbol" msgstr "" -#: elf32-ppc.c:1444 +#: elf32-ppc.c:1455 elf64-ppc.c:1506 #, c-format msgid "" "%s: compiled with -mrelocatable and linked with modules compiled normally" msgstr "" -#: elf32-ppc.c:1452 +#: elf32-ppc.c:1463 elf64-ppc.c:1514 #, c-format msgid "" "%s: compiled normally and linked with modules compiled with -mrelocatable" msgstr "" -#: elf32-ppc.c:1576 +#: elf32-ppc.c:1587 #, c-format msgid "%s: Unknown special linker type %d" msgstr "" -#: elf32-ppc.c:2242 elf32-ppc.c:2276 elf32-ppc.c:2311 +#: elf32-ppc.c:2235 elf32-ppc.c:2269 elf32-ppc.c:2304 #, c-format msgid "%s: relocation %s cannot be used when making a shared object" msgstr "" -#: elf32-ppc.c:3126 +#: elf-hppa.h:1369 elf-hppa.h:1402 elf32-ppc.c:3086 elf32-s390.c:1424 +#: elf32-sh.c:3134 elf64-s390.c:1411 elf64-x86-64.c:1281 +#, c-format +msgid "" +"%s: warning: unresolvable relocation against symbol `%s' from %s section" +msgstr "" + +#: elf32-ppc.c:3121 elf64-ppc.c:3198 #, c-format msgid "%s: unknown relocation type %d for symbol %s" msgstr "" -#: elf32-ppc.c:3490 elf32-ppc.c:3511 elf32-ppc.c:3561 +#: elf32-ppc.c:3485 elf32-ppc.c:3506 elf32-ppc.c:3556 #, c-format msgid "" "%s: The target (%s) of a %s relocation is in the wrong output section (%s)" msgstr "" -#: elf32-ppc.c:3627 +#: elf32-ppc.c:3622 #, c-format msgid "%s: Relocation %s is not yet supported for symbol %s." msgstr "" -#: elf32-sh.c:1085 +#: elf32-sh.c:1098 #, c-format msgid "%s: 0x%lx: warning: bad R_SH_USES offset" msgstr "" -#: elf32-sh.c:1097 +#: elf32-sh.c:1110 #, c-format msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x" msgstr "" -#: elf32-sh.c:1114 +#: elf32-sh.c:1127 #, c-format msgid "%s: 0x%lx: warning: bad R_SH_USES load offset" msgstr "" -#: elf32-sh.c:1129 +#: elf32-sh.c:1142 #, c-format msgid "%s: 0x%lx: warning: could not find expected reloc" msgstr "" -#: elf32-sh.c:1166 +#: elf32-sh.c:1178 #, c-format msgid "%s: 0x%lx: warning: symbol in unexpected section" msgstr "" -#: elf32-sh.c:1288 +#: elf32-sh.c:1300 #, c-format msgid "%s: 0x%lx: warning: could not find expected COUNT reloc" msgstr "" -#: elf32-sh.c:1297 +#: elf32-sh.c:1309 #, c-format msgid "%s: 0x%lx: warning: bad count" msgstr "" -#: elf32-sh.c:1690 elf32-sh.c:2077 +#: elf32-sh.c:1703 elf32-sh.c:2093 #, c-format msgid "%s: 0x%lx: fatal: reloc overflow while relaxing" msgstr "" -#: elf32-sh.c:3171 +#: elf32-sh.c:3200 #, c-format msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation" msgstr "" -#: elf32-sparc.c:1519 elf64-sparc.c:2263 +#: elf32-sparc.c:1537 elf64-sparc.c:2281 #, c-format msgid "%s: probably compiled without -fPIC?" msgstr "" -#: elf32-sparc.c:1976 +#: elf32-sparc.c:1990 #, c-format msgid "%s: compiled for a 64 bit system and target is 32 bit" msgstr "" -#: elf32-sparc.c:1990 +#: elf32-sparc.c:2004 #, c-format msgid "%s: linking little endian files with big endian files" msgstr "" -#: elf32-v850.c:675 +#: elf32-v850.c:684 #, c-format msgid "Variable `%s' cannot occupy in multiple small data regions" msgstr "" -#: elf32-v850.c:678 +#: elf32-v850.c:687 #, c-format msgid "" "Variable `%s' can only be in one of the small, zero, and tiny data regions" msgstr "" -#: elf32-v850.c:681 +#: elf32-v850.c:690 #, c-format msgid "" "Variable `%s' cannot be in both small and zero data regions simultaneously" msgstr "" -#: elf32-v850.c:684 +#: elf32-v850.c:693 #, c-format msgid "" "Variable `%s' cannot be in both small and tiny data regions simultaneously" msgstr "" -#: elf32-v850.c:687 +#: elf32-v850.c:696 #, c-format msgid "" "Variable `%s' cannot be in both zero and tiny data regions simultaneously" msgstr "" -#: elf32-v850.c:1064 +#: elf32-v850.c:1074 msgid "FAILED to find previous HI16 reloc\n" msgstr "" -#: elf32-v850.c:1693 +#: elf32-v850.c:1707 msgid "could not locate special linker symbol __gp" msgstr "" -#: elf32-v850.c:1697 +#: elf32-v850.c:1711 msgid "could not locate special linker symbol __ep" msgstr "" -#: elf32-v850.c:1701 +#: elf32-v850.c:1715 msgid "could not locate special linker symbol __ctbp" msgstr "" -#: elf32-v850.c:1890 +#: elf32-v850.c:1908 #, c-format msgid "%s: Architecture mismatch with previous modules" msgstr "" -#: elf32-v850.c:1909 +#: elf32-v850.c:1928 #, c-format msgid "private flags = %lx: " msgstr "" -#: elf32-v850.c:1914 +#: elf32-v850.c:1933 msgid "v850 architecture" msgstr "" -#: elf32-v850.c:1915 +#: elf32-v850.c:1934 msgid "v850e architecture" msgstr "" -#: elf32-v850.c:1916 +#: elf32-v850.c:1935 msgid "v850ea architecture" msgstr "" -#: elf64-alpha.c:986 +#: elf64-alpha.c:857 msgid "GPDISP relocation did not find ldah and lda instructions" msgstr "" -#: elf64-alpha.c:3055 +#: elf64-alpha.c:2909 #, c-format msgid "%s: .got subsegment exceeds 64K (size %d)" msgstr "" -#: elf64-hppa.c:2032 +#: elf64-alpha.c:3463 elf64-alpha.c:3475 +#, c-format +msgid "%s: gp-relative relocation against dynamic symbol %s" +msgstr "" + +#: elf64-hppa.c:2043 #, c-format msgid "stub entry for %s cannot load .plt, dp offset = %ld" msgstr "" -#: elf64-sparc.c:1249 +#: elf64-ppc.c:1469 libbfd.c:1436 +#, c-format +msgid "%s: compiled for a big endian system and target is little endian" +msgstr "" + +#: elf64-ppc.c:1471 libbfd.c:1438 +#, c-format +msgid "%s: compiled for a little endian system and target is big endian" +msgstr "" + +#: elf64-ppc.c:3545 +#, c-format +msgid "%s: Relocation %s is not supported for symbol %s." +msgstr "" + +#: elf64-ppc.c:3589 +#, c-format +msgid "%s: error: relocation %s not a multiple of 4" +msgstr "" + +#: elf64-ppc.c:3742 +#, c-format +msgid "linkage table overflow against `%s'" +msgstr "" + +#: elf64-sparc.c:1272 #, c-format msgid "%s: check_relocs: unhandled reloc type %d" msgstr "" -#: elf64-sparc.c:1286 +#: elf64-sparc.c:1309 msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER" msgstr "" -#: elf64-sparc.c:1306 -msgid "" -"Register %%g%d used incompatibly: previously declared in %s to %s, in %s " -"redefined to %s" +#: elf64-sparc.c:1329 +msgid "Register %%g%d used incompatibly: %s in %s" msgstr "" -#: elf64-sparc.c:1329 +#: elf64-sparc.c:1333 elf64-sparc.c:1357 elf64-sparc.c:1406 #, c-format -msgid "Symbol `%s' has differing types: previously %s, REGISTER in %s" +msgid " previously %s in %s" msgstr "" -#: elf64-sparc.c:1375 +#: elf64-sparc.c:1354 elf64-sparc.c:1403 #, c-format -msgid "Symbol `%s' has differing types: REGISTER in %s, %s in %s" +msgid "Symbol `%s' has differing types: %s in %s" msgstr "" -#: elf64-sparc.c:2978 +#: elf64-sparc.c:3011 #, c-format msgid "%s: linking UltraSPARC specific with HAL specific code" msgstr "" -#: elf.c:330 +#: elf.c:338 #, c-format msgid "%s: invalid string offset %u >= %lu for section `%s'" msgstr "" -#: elf.c:590 +#: elf.c:443 +#, c-format +msgid "%s: invalid SHT_GROUP entry" +msgstr "" + +#: elf.c:524 +#, c-format +msgid "%s: no group info for section %s" +msgstr "" + +#: elf.c:785 msgid "" "\n" "Program Header:\n" msgstr "" -#: elf.c:638 +#: elf.c:833 msgid "" "\n" "Dynamic Section:\n" msgstr "" -#: elf.c:767 +#: elf.c:962 msgid "" "\n" "Version definitions:\n" msgstr "" -#: elf.c:790 +#: elf.c:985 msgid "" "\n" "Version References:\n" msgstr "" -#: elf.c:795 +#: elf.c:990 #, c-format msgid " required from %s:\n" msgstr "" -#: elf.c:1385 +#: elf.c:1600 #, c-format msgid "%s: invalid link %lu for reloc section %s (index %u)" msgstr "" -#: elf.c:2146 -#, c-format -msgid "" -"creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = " -"0x%.8lx\n" -msgstr "" - -#: elf.c:2749 +#: elf.c:3068 #, c-format msgid "%s: Not enough room for program headers (allocated %u, need %u)" msgstr "" -#: elf.c:2848 +#: elf.c:3167 #, c-format msgid "%s: Not enough room for program headers, try linking with -N" msgstr "" -#: elf.c:2974 +#: elf.c:3293 #, c-format msgid "Error: First section in segment (%s) starts at 0x%x" msgstr "" -#: elf.c:2977 +#: elf.c:3296 #, c-format msgid " whereas segment starts at 0x%x" msgstr "" -#: elf.c:3250 +#: elf.c:3569 #, c-format msgid "%s: warning: allocated section `%s' not in segment" msgstr "" -#: elf.c:3655 +#: elf.c:3887 #, c-format msgid "%s: symbol `%s' required but not present" msgstr "" -#: elf.c:3664 +#: elf.c:3896 #, c-format msgid "" "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = " "0x%.8lx%s\n" msgstr "" -#: elf.c:3905 +#: elf.c:4137 #, c-format msgid "%s: warning: Empty loadable segment detected\n" msgstr "" -#: elf.c:5290 +#: elf.c:5522 #, c-format msgid "%s: unsupported relocation type %s" msgstr "" -#: elfcode.h:1085 +#: elfcode.h:1096 #, c-format msgid "%s: version count (%ld) does not match symbol count (%ld)" msgstr "" -#: elflink.c:431 +#: elflink.c:434 #, c-format -msgid "%s: Section %s is already to large to put hole of %ld bytes in" +msgid "%s: Section %s is too large to add hole of %ld bytes" msgstr "" -#: elflink.h:1468 +#: elflink.h:1487 #, c-format msgid "%s: %s: invalid version %u (max %d)" msgstr "" -#: elflink.h:1509 +#: elflink.h:1528 #, c-format msgid "%s: %s: invalid needed version %d" msgstr "" -#: elflink.h:1629 +#: elflink.h:1648 #, c-format msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s" msgstr "" -#: elflink.h:1875 +#: elflink.h:1894 #, c-format msgid "%s: warning: unexpected redefinition of `%s'" msgstr "" -#: elflink.h:3676 +#: elflink.h:3730 #, c-format msgid "warning: type and size of dynamic symbol `%s' are not defined" msgstr "" -#: elflink.h:3948 +#: elflink.h:4037 #, c-format msgid "%s: undefined versioned symbol name %s" msgstr "" -#: elflink.h:4169 elflink.h:4177 elflink.h:5480 elflink.h:6420 +#: elflink.h:4264 elflink.h:4272 elflink.h:5830 elflink.h:6807 msgid "Error: out of memory" msgstr "" -#: elflink.h:5258 +#: elflink.h:4434 +msgid "Not enough memory to sort relocations" +msgstr "" + +#: elflink.h:5608 #, c-format msgid "%s: could not find output section %s for input section %s" msgstr "" -#: elflink.h:5661 -#, c-format -msgid "%s: invalid section symbol index 0x%x (%s) ingored" +#: elflink.h:6155 +msgid "warning: relocation against removed section; zeroing" msgstr "" -#: i386linux.c:450 m68klinux.c:454 sparclinux.c:452 +#: i386linux.c:455 m68klinux.c:459 sparclinux.c:456 #, c-format msgid "Output file requires shared library `%s'\n" msgstr "" -#: i386linux.c:458 m68klinux.c:462 sparclinux.c:460 +#: i386linux.c:463 m68klinux.c:467 sparclinux.c:464 #, c-format msgid "Output file requires shared library `%s.so.%s'\n" msgstr "" -#: i386linux.c:646 i386linux.c:696 m68klinux.c:653 m68klinux.c:701 -#: sparclinux.c:649 sparclinux.c:699 +#: i386linux.c:653 i386linux.c:703 m68klinux.c:660 m68klinux.c:708 +#: sparclinux.c:655 sparclinux.c:705 #, c-format msgid "Symbol %s not defined for fixups\n" msgstr "" -#: i386linux.c:720 m68klinux.c:725 sparclinux.c:723 +#: i386linux.c:727 m68klinux.c:732 sparclinux.c:729 msgid "Warning: fixup count mismatch\n" msgstr "" -#: ieee.c:168 +#: ieee.c:235 #, c-format msgid "%s: string too long (%d chars, max 65535)" msgstr "" -#: ieee.c:298 +#: ieee.c:365 #, c-format msgid "%s: unrecognized symbol `%s' flags 0x%x" msgstr "" -#: ieee.c:794 +#: ieee.c:877 #, c-format msgid "%s: unimplemented ATI record %u for symbol %u" msgstr "" -#: ieee.c:819 +#: ieee.c:902 #, c-format msgid "%s: unexpected ATN type %d in external part" msgstr "" -#: ieee.c:841 +#: ieee.c:924 #, c-format msgid "%s: unexpected type after ATN" msgstr "" @@ -1518,199 +1531,199 @@ msgstr "" #: ihex.c:369 #, c-format -msgid "%s:%d: bad checksum in Intel Hex file (expected %u, found %u)" +msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)" msgstr "" -#: ihex.c:421 +#: ihex.c:423 #, c-format -msgid "%s:%d: bad extended address record length in Intel Hex file" +msgid "%s:%u: bad extended address record length in Intel Hex file" msgstr "" -#: ihex.c:438 +#: ihex.c:440 #, c-format -msgid "%s:%d: bad extended start address length in Intel Hex file" +msgid "%s:%u: bad extended start address length in Intel Hex file" msgstr "" -#: ihex.c:455 +#: ihex.c:457 #, c-format -msgid "%s:%d: bad extended linear address record length in Intel Hex file" +msgid "%s:%u: bad extended linear address record length in Intel Hex file" msgstr "" -#: ihex.c:472 +#: ihex.c:474 #, c-format -msgid "%s:%d: bad extended linear start address length in Intel Hex file" +msgid "%s:%u: bad extended linear start address length in Intel Hex file" msgstr "" -#: ihex.c:489 +#: ihex.c:491 #, c-format -msgid "%s:%d: unrecognized ihex type %u in Intel Hex file\n" +msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n" msgstr "" -#: ihex.c:609 +#: ihex.c:611 #, c-format msgid "%s: internal error in ihex_read_section" msgstr "" -#: ihex.c:644 +#: ihex.c:646 #, c-format msgid "%s: bad section length in ihex_read_section" msgstr "" -#: ihex.c:858 +#: ihex.c:864 #, c-format msgid "%s: address 0x%s out of range for Intex Hex file" msgstr "" -#: libbfd.c:473 +#: libbfd.c:492 #, c-format msgid "not mapping: data=%lx mapped=%d\n" msgstr "" -#: libbfd.c:476 +#: libbfd.c:495 msgid "not mapping: env var not set\n" msgstr "" -#: libbfd.c:1371 +#: libbfd.c:1463 #, c-format -msgid "%s: compiled for a big endian system and target is little endian" +msgid "Deprecated %s called" msgstr "" -#: libbfd.c:1373 +#: libbfd.c:1465 #, c-format -msgid "%s: compiled for a little endian system and target is big endian" +msgid " at %s line %d in %s\n" msgstr "" -#: linker.c:1808 +#: linker.c:1849 #, c-format msgid "%s: indirect symbol `%s' to `%s' is a loop" msgstr "" -#: linker.c:2693 +#: linker.c:2745 #, c-format msgid "Attempt to do relocateable link with %s input and %s output" msgstr "" -#: merge.c:883 +#: merge.c:892 #, c-format msgid "%s: access beyond end of merged section (%ld + %ld)" msgstr "" -#: oasys.c:1016 +#: oasys.c:1036 #, c-format msgid "%s: can not represent section `%s' in oasys" msgstr "" -#: osf-core.c:146 +#: osf-core.c:152 #, c-format msgid "Unhandled OSF/1 core file section type %d\n" msgstr "" #. XXX code yet to be written. -#: peicode.h:796 +#: peicode.h:785 #, c-format msgid "%s: Unhandled import type; %x" msgstr "" -#: peicode.h:801 +#: peicode.h:790 #, c-format msgid "%s: Unrecognised import type; %x" msgstr "" -#: peicode.h:815 +#: peicode.h:804 #, c-format msgid "%s: Unrecognised import name type; %x" msgstr "" -#: peicode.h:1172 +#: peicode.h:1162 #, c-format msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive" msgstr "" -#: peicode.h:1184 +#: peicode.h:1174 #, c-format msgid "" "%s: Recognised but unhandled machine type (0x%x) in Import Library Format " "archive" msgstr "" -#: peicode.h:1201 +#: peicode.h:1191 #, c-format msgid "%s: size field is zero in Import Library Format header" msgstr "" -#: peicode.h:1229 +#: peicode.h:1219 #, c-format msgid "%s: string not null terminated in ILF object file." msgstr "" -#: pe-mips.c:654 +#: pe-mips.c:658 #, c-format msgid "%s: `ld -r' not supported with PE MIPS objects\n" msgstr "" -#: pe-mips.c:816 +#: pe-mips.c:820 #, c-format msgid "%s: jump too far away\n" msgstr "" -#: pe-mips.c:843 +#: pe-mips.c:847 #, c-format msgid "%s: bad pair/reflo after refhi\n" msgstr "" -#: ppcboot.c:423 +#: ppcboot.c:427 msgid "" "\n" "ppcboot header:\n" msgstr "" -#: ppcboot.c:424 +#: ppcboot.c:428 #, c-format msgid "Entry offset = 0x%.8lx (%ld)\n" msgstr "" -#: ppcboot.c:425 +#: ppcboot.c:429 #, c-format msgid "Length = 0x%.8lx (%ld)\n" msgstr "" -#: ppcboot.c:428 +#: ppcboot.c:432 #, c-format msgid "Flag field = 0x%.2x\n" msgstr "" -#: ppcboot.c:434 +#: ppcboot.c:438 #, c-format msgid "Partition name = \"%s\"\n" msgstr "" -#: ppcboot.c:453 +#: ppcboot.c:457 #, c-format msgid "" "\n" "Partition[%d] start = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" msgstr "" -#: ppcboot.c:459 +#: ppcboot.c:463 #, c-format msgid "Partition[%d] end = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" msgstr "" -#: ppcboot.c:465 +#: ppcboot.c:469 #, c-format msgid "Partition[%d] sector = 0x%.8lx (%ld)\n" msgstr "" -#: ppcboot.c:466 +#: ppcboot.c:470 #, c-format msgid "Partition[%d] length = 0x%.8lx (%ld)\n" msgstr "" -#: som.c:5356 +#: som.c:5401 msgid "som_sizeof_headers unimplemented" msgstr "" -#: srec.c:301 +#: srec.c:302 #, c-format msgid "%s:%d: Unexpected character `%s' in S-record file\n" msgstr "" @@ -1719,149 +1732,149 @@ msgstr "" msgid "Unsupported .stab relocation" msgstr "" -#: vms-gsd.c:354 +#: vms-gsd.c:355 #, c-format msgid "bfd_make_section (%s) failed" msgstr "" -#: vms-gsd.c:368 +#: vms-gsd.c:370 #, c-format msgid "bfd_set_section_flags (%s, %x) failed" msgstr "" -#: vms-gsd.c:404 +#: vms-gsd.c:406 #, c-format msgid "Size mismatch section %s=%lx, %s=%lx" msgstr "" -#: vms-gsd.c:699 +#: vms-gsd.c:703 #, c-format msgid "unknown gsd/egsd subtype %d" msgstr "" -#: vms-hdr.c:403 +#: vms-hdr.c:406 msgid "Object module NOT error-free !\n" msgstr "" -#: vms-misc.c:537 +#: vms-misc.c:543 #, c-format msgid "Stack overflow (%d) in _bfd_vms_push" msgstr "" -#: vms-misc.c:555 +#: vms-misc.c:561 msgid "Stack underflow in _bfd_vms_pop" msgstr "" -#: vms-misc.c:911 +#: vms-misc.c:919 msgid "_bfd_vms_output_counted called with zero bytes" msgstr "" -#: vms-misc.c:916 +#: vms-misc.c:924 msgid "_bfd_vms_output_counted called with too many bytes" msgstr "" -#: vms-misc.c:1047 +#: vms-misc.c:1055 #, c-format msgid "Symbol %s replaced by %s\n" msgstr "" -#: vms-misc.c:1109 +#: vms-misc.c:1117 #, c-format msgid "failed to enter %s" msgstr "" -#: vms-tir.c:68 +#: vms-tir.c:78 msgid "No Mem !" msgstr "" -#: vms-tir.c:302 +#: vms-tir.c:313 msgid "Bad section index in ETIR_S_C_STA_PQ" msgstr "" -#: vms-tir.c:317 +#: vms-tir.c:328 #, c-format msgid "Unsupported STA cmd %d" msgstr "" -#: vms-tir.c:322 vms-tir.c:1274 +#: vms-tir.c:333 vms-tir.c:1301 #, c-format msgid "Reserved STA cmd %d" msgstr "" -#: vms-tir.c:428 +#: vms-tir.c:443 #, c-format msgid "ETIR_S_C_STO_GBL: no symbol \"%s\"" msgstr "" -#: vms-tir.c:449 +#: vms-tir.c:465 #, c-format msgid "ETIR_S_C_STO_CA: no symbol \"%s\"" msgstr "" -#: vms-tir.c:462 +#: vms-tir.c:478 msgid "ETIR_S_C_STO_RB/AB: Not supported" msgstr "" -#: vms-tir.c:520 +#: vms-tir.c:538 msgid "ETIR_S_C_STO_LP_PSB: Not supported" msgstr "" -#: vms-tir.c:526 +#: vms-tir.c:544 msgid "ETIR_S_C_STO_HINT_GBL: not implemented" msgstr "" -#: vms-tir.c:532 +#: vms-tir.c:550 msgid "ETIR_S_C_STO_HINT_PS: not implemented" msgstr "" -#: vms-tir.c:536 vms-tir.c:1446 +#: vms-tir.c:554 vms-tir.c:1473 #, c-format msgid "Reserved STO cmd %d" msgstr "" -#: vms-tir.c:649 +#: vms-tir.c:667 msgid "ETIR_S_C_OPR_INSV: Not supported" msgstr "" -#: vms-tir.c:667 +#: vms-tir.c:685 msgid "ETIR_S_C_OPR_USH: Not supported" msgstr "" -#: vms-tir.c:673 +#: vms-tir.c:691 msgid "ETIR_S_C_OPR_ROT: Not supported" msgstr "" -#: vms-tir.c:692 +#: vms-tir.c:710 msgid "ETIR_S_C_OPR_REDEF: Not supported" msgstr "" -#: vms-tir.c:698 +#: vms-tir.c:716 msgid "ETIR_S_C_OPR_DFLIT: Not supported" msgstr "" -#: vms-tir.c:702 vms-tir.c:1641 +#: vms-tir.c:720 vms-tir.c:1668 #, c-format msgid "Reserved OPR cmd %d" msgstr "" -#: vms-tir.c:770 vms-tir.c:1710 +#: vms-tir.c:788 vms-tir.c:1737 #, c-format msgid "Reserved CTL cmd %d" msgstr "" -#: vms-tir.c:798 +#: vms-tir.c:816 msgid "ETIR_S_C_STC_LP: not supported" msgstr "" -#: vms-tir.c:816 +#: vms-tir.c:834 msgid "ETIR_S_C_STC_GBL: not supported" msgstr "" -#: vms-tir.c:824 +#: vms-tir.c:842 msgid "ETIR_S_C_STC_GCA: not supported" msgstr "" -#: vms-tir.c:833 +#: vms-tir.c:851 msgid "ETIR_S_C_STC_PS: not supported" msgstr "" @@ -1870,11 +1883,11 @@ msgstr "" #. * arg: - #. * #. -#: vms-tir.c:1174 +#: vms-tir.c:1199 msgid "Stack-from-image not implemented" msgstr "" -#: vms-tir.c:1194 +#: vms-tir.c:1219 msgid "Stack-entry-mask not fully implemented" msgstr "" @@ -1887,384 +1900,384 @@ msgstr "" #. * compare argument descriptor with symbol argument (ARG$V_PASSMECH) #. * and stack TRUE (args match) or FALSE (args dont match) value #. -#: vms-tir.c:1210 +#: vms-tir.c:1235 msgid "PASSMECH not fully implemented" msgstr "" -#: vms-tir.c:1230 +#: vms-tir.c:1256 msgid "Stack-local-symbol not fully implemented" msgstr "" -#: vms-tir.c:1245 +#: vms-tir.c:1271 msgid "Stack-literal not fully implemented" msgstr "" -#: vms-tir.c:1267 +#: vms-tir.c:1294 msgid "Stack-local-symbol-entry-point-mask not fully implemented" msgstr "" -#: vms-tir.c:1442 +#: vms-tir.c:1469 #, c-format msgid "Unimplemented STO cmd %d" msgstr "" -#: vms-tir.c:1581 +#: vms-tir.c:1608 msgid "TIR_S_C_OPR_ASH incomplete" msgstr "" -#: vms-tir.c:1595 +#: vms-tir.c:1622 msgid "TIR_S_C_OPR_USH incomplete" msgstr "" -#: vms-tir.c:1609 +#: vms-tir.c:1636 msgid "TIR_S_C_OPR_ROT incomplete" msgstr "" #. #. * redefine symbol to current location #. -#: vms-tir.c:1630 +#: vms-tir.c:1657 msgid "TIR_S_C_OPR_REDEF not supported" msgstr "" #. #. * define a literal #. -#: vms-tir.c:1637 +#: vms-tir.c:1664 msgid "TIR_S_C_OPR_DFLIT not supported" msgstr "" -#: vms-tir.c:1691 +#: vms-tir.c:1718 msgid "TIR_S_C_CTL_DFLOC not fully implemented" msgstr "" -#: vms-tir.c:1699 +#: vms-tir.c:1726 msgid "TIR_S_C_CTL_STLOC not fully implemented" msgstr "" -#: vms-tir.c:1707 +#: vms-tir.c:1734 msgid "TIR_S_C_CTL_STKDL not fully implemented" msgstr "" -#: vms-tir.c:1761 +#: vms-tir.c:1791 #, c-format msgid "Obj code %d not found" msgstr "" -#: vms-tir.c:2102 +#: vms-tir.c:2137 #, c-format msgid "SEC_RELOC with no relocs in section %s" msgstr "" -#: vms-tir.c:2376 +#: vms-tir.c:2424 #, c-format msgid "Unhandled relocation %s" msgstr "" -#: xcofflink.c:1220 +#: xcofflink.c:1241 #, c-format msgid "%s: `%s' has line numbers but no enclosing section" msgstr "" -#: xcofflink.c:1267 +#: xcofflink.c:1294 #, c-format msgid "%s: class %d symbol `%s' has no aux entries" msgstr "" -#: xcofflink.c:1290 +#: xcofflink.c:1317 #, c-format msgid "%s: symbol `%s' has unrecognized csect type %d" msgstr "" -#: xcofflink.c:1302 +#: xcofflink.c:1329 #, c-format msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d" msgstr "" -#: xcofflink.c:1340 +#: xcofflink.c:1365 #, c-format msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d" msgstr "" -#: xcofflink.c:1493 +#: xcofflink.c:1517 #, c-format msgid "%s: csect `%s' not in enclosing section" msgstr "" -#: xcofflink.c:1598 +#: xcofflink.c:1624 #, c-format msgid "%s: misplaced XTY_LD `%s'" msgstr "" -#: xcofflink.c:1916 +#: xcofflink.c:1948 #, c-format msgid "%s: reloc %s:%d not in csect" msgstr "" -#: xcofflink.c:2051 +#: xcofflink.c:2083 #, c-format msgid "%s: XCOFF shared object when not producing XCOFF output" msgstr "" -#: xcofflink.c:2072 +#: xcofflink.c:2104 #, c-format msgid "%s: dynamic object with no .loader section" msgstr "" -#: xcofflink.c:2715 +#: xcofflink.c:2749 #, c-format msgid "%s: no such symbol" msgstr "" -#: xcofflink.c:2848 +#: xcofflink.c:2890 msgid "error: undefined symbol __rtinit" msgstr "" -#: xcofflink.c:3389 +#: xcofflink.c:3423 #, c-format msgid "warning: attempt to export undefined symbol `%s'" msgstr "" -#: xcofflink.c:4358 +#: xcofflink.c:4421 #, c-format msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling" msgstr "" -#: xcofflink.c:5192 xcofflink.c:5603 xcofflink.c:5665 xcofflink.c:5968 +#: xcofflink.c:5261 xcofflink.c:5723 xcofflink.c:5785 xcofflink.c:6086 #, c-format msgid "%s: loader reloc in unrecognized section `%s'" msgstr "" -#: xcofflink.c:5214 xcofflink.c:5979 +#: xcofflink.c:5283 xcofflink.c:6097 #, c-format msgid "%s: `%s' in loader reloc but not loader sym" msgstr "" -#: xcofflink.c:5229 +#: xcofflink.c:5298 #, c-format msgid "%s: loader reloc in read-only section %s" msgstr "" -#: elf32-ia64.c:2046 elf64-ia64.c:2046 +#: elf32-ia64.c:2083 elf64-ia64.c:2083 msgid "@pltoff reloc against local symbol" msgstr "" -#: elf32-ia64.c:2104 elf64-ia64.c:2104 +#: elf32-ia64.c:2141 elf64-ia64.c:2141 msgid "non-zero addend in @fptr reloc" msgstr "" -#: elf32-ia64.c:3294 elf64-ia64.c:3294 +#: elf32-ia64.c:3321 elf64-ia64.c:3321 #, c-format msgid "%s: short data segment overflowed (0x%lx >= 0x400000)" msgstr "" -#: elf32-ia64.c:3305 elf64-ia64.c:3305 +#: elf32-ia64.c:3332 elf64-ia64.c:3332 #, c-format msgid "%s: __gp does not cover short data segment" msgstr "" -#: elf32-ia64.c:3575 elf64-ia64.c:3575 +#: elf32-ia64.c:3605 elf64-ia64.c:3605 #, c-format msgid "%s: linking non-pic code in a shared library" msgstr "" -#: elf32-ia64.c:3608 elf64-ia64.c:3608 +#: elf32-ia64.c:3638 elf64-ia64.c:3638 #, c-format msgid "%s: @gprel relocation against dynamic symbol %s" msgstr "" -#: elf32-ia64.c:3744 elf64-ia64.c:3744 +#: elf32-ia64.c:3776 elf64-ia64.c:3776 #, c-format msgid "%s: dynamic relocation against speculation fixup" msgstr "" -#: elf32-ia64.c:3752 elf64-ia64.c:3752 +#: elf32-ia64.c:3784 elf64-ia64.c:3784 #, c-format msgid "%s: speculation fixup against undefined weak symbol" msgstr "" -#: elf32-ia64.c:3935 elf64-ia64.c:3935 +#: elf32-ia64.c:3967 elf64-ia64.c:3967 msgid "unsupported reloc" msgstr "" -#: elf32-ia64.c:4232 elf64-ia64.c:4232 +#: elf32-ia64.c:4265 elf64-ia64.c:4265 #, c-format msgid "%s: linking trap-on-NULL-dereference with non-trapping files" msgstr "" -#: elf32-ia64.c:4241 elf64-ia64.c:4241 +#: elf32-ia64.c:4274 elf64-ia64.c:4274 #, c-format msgid "%s: linking big-endian files with little-endian files" msgstr "" -#: elf32-ia64.c:4250 elf64-ia64.c:4250 +#: elf32-ia64.c:4283 elf64-ia64.c:4283 #, c-format msgid "%s: linking 64-bit files with 32-bit files" msgstr "" -#: elf32-ia64.c:4259 elf64-ia64.c:4259 +#: elf32-ia64.c:4292 elf64-ia64.c:4292 #, c-format msgid "%s: linking constant-gp files with non-constant-gp files" msgstr "" -#: elf32-ia64.c:4269 elf64-ia64.c:4269 +#: elf32-ia64.c:4302 elf64-ia64.c:4302 #, c-format msgid "%s: linking auto-pic files with non-auto-pic files" msgstr "" -#: peigen.c:1009 pepigen.c:1009 +#: peigen.c:964 pepigen.c:964 #, c-format msgid "%s: line number overflow: 0x%lx > 0xffff" msgstr "" -#: peigen.c:1027 pepigen.c:1027 +#: peigen.c:981 pepigen.c:981 #, c-format msgid "%s: reloc overflow 1: 0x%lx > 0xffff" msgstr "" -#: peigen.c:1040 pepigen.c:1040 +#: peigen.c:995 pepigen.c:995 msgid "Export Directory [.edata (or where ever we found it)]" msgstr "" -#: peigen.c:1041 pepigen.c:1041 +#: peigen.c:996 pepigen.c:996 msgid "Import Directory [parts of .idata]" msgstr "" -#: peigen.c:1042 pepigen.c:1042 +#: peigen.c:997 pepigen.c:997 msgid "Resource Directory [.rsrc]" msgstr "" -#: peigen.c:1043 pepigen.c:1043 +#: peigen.c:998 pepigen.c:998 msgid "Exception Directory [.pdata]" msgstr "" -#: peigen.c:1044 pepigen.c:1044 +#: peigen.c:999 pepigen.c:999 msgid "Security Directory" msgstr "" -#: peigen.c:1045 pepigen.c:1045 +#: peigen.c:1000 pepigen.c:1000 msgid "Base Relocation Directory [.reloc]" msgstr "" -#: peigen.c:1046 pepigen.c:1046 +#: peigen.c:1001 pepigen.c:1001 msgid "Debug Directory" msgstr "" -#: peigen.c:1047 pepigen.c:1047 +#: peigen.c:1002 pepigen.c:1002 msgid "Description Directory" msgstr "" -#: peigen.c:1048 pepigen.c:1048 +#: peigen.c:1003 pepigen.c:1003 msgid "Special Directory" msgstr "" -#: peigen.c:1049 pepigen.c:1049 +#: peigen.c:1004 pepigen.c:1004 msgid "Thread Storage Directory [.tls]" msgstr "" -#: peigen.c:1050 pepigen.c:1050 +#: peigen.c:1005 pepigen.c:1005 msgid "Load Configuration Directory" msgstr "" -#: peigen.c:1051 pepigen.c:1051 +#: peigen.c:1006 pepigen.c:1006 msgid "Bound Import Directory" msgstr "" -#: peigen.c:1052 pepigen.c:1052 +#: peigen.c:1007 pepigen.c:1007 msgid "Import Address Table Directory" msgstr "" -#: peigen.c:1053 pepigen.c:1053 +#: peigen.c:1008 pepigen.c:1008 msgid "Delay Import Directory" msgstr "" -#: peigen.c:1054 peigen.c:1055 pepigen.c:1054 pepigen.c:1055 +#: peigen.c:1009 peigen.c:1010 pepigen.c:1009 pepigen.c:1010 msgid "Reserved" msgstr "" -#: peigen.c:1119 pepigen.c:1119 +#: peigen.c:1073 pepigen.c:1073 msgid "" "\n" "There is an import table, but the section containing it could not be found\n" msgstr "" -#: peigen.c:1124 pepigen.c:1124 +#: peigen.c:1078 pepigen.c:1078 #, c-format msgid "" "\n" "There is an import table in %s at 0x%lx\n" msgstr "" -#: peigen.c:1163 pepigen.c:1163 +#: peigen.c:1115 pepigen.c:1115 #, c-format msgid "" "\n" "Function descriptor located at the start address: %04lx\n" msgstr "" -#: peigen.c:1166 pepigen.c:1166 +#: peigen.c:1118 pepigen.c:1118 #, c-format msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n" msgstr "" -#: peigen.c:1172 pepigen.c:1172 +#: peigen.c:1124 pepigen.c:1124 msgid "" "\n" "No reldata section! Function descriptor not decoded.\n" msgstr "" -#: peigen.c:1177 pepigen.c:1177 +#: peigen.c:1129 pepigen.c:1129 #, c-format msgid "" "\n" "The Import Tables (interpreted %s section contents)\n" msgstr "" -#: peigen.c:1180 pepigen.c:1180 +#: peigen.c:1132 pepigen.c:1132 msgid " vma: Hint Time Forward DLL First\n" msgstr "" -#: peigen.c:1182 pepigen.c:1182 +#: peigen.c:1134 pepigen.c:1134 msgid " Table Stamp Chain Name Thunk\n" msgstr "" -#: peigen.c:1232 pepigen.c:1232 +#: peigen.c:1182 pepigen.c:1182 #, c-format msgid "" "\n" "\tDLL Name: %s\n" msgstr "" -#: peigen.c:1236 peigen.c:1299 pepigen.c:1236 pepigen.c:1299 +#: peigen.c:1186 peigen.c:1249 pepigen.c:1186 pepigen.c:1249 msgid "\tvma: Hint/Ord Member-Name\n" msgstr "" -#: peigen.c:1298 pepigen.c:1298 +#: peigen.c:1248 pepigen.c:1248 msgid "\tThe Import Address Table (difference found)\n" msgstr "" -#: peigen.c:1305 pepigen.c:1305 +#: peigen.c:1255 pepigen.c:1255 msgid "\t>>> Ran out of IAT members!\n" msgstr "" -#: peigen.c:1324 pepigen.c:1324 +#: peigen.c:1273 pepigen.c:1273 msgid "\tThe Import Address Table is identical\n" msgstr "" -#: peigen.c:1397 pepigen.c:1397 +#: peigen.c:1345 pepigen.c:1345 msgid "" "\n" "There is an export table, but the section containing it could not be found\n" msgstr "" -#: peigen.c:1402 pepigen.c:1402 +#: peigen.c:1350 pepigen.c:1350 #, c-format msgid "" "\n" "There is an export table in %s at 0x%lx\n" msgstr "" -#: peigen.c:1433 pepigen.c:1433 +#: peigen.c:1381 pepigen.c:1381 #, c-format msgid "" "\n" @@ -2272,131 +2285,131 @@ msgid "" "\n" msgstr "" -#: peigen.c:1437 pepigen.c:1437 +#: peigen.c:1385 pepigen.c:1385 #, c-format msgid "Export Flags \t\t\t%lx\n" msgstr "" -#: peigen.c:1440 pepigen.c:1440 +#: peigen.c:1388 pepigen.c:1388 #, c-format msgid "Time/Date stamp \t\t%lx\n" msgstr "" -#: peigen.c:1443 pepigen.c:1443 +#: peigen.c:1391 pepigen.c:1391 #, c-format msgid "Major/Minor \t\t\t%d/%d\n" msgstr "" -#: peigen.c:1446 pepigen.c:1446 +#: peigen.c:1394 pepigen.c:1394 msgid "Name \t\t\t\t" msgstr "" -#: peigen.c:1452 pepigen.c:1452 +#: peigen.c:1400 pepigen.c:1400 #, c-format msgid "Ordinal Base \t\t\t%ld\n" msgstr "" -#: peigen.c:1455 pepigen.c:1455 +#: peigen.c:1403 pepigen.c:1403 msgid "Number in:\n" msgstr "" -#: peigen.c:1458 pepigen.c:1458 +#: peigen.c:1406 pepigen.c:1406 #, c-format msgid "\tExport Address Table \t\t%08lx\n" msgstr "" -#: peigen.c:1462 pepigen.c:1462 +#: peigen.c:1410 pepigen.c:1410 #, c-format msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n" msgstr "" -#: peigen.c:1465 pepigen.c:1465 +#: peigen.c:1413 pepigen.c:1413 msgid "Table Addresses\n" msgstr "" -#: peigen.c:1468 pepigen.c:1468 +#: peigen.c:1416 pepigen.c:1416 msgid "\tExport Address Table \t\t" msgstr "" -#: peigen.c:1473 pepigen.c:1473 +#: peigen.c:1421 pepigen.c:1421 msgid "\tName Pointer Table \t\t" msgstr "" -#: peigen.c:1478 pepigen.c:1478 +#: peigen.c:1426 pepigen.c:1426 msgid "\tOrdinal Table \t\t\t" msgstr "" -#: peigen.c:1492 pepigen.c:1492 +#: peigen.c:1441 pepigen.c:1441 #, c-format msgid "" "\n" "Export Address Table -- Ordinal Base %ld\n" msgstr "" -#: peigen.c:1511 pepigen.c:1511 +#: peigen.c:1460 pepigen.c:1460 msgid "Forwarder RVA" msgstr "" -#: peigen.c:1522 pepigen.c:1522 +#: peigen.c:1471 pepigen.c:1471 msgid "Export RVA" msgstr "" -#: peigen.c:1529 pepigen.c:1529 +#: peigen.c:1478 pepigen.c:1478 msgid "" "\n" "[Ordinal/Name Pointer] Table\n" msgstr "" -#: peigen.c:1584 pepigen.c:1584 +#: peigen.c:1533 pepigen.c:1533 #, c-format msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n" msgstr "" -#: peigen.c:1588 pepigen.c:1588 +#: peigen.c:1537 pepigen.c:1537 msgid "" "\n" "The Function Table (interpreted .pdata section contents)\n" msgstr "" -#: peigen.c:1591 pepigen.c:1591 +#: peigen.c:1540 pepigen.c:1540 msgid " vma:\t\t\tBegin Address End Address Unwind Info\n" msgstr "" -#: peigen.c:1594 pepigen.c:1594 +#: peigen.c:1543 pepigen.c:1543 msgid " vma:\t\tBegin End EH EH PrologEnd Exception\n" msgstr "" -#: peigen.c:1596 pepigen.c:1596 +#: peigen.c:1545 pepigen.c:1545 msgid " \t\tAddress Address Handler Data Address Mask\n" msgstr "" -#: peigen.c:1668 pepigen.c:1668 +#: peigen.c:1613 pepigen.c:1613 msgid " Register save millicode" msgstr "" -#: peigen.c:1671 pepigen.c:1671 +#: peigen.c:1616 pepigen.c:1616 msgid " Register restore millicode" msgstr "" -#: peigen.c:1674 pepigen.c:1674 +#: peigen.c:1619 pepigen.c:1619 msgid " Glue code sequence" msgstr "" -#: peigen.c:1725 pepigen.c:1725 +#: peigen.c:1671 pepigen.c:1671 msgid "" "\n" "\n" "PE File Base Relocations (interpreted .reloc section contents)\n" msgstr "" -#: peigen.c:1760 pepigen.c:1760 +#: peigen.c:1701 pepigen.c:1701 #, c-format msgid "" "\n" "Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n" msgstr "" -#: peigen.c:1773 pepigen.c:1773 +#: peigen.c:1714 pepigen.c:1714 #, c-format msgid "\treloc %4d offset %4x [%4lx] %s" msgstr "" @@ -2404,7 +2417,7 @@ msgstr "" #. The MS dumpbin program reportedly ands with 0xff0f before #. printing the characteristics field. Not sure why. No reason to #. emulate it here. -#: peigen.c:1812 pepigen.c:1812 +#: peigen.c:1754 pepigen.c:1754 #, c-format msgid "" "\n" diff -uprN binutils-2.11.92.0.10/bfd/po/fr.po binutils-2.11.92.0.12/bfd/po/fr.po --- binutils-2.11.92.0.10/bfd/po/fr.po Wed Dec 31 16:00:00 1969 +++ binutils-2.11.92.0.12/bfd/po/fr.po Fri Nov 16 14:05:51 2001 @@ -0,0 +1,2074 @@ +# Messages français pour GNU concernant bfd. +# Copyright (C) 1996 Free Software Foundation, Inc. +# Michel Robitaille , 1996. +# +msgid "" +msgstr "" +"Project-Id-Version: GNU bfd 2.11\n" +"POT-Creation-Date: 2001-01-11 11:54-0800\n" +"PO-Revision-Date: 2001-09-19 08:00-0500\n" +"Last-Translator: Michel Robitaille \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: aout-adobe.c:189 +#, c-format +msgid "%s: Unknown section type in a.out.adobe file: %x\n" +msgstr "%s: type de section inconnu dans le fichier a.out.adobe: %x\n" + +#: aout-cris.c:205 +#, c-format +msgid "%s: Invalid relocation type exported: %d" +msgstr "%s: relocalisation invalide du type exporté: %d" + +#: aout-cris.c:249 +#, c-format +msgid "%s: Invalid relocation type imported: %d" +msgstr "%s: relocalisation invalide du type importé: %d" + +#: aout-cris.c:260 +#, c-format +msgid "%s: Bad relocation record imported: %d" +msgstr "%s: mauvais enregistrement de relocalisation importé: %d" + +#: aoutx.h:1259 aoutx.h:1673 +#, c-format +msgid "%s: can not represent section `%s' in a.out object file format" +msgstr "%s: ne peut représenter la section `%s' dans le fichier format objet a.out" + +#: aoutx.h:1643 +#, c-format +msgid "%s: can not represent section for symbol `%s' in a.out object file format" +msgstr "%s: ne peut représenter la section pour le symbole `%s' dans le fichier format objet a.out" + +#: aoutx.h:1645 +msgid "*unknown*" +msgstr "*inconnu*" + +#: aoutx.h:3684 +#, c-format +msgid "%s: relocateable link from %s to %s not supported" +msgstr "%s: relocalisation de liens de %s vers %s n'est pas supporté" + +#: archive.c:1820 +msgid "Warning: writing archive was slow: rewriting timestamp\n" +msgstr "AVERTISSEMENT: l'écriture de l'archive était lente: réécriture du cachet de date-heure\n" + +#: archive.c:2086 +msgid "Reading archive file mod timestamp" +msgstr "Lecture du cachet date-heure modifé du fichier d'archive" + +#. FIXME: bfd can't call perror. +#: archive.c:2113 +msgid "Writing updated armap timestamp" +msgstr "Écriture du cachet date-heure armap mise à jour" + +#: bfd.c:273 +msgid "No error" +msgstr "Pas d'erreur" + +#: bfd.c:274 +msgid "System call error" +msgstr "Erreur d'appel système" + +#: bfd.c:275 +msgid "Invalid bfd target" +msgstr "cible bfd invalide" + +#: bfd.c:276 +msgid "File in wrong format" +msgstr "Fichier dans un mauvais format" + +#: bfd.c:277 +msgid "Invalid operation" +msgstr "Opération invalide" + +#: bfd.c:278 +msgid "Memory exhausted" +msgstr "Mémoire épuisée" + +#: bfd.c:279 +msgid "No symbols" +msgstr "Aucun symbole" + +#: bfd.c:280 +msgid "Archive has no index; run ranlib to add one" +msgstr "L'archive n'a pas d'index; exécuter ranlib pour en ajouter un" + +#: bfd.c:281 +msgid "No more archived files" +msgstr "Aucun autre fichier d'archive" + +#: bfd.c:282 +msgid "Malformed archive" +msgstr "Archive mal formé" + +#: bfd.c:283 +msgid "File format not recognized" +msgstr "Format de fichier non reconnu" + +#: bfd.c:284 +msgid "File format is ambiguous" +msgstr "Format de fichier ambiguë" + +#: bfd.c:285 +msgid "Section has no contents" +msgstr "Section sans contenu" + +#: bfd.c:286 +msgid "Nonrepresentable section on output" +msgstr "Section non-représentable pour la sortie" + +#: bfd.c:287 +msgid "Symbol needs debug section which does not exist" +msgstr "Symboles ont besoin de la section de débug qui est inexistente" + +#: bfd.c:288 +msgid "Bad value" +msgstr "Mauvaise valeur" + +#: bfd.c:289 +msgid "File truncated" +msgstr "Fichier tronqué" + +#: bfd.c:290 +msgid "File too big" +msgstr "Fichier trop gros" + +#: bfd.c:291 +msgid "#" +msgstr "#" + +#: bfd.c:675 +#, c-format +msgid "bfd assertion fail %s:%d" +msgstr "échec d'assertion bfd %s:%d" + +#: bfd.c:693 +#, c-format +msgid "BFD internal error, aborting at %s line %d in %s\n" +msgstr "Erreur interne BFD, abandon à %s, ligne %d dans %s\n" + +#: bfd.c:697 +#, c-format +msgid "BFD internal error, aborting at %s line %d\n" +msgstr "Erreur interne BFD, abandon à %s, ligne %d\n" + +#: bfd.c:699 +msgid "Please report this bug.\n" +msgstr "SVP rapporter cette anomalie.\n" + +#: binary.c:303 +#, c-format +msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx." +msgstr "AVERTISSEMENT: écriture de la section `%s' vers un énorme décalage (ie negatif) dans le fichier 0x%lx." + +#: coff-a29k.c:122 +msgid "Missing IHCONST" +msgstr "IHCONST manquant" + +#: coff-a29k.c:181 +msgid "Missing IHIHALF" +msgstr "IHIHALF manquant" + +#: coff-a29k.c:213 +msgid "Unrecognized reloc" +msgstr "Relocalisation non reconnue" + +#: coff-a29k.c:425 +msgid "missing IHCONST reloc" +msgstr "IHCONST de relocalisation manquant" + +#: coff-a29k.c:516 +msgid "missing IHIHALF reloc" +msgstr "IHIHALF de relocalisation manquant" + +#: coff-alpha.c:880 coff-alpha.c:917 +msgid "GP relative relocation used when GP not defined" +msgstr "Relocalisation relative GP utilisé alors que GP n'est pas défini" + +#: coff-alpha.c:1486 elf64-alpha.c:4004 +msgid "using multiple gp values" +msgstr "utilisation de valeurs multiples gp" + +#: coff-alpha.c:1992 coff-mips.c:1434 +msgid "GP relative relocation when GP not defined" +msgstr "GP relocalisation relative alors que GP n'est pas défini" + +#: coff-arm.c:1018 elf32-arm.h:246 +#, c-format +msgid "%s: unable to find THUMB glue '%s' for `%s'" +msgstr "%s: incapable de repérer le REPÈRE de liant '%s' pour `%s'" + +#: coff-arm.c:1047 elf32-arm.h:281 +#, c-format +msgid "%s: unable to find ARM glue '%s' for `%s'" +msgstr "%s: incapable de repérer le liant ARM '%s' pour `%s'" + +#: coff-arm.c:1335 coff-arm.c:1430 elf32-arm.h:841 elf32-arm.h:946 +#, c-format +msgid "%s(%s): warning: interworking not enabled." +msgstr "%s(%s): AVERTISSEMENT: l'inter-réseautage n'est pas permis." + +#: coff-arm.c:1339 elf32-arm.h:949 +#, c-format +msgid " first occurrence: %s: arm call to thumb" +msgstr " première occurrence: %s: appel arm de repérage" + +#: coff-arm.c:1434 elf32-arm.h:844 +#, c-format +msgid " first occurrence: %s: thumb call to arm" +msgstr " première occurrence: %s: appel de repérage à ARM" + +#: coff-arm.c:1437 +msgid " consider relinking with --support-old-code enabled" +msgstr " considérer de rafaire les liens avec --support-old-code enabled" + +#: coff-arm.c:1726 coff-tic80.c:682 cofflink.c:2991 +#, c-format +msgid "%s: bad reloc address 0x%lx in section `%s'" +msgstr "%s: mausvaise adresse de relocalisation 0x%lx dans la section `%s'" + +#: coff-arm.c:2063 +#, c-format +msgid "%s: illegal symbol index in reloc: %d" +msgstr "%s: symbole index illégal dans la relocalisation: %d" + +#: coff-arm.c:2191 +#, c-format +msgid "%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d" +msgstr "%s: ERREUR: compilé pour APCS-%d alors que la cible %s utilise APCS-%d" + +#: coff-arm.c:2206 +#, c-format +msgid "%s: ERROR: passes floats in float registers whereas target %s uses integer registers" +msgstr "%s: ERREUR: passage de valeurs en virgule flottante dans des registreen virgule flottance alors que la cible %s utilise des registres de valeursentières" + +#: coff-arm.c:2209 +#, c-format +msgid "%s: ERROR: passes floats in integer registers whereas target %s uses float registers" +msgstr "%s: ERREUR: passage de valeurs en virgule flottante dans des registreen valeur entière alors que la cible %s utilise des registres de valeursen virgule flottante" + +#: coff-arm.c:2224 +#, c-format +msgid "%s: ERROR: compiled as position independent code, whereas target %s is absolute position" +msgstr "%s: ERREUR: compilé en code indépendant de la position, alors que la cible %s esten position absolue" + +#: coff-arm.c:2227 +#, c-format +msgid "%s: ERROR: compiled as absolute position code, whereas target %s is position independent" +msgstr "%s: ERREUR: compilé en code à position abolsu, alors que la cible %s estindépendant de la position" + +#: coff-arm.c:2256 +#, c-format +msgid "Warning: input file %s supports interworking, whereas %s does not." +msgstr "AVERTISSEMENT: file d'entrée %s supporte l'inter-réseautage, contrairement à %s." + +#: coff-arm.c:2259 +#, c-format +msgid "Warning: input file %s does not support interworking, whereas %s does." +msgstr "AVERTISSEMENT: fichier d'entrée %s ne supporte pas l'inter-réseautage, contrairement à %s." + +#: coff-arm.c:2286 +msgid "private flags = %x:" +msgstr "fanions privés = %x" + +#: coff-arm.c:2294 elf32-arm.h:2210 +msgid " [floats passed in float registers]" +msgstr " [valeurs en virgule flottante passées dans des registres de valeurs en virgule flottante]" + +#: coff-arm.c:2296 +msgid " [floats passed in integer registers]" +msgstr " [valeurs en virgule flottante passées dans des registres de valeurs entières]" + +#: coff-arm.c:2299 elf32-arm.h:2213 +msgid " [position independent]" +msgstr " [position indépendante]" + +#: coff-arm.c:2301 +msgid " [absolute position]" +msgstr " [position absolue]" + +#: coff-arm.c:2305 +msgid " [interworking flag not initialised]" +msgstr " [fanion d'inter-réseautage n'a pas été initialisé]" + +#: coff-arm.c:2307 +msgid " [interworking supported]" +msgstr " [inter-réseautage supporté]" + +#: coff-arm.c:2309 +msgid " [interworking not supported]" +msgstr " [inter-réseautage non supporté]" + +#: coff-arm.c:2357 +#, c-format +msgid "Warning: Not setting interworking flag of %s, since it has already been specified as non-interworking" +msgstr "AVERTISSEMENT: pas d'initialisation du fanion d'inter-réseautage %s, puisqu'il a déjà été spécifié comme sans inter-réseautage" + +#: coff-arm.c:2361 +#, c-format +msgid "Warning: Clearing the interworking flag of %s due to outside request" +msgstr "AVERTISSEMENT: mise à zéro du fanion d'inter-réseautage %s en raison d'une requête externe" + +#: coffcode.h:2136 +msgid "Unrecognized TI COFF target id '0x%x'" +msgstr "cible TI COFF non reconnue identificateur '0x%x'" + +#: coffcode.h:4194 +#, c-format +msgid "%s: warning: illegal symbol index %ld in line numbers" +msgstr "%s: AVERTISSEMENT: symbole d'index illégal %ld dans le numéro de ligne" + +#: coffcode.h:4208 +#, c-format +msgid "%s: warning: duplicate line number information for `%s'" +msgstr "%s: AVERTISSEMENT: information de numéro de ligne dédoublée pour `%s'" + +#: coffcode.h:4568 +#, c-format +msgid "%s: Unrecognized storage class %d for %s symbol `%s'" +msgstr "%s: classe de stockage non reconnue %d pour %s symbole `%s'" + +#: coffcode.h:4699 +#, c-format +msgid "warning: %s: local symbol `%s' has no section" +msgstr "AVERTISSEMENT: %s: symbole local `%s' n'a pas de section" + +#: coff-tic54x.c:376 coffcode.h:4810 +#, c-format +msgid "%s: warning: illegal symbol index %ld in relocs" +msgstr "%s: AVERTISSEMENT: symbole index illégal %ld dans les relocalisations" + +#: coffcode.h:4848 +#, c-format +msgid "%s: illegal relocation type %d at address 0x%lx" +msgstr "%s: type de relocalisation illégal %d à l'adresse 0x%lx" + +#: coffgen.c:1631 +msgid "%s: bad string table size %lu" +msgstr "%s: chaîne erronée de la taille de table %lu" + +#: coffgen.c:2093 +#, c-format +msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld" +msgstr "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld prochain %ld" + +#: coff-i960.c:136 coff-i960.c:485 +msgid "uncertain calling convention for non-COFF symbol" +msgstr "convention d'appel incertaine pour un symbole non COFF" + +#: cofflink.c:526 elflink.h:1648 +msgid "Warning: type of symbol `%s' changed from %d to %d in %s" +msgstr "AVERTISSEMENT: type de symbole `%s' a changé de %d à %d dans %s" + +#: cofflink.c:2289 +#, c-format +msgid "%s: relocs in section `%s', but it has no contents" +msgstr "%s: relocalisations dans la section `%s', mais n,a aucun contenu" + +#: cofflink.c:2628 coffswap.h:894 +#, c-format +msgid "%s: %s: reloc overflow: 0x%lx > 0xffff" +msgstr "%s: %s: débordement de relocalisation: 0x%lx > 0xffff" + +#: cofflink.c:2637 coffswap.h:880 +#, c-format +msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff" +msgstr "%s: AVERTISSEMENT: %s: débordement du compteur de numéro de ligne: 0x%lx > 0xffff" + +#: coff-m68k.c:475 coff-mips.c:2432 elf32-m68k.c:2265 +msgid "unsupported reloc type" +msgstr "type de relocalisation non supporté" + +#: coff-mips.c:875 elf32-mips.c:1417 +msgid "GP relative relocation when _gp not defined" +msgstr "relocalisation relative GP sans que _gp ne soit défini" + +#. No other sections should appear in -membedded-pic +#. code. +#: coff-mips.c:2469 +msgid "reloc against unsupported section" +msgstr "relocalisation vers une section non supportée" + +#: coff-mips.c:2477 +msgid "reloc not properly aligned" +msgstr "relocalisation n'est pas alignée correctement" + +#: coff-tic54x.c:263 coff-tic80.c:445 +msgid "Unrecognized reloc type 0x%x" +msgstr "Type de relocalisation non reconnu 0x%x" + +#: coff-w65.c:369 +#, c-format +msgid "ignoring reloc %s\n" +msgstr "relocalisation de %s ignorée\n" + +#: dwarf2.c:423 +msgid "Dwarf Error: Can't find .debug_abbrev section." +msgstr "Erreur DWARF: ne peut repérer la section .debug_abbrev" + +#: dwarf2.c:441 +#, c-format +msgid "Dwarf Error: Abbrev offset (%u) bigger than abbrev size (%u)." +msgstr "Erreur DWARF: décalage abrégé (%u) est plus grand que la taille abrégée (%u)." + +#: dwarf2.c:624 +#, c-format +msgid "Dwarf Error: Invalid or unhandled FORM value: %d." +msgstr "Erreur DWARF: valeur de FORME invalide ou mal traitée: %d" + +#: dwarf2.c:697 +msgid "Dwarf Error: mangled line number section (bad file number)." +msgstr "Erreur DWARF: numéro mutilé de ligne de section (mauvais no. de fichier)" + +#: dwarf2.c:782 +msgid "Dwarf Error: Can't find .debug_line section." +msgstr "Erreur DWARF: ne peut repérer la section .debug_line" + +#: dwarf2.c:806 +#, c-format +msgid "Dwarf Error: Line offset (%u) bigger than line size (%u)." +msgstr "Erreur DWARF: décalage de ligne (%u) plus grand que la taille de ligne (%u)" + +#: dwarf2.c:973 +msgid "Dwarf Error: mangled line number section." +msgstr "Erreur DWARF: numéro mutilé de ligne de section" + +#: dwarf2.c:1152 dwarf2.c:1306 +#, c-format +msgid "Dwarf Error: Could not find abbrev number %d." +msgstr "Erreur DWARF: ne peut repérer le numéro abrégé %d" + +#: dwarf2.c:1267 +#, c-format +msgid "Dwarf Error: found dwarf version '%hu', this reader only handles version 2 information." +msgstr "Erreur DWARF: version DWARF retrouvée '%hu', ce lecteur ne supporte que les informations de la version 2." + +#: dwarf2.c:1274 +#, c-format +msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'." +msgstr "Erreur DWARF: taille d'adresse obtenue '%u', ce lecteur ne peut traiter des tailles plus grandes que '%u'." + +#: dwarf2.c:1297 +#, c-format +msgid "Dwarf Error: Bad abbrev number: %d." +msgstr "Erreur DWARF: mauvais numéro abrégé: %d" + +#: ecoff.c:1323 +msgid "Unknown basic type %d" +msgstr "type de base inconnu %d" + +#: ecoff.c:1592 +#, c-format +msgid "\n End+1 symbol: %ld" +msgstr "\n Dernier+1 symbole: %ld" + +#: ecoff.c:1599 ecoff.c:1602 +#, c-format +msgid "\n First symbol: %ld" +msgstr "\n Premier symbole: %ld" + +#: ecoff.c:1614 +#, c-format +msgid "\n Fin+1 symbole: %-7ld Type: %s" +msgstr "\n Dernier+1 symbole: %-7ld Type: %s" + +#: ecoff.c:1621 +#, c-format +msgid "\n Local symbol: %ld" +msgstr "\n Symbole local: %ld" + +#: ecoff.c:1629 +#, c-format +msgid "\n struct; End+1 symbol: %ld" +msgstr "\n struct; Symbole Fin+1: %ld" + +#: ecoff.c:1634 +#, c-format +msgid "\n union; End+1 symbol: %ld" +msgstr "\n union; Dernier+1 symbole: %ld" + +#: ecoff.c:1639 +#, c-format +msgid "\n enum; End+1 symbol: %ld" +msgstr "\n enum; Dernier+1 symbol: %ld" + +#: ecoff.c:1645 +#, c-format +msgid "\n Type: %s" +msgstr "\n Type: %s" + +#: elf32-arm.h:1179 +#, c-format +msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'." +msgstr "%s: AVERTISSEMENT: instruction Arm BLX vise la fonction Arm '%s'." + +#: elf32-arm.h:1375 +#, c-format +msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'." +msgstr "%s: AVERTISSEMENT: instruction de repérage BLX vise la function de repérage '%s'." + +#: elf-hppa.h:1369 elf-hppa.h:1402 elf32-arm.h:1853 elf32-i386.c:1428 +#: elf32-ppc.c:3096 elf32-sh.c:2997 elf64-x86-64.c:271 +#, c-format +msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section" +msgstr "%s: AVERTISSEMENT: relocalisation sans solution vers le symbole `%s' de la section %s" + +#: elf-m10200.c:455 elf-m10300.c:669 elf32-arm.h:1927 elf32-avr.c:842 +#: elf32-cris.c:431 elf32-d10v.c:478 elf32-fr30.c:651 elf32-i860.c:1051 +#: elf32-m32r.c:1265 elf32-v850.c:1672 +msgid "internal error: out of range error" +msgstr "erreur interne: hors gamme" + +#: elf-m10200.c:459 elf-m10300.c:673 elf32-arm.h:1931 elf32-avr.c:846 +#: elf32-cris.c:435 elf32-d10v.c:482 elf32-fr30.c:655 elf32-i860.c:1055 +#: elf32-m32r.c:1269 elf32-v850.c:1676 +msgid "internal error: unsupported relocation error" +msgstr "erreur interne: erreur de relocalisation non supportée" + +#: elf-m10200.c:463 elf-m10300.c:677 elf32-arm.h:1935 elf32-d10v.c:486 +#: elf32-m32r.c:1273 +msgid "internal error: dangerous error" +msgstr "erreur interne: erreur dangereuse" + +#: elf-m10200.c:467 elf-m10300.c:681 elf32-arm.h:1939 elf32-avr.c:854 +#: elf32-cris.c:443 elf32-d10v.c:490 elf32-fr30.c:663 elf32-i860.c:1063 +#: elf32-m32r.c:1277 elf32-v850.c:1696 +msgid "internal error: unknown error" +msgstr "erreur interne: erreur inconnue" + +#: elf32-arm.h:1967 +#, c-format +msgid "Warning: Not setting interwork flag of %s since it has already been specified as non-interworking" +msgstr "AVERTISSEMENT: pas d'initialisation du fanion d'inter-réseautage %s alors qu'il a déjè été spécifié sans inter-réseautage" + +#: elf32-arm.h:1971 +#, c-format +msgid "Warning: Clearing the interwork flag of %s due to outside request" +msgstr "AVERTISSEMENT: mise à zéro du fanion d'inter-réseautage %s en raison d'une requête externe" + +#: elf32-arm.h:2019 +#, c-format +msgid "Warning: Clearing the interwork flag in %s because non-interworking code in %s has been linked with it" +msgstr "AVERTISSEMENT: mise à zéro du fanion d'inter-réseautage %s en raison du code sans inter-réseautage dans %s qui a été lié avec lui" + +#: elf32-arm.h:2113 +#, c-format +msgid "Error: %s compiled for EABI version %d, whereas %s is compiled for version %d" +msgstr "Erreur: %s compilé pour une version EABI %d, alors que %s a été compilé pour la version %d" + +#: elf32-arm.h:2127 +#, c-format +msgid "Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d" +msgstr "Erreur: %s compilé pour APCS-%d, alors que %s a été compilé pour APCS-%d" + +#: elf32-arm.h:2138 +#, c-format +msgid "Error: %s passes floats in %s registers, whereas %s passes them in %s registers" +msgstr "Erreur: %s passage de valeurs en virgule flottante dans les registres %s, alors que %s les passe dans les registres %s" + +#: elf32-arm.h:2141 elf32-arm.h:2143 +msgid "float" +msgstr "flottant" + +#: elf32-arm.h:2141 elf32-arm.h:2143 +msgid "integer" +msgstr "entier" + +#: elf32-arm.h:2150 +#, c-format +msgid "Error: %s uses %s floating point, whereas %s uses %s floating point" +msgstr "Erreur: %s utilise %s en virgule flottante, alors que %s utilise %s en virgule flottante" + +#: elf32-arm.h:2153 elf32-arm.h:2155 +msgid "soft" +msgstr "logiciel" + +#: elf32-arm.h:2153 elf32-arm.h:2155 +msgid "hard" +msgstr "matériel" + +#: elf32-arm.h:2162 +#, c-format +msgid "Warning: %s %s interworking, whereas %s %s" +msgstr "Warning: %s %s inter-réseautage, alors que %s %s" + +#: elf32-arm.h:2165 +msgid "supports" +msgstr "supporte" + +#: elf32-arm.h:2165 +msgid "does not support" +msgstr "n'est pas supportée" + +#: elf32-arm.h:2167 +msgid "does not" +msgstr "n'est pas" + +#: elf32-arm.h:2167 +msgid "does" +msgstr "est" + +#. Ignore init flag - it may not be set, despite the flags field +#. containing valid data. +#: elf32-arm.h:2193 elf32-cris.c:615 elf32-m68k.c:430 elf32-mips.c:2695 +msgid "private flags = %lx:" +msgstr "fanions privés = %lx" + +#: elf32-arm.h:2202 +msgid " [interworking enabled]" +msgstr " [inter-réseautage autorisé]" + +#: elf32-arm.h:2205 +msgid " [APCS-26]" +msgstr " [APCS-26]" + +#: elf32-arm.h:2207 +msgid " [APCS-32]" +msgstr " [APCS-32]" + +#: elf32-arm.h:2216 +msgid " [new ABI]" +msgstr " [nouvel ABI]" + +#: elf32-arm.h:2219 +msgid " [old ABI]" +msgstr " [ancien ABI]" + +#: elf32-arm.h:2222 +msgid " [software FP]" +msgstr " [virgule flottante logiciel]" + +#: elf32-arm.h:2229 +msgid " [Version1 EABI]" +msgstr " [Version 1 EABI]" + +#: elf32-arm.h:2232 +msgid " [sorted symbol table]" +msgstr " [table des symboles triés]" + +#: elf32-arm.h:2234 +msgid " [unsorted symbol table]" +msgstr " [table des symboles non triés]" + +#: elf32-arm.h:2240 +msgid " " +msgstr " " + +#: elf32-arm.h:2247 +msgid " [relocatable executable]" +msgstr " [exécutables relocalisés]" + +#: elf32-arm.h:2250 +msgid " [has entry point]" +msgstr " [a des points d'entrées]" + +#: elf32-arm.h:2255 +msgid "" +msgstr "" + +#: elf32-avr.c:850 elf32-cris.c:439 elf32-fr30.c:659 elf32-i860.c:1059 +#: elf32-v850.c:1680 +msgid "internal error: dangerous relocation" +msgstr "erreur interne: relocalisation dangereuse" + +#: elf32-cris.c:618 +msgid " [symbols have a _ prefix]" +msgstr " [symboles sont préfixés par `_']" + +#: elf32-cris.c:657 +#, c-format +msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols" +msgstr "%s: utilise _-prefixed symbols, mais avec écriture au fichier avec des symboles sans préfixes" + +#: elf32-cris.c:658 +#, c-format +msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols" +msgstr "%s: utilise des symboles sans préfixes, mais avec écriture au fichier avec des symboles ayant des préfixes_-prefixed" + +#: elf32-hppa.c:606 +#, c-format +msgid "%s(%s+0x%lx): cannot find stub entry %s" +msgstr "%s(%s+0x%lx): ne peut repérer l'entrée du talon %s" + +#: elf32-hppa.c:667 +msgid "%s: cannot create stub entry %s" +msgstr "%s: ne peut créer l'entrée du talon %s" + +#: elf32-hppa.c:859 +#, c-format +msgid "%s(%s+0x%lx): cannot relocate %s, recompile with -ffunction-sections" +msgstr "%s(%s+0x%lx): ne peut relocaliser %s, recompiler avec -ffunction-sections" + +#: elf32-hppa.c:872 elf32-hppa.c:1568 +msgid "Could not find relocation section for %s" +msgstr "Ne peut repérer la section de relocalisation pour %s" + +#: elf32-hppa.c:1011 elf32-hppa.c:3362 +#, c-format +msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections" +msgstr "%s(%s+0x%lx): ne peut atteindre %s, recompiler avec -ffunction-sections" + +#: elf32-hppa.c:1323 +#, c-format +msgid "%s: relocation %s can not be used when making a shared object; recompile with -fPIC" +msgstr "%s: relocalisation de %s ne peut être utilisée lors de la création d'un objet partagé; recompiler avec -fPIC" + +#: elf32-hppa.c:1343 +#, c-format +msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC" +msgstr "%s: relocalisation %s ne doit pas être utilisée lors de la création d'un objet partagé; recompiler avec -fPIC" + +#: elf32-hppa.c:2755 +#, c-format +msgid "%s: duplicate export stub %s" +msgstr "%s: talon d'exportation en double %s" + +#: elf32-hppa.c:3253 +#, c-format +msgid "%s(%s+0x%lx): fixing %s" +msgstr "%s(%s+0x%lx): corrigeant %s" + +#: elf32-hppa.c:3856 +#, c-format +msgid "%s(%s+0x%lx): cannot handle %s for %s" +msgstr "%s(%s+0x%lx): ne traiter %s pour %s" + +#: elf32-hppa.c:4173 +msgid ".got section not immediately after .plt section" +msgstr "section .got pas immédiatement après la section .plt" + +#: elf32-i386.c:273 +msgid "%s: invalid relocation type %d" +msgstr "%s: type de relocalisation invalide %d" + +#: elf32-m32r.c:916 +msgid "SDA relocation when _SDA_BASE_ not defined" +msgstr "relocalisation SDA alors que _SDA_BASE_ n'est pas définie" + +#: elf32-m32r.c:1000 elf32-ppc.c:2963 +msgid "%s: unknown relocation type %d" +msgstr "%s: type de relocalisation inconnu %d" + +#: elf32-m32r.c:1208 +#, c-format +msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)" +msgstr "%s: la cible (%s) de la relocalisation %s est dans la mauvaise section (%s)" + +#: elf32-m32r.c:2010 +#, c-format +msgid "%s: Instruction set mismatch with previous modules" +msgstr "%s: jeu d'instructions ne concorde par avec les modules précédents" + +#: elf32-m32r.c:2033 +msgid "private flags = %lx" +msgstr "fanions privés = %lx" + +#: elf32-m32r.c:2038 +msgid ": m32r instructions" +msgstr ": instructions m32r" + +#: elf32-m32r.c:2039 +msgid ": m32rx instructions" +msgstr ": instruction m32rx" + +#: elf32-m68k.c:433 +msgid " [cpu32]" +msgstr " [cpu32]" + +#: elf32-mcore.c:366 elf32-mcore.c:493 +msgid "%s: Relocation %s (%d) is not currently supported.\n" +msgstr "%s: relocalisation %s (%d) n'est pas couramment supportée.\n" + +#: elf32-mcore.c:452 +msgid "%s: Unknown relocation type %d\n" +msgstr "%s: type de relocalisation inconnue %d\n" + +#: elf32-mips.c:1576 +msgid "32bits gp relative relocation occurs for an external symbol" +msgstr "relocalisation relative gp 32bits est survenue pour un symbole externe" + +#: elf32-mips.c:1725 +#, c-format +msgid "Linking mips16 objects into %s format is not supported" +msgstr "Édition de liens d'objets mips16 dans le format %s n'est pas supporté" + +#: elf32-mips.c:2582 +#, c-format +msgid "%s: linking PIC files with non-PIC files" +msgstr "%s: édition de liens des fichiers PIC avec des fichiers non PIC" + +#: elf32-mips.c:2592 +#, c-format +msgid "%s: linking abicalls files with non-abicalls files" +msgstr "%s: édition de liens des fichier abicalls avec des fichiers non abicalls" + +#: elf32-mips.c:2621 +#, c-format +msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)" +msgstr "%s: ISA ne concorde pas (-mips%d) avec les modules précédents (-mips%d)" + +#: elf32-mips.c:2630 +#, c-format +msgid "%s: ISA mismatch (%d) with previous modules (%d)" +msgstr "%s: ISA ne concorde pas (%d) avec les modules précédents (%d)" + +#: elf32-mips.c:2653 +#, c-format +msgid "%s: ABI mismatch: linking %s module with previous %s modules" +msgstr "%s: ABI ne concorde pas: édition de lien du module %s avec les modules précédents %s" + +#: elf32-mips.c:2667 elf32-ppc.c:1477 elf64-sparc.c:2971 +#, c-format +msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" +msgstr "%s: utilise differents champs e_flags (0x%lx) que les modules précédents (0x%lx)" + +#: elf32-mips.c:2698 +msgid " [abi=O32]" +msgstr " [abi=O32]" + +#: elf32-mips.c:2700 +msgid " [abi=O64]" +msgstr " [abi=O64]" + +#: elf32-mips.c:2702 +msgid " [abi=EABI32]" +msgstr " [abi=EABI32]" + +#: elf32-mips.c:2704 +msgid " [abi=EABI64]" +msgstr " [abi=EABI64]" + +#: elf32-mips.c:2706 +msgid " [abi unknown]" +msgstr " [abi inconnu]" + +#: elf32-mips.c:2708 +msgid " [abi=N32]" +msgstr " [abi=N32]" + +#: elf32-mips.c:2710 +msgid " [abi=64]" +msgstr " [abi=64]" + +#: elf32-mips.c:2712 +msgid " [no abi set]" +msgstr " [aucun jeu abi]" + +#: elf32-mips.c:2715 +msgid " [mips1]" +msgstr " [mips1]" + +#: elf32-mips.c:2717 +msgid " [mips2]" +msgstr " [mips2]" + +#: elf32-mips.c:2719 +msgid " [mips3]" +msgstr " [mips3]" + +#: elf32-mips.c:2721 +msgid " [mips4]" +msgstr " [mips4]" + +#: elf32-mips.c:2723 +msgid " [mips5]" +msgstr " [mips5]" + +#: elf32-mips.c:2725 +msgid " [mips32]" +msgstr " [mips32]" + +#: elf32-mips.c:2727 +msgid " [mips64]" +msgstr " [mips64]" + +#: elf32-mips.c:2729 +msgid " [unknown ISA]" +msgstr " [ISA inconnu]" + +#: elf32-mips.c:2732 +msgid " [32bitmode]" +msgstr " [mode 32 bits]" + +#: elf32-mips.c:2734 +msgid " [not 32bitmode]" +msgstr " [aucun mode 32 bits]" + +#: elf32-mips.c:4388 +msgid "static procedure (no name)" +msgstr "procédure statique (sans name)" + +#: elf32-mips.c:5005 elf64-alpha.c:4377 +msgid "%s: illegal section name `%s'" +msgstr "%s: nom illégal de section `%s'" + +#: elf32-mips.c:5570 +msgid "not enough GOT space for local GOT entries" +msgstr "pas suffisamment d'espace GOT pour les entrées locales GOT" + +#: elf32-mips.c:6686 +#, c-format +msgid "%s: %s+0x%lx: jump to stub routine which is not jal" +msgstr "%s: %s+0x%lx: saut vers la routine dans la partie du talon (stub) qui n'est pas jal" + +#: elf32-mips.c:7673 +#, c-format +msgid "Malformed reloc detected for section %s" +msgstr "Relocalisation mal composée détectée dans la section %s" + +#: elf32-mips.c:7750 +#, c-format +msgid "%s: CALL16 reloc at 0x%lx not against global symbol" +msgstr "%s: appel CALL16 de relocalisation à 0x%lx qui n'est pas pourun symbole global" + +#: elf32-ppc.c:1443 +#, c-format +msgid "%s: compiled with -mrelocatable and linked with modules compiled normally" +msgstr "%s: compilé avec -mrelocatable et fait l'édition de lien avec les modules compilés normalement" + +#: elf32-ppc.c:1451 +#, c-format +msgid "%s: compiled normally and linked with modules compiled with -mrelocatable" +msgstr "%s: compilé normalement et fait l'édition de lien avec les modules compilés avec -mrelocatable" + +#: elf32-ppc.c:1578 +#, c-format +msgid "%s: Unknown special linker type %d" +msgstr "%s: type d'édition spécial de lien inconnu %d" + +#: elf32-ppc.c:2245 elf32-ppc.c:2279 elf32-ppc.c:2314 +#, c-format +msgid "%s: relocation %s cannot be used when making a shared object" +msgstr "%s: relocalisation %s ne peut être utilisée lors de la création d'un objet partagé" + +#: elf32-ppc.c:3129 +#, c-format +msgid "%s: unknown relocation type %d for symbol %s" +msgstr "%s: type de relocalisation inconnue %d pour le symbole %s" + +#: elf32-ppc.c:3493 elf32-ppc.c:3514 elf32-ppc.c:3564 +#, c-format +msgid "%s: The target (%s) of a %s relocation is in the wrong output section (%s)" +msgstr "%s: la cible (%s) d'une relocalisation %s est dans la mauvaise section de sortie (%s)" + +#: elf32-ppc.c:3630 +#, c-format +msgid "%s: Relocation %s is not yet supported for symbol %s." +msgstr "%s: relocalisation %s n'est pas encore supporté pour le symbole %s." + +#: elf32-sh.c:1084 +#, c-format +msgid "%s: 0x%lx: warning: bad R_SH_USES offset" +msgstr "%s: 0x%lx: AVERTISSEMENT: mauvais décalage pour R_SH_USES" + +#: elf32-sh.c:1096 +#, c-format +msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x" +msgstr "%s: 0x%lx: AVERTISSEMENT: R_SH_USES pointe vers un insn inconnu 0x%x " + +#: elf32-sh.c:1113 +#, c-format +msgid "%s: 0x%lx: warning: bad R_SH_USES load offset" +msgstr "%s: 0x%lx: AVERTISSEMENT: mauvais décalage de chargement R_SH_USES" + +#: elf32-sh.c:1128 +#, c-format +msgid "%s: 0x%lx: warning: could not find expected reloc" +msgstr "%s: 0x%lx: AVERTISSEMENT: ne peut repérer la relocalisation attendue" + +#: elf32-sh.c:1165 +#, c-format +msgid "%s: 0x%lx: warning: symbol in unexpected section" +msgstr "%s: 0x%lx: AVERTISSEMENT: symbole dans une section inattendue" + +#: elf32-sh.c:1287 +#, c-format +msgid "%s: 0x%lx: warning: could not find expected COUNT reloc" +msgstr "%s: 0x%lx: AVERTISSEMENT: ne peut repérer le compteur de relocalisation attendu" + +#: elf32-sh.c:1296 +msgid "%s: 0x%lx: warning: bad count" +msgstr "%s: 0x%lx: AVERTISSEMENT: mauvais décompte" + +#: elf32-sh.c:1689 elf32-sh.c:2076 +#, c-format +msgid "%s: 0x%lx: fatal: reloc overflow while relaxing" +msgstr "%s: 0x%lx: erreur fatale: débordement de relocalisation lors de relâches" + +#: elf32-sparc.c:1512 elf64-sparc.c:2262 +#, c-format +msgid "%s: probably compiled without -fPIC?" +msgstr "%s: probablement compilé sans -fPIC?" + +#: elf32-sparc.c:1962 +#, c-format +msgid "%s: compiled for a 64 bit system and target is 32 bit" +msgstr "%s: compilé pour un système à 64 bits et la cible est de 32 bits" + +#: elf32-sparc.c:1976 +#, c-format +msgid "%s: linking little endian files with big endian files" +msgstr "" +"%s: édition de liens pour des fichiers en système à octets de poids faibles\n" +"avec des fichiers pour des systèmes à octets de poids fort" + +#: elf32-v850.c:677 +#, c-format +msgid "Variable `%s' cannot occupy in multiple small data regions" +msgstr "Variable `%s' ne peut occuper de multiples petites régions de données" + +#: elf32-v850.c:680 +#, c-format +msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions" +msgstr "Variable `%s' peut seulement être dans une région de données petite, zéro ou minuscule" + +#: elf32-v850.c:683 +#, c-format +msgid "Variable `%s' cannot be in both small and zero data regions simultaneously" +msgstr "Variable `%s' ne peut être dans une région de données petite et zéro à la fois" + +#: elf32-v850.c:686 +#, c-format +msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously" +msgstr "Variable `%s' ne peut être dans une région de données petite et minuscule zéro à la fois" + +#: elf32-v850.c:689 +#, c-format +msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously" +msgstr "Variable `%s' ne peut être dans une région de données zéro et minuscule zéro à la fois" + +#: elf32-v850.c:1066 +msgid "FAILED to find previous HI16 reloc\n" +msgstr "ÉCHEC de repérage de la relocalisation précédente HI16\n" + +#: elf32-v850.c:1684 +msgid "could not locate special linker symbol __gp" +msgstr "ne peut repérer le symbole spécial d'édition de lien __gp" + +#: elf32-v850.c:1688 +msgid "could not locate special linker symbol __ep" +msgstr "ne peut repérer le symbole spécial d'édition de lien __ep" + +#: elf32-v850.c:1692 +msgid "could not locate special linker symbol __ctbp" +msgstr "ne peut repérer le symbole spécial d'édition de lien __ctbp" + +#: elf32-v850.c:1881 +#, c-format +msgid "%s: Architecture mismatch with previous modules" +msgstr "%s: l'architecture ne concorde pas avec les modules précédents" + +#: elf32-v850.c:1900 +msgid "private flags = %lx: " +msgstr "fanions privés = %lx" + +#: elf32-v850.c:1905 +msgid "v850 architecture" +msgstr "architecture v850" + +#: elf32-v850.c:1906 +msgid "v850e architecture" +msgstr "architecture v850e" + +#: elf32-v850.c:1907 +msgid "v850ea architecture" +msgstr "architecture v850ea" + +#: elf64-alpha.c:951 +msgid "GPDISP relocation did not find ldah and lda instructions" +msgstr "la relocalisation GPDISP n'a pas repéré les instructions ldah et lda" + +#: elf64-alpha.c:3014 +#, c-format +msgid "%s: .got subsegment exceeds 64K (size %d)" +msgstr "%s: le sous-segment .got excède 64K (taille %d)" + +#: elf64-sparc.c:1248 +#, c-format +msgid "%s: check_relocs: unhandled reloc type %d" +msgstr "%s: check_relocs: type de relocalisation non traitée %d" + +#: elf64-sparc.c:1285 +msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER" +msgstr "%s: seuls les registres %%g[2367] peuvent être déclarés en utilisant les registres STT_REGISTER" + +#: elf64-sparc.c:1305 +msgid "Register %%g%d used incompatibly: previously declared in %s to %s, in %s redefined to %s" +msgstr "Registre %%g%d utilisé de manière incompatible: déclaré précédemment dans %s vers %s, dans %s redéfini comme %s" + +#: elf64-sparc.c:1328 +#, c-format +msgid "Symbol `%s' has differing types: previously %s, REGISTER in %s" +msgstr "Symbole `%s' a des types qui diffèrent: précédemment %s, ENREGISTRÉ dans %s" + +#: elf64-sparc.c:1374 +#, c-format +msgid "Symbol `%s' has differing types: REGISTER in %s, %s in %s" +msgstr "Symbole `%s' a des types qui diffèrent: ENREGISTRÉ dans %s, %s dans %s" + +#: elf64-sparc.c:2952 +#, c-format +msgid "%s: linking UltraSPARC specific with HAL specific code" +msgstr "%s: édition de liens spécifiques pour UltraSPARC avec du code spécifique HAL" + +#: elf.c:325 +#, c-format +msgid "%s: invalid string offset %u >= %lu for section `%s'" +msgstr "%s: chaîne de décalage invalide %u >= %lu pour la section `%s'" + +#: elf.c:566 +msgid "\nProgram Header:\n" +msgstr "\nEn-tête de programme:\n" + +#: elf.c:614 +msgid "\nDynamic Section:\n" +msgstr "\nSection dynamique:\n" + +#: elf.c:743 +msgid "\nVersion definitions:\n" +msgstr "\nDéfinitions des versions:\n" + +#: elf.c:766 +msgid "\nVersion References:\n" +msgstr "\nRéférences de version:\n" + +#: elf.c:771 +#, c-format +msgid " required from %s:\n" +msgstr " requis par %s:\n" + +#: elf.c:1359 +#, c-format +msgid "%s: invalid link %lu for reloc section %s (index %u)" +msgstr "%s: lien invalide %lu pour la section de relocalisation %s (index %u)" + +#: elf.c:2113 +#, c-format +msgid "creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = 0x%.8lx\n" +msgstr "création de la section des symboles, nom = %s, valeur = 0x%.8lx, index = %d, section = 0x%.8lx\n" + +#: elf.c:2716 +#, c-format +msgid "%s: Not enough room for program headers (allocated %u, need %u)" +msgstr "%s: pas suffisamment d'espace pour les en-têtes du programme (alloué %u, besoin de %u)" + +#: elf.c:2815 +#, c-format +msgid "%s: Not enough room for program headers, try linking with -N" +msgstr "%s: pas suffisamment d'espace pour les en-têtes du programme, essayer l'option -N" + +#: elf.c:2941 +#, c-format +msgid "Error: First section in segment (%s) starts at 0x%x" +msgstr "Erreur: première section dans le segment (%s) débute à 0x%x" + +#: elf.c:2944 +#, c-format +msgid " whereas segment starts at 0x%x" +msgstr " alors que le segment débute à 0x%x" + +#: elf.c:3217 +#, c-format +msgid "%s: warning: allocated section `%s' not in segment" +msgstr "%s: AVERTISSEMENT: section allouée `%s' n'est pas dans le segment" + +#: elf.c:3616 +msgid "%s: symbol `%s' required but not present" +msgstr "%s: symbole `%s' requis mais absent" + +#: elf.c:3625 +#, c-format +msgid "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n" +msgstr "elf_symbol_from_bfd_symbol 0x%.8lx, nom = %s, no. de symbole = %d, fanions = 0x%.8lx%s\n" + +#: elf.c:3866 +#, c-format +msgid "%s: warning: Empty loadable segment detected\n" +msgstr "%s: AVERTISSEMENT: segment chargeable vide détecté\n" + +#: elf.c:5213 +msgid "%s: unsupported relocation type %s" +msgstr "%s: type de relocalisation non supporté %s" + +#: elfcode.h:1084 +msgid "%s: version count (%ld) does not match symbol count (%ld)" +msgstr "%s: compteur de version (%ld) ne concorde pas avec le symbole du compteur (%ld)" + +#: elflink.c:432 +#, c-format +msgid "%s: Section %s is already to large to put hole of %ld bytes in" +msgstr "%s: section %s est déjà trop grande pour un faire un trou de %ld octets dans" + +#: elflink.h:1465 +#, c-format +msgid "%s: %s: invalid version %u (max %d)" +msgstr "%s: %s: version invalide %u (max %d)" + +#: elflink.h:1506 +#, c-format +msgid "%s: %s: invalid needed version %d" +msgstr "%s: %s: version requise invalide %d" + +#: elflink.h:1626 +#, c-format +msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s" +msgstr "AVERTISSEMENT: taille du symbole `%s' a changé de %lu à %lu dans %s" + +#: elflink.h:1872 +msgid "%s: warning: unexpected redefinition of `%s'" +msgstr "%s: AVERTISSEMENT: redéfinition inattendue de `%s'" + +#: elflink.h:3659 +#, c-format +msgid "warning: type and size of dynamic symbol `%s' are not defined" +msgstr "AVERTISSEMENT: type et taille du symbole dynamique `%s' ne sont pas définis" + +#: elflink.h:3931 +#, c-format +msgid "%s: undefined versioned symbol name %s" +msgstr "%s: nom symbole avec version indéfinie %s" + +#: elflink.h:5180 +#, c-format +msgid "%s: could not find output section %s for input section %s" +msgstr "%s: ne peut repérer la section de sortie %s pour la section d'entrée %s" + +#: i386linux.c:450 m68klinux.c:454 sparclinux.c:452 +#, c-format +msgid "Output file requires shared library `%s'\n" +msgstr "La sortie requiert une ilbrairie partagée `%s'\n" + +#: i386linux.c:458 m68klinux.c:462 sparclinux.c:460 +#, c-format +msgid "Output file requires shared library `%s.so.%s'\n" +msgstr "Le fichier de sortie requiert une librairie partagée `%s.so.%s'\n" + +#: i386linux.c:646 i386linux.c:696 m68klinux.c:653 m68klinux.c:701 +#: sparclinux.c:649 sparclinux.c:699 +#, c-format +msgid "Symbol %s not defined for fixups\n" +msgstr "Symbole %s n'est pas défini pour les corrections\n" + +#: i386linux.c:720 m68klinux.c:725 sparclinux.c:723 +msgid "Warning: fixup count mismatch\n" +msgstr "AVERTISSEMENT: correction du compteur qui ne concordait pas\n" + +#: ieee.c:167 +#, c-format +msgid "%s: string too long (%d chars, max 65535)" +msgstr "%s: chaîne trop longue (%d caractères, max 65535)" + +#: ieee.c:297 +msgid "%s: unrecognized symbol `%s' flags 0x%x" +msgstr "%s: symbole non reconnue `%s' fanions 0x%x" + +#: ieee.c:793 +#, c-format +msgid "%s: unimplemented ATI record %u for symbol %u" +msgstr "%s: enregistrement ATI non implanté %u pour le symbole %u" + +#: ieee.c:818 +#, c-format +msgid "%s: unexpected ATN type %d in external part" +msgstr "%s: type ATN inattendu %d dans la partie externe" + +#: ieee.c:840 +msgid "%s: unexpected type after ATN" +msgstr "%s: type inattendu après ATN" + +#: ihex.c:259 +#, c-format +msgid "%s:%d: unexpected character `%s' in Intel Hex file\n" +msgstr "%s:%d: caractères inattendue `%s' dans le fichier Intel hexadécimal\n" + +#: ihex.c:369 +#, c-format +msgid "%s:%d: bad checksum in Intel Hex file (expected %u, found %u)" +msgstr "%s:%d: somme de contrôle erronée dans le fichier Intel hexadécimal (attendu %u, obtenu %u)" + +#: ihex.c:421 +#, c-format +msgid "%s:%d: bad extended address record length in Intel Hex file" +msgstr "%s:%d: longueur erronée de l'enregistrement d'adresse étendue dans le fichier Intel hexadécimal" + +#: ihex.c:438 +#, c-format +msgid "%s:%d: bad extended start address length in Intel Hex file" +msgstr "%s:%d: longueur erronée d'adresse étendue de début dans le fichier Intel hexadécimal" + +#: ihex.c:455 +#, c-format +msgid "%s:%d: bad extended linear address record length in Intel Hex file" +msgstr "%s:%d: longueur erronée de l'enregistrement d'adresse étendue linéaire dans le fichier Intel hexadécimal" + +#: ihex.c:472 +#, c-format +msgid "%s:%d: bad extended linear start address length in Intel Hex file" +msgstr "%s:%d: longueur erronée d'adresse étendue linéraire de début dans le fichier Intel hexadécimal" + +#: ihex.c:489 +#, c-format +msgid "%s:%d: unrecognized ihex type %u in Intel Hex file\n" +msgstr "%s:%d: type ihex non reconnu %u dans le fichier Intel hexadécimal\n" + +#: ihex.c:609 +#, c-format +msgid "%s: internal error in ihex_read_section" +msgstr "%s: erreur interne dans ihex_read_section" + +#: ihex.c:644 +#, c-format +msgid "%s: bad section length in ihex_read_section" +msgstr "%s: longuer erronée de section dans ihex_read_section" + +#: ihex.c:858 +#, c-format +msgid "%s: address 0x%s out of range for Intex Hex file" +msgstr "%s: adresse 0x%s hors gamme pour le fichier Intel hexadécimal" + +#: libbfd.c:471 +#, c-format +msgid "not mapping: data=%lx mapped=%d\n" +msgstr "pas de table de projection: données=%lx adresse de la table=%d\n" + +#: libbfd.c:474 +msgid "not mapping: env var not set\n" +msgstr "pas de table de projection: variable d'environnement pas initialisée\n" + +#: libbfd.c:1370 +#, c-format +msgid "%s: compiled for a big endian system and target is little endian" +msgstr "" +"%s: compilé pour un système à octets de poids fort alors que la cible\n" +"est un système à octets de poids faible" + +#: libbfd.c:1372 +#, c-format +msgid "%s: compiled for a little endian system and target is big endian" +msgstr "" +"%s: compilé pour un système à octets de poids faible alors que la cible\n" +"est un système à octets de poids fort" + +#: linker.c:2678 +#, c-format +msgid "Attempt to do relocateable link with %s input and %s output" +msgstr "Tentative de relocalisation d'un lien avec %s à l'entrée et %s à la sortie" + +#: oasys.c:1016 +msgid "%s: can not represent section `%s' in oasys" +msgstr "%s: ne peut représenter la section `%s' dans oasis" + +#: osf-core.c:146 +#, c-format +msgid "Unhandled OSF/1 core file section type %d\n" +msgstr "Type de section de fichier core OSF/1 non traité %d\n" + +#. XXX code yet to be written. +#: peicode.h:807 +#, c-format +msgid "%s: Unhandled import type; %x" +msgstr "%s: type d'importation non traitée; %x" + +#: peicode.h:812 +msgid "%s: Unrecognised import type; %x" +msgstr "%s: type d'importation non reconnu; %x" + +#: peicode.h:826 +msgid "%s: Unrecognised import name type; %x" +msgstr "%s: type de nom d'importation non reconnu: %x" + +#: peicode.h:1183 +#, c-format +msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive" +msgstr "%s: type de machine non reconnue (0x%x) dans l'archive de librairie d'importation" + +#: peicode.h:1195 +#, c-format +msgid "%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive" +msgstr "%s: type de machine reconnue mais non traitée (0x%x) dans l'archive da la librairie de formats d'importation" + +#: peicode.h:1212 +#, c-format +msgid "%s: size field is zero in Import Library Format header" +msgstr "%s: taille du champ est zéro dans l'en-tête de la librairie de formats d'importation" + +#: peicode.h:1240 +#, c-format +msgid "%s: string not null terminated in ILF object file." +msgstr "%s: chaîne n'est pas terminée par un nulle dans le fichier objet ILF." + +#: peigen.c:993 +#, c-format +msgid "%s: line number overflow: 0x%lx > 0xffff" +msgstr "%s: débordement du nombre de lignes: 0x%lx > 0xffff" + +#: peigen.c:1011 +#, c-format +msgid "%s: reloc overflow 1: 0x%lx > 0xffff" +msgstr "%s: débordement de la relocalisation 1: 0x%lx > 0xffff" + +#: peigen.c:1024 +msgid "Export Directory [.edata (or where ever we found it)]" +msgstr "Répertoire d'exportation [.edata (ou là où il a été repéré)]" + +#: peigen.c:1025 +msgid "Import Directory [parts of .idata]" +msgstr "Répertoire d'importation [faisant partie de .idata]" + +#: peigen.c:1026 +msgid "Resource Directory [.rsrc]" +msgstr "Répertoire des resources [.rsrc]" + +#: peigen.c:1027 +msgid "Exception Directory [.pdata]" +msgstr "Répertoire des exceptions [.pdata]" + +#: peigen.c:1028 +msgid "Security Directory" +msgstr "Répertoire de la sécurité" + +#: peigen.c:1029 +msgid "Base Relocation Directory [.reloc]" +msgstr "Répertoire de base de relocalisation [.reloc]" + +#: peigen.c:1030 +msgid "Debug Directory" +msgstr "Répertoire de débug" + +#: peigen.c:1031 +msgid "Description Directory" +msgstr "Répertoire de description" + +#: peigen.c:1032 +msgid "Special Directory" +msgstr "Répertoire spécial" + +#: peigen.c:1033 MRO +msgid "Thread Storage Directory [.tls]" +msgstr "Répertoire des files de stockage [.tls]" + +#: peigen.c:1034 +msgid "Load Configuration Directory" +msgstr "Répertoire de chargement de configuration" + +#: peigen.c:1035 +msgid "Bound Import Directory" +msgstr "Répertoire des importations limitées" + +#: peigen.c:1036 +msgid "Import Address Table Directory" +msgstr "Répertoire de la table d'adresse d'importation" + +#: peigen.c:1037 +msgid "Delay Import Directory" +msgstr "Répertoire des délais d'importation" + +#: peigen.c:1038 peigen.c:1039 +msgid "Reserved" +msgstr "Réservé" + +#: peigen.c:1103 +msgid "\nThere is an import table, but the section containing it could not be found\n" +msgstr "\nIl y a une table d'importation, mais la section la contenant ne peut être repérée\n" + +#: peigen.c:1108 +#, c-format +msgid "\nThere is an import table in %s at 0x%lx\n" +msgstr "\nIl y a une table d'importation dans %s à 0x%lx\n" + +#: peigen.c:1147 +#, c-format +msgid "\nFunction descriptor located at the start address: %04lx\n" +msgstr "\nDescripteur de fonction localisé à l'adresse de départ: %04lx\n" + +#: peigen.c:1150 +#, c-format +msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n" +msgstr "\tcode-base %08lx tab. des entrées (chargeable/actuel) %08lx/%08lx\n" + +#: peigen.c:1156 +msgid "\nNo reldata section! Function descriptor not decoded.\n" +msgstr "\nPas de section reldata! Descripteur de fonction n'a pas été décodé.\n" + +#: peigen.c:1161 +#, c-format +msgid "\nThe Import Tables (interpreted %s section contents)\n" +msgstr "\nLes tables d'importation (contenus interprétés de la section %s)\n" + +#: peigen.c:1164 MRO +msgid " vma: Hint Time Forward DLL First\n" +msgstr " vma: Hint Heure Forward DLL Premier\n" + +#: peigen.c:1166 MRO +msgid " Table Stamp Chain Name Thunk\n" +msgstr " Table Tampon Chaîne Nom Thunk\n" + +#: peigen.c:1216 +msgid "\n\tDLL Name: %s\n" +msgstr "\n\tNom DLL: %s\n" + +#: peigen.c:1220 peigen.c:1283 MRO +msgid "\tvma: Hint/Ord Member-Name\n" +msgstr "\tvma: Hint/Nom-de-membre nombre ordinal\n" + +#: peigen.c:1282 +msgid "\tThe Import Address Table (difference found)\n" +msgstr "\tL'adresse de la table d'importation (différence détectée)\n" + +#: peigen.c:1289 +msgid "\t>>> Ran out of IAT members!\n" +msgstr "\t>>> membres IAT tous utilisés!\n" + +#: peigen.c:1308 +msgid "\tThe Import Address Table is identical\n" +msgstr "\tL'adresse de la table d'importation est identique\n" + +#: peigen.c:1381 +msgid "\nThere is an export table, but the section containing it could not be found\n" +msgstr "\nIl y a une table d'exportation, mais la section la contenant n'a pu être repérée\n" + +#: peigen.c:1386 +#, c-format +msgid "\nThere is an export table in %s at 0x%lx\n" +msgstr "\nIl y a une table d'exportation dans %s à 0x%lx\n" + +#: peigen.c:1417 +#, c-format +msgid "\nThe Export Tables (interpreted %s section contents)\n\n" +msgstr "\nLes tables d'exportation (contenus interprétés de la section %s)\n\n" + +#: peigen.c:1421 +#, c-format +msgid "Export Flags \t\t\t%lx\n" +msgstr "Fanion d'exportation \t\t\t%lx\n" + +#: peigen.c:1424 +#, c-format +msgid "Time/Date stamp \t\t%lx\n" +msgstr "Tampon Heure/Date \t\t%lx\n" + +#: peigen.c:1427 +#, c-format +msgid "Major/Minor \t\t\t%d/%d\n" +msgstr "Majeur/Mineur \t\t\t%d/%d\n" + +#: peigen.c:1430 +msgid "Name \t\t\t\t" +msgstr "Nom \t\t\t\t" + +#: peigen.c:1436 +#, c-format +msgid "Ordinal Base \t\t\t%ld\n" +msgstr "base de nombre ordinal \t\t\t%ld\n" + +#: peigen.c:1439 +msgid "Number in:\n" +msgstr "Numéro dans:\n" + +#: peigen.c:1442 +#, c-format +msgid "\tExport Address Table \t\t%08lx\n" +msgstr "\tTable d'adresses d'exportation \t\t%08lx\n" + +#: peigen.c:1446 +#, c-format +msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n" +msgstr "\tTable de noms [Pointeur/Nombre ordinal]\t%08lx\n" + +#: peigen.c:1449 +msgid "Table Addresses\n" +msgstr "Table d'adresses\n" + +#: peigen.c:1452 +msgid "\tExport Address Table \t\t" +msgstr "\tTable d'adresse d'exportation \t\t" + +#: peigen.c:1457 +msgid "\tName Pointer Table \t\t" +msgstr "\tTable des noms de pointeurs \t\t" + +#: peigen.c:1462 +msgid "\tOrdinal Table \t\t\t" +msgstr "\tTable des ordinals \t\t\t" + +#: peigen.c:1476 +#, c-format +msgid "\nExport Address Table -- Ordinal Base %ld\n" +msgstr "\nTable d'adresses d'exportation -- base de nombre ordinal %ld\n" + +#: peigen.c:1495 +msgid "Forwarder RVA" +msgstr "Adresseur RVA" + +#: peigen.c:1506 +msgid "Export RVA" +msgstr "Exportation RVA" + +#: peigen.c:1513 +msgid "\n[Ordinal/Name Pointer] Table\n" +msgstr "\nTable [Ordinal/Nom de pointeurs]\n" + +#: peigen.c:1568 +#, c-format +msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n" +msgstr "AVERTISSEMENT, taille de la section .pdata (%ld) n'est pas un multiple de %d\n" + +#: peigen.c:1572 +msgid "\nThe Function Table (interpreted .pdata section contents)\n" +msgstr "\nLa table de fonctions (interprétation du contenu de la section .pdata)\n" + +#: peigen.c:1575 +msgid " vma:\t\t\tBegin Address End Address Unwind Info\n" +msgstr " vma:\t\t\tDébut Adresse Fin Adresse Unwind Info\n" + +#: peigen.c:1578 +msgid " vma:\t\tBegin End EH EH PrologEnd Exception\n" +msgstr " vma:\t\tDébut Fin EH EH FinProlog Exception\n" + +#: peigen.c:1580 +msgid " \t\tAddress Address Handler Data Address Mask\n" +msgstr " \t\tAdresse Adresse Routine Données Adresse Masque\n" + +#: peigen.c:1652 +msgid " Register save millicode" +msgstr " Registre a préservé le millicode" + +#: peigen.c:1655 +msgid " Register restore millicode" +msgstr " Registre a restauré le millicode" + +#: peigen.c:1658 +msgid " Glue code sequence" +msgstr " Séquence du code de liants" + +#: peigen.c:1709 +msgid "\n\nPE File Base Relocations (interpreted .reloc section contents)\n" +msgstr "\n\nFichier de base des relocalisation PE (contenus interprétés de la section .reloc)\n" + +#: peigen.c:1744 +#, c-format +msgid "\nVirtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n" +msgstr "\nAdresse virtuelle: %08lx taille des morceaux %ld (0x%lx) nombre de correctifs %ld\n" + +#: peigen.c:1757 +#, c-format +msgid "\treloc %4d offset %4x [%4lx] %s" +msgstr "\trelocalisation %4d décalage %4x [%4lx] %s" + +#. The MS dumpbin program reportedly ands with 0xff0f before +#. printing the characteristics field. Not sure why. No reason to +#. emulate it here. +#: peigen.c:1796 +#, c-format +msgid "\nCharacteristics 0x%x\n" +msgstr "\nCaractéristiques 0x%x\n" + +#: pe-mips.c:653 +#, c-format +msgid "%s: `ld -r' not supported with PE MIPS objects\n" +msgstr "%s: `ld -r' non supporté avec les objets PE MIPS\n" + +#. OK, at this point the following variables are set up: +#. src = VMA of the memory we're fixing up +#. mem = pointer to memory we're fixing up +#. val = VMA of what we need to refer to +#. +#: pe-mips.c:789 +msgid "%s: unimplemented %s\n" +msgstr "%s: non implanté %s\n" + +#: pe-mips.c:815 +#, c-format +msgid "%s: jump too far away\n" +msgstr "%s: le saut va trop loin\n" + +#: pe-mips.c:842 +#, c-format +msgid "%s: bad pair/reflo after refhi\n" +msgstr "%s: pairage erronée pair/reflo après refhi\n" + +#: ppcboot.c:422 +msgid "\nppcboot header:\n" +msgstr "\nEn-têtes ppcboot:\n" + +#: ppcboot.c:423 +#, c-format +msgid "Entry offset = 0x%.8lx (%ld)\n" +msgstr "Décalage de l'entrée= 0x%.8lx (%ld)\n" + +#: ppcboot.c:424 +msgid "Length = 0x%.8lx (%ld)\n" +msgstr "Longueur = 0x%.8lx (%ld)\n" + +#: ppcboot.c:427 +#, c-format +msgid "Flag field = 0x%.2x\n" +msgstr "Champ de fanion = 0x%.2x\n" + +#: ppcboot.c:433 +#, c-format +msgid "Partition name = \"%s\"\n" +msgstr "Nom de partition = \"%s\"\n" + +#: ppcboot.c:452 +#, c-format +msgid "\nPartition[%d] start = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" +msgstr "\nDébut de partition[%d] = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" + +#: ppcboot.c:458 +#, c-format +msgid "Partition[%d] end = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" +msgstr "Fin de la partition[%d] = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" + +#: ppcboot.c:464 +#, c-format +msgid "Partition[%d] sector = 0x%.8lx (%ld)\n" +msgstr "Secteur de la partition[%d] = 0x%.8lx (%ld)\n" + +#: ppcboot.c:465 +#, c-format +msgid "Partition[%d] length = 0x%.8lx (%ld)\n" +msgstr "Longueur de la partition[%d] = 0x%.8lx (%ld)\n" + +#: som.c:5355 +msgid "som_sizeof_headers unimplemented" +msgstr "som_sizeof_headers non implanté" + +#: srec.c:300 +#, c-format +msgid "%s:%d: Unexpected character `%s' in S-record file\n" +msgstr "%s:%d: caractère inattendue `%s' dans le fichier S-record\n" + +#: syms.c:968 +msgid "Unsupported .stab relocation" +msgstr "Relocalisation du .stab non supporté" + +#: vms-gsd.c:354 +msgid "bfd_make_section (%s) failed" +msgstr "Échec de bfd_make_section (%s)" + +#: vms-gsd.c:368 +#, c-format +msgid "bfd_set_section_flags (%s, %x) failed" +msgstr "bfd_set_section_flags (%s, %x) a échoué" + +#: vms-gsd.c:404 +#, c-format +msgid "Size mismatch section %s=%lx, %s=%lx" +msgstr "Taille de section ne concorde pas %s=%lx, %s=%lx" + +#: vms-gsd.c:699 +msgid "unknown gsd/egsd subtype %d" +msgstr "sous type gsd/egsd inconnu %d" + +#: vms-hdr.c:403 +msgid "Object module NOT error-free !\n" +msgstr "Module objet N'EST PAS sans erreur !\n" + +#: vms-misc.c:539 +#, c-format +msgid "Stack overflow (%d) in _bfd_vms_push" +msgstr "Débordement de la pile (%d) dans _bfd_vms_push" + +#: vms-misc.c:557 +msgid "Stack underflow in _bfd_vms_pop" +msgstr "Sous dépilage de la pile dans _bfd_vms_pop" + +#: vms-misc.c:915 +msgid "_bfd_vms_output_counted called with zero bytes" +msgstr "_bfd_vms_output_counted appelé avec un compte de zéro octet" + +#: vms-misc.c:920 +msgid "_bfd_vms_output_counted called with too many bytes" +msgstr "_bfd_vms_output_counted appelé avec trop d'octets" + +#: vms-misc.c:1051 +#, c-format +msgid "Symbol %s replaced by %s\n" +msgstr "Symbole %s remplacé par %s\n" + +#: vms-misc.c:1113 +msgid "failed to enter %s" +msgstr "échec d'insertion de %s" + +#: vms-tir.c:68 +msgid "No Mem !" +msgstr "Mémoire épuisée!" + +#: vms-tir.c:302 +msgid "Bad section index in ETIR_S_C_STA_PQ" +msgstr "Index de section erronée dans ETIR_S_C_STA_PQ" + +#: vms-tir.c:317 +msgid "Unsupported STA cmd %d" +msgstr "Commande STA non supportée %d" + +#: vms-tir.c:322 vms-tir.c:1274 +#, c-format +msgid "Reserved STA cmd %d" +msgstr "Commande STA réservée %d" + +#: vms-tir.c:428 +#, c-format +msgid "ETIR_S_C_STO_GBL: no symbol \"%s\"" +msgstr "ETIR_S_C_STO_GBL: pas de symbole \"%s\"" + +#: vms-tir.c:449 +#, c-format +msgid "ETIR_S_C_STO_CA: no symbol \"%s\"" +msgstr "ETIR_S_C_STO_CA: pas de symbole \"%s\"" + +#: vms-tir.c:462 +msgid "ETIR_S_C_STO_RB/AB: Not supported" +msgstr "ETIR_S_C_STO_RB/AB: non supporté" + +#: vms-tir.c:520 +msgid "ETIR_S_C_STO_LP_PSB: Not supported" +msgstr "ETIR_S_C_STO_LP_PSB: non supporté" + +#: vms-tir.c:526 +msgid "ETIR_S_C_STO_HINT_GBL: not implemented" +msgstr "ETIR_S_C_STO_HINT_GBL: pas implanté" + +#: vms-tir.c:532 +msgid "ETIR_S_C_STO_HINT_PS: not implemented" +msgstr "ETIR_S_C_STO_HINT_PS: pas implanté" + +#: vms-tir.c:536 vms-tir.c:1446 +#, c-format +msgid "Reserved STO cmd %d" +msgstr "Commande STO réservée %d" + +#: vms-tir.c:649 +msgid "ETIR_S_C_OPR_INSV: Not supported" +msgstr "ETIR_S_C_OPR_INSV: non supporté" + +#: vms-tir.c:667 +msgid "ETIR_S_C_OPR_USH: Not supported" +msgstr "ETIR_S_C_OPR_USH: non supporté" + +#: vms-tir.c:673 +msgid "ETIR_S_C_OPR_ROT: Not supported" +msgstr "ETIR_S_C_OPR_ROT: non supporté" + +#: vms-tir.c:692 +msgid "ETIR_S_C_OPR_REDEF: Not supported" +msgstr "ETIR_S_C_OPR_REDEF: non supporté" + +#: vms-tir.c:698 +msgid "ETIR_S_C_OPR_DFLIT: Not supported" +msgstr "ETIR_S_C_OPR_DFLIT: non supporté" + +#: vms-tir.c:702 vms-tir.c:1641 +#, c-format +msgid "Reserved OPR cmd %d" +msgstr "Commande OPR réservée %d" + +#: vms-tir.c:770 vms-tir.c:1710 +#, c-format +msgid "Reserved CTL cmd %d" +msgstr "Commande CTL réservée %d" + +#: vms-tir.c:798 +msgid "ETIR_S_C_STC_LP: not supported" +msgstr "ETIR_S_C_STC_LP: non supporté" + +#: vms-tir.c:816 +msgid "ETIR_S_C_STC_GBL: not supported" +msgstr "ETIR_S_C_STC_GBL: non supporté" + +#: vms-tir.c:824 +msgid "ETIR_S_C_STC_GCA: not supported" +msgstr "ETIR_S_C_STC_GCA: non supporté" + +#: vms-tir.c:833 +msgid "ETIR_S_C_STC_PS: not supported" +msgstr "ETIR_S_C_STC_PS: non supporté" + +#. +#. * stack byte from image +#. * arg: - +#. * +#. +#: vms-tir.c:1174 +msgid "Stack-from-image not implemented" +msgstr "Stack-from-image non implanté" + +#: vms-tir.c:1194 +msgid "Stack-entry-mask not fully implemented" +msgstr "Stack-entry-mask pas complètement implanté" + +#. +#. * compare procedure argument +#. * arg: cs symbol name +#. * by argument index +#. * da argument descriptor +#. * +#. * compare argument descriptor with symbol argument (ARG$V_PASSMECH) +#. * and stack TRUE (args match) or FALSE (args dont match) value +#. +#: vms-tir.c:1210 +msgid "PASSMECH not fully implemented" +msgstr "PASSMECH pas complètement implanté" + +#: vms-tir.c:1230 +msgid "Stack-local-symbol not fully implemented" +msgstr "Stack-local-symbol pas complètement implanté" + +#: vms-tir.c:1245 +msgid "Stack-literal not fully implemented" +msgstr "Stack-literal pas complètement implanté" + +#: vms-tir.c:1267 +msgid "Stack-local-symbol-entry-point-mask not fully implemented" +msgstr "Stack-local-symbol-entry-point-mask pas complètement implanté" + +#: vms-tir.c:1442 +#, c-format +msgid "Unimplemented STO cmd %d" +msgstr "Commande STO non implantée %d" + +#: vms-tir.c:1581 +msgid "TIR_S_C_OPR_ASH incomplete" +msgstr "TIR_S_C_OPR_ASH incomplète" + +#: vms-tir.c:1595 +msgid "TIR_S_C_OPR_USH incomplete" +msgstr "TIR_S_C_OPR_USH incomplète" + +#: vms-tir.c:1609 +msgid "TIR_S_C_OPR_ROT incomplete" +msgstr "TIR_S_C_OPR_ROT incomplète" + +#. +#. * redefine symbol to current location +#. +#: vms-tir.c:1630 +msgid "TIR_S_C_OPR_REDEF not supported" +msgstr "TIR_S_C_OPR_REDEF non supporté" + +#. +#. * define a literal +#. +#: vms-tir.c:1637 +msgid "TIR_S_C_OPR_DFLIT not supported" +msgstr "TIR_S_C_OPR_DFLIT non supporté" + +#: vms-tir.c:1691 +msgid "TIR_S_C_CTL_DFLOC not fully implemented" +msgstr "TIR_S_C_CTL_DFLOC pas complètement implanté" + +#: vms-tir.c:1699 +msgid "TIR_S_C_CTL_STLOC not fully implemented" +msgstr "TIR_S_C_CTL_STLOC pas complètement implanté" + +#: vms-tir.c:1707 +msgid "TIR_S_C_CTL_STKDL not fully implemented" +msgstr "TIR_S_C_CTL_STKDL n'est pas complètement implanté" + +#: vms-tir.c:1761 +msgid "Obj code %d not found" +msgstr "Code objet %d non repéré" + +#: vms-tir.c:2102 +#, c-format +msgid "SEC_RELOC with no relocs in section %s" +msgstr "SEC_RELOC sans relocalisation dans la section %s" + +#: vms-tir.c:2376 +msgid "Unhandled relocation %s" +msgstr "Relocalisation non traitée: %s" + +#: xcofflink.c:1634 +#, c-format +msgid "%s: `%s' has line numbers but no enclosing section" +msgstr "%s: `%s' contient des numéros de lignes mais de section de fermeture" + +#: xcofflink.c:1686 +#, c-format +msgid "%s: class %d symbol `%s' has no aux entries" +msgstr "%s: classe %d symbole `%s' n'a pas d'entrée auxiliaire" + +#: xcofflink.c:1709 +#, c-format +msgid "%s: symbol `%s' has unrecognized csect type %d" +msgstr "%s: symbole `%s' a un type csect non reconnu %d" + +#: xcofflink.c:1721 +#, c-format +msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d" +msgstr "%s: symbole XTY_ER erroné `%s': classe %d scnum %d scnlen %d" + +#: xcofflink.c:1760 +#, c-format +msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d" +msgstr "%s: XMC_TC0 symbol `%s' est la classe %d scnlen %d" + +#: xcofflink.c:1883 +#, c-format +msgid "%s: symbol `%s' has unrecognized smclas %d" +msgstr "%s: symbole `%s' a une classe smclas non reconnue %d" + +#: xcofflink.c:1902 +msgid "%s: csect `%s' not in enclosing section" +msgstr "%s: csect `%s' n'est pas dans un section fermée" + +#: xcofflink.c:2006 +#, c-format +msgid "%s: misplaced XTY_LD `%s'" +msgstr "%s: XTY_LD mal placé `%s'" + +#: xcofflink.c:2317 +#, c-format +msgid "%s: reloc %s:%d not in csect" +msgstr "%s: relocalisation %s:%d n'est pas dans csect" + +#: xcofflink.c:2452 +#, c-format +msgid "%s: XCOFF shared object when not producing XCOFF output" +msgstr "%s: objet XCOFF partagé sans être en production de sortie XCOFF" + +#: xcofflink.c:2473 +#, c-format +msgid "%s: dynamic object with no .loader section" +msgstr "%s: objet dynamique sans section .loader" + +#: xcofflink.c:3113 +msgid "%s: no such symbol" +msgstr "%s: pas de tel symbole" + +#: xcofflink.c:3704 +#, c-format +msgid "warning: attempt to export undefined symbol `%s'" +msgstr "AVERTISSEMENT: tentative d'exportation d'un symbole indéfini `%s'" + +#: xcofflink.c:4698 +#, c-format +msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling" +msgstr "Débordement de la table des entrées: 0x%lx > 0x10000; essayer l'option -mminimal-toc" + +#: xcofflink.c:5523 xcofflink.c:5879 xcofflink.c:5916 xcofflink.c:6233 +msgid "%s: loader reloc in unrecognized section `%s'" +msgstr "%s: chargeur de relocalisation dans une section non reconnnue `%s'" + +#: xcofflink.c:5545 xcofflink.c:6244 +#, c-format +msgid "%s: `%s' in loader reloc but not loader sym" +msgstr "%s: `%s' est dans le chargeur de relocalisation mais pas dans celui des symboles" + +#: xcofflink.c:5560 +msgid "%s: loader reloc in read-only section %s" +msgstr "%s: chargeur de relocalisation dans un section en lecture seulement %s" + +#: xcofflink.c:6440 +msgid "%s: unsupported relocation type 0x%02x" +msgstr "%s: type de relocalisation non supporté 0x%02x" + +#: xcofflink.c:6486 +#, c-format +msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry" +msgstr "%s: table des matières des relocalisation à 0x%x pour les symboles `%s' sans aucune entrée dans la table des matières" diff -uprN binutils-2.11.92.0.10/bfd/reloc.c binutils-2.11.92.0.12/bfd/reloc.c --- binutils-2.11.92.0.10/bfd/reloc.c Mon Oct 1 15:25:21 2001 +++ binutils-2.11.92.0.12/bfd/reloc.c Fri Nov 16 14:05:51 2001 @@ -2723,6 +2723,78 @@ ENUMDOC Motorola Mcore relocations. ENUM + BFD_RELOC_MMIX_GETA +ENUMX + BFD_RELOC_MMIX_GETA_1 +ENUMX + BFD_RELOC_MMIX_GETA_2 +ENUMX + BFD_RELOC_MMIX_GETA_3 +ENUMDOC + These are relocations for the GETA instruction. +ENUM + BFD_RELOC_MMIX_CBRANCH +ENUMX + BFD_RELOC_MMIX_CBRANCH_J +ENUMX + BFD_RELOC_MMIX_CBRANCH_1 +ENUMX + BFD_RELOC_MMIX_CBRANCH_2 +ENUMX + BFD_RELOC_MMIX_CBRANCH_3 +ENUMDOC + These are relocations for a conditional branch instruction. +ENUM + BFD_RELOC_MMIX_PUSHJ +ENUMX + BFD_RELOC_MMIX_PUSHJ_1 +ENUMX + BFD_RELOC_MMIX_PUSHJ_2 +ENUMX + BFD_RELOC_MMIX_PUSHJ_3 +ENUMDOC + These are relocations for the PUSHJ instruction. +ENUM + BFD_RELOC_MMIX_JMP +ENUMX + BFD_RELOC_MMIX_JMP_1 +ENUMX + BFD_RELOC_MMIX_JMP_2 +ENUMX + BFD_RELOC_MMIX_JMP_3 +ENUMDOC + These are relocations for the JMP instruction. +ENUM + BFD_RELOC_MMIX_ADDR19 +ENUMDOC + This is a relocation for a relative address as in a GETA instruction or + a branch. +ENUM + BFD_RELOC_MMIX_ADDR27 +ENUMDOC + This is a relocation for a relative address as in a JMP instruction. +ENUM + BFD_RELOC_MMIX_REG_OR_BYTE +ENUMDOC + This is a relocation for an instruction field that may be a general + register or a value 0..255. +ENUM + BFD_RELOC_MMIX_REG +ENUMDOC + This is a relocation for an instruction field that may be a general + register. +ENUM + BFD_RELOC_MMIX_BASE_PLUS_OFFSET +ENUMDOC + This is a relocation for two instruction fields holding a register and + an offset, the equivalent of the relocation. +ENUM + BFD_RELOC_MMIX_LOCAL +ENUMDOC + This relocation is an assertion that the expression is not allocated as + a global register. It does not modify contents. + +ENUM BFD_RELOC_AVR_7_PCREL ENUMDOC This is a 16 bit reloc for the AVR that stores 8 bit pc relative diff -uprN binutils-2.11.92.0.10/bfd/section.c binutils-2.11.92.0.12/bfd/section.c --- binutils-2.11.92.0.10/bfd/section.c Fri Oct 19 23:57:48 2001 +++ binutils-2.11.92.0.12/bfd/section.c Wed Nov 21 15:35:32 2001 @@ -544,6 +544,12 @@ CODE_FRAGMENT .#define bfd_ind_section_ptr ((asection *) &bfd_ind_section) .#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) . +.#define bfd_is_const_section(SEC) \ +. ( ((SEC) == bfd_abs_section_ptr) \ +. || ((SEC) == bfd_und_section_ptr) \ +. || ((SEC) == bfd_com_section_ptr) \ +. || ((SEC) == bfd_ind_section_ptr)) +. .extern const struct symbol_cache_entry * const bfd_abs_symbol; .extern const struct symbol_cache_entry * const bfd_com_symbol; .extern const struct symbol_cache_entry * const bfd_und_symbol; @@ -796,8 +802,8 @@ bfd_make_section_anyway (abfd, name) return NULL; newsect->name = name; - newsect->id = section_id++; - newsect->index = abfd->section_count++; + newsect->id = section_id; + newsect->index = abfd->section_count; newsect->flags = SEC_NO_FLAGS; newsect->userdata = NULL; @@ -831,6 +837,8 @@ bfd_make_section_anyway (abfd, name) return NULL; } + section_id++; + abfd->section_count++; *prev = newsect; return newsect; } diff -uprN binutils-2.11.92.0.10/bfd/som.c binutils-2.11.92.0.12/bfd/som.c --- binutils-2.11.92.0.10/bfd/som.c Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/bfd/som.c Fri Nov 16 14:05:51 2001 @@ -1851,7 +1851,8 @@ setup_sections (abfd, file_hdr, current_ char *space_strings; unsigned int space_index, i; unsigned int total_subspaces = 0; - asection **subspace_sections, *section; + asection **subspace_sections = NULL; + asection *section; bfd_size_type amt; /* First, read in space names. */ diff -uprN binutils-2.11.92.0.10/bfd/stabs.c binutils-2.11.92.0.12/bfd/stabs.c --- binutils-2.11.92.0.10/bfd/stabs.c Mon Oct 1 15:25:21 2001 +++ binutils-2.11.92.0.12/bfd/stabs.c Fri Nov 16 14:05:51 2001 @@ -502,6 +502,176 @@ _bfd_link_section_stabs (abfd, psinfo, s return false; } + +/* This function is called for each input file before the stab + section is relocated. It discards stab entries for discarded + functions and variables. The function returns true iff + any entries have been deleted. +*/ + +boolean +_bfd_discard_section_stabs (abfd, stabsec, psecinfo, + reloc_symbol_deleted_p, cookie) + bfd *abfd; + asection *stabsec; + PTR psecinfo; + boolean (*reloc_symbol_deleted_p) (bfd_vma, PTR); + PTR cookie; +{ + bfd_size_type count, amt; + struct stab_section_info *secinfo; + bfd_byte *stabbuf = NULL; + bfd_byte *sym, *symend; + bfd_size_type skip; + bfd_size_type *pstridx; + int deleting; + + if (stabsec->_raw_size == 0) + { + /* This file does not contain stabs debugging information. */ + return false; + } + + if (stabsec->_raw_size % STABSIZE != 0) + { + /* Something is wrong with the format of these stab symbols. + Don't try to optimize them. */ + return false; + } + + if ((stabsec->output_section != NULL + && bfd_is_abs_section (stabsec->output_section))) + { + /* At least one of the sections is being discarded from the + link, so we should just ignore them. */ + return false; + } + + /* We should have initialized our data in _bfd_link_stab_sections. + If there was some bizarre error reading the string sections, though, + we might not have. Bail rather than asserting. */ + if (psecinfo == NULL) + return false; + + count = stabsec->_raw_size / STABSIZE; + secinfo = (struct stab_section_info *) psecinfo; + + /* Read the stabs information from abfd. */ + + stabbuf = (bfd_byte *) bfd_malloc (stabsec->_raw_size); + if (stabbuf == NULL) + goto error_return; + + if (! bfd_get_section_contents (abfd, stabsec, stabbuf, (bfd_vma) 0, + stabsec->_raw_size)) + goto error_return; + + /* Look through the stabs symbols and discard any information for + discarded functions. */ + + skip = 0; + deleting = -1; + + symend = stabbuf + stabsec->_raw_size; + for (sym = stabbuf, pstridx = secinfo->stridxs; + sym < symend; + sym += STABSIZE, ++pstridx) + { + int type; + + if (*pstridx == (bfd_size_type) -1) + { + /* This stab was deleted in a previous pass. */ + continue; + } + + type = sym[TYPEOFF]; + + if (type == N_FUN) + { + int strx = bfd_get_32 (abfd, sym + STRDXOFF); + + if (strx == 0) + { + if (deleting) + { + skip++; + *pstridx = -1; + } + deleting = -1; + continue; + } + deleting = 0; + if ((*reloc_symbol_deleted_p) (sym + VALOFF - stabbuf, cookie)) + deleting = 1; + } + + if (deleting == 1) + { + *pstridx = -1; + skip++; + } + else if (deleting == -1) + { + /* Outside of a function. Check for deleted variables. */ + if (type == N_STSYM || type == N_LCSYM) + if ((*reloc_symbol_deleted_p) (sym + VALOFF - stabbuf, cookie)) + { + *pstridx = -1; + skip ++; + } + /* We should also check for N_GSYM entries which reference a + deleted global, but those are less harmful to debuggers + and would require parsing the stab strings. */ + } + } + + free (stabbuf); + stabbuf = NULL; + + /* Shrink the stabsec as needed. */ + stabsec->_cooked_size -= skip * STABSIZE; + if (stabsec->_cooked_size == 0) + stabsec->flags |= SEC_EXCLUDE; + + /* Recalculate the `cumulative_skips' array now that stabs have been + deleted for this section. */ + + if (skip != 0) + { + bfd_size_type i, offset; + bfd_size_type *pskips; + + if (secinfo->cumulative_skips == NULL) + { + amt = count * sizeof (bfd_size_type); + secinfo->cumulative_skips = (bfd_size_type *) bfd_alloc (abfd, amt); + if (secinfo->cumulative_skips == NULL) + goto error_return; + } + + pskips = secinfo->cumulative_skips; + pstridx = secinfo->stridxs; + offset = 0; + + for (i = 0; i < count; i++, pskips++, pstridx++) + { + *pskips = offset; + if (*pstridx == (bfd_size_type) -1) + offset += STABSIZE; + } + + BFD_ASSERT (offset != 0); + } + + return (skip > 0); + + error_return: + if (stabbuf != NULL) + free (stabbuf); + return false; +} + /* Write out the stab section. This is called with the relocated contents. */ diff -uprN binutils-2.11.92.0.10/bfd/targets.c binutils-2.11.92.0.12/bfd/targets.c --- binutils-2.11.92.0.10/bfd/targets.c Thu Oct 4 14:35:43 2001 +++ binutils-2.11.92.0.12/bfd/targets.c Fri Nov 16 14:05:51 2001 @@ -153,7 +153,8 @@ DESCRIPTION . bfd_target_versados_flavour, . bfd_target_msdos_flavour, . bfd_target_ovax_flavour, -. bfd_target_evax_flavour +. bfd_target_evax_flavour, +. bfd_target_mmo_flavour .}; . .enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN }; @@ -564,6 +565,7 @@ extern const bfd_target bfd_elf64_ia64_b extern const bfd_target bfd_elf64_ia64_little_vec; extern const bfd_target bfd_elf64_little_generic_vec; extern const bfd_target bfd_elf64_littlemips_vec; +extern const bfd_target bfd_elf64_mmix_vec; extern const bfd_target bfd_elf64_powerpc_vec; extern const bfd_target bfd_elf64_powerpcle_vec; extern const bfd_target bfd_elf64_s390_vec; @@ -571,6 +573,7 @@ extern const bfd_target bfd_elf64_sparc_ extern const bfd_target bfd_elf64_tradbigmips_vec; extern const bfd_target bfd_elf64_tradlittlemips_vec; extern const bfd_target bfd_elf64_x86_64_vec; +extern const bfd_target bfd_mmo_vec; extern const bfd_target bfd_powerpc_pe_vec; extern const bfd_target bfd_powerpc_pei_vec; extern const bfd_target bfd_powerpcle_pe_vec; @@ -802,6 +805,7 @@ static const bfd_target * const _bfd_tar &bfd_elf64_ia64_little_vec, &bfd_elf64_little_generic_vec, &bfd_elf64_littlemips_vec, + &bfd_elf64_mmix_vec, &bfd_elf64_powerpc_vec, &bfd_elf64_powerpcle_vec, &bfd_elf64_s390_vec, @@ -811,6 +815,7 @@ static const bfd_target * const _bfd_tar &bfd_elf64_tradbigmips_vec, &bfd_elf64_tradlittlemips_vec, &bfd_elf64_x86_64_vec, + &bfd_mmo_vec, #endif &bfd_powerpc_pe_vec, &bfd_powerpc_pei_vec, diff -uprN binutils-2.11.92.0.10/bfd/version.h binutils-2.11.92.0.12/bfd/version.h --- binutils-2.11.92.0.10/bfd/version.h Sun Oct 21 16:24:32 2001 +++ binutils-2.11.92.0.12/bfd/version.h Wed Nov 21 15:35:32 2001 @@ -1 +1 @@ -#define BFD_VERSION_DATE 20011021 +#define BFD_VERSION_DATE 20011121 diff -uprN binutils-2.11.92.0.10/bfd/vms.c binutils-2.11.92.0.12/bfd/vms.c --- binutils-2.11.92.0.10/bfd/vms.c Mon Oct 1 15:25:21 2001 +++ binutils-2.11.92.0.12/bfd/vms.c Fri Nov 16 14:05:51 2001 @@ -733,19 +733,23 @@ vms_new_section_hook (abfd, section) bfd *abfd; asection *section; { + /* Count hasn't been incremented yet. */ + unsigned int section_count = abfd->section_count + 1; + #if VMS_DEBUG - vms_debug (1, "vms_new_section_hook (%p, [%d]%s), count %d\n", abfd, section->index, section->name, abfd->section_count); + vms_debug (1, "vms_new_section_hook (%p, [%d]%s), count %d\n", + abfd, section->index, section->name, section_count); #endif - bfd_set_section_alignment(abfd, section, 4); + bfd_set_section_alignment (abfd, section, 4); - if (abfd->section_count > PRIV (section_count)) + if (section_count > PRIV (section_count)) { - bfd_size_type amt = abfd->section_count; + bfd_size_type amt = section_count; amt *= sizeof (asection *); PRIV (sections) = (asection **) bfd_realloc (PRIV (sections), amt); if (PRIV (sections) == 0) return false; - PRIV (section_count) = abfd->section_count; + PRIV (section_count) = section_count; } #if VMS_DEBUG vms_debug (6, "section_count: %d\n", PRIV (section_count)); diff -uprN binutils-2.11.92.0.10/binutils/ChangeLog binutils-2.11.92.0.12/binutils/ChangeLog --- binutils-2.11.92.0.10/binutils/ChangeLog Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/binutils/ChangeLog Wed Nov 21 15:35:32 2001 @@ -1,3 +1,123 @@ +2001-11-19 Nick Clifton + + * readelf.c (do_debug_str): New variable. + (display_debug_str): New function: Display the contents of a + .debug_str section. + (load_debug_str): New function: Load in the contents of a + .debug_str section. + (free_debug_str): New function: Free the memory used by + load_debug_str(). + (fetch_indirect_string): Retrieve a string from the .debug_str + section. + (usage): Add -ws. + (parse_args): Accept -ws. + (process_section_headers): Allow the display of the .debug_str + section. + (read_and_display_attr_value): Use fetch_indirect_string. Show + offset into .debug_str section. + (display_debug_info): Use load_debug_str and free_debug_str. + (debug_displays): Add .debug_str. + * doc/binutils.texi: Document -ws. + +2001-11-19 Andreas Jaeger + + * testsuite/binutils-all/objdump.exp: Add x86-64. + +2001-11-15 Andreas Schwab + + * readelf.c: Fix warnings without terminating newline. + +2001-11-15 Alan Modra + + * doc/binutils.texi (objdump): Document ppc -M options. + +2001-11-14 Andreas Jaeger + + * doc/binutils.texi (objdump): Fix description to use x86-64. + +2001-11-14 Nick Clifton + + * bucomm.c (make_tempname): Use mkstemps instead of mkstemp, since + not all systems provide mkstemp. + +2001-11-14 Alan Modra + + * doc/binutils.texi (objdump): Document x86 -M options. + +2001-11-13 Keith Walker + + * readelf.c (read_and_display_attr_value): New function to + handle DW_FORM_indirect. + (read_and_display_attr): Use it. + +2001-11-13 Geoffrey Keating + + * readelf.c (display_debug_lines): Deal with unknown standard + opcodes. Handle DW_LNS_set_prologue_end, DW_LNS_set_epilogue_begin, + DW_LNS_set_isa. + +2001-11-13 Timothy Wall + + * MAINTAINERS: Add self as tic54x maintainer. This target + includes the IBM C54XDSP clone. + +2001-11-12 * Steven J. Hill + + * bucomm.c (make_tempname): Use mkstemp in place of mktemp. + +2001-11-09 Jeffrey A Law (law@cygnus.com) + + * unwind-ia64.c (unw_print_brmask): Fix ISO C portability glitch. + (unw_print_grmask, unw_print_frmask, unw_print_abreg): Likewise. + (unw_print_xyreg, unw_decode_x1, unw_decode_x2): Likewise. + (unw_decode_x3, unw_decode_r1, unw_decode_r2): Likewise. + (unw_decode_r3, unw_decode_p1, unw_decode_p2_p5): Likewise. + (unw_decode_p6, unw_decode_p7_p10, unw_decode_b1): Likewise. + (unw_decode_b2, unw_decode_b3_b4): Likewise. + + * readelf.c (get_elf_class): Fix ISO portability glitch. + (get_data_encoding, get_osabi_name, request_dump): Likewise. + +2001-11-07 Jakub Jelinek + + * readelf.c (debug_str, debug_str_size): New. + (display_debug_abbrev): If no abbrevs were read, skip the CU. + Call free_abbrevs. + (read_and_display_addr): Handle DW_FORM_strp. + (display_debug_info): Read .debug_str section if present, + so that DW_FORM_strp can be handled. + Fix test for non-existant .debug_abbrev section. + +2001-11-05 Jakub Jelinek + + * arlex.l: Accept `\' in filenames. Patch by . + + * arsup.c (ar_open): Prepend tmp- to basename, not whole path. + +2001-11-05 Martin Schwidefsky + + * MAINTAINERS: Add self as s390/s390x maintainer. + +2001-11-02 Tom Rix + + * MAINTAINERS: Add self as PPC XCOFF maintainer. + +2001-11-02 Nick Clifton + + * configure.in (ALL_LINGUAS): Add "fr" and "tr". + * configure: Regernate. + * po/fr.po: New file. + * po/tr.po: New file. + +2001-10-30 Hans-Peter Nilsson + + * MAINTAINERS: Add self as MMIX port maintainer. + * readelf.c: Include elf/mmix.h. + (guess_is_rela): MMIX is RELA. + (dump_relocations): Handle MMIX relocations. + * Makefile.am: Regenerate dependencies. + * Makefile.in: Regenerate. + 2001-10-13 Nick Clifton * readelf.c (parse_args): Handle multiple options to the -w @@ -8,7 +128,7 @@ * readelf.c (get_section_type_name): Don't print SHT_ prefix for LOPROC, LOOS and LOUSER. -Thu Oct 11 21:45:17 2001 J"orn Rennecke +2001-10-11 J"orn Rennecke * MAINTAINERS: Update my email address. @@ -48,7 +168,7 @@ Thu Oct 11 21:45:17 2001 J"orn Rennecke * readelf.c (display_debug_aranges): Detect and warn about DWARF64 format .debug_arange sections. (main): Add missing prototype. - + 2001-09-30 Hans-Peter Nilsson * Makefile.am: Update dependencies with "make dep-am". @@ -180,14 +300,14 @@ Thu Oct 11 21:45:17 2001 J"orn Rennecke * doc/binutils.texi: Document new command line option. * NEWS: Announce new command line option. -Wed Sep 12 20:07:16 2001 Alexandre Oliva +2001-09-12 Alexandre Oliva * readelf.c (guess_is_rela, dump_relocations, get_machine_name, get_machine_flags): Added EM_M32R, EM_D10V, EM_V850, EM_D30V, EM_MN10200, EM_MN10300, EM_FR30, EM_AVR_OLD and EM_PJ_OLD. Removed EM_CYGNUS_ARC. -Tue Sep 4 20:26:08 2001 Jeffrey A Law (law@cygnus.com) +2001-09-04 Jeffrey A Law (law@cygnus.com) * readelf.c: Include elf/h8 for H8 series definitions. (guess_is_rela): H8 series if RELA. @@ -829,7 +949,7 @@ Tue Sep 4 20:26:08 2001 Jeffrey A Law * readelf.c: Fix formatting. -Mon Dec 11 14:30:21 MET 2000 Jan Hubicka +2000-12-11 Jan Hubicka * MAINTAINERS: Add myself and Andreas Jaeger as x86_64 maintainer. @@ -866,7 +986,7 @@ Mon Dec 11 14:30:21 MET 2000 Jan Hubick 2000-11-28 Hans-Peter Nilsson - * MAINTAINERS: Add Jörn Rennecke and self as SH maintainers. + * MAINTAINERS: Add Jörn Rennecke and self as SH maintainers. Change sourceware.cygnus.com to sources.redhat.com. Fix typo for "amongst". @@ -1362,13 +1482,13 @@ Mon Dec 11 14:30:21 MET 2000 Jan Hubick * srconv.c: Likewise. * sysdump.c: Likewise. -Sun Apr 23 14:23:26 2000 Denis Chertykov +2000-04-23 Denis Chertykov * readelf.c (guess_is_rela): AVR uses RELA relocations. (get_machine_name): machine name for EM_AVR added. -Fri Apr 21 13:20:53 2000 Richard Henderson - David Mosberger +2000-04-21 Richard Henderson + David Mosberger * Makefile.am (readelf.o): Add elf/ia64.h. * Makefile.in: Rebuild. @@ -1393,7 +1513,7 @@ Fri Apr 21 13:20:53 2000 Richard Hender `strftime' since strftime is not available on all systems. (process_mips_specific): Ditto. -Fri Apr 7 15:56:57 2000 Andrew Cagney +2000-04-07 Andrew Cagney * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add --enable-build-warnings option. diff -uprN binutils-2.11.92.0.10/binutils/ChangeLog.linux binutils-2.11.92.0.12/binutils/ChangeLog.linux --- binutils-2.11.92.0.10/binutils/ChangeLog.linux Sun Oct 21 16:24:32 2001 +++ binutils-2.11.92.0.12/binutils/ChangeLog.linux Mon Nov 26 14:26:53 2001 @@ -1,3 +1,8 @@ +2001-11-26 H.J. Lu + + * bucomm.c (make_tempname): Revert the changes made on + 2001-11-14 and 2001-11-12. They won't work with directories. + 2001-10-21 H.J. Lu * configure: Rebuid for ../libtool.m4 change. diff -uprN binutils-2.11.92.0.10/binutils/MAINTAINERS binutils-2.11.92.0.12/binutils/MAINTAINERS --- binutils-2.11.92.0.10/binutils/MAINTAINERS Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/binutils/MAINTAINERS Fri Nov 16 14:05:52 2001 @@ -68,10 +68,14 @@ responsibility among the other maintaine MN10300 Eric Christopher MIPS Eric Christopher M88k Ben Elliston + MMIX Hans-Peter Nilsson PPC Geoff Keating - SH Jörn Rennecke + PPC XCOFF Tom Rix + s390, s390x Martin Schwidefsky + SH Jörn Rennecke SH Hans-Peter Nilsson SPARC Jakub Jelinek + TIC54X Timothy Wall z8k Christian Groessler --------- CGEN Maintainers ------------- diff -uprN binutils-2.11.92.0.10/binutils/arlex.l binutils-2.11.92.0.12/binutils/arlex.l --- binutils-2.11.92.0.10/binutils/arlex.l Thu Mar 15 14:51:43 2001 +++ binutils-2.11.92.0.12/binutils/arlex.l Fri Nov 16 14:05:52 2001 @@ -71,7 +71,7 @@ int linenumber; "(" { return '('; } ")" { return ')'; } "," { return ','; } -[A-Za-z0-9/$:.\-\_]+ { +[A-Za-z0-9/\\$:.\-\_]+ { yylval.name = xstrdup (yytext); return FILENAME; } diff -uprN binutils-2.11.92.0.10/binutils/arsup.c binutils-2.11.92.0.12/binutils/arsup.c --- binutils-2.11.92.0.10/binutils/arsup.c Thu Mar 15 14:51:43 2001 +++ binutils-2.11.92.0.12/binutils/arsup.c Fri Nov 16 14:05:52 2001 @@ -160,10 +160,11 @@ DEFUN(ar_open,(name, t), { char *tname = (char *) xmalloc (strlen (name) + 10); + const char *bname = lbasename (name); real_name = name; /* Prepend tmp- to the beginning, to avoid file-name clashes after truncation on filesystems with limited namespaces (DOS). */ - sprintf(tname, "tmp-%s", name); + sprintf(tname, "%.*stmp-%s", (int) (bname - name), name, bname); obfd = bfd_openw(tname, NULL); if (!obfd) { diff -uprN binutils-2.11.92.0.10/binutils/configure binutils-2.11.92.0.12/binutils/configure --- binutils-2.11.92.0.10/binutils/configure Mon Oct 22 10:25:11 2001 +++ binutils-2.11.92.0.12/binutils/configure Fri Nov 16 14:05:52 2001 @@ -2708,7 +2708,7 @@ EOF fi -ALL_LINGUAS= +ALL_LINGUAS="fr tr" # 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 diff -uprN binutils-2.11.92.0.10/binutils/configure.in binutils-2.11.92.0.12/binutils/configure.in --- binutils-2.11.92.0.10/binutils/configure.in Fri Aug 10 14:08:01 2001 +++ binutils-2.11.92.0.12/binutils/configure.in Fri Nov 16 14:05:52 2001 @@ -64,7 +64,7 @@ AC_PROG_CC AC_PROG_YACC AM_PROG_LEX -ALL_LINGUAS= +ALL_LINGUAS="fr tr" CY_GNU_GETTEXT AM_MAINTAINER_MODE diff -uprN binutils-2.11.92.0.10/binutils/doc/binutils.texi binutils-2.11.92.0.12/binutils/doc/binutils.texi --- binutils-2.11.92.0.10/binutils/doc/binutils.texi Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/binutils/doc/binutils.texi Wed Nov 21 15:35:32 2001 @@ -1569,6 +1569,23 @@ using the switch @option{--disassembler- useful when attempting to disassemble thumb code produced by other compilers. +For the x86, some of the options duplicate functions of the @option{-m} +switch, but allow finer grained control. Multiple selections from the +following may be specified as a comma separated string. +@option{x86-64}, @option{i386} and @option{i8086} select disassembly for +the given architecture. @option{intel} and @option{att} select between +intel syntax mode and AT&T syntax mode. @option{addr32}, +@option{addr16}, @option{data32} and @option{data16} specify the default +address size and operand size. These four options will be overridden if +@option{x86-64}, @option{i386} or @option{i8086} appear later in the +option string. Lastly, @option{suffix}, when in AT&T mode, +instructs the dissassembler to print a mnemonic suffix even when the +suffix could be inferred by the operands. + +For PPC, @option{booke}, @option{booke32} and @option{booke64} select +disassembly of BookE instructions. @option{32} and @option{64} select +PowerPC and PowerPC64 disassembly, respectively. + @item -p @itemx --private-headers Print information that is specific to the object file format. The exact @@ -2834,7 +2851,7 @@ readelf [@option{-a}|@option{--all}] [@option{-V}|@option{--version-info}] [@option{-D}|@option{--use-dynamic}] [@option{-x} |@option{--hex-dump=}] - [@option{-w[liaprmf]}|@option{--debug-dump}[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames]] + [@option{-w[liaprmfs]}|@option{--debug-dump}[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str]] [@option{-histogram}] [@option{-v}|@option{--version}] [@option{-W}|@option{--wide}] @@ -2936,8 +2953,8 @@ symbols section. @itemx --hex-dump= Displays the contents of the indicated section as a hexadecimal dump. -@item -w[liaprmf] -@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames] +@item -w[liaprmfs] +@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str] Displays the contents of the debug sections in the file, if any are present. If one of the optional letters or words follows the switch then only data found in those specific sections will be dumped. diff -uprN binutils-2.11.92.0.10/binutils/po/fr.po binutils-2.11.92.0.12/binutils/po/fr.po --- binutils-2.11.92.0.10/binutils/po/fr.po Wed Dec 31 16:00:00 1969 +++ binutils-2.11.92.0.12/binutils/po/fr.po Fri Nov 16 14:05:52 2001 @@ -0,0 +1,4108 @@ +# Messages français pour GNU concernant binutils. +# Copyright (C) 1996 Free Software Foundation, Inc. +# Michel Robitaille , 1996. +# +msgid "" +msgstr "" +"Project-Id-Version: GNU binutils 2.11\n" +"POT-Creation-Date: 2001-01-11 12:02-0800\n" +"PO-Revision-Date: 2001-09-20 08:00-0500\n" +"Last-Translator: Michel Robitaille \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: addr2line.c:76 +#, c-format +msgid "" +"Usage: %s [-CfsHV] [-b bfdname] [--target=bfdname]\n" +" [-e executable] [--exe=executable] [--demangle[=style]]\n" +" [--basenames] [--functions] [addr addr ...]\n" +msgstr "" +"Usage: %s [-CfsHV] [-b nombdf] [--target=nombdf]\n" +" [-e executable] [--exe=executable] [--demangle[=style]]\n" +" [--basenames] [--functions] [adr adr ...]\n" + +#: addr2line.c:83 ar.c:288 nlmconv.c:1119 objcopy.c:373 objcopy.c:405 +#: readelf.c:1876 size.c:91 strings.c:530 windres.c:737 +#, c-format +msgid "Report bugs to %s\n" +msgstr "Rapporter toutes anomalies à %s\n" + +#: addr2line.c:243 +#, c-format +msgid "%s: can not get addresses from archive" +msgstr "%s: ne peut obtenir l'adresse à partir de l'archive" + +#: addr2line.c:310 nm.c:436 objdump.c:2857 +#, c-format +msgid "unknown demangling style `%s'" +msgstr "style de d'encodage par mutilation inconnu `%s'" + +#: ar.c:236 +#, c-format +msgid "no entry %s in archive\n" +msgstr "pas d'entrée %s dans l'archive\n" + +#: ar.c:253 +#, c-format +msgid "Usage: %s [-X32_64] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...\n" +msgstr "Usage: %s [-X32_64] [-]{dmpqrstx}[abcfilNoPsSuvV] [nom-du-membre] [compteur] fichier-archive fichier...\n" + +#: ar.c:256 +#, c-format +msgid " %s -M [\n\n" +msgstr "\n\n\n" + +#: ar.c:845 ar.c:913 +#, c-format +msgid "%s is not a valid archive" +msgstr "%s n'est pas une archive valide" + +#: ar.c:881 +#, c-format +msgid "stat returns negative size for %s" +msgstr "stat() a retourné une taille négative for %s" + +#: ar.c:1008 +#, c-format +msgid "%s is not an archive" +msgstr "%s n'est pas une archive" + +#: ar.c:1015 +#, c-format +msgid "creating %s" +msgstr "création de %s" + +#: ar.c:1221 +#, c-format +msgid "No member named `%s'\n" +msgstr "Aucun membre ayant le nom `%s'\n" + +#: ar.c:1273 +#, c-format +msgid "no entry %s in archive %s!" +msgstr "aucune entrée %s dans l'archive %s!" + +#: ar.c:1434 +#, c-format +msgid "%s: no archive map to update" +msgstr "%s: aucune table d'archive à mettre à jour" + +#: arsup.c:88 +#, c-format +msgid "No entry %s in archive.\n" +msgstr "Aucune entrée %s dans l'archive.\n" + +#: arsup.c:120 +#, c-format +msgid "Can't open file %s\n" +msgstr "Ne peut ouvrir le fichier %s\n" + +#: arsup.c:170 +#, c-format +msgid "%s: Can't open output archive %s\n" +msgstr "%s: ne peut ouvrir l'archive de sortie %s\n" + +#: arsup.c:182 +#, c-format +msgid "%s: Can't open input archive %s\n" +msgstr "%s: ne peut ouvrir l'archive en entrée %s\n" + +#: arsup.c:188 +#, c-format +msgid "%s: file %s is not an archive\n" +msgstr "%s: le fichier %s n'est pas une archive\n" + +#: arsup.c:229 +#, c-format +msgid "%s: no output archive specified yet\n" +msgstr "%s: aucun fichier d'archive de sortie n'a encore été spécifié\n" + +#: arsup.c:249 arsup.c:284 arsup.c:320 arsup.c:340 arsup.c:398 +#, c-format +msgid "%s: no open output archive\n" +msgstr "%s: aucun fichier d'archive de sortie ouvert\n" + +#: arsup.c:257 arsup.c:358 arsup.c:378 +#, c-format +msgid "%s: can't open file %s\n" +msgstr "%s: ne peut ouvrir le fichier %s\n" + +#: arsup.c:305 arsup.c:374 arsup.c:453 +#, c-format +msgid "%s: can't find module file %s\n" +msgstr "%s: ne peut trouver le fichier module %s\n" + +#: arsup.c:405 +#, c-format +msgid "Current open archive is %s\n" +msgstr "L'archive actuellement ouverte est %s\n" + +#: arsup.c:432 +#, c-format +msgid "%s: no open archive\n" +msgstr "%s: aucune archive ouverte\n" + +#: bucomm.c:135 +#, c-format +msgid "can't set BFD default target to `%s': %s" +msgstr "ne peut initialiser les paramètres par défaut BDF cible vers `%s': %s" + +#: bucomm.c:147 +#, c-format +msgid "%s: Matching formats:" +msgstr "%s: formats concordant:" + +#: bucomm.c:164 +msgid "Supported targets:" +msgstr "Cibles supportés:" + +#: bucomm.c:166 +#, c-format +msgid "%s: supported targets:" +msgstr "%s: cibles supportés:" + +#: bucomm.c:272 +#, c-format +msgid "%s: bad number: %s" +msgstr "%s: mauvais numéro: %s" + +#: coffdump.c:94 +#, c-format +msgid "#lines %d " +msgstr "# de lignes %d " + +#: coffdump.c:456 sysdump.c:719 +#, c-format +msgid "%s: Print a human readable interpretation of a SYSROFF object file\n" +msgstr "%s: afficher dans un format humainement interprétable le fichier objet SYSROFF\n" + +#: coffdump.c:498 srconv.c:1941 sysdump.c:755 +#, c-format +msgid "GNU %s version %s\n" +msgstr "GNU %s version %s\n" + +#: coffdump.c:516 srconv.c:1975 sysdump.c:775 +msgid "no input file specified" +msgstr "Aucune fichier spécifié à l'entrée" + +#: debug.c:653 +msgid "debug_add_to_current_namespace: no current file" +msgstr "debug_add_to_current_namespace: aucun fichier courant" + +#: debug.c:736 +msgid "debug_start_source: no debug_set_filename call" +msgstr "debug_start_source: aucun appel no debug_set_filename" + +#: debug.c:795 +msgid "debug_record_function: no debug_set_filename call" +msgstr "debug_record_function: aucun appel debug_set_filename" + +#: debug.c:851 +msgid "debug_record_parameter: no current function" +msgstr "debug_record_parameter: aucune fonction courante" + +#: debug.c:885 +msgid "debug_end_function: no current function" +msgstr "debug_end_function: aucune fonction courante" + +#: debug.c:891 +msgid "debug_end_function: some blocks were not closed" +msgstr "debug_end_function: quelques blocs n'ont pas été fermés" + +#: debug.c:921 +msgid "debug_start_block: no current block" +msgstr "debug_start_block: aucun bloc couratn" + +#: debug.c:959 +msgid "debug_end_block: no current block" +msgstr "debug_end_block: aucun bloc courant" + +#: debug.c:966 +msgid "debug_end_block: attempt to close top level block" +msgstr "debug_end_block: tentative de fermeture du bloc du niveau supérieur" + +#: debug.c:992 +msgid "debug_record_line: no current unit" +msgstr "debug_record_line: aucune unité courante" + +#. FIXME +#: debug.c:1046 +msgid "debug_start_common_block: not implemented" +msgstr "debug_start_common_block: pas implanté" + +#. FIXME +#: debug.c:1058 +msgid "debug_end_common_block: not implemented" +msgstr "debug_end_common_block: pas implanté" + +#. FIXME. +#: debug.c:1152 +msgid "debug_record_label not implemented" +msgstr "debug_record_label pas implanté" + +#: debug.c:1178 +msgid "debug_record_variable: no current file" +msgstr "debug_record_variable: aucun fichier courant" + +#: debug.c:1194 +msgid "debug_record_variable: no current block" +msgstr "debug_record_variable: aucun bloc courant" + +#: debug.c:1764 +msgid "debug_make_undefined_type: unsupported kind" +msgstr "debug_make_undefined_type: type non supportée" + +#: debug.c:1970 +msgid "debug_name_type: no current file" +msgstr "debug_name_type: aucun fichier courant" + +#: debug.c:2018 +msgid "debug_tag_type: no current file" +msgstr "debug_tag_type: aucune fichier courant" + +#: debug.c:2026 +msgid "debug_tag_type: extra tag attempted" +msgstr "debug_tag_type: tentative d'étiquetage additionnelle" + +#: debug.c:2066 +#, c-format +msgid "Warning: changing type size from %d to %d\n" +msgstr "AVERTISSEMENT: changement de taille du type de %d à %d\n" + +#: debug.c:2090 +msgid "debug_find_named_type: no current compilation unit" +msgstr "debug_find_named_type: aucune unité de compilation courante" + +#: debug.c:2197 +#, c-format +msgid "debug_get_real_type: circular debug information for %s\n" +msgstr "debug_get_real_type: information circulaire de débogage pour %s\n" + +#: debug.c:2662 +msgid "debug_write_type: illegal type encountered" +msgstr "debug_write_type: type illégal rencontré" + +#: dlltool.c:737 dlltool.c:762 dlltool.c:788 +#, c-format +msgid "Internal error: Unknown machine type: %d" +msgstr "erreur interne: type de machine inconnue: %d" + +#: dlltool.c:825 +#, c-format +msgid "Can't open def file: %s" +msgstr "Ne peut ouvrir le fichier de définition: %s" + +#: dlltool.c:830 +#, c-format +msgid "Processing def file: %s" +msgstr "Traitement du fichier de définition: %s" + +#: dlltool.c:834 +msgid "Processed def file" +msgstr "Traitement complété du fichier de définition" + +#: dlltool.c:859 +#, c-format +msgid "Syntax error in def file %s:%d" +msgstr "Erreur de syntaxe dans le fichier de définition %s:%d" + +#: dlltool.c:892 +#, c-format +msgid "NAME: %s base: %x" +msgstr "NOM: %s base: %x" + +#: dlltool.c:895 dlltool.c:914 +msgid "Can't have LIBRARY and NAME" +msgstr "Ne peut trouver la LIBRAIRIE et le NOM" + +#: dlltool.c:911 +#, c-format +msgid "LIBRARY: %s base: %x" +msgstr "LIBRAIRIE: %s base %x" + +#: dlltool.c:1169 resrc.c:271 +#, c-format +msgid "wait: %s" +msgstr "en attente: %s" + +#: dlltool.c:1174 dllwrap.c:456 resrc.c:276 +#, c-format +msgid "subprocess got fatal signal %d" +msgstr "sous-processus a reçu le signal fatal %d" + +#: dlltool.c:1180 dllwrap.c:463 resrc.c:283 +#, c-format +msgid "%s exited with status %d" +msgstr "%s a terminé avec le statut %d" + +#: dlltool.c:1212 +#, c-format +msgid "Sucking in info from %s section in %s" +msgstr "Aspirer les informations de la section %s dans %s" + +#: dlltool.c:1336 +#, c-format +msgid "Excluding symbol: %s" +msgstr "Exclusion de symbole: %s" + +#: dlltool.c:1431 dlltool.c:1442 nm.c:946 nm.c:957 objdump.c:443 objdump.c:460 +#, c-format +msgid "%s: no symbols" +msgstr "%s: aucun symbole" + +#. FIXME: we ought to read in and block out the base relocations +#: dlltool.c:1469 +#, c-format +msgid "Done reading %s" +msgstr "Lecture complétée %s" + +#: dlltool.c:1480 +#, c-format +msgid "Unable to open object file: %s" +msgstr "Incapable d'ouvrir le fichier objet: %s" + +#: dlltool.c:1483 +#, c-format +msgid "Scanning object file %s" +msgstr "Scrutation du fichier objet %s" + +#: dlltool.c:1498 +#, c-format +msgid "Cannot produce mcore-elf dll from archive file: %s" +msgstr "Ne peutproduire mcore-elf dll à partir du fichier d'archive: %s" + +#: dlltool.c:1590 +msgid "Adding exports to output file" +msgstr "Ajout des exports au fichier de sortie" + +#: dlltool.c:1635 +msgid "Added exports to output file" +msgstr "Exports ajoutés au fichier de sortie" + +#: dlltool.c:1759 +#, c-format +msgid "Generating export file: %s" +msgstr "Génération du fichier d'exports: %s" + +#: dlltool.c:1764 +#, c-format +msgid "Unable to open temporary assembler file: %s" +msgstr "Incapable d'ouvrir le fichier assembleur temporaire: %s" + +#: dlltool.c:1767 +#, c-format +msgid "Opened temporary file: %s" +msgstr "Fichier temporaire ouvert: %s" + +#: dlltool.c:1981 +msgid "Generated exports file" +msgstr "Fichier d'exports généré" + +#: dlltool.c:2236 +#, c-format +msgid "bfd_open failed open stub file: %s" +msgstr "échec de bfd_open lors de l'ouverture du fichier stub: %s" + +#: dlltool.c:2239 +#, c-format +msgid "Creating stub file: %s" +msgstr "Création du fichier stub: %s" + +#: dlltool.c:2626 +#, c-format +msgid "failed to open temporary head file: %s" +msgstr "échec d'ouverture du fichier de tête temporaire: %s" + +#: dlltool.c:2685 +#, c-format +msgid "failed to open temporary tail file: %s" +msgstr "échec d'ouverture du fichier de queue temporaire: %s" + +#: dlltool.c:2753 +#, c-format +msgid "Can't open .lib file: %s" +msgstr "Ne peut ouvrir le fichier .lib: %s" + +#: dlltool.c:2756 +#, c-format +msgid "Creating library file: %s" +msgstr "Création du fichier de librairie: %s" + +#: dlltool.c:2815 +#, c-format +msgid "cannot delete %s: %s" +msgstr "ne peut détruire %s: %s" + +#: dlltool.c:2819 +msgid "Created lib file" +msgstr "Fichier de libraire créé" + +#: dlltool.c:2924 +#, c-format +msgid "Warning, ignoring duplicate EXPORT %s %d,%d" +msgstr "AVERTISSEMENT: EXPORT en duplication ignoré %s %d,%d" + +#: dlltool.c:2930 +#, c-format +msgid "Error, duplicate EXPORT with oridinals: %s" +msgstr "ERREUR, EXPORT en duplication avec ordinals: %s" + +#: dlltool.c:3057 +msgid "Processing definitions" +msgstr "Traitement des définitions" + +#: dlltool.c:3095 +msgid "Processed definitions" +msgstr "Définitions traitées" + +#. xgetext:c-format +#: dlltool.c:3106 dllwrap.c:520 +#, c-format +msgid "Usage %s \n" +msgstr "Usage %s \n" + +#. xgetext:c-format +#: dlltool.c:3108 +#, c-format +msgid " -m --machine Create as DLL for . [default: %s]\n" +msgstr " -m --machine créer comme DLL pour la . [défaut: %s]\n" + +#: dlltool.c:3109 +msgid " possible : arm[_interwork], i386, mcore[-elf]{-le|-be}, ppc, thumb\n" +msgstr " possible : arm[_interwork], i386, mcore[-elf]{-le|-be}, ppc, thumb\n" + +#: dlltool.c:3110 +msgid " -e --output-exp Generate an export file.\n" +msgstr " -e --output-exp générer un fichier d'export.\n" + +#: dlltool.c:3111 +msgid " -l --output-lib Generate an interface library.\n" +msgstr " -l --output-lib générer une librairie d'interface.\n" + +#: dlltool.c:3112 +msgid " -a --add-indirect Add dll indirects to export file.\n" +msgstr " -a --add-indirect ajouter les dll indirectes au fichier d'exports.\n" + +#: dlltool.c:3113 +msgid " -D --dllname Name of input dll to put into interface lib.\n" +msgstr " -D --dllname nom du dll à placer dans la libraire d'interface.\n" + +#: dlltool.c:3114 +msgid " -d --input-def Name of .def file to be read in.\n" +msgstr " -d --input-def nom du fichier .def à lire\n" + +#: dlltool.c:3115 +msgid " -z --output-def Name of .def file to be created.\n" +msgstr " -z --output-def nom du fichier .def à créer.\n" + +#: dlltool.c:3116 +msgid " --export-all-symbols Export all symbols to .def\n" +msgstr " --export-all-symbols exporter tous les symboles vers le fichier .def\n" + +#: dlltool.c:3117 +msgid " --no-export-all-symbols Only export listed symbols\n" +msgstr " --no-export-all-symbols exporter seulement la liste des symboles\n" + +#: dlltool.c:3118 +msgid " --exclude-symbols Don't export \n" +msgstr " --exclude-symbols ne pas exporter la \n" + +#: dlltool.c:3119 +msgid " --no-default-excludes Clear default exclude symbols\n" +msgstr " --no-default-excludes ne pas tenir compte des symboles d'exclusion par défaut\n" + +#: dlltool.c:3120 +msgid " -b --base-file Read linker generated base file.\n" +msgstr " -b --base-file lire le fichier de base généré par l'éditeur de liens\n" + +#: dlltool.c:3121 +msgid " -x --no-idata4 Don't generate idata$4 section.\n" +msgstr " -x --no-idata4 ne pas générer la section idata$4\n" + +#: dlltool.c:3122 +msgid " -c --no-idata5 Don't generate idata$5 section.\n" +msgstr " -c --no-idata5 ne pas générer la section idata$5\n" + +#: dlltool.c:3123 +msgid " -U --add-underscore Add underscores to symbols in interface library.\n" +msgstr " -U --add-underscore ajouter des soulignés aux symboles dans la librairie d'interface\n" + +#: dlltool.c:3124 +msgid " -k --kill-at Kill @ from exported names.\n" +msgstr " -k --kill-at stopper @ à partir des noms exportés\n" + +#: dlltool.c:3125 +msgid " -A --add-stdcall-alias Add aliases without @.\n" +msgstr " -A --add-stdcall-alias ajouter des aliases sans @\n" + +#: dlltool.c:3126 +msgid " -S --as Use for assembler.\n" +msgstr " -S --as utiliser le pour l'assembleur\n" + +#: dlltool.c:3127 +msgid " -f --as-flags Pass to the assembler.\n" +msgstr " -f --as-flags relayer les à l'assembleur\n" + +#: dlltool.c:3128 +msgid " -C --compat-implib Create backward compatible import library.\n" +msgstr " -C --compat-implib créer une compatibilité arrière à la librairie d'importation\n" + +#: dlltool.c:3129 +msgid " -n --no-delete Keep temp files (repeat for extra preservation).\n" +msgstr " -n --no-delete conserver les fichier temporaires\n" + +#: dlltool.c:3130 +msgid " -v --verbose Be verbose.\n" +msgstr " -v --verbose passer en mode bavard\n" + +#: dlltool.c:3131 +msgid " -V --version Display the program version.\n" +msgstr " -V --version afficher le nom et la version du logiciel\n" + +#: dlltool.c:3132 +msgid " -h --help Display this information.\n" +msgstr " -h --help afficher l'aide-mémoire\n" + +#: dlltool.c:3134 +msgid " -M --mcore-elf Process mcore-elf object files into .\n" +msgstr " -M --mcore-elf traiter le fichier objet mcore-elf selon le \n" + +#: dlltool.c:3135 +msgid " -L --linker Use as the linker.\n" +msgstr " -L --linker utiliser comme éditeur de liens\n" + +#: dlltool.c:3136 +msgid " -F --linker-flags Pass to the linker.\n" +msgstr " -F --linker-flags relayer les à l'éditeur de liens\n" + +#: dlltool.c:3280 +#, c-format +msgid "Unable to open base-file: %s" +msgstr "Incapable d'ouvrir le fichier de base: %s" + +#: dlltool.c:3309 +#, c-format +msgid "Machine '%s' not supported" +msgstr "Machine '%s' n'est pas supportée" + +#: dlltool.c:3412 dllwrap.c:241 +#, c-format +msgid "Tried file: %s" +msgstr "Essai avec le fichier: %s" + +#: dlltool.c:3419 dllwrap.c:248 +#, c-format +msgid "Using file: %s" +msgstr "Utilisation du fichier: %s" + +#: dllwrap.c:335 +#, c-format +msgid "Keeping temporary base file %s" +msgstr "Conservation temportaire du fichier de base %s" + +#: dllwrap.c:337 +#, c-format +msgid "Deleting temporary base file %s" +msgstr "Destruction du fichier de base temporaire %s" + +#: dllwrap.c:351 +#, c-format +msgid "Keeping temporary exp file %s" +msgstr "Conservation du fichier temporaire exp %s" + +#: dllwrap.c:353 +#, c-format +msgid "Deleting temporary exp file %s" +msgstr "Destruction du fichier exp temporaire %s" + +#: dllwrap.c:366 +#, c-format +msgid "Keeping temporary def file %s" +msgstr "Conservation du fichier temporaire def %s" + +#: dllwrap.c:368 +#, c-format +msgid "Deleting temporary def file %s" +msgstr "Destruction du fichier temporaire def %s" + +#: dllwrap.c:521 +msgid " Generic options:\n" +msgstr " Option génériques:\n" + +#: dllwrap.c:522 +msgid " --quiet, -q Work quietly\n" +msgstr " --quiet, -q travailler en silence\n" + +#: dllwrap.c:523 +msgid " --verbose, -v Verbose\n" +msgstr " --verbose, -v travailler en mode bavard\n" + +#: dllwrap.c:524 +msgid " --version Print dllwrap version\n" +msgstr " --version afficher la version du dllwrap\n" + +#: dllwrap.c:525 +msgid " --implib Synonym for --output-lib\n" +msgstr " --implib identique à --output-lib\n" + +#: dllwrap.c:526 +#, c-format +msgid " Options for %s:\n" +msgstr " Options pour %s:\n" + +#: dllwrap.c:527 +msgid " --driver-name Defaults to \"gcc\"\n" +msgstr " --driver-name par défaut \"gcc\"\n" + +#: dllwrap.c:528 +msgid " --driver-flags Override default ld flags\n" +msgstr " --driver-flags écrasesr les fanions par défaut de ld\n" + +#: dllwrap.c:529 +msgid " --dlltool-name Defaults to \"dlltool\"\n" +msgstr " --dlltool-name par défaut \"dlltool\"\n" + +#: dllwrap.c:530 +msgid " --entry Specify alternate DLL entry point\n" +msgstr " --entry spécifier une entrée alternative au point d'entrée du DLL\n" + +#: dllwrap.c:531 +msgid " --image-base Specify image base address\n" +msgstr " --image-base spécifier une adresse de l'image de base\n" + +#: dllwrap.c:532 +msgid " --target i386-cygwin32 or i386-mingw32\n" +msgstr " --target i386-cygwin32 ou i386-mingw32\n" + +#: dllwrap.c:533 +msgid " --dry-run Show what needs to be run\n" +msgstr " --dry-run afficher ce qui est nécessaire pour l'exécution\n" + +#: dllwrap.c:534 +msgid " --mno-cygwin Create Mingw DLL\n" +msgstr " --mno-cygwin créer une DLL de type Mingw\n" + +#: dllwrap.c:535 +msgid " Options passed to DLLTOOL:\n" +msgstr " Options relayées à DLLTOOL:\n" + +#: dllwrap.c:536 +msgid " --machine \n" +msgstr " --machine \n" + +#: dllwrap.c:537 +msgid " --output-exp Generate export file.\n" +msgstr " --output-exp générer un fichier d'exports.\n" + +#: dllwrap.c:538 +msgid " --output-lib Generate input library.\n" +msgstr " --output-lib générer une librairie d'entrée.\n" + +#: dllwrap.c:539 +msgid " --add-indirect Add dll indirects to export file.\n" +msgstr " --add-indirect ajouter les dll indirectes au fichier d'exports.\n" + +#: dllwrap.c:540 +msgid " --dllname Name of input dll to put into output lib.\n" +msgstr " --dllname nom du dll d'entrée à ajouter dans le fichier lib de sortie.\n" + +#: dllwrap.c:541 +msgid " --def Name input .def file\n" +msgstr " --def nom du fichier d'entrée .def\n" + +#: dllwrap.c:542 +msgid " --output-def Name output .def file\n" +msgstr " --output-def nom du fichier de sortie .def\n" + +#: dllwrap.c:543 +msgid " --export-all-symbols Export all symbols to .def\n" +msgstr " --export-all-symbols exporter tous les symboles au fichier .def\n" + +#: dllwrap.c:544 +msgid " --no-export-all-symbols Only export .drectve symbols\n" +msgstr " --no-export-all-symbols exporter seulement les symboles .drectve\n" + +#: dllwrap.c:545 +msgid " --exclude-symbols Exclude from .def\n" +msgstr " --exclude-symbols exclure la de .def\n" + +#: dllwrap.c:546 +msgid " --no-default-excludes Zap default exclude symbols\n" +msgstr " --no-default-excludes ignorer les symboles par défaut d'exclusion\n" + +#: dllwrap.c:547 +msgid " --base-file Read linker generated base file\n" +msgstr " --base-file lire le fichier de base généré par l'éditeur de liens\n" + +#: dllwrap.c:548 +msgid " --no-idata4 Don't generate idata$4 section\n" +msgstr " --no-idata4 ne pas générer la section idata$4\n" + +#: dllwrap.c:549 +msgid " --no-idata5 Don't generate idata$5 section\n" +msgstr " --no-idata5 ne pas générer la section idata$5\n" + +#: dllwrap.c:550 +msgid " -U Add underscores to .lib\n" +msgstr " -U ajouter des soulignés au fichier .lib\n" + +#: dllwrap.c:551 +msgid " -k Kill @ from exported names\n" +msgstr " -k stopper @ à partir des noms exportés\n" + +#: dllwrap.c:552 +msgid " --add-stdcall-alias Add aliases without @\n" +msgstr " --add-stdcall-alias ajouter les aliases sans @\n" + +#: dllwrap.c:553 +msgid " --as Use for assembler\n" +msgstr " --as utiliser comme assembleur\n" + +#: dllwrap.c:554 +msgid " --nodelete Keep temp files.\n" +msgstr " --nodelete conserver les fichiers temporaires.\n" + +#: dllwrap.c:555 +msgid " Rest are passed unmodified to the language driver\n" +msgstr " le reste est passé sans modification au pilote du langage\n" + +#: dllwrap.c:816 +msgid "Must provide at least one of -o or --dllname options" +msgstr "Obligation de fournir au moins une des options -o or --dllname" + +#: dllwrap.c:844 +msgid "no export definition file provided" +msgstr "aucun fichier de définition d'exports fourni" + +#: dllwrap.c:845 +msgid "creating one, but that may not be what you want" +msgstr "création d'un fichier, mais ce n'est pas nécessairement ce que vous désirez" + +#: dllwrap.c:1006 +#, c-format +msgid "DLLTOOL name : %s\n" +msgstr "OUTILDLL nom : %s\n" + +#: dllwrap.c:1007 +#, c-format +msgid "DLLTOOL options : %s\n" +msgstr "OUTILDLL options : %s\n" + +#: dllwrap.c:1008 +#, c-format +msgid "DRIVER name : %s\n" +msgstr "PILOTE name : %s\n" + +#: dllwrap.c:1009 +#, c-format +msgid "DRIVER options : %s\n" +msgstr "PILOTE options : %s\n" + +#: ieee.c:317 +msgid "unexpected end of debugging information" +msgstr "fin inattendue des informations de débug" + +#: ieee.c:412 +msgid "invalid number" +msgstr "numéro invalide" + +#: ieee.c:471 +msgid "invalid string length" +msgstr "longueur de chaîne invalide" + +#: ieee.c:528 ieee.c:569 +msgid "expression stack overflow" +msgstr "débordement de pile de l'expression" + +#: ieee.c:548 +msgid "unsupported IEEE expression operator" +msgstr "opérateur d'espression IEEE non supporté" + +#: ieee.c:563 +msgid "unknown section" +msgstr "section inconnue" + +#: ieee.c:584 +msgid "expression stack underflow" +msgstr "sous dépilage de l'expression" + +#: ieee.c:598 +msgid "expression stack mismatch" +msgstr "non concordance de l'expression dans la pile" + +#: ieee.c:637 +msgid "unknown builtin type" +msgstr "type de construit interne inconnu" + +#: ieee.c:782 +msgid "BCD float type not supported" +msgstr "type de numérotaion flottante BCD inconnue" + +#: ieee.c:928 +msgid "unexpected number" +msgstr "numéro inattendu" + +#: ieee.c:935 +msgid "unexpected record type" +msgstr "type d'enregistrement inattendu" + +#: ieee.c:968 +msgid "blocks left on stack at end" +msgstr "des blocs sont demeurés sur la pile à la fin" + +#: ieee.c:1233 +msgid "unknown BB type" +msgstr "type BB inconnu" + +#: ieee.c:1242 +msgid "stack overflow" +msgstr "débordement de la pile" + +#: ieee.c:1267 +msgid "stack underflow" +msgstr "sous dépilage de la pile" + +#: ieee.c:1381 ieee.c:1453 ieee.c:2152 +msgid "illegal variable index" +msgstr "variable d'index illégale" + +#: ieee.c:1431 +msgid "illegal type index" +msgstr "type d'index illégal" + +#: ieee.c:1441 ieee.c:1478 +msgid "unknown TY code" +msgstr "code TY inconnu" + +#: ieee.c:1460 +msgid "undefined variable in TY" +msgstr "variable non définie dans TY" + +#. Pascal file name. FIXME. +#: ieee.c:1871 +msgid "Pascal file name not supported" +msgstr "Nom de fichier Pascal non supporté" + +#: ieee.c:1919 +msgid "unsupported qualifer" +msgstr "qualificatif non supporté" + +#: ieee.c:2190 +msgid "undefined variable in ATN" +msgstr "variable non définie dans ATN" + +#: ieee.c:2233 +msgid "unknown ATN type" +msgstr "type ATN inconnu" + +#. Reserved for FORTRAN common. +#: ieee.c:2355 +msgid "unsupported ATN11" +msgstr "ATN11 non supporté" + +#. We have no way to record this information. FIXME. +#: ieee.c:2382 +msgid "unsupported ATN12" +msgstr "ATN2 non supporté" + +#: ieee.c:2442 +msgid "unexpected string in C++ misc" +msgstr "chaîne inattendue dans misc en C++" + +#: ieee.c:2455 +msgid "bad misc record" +msgstr "mauvais enregistrement misc" + +#: ieee.c:2498 +msgid "unrecognized C++ misc record" +msgstr "enregistrement misc non reconnu en C++" + +#: ieee.c:2615 +msgid "undefined C++ object" +msgstr "objet indéfini en C++" + +#: ieee.c:2649 +msgid "unrecognized C++ object spec" +msgstr "spécification d'objet non reconnu en C++" + +#: ieee.c:2685 +msgid "unsupported C++ object type" +msgstr "type d'objet non supporté en C++" + +#: ieee.c:2695 +msgid "C++ base class not defined" +msgstr "classe de base non définie en C++" + +#: ieee.c:2707 ieee.c:2812 +msgid "C++ object has no fields" +msgstr "objet n'ayant pas de champ en C++" + +#: ieee.c:2726 +msgid "C++ base class not found in container" +msgstr "classe de base non repéré dans le conteneur en C++" + +#: ieee.c:2833 +msgid "C++ data member not found in container" +msgstr "membre des données non repéré dans le conteneur en C++" + +#: ieee.c:2874 ieee.c:3024 +msgid "unknown C++ visibility" +msgstr "visibilité C++ inconnue" + +#: ieee.c:2908 +msgid "bad C++ field bit pos or size" +msgstr "mauvais champ de bit pos ou de taille en C++" + +#: ieee.c:3000 +msgid "bad type for C++ method function" +msgstr "mauvais type pour le méthode d'une fonction en C++" + +#: ieee.c:3010 +msgid "no type information for C++ method function" +msgstr "aucune information sur le type pour la méthode de la fonction en C++" + +#: ieee.c:3049 +msgid "C++ static virtual method" +msgstr "méthode statique virtuelle en C++" + +#: ieee.c:3144 +msgid "unrecognized C++ object overhead spec" +msgstr "spécification de l'en-tête de l'objet en C++ n'est pas reconnue" + +#: ieee.c:3183 +msgid "undefined C++ vtable" +msgstr "vtable non définie en C++" + +#: ieee.c:3254 +msgid "C++ default values not in a function" +msgstr "valeurs par défaut ne sont pas dans une fonction en C++" + +#: ieee.c:3294 +msgid "unrecognized C++ default type" +msgstr "type par défaut en C++ n'est pas reconnu" + +#: ieee.c:3325 +msgid "reference parameter is not a pointer" +msgstr "paramètre de la référence n'est pas un pointeur" + +#: ieee.c:3410 +msgid "unrecognized C++ reference type" +msgstr "référence du type en C++ n'est pas reconnue" + +#: ieee.c:3492 +msgid "C++ reference not found" +msgstr "la référence n'a pas été retrouvée en C++" + +#: ieee.c:3500 +msgid "C++ reference is not pointer" +msgstr "la référence n'est pas un pointeur en C++" + +#: ieee.c:3529 ieee.c:3537 +msgid "missing required ASN" +msgstr "ASN requis est absent" + +#: ieee.c:3567 ieee.c:3575 +msgid "missing required ATN65" +msgstr "ATN65 requis est absent" + +#: ieee.c:3589 +msgid "bad ATN65 record" +msgstr "mauvais enregistrement ATN65" + +#: ieee.c:4236 +msgid "IEEE numeric overflow: 0x" +msgstr "débordement numériquie IEEE: Ox" + +#: ieee.c:4282 +#, c-format +msgid "IEEE string length overflow: %u\n" +msgstr "débordement de la longueur de la chaîne IEEE: %u\n" + +#: ieee.c:5324 +#, c-format +msgid "IEEE unsupported integer type size %u\n" +msgstr "taille de type d'entier IEEE non supporté %u\n" + +#: ieee.c:5360 +#, c-format +msgid "IEEE unsupported float type size %u\n" +msgstr "taille de type de nombre IEEE en notation flottante non supporté %u\n" + +#: ieee.c:5396 +#, c-format +msgid "IEEE unsupported complex type size %u\n" +msgstr "taille de nombre complexe IEEE non supportée %u\n" + +#: nlmconv.c:275 srconv.c:1966 +msgid "input and output files must be different" +msgstr "fichiers d'entrée et de sortie doivent être différents" + +#: nlmconv.c:322 +msgid "input file named both on command line and with INPUT" +msgstr "fichier d'entrée nommé à la fois sur la ligne de commande et dans la champ INPUT" + +#: nlmconv.c:331 +msgid "no input file" +msgstr "aucun fichier d'entrée" + +#: nlmconv.c:361 +msgid "no name for output file" +msgstr "aucun nom pour le fichier de sortie" + +#: nlmconv.c:374 +msgid "warning: input and output formats are not compatible" +msgstr "AVERTISSEMENT: les formats d'entrée et de sortie sont incompatibles" + +#: nlmconv.c:403 +msgid "make .bss section" +msgstr "générer la section .bss" + +#: nlmconv.c:412 +msgid "make .nlmsections section" +msgstr "générer la section .nlmsections" + +#: nlmconv.c:414 +msgid "set .nlmsections flags" +msgstr "initialiser les fanions .nlmsections" + +#: nlmconv.c:442 +msgid "set .bss vma" +msgstr "initialiser le vma de la section .bss" + +#: nlmconv.c:449 +msgid "set .data size" +msgstr "initialiser la taille de la section .data" + +#: nlmconv.c:629 +#, c-format +msgid "warning: symbol %s imported but not in import list" +msgstr "AVERTISSEMENT: symbole %s importé mais n'est pas dans la liste d'importation" + +#: nlmconv.c:649 +msgid "set start address" +msgstr "initialiser l'adresse de départ" + +#: nlmconv.c:698 +#, c-format +msgid "warning: START procedure %s not defined" +msgstr "AVERTISSEMENT: procédure START %s n'est pas définie" + +#: nlmconv.c:700 +#, c-format +msgid "warning: EXIT procedure %s not defined" +msgstr "AVERTISSEMENT: procédure EXIT %s n'est pas définie" + +#: nlmconv.c:702 +#, c-format +msgid "warning: CHECK procedure %s not defined" +msgstr "AVERTISSEMENT: procédure CHECK %s n'est pas définie" + +#: nlmconv.c:723 nlmconv.c:912 +msgid "custom section" +msgstr "section \"custom\"" + +#: nlmconv.c:744 nlmconv.c:941 +msgid "help section" +msgstr "section d'aide" + +#: nlmconv.c:766 nlmconv.c:959 +msgid "message section" +msgstr "section message" + +#: nlmconv.c:782 nlmconv.c:992 +msgid "module section" +msgstr "section module" + +#: nlmconv.c:802 nlmconv.c:1008 +msgid "rpc section" +msgstr "section rpc" + +#. There is no place to record this information. +#: nlmconv.c:838 +#, c-format +msgid "%s: warning: shared libraries can not have uninitialized data" +msgstr "%s: AVERTISSEMENT: les librairies partagées ne peuvent avoir des données non initialisées" + +#: nlmconv.c:859 nlmconv.c:1027 +msgid "shared section" +msgstr "section partagée" + +#: nlmconv.c:867 +msgid "warning: No version number given" +msgstr "AVERTISSEMENT: aucun numéro de version fourni" + +#: nlmconv.c:907 nlmconv.c:936 nlmconv.c:954 nlmconv.c:1003 nlmconv.c:1022 +#, c-format +msgid "%s: read: %s" +msgstr "%s: lu: %s" + +#: nlmconv.c:929 +msgid "warning: MAP and FULLMAP are not supported; try ld -M" +msgstr "AVERTISSEMENT: MAP et FULLMAP ne sont pas supportées; essayer ld -M" + +#: nlmconv.c:1099 +#, c-format +msgid "%s: Convert an object file into a NetWare Loadable Module\n" +msgstr "%s: convertir un fichier objet en un NetWare Loadable Module\n" + +#: nlmconv.c:1111 +#, c-format +msgid "" +"Usage: %s [-dhV] [-I bfdname] [-O bfdname] [-T header-file] [-l linker]\n" +" [--input-target=bfdname] [--output-target=bfdname]\n" +" [--header-file=file] [--linker=linker] [--debug]\n" +" [--help] [--version]\n" +" [in-file [out-file]]\n" +msgstr "" +"Usage: %s [-dhV] [-I nombfd] [-O nombfd] [-T fichier_en_tete] [-l editeur_de_lien]\n" +" [--input-target=nombfd] [--output-target=nombfd]\n" +" [--header-file=fichier] [--linker=editeur_de_liens] [--debug]\n" +" [--help] [--version]\n" +" [fichier_d_entree [fichier_de_sortie]]\n" + +#: nlmconv.c:1151 +#, c-format +msgid "support not compiled in for %s" +msgstr "soutien non compilé pour %s" + +#: nlmconv.c:1191 +msgid "make section" +msgstr "section make" + +#: nlmconv.c:1205 +msgid "set section size" +msgstr "initialisation de la taille de la section" + +#: nlmconv.c:1211 +msgid "set section alignment" +msgstr "initialisation de l'alignement de la section" + +#: nlmconv.c:1215 +msgid "set section flags" +msgstr "initialisation des fanions de la section" + +#: nlmconv.c:1226 +msgid "set .nlmsections size" +msgstr "initialisation de la taille de .nlmsections" + +#: nlmconv.c:1314 nlmconv.c:1322 nlmconv.c:1331 nlmconv.c:1336 +msgid "set .nlmsection contents" +msgstr "initialisation du contenu de .nlmsection" + +#: nlmconv.c:1839 +msgid "stub section sizes" +msgstr "taille de la section stub" + +#: nlmconv.c:1888 +msgid "writing stub" +msgstr "écriture du stub" + +#: nlmconv.c:1978 +#, c-format +msgid "unresolved PC relative reloc against %s" +msgstr "relocalisation relative sur PC non résolue de %s" + +#: nlmconv.c:2042 +#, c-format +msgid "overflow when adjusting relocation against %s" +msgstr "débordement lors de la relocalisation de %s" + +#: nlmconv.c:2159 +#, c-format +msgid "%s: execution of %s failed: " +msgstr "%s: échec d'exécution de %s :" + +#: nlmconv.c:2174 +#, c-format +msgid "Execution of %s failed" +msgstr "Échec d'exécution de %s" + +#: nm.c:294 +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "Usage: %s [OPTIONS]... [FICHIER]...\n" + +#: nm.c:295 +msgid "List symbols from FILEs (a.out by default).\n" +msgstr "Afficher les symboles des FICHIERS (a.out par défaut).\n" + +#: nm.c:296 +msgid "" +"\n" +" -a, --debug-syms Display debugger-only symbols\n" +" -A, --print-file-name Print name of the input file before every symbol\n" +" -B Same as --format=bsd\n" +" -C, --demangle[=STYLE] Decode low-level symbol names into user-level names\n" +" The STYLE, if specified, can be `auto' (the default),\n" +" `gnu', 'lucid', 'arm', 'hp', 'edg' or 'gnu-new-abi'\n" +" --no-demangle Do not demangle low-level symbol names\n" +" -D, --dynamic Display dynamic symbols instead of normal symbols\n" +" --defined-only Display only defined symbols\n" +" -e (ignored)\n" +" -f, --format=FORMAT Use the output format FORMAT. FORMAT can be `bsd',\n" +" `sysv' or `posix'. The default is `bsd'\n" +" -g, --extern-only Display only external symbols\n" +" -h, --help Display this information\n" +" -l, --line-numbers Use debugging information to find a filename and\n" +" line number for each symbol\n" +" -n, --numeric-sort Sort symbols numerically by address\n" +" -o Same as -A\n" +" -p, --no-sort Do not sort the symbols\n" +" -P, --portability Same as --format=posix\n" +" -r, --reverse-sort Reverse the sense of the sort\n" +" -s, --print-armap Include index for symbols from archive members\n" +" --size-sort Sort symbols by size\n" +" -t, --radix=RADIX Use RADIX for printing symbol values\n" +" --target=BFDNAME Specify the target object format as BFDNAME\n" +" -u, --undefined-only Display only undefined symbols\n" +" -V, --version Display this program's version number\n" +" -X 32_64 (ignored)\n" +"\n" +msgstr "" +"\n" +" -a, --debug-syms afficher seulement les symboles de débug\n" +" -A, --print-file-name afficher le nom du fichier d'entrée avant chaque symbole\n" +" -B identique à --format=bsd\n" +" -C, --demangle[=STYLE] décoder les noms des symboles de bas niveau en noms de ceux\n" +" du niveau usager. Le STYLE, si spécifié, peut être `auto'\n" +" (par défaut), `gnu', 'lucid', 'arm', 'hp', 'edg' ou 'gnu-new-abi'\n" +" --no-demangle ne pas encoder par mutilation les noms des symboles de bas niveau\n" +" -D, --dynamic afficher les symboles dynamiques au lieu des symboles normaux\n" +" --defined-only afficher seulement les symboles définis\n" +" -e (ignoré)\n" +" -f, --format=FORMAT utiliser le FORMAT de sortie qui peut être `bsd' (par défaut),\n" +" `sysv' ou `posix'.\n" +" -g, --extern-only afficher seulement les symboles externes\n" +" -h, --help afficher cette information\n" +" -l, --line-numbers utiliser les informations de débug pour repérer le nom de fichier\n" +" et un numéro de ligne pour chaque symbole\n" +" -n, --numeric-sort trier les symboles numériquement par adresse\n" +" -o identique à -A\n" +" -p, --no-sort ne pas trier les symboles\n" +" -P, --portability identique à --format=posix\n" +" -r, --reverse-sort trier en ordre inverse\n" +" -s, --print-armap inclure un index pour les symboles à partir des membres de l'archive\n" +" --size-sort trier les symboles par leur taille\n" +" -t, --radix=BASE utiliser la BASE numérique pour afficher la valeur des symboles\n" +" --target=NOM_BFD spécifier la cible du format de l'objet par le NOM_BFD\n" +" -u, --undefined-only afficher seulement les symboles indéfinis\n" +" -V, --version afficher le nom et la version du logiciel\n" +" -X 32_64 (ignoré)\n" +"\n" + +#: nm.c:328 objdump.c:274 +#, c-format +msgid "Report bugs to %s.\n" +msgstr "Rapporter toutes anomalies à %s\n" + +#: nm.c:361 +#, c-format +msgid "%s: invalid radix" +msgstr "%s: base numérique invalide" + +#: nm.c:386 +#, c-format +msgid "%s: invalid output format" +msgstr "%s: format de sortie invalide" + +#: nm.c:493 +msgid "Only -X 32_64 is supported" +msgstr "Seul -X 32_64 est supporté" + +#: nm.c:535 +#, c-format +msgid "data size %ld" +msgstr "taille des donnée %ld" + +#: nm.c:1325 +#, c-format +msgid "\n\nUndefined symbols from %s:\n\n" +msgstr "\n\nSymboles indéfinis dans %s:\n\n" + +#: nm.c:1327 +#, c-format +msgid "\n\nSymbols from %s:\n\n" +msgstr "\n\nSymboles de %s:\n\n" + +#: nm.c:1328 nm.c:1382 +msgid "Name Value Class Type Size Line Section\n\n" +msgstr "Nom Valeur Classe Type Taille Ligne Section\n\n" + +#: nm.c:1379 +#, c-format +msgid "\n\nUndefined symbols from %s[%s]:\n\n" +msgstr "\n\nSymboles indéfinis dans %s[%s]:\n\n" + +#: nm.c:1381 +#, c-format +msgid "\n\nSymbols from %s[%s]:\n\n" +msgstr "\n\nSymboles de %s[%s]:\n\n" + +#: nm.c:1552 +msgid "\nArchive index:\n" +msgstr "\nIndexe de l'archive:\n" + +#: objcopy.c:322 +#, c-format +msgid "Usage: %s in-file [out-file]\n" +msgstr "Usage: %s fichier_d_entrée [fichier_de_sortie]\n" + +#: objcopy.c:323 objcopy.c:383 +msgid " The switches are:\n" +msgstr " Les commutateurs sont:\n" + +#: objcopy.c:324 +msgid "" +" -I --input-target Assume input file is in format \n" +" -O --output-target Create an output file in format \n" +" -F --target Set both input and output format to \n" +" --debugging Convert debugging information, if possible\n" +" -p --preserve-dates Copy modified/access timestamps to the output\n" +" -j --only-section Only copy section into the output\n" +" -R --remove-section Remove section from the output\n" +" -S --strip-all Remove all symbol and relocation information\n" +" -g --strip-debug Remove all debugging symbols\n" +" --strip-unneeded Remove all symbols not needed by relocations\n" +" -N --strip-symbol Do not copy symbol \n" +" -K --keep-symbol Only copy symbol \n" +" -L --localize-symbol Force symbol to be marked as a local\n" +" -W --weaken-symbol Force symbol to be marked as a weak\n" +" --weaken Force all global symbols to be marked as weak\n" +" -x --discard-all Remove all non-global symbols\n" +" -X --discard-locals Remove any compiler-generated symbols\n" +" -i --interleave Only copy one out of every bytes\n" +" -b --byte Select byte in every interleaved block\n" +" --gap-fill Fill gaps between sections with \n" +" --pad-to Pad the last section up to address \n" +" --set-start Set the start address to \n" +" {--change-start|--adjust-start} \n" +" Add to the start address\n" +" {--change-addresses|--adjust-vma} \n" +" Add to LMA, VMA and start addresses\n" +" {--change-section-address|--adjust-section-vma} {=|+|-}\n" +" Change LMA and VMA of section by \n" +" --change-section-lma {=|+|-}\n" +" Change the LMA of section by \n" +" --change-section-vma {=|+|-}\n" +" Change the VMA of section by \n" +" {--[no-]change-warnings|--[no-]adjust-warnings}\n" +" Warn if a named section does not exist\n" +" --set-section-flags =\n" +" Set section 's properties to \n" +" --add-section = Add section found in to output\n" +" --change-leading-char Force output format's leading character style\n" +" --remove-leading-char Remove leading character from global symbols\n" +" --redefine-sym = Redefine symbol name to \n" +" --srec-len Restrict the length of generated Srecords\n" +" --srec-forceS3 Restrict the type of generated Srecords to S3\n" +" -v --verbose List all object files modified\n" +" -V --version Display this program's version number\n" +" -h --help Display this output\n" +msgstr "" +" -I --input-target assumer que le fichier d'entrée est de format \n" +" -O --output-target créer un fichier de sortie de format \n" +" -F --target initialiser les formats d'entrée et de sortie à \n" +" --debugging convertir les informations de débug, si possible\n" +" -p --preserve-dates conserver les dates d'accès et de modification de fichiers\n" +" -j --only-section copier seulement la section dans le fichier de sortie\n" +" -R --remove-section retirer la section du fichier de sortie\n" +" -S --strip-all retirer tous les symboles et les informations de relocalisation\n" +" -g --strip-debug retirer tous les symboles de débug\n" +" --strip-unneeded retirer tous les symboles qui ne sont pas nécessaires pour la relocalisation\n" +" -N --strip-symbol ne pas copier le symbole \n" +" -K --keep-symbol copier seulement le symbole \n" +" -L --localize-symbol marquer le symbole comme symbole local\n" +" -W --weaken-symbol marquer le symbole comme symbole faible\n" +" --weaken marquer tous les symboles globaux comme symboles faibles\n" +" -x --discard-all retirer tous les symboles qui ne sont pas globaux\n" +" -X --discard-locals retirer tous les symboles générés par le compilateur\n" +" -i --interleave copier seulement 1 octet à chaque d'octets\n" +" -b --byte sélectionner l'octet dans chaque bloc intercalé\n" +" --gap-fill remplir les trous entre les sections avec la \n" +" --pad-to remplir la dernière section jusqu'à l'\n" +" --set-start utiliser l' de départ\n" +" {--change-start|--adjust-start} \n" +" ajouter l' à l'adresse de départ\n" +" {--change-addresses|--adjust-vma} \n" +" ajouter l' aux adresses LMA, VMA et de départ\n" +" {--change-section-address|--adjust-section-vma} {=|+|-}\n" +" modifier LMA et VMA de la section par la \n" +" --change-section-lma {=|+|-}\n" +" modifier LMA de la section par la \n" +" --change-section-vma {=|+|-}\n" +" modifier VMA de la section par la \n" +" {--[no-]change-warnings|--[no-]adjust-warnings}\n" +" avertir si le nom de la section n'existe pas\n" +" --set-section-flags =\n" +" initialiser les propriétés de la section avec les \n" +" --add-section = ajouter la section repérée dans le vers la sortie\n" +" --change-leading-char forcer le format de sortie du style des caractères de préfixe\n" +" --remove-leading-char retirer les caractères de préfixe des symboles globaux\n" +" --redefine-sym =\n" +" redéfinir le nom du symbole à \n" +" --srec-len restreindre la longueur des Srecords générés\n" +" --srec-forceS3 restreindre le type de Srecords générés à S3\n" +" -v --verbose afficher la liste de tous les objets modifiés\n" +" -V --version afficher le nom et la version du logiciel\n" +" -h --help afficher l'aide-mémoire\n" + +#: objcopy.c:382 +#, c-format +msgid "Usage: %s in-file(s)\n" +msgstr "Usage: %s fichier(s)_d_entrée\n" + +#: objcopy.c:384 +msgid "" +" -I --input-target Assume input file is in format \n" +" -O --output-target Create an output file in format \n" +" -F --target Set both input and output format to \n" +" -p --preserve-dates Copy modified/access timestamps to the output\n" +" -R --remove-section Remove section from the output\n" +" -s --strip-all Remove all symbol and relocation information\n" +" -g -S --strip-debug Remove all debugging symbols\n" +" --strip-unneeded Remove all symbols not needed by relocations\n" +" -N --strip-symbol Do not copy symbol \n" +" -K --keep-symbol Only copy symbol \n" +" -x --discard-all Remove all non-global symbols\n" +" -X --discard-locals Remove any compiler-generated symbols\n" +" -v --verbose List all object files modified\n" +" -V --version Display this program's version number\n" +" -h --help Display this output\n" +" -o Place stripped output into \n" +msgstr "" +" -I --input-target assumer que le format du fichier d'entrée est \n" +" -O --output-target créer un fichier de sortie ayant le format \n" +" -F --target utiliser à l'entrée et à la sortie le format \n" +" -p --preserve-dates préserver les dates d'accès et de modification lors de la copie\n" +" -R --remove-section retirer la section du fichier de sortie\n" +" -s --strip-all retirer tous les symboles et les informations de relocalisation\n" +" -g -S --strip-debug retirer tous les symboles de débug\n" +" --strip-unneeded retirer tous les symboles qui ne sont pas nécessaire à la relocalisation\n" +" -N --strip-symbol ne pas copier le symbole \n" +" -K --keep-symbol copier seulement le symbole \n" +" -x --discard-all retirer tous les symboles qui ne sont pas globaux\n" +" -X --discard-locals retirer tous les symboles qui sont générés par le compilateur\n" +" -v --verbose afficher tous les fichiers objets modifiés\n" +" -V --version afficher le nom et la version du logiciel\n" +" -h --help afficher l'aide-mémoire\n" +" -o placer la sortie élaguée dans le \n" + +#: objcopy.c:454 +#, c-format +msgid "unrecognized section flag `%s'" +msgstr "fanion de section non reconnnu `%s'" + +#: objcopy.c:455 +#, c-format +msgid "supported flags: %s" +msgstr "fanions supportés: %s" + +#: objcopy.c:712 +#, c-format +msgid "%s: Multiple redefinition of symbol \"%s\"" +msgstr "%s: re-définition multiples du symbole \"%s\"" + +#: objcopy.c:719 +#, c-format +msgid "%s: Symbol \"%s\" is target of more than one redefinition" +msgstr "%s: symbole \"%s\" cible plus d'une re-définition" + +#: objcopy.c:773 +#, c-format +msgid "copy from %s(%s) to %s(%s)\n" +msgstr "copie de %s(%s) vers %s(%s)\n" + +#: objcopy.c:792 +#, c-format +msgid "Warning: Output file cannot represent architecture %s" +msgstr "AVERTISSEMENT: fichier de sortie ne peut représenter l'architecture %s" + +#: objcopy.c:819 +#, c-format +msgid "can't create section `%s': %s" +msgstr "Ne peut créer la section `%s': %s" + +#: objcopy.c:905 +#, c-format +msgid "Can't fill gap after %s: %s" +msgstr "Ne peut remplir le vide après %s: %s" + +#: objcopy.c:930 +#, c-format +msgid "Can't add padding to %s: %s" +msgstr "Ne peut ajouter de remplissage pour %s: %s" + +#: objcopy.c:1068 +#, c-format +msgid "%s: error copying private BFD data: %s" +msgstr "%s: erreur de copie des données privées BFD: %s" + +#: objcopy.c:1102 +#, c-format +msgid "cannot mkdir %s for archive copying (error: %s)" +msgstr "ne peut créer le répertoire mkdir %s pour copie d'archivage (erreur: %s)" + +#: objcopy.c:1291 +msgid "making" +msgstr "génération" + +#: objcopy.c:1300 +msgid "size" +msgstr "taille" + +#: objcopy.c:1314 +msgid "vma" +msgstr "vma" + +#: objcopy.c:1340 +msgid "alignment" +msgstr "alignement" + +#: objcopy.c:1349 +msgid "flags" +msgstr "fanions" + +#: objcopy.c:1363 +msgid "private data" +msgstr "données privées" + +#: objcopy.c:1371 +#, c-format +msgid "%s: section `%s': error in %s: %s" +msgstr "%s: section `%s': erreur dans %s: %s" + +#: objcopy.c:1645 +#, c-format +msgid "%s: can't create debugging section: %s" +msgstr "%s: ne peut créer la section de débug: %s" + +#: objcopy.c:1660 +#, c-format +msgid "%s: can't set debugging section contents: %s" +msgstr "%s: ne peut initialiser le contenu de la section de débug: %s" + +#: objcopy.c:1669 +#, c-format +msgid "%s: don't know how to write debugging information for %s" +msgstr "%s: ne sait comment écrire les informations de débug de %s" + +#: objcopy.c:1775 +#, c-format +msgid "%s: cannot stat: %s" +msgstr "%s: ne peut évaluer par stat(): %s" + +#: objcopy.c:1825 +msgid "byte number must be non-negative" +msgstr "le nombre d'octet ne peut être négatif" + +#: objcopy.c:1831 +msgid "interleave must be positive" +msgstr "l'intercalage doit être positif" + +#: objcopy.c:1851 objcopy.c:1859 +#, c-format +msgid "%s both copied and removed" +msgstr "%s les deux doivent être copiés et enlevés" + +#: objcopy.c:1928 objcopy.c:1998 objcopy.c:2099 objcopy.c:2127 +#, c-format +msgid "bad format for %s" +msgstr "mauvais format pour %s" + +#: objcopy.c:1931 +#, c-format +msgid "cannot stat: %s: %s" +msgstr "ne peut évaluer par stat(): %s: %s" + +#: objcopy.c:1949 +#, c-format +msgid "cannot open: %s: %s" +msgstr "ne peut ouvrir: %s: %s" + +#: objcopy.c:1953 +#, c-format +msgid "%s: fread failed" +msgstr "%s: fread en échec" + +#: objcopy.c:2067 +#, c-format +msgid "Warning: truncating gap-fill from 0x%s to 0x%x" +msgstr "AVERTISSEMENT: réduction du remplissage de 0x%s à 0x%x" + +#: objcopy.c:2169 +msgid "byte number must be less than interleave" +msgstr "le nombre d'octets ne peut être plus petit que celui de l'intercalage" + +#: objcopy.c:2188 +#, c-format +msgid "Cannot stat: %s: %s" +msgstr "Ne peut évaluer par stat(): %s: %s" + +#: objcopy.c:2228 objcopy.c:2242 +#, c-format +msgid "%s %s%c0x%s never used" +msgstr "%s %s%c0x%s jamais utilisé" + +#: objdump.c:223 +#, c-format +msgid "Usage: %s OPTION... FILE...\n" +msgstr "Usage: %s OPTION... FICHIER...\n" + +#: objdump.c:224 +msgid "Display information from object FILE.\n" +msgstr "Afficher les informations depuis le FICHIER objet.\n" + +#: objdump.c:225 +msgid "\n At least one of the following switches must be given:\n" +msgstr "\n Au moins un des commutateurs suivants doit être fourni:\n" + +#: objdump.c:226 +msgid "" +" -a, --archive-headers Display archive header information\n" +" -f, --file-headers Display the contents of the overall file header\n" +" -p, --private-headers Display object format specific file header contents\n" +" -h, --[section-]headers Display the contents of the section headers\n" +" -x, --all-headers Display the contents of all headers\n" +" -d, --disassemble Display assembler contents of executable sections\n" +" -D, --disassemble-all Display assembler contents of all sections\n" +" -S, --source Intermix source code with disassembly\n" +" -s, --full-contents Display the full contents of all sections requested\n" +" -g, --debugging Display debug information in object file\n" +" -G, --stabs Display (in raw form) any STABS info in the file\n" +" -t, --syms Display the contents of the symbol table(s)\n" +" -T, --dynamic-syms Display the contents of the dynamic symbol table\n" +" -r, --reloc Display the relocation entries in the file\n" +" -R, --dynamic-reloc Display the dynamic relocation entries in the file\n" +" -V, --version Display this program's version number\n" +" -i, --info List object formats and architectures supported\n" +" -H, --help Display this information\n" +msgstr "" +" -a, --archive-headers afficher l'information de l'en-tête de l'archive\n" +" -f, --file-headers afficher le contenu global du fichier d'en-tête\n" +" -p, --private-headers afficher le format spécifique du contenu de l'en-tête de l'objet\n" +" -h, --[section-]headers afficher le contenu des en-têtes de section\n" +" -x, --all-headers afficher le contenu de toutes les en-têtes\n" +" -d, --disassemble afficher le contenu en assembleur des sections exécutables\n" +" -D, --disassemble-all afficher le contenu en assembleur de toutes les sections\n" +" -S, --source inter-mêler le code source avec le déassemblage\n" +" -s, --full-contents afficher le contenu complet de toutes les sections voulus\n" +" -g, --debugging afficher information de débug du fichier objet\n" +" -G, --stabs afficher (en format brut) toutes les infos à inclure du fichier\n" +" -t, --syms afficher le contenu de(s) table(s) de symboles\n" +" -T, --dynamic-syms afficher le contenu de la table dynamique de symboles\n" +" -r, --reloc afficher les entrées de relocalisation du fichier\n" +" -R, --dynamic-reloc afficher les entrées dynamiques de relocalisation du fichier\n" +" -V, --version afficher le nom et la version du logiciel\n" +" -i, --info afficher les formats objets et les architectures supportées\n" +" -H, --help afficher cette information\n" + +#: objdump.c:248 +msgid "\n The following switches are optional:\n" +msgstr "\n Les commutateurs suivants sont optionnels:\n" + +#: objdump.c:249 +msgid "" +" -b, --target=BFDNAME Specify the target object format as BFDNAME\n" +" -m, --architecture=MACHINE Specify the target architecture as MACHINE\n" +" -j, --section=NAME Only display information for section NAME\n" +" -M, --disassembler-options=OPT Pass text OPT on to the disassembler\n" +" -EB --endian=big Assume big endian format when disassembling\n" +" -EL --endian=little Assume little endian format when disassembling\n" +" --file-start-context Include context from start of file (with -S)\n" +" -l, --line-numbers Include line numbers and filenames in output\n" +" -C, --demangle[=STYLE] Decode mangled/processed symbol names\n" +" The STYLE, if specified, can be `auto', 'gnu',\n" +" 'lucid', 'arm', 'hp', 'edg', or 'gnu-new-abi'\n" +" -w, --wide Format output for more than 80 columns\n" +" -z, --disassemble-zeroes Do not skip blocks of zeroes when disassembling\n" +" --start-address=ADDR Only process data whoes address is >= ADDR\n" +" --stop-address=ADDR Only process data whoes address is <= ADDR\n" +" --prefix-addresses Print complete address alongside disassembly\n" +" --[no-]show-raw-insn Display hex alongside symbolic disassembly\n" +" --adjust-vma=OFFSET Add OFFSET to all displayed section addresses\n" +"\n" +msgstr "" +" -b, --target=NOMBFD spécifier le format de l'objet cible comme NOMBFD\n" +" -m, --architecture=MACHINE spécifier l'architecture cible de la MACHINE\n" +" -j, --section=NOM afficher seulement les informations de la section du NOM\n" +" -M, --disassembler-options=OPT relayer l'OPTion au dé-assembleur\n" +" -EB --endian=big assumer le format `big endian' lors du dé-assemblage\n" +" -EL --endian=little assumer le format `little endian' lors du dé-assemblage\n" +" --file-start-context inclure le contexte à partir du début du fichier (avec -S)\n" +" -l, --line-numbers inclure les numéros de ligne et les noms de fichier dans la sortie\n" +" -C, --demangle[=STYLE] décoder les mutilations/traitements des noms de symboles\n" +" Le STYLE, si spécifé, peut être `auto', 'gnu',\n" +" 'lucid', 'arm', 'hp', 'edg', ou 'gnu-new-abi'\n" +" -w, --wide formatter la sortie pour plus de 80 colonnes\n" +" -z, --disassemble-zeroes ne pas escamoter les blocs de zéros lors du dé-assemblage\n" +" --start-address=ADR traiter seulement les données dont les adresses sont >= ADR\n" +" --stop-address=ADR traiter seulement les données dont les adresses sont <= ADR\n" +" --prefix-addresses afficher les adresses complètes dans le dé-assemblage\n" +" --[no-]show-raw-insn afficher en hexadécimale le dé-assemblage symbolique\n" +" --adjust-vma=DÉCALAGE ajouter un DÉCALAGE à toutes les adresses affichés des sections\n" +"\n" + +#: objdump.c:419 +msgid "Sections:\n" +msgstr "Sections:\n" + +#: objdump.c:422 +msgid "Idx Name Size VMA LMA File off Algn" +msgstr "Idx Nom Taille VMA LMA Fich off Algn" + +#: objdump.c:424 +msgid "Idx Name Size VMA LMA File off Algn" +msgstr "Idx Nom Taille VMA LMA Fich off Algn" + +#: objdump.c:428 +msgid " Flags" +msgstr " Fanions" + +#: objdump.c:478 +#, c-format +msgid "%s: not a dynamic object" +msgstr "%s: n'est pas un objet dynamique" + +#: objdump.c:494 +#, c-format +msgid "%s: No dynamic symbols" +msgstr "%s: aucun symboles dynamiques" + +#: objdump.c:1197 +msgid "Out of virtual memory" +msgstr "Mémoire virtuelle épuisée" + +#: objdump.c:1616 +#, c-format +msgid "Can't use supplied machine %s" +msgstr "Ne peut utiliser la machine %s" + +#: objdump.c:1634 +#, c-format +msgid "Can't disassemble for architecture %s\n" +msgstr "Ne peut déassembler pour l'architecture %s\n" + +#: objdump.c:1716 +#, c-format +msgid "Disassembly of section %s:\n" +msgstr "Déassemblage de la section %s:\n" + +#: objdump.c:1890 +#, c-format +msgid "No %s section present\n\n" +msgstr "Aucune section %s présente\n\n" + +#: objdump.c:1897 +#, c-format +msgid "%s has no %s section" +msgstr "%s n'as pas de section %s" + +#: objdump.c:1911 +#, c-format +msgid "Reading %s section of %s failed: %s" +msgstr "Lecture de la section %s de %s a échouée: %s" + +#: objdump.c:1923 +#, c-format +msgid "Reading %s section of %s failed: %s\n" +msgstr "Lecture de la section %s de %s a échouée: %s\n" + +#: objdump.c:1966 +#, c-format +msgid "Contents of %s section:\n\n" +msgstr "Contenu de la section %s:\n\n" + +#: objdump.c:2066 +#, c-format +msgid "architecture: %s, " +msgstr "architecture: %s, " + +#: objdump.c:2069 +#, c-format +msgid "flags 0x%08x:\n" +msgstr "fanions 0x%08x:\n" + +#: objdump.c:2082 +msgid "\nstart address 0x" +msgstr "\nadresse de départ 0x" + +#: objdump.c:2114 +#, c-format +msgid "\n%s: file format %s\n" +msgstr "\n%s: format de fichier %s\n" + +#: objdump.c:2156 +#, c-format +msgid "%s: printing debugging information failed" +msgstr "%s: échec d'affichage des information de débug" + +#: objdump.c:2233 +#, c-format +msgid "In archive %s:\n" +msgstr "Dans l'archive %s:\n" + +#: objdump.c:2285 +#, c-format +msgid "Contents of section %s:\n" +msgstr "Contenu de la section %s:\n" + +#: objdump.c:2798 +#, c-format +msgid "BFD header file version %s\n" +msgstr "Version de l'en-tête du fichier BFD %s\n" + +#: objdump.c:2882 +msgid "unrecognized -E option" +msgstr "option -E non reconnue" + +#: objdump.c:2893 +#, c-format +msgid "unrecognized --endian type `%s'" +msgstr "type non reconnu --endian `%s'" + +#: rdcoff.c:205 +#, c-format +msgid "parse_coff_type: Bad type code 0x%x" +msgstr "parse_coff_type: mauvais type de code 0x%x" + +#: rdcoff.c:423 rdcoff.c:531 rdcoff.c:730 +#, c-format +msgid "bfd_coff_get_syment failed: %s" +msgstr "bfd_coff_get_syment en échec: %s" + +#: rdcoff.c:439 rdcoff.c:750 +#, c-format +msgid "bfd_coff_get_auxent failed: %s" +msgstr "bfd_coff_get_auxent en échec: %s" + +#: rdcoff.c:817 +#, c-format +msgid "%ld: .bf without preceding function" +msgstr "%ld: .bf aucune fonction qui précède" + +#: rdcoff.c:867 +#, c-format +msgid "%ld: unexpected .ef\n" +msgstr "%ld: .ef inattendu\n" + +#: rddbg.c:87 +#, c-format +msgid "%s: no recognized debugging information" +msgstr "%s: aucune information de débug reconnue" + +#: rddbg.c:410 +msgid "Last stabs entries before error:\n" +msgstr "Dernière entrées à inclure avant erreur:\n" + +#: readelf.c:260 +#, c-format +msgid "Unable to seek to start of %s at %x\n" +msgstr "Incapable de repérer le début de %s à %x\n" + +#: readelf.c:268 +#, c-format +msgid "Out of memory allocating %d bytes for %s\n" +msgstr "Mémoire épuisée lors de l'allocation de %d octets pour %s\n" + +#: readelf.c:274 +#, c-format +msgid "Unable to read in %d bytes of %s\n" +msgstr "Incapable de lire %d octets de %s\n" + +#: readelf.c:284 +#, c-format +msgid "Unable to seek to %x for %s\n" +msgstr "Incapable de repérer %x de %s\n" + +#: readelf.c:289 +#, c-format +msgid "Unable to read data at %x for %s\n" +msgstr "Incapable de lire les données à %x de %s\n" + +#: readelf.c:304 readelf.c:330 +#, c-format +msgid "%s: Error: " +msgstr "%s: ERREUR: " + +#: readelf.c:316 readelf.c:345 +#, c-format +msgid "%s: Warning: " +msgstr "%s: AVERTISSEMENT: " + +#: readelf.c:395 readelf.c:533 +#, c-format +msgid "Unhandled data length: %d\n" +msgstr "Taille de données non traitées: %d\n" + +#: readelf.c:597 +msgid "Don't know about relocations on this machine architecture\n" +msgstr "Ne connaît pas de méthode pour la relocalisation sur l'architecture de cette machine\n" + +#: readelf.c:637 readelf.c:666 readelf.c:698 readelf.c:726 +msgid "out of memory parsing relocs" +msgstr "Mémoire épuisée lors de l'analyse syntaxique des relocalisations" + +#: readelf.c:744 +msgid " Offset Info Type Symbol's Value Symbol's Name Addend\n" +msgstr " Décalage Info Type Val. symboles Noms des symboles Addenda\n" + +#: readelf.c:747 +msgid " Offset Info Type Symbol's Value Symbol's Name\n" +msgstr " Décalage Info Type Val. symboles Noms des symboles\n" + +#: readelf.c:907 readelf.c:909 +#, c-format +msgid "unrecognised: %-7lx" +msgstr "non reconnue: %-7lx" + +#: readelf.c:934 +#, c-format +msgid "" +msgstr "" + +#: readelf.c:1147 +#, c-format +msgid "Processor Specific: %lx" +msgstr "Spécificités du processeur: %lx" + +#: readelf.c:1166 +#, c-format +msgid "Operating System specific: %lx" +msgstr "Spécificités du systèmes d'exploitation: %lx" + +#: readelf.c:1169 readelf.c:1677 +#, c-format +msgid ": %lx" +msgstr ": %lx" + +#: readelf.c:1183 +msgid "NONE (None)" +msgstr "NONE (Aucun)" + +#: readelf.c:1184 +msgid "REL (Relocatable file)" +msgstr "REL (Fichier de relocalisation)" + +#: readelf.c:1185 +msgid "EXEC (Executable file)" +msgstr "EXEC (fichier exécutable)" + +#: readelf.c:1186 +msgid "DYN (Shared object file)" +msgstr "DYN (fichier objet partagé)" + +#: readelf.c:1187 +msgid "CORE (Core file)" +msgstr "CORE (fichier core)" + +#: readelf.c:1191 +#, c-format +msgid "Processor Specific: (%x)" +msgstr "Spécificités du processor: (%x)" + +#: readelf.c:1193 +#, c-format +msgid "OS Specific: (%x)" +msgstr "Spécificités du système d'exploitation: (%x)" + +#: readelf.c:1195 readelf.c:1281 readelf.c:1811 +#, c-format +msgid ": %x" +msgstr ": %x" + +#: readelf.c:1208 +msgid "None" +msgstr "Aucun" + +#: readelf.c:1849 +msgid "Usage: readelf {options} elf-file(s)\n" +msgstr "Usage: readelf {options} fichier(s)-elf\n" + +#: readelf.c:1850 +msgid " Options are:\n" +msgstr " Les options sont:\n" + +#: readelf.c:1851 +msgid " -a or --all Equivalent to: -h -l -S -s -r -d -V -A -I\n" +msgstr " -a ou --all équivalent à: -h -l -S -s -r -d -V -A -I\n" + +#: readelf.c:1852 +msgid " -h or --file-header Display the ELF file header\n" +msgstr " -h ou --file-header afficher l'en-tête du fichier ELF\n" + +#: readelf.c:1853 +msgid " -l or --program-headers or --segments\n" +msgstr " -l ou --program-headers ou --segments\n" + +#: readelf.c:1854 +msgid " Display the program headers\n" +msgstr " afficher les en-têtes du programme\n" + +#: readelf.c:1855 +msgid " -S or --section-headers or --sections\n" +msgstr " -S ou --section-headers ou --sections\n" + +#: readelf.c:1856 +msgid " Display the sections' header\n" +msgstr " afficher l'en-tête des sections\n" + +#: readelf.c:1857 +msgid " -e or --headers Equivalent to: -h -l -S\n" +msgstr " -e ou --headers équivalent à: -h -l -S\n" + +#: readelf.c:1858 +msgid " -s or --syms or --symbols Display the symbol table\n" +msgstr " -s ou --syms ou --symbols afficher la table de symboles\n" + +#: readelf.c:1859 +msgid " -n or --notes Display the core notes (if present)\n" +msgstr " -n ou --notes afficher les notes du core (si disponible)\n" + +#: readelf.c:1860 +msgid " -r or --relocs Display the relocations (if present)\n" +msgstr " -r ou --relocs afficher les relocalisations (si disponibles)\n" + +#: readelf.c:1861 +msgid " -d or --dynamic Display the dynamic segment (if present)\n" +msgstr " -d ou --dynamic afficher le segement dynamique (si disponible)\n" + +#: readelf.c:1862 +msgid " -V or --version-info Display the version sections (if present)\n" +msgstr " -V ou --version-info afficher la version des sections (si disponible)\n" + +#: readelf.c:1863 +msgid " -A or --arch-specific Display architecture specific information (if any).\n" +msgstr " -A ou --arch-specific afficher les informations de spécificités d'architecture (si disponible).\n" + +#: readelf.c:1864 +msgid " -D or --use-dynamic Use the dynamic section info when displaying symbols\n" +msgstr " -D ou --use-dynamic utiliser les infos de la section dynamique lors de l'affichage des symboles\n" + +#: readelf.c:1865 +msgid " -x or --hex-dump=\n" +msgstr " -x ou --hex-dump=\n" + +#: readelf.c:1866 +msgid " Dump the contents of section \n" +msgstr " vidanger le contenu de la section \n" + +#: readelf.c:1867 +msgid " -w[liaprf] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=frames]\n" +msgstr " -w[liaprf] ou --debug-dump[=ligne,=info,=abbrev,=nompub,=plages,=trames]\n" + +#: readelf.c:1868 +msgid " Display the contents of DWARF2 debug sections\n" +msgstr " afficher le contenu des sections DWARF2 de débug\n" + +#: readelf.c:1870 +msgid " -i or --instruction-dump=\n" +msgstr " -i ou --instruction-dump=\n" + +#: readelf.c:1871 +msgid " Disassemble the contents of section \n" +msgstr " déassembler le contenu de la section \n" + +#: readelf.c:1873 +msgid " -I or --histogram Display histogram of bucket list lengths\n" +msgstr " -I ou --histogram afficher l'histogramme of bucket list lengths\n" + +#: readelf.c:1874 +msgid " -v or --version Display the version number of readelf\n" +msgstr " -v ou --version afficher le numéro de version de readelf\n" + +#: readelf.c:1875 +msgid " -H or --help Display this information\n" +msgstr " -H ou --help afficher cette information\n" + +#: readelf.c:1893 +msgid "Out of memory allocating dump request table." +msgstr "Mémoire épuisée allocation d'une table pour requêtes de vidange" + +#: readelf.c:2033 +#, c-format +msgid "Unrecognised debug option '%s'\n" +msgstr "Option de débug non reconnue '%s'\n" + +#: readelf.c:2058 +#, c-format +msgid "Invalid option '-%c'\n" +msgstr "Option invalide '-%c'\n" + +#: readelf.c:2071 +msgid "Nothing to do.\n" +msgstr "Rien à faire.\n" + +#: readelf.c:2084 readelf.c:2101 readelf.c:3740 +msgid "none" +msgstr "aucun" + +#: readelf.c:2085 +msgid "ELF32" +msgstr "ELF32" + +#: readelf.c:2086 +msgid "ELF64" +msgstr "ELF64" + +#: readelf.c:2088 readelf.c:2105 readelf.c:2133 +#, c-format +msgid "" +msgstr "" + +#: readelf.c:2102 +msgid "2's complement, little endian" +msgstr "complément à 2, système à octets de poids faible d'abord (little endian)" + +#: readelf.c:2103 +msgid "2's complement, big endian" +msgstr "complément à 2, système à octets de poids fort d'abord (big endian)" + +#: readelf.c:2118 +msgid "UNIX - System V" +msgstr "UNIX - System V" + +#: readelf.c:2119 +msgid "UNIX - HP-UX" +msgstr "UNIX - HP-UX" + +#: readelf.c:2120 +msgid "UNIX - NetBSD" +msgstr "UNIX - NetBSD" + +#: readelf.c:2121 +msgid "UNIX - Linux" +msgstr "UNIX - Linux" + +#: readelf.c:2122 +msgid "GNU/Hurd" +msgstr "GNU/Hurd" + +#: readelf.c:2123 +msgid "UNIX - Solaris" +msgstr "UNIX - Solaris" + +#: readelf.c:2124 +msgid "UNIX - AIX" +msgstr "UNIX - AIX" + +#: readelf.c:2125 +msgid "UNIX - IRIX" +msgstr "UNIX - IRIX" + +#: readelf.c:2126 +msgid "UNIX - FreeBSD" +msgstr "UNIX - FreeBSD" + +#: readelf.c:2127 +msgid "UNIX - TRU64" +msgstr "UNIX - TRU64" + +#: readelf.c:2128 +msgid "Novell - Modesto" +msgstr "Novell - Modesto" + +#: readelf.c:2129 +msgid "UNIX - OpenBSD" +msgstr "UNIX - OpenBSD" + +#: readelf.c:2130 +msgid "Standalone App" +msgstr "Tache autonome" + +#: readelf.c:2131 +msgid "ARM" +msgstr "ARM" + +#: readelf.c:2148 +msgid "Not an ELF file - it has the wrong magic bytes at the start\n" +msgstr "N'est pas un fichier ELF - a les mauvais octets magiques au départ\n" + +#: readelf.c:2156 +msgid "ELF Header:\n" +msgstr "En-tête ELF:\n" + +#: readelf.c:2157 +msgid " Magic: " +msgstr " Magique: " + +#: readelf.c:2161 +#, c-format +msgid " Class: %s\n" +msgstr " Classe: %s\n" + +#: readelf.c:2163 +#, c-format +msgid " Data: %s\n" +msgstr " Données: %s\n" + +#: readelf.c:2165 +#, c-format +msgid " Version: %d %s\n" +msgstr " Version: %d %s\n" + +#: readelf.c:2172 +#, c-format +msgid " OS/ABI: %s\n" +msgstr " OS/ABI: %s\n" + +#: readelf.c:2174 +#, c-format +msgid " ABI Version: %d\n" +msgstr " Version ABI: %d\n" + +#: readelf.c:2176 +#, c-format +msgid " Type: %s\n" +msgstr " Type: %s\n" + +#: readelf.c:2178 +#, c-format +msgid " Machine: %s\n" +msgstr " Machine: %s\n" + +#: readelf.c:2180 +#, c-format +msgid " Version: 0x%lx\n" +msgstr " Version: 0x%lx\n" + +#: readelf.c:2183 +msgid " Entry point address: " +msgstr " Adresse du point d'entrée: " + +#: readelf.c:2185 +msgid "\n Start of program headers: " +msgstr "\n Début des en-têtes de programme: " + +#: readelf.c:2187 +msgid "" +" (bytes into file)\n" +" Start of section headers: " +msgstr "" +" (octets dans le fichier)\n" +" Début des en-têtes de section: " + +#: readelf.c:2189 +msgid " (bytes into file)\n" +msgstr " (octets dans le fichier)\n" + +#: readelf.c:2191 +#, c-format +msgid " Flags: 0x%lx%s\n" +msgstr " Fanions: 0x%lx%s\n" + +#: readelf.c:2194 +#, c-format +msgid " Size of this header: %ld (bytes)\n" +msgstr " Taille de cet en-tête: %ld (bytes)\n" + +#: readelf.c:2196 +#, c-format +msgid " Size of program headers: %ld (bytes)\n" +msgstr " Taille de l'en-tête du programme: %ld (bytes)\n" + +#: readelf.c:2198 +#, c-format +msgid " Number of program headers: %ld\n" +msgstr " Nombre d'en-tête du programme: %ld\n" + +#: readelf.c:2200 +#, c-format +msgid " Size of section headers: %ld (bytes)\n" +msgstr " Taille des en-têtes de section: %ld (bytes)\n" + +#: readelf.c:2202 +#, c-format +msgid " Number of section headers: %ld\n" +msgstr " Nombre d'en-têtes de section: %ld\n" + +#: readelf.c:2204 +#, c-format +msgid " Section header string table index: %ld\n" +msgstr " Table d'indexes des chaînes d'en-tête de section: %ld\n" + +#: readelf.c:2289 +msgid "\nThere are no program headers in this file.\n" +msgstr "\nIl n'y a pas d'en-têtes de programme dans ce fichier.\n" + +#: readelf.c:2295 +#, c-format +msgid "\nElf file type is %s\n" +msgstr "\nType de fichier ELF est %s\n" + +#: readelf.c:2296 +msgid "Entry point " +msgstr "Point d'entrée " + +#: readelf.c:2298 +#, c-format +msgid "\nThere are %d program headers, starting at offset " +msgstr "\nIl y a %d en-têtes de programme, débutant à l'adresse de décalage" + +#: readelf.c:2309 readelf.c:2485 readelf.c:2527 readelf.c:2570 readelf.c:2611 +#: readelf.c:3133 readelf.c:3174 readelf.c:3350 readelf.c:4358 readelf.c:4372 +#: readelf.c:7741 readelf.c:7781 +msgid "Out of memory\n" +msgstr "Mémoire épuisée\n" + +#: readelf.c:2327 +#, c-format +msgid "\nProgram Header%s:\n" +msgstr "\nEn-tête de programme%s:\n" + +#: readelf.c:2331 +msgid " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n" +msgstr " Type Décalage Adr. vir. Adr.phys. T.Fich. T.Mém. Fan Alignement\n" + +#: readelf.c:2335 +msgid " Type Offset VirtAddr PhysAddr\n" +msgstr " Type Décalage Adr.virt Adr.phys.\n" + +#: readelf.c:2337 +msgid " FileSiz MemSiz Flags Align\n" +msgstr " Taille fichier Taille mémoire Fanion Alignement\n" + +#: readelf.c:2395 +msgid "more than one dynamic segment\n" +msgstr "plus d'un segment dynamique\n" + +#: readelf.c:2403 +msgid "Unable to find program interpreter name\n" +msgstr "Incapable de repérer le nom de l'interpréteur du programme\n" + +#: readelf.c:2410 +#, c-format +msgid "\n [Requesting program interpreter: %s]" +msgstr "\n [Réquisition de l'interpréteur de programme: %s]" + +#: readelf.c:2428 +msgid "\n Section to Segment mapping:\n" +msgstr "\n Section à la projection de segement:\n" + +#: readelf.c:2429 +msgid " Segment Sections...\n" +msgstr " Sections de segment...\n" + +#: readelf.c:2693 +msgid "\nThere are no sections in this file.\n" +msgstr "\nIl n'y a pas de section dans ce fichier.\n" + +#: readelf.c:2699 +#, c-format +msgid "There are %d section headers, starting at offset 0x%lx:\n" +msgstr "Il y a %d en-têtes de section, débutant à l'adresse de décalage 0x%lx:\n" + +#: readelf.c:2739 +msgid "File contains multiple dynamic symbol tables\n" +msgstr "Le fichier contient plusieurs tables dynamiques de symboles\n" + +#: readelf.c:2752 +msgid "File contains multiple dynamic string tables\n" +msgstr "Le fichier contient plusieurs tables de chaînes dynamiques\n" + +#: readelf.c:2786 +#, c-format +msgid "\nSection Header%s:\n" +msgstr "\nEn-têtes de section%s:\n" + +#: readelf.c:2790 +msgid " [Nr] Name Type Addr Off Size ES Flg Lk Inf Al\n" +msgstr " [Nr] Nom Type Adr Décala.Taille ES Fan LN Inf Al\n" + +#: readelf.c:2793 +msgid " [Nr] Name Type Address Offset\n" +msgstr " [Nr] Nom Type Adresse Décalage\n" + +#: readelf.c:2794 +msgid " Size EntSize Flags Link Info Align\n" +msgstr " Taille TaillEntré Fanion Lien Info Alignement\n" + +#: readelf.c:2841 +msgid "Key to Flags:\n" +msgstr "Clé des fanions:\n" + +#: readelf.c:2842 +msgid " W (write), A (alloc), X (execute), M (merge), S (strings)\n" +msgstr " W (écrit), A (alloc), X (exécution), M (fusion), S (chaînes)\n" + +#: readelf.c:2843 +msgid " I (info), L (link order), G (group), x (unknown)\n" +msgstr " I (info), L (ordre de liens), G (groupe), x (inconnu)\n" + +#: readelf.c:2844 +msgid " O (extra OS processing required) o (OS specific), p (processor specific)\n" +msgstr " O (traitement additionnel sys. exploit. requis) o (spécificités sys. esploit.), p (spécificités de processeur)\n" + +#: readelf.c:2902 +#, c-format +msgid "\nRelocation section at offset 0x%lx contains %ld bytes:\n" +msgstr "\nSection de relocalisation à l'adresse de décalage 0x%lx contient %ld octets:\n" + +#: readelf.c:2909 +msgid "\nThere are no dynamic relocations in this file.\n" +msgstr "\nIl n'y a pas d'informations de relocalisation dynamique dans ce fichier.\n" + +#: readelf.c:2937 +msgid "\nRelocation section " +msgstr "\nSection de relocalisation " + +#: readelf.c:2944 +#, c-format +msgid " at offset 0x%lx contains %lu entries:\n" +msgstr " à l'adresse de décalage 0x%lx contient %lu entrées:\n" + +#: readelf.c:2972 +msgid "\nThere are no relocations in this file.\n" +msgstr "\nIl n'y a pas de relocalisation dans ce fichier.\n" + +#: readelf.c:3227 +msgid "\nThere is no dynamic segment in this file.\n" +msgstr "\nIl n'y a pas de segement dynamique dans ce fichier.\n" + +#: readelf.c:3261 +msgid "Unable to seek to end of file!" +msgstr "Incapable de repérer la fin du fichier!" + +#: readelf.c:3270 +msgid "Unable to determine the number of symbols to load\n" +msgstr "Incapable de déterminer le nombre de symboles à charger\n" + +#: readelf.c:3300 +msgid "Unable to seek to end of file\n" +msgstr "Incapable de repérer la fin du fichier\n" + +#: readelf.c:3306 +msgid "Unable to determine the length of the dynamic string table\n" +msgstr "Incapable de déterminer la longueur de la table de chaînes dynamiques\n" + +#: readelf.c:3367 +#, c-format +msgid "\nDynamic segment at offset 0x%x contains %ld entries:\n" +msgstr "\nSegment dynamique à l'adresse de décalage 0x%x contient %ld entrées:\n" + +#: readelf.c:3370 +msgid " Tag Type Name/Value\n" +msgstr " Étiquettes Type Nom/Valeur\n" + +#: readelf.c:3406 +msgid "Auxiliary library" +msgstr "Librairie auxiliaire" + +#: readelf.c:3410 +msgid "Filter library" +msgstr "Librairie de filtre" + +#: readelf.c:3414 +msgid "Configuration file" +msgstr "Fichier de configuration" + +#: readelf.c:3418 +msgid "Dependency audit library" +msgstr "Librairie d'audit des dépendances" + +#: readelf.c:3422 +msgid "Audit library" +msgstr "Librairie des audits" + +#: readelf.c:3440 readelf.c:3466 readelf.c:3492 +msgid "Flags:" +msgstr "Fanions:" + +#: readelf.c:3442 readelf.c:3468 readelf.c:3494 +msgid " None\n" +msgstr "Aucun\n" + +#: readelf.c:3613 +#, c-format +msgid "Shared library: [%s]" +msgstr "Librairie partagées: [%s]" + +#: readelf.c:3616 +msgid " program interpreter" +msgstr " programme interpréteur" + +#: readelf.c:3620 +#, c-format +msgid "Library soname: [%s]" +msgstr "Librairie soname: [%s]" + +#: readelf.c:3624 +#, c-format +msgid "Library rpath: [%s]" +msgstr "Librairie rpath: [%s]" + +#: readelf.c:3628 +#, c-format +msgid "Library runpath: [%s]" +msgstr "Librairie runpath:[%s]" + +#: readelf.c:3689 +#, c-format +msgid "Not needed object: [%s]\n" +msgstr "Objet non nécessaire: [%s]\n" + +#: readelf.c:3786 +#, c-format +msgid "\nVersion definition section '%s' contains %ld entries:\n" +msgstr "\nSection des définitions de version '%s' contient %ld entrées:\n" + +#: readelf.c:3789 +msgid " Addr: 0x" +msgstr " Adr: 0x" + +#: readelf.c:3791 readelf.c:3979 +#, c-format +msgid " Offset: %#08lx Link: %lx (%s)\n" +msgstr " Décalage: %#08lx Lien: %lx (%s)\n" + +#: readelf.c:3821 +#, c-format +msgid " %#06x: Rev: %d Flags: %s" +msgstr " %#06x: Rev: %d Fanions: %s" + +#: readelf.c:3824 +#, c-format +msgid " Index: %d Cnt: %d " +msgstr " Index: %d Compteur: %d " + +#: readelf.c:3835 +#, c-format +msgid "Name: %s\n" +msgstr "Nom: %s\n" + +#: readelf.c:3837 +#, c-format +msgid "Name index: %ld\n" +msgstr "Nom de l'index: %ld\n" + +#: readelf.c:3852 +#, c-format +msgid " %#06x: Parent %d: %s\n" +msgstr " %#06x: Parent %d: %s\n" + +#: readelf.c:3855 +#, c-format +msgid " %#06x: Parent %d, name index: %ld\n" +msgstr " %#06x: Parent %d, name index: %ld\n" + +#: readelf.c:3874 +#, c-format +msgid "\nVersion needs section '%s' contains %ld entries:\n" +msgstr "\nVersion nécessitant la section '%s' contenant %ld entrées:\n" + +#: readelf.c:3877 +msgid " Addr: 0x" +msgstr " Adr: 0x" + +#: readelf.c:3879 +#, c-format +msgid " Offset: %#08lx Link to section: %ld (%s)\n" +msgstr " Décalage: %#08lx Lien vers la section: %ld (%s)\n" + +#: readelf.c:3905 +#, c-format +msgid " %#06x: Version: %d" +msgstr " %#06x: Version: %d" + +#: readelf.c:3908 +#, c-format +msgid " File: %s" +msgstr " Fichier: %s" + +#: readelf.c:3910 +#, c-format +msgid " File: %lx" +msgstr " Fichier: %lx" + +#: readelf.c:3912 +#, c-format +msgid " Cnt: %d\n" +msgstr " Compteur: %d\n" + +#: readelf.c:3930 +#, c-format +msgid " %#06x: Name: %s" +msgstr " %#06x: Nom: %s" + +#: readelf.c:3933 +#, c-format +msgid " %#06x: Name index: %lx" +msgstr " %#06x: Nom de l'index: %lx" + +#: readelf.c:3936 +#, c-format +msgid " Flags: %s Version: %d\n" +msgstr " Fanions: %s Version: %d\n" + +#: readelf.c:3974 +#, c-format +msgid "\nVersion symbols section '%s' contains %d entries:\n" +msgstr "\nLa version de section '%s' des symboles contient %d entrée:\n" + +#: readelf.c:3977 +msgid " Addr: " +msgstr " Adr: " + +#: readelf.c:4007 +msgid " 0 (*local*) " +msgstr " 0 (*local*) " + +#: readelf.c:4011 +msgid " 1 (*global*) " +msgstr " 1 (*global*) " + +#: readelf.c:4233 +msgid "\nNo version information found in this file.\n" +msgstr "\nAucune information de version repérée dans ce fichier.\n" + +#: readelf.c:4251 readelf.c:4286 +#, c-format +msgid ": %d" +msgstr ": %d" + +#: readelf.c:4253 readelf.c:4298 +#, c-format +msgid ": %d" +msgstr ": %d" + +#: readelf.c:4255 readelf.c:4301 +#, c-format +msgid ": %d" +msgstr ": %d" + +#: readelf.c:4364 +msgid "Unable to read in dynamic data\n" +msgstr "Incapable de lire les données dynamiques\n" + +#: readelf.c:4406 +msgid "Unable to seek to start of dynamic information" +msgstr "Incapable de repérer le début des informations dynamiques" + +#: readelf.c:4412 +msgid "Failed to read in number of buckets\n" +msgstr "Échec de lecture parmi tous les baquets\n" + +#: readelf.c:4418 +msgid "Failed to read in number of chains\n" +msgstr "Échec de lecture du nombre de chaînes\n" + +#: readelf.c:4438 +msgid "\nSymbol table for image:\n" +msgstr "\nTable de symbole de l'image:\n" + +#: readelf.c:4440 +msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n" +msgstr " Nb Buc: Valeur Taille Type Lien Vis Ndx Nom\n" + +#: readelf.c:4442 +msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n" +msgstr " Nb Buc: Valeur Taille Type Lien Vis Ndx Nom\n" + +#: readelf.c:4486 +#, c-format +msgid "\nSymbol table '%s' contains %lu entries:\n" +msgstr "\nTable de symboles '%s' contient %lu entrées:\n" + +#: readelf.c:4490 +msgid " Num: Value Size Type Bind Vis Ndx Name\n" +msgstr " Num: Valeur Tail Type Lien Vis Ndx Nom\n" + +#: readelf.c:4492 +msgid " Num: Value Size Type Bind Vis Ndx Name\n" +msgstr " Num: Valeur Tail Type Lien Vis Ndx Nom\n" + +#: readelf.c:4601 +msgid "bad dynamic symbol" +msgstr "mauvais symbole dynamique" + +#: readelf.c:4660 +msgid "\nDynamic symbol information is not available for displaying symbols.\n" +msgstr "\nL'information dynamique des symboles n'est pas disponible pour l'affichage des symboles.\n" + +#: readelf.c:4672 +#, c-format +msgid "\nHistogram for bucket list length (total of %d buckets):\n" +msgstr "\nHistogramme de la longeur de la liste des baquets (total de %d baquets):\n" + +#: readelf.c:4674 +msgid " Length Number %% of total Coverage\n" +msgstr " Long. Nombre %% de couverture totale\n" + +#: readelf.c:4679 readelf.c:4698 readelf.c:7423 readelf.c:7616 +msgid "Out of memory" +msgstr "Mémoire épuisée" + +#: readelf.c:4747 +#, c-format +msgid "\nDynamic info segment at offset 0x%lx contains %d entries:\n" +msgstr "\nSegment d'informations dynamiques à l'adresse de décalage 0x%lx contient %d entrées:\n" + +#: readelf.c:4750 +msgid " Num: Name BoundTo Flags\n" +msgstr " Num: Nom Lier à Fanions\n" + +#: readelf.c:4798 +#, c-format +msgid "\nAssembly dump of section %s\n" +msgstr "\nVidange de la section assembleur %s\n" + +#: readelf.c:4821 +#, c-format +msgid "\nSection '%s' has no data to dump.\n" +msgstr "\nLa section '%s' n'a pas de données à être videngé.\n" + +#: readelf.c:4826 +#, c-format +msgid "\nHex dump of section '%s':\n" +msgstr "\nVidange hexadécimale de la section '%s':\n" + +#: readelf.c:4978 +msgid "badly formed extended line op encountered!" +msgstr "ligne rencontrée de l'extension de l'opérateur est mal composée" + +#: readelf.c:4985 +#, c-format +msgid " Extended opcode %d: " +msgstr " Code op étendu %d: " + +#: readelf.c:4990 +msgid "End of Sequence\n\n" +msgstr "Fin de séquence\n\n" + +#: readelf.c:4996 +#, c-format +msgid "set Address to 0x%lx\n" +msgstr "initialisé l'adresse à 0x%lx\n" + +#: readelf.c:5001 +msgid " define new File Table entry\n" +msgstr " définir une entrée pour un nouveau fichier de table\n" + +#: readelf.c:5002 readelf.c:5124 +msgid " Entry\tDir\tTime\tSize\tName\n" +msgstr " Entrée\tRép.\tDate\tTaille\tNom\n" + +#: readelf.c:5004 +#, c-format +msgid " %d\t" +msgstr " %d\t" + +#: readelf.c:5007 readelf.c:5009 readelf.c:5011 readelf.c:5136 readelf.c:5138 +#: readelf.c:5140 +#, c-format +msgid "%lu\t" +msgstr "%lu\t" + +#: readelf.c:5012 +#, c-format +msgid "%s\n\n" +msgstr "%s\n\n" + +#: readelf.c:5016 +#, c-format +msgid "UNKNOWN: length %d\n" +msgstr "UNKNOWN: longueur %d\n" + +#: readelf.c:5042 +#, c-format +msgid "\nDump of debug contents of section %s:\n\n" +msgstr "\nVidange du contenu de débug de la section %s:\n\n" + +#: readelf.c:5054 +msgid "The line info appears to be corrupt - the section is too small\n" +msgstr "La ligne d'information semble corrompue - la section est trop petite\n" + +#: readelf.c:5062 +msgid "Only DWARF version 2 line info is currently supported.\n" +msgstr "Seul la ligne d'info DAWRF de version 2 est couramment supportée.\n" + +#: readelf.c:5077 +#, c-format +msgid " Length: %ld\n" +msgstr " Longueur: %ld\n" + +#: readelf.c:5078 +#, c-format +msgid " DWARF Version: %d\n" +msgstr " Version DWARF: %d\n" + +#: readelf.c:5079 +#, c-format +msgid " Prolgue Length: %d\n" +msgstr " Longueur du prologue: %d\n" + +#: readelf.c:5080 +#, c-format +msgid " Minimum Instruction Length: %d\n" +msgstr " Longueur minimale des instructions: %d\n" + +#: readelf.c:5081 +#, c-format +msgid " Initial value of 'is_stmt': %d\n" +msgstr " Valeur initiale de 'is_stmt': %d\n" + +#: readelf.c:5082 +#, c-format +msgid " Line Base: %d\n" +msgstr " Ligne de base: %d\n" + +#: readelf.c:5083 +#, c-format +msgid " Line Range: %d\n" +msgstr " Ligne d'étendue: %d\n" + +#: readelf.c:5084 +#, c-format +msgid " Opcode Base: %d\n" +msgstr " Code op Base: %d\n" + +#: readelf.c:5093 +msgid "\n Opcodes:\n" +msgstr "\n Codes op:\n" + +#: readelf.c:5096 +#, c-format +msgid " Opcode %d has %d args\n" +msgstr " Code op %d a %d arguments\n" + +#: readelf.c:5102 +msgid "\n The Directory Table is empty.\n" +msgstr "\n La table des répertoires est vide.\n" + +#: readelf.c:5105 +msgid "\n The Directory Table:\n" +msgstr "\n La table des répertoire:\n" + +#: readelf.c:5109 +#, c-format +msgid " %s\n" +msgstr " %s\n" + +#: readelf.c:5120 +msgid "\n The File Name Table is empty.\n" +msgstr "\n La talbe des noms de fichiers est vide.\n" + +#: readelf.c:5123 +msgid "\n The File Name Table:\n" +msgstr "\n La table des noms de fichiers:\n" + +#: readelf.c:5131 +#, c-format +msgid " %d\t" +msgstr " %d\t" + +#: readelf.c:5142 +#, c-format +msgid "%s\n" +msgstr "%s\n" + +#. Now display the statements. +#: readelf.c:5150 +msgid "\n Line Number Statements:\n" +msgstr "\n Numéro de ligne des déclarations:\n" + +#: readelf.c:5169 +msgid " Copy\n" +msgstr " Copie\n" + +#: readelf.c:5176 +#, c-format +msgid " Advance PC by %d to %lx\n" +msgstr " Avancer le compteur PC de %d à %lx\n" + +#: readelf.c:5184 +#, c-format +msgid " Advance Line by %d to %d\n" +msgstr " Avancer la ligne de %d à %d\n" + +#: readelf.c:5191 +#, c-format +msgid " Set File Name to entry %d in the File Name Table\n" +msgstr " Initialisé le nom du fichier à l'entrée %d dans la table des noms de fichiers\n" + +#: readelf.c:5199 +#, c-format +msgid " Set column to %d\n" +msgstr " Initialisé la colonne à %d\n" + +#: readelf.c:5206 +#, c-format +msgid " Set is_stmt to %d\n" +msgstr " Initialisé is_stmt avec %d\n" + +#: readelf.c:5211 +msgid " Set basic block\n" +msgstr " Initialisé le bloc de base\n" + +#: readelf.c:5219 +#, c-format +msgid " Advance PC by constant %d to 0x%lx\n" +msgstr " Avancer le compteur PC par constante de %d à 0x%lx\n" + +#: readelf.c:5227 +#, c-format +msgid " Advance PC by fixed size amount %d to 0x%lx\n" +msgstr " Avancer le compteur PC par une taille fixe de %d à 0x%lx\n" + +#: readelf.c:5235 +#, c-format +msgid " Special opcode %d: advance Address by %d to 0x%lx" +msgstr " Code op spécial %d: avancé l'Adresse par %d à 0x%lx" + +#: readelf.c:5239 +#, c-format +msgid " and Line by %d to %d\n" +msgstr " et Ligne par %d à %d\n" + +#: readelf.c:5262 readelf.c:5691 +#, c-format +msgid "Contents of the %s section:\n\n" +msgstr "Contenue de la section %s:\n\n" + +#: readelf.c:5285 +msgid "Only DWARF 2 pubnames are currently supported\n" +msgstr "Seuls les noms pubilcs DAWRF 2 sont couramment supportés\n" + +#: readelf.c:5292 +#, c-format +msgid " Length: %ld\n" +msgstr " Longueur: %ld\n" + +#: readelf.c:5294 +#, c-format +msgid " Version: %d\n" +msgstr " Version: %d\n" + +#: readelf.c:5296 +#, c-format +msgid " Offset into .debug_info section: %ld\n" +msgstr " Décalage dans la section .debug_info:%ld\n" + +#: readelf.c:5298 +#, c-format +msgid " Size of area in .debug_info section: %ld\n" +msgstr " Taille de la zone dans la section .debug_info: %ld\n" + +#: readelf.c:5301 +msgid "\n Offset\tName\n" +msgstr "\n Décalage\tNom\n" + +#: readelf.c:5383 +#, c-format +msgid "Unknown TAG value: %lx" +msgstr "Valeur d'étiquette (`TAG') inconnue: %lx" + +#: readelf.c:5478 +#, c-format +msgid "Unknown AT value: %lx" +msgstr "Valeur AT inconnue: %lx" + +#: readelf.c:5515 +#, c-format +msgid "Unknown FORM value: %lx" +msgstr "Valeur FORM inconnue: %lx" + +#: readelf.c:5697 +msgid " Number TAG\n" +msgstr " Numéro d'étiquette\n" + +#: readelf.c:5703 +#, c-format +msgid " %ld %s [%s]\n" +msgstr " %ld %s [%s]\n" + +#: readelf.c:5706 +msgid "has children" +msgstr "a des rejetons" + +#: readelf.c:5706 +msgid "no children" +msgstr "aucun rejeton" + +#: readelf.c:5710 +#, c-format +msgid " %-18s %s\n" +msgstr " %-18s %s\n" + +#: readelf.c:5729 +#, c-format +msgid " %lu byte block: " +msgstr " %lu bloc d'octets: " + +#: readelf.c:6036 +msgid "(User defined location op)" +msgstr "(Op de localisation défini par l'usager)" + +#: readelf.c:6038 +msgid "(Unknown location op)" +msgstr "(Op de localisation inconnu)" + +#: readelf.c:6165 +#, c-format +msgid "Unable to handle FORM: %d" +msgstr "Incapable de traiter la FORME: %d" + +#: readelf.c:6169 +#, c-format +msgid "Unrecognised form: %d" +msgstr "Forme non reconnue: %d" + +#: readelf.c:6182 +msgid "(not inlined)" +msgstr "(pas en ligne)" + +#: readelf.c:6183 +msgid "(inlined)" +msgstr "(en ligne)" + +#: readelf.c:6184 +msgid "(declared as inline but ignored)" +msgstr "(déclaré comme en ligne mais ignoré)" + +#: readelf.c:6185 +msgid "(declared as inline and inlined)" +msgstr "(déclaré comme en-ligne et en-ligné" + +#: readelf.c:6186 +#, c-format +msgid " (Unknown inline attribute value: %lx)" +msgstr " (valeur d'attibut en ligne inconnu: %lx)" + +#: readelf.c:6315 readelf.c:6441 +#, c-format +msgid "The section %s contains:\n\n" +msgstr "La section %s contient:\n\n" + +#: readelf.c:6337 +#, c-format +msgid " Compilation Unit @ %lx:\n" +msgstr " Unité de compilation @ %lx:\n" + +#: readelf.c:6338 +#, c-format +msgid " Length: %ld\n" +msgstr " Longueur: %ld\n" + +#: readelf.c:6339 +#, c-format +msgid " Version: %d\n" +msgstr " Version: %d\n" + +#: readelf.c:6340 +#, c-format +msgid " Abbrev Offset: %ld\n" +msgstr " Décalage agrégé: %ld\n" + +#: readelf.c:6341 +#, c-format +msgid " Pointer Size: %d\n" +msgstr " Taille des pointeurs: %d\n" + +#: readelf.c:6345 +msgid "Only version 2 DWARF debug information is currently supported.\n" +msgstr "Seul les informations de débug de la version DAWRF 2 est couramment supporté.\n" + +#: readelf.c:6367 +msgid "Unable to locate .debug_abbrev section!\n" +msgstr "Incapable de localiser la section .debug_abbrev!\n" + +#: readelf.c:6407 +#, c-format +msgid "Unable to locate entry %lu in the abbreviation table\n" +msgstr "Incapable de localiser l'entrée %lu dans la table d'abréviation\n" + +#: readelf.c:6412 +#, c-format +msgid " <%d><%x>: Abbrev Number: %lu (%s)\n" +msgstr " <%d><%x>: Numéro d'abréviation: %lu (%s)\n" + +#: readelf.c:6462 +msgid "Only DWARF 2 aranges are currently supported.\n" +msgstr "Seul la gamme aranges DAWRF de version 2 est couramment supporté.\n" + +#: readelf.c:6466 +#, c-format +msgid " Length: %ld\n" +msgstr " Longueur %ld\n" + +#: readelf.c:6467 +#, c-format +msgid " Version: %d\n" +msgstr " Version: %d\n" + +#: readelf.c:6468 +#, c-format +msgid " Offset into .debug_info: %lx\n" +msgstr " Décalage dans .debug_info: %lx\n" + +#: readelf.c:6469 +#, c-format +msgid " Pointer Size: %d\n" +msgstr " Taille des pointeurs: %d\n" + +#: readelf.c:6470 +#, c-format +msgid " Segment Size: %d\n" +msgstr " Taille des segments: %d\n" + +#: readelf.c:6472 +msgid "\n Address Length\n" +msgstr "\n Longueur d'adresse\n" + +#: readelf.c:6634 +#, c-format +msgid "The section %s contains:\n" +msgstr "La section %s contient:\n" + +#: readelf.c:7109 +#, c-format +msgid "Displaying the debug contents of section %s is not yet supported.\n" +msgstr "L'affichage du contenu de la section de débug %s n'est pas encore supporté.\n" + +#: readelf.c:7173 +#, c-format +msgid "\nSection '%s' has no debugging data.\n" +msgstr "\nLa section '%s' n'a aucune donnée de débug.\n" + +#: readelf.c:7192 +#, c-format +msgid "Unrecognised debug section: %s\n" +msgstr "Section de débug non reconnue: %s\n" + +#: readelf.c:7264 +msgid "Some sections were not dumped because they do not exist!\n" +msgstr "Quelques sections n'ont pas été vidangées parce qu'inexistantes!\n" + +#: readelf.c:7447 +#, c-format +msgid "\nSection '%s' contains %d entries:\n" +msgstr "\nSection '%s' contient %d entrées:\n" + +#: readelf.c:7609 +msgid "conflict list with without table" +msgstr "conflit de liste avec et sans table" + +#: readelf.c:7637 +#, c-format +msgid "\nSection '.conflict' contains %d entries:\n" +msgstr "\nLa section '.conflict' contient %d entrées:\n" + +#: readelf.c:7638 +msgid " Num: Index Value Name" +msgstr " Nombre: Index Valeur Nom" + +#: readelf.c:7663 +msgid "NT_PRSTATUS (prstatus structure)" +msgstr "NT_PRSTATUS (structure prstatus)" + +#: readelf.c:7664 +msgid "NT_FPREGSET (floating point registers)" +msgstr "NT_FPREGSET (régistres en virgule flottante)" + +#: readelf.c:7665 +msgid "NT_PRPSINFO (prpsinfo structure)" +msgstr "NT_PRPSINFO (structure prpsinfo)" + +#: readelf.c:7666 +msgid "NT_TASKSTRUCT (task structure)" +msgstr "NT_TASKSTRUCT (structure de taches)" + +#: readelf.c:7667 +msgid "NT_PRXFPREG (user_xfpregs structure)" +msgstr "NT_PRXFPREG (structure user_xfpregs)" + +#: readelf.c:7668 +msgid "NT_PSTATUS (pstatus structure)" +msgstr "NT_PSTATUS (structure pstatus)" + +#: readelf.c:7669 +msgid "NT_FPREGS (floating point registers)" +msgstr "NT_FPREGS (registres en virgule flottante)" + +#: readelf.c:7670 +msgid "NT_PSINFO (psinfo structure)" +msgstr "NT_PSINFO (structure psinfo)" + +#: readelf.c:7671 +msgid "NT_LWPSTATUS (lwpstatus_t structure)" +msgstr "NT_LWPSTATUS (structure lwpstatus_t)" + +#: readelf.c:7672 +msgid "NT_LWPSINFO (lwpsinfo_t structure)" +msgstr "NT_LWPSINFO (structure lwpsinfo_t)" + +#: readelf.c:7673 +msgid "NT_WIN32PSTATUS (win32_pstatus strcuture)" +msgstr "NT_WIN32PSTATUS (structure win32_pstatus)" + +#: readelf.c:7675 +#, c-format +msgid "Unknown note type: (0x%08x)" +msgstr "Type de note inconnu: (0x%08x)" + +#: readelf.c:7713 +#, c-format +msgid "\nNotes at offset 0x%08lx with length 0x%08lx:\n" +msgstr "\nNotes au décalage 0x%08lx de longueur 0x%08lx:\n" + +#: readelf.c:7715 +msgid " Owner\t\tData size\tDescription\n" +msgstr " Propriétaire\t\tTaille de données\tDescription\n" + +#: readelf.c:7826 +msgid "No note segments present in the core file.\n" +msgstr "Aucun note de segment présent dans le fichier core.\n" + +#: readelf.c:7904 +msgid "This instance of readelf has been built without support for a\n" +msgstr "Cette instance de readelf a été contstruite sans soutien pour un\n" + +#: readelf.c:7905 +msgid "64 bit data type and so it cannot read 64 bit ELF files.\n" +msgstr "type de données de 64 bits et ne peut lire un fichier ELF de 64 bits.\n" + +#: readelf.c:7940 +#, c-format +msgid "Cannot stat input file %s.\n" +msgstr "Ne peut évaluer par stat() le fichier d'entrée %s.\n" + +#: readelf.c:7947 +#, c-format +msgid "Input file %s not found.\n" +msgstr "Fichier d'entrée %s non repéré.\n" + +#: readelf.c:7953 +#, c-format +msgid "%s: Failed to read file header\n" +msgstr "%s: échec de lecture de l'en-tête du fichier\n" + +#: readelf.c:7967 +#, c-format +msgid "\nFile: %s\n" +msgstr "\nFichier: %s\n" + +#: rename.c:131 +#, c-format +msgid "%s: cannot set time: %s" +msgstr "%s: ne peut initialisé l'heure: %s" + +#. We have to clean up here. +#: rename.c:170 rename.c:203 +#, c-format +msgid "%s: rename: %s" +msgstr "%s: changé de nom: %s" + +#: rename.c:211 +#, c-format +msgid "%s: simple_copy: %s" +msgstr "%s: simple copie: %s" + +#: resbin.c:130 +#, c-format +msgid "%s: not enough binary data" +msgstr "%s: pas assez de données binaires" + +#: resbin.c:149 +msgid "null terminated unicode string" +msgstr "chaîne unicode terminée par un null" + +#: resbin.c:179 resbin.c:185 +msgid "resource ID" +msgstr "IDentificateur de ressource" + +#: resbin.c:229 +msgid "cursor" +msgstr "curseur" + +#: resbin.c:263 resbin.c:270 +msgid "menu header" +msgstr "en-tête de menu" + +#: resbin.c:280 +msgid "menuex header" +msgstr "en-tête menuex" + +#: resbin.c:284 +msgid "menuex offset" +msgstr "décalage menuex" + +#: resbin.c:291 +#, c-format +msgid "unsupported menu version %d" +msgstr "version de menu non supportée %d" + +#: resbin.c:319 resbin.c:334 resbin.c:400 +msgid "menuitem header" +msgstr "en-tête d'item du menu" + +#: resbin.c:430 +msgid "menuitem" +msgstr "item du menu" + +#: resbin.c:471 resbin.c:499 +msgid "dialog header" +msgstr "en-tête de dialogue" + +#: resbin.c:489 +#, c-format +msgid "unexpected dialog signature %d" +msgstr "signature de dialogue inattendue %d" + +#: resbin.c:531 +msgid "dialog font point size" +msgstr "taille en point de fonte de dialogue" + +#: resbin.c:539 +msgid "dialogex font information" +msgstr "information de fonte de type dialogex" + +#: resbin.c:564 resbin.c:582 +msgid "dialog control" +msgstr "contrôle de dialogue" + +#: resbin.c:574 +msgid "dialogex control" +msgstr "contrôle dialogex" + +#: resbin.c:603 +msgid "dialog control end" +msgstr "fin de contrôle du dialogue" + +#: resbin.c:615 +msgid "dialog control data" +msgstr "données de contrôle du dialogue" + +#: resbin.c:658 +msgid "stringtable string length" +msgstr "longueur de chaîne de la table des chaînes" + +#: resbin.c:668 +msgid "stringtable string" +msgstr "chaîne de la table des chaînes" + +#: resbin.c:701 +msgid "fontdir header" +msgstr "en-tête fontdir" + +#: resbin.c:714 +msgid "fontdir" +msgstr "fontdir" + +#: resbin.c:730 +msgid "fontdir device name" +msgstr "nom du périphérique fontdir" + +#: resbin.c:736 +msgid "fontdir face name" +msgstr "nom de la sélection du répertoire de fontes" + +#: resbin.c:779 +msgid "accelerator" +msgstr "accélérateur" + +#: resbin.c:843 +msgid "group cursor header" +msgstr "en-tête du groupe de curseurs" + +#: resbin.c:847 +#, c-format +msgid "unexpected group cursor type %d" +msgstr "type de groupe de curseur inattendu %d" + +#: resbin.c:862 +msgid "group cursor" +msgstr "groupe de curseur" + +#: resbin.c:901 +msgid "group icon header" +msgstr "en-tête du groupe d'icônes" + +#: resbin.c:905 +#, c-format +msgid "unexpected group icon type %d" +msgstr "type de groupe d'icône inattendu %d" + +#: resbin.c:920 +msgid "group icon" +msgstr "groupe d'icônes" + +#: resbin.c:991 resbin.c:1210 +msgid "unexpected version string" +msgstr "chaîne de version inattendue" + +#: resbin.c:1025 +#, c-format +msgid "version length %d does not match resource length %lu" +msgstr "longueur de la version %d ne concorde pas avec la longueur de la ressource %lu" + +#: resbin.c:1029 +#, c-format +msgid "unexpected version type %d" +msgstr "type de version inattendu %d" + +#: resbin.c:1041 +#, c-format +msgid "unexpected fixed version information length %d" +msgstr "longueur d'information fixe de version inattendue %d" + +#: resbin.c:1044 +msgid "fixed version info" +msgstr "information fixe de version" + +#: resbin.c:1048 +#, c-format +msgid "unexpected fixed version signature %lu" +msgstr "signature de version fixe inattendue %lu" + +#: resbin.c:1052 +#, c-format +msgid "unexpected fixed version info version %lu" +msgstr "information de version inattendue dans la version fixe %lu" + +#: resbin.c:1081 +msgid "version var info" +msgstr "information de variable de version" + +#: resbin.c:1098 +#, c-format +msgid "unexpected stringfileinfo value length %d" +msgstr "longueur de la valeur stringfileinfo inattendue %d" + +#: resbin.c:1108 +#, c-format +msgid "unexpected version stringtable value length %d" +msgstr "longueur inattendue de la valeur de la table de chaîne de version %d" + +#: resbin.c:1142 +#, c-format +msgid "unexpected version string length %d != %d + %d" +msgstr "longueur inattendue de la chaîne de version %d != %d +%d" + +#: resbin.c:1153 +#, c-format +msgid "unexpected version string length %d < %d" +msgstr "longueur inattendue de la chaîne de version %d < %d" + +#: resbin.c:1170 +#, c-format +msgid "unexpected varfileinfo value length %d" +msgstr "longueur inattendue de la chaîne varfileinfo %d" + +#: resbin.c:1189 +msgid "version varfileinfo" +msgstr "version varfileinfo" + +#: resbin.c:1204 +#, c-format +msgid "unexpected version value length %d" +msgstr "longueur inattendue de la chaîne de version %d" + +#: rescoff.c:128 +msgid "filename required for COFF input" +msgstr "nom de fichier requis pour l'entrée COFF" + +#: rescoff.c:145 +#, c-format +msgid "%s: no resource section" +msgstr "%s: aucune section ressource" + +#: rescoff.c:152 +msgid "can't read resource section" +msgstr "ne peutlire la section ressource" + +#: rescoff.c:178 +#, c-format +msgid "%s: %s: address out of bounds" +msgstr "%s: %s: adresse est hors bornes" + +#: rescoff.c:197 +msgid "directory" +msgstr "répertoire" + +#: rescoff.c:225 +msgid "named directory entry" +msgstr "nom du répertoire d'entrée" + +#: rescoff.c:234 +msgid "directory entry name" +msgstr "nom de l'entrée du répertoire" + +#: rescoff.c:254 +msgid "named subdirectory" +msgstr "nom de sous-répertoire" + +#: rescoff.c:262 +msgid "named resource" +msgstr "nom de ressource" + +#: rescoff.c:277 +msgid "ID directory entry" +msgstr "IDentificateur d'entrée de répertoire" + +#: rescoff.c:294 +msgid "ID subdirectory" +msgstr "IDentificateur de sous-répertoire" + +#: rescoff.c:302 +msgid "ID resource" +msgstr "IDentificateur ressource" + +#: rescoff.c:328 +msgid "resource type unknown" +msgstr "type de ressource inconnue" + +#: rescoff.c:331 +msgid "data entry" +msgstr "aucune donnée" + +#: rescoff.c:339 +msgid "resource data" +msgstr "donnée ressource" + +#: rescoff.c:344 +msgid "resource data size" +msgstr "taille de données ressources" + +#: rescoff.c:439 +msgid "filename required for COFF output" +msgstr "nom de fichier requis pour la sortie de COFF" + +#: rescoff.c:738 +msgid "can't get BFD_RELOC_RVA relocation type" +msgstr "ne peut obtenir le type de la relocalisation BFD_RELOC_RVA" + +#: resrc.c:240 resrc.c:312 +#, c-format +msgid "can't open temporary file `%s': %s" +msgstr "ne peut ouvrir un fichier temporaire `%s': %s" + +#: resrc.c:246 +#, c-format +msgid "can't redirect stdout: `%s': %s" +msgstr "ne peut rediriger sur stdout: `%s': %s" + +#: resrc.c:262 +#, c-format +msgid "%s %s: %s" +msgstr "%s %s: %s" + +#: resrc.c:308 +#, c-format +msgid "can't execute `%s': %s" +msgstr "ne peut exécuter `%s': %s" + +#: resrc.c:317 +#, c-format +msgid "Using temporary file `%s' to read preprocessor output\n" +msgstr "Utilisation d'un fichier temporaire `%s' pour lire la sortie du préprocesseur\n" + +#: resrc.c:324 +#, c-format +msgid "can't popen `%s': %s" +msgstr "ne peut ouvrir un pipe par popen() `%s': %s" + +#: resrc.c:326 +msgid "Using popen to read preprocessor output\n" +msgstr "Utilisation de popen pour lire la sortie du préprocesseur\n" + +#: resrc.c:369 +#, c-format +msgid "Tried `%s'\n" +msgstr "Essayé `%s'\n" + +#: resrc.c:380 +#, c-format +msgid "Using `%s'\n" +msgstr "Utilisation de `%s'\n" + +#: resrc.c:541 +#, c-format +msgid "%s:%d: %s\n" +msgstr "%s:%d: %s\n" + +#: resrc.c:550 +#, c-format +msgid "%s: unexpected EOF" +msgstr "%s: fin de fichier EOF prématuré" + +#: resrc.c:607 +#, c-format +msgid "%s: read of %lu returned %lu" +msgstr "%s: lecture de %lu retourné %lu" + +#: resrc.c:649 resrc.c:903 resrc.c:1176 resrc.c:1330 +#, c-format +msgid "stat failed on bitmap file `%s': %s" +msgstr "échec d'évaluation par stat() du fichier bitmap `%s': %s" + +#: resrc.c:702 +#, c-format +msgid "cursor file `%s' does not contain cursor data" +msgstr "fichier curseur `%s' ne contient aucune donnée de type curseur" + +#: resrc.c:734 resrc.c:1047 +#, c-format +msgid "%s: fseek to %lu failed: %s" +msgstr "%s: échec %lu de repérage: %s" + +#: resrc.c:871 +msgid "help ID requires DIALOGEX" +msgstr "identificateur d'aide requiert DIALOGEX" + +#: resrc.c:873 +msgid "control data requires DIALOGEX" +msgstr "donnée de contrôle requiert DIALOGEX" + +#: resrc.c:1016 +#, c-format +msgid "icon file `%s' does not contain icon data" +msgstr "fichier d'icônes `%s' ne contient pas de données de type icône" + +#: resrc.c:1535 +#, c-format +msgid "can't open `%s' for output: %s" +msgstr "ne peut ouvrir `%s' pour la sortie: %s" + +#: size.c:79 +#, c-format +msgid "" +"Usage: %s [-A | --format=sysv | -B | --format=berkeley]\n" +" [-o | --radix=8 | -d | --radix=10 | -h | --radix=16]\n" +" [-V | --version] [--target=bfdname] [--help] [file...]\n" +msgstr "" +"Usage: %s [-A | --format=sysv | -B | --format=berkeley]\n" +" [-o | --radix=8 | -d | --radix=10 | -h | --radix=16]\n" +" [-V | --version] [--target=nombfd] [--help] [FICHIER...]\n" + +#: size.c:85 +msgid "default is --format=berkeley\n" +msgstr "par défaut --format=berkeley\n" + +#: size.c:87 +msgid "default is --format=sysv\n" +msgstr "par défaut --format=sysv\n" + +#: size.c:141 +#, c-format +msgid "invalid argument to --format: %s" +msgstr "argument invalide pour --format: %s" + +#: size.c:168 +#, c-format +msgid "Invalid radix: %s\n" +msgstr "Base numérique invalide: %s\n" + +#: srconv.c:1880 +#, c-format +msgid "Usage: %s [-dhVq] in-file [out-file]\n" +msgstr "Usage: %s [-dhVq] fichier-entrée [fichier-sortie]\n" + +#: srconv.c:1887 +#, c-format +msgid "%s: Convert a COFF object file into a SYSROFF object file\n" +msgstr "%s: conversion d'un fichier objet COFF en un fichier objet SYSROFF\n" + +#: srconv.c:2020 +#, c-format +msgid "unable to open output file %s" +msgstr "incapable d'ouvrir le fichier de sortie %s" + +#: stabs.c:349 stabs.c:1770 +msgid "numeric overflow" +msgstr "débordement numérique" + +#: stabs.c:360 +#, c-format +msgid "Bad stab: %s\n" +msgstr "Mauvaise inclusion (`stab'): %s\n" + +#: stabs.c:370 +#, c-format +msgid "Warning: %s: %s\n" +msgstr "AVERTISSEMENT: %s: %s\n" + +#: stabs.c:492 +msgid "N_LBRAC not within function\n" +msgstr "N_LBRAC n'est pas dans la fonction\n" + +#: stabs.c:531 +msgid "Too many N_RBRACs\n" +msgstr "Trop de N_RBRAC\n" + +#: stabs.c:780 +msgid "unknown C++ encoded name" +msgstr "nom encode C++ inconnu" + +#. Complain and keep going, so compilers can invent new +#. cross-reference types. +#: stabs.c:1307 +msgid "unrecognized cross reference type" +msgstr "type de référence croisée non reconnue" + +#. Does this actually ever happen? Is that why we are worrying +#. about dealing with it rather than just calling error_type? +#: stabs.c:1862 +msgid "missing index type" +msgstr "type d'index manquant" + +#: stabs.c:2189 +msgid "unknown virtual character for baseclass" +msgstr "caractère virtuel inconnu pour la classe de base" + +#: stabs.c:2207 +msgid "unknown visibility character for baseclass" +msgstr "caractère de visibilité inconnu pour la classe de base" + +#: stabs.c:2399 +msgid "unnamed $vb type" +msgstr "type $vb inconnu" + +#: stabs.c:2405 +msgid "unrecognized C++ abbreviation" +msgstr "abréviation C++ inconnue" + +#: stabs.c:2485 +msgid "unknown visibility character for field" +msgstr "caractère de visibilité inconnu pour le champ" + +#: stabs.c:2741 +msgid "const/volatile indicator missing" +msgstr "indicateur de const/volatile manquant" + +#: stabs.c:2981 +#, c-format +msgid "No mangling for \"%s\"\n" +msgstr "Pas de mutilation pour \"n%s\"\n" + +#: stabs.c:3294 +msgid "Undefined N_EXCL" +msgstr "N_EXCL indéfini" + +#: stabs.c:3382 +#, c-format +msgid "Type file number %d out of range\n" +msgstr "Nombre de type de fichier %d hors gamme\n" + +#: stabs.c:3387 +#, c-format +msgid "Type index number %d out of range\n" +msgstr "Nombre de type index %d hors gamme\n" + +#: stabs.c:3474 +#, c-format +msgid "Unrecognized XCOFF type %d\n" +msgstr "Type XCOFF non reconnu %d\n" + +#: stabs.c:3773 +#, c-format +msgid "bad mangled name `%s'\n" +msgstr "mauvais codage par mutilation du nom `%s'\n" + +#: stabs.c:3869 +msgid "no argument types in mangled string\n" +msgstr "aucun type d'argument dans la chaîne encodé par mutilation\n" + +#: strings.c:177 +#, c-format +msgid "invalid number %s" +msgstr "nombre invalide %s" + +#: strings.c:513 +#, c-format +msgid "invalid integer argument %s" +msgstr "argument en valeur entière invalide %s" + +#: strings.c:523 +#, c-format +msgid "" +"Usage: %s [-afov] [-n min-len] [-min-len] [-t {o,x,d}] [-]\n" +" [--all] [--print-file-name] [--bytes=min-len] [--radix={o,x,d}]\n" +" [--target=bfdname] [--help] [--version] file...\n" +msgstr "" +"Usage: %s [-afov] [-n longueur-min] [-min-len] [-t {o,x,d}] [-]\n" +" [--all] [--print-file-name] [--bytes=longueur-min] [--radix={o,x,d}]\n" +" [--target=nom_bfd] [--help] [--version] file...\n" + +#: sysdump.c:712 +#, c-format +msgid "Usage: %s [-hV] in-file\n" +msgstr "Usage: %s [-hV] fichier-entrée\n" + +#: sysdump.c:781 +#, c-format +msgid "cannot open input file %s" +msgstr "ne peut ouvrir le fichier d'entrée %s" + +#: version.c:39 +msgid "Copyright 1997, 98, 99, 2000 Free Software Foundation, Inc.\n" +msgstr "Copyright 1997, 98, 99, 2000 © Free Software Foundation, Inc.\n" + +#: version.c:40 +msgid "" +"This program is free software; you may redistribute it under the terms of\n" +"the GNU General Public License. This program has absolutely no warranty.\n" +msgstr "" +"Ce logiciel est libre; vous pouvez le redistribuer selon les termes de la\n" +"licence GNU General Public License. AUCUNE garantie n'est donnée.\n" + +#: windres.c:237 +#, c-format +msgid "can't open %s `%s': %s" +msgstr "ne peut ouvrir %s `%s': %s" + +#: windres.c:416 +msgid ": expected to be a directory\n" +msgstr ": espérait un répertoire\n" + +#: windres.c:428 +msgid ": expected to be a leaf\n" +msgstr ": espérait une feuille\n" + +#: windres.c:437 +#, c-format +msgid "%s: warning: " +msgstr "%s: AVERTISSEMENT: " + +#: windres.c:439 +msgid ": duplicate value\n" +msgstr ": valeur dupliquée\n" + +#: windres.c:602 +#, c-format +msgid "unknown format type `%s'" +msgstr "type de format inconnu `%s'" + +#: windres.c:603 +#, c-format +msgid "%s: supported formats:" +msgstr "%s: formats supportés:" + +#. Otherwise, we give up. +#: windres.c:690 +#, c-format +msgid "can not determine type of file `%s'; use the -I option" +msgstr "ne peut déterminer le type de fichier `%s'; utiliser l'option -I" + +#: windres.c:704 +#, c-format +msgid "Usage: %s [options] [input-file] [output-file]\n" +msgstr "Usage: %s [options] [fichier-d-entrée] [fichier-de-sortie]\n" + +#: windres.c:706 +msgid "" +"Options:\n" +" -i FILE, --input FILE Name input file\n" +" -o FILE, --output FILE Name output file\n" +" -I FORMAT, --input-format FORMAT\n" +" Specify input format\n" +" -O FORMAT, --output-format FORMAT\n" +" Specify output format\n" +" -F TARGET, --target TARGET Specify COFF target\n" +" --preprocessor PROGRAM Program to use to preprocess rc file\n" +" --include-dir DIR Include directory when preprocessing rc file\n" +" -DSYM[=VAL], --define SYM[=VAL]\n" +" Define SYM when preprocessing rc file\n" +" -v Verbose - tells you what it's doing\n" +" --language VAL Set language when reading rc file\n" +" --use-temp-file Use a temporary file instead of popen to read\n" +" the preprocessor output\n" +" --no-use-temp-file Use popen (default)\n" +msgstr "" +"Options:\n" +" -i FICHIER, --input FICHIER nommer le fichier d'entrée\n" +" -o FICHIER, --output FICHIER nommer le fichier de sortie\n" +" -I FORMAT, --input-format FORMAT\n" +" spécifier le format d'entrée\n" +" -O FORMAT, --output-format FORMAT\n" +" spécifier le format de sortie\n" +" -F CIBLE, --target CIBLE spécifier la CIBLE en COFF\n" +" --preprocessor PROGRAMME programme à utiliser pour pré-traiter le fichier rc\n" +" --include-dir RÉPERTOIRE inclure le RÉPERTOIRE lors du pré-traitement du fichier rc\n" +" -DSYM[=VALEUR], --define SYM[=VALEUR]\n" +" définir le SYMbole lors du pré-traitement du fichier rc\n" +" -v utiliser le mode bavard\n" +" --language VAL initialiser le langage lors de la lecture du fichier rc\n" +" --use-temp-file utiliser un fichier temporaire au lieu de la lecture via\n" +" popen de la sortie du pré-processeur\n" +" --no-use-temp-file utiliser popen (par défaut)\n" + +#: windres.c:725 +msgid " --yydebug Turn on parser debugging\n" +msgstr " --yydebug activer le mode de débug de l'analyseur syntaxique\n" + +#: windres.c:728 +msgid "" +" --help Print this help message\n" +" --version Print version information\n" +msgstr "" +" -h --help afficher l'aide-mémoire\n" +" -V --version afficher le nom et la version du logiciel\n" + +#: windres.c:731 +msgid "" +"FORMAT is one of rc, res, or coff, and is deduced from the file name\n" +"extension if not specified. A single file name is an input file.\n" +"No input-file is stdin, default rc. No output-file is stdout, default rc.\n" +msgstr "" +"FORMAT est soit rc, res, ou coff, et est dédui à partir l'extension\n" +"du nom de fichier, si non spécifié. Un nom simple de fichier comme fichier d'entrée\n" +"L'entrée par défaut se fait à partir de stdin, par défaut pour rc.\n" +"La sortie par défaut est stdout, par défaut pour rc.\n" + +#: windres.c:980 +msgid "no resources" +msgstr "aucune ressource" + +#: wrstabs.c:366 wrstabs.c:2027 +#, c-format +msgid "string_hash_lookup failed: %s" +msgstr "échec de string_hash_lookup: %s" + +#: wrstabs.c:666 +#, c-format +msgid "stab_int_type: bad size %u" +msgstr "stab_int_type: mauvaise taille %u" + +#: wrstabs.c:1467 +#, c-format +msgid "%s: warning: unknown size for field `%s' in struct" +msgstr "%s: AVERTISSEMENT: taille inconnue pour le champ `%s' dans le struct" diff -uprN binutils-2.11.92.0.10/binutils/po/tr.po binutils-2.11.92.0.12/binutils/po/tr.po --- binutils-2.11.92.0.10/binutils/po/tr.po Wed Dec 31 16:00:00 1969 +++ binutils-2.11.92.0.12/binutils/po/tr.po Fri Nov 16 14:05:52 2001 @@ -0,0 +1,4133 @@ +# Binutils Turkish Translation. +# Copyright (C) 2001 Free Software Foundation, Inc. +# Deniz Akkus Kanca , 2001. +# +msgid "" +msgstr "" +"Project-Id-Version: binutils 2.11\n" +"POT-Creation-Date: 2001-01-11 12:02-0800\n" +"PO-Revision-Date: 2001-09-20 08:39EEST\n" +"Last-Translator: Deniz Akkus Kanca \n" +"Language-Team: Turkish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-9\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 0.9.1\n" + +#: addr2line.c:76 +#, c-format +msgid "" +"Usage: %s [-CfsHV] [-b bfdname] [--target=bfdname]\n" +" [-e executable] [--exe=executable] [--demangle[=style]]\n" +" [--basenames] [--functions] [addr addr ...]\n" +msgstr "" +"Kullaným: %s [-CfsHV] [-b bfd_adý] \n" +" [--target=bfd_adý] hedef\n" +" [-e uygulama] [--exe=uygulama] \n" +" [--demangle[=tarz]] düzeltme tarzý\n" +" [--basenames] temel isimler [--functions] [adres adres ...]\n" +" iþlevler\n" + +#: addr2line.c:83 ar.c:288 nlmconv.c:1119 objcopy.c:373 objcopy.c:405 +#: readelf.c:1876 size.c:91 strings.c:530 windres.c:737 +#, c-format +msgid "Report bugs to %s\n" +msgstr "Yazýlým hatalarýný %s adresine, çeviri hatalarýný adresine gönderin\n" + +#: addr2line.c:243 +#, c-format +msgid "%s: can not get addresses from archive" +msgstr "%s: arþivden adresler alýnamadý" + +#: addr2line.c:310 nm.c:436 objdump.c:2857 +#, c-format +msgid "unknown demangling style `%s'" +msgstr "bilinmeyen düzeltme tarzý '%s'" + +#: ar.c:236 +#, c-format +msgid "no entry %s in archive\n" +msgstr "arþivde %s girdisi yok\n" + +#: ar.c:253 +#, c-format +msgid "Usage: %s [-X32_64] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...\n" +msgstr "Kullaným: %s [-X32_64] [-]{dmpqrstx}[abcfilNoPsSuvV] [üye-adý] [sayý] arþiv-dosyasý dosya...\n" + +#: ar.c:256 +#, c-format +msgid " %s -M [\n\n" +msgstr "\n<üye %s>\n\n" + +#: ar.c:845 ar.c:913 +#, c-format +msgid "%s is not a valid archive" +msgstr "%s geçerli bir arþiv deðil" + +#: ar.c:881 +#, c-format +msgid "stat returns negative size for %s" +msgstr "stat komutu, %s için negatif büyüklük gösteriyor" + +#: ar.c:1008 +#, c-format +msgid "%s is not an archive" +msgstr "%s bir arþiv deðil" + +#: ar.c:1015 +#, c-format +msgid "creating %s" +msgstr "%s oluþturuluyor" + +#: ar.c:1221 +#, c-format +msgid "No member named `%s'\n" +msgstr "`%s' adýnda bir üye yok\n" + +#: ar.c:1273 +#, c-format +msgid "no entry %s in archive %s!" +msgstr "arþiv %2$s içerisinde %1$s girdisi yok!" + +#: ar.c:1434 +#, c-format +msgid "%s: no archive map to update" +msgstr "%s: güncellenecek arþiv eþlemesi yok" + +#: arsup.c:88 +#, c-format +msgid "No entry %s in archive.\n" +msgstr "Arþiv içinde %s girdisi yok.\n" + +#: arsup.c:120 +#, c-format +msgid "Can't open file %s\n" +msgstr "%s dosyasý açýlamadý\n" + +#: arsup.c:170 +#, c-format +msgid "%s: Can't open output archive %s\n" +msgstr "%s: Çýktý arþivi %s açýlamadý\n" + +#: arsup.c:182 +#, c-format +msgid "%s: Can't open input archive %s\n" +msgstr "%s: Girdi arþivi %s açýlamadý\n" + +#: arsup.c:188 +#, c-format +msgid "%s: file %s is not an archive\n" +msgstr "%s: %s dosyasý bir arþiv deðil\n" + +#: arsup.c:229 +#, c-format +msgid "%s: no output archive specified yet\n" +msgstr "%s: henüz bir çýktý arþivi belirtilmedi\n" + +#: arsup.c:249 arsup.c:284 arsup.c:320 arsup.c:340 arsup.c:398 +#, c-format +msgid "%s: no open output archive\n" +msgstr "%s: açýk çýktý arþivi yok\n" + +#: arsup.c:257 arsup.c:358 arsup.c:378 +#, c-format +msgid "%s: can't open file %s\n" +msgstr "%s: %s dosyasý açýlamadý\n" + +#: arsup.c:305 arsup.c:374 arsup.c:453 +#, c-format +msgid "%s: can't find module file %s\n" +msgstr "%s: modül dosyasý %s bulunamadý\n" + +#: arsup.c:405 +#, c-format +msgid "Current open archive is %s\n" +msgstr "Þimdiki açýk arþiv %s\n" + +#: arsup.c:432 +#, c-format +msgid "%s: no open archive\n" +msgstr "%s: açýk arþiv yok\n" + +#: bucomm.c:135 +#, c-format +msgid "can't set BFD default target to `%s': %s" +msgstr "BFD öntanýmlý hedef `%s' olarak atanamadý: %s" + +#: bucomm.c:147 +#, c-format +msgid "%s: Matching formats:" +msgstr "%s: Eþleþen biçemler:" + +#: bucomm.c:164 +msgid "Supported targets:" +msgstr "Desteklenen hedefler:" + +#: bucomm.c:166 +#, c-format +msgid "%s: supported targets:" +msgstr "%s: desteklenen hedefler:" + +#: bucomm.c:272 +#, c-format +msgid "%s: bad number: %s" +msgstr "%s: hatalý sayý: %s" + +#: coffdump.c:94 +#, c-format +msgid "#lines %d " +msgstr "#satýrlar %d " + +#: coffdump.c:456 sysdump.c:719 +#, c-format +msgid "%s: Print a human readable interpretation of a SYSROFF object file\n" +msgstr "%s: SYSROFF nesne dosyasýný insan tarafýndan okunabilir biçemde yazdýrýr\n" + +#: coffdump.c:498 srconv.c:1941 sysdump.c:755 +#, c-format +msgid "GNU %s version %s\n" +msgstr "GNU %s sürüm %s\n" + +#: coffdump.c:516 srconv.c:1975 sysdump.c:775 +msgid "no input file specified" +msgstr "girdi dosyasý belirtilmedi" + +#: debug.c:653 +msgid "debug_add_to_current_namespace: no current file" +msgstr "hata_ayýkla_mevcut_isim_uzayýna_ekle: mevcut dosya yok" + +#: debug.c:736 +msgid "debug_start_source: no debug_set_filename call" +msgstr "hata_ayýkla_kaynak: hata_ayýkla_dosya_adý_ata çaðrýlmadý" + +#: debug.c:795 +msgid "debug_record_function: no debug_set_filename call" +msgstr "hata_ayýkla_kayýt_iþlevi: hata_ayýkla_dosya_adý_ata çaðrýlmadý" + +#: debug.c:851 +msgid "debug_record_parameter: no current function" +msgstr "hata_ayýkla_kayýt_parametresi: mevcut iþlev yok" + +#: debug.c:885 +msgid "debug_end_function: no current function" +msgstr "hata_ayýkla_son_iþlev: mevcut iþlev yok" + +#: debug.c:891 +msgid "debug_end_function: some blocks were not closed" +msgstr "hata_ayýkla_son_iþlev: bazý bloklar kapatýlmamýþ" + +#: debug.c:921 +msgid "debug_start_block: no current block" +msgstr "hata_ayýkla_baþla_blok: mevcut blok yok" + +#: debug.c:959 +msgid "debug_end_block: no current block" +msgstr "hata_ayýkla_son_blok: mevcut blok yok" + +#: debug.c:966 +msgid "debug_end_block: attempt to close top level block" +msgstr "hata_ayýkla_son_blok: tepe seviye bloðu kapama denemesi" + +#: debug.c:992 +msgid "debug_record_line: no current unit" +msgstr "hata_ayýkla_kayýt_satýr: mevcut birim yok" + +#. FIXME +#: debug.c:1046 +msgid "debug_start_common_block: not implemented" +msgstr "hata_ayýkla_ortak_blok_baþla: henüz tamamlanmamýþ" + +#. FIXME +#: debug.c:1058 +msgid "debug_end_common_block: not implemented" +msgstr "hata_ayýkla_ortak_blok_son: henüz tamamlanmamýþ" + +#. FIXME. +#: debug.c:1152 +msgid "debug_record_label not implemented" +msgstr "hata_ayýkla_kayýt_etiket: henüz tamamlanmamýþ" + +#: debug.c:1178 +msgid "debug_record_variable: no current file" +msgstr "hata_ayýkla_kayýt_deðiþken: mevcut dosya yok" + +#: debug.c:1194 +msgid "debug_record_variable: no current block" +msgstr "hata_ayýkla_kayýt_deðiþken: mevcut blok yok" + +#: debug.c:1764 +msgid "debug_make_undefined_type: unsupported kind" +msgstr "hata_ayýkla_tanýmlanmamýþ_tip: desteklenmeyen tip" + +#: debug.c:1970 +msgid "debug_name_type: no current file" +msgstr "hata_ayýkla_isim_tipi: mevcut dosya yok" + +#: debug.c:2018 +msgid "debug_tag_type: no current file" +msgstr "hata_ayýkla_etiket_tipi: mevcut dosya yok" + +#: debug.c:2026 +msgid "debug_tag_type: extra tag attempted" +msgstr "hata_ayýkla_etiket_tipi: fazla etiketleme denendi" + +#: debug.c:2066 +#, c-format +msgid "Warning: changing type size from %d to %d\n" +msgstr "Uyarý: tip boyutu %d'den %d'ye deðiþtirildi\n" + +#: debug.c:2090 +msgid "debug_find_named_type: no current compilation unit" +msgstr "hata_ayýkla_isimli_tipi_bul: mevcut derleme birimi yok" + +#: debug.c:2197 +#, c-format +msgid "debug_get_real_type: circular debug information for %s\n" +msgstr "hata_ayýkla_gerçek_tipi_al: %s için çevrimsel hata ayýklama bilgisi\n" + +#: debug.c:2662 +msgid "debug_write_type: illegal type encountered" +msgstr "hata_ayýkla_yaz_tipi: geçersiz tip bulundu" + +#: dlltool.c:737 dlltool.c:762 dlltool.c:788 +#, c-format +msgid "Internal error: Unknown machine type: %d" +msgstr "Ýç hata: Bilinmeyen makina tipi: %d" + +#: dlltool.c:825 +#, c-format +msgid "Can't open def file: %s" +msgstr "Taným dosyasý açýlamadý: %s" + +#: dlltool.c:830 +#, c-format +msgid "Processing def file: %s" +msgstr "Taným dosyasý iþleniyor: %s" + +#: dlltool.c:834 +msgid "Processed def file" +msgstr "Taným dosyasý iþlendi" + +#: dlltool.c:859 +#, c-format +msgid "Syntax error in def file %s:%d" +msgstr "Taným dosyasý %s'nda sözdizim hatasý:%d" + +#: dlltool.c:892 +#, c-format +msgid "NAME: %s base: %x" +msgstr "ÝSÝM: %s temel: %x" + +#: dlltool.c:895 dlltool.c:914 +msgid "Can't have LIBRARY and NAME" +msgstr "KÝTAPLIK ve ÝSÝM beraber olamaz" + +#: dlltool.c:911 +#, c-format +msgid "LIBRARY: %s base: %x" +msgstr "KÝTAPLIK: %s temel: %x" + +#: dlltool.c:1169 resrc.c:271 +#, c-format +msgid "wait: %s" +msgstr "bekle: %s" + +#: dlltool.c:1174 dllwrap.c:456 resrc.c:276 +#, c-format +msgid "subprocess got fatal signal %d" +msgstr "Ast-iþlem %d ölümcül sinyalini aldý" + +#: dlltool.c:1180 dllwrap.c:463 resrc.c:283 +#, c-format +msgid "%s exited with status %d" +msgstr "%s %d durumu ile çýktý" + +#: dlltool.c:1212 +#, c-format +msgid "Sucking in info from %s section in %s" +msgstr "%2$s'in %1$s bölümünden bilgi emiliyor" + +#: dlltool.c:1336 +#, c-format +msgid "Excluding symbol: %s" +msgstr "Sembol dýþlandý: %s" + +#: dlltool.c:1431 dlltool.c:1442 nm.c:946 nm.c:957 objdump.c:443 objdump.c:460 +#, c-format +msgid "%s: no symbols" +msgstr "%s: sembol yok" + +#. FIXME: we ought to read in and block out the base relocations +#: dlltool.c:1469 +#, c-format +msgid "Done reading %s" +msgstr "%s okundu" + +#: dlltool.c:1480 +#, c-format +msgid "Unable to open object file: %s" +msgstr "Nesne dosyasý açýlamadý: %s" + +#: dlltool.c:1483 +#, c-format +msgid "Scanning object file %s" +msgstr "Nesne dosyasý %s taranýyor" + +#: dlltool.c:1498 +#, c-format +msgid "Cannot produce mcore-elf dll from archive file: %s" +msgstr "Arþiv dosyasýndan mcore-elf dll oluþturulamadý: %s" + +#: dlltool.c:1590 +msgid "Adding exports to output file" +msgstr "Çýktý dosyasýna ihraçlar ekleniyor" + +#: dlltool.c:1635 +msgid "Added exports to output file" +msgstr "Çýktý dosyasýna ihraçlar eklendi" + +#: dlltool.c:1759 +#, c-format +msgid "Generating export file: %s" +msgstr "Ýhraç dosyasý oluþturuluyor: %s" + +#: dlltool.c:1764 +#, c-format +msgid "Unable to open temporary assembler file: %s" +msgstr "Geçiçi üretici dosyasý açýlamadý: %s" + +#: dlltool.c:1767 +#, c-format +msgid "Opened temporary file: %s" +msgstr "Geçici dosya açýldý: %s" + +#: dlltool.c:1981 +msgid "Generated exports file" +msgstr "Ýhraç dosyasý oluþturuldu" + +#: dlltool.c:2236 +#, c-format +msgid "bfd_open failed open stub file: %s" +msgstr "koçan dosyasý bfd_open ile açýlamadý: %s" + +#: dlltool.c:2239 +#, c-format +msgid "Creating stub file: %s" +msgstr "Koçan dosyasý oluþturuluyor: %s" + +#: dlltool.c:2626 +#, c-format +msgid "failed to open temporary head file: %s" +msgstr "geçici baþlýk dosyasý açýlamadý: %s" + +#: dlltool.c:2685 +#, c-format +msgid "failed to open temporary tail file: %s" +msgstr "geçici kuyruk dosyasý açýlamadý: %s" + +#: dlltool.c:2753 +#, c-format +msgid "Can't open .lib file: %s" +msgstr ".lib dosyasý açýlamadý: %s" + +#: dlltool.c:2756 +#, c-format +msgid "Creating library file: %s" +msgstr "Kitaplýk dosyasý açýlamadý: %s" + +#: dlltool.c:2815 +#, c-format +msgid "cannot delete %s: %s" +msgstr "%s silinemedi: %s" + +#: dlltool.c:2819 +msgid "Created lib file" +msgstr "Lib dosyasý oluþturuldu" + +#: dlltool.c:2924 +#, c-format +msgid "Warning, ignoring duplicate EXPORT %s %d,%d" +msgstr "Uyarý, EXPORT tekrarý %s %d,%d yoksayýldý" + +#: dlltool.c:2930 +#, c-format +msgid "Error, duplicate EXPORT with oridinals: %s" +msgstr "Hata, orjinal hali ile EXPORT tekrarý: %s" + +#: dlltool.c:3057 +msgid "Processing definitions" +msgstr "Tanýmlar iþleniyor" + +#: dlltool.c:3095 +msgid "Processed definitions" +msgstr "Tanýmlar iþlendi" + +#. xgetext:c-format +#: dlltool.c:3106 dllwrap.c:520 +#, c-format +msgid "Usage %s \n" +msgstr "Kullaným %s \n" + +#. xgetext:c-format +#: dlltool.c:3108 +#, c-format +msgid " -m --machine Create as DLL for . [default: %s]\n" +msgstr " -m --machine için DLL olarak oluþtur. [öntanýmlý: %s]\n" + +#: dlltool.c:3109 +msgid " possible : arm[_interwork], i386, mcore[-elf]{-le|-be}, ppc, thumb\n" +msgstr " tanýmlý : arm[_interwork], i386, mcore[-elf]{-le|-be}, ppc, thumb\n" + +#: dlltool.c:3110 +msgid " -e --output-exp Generate an export file.\n" +msgstr " -e --output-exp <çýktýadý> Ýhraç dosyasý oluþturur.\n" + +#: dlltool.c:3111 +msgid " -l --output-lib Generate an interface library.\n" +msgstr " -l --output-lib <çýktýadý> Arayüz kitaplýðý oluþturur.\n" + +#: dlltool.c:3112 +msgid " -a --add-indirect Add dll indirects to export file.\n" +msgstr " -a --add-indirect Ýhraç dosyasýna dll yönlendirmelerini ekler.\n" + +#: dlltool.c:3113 +msgid " -D --dllname Name of input dll to put into interface lib.\n" +msgstr " -D --dllname Arayüz kitaplýðýna eklenecek girdi dll adý.\n" + +#: dlltool.c:3114 +msgid " -d --input-def Name of .def file to be read in.\n" +msgstr " -d --input-def Okunacak .def dosyasýnýn adý.\n" + +#: dlltool.c:3115 +msgid " -z --output-def Name of .def file to be created.\n" +msgstr " -z --output-def Oluþturulacak .def dosyasýnýn adý.\n" + +#: dlltool.c:3116 +msgid " --export-all-symbols Export all symbols to .def\n" +msgstr " --export-all-symbols Bütün sembolleri .def'e ihraç eder\n" + +#: dlltool.c:3117 +msgid " --no-export-all-symbols Only export listed symbols\n" +msgstr " --no-export-all-symbols Yalnýzca listelenmiþ sembolleri ihraç eder\n" + +#: dlltool.c:3118 +msgid " --exclude-symbols Don't export \n" +msgstr " --exclude-symbols 'yi ihraç etmez\n" + +#: dlltool.c:3119 +msgid " --no-default-excludes Clear default exclude symbols\n" +msgstr " --no-default-excludes Öntanýmlý ihraç edilmeyecek sembol listesini boþaltýr\n" + +#: dlltool.c:3120 +msgid " -b --base-file Read linker generated base file.\n" +msgstr " -b --base-file Baðlayýcýnýn oluþturduðu temel dosyayý okur.\n" + +#: dlltool.c:3121 +msgid " -x --no-idata4 Don't generate idata$4 section.\n" +msgstr " -x --no-idata4 idata$4 bölümü oluþturmaz.\n" + +#: dlltool.c:3122 +msgid " -c --no-idata5 Don't generate idata$5 section.\n" +msgstr " -c --no-idata5 idata$5 bölümü oluþturmaz.\n" + +#: dlltool.c:3123 +msgid " -U --add-underscore Add underscores to symbols in interface library.\n" +msgstr " -U --add-underscore Arayüz kitaplýðýndaki sembollere alt-tire ekler.\n" + +#: dlltool.c:3124 +msgid " -k --kill-at Kill @ from exported names.\n" +msgstr " -k --kill-at Ýhraç edilmiþ isimlerden @'da öldürür.\n" + +#: dlltool.c:3125 +msgid " -A --add-stdcall-alias Add aliases without @.\n" +msgstr " -A --add-stdcall-alias Rumuzlarý @ içermeksizin ekler.\n" + +#: dlltool.c:3126 +msgid " -S --as Use for assembler.\n" +msgstr " -S --as Üretici olarak kullanýr.\n" + +#: dlltool.c:3127 +msgid " -f --as-flags Pass to the assembler.\n" +msgstr " -f --as-flags Üreticiye i geçirir.\n" + +#: dlltool.c:3128 +msgid " -C --compat-implib Create backward compatible import library.\n" +msgstr " -C --compat-implib Geçmiþe uyumlu ithal kitaplýðý oluþturur.\n" + +#: dlltool.c:3129 +msgid " -n --no-delete Keep temp files (repeat for extra preservation).\n" +msgstr " -n --no-delete Geçici dosyalarý tutar (daha da koruyucu olmasý için tekrarlanabilir).\n" + +#: dlltool.c:3130 +msgid " -v --verbose Be verbose.\n" +msgstr " -v --verbose Açýklama verir.\n" + +#: dlltool.c:3131 +msgid " -V --version Display the program version.\n" +msgstr " -V --version Sürüm bilgilerini gösterir.\n" + +#: dlltool.c:3132 +msgid " -h --help Display this information.\n" +msgstr " -h --help Bu yardýmý gösterir.\n" + +#: dlltool.c:3134 +msgid " -M --mcore-elf Process mcore-elf object files into .\n" +msgstr " -M --mcore-elf <çýktý_adý> mcore-elf nesne dosyalarýný <çýktý_adý>'na iþler.\n" + +#: dlltool.c:3135 +msgid " -L --linker Use as the linker.\n" +msgstr " -L --linker Baðlayýcý olarak kullanýr.\n" + +#: dlltool.c:3136 +msgid " -F --linker-flags Pass to the linker.\n" +msgstr " -F --linker-flags i baðlayýcýya geçirir.\n" + +#: dlltool.c:3280 +#, c-format +msgid "Unable to open base-file: %s" +msgstr "Temel-dosyasý açýlamadý: %s" + +#: dlltool.c:3309 +#, c-format +msgid "Machine '%s' not supported" +msgstr "'%s' makinasý desteklenmiyor" + +#: dlltool.c:3412 dllwrap.c:241 +#, c-format +msgid "Tried file: %s" +msgstr "Dosya denendi: %s" + +#: dlltool.c:3419 dllwrap.c:248 +#, c-format +msgid "Using file: %s" +msgstr "Dosya kullanýlýyor: %s" + +#: dllwrap.c:335 +#, c-format +msgid "Keeping temporary base file %s" +msgstr "Geçici temel dosya %s tutuldu" + +#: dllwrap.c:337 +#, c-format +msgid "Deleting temporary base file %s" +msgstr "Geçici temel dosya %s silindi" + +#: dllwrap.c:351 +#, c-format +msgid "Keeping temporary exp file %s" +msgstr "Geçici ihraç dosyasý %s tutuldu" + +#: dllwrap.c:353 +#, c-format +msgid "Deleting temporary exp file %s" +msgstr "Geçici ihraç dosyasý %s silindi" + +#: dllwrap.c:366 +#, c-format +msgid "Keeping temporary def file %s" +msgstr "Geçici taným dosyasý %s tutuldu" + +#: dllwrap.c:368 +#, c-format +msgid "Deleting temporary def file %s" +msgstr "Geçici taným dosyasý %s silindi" + +#: dllwrap.c:521 +msgid " Generic options:\n" +msgstr " Genel seçenekler: \n" + +#: dllwrap.c:522 +msgid " --quiet, -q Work quietly\n" +msgstr " --quiet, -q Sessiz çalýþýr\n" + +#: dllwrap.c:523 +msgid " --verbose, -v Verbose\n" +msgstr " --verbose, -v Açýklamalý\n" + +#: dllwrap.c:524 +msgid " --version Print dllwrap version\n" +msgstr " --version dllwrap sürümünü yazdýrýr\n" + +#: dllwrap.c:525 +msgid " --implib Synonym for --output-lib\n" +msgstr " --implib <çýktý_adý> --output-lib ile eþanlamlý\n" + +#: dllwrap.c:526 +#, c-format +msgid " Options for %s:\n" +msgstr " %s için seçenekler:\n" + +#: dllwrap.c:527 +msgid " --driver-name Defaults to \"gcc\"\n" +msgstr " --driver-name \"gcc\"ye öntanýmlý\n" + +#: dllwrap.c:528 +msgid " --driver-flags Override default ld flags\n" +msgstr " --driver-flags Öntanýmlý ld seçeneklerinin yerine geçer\n" + +#: dllwrap.c:529 +msgid " --dlltool-name Defaults to \"dlltool\"\n" +msgstr " --dlltool-name \"dlltool\"a öntanýmlý\n" + +#: dllwrap.c:530 +msgid " --entry Specify alternate DLL entry point\n" +msgstr " --entry Alternatif DLL giriþ noktasý belirtir\n" + +#: dllwrap.c:531 +msgid " --image-base Specify image base address\n" +msgstr " --image-base Ýmaj temel adresini belirtir\n" + +#: dllwrap.c:532 +msgid " --target i386-cygwin32 or i386-mingw32\n" +msgstr " --target hedef makina, i386-cygwin32 veya i386-mingw32\n" + +#: dllwrap.c:533 +msgid " --dry-run Show what needs to be run\n" +msgstr " --dry-run Çalýþtýrýlmasý gerekenleri gösterir\n" + +#: dllwrap.c:534 +msgid " --mno-cygwin Create Mingw DLL\n" +msgstr " --mno-cygwin Mingw DLL oluþturur\n" + +#: dllwrap.c:535 +msgid " Options passed to DLLTOOL:\n" +msgstr " DLLTOOL'a geçirilen seçenekler:\n" + +#: dllwrap.c:536 +msgid " --machine \n" +msgstr " --machine \n" + +#: dllwrap.c:537 +msgid " --output-exp Generate export file.\n" +msgstr " --output-exp <çýktý_adý> Ýhraç dosyasý oluþturur.\n" + +#: dllwrap.c:538 +msgid " --output-lib Generate input library.\n" +msgstr " --output-lib <çýktý_adý> Girdi kitaplýðý oluþturur.\n" + +#: dllwrap.c:539 +msgid " --add-indirect Add dll indirects to export file.\n" +msgstr " --add-indirect Dll yönlendirmelerini ihraç dosyasýna ekler.\n" + +#: dllwrap.c:540 +msgid " --dllname Name of input dll to put into output lib.\n" +msgstr " --dllname Çýktý kitaplýðýna konulacak girdi dll adý.\n" + +#: dllwrap.c:541 +msgid " --def Name input .def file\n" +msgstr " --def Girdi .def dosyasý adý\n" + +#: dllwrap.c:542 +msgid " --output-def Name output .def file\n" +msgstr " --output-def Çýktý .def dosyasýnýn adý\n" + +#: dllwrap.c:543 +msgid " --export-all-symbols Export all symbols to .def\n" +msgstr " --export-all-symbols Bütün sembolleri .def'e ihraç eder\n" + +#: dllwrap.c:544 +msgid " --no-export-all-symbols Only export .drectve symbols\n" +msgstr " --no-export-all-symbols Yalnýzca .drectve sembollerini ihraç eder\n" + +#: dllwrap.c:545 +msgid " --exclude-symbols Exclude from .def\n" +msgstr " --exclude-symbols deki sembolleri .def'e ihraç etmez\n" + +#: dllwrap.c:546 +msgid " --no-default-excludes Zap default exclude symbols\n" +msgstr " --no-default-excludes Dýþlanacak sembol öntanýmlarýný boþaltýr\n" + +#: dllwrap.c:547 +msgid " --base-file Read linker generated base file\n" +msgstr " --base-file Baðlayýcý tarafýndan oluþturulan temel dosyayý okur\n" + +#: dllwrap.c:548 +msgid " --no-idata4 Don't generate idata$4 section\n" +msgstr " --no-idata4 idata$4 bölümünü oluþturmaz\n" + +#: dllwrap.c:549 +msgid " --no-idata5 Don't generate idata$5 section\n" +msgstr " --no-idata5 idata$5 bölümünü oluþturmaz\n" + +#: dllwrap.c:550 +msgid " -U Add underscores to .lib\n" +msgstr " -U .lib'e alt-tire ekler\n" + +#: dllwrap.c:551 +msgid " -k Kill @ from exported names\n" +msgstr " -k @'i ihraç edilmiþ isimlerden çýkartýr\n" + +#: dllwrap.c:552 +msgid " --add-stdcall-alias Add aliases without @\n" +msgstr " --add-stdcall-alias Rumuzlarý @ olmaksýzýn ekler\n" + +#: dllwrap.c:553 +msgid " --as Use for assembler\n" +msgstr " --as Üretici olarak 'i kullanýr\n" + +#: dllwrap.c:554 +msgid " --nodelete Keep temp files.\n" +msgstr " --nodelete Geçici dosyalarý tutar.\n" + +#: dllwrap.c:555 +msgid " Rest are passed unmodified to the language driver\n" +msgstr " Kalanlar dil sürücüsüne deðiþtirilmeksizin geçirilir\n" + +#: dllwrap.c:816 +msgid "Must provide at least one of -o or --dllname options" +msgstr "-o veya --dllname (dll adý) seçeneklerinin en azýndan bir tanesi belirtilmelidir" + +#: dllwrap.c:844 +msgid "no export definition file provided" +msgstr "ihraç taným dosyasý verilmemiþ" + +#: dllwrap.c:845 +msgid "creating one, but that may not be what you want" +msgstr "bir tane oluþturuluyor fakat istediðiniz bu olmayabilir" + +#: dllwrap.c:1006 +#, c-format +msgid "DLLTOOL name : %s\n" +msgstr "DLLTOOL adý : %s\n" + +#: dllwrap.c:1007 +#, c-format +msgid "DLLTOOL options : %s\n" +msgstr "DLLTOOL seçenekleri : %s\n" + +#: dllwrap.c:1008 +#, c-format +msgid "DRIVER name : %s\n" +msgstr "SÜRÜCÜ adý : %s\n" + +#: dllwrap.c:1009 +#, c-format +msgid "DRIVER options : %s\n" +msgstr "SÜRÜCÜ seçenekleri : %s\n" + +#: ieee.c:317 +msgid "unexpected end of debugging information" +msgstr "hata ayýklama bilgilerinde beklenmeyen son" + +#: ieee.c:412 +msgid "invalid number" +msgstr "geçersiz sayý" + +#: ieee.c:471 +msgid "invalid string length" +msgstr "geçersiz dizge uzunluðu" + +#: ieee.c:528 ieee.c:569 +msgid "expression stack overflow" +msgstr "ifade yýðýtýnda taþma" + +#: ieee.c:548 +msgid "unsupported IEEE expression operator" +msgstr "desteklenmeyen IEEE ifade iþlemimi" + +#: ieee.c:563 +msgid "unknown section" +msgstr "bilinmeyen bölüm" + +#: ieee.c:584 +msgid "expression stack underflow" +msgstr "ifade yýðýt taþmasý" + +#: ieee.c:598 +msgid "expression stack mismatch" +msgstr "ifade yýðýtý uyumsuzluðu" + +#: ieee.c:637 +msgid "unknown builtin type" +msgstr "bilinmeyen oluþumiçi tip" + +#: ieee.c:782 +msgid "BCD float type not supported" +msgstr "BCD gerçel tipi desteklenmiyor" + +#: ieee.c:928 +msgid "unexpected number" +msgstr "beklenmeyen sayý" + +#: ieee.c:935 +msgid "unexpected record type" +msgstr "beklenmeyen kayýt tipi" + +#: ieee.c:968 +msgid "blocks left on stack at end" +msgstr "yýðýt üzerinde bloklar kaldý" + +#: ieee.c:1233 +msgid "unknown BB type" +msgstr "bilinmeyen BB tipi" + +#: ieee.c:1242 +msgid "stack overflow" +msgstr "yýðýt taþmasý" + +#: ieee.c:1267 +msgid "stack underflow" +msgstr "yýðýt alt taþmasý" + +#: ieee.c:1381 ieee.c:1453 ieee.c:2152 +msgid "illegal variable index" +msgstr "geçersiz deðiþken endeksi" + +#: ieee.c:1431 +msgid "illegal type index" +msgstr "geçersiz tip endeksi" + +#: ieee.c:1441 ieee.c:1478 +msgid "unknown TY code" +msgstr "bilinmeyen TY kodu" + +#: ieee.c:1460 +msgid "undefined variable in TY" +msgstr "TY'de tanýmsýz deðiþken" + +#. Pascal file name. FIXME. +#: ieee.c:1871 +msgid "Pascal file name not supported" +msgstr "Pascal dosya adý desteklenmiyor" + +#: ieee.c:1919 +msgid "unsupported qualifer" +msgstr "desteklenmeyen niteleyici" + +#: ieee.c:2190 +msgid "undefined variable in ATN" +msgstr "ATN'de tanýmsýz deðiþken" + +#: ieee.c:2233 +msgid "unknown ATN type" +msgstr "bilinmeyen ATN tipi" + +#. Reserved for FORTRAN common. +#: ieee.c:2355 +msgid "unsupported ATN11" +msgstr "desteklenmeyen ATN11" + +#. We have no way to record this information. FIXME. +#: ieee.c:2382 +msgid "unsupported ATN12" +msgstr "desteklenmeyen ATN12" + +#: ieee.c:2442 +msgid "unexpected string in C++ misc" +msgstr "C++ misc içinde beklenmeyen dizge" + +#: ieee.c:2455 +msgid "bad misc record" +msgstr "hatalý misc kaydý" + +#: ieee.c:2498 +msgid "unrecognized C++ misc record" +msgstr "bilinmeyen C++ misc kaydý" + +#: ieee.c:2615 +msgid "undefined C++ object" +msgstr "tanýmlanmamýþ C++ nesnesi" + +#: ieee.c:2649 +msgid "unrecognized C++ object spec" +msgstr "bilinmeyen C++ nesne tanýmý" + +#: ieee.c:2685 +msgid "unsupported C++ object type" +msgstr "desteklenmeyen C++ nesne tipi" + +#: ieee.c:2695 +msgid "C++ base class not defined" +msgstr "C++ temel sýnýfý tanýmlanmamýþ" + +#: ieee.c:2707 ieee.c:2812 +msgid "C++ object has no fields" +msgstr "C++ nesnesinde hiç alan yok" + +#: ieee.c:2726 +msgid "C++ base class not found in container" +msgstr "C++ temel sýnýfý taþýyýcý içinde bulunamadý" + +#: ieee.c:2833 +msgid "C++ data member not found in container" +msgstr "C++ veri üyesi taþýyýcý içinde bulunamadý" + +#: ieee.c:2874 ieee.c:3024 +msgid "unknown C++ visibility" +msgstr "bilinmeyen C++ görünürlüðü" + +#: ieee.c:2908 +msgid "bad C++ field bit pos or size" +msgstr "hatalý C++ alan biti konum veya boyu" + +#: ieee.c:3000 +msgid "bad type for C++ method function" +msgstr "C++ yöntem iþlevi için hatalý tip" + +#: ieee.c:3010 +msgid "no type information for C++ method function" +msgstr "C++ yöntem iþlevi için tip bilgisi yok" + +#: ieee.c:3049 +msgid "C++ static virtual method" +msgstr "C++ statik sanal yöntem" + +#: ieee.c:3144 +msgid "unrecognized C++ object overhead spec" +msgstr "bilinmeyen C++ nesne masraf tanýmý" + +#: ieee.c:3183 +msgid "undefined C++ vtable" +msgstr "tanýmlanmamýþ C++ vtablosu" + +#: ieee.c:3254 +msgid "C++ default values not in a function" +msgstr "C++ öntanýmlý deðerleri iþlev içerisinde deðil" + +#: ieee.c:3294 +msgid "unrecognized C++ default type" +msgstr "bilinmeyen öntanýmlý C++ tipi" + +#: ieee.c:3325 +msgid "reference parameter is not a pointer" +msgstr "referans parametresi imleyici deðil" + +#: ieee.c:3410 +msgid "unrecognized C++ reference type" +msgstr "bilinmeyen C++ referans tipi" + +#: ieee.c:3492 +msgid "C++ reference not found" +msgstr "C++ referansý bulunamadý" + +#: ieee.c:3500 +msgid "C++ reference is not pointer" +msgstr "C++ referansý imleyici deðil" + +#: ieee.c:3529 ieee.c:3537 +msgid "missing required ASN" +msgstr "Gerekli ASN yok" + +#: ieee.c:3567 ieee.c:3575 +msgid "missing required ATN65" +msgstr "Gerekli ATN65 yok" + +#: ieee.c:3589 +msgid "bad ATN65 record" +msgstr "hatalý ATN65 kaydý" + +#: ieee.c:4236 +msgid "IEEE numeric overflow: 0x" +msgstr "IEEE sayýsal taþma: 0x" + +#: ieee.c:4282 +#, c-format +msgid "IEEE string length overflow: %u\n" +msgstr "IEEE dizge uzunluk taþmasý: %u\n" + +#: ieee.c:5324 +#, c-format +msgid "IEEE unsupported integer type size %u\n" +msgstr "IEEE desteklenmeyen tamsayý tip boyu %u\n" + +#: ieee.c:5360 +#, c-format +msgid "IEEE unsupported float type size %u\n" +msgstr "IEEE desteklenmeyen gerçel tip boyu %u\n" + +#: ieee.c:5396 +#, c-format +msgid "IEEE unsupported complex type size %u\n" +msgstr "IEEE desteklenmeyen karmaþýk tip boyu %u\n" + +#: nlmconv.c:275 srconv.c:1966 +msgid "input and output files must be different" +msgstr "girdi ve çýktý dosyalarý farklý olmalý" + +#: nlmconv.c:322 +msgid "input file named both on command line and with INPUT" +msgstr "girdi dosyasý ismi hem komut satýrýnda hem INPUT olarak verilmiþ" + +#: nlmconv.c:331 +msgid "no input file" +msgstr "girdi dosyasý yok" + +#: nlmconv.c:361 +msgid "no name for output file" +msgstr "çýktý dosyasý için isim yok" + +#: nlmconv.c:374 +msgid "warning: input and output formats are not compatible" +msgstr "uyarý: girdi ve çýktý biçemleri uyumlu deðil" + +#: nlmconv.c:403 +msgid "make .bss section" +msgstr ".bss bölümü oluþtur" + +#: nlmconv.c:412 +msgid "make .nlmsections section" +msgstr ".nlmsections bölümü oluþtur" + +#: nlmconv.c:414 +msgid "set .nlmsections flags" +msgstr ".nlmsections seçenekleri atar" + +#: nlmconv.c:442 +msgid "set .bss vma" +msgstr ".bss vma atar" + +#: nlmconv.c:449 +msgid "set .data size" +msgstr ".data boyu atar" + +#: nlmconv.c:629 +#, c-format +msgid "warning: symbol %s imported but not in import list" +msgstr "uyarý: %s sembolü ithal edildi ama ithal listesinde deðil" + +#: nlmconv.c:649 +msgid "set start address" +msgstr "baþlangýç adresini atar" + +#: nlmconv.c:698 +#, c-format +msgid "warning: START procedure %s not defined" +msgstr "uyarý: START altyordamý %s tanýmsýz" + +#: nlmconv.c:700 +#, c-format +msgid "warning: EXIT procedure %s not defined" +msgstr "uyarý: EXIT altyordamý %s tanýmsýz" + +#: nlmconv.c:702 +#, c-format +msgid "warning: CHECK procedure %s not defined" +msgstr "warning: CHECK altyordamý %s tanýmsýz" + +#: nlmconv.c:723 nlmconv.c:912 +msgid "custom section" +msgstr "özel bölüm" + +#: nlmconv.c:744 nlmconv.c:941 +msgid "help section" +msgstr "yardým bölümü" + +#: nlmconv.c:766 nlmconv.c:959 +msgid "message section" +msgstr "ileti bölümü" + +#: nlmconv.c:782 nlmconv.c:992 +msgid "module section" +msgstr "modül bölümü" + +#: nlmconv.c:802 nlmconv.c:1008 +msgid "rpc section" +msgstr "rpc bölümü" + +#. There is no place to record this information. +#: nlmconv.c:838 +#, c-format +msgid "%s: warning: shared libraries can not have uninitialized data" +msgstr "%s: uyarý: paylaþýmlý kitaplýklar öndeðer atanmamýþ veri kapsayamaz" + +#: nlmconv.c:859 nlmconv.c:1027 +msgid "shared section" +msgstr "paylaþýmlý bölüm" + +#: nlmconv.c:867 +msgid "warning: No version number given" +msgstr "uyarý: Sürüm numarasý verilmemiþ" + +#: nlmconv.c:907 nlmconv.c:936 nlmconv.c:954 nlmconv.c:1003 nlmconv.c:1022 +#, c-format +msgid "%s: read: %s" +msgstr "%s: okundu: %s" + +#: nlmconv.c:929 +msgid "warning: MAP and FULLMAP are not supported; try ld -M" +msgstr "uyarý: MAP ve FULLMAP desteklenmiyor; ld -M komutunu deneyin" + +#: nlmconv.c:1099 +#, c-format +msgid "%s: Convert an object file into a NetWare Loadable Module\n" +msgstr "%s: Bir nesne dosyasýný NetWare Yüklenebilir Modül haline getirir\n" + +#: nlmconv.c:1111 +#, c-format +msgid "" +"Usage: %s [-dhV] [-I bfdname] [-O bfdname] [-T header-file] [-l linker]\n" +" [--input-target=bfdname] [--output-target=bfdname]\n" +" [--header-file=file] [--linker=linker] [--debug]\n" +" [--help] [--version]\n" +" [in-file [out-file]]\n" +msgstr "" +"Kullaným: %s [-dhV] [-I bfd_adý] [-O bfd_adý] [-T baþlýk-dosyasý]\n" +" [-l baðlayýcý]\n" +" [--input-target=bfd_adý] girdi dosyasý adý\n" +" [--output-target=bfd_adý] çýktý dosyasý adý\n" +" [--header-file=dosya] baþlýk dosyasý adý\n" +" [--linker=baðlayýcý] baðlayýcý yazýlým adý\n" +" [--debug] hata ayýklama kipi\n" +" [--help] bu yardýmý gösterir\n" +" [--version] sürüm bilgisini gösterir\n" +" [girdi-dosyasý [çýktý-dosyasý]]\n" + +#: nlmconv.c:1151 +#, c-format +msgid "support not compiled in for %s" +msgstr "%s için destek derlenmemiþ" + +#: nlmconv.c:1191 +msgid "make section" +msgstr "bölüm oluþtur" + +#: nlmconv.c:1205 +msgid "set section size" +msgstr "bölüm boyu belirtir" + +#: nlmconv.c:1211 +msgid "set section alignment" +msgstr "bölüm hizalanmasý atar" + +#: nlmconv.c:1215 +msgid "set section flags" +msgstr "bölüm seçeneklerini atar" + +#: nlmconv.c:1226 +msgid "set .nlmsections size" +msgstr ".nlmsections boyunu atar" + +#: nlmconv.c:1314 nlmconv.c:1322 nlmconv.c:1331 nlmconv.c:1336 +msgid "set .nlmsection contents" +msgstr ".nlmsection içeriðini atar" + +#: nlmconv.c:1839 +msgid "stub section sizes" +msgstr "koçan bölüm boylarý" + +#: nlmconv.c:1888 +msgid "writing stub" +msgstr "koçan yazýlýyor" + +#: nlmconv.c:1978 +#, c-format +msgid "unresolved PC relative reloc against %s" +msgstr "%s'e göreli PC yer deðiþtirme çözümlenemedi" + +#: nlmconv.c:2042 +#, c-format +msgid "overflow when adjusting relocation against %s" +msgstr "%s'e göreli yer deðiþtirme ayarlanýrken taþma oluþtu" + +#: nlmconv.c:2159 +#, c-format +msgid "%s: execution of %s failed: " +msgstr "%s: %s'in çalýþtýrýlmasý baþarýsýz oldu: " + +#: nlmconv.c:2174 +#, c-format +msgid "Execution of %s failed" +msgstr "%s'in çalýþtýrýlmasý baþarýsýz oldu" + +#: nm.c:294 +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "Kullaným: %s [SEÇENEK]... [DOSYA]...\n" + +#: nm.c:295 +msgid "List symbols from FILEs (a.out by default).\n" +msgstr "DOSYAlardaki sembolleri listeler (öntanýmlý a.out).\n" + +#: nm.c:296 +msgid "" +"\n" +" -a, --debug-syms Display debugger-only symbols\n" +" -A, --print-file-name Print name of the input file before every symbol\n" +" -B Same as --format=bsd\n" +" -C, --demangle[=STYLE] Decode low-level symbol names into user-level names\n" +" The STYLE, if specified, can be `auto' (the default),\n" +" `gnu', 'lucid', 'arm', 'hp', 'edg' or 'gnu-new-abi'\n" +" --no-demangle Do not demangle low-level symbol names\n" +" -D, --dynamic Display dynamic symbols instead of normal symbols\n" +" --defined-only Display only defined symbols\n" +" -e (ignored)\n" +" -f, --format=FORMAT Use the output format FORMAT. FORMAT can be `bsd',\n" +" `sysv' or `posix'. The default is `bsd'\n" +" -g, --extern-only Display only external symbols\n" +" -h, --help Display this information\n" +" -l, --line-numbers Use debugging information to find a filename and\n" +" line number for each symbol\n" +" -n, --numeric-sort Sort symbols numerically by address\n" +" -o Same as -A\n" +" -p, --no-sort Do not sort the symbols\n" +" -P, --portability Same as --format=posix\n" +" -r, --reverse-sort Reverse the sense of the sort\n" +" -s, --print-armap Include index for symbols from archive members\n" +" --size-sort Sort symbols by size\n" +" -t, --radix=RADIX Use RADIX for printing symbol values\n" +" --target=BFDNAME Specify the target object format as BFDNAME\n" +" -u, --undefined-only Display only undefined symbols\n" +" -V, --version Display this program's version number\n" +" -X 32_64 (ignored)\n" +"\n" +msgstr "" +"\n" +" -a, --debug-syms Yalnýzca hata ayýklamaya dair sembolleri gösterir\n" +" -A, --print-file-name Her sembolden önce girdi dosyasýnýn adýný yazdýrýr\n" +" -B --format=bsd ile ayný\n" +" -C, --demangle[=TARZ] Alt düzey sembol adlarýný kullanýcý seviyesinde adlara çevirir\n" +" TARZ, eðer belirtilirse, 'auto' (öntanýmlý),\n" +" `gnu', 'lucid', 'arm', 'hp', 'edg' veya 'gnu-new-abi' olabilir\n" +" --no-demangle Alt düzey sembol adlarýný çevirmez\n" +" -D, --dynamic Normal semboller yerine dinamik sembolleri gösterir\n" +" --defined-only Yalnýzca tanýmlanmýþ sembolleri gösterir\n" +" -e (yoksayýlýr)\n" +" -f, --format=BÝÇEM Çýktý biçemi için BÝÇEM'i kullanýr. BÝÇEM, 'bsd' (öntanýmlý),\n" +" `sysv' veya `posix' olabilir\n" +" -g, --extern-only Yalnýzca harici sembolleri gösterir\n" +" -h, --help Bu bilgiyi gösterir\n" +" -l, --line-numbers Hata ayýklama bilgisini kullanarak her sembol için bir\n" +" satýr numarasý ve dosya adý bulur.\n" +" -n, --numeric-sort Sembolleri adres numarasýna göre sýralar\n" +" -o -A ile ayný\n" +" -p, --no-sort Sembolleri sýralamaz\n" +" -P, --portability --format=posix ile ayný\n" +" -r, --reverse-sort Ters sýralar\n" +" -s, --print-armap Arþiv üyelerinden gelen semboller için endeks içerir\n" +" --size-sort Sembolleri büyüklüðe göre sýralar\n" +" -t, --radix=RADIX Sembol deðerlerini yazdýrmak için RADIX kullanýr\n" +" --target=BFD_ADI Hedef nesne biçemini BFD_ADI olarak belirler\n" +" -u, --undefined-only Yalnýzca tanýmlanmamýþ sembolleri gösterir\n" +" -V, --version Sürüm bilgilerini gösterir\n" +" -X 32_64 (yoksayýlýr)\n" +"\n" + +#: nm.c:328 objdump.c:274 +#, c-format +msgid "Report bugs to %s.\n" +msgstr "" +"Hatalarý %s adresine, \n" +"çeviri hatalarýný adresine bildiriniz.\n" + +#: nm.c:361 +#, c-format +msgid "%s: invalid radix" +msgstr "%s: geçersiz radix" + +#: nm.c:386 +#, c-format +msgid "%s: invalid output format" +msgstr "%s: geçersiz çýktý biçemi" + +#: nm.c:493 +msgid "Only -X 32_64 is supported" +msgstr "Yalnýz -X 32_64 destekleniyor" + +#: nm.c:535 +#, c-format +msgid "data size %ld" +msgstr "veri büyüklüðü %ld" + +#: nm.c:1325 +#, c-format +msgid "\n\nUndefined symbols from %s:\n\n" +msgstr "\n\n%s'de tanýmlanmamýþ semboller:\n\n" + +#: nm.c:1327 +#, c-format +msgid "\n\nSymbols from %s:\n\n" +msgstr "\n\n%s'de semboller:\n\n" + +#: nm.c:1328 nm.c:1382 +msgid "Name Value Class Type Size Line Section\n\n" +msgstr "" +"Name Value Class Type Size Line Section\n" +"\n" +"Ýsim Deðer Sýnýf Tip Boy Satýr Bölüm\n" +"\n" + +#: nm.c:1379 +#, c-format +msgid "\n\nUndefined symbols from %s[%s]:\n\n" +msgstr "\n\n%s[%s]'de tanýmlanmamýþ semboller:\n\n" + +#: nm.c:1381 +#, c-format +msgid "\n\nSymbols from %s[%s]:\n\n" +msgstr "\n\n%s[%s]'de semboller:\n\n" + +#: nm.c:1552 +msgid "\nArchive index:\n" +msgstr "\nArþiv endeksi:\n" + +#: objcopy.c:322 +#, c-format +msgid "Usage: %s in-file [out-file]\n" +msgstr "Kullaným: %s girdi-dosyasý [çýktý-dosyasý]\n" + +#: objcopy.c:323 objcopy.c:383 +msgid " The switches are:\n" +msgstr " Seçenekler:\n" + +#: objcopy.c:324 +msgid "" +" -I --input-target Assume input file is in format \n" +" -O --output-target Create an output file in format \n" +" -F --target Set both input and output format to \n" +" --debugging Convert debugging information, if possible\n" +" -p --preserve-dates Copy modified/access timestamps to the output\n" +" -j --only-section Only copy section into the output\n" +" -R --remove-section Remove section from the output\n" +" -S --strip-all Remove all symbol and relocation information\n" +" -g --strip-debug Remove all debugging symbols\n" +" --strip-unneeded Remove all symbols not needed by relocations\n" +" -N --strip-symbol Do not copy symbol \n" +" -K --keep-symbol Only copy symbol \n" +" -L --localize-symbol Force symbol to be marked as a local\n" +" -W --weaken-symbol Force symbol to be marked as a weak\n" +" --weaken Force all global symbols to be marked as weak\n" +" -x --discard-all Remove all non-global symbols\n" +" -X --discard-locals Remove any compiler-generated symbols\n" +" -i --interleave Only copy one out of every bytes\n" +" -b --byte Select byte in every interleaved block\n" +" --gap-fill Fill gaps between sections with \n" +" --pad-to Pad the last section up to address \n" +" --set-start Set the start address to \n" +" {--change-start|--adjust-start} \n" +" Add to the start address\n" +" {--change-addresses|--adjust-vma} \n" +" Add to LMA, VMA and start addresses\n" +" {--change-section-address|--adjust-section-vma} {=|+|-}\n" +" Change LMA and VMA of section by \n" +" --change-section-lma {=|+|-}\n" +" Change the LMA of section by \n" +" --change-section-vma {=|+|-}\n" +" Change the VMA of section by \n" +" {--[no-]change-warnings|--[no-]adjust-warnings}\n" +" Warn if a named section does not exist\n" +" --set-section-flags =\n" +" Set section 's properties to \n" +" --add-section = Add section found in to output\n" +" --change-leading-char Force output format's leading character style\n" +" --remove-leading-char Remove leading character from global symbols\n" +" --redefine-sym = Redefine symbol name to \n" +" --srec-len Restrict the length of generated Srecords\n" +" --srec-forceS3 Restrict the type of generated Srecords to S3\n" +" -v --verbose List all object files modified\n" +" -V --version Display this program's version number\n" +" -h --help Display this output\n" +msgstr "" +" -I --input-target Girdi dosyasýnýn biçeminde olduðunu varsayar\n" +" -O --output-target Çýktý dosyasýný biçeminde oluþturur\n" +" -F --target Hem girdi, hem de çýktý biçemini olarak atar\n" +" --debugging Mümkün olduðu kadar hata ayýklama bilgisini dönüþtürür\n" +" -p --preserve-dates Çýktýya deðiþim/eriþim zaman damgalarýný kopyalar\n" +" -j --only-section Çýktýya yalnýzca bölümünü kopyalar\n" +" -R --remove-section Çýktýdan bölümünü çýkarýr\n" +" -S --strip-all Bütün sembol ve yer deðiþtirme bilgisini siler\n" +" -g --strip-debug Bütün hata ayýklama sembollerini siler\n" +" --strip-unneeded Yer deðiþtirmeler için gerekmeyen bütün sembolleri siler\n" +" -N --strip-symbol sembolünü kopyalamaz\n" +" -K --keep-symbol Yalnýzca sembolünü kopyalar\n" +" -L --localize-symbol sembolünün yerel olarak tanýmlanmasýný saðlar\n" +" -W --weaken-symbol sembolünün zayýf olarak tanýmlanmasýný saðlar\n" +" --weaken Bütün evrensel sembollerin zayýf olarak tanýmlanmasýný saðlar\n" +" -x --discard-all Evrensel olmayan bütün sembolleri siler\n" +" -X --discard-locals Derleyici tarafýndan oluþturulan bütün sembolleri siler\n" +" -i --interleave Her bayttan yalnýz birini kopyalar\n" +" -b --byte Her serpiþtirilmiþ bloktan numaralý baytý seçer\n" +" --gap-fill Bölümler arasý boþluklarý ile doldurur\n" +" --pad-to Son bölümü e kadar boþlukla doldurur\n" +" --set-start Baþlangýç adresini olarak belirtir\n" +" {--change-start|--adjust-start} \n" +" Baþlangýç adresine ekler\n" +" {--change-addresses|--adjust-vma} \n" +" LMA, VMA ve baþlangýç adreslerine ekler\n" +" {--change-section-address|--adjust-section-vma} {=|+|-}\n" +" bölümünün LMA ve VMA'sýný kadar deðiþtirir\n" +" --change-section-lma {=|+|-}\n" +" bölümünün LMA'sýný kadar deðiþtirir\n" +" --change-section-vma {=|+|-}\n" +" bölümünün VMA'sýný kadar deðiþtirir\n" +" {--[no-]change-warnings|--[no-]adjust-warnings}\n" +" Eðer isimli bir bölüm yok ise uyarý verir\n" +" --set-section-flags =\n" +" bölümünün özniteliklerini e ayarlar\n" +" --add-section = içinde bulunan bölümünü çýktýya ekler\n" +" --change-leading-char Çýktý biçeminin baþlangýç karakter tipini deðiþtiri\n" +" --remove-leading-char Evrensel sembollerden baþlangýç karakterini çýkarýr\n" +" --redefine-sym = isimli sembolü isimli olarak yeniden tanýmlar\n" +" --srec-len Oluþturulan S kayýtlarýnýn boyutunu kýsýtlar\n" +" --srec-forceS3 Oluþturulan S kayýtlarý tipini S3 olarak kýsýtlar\n" +" -v --verbose Deðiþtirilen tüm nesne dosyalarýný listeler\n" +" -V --version Bu yazýlýmýn sürüm bilgilerini gösterir\n" +" -h --help Bu çýktýyý gösterir\n" + +#: objcopy.c:382 +#, c-format +msgid "Usage: %s in-file(s)\n" +msgstr "Kullaným: %s girdi-dosya(larý)\n" + +#: objcopy.c:384 +msgid "" +" -I --input-target Assume input file is in format \n" +" -O --output-target Create an output file in format \n" +" -F --target Set both input and output format to \n" +" -p --preserve-dates Copy modified/access timestamps to the output\n" +" -R --remove-section Remove section from the output\n" +" -s --strip-all Remove all symbol and relocation information\n" +" -g -S --strip-debug Remove all debugging symbols\n" +" --strip-unneeded Remove all symbols not needed by relocations\n" +" -N --strip-symbol Do not copy symbol \n" +" -K --keep-symbol Only copy symbol \n" +" -x --discard-all Remove all non-global symbols\n" +" -X --discard-locals Remove any compiler-generated symbols\n" +" -v --verbose List all object files modified\n" +" -V --version Display this program's version number\n" +" -h --help Display this output\n" +" -o Place stripped output into \n" +msgstr "" +" -I --input-target Girdi dosyasýnýn biçeminde olduðunu varsayar\n" +" -O --output-target Çýktý dosyasýný biçeminde oluþturur\n" +" -F --target Girdi ve çýktý biçemlerini olarak atar\n" +" -p --preserve-dates Çýktýya deðiþim/eriþim zaman damgalarýný kopyalar\n" +" -R --remove-section Çýktýdan bölümünü çýkarýr\n" +" -s --strip-all Bütün sembol ve yer deðiþtirme bilgisini siler\n" +" -g -S --strip-debug Bütün hata ayýklama sembollerini siler\n" +" --strip-unneeded Yer deðiþtirmeler için gerekmeyen bütün sembolleri siler\n" +" -N --strip-symbol sembolünü kopyalamaz\n" +" -K --keep-symbol Yalnýzca sembolünü kopyalar\n" +" -x --discard-all Evrensel olmayan bütün sembolleri siler\n" +" -X --discard-locals Derleyici tarafýndan oluþturulan bütün sembolleri siler\n" +" -v --verbose Deðiþtirilen tüm nesne dosyalarýný listeler\n" +" -V --version Bu yazýlýmýn sürüm bilgilerini gösterir\n" +" -h --help Bu çýktýyý gösterir\n" +" -o Sembolleri silinmiþ çýktýyý ya yerleþtirir\n" + +#: objcopy.c:454 +#, c-format +msgid "unrecognized section flag `%s'" +msgstr "bilinmeyen bölüm seçeneði `%s'" + +#: objcopy.c:455 +#, c-format +msgid "supported flags: %s" +msgstr "desteklenen seçenekler: %s" + +#: objcopy.c:712 +#, c-format +msgid "%s: Multiple redefinition of symbol \"%s\"" +msgstr "%s: \"%s\" sembolü tekrar tanýmlanmýþ" + +#: objcopy.c:719 +#, c-format +msgid "%s: Symbol \"%s\" is target of more than one redefinition" +msgstr "%s: \"%s\" sembolü birden fazla yeniden tanýmlamanýn hedefi" + +#: objcopy.c:773 +#, c-format +msgid "copy from %s(%s) to %s(%s)\n" +msgstr "%s(%s)'dan %s(%s)'a kopyalar\n" + +#: objcopy.c:792 +#, c-format +msgid "Warning: Output file cannot represent architecture %s" +msgstr "Uyarý: Çýktý dosyasý %s mimarisini temsil edemez" + +#: objcopy.c:819 +#, c-format +msgid "can't create section `%s': %s" +msgstr "`%s' bölümü oluþturulamadý: %s" + +#: objcopy.c:905 +#, c-format +msgid "Can't fill gap after %s: %s" +msgstr "%s'den sonraki boþluk doldurulamadý: %s" + +#: objcopy.c:930 +#, c-format +msgid "Can't add padding to %s: %s" +msgstr "%s'ye dolgu eklenemedi: %s" + +#: objcopy.c:1068 +#, c-format +msgid "%s: error copying private BFD data: %s" +msgstr "%s: özel BFD verisi kopyalanýrken hata: %s" + +#: objcopy.c:1102 +#, c-format +msgid "cannot mkdir %s for archive copying (error: %s)" +msgstr "arþiv kopyalamasý için mkdir %s baþarýlý olamadý (hata: %s)" + +#: objcopy.c:1291 +msgid "making" +msgstr "oluþturuluyor" + +#: objcopy.c:1300 +msgid "size" +msgstr "boyut" + +#: objcopy.c:1314 +msgid "vma" +msgstr "vma" + +#: objcopy.c:1340 +msgid "alignment" +msgstr "hizalama" + +#: objcopy.c:1349 +msgid "flags" +msgstr "seçenekler" + +#: objcopy.c:1363 +msgid "private data" +msgstr "özel veri" + +#: objcopy.c:1371 +#, c-format +msgid "%s: section `%s': error in %s: %s" +msgstr "%s: bölüm `%s': %s'da hata: %s" + +#: objcopy.c:1645 +#, c-format +msgid "%s: can't create debugging section: %s" +msgstr "%s: hata ayýklama bölümü oluþturulamadý: %s" + +#: objcopy.c:1660 +#, c-format +msgid "%s: can't set debugging section contents: %s" +msgstr "%s: hata ayýklama bölüm içeriði atanamadý: %s" + +#: objcopy.c:1669 +#, c-format +msgid "%s: don't know how to write debugging information for %s" +msgstr "%s: %s için hata ayýklama bilgisinin nasýl yazýlacaðý bilinmiyor" + +#: objcopy.c:1775 +#, c-format +msgid "%s: cannot stat: %s" +msgstr "%s: durumlanamadý: %s" + +#: objcopy.c:1825 +msgid "byte number must be non-negative" +msgstr "bayt numarasý negatif olmamalý" + +#: objcopy.c:1831 +msgid "interleave must be positive" +msgstr "serpiþtirme pozitif olmalý" + +#: objcopy.c:1851 objcopy.c:1859 +#, c-format +msgid "%s both copied and removed" +msgstr "%s hem kopyalandý hem silindi" + +#: objcopy.c:1928 objcopy.c:1998 objcopy.c:2099 objcopy.c:2127 +#, c-format +msgid "bad format for %s" +msgstr "%s için hatalý biçem" + +#: objcopy.c:1931 +#, c-format +msgid "cannot stat: %s: %s" +msgstr "durumlanamadý: %s: %s" + +#: objcopy.c:1949 +#, c-format +msgid "cannot open: %s: %s" +msgstr "açýlamadý: %s: %s" + +#: objcopy.c:1953 +#, c-format +msgid "%s: fread failed" +msgstr "%s: fread baþarýsýz" + +#: objcopy.c:2067 +#, c-format +msgid "Warning: truncating gap-fill from 0x%s to 0x%x" +msgstr "Uyarý: dolgu, 0x%s'dan 0x%x'ya kýrpýldý" + +#: objcopy.c:2169 +msgid "byte number must be less than interleave" +msgstr "bayt numarasý serpiþtirmeden daha küçük olmalý" + +#: objcopy.c:2188 +#, c-format +msgid "Cannot stat: %s: %s" +msgstr "Durumlanamadý: %s: %s" + +#: objcopy.c:2228 objcopy.c:2242 +#, c-format +msgid "%s %s%c0x%s never used" +msgstr "%s %s%c0x%s hiç kullanýlmadý" + +#: objdump.c:223 +#, c-format +msgid "Usage: %s OPTION... FILE...\n" +msgstr "Kullaným: %s SEÇENEK... DOSYA...\n" + +#: objdump.c:224 +msgid "Display information from object FILE.\n" +msgstr "Nesne DOSYA'sýndan bilgi gösterir.\n" + +#: objdump.c:225 +msgid "\n At least one of the following switches must be given:\n" +msgstr "\n En azýndan aþaðýdaki seçeneklerin biri verilmelidir:\n" + +#: objdump.c:226 +msgid "" +" -a, --archive-headers Display archive header information\n" +" -f, --file-headers Display the contents of the overall file header\n" +" -p, --private-headers Display object format specific file header contents\n" +" -h, --[section-]headers Display the contents of the section headers\n" +" -x, --all-headers Display the contents of all headers\n" +" -d, --disassemble Display assembler contents of executable sections\n" +" -D, --disassemble-all Display assembler contents of all sections\n" +" -S, --source Intermix source code with disassembly\n" +" -s, --full-contents Display the full contents of all sections requested\n" +" -g, --debugging Display debug information in object file\n" +" -G, --stabs Display (in raw form) any STABS info in the file\n" +" -t, --syms Display the contents of the symbol table(s)\n" +" -T, --dynamic-syms Display the contents of the dynamic symbol table\n" +" -r, --reloc Display the relocation entries in the file\n" +" -R, --dynamic-reloc Display the dynamic relocation entries in the file\n" +" -V, --version Display this program's version number\n" +" -i, --info List object formats and architectures supported\n" +" -H, --help Display this information\n" +msgstr "" +" -a, --archive-headers Arþiv baþlýk bilgilerini gösterir\n" +" -f, --file-headers Dosya baþlýk bilgilerini gösterir\n" +" -p, --private-headers Nesne biçemine özgü dosya baþlýk bilgilerini gösterir\n" +" -h, --[section-]headers Bölüm baþlýklarýný gösterir\n" +" -x, --all-headers Bütün baþlýklarý gösterir\n" +" -d, --disassemble Uygulama bölümlerinin üretici içeriðini gösterir\n" +" -D, --disassemble-all Bütün bölümlerin üretici içeriklerini gösterir\n" +" -S, --source Üretici içerikleri ile kaynak kodunu bir arada gösterir\n" +" -s, --full-contents Ýstenen bütün bölümlerin bütün içeriðini gösterir\n" +" -g, --debugging Nesne dosyasýndaki hata ayýklama bilgilerini gösterir\n" +" -G, --stabs Dosyadaki STABS bilgisini (ham hali ile) gösterir\n" +" -t, --syms Sembol tablolarýnýn içeriðini gösterir\n" +" -T, --dynamic-syms Dinamik sembol tablolarýnýn içeriðini gösterir\n" +" -r, --reloc Dosyadaki yer deðiþtirme girdilerini gösterir\n" +" -R, --dynamic-reloc Dosyadaki dinamik yer deðiþtirme bilgilerini gösterir\n" +" -V, --version Bu yazýlýmýn sürüm bilgilerini gösterir\n" +" -i, --info Desteklenen biçem ve mimarileri gösterir\n" +" -H, --help Bu bilgiyi gösterir\n" + +#: objdump.c:248 +msgid "\n The following switches are optional:\n" +msgstr "\n Aþaðýdaki seçenekler isteðe baðlý:\n" + +#: objdump.c:249 +msgid "" +" -b, --target=BFDNAME Specify the target object format as BFDNAME\n" +" -m, --architecture=MACHINE Specify the target architecture as MACHINE\n" +" -j, --section=NAME Only display information for section NAME\n" +" -M, --disassembler-options=OPT Pass text OPT on to the disassembler\n" +" -EB --endian=big Assume big endian format when disassembling\n" +" -EL --endian=little Assume little endian format when disassembling\n" +" --file-start-context Include context from start of file (with -S)\n" +" -l, --line-numbers Include line numbers and filenames in output\n" +" -C, --demangle[=STYLE] Decode mangled/processed symbol names\n" +" The STYLE, if specified, can be `auto', 'gnu',\n" +" 'lucid', 'arm', 'hp', 'edg', or 'gnu-new-abi'\n" +" -w, --wide Format output for more than 80 columns\n" +" -z, --disassemble-zeroes Do not skip blocks of zeroes when disassembling\n" +" --start-address=ADDR Only process data whoes address is >= ADDR\n" +" --stop-address=ADDR Only process data whoes address is <= ADDR\n" +" --prefix-addresses Print complete address alongside disassembly\n" +" --[no-]show-raw-insn Display hex alongside symbolic disassembly\n" +" --adjust-vma=OFFSET Add OFFSET to all displayed section addresses\n" +"\n" +msgstr "" +" -b, --target=BFD_ADI Hedef nesne biçemini BFD_ADI olarak belirtir\n" +" -m, --architecture=MAKÝNA Hedef mimariyi MAKÝNA olarak belirtir\n" +" -j, --section=ÝSÝM Yalnýzca ÝSÝM bölümü için bilgi gösterir\n" +" -M, --disassembler-options=SEÇ Karþýt-çeviriciye metin SEÇeneklerini geçirir\n" +" -EB --endian=big Karþýt-çevirim esnasýnda big-endian biçemini varsayar\n" +" -EL --endian=little Karþýt-çevirim esnasýnda little-endian biçemini varsayar\n" +" --file-start-context Dosyanýn baþlangýcýndan itibaren baðlamý içerir (-S ile)\n" +" -l, --line-numbers Çýktýda dosya isimleri ve satýr numaralarý gösterir\n" +" -C, --demangle[=TARZ] Karýþtýrýlmýþ/iþlenmiþ sembol isimlerini çözümler\n" +" Tarz, eðer belirtilmiþse, `auto', 'gnu',\n" +" 'lucid', 'arm', 'hp', 'edg', veya 'gnu-new-abi' olabilir\n" +" -w, --wide Çýktýyý 80 sütundan daha geniþ olarak biçemler\n" +" -z, --disassemble-zeroes Karþýt-çevirim esnasýnda sýfýr bloklarýný atlamaz\n" +" --start-address=ADRES Yalnýzca adresi >= ADRES olan verileri iþler\n" +" --stop-address=ADRES Yalnýzca adresi <= ADRES olan verileri iþler\n" +" --prefix-addresses Tam adresi karþýt çevirim ile birlikte yazdýrýr\n" +" --[no-]show-raw-insn Onaltýlýk bilgi ile sembolik karþýt-çevrimi birlikte yazdýrýr\n" +" --adjust-vma=BASAMAK Bütün gösterilen bölüm adreslerine BASAMAK ekler\n" +"\n" + +#: objdump.c:419 +msgid "Sections:\n" +msgstr "Bölümler:\n" + +#: objdump.c:422 +msgid "Idx Name Size VMA LMA File off Algn" +msgstr "Idx Adý Boy VMA LMA Dosya of Hiza" + +#: objdump.c:424 +msgid "Idx Name Size VMA LMA File off Algn" +msgstr "Idx Adý Boy VMA LMA Dosya of Hiza" + +#: objdump.c:428 +msgid " Flags" +msgstr " Seçenekler" + +#: objdump.c:478 +#, c-format +msgid "%s: not a dynamic object" +msgstr "%s: dinamik nesne deðil" + +#: objdump.c:494 +#, c-format +msgid "%s: No dynamic symbols" +msgstr "%s: Dinamik sembol yok" + +#: objdump.c:1197 +msgid "Out of virtual memory" +msgstr "Sanal bellek tükendi" + +#: objdump.c:1616 +#, c-format +msgid "Can't use supplied machine %s" +msgstr "Verilen makina %s kullanýlamadý" + +#: objdump.c:1634 +#, c-format +msgid "Can't disassemble for architecture %s\n" +msgstr "%s mimarisi için karþýt çevirim yapýlamadý\n" + +#: objdump.c:1716 +#, c-format +msgid "Disassembly of section %s:\n" +msgstr "%s bölümünün karþýt çevrimi:\n" + +#: objdump.c:1890 +#, c-format +msgid "No %s section present\n\n" +msgstr "%s bölümü yok\n\n" + +#: objdump.c:1897 +#, c-format +msgid "%s has no %s section" +msgstr "%s %s bölümü yok" + +#: objdump.c:1911 +#, c-format +msgid "Reading %s section of %s failed: %s" +msgstr "%2$s'nin %1$s bölümünün okunmasý baþarýsýz: %3$s" + +#: objdump.c:1923 +#, c-format +msgid "Reading %s section of %s failed: %s\n" +msgstr "%2$s'nin %1$s bölümünün okunmasý baþarýsýz: %3$s\n" + +#: objdump.c:1966 +#, c-format +msgid "Contents of %s section:\n\n" +msgstr "%s bölümünün içeriði:\n\n" + +#: objdump.c:2066 +#, c-format +msgid "architecture: %s, " +msgstr "mimari: %s," + +#: objdump.c:2069 +#, c-format +msgid "flags 0x%08x:\n" +msgstr "seçenekler 0x%08x:\n" + +#: objdump.c:2082 +msgid "\nstart address 0x" +msgstr "\nbaþlangýç adresi 0x" + +#: objdump.c:2114 +#, c-format +msgid "\n%s: file format %s\n" +msgstr "\n%s: %s dosya biçemi\n" + +#: objdump.c:2156 +#, c-format +msgid "%s: printing debugging information failed" +msgstr "%s: hata ayýklama bilgisinin yazdýrýlmasý baþarýsýz" + +#: objdump.c:2233 +#, c-format +msgid "In archive %s:\n" +msgstr "%s arþivi içinde:\n" + +#: objdump.c:2285 +#, c-format +msgid "Contents of section %s:\n" +msgstr "%s bölümünün içeriði:\n" + +#: objdump.c:2798 +#, c-format +msgid "BFD header file version %s\n" +msgstr "BFD baþlýk dosyasý sürümü %s\n" + +#: objdump.c:2882 +msgid "unrecognized -E option" +msgstr "tanýnmayan -E seçeneði" + +#: objdump.c:2893 +#, c-format +msgid "unrecognized --endian type `%s'" +msgstr "tanýnmayan --endian tipi `%s'" + +#: rdcoff.c:205 +#, c-format +msgid "parse_coff_type: Bad type code 0x%x" +msgstr "parse_coff_type: Kötü tip kodu 0x%x" + +#: rdcoff.c:423 rdcoff.c:531 rdcoff.c:730 +#, c-format +msgid "bfd_coff_get_syment failed: %s" +msgstr "bfd_coff_get_syment baþarýsýz: %s" + +#: rdcoff.c:439 rdcoff.c:750 +#, c-format +msgid "bfd_coff_get_auxent failed: %s" +msgstr "bfd_coff_get_auxent baþarýsýz: %s" + +#: rdcoff.c:817 +#, c-format +msgid "%ld: .bf without preceding function" +msgstr "%ld: öncesinde iþlev olmadan .bf" + +#: rdcoff.c:867 +#, c-format +msgid "%ld: unexpected .ef\n" +msgstr "%ld: beklenmeyen .ef\n" + +#: rddbg.c:87 +#, c-format +msgid "%s: no recognized debugging information" +msgstr "%s: tanýnan hata ayýklama bilgisi yok" + +#: rddbg.c:410 +msgid "Last stabs entries before error:\n" +msgstr "Hata öncesi son stabs girdileri:\n" + +#: readelf.c:260 +#, c-format +msgid "Unable to seek to start of %s at %x\n" +msgstr "%s'in baþlangýcý %x'de aranamadý\n" + +#: readelf.c:268 +#, c-format +msgid "Out of memory allocating %d bytes for %s\n" +msgstr "%2$s için %1$d bayt ayrýlýrken bellek tükendi\n" + +#: readelf.c:274 +#, c-format +msgid "Unable to read in %d bytes of %s\n" +msgstr "%2$s'in %1$d baytý okunamadý\n" + +#: readelf.c:284 +#, c-format +msgid "Unable to seek to %x for %s\n" +msgstr "%2$s için %1$x'e kadar arama yapýlamadý\n" + +#: readelf.c:289 +#, c-format +msgid "Unable to read data at %x for %s\n" +msgstr "%2$s için %1$x'deki veri okunamadý\n" + +#: readelf.c:304 readelf.c:330 +#, c-format +msgid "%s: Error: " +msgstr "%s: Hata: " + +#: readelf.c:316 readelf.c:345 +#, c-format +msgid "%s: Warning: " +msgstr "%s: Uyarý: " + +#: readelf.c:395 readelf.c:533 +#, c-format +msgid "Unhandled data length: %d\n" +msgstr "Desteklenmeyen veri uzunluðu: %d\n" + +#: readelf.c:597 +msgid "Don't know about relocations on this machine architecture\n" +msgstr "Bu makina mimarisi üzerinde yer deðiþtirmeler konusunda bilgi yok\n" + +#: readelf.c:637 readelf.c:666 readelf.c:698 readelf.c:726 +msgid "out of memory parsing relocs" +msgstr "yer deðiþtirmeleri tararken bellek tükendi" + +#: readelf.c:744 +msgid " Offset Info Type Symbol's Value Symbol's Name Addend\n" +msgstr " Basamak Bilgi Tip Sembol Deðeri Sembol Adý Sonekleme\n" + +#: readelf.c:747 +msgid " Offset Info Type Symbol's Value Symbol's Name\n" +msgstr " Basamak Bilgi Tip Sembol Deðeri Sembol Adý\n" + +#: readelf.c:907 readelf.c:909 +#, c-format +msgid "unrecognised: %-7lx" +msgstr "bilinmeyen: %-7lx" + +#: readelf.c:934 +#, c-format +msgid "" +msgstr "" + +#: readelf.c:1147 +#, c-format +msgid "Processor Specific: %lx" +msgstr "Ýþlemciye Özel: %lx" + +#: readelf.c:1166 +#, c-format +msgid "Operating System specific: %lx" +msgstr "Ýþletim Sistemine Özel: %lx" + +#: readelf.c:1169 readelf.c:1677 +#, c-format +msgid ": %lx" +msgstr ": %lx" + +#: readelf.c:1183 +msgid "NONE (None)" +msgstr "HÝÇBÝRÝ (Hiçbiri)" + +#: readelf.c:1184 +msgid "REL (Relocatable file)" +msgstr "YER (Yer deðiþtirebilen dosya)" + +#: readelf.c:1185 +msgid "EXEC (Executable file)" +msgstr "UYGU (Uygulama dosyasý)" + +#: readelf.c:1186 +msgid "DYN (Shared object file)" +msgstr "DÝN (Paylaþýmlý nesne dosyasý)" + +#: readelf.c:1187 +msgid "CORE (Core file)" +msgstr "CORE (Core dosyasý)" + +#: readelf.c:1191 +#, c-format +msgid "Processor Specific: (%x)" +msgstr "Ýþlemciye Özel: (%x)" + +#: readelf.c:1193 +#, c-format +msgid "OS Specific: (%x)" +msgstr "Ýþletim Sistemine Özel: (%x)" + +#: readelf.c:1195 readelf.c:1281 readelf.c:1811 +#, c-format +msgid ": %x" +msgstr ": %x" + +#: readelf.c:1208 +msgid "None" +msgstr "Hiçbiri" + +#: readelf.c:1849 +msgid "Usage: readelf {options} elf-file(s)\n" +msgstr "Kullaným: readelf {seçenekler} elf-dosya(larý)\n" + +#: readelf.c:1850 +msgid " Options are:\n" +msgstr " Seçenekler:\n" + +#: readelf.c:1851 +msgid " -a or --all Equivalent to: -h -l -S -s -r -d -V -A -I\n" +msgstr " -a veya --all Buna eþit: -h -l -S -s -r -d -V -A -I\n" + +#: readelf.c:1852 +msgid " -h or --file-header Display the ELF file header\n" +msgstr " -h veya --file-header ELF dosyasý baþlýðýný gösterir\n" + +#: readelf.c:1853 +msgid " -l or --program-headers or --segments\n" +msgstr " -l veya --program-headers veya --segments\n" + +#: readelf.c:1854 +msgid " Display the program headers\n" +msgstr " Yazýlým baþlýklarýný gösterir\n" + +#: readelf.c:1855 +msgid " -S or --section-headers or --sections\n" +msgstr " -S veya --section-headers veya --sections\n" + +#: readelf.c:1856 +msgid " Display the sections' header\n" +msgstr " Bölüm baþlýklarýný gösterir\n" + +#: readelf.c:1857 +msgid " -e or --headers Equivalent to: -h -l -S\n" +msgstr " -e veya --headers Buna eþit: -h -l -S\n" + +#: readelf.c:1858 +msgid " -s or --syms or --symbols Display the symbol table\n" +msgstr " -s veya --syms veya --symbols Sembol tablosunu gösterir\n" + +#: readelf.c:1859 +msgid " -n or --notes Display the core notes (if present)\n" +msgstr " -n veya --notes (Eðer varsa) core notlarýný gösterir\n" + +#: readelf.c:1860 +msgid " -r or --relocs Display the relocations (if present)\n" +msgstr " -r veya --relocs (Eðer varsa) yer deðiþtirmeleri gösterir\n" + +#: readelf.c:1861 +msgid " -d or --dynamic Display the dynamic segment (if present)\n" +msgstr " -d veya --dynamic (Eðer varsa) dinamik bölümü gösterir\n" + +#: readelf.c:1862 +msgid " -V or --version-info Display the version sections (if present)\n" +msgstr " -V veya --version-info (Eðer varsa) sürüm bölümlerini gösterir\n" + +#: readelf.c:1863 +msgid " -A or --arch-specific Display architecture specific information (if any).\n" +msgstr " -A veya --arch-specific (Eðer varsa) mimariye özel bilgiyi gösterir.\n" + +#: readelf.c:1864 +msgid " -D or --use-dynamic Use the dynamic section info when displaying symbols\n" +msgstr " -D veya --use-dynamic Sembolleri gösterirken dinamik bölüm bilgisini kullanýr\n" + +#: readelf.c:1865 +msgid " -x or --hex-dump=\n" +msgstr " -x veya --hex-dump=\n" + +#: readelf.c:1866 +msgid " Dump the contents of section \n" +msgstr " bölümünün içeriðini gösterir\n" + +#: readelf.c:1867 +msgid " -w[liaprf] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=frames]\n" +msgstr " -w[liaprf] veya --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=frames]\n" + +#: readelf.c:1868 +msgid " Display the contents of DWARF2 debug sections\n" +msgstr " DWARF2 hata ayýklama bölümlerinin içeriðini gösterir\n" + +#: readelf.c:1870 +msgid " -i or --instruction-dump=\n" +msgstr " -i veya --instruction-dump=\n" + +#: readelf.c:1871 +msgid " Disassemble the contents of section \n" +msgstr " bölümünün içeriðini karþýt-çevirir\n" + +#: readelf.c:1873 +msgid " -I or --histogram Display histogram of bucket list lengths\n" +msgstr " -I veya --histogram Küme liste uzunluðu geçmiþ grafiðini gösterir\n" + +#: readelf.c:1874 +msgid " -v or --version Display the version number of readelf\n" +msgstr " -v veya --version readelf'in sürüm numarasýný gösterir\n" + +#: readelf.c:1875 +msgid " -H or --help Display this information\n" +msgstr " -H veya --help Bu bilgiyi gösterir\n" + +#: readelf.c:1893 +msgid "Out of memory allocating dump request table." +msgstr "Döküm istek tablosu ayrýlýrken bellek tükendi." + +#: readelf.c:2033 +#, c-format +msgid "Unrecognised debug option '%s'\n" +msgstr "Tanýnmayan hata ayýklama seçeneði '%s'\n" + +#: readelf.c:2058 +#, c-format +msgid "Invalid option '-%c'\n" +msgstr "Geçersiz seçenek '-%c'\n" + +#: readelf.c:2071 +msgid "Nothing to do.\n" +msgstr "Yapýlacak bir þey yok.\n" + +#: readelf.c:2084 readelf.c:2101 readelf.c:3740 +msgid "none" +msgstr "yok" + +#: readelf.c:2085 +msgid "ELF32" +msgstr "ELF32" + +#: readelf.c:2086 +msgid "ELF64" +msgstr "ELF64" + +#: readelf.c:2088 readelf.c:2105 readelf.c:2133 +#, c-format +msgid "" +msgstr "" + +#: readelf.c:2102 +msgid "2's complement, little endian" +msgstr "2's complement, little endian" + +#: readelf.c:2103 +msgid "2's complement, big endian" +msgstr "2's complement, big endian" + +#: readelf.c:2118 +msgid "UNIX - System V" +msgstr "UNIX - System V" + +#: readelf.c:2119 +msgid "UNIX - HP-UX" +msgstr "UNIX - HP-UX" + +#: readelf.c:2120 +msgid "UNIX - NetBSD" +msgstr "UNIX - NetBSD" + +#: readelf.c:2121 +msgid "UNIX - Linux" +msgstr "UNIX - Linux" + +#: readelf.c:2122 +msgid "GNU/Hurd" +msgstr "GNU/Hurd" + +#: readelf.c:2123 +msgid "UNIX - Solaris" +msgstr "UNIX - Solaris" + +#: readelf.c:2124 +msgid "UNIX - AIX" +msgstr "UNIX - AIX" + +#: readelf.c:2125 +msgid "UNIX - IRIX" +msgstr "UNIX - IRIX" + +#: readelf.c:2126 +msgid "UNIX - FreeBSD" +msgstr "UNIX - FreeBSD" + +#: readelf.c:2127 +msgid "UNIX - TRU64" +msgstr "UNIX - TRU64" + +#: readelf.c:2128 +msgid "Novell - Modesto" +msgstr "Novell - Modesto" + +#: readelf.c:2129 +msgid "UNIX - OpenBSD" +msgstr "UNIX - OpenBSD" + +#: readelf.c:2130 +msgid "Standalone App" +msgstr "Tekbaþýna Uygulama" + +#: readelf.c:2131 +msgid "ARM" +msgstr "ARM" + +#: readelf.c:2148 +msgid "Not an ELF file - it has the wrong magic bytes at the start\n" +msgstr "ELF dosyasý deðil - baþlangýçta yanlýþ sihirli baytlar var\n" + +#: readelf.c:2156 +msgid "ELF Header:\n" +msgstr "ELF Baþlýðý:\n" + +#: readelf.c:2157 +msgid " Magic: " +msgstr " Sihir: " + +#: readelf.c:2161 +#, c-format +msgid " Class: %s\n" +msgstr " Sýnýf: %s\n" + +#: readelf.c:2163 +#, c-format +msgid " Data: %s\n" +msgstr " Veri: %s\n" + +#: readelf.c:2165 +#, c-format +msgid " Version: %d %s\n" +msgstr " Sürüm: %d %s\n" + +#: readelf.c:2172 +#, c-format +msgid " OS/ABI: %s\n" +msgstr " OS/ABI: %s\n" + +#: readelf.c:2174 +#, c-format +msgid " ABI Version: %d\n" +msgstr " ABI Sürümü: %d\n" + +#: readelf.c:2176 +#, c-format +msgid " Type: %s\n" +msgstr " Tip: %s\n" + +#: readelf.c:2178 +#, c-format +msgid " Machine: %s\n" +msgstr " Makina: %s\n" + +#: readelf.c:2180 +#, c-format +msgid " Version: 0x%lx\n" +msgstr " Sürüm: 0x%lx\n" + +#: readelf.c:2183 +msgid " Entry point address: " +msgstr " Girdi noktasý adresi: " + +#: readelf.c:2185 +msgid "\n Start of program headers: " +msgstr "\n Yazýlým baþlýklarý baþlangýcý: " + +#: readelf.c:2187 +msgid "" +" (bytes into file)\n" +" Start of section headers: " +msgstr "" +" (bayt dosya içinde)\n" +" Bölüm baþlýklarý baþlangýcý: " + +#: readelf.c:2189 +msgid " (bytes into file)\n" +msgstr " (bayt dosya içinde)\n" + +#: readelf.c:2191 +#, c-format +msgid " Flags: 0x%lx%s\n" +msgstr " Seçenekler: 0x%lx%s\n" + +#: readelf.c:2194 +#, c-format +msgid " Size of this header: %ld (bytes)\n" +msgstr " Bu baþlýðýn boyu: %ld (bayt)\n" + +#: readelf.c:2196 +#, c-format +msgid " Size of program headers: %ld (bytes)\n" +msgstr " Yazýlým baþlýk boyu: %ld (bayt)\n" + +#: readelf.c:2198 +#, c-format +msgid " Number of program headers: %ld\n" +msgstr " Yazýlým baþlýk sayýsý: %ld\n" + +#: readelf.c:2200 +#, c-format +msgid " Size of section headers: %ld (bytes)\n" +msgstr " Bölüm baþlýk boyu: %ld (bayt)\n" + +#: readelf.c:2202 +#, c-format +msgid " Number of section headers: %ld\n" +msgstr " Bölüm baþlýklarý sayýsý: %ld\n" + +#: readelf.c:2204 +#, c-format +msgid " Section header string table index: %ld\n" +msgstr " Bölüm baþlýðý dizge tablo endeksi: %ld\n" + +#: readelf.c:2289 +msgid "\nThere are no program headers in this file.\n" +msgstr "\nBu dosyada yazýlým baþlýðý yok.\n" + +#: readelf.c:2295 +#, c-format +msgid "\nElf file type is %s\n" +msgstr "\nElf dosya tipi: %s\n" + +#: readelf.c:2296 +msgid "Entry point " +msgstr "Giriþ noktasý " + +#: readelf.c:2298 +#, c-format +msgid "\nThere are %d program headers, starting at offset " +msgstr "\n%d adet yazýlým baþlýðý var, göreli konumdan baþlanýyor" + +#: readelf.c:2309 readelf.c:2485 readelf.c:2527 readelf.c:2570 readelf.c:2611 +#: readelf.c:3133 readelf.c:3174 readelf.c:3350 readelf.c:4358 readelf.c:4372 +#: readelf.c:7741 readelf.c:7781 +msgid "Out of memory\n" +msgstr "Bellek tükendi\n" + +#: readelf.c:2327 +#, c-format +msgid "\nProgram Header%s:\n" +msgstr "\nYazýlým Baþlýðý%s:\n" + +#: readelf.c:2331 +msgid " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n" +msgstr " Tip Basamak SanalAdr GerçAdrs DosyaBoyBelBoy Seç Hiza\n" + +#: readelf.c:2335 +msgid " Type Offset VirtAddr PhysAddr\n" +msgstr " Tip Basamak SanalAdres GerçekAdres\n" + +#: readelf.c:2337 +msgid " FileSiz MemSiz Flags Align\n" +msgstr " DosyaBoyu BellekBoyu Seç Hiza\n" + +#: readelf.c:2395 +msgid "more than one dynamic segment\n" +msgstr "bir dinamik parçadan fazla\n" + +#: readelf.c:2403 +msgid "Unable to find program interpreter name\n" +msgstr "Yazýlým yorumlayýcýsý adý bulunamadý\n" + +#: readelf.c:2410 +#, c-format +msgid "\n [Requesting program interpreter: %s]" +msgstr "\n [Yazýlým yorumlayýcýsý isteniyor: %s]" + +#: readelf.c:2428 +msgid "\n Section to Segment mapping:\n" +msgstr "\n Bölümden parçaya eþleþme:\n" + +#: readelf.c:2429 +msgid " Segment Sections...\n" +msgstr " Parça Bölümleri...\n" + +#: readelf.c:2693 +msgid "\nThere are no sections in this file.\n" +msgstr "\nBu dosyada bölüm yok.\n" + +#: readelf.c:2699 +#, c-format +msgid "There are %d section headers, starting at offset 0x%lx:\n" +msgstr "%d adet bölüm baþlýðý mevcut, göreli konum 0x%lx'dan baþlanýyor:\n" + +#: readelf.c:2739 +msgid "File contains multiple dynamic symbol tables\n" +msgstr "Dosyada birden fazla dinamik sembol tablosu var\n" + +#: readelf.c:2752 +msgid "File contains multiple dynamic string tables\n" +msgstr "Dosyada birden fazla dinamik dizge tablosu var\n" + +#: readelf.c:2786 +#, c-format +msgid "\nSection Header%s:\n" +msgstr "\nBölüm Baþlýðý%s:\n" + +#: readelf.c:2790 +msgid " [Nr] Name Type Addr Off Size ES Flg Lk Inf Al\n" +msgstr " [Nr] Ýsim Tip Adres Bas Boy ES Seç Lk Inf Al\n" + +#: readelf.c:2793 +msgid " [Nr] Name Type Address Offset\n" +msgstr " [Nr] Ýsim Tip Adres Basamak\n" + +#: readelf.c:2794 +msgid " Size EntSize Flags Link Info Align\n" +msgstr " Boy EntBoy Seç Bað Bilgi Hiza\n" + +#: readelf.c:2841 +msgid "Key to Flags:\n" +msgstr "Seçeneklere Anahtar:\n" + +#: readelf.c:2842 +msgid " W (write), A (alloc), X (execute), M (merge), S (strings)\n" +msgstr " W (yaz), A (ayýr), X (çalýþtýr), M (birleþtir) S (dizgeler)\n" + +#: readelf.c:2843 +msgid " I (info), L (link order), G (group), x (unknown)\n" +msgstr " I (bilgi), L (bað sýrasý), G (grup), x (bilinmeyen)\n" + +#: readelf.c:2844 +msgid " O (extra OS processing required) o (OS specific), p (processor specific)\n" +msgstr " O (fazla ÝS iþlemi gerekli) o (ÝS'e özel), p (iþlemciye özel)\n" + +#: readelf.c:2902 +#, c-format +msgid "\nRelocation section at offset 0x%lx contains %ld bytes:\n" +msgstr "\nGöreli konum 0x%lx'da yer deðiþtirme bölümü %ld bayt içeriyor:\n" + +#: readelf.c:2909 +msgid "\nThere are no dynamic relocations in this file.\n" +msgstr "\nBu dosyada dinamik yer deðiþtirmeler yok.\n" + +#: readelf.c:2937 +msgid "\nRelocation section " +msgstr "\nYer deðiþtirme bölümü " + +#: readelf.c:2944 +#, c-format +msgid " at offset 0x%lx contains %lu entries:\n" +msgstr "göreli konum 0x%lx %lu girdi içeriyor:\n" + +#: readelf.c:2972 +msgid "\nThere are no relocations in this file.\n" +msgstr "\nBu dosyada yer deðiþtirmeler yok.\n" + +#: readelf.c:3227 +msgid "\nThere is no dynamic segment in this file.\n" +msgstr "\nBu dosyada dinamik parça yok.\n" + +#: readelf.c:3261 +msgid "Unable to seek to end of file!" +msgstr "Dosya sonuna kadar aranamýyor!" + +#: readelf.c:3270 +msgid "Unable to determine the number of symbols to load\n" +msgstr "Yüklenecek sembol sayýsý belirlenemedi\n" + +#: readelf.c:3300 +msgid "Unable to seek to end of file\n" +msgstr "Dosyanýn sonuna kadar aranamadý\n" + +#: readelf.c:3306 +msgid "Unable to determine the length of the dynamic string table\n" +msgstr "Dinamik dizge tablosunun uzunluðu belirlenemedi\n" + +#: readelf.c:3367 +#, c-format +msgid "\nDynamic segment at offset 0x%x contains %ld entries:\n" +msgstr "\nGöreli konum 0x%x'deki dinamik parça %ld girdi içeriyor:\n" + +#: readelf.c:3370 +msgid " Tag Type Name/Value\n" +msgstr " Etiket Tip Ýsim/Deðer\n" + +#: readelf.c:3406 +msgid "Auxiliary library" +msgstr "Yardýmcý kitaplýk" + +#: readelf.c:3410 +msgid "Filter library" +msgstr "Filtre kitaplýðý" + +#: readelf.c:3414 +msgid "Configuration file" +msgstr "Ayar dosyasý" + +#: readelf.c:3418 +msgid "Dependency audit library" +msgstr "Baðýmlýlýk denetim kitaplýðý" + +#: readelf.c:3422 +msgid "Audit library" +msgstr "Denetim kitaplýðý" + +#: readelf.c:3440 readelf.c:3466 readelf.c:3492 +msgid "Flags:" +msgstr "Seçenekler:" + +#: readelf.c:3442 readelf.c:3468 readelf.c:3494 +msgid " None\n" +msgstr " Hiçbiri\n" + +#: readelf.c:3613 +#, c-format +msgid "Shared library: [%s]" +msgstr "Paylaþýmlý kitaplýk: [%s]" + +#: readelf.c:3616 +msgid " program interpreter" +msgstr " yazýlým yorumlayýcýsý" + +#: readelf.c:3620 +#, c-format +msgid "Library soname: [%s]" +msgstr "Kitaplýk so_adý: [%s]" + +#: readelf.c:3624 +#, c-format +msgid "Library rpath: [%s]" +msgstr "Kitaplýk r_yolu: [%s]" + +#: readelf.c:3628 +#, c-format +msgid "Library runpath: [%s]" +msgstr "Kitaplýk çalýþým yolu: [%s]" + +#: readelf.c:3689 +#, c-format +msgid "Not needed object: [%s]\n" +msgstr "Gereksiz nesne: [%s]\n" + +#: readelf.c:3786 +#, c-format +msgid "\nVersion definition section '%s' contains %ld entries:\n" +msgstr "\nSürüm tanýmý bölümü '%s' %ld girdi içeriyor:\n" + +#: readelf.c:3789 +msgid " Addr: 0x" +msgstr " Adres: 0x" + +#: readelf.c:3791 readelf.c:3979 +#, c-format +msgid " Offset: %#08lx Link: %lx (%s)\n" +msgstr " Basamak: %#08lx Bað: %lx (%s)\n" + +#: readelf.c:3821 +#, c-format +msgid " %#06x: Rev: %d Flags: %s" +msgstr " %#06x: Sür: %d Seçenek: %s" + +#: readelf.c:3824 +#, c-format +msgid " Index: %d Cnt: %d " +msgstr " Endeks: %d Sayý: %d " + +#: readelf.c:3835 +#, c-format +msgid "Name: %s\n" +msgstr "Ýsim: %s\n" + +#: readelf.c:3837 +#, c-format +msgid "Name index: %ld\n" +msgstr "Ýsim Endeksi: %ld\n" + +#: readelf.c:3852 +#, c-format +msgid " %#06x: Parent %d: %s\n" +msgstr " %#06x: Üst %d: %s\n" + +#: readelf.c:3855 +#, c-format +msgid " %#06x: Parent %d, name index: %ld\n" +msgstr " %#06x: Üst %d, isim endeksi: %ld\n" + +#: readelf.c:3874 +#, c-format +msgid "\nVersion needs section '%s' contains %ld entries:\n" +msgstr "\nSürüm gereksinimleri bölümü '%s' %ld girdi içeriyor:\n" + +#: readelf.c:3877 +msgid " Addr: 0x" +msgstr " Adres: 0x" + +#: readelf.c:3879 +#, c-format +msgid " Offset: %#08lx Link to section: %ld (%s)\n" +msgstr " Basamak: %#08lx Bölüme bað: %ld (%s)\n" + +#: readelf.c:3905 +#, c-format +msgid " %#06x: Version: %d" +msgstr " %#06x: Sürüm: %d" + +#: readelf.c:3908 +#, c-format +msgid " File: %s" +msgstr " Dosya: %s" + +#: readelf.c:3910 +#, c-format +msgid " File: %lx" +msgstr " Dosya: %lx" + +#: readelf.c:3912 +#, c-format +msgid " Cnt: %d\n" +msgstr " Sayý: %d\n" + +#: readelf.c:3930 +#, c-format +msgid " %#06x: Name: %s" +msgstr " %#06x: Ýsim: %s" + +#: readelf.c:3933 +#, c-format +msgid " %#06x: Name index: %lx" +msgstr " %#06x: Ýsim endeksi: %lx" + +#: readelf.c:3936 +#, c-format +msgid " Flags: %s Version: %d\n" +msgstr " Seçenekler: %s Sürüm: %d\n" + +#: readelf.c:3974 +#, c-format +msgid "\nVersion symbols section '%s' contains %d entries:\n" +msgstr "\nSürüm sembolleri bölümü '%s' %d girdi içeriyor:\n" + +#: readelf.c:3977 +msgid " Addr: " +msgstr " Adres: " + +#: readelf.c:4007 +msgid " 0 (*local*) " +msgstr " 0 (*yerel*) " + +#: readelf.c:4011 +msgid " 1 (*global*) " +msgstr " 1 (*evrensel*) " + +#: readelf.c:4233 +msgid "\nNo version information found in this file.\n" +msgstr "\nBu dosyada sürüm bilgisi yok.\n" + +#: readelf.c:4251 readelf.c:4286 +#, c-format +msgid ": %d" +msgstr ": %d" + +#: readelf.c:4253 readelf.c:4298 +#, c-format +msgid ": %d" +msgstr "<ÝS'e özel>: %d" + +#: readelf.c:4255 readelf.c:4301 +#, c-format +msgid ": %d" +msgstr ": %d" + +#: readelf.c:4364 +msgid "Unable to read in dynamic data\n" +msgstr "Dinamik veri okunamadý\n" + +#: readelf.c:4406 +msgid "Unable to seek to start of dynamic information" +msgstr "Dinamik bilginin baþlangýcýna kadar aranamadý" + +#: readelf.c:4412 +msgid "Failed to read in number of buckets\n" +msgstr "Küme sayýsý okunamadý\n" + +#: readelf.c:4418 +msgid "Failed to read in number of chains\n" +msgstr "Zincir sayýsý okunamadý\n" + +#: readelf.c:4438 +msgid "\nSymbol table for image:\n" +msgstr "\nÝmaj için sembol tablosu:\n" + +#: readelf.c:4440 +msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n" +msgstr " Küme Num: Deðer Boy Tip Bað Gör Ndx Ýsim\n" + +#: readelf.c:4442 +msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n" +msgstr " Küme Num: Deðer Boy Tip Bað Gör Ndx Ýsim\n" + +#: readelf.c:4486 +#, c-format +msgid "\nSymbol table '%s' contains %lu entries:\n" +msgstr "\n'%s' sembol tablosu %lu girdi içeriyor:\n" + +#: readelf.c:4490 +msgid " Num: Value Size Type Bind Vis Ndx Name\n" +msgstr " Num: Deðer Boy Tip Bað Gör Ndx Ýsim\n" + +#: readelf.c:4492 +msgid " Num: Value Size Type Bind Vis Ndx Name\n" +msgstr " Num: Deðer Boy Tip Bað Gör Ndx Ýsim\n" + +#: readelf.c:4601 +msgid "bad dynamic symbol" +msgstr "hatalý dinamik sembol" + +#: readelf.c:4660 +msgid "\nDynamic symbol information is not available for displaying symbols.\n" +msgstr "\nDinamik sembolleri göstermek için dinamik sembol bilgisi mevcut deðil.\n" + +#: readelf.c:4672 +#, c-format +msgid "\nHistogram for bucket list length (total of %d buckets):\n" +msgstr "\nKüme liste boyu (toplam %d küme) geçmiþ grafiði:\n" + +#: readelf.c:4674 +msgid " Length Number %% of total Coverage\n" +msgstr "" +" Length Number %% of total Coverage\n" +" Boy Numara toplam kapsamýn %%\n" + +#: readelf.c:4679 readelf.c:4698 readelf.c:7423 readelf.c:7616 +msgid "Out of memory" +msgstr "Bellek yetersiz" + +#: readelf.c:4747 +#, c-format +msgid "\nDynamic info segment at offset 0x%lx contains %d entries:\n" +msgstr "\nGöreli konum 0x%lx'de yer alan dinamik bilgi parçasý %d girdi içeriyor:\n" + +#: readelf.c:4750 +msgid " Num: Name BoundTo Flags\n" +msgstr " Num: Ýsim Baðlý Seçenekler\n" + +#: readelf.c:4798 +#, c-format +msgid "\nAssembly dump of section %s\n" +msgstr "\n%s bölümünün üretici dökümü\n" + +#: readelf.c:4821 +#, c-format +msgid "\nSection '%s' has no data to dump.\n" +msgstr "\n'%s' bölümünde dökülecek veri yok.\n" + +#: readelf.c:4826 +#, c-format +msgid "\nHex dump of section '%s':\n" +msgstr "\n'%s' bölümünün onaltýlýk dökümü:\n" + +#: readelf.c:4978 +msgid "badly formed extended line op encountered!" +msgstr "hatalý oluþturulmuþ uzun satýr iþlevi bulundu!" + +#: readelf.c:4985 +#, c-format +msgid " Extended opcode %d: " +msgstr " Ek opkod %d: " + +#: readelf.c:4990 +msgid "End of Sequence\n\n" +msgstr "Dizi Sonu\n\n" + +#: readelf.c:4996 +#, c-format +msgid "set Address to 0x%lx\n" +msgstr "Adresi 0x%lx olarak atar\n" + +#: readelf.c:5001 +msgid " define new File Table entry\n" +msgstr " yeni Dosya Tablosu girdisi tanýmlar\n" + +#: readelf.c:5002 readelf.c:5124 +msgid " Entry\tDir\tTime\tSize\tName\n" +msgstr " Girdi\tDizin\tZaman\tBoy\tÝsim\n" + +#: readelf.c:5004 +#, c-format +msgid " %d\t" +msgstr " %d\t" + +#: readelf.c:5007 readelf.c:5009 readelf.c:5011 readelf.c:5136 readelf.c:5138 +#: readelf.c:5140 +#, c-format +msgid "%lu\t" +msgstr "%lu\t" + +#: readelf.c:5012 +#, c-format +msgid "%s\n\n" +msgstr "%s\n\n" + +#: readelf.c:5016 +#, c-format +msgid "UNKNOWN: length %d\n" +msgstr "TANIMSIZ: uzunluk %d\n" + +#: readelf.c:5042 +#, c-format +msgid "\nDump of debug contents of section %s:\n\n" +msgstr "\n%s bölümünün hata ayýklama içeriði dökümü:\n\n" + +#: readelf.c:5054 +msgid "The line info appears to be corrupt - the section is too small\n" +msgstr "Satýr bilgisi bozuk - bölüm çok küçük\n" + +#: readelf.c:5062 +msgid "Only DWARF version 2 line info is currently supported.\n" +msgstr "Þimdilik yalnýzca DWARF sürüm 2 satýr bilgisi destekleniyor.\n" + +#: readelf.c:5077 +#, c-format +msgid " Length: %ld\n" +msgstr " Uzunluk: %ld\n" + +#: readelf.c:5078 +#, c-format +msgid " DWARF Version: %d\n" +msgstr " DWARF Sürümü: %d\n" + +#: readelf.c:5079 +#, c-format +msgid " Prolgue Length: %d\n" +msgstr " Giriþ Uzunluðu: %d\n" + +#: readelf.c:5080 +#, c-format +msgid " Minimum Instruction Length: %d\n" +msgstr " Minimum Yönerge Uzunluðu: %d\n" + +#: readelf.c:5081 +#, c-format +msgid " Initial value of 'is_stmt': %d\n" +msgstr " 'is_stmt' baþlangýç deðeri: %d\n" + +#: readelf.c:5082 +#, c-format +msgid " Line Base: %d\n" +msgstr " Satýr Temeli: %d\n" + +#: readelf.c:5083 +#, c-format +msgid " Line Range: %d\n" +msgstr " Satýr Aralýðý: %d\n" + +#: readelf.c:5084 +#, c-format +msgid " Opcode Base: %d\n" +msgstr " Opkod Temeli: %d\n" + +#: readelf.c:5093 +msgid "\n Opcodes:\n" +msgstr "\n Opkodlar:\n" + +#: readelf.c:5096 +#, c-format +msgid " Opcode %d has %d args\n" +msgstr " %d opkodunun %d seçeneði var\n" + +#: readelf.c:5102 +msgid "\n The Directory Table is empty.\n" +msgstr "\n Dizin Tablosu boþ.\n" + +#: readelf.c:5105 +msgid "\n The Directory Table:\n" +msgstr "\n Dizin Tablosu:\n" + +#: readelf.c:5109 +#, c-format +msgid " %s\n" +msgstr " %s\n" + +#: readelf.c:5120 +msgid "\n The File Name Table is empty.\n" +msgstr "\n Dosya Adý Tablosu boþ.\n" + +#: readelf.c:5123 +msgid "\n The File Name Table:\n" +msgstr "\n Dosya Adý Tablosu:\n" + +#: readelf.c:5131 +#, c-format +msgid " %d\t" +msgstr " %d\t" + +#: readelf.c:5142 +#, c-format +msgid "%s\n" +msgstr "%s\n" + +#. Now display the statements. +#: readelf.c:5150 +msgid "\n Line Number Statements:\n" +msgstr "\n Satýr Numarasý Deyimleri:\n" + +#: readelf.c:5169 +msgid " Copy\n" +msgstr " Kopyalar\n" + +#: readelf.c:5176 +#, c-format +msgid " Advance PC by %d to %lx\n" +msgstr " PC'yi %2$lx'ye kadar, %1$d ilerletir\n" + +#: readelf.c:5184 +#, c-format +msgid " Advance Line by %d to %d\n" +msgstr " Satýrý %2$d'ye kadar %1$d ilerletir\n" + +#: readelf.c:5191 +#, c-format +msgid " Set File Name to entry %d in the File Name Table\n" +msgstr " Dosya Adýný, Dosya Ýsim Tablosunda, %d numaralý girdi olarak atar\n" + +#: readelf.c:5199 +#, c-format +msgid " Set column to %d\n" +msgstr " Sütunu %d olarak atar\n" + +#: readelf.c:5206 +#, c-format +msgid " Set is_stmt to %d\n" +msgstr " is_stmt'i %d olarak atar\n" + +#: readelf.c:5211 +msgid " Set basic block\n" +msgstr " Temel bloðu atar\n" + +#: readelf.c:5219 +#, c-format +msgid " Advance PC by constant %d to 0x%lx\n" +msgstr " PC'yi 0x%2$lx'e kadar %1$d ilerletir\n" + +#: readelf.c:5227 +#, c-format +msgid " Advance PC by fixed size amount %d to 0x%lx\n" +msgstr " PC'yi 0x%2$lx'e kadar %d ilerletir\n" + +#: readelf.c:5235 +#, c-format +msgid " Special opcode %d: advance Address by %d to 0x%lx" +msgstr " Özel opkod %1$d: Adresi 0x%3$lx'e kadar %2$d ilerletir" + +#: readelf.c:5239 +#, c-format +msgid " and Line by %d to %d\n" +msgstr " ve Satýr'ý %2$d'ye kadar %1$d\n" + +#: readelf.c:5262 readelf.c:5691 +#, c-format +msgid "Contents of the %s section:\n\n" +msgstr "%s bölümünün içeriði:\n\n" + +#: readelf.c:5285 +msgid "Only DWARF 2 pubnames are currently supported\n" +msgstr "Þimdilik yalnýz DWARF 2 genel isimleri destekleniyor\n" + +#: readelf.c:5292 +#, c-format +msgid " Length: %ld\n" +msgstr " Uzunluk: %ld\n" + +#: readelf.c:5294 +#, c-format +msgid " Version: %d\n" +msgstr " Sürüm: %d\n" + +#: readelf.c:5296 +#, c-format +msgid " Offset into .debug_info section: %ld\n" +msgstr ".debug_info bölümünün içine göreli konum: %ld\n" + +#: readelf.c:5298 +#, c-format +msgid " Size of area in .debug_info section: %ld\n" +msgstr ".debug_info bölümünde alan büyüklüðü: %ld\n" + +#: readelf.c:5301 +msgid "\n Offset\tName\n" +msgstr "\n Basamak\tÝsim\n" + +#: readelf.c:5383 +#, c-format +msgid "Unknown TAG value: %lx" +msgstr "Bilinmeyen TAG deðeri: %lx" + +#: readelf.c:5478 +#, c-format +msgid "Unknown AT value: %lx" +msgstr "Bilinmeyen AT deðeri: %lx" + +#: readelf.c:5515 +#, c-format +msgid "Unknown FORM value: %lx" +msgstr "Bilinmeyen FORM deðeri: %lx" + +#: readelf.c:5697 +msgid " Number TAG\n" +msgstr " Sayý TAG\n" + +#: readelf.c:5703 +#, c-format +msgid " %ld %s [%s]\n" +msgstr " %ld %s [%s]\n" + +#: readelf.c:5706 +msgid "has children" +msgstr "astlarý var" + +#: readelf.c:5706 +msgid "no children" +msgstr "astlarý yok" + +#: readelf.c:5710 +#, c-format +msgid " %-18s %s\n" +msgstr " %-18s %s\n" + +#: readelf.c:5729 +#, c-format +msgid " %lu byte block: " +msgstr " %lu baytlýk blok: " + +#: readelf.c:6036 +msgid "(User defined location op)" +msgstr "(Kullanýcý tanýmlý yer yönergesi)" + +#: readelf.c:6038 +msgid "(Unknown location op)" +msgstr "(Bilinmeyen yer yönergesi)" + +#: readelf.c:6165 +#, c-format +msgid "Unable to handle FORM: %d" +msgstr "FORM iþlenemedi: %d" + +#: readelf.c:6169 +#, c-format +msgid "Unrecognised form: %d" +msgstr "Bilinmeyen form: %d" + +#: readelf.c:6182 +msgid "(not inlined)" +msgstr "(inline'lanamadý)" + +#: readelf.c:6183 +msgid "(inlined)" +msgstr "(inline'landý)" + +#: readelf.c:6184 +msgid "(declared as inline but ignored)" +msgstr "(inline olarak tanýmlandý ama yoksayýldý)" + +#: readelf.c:6185 +msgid "(declared as inline and inlined)" +msgstr "(inline olarak tanýmlandý ve inline'landý)" + +#: readelf.c:6186 +#, c-format +msgid " (Unknown inline attribute value: %lx)" +msgstr " (Bilinmeyen inline öznitelik deðeri: %lx)" + +#: readelf.c:6315 readelf.c:6441 +#, c-format +msgid "The section %s contains:\n\n" +msgstr "%s bölümü içeriyor:\n\n" + +#: readelf.c:6337 +#, c-format +msgid " Compilation Unit @ %lx:\n" +msgstr " Derleme Birimi @ %lx:\n" + +#: readelf.c:6338 +#, c-format +msgid " Length: %ld\n" +msgstr " Uzunluk: %ld\n" + +#: readelf.c:6339 +#, c-format +msgid " Version: %d\n" +msgstr " Sürüm: %d\n" + +#: readelf.c:6340 +#, c-format +msgid " Abbrev Offset: %ld\n" +msgstr " Kýsaltma Basamaðý: %ld\n" + +#: readelf.c:6341 +#, c-format +msgid " Pointer Size: %d\n" +msgstr " Gösterge Boyu: %d\n" + +#: readelf.c:6345 +msgid "Only version 2 DWARF debug information is currently supported.\n" +msgstr "Þimdilik yalnýzca DWARF Sürüm 2 hata ayýklama bilgisi destekleniyor.\n" + +#: readelf.c:6367 +msgid "Unable to locate .debug_abbrev section!\n" +msgstr ".debug_abbrev bölümü bulunamadý!\n" + +#: readelf.c:6407 +#, c-format +msgid "Unable to locate entry %lu in the abbreviation table\n" +msgstr "Kýsaltma tablosunda %lu girdisi bulunamadý\n" + +#: readelf.c:6412 +#, c-format +msgid " <%d><%x>: Abbrev Number: %lu (%s)\n" +msgstr " <%d><%x>: Kýsaltma Numarasý: %lu (%s)\n" + +#: readelf.c:6462 +msgid "Only DWARF 2 aranges are currently supported.\n" +msgstr "Þimdilik yalnýzca DWARF 2 a-aralýklarý destekleniyor.\n" + +#: readelf.c:6466 +#, c-format +msgid " Length: %ld\n" +msgstr " Uzunluk: %ld\n" + +#: readelf.c:6467 +#, c-format +msgid " Version: %d\n" +msgstr " Sürüm: %d\n" + +#: readelf.c:6468 +#, c-format +msgid " Offset into .debug_info: %lx\n" +msgstr " .debug_info'nun içine göreli konum: %lx\n" + +#: readelf.c:6469 +#, c-format +msgid " Pointer Size: %d\n" +msgstr " Gösterge Boyu: %d\n" + +#: readelf.c:6470 +#, c-format +msgid " Segment Size: %d\n" +msgstr " Parça Boyu: %d\n" + +#: readelf.c:6472 +msgid "\n Address Length\n" +msgstr "\n Adres Uzunluk\n" + +#: readelf.c:6634 +#, c-format +msgid "The section %s contains:\n" +msgstr "%s bölümü içeriyor:\n" + +#: readelf.c:7109 +#, c-format +msgid "Displaying the debug contents of section %s is not yet supported.\n" +msgstr "%s bölümünün hata ayýklama içerik bilgilerini göstermek henüz desteklenmiyor.\n" + +#: readelf.c:7173 +#, c-format +msgid "\nSection '%s' has no debugging data.\n" +msgstr "\n'%s' bölümünde hata ayýklama bilgisi yok.\n" + +#: readelf.c:7192 +#, c-format +msgid "Unrecognised debug section: %s\n" +msgstr "Tanýnmayan hata ayýklama bölümü: %s\n" + +#: readelf.c:7264 +msgid "Some sections were not dumped because they do not exist!\n" +msgstr "Bazý bölümler dökülmedi çünkü mevcut deðiller!\n" + +#: readelf.c:7447 +#, c-format +msgid "\nSection '%s' contains %d entries:\n" +msgstr "\n'%s' bölümü %d girdi içeriyor:\n" + +#: readelf.c:7609 +msgid "conflict list with without table" +msgstr "tablolu ve tablosuz çeliþki listesi" + +#: readelf.c:7637 +#, c-format +msgid "\nSection '.conflict' contains %d entries:\n" +msgstr "\n'.conflict' bölümü %d girdi içeriyor:\n" + +#: readelf.c:7638 +msgid " Num: Index Value Name" +msgstr " Num: Endeks Deðer Ýsim" + +#: readelf.c:7663 +msgid "NT_PRSTATUS (prstatus structure)" +msgstr "NT_PRSTATUS (prstatus yapýsý)" + +#: readelf.c:7664 +msgid "NT_FPREGSET (floating point registers)" +msgstr "NT_FPREGSET (kayan nokta yazmaçlarý)" + +#: readelf.c:7665 +msgid "NT_PRPSINFO (prpsinfo structure)" +msgstr "NT_PRPSINFO (prpsinfo yapýsý)" + +#: readelf.c:7666 +msgid "NT_TASKSTRUCT (task structure)" +msgstr "NT_TASKSTRUCT (görev yapýsý)" + +#: readelf.c:7667 +msgid "NT_PRXFPREG (user_xfpregs structure)" +msgstr "NT_PRXFPREG (user_xfpregs yapýsý)" + +#: readelf.c:7668 +msgid "NT_PSTATUS (pstatus structure)" +msgstr "NT_PSTATUS (pstatus yapýsý)" + +#: readelf.c:7669 +msgid "NT_FPREGS (floating point registers)" +msgstr "NT_FPREGS (kayan nokta yazmaçlarý)" + +#: readelf.c:7670 +msgid "NT_PSINFO (psinfo structure)" +msgstr "NT_PSINFO (psinfo yapýsý)" + +#: readelf.c:7671 +msgid "NT_LWPSTATUS (lwpstatus_t structure)" +msgstr "NT_LWPSTATUS (lwpstatus_t yapýsý)" + +#: readelf.c:7672 +msgid "NT_LWPSINFO (lwpsinfo_t structure)" +msgstr "NT_LWPSINFO (lwpsinfo_t yapýsý)" + +#: readelf.c:7673 +msgid "NT_WIN32PSTATUS (win32_pstatus strcuture)" +msgstr "NT_WIN32PSTATUS (win32_pstatus yapýsý)" + +#: readelf.c:7675 +#, c-format +msgid "Unknown note type: (0x%08x)" +msgstr "Bilinmeyen not tipi: (0x%08x)" + +#: readelf.c:7713 +#, c-format +msgid "\nNotes at offset 0x%08lx with length 0x%08lx:\n" +msgstr "\n0x%08lx göreli konumunda, 0x%08lx uzunluðunda notlar:\n" + +#: readelf.c:7715 +msgid " Owner\t\tData size\tDescription\n" +msgstr " Sahip\t\tVeri Boyu\tAçýklama\n" + +#: readelf.c:7826 +msgid "No note segments present in the core file.\n" +msgstr "Core dosyasýnda not parçalarý yok.\n" + +#: readelf.c:7904 +msgid "This instance of readelf has been built without support for a\n" +msgstr "Bu readelf, bunlarýn desteði olmaksýzýn derlenmiþtir:\n" + +#: readelf.c:7905 +msgid "64 bit data type and so it cannot read 64 bit ELF files.\n" +msgstr "64 bit veri tipi dolayýsýyla 64 bit ELF dosyasý okunamaz.\n" + +#: readelf.c:7940 +#, c-format +msgid "Cannot stat input file %s.\n" +msgstr "%s girdi dosyasý durumlanamadý.\n" + +#: readelf.c:7947 +#, c-format +msgid "Input file %s not found.\n" +msgstr "Girdi dosyasý %s bulunamadý.\n" + +#: readelf.c:7953 +#, c-format +msgid "%s: Failed to read file header\n" +msgstr "%s: Dosya baþlýðý okunamadý\n" + +#: readelf.c:7967 +#, c-format +msgid "\nFile: %s\n" +msgstr "\nDosya: %s\n" + +#: rename.c:131 +#, c-format +msgid "%s: cannot set time: %s" +msgstr "%s: zaman atanamadý: %s" + +#. We have to clean up here. +#: rename.c:170 rename.c:203 +#, c-format +msgid "%s: rename: %s" +msgstr "%s: yeniden adlandýrma: %s" + +#: rename.c:211 +#, c-format +msgid "%s: simple_copy: %s" +msgstr "%s: simple_copy: %s" + +#: resbin.c:130 +#, c-format +msgid "%s: not enough binary data" +msgstr "%s: yeterli ikilik veri yok" + +#: resbin.c:149 +msgid "null terminated unicode string" +msgstr "boþ deðerle sonlanmýþ unicode dizgesi" + +#: resbin.c:179 resbin.c:185 +msgid "resource ID" +msgstr "kaynak ID" + +#: resbin.c:229 +msgid "cursor" +msgstr "gösterge" + +#: resbin.c:263 resbin.c:270 +msgid "menu header" +msgstr "menü baþlýðý" + +#: resbin.c:280 +msgid "menuex header" +msgstr "menuex baþlýðý" + +#: resbin.c:284 +msgid "menuex offset" +msgstr "menuex basamaðý" + +#: resbin.c:291 +#, c-format +msgid "unsupported menu version %d" +msgstr "desteklenmeyen menü sürümü %d" + +#: resbin.c:319 resbin.c:334 resbin.c:400 +msgid "menuitem header" +msgstr "menü üyesi baþlýðý" + +#: resbin.c:430 +msgid "menuitem" +msgstr "menü üyesi" + +#: resbin.c:471 resbin.c:499 +msgid "dialog header" +msgstr "diyalog baþlýðý" + +#: resbin.c:489 +#, c-format +msgid "unexpected dialog signature %d" +msgstr "beklenmeyen diyalog imzasý %d" + +#: resbin.c:531 +msgid "dialog font point size" +msgstr "diyalog yazýtipi büyüklüðü" + +#: resbin.c:539 +msgid "dialogex font information" +msgstr "dialogex yazýtipi bilgisi" + +#: resbin.c:564 resbin.c:582 +msgid "dialog control" +msgstr "diyalog kontrolü" + +#: resbin.c:574 +msgid "dialogex control" +msgstr "dialogex kontrolü" + +#: resbin.c:603 +msgid "dialog control end" +msgstr "diyalog kontrol sonu" + +#: resbin.c:615 +msgid "dialog control data" +msgstr "diyalog kontrol verisi" + +#: resbin.c:658 +msgid "stringtable string length" +msgstr "dizgetablosu dizge uzunluðu" + +#: resbin.c:668 +msgid "stringtable string" +msgstr "dizgetablosu dizgesi" + +#: resbin.c:701 +msgid "fontdir header" +msgstr "yazýtipi dizin baþlýðý" + +#: resbin.c:714 +msgid "fontdir" +msgstr "yazýtipi dizini" + +#: resbin.c:730 +msgid "fontdir device name" +msgstr "yazýtipi aygýt adý" + +#: resbin.c:736 +msgid "fontdir face name" +msgstr "yazýtipi dizini aile ismi" + +#: resbin.c:779 +msgid "accelerator" +msgstr "hýzlandýrýcý" + +#: resbin.c:843 +msgid "group cursor header" +msgstr "grup gösterge baþlýðý" + +#: resbin.c:847 +#, c-format +msgid "unexpected group cursor type %d" +msgstr "beklenmeyen grup gösterge tipi %d" + +#: resbin.c:862 +msgid "group cursor" +msgstr "grup göstergesi" + +#: resbin.c:901 +msgid "group icon header" +msgstr "grup ikon baþlýðý" + +#: resbin.c:905 +#, c-format +msgid "unexpected group icon type %d" +msgstr "beklenmeyen grup ikon tipi %d" + +#: resbin.c:920 +msgid "group icon" +msgstr "grup ikonu" + +#: resbin.c:991 resbin.c:1210 +msgid "unexpected version string" +msgstr "dizgenin beklenmeyen sürümü" + +#: resbin.c:1025 +#, c-format +msgid "version length %d does not match resource length %lu" +msgstr "sürüm uzunluðu %d, kaynak uzunluðu %lu ile eþleþmiyor" + +#: resbin.c:1029 +#, c-format +msgid "unexpected version type %d" +msgstr "beklenmeyen sürüm tipi %d" + +#: resbin.c:1041 +#, c-format +msgid "unexpected fixed version information length %d" +msgstr "beklenmeyen sabit sürüm bilgi uzunluðu %d" + +#: resbin.c:1044 +msgid "fixed version info" +msgstr "sabit sürüm bilgisi" + +#: resbin.c:1048 +#, c-format +msgid "unexpected fixed version signature %lu" +msgstr "beklenmeyen sabit sürüm imzasý %lu" + +#: resbin.c:1052 +#, c-format +msgid "unexpected fixed version info version %lu" +msgstr "beklenmeyen sabit sürüm bilgisi sürümü %lu" + +#: resbin.c:1081 +msgid "version var info" +msgstr "sürüm deðiþken bilgisi" + +#: resbin.c:1098 +#, c-format +msgid "unexpected stringfileinfo value length %d" +msgstr "beklenmeyen dizge dosya bilgi deðer uzunluðu %d" + +#: resbin.c:1108 +#, c-format +msgid "unexpected version stringtable value length %d" +msgstr "beklenmeyen sürüm dizge tablo deðer uzunluðu %d" + +#: resbin.c:1142 +#, c-format +msgid "unexpected version string length %d != %d + %d" +msgstr "beklenmeyen sürüm dizge uzunluðu %d != %d + %d" + +#: resbin.c:1153 +#, c-format +msgid "unexpected version string length %d < %d" +msgstr "beklenmeyen sürüm dizge uzunluðu %d < %d" + +#: resbin.c:1170 +#, c-format +msgid "unexpected varfileinfo value length %d" +msgstr "beklenmeyen deðiþken dosya bilgi deðer uzunluðu %d" + +#: resbin.c:1189 +msgid "version varfileinfo" +msgstr "deðiþken dosya bilgi sürümü" + +#: resbin.c:1204 +#, c-format +msgid "unexpected version value length %d" +msgstr "beklenmeyen sürüm deðer uzunluðu %d" + +#: rescoff.c:128 +msgid "filename required for COFF input" +msgstr "COFF girdisi için dosya adý gerekli" + +#: rescoff.c:145 +#, c-format +msgid "%s: no resource section" +msgstr "%s: kaynak bölümü yok" + +#: rescoff.c:152 +msgid "can't read resource section" +msgstr "kaynak bölümü okunamýyor" + +#: rescoff.c:178 +#, c-format +msgid "%s: %s: address out of bounds" +msgstr "%s: %s: adres sýnýrlarýn dýþýnda" + +#: rescoff.c:197 +msgid "directory" +msgstr "dizin" + +#: rescoff.c:225 +msgid "named directory entry" +msgstr "isimli dizin girdisi" + +#: rescoff.c:234 +msgid "directory entry name" +msgstr "dizin girdi ismi" + +#: rescoff.c:254 +msgid "named subdirectory" +msgstr "isimli altdizin" + +#: rescoff.c:262 +msgid "named resource" +msgstr "isimli kaynak" + +#: rescoff.c:277 +msgid "ID directory entry" +msgstr "ID dizin girdisi" + +#: rescoff.c:294 +msgid "ID subdirectory" +msgstr "ID altdizini" + +#: rescoff.c:302 +msgid "ID resource" +msgstr "ID kaynaðý" + +#: rescoff.c:328 +msgid "resource type unknown" +msgstr "kaynak tipi bilinmiyor" + +#: rescoff.c:331 +msgid "data entry" +msgstr "veri girdisi" + +#: rescoff.c:339 +msgid "resource data" +msgstr "kaynak verisi" + +#: rescoff.c:344 +msgid "resource data size" +msgstr "kaynak veri boyu" + +#: rescoff.c:439 +msgid "filename required for COFF output" +msgstr "COFF çýktý için dosya adý gerekli" + +#: rescoff.c:738 +msgid "can't get BFD_RELOC_RVA relocation type" +msgstr "BFD_RELOC_RVA yer deðiþtirme tipi alýnamýyor" + +#: resrc.c:240 resrc.c:312 +#, c-format +msgid "can't open temporary file `%s': %s" +msgstr "`%s' geçici dosyasý açýlamýyor: %s" + +#: resrc.c:246 +#, c-format +msgid "can't redirect stdout: `%s': %s" +msgstr "standart çýktý yönlendirilemiyor: `%s': %s" + +#: resrc.c:262 +#, c-format +msgid "%s %s: %s" +msgstr "%s %s: %s" + +#: resrc.c:308 +#, c-format +msgid "can't execute `%s': %s" +msgstr "`%s' çalýþtýrýlamýyor: %s" + +#: resrc.c:317 +#, c-format +msgid "Using temporary file `%s' to read preprocessor output\n" +msgstr "`%s' geçici dosyasý öniþlemci çýktýsýný okumak için kullanýlýyor\n" + +#: resrc.c:324 +#, c-format +msgid "can't popen `%s': %s" +msgstr "`%s' popen yapýlamýyor: %s" + +#: resrc.c:326 +msgid "Using popen to read preprocessor output\n" +msgstr "Öniþlemci çýktýsý popen ile okunuyor\n" + +#: resrc.c:369 +#, c-format +msgid "Tried `%s'\n" +msgstr "`%s' denendi\n" + +#: resrc.c:380 +#, c-format +msgid "Using `%s'\n" +msgstr "`%s' kullanýlýyor\n" + +#: resrc.c:541 +#, c-format +msgid "%s:%d: %s\n" +msgstr "%s:%d: %s\n" + +#: resrc.c:550 +#, c-format +msgid "%s: unexpected EOF" +msgstr "%s: beklenmeyen dosya sonu" + +#: resrc.c:607 +#, c-format +msgid "%s: read of %lu returned %lu" +msgstr "%s: %lu'nun okunmasý %lu döndürdü" + +#: resrc.c:649 resrc.c:903 resrc.c:1176 resrc.c:1330 +#, c-format +msgid "stat failed on bitmap file `%s': %s" +msgstr "`%s' bitmap dosyasý durumlanamadý: %s" + +#: resrc.c:702 +#, c-format +msgid "cursor file `%s' does not contain cursor data" +msgstr "gösterge dosyasý '%s' gösterge verisi içermiyor" + +#: resrc.c:734 resrc.c:1047 +#, c-format +msgid "%s: fseek to %lu failed: %s" +msgstr "%s: %lu'ya fseek baþarýsýz: %s" + +#: resrc.c:871 +msgid "help ID requires DIALOGEX" +msgstr "yardým ID için DIALOGEX gerekli" + +#: resrc.c:873 +msgid "control data requires DIALOGEX" +msgstr "kontrol verisi için DIALOGEX gerekli" + +#: resrc.c:1016 +#, c-format +msgid "icon file `%s' does not contain icon data" +msgstr "ikon dosyasý '%s' ikon verisi içermiyor" + +#: resrc.c:1535 +#, c-format +msgid "can't open `%s' for output: %s" +msgstr "'%s' çýktý için açýlamadý: %s" + +#: size.c:79 +#, c-format +msgid "" +"Usage: %s [-A | --format=sysv | -B | --format=berkeley]\n" +" [-o | --radix=8 | -d | --radix=10 | -h | --radix=16]\n" +" [-V | --version] [--target=bfdname] [--help] [file...]\n" +msgstr "" +"Kullaným: %s [-A | --format=sysv | -B | --format=berkeley] Biçem\n" +" [-o | --radix=8 | -d | --radix=10 | -h | --radix=16]\n" +" [-V | --version] Sürüm\n" +" [--target=bfd_adý] Hedef\n" +" [--help] Yardým\n" +" [dosya...] [dosya]\n" + +#: size.c:85 +msgid "default is --format=berkeley\n" +msgstr "--format=berkeley öntanýmlý\n" + +#: size.c:87 +msgid "default is --format=sysv\n" +msgstr "--format=sysv öntanýmlý\n" + +#: size.c:141 +#, c-format +msgid "invalid argument to --format: %s" +msgstr "--format'a geçersiz seçenek: %s" + +#: size.c:168 +#, c-format +msgid "Invalid radix: %s\n" +msgstr "Geçersiz radix: %s\n" + +#: srconv.c:1880 +#, c-format +msgid "Usage: %s [-dhVq] in-file [out-file]\n" +msgstr "Kullaným: %s [-dhVq] girdi-dosyasý [çýktý-dosyasý]\n" + +#: srconv.c:1887 +#, c-format +msgid "%s: Convert a COFF object file into a SYSROFF object file\n" +msgstr "%s: Bir COFF nesne dosyasýný SYSROFF nesne dosyasýna çevirir\n" + +#: srconv.c:2020 +#, c-format +msgid "unable to open output file %s" +msgstr "çýktý dosyasý %s açýlamadý" + +#: stabs.c:349 stabs.c:1770 +msgid "numeric overflow" +msgstr "sayýsal taþma" + +#: stabs.c:360 +#, c-format +msgid "Bad stab: %s\n" +msgstr "Kötü stab: %s\n" + +#: stabs.c:370 +#, c-format +msgid "Warning: %s: %s\n" +msgstr "Uyarý: %s: %s\n" + +#: stabs.c:492 +msgid "N_LBRAC not within function\n" +msgstr "N_LBRAC iþlev içerisinde deðil\n" + +#: stabs.c:531 +msgid "Too many N_RBRACs\n" +msgstr "Fazla sayýda N_RBRAC\n" + +#: stabs.c:780 +msgid "unknown C++ encoded name" +msgstr "Bilinmeyen C++ þifreli ismi" + +#. Complain and keep going, so compilers can invent new +#. cross-reference types. +#: stabs.c:1307 +msgid "unrecognized cross reference type" +msgstr "tanýnmayan çapraz baþvuru tipi" + +#. Does this actually ever happen? Is that why we are worrying +#. about dealing with it rather than just calling error_type? +#: stabs.c:1862 +msgid "missing index type" +msgstr "eksik endeks tipi" + +#: stabs.c:2189 +msgid "unknown virtual character for baseclass" +msgstr "temel sýnýf için bilinmeyen sanal karakter" + +#: stabs.c:2207 +msgid "unknown visibility character for baseclass" +msgstr "temel sýnýf için bilinmeyen görünebilirlik karakteri" + +#: stabs.c:2399 +msgid "unnamed $vb type" +msgstr "isimlenmemiþ $vb tipi" + +#: stabs.c:2405 +msgid "unrecognized C++ abbreviation" +msgstr "tanýnmayan C++ kýsaltmasý" + +#: stabs.c:2485 +msgid "unknown visibility character for field" +msgstr "alan için bilinmeyen görünürlük karakteri" + +#: stabs.c:2741 +msgid "const/volatile indicator missing" +msgstr "sabit/deðiþken belirteci eksik" + +#: stabs.c:2981 +#, c-format +msgid "No mangling for \"%s\"\n" +msgstr "\"%s\" için karýþtýrma yok\n" + +#: stabs.c:3294 +msgid "Undefined N_EXCL" +msgstr "N_EXCL tanýmsýz" + +#: stabs.c:3382 +#, c-format +msgid "Type file number %d out of range\n" +msgstr "Tip dosya numarasý %d aralýk dýþý\n" + +#: stabs.c:3387 +#, c-format +msgid "Type index number %d out of range\n" +msgstr "Tip endeks numarasý %d aralýk dýþý\n" + +#: stabs.c:3474 +#, c-format +msgid "Unrecognized XCOFF type %d\n" +msgstr "Bilinmeyen XCOFF tipi %d\n" + +#: stabs.c:3773 +#, c-format +msgid "bad mangled name `%s'\n" +msgstr "kötü karýþtýrýlmýþ isim '%s'\n" + +#: stabs.c:3869 +msgid "no argument types in mangled string\n" +msgstr "karýþtýrýlmýþ dizgede argüman tipi yok\n" + +#: strings.c:177 +#, c-format +msgid "invalid number %s" +msgstr "geçersiz sayý %s" + +#: strings.c:513 +#, c-format +msgid "invalid integer argument %s" +msgstr "geçersiz tamsayý argümaný %s" + +#: strings.c:523 +#, c-format +msgid "" +"Usage: %s [-afov] [-n min-len] [-min-len] [-t {o,x,d}] [-]\n" +" [--all] [--print-file-name] [--bytes=min-len] [--radix={o,x,d}]\n" +" [--target=bfdname] [--help] [--version] file...\n" +msgstr "" +"Kullaným: %s [-afov] [-n min-uzun] [-min-len] En az uzunluk\n" +" [-t {o,x,d}] [-]\n" +" [--all] Hepsi\n" +" [--print-file-name] Dosya adýný yazdýrýr\n" +" [--bytes=min-uzun] En az bayt\n" +" [--radix={o,x,d}]\n" +" [--target=bfd_adý] Hedef\n" +" [--help] Yardým\n" +" [--version] Sürüm bilgisi\n" +" dosya... \n" + +#: sysdump.c:712 +#, c-format +msgid "Usage: %s [-hV] in-file\n" +msgstr "Kullaným: %s [-hV] girdi-dosyasý\n" + +#: sysdump.c:781 +#, c-format +msgid "cannot open input file %s" +msgstr "%s girdi dosyasý açýlamadý" + +#: version.c:39 +msgid "Copyright 1997, 98, 99, 2000 Free Software Foundation, Inc.\n" +msgstr "Copyright 1997, 98, 99, 2000 Free Software Foundation, Inc.\n" + +#: version.c:40 +msgid "" +"This program is free software; you may redistribute it under the terms of\n" +"the GNU General Public License. This program has absolutely no warranty.\n" +msgstr "" +"Bu, bir serbest yazýlýmdýr; GNU Genel Kamu Lisansý koþullarý altýnda deðiþiklik \n" +"yapabilir ve/veya yeniden daðýtabilirsiniz. \n" +"Bu yazýlýmýn herhangi bir garantisi yoktur.\n" + +#: windres.c:237 +#, c-format +msgid "can't open %s `%s': %s" +msgstr "%s `%s' açýlamadý: %s" + +#: windres.c:416 +msgid ": expected to be a directory\n" +msgstr ": dizin beklendi\n" + +#: windres.c:428 +msgid ": expected to be a leaf\n" +msgstr ": yaprak beklendi\n" + +#: windres.c:437 +#, c-format +msgid "%s: warning: " +msgstr "%s: uyarý: " + +#: windres.c:439 +msgid ": duplicate value\n" +msgstr ": çift deðer\n" + +#: windres.c:602 +#, c-format +msgid "unknown format type `%s'" +msgstr "bilinmeyen biçem tipi `%s'" + +#: windres.c:603 +#, c-format +msgid "%s: supported formats:" +msgstr "%s: desteklenen biçemler:" + +#. Otherwise, we give up. +#: windres.c:690 +#, c-format +msgid "can not determine type of file `%s'; use the -I option" +msgstr "`%s' dosyasýnýn tipi belirlenemedi; -I seçeneðini kullanýn" + +#: windres.c:704 +#, c-format +msgid "Usage: %s [options] [input-file] [output-file]\n" +msgstr "Kullaným: %s [seçenekler] [girdi-dosyasý] [çýktý-dosyasý]\n" + +#: windres.c:706 +msgid "" +"Options:\n" +" -i FILE, --input FILE Name input file\n" +" -o FILE, --output FILE Name output file\n" +" -I FORMAT, --input-format FORMAT\n" +" Specify input format\n" +" -O FORMAT, --output-format FORMAT\n" +" Specify output format\n" +" -F TARGET, --target TARGET Specify COFF target\n" +" --preprocessor PROGRAM Program to use to preprocess rc file\n" +" --include-dir DIR Include directory when preprocessing rc file\n" +" -DSYM[=VAL], --define SYM[=VAL]\n" +" Define SYM when preprocessing rc file\n" +" -v Verbose - tells you what it's doing\n" +" --language VAL Set language when reading rc file\n" +" --use-temp-file Use a temporary file instead of popen to read\n" +" the preprocessor output\n" +" --no-use-temp-file Use popen (default)\n" +msgstr "" +"Seçenekler:\n" +" -i DOSYA, --input DOSYA Girdi dosyasý ismi\n" +" -o DOSYA, --output DOSYA Çýktý dosyasý ismi\n" +" -I BÝÇEM, --input-format BÝÇEM\n" +" Girdi biçemini belirtir\n" +" -O BÝÇEM, --output-format BÝÇEM\n" +" Çýktý biçemini belirtir\n" +" -F HEDEF, --target HEDEF COFF hedefini belirtir\n" +" --preprocessor YAZILIM rc dosyasýný öniþlemek için kullanýlacak yazýlým\n" +" --include-dir DÝZÝN rc dosyasý öniþlenirken dizini dahil et\n" +" -DSYM[=DEÐER], --define SYM[=DEÐER]\n" +" rc dosyasý öniþlenirken SYM'i tanýmlar\n" +" -v Açýklamalý - ne yapýldýðýný anlatýr\n" +" --language DEÐER rc dosyasý okunurken dili belirtir\n" +" --use-temp-file Öniþlemci çýktýsýný okumak için popen yerine geçici dosya kullanýr\n" +" --no-use-temp-file (öntanýmlý) popen kullanýr\n" + +#: windres.c:725 +msgid " --yydebug Turn on parser debugging\n" +msgstr " --yydebug Tarayýcýda hata ayýklamayý etkinleþtirir\n" + +#: windres.c:728 +msgid "" +" --help Print this help message\n" +" --version Print version information\n" +msgstr "" +" --help Bu yardýmý gösterir\n" +" --version Sürüm bilgisini gösterir\n" + +#: windres.c:731 +msgid "" +"FORMAT is one of rc, res, or coff, and is deduced from the file name\n" +"extension if not specified. A single file name is an input file.\n" +"No input-file is stdin, default rc. No output-file is stdout, default rc.\n" +msgstr "" +"BÝÇEM rc, res, veya coff deðerlerinden biri olup, eðer belirtilmezse dosya ismi sonekinden bulunur. Tek bir dosya ismi bir girdi dosyasý kabul edilir\n" +"Girdi dosya ismi verilmezse standart girdi, öntanýmlý rc okunur. \n" +"Çýktý dosya ismi verilmezse standart çýktý, öntanýmlý rc okunur.\n" + +#: windres.c:980 +msgid "no resources" +msgstr "kaynak yok" + +#: wrstabs.c:366 wrstabs.c:2027 +#, c-format +msgid "string_hash_lookup failed: %s" +msgstr "string_hash_lookup baþarýsýz: %s" + +#: wrstabs.c:666 +#, c-format +msgid "stab_int_type: bad size %u" +msgstr "stab_int_type: hatalý boy %u" + +#: wrstabs.c:1467 +#, c-format +msgid "%s: warning: unknown size for field `%s' in struct" +msgstr "%s: uyarý: Yapý içinde `%s' alaný için bilinmeyen boy" diff -uprN binutils-2.11.92.0.10/binutils/readelf.c binutils-2.11.92.0.12/binutils/readelf.c --- binutils-2.11.92.0.10/binutils/readelf.c Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/binutils/readelf.c Wed Nov 21 15:35:32 2001 @@ -68,6 +68,7 @@ #include "elf/arc.h" #include "elf/fr30.h" #include "elf/mcore.h" +#include "elf/mmix.h" #include "elf/i960.h" #include "elf/pj.h" #include "elf/avr.h" @@ -122,6 +123,7 @@ int do_debug_aranges int do_debug_frames; int do_debug_frames_interp; int do_debug_macinfo; +int do_debug_str; int do_arch; int do_notes; int is_32bit_elf; @@ -219,7 +221,11 @@ static int display_debug_ static int display_debug_aranges PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *)); 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 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 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)); @@ -230,12 +236,13 @@ static void free_abbrevs static void add_abbrev PARAMS ((unsigned long, unsigned long, int)); static void add_abbrev_attr PARAMS ((unsigned long, unsigned long)); static unsigned char * read_and_display_attr PARAMS ((unsigned long, unsigned long, unsigned char *, unsigned long, unsigned long)); +static unsigned char * read_and_display_attr_value PARAMS ((unsigned long, unsigned long, unsigned char *, unsigned long, unsigned long)); static unsigned char * display_block PARAMS ((unsigned char *, unsigned long)); static void decode_location_expression PARAMS ((unsigned char *, unsigned int, unsigned long)); -static void request_dump PARAMS ((unsigned int, char)); -static const char * get_elf_class PARAMS ((unsigned char)); -static const char * get_data_encoding PARAMS ((unsigned char)); -static const char * get_osabi_name PARAMS ((unsigned char)); +static void request_dump PARAMS ((unsigned int, int)); +static const char * get_elf_class PARAMS ((unsigned int)); +static const char * get_data_encoding PARAMS ((unsigned int)); +static const char * get_osabi_name PARAMS ((unsigned int)); static int guess_is_rela PARAMS ((unsigned long)); static char * get_note_type PARAMS ((unsigned int)); static int process_note PARAMS ((Elf32_Internal_Note *)); @@ -274,7 +281,7 @@ typedef int Elf32_Word; #define BYTE_GET8(field) byte_get (field, 8) #endif -#define NUM_ELEM(array) (sizeof (array) / sizeof ((array)[0])) +#define NUM_ELEM(array) (sizeof (array) / sizeof ((array)[0])) #define GET_ELF_SYMBOLS(file, offset, size) \ (is_32bit_elf ? get_32bit_elf_symbols (file, offset, size) \ @@ -587,6 +594,7 @@ guess_is_rela (e_machine) case EM_X86_64: case EM_S390: case EM_S390_OLD: + case EM_MMIX: return TRUE; case EM_MMA: @@ -941,6 +949,10 @@ dump_relocations (file, rel_offset, rel_ rtype = elf_mcore_reloc_type (type); break; + case EM_MMIX: + rtype = elf_mmix_reloc_type (type); + break; + case EM_PPC: case EM_PPC64: rtype = elf_ppc_reloc_type (type); @@ -2065,7 +2077,7 @@ usage () fprintf (stdout, _(" -D or --use-dynamic Use the dynamic section info when displaying symbols\n")); fprintf (stdout, _(" -x or --hex-dump=\n")); fprintf (stdout, _(" Dump the contents of section \n")); - fprintf (stdout, _(" -w[liaprmf] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames]\n")); + fprintf (stdout, _(" -w[liaprmfs] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str]\n")); fprintf (stdout, _(" Display the contents of DWARF2 debug sections\n")); #ifdef SUPPORT_DISASSEMBLY fprintf (stdout, _(" -i or --instruction-dump=\n")); @@ -2083,7 +2095,7 @@ usage () static void request_dump (section, type) unsigned int section; - char type; + int type; { if (section >= num_dump_sects) { @@ -2245,6 +2257,11 @@ parse_args (argc, argv) do_debug_macinfo = 1; break; + case 's': + case 'S': + do_debug_str = 1; + break; + default: warn (_("Unrecognised debug option '%s'\n"), optarg); break; @@ -2294,7 +2311,7 @@ parse_args (argc, argv) static const char * get_elf_class (elf_class) - unsigned char elf_class; + unsigned int elf_class; { static char buff [32]; @@ -2311,7 +2328,7 @@ get_elf_class (elf_class) static const char * get_data_encoding (encoding) - unsigned char encoding; + unsigned int encoding; { static char buff [32]; @@ -2328,7 +2345,7 @@ get_data_encoding (encoding) static const char * get_osabi_name (osabi) - unsigned char osabi; + unsigned int osabi; { static char buff [32]; @@ -3039,7 +3056,7 @@ process_section_headers (file) } 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_frames || do_debug_macinfo || do_debug_str) && strncmp (name, ".debug_", 7) == 0) { name += 7; @@ -3052,6 +3069,7 @@ process_section_headers (file) || (do_debug_aranges && (strcmp (name, "aranges") == 0)) || (do_debug_frames && (strcmp (name, "frame") == 0)) || (do_debug_macinfo && (strcmp (name, "macinfo") == 0)) + || (do_debug_str && (strcmp (name, "str") == 0)) ) request_dump (i, DEBUG_DUMP); } @@ -3559,7 +3577,7 @@ slurp_ia64_unwind_table (file, aux, sec) if (ELF32_ST_TYPE (sym->st_info) != STT_SECTION) { - warn (_("Skipping unexpected symbol type %u"), + warn (_("Skipping unexpected symbol type %u\n"), ELF32_ST_TYPE (sym->st_info)); continue; } @@ -3571,7 +3589,7 @@ slurp_ia64_unwind_table (file, aux, sec) if (ELF64_ST_TYPE (sym->st_info) != STT_SECTION) { - warn (_("Skipping unexpected symbol type %u"), + warn (_("Skipping unexpected symbol type %u\n"), ELF64_ST_TYPE (sym->st_info)); continue; } @@ -3579,7 +3597,7 @@ slurp_ia64_unwind_table (file, aux, sec) if (strncmp (relname, "R_IA64_SEGREL", 13) != 0) { - warn (_("Skipping unexpected relocation type %s"), relname); + warn (_("Skipping unexpected relocation type %s\n"), relname); continue; } @@ -4084,7 +4102,6 @@ process_dynamic_segment (file) dynamic_strings = (char *) get_data (NULL, file, offset, str_tab_len, _("dynamic string table")); - break; } } @@ -4733,12 +4750,12 @@ process_version_sections (file) case SHT_GNU_versym: { Elf32_Internal_Shdr * link_section; - int total; - int cnt; - unsigned char * edata; - unsigned short * data; - char * strtab; - Elf_Internal_Sym * symbols; + int total; + int cnt; + unsigned char * edata; + unsigned short * data; + char * strtab; + Elf_Internal_Sym * symbols; Elf32_Internal_Shdr * string_sec; link_section = section_headers + section->sh_link; @@ -5692,7 +5709,7 @@ process_extended_line_op (data, is_stmt, if (len == 0) { - warn (_("badly formed extended line op encountered!")); + warn (_("badly formed extended line op encountered!\n")); return bytes_read; } @@ -5882,7 +5899,19 @@ display_debug_lines (section, start, fil op_code = * data ++; - switch (op_code) + if (op_code >= info.li_opcode_base) + { + op_code -= info.li_opcode_base; + adv = (op_code / info.li_line_range) * info.li_min_insn_length; + state_machine_regs.address += adv; + printf (_(" Special opcode %d: advance Address by %d to 0x%lx"), + op_code, adv, state_machine_regs.address); + adv = (op_code % info.li_line_range) + info.li_line_base; + state_machine_regs.line += adv; + printf (_(" and Line by %d to %d\n"), + adv, state_machine_regs.line); + } + else switch (op_code) { case DW_LNS_extended_op: data += process_extended_line_op (data, info.li_default_is_stmt, @@ -5952,20 +5981,36 @@ display_debug_lines (section, start, fil adv, state_machine_regs.address); break; + case DW_LNS_set_prologue_end: + printf (_(" Set prologue_end to true\n")); + break; + + case DW_LNS_set_epilogue_begin: + printf (_(" Set epilogue_begin to true\n")); + break; + + case DW_LNS_set_isa: + adv = read_leb128 (data, & bytes_read, 0); + data += bytes_read; + printf (_(" Set ISA to %d\n"), adv); + break; + default: - op_code -= info.li_opcode_base; - adv = (op_code / info.li_line_range) * info.li_min_insn_length; - state_machine_regs.address += adv; - printf (_(" Special opcode %d: advance Address by %d to 0x%lx"), - op_code, adv, state_machine_regs.address); - adv = (op_code % info.li_line_range) + info.li_line_base; - state_machine_regs.line += adv; - printf (_(" and Line by %d to %d\n"), - adv, state_machine_regs.line); + printf (_(" Unknown opcode %d with operands: "), op_code); + { + int i; + for (i = standard_opcodes[op_code - 1]; i > 0 ; --i) + { + printf ("0x%lx%s", read_leb128 (data, &bytes_read, 0), + i == 1 ? "" : ", "); + data += bytes_read; + } + putchar ('\n'); + } break; } } - printf ("\n"); + putchar ('\n'); } return 1; @@ -6522,6 +6567,9 @@ display_debug_abbrev (section, start, fi { start = process_abbrev_section (start, end); + if (first_abbrev == NULL) + continue; + printf (_(" Number TAG\n")); for (entry = first_abbrev; entry; entry = entry->next) @@ -6540,6 +6588,8 @@ display_debug_abbrev (section, start, fi get_FORM_name (attr->form)); } } + + free_abbrevs (); } while (start); @@ -6890,8 +6940,125 @@ decode_location_expression (data, pointe } +static const char * debug_str_contents; +static bfd_vma debug_str_size; + +static void +load_debug_str (file) + FILE * file; +{ + Elf32_Internal_Shdr * sec; + int i; + + /* If it is already loaded, do nothing. */ + if (debug_str_contents != NULL) + return; + + /* Locate the .debug_str section. */ + for (i = 0, sec = section_headers; + i < elf_header.e_shnum; + i ++, sec ++) + if (strcmp (SECTION_NAME (sec), ".debug_str") == 0) + break; + + if (i == elf_header.e_shnum || sec->sh_size == 0) + return; + + debug_str_size = sec->sh_size; + + debug_str_contents = ((char *) + get_data (NULL, file, sec->sh_offset, sec->sh_size, + _("debug_str section data"))); +} + +static void +free_debug_str () +{ + if (debug_str_contents == NULL) + return; + + free ((char *) debug_str_contents); + debug_str_contents = NULL; + debug_str_size = 0; +} + +static const char * +fetch_indirect_string (offset) + unsigned long offset; +{ + if (debug_str_contents == NULL) + return _(""); + + if (offset > debug_str_size) + return _(""); + + return debug_str_contents + offset; +} + + +static int +display_debug_str (section, start, file) + Elf32_Internal_Shdr * section; + unsigned char * start; + FILE * file ATTRIBUTE_UNUSED; +{ + unsigned long bytes; + bfd_vma addr; + + addr = section->sh_addr; + bytes = section->sh_size; + + if (bytes == 0) + { + printf (_("\nThe .debug_str section is empty.\n")); + return 0; + } + + printf (_("Contents of the .debug_str section:\n\n")); + + while (bytes) + { + int j; + int k; + int lbytes; + + lbytes = (bytes > 16 ? 16 : bytes); + + printf (" 0x%8.8lx ", (unsigned long) addr); + + for (j = 0; j < 16; j++) + { + if (j < lbytes) + printf ("%2.2x", start [j]); + else + printf (" "); + + if ((j & 3) == 3) + printf (" "); + } + + for (j = 0; j < lbytes; j++) + { + k = start [j]; + if (k >= ' ' && k < 0x80) + printf ("%c", k); + else + printf ("."); + } + + putchar ('\n'); + + start += lbytes; + addr += lbytes; + bytes -= lbytes; + } + + return 1; +} + + static unsigned char * -read_and_display_attr (attribute, form, data, cu_offset, pointer_size) +read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size) unsigned long attribute; unsigned long form; unsigned char * data; @@ -6902,8 +7069,6 @@ read_and_display_attr (attribute, form, unsigned char * block_start = NULL; int bytes_read; - printf (" %-18s:", get_AT_name (attribute)); - switch (form) { default: @@ -6915,6 +7080,11 @@ read_and_display_attr (attribute, form, data += pointer_size; break; + case DW_FORM_strp: + uvalue = byte_get (data, /* offset_size */ 4); + data += /* offset_size */ 4; + break; + case DW_FORM_ref1: case DW_FORM_flag: case DW_FORM_data1: @@ -6943,6 +7113,13 @@ read_and_display_attr (attribute, form, uvalue = read_leb128 (data, & bytes_read, 0); data += bytes_read; break; + + case DW_FORM_indirect: + form = read_leb128 (data, & bytes_read, 0); + data += bytes_read; + printf (" %s", get_FORM_name (form)); + return read_and_display_attr_value (attribute, form, data, cu_offset, + pointer_size); } switch (form) @@ -7008,12 +7185,16 @@ read_and_display_attr (attribute, form, break; case DW_FORM_strp: + printf (_(" (indirect string, offset: 0x%lx): "), uvalue); + printf (fetch_indirect_string (uvalue)); + break; + case DW_FORM_indirect: - warn (_("Unable to handle FORM: %d"), form); + /* handled above */ break; default: - warn (_("Unrecognised form: %d"), form); + warn (_("Unrecognised form: %d\n"), form); break; } @@ -7168,6 +7349,20 @@ read_and_display_attr (attribute, form, break; } + return data; +} + +static unsigned char * +read_and_display_attr (attribute, form, data, cu_offset, pointer_size) + unsigned long attribute; + unsigned long form; + unsigned char * data; + unsigned long cu_offset; + unsigned long pointer_size; +{ + printf (" %-18s:", get_AT_name (attribute)); + data = read_and_display_attr_value (attribute, form, data, cu_offset, + pointer_size); printf ("\n"); return data; } @@ -7183,6 +7378,8 @@ display_debug_info (section, start, file printf (_("The section %s contains:\n\n"), SECTION_NAME (section)); + load_debug_str (file); + while (start < end) { DWARF2_External_CompUnit * external; @@ -7243,7 +7440,7 @@ display_debug_info (section, start, file if (ELF32_ST_TYPE (sym->st_info) != STT_SECTION) { - warn (_("Skipping unexpected symbol type %u"), + warn (_("Skipping unexpected symbol type %u\n"), ELF32_ST_TYPE (sym->st_info)); continue; } @@ -7254,7 +7451,7 @@ display_debug_info (section, start, file if (ELF64_ST_TYPE (sym->st_info) != STT_SECTION) { - warn (_("Skipping unexpected symbol type %u"), + warn (_("Skipping unexpected symbol type %u\n"), ELF64_ST_TYPE (sym->st_info)); continue; } @@ -7284,8 +7481,7 @@ display_debug_info (section, start, file continue; } - if (first_abbrev != NULL) - free_abbrevs (); + free_abbrevs (); /* Read in the abbrevs used by this compilation unit. */ @@ -7300,7 +7496,7 @@ display_debug_info (section, start, file if (strcmp (SECTION_NAME (sec), ".debug_abbrev") == 0) break; - if (i == -1 || sec->sh_size == 0) + if (i == elf_header.e_shnum || sec->sh_size == 0) { warn (_("Unable to locate .debug_abbrev section!\n")); return 0; @@ -7367,6 +7563,8 @@ display_debug_info (section, start, file } } + free_debug_str (); + printf ("\n"); return 1; @@ -8162,22 +8360,24 @@ prescan_debug_info (section, start, file sections. */ struct { - char * name; + const char * const name; int (* display) PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *)); int (* prescan) PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *)); } debug_displays[] = { - { ".debug_info", display_debug_info, prescan_debug_info }, { ".debug_abbrev", display_debug_abbrev, NULL }, - { ".debug_line", display_debug_lines, NULL }, { ".debug_aranges", display_debug_aranges, NULL }, - { ".debug_pubnames", display_debug_pubnames, NULL }, { ".debug_frame", display_debug_frames, NULL }, + { ".debug_info", display_debug_info, prescan_debug_info }, + { ".debug_line", display_debug_lines, NULL }, + { ".debug_pubnames", display_debug_pubnames, NULL }, { ".eh_frame", display_debug_frames, NULL }, { ".debug_macinfo", display_debug_macinfo, NULL }, + { ".debug_str", display_debug_str, NULL }, + { ".debug_pubtypes", display_debug_not_supported, NULL }, - { ".debug_str", display_debug_not_supported, NULL }, + { ".debug_ranges", display_debug_not_supported, NULL }, { ".debug_static_func", display_debug_not_supported, NULL }, { ".debug_static_vars", display_debug_not_supported, NULL }, { ".debug_types", display_debug_not_supported, NULL }, @@ -8224,8 +8424,7 @@ display_debug_section (section, file) /* If we loaded in the abbrev section at some point, we must release it here. */ - if (first_abbrev != NULL) - free_abbrevs (); + free_abbrevs (); return 1; } diff -uprN binutils-2.11.92.0.10/binutils/testsuite/ChangeLog binutils-2.11.92.0.12/binutils/testsuite/ChangeLog --- binutils-2.11.92.0.10/binutils/testsuite/ChangeLog Thu Oct 4 14:35:43 2001 +++ binutils-2.11.92.0.12/binutils/testsuite/ChangeLog Fri Nov 16 14:05:52 2001 @@ -1,3 +1,11 @@ +2001-11-15 Alan Modra + + * binutils-all/objcopy.exp: Allow '? main', to suit powerpc64. + +2001-11-14 Geoffrey Keating + + * binutils-all/readelf.exp: powerpc-*-eabi* is an ELF target. + 2001-10-03 Thiemo Seufer * binutils-all/readelf.exp: Exclude mips*-*-elf* from 'readelf -wi' diff -uprN binutils-2.11.92.0.10/binutils/testsuite/binutils-all/objcopy.exp binutils-2.11.92.0.12/binutils/testsuite/binutils-all/objcopy.exp --- binutils-2.11.92.0.10/binutils/testsuite/binutils-all/objcopy.exp Fri May 25 12:17:57 2001 +++ binutils-2.11.92.0.12/binutils/testsuite/binutils-all/objcopy.exp Fri Nov 16 14:05:52 2001 @@ -383,7 +383,7 @@ proc strip_test_with_saving_a_symbol { } } set exec_output [binutils_run $NM "$NMFLAGS $objfile"] - if {![regexp {^([0-9a-fA-F]+)?[ ]+T main} $exec_output] \ + if {![regexp {^([0-9a-fA-F]+)?[ ]+[T\?] main} $exec_output] \ && ![regexp {^([0-9a-fA-F]+)?[ ]+T _main} $exec_output]} { fail $test return diff -uprN binutils-2.11.92.0.10/binutils/testsuite/binutils-all/objdump.exp binutils-2.11.92.0.12/binutils/testsuite/binutils-all/objdump.exp --- binutils-2.11.92.0.10/binutils/testsuite/binutils-all/objdump.exp Thu May 24 21:22:10 2001 +++ binutils-2.11.92.0.12/binutils/testsuite/binutils-all/objdump.exp Wed Nov 21 15:35:32 2001 @@ -40,7 +40,7 @@ lappend cpus_expected d10v d30v fr30 h8 lappend cpus_expected m32r m68hc11 m68hc12 m68k m88k MCore lappend cpus_expected mips mn10200 mn10300 ns32k pj powerpc pyramid lappend cpus_expected romp rs6000 s390 sh sparc tahoe tic54x tms320c54x v850 -lappend cpus_expected vax we32k z8k z8001 z8002 +lappend cpus_expected vax we32k x86-64 z8k z8001 z8002 # Make sure the target CPU shows up in the list. lappend cpus_expected ${target_cpu} diff -uprN binutils-2.11.92.0.10/binutils/testsuite/binutils-all/readelf.exp binutils-2.11.92.0.12/binutils/testsuite/binutils-all/readelf.exp --- binutils-2.11.92.0.10/binutils/testsuite/binutils-all/readelf.exp Thu Oct 4 14:35:43 2001 +++ binutils-2.11.92.0.12/binutils/testsuite/binutils-all/readelf.exp Fri Nov 16 14:05:52 2001 @@ -229,6 +229,7 @@ if { ![istarget *-*-elf*] \ && ![istarget mips*-*-irix5*] \ && ![istarget mips*-*-irix6*] \ && ![istarget powerpc-*-sysv4*] \ + && ![istarget powerpc-*-eabi*] \ && ![istarget sparc*-*-solaris2*] } { verbose "$READELF is only intended for ELF targets" 2 return diff -uprN binutils-2.11.92.0.10/binutils/unwind-ia64.c binutils-2.11.92.0.12/binutils/unwind-ia64.c --- binutils-2.11.92.0.10/binutils/unwind-ia64.c Wed Aug 22 08:52:10 2001 +++ binutils-2.11.92.0.12/binutils/unwind-ia64.c Fri Nov 16 14:05:52 2001 @@ -33,16 +33,16 @@ Foundation, 59 Temple Place - Suite 330, static bfd_vma unw_rlen = 0; -static void unw_print_brmask PARAMS ((char *, unsigned char)); -static void unw_print_grmask PARAMS ((char *, unsigned char)); -static void unw_print_frmask PARAMS ((char *, long unsigned int)); -static void unw_print_abreg PARAMS ((char *, unsigned char)); -static void unw_print_xyreg PARAMS ((char *, unsigned char, unsigned char)); +static void unw_print_brmask PARAMS ((char *, unsigned int)); +static void unw_print_grmask PARAMS ((char *, unsigned int)); +static void unw_print_frmask PARAMS ((char *, unsigned int)); +static void unw_print_abreg PARAMS ((char *, unsigned int)); +static void unw_print_xyreg PARAMS ((char *, unsigned int, unsigned int)); static void unw_print_brmask (cp, mask) char * cp; - unsigned char mask; + unsigned int mask; { char *sep = ""; int i; @@ -62,7 +62,7 @@ unw_print_brmask (cp, mask) static void unw_print_grmask (cp, mask) char * cp; - unsigned char mask; + unsigned int mask; { char *sep = ""; int i; @@ -82,7 +82,7 @@ unw_print_grmask (cp, mask) static void unw_print_frmask (cp, mask) char * cp; - unsigned long mask; + unsigned int mask; { char *sep = ""; int i; @@ -102,7 +102,7 @@ unw_print_frmask (cp, mask) static void unw_print_abreg (cp, abreg) char * cp; - unsigned char abreg; + unsigned int abreg; { static const char *special_reg[16] = { @@ -134,8 +134,8 @@ unw_print_abreg (cp, abreg) static void unw_print_xyreg (cp, x, ytreg) char * cp; - unsigned char x; - unsigned char ytreg; + unsigned int x; + unsigned int ytreg; { switch ((x << 1) | ((ytreg >> 7) & 1)) { @@ -528,33 +528,33 @@ typedef bfd_vma unw_word; static unw_word unw_decode_uleb128 PARAMS ((const unsigned char **)); static const unsigned char *unw_decode_x1 PARAMS ((const unsigned char *, - unsigned char, void *)); + unsigned int, void *)); static const unsigned char *unw_decode_x2 PARAMS ((const unsigned char *, - unsigned char, void *)); + unsigned int, void *)); static const unsigned char *unw_decode_x3 PARAMS ((const unsigned char *, - unsigned char, void *)); + unsigned int, void *)); static const unsigned char *unw_decode_x4 PARAMS ((const unsigned char *, - unsigned char, void *)); + unsigned int, void *)); static const unsigned char *unw_decode_r1 PARAMS ((const unsigned char *, - unsigned char, void *)); + unsigned int, void *)); static const unsigned char *unw_decode_r2 PARAMS ((const unsigned char *, - unsigned char, void *)); + unsigned int, void *)); static const unsigned char *unw_decode_r3 PARAMS ((const unsigned char *, - unsigned char, void *)); + unsigned int, void *)); static const unsigned char *unw_decode_p1 PARAMS ((const unsigned char *, - unsigned char, void *)); + unsigned int, void *)); static const unsigned char *unw_decode_p2_p5 PARAMS ((const unsigned char *, - unsigned char, void *)); + unsigned int, void *)); static const unsigned char *unw_decode_p6 PARAMS ((const unsigned char *, - unsigned char, void *)); + unsigned int, void *)); static const unsigned char *unw_decode_p7_p10 PARAMS ((const unsigned char *, - unsigned char, void *)); + unsigned int, void *)); static const unsigned char *unw_decode_b1 PARAMS ((const unsigned char *, - unsigned char, void *)); + unsigned int, void *)); static const unsigned char *unw_decode_b2 PARAMS ((const unsigned char *, - unsigned char, void *)); + unsigned int, void *)); static const unsigned char *unw_decode_b3_x4 PARAMS ((const unsigned char *, - unsigned char, void *)); + unsigned int, void *)); static unw_word unw_decode_uleb128 (dpp) @@ -583,7 +583,7 @@ unw_decode_uleb128 (dpp) static const unsigned char * unw_decode_x1 (dp, code, arg) const unsigned char * dp; - unsigned char code ATTRIBUTE_UNUSED; + unsigned int code ATTRIBUTE_UNUSED; void * arg ATTRIBUTE_UNUSED; { unsigned char byte1, abreg; @@ -603,7 +603,7 @@ unw_decode_x1 (dp, code, arg) static const unsigned char * unw_decode_x2 (dp, code, arg) const unsigned char * dp; - unsigned char code ATTRIBUTE_UNUSED; + unsigned int code ATTRIBUTE_UNUSED; void * arg ATTRIBUTE_UNUSED; { unsigned char byte1, byte2, abreg, x, ytreg; @@ -625,7 +625,7 @@ unw_decode_x2 (dp, code, arg) static const unsigned char * unw_decode_x3 (dp, code, arg) const unsigned char * dp; - unsigned char code ATTRIBUTE_UNUSED; + unsigned int code ATTRIBUTE_UNUSED; void * arg ATTRIBUTE_UNUSED; { unsigned char byte1, byte2, abreg, qp; @@ -649,7 +649,7 @@ unw_decode_x3 (dp, code, arg) static const unsigned char * unw_decode_x4 (dp, code, arg) const unsigned char * dp; - unsigned char code ATTRIBUTE_UNUSED; + unsigned int code ATTRIBUTE_UNUSED; void * arg ATTRIBUTE_UNUSED; { unsigned char byte1, byte2, byte3, qp, abreg, x, ytreg; @@ -675,7 +675,7 @@ unw_decode_x4 (dp, code, arg) static const unsigned char * unw_decode_r1 (dp, code, arg) const unsigned char *dp; - unsigned char code; + unsigned int code; void *arg; { int body = (code & 0x20) != 0; @@ -689,7 +689,7 @@ unw_decode_r1 (dp, code, arg) static const unsigned char * unw_decode_r2 (dp, code, arg) const unsigned char *dp; - unsigned char code; + unsigned int code; void *arg; { unsigned char byte1, mask, grsave; @@ -707,7 +707,7 @@ unw_decode_r2 (dp, code, arg) static const unsigned char * unw_decode_r3 (dp, code, arg) const unsigned char *dp; - unsigned char code; + unsigned int code; void *arg; { unw_word rlen; @@ -720,7 +720,7 @@ unw_decode_r3 (dp, code, arg) static const unsigned char * unw_decode_p1 (dp, code, arg) const unsigned char * dp; - unsigned char code; + unsigned int code; void * arg ATTRIBUTE_UNUSED; { unsigned char brmask = (code & 0x1f); @@ -732,7 +732,7 @@ unw_decode_p1 (dp, code, arg) static const unsigned char * unw_decode_p2_p5 (dp, code, arg) const unsigned char * dp; - unsigned char code; + unsigned int code; void * arg ATTRIBUTE_UNUSED; { if ((code & 0x10) == 0) @@ -813,7 +813,7 @@ unw_decode_p2_p5 (dp, code, arg) static const unsigned char * unw_decode_p6 (dp, code, arg) const unsigned char * dp; - unsigned char code; + unsigned int code; void * arg ATTRIBUTE_UNUSED; { int gregs = (code & 0x10) != 0; @@ -829,7 +829,7 @@ unw_decode_p6 (dp, code, arg) static const unsigned char * unw_decode_p7_p10 (dp, code, arg) const unsigned char *dp; - unsigned char code; + unsigned int code; void *arg; { unsigned char r, byte1, byte2; @@ -1005,7 +1005,7 @@ unw_decode_p7_p10 (dp, code, arg) static const unsigned char * unw_decode_b1 (dp, code, arg) const unsigned char * dp; - unsigned char code; + unsigned int code; void * arg ATTRIBUTE_UNUSED; { unw_word label = (code & 0x1f); @@ -1020,7 +1020,7 @@ unw_decode_b1 (dp, code, arg) static const unsigned char * unw_decode_b2 (dp, code, arg) const unsigned char * dp; - unsigned char code; + unsigned int code; void * arg ATTRIBUTE_UNUSED; { unw_word t; @@ -1033,7 +1033,7 @@ unw_decode_b2 (dp, code, arg) static const unsigned char * unw_decode_b3_x4 (dp, code, arg) const unsigned char *dp; - unsigned char code; + unsigned int code; void *arg; { unw_word t, ecount, label; diff -uprN binutils-2.11.92.0.10/binutils.spec binutils-2.11.92.0.12/binutils.spec --- binutils-2.11.92.0.10/binutils.spec Sun Oct 21 00:37:47 2001 +++ binutils-2.11.92.0.12/binutils.spec Wed Nov 21 15:20:02 2001 @@ -9,7 +9,7 @@ Summary: A GNU collection of binary utilities. Name: binutils -Version: 2.11.92.0.10 +Version: 2.11.92.0.12 Release: 1 Copyright: GPL Group: Development/Tools @@ -36,6 +36,11 @@ binary files. Most programmers will wan %prep %setup -q +%ifarch mips mipsel +patch -p1 -b --suffix .isa < mips/binutils-mips-isa.patch +find -name "*.rej" | grep rej && exit 1 +%endif + %build if [ -x /usr/bin/getconf ] ; then NRPROC=$(/usr/bin/getconf _NPROCESSORS_ONLN) diff -uprN binutils-2.11.92.0.10/binutils.spec.in binutils-2.11.92.0.12/binutils.spec.in --- binutils-2.11.92.0.10/binutils.spec.in Mon Oct 15 21:27:22 2001 +++ binutils-2.11.92.0.12/binutils.spec.in Fri Nov 16 14:05:51 2001 @@ -36,6 +36,11 @@ binary files. Most programmers will wan %prep %setup -q +%ifarch mips mipsel +patch -p1 -b --suffix .isa < mips/binutils-mips-isa.patch +find -name "*.rej" | grep rej && exit 1 +%endif + %build if [ -x /usr/bin/getconf ] ; then NRPROC=$(/usr/bin/getconf _NPROCESSORS_ONLN) diff -uprN binutils-2.11.92.0.10/configure.in binutils-2.11.92.0.12/configure.in --- binutils-2.11.92.0.10/configure.in Mon Oct 22 10:25:11 2001 +++ binutils-2.11.92.0.12/configure.in Fri Nov 16 14:05:51 2001 @@ -976,18 +976,24 @@ fi # Look if the user specified --enable-languages="..."; if not, use # the environment variable $LANGUAGES if defined. $LANGUAGES might # go away some day. +# NB: embedded tabs in this IF block -- do not untabify if test x"${enable_languages+set}" != xset; then if test x"${LANGUAGES+set}" = xset; then - enable_languages="`echo ${LANGUAGES} | tr ' ' ','`" + enable_languages="${LANGUAGES}" + echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2 else enable_languages=all fi else - if test x"${enable_languages}" = x; then - echo configure.in: --enable-languages needs at least one argument 1>&2 + if test x"${enable_languages}" = x || + test x"${enable_languages}" = xyes; + then + echo configure.in: --enable-languages needs at least one language argument 1>&2 exit 1 fi fi +enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` + subdirs= for lang in ${srcdir}/gcc/*/config-lang.in .. do diff -uprN binutils-2.11.92.0.10/gas/ChangeLog binutils-2.11.92.0.12/gas/ChangeLog --- binutils-2.11.92.0.10/gas/ChangeLog Sun Oct 21 16:24:32 2001 +++ binutils-2.11.92.0.12/gas/ChangeLog Wed Nov 21 15:35:32 2001 @@ -1,3 +1,278 @@ +2001-11-21 Richard Sandiford + + * config/tc-mips.c (mips_need_elf_addend_fixup): New, extracted from... + (md_apply_fix3): ...here. Don't prevent the symbol value being + subtracted twice from GPREL addends. + (tc_gen_reloc): Add the symbol value to a GPREL addend if it was + subtracted by the previous function. + +2001-11-20 Nick Clifton + + * config/tc-avr.c (md_apply_fix3): Fix typo introduced by + md_apply_fix3 change. + +2001-11-20 Ben Elliston + + * config/tc-m88k.c (md_apply_fix3): Match local variable `val' to + usage after md_apply_fix3 cleanups. + +2001-11-19 Hans-Peter Nilsson + + * doc/c-mmix.texi: Use texinfo 4 features. + (MMIX-mmixal): Fix typo. + +2001-11-17 Hans-Peter Nilsson + + * config/tc-cris.c (md_apply_fix3): Cast value, not pointer, in + val assignment. + +2001-11-16 Alan Modra + + * config/tc-m68k.c (md_apply_fix3): Change val back to a signed type. + +2001-11-15 H.J. Lu + + * config/tc-hppa.c (md_apply_fix3): Fix a typo. + +2001-11-15 H.J. Lu + + * config/tc-alpha.c (md_apply_fix3): Fix a typo. + +2001-11-15 Nick Clifton + + * write.c (fixup_segment): Remove references to md_apply_fix and + TC_HANDLE_FX_DONE. + * cgen.c, config/obj-coff.c, config/tc-*.c: Update all occurances + of md_apply_fix to md_apply_fix3. + Make all md_apply_fix3 functions void. + * cgen.h, config/obj-coff.h, tc-*.h: Remove all definitions of + MD_APPLY_FIX3 and TC_HANDLE_FX_DONE. + * doc/internals.texi: Update references to md_apply_fix3. + * tc.h: Update prototype for md_apply_fix3. + +2001-11-15 Alan Modra + + * config/tc-i386.h (md_end): Define. + (i386_elf_emit_arch_note): Declare. + (CpuUnknown): Delete. + * config/tc-i386.c (default_arch): Constify. + (smallest_imm_type): Remove CpuUnknown test. + (md_assemble): Don't bother checking cpu_arch_flags non-zero. + (i386_elf_emit_arch_note): New function. + + * po/POTFILES.in: Regenerate. + +2001-11-15 Thiemo Seufer + + * config/tc-mips.c (mips_ip): Re-allow %hi() op for non-ELF assembler. + +2001-11-15 Alan Modra + + * frags.c (frag_grow): Revert last change. + + * dwarf2dbg.c (get_frag_fix): Align last frag size. + + * config/tc-ppc.c (ppc_insert_operand): Pass (ppc_cpu | ppc_size) + to operand->insert. + (md_assemble): Likewise. + +2001-11-12 Nick Clifton + + * frags.c (frag_grow): Use frag_make_room() to grow the + obstack. + +2001-11-14 Nick Clifton + + * config/tc-sparc.c (md_apply_fix3): Do not remove the symbol's + value from the addend for fixups against local symbols in + SEC_MERGE sections - it was not added in, in the first place. + +2001-11-11 Timothy Wall + + * write.c (relax_segment): Convert symbol address into an octet + offset prior to adding to the frag address, which is an octet + offset. Add comments to that effect. + * config/tc-tic54x.c: Fix bugs causing tests to fail. + * config/tc-tic54x.h: Ditch PARAMS macro. + +2001-11-13 Alan Modra + + * config/obj-elf.c (obj_elf_version): Ensure terminating NUL is + put in note section. Use sizeof instead of hard-coded constants. + +2001-11-12 Thiemo Seufer + + * config/tc-mips.c (support_64bit_objects): Define for OBJ_ELF only. + (md_longopts): Allow OPTION_MABI for ELF compilation only. RE-allow + OPTION_GP32, OPTION_GP64, OPTION_FP32 for non-ELF compilation. + Sort options a bit more logical. + (md_parse_option): Allow OPTION_32, OPTION_N32, OPTION_N64, + OPTION_MABI only for elf targets. + +2001-11-12 Thiemo Seufer + + * config/tc-mips.c (set_at): Add cast needed for varargs. + (load_register): Likewise. + (macro): Likewise. Some code reformatting. + (macro2): Add cast needed for varargs. + (mips16_macro): Likewise. + +2001-11-12 Thiemo Seufer + + * config/tc-mips.c (md_assemble): Remove superflous casts. + (append_insn): Likewise. + (mips16_macro_build): Likewise. + (macro): Likewise. + (mips16_ip): Likewise. + (s_cpload): Likewise. + (mips_relax_frag): Likewise. + +2001-11-12 Thiemo Seufer + + * config/tc-mips.c (mips_abi_level): Move in front of + mips_set_options. + (mips_set_options): Add members gp32, fp32, abi. + (file_mips_gp32): New flag. + (file_mips_fp32): New flag. + (mips_opts): Initialize the new members. + (mips_gp32): Remove. + (mips_fp32): Remove. + (HAVE_32BIT_GPRS): Use the new values from mips_opts. + (HAVE_32BIT_FPRS): Likewise. + (HAVE_NEWABI): Likewise. + (HAVE_64BIT_OBJECTS): Likewise. + (md_begin): Likewise. Save default (file) values. + (md_parse_option): Use the new values from mips_opts. + (s_mipsset): Likewise. Fix logic to keep the ABI selection if + possible. Let .set mipsN work together with .set push/pop. + Enhance error messages. + (mips_elf_final_processing): Use file_mips_* for header processing. + +2001-11-09 Marek Michalkiewicz + + * config/tc-avr.c (mcu_types): Update for new devices. + +2001-11-09 Stephane Carrez + + * doc/Makefile.am (POD2MAN): Use 'GNU Development Tools' for + the page man title. + * doc/Makefile.in: Rebuild. + * doc/as.texinfo: Do not put man SEEALSO in document; + Use @command for commands, @option for options; Reorganize usage + to clearly identify target specific options. + +2001-11-08 Thiemo Seufer + + * config/tc-mips.c (mips_force_relocation): Remove duplicate code. + +2001-11-06 Thiemo Seufer + + * config/tc-mips.c (my_getSmallParser): Fix small parser bug. + +2001-11-05 Martin Schwidefsky + + * config/tc-s390.c (tc_s390_force_relocation): Force all relocations + that need the global offset table. + (md_apply_fix3): Add code to undo opertions done in fixup_segment + triggered by TC_FORCE_RELOCATION. + * config/tc-s390.h (TC_FORCE_RELOCATION): Replace macro code with + a call to function tc_s390_force_relocation. + (TC_FIX_ADJUSTABLE): Define. + +2001-11-04 Chris Demetriou + + * configure.in (mips-*-netbsd*): Add support for target. + * configure: Regenerate. + +2001-11-02 Nick Clifton + + * configure.in (ALL_LINGUAS): Add 'fr'. + * configure: Regernate. + * po/fr.po: New file. Obtained from the translation project web + site. + +2001-11-02 Richard Earnshaw + + * tc-arm.c: Re-arrange prototypes by architecture. + (insns): Re-arrange instructions by archtitecture. Pld instruction + is part of ARMv5E. + (tinsns): blx and bkpt are part of ARMv5T. + (do_fp_{ctrl,ldst,ldstm,dyadic,monadic,cmp,from_reg,to_reg}): Rename + to do_fpa_*. All callers changed. + + * tc-arm.c (insns): Add two temporary instructions to handle + ldrd/strd. + +2001-11-01 Stephane Carrez + + * config/tc-m68hc11.c (build_jump_insn): Allocate worst case storage + for bra/bsr and use frag_variant(), this ensure that the possible + 16-bit BFD_RELOC_16 will be in the same frag. + +2001-10-31 Chris Demetriou + + * config/tc-mips.c (HAVE_32BIT_ADDRESSES): If compiling embedded + PIC code, assume pointers the same size as GPRs. + (macro): In M_LA_AB handling for embedded PIC code, support + "la $treg,foo-bar($breg)". In load/store handling + (label ld_st) support " $treg,-($breg)" + which is used by the compiler for switch statements. + In load/store double multi-instruction macro handling + (label ldd_std) add a comment that no special handling + is currently done for embedded PIC. + (mips_ip): In 'o' (16-bit offset) case, only accept 16 + bit offsets. + +2001-10-31 Richard Earnshaw + + General cleanup of feature definitions. + * tc-arm.c (ARM_EXT_LONGMUL, ARM_EXT_HALFWORD, ARM_EXT_THUMB): Delete. + (ARM_2UP, ARM_ALL, ARM_3UP, ARM_6UP): Delete. + (FPU_CORE, FPU_FPA10, FPA_FPA11, FPU_ALL, FPA_MEMMULTI): Delete. + (ARM_EXT_V{1,2,2S,3,3M,4,4T,5T,5ExP}): New defines. + (ARM_EXT_V{5,5E}): Synchronize with above. + (ARM_ARCH_V*): Define a complete set in terms of above features. + (ARM_{1,2,3,250,6,7,8,9,STRONG}): Define in terms of architecture. + (FPU_FPA_EXT_V[12]): Define. + (FPU_ARCH_FPE, FPU_ARCH_FPA): Define in terms of above. + (FPU_ANY): Define. + (FPU_DEFAULT): Default to FPA. + (CPU_DEFAULT): For XScale, this is now just ARM_ARCH_XSCALE; for + Thumb, this is now ARM_ARCH_V5T. + (insns): Rework for new feature defines. + (tinsns): Likewise. + (opcode_select, do_ldst, md_begin, md_parse_option): Likewise. + +2001-10-31 NIIBE Yutaka + + * configure.in: Handle sh*eb-*-linux* and sh*-*-linux*. + * configure: Regenerate. + * Makefile.in: Regenerate. + * doc/c-sh.texi (SH Options): Added descriptions. + +2001-10-30 Hans-Peter Nilsson + + * configure.in: Update for MMIX port. + * Makefile.am: Ditto. Regenerate dependencies. + * Makefile.in: Regenerate. + * configure: Regenerate. + * config/tc-mmix.h, config/tc-mmix.c: New files. + * doc/Makefile.am (CPU_DOCS): Add c-mmix.texi + * doc/Makefile.in: Regenerate. + * doc/all.texi: @set MMIX. + * doc/as.texinfo: Ditto. Add MMIX gas manpage option overview. + Include c-mmix.texi. + * doc/c-mmix.texi: New file. + +2001-10-24 Chris Demetriou + + * config/tc-mips.c (hilo_interlocks, cop_interlocks): Make + these evaluate to true if mips_arch indicates SB-1. + +2001-10-23 Alan Modra + + * as.c (parse_args): Print the date as well for --version. + 2001-10-20 Chris Demetriou * config/tc-mips.c (md_show_usage): Print "sb1" for Broadcom @@ -269,7 +544,7 @@ 2001-10-08 Tom Rix - * config/tc-ppc (ppc_bf, ppc_biei) : Set first .bi lineno value to + * config/tc-ppc (ppc_bf, ppc_biei) : Set first .bi lineno value to location of next .bf * config/obj-coff.c (coff_frob_symbol) : XCOFF does not use endndx. diff -uprN binutils-2.11.92.0.10/gas/Makefile.am binutils-2.11.92.0.12/gas/Makefile.am --- binutils-2.11.92.0.10/gas/Makefile.am Thu Oct 4 14:35:43 2001 +++ binutils-2.11.92.0.12/gas/Makefile.am Fri Nov 16 14:05:52 2001 @@ -60,6 +60,7 @@ CPU_TYPES = \ m88k \ mcore \ mips \ + mmix \ mn10200 \ mn10300 \ ns32k \ @@ -112,7 +113,7 @@ CPU_OBJ_VALID = \ esac ;; \ coff) valid=yes; \ case $$c in \ - cris | i860) \ + cris | i860 | mmix) \ valid= ;; \ esac ;; \ ecoff) \ @@ -244,6 +245,7 @@ TARGET_CPU_CFILES = \ config/tc-m88k.c \ config/tc-mcore.c \ config/tc-mips.c \ + config/tc-mmix.c \ config/tc-mn10200.c \ config/tc-mn10300.c \ config/tc-ns32k.c \ @@ -287,6 +289,7 @@ TARGET_CPU_HFILES = \ config/tc-m88k.h \ config/tc-mcore.h \ config/tc-mips.h \ + config/tc-mmix.h \ config/tc-mn10200.h \ config/tc-mn10300.h \ config/tc-ns32k.h \ @@ -1209,6 +1212,12 @@ DEPTC_mips_elf = $(INCDIR)/symcat.h $(sr $(INCDIR)/opcode/mips.h itbl-ops.h $(INCDIR)/elf/mips.h \ $(INCDIR)/elf/reloc-macros.h ecoff.h $(INCDIR)/coff/sym.h \ $(INCDIR)/coff/ecoff.h +DEPTC_mmix_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-mmix.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/mmix.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h \ + $(INCDIR)/safe-ctype.h dwarf2dbg.h DEPTC_mn10200_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \ @@ -1394,14 +1403,14 @@ DEPTC_v850_elf = $(INCDIR)/symcat.h $(sr $(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 -DEPTC_z8k_coff = $(srcdir)/../opcodes/z8k-opc.h $(INCDIR)/symcat.h \ - $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h -DEPTC_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(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-z8k.h $(INCDIR)/safe-ctype.h +DEPTC_z8k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/z8k-opc.h +DEPTC_z8k_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-z8k.h \ + $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/z8k-opc.h DEPTC_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.h \ $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h \ $(BFDDIR)/som.h @@ -1647,6 +1656,11 @@ DEPOBJ_mips_elf = $(INCDIR)/symcat.h $(s $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h +DEPOBJ_mmix_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-mmix.h \ + $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/aout/aout64.h DEPOBJ_mn10200_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1992,6 +2006,9 @@ DEP_mips_ecoff = $(srcdir)/config/obj-ec DEP_mips_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-mips.h +DEP_mmix_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-mmix.h DEP_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ $(INCDIR)/bfdlink.h @@ -2142,7 +2159,8 @@ flonum-mult.o: flonum-mult.c frags.o: frags.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h hash.o: hash.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \ $(INCDIR)/obstack.h -input-file.o: input-file.c $(INCDIR)/symcat.h input-file.h +input-file.o: input-file.c $(INCDIR)/symcat.h input-file.h \ + $(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 \ diff -uprN binutils-2.11.92.0.10/gas/Makefile.in binutils-2.11.92.0.12/gas/Makefile.in --- binutils-2.11.92.0.10/gas/Makefile.in Thu Oct 4 14:35:43 2001 +++ binutils-2.11.92.0.12/gas/Makefile.in Fri Nov 16 14:05:52 2001 @@ -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. @@ -171,6 +171,7 @@ CPU_TYPES = \ m88k \ mcore \ mips \ + mmix \ mn10200 \ mn10300 \ ns32k \ @@ -225,7 +226,7 @@ CPU_OBJ_VALID = \ esac ;; \ coff) valid=yes; \ case $$c in \ - cris | i860) \ + cris | i860 | mmix) \ valid= ;; \ esac ;; \ ecoff) \ @@ -361,6 +362,7 @@ TARGET_CPU_CFILES = \ config/tc-m88k.c \ config/tc-mcore.c \ config/tc-mips.c \ + config/tc-mmix.c \ config/tc-mn10200.c \ config/tc-mn10300.c \ config/tc-ns32k.c \ @@ -405,6 +407,7 @@ TARGET_CPU_HFILES = \ config/tc-m88k.h \ config/tc-mcore.h \ config/tc-mips.h \ + config/tc-mmix.h \ config/tc-mn10200.h \ config/tc-mn10300.h \ config/tc-ns32k.h \ @@ -970,6 +973,13 @@ DEPTC_mips_elf = $(INCDIR)/symcat.h $(sr $(INCDIR)/elf/reloc-macros.h ecoff.h $(INCDIR)/coff/sym.h \ $(INCDIR)/coff/ecoff.h +DEPTC_mmix_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-mmix.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/mmix.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h \ + $(INCDIR)/safe-ctype.h dwarf2dbg.h + DEPTC_mn10200_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \ @@ -1196,15 +1206,15 @@ DEPTC_v850_elf = $(INCDIR)/symcat.h $(sr $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ $(INCDIR)/opcode/v850.h dwarf2dbg.h -DEPTC_z8k_coff = $(srcdir)/../opcodes/z8k-opc.h $(INCDIR)/symcat.h \ - $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h +DEPTC_z8k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/z8k-opc.h -DEPTC_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(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-z8k.h $(INCDIR)/safe-ctype.h +DEPTC_z8k_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-z8k.h \ + $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/z8k-opc.h DEPTC_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.h \ $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h \ @@ -1509,6 +1519,12 @@ DEPOBJ_mips_elf = $(INCDIR)/symcat.h $(s ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h +DEPOBJ_mmix_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-mmix.h \ + $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/aout/aout64.h + DEPOBJ_mn10200_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1953,6 +1969,10 @@ DEP_mips_elf = $(srcdir)/config/obj-elf. $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h +DEP_mmix_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-mmix.h + DEP_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ $(INCDIR)/bfdlink.h @@ -2173,7 +2193,7 @@ configure configure.in gdbinit.in itbl-l DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar 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) @@ -2334,7 +2354,7 @@ maintainer-clean-recursive: 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//`; \ @@ -3011,7 +3031,8 @@ flonum-mult.o: flonum-mult.c frags.o: frags.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h hash.o: hash.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \ $(INCDIR)/obstack.h -input-file.o: input-file.c $(INCDIR)/symcat.h input-file.h +input-file.o: input-file.c $(INCDIR)/symcat.h input-file.h \ + $(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 \ diff -uprN binutils-2.11.92.0.10/gas/as.c binutils-2.11.92.0.12/gas/as.c --- binutils-2.11.92.0.10/gas/as.c Thu Oct 4 14:35:43 2001 +++ binutils-2.11.92.0.12/gas/as.c Fri Nov 16 14:05:52 2001 @@ -524,7 +524,7 @@ parse_args (pargc, pargv) case OPTION_VERSION: /* This output is intended to follow the GNU standards document. */ - printf (_("GNU assembler %s\n"), VERSION); + printf (_("GNU assembler %s\n"), BFD_VERSION_STRING); printf (_("Copyright 2001 Free Software Foundation, Inc.\n")); printf (_("\ This program is free software; you may redistribute it under the terms of\n\ diff -uprN binutils-2.11.92.0.10/gas/cgen.c binutils-2.11.92.0.12/gas/cgen.c --- binutils-2.11.92.0.10/gas/cgen.c Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/cgen.c Fri Nov 16 14:05:52 2001 @@ -221,7 +221,7 @@ gas_cgen_swap_fixups (i) At this point we do not use a bfd_reloc_code_real_type for operands residing in the insn, but instead just use the operand index. This lets us easily handle fixups for any - operand type. We pick a BFD reloc type in md_apply_fix. */ + operand type. We pick a BFD reloc type in md_apply_fix3. */ fixS * gas_cgen_record_fixup (frag, where, insn, length, operand, opinfo, symbol, offset) @@ -261,7 +261,7 @@ gas_cgen_record_fixup (frag, where, insn At this point we do not use a bfd_reloc_code_real_type for operands residing in the insn, but instead just use the operand index. This lets us easily handle fixups for any - operand type. We pick a BFD reloc type in md_apply_fix. */ + operand type. We pick a BFD reloc type in md_apply_fix3. */ fixS * gas_cgen_record_fixup_exp (frag, where, insn, length, operand, opinfo, exp) @@ -566,14 +566,14 @@ gas_cgen_finish_insn (insn, buf, length, handles the rest. bfd_install_relocation (or some other bfd function) should handle them all. */ -int -gas_cgen_md_apply_fix3 (fixP, valueP, seg) +void +gas_cgen_md_apply_fix3 (fixP, valP, seg) fixS * fixP; - valueT * valueP; + valueT * valP; segT seg ATTRIBUTE_UNUSED; { char *where = fixP->fx_frag->fr_literal + fixP->fx_where; - valueT value; + valueT value = * valP; /* Canonical name, since used a lot. */ CGEN_CPU_DESC cd = gas_cgen_cpu_desc; @@ -589,15 +589,15 @@ gas_cgen_md_apply_fix3 (fixP, valueP, se result of md_pcrel_from. This is confusing. */ if (fixP->fx_addsy == (symbolS *) NULL) - { - value = *valueP; - fixP->fx_done = 1; - } + fixP->fx_done = 1; + else if (fixP->fx_pcrel) - value = *valueP; + ; + else { value = fixP->fx_offset; + if (fixP->fx_subsy != (symbolS *) NULL) { if (S_GET_SEGMENT (fixP->fx_subsy) == absolute_section) @@ -651,7 +651,7 @@ gas_cgen_md_apply_fix3 (fixP, valueP, se } if (fixP->fx_done) - return 1; + return; /* The operand isn't fully resolved. Determine a BFD reloc value based on the operand information and leave it to @@ -659,16 +659,15 @@ gas_cgen_md_apply_fix3 (fixP, valueP, se partial_inplace == false. */ reloc_type = md_cgen_lookup_reloc (insn, operand, fixP); + if (reloc_type != BFD_RELOC_NONE) - { - fixP->fx_r_type = reloc_type; - } + fixP->fx_r_type = reloc_type; else { as_bad_where (fixP->fx_file, fixP->fx_line, _("unresolved expression that must be resolved")); fixP->fx_done = 1; - return 1; + return; } } else if (fixP->fx_done) @@ -703,8 +702,6 @@ gas_cgen_md_apply_fix3 (fixP, valueP, se See the comment describing fx_addnumber in write.h. This field is misnamed (or misused :-). */ fixP->fx_addnumber = value; - - return 1; } /* Translate internal representation of relocation info to BFD target format. diff -uprN binutils-2.11.92.0.10/gas/cgen.h binutils-2.11.92.0.12/gas/cgen.h --- binutils-2.11.92.0.10/gas/cgen.h Sat Jul 14 10:29:15 2001 +++ binutils-2.11.92.0.12/gas/cgen.h Fri Nov 16 14:05:52 2001 @@ -80,7 +80,7 @@ extern fixS * gas_cgen_record_fixup_exp expressionS *)); /* md_apply_fix3 handler */ -extern int gas_cgen_md_apply_fix3 PARAMS ((fixS *, valueT *, segT)); +extern void gas_cgen_md_apply_fix3 PARAMS ((fixS *, valueT *, segT)); /* tc_gen_reloc handler */ extern arelent *gas_cgen_tc_gen_reloc PARAMS ((asection *, fixS *)); diff -uprN binutils-2.11.92.0.10/gas/config/obj-coff.c binutils-2.11.92.0.12/gas/config/obj-coff.c --- binutils-2.11.92.0.10/gas/config/obj-coff.c Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/config/obj-coff.c Fri Nov 16 14:05:52 2001 @@ -4496,11 +4496,7 @@ fixup_segment (segP, this_segment_type) #endif } /* if pcrel */ -#ifdef MD_APPLY_FIX3 - md_apply_fix3 (fixP, (valueT *) &add_number, this_segment_type); -#else - md_apply_fix (fixP, add_number); -#endif + md_apply_fix3 (fixP, (valueT *) & add_number, this_segment_type); if (!fixP->fx_bit_fixP && ! fixP->fx_no_overflow) { diff -uprN binutils-2.11.92.0.10/gas/config/obj-coff.h binutils-2.11.92.0.12/gas/config/obj-coff.h --- binutils-2.11.92.0.10/gas/config/obj-coff.h Fri Mar 9 11:16:48 2001 +++ binutils-2.11.92.0.12/gas/config/obj-coff.h Fri Nov 16 14:05:52 2001 @@ -121,10 +121,17 @@ #ifdef TE_PE #define TARGET_FORMAT "pe-shl" #else + +#if 0 /* FIXME: The "shl" varaible does not appear to exist. What happened to it ? */ #define TARGET_FORMAT \ (shl \ ? (sh_small ? "coff-shl-small" : "coff-shl") \ : (sh_small ? "coff-sh-small" : "coff-sh")) +#else +#define TARGET_FORMAT \ + (sh_small ? "coff-shl-small" : "coff-shl") +#endif + #endif #endif diff -uprN binutils-2.11.92.0.10/gas/config/obj-elf.c binutils-2.11.92.0.12/gas/config/obj-elf.c --- binutils-2.11.92.0.10/gas/config/obj-elf.c Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/config/obj-elf.c Fri Nov 16 14:05:52 2001 @@ -1417,14 +1417,13 @@ obj_elf_version (ignore) { char *name; unsigned int c; - char ch; char *p; asection *seg = now_seg; subsegT subseg = now_subseg; Elf_Internal_Note i_note; Elf_External_Note e_note; asection *note_secp = (asection *) NULL; - int i, len; + int len; SKIP_WHITESPACE (); if (*input_line_pointer == '\"') @@ -1454,19 +1453,14 @@ obj_elf_version (ignore) i_note.descsz = 0; /* no description */ i_note.type = NT_VERSION; p = frag_more (sizeof (e_note.namesz)); - md_number_to_chars (p, (valueT) i_note.namesz, 4); + md_number_to_chars (p, (valueT) i_note.namesz, sizeof (e_note.namesz)); p = frag_more (sizeof (e_note.descsz)); - md_number_to_chars (p, (valueT) i_note.descsz, 4); + md_number_to_chars (p, (valueT) i_note.descsz, sizeof (e_note.descsz)); p = frag_more (sizeof (e_note.type)); - md_number_to_chars (p, (valueT) i_note.type, 4); + md_number_to_chars (p, (valueT) i_note.type, sizeof (e_note.type)); + p = frag_more (len + 1); + strcpy (p, name); - for (i = 0; i < len; i++) - { - ch = *(name + i); - { - FRAG_APPEND_1_CHAR (ch); - } - } frag_align (2, 0, 0); subseg_set (seg, subseg); diff -uprN binutils-2.11.92.0.10/gas/config/tc-a29k.c binutils-2.11.92.0.12/gas/config/tc-a29k.c --- binutils-2.11.92.0.10/gas/config/tc-a29k.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-a29k.c Fri Nov 16 14:05:52 2001 @@ -782,26 +782,25 @@ md_number_to_chars (buf, val, n) } void -md_apply_fix (fixP, val) +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - long val; + valueT * valP; + segT seg ATTRIBUTE_UNUSED; { + long val = * (long *) valP; char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; - fixP->fx_addnumber = val; /* Remember value for emit_reloc */ + fixP->fx_addnumber = val; /* Remember value for emit_reloc. */ know (fixP->fx_size == 4); know (fixP->fx_r_type < NO_RELOC); /* This is a hack. There should be a better way to handle this. */ if (fixP->fx_r_type == RELOC_WDISP30 && fixP->fx_addsy) - { - val += fixP->fx_where + fixP->fx_frag->fr_address; - } + val += fixP->fx_where + fixP->fx_frag->fr_address; switch (fixP->fx_r_type) { - case RELOC_32: buf[0] = val >> 24; buf[1] = val >> 16; @@ -863,12 +862,13 @@ md_apply_fix (fixP, val) else if (fixP->fx_pcrel) { long v = val >> 17; + if (v != 0 && v != -1) as_bad_where (fixP->fx_file, fixP->fx_line, "call/jmp target out of range"); } else - /* this case was supposed to be handled in machine_ip */ + /* This case was supposed to be handled in machine_ip. */ abort (); buf[1] = val >> 10; /* Holds bits 0003FFFC of address */ buf[3] = val >> 2; @@ -889,6 +889,9 @@ md_apply_fix (fixP, val) as_bad (_("bad relocation type: 0x%02x"), fixP->fx_r_type); break; } + + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } #ifdef OBJ_COFF diff -uprN binutils-2.11.92.0.10/gas/config/tc-alpha.c binutils-2.11.92.0.12/gas/config/tc-alpha.c --- binutils-2.11.92.0.10/gas/config/tc-alpha.c Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/config/tc-alpha.c Fri Nov 16 14:05:52 2001 @@ -1118,14 +1118,14 @@ md_pcrel_from (fixP) the distance to the "lda" instruction for setting the addend to GPDISP. */ -int -md_apply_fix3 (fixP, valueP, seg) +void +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - valueT *valueP; + valueT * valP; segT seg; { char * const fixpos = fixP->fx_frag->fr_literal + fixP->fx_where; - valueT value = *valueP; + valueT value = * valP; unsigned image, size; switch (fixP->fx_r_type) @@ -1184,7 +1184,7 @@ md_apply_fix3 (fixP, valueP, seg) md_number_to_chars (fixpos, value, size); goto done; } - return 1; + return; #ifdef OBJ_ECOFF case BFD_RELOC_GPREL32: @@ -1199,7 +1199,7 @@ md_apply_fix3 (fixP, valueP, seg) case BFD_RELOC_GPREL16: case BFD_RELOC_ALPHA_GPREL_HI16: case BFD_RELOC_ALPHA_GPREL_LO16: - return 1; + return; case BFD_RELOC_23_PCREL_S2: if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0) @@ -1208,7 +1208,7 @@ md_apply_fix3 (fixP, valueP, seg) image = (image & ~0x1FFFFF) | ((value >> 2) & 0x1FFFFF); goto write_done; } - return 1; + return; case BFD_RELOC_ALPHA_HINT: if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0) @@ -1217,22 +1217,22 @@ md_apply_fix3 (fixP, valueP, seg) image = (image & ~0x3FFF) | ((value >> 2) & 0x3FFF); goto write_done; } - return 1; + return; #ifdef OBJ_ECOFF case BFD_RELOC_ALPHA_LITERAL: md_number_to_chars (fixpos, value, 2); - return 1; + return; #endif case BFD_RELOC_ALPHA_ELF_LITERAL: case BFD_RELOC_ALPHA_LITUSE: case BFD_RELOC_ALPHA_LINKAGE: case BFD_RELOC_ALPHA_CODEADDR: - return 1; + return; case BFD_RELOC_VTABLE_INHERIT: case BFD_RELOC_VTABLE_ENTRY: - return 1; + return; default: { @@ -1262,7 +1262,7 @@ md_apply_fix3 (fixP, valueP, seg) } if (fixP->fx_addsy != 0 || fixP->fx_pcrel != 0) - return 1; + return; else { as_warn_where (fixP->fx_file, fixP->fx_line, @@ -1275,12 +1275,9 @@ write_done: done: fixP->fx_done = 1; - return 0; } -/* - * Look for a register name in the given symbol. - */ +/* Look for a register name in the given symbol. */ symbolS * md_undefined_symbol (name) diff -uprN binutils-2.11.92.0.10/gas/config/tc-alpha.h binutils-2.11.92.0.12/gas/config/tc-alpha.h --- binutils-2.11.92.0.10/gas/config/tc-alpha.h Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-alpha.h Fri Nov 16 14:05:52 2001 @@ -1,5 +1,5 @@ /* This file is tc-alpha.h - Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Written by Ken Raeburn . @@ -37,7 +37,6 @@ : "unknown-format") #define NEED_LITERAL_POOL -#define TC_HANDLES_FX_DONE #define REPEAT_CONS_EXPRESSIONS extern int alpha_force_relocation PARAMS ((struct fix *)); @@ -49,7 +48,6 @@ extern valueT alpha_gp_value; #define TC_FORCE_RELOCATION(FIXP) alpha_force_relocation (FIXP) #define tc_fix_adjustable(FIXP) alpha_fix_adjustable (FIXP) #define RELOC_REQUIRES_SYMBOL -#define MD_APPLY_FIX3 /* This expression evaluates to false if the relocation is for a local object for which we still want to do the relocation at runtime. diff -uprN binutils-2.11.92.0.10/gas/config/tc-arc.c binutils-2.11.92.0.12/gas/config/tc-arc.c --- binutils-2.11.92.0.10/gas/config/tc-arc.c Fri Oct 19 23:57:49 2001 +++ binutils-2.11.92.0.12/gas/config/tc-arc.c Fri Nov 16 14:05:52 2001 @@ -834,7 +834,7 @@ md_assemble (str) operands residing in the insn, but instead just use the operand index. This lets us easily handle fixups for any operand type, although that is admittedly not a very exciting - feature. We pick a BFD reloc type in md_apply_fix. + feature. We pick a BFD reloc type in md_apply_fix3. Limm values (4 byte immediate "constants") must be treated normally because they're not part of the actual insn word @@ -1880,16 +1880,16 @@ get_arc_exp_reloc_type (data_p, default_ and we attempt to completely resolve the reloc. If we can not do that, we determine the correct reloc code and put it back in the fixup. */ -int -md_apply_fix3 (fixP, valueP, seg) +void +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - valueT *valueP; + valueT * valP; segT seg; { #if 0 char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; #endif - valueT value; + valueT value = * valP; /* FIXME FIXME FIXME: The value we are passed in *valueP includes the symbol values. Since we are using BFD_ASSEMBLER, if we are @@ -1903,13 +1903,10 @@ md_apply_fix3 (fixP, valueP, seg) result of md_pcrel_from. This is confusing. */ if (fixP->fx_addsy == (symbolS *) NULL) - { - value = *valueP; - fixP->fx_done = 1; - } + fixP->fx_done = 1; + else if (fixP->fx_pcrel) { - value = *valueP; /* ELF relocations are against symbols. If this symbol is in a different section then we need to leave it for the linker to deal with. Unfortunately, md_pcrel_from can't tell, @@ -1962,7 +1959,7 @@ md_apply_fix3 (fixP, valueP, seg) if (fixP->fx_done) { /* Nothing else to do here. */ - return 1; + return; } /* Determine a BFD reloc value based on the operand information. @@ -1997,7 +1994,7 @@ md_apply_fix3 (fixP, valueP, seg) as_bad_where (fixP->fx_file, fixP->fx_line, "unresolved expression that must be resolved"); fixP->fx_done = 1; - return 1; + return; } } else @@ -2037,8 +2034,6 @@ md_apply_fix3 (fixP, valueP, seg) } fixP->fx_addnumber = value; - - return 1; } /* Translate internal representation of relocation info to BFD target diff -uprN binutils-2.11.92.0.10/gas/config/tc-arc.h binutils-2.11.92.0.12/gas/config/tc-arc.h --- binutils-2.11.92.0.10/gas/config/tc-arc.h Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-arc.h Fri Nov 16 14:05:52 2001 @@ -53,10 +53,6 @@ extern const char *arc_target_format; #define LISTING_HEADER "ARC GAS " -#define TC_HANDLES_FX_DONE - -#define MD_APPLY_FIX3 - /* The ARC needs to parse reloc specifiers in .word. */ extern void arc_parse_cons_expression PARAMS ((struct expressionS *, unsigned)); diff -uprN binutils-2.11.92.0.10/gas/config/tc-arm.c binutils-2.11.92.0.12/gas/config/tc-arm.c --- binutils-2.11.92.0.10/gas/config/tc-arm.c Sun Oct 21 16:24:32 2001 +++ binutils-2.11.92.0.12/gas/config/tc-arm.c Fri Nov 16 14:05:52 2001 @@ -39,57 +39,78 @@ #include "dwarf2dbg.h" #endif -/* Types of processor to assemble for. */ -#define ARM_1 0x00000001 -#define ARM_2 0x00000002 -#define ARM_3 0x00000004 -#define ARM_250 ARM_3 -#define ARM_6 0x00000008 -#define ARM_7 ARM_6 /* Same core instruction set. */ -#define ARM_8 ARM_6 /* Same core instruction set. */ -#define ARM_9 ARM_6 /* Same core instruction set. */ -#define ARM_CPU_MASK 0x0000000f - -/* The following bitmasks control CPU extensions (ARM7 onwards): */ -#define ARM_EXT_LONGMUL 0x00000010 /* Allow long multiplies. */ -#define ARM_EXT_HALFWORD 0x00000020 /* Allow half word loads. */ -#define ARM_EXT_THUMB 0x00000040 /* Allow BX instruction. */ -#define ARM_EXT_V5 0x00000080 /* Allow CLZ, etc. */ -#define ARM_EXT_V5E 0x00000100 /* "El Segundo". */ -#define ARM_EXT_XSCALE 0x00000200 /* Allow MIA etc. */ -#define ARM_EXT_MAVERICK 0x00000400 /* Use Cirrus/DSP coprocessor. */ - -/* Architectures are the sum of the base and extensions. */ -#define ARM_ARCH_V3M ARM_EXT_LONGMUL -#define ARM_ARCH_V4 (ARM_ARCH_V3M | ARM_EXT_HALFWORD) -#define ARM_ARCH_V4T (ARM_ARCH_V4 | ARM_EXT_THUMB) -#define ARM_ARCH_V5 (ARM_ARCH_V4 | ARM_EXT_V5) -#define ARM_ARCH_V5T (ARM_ARCH_V5 | ARM_EXT_THUMB) -#define ARM_ARCH_V5TE (ARM_ARCH_V5T | ARM_EXT_V5E) -#define ARM_ARCH_XSCALE (ARM_ARCH_V5TE | ARM_EXT_XSCALE) +/* The following bitmasks control CPU extensions: */ +#define ARM_EXT_V1 0x00000001 /* All processors (core set). */ +#define ARM_EXT_V2 0x00000002 /* Multiply instructions. */ +#define ARM_EXT_V2S 0x00000004 /* SWP instructions. */ +#define ARM_EXT_V3 0x00000008 /* MSR MRS. */ +#define ARM_EXT_V3M 0x00000010 /* Allow long multiplies. */ +#define ARM_EXT_V4 0x00000020 /* Allow half word loads. */ +#define ARM_EXT_V4T 0x00000040 /* Thumb v1. */ +#define ARM_EXT_V5 0x00000080 /* Allow CLZ, etc. */ +#define ARM_EXT_V5T 0x00000100 /* Thumb v2. */ +#define ARM_EXT_V5ExP 0x00000200 /* DSP core set. */ +#define ARM_EXT_V5E 0x00000400 /* DSP Double transfers. */ +/* Processor specific extensions. */ +#define ARM_EXT_XSCALE 0x00000800 /* Allow MIA etc. */ +#define ARM_EXT_MAVERICK 0x00001000 /* Use Cirrus/DSP coprocessor. */ + +/* Architectures are the sum of the base and extensions. The ARM ARM (rev E) + defines the following: ARMv3, ARMv3M, ARMv4xM, ARMv4, ARMv4TxM, ARMv4T, + ARMv5xM, ARMv5, ARMv5TxM, ARMv5T, ARMv5TExP, ARMv5TE. To these we add + three more to cover cores prior to ARM6. Finally, there are cores which + implement further extensions in the co-processor space. */ +#define ARM_ARCH_V1 ARM_EXT_V1 +#define ARM_ARCH_V2 (ARM_ARCH_V1 | ARM_EXT_V2) +#define ARM_ARCH_V2S (ARM_ARCH_V2 | ARM_EXT_V2S) +#define ARM_ARCH_V3 (ARM_ARCH_V2S | ARM_EXT_V3) +#define ARM_ARCH_V3M (ARM_ARCH_V3 | ARM_EXT_V3M) +#define ARM_ARCH_V4xM (ARM_ARCH_V3 | ARM_EXT_V4) +#define ARM_ARCH_V4 (ARM_ARCH_V3M | ARM_EXT_V4) +#define ARM_ARCH_V4TxM (ARM_ARCH_V4xM | ARM_EXT_V4T) +#define ARM_ARCH_V4T (ARM_ARCH_V4 | ARM_EXT_V4T) +#define ARM_ARCH_V5xM (ARM_ARCH_V4xM | ARM_EXT_V5) +#define ARM_ARCH_V5 (ARM_ARCH_V4 | ARM_EXT_V5) +#define ARM_ARCH_V5TxM (ARM_ARCH_V5xM | ARM_EXT_V4T | ARM_EXT_V5T) +#define ARM_ARCH_V5T (ARM_ARCH_V5 | ARM_EXT_V4T | ARM_EXT_V5T) +#define ARM_ARCH_V5TExP (ARM_ARCH_V5T | ARM_EXT_V5ExP) +#define ARM_ARCH_V5TE (ARM_ARCH_V5TExP | ARM_EXT_V5E) +/* Processors with specific extensions in the co-processor space. */ +#define ARM_ARCH_XSCALE (ARM_ARCH_V5TE | ARM_EXT_XSCALE) /* Some useful combinations: */ #define ARM_ANY 0x00ffffff #define ARM_2UP (ARM_ANY - ARM_1) -#define ARM_ALL ARM_2UP /* Not arm1 only. */ -#define ARM_3UP 0x00fffffc -#define ARM_6UP 0x00fffff8 /* Includes ARM7. */ - -#define FPU_CORE 0x80000000 -#define FPU_FPA10 0x40000000 -#define FPU_FPA11 0x40000000 +#define ARM_ALL ARM_ANY + +#define FPU_FPA_EXT_V1 0x80000000 /* Base FPA instruction set. */ +#define FPU_FPA_EXT_V2 0x40000000 /* LFM/SFM. */ #define FPU_NONE 0 +#define FPU_ARCH_FPE FPU_FPA_EXT_V1 +#define FPU_ARCH_FPA (FPU_ARCH_FPE | FPU_FPA_EXT_V2) + /* Some useful combinations. */ -#define FPU_ALL 0xff000000 /* Note this is ~ARM_ANY. */ -#define FPU_MEMMULTI 0x7f000000 /* Not fpu_core. */ +#define FPU_ANY 0xff000000 /* Note this is ~ARM_ANY. */ + +/* Types of processor to assemble for. */ +#define ARM_1 ARM_ARCH_V1 +#define ARM_2 ARM_ARCH_V2 +#define ARM_3 ARM_ARCH_V2S +#define ARM_250 ARM_ARCH_V2S +#define ARM_6 ARM_ARCH_V3 +#define ARM_7 ARM_ARCH_V3 +#define ARM_8 ARM_ARCH_V4 +#define ARM_9 ARM_ARCH_V4T +#define ARM_STRONG ARM_ARCH_V4 +#define ARM_CPU_MASK 0x0000000f /* XXX? */ #ifndef CPU_DEFAULT #if defined __XSCALE__ -#define CPU_DEFAULT (ARM_9 | ARM_ARCH_XSCALE) +#define CPU_DEFAULT (ARM_ARCH_XSCALE) #else #if defined __thumb__ -#define CPU_DEFAULT (ARM_7 | ARM_ARCH_V4T) +#define CPU_DEFAULT (ARM_ARCH_V5T) #else #define CPU_DEFAULT ARM_ALL #endif @@ -97,7 +118,7 @@ #endif #ifndef FPU_DEFAULT -#define FPU_DEFAULT FPU_ALL +#define FPU_DEFAULT FPU_ARCH_FPA #endif #define streq(a, b) (strcmp (a, b) == 0) @@ -601,30 +622,29 @@ static void do_ldst PARAMS ((char *, un static void do_ldmstm PARAMS ((char *, unsigned long)); static void do_branch PARAMS ((char *, unsigned long)); static void do_swi PARAMS ((char *, unsigned long)); + /* Pseudo Op codes. */ static void do_adr PARAMS ((char *, unsigned long)); static void do_nop PARAMS ((char *, unsigned long)); -/* ARM 2. */ + +/* ARM v2. */ static void do_mul PARAMS ((char *, unsigned long)); static void do_mla PARAMS ((char *, unsigned long)); -/* ARM 3. */ + +/* ARM v2S. */ static void do_swap PARAMS ((char *, unsigned long)); -/* ARM 6. */ + +/* ARM v3. */ static void do_msr PARAMS ((char *, unsigned long)); static void do_mrs PARAMS ((char *, unsigned long)); -/* ARM 7M. */ + +/* ARM v3M. */ static void do_mull PARAMS ((char *, unsigned long)); -/* ARM THUMB. */ -static void do_bx PARAMS ((char *, unsigned long)); -/* ARM_EXT_XScale. */ -static void do_mia PARAMS ((char *, unsigned long)); -static void do_mar PARAMS ((char *, unsigned long)); -static void do_mra PARAMS ((char *, unsigned long)); -static void do_pld PARAMS ((char *, unsigned long)); -static void do_ldrd PARAMS ((char *, unsigned long)); +/* ARM v4T. */ +static void do_bx PARAMS ((char *, unsigned long)); -/* ARM_EXT_V5. */ +/* ARM_v5. */ static void do_blx PARAMS ((char *, unsigned long)); static void do_bkpt PARAMS ((char *, unsigned long)); static void do_clz PARAMS ((char *, unsigned long)); @@ -632,28 +652,36 @@ static void do_lstc2 PARAMS ((char *, u static void do_cdp2 PARAMS ((char *, unsigned long)); static void do_co_reg2 PARAMS ((char *, unsigned long)); -static void do_t_blx PARAMS ((char *)); -static void do_t_bkpt PARAMS ((char *)); - -/* ARM_EXT_V5E. */ +/* ARM v5ExP. */ static void do_smla PARAMS ((char *, unsigned long)); static void do_smlal PARAMS ((char *, unsigned long)); static void do_smul PARAMS ((char *, unsigned long)); static void do_qadd PARAMS ((char *, unsigned long)); + +/* ARM v5E. */ +static void do_pld PARAMS ((char *, unsigned long)); +static void do_ldrd PARAMS ((char *, unsigned long)); static void do_co_reg2c PARAMS ((char *, unsigned long)); /* Coprocessor Instructions. */ static void do_cdp PARAMS ((char *, unsigned long)); static void do_lstc PARAMS ((char *, unsigned long)); static void do_co_reg PARAMS ((char *, unsigned long)); -static void do_fp_ctrl PARAMS ((char *, unsigned long)); -static void do_fp_ldst PARAMS ((char *, unsigned long)); -static void do_fp_ldmstm PARAMS ((char *, unsigned long)); -static void do_fp_dyadic PARAMS ((char *, unsigned long)); -static void do_fp_monadic PARAMS ((char *, unsigned long)); -static void do_fp_cmp PARAMS ((char *, unsigned long)); -static void do_fp_from_reg PARAMS ((char *, unsigned long)); -static void do_fp_to_reg PARAMS ((char *, unsigned long)); + +/* FPA instructions. */ +static void do_fpa_ctrl PARAMS ((char *, unsigned long)); +static void do_fpa_ldst PARAMS ((char *, unsigned long)); +static void do_fpa_ldmstm PARAMS ((char *, unsigned long)); +static void do_fpa_dyadic PARAMS ((char *, unsigned long)); +static void do_fpa_monadic PARAMS ((char *, unsigned long)); +static void do_fpa_cmp PARAMS ((char *, unsigned long)); +static void do_fpa_from_reg PARAMS ((char *, unsigned long)); +static void do_fpa_to_reg PARAMS ((char *, unsigned long)); + +/* XScale. */ +static void do_mia PARAMS ((char *, unsigned long)); +static void do_mar PARAMS ((char *, unsigned long)); +static void do_mra PARAMS ((char *, unsigned long)); /* ARM_EXT_MAVERICK. */ static void do_c_binops PARAMS ((char *, unsigned long, int)); @@ -775,134 +803,80 @@ struct asm_opcode static const struct asm_opcode insns[] = { -/* Intel XScale extensions to ARM V5 ISA. */ - {"mia", 0x0e200010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, - {"miaph", 0x0e280010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, - {"miabb", 0x0e2c0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, - {"miabt", 0x0e2d0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, - {"miatb", 0x0e2e0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, - {"miatt", 0x0e2f0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, - {"mar", 0x0c400000, NULL, NULL, ARM_EXT_XSCALE, do_mar}, - {"mra", 0x0c500000, NULL, NULL, ARM_EXT_XSCALE, do_mra}, - {"pld", 0xf450f000, "", NULL, ARM_EXT_XSCALE, do_pld}, - {"ldr", 0x000000d0, NULL, ldr_flags, ARM_ANY, do_ldrd}, - {"str", 0x000000f0, NULL, str_flags, ARM_ANY, do_ldrd}, - -/* ARM Instructions. */ - {"and", 0x00000000, NULL, s_flag, ARM_ANY, do_arit}, - {"eor", 0x00200000, NULL, s_flag, ARM_ANY, do_arit}, - {"sub", 0x00400000, NULL, s_flag, ARM_ANY, do_arit}, - {"rsb", 0x00600000, NULL, s_flag, ARM_ANY, do_arit}, - {"add", 0x00800000, NULL, s_flag, ARM_ANY, do_arit}, - {"adc", 0x00a00000, NULL, s_flag, ARM_ANY, do_arit}, - {"sbc", 0x00c00000, NULL, s_flag, ARM_ANY, do_arit}, - {"rsc", 0x00e00000, NULL, s_flag, ARM_ANY, do_arit}, - {"orr", 0x01800000, NULL, s_flag, ARM_ANY, do_arit}, - {"bic", 0x01c00000, NULL, s_flag, ARM_ANY, do_arit}, - {"tst", 0x01000000, NULL, cmp_flags, ARM_ANY, do_cmp}, - {"teq", 0x01200000, NULL, cmp_flags, ARM_ANY, do_cmp}, - {"cmp", 0x01400000, NULL, cmp_flags, ARM_ANY, do_cmp}, - {"cmn", 0x01600000, NULL, cmp_flags, ARM_ANY, do_cmp}, - {"mov", 0x01a00000, NULL, s_flag, ARM_ANY, do_mov}, - {"mvn", 0x01e00000, NULL, s_flag, ARM_ANY, do_mov}, - {"str", 0x04000000, NULL, str_flags, ARM_ANY, do_ldst}, - {"ldr", 0x04100000, NULL, ldr_flags, ARM_ANY, do_ldst}, - {"stm", 0x08000000, NULL, stm_flags, ARM_ANY, do_ldmstm}, - {"ldm", 0x08100000, NULL, ldm_flags, ARM_ANY, do_ldmstm}, - {"swi", 0x0f000000, NULL, NULL, ARM_ANY, do_swi}, + /* XXX Temporary hack. Override the normal load/store entry points. */ + {"ldr", 0x000000d0, NULL, ldr_flags, ARM_EXT_V1, do_ldrd}, + {"str", 0x000000f0, NULL, str_flags, ARM_EXT_V1, do_ldrd}, + + /* Core ARM Instructions. */ + {"and", 0x00000000, NULL, s_flag, ARM_EXT_V1, do_arit}, + {"eor", 0x00200000, NULL, s_flag, ARM_EXT_V1, do_arit}, + {"sub", 0x00400000, NULL, s_flag, ARM_EXT_V1, do_arit}, + {"rsb", 0x00600000, NULL, s_flag, ARM_EXT_V1, do_arit}, + {"add", 0x00800000, NULL, s_flag, ARM_EXT_V1, do_arit}, + {"adc", 0x00a00000, NULL, s_flag, ARM_EXT_V1, do_arit}, + {"sbc", 0x00c00000, NULL, s_flag, ARM_EXT_V1, do_arit}, + {"rsc", 0x00e00000, NULL, s_flag, ARM_EXT_V1, do_arit}, + {"orr", 0x01800000, NULL, s_flag, ARM_EXT_V1, do_arit}, + {"bic", 0x01c00000, NULL, s_flag, ARM_EXT_V1, do_arit}, + {"tst", 0x01000000, NULL, cmp_flags, ARM_EXT_V1, do_cmp}, + {"teq", 0x01200000, NULL, cmp_flags, ARM_EXT_V1, do_cmp}, + {"cmp", 0x01400000, NULL, cmp_flags, ARM_EXT_V1, do_cmp}, + {"cmn", 0x01600000, NULL, cmp_flags, ARM_EXT_V1, do_cmp}, + {"mov", 0x01a00000, NULL, s_flag, ARM_EXT_V1, do_mov}, + {"mvn", 0x01e00000, NULL, s_flag, ARM_EXT_V1, do_mov}, + {"str", 0x04000000, NULL, str_flags, ARM_EXT_V1, do_ldst}, + {"ldr", 0x04100000, NULL, ldr_flags, ARM_EXT_V1, do_ldst}, + {"stm", 0x08000000, NULL, stm_flags, ARM_EXT_V1, do_ldmstm}, + {"ldm", 0x08100000, NULL, ldm_flags, ARM_EXT_V1, do_ldmstm}, + {"swi", 0x0f000000, NULL, NULL, ARM_EXT_V1, do_swi}, #ifdef TE_WINCE - {"bl", 0x0b000000, NULL, NULL, ARM_ANY, do_branch}, - {"b", 0x0a000000, NULL, NULL, ARM_ANY, do_branch}, + /* XXX This is the wrong place to do this. Think multi-arch. */ + {"bl", 0x0b000000, NULL, NULL, ARM_EXT_V1, do_branch}, + {"b", 0x0a000000, NULL, NULL, ARM_EXT_V1, do_branch}, #else - {"bl", 0x0bfffffe, NULL, NULL, ARM_ANY, do_branch}, - {"b", 0x0afffffe, NULL, NULL, ARM_ANY, do_branch}, + {"bl", 0x0bfffffe, NULL, NULL, ARM_EXT_V1, do_branch}, + {"b", 0x0afffffe, NULL, NULL, ARM_EXT_V1, do_branch}, #endif -/* Pseudo ops. */ - {"adr", 0x028f0000, NULL, long_flag, ARM_ANY, do_adr}, - {"nop", 0x01a00000, NULL, NULL, ARM_ANY, do_nop}, - -/* ARM 2 multiplies. */ - {"mul", 0x00000090, NULL, s_flag, ARM_2UP, do_mul}, - {"mla", 0x00200090, NULL, s_flag, ARM_2UP, do_mla}, - -/* ARM 3 - swp instructions. */ - {"swp", 0x01000090, NULL, byte_flag, ARM_3UP, do_swap}, - -/* ARM 6 Coprocessor instructions. */ - {"mrs", 0x010f0000, NULL, NULL, ARM_6UP, do_mrs}, - {"msr", 0x0120f000, NULL, NULL, ARM_6UP, do_msr}, -/* ScottB: our code uses 0x0128f000 for msr. - NickC: but this is wrong because the bits 16 through 19 are - handled by the PSR_xxx defines above. */ - -/* ARM 7M long multiplies - need signed/unsigned flags! */ - {"smull", 0x00c00090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull}, - {"umull", 0x00800090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull}, - {"smlal", 0x00e00090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull}, - {"umlal", 0x00a00090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull}, - -/* ARM THUMB interworking. */ - {"bx", 0x012fff10, NULL, NULL, ARM_EXT_THUMB, do_bx}, - -/* Floating point instructions. */ - {"wfs", 0x0e200110, NULL, NULL, FPU_ALL, do_fp_ctrl}, - {"rfs", 0x0e300110, NULL, NULL, FPU_ALL, do_fp_ctrl}, - {"wfc", 0x0e400110, NULL, NULL, FPU_ALL, do_fp_ctrl}, - {"rfc", 0x0e500110, NULL, NULL, FPU_ALL, do_fp_ctrl}, - {"ldf", 0x0c100100, "sdep", NULL, FPU_ALL, do_fp_ldst}, - {"stf", 0x0c000100, "sdep", NULL, FPU_ALL, do_fp_ldst}, - {"lfm", 0x0c100200, NULL, lfm_flags, FPU_MEMMULTI, do_fp_ldmstm}, - {"sfm", 0x0c000200, NULL, sfm_flags, FPU_MEMMULTI, do_fp_ldmstm}, - {"mvf", 0x0e008100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"mnf", 0x0e108100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"abs", 0x0e208100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"rnd", 0x0e308100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"sqt", 0x0e408100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"log", 0x0e508100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"lgn", 0x0e608100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"exp", 0x0e708100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"sin", 0x0e808100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"cos", 0x0e908100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"tan", 0x0ea08100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"asn", 0x0eb08100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"acs", 0x0ec08100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"atn", 0x0ed08100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"urd", 0x0ee08100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"nrm", 0x0ef08100, "sde", round_flags, FPU_ALL, do_fp_monadic}, - {"adf", 0x0e000100, "sde", round_flags, FPU_ALL, do_fp_dyadic}, - {"suf", 0x0e200100, "sde", round_flags, FPU_ALL, do_fp_dyadic}, - {"rsf", 0x0e300100, "sde", round_flags, FPU_ALL, do_fp_dyadic}, - {"muf", 0x0e100100, "sde", round_flags, FPU_ALL, do_fp_dyadic}, - {"dvf", 0x0e400100, "sde", round_flags, FPU_ALL, do_fp_dyadic}, - {"rdf", 0x0e500100, "sde", round_flags, FPU_ALL, do_fp_dyadic}, - {"pow", 0x0e600100, "sde", round_flags, FPU_ALL, do_fp_dyadic}, - {"rpw", 0x0e700100, "sde", round_flags, FPU_ALL, do_fp_dyadic}, - {"rmf", 0x0e800100, "sde", round_flags, FPU_ALL, do_fp_dyadic}, - {"fml", 0x0e900100, "sde", round_flags, FPU_ALL, do_fp_dyadic}, - {"fdv", 0x0ea00100, "sde", round_flags, FPU_ALL, do_fp_dyadic}, - {"frd", 0x0eb00100, "sde", round_flags, FPU_ALL, do_fp_dyadic}, - {"pol", 0x0ec00100, "sde", round_flags, FPU_ALL, do_fp_dyadic}, - {"cmf", 0x0e90f110, NULL, except_flag, FPU_ALL, do_fp_cmp}, - {"cnf", 0x0eb0f110, NULL, except_flag, FPU_ALL, do_fp_cmp}, -/* The FPA10 data sheet suggests that the 'E' of cmfe/cnfe should not - be an optional suffix, but part of the instruction. To be compatible, - we accept either. */ - {"cmfe", 0x0ed0f110, NULL, NULL, FPU_ALL, do_fp_cmp}, - {"cnfe", 0x0ef0f110, NULL, NULL, FPU_ALL, do_fp_cmp}, - {"flt", 0x0e000110, "sde", round_flags, FPU_ALL, do_fp_from_reg}, - {"fix", 0x0e100110, NULL, fix_flags, FPU_ALL, do_fp_to_reg}, - -/* Generic copressor instructions. */ - {"cdp", 0x0e000000, NULL, NULL, ARM_2UP, do_cdp}, - {"ldc", 0x0c100000, NULL, long_flag, ARM_2UP, do_lstc}, - {"stc", 0x0c000000, NULL, long_flag, ARM_2UP, do_lstc}, - {"mcr", 0x0e000010, NULL, NULL, ARM_2UP, do_co_reg}, - {"mrc", 0x0e100010, NULL, NULL, ARM_2UP, do_co_reg}, - -/* ARM ISA extension 5. */ -/* Note: blx is actually 2 opcodes, so the .value is set dynamically. - And it's sometimes conditional and sometimes not. */ + /* Pseudo ops. */ + {"adr", 0x028f0000, NULL, long_flag, ARM_EXT_V1, do_adr}, + {"nop", 0x01a00000, NULL, NULL, ARM_EXT_V1, do_nop}, + + /* ARM 2 multiplies. */ + {"mul", 0x00000090, NULL, s_flag, ARM_EXT_V2, do_mul}, + {"mla", 0x00200090, NULL, s_flag, ARM_EXT_V2, do_mla}, + + /* Generic copressor instructions. */ + {"cdp", 0x0e000000, NULL, NULL, ARM_EXT_V2, do_cdp}, + {"ldc", 0x0c100000, NULL, long_flag, ARM_EXT_V2, do_lstc}, + {"stc", 0x0c000000, NULL, long_flag, ARM_EXT_V2, do_lstc}, + {"mcr", 0x0e000010, NULL, NULL, ARM_EXT_V2, do_co_reg}, + {"mrc", 0x0e100010, NULL, NULL, ARM_EXT_V2, do_co_reg}, + + /* ARM 3 - swp instructions. */ + {"swp", 0x01000090, NULL, byte_flag, ARM_EXT_V2S, do_swap}, + + /* ARM 6 Status register instructions. */ + {"mrs", 0x010f0000, NULL, NULL, ARM_EXT_V3, do_mrs}, + {"msr", 0x0120f000, NULL, NULL, ARM_EXT_V3, do_msr}, + /* ScottB: our code uses 0x0128f000 for msr. + NickC: but this is wrong because the bits 16 through 19 are + handled by the PSR_xxx defines above. */ + + /* ARM 7M long multiplies - need signed/unsigned flags! */ + {"smull", 0x00c00090, NULL, s_flag, ARM_EXT_V3M, do_mull}, + {"umull", 0x00800090, NULL, s_flag, ARM_EXT_V3M, do_mull}, + {"smlal", 0x00e00090, NULL, s_flag, ARM_EXT_V3M, do_mull}, + {"umlal", 0x00a00090, NULL, s_flag, ARM_EXT_V3M, do_mull}, + + /* ARM Architecture 4T. */ + /* Note: bx (and blx) are required on V5, even if the processor does + not support Thumb. */ + {"bx", 0x012fff10, NULL, NULL, ARM_EXT_V4T | ARM_EXT_V5, do_bx}, + + /* ARM ISA extension 5. */ + /* Note: blx is actually 2 opcodes, so the .value is set dynamically. + And it's sometimes conditional and sometimes not. */ {"blx", 0, NULL, NULL, ARM_EXT_V5, do_blx}, {"clz", 0x016f0f10, NULL, NULL, ARM_EXT_V5, do_clz}, {"bkpt", 0xe1200070, "", NULL, ARM_EXT_V5, do_bkpt}, @@ -912,36 +886,100 @@ static const struct asm_opcode insns[] = {"mcr2", 0xfe000010, "", NULL, ARM_EXT_V5, do_co_reg2}, {"mrc2", 0xfe100010, "", NULL, ARM_EXT_V5, do_co_reg2}, -/* ARM ISA extension 5E, El Segundo. */ - {"smlabb", 0x01000080, NULL, NULL, ARM_EXT_V5E, do_smla}, - {"smlatb", 0x010000a0, NULL, NULL, ARM_EXT_V5E, do_smla}, - {"smlabt", 0x010000c0, NULL, NULL, ARM_EXT_V5E, do_smla}, - {"smlatt", 0x010000e0, NULL, NULL, ARM_EXT_V5E, do_smla}, - - {"smlawb", 0x01200080, NULL, NULL, ARM_EXT_V5E, do_smla}, - {"smlawt", 0x012000c0, NULL, NULL, ARM_EXT_V5E, do_smla}, - - {"smlalbb",0x01400080, NULL, NULL, ARM_EXT_V5E, do_smlal}, - {"smlaltb",0x014000a0, NULL, NULL, ARM_EXT_V5E, do_smlal}, - {"smlalbt",0x014000c0, NULL, NULL, ARM_EXT_V5E, do_smlal}, - {"smlaltt",0x014000e0, NULL, NULL, ARM_EXT_V5E, do_smlal}, - - {"smulbb", 0x01600080, NULL, NULL, ARM_EXT_V5E, do_smul}, - {"smultb", 0x016000a0, NULL, NULL, ARM_EXT_V5E, do_smul}, - {"smulbt", 0x016000c0, NULL, NULL, ARM_EXT_V5E, do_smul}, - {"smultt", 0x016000e0, NULL, NULL, ARM_EXT_V5E, do_smul}, - - {"smulwb", 0x012000a0, NULL, NULL, ARM_EXT_V5E, do_smul}, - {"smulwt", 0x012000e0, NULL, NULL, ARM_EXT_V5E, do_smul}, - - {"qadd", 0x01000050, NULL, NULL, ARM_EXT_V5E, do_qadd}, - {"qdadd", 0x01400050, NULL, NULL, ARM_EXT_V5E, do_qadd}, - {"qsub", 0x01200050, NULL, NULL, ARM_EXT_V5E, do_qadd}, - {"qdsub", 0x01600050, NULL, NULL, ARM_EXT_V5E, do_qadd}, - +/* ARM Architecture 5ExP. */ + {"smlabb", 0x01000080, NULL, NULL, ARM_EXT_V5ExP, do_smla}, + {"smlatb", 0x010000a0, NULL, NULL, ARM_EXT_V5ExP, do_smla}, + {"smlabt", 0x010000c0, NULL, NULL, ARM_EXT_V5ExP, do_smla}, + {"smlatt", 0x010000e0, NULL, NULL, ARM_EXT_V5ExP, do_smla}, + + {"smlawb", 0x01200080, NULL, NULL, ARM_EXT_V5ExP, do_smla}, + {"smlawt", 0x012000c0, NULL, NULL, ARM_EXT_V5ExP, do_smla}, + + {"smlalbb",0x01400080, NULL, NULL, ARM_EXT_V5ExP, do_smlal}, + {"smlaltb",0x014000a0, NULL, NULL, ARM_EXT_V5ExP, do_smlal}, + {"smlalbt",0x014000c0, NULL, NULL, ARM_EXT_V5ExP, do_smlal}, + {"smlaltt",0x014000e0, NULL, NULL, ARM_EXT_V5ExP, do_smlal}, + + {"smulbb", 0x01600080, NULL, NULL, ARM_EXT_V5ExP, do_smul}, + {"smultb", 0x016000a0, NULL, NULL, ARM_EXT_V5ExP, do_smul}, + {"smulbt", 0x016000c0, NULL, NULL, ARM_EXT_V5ExP, do_smul}, + {"smultt", 0x016000e0, NULL, NULL, ARM_EXT_V5ExP, do_smul}, + + {"smulwb", 0x012000a0, NULL, NULL, ARM_EXT_V5ExP, do_smul}, + {"smulwt", 0x012000e0, NULL, NULL, ARM_EXT_V5ExP, do_smul}, + + {"qadd", 0x01000050, NULL, NULL, ARM_EXT_V5ExP, do_qadd}, + {"qdadd", 0x01400050, NULL, NULL, ARM_EXT_V5ExP, do_qadd}, + {"qsub", 0x01200050, NULL, NULL, ARM_EXT_V5ExP, do_qadd}, + {"qdsub", 0x01600050, NULL, NULL, ARM_EXT_V5ExP, do_qadd}, + + /* ARM Architecture 5E. */ + {"pld", 0xf450f000, "", NULL, ARM_EXT_V5E, do_pld}, + {"ldr", 0x000000d0, NULL, ldr_flags, ARM_EXT_V5E, do_ldrd}, + {"str", 0x000000f0, NULL, str_flags, ARM_EXT_V5E, do_ldrd}, {"mcrr", 0x0c400000, NULL, NULL, ARM_EXT_V5E, do_co_reg2c}, {"mrrc", 0x0c500000, NULL, NULL, ARM_EXT_V5E, do_co_reg2c}, + /* Core FPA instruction set (V1). */ + {"wfs", 0x0e200110, NULL, NULL, FPU_FPA_EXT_V1, do_fpa_ctrl}, + {"rfs", 0x0e300110, NULL, NULL, FPU_FPA_EXT_V1, do_fpa_ctrl}, + {"wfc", 0x0e400110, NULL, NULL, FPU_FPA_EXT_V1, do_fpa_ctrl}, + {"rfc", 0x0e500110, NULL, NULL, FPU_FPA_EXT_V1, do_fpa_ctrl}, + {"ldf", 0x0c100100, "sdep", NULL, FPU_FPA_EXT_V1, do_fpa_ldst}, + {"stf", 0x0c000100, "sdep", NULL, FPU_FPA_EXT_V1, do_fpa_ldst}, + {"mvf", 0x0e008100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"mnf", 0x0e108100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"abs", 0x0e208100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"rnd", 0x0e308100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"sqt", 0x0e408100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"log", 0x0e508100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"lgn", 0x0e608100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"exp", 0x0e708100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"sin", 0x0e808100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"cos", 0x0e908100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"tan", 0x0ea08100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"asn", 0x0eb08100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"acs", 0x0ec08100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"atn", 0x0ed08100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"urd", 0x0ee08100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"nrm", 0x0ef08100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_monadic}, + {"adf", 0x0e000100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_dyadic}, + {"suf", 0x0e200100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_dyadic}, + {"rsf", 0x0e300100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_dyadic}, + {"muf", 0x0e100100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_dyadic}, + {"dvf", 0x0e400100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_dyadic}, + {"rdf", 0x0e500100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_dyadic}, + {"pow", 0x0e600100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_dyadic}, + {"rpw", 0x0e700100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_dyadic}, + {"rmf", 0x0e800100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_dyadic}, + {"fml", 0x0e900100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_dyadic}, + {"fdv", 0x0ea00100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_dyadic}, + {"frd", 0x0eb00100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_dyadic}, + {"pol", 0x0ec00100, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_dyadic}, + {"cmf", 0x0e90f110, NULL, except_flag, FPU_FPA_EXT_V1, do_fpa_cmp}, + {"cnf", 0x0eb0f110, NULL, except_flag, FPU_FPA_EXT_V1, do_fpa_cmp}, + /* The FPA10 data sheet suggests that the 'E' of cmfe/cnfe should not + be an optional suffix, but part of the instruction. To be compatible, + we accept either. */ + {"cmfe", 0x0ed0f110, NULL, NULL, FPU_FPA_EXT_V1, do_fpa_cmp}, + {"cnfe", 0x0ef0f110, NULL, NULL, FPU_FPA_EXT_V1, do_fpa_cmp}, + {"flt", 0x0e000110, "sde", round_flags, FPU_FPA_EXT_V1, do_fpa_from_reg}, + {"fix", 0x0e100110, NULL, fix_flags, FPU_FPA_EXT_V1, do_fpa_to_reg}, + + /* Instructions that were new with the real FPA, call them V2. */ + {"lfm", 0x0c100200, NULL, lfm_flags, FPU_FPA_EXT_V2, do_fpa_ldmstm}, + {"sfm", 0x0c000200, NULL, sfm_flags, FPU_FPA_EXT_V2, do_fpa_ldmstm}, + + /* Intel XScale extensions to ARM V5 ISA. (All use CP0). */ + {"mia", 0x0e200010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"miaph", 0x0e280010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"miabb", 0x0e2c0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"miabt", 0x0e2d0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"miatb", 0x0e2e0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"miatt", 0x0e2f0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"mar", 0x0c400000, NULL, NULL, ARM_EXT_XSCALE, do_mar}, + {"mra", 0x0c500000, NULL, NULL, ARM_EXT_XSCALE, do_mra}, + /* Cirrus DSP instructions. */ {"cfldrs", 0x0c100400, NULL, NULL, ARM_EXT_MAVERICK, do_c_ldst_1}, {"cfldrd", 0x0c500400, NULL, NULL, ARM_EXT_MAVERICK, do_c_ldst_2}, @@ -1054,6 +1092,7 @@ static const struct asm_opcode insns[] = #define OPCODE_BIC 14 #define OPCODE_MVN 15 +/* Thumb v1 (ARMv4T). */ static void do_t_nop PARAMS ((char *)); static void do_t_arit PARAMS ((char *)); static void do_t_add PARAMS ((char *)); @@ -1079,6 +1118,10 @@ static void do_t_sub PARAMS ((char *)); static void do_t_swi PARAMS ((char *)); static void do_t_adr PARAMS ((char *)); +/* Thumb v2 (ARMv5T). */ +static void do_t_blx PARAMS ((char *)); +static void do_t_bkpt PARAMS ((char *)); + #define T_OPCODE_MUL 0x4340 #define T_OPCODE_TST 0x4200 #define T_OPCODE_CMN 0x42c0 @@ -1177,66 +1220,68 @@ struct thumb_opcode static const struct thumb_opcode tinsns[] = { - {"adc", 0x4140, 2, ARM_EXT_THUMB, do_t_arit}, - {"add", 0x0000, 2, ARM_EXT_THUMB, do_t_add}, - {"and", 0x4000, 2, ARM_EXT_THUMB, do_t_arit}, - {"asr", 0x0000, 2, ARM_EXT_THUMB, do_t_asr}, - {"b", T_OPCODE_BRANCH, 2, ARM_EXT_THUMB, do_t_branch12}, - {"beq", 0xd0fe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"bne", 0xd1fe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"bcs", 0xd2fe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"bhs", 0xd2fe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"bcc", 0xd3fe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"bul", 0xd3fe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"blo", 0xd3fe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"bmi", 0xd4fe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"bpl", 0xd5fe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"bvs", 0xd6fe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"bvc", 0xd7fe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"bhi", 0xd8fe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"bls", 0xd9fe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"bge", 0xdafe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"blt", 0xdbfe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"bgt", 0xdcfe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"ble", 0xddfe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"bal", 0xdefe, 2, ARM_EXT_THUMB, do_t_branch9}, - {"bic", 0x4380, 2, ARM_EXT_THUMB, do_t_arit}, - {"bl", 0xf7fffffe, 4, ARM_EXT_THUMB, do_t_branch23}, - {"blx", 0, 0, ARM_EXT_V5, do_t_blx}, - {"bkpt", 0xbe00, 2, ARM_EXT_V5, do_t_bkpt}, - {"bx", 0x4700, 2, ARM_EXT_THUMB, do_t_bx}, - {"cmn", T_OPCODE_CMN, 2, ARM_EXT_THUMB, do_t_arit}, - {"cmp", 0x0000, 2, ARM_EXT_THUMB, do_t_compare}, - {"eor", 0x4040, 2, ARM_EXT_THUMB, do_t_arit}, - {"ldmia", 0xc800, 2, ARM_EXT_THUMB, do_t_ldmstm}, - {"ldr", 0x0000, 2, ARM_EXT_THUMB, do_t_ldr}, - {"ldrb", 0x0000, 2, ARM_EXT_THUMB, do_t_ldrb}, - {"ldrh", 0x0000, 2, ARM_EXT_THUMB, do_t_ldrh}, - {"ldrsb", 0x5600, 2, ARM_EXT_THUMB, do_t_lds}, - {"ldrsh", 0x5e00, 2, ARM_EXT_THUMB, do_t_lds}, - {"ldsb", 0x5600, 2, ARM_EXT_THUMB, do_t_lds}, - {"ldsh", 0x5e00, 2, ARM_EXT_THUMB, do_t_lds}, - {"lsl", 0x0000, 2, ARM_EXT_THUMB, do_t_lsl}, - {"lsr", 0x0000, 2, ARM_EXT_THUMB, do_t_lsr}, - {"mov", 0x0000, 2, ARM_EXT_THUMB, do_t_mov}, - {"mul", T_OPCODE_MUL, 2, ARM_EXT_THUMB, do_t_arit}, - {"mvn", T_OPCODE_MVN, 2, ARM_EXT_THUMB, do_t_arit}, - {"neg", T_OPCODE_NEG, 2, ARM_EXT_THUMB, do_t_arit}, - {"orr", 0x4300, 2, ARM_EXT_THUMB, do_t_arit}, - {"pop", 0xbc00, 2, ARM_EXT_THUMB, do_t_push_pop}, - {"push", 0xb400, 2, ARM_EXT_THUMB, do_t_push_pop}, - {"ror", 0x41c0, 2, ARM_EXT_THUMB, do_t_arit}, - {"sbc", 0x4180, 2, ARM_EXT_THUMB, do_t_arit}, - {"stmia", 0xc000, 2, ARM_EXT_THUMB, do_t_ldmstm}, - {"str", 0x0000, 2, ARM_EXT_THUMB, do_t_str}, - {"strb", 0x0000, 2, ARM_EXT_THUMB, do_t_strb}, - {"strh", 0x0000, 2, ARM_EXT_THUMB, do_t_strh}, - {"swi", 0xdf00, 2, ARM_EXT_THUMB, do_t_swi}, - {"sub", 0x0000, 2, ARM_EXT_THUMB, do_t_sub}, - {"tst", T_OPCODE_TST, 2, ARM_EXT_THUMB, do_t_arit}, + /* Thumb v1 (ARMv4T). */ + {"adc", 0x4140, 2, ARM_EXT_V4T, do_t_arit}, + {"add", 0x0000, 2, ARM_EXT_V4T, do_t_add}, + {"and", 0x4000, 2, ARM_EXT_V4T, do_t_arit}, + {"asr", 0x0000, 2, ARM_EXT_V4T, do_t_asr}, + {"b", T_OPCODE_BRANCH, 2, ARM_EXT_V4T, do_t_branch12}, + {"beq", 0xd0fe, 2, ARM_EXT_V4T, do_t_branch9}, + {"bne", 0xd1fe, 2, ARM_EXT_V4T, do_t_branch9}, + {"bcs", 0xd2fe, 2, ARM_EXT_V4T, do_t_branch9}, + {"bhs", 0xd2fe, 2, ARM_EXT_V4T, do_t_branch9}, + {"bcc", 0xd3fe, 2, ARM_EXT_V4T, do_t_branch9}, + {"bul", 0xd3fe, 2, ARM_EXT_V4T, do_t_branch9}, + {"blo", 0xd3fe, 2, ARM_EXT_V4T, do_t_branch9}, + {"bmi", 0xd4fe, 2, ARM_EXT_V4T, do_t_branch9}, + {"bpl", 0xd5fe, 2, ARM_EXT_V4T, do_t_branch9}, + {"bvs", 0xd6fe, 2, ARM_EXT_V4T, do_t_branch9}, + {"bvc", 0xd7fe, 2, ARM_EXT_V4T, do_t_branch9}, + {"bhi", 0xd8fe, 2, ARM_EXT_V4T, do_t_branch9}, + {"bls", 0xd9fe, 2, ARM_EXT_V4T, do_t_branch9}, + {"bge", 0xdafe, 2, ARM_EXT_V4T, do_t_branch9}, + {"blt", 0xdbfe, 2, ARM_EXT_V4T, do_t_branch9}, + {"bgt", 0xdcfe, 2, ARM_EXT_V4T, do_t_branch9}, + {"ble", 0xddfe, 2, ARM_EXT_V4T, do_t_branch9}, + {"bal", 0xdefe, 2, ARM_EXT_V4T, do_t_branch9}, + {"bic", 0x4380, 2, ARM_EXT_V4T, do_t_arit}, + {"bl", 0xf7fffffe, 4, ARM_EXT_V4T, do_t_branch23}, + {"bx", 0x4700, 2, ARM_EXT_V4T, do_t_bx}, + {"cmn", T_OPCODE_CMN, 2, ARM_EXT_V4T, do_t_arit}, + {"cmp", 0x0000, 2, ARM_EXT_V4T, do_t_compare}, + {"eor", 0x4040, 2, ARM_EXT_V4T, do_t_arit}, + {"ldmia", 0xc800, 2, ARM_EXT_V4T, do_t_ldmstm}, + {"ldr", 0x0000, 2, ARM_EXT_V4T, do_t_ldr}, + {"ldrb", 0x0000, 2, ARM_EXT_V4T, do_t_ldrb}, + {"ldrh", 0x0000, 2, ARM_EXT_V4T, do_t_ldrh}, + {"ldrsb", 0x5600, 2, ARM_EXT_V4T, do_t_lds}, + {"ldrsh", 0x5e00, 2, ARM_EXT_V4T, do_t_lds}, + {"ldsb", 0x5600, 2, ARM_EXT_V4T, do_t_lds}, + {"ldsh", 0x5e00, 2, ARM_EXT_V4T, do_t_lds}, + {"lsl", 0x0000, 2, ARM_EXT_V4T, do_t_lsl}, + {"lsr", 0x0000, 2, ARM_EXT_V4T, do_t_lsr}, + {"mov", 0x0000, 2, ARM_EXT_V4T, do_t_mov}, + {"mul", T_OPCODE_MUL, 2, ARM_EXT_V4T, do_t_arit}, + {"mvn", T_OPCODE_MVN, 2, ARM_EXT_V4T, do_t_arit}, + {"neg", T_OPCODE_NEG, 2, ARM_EXT_V4T, do_t_arit}, + {"orr", 0x4300, 2, ARM_EXT_V4T, do_t_arit}, + {"pop", 0xbc00, 2, ARM_EXT_V4T, do_t_push_pop}, + {"push", 0xb400, 2, ARM_EXT_V4T, do_t_push_pop}, + {"ror", 0x41c0, 2, ARM_EXT_V4T, do_t_arit}, + {"sbc", 0x4180, 2, ARM_EXT_V4T, do_t_arit}, + {"stmia", 0xc000, 2, ARM_EXT_V4T, do_t_ldmstm}, + {"str", 0x0000, 2, ARM_EXT_V4T, do_t_str}, + {"strb", 0x0000, 2, ARM_EXT_V4T, do_t_strb}, + {"strh", 0x0000, 2, ARM_EXT_V4T, do_t_strh}, + {"swi", 0xdf00, 2, ARM_EXT_V4T, do_t_swi}, + {"sub", 0x0000, 2, ARM_EXT_V4T, do_t_sub}, + {"tst", T_OPCODE_TST, 2, ARM_EXT_V4T, do_t_arit}, /* Pseudo ops: */ - {"adr", 0x0000, 2, ARM_EXT_THUMB, do_t_adr}, - {"nop", 0x46C0, 2, ARM_EXT_THUMB, do_t_nop}, /* mov r8,r8 */ + {"adr", 0x0000, 2, ARM_EXT_V4T, do_t_adr}, + {"nop", 0x46C0, 2, ARM_EXT_V4T, do_t_nop}, /* mov r8,r8 */ + /* Thumb v2 (ARMv5T). */ + {"blx", 0, 0, ARM_EXT_V5T, do_t_blx}, + {"bkpt", 0xbe00, 2, ARM_EXT_V5T, do_t_bkpt}, }; struct reg_entry @@ -1259,9 +1304,9 @@ struct reg_entry #define cirrus_mvax_register(reg) ((reg) >= 130 && (reg) <= 133) #define ARM_EXT_MAVERICKsc_register(reg) ((reg) == ARM_EXT_MAVERICKSC_REG) -#define REG_PC 15 -#define REG_LR 14 #define REG_SP 13 +#define REG_LR 14 +#define REG_PC 15 /* These are the standard names. Users can add aliases with .req. */ static const struct reg_entry reg_table[] = @@ -1886,7 +1931,7 @@ opcode_select (width) case 16: if (! thumb_mode) { - if (! (cpu_variant & ARM_EXT_THUMB)) + if (! (cpu_variant & ARM_EXT_V4T)) as_bad (_("selected processor does not support THUMB opcodes")); thumb_mode = 1; @@ -1899,7 +1944,7 @@ opcode_select (width) case 32: if (thumb_mode) { - if ((cpu_variant & ARM_ANY) == ARM_EXT_THUMB) + if ((cpu_variant & ARM_ANY) == ARM_EXT_V4T) as_bad (_("selected processor does not support ARM opcodes")); thumb_mode = 0; @@ -3558,7 +3603,7 @@ do_mra (str, flags) end_of_line (str); } -/* Xscale: Preload-Cache +/* ARMv5TE: Preload-Cache PLD @@ -3646,7 +3691,7 @@ do_pld (str, flags) end_of_line (str); } -/* Xscale load-consecutive (argument parse) +/* ARMv5TE load-consecutive (argument parse) Mode is like LDRH. LDRccD R, mode @@ -4433,7 +4478,7 @@ do_ldst (str, flags) { /* This is actually a load/store of a halfword, or a signed-extension load. */ - if ((cpu_variant & ARM_EXT_HALFWORD) == 0) + if ((cpu_variant & ARM_EXT_V4) == 0) { inst.error = _("Processor does not support halfwords or signed bytes"); @@ -5151,7 +5196,7 @@ do_co_reg (str, flags) } static void -do_fp_ctrl (str, flags) +do_fpa_ctrl (str, flags) char * str; unsigned long flags ATTRIBUTE_UNUSED; { @@ -5172,7 +5217,7 @@ do_fp_ctrl (str, flags) } static void -do_fp_ldst (str, flags) +do_fpa_ldst (str, flags) char * str; unsigned long flags ATTRIBUTE_UNUSED; { @@ -5214,7 +5259,7 @@ do_fp_ldst (str, flags) } static void -do_fp_ldmstm (str, flags) +do_fpa_ldmstm (str, flags) char * str; unsigned long flags; { @@ -5354,7 +5399,7 @@ do_fp_ldmstm (str, flags) } static void -do_fp_dyadic (str, flags) +do_fpa_dyadic (str, flags) char * str; unsigned long flags; { @@ -5403,7 +5448,7 @@ do_fp_dyadic (str, flags) } static void -do_fp_monadic (str, flags) +do_fpa_monadic (str, flags) char * str; unsigned long flags; { @@ -5444,7 +5489,7 @@ do_fp_monadic (str, flags) } static void -do_fp_cmp (str, flags) +do_fpa_cmp (str, flags) char * str; unsigned long flags; { @@ -5471,7 +5516,7 @@ do_fp_cmp (str, flags) } static void -do_fp_from_reg (str, flags) +do_fpa_from_reg (str, flags) char * str; unsigned long flags; { @@ -5512,7 +5557,7 @@ do_fp_from_reg (str, flags) } static void -do_fp_to_reg (str, flags) +do_fpa_to_reg (str, flags) char * str; unsigned long flags; { @@ -7221,7 +7266,7 @@ md_begin () if (support_interwork) flags |= F_INTERWORK; if (uses_apcs_float) flags |= F_APCS_FLOAT; if (pic_code) flags |= F_PIC; - if ((cpu_variant & FPU_ALL) == FPU_NONE) flags |= F_SOFT_FLOAT; + if ((cpu_variant & FPU_ANY) == FPU_NONE) flags |= F_SOFT_FLOAT; bfd_set_private_flags (stdoutput, flags); @@ -7256,14 +7301,14 @@ md_begin () mach = bfd_mach_arm_2a; break; + case ARM_6: /* Also ARM_7. */ + mach = bfd_mach_arm_3; + break; + default: - case ARM_6 | ARM_3 | ARM_2: /* Actually no CPU type defined. */ mach = bfd_mach_arm_4; break; - case ARM_7: /* Also ARM_6. */ - mach = bfd_mach_arm_3; - break; } /* Catch special cases. */ @@ -7273,19 +7318,19 @@ md_begin () mach = bfd_mach_arm_5TE; else if (cpu_variant & ARM_EXT_V5) { - if (cpu_variant & ARM_EXT_THUMB) + if (cpu_variant & ARM_EXT_V4T) mach = bfd_mach_arm_5T; else mach = bfd_mach_arm_5; } - else if (cpu_variant & ARM_EXT_HALFWORD) + else if (cpu_variant & ARM_EXT_V4) { - if (cpu_variant & ARM_EXT_THUMB) + if (cpu_variant & ARM_EXT_V4T) mach = bfd_mach_arm_4T; else mach = bfd_mach_arm_4; } - else if (cpu_variant & ARM_EXT_LONGMUL) + else if (cpu_variant & ARM_EXT_V3M) mach = bfd_mach_arm_3M; bfd_set_arch_mach (stdoutput, TARGET_ARCH, mach); @@ -7536,13 +7581,13 @@ arm_reg_parse (ccp) return FAIL; } -int -md_apply_fix3 (fixP, val, seg) +void +md_apply_fix3 (fixP, valP, seg) fixS * fixP; - valueT * val; + valueT * valP; segT seg; { - offsetT value = * val; + offsetT value = * valP; offsetT newval; unsigned int newimm; unsigned long temp; @@ -7802,7 +7847,7 @@ md_apply_fix3 (fixP, val, seg) && S_GET_SEGMENT (fixP->fx_addsy) == seg) { /* Get pc relative value to go into the branch. */ - value = * val; + value = * valP; /* Permit a backward branch provided that enough bits are set. Allow a forwards branch, provided that @@ -8138,15 +8183,13 @@ md_apply_fix3 (fixP, val, seg) case BFD_RELOC_VTABLE_INHERIT: case BFD_RELOC_VTABLE_ENTRY: fixP->fx_done = 0; - return 1; + return; case BFD_RELOC_NONE: default: as_bad_where (fixP->fx_file, fixP->fx_line, _("Bad relocation fixup type (%d)"), fixP->fx_r_type); } - - return 1; } /* Translate internal representation of relocation info to BFD target @@ -8707,19 +8750,17 @@ md_parse_option (c, arg) switch (*str) { case 'f': - if (streq (str, "fpa10")) - cpu_variant = (cpu_variant & ~FPU_ALL) | FPU_FPA10; - else if (streq (str, "fpa11")) - cpu_variant = (cpu_variant & ~FPU_ALL) | FPU_FPA11; + if (streq (str, "fpa10") || streq (str, "fpa11")) + cpu_variant = (cpu_variant & ~FPU_ANY) | FPU_ARCH_FPA; else if (streq (str, "fpe-old")) - cpu_variant = (cpu_variant & ~FPU_ALL) | FPU_CORE; + cpu_variant = (cpu_variant & ~FPU_ANY) | FPU_ARCH_FPE; else goto bad; break; case 'n': if (streq (str, "no-fpu")) - cpu_variant &= ~FPU_ALL; + cpu_variant &= ~FPU_ANY; break; #ifdef OBJ_ELF @@ -8733,13 +8774,13 @@ md_parse_option (c, arg) /* Limit assembler to generating only Thumb instructions: */ if (streq (str, "thumb")) { - cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_EXT_THUMB; - cpu_variant = (cpu_variant & ~FPU_ALL) | FPU_NONE; + cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_EXT_V4T; + cpu_variant = (cpu_variant & ~FPU_ANY) | FPU_NONE; thumb_mode = 1; } else if (streq (str, "thumb-interwork")) { - if ((cpu_variant & ARM_EXT_THUMB) == 0) + if ((cpu_variant & ARM_EXT_V4T) == 0) cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_ARCH_V4T; #if defined OBJ_COFF || defined OBJ_ELF support_interwork = true; @@ -8752,7 +8793,7 @@ md_parse_option (c, arg) default: if (streq (str, "all")) { - cpu_variant = ARM_ALL | FPU_ALL; + cpu_variant = ARM_ALL | FPU_DEFAULT; return 1; } #if defined OBJ_COFF || defined OBJ_ELF @@ -8886,7 +8927,7 @@ md_parse_option (c, arg) break; case 'm': - cpu_variant |= ARM_EXT_LONGMUL; + cpu_variant |= ARM_EXT_V3M; break; case 'f': /* fe => fp enabled cpu. */ @@ -8977,7 +9018,7 @@ md_parse_option (c, arg) switch (*++str) { - case 'm': cpu_variant |= ARM_EXT_LONGMUL; break; + case 'm': cpu_variant |= ARM_EXT_V3M; break; case 0: break; default: as_bad (_("Invalid architecture variant -m%s"), arg); @@ -8990,7 +9031,7 @@ md_parse_option (c, arg) switch (*++str) { - case 't': cpu_variant |= ARM_EXT_THUMB; break; + case 't': cpu_variant |= ARM_EXT_V4T; break; case 0: break; default: as_bad (_("Invalid architecture variant -m%s"), arg); @@ -9002,7 +9043,7 @@ md_parse_option (c, arg) cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_9 | ARM_ARCH_V5; switch (*++str) { - case 't': cpu_variant |= ARM_EXT_THUMB; break; + case 't': cpu_variant |= ARM_EXT_V4T; break; case 'e': cpu_variant |= ARM_EXT_V5E; break; case 0: break; default: diff -uprN binutils-2.11.92.0.10/gas/config/tc-arm.h binutils-2.11.92.0.12/gas/config/tc-arm.h --- binutils-2.11.92.0.10/gas/config/tc-arm.h Sat May 12 00:06:29 2001 +++ binutils-2.11.92.0.12/gas/config/tc-arm.h Fri Nov 16 14:05:52 2001 @@ -171,10 +171,6 @@ void armelf_frob_symbol PARAMS ((symbolS #define md_operand(x) -#define TC_HANDLES_FX_DONE - -#define MD_APPLY_FIX3 - #define LOCAL_LABEL(name) (name[0] == '.' && (name[1] == 'L')) #define LOCAL_LABELS_FB 1 #ifdef OBJ_ELF diff -uprN binutils-2.11.92.0.10/gas/config/tc-avr.c binutils-2.11.92.0.12/gas/config/tc-avr.c --- binutils-2.11.92.0.10/gas/config/tc-avr.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-avr.c Wed Nov 21 15:35:32 2001 @@ -55,37 +55,49 @@ struct mcu_type_s int mach; }; +/* XXX - devices that don't seem to exist (renamed, replaced with larger + ones, or planned but never produced), left here for compatibility. + TODO: hide them in show_mcu_list output? */ + static struct mcu_type_s mcu_types[] = { {"avr1", AVR_ISA_TINY1, bfd_mach_avr1}, {"avr2", AVR_ISA_2xxx, bfd_mach_avr2}, {"avr3", AVR_ISA_M103, bfd_mach_avr3}, - {"avr4", AVR_ISA_M83, bfd_mach_avr4}, + {"avr4", AVR_ISA_M8, bfd_mach_avr4}, {"avr5", AVR_ISA_ALL, bfd_mach_avr5}, {"at90s1200", AVR_ISA_1200, bfd_mach_avr1}, - {"attiny10", AVR_ISA_TINY1, bfd_mach_avr1}, + {"attiny10", AVR_ISA_TINY1, bfd_mach_avr1}, /* XXX -> tn11 */ {"attiny11", AVR_ISA_TINY1, bfd_mach_avr1}, {"attiny12", AVR_ISA_TINY1, bfd_mach_avr1}, {"attiny15", AVR_ISA_TINY1, bfd_mach_avr1}, {"attiny28", AVR_ISA_TINY1, bfd_mach_avr1}, {"at90s2313", AVR_ISA_2xxx, bfd_mach_avr2}, {"at90s2323", AVR_ISA_2xxx, bfd_mach_avr2}, - {"at90s2333", AVR_ISA_2xxx, bfd_mach_avr2}, + {"at90s2333", AVR_ISA_2xxx, bfd_mach_avr2}, /* XXX -> 4433 */ {"attiny22" , AVR_ISA_2xxx, bfd_mach_avr2}, {"at90s2343", AVR_ISA_2xxx, bfd_mach_avr2}, {"at90s4433", AVR_ISA_2xxx, bfd_mach_avr2}, - {"at90s4414", AVR_ISA_2xxx, bfd_mach_avr2}, - {"at90s4434", AVR_ISA_2xxx, bfd_mach_avr2}, + {"at90s4414", AVR_ISA_2xxx, bfd_mach_avr2}, /* XXX -> 8515 */ + {"at90s4434", AVR_ISA_2xxx, bfd_mach_avr2}, /* XXX -> 8535 */ {"at90s8515", AVR_ISA_2xxx, bfd_mach_avr2}, {"at90s8535", AVR_ISA_2xxx, bfd_mach_avr2}, {"at90c8534", AVR_ISA_2xxx, bfd_mach_avr2}, - {"atmega603", AVR_ISA_M603, bfd_mach_avr3}, + {"atmega603", AVR_ISA_M603, bfd_mach_avr3}, /* XXX -> m103 */ {"atmega103", AVR_ISA_M103, bfd_mach_avr3}, - {"atmega83", AVR_ISA_M83, bfd_mach_avr4}, - {"atmega85", AVR_ISA_M83, bfd_mach_avr4}, + {"at43usb320",AVR_ISA_M103, bfd_mach_avr3}, + {"at76c711", AVR_ISA_M603, bfd_mach_avr3}, + {"atmega8", AVR_ISA_M8, bfd_mach_avr4}, + {"atmega83", AVR_ISA_M8, bfd_mach_avr4}, /* XXX -> m163 */ + {"atmega85", AVR_ISA_M8, bfd_mach_avr4}, /* XXX -> m8 */ + {"atmega16", AVR_ISA_M323, bfd_mach_avr5}, {"atmega161", AVR_ISA_M161, bfd_mach_avr5}, {"atmega163", AVR_ISA_M161, bfd_mach_avr5}, - {"atmega32", AVR_ISA_M161, bfd_mach_avr5}, + {"atmega32", AVR_ISA_M323, bfd_mach_avr5}, + {"atmega323", AVR_ISA_M323, bfd_mach_avr5}, + {"atmega64", AVR_ISA_M323, bfd_mach_avr5}, + {"atmega128", AVR_ISA_M128, bfd_mach_avr5}, + {"at43usb355",AVR_ISA_94K, bfd_mach_avr5}, {"at94k", AVR_ISA_94K, bfd_mach_avr5}, {NULL, 0, 0} }; @@ -807,57 +819,53 @@ md_pcrel_from_section (fixp, sec) /* GAS will call this for each fixup. It should store the correct value in the object file. */ -int -md_apply_fix3 (fixp, valuep, seg) - fixS *fixp; - valueT *valuep; +void +md_apply_fix3 (fixP, valP, seg) + fixS *fixP; + valueT * valP; segT seg; { unsigned char *where; unsigned long insn; - long value; + long value = * (long *) valP; - if (fixp->fx_addsy == (symbolS *) NULL) - { - value = *valuep; - fixp->fx_done = 1; - } - else if (fixp->fx_pcrel) + if (fixP->fx_addsy == (symbolS *) NULL) + fixP->fx_done = 1; + + else if (fixP->fx_pcrel) { - segT s = S_GET_SEGMENT (fixp->fx_addsy); + segT s = S_GET_SEGMENT (fixP->fx_addsy); - if (fixp->fx_addsy && (s == seg || s == absolute_section)) + if (fixP->fx_addsy && (s == seg || s == absolute_section)) { - value = S_GET_VALUE (fixp->fx_addsy) + *valuep; - fixp->fx_done = 1; + value += S_GET_VALUE (fixP->fx_addsy); + fixP->fx_done = 1; } - else - value = *valuep; } else { - value = fixp->fx_offset; + value = fixP->fx_offset; - if (fixp->fx_subsy != (symbolS *) NULL) + if (fixP->fx_subsy != (symbolS *) NULL) { - if (S_GET_SEGMENT (fixp->fx_subsy) == absolute_section) + if (S_GET_SEGMENT (fixP->fx_subsy) == absolute_section) { - value -= S_GET_VALUE (fixp->fx_subsy); - fixp->fx_done = 1; + value -= S_GET_VALUE (fixP->fx_subsy); + fixP->fx_done = 1; } else { /* We don't actually support subtracting a symbol. */ - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("expression too complex")); } } } - switch (fixp->fx_r_type) + switch (fixP->fx_r_type) { default: - fixp->fx_no_overflow = 1; + fixP->fx_no_overflow = 1; break; case BFD_RELOC_AVR_7_PCREL: case BFD_RELOC_AVR_13_PCREL: @@ -867,18 +875,18 @@ md_apply_fix3 (fixp, valuep, seg) break; } - if (fixp->fx_done) + if (fixP->fx_done) { /* Fetch the instruction, insert the fully resolved operand value, and stuff the instruction back again. */ - where = fixp->fx_frag->fr_literal + fixp->fx_where; + where = fixP->fx_frag->fr_literal + fixP->fx_where; insn = bfd_getl16 (where); - switch (fixp->fx_r_type) + switch (fixP->fx_r_type) { case BFD_RELOC_AVR_7_PCREL: if (value & 1) - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("odd address operand: %ld"), value); /* Instruction addresses are always right-shifted by 1. */ @@ -886,7 +894,7 @@ md_apply_fix3 (fixp, valuep, seg) --value; /* Correct PC. */ if (value < -64 || value > 63) - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("operand out of range: %ld"), value); value = (value << 3) & 0x3f8; bfd_putl16 ((bfd_vma) (value | insn), where); @@ -894,7 +902,7 @@ md_apply_fix3 (fixp, valuep, seg) case BFD_RELOC_AVR_13_PCREL: if (value & 1) - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("odd address operand: %ld"), value); /* Instruction addresses are always right-shifted by 1. */ @@ -905,7 +913,7 @@ md_apply_fix3 (fixp, valuep, seg) { /* No wrap for devices with >8K of program memory. */ if ((avr_mcu->isa & AVR_ISA_MEGA) || avr_opt.no_wrap) - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("operand out of range: %ld"), value); } @@ -995,7 +1003,7 @@ md_apply_fix3 (fixp, valuep, seg) x = bfd_getl16 (where); if (value & 1) - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("odd address operand: %ld"), value); value >>= 1; x |= ((value & 0x10000) | ((value << 3) & 0x1f00000)) >> 16; @@ -1006,28 +1014,27 @@ md_apply_fix3 (fixp, valuep, seg) default: as_fatal (_("line %d: unknown relocation type: 0x%x"), - fixp->fx_line, fixp->fx_r_type); + fixP->fx_line, fixP->fx_r_type); break; } } else { - switch (fixp->fx_r_type) + switch (fixP->fx_r_type) { case -BFD_RELOC_AVR_HI8_LDI_NEG: case -BFD_RELOC_AVR_HI8_LDI: case -BFD_RELOC_AVR_LO8_LDI_NEG: case -BFD_RELOC_AVR_LO8_LDI: - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("only constant expression allowed")); - fixp->fx_done = 1; + fixP->fx_done = 1; break; default: break; } - fixp->fx_addnumber = value; + fixP->fx_addnumber = value; } - return 0; } /* A `BFD_ASSEMBLER' GAS will call this to generate a reloc. GAS diff -uprN binutils-2.11.92.0.10/gas/config/tc-avr.h binutils-2.11.92.0.12/gas/config/tc-avr.h --- binutils-2.11.92.0.10/gas/config/tc-avr.h Fri Mar 9 11:16:52 2001 +++ binutils-2.11.92.0.12/gas/config/tc-avr.h Fri Nov 16 14:05:52 2001 @@ -1,5 +1,5 @@ /* This file is tc-avr.h - Copyright 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Denis Chertykov @@ -90,10 +90,6 @@ void avr_cons_fix_new(fragS *frag,int wh `md_create_short_jump' to create a short jump around a long jump, and define `md_create_long_jump' to create a long jump. */ -#define MD_APPLY_FIX3 - -#define TC_HANDLES_FX_DONE - #undef RELOC_EXPANSION_POSSIBLE /* If you define this macro, it means that `tc_gen_reloc' may return multiple relocation entries for a single fixup. In this case, the diff -uprN binutils-2.11.92.0.10/gas/config/tc-cris.c binutils-2.11.92.0.12/gas/config/tc-cris.c --- binutils-2.11.92.0.10/gas/config/tc-cris.c Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/config/tc-cris.c Wed Nov 21 15:35:32 2001 @@ -2972,14 +2972,16 @@ md_show_usage (stream) /* Apply a fixS (fixup of an instruction or data that we didn't have enough info to complete immediately) to the data in a frag. */ -int +void md_apply_fix3 (fixP, valP, seg) fixS *fixP; valueT *valP; segT seg; { - long val = *valP; - + /* This assignment truncates upper bits if valueT is 64 bits (as with + --enable-64-bit-bfd), which is fine here, though we cast to avoid + any compiler warnings. */ + long val = (long) *valP; char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; if (fixP->fx_addsy == 0 && !fixP->fx_pcrel) @@ -2999,17 +3001,13 @@ md_apply_fix3 (fixP, valP, seg) if (S_GET_SEGMENT (fixP->fx_subsy) == absolute_section) val -= S_GET_VALUE (fixP->fx_subsy); else - { - /* We can't actually support subtracting a symbol. */ - as_bad_where (fixP->fx_file, fixP->fx_line, - _("expression too complex")); - } + /* We can't actually support subtracting a symbol. */ + as_bad_where (fixP->fx_file, fixP->fx_line, + _("expression too complex")); } cris_number_to_imm (buf, val, fixP->fx_size, fixP, seg); } - - return 1; } /* All relocations are relative to the location just after the fixup; diff -uprN binutils-2.11.92.0.10/gas/config/tc-cris.h binutils-2.11.92.0.12/gas/config/tc-cris.h --- binutils-2.11.92.0.10/gas/config/tc-cris.h Thu Mar 29 17:36:03 2001 +++ binutils-2.11.92.0.12/gas/config/tc-cris.h Fri Nov 16 14:05:52 2001 @@ -75,13 +75,9 @@ extern const int md_long_jump_size; extern const struct relax_type md_cris_relax_table[]; #define TC_GENERIC_RELAX_TABLE md_cris_relax_table -#define TC_HANDLES_FX_DONE - #define TC_FORCE_RELOCATION(fixp) md_cris_force_relocation (fixp) extern int md_cris_force_relocation PARAMS ((struct fix *)); -#define MD_APPLY_FIX3 - #define IS_CRIS_PIC_RELOC(X) \ ((X) == BFD_RELOC_CRIS_16_GOT \ || (X) == BFD_RELOC_CRIS_32_GOT \ diff -uprN binutils-2.11.92.0.10/gas/config/tc-d10v.c binutils-2.11.92.0.12/gas/config/tc-d10v.c --- binutils-2.11.92.0.10/gas/config/tc-d10v.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-d10v.c Fri Nov 16 14:05:52 2001 @@ -1528,67 +1528,67 @@ md_pcrel_from_section (fixp, sec) return fixp->fx_frag->fr_address + fixp->fx_where; } -int -md_apply_fix3 (fixp, valuep, seg) - fixS *fixp; - valueT *valuep; +void +md_apply_fix3 (fixP, valP, seg) + fixS *fixP; + valueT * valP; segT seg ATTRIBUTE_UNUSED; { char *where; unsigned long insn; - long value; + long value = * (long *) valP; int op_type; int left = 0; - if (fixp->fx_addsy == (symbolS *) NULL) - { - value = *valuep; - fixp->fx_done = 1; - } - else if (fixp->fx_pcrel) - value = *valuep; + if (fixP->fx_addsy == (symbolS *) NULL) + fixP->fx_done = 1; + + else if (fixP->fx_pcrel) + ; + else { - value = fixp->fx_offset; - if (fixp->fx_subsy != (symbolS *) NULL) + value = fixP->fx_offset; + + if (fixP->fx_subsy != (symbolS *) NULL) { - if (S_GET_SEGMENT (fixp->fx_subsy) == absolute_section) - value -= S_GET_VALUE (fixp->fx_subsy); + if (S_GET_SEGMENT (fixP->fx_subsy) == absolute_section) + value -= S_GET_VALUE (fixP->fx_subsy); else { /* We don't actually support subtracting a symbol. */ - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("expression too complex")); } } } - op_type = fixp->fx_r_type; + op_type = fixP->fx_r_type; if (op_type & 2048) { op_type -= 2048; if (op_type & 1024) { op_type -= 1024; - fixp->fx_r_type = BFD_RELOC_D10V_10_PCREL_L; + fixP->fx_r_type = BFD_RELOC_D10V_10_PCREL_L; left = 1; } else if (op_type & 4096) { op_type -= 4096; - fixp->fx_r_type = BFD_RELOC_D10V_18; + fixP->fx_r_type = BFD_RELOC_D10V_18; } else - fixp->fx_r_type = + fixP->fx_r_type = get_reloc ((struct d10v_operand *) &d10v_operands[op_type]); } /* Fetch the instruction, insert the fully resolved operand value, and stuff the instruction back again. */ - where = fixp->fx_frag->fr_literal + fixp->fx_where; + where = fixP->fx_frag->fr_literal + fixP->fx_where; insn = bfd_getb32 ((unsigned char *) where); - switch (fixp->fx_r_type) + switch (fixP->fx_r_type) { case BFD_RELOC_D10V_10_PCREL_L: case BFD_RELOC_D10V_10_PCREL_R: @@ -1596,7 +1596,7 @@ md_apply_fix3 (fixp, valuep, seg) case BFD_RELOC_D10V_18: /* Instruction addresses are always right-shifted by 2. */ value >>= AT_WORD_RIGHT_SHIFT; - if (fixp->fx_size == 2) + if (fixP->fx_size == 2) bfd_putb16 ((bfd_vma) value, (unsigned char *) where); else { @@ -1610,9 +1610,9 @@ md_apply_fix3 (fixp, valuep, seg) && value < 4) as_fatal (_("line %d: rep or repi must include at least 4 instructions"), - fixp->fx_line); + fixP->fx_line); insn = - d10v_insert_operand (insn, op_type, (offsetT) value, left, fixp); + d10v_insert_operand (insn, op_type, (offsetT) value, left, fixP); bfd_putb32 ((bfd_vma) insn, (unsigned char *) where); } break; @@ -1625,14 +1625,13 @@ md_apply_fix3 (fixp, valuep, seg) case BFD_RELOC_VTABLE_INHERIT: case BFD_RELOC_VTABLE_ENTRY: - fixp->fx_done = 0; - return 1; + fixP->fx_done = 0; + return; default: as_fatal (_("line %d: unknown relocation type: 0x%x"), - fixp->fx_line, fixp->fx_r_type); + fixP->fx_line, fixP->fx_r_type); } - return 0; } /* d10v_cleanup() is called after the assembler has finished parsing diff -uprN binutils-2.11.92.0.10/gas/config/tc-d10v.h binutils-2.11.92.0.12/gas/config/tc-d10v.h --- binutils-2.11.92.0.10/gas/config/tc-d10v.h Thu Jul 26 18:02:55 2001 +++ binutils-2.11.92.0.12/gas/config/tc-d10v.h Fri Nov 16 14:05:52 2001 @@ -1,5 +1,5 @@ /* tc-d10v.h -- Header file for tc-d10v.c. - Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. Written by Martin Hunt, Cygnus Support. This file is part of GAS, the GNU Assembler. @@ -34,9 +34,7 @@ #define TARGET_FORMAT "elf32-d10v" -#define MD_APPLY_FIX3 - -/* call md_pcrel_from_section, not md_pcrel_from */ +/* Call md_pcrel_from_section, not md_pcrel_from. */ #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC) long md_pcrel_from_section PARAMS ((fixS *, segT)); diff -uprN binutils-2.11.92.0.10/gas/config/tc-d30v.c binutils-2.11.92.0.12/gas/config/tc-d30v.c --- binutils-2.11.92.0.10/gas/config/tc-d30v.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-d30v.c Fri Nov 16 14:05:52 2001 @@ -1833,73 +1833,70 @@ md_pcrel_from_section (fixp, sec) return fixp->fx_frag->fr_address + fixp->fx_where; } -int -md_apply_fix3 (fixp, valuep, seg) - fixS *fixp; - valueT *valuep; +void +md_apply_fix3 (fixP, valP, seg) + fixS *fixP; + valueT * valP; segT seg; { char *where; unsigned long insn, insn2; - long value; + long value = * (long *) valP; + + if (fixP->fx_addsy == (symbolS *) NULL) + fixP->fx_done = 1; + + else if (fixP->fx_pcrel) + ; - if (fixp->fx_addsy == (symbolS *) NULL) - { - value = *valuep; - fixp->fx_done = 1; - } - else if (fixp->fx_pcrel) - value = *valuep; else { - value = fixp->fx_offset; + value = fixP->fx_offset; - if (fixp->fx_subsy != (symbolS *) NULL) + if (fixP->fx_subsy != (symbolS *) NULL) { - if (S_GET_SEGMENT (fixp->fx_subsy) == absolute_section) - value -= S_GET_VALUE (fixp->fx_subsy); + if (S_GET_SEGMENT (fixP->fx_subsy) == absolute_section) + value -= S_GET_VALUE (fixP->fx_subsy); else - { - /* We don't actually support subtracting a symbol. */ - as_bad_where (fixp->fx_file, fixp->fx_line, - _("expression too complex")); - } + /* We don't actually support subtracting a symbol. */ + as_bad_where (fixP->fx_file, fixP->fx_line, + _("expression too complex")); } } /* Fetch the instruction, insert the fully resolved operand value, and stuff the instruction back again. */ - where = fixp->fx_frag->fr_literal + fixp->fx_where; + where = fixP->fx_frag->fr_literal + fixP->fx_where; insn = bfd_getb32 ((unsigned char *) where); - switch (fixp->fx_r_type) + switch (fixP->fx_r_type) { case BFD_RELOC_8: /* Check for a bad .byte directive. */ - if (fixp->fx_addsy != NULL) + if (fixP->fx_addsy != NULL) as_bad (_("line %d: unable to place address of symbol '%s' into a byte"), - fixp->fx_line, S_GET_NAME (fixp->fx_addsy)); + fixP->fx_line, S_GET_NAME (fixP->fx_addsy)); else if (((unsigned)value) > 0xff) as_bad (_("line %d: unable to place value %x into a byte"), - fixp->fx_line, value); + fixP->fx_line, value); else *(unsigned char *) where = value; break; case BFD_RELOC_16: /* Check for a bad .short directive. */ - if (fixp->fx_addsy != NULL) + if (fixP->fx_addsy != NULL) as_bad (_("line %d: unable to place address of symbol '%s' into a short"), - fixp->fx_line, S_GET_NAME (fixp->fx_addsy)); + fixP->fx_line, S_GET_NAME (fixP->fx_addsy)); else if (((unsigned)value) > 0xffff) as_bad (_("line %d: unable to place value %x into a short"), - fixp->fx_line, value); + fixP->fx_line, value); else bfd_putb16 ((bfd_vma) value, (unsigned char *) where); break; case BFD_RELOC_64: /* Check for a bad .quad directive. */ - if (fixp->fx_addsy != NULL) + if (fixP->fx_addsy != NULL) as_bad (_("line %d: unable to place address of symbol '%s' into a quad"), - fixp->fx_line, S_GET_NAME (fixp->fx_addsy)); + fixP->fx_line, S_GET_NAME (fixP->fx_addsy)); else { bfd_putb32 ((bfd_vma) value, (unsigned char *) where); @@ -1908,58 +1905,58 @@ md_apply_fix3 (fixp, valuep, seg) break; case BFD_RELOC_D30V_6: - check_size (value, 6, fixp->fx_file, fixp->fx_line); + check_size (value, 6, fixP->fx_file, fixP->fx_line); insn |= value & 0x3F; bfd_putb32 ((bfd_vma) insn, (unsigned char *) where); break; case BFD_RELOC_D30V_9_PCREL: - if (fixp->fx_where & 0x7) + if (fixP->fx_where & 0x7) { - if (fixp->fx_done) + if (fixP->fx_done) value += 4; else - fixp->fx_r_type = BFD_RELOC_D30V_9_PCREL_R; + fixP->fx_r_type = BFD_RELOC_D30V_9_PCREL_R; } - check_size (value, 9, fixp->fx_file, fixp->fx_line); + check_size (value, 9, fixP->fx_file, fixP->fx_line); insn |= ((value >> 3) & 0x3F) << 12; bfd_putb32 ((bfd_vma) insn, (unsigned char *) where); break; case BFD_RELOC_D30V_15: - check_size (value, 15, fixp->fx_file, fixp->fx_line); + check_size (value, 15, fixP->fx_file, fixP->fx_line); insn |= (value >> 3) & 0xFFF; bfd_putb32 ((bfd_vma) insn, (unsigned char *) where); break; case BFD_RELOC_D30V_15_PCREL: - if (fixp->fx_where & 0x7) + if (fixP->fx_where & 0x7) { - if (fixp->fx_done) + if (fixP->fx_done) value += 4; else - fixp->fx_r_type = BFD_RELOC_D30V_15_PCREL_R; + fixP->fx_r_type = BFD_RELOC_D30V_15_PCREL_R; } - check_size (value, 15, fixp->fx_file, fixp->fx_line); + check_size (value, 15, fixP->fx_file, fixP->fx_line); insn |= (value >> 3) & 0xFFF; bfd_putb32 ((bfd_vma) insn, (unsigned char *) where); break; case BFD_RELOC_D30V_21: - check_size (value, 21, fixp->fx_file, fixp->fx_line); + check_size (value, 21, fixP->fx_file, fixP->fx_line); insn |= (value >> 3) & 0x3FFFF; bfd_putb32 ((bfd_vma) insn, (unsigned char *) where); break; case BFD_RELOC_D30V_21_PCREL: - if (fixp->fx_where & 0x7) + if (fixP->fx_where & 0x7) { - if (fixp->fx_done) + if (fixP->fx_done) value += 4; else - fixp->fx_r_type = BFD_RELOC_D30V_21_PCREL_R; + fixP->fx_r_type = BFD_RELOC_D30V_21_PCREL_R; } - check_size (value, 21, fixp->fx_file, fixp->fx_line); + check_size (value, 21, fixP->fx_file, fixP->fx_line); insn |= (value >> 3) & 0x3FFFF; bfd_putb32 ((bfd_vma) insn, (unsigned char *) where); break; @@ -1988,10 +1985,8 @@ md_apply_fix3 (fixp, valuep, seg) default: as_bad (_("line %d: unknown relocation type: 0x%x"), - fixp->fx_line, fixp->fx_r_type); + fixP->fx_line, fixP->fx_r_type); } - - return 0; } /* Called after the assembler has finished parsing the input file or diff -uprN binutils-2.11.92.0.10/gas/config/tc-d30v.h binutils-2.11.92.0.12/gas/config/tc-d30v.h --- binutils-2.11.92.0.10/gas/config/tc-d30v.h Fri Mar 9 11:16:53 2001 +++ binutils-2.11.92.0.12/gas/config/tc-d30v.h Fri Nov 16 14:05:52 2001 @@ -1,5 +1,5 @@ /* tc-310v.h -- Header file for tc-d30v.c. - Copyright 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright 1997, 1998, 2000, 2001 Free Software Foundation, Inc. Written by Martin Hunt, Cygnus Support. This file is part of GAS, the GNU Assembler. @@ -34,10 +34,7 @@ #define md_operand(x) -#define MD_APPLY_FIX3 - -/* call md_pcrel_from_section, not md_pcrel_from */ - +/* Call md_pcrel_from_section, not md_pcrel_from. */ extern long md_pcrel_from_section PARAMS ((fixS *fixp, segT sec)); #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC) diff -uprN binutils-2.11.92.0.10/gas/config/tc-fr30.h binutils-2.11.92.0.12/gas/config/tc-fr30.h --- binutils-2.11.92.0.10/gas/config/tc-fr30.h Fri Mar 9 11:16:53 2001 +++ binutils-2.11.92.0.12/gas/config/tc-fr30.h Fri Nov 16 14:05:52 2001 @@ -1,5 +1,5 @@ /* tc-fr30.h -- Header file for tc-fr30.c. - Copyright 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -46,7 +46,6 @@ long md_pcrel_from_section PARAMS ((stru /* We don't need to handle .word strangely. */ #define WORKING_DOT_WORD -#define MD_APPLY_FIX3 #define md_apply_fix3 gas_cgen_md_apply_fix3 #define obj_fix_adjustable(fixP) fr30_fix_adjustable (fixP) @@ -56,8 +55,6 @@ extern boolean fr30_fix_adjustable PARAM #define TC_FORCE_RELOCATION(fix) fr30_force_relocation (fix) extern int fr30_force_relocation PARAMS ((struct fix *)); -#define TC_HANDLES_FX_DONE - #define tc_gen_reloc gas_cgen_tc_gen_reloc /* Call md_pcrel_from_section(), not md_pcrel_from(). */ diff -uprN binutils-2.11.92.0.10/gas/config/tc-h8300.c binutils-2.11.92.0.12/gas/config/tc-h8300.c --- binutils-2.11.92.0.10/gas/config/tc-h8300.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-h8300.c Fri Nov 16 14:05:52 2001 @@ -1488,22 +1488,14 @@ md_section_align (seg, size) #endif -#ifdef BFD_ASSEMBLER -int -md_apply_fix (fixP, valp) - fixS *fixP; - valueT *valp; -#else void -md_apply_fix (fixP, val) +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - long val; -#endif + valueT *valP; + segT seg ATTRIBUTE_UNUSED; { char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; -#ifdef BFD_ASSEMBLER - long val = *valp; -#endif + long val = * (long *) valP; switch (fixP->fx_size) { @@ -1523,6 +1515,9 @@ md_apply_fix (fixP, val) default: abort (); } + + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } int diff -uprN binutils-2.11.92.0.10/gas/config/tc-h8500.c binutils-2.11.92.0.12/gas/config/tc-h8500.c --- binutils-2.11.92.0.10/gas/config/tc-h8500.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-h8500.c Fri Nov 16 14:05:52 2001 @@ -1372,20 +1372,19 @@ md_section_align (seg, size) } void -md_apply_fix (fixP, val) +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - long val; + valueT * valP; + segT seg ATTRIBUTE_UNUSED; { + long val = * (long *) valP; char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; if (fixP->fx_r_type == 0) - { - fixP->fx_r_type = fixP->fx_size == 4 ? R_H8500_IMM32 : R_H8500_IMM16; - } + fixP->fx_r_type = fixP->fx_size == 4 ? R_H8500_IMM32 : R_H8500_IMM16; switch (fixP->fx_r_type) { - case R_H8500_IMM8: case R_H8500_PCREL8: *buf++ = val; @@ -1416,14 +1415,15 @@ md_apply_fix (fixP, val) break; default: abort (); - } + + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } -/* -called just before address relaxation, return the length -by which a fragment must grow to reach it's destination -*/ +/* Called just before address relaxation, return the length + by which a fragment must grow to reach it's destination. */ + int md_estimate_size_before_relax (fragP, segment_type) register fragS *fragP; diff -uprN binutils-2.11.92.0.10/gas/config/tc-hppa.c binutils-2.11.92.0.12/gas/config/tc-hppa.c --- binutils-2.11.92.0.10/gas/config/tc-hppa.c Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/config/tc-hppa.c Fri Nov 16 14:05:52 2001 @@ -1158,7 +1158,7 @@ static struct default_space_dict pa_def_ } \ } -/* Variant of CHECK_FIELD for use in md_apply_fix and other places where +/* Variant of CHECK_FIELD for use in md_apply_fix3 and other places where the current file and line number are not valid. */ #define CHECK_FIELD_WHERE(FIELD, HIGH, LOW, FILENAME, LINE) \ @@ -4403,16 +4403,20 @@ md_undefined_symbol (name) /* Apply a fixup to an instruction. */ -int -md_apply_fix (fixP, valp) +void +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - valueT *valp; + valueT *valP; + segT seg ATTRIBUTE_UNUSED; { unsigned char *buf; struct hppa_fix_struct *hppa_fixP; offsetT new_val; int insn, val, fmt; + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; + /* SOM uses R_HPPA_ENTRY and R_HPPA_EXIT relocations which can never be "applied" (they are just markers). Likewise for R_HPPA_BEGIN_BRTAB and R_HPPA_END_BRTAB. */ @@ -4422,21 +4426,21 @@ md_apply_fix (fixP, valp) || fixP->fx_r_type == R_HPPA_BEGIN_BRTAB || fixP->fx_r_type == R_HPPA_END_BRTAB || fixP->fx_r_type == R_HPPA_BEGIN_TRY) - return 1; + return; /* Disgusting. We must set fx_offset ourselves -- R_HPPA_END_TRY fixups are considered not adjustable, which in turn causes adjust_reloc_syms to not set fx_offset. Ugh. */ if (fixP->fx_r_type == R_HPPA_END_TRY) { - fixP->fx_offset = *valp; - return 1; + fixP->fx_offset = * valP; + return; } #endif #ifdef OBJ_ELF if (fixP->fx_r_type == (int) R_PARISC_GNU_VTENTRY || fixP->fx_r_type == (int) R_PARISC_GNU_VTINHERIT) - return 1; + return; #endif /* There should have been an HPPA specific fixup associated @@ -4447,7 +4451,7 @@ md_apply_fix (fixP, valp) as_bad_where (fixP->fx_file, fixP->fx_line, _("no hppa_fixup entry for fixup type 0x%x"), fixP->fx_r_type); - return 0; + return; } buf = fixP->fx_frag->fr_literal + fixP->fx_where; @@ -4479,11 +4483,11 @@ md_apply_fix (fixP, valp) else if (fmt == 32 && fixP->fx_addsy != NULL && S_GET_SEGMENT (fixP->fx_addsy) != bfd_com_section_ptr) - new_val = hppa_field_adjust (*valp - S_GET_VALUE (fixP->fx_addsy), + new_val = hppa_field_adjust (* valP - S_GET_VALUE (fixP->fx_addsy), 0, hppa_fixP->fx_r_field); #endif else - new_val = hppa_field_adjust (*valp, 0, hppa_fixP->fx_r_field); + new_val = hppa_field_adjust (* valP, 0, hppa_fixP->fx_r_field); /* Handle pc-relative exceptions from above. */ if ((fmt == 12 || fmt == 17 || fmt == 22) @@ -4492,13 +4496,13 @@ md_apply_fix (fixP, valp) && !arg_reloc_stub_needed (symbol_arg_reloc_info (fixP->fx_addsy), hppa_fixP->fx_arg_reloc) #ifdef OBJ_ELF - && (*valp - 8 + 8192 < 16384 - || (fmt == 17 && *valp - 8 + 262144 < 524288) - || (fmt == 22 && *valp - 8 + 8388608 < 16777216)) + && (* valP - 8 + 8192 < 16384 + || (fmt == 17 && * valP - 8 + 262144 < 524288) + || (fmt == 22 && * valP - 8 + 8388608 < 16777216)) #endif #ifdef OBJ_SOM - && (*valp - 8 + 262144 < 524288 - || (fmt == 22 && *valp - 8 + 8388608 < 16777216)) + && (* valP - 8 + 262144 < 524288 + || (fmt == 22 && * valP - 8 + 8388608 < 16777216)) #endif && !S_IS_EXTERNAL (fixP->fx_addsy) && !S_IS_WEAK (fixP->fx_addsy) @@ -4506,7 +4510,7 @@ md_apply_fix (fixP, valp) && !(fixP->fx_subsy && S_GET_SEGMENT (fixP->fx_subsy) != hppa_fixP->segment)) { - new_val = hppa_field_adjust (*valp, 0, hppa_fixP->fx_r_field); + new_val = hppa_field_adjust (* valP, 0, hppa_fixP->fx_r_field); } switch (fmt) @@ -4566,7 +4570,7 @@ md_apply_fix (fixP, valp) /* Handle some of the opcodes with the 'W' operand type. */ case 17: { - offsetT distance = *valp; + offsetT distance = * valP; /* If this is an absolute branch (ie no link) with an out of range target, then we want to complain. */ @@ -4585,7 +4589,7 @@ md_apply_fix (fixP, valp) case 22: { - offsetT distance = *valp; + offsetT distance = * valP; /* If this is an absolute branch (ie no link) with an out of range target, then we want to complain. */ @@ -4624,12 +4628,11 @@ md_apply_fix (fixP, valp) default: as_bad_where (fixP->fx_file, fixP->fx_line, _("Unknown relocation encountered in md_apply_fix.")); - return 0; + return; } /* Insert the relocation. */ bfd_put_32 (stdoutput, insn, buf); - return 1; } /* Exactly what point is a PC-relative offset relative TO? diff -uprN binutils-2.11.92.0.10/gas/config/tc-i370.c binutils-2.11.92.0.12/gas/config/tc-i370.c --- binutils-2.11.92.0.10/gas/config/tc-i370.c Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/config/tc-i370.c Fri Nov 16 14:05:52 2001 @@ -2321,7 +2321,7 @@ md_assemble (str) BFD_RELOC_UNUSED plus the operand index. This lets us easily handle fixups for any operand type, although that is admittedly not a very exciting feature. We pick a BFD reloc type in - md_apply_fix. */ + md_apply_fix3. */ for (i = 0; i < fc; i++) { const struct i370_operand *operand; @@ -2713,24 +2713,23 @@ md_pcrel_from_section (fixp, sec) going on here ... */ -int -md_apply_fix3 (fixp, valuep, seg) - fixS *fixp; - valueT *valuep; +void +md_apply_fix3 (fixP, valP, seg) + fixS *fixP; + valueT * valP; segT seg; { - valueT value; + valueT value = * valP; - value = *valuep; - if (fixp->fx_addsy != NULL) + if (fixP->fx_addsy != NULL) { /* Notes: - Branches to labels will come in here with fixp->fx_pcrel set to 1 - and fixp->fx_subsy not null, and holding the value of the base + Branches to labels will come in here with fixP->fx_pcrel set to 1 + and fixP->fx_subsy not null, and holding the value of the base (i.e. the value of the .using). These we want to ignore. 'Strong' and 'weak' symbols will come in here with - fixp->fx_pcrel==0, fixp->fx_addsy defined, and + fixP->fx_pcrel==0, fixP->fx_addsy defined, and *valuep holding the value of the symbol. 'Strong' symbols will have S_GET_VALUE(fx_addsy) equal to zero, @@ -2748,70 +2747,69 @@ md_apply_fix3 (fixp, valuep, seg) subsy will hold the base address (i.e. the .using address). */ - if (fixp->fx_addsy->sy_used_in_reloc - && S_GET_SEGMENT (fixp->fx_addsy) != absolute_section - && S_GET_SEGMENT (fixp->fx_addsy) != undefined_section - && ! bfd_is_com_section (S_GET_SEGMENT (fixp->fx_addsy))) - value -= S_GET_VALUE (fixp->fx_addsy); + if (fixP->fx_addsy->sy_used_in_reloc + && S_GET_SEGMENT (fixP->fx_addsy) != absolute_section + && S_GET_SEGMENT (fixP->fx_addsy) != undefined_section + && ! bfd_is_com_section (S_GET_SEGMENT (fixP->fx_addsy))) + value -= S_GET_VALUE (fixP->fx_addsy); #ifdef DEBUG printf ("\nmd_apply_fix3: symbol %s at 0x%x (%s:%d) val=0x%x addend=0x%x\n", - S_GET_NAME (fixp->fx_addsy), - fixp->fx_frag->fr_address + fixp->fx_where, - fixp->fx_file, fixp->fx_line, - S_GET_VALUE (fixp->fx_addsy), value); + S_GET_NAME (fixP->fx_addsy), + fixP->fx_frag->fr_address + fixP->fx_where, + fixP->fx_file, fixP->fx_line, + S_GET_VALUE (fixP->fx_addsy), value); #endif } else { - fixp->fx_done = 1; - return 1; + fixP->fx_done = 1; + return; } /* Apply fixups to operands. Note that there should be no relocations for any operands, since no instruction ever takes an operand that requires reloc. */ - if ((int) fixp->fx_r_type >= (int) BFD_RELOC_UNUSED) + if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED) { int opindex; const struct i370_operand *operand; char *where; i370_insn_t insn; - opindex = (int) fixp->fx_r_type - (int) BFD_RELOC_UNUSED; + opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED; operand = &i370_operands[opindex]; #ifdef DEBUG printf ("\nmd_apply_fix3: fixup operand %s at 0x%x in %s:%d addend=0x%x\n", operand->name, - fixp->fx_frag->fr_address + fixp->fx_where, - fixp->fx_file, fixp->fx_line, + fixP->fx_frag->fr_address + fixP->fx_where, + fixP->fx_file, fixP->fx_line, value); #endif /* Fetch the instruction, insert the fully resolved operand value, and stuff the instruction back again. fisxp->fx_size is the length of the instruction. */ - where = fixp->fx_frag->fr_literal + fixp->fx_where; + where = fixP->fx_frag->fr_literal + fixP->fx_where; insn.i[0] = bfd_getb32 ((unsigned char *) where); - if (6 <= fixp->fx_size) - { /* deal with 48-bit insn's */ - insn.i[1] = bfd_getb32 (((unsigned char *) where)+4); - } + + if (6 <= fixP->fx_size) + /* Deal with 48-bit insn's. */ + insn.i[1] = bfd_getb32 (((unsigned char *) where)+4); + insn = i370_insert_operand (insn, operand, (offsetT) value); bfd_putb32 ((bfd_vma) insn.i[0], (unsigned char *) where); - if (6 <= fixp->fx_size) - { /* deal with 48-bit insn's */ - bfd_putb32 ((bfd_vma) insn.i[1], (((unsigned char *) where)+4)); - } - /* we are done, right? right !! */ - fixp->fx_done = 1; - if (fixp->fx_done) - { - /* Nothing else to do here. */ - return 1; - } + if (6 <= fixP->fx_size) + /* Deal with 48-bit insn's. */ + bfd_putb32 ((bfd_vma) insn.i[1], (((unsigned char *) where)+4)); + + /* We are done, right? right !! */ + fixP->fx_done = 1; + if (fixP->fx_done) + /* Nothing else to do here. */ + return; /* Determine a BFD reloc value based on the operand information. We are only prepared to turn a few of the operands into @@ -2823,7 +2821,7 @@ md_apply_fix3 (fixp, valuep, seg) if ((operand->flags & I370_OPERAND_RELATIVE) != 0 && operand->bits == 12 && operand->shift == 0) - fixp->fx_r_type = BFD_RELOC_I370_D12; + fixP->fx_r_type = BFD_RELOC_I370_D12; else #endif { @@ -2832,61 +2830,60 @@ md_apply_fix3 (fixp, valuep, seg) /* Use expr_symbol_where to see if this is an expression symbol. */ - if (expr_symbol_where (fixp->fx_addsy, &sfile, &sline)) - as_bad_where (fixp->fx_file, fixp->fx_line, + if (expr_symbol_where (fixP->fx_addsy, &sfile, &sline)) + as_bad_where (fixP->fx_file, fixP->fx_line, "unresolved expression that must be resolved"); else - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, "unsupported relocation type"); - fixp->fx_done = 1; - return 1; + fixP->fx_done = 1; + return; } } else { /* We branch to here if the fixup is not to a symbol that - * appears in an instruction operand, but is rather some - * declared storage. - */ + appears in an instruction operand, but is rather some + declared storage. */ #ifdef OBJ_ELF - i370_elf_validate_fix (fixp, seg); + i370_elf_validate_fix (fixP, seg); #endif #ifdef DEBUG printf ("md_apply_fix3: reloc case %d in segment %s %s:%d\n", - fixp->fx_r_type, segment_name (seg), fixp->fx_file, fixp->fx_line); + fixP->fx_r_type, segment_name (seg), fixP->fx_file, fixP->fx_line); printf ("\tcurrent fixup value is 0x%x \n", value); #endif - switch (fixp->fx_r_type) + switch (fixP->fx_r_type) { case BFD_RELOC_32: case BFD_RELOC_CTOR: - if (fixp->fx_pcrel) - fixp->fx_r_type = BFD_RELOC_32_PCREL; - /* fall through */ + if (fixP->fx_pcrel) + fixP->fx_r_type = BFD_RELOC_32_PCREL; + /* Fall through. */ case BFD_RELOC_RVA: case BFD_RELOC_32_PCREL: case BFD_RELOC_32_BASEREL: #ifdef DEBUG printf ("\t32 bit relocation at 0x%x\n", - fixp->fx_frag->fr_address + fixp->fx_where); + fixP->fx_frag->fr_address + fixP->fx_where); #endif - md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, value, 4); break; case BFD_RELOC_LO16: case BFD_RELOC_16: - if (fixp->fx_pcrel) - as_bad_where (fixp->fx_file, fixp->fx_line, + if (fixP->fx_pcrel) + as_bad_where (fixP->fx_file, fixP->fx_line, "cannot emit PC relative %s relocation%s%s", - bfd_get_reloc_code_name (fixp->fx_r_type), - fixp->fx_addsy != NULL ? " against " : "", - (fixp->fx_addsy != NULL - ? S_GET_NAME (fixp->fx_addsy) + bfd_get_reloc_code_name (fixP->fx_r_type), + fixP->fx_addsy != NULL ? " against " : "", + (fixP->fx_addsy != NULL + ? S_GET_NAME (fixP->fx_addsy) : "")); - md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, value, 2); break; @@ -2894,37 +2891,35 @@ md_apply_fix3 (fixp, valuep, seg) lis %r3,(L1-L2)@ha where L1 and L2 are defined later. */ case BFD_RELOC_HI16: - if (fixp->fx_pcrel) + if (fixP->fx_pcrel) abort (); - md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, value >> 16, 2); break; case BFD_RELOC_HI16_S: - if (fixp->fx_pcrel) + if (fixP->fx_pcrel) abort (); - md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, (value + 0x8000) >> 16, 2); break; case BFD_RELOC_8: - if (fixp->fx_pcrel) + if (fixP->fx_pcrel) abort (); - md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, value, 1); break; default: fprintf (stderr, - "Gas failure, reloc value %d\n", fixp->fx_r_type); + "Gas failure, reloc value %d\n", fixP->fx_r_type); fflush (stderr); abort (); } } - fixp->fx_addnumber = value; - - return 1; + fixP->fx_addnumber = value; } /* Generate a reloc for a fixup. */ diff -uprN binutils-2.11.92.0.10/gas/config/tc-i370.h binutils-2.11.92.0.12/gas/config/tc-i370.h --- binutils-2.11.92.0.10/gas/config/tc-i370.h Fri Mar 9 11:38:15 2001 +++ binutils-2.11.92.0.12/gas/config/tc-i370.h Fri Nov 16 14:05:52 2001 @@ -1,5 +1,5 @@ /* tc-i370.h -- Header file for tc-i370.c. - Copyright 1994, 1995, 1996, 1997, 1998, 2000 + Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. @@ -60,45 +60,7 @@ extern int target_big_endian; /* We don't need to handle .word strangely. */ #define WORKING_DOT_WORD -/* We set the fx_done field appropriately in md_apply_fix. */ -#define TC_HANDLES_FX_DONE - - -#ifdef OBJ_ELF - -/* Branch prediction relocations must force relocation. */ -#define TC_FORCE_RELOCATION_SECTION(FIXP,SEC) 1 - -/* Support for SHF_EXCLUDE and SHT_ORDERED */ -extern int i370_section_letter PARAMS ((int, char **)); -extern int i370_section_type PARAMS ((char *, size_t)); -extern int i370_section_word PARAMS ((char *, size_t)); -extern int i370_section_flags PARAMS ((int, int, int)); - -#define md_elf_section_letter(LETTER, PTR_MSG) i370_section_letter (LETTER, PTR_MSG) -#define md_elf_section_type(STR, LEN) i370_section_type (STR, LEN) -#define md_elf_section_word(STR, LEN) i370_section_word (STR, LEN) -#define md_elf_section_flags(FLAGS, ATTR, TYPE) i370_section_flags (FLAGS, ATTR, TYPE) - -#define tc_comment_chars i370_comment_chars -extern const char *i370_comment_chars; - -/* We must never ever try to resolve references to externally visible - symbols in the assembler, because the .o file might go into a shared - library, and some other shared library might override that symbol. */ -#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \ - ((FIX)->fx_addsy == NULL \ - || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \ - && ! S_IS_WEAK ((FIX)->fx_addsy) \ - && S_IS_DEFINED ((FIX)->fx_addsy) \ - && ! S_IS_COMMON ((FIX)->fx_addsy))) - -#endif /* OBJ_ELF */ - -/* call md_apply_fix3 with segment instead of md_apply_fix */ -#define MD_APPLY_FIX3 - -/* call md_pcrel_from_section, not md_pcrel_from */ +/* Call md_pcrel_from_section, not md_pcrel_from. */ #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC) extern long md_pcrel_from_section PARAMS ((struct fix *, segT)); diff -uprN binutils-2.11.92.0.10/gas/config/tc-i386.c binutils-2.11.92.0.12/gas/config/tc-i386.c --- binutils-2.11.92.0.10/gas/config/tc-i386.c Thu Oct 4 14:35:43 2001 +++ binutils-2.11.92.0.12/gas/config/tc-i386.c Fri Nov 16 14:05:52 2001 @@ -77,7 +77,7 @@ static bfd_reloc_code_real_type reloc #ifndef DEFAULT_ARCH #define DEFAULT_ARCH "i386" #endif -static char *default_arch = DEFAULT_ARCH; +static const char *default_arch = DEFAULT_ARCH; /* 'md_assemble ()' gathers together information and puts it into a i386_insn. */ @@ -539,8 +539,7 @@ static int smallest_imm_type (num) offsetT num; { - if (cpu_arch_flags != (Cpu086 | Cpu186 | Cpu286 | Cpu386 | Cpu486 | CpuNo64) - && !(cpu_arch_flags & (CpuUnknown))) + if (cpu_arch_flags != (Cpu086 | Cpu186 | Cpu286 | Cpu386 | Cpu486 | CpuNo64)) { /* This code is disabled on the 486 because all the Imm1 forms in the opcode table are slower on the i486. They're the @@ -1393,18 +1392,15 @@ md_assemble (line) } /* Check if instruction is supported on specified architecture. */ - if (cpu_arch_flags != 0) + if ((current_templates->start->cpu_flags & ~(Cpu64 | CpuNo64)) + & ~(cpu_arch_flags & ~(Cpu64 | CpuNo64))) { - 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")); - } + 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")); } /* Check for rep/repne without a string instruction. */ @@ -4215,19 +4211,17 @@ md_create_long_jump (ptr, from_addr, to_ the same (little-endian) format, so we don't need to care about which we are handling. */ -int -md_apply_fix3 (fixP, valp, seg) +void +md_apply_fix3 (fixP, valP, seg) /* The fix we're to put in. */ fixS *fixP; - /* Pointer to the value of the bits. */ - valueT *valp; - + valueT * valP; /* Segment fix is from. */ segT seg ATTRIBUTE_UNUSED; { - register char *p = fixP->fx_where + fixP->fx_frag->fr_literal; - valueT value = *valp; + char *p = fixP->fx_where + fixP->fx_frag->fr_literal; + valueT value = * valP; #if defined (BFD_ASSEMBLER) && !defined (TE_Mach) if (fixP->fx_pcrel) @@ -4361,30 +4355,26 @@ md_apply_fix3 (fixP, valp, seg) case BFD_RELOC_VTABLE_INHERIT: case BFD_RELOC_VTABLE_ENTRY: fixP->fx_done = 0; - return 1; + return; default: break; } #endif /* defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) */ - *valp = value; + * valP = value; #endif /* defined (BFD_ASSEMBLER) && !defined (TE_Mach) */ -#ifndef BFD_ASSEMBLER - md_number_to_chars (p, value, fixP->fx_size); -#else /* Are we finished with this relocation now? */ - if (fixP->fx_addsy == 0 && fixP->fx_pcrel == 0) + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) fixP->fx_done = 1; +#ifdef BFD_ASSEMBLER else if (use_rela_relocations) { fixP->fx_no_overflow = 1; value = 0; } - md_number_to_chars (p, value, fixP->fx_size); #endif - - return 1; + md_number_to_chars (p, value, fixP->fx_size); } #define MAX_LITTLENUMS 6 @@ -4661,6 +4651,48 @@ i386_target_format () } #endif /* OBJ_MAYBE_ more than one */ + +#if (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) +void i386_elf_emit_arch_note () +{ + if (OUTPUT_FLAVOR == bfd_target_elf_flavour + && cpu_arch_name != NULL) + { + char *p; + asection *seg = now_seg; + subsegT subseg = now_subseg; + Elf_Internal_Note i_note; + Elf_External_Note e_note; + asection *note_secp; + int len; + + /* Create the .note section. */ + note_secp = subseg_new (".note", 0); + bfd_set_section_flags (stdoutput, + note_secp, + SEC_HAS_CONTENTS | SEC_READONLY); + + /* Process the arch string. */ + len = strlen (cpu_arch_name); + + i_note.namesz = len + 1; + i_note.descsz = 0; + i_note.type = NT_ARCH; + p = frag_more (sizeof (e_note.namesz)); + md_number_to_chars (p, (valueT) i_note.namesz, sizeof (e_note.namesz)); + p = frag_more (sizeof (e_note.descsz)); + md_number_to_chars (p, (valueT) i_note.descsz, sizeof (e_note.descsz)); + p = frag_more (sizeof (e_note.type)); + md_number_to_chars (p, (valueT) i_note.type, sizeof (e_note.type)); + p = frag_more (len + 1); + strcpy (p, cpu_arch_name); + + frag_align (2, 0, 0); + + subseg_set (seg, subseg); + } +} +#endif #endif /* BFD_ASSEMBLER */ symbolS * diff -uprN binutils-2.11.92.0.10/gas/config/tc-i386.h binutils-2.11.92.0.12/gas/config/tc-i386.h --- binutils-2.11.92.0.10/gas/config/tc-i386.h Thu Jul 26 18:02:55 2001 +++ binutils-2.11.92.0.12/gas/config/tc-i386.h Fri Nov 16 14:05:52 2001 @@ -111,6 +111,11 @@ extern const char *i386_target_format PA #endif #endif +#if (defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF)) +#define md_end i386_elf_emit_arch_note +extern void i386_elf_emit_arch_note PARAMS ((void)); +#endif + #else /* ! BFD_ASSEMBLER */ /* COFF STUFF */ @@ -293,7 +298,6 @@ typedef struct #define CpuSSE 0x1000 /* Streaming SIMD extensions required */ #define CpuSSE2 0x2000 /* Streaming SIMD extensions 2 required */ #define Cpu3dnow 0x4000 /* 3dnow! support required */ -#define CpuUnknown 0x8000 /* The CPU is unknown, be on the safe side. */ /* These flags are set by gas depending on the flag_code. */ #define Cpu64 0x4000000 /* 64bit support required */ @@ -527,9 +531,6 @@ if (fragP->fr_type == rs_align_code) - fragP->fr_address \ - fragP->fr_fix)); -/* call md_apply_fix3 with segment instead of md_apply_fix */ -#define MD_APPLY_FIX3 - void i386_print_statistics PARAMS ((FILE *)); #define tc_print_statistics i386_print_statistics diff -uprN binutils-2.11.92.0.10/gas/config/tc-i860.c binutils-2.11.92.0.12/gas/config/tc-i860.c --- binutils-2.11.92.0.10/gas/config/tc-i860.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-i860.c Fri Nov 16 14:05:52 2001 @@ -1228,15 +1228,15 @@ obtain_reloc_for_imm16 (fix, val) /* Attempt to simplify or eliminate a fixup. To indicate that a fixup has been eliminated, set fix->fx_done. If fix->fx_addsy is non-NULL, we will have to generate a reloc entry. */ -int -md_apply_fix3 (fix, valuep, seg) - fixS *fix; - valueT *valuep; + +void +md_apply_fix3 (fix, valP, seg) + fixS * fix; + valueT * valP; segT seg ATTRIBUTE_UNUSED; { - char *buf; - long val = (long) (*valuep); + long val = * (long *) valP unsigned long insn; valueT fup; @@ -1280,9 +1280,8 @@ md_apply_fix3 (fix, valuep, seg) } } else if (fup & OP_IMM_U16) - { - abort (); - } + abort (); + else if (fup & OP_IMM_SPLIT16) { fix->fx_r_type = obtain_reloc_for_imm16 (fix, &val); @@ -1367,9 +1366,6 @@ md_apply_fix3 (fix, valuep, seg) fix->fx_done = 1; } } - - /* Return value ignored. */ - return 0; } /* Generate a machine dependent reloc from a fixup. */ diff -uprN binutils-2.11.92.0.10/gas/config/tc-i860.h binutils-2.11.92.0.12/gas/config/tc-i860.h --- binutils-2.11.92.0.10/gas/config/tc-i860.h Fri Mar 9 11:16:58 2001 +++ binutils-2.11.92.0.12/gas/config/tc-i860.h Fri Nov 16 14:05:52 2001 @@ -1,5 +1,5 @@ /* tc-i860.h -- Header file for the i860. - Copyright 1991, 1992, 1995, 1998, 2000 + Copyright 1991, 1992, 1995, 1998, 2000, 2001 Free Software Foundation, Inc. Brought back from the dead and completely reworked @@ -71,8 +71,6 @@ extern int target_big_endian; #endif #define WORKING_DOT_WORD -#define MD_APPLY_FIX3 -#define TC_HANDLES_FX_DONE #define DIFF_EXPR_OK /* Permit temporary numeric labels. */ diff -uprN binutils-2.11.92.0.10/gas/config/tc-i960.c binutils-2.11.92.0.12/gas/config/tc-i960.c --- binutils-2.11.92.0.10/gas/config/tc-i960.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-i960.c Fri Nov 16 14:05:52 2001 @@ -2806,21 +2806,13 @@ md_pcrel_from (fixP) return fixP->fx_where + fixP->fx_frag->fr_address; } -#ifdef BFD_ASSEMBLER -int -md_apply_fix (fixP, valp) - fixS *fixP; - valueT *valp; -#else void -md_apply_fix (fixP, val) +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - long val; -#endif + valueT * valP; + segT seg ATTRIBUTE_UNUSED; { -#ifdef BFD_ASSEMBLER - long val = *valp; -#endif + long val = * (long *) valP; char *place = fixP->fx_where + fixP->fx_frag->fr_literal; if (!fixP->fx_bit_fixP) @@ -2839,9 +2831,8 @@ md_apply_fix (fixP, val) else md_number_to_field (place, val, fixP->fx_bit_fixP); -#ifdef BFD_ASSEMBLER - return 0; -#endif + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } #if defined(OBJ_AOUT) | defined(OBJ_BOUT) diff -uprN binutils-2.11.92.0.10/gas/config/tc-ia64.c binutils-2.11.92.0.12/gas/config/tc-ia64.c --- binutils-2.11.92.0.10/gas/config/tc-ia64.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-ia64.c Fri Nov 16 14:05:52 2001 @@ -9879,7 +9879,7 @@ ia64_cons_fix_new (f, where, nbytes, exp fix = fix_new_exp (f, where, nbytes, exp, 0, code); /* We need to store the byte order in effect in case we're going to fix an 8 or 16 bit relocation (for which there no real - relocs available). See md_apply_fix(). */ + relocs available). See md_apply_fix3(). */ fix->tc_fix_data.bigendian = target_big_endian; } @@ -10102,14 +10102,15 @@ fix_insn (fix, odesc, value) If fixp->fx_addsy is non-NULL, we'll have to generate a reloc entry (if possible). */ -int -md_apply_fix3 (fix, valuep, seg) + +void +md_apply_fix3 (fix, valP, seg) fixS *fix; - valueT *valuep; + valueT * valP; segT seg ATTRIBUTE_UNUSED; { char *fixpos; - valueT value = *valuep; + valueT value = * valP; int adjust = 0; fixpos = fix->fx_frag->fr_literal + fix->fx_where; @@ -10152,7 +10153,7 @@ md_apply_fix3 (fix, valuep, seg) "%s must have a constant value", elf64_ia64_operands[fix->tc_fix_data.opnd].desc); fix->fx_done = 1; - return 1; + return; } /* ??? This is a hack copied from tc-i386.c to make PCREL relocs @@ -10167,15 +10168,12 @@ md_apply_fix3 (fix, valuep, seg) else number_to_chars_littleendian (fixpos, value, fix->fx_size); fix->fx_done = 1; - return 1; } else { fix_insn (fix, elf64_ia64_operands + fix->tc_fix_data.opnd, value); fix->fx_done = 1; - return 1; } - return 1; } /* Generate the BFD reloc to be stuck in the object file from the diff -uprN binutils-2.11.92.0.10/gas/config/tc-ia64.h binutils-2.11.92.0.12/gas/config/tc-ia64.h --- binutils-2.11.92.0.10/gas/config/tc-ia64.h Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-ia64.h Fri Nov 16 14:05:52 2001 @@ -46,7 +46,6 @@ extern const char *ia64_target_format PA #define TARGET_ARCH bfd_arch_ia64 #define DOUBLESLASH_LINE_COMMENTS /* allow //-style comments */ -#define TC_HANDLES_FX_DONE #define NEED_LITERAL_POOL /* need gp literal pool */ #define RELOC_REQUIRES_SYMBOL @@ -118,9 +117,6 @@ extern void ia64_handle_align PARAMS ((f #define MAX_MEM_FOR_RS_ALIGN_CODE (15 + 16) -/* Call md_apply_fix3 with segment instead of md_apply_fix. */ -#define MD_APPLY_FIX3 - #define WORKING_DOT_WORD /* don't do broken word processing for now */ #define ELF_TC_SPECIAL_SECTIONS \ diff -uprN binutils-2.11.92.0.10/gas/config/tc-m32r.c binutils-2.11.92.0.12/gas/config/tc-m32r.c --- binutils-2.11.92.0.10/gas/config/tc-m32r.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-m32r.c Fri Nov 16 14:05:52 2001 @@ -1710,7 +1710,7 @@ m32r_cgen_record_fixup_exp (frag, where, #define FX_OPINFO_R_TYPE(f) ((f)->fx_cgen.opinfo) /* Sort any unmatched HI16 relocs so that they immediately precede - the corresponding LO16 reloc. This is called before md_apply_fix and + the corresponding LO16 reloc. This is called before md_apply_fix3 and tc_gen_reloc. */ void diff -uprN binutils-2.11.92.0.10/gas/config/tc-m32r.h binutils-2.11.92.0.12/gas/config/tc-m32r.h --- binutils-2.11.92.0.10/gas/config/tc-m32r.h Fri Mar 9 11:17:01 2001 +++ binutils-2.11.92.0.12/gas/config/tc-m32r.h Fri Nov 16 14:05:52 2001 @@ -68,7 +68,6 @@ extern void m32r_handle_align PARAMS ((f #define MAX_MEM_FOR_RS_ALIGN_CODE (1 + 2 + 4) -#define MD_APPLY_FIX3 #define md_apply_fix3 gas_cgen_md_apply_fix3 #define obj_fix_adjustable(fixP) m32r_fix_adjustable(fixP) @@ -77,8 +76,6 @@ extern void m32r_handle_align PARAMS ((f HI16 relocs and queue them up for later sorting. */ #define md_cgen_record_fixup_exp m32r_cgen_record_fixup_exp -#define TC_HANDLES_FX_DONE - #define tc_gen_reloc gas_cgen_tc_gen_reloc #define tc_frob_file() m32r_frob_file () diff -uprN binutils-2.11.92.0.10/gas/config/tc-m68hc11.c binutils-2.11.92.0.12/gas/config/tc-m68hc11.c --- binutils-2.11.92.0.10/gas/config/tc-m68hc11.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-m68hc11.c Fri Nov 16 14:05:52 2001 @@ -1519,12 +1519,14 @@ build_jump_insn (opcode, operands, nb_op /* bra/bsr made be changed into jmp/jsr. */ else if (code == M6811_BSR || code == M6811_BRA || code == M6812_BSR) { - opcode = m68hc11_new_insn (2); + /* Allocate worst case storage. */ + opcode = m68hc11_new_insn (3); number_to_chars_bigendian (opcode, code, 1); number_to_chars_bigendian (opcode + 1, 0, 1); - frag_var (rs_machine_dependent, 2, 1, - ENCODE_RELAX (STATE_PC_RELATIVE, STATE_UNDF), - operands[0].exp.X_add_symbol, (offsetT) n, opcode); + frag_variant (rs_machine_dependent, 1, 1, + ENCODE_RELAX (STATE_PC_RELATIVE, STATE_UNDF), + operands[0].exp.X_add_symbol, (offsetT) n, + opcode); } else if (current_architecture & cpu6812) { @@ -2727,43 +2729,38 @@ md_estimate_size_before_relax (fragP, se return md_relax_table[fragP->fr_subtype].rlx_length; } -int -md_apply_fix (fixp, valuep) - fixS *fixp; - valueT *valuep; +void +md_apply_fix3 (fixP, valP, seg) + fixS *fixP; + valueT *valP; + segT seg ATTRIBUTE_UNUSED; { char *where; - long value; + long value = * valP; int op_type; - if (fixp->fx_addsy == (symbolS *) NULL) - { - value = *valuep; - fixp->fx_done = 1; - } - else if (fixp->fx_pcrel) - { - value = *valuep; - } + if (fixP->fx_addsy == (symbolS *) NULL) + fixP->fx_done = 1; + + else if (fixP->fx_pcrel) + ; + else { - value = fixp->fx_offset; - if (fixp->fx_subsy != (symbolS *) NULL) + value = fixP->fx_offset; + + if (fixP->fx_subsy != (symbolS *) NULL) { - if (S_GET_SEGMENT (fixp->fx_subsy) == absolute_section) - { - value -= S_GET_VALUE (fixp->fx_subsy); - } + if (S_GET_SEGMENT (fixP->fx_subsy) == absolute_section) + value -= S_GET_VALUE (fixP->fx_subsy); else - { - /* We don't actually support subtracting a symbol. */ - as_bad_where (fixp->fx_file, fixp->fx_line, - _("Expression too complex.")); - } + /* We don't actually support subtracting a symbol. */ + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Expression too complex.")); } } - op_type = fixp->fx_r_type; + op_type = fixP->fx_r_type; /* Patch the instruction with the resolved operand. Elf relocation info will also be generated to take care of linker/loader fixups. @@ -2774,9 +2771,9 @@ md_apply_fix (fixp, valuep) relax table, bcc, bra, bsr transformations) The BFD_RELOC_32 is necessary for the support of --gstabs. */ - where = fixp->fx_frag->fr_literal + fixp->fx_where; + where = fixP->fx_frag->fr_literal + fixP->fx_where; - switch (fixp->fx_r_type) + switch (fixP->fx_r_type) { case BFD_RELOC_32: bfd_putb32 ((bfd_vma) value, (unsigned char *) where); @@ -2786,7 +2783,7 @@ md_apply_fix (fixp, valuep) case BFD_RELOC_16_PCREL: bfd_putb16 ((bfd_vma) value, (unsigned char *) where); if (value < -65537 || value > 65535) - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("Value out of 16-bit range.")); break; @@ -2809,14 +2806,14 @@ md_apply_fix (fixp, valuep) ((bfd_byte *) where)[0] = (bfd_byte) value; if (value < -128 || value > 127) - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("Value %ld too large for 8-bit PC-relative branch."), value); break; case BFD_RELOC_M68HC11_3B: if (value <= 0 || value > 8) - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("Auto increment/decrement offset '%ld' is out of range."), value); if (where[0] & 0x8) @@ -2829,8 +2826,6 @@ md_apply_fix (fixp, valuep) default: as_fatal (_("Line %d: unknown relocation type: 0x%x."), - fixp->fx_line, fixp->fx_r_type); + fixP->fx_line, fixP->fx_r_type); } - - return 0; } diff -uprN binutils-2.11.92.0.10/gas/config/tc-m68k.c binutils-2.11.92.0.12/gas/config/tc-m68k.c --- binutils-2.11.92.0.10/gas/config/tc-m68k.c Fri Oct 19 23:57:49 2001 +++ binutils-2.11.92.0.12/gas/config/tc-m68k.c Fri Nov 16 14:05:52 2001 @@ -348,7 +348,6 @@ static void s_mri_repeat PARAMS ((int)); static void s_mri_until PARAMS ((int)); static void s_mri_while PARAMS ((int)); static void s_mri_endw PARAMS ((int)); -static void md_apply_fix_2 PARAMS ((fixS *, offsetT)); static void md_convert_frag_1 PARAMS ((fragS *)); static int current_architecture; @@ -3779,11 +3778,10 @@ md_begin () my lord ghod hath spoken, so we do it this way. Excuse the ugly var names. */ - register const struct m68k_opcode *ins; - register struct m68k_incant *hack, *slak; - register const char *retval = 0; /* empty string, or error msg text */ - register int i; - register char c; + const struct m68k_opcode *ins; + struct m68k_incant *hack, *slak; + const char *retval = 0; /* empty string, or error msg text */ + int i; if (flag_mri) { @@ -4223,11 +4221,13 @@ md_number_to_chars (buf, val, n) number_to_chars_bigendian (buf, val, n); } -static void -md_apply_fix_2 (fixP, val) +void +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - offsetT val; + valueT *valP; + segT seg ATTRIBUTE_UNUSED; { + offsetT val = *valP; addressT upper_limit; offsetT lower_limit; @@ -4239,6 +4239,9 @@ md_apply_fix_2 (fixP, val) val = ((val & 0xffffffff) ^ 0x80000000) - 0x80000000; + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; + #ifdef OBJ_ELF if (fixP->fx_addsy) { @@ -4261,8 +4264,8 @@ md_apply_fix_2 (fixP, val) switch (fixP->fx_size) { - /* The cast to offsetT below are necessary to make code correct for - machines where ints are smaller than offsetT */ + /* The cast to offsetT below are necessary to make code + correct for machines where ints are smaller than offsetT. */ case 1: *buf++ = val; upper_limit = 0x7f; @@ -4322,24 +4325,6 @@ md_apply_fix_2 (fixP, val) as_bad_where (fixP->fx_file, fixP->fx_line, _("invalid byte branch offset")); } -#ifdef BFD_ASSEMBLER -int -md_apply_fix (fixP, valp) - fixS *fixP; - valueT *valp; -{ - md_apply_fix_2 (fixP, (addressT) *valp); - return 1; -} -#else -void md_apply_fix (fixP, val) - fixS *fixP; - long val; -{ - md_apply_fix_2 (fixP, (addressT) val); -} -#endif - /* *fragP has been relaxed to its final size, and now needs to have the bytes inside it modified to conform to the new size There is UGLY MAGIC here. .. diff -uprN binutils-2.11.92.0.10/gas/config/tc-m88k.c binutils-2.11.92.0.12/gas/config/tc-m88k.c --- binutils-2.11.92.0.10/gas/config/tc-m88k.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-m88k.c Wed Nov 21 15:35:32 2001 @@ -1117,31 +1117,33 @@ tc_coff_fix2rtype (fixp) file itself. */ void -md_apply_fix (fixp, val) - fixS *fixp; - long val; +md_apply_fix3 (fixP, valP, seg) + fixS *fixP; + valueT * valP; + segT seg ATTRIBUTE_UNUSED; { + long val = * (long *) valP; char *buf; - buf = fixp->fx_frag->fr_literal + fixp->fx_where; - fixp->fx_offset = 0; + buf = fixP->fx_frag->fr_literal + fixP->fx_where; + fixP->fx_offset = 0; - switch (fixp->fx_r_type) + switch (fixP->fx_r_type) { case RELOC_IW16: - fixp->fx_offset = val >> 16; + fixP->fx_offset = val >> 16; buf[2] = val >> 8; buf[3] = val; break; case RELOC_LO16: - fixp->fx_offset = val >> 16; + fixP->fx_offset = val >> 16; buf[0] = val >> 8; buf[1] = val; break; case RELOC_HI16: - fixp->fx_offset = val >> 16; + fixP->fx_offset = val >> 16; buf[0] = val >> 8; buf[1] = val; break; @@ -1168,6 +1170,9 @@ md_apply_fix (fixp, val) default: abort (); } + + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } /* Where a PC relative offset is calculated from. On the m88k they diff -uprN binutils-2.11.92.0.10/gas/config/tc-mcore.c binutils-2.11.92.0.12/gas/config/tc-mcore.c --- binutils-2.11.92.0.10/gas/config/tc-mcore.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-mcore.c Fri Nov 16 14:05:52 2001 @@ -2088,17 +2088,18 @@ md_convert_frag (abfd, sec, fragP) /* Applies the desired value to the specified location. Also sets up addends for 'rela' type relocations. */ -int -md_apply_fix3 (fixP, valp, segment) + +void +md_apply_fix3 (fixP, valP, segment) fixS * fixP; - valueT * valp; + valueT * valP; segT segment; { char * buf = fixP->fx_where + fixP->fx_frag->fr_literal; char * file = fixP->fx_file ? fixP->fx_file : _("unknown"); const char * symname; /* Note: use offsetT because it is signed, valueT is unsigned. */ - offsetT val = (offsetT) * valp; + offsetT val = * (offsetT *) valP; symname = fixP->fx_addsy ? S_GET_NAME (fixP->fx_addsy) : _(""); /* Save this for the addend in the relocation record. */ @@ -2115,7 +2116,7 @@ md_apply_fix3 (fixP, valp, segment) /* For ELF we can just return and let the reloc that will be generated take care of everything. For COFF we still have to insert 'val' into the insn since the addend field will be ignored. */ - return 0; + return; #endif } else @@ -2214,8 +2215,6 @@ md_apply_fix3 (fixP, valp, segment) } break; } - - return 0; /* Return value is ignored. */ } void diff -uprN binutils-2.11.92.0.10/gas/config/tc-mcore.h binutils-2.11.92.0.12/gas/config/tc-mcore.h --- binutils-2.11.92.0.10/gas/config/tc-mcore.h Fri Mar 9 11:17:03 2001 +++ binutils-2.11.92.0.12/gas/config/tc-mcore.h Fri Nov 16 14:05:52 2001 @@ -1,6 +1,6 @@ /* This file is tc-mcore.h - Copyright 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -59,8 +59,6 @@ extern const struct relax_type md_relax_ /* Want the section information too... */ #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC) -#define MD_APPLY_FIX3 /* We want the segment as well. */ - #ifdef OBJ_COFF #define TARGET_FORMAT (target_big_endian ? "pe-mcore-big" : "pe-mcore-little") @@ -115,7 +113,6 @@ extern void md_create_short_jump extern void md_create_long_jump PARAMS ((char *, addressT, addressT, fragS *, symbolS *)); extern void md_convert_frag PARAMS ((bfd *, segT, fragS *)); -extern int md_apply_fix3 PARAMS ((fixS *, valueT *, segT)); extern void md_operand PARAMS ((expressionS *)); extern int md_estimate_size_before_relax PARAMS ((fragS *, segT)); extern void md_number_to_chars PARAMS ((char *, valueT, int)); diff -uprN binutils-2.11.92.0.10/gas/config/tc-mips.c binutils-2.11.92.0.12/gas/config/tc-mips.c --- binutils-2.11.92.0.10/gas/config/tc-mips.c Sun Oct 21 16:24:32 2001 +++ binutils-2.11.92.0.12/gas/config/tc-mips.c Wed Nov 21 15:35:32 2001 @@ -113,6 +113,20 @@ extern int target_big_endian; ? ".rodata" \ : (abort (), "")) +/* The ABI to use. */ +enum mips_abi_level +{ + NO_ABI = 0, + O32_ABI, + O64_ABI, + N32_ABI, + N64_ABI, + EABI_ABI +}; + +/* MIPS ABI we are using for this output file. */ +static enum mips_abi_level file_mips_abi = NO_ABI; + /* This is the set of options which may be modified by the .set pseudo-op. We use a struct so that .set push and .set pop are more reliable. */ @@ -149,15 +163,29 @@ struct mips_set_options /* Non-zero if we should not autoextend mips16 instructions. Changed by `.set autoextend' and `.set noautoextend'. */ int noautoextend; + /* Restrict general purpose registers and floating point registers + to 32 bit. This is initially determined when -mgp32 or -mfp32 + is passed but can changed if the assembler code uses .set mipsN. */ + int gp32; + int fp32; + /* The ABI currently in use. This is changed by .set mipsN to loosen + restrictions and doesn't affect the whole file. */ + enum mips_abi_level abi; }; +/* True if -mgp32 was passed. */ +static int file_mips_gp32 = 0; + +/* True if -mfp32 was passed. */ +static int file_mips_fp32 = 0; + /* This is the struct we use to hold the current set of options. Note that we must set the isa field to ISA_UNKNOWN and the mips16 field to -1 to indicate that they have not been initialized. */ static struct mips_set_options mips_opts = { - ISA_UNKNOWN, -1, 0, 0, 0, 0, 0, 0 + ISA_UNKNOWN, -1, 0, 0, 0, 0, 0, 0, 0, 0, NO_ABI }; /* These variables are filled in with the masks of registers used. @@ -179,19 +207,6 @@ static int mips_arch = CPU_UNKNOWN; are optimizing. */ static int mips_tune = CPU_UNKNOWN; -/* The ABI to use. */ -enum mips_abi_level -{ - NO_ABI = 0, - O32_ABI, - O64_ABI, - N32_ABI, - N64_ABI, - EABI_ABI -}; - -static enum mips_abi_level mips_abi = NO_ABI; - /* Whether we should mark the file EABI64 or EABI32. */ static int mips_eabi64 = 0; @@ -199,12 +214,6 @@ static int mips_eabi64 = 0; mips3 or greater, then mark the object file 32BITMODE. */ static int mips_32bitmode = 0; -/* True if -mgp32 was passed. */ -static int mips_gp32 = 0; - -/* True if -mfp32 was passed. */ -static int mips_fp32 = 0; - /* Some ISA's have delay slots for instructions which read or write from a coprocessor (eg. mips1-mips3); some don't (eg mips4). Return true if instructions marked INSN_LOAD_COPROC_DELAY, @@ -228,28 +237,29 @@ static int mips_fp32 = 0; ) #define HAVE_32BIT_GPRS \ - (mips_gp32 \ - || mips_abi == O32_ABI \ + (mips_opts.gp32 \ + || mips_opts.abi == O32_ABI \ || ! ISA_HAS_64BIT_REGS (mips_opts.isa)) #define HAVE_32BIT_FPRS \ - (mips_fp32 \ - || mips_abi == O32_ABI \ + (mips_opts.fp32 \ + || mips_opts.abi == O32_ABI \ || ! ISA_HAS_64BIT_REGS (mips_opts.isa)) #define HAVE_64BIT_GPRS (! HAVE_32BIT_GPRS) #define HAVE_64BIT_FPRS (! HAVE_32BIT_FPRS) -#define HAVE_NEWABI (mips_abi == N32_ABI || mips_abi == N64_ABI) +#define HAVE_NEWABI (mips_opts.abi == N32_ABI || mips_opts.abi == N64_ABI) -#define HAVE_64BIT_OBJECTS (mips_abi == N64_ABI) +#define HAVE_64BIT_OBJECTS (mips_opts.abi == N64_ABI) /* We can only have 64bit addresses if the object file format supports it. */ -#define HAVE_32BIT_ADDRESSES \ - (HAVE_32BIT_GPRS \ - || bfd_arch_bits_per_address (stdoutput) == 32 \ - || ! HAVE_64BIT_OBJECTS) +#define HAVE_32BIT_ADDRESSES \ + (HAVE_32BIT_GPRS \ + || ((bfd_arch_bits_per_address (stdoutput) == 32 \ + || ! HAVE_64BIT_OBJECTS) \ + && mips_pic != EMBEDDED_PIC)) #define HAVE_64BIT_ADDRESSES (! HAVE_32BIT_ADDRESSES) @@ -258,6 +268,7 @@ static int mips_fp32 = 0; require nops to be inserted. */ #define hilo_interlocks (mips_arch == CPU_R4010 \ + || mips_arch == CPU_SB1 \ ) /* Whether the processor uses hardware interlocks to protect reads @@ -270,6 +281,7 @@ static int mips_fp32 = 0; (co-processor) interlocks. */ /* Itbl support may require additional care here. */ #define cop_interlocks (mips_arch == CPU_R4300 \ + || mips_arch == CPU_SB1 \ ) /* Is this a mfhi or mflo instruction? */ @@ -685,7 +697,9 @@ static void mips16_immed PARAMS ((char * static int my_getSmallParser PARAMS ((char **, unsigned int *, int *)); static int my_getSmallExpression PARAMS ((expressionS *, char *)); static void my_getExpression PARAMS ((expressionS *, char *)); +#ifdef OBJ_ELF static int support_64bit_objects PARAMS((void)); +#endif static symbolS *get_symbol PARAMS ((void)); static void mips_align PARAMS ((int to, int fill, symbolS *label)); static void s_align PARAMS ((int)); @@ -720,6 +734,9 @@ static const char *mips_isa_to_str PARAM static const char *mips_cpu_to_str PARAMS ((int)); static int validate_mips_insn PARAMS ((const struct mips_opcode *)); static void show PARAMS ((FILE *, char *, int *, int *)); +#ifdef OBJ_ELF +static int mips_need_elf_addend_fixup PARAMS ((fixS *)); +#endif /* Return values of my_getSmallExpression(). */ @@ -1120,7 +1137,7 @@ md_begin () to change the ISA with directives. This isn't really the best, but then neither is basing the abi on the isa. */ if (ISA_HAS_64BIT_REGS (mips_opts.isa) - && mips_abi == EABI_ABI) + && mips_opts.abi == EABI_ABI) mips_eabi64 = 1; /* If they asked for mips1 or mips2 and a cpu that is @@ -1134,6 +1151,9 @@ md_begin () as_warn (_("Could not set architecture and machine")); file_mips_isa = mips_opts.isa; + file_mips_abi = mips_opts.abi; + mips_opts.gp32 = file_mips_gp32; + mips_opts.fp32 = file_mips_fp32; op_hash = hash_new (); @@ -1372,12 +1392,11 @@ md_assemble (str) else { if (imm_expr.X_op != O_absent) - append_insn ((char *) NULL, &insn, &imm_expr, imm_reloc, - imm_unmatched_hi); + append_insn (NULL, &insn, &imm_expr, imm_reloc, imm_unmatched_hi); else if (offset_expr.X_op != O_absent) - append_insn ((char *) NULL, &insn, &offset_expr, offset_reloc, false); + append_insn (NULL, &insn, &offset_expr, offset_reloc, false); else - append_insn ((char *) NULL, &insn, NULL, unused_reloc, false); + append_insn (NULL, &insn, NULL, unused_reloc, false); } } @@ -1891,8 +1910,7 @@ append_insn (place, ip, address_expr, re & INSN_UNCOND_BRANCH_DELAY), (*prev_insn_reloc_type == BFD_RELOC_MIPS16_JMP)), - make_expr_symbol (address_expr), (offsetT) 0, - (char *) NULL); + make_expr_symbol (address_expr), 0, NULL); } else if (place != NULL) f = place; @@ -3041,9 +3059,9 @@ mips16_macro_build (place, counter, ep, *r = BFD_RELOC_UNUSED + c; else { - mips16_immed ((char *) NULL, 0, c, ep->X_add_number, false, - false, false, &insn.insn_opcode, - &insn.use_extend, &insn.extend); + mips16_immed (NULL, 0, c, ep->X_add_number, false, false, + false, &insn.insn_opcode, &insn.use_extend, + &insn.extend); ep = NULL; *r = BFD_RELOC_UNUSED; } @@ -3151,7 +3169,7 @@ set_at (counter, reg, unsignedp) else { load_register (counter, AT, &imm_expr, 0); - macro_build ((char *) NULL, counter, NULL, + macro_build ((char *) NULL, counter, (expressionS *) NULL, unsignedp ? "sltu" : "slt", "d,v,t", AT, reg, AT); } @@ -3399,7 +3417,7 @@ load_register (counter, reg, ep, dbl) macro_build ((char *) NULL, counter, &tmp, "ori", "t,r,i", reg, 0, (int) BFD_RELOC_LO16); - macro_build ((char *) NULL, counter, NULL, + macro_build ((char *) NULL, counter, (expressionS *) NULL, (shift >= 32) ? "dsll32" : "dsll", "d,w,<", reg, reg, (shift >= 32) ? shift - 32 : shift); @@ -3454,12 +3472,12 @@ load_register (counter, reg, ep, dbl) if (bit != 0) { bit += shift; - macro_build ((char *) NULL, counter, NULL, + macro_build ((char *) NULL, counter, (expressionS *) NULL, (bit >= 32) ? "dsll32" : "dsll", "d,w,<", reg, reg, (bit >= 32) ? bit - 32 : bit); } - macro_build ((char *) NULL, counter, NULL, + macro_build ((char *) NULL, counter, (expressionS *) NULL, (shift >= 32) ? "dsrl32" : "dsrl", "d,w,<", reg, reg, (shift >= 32) ? shift - 32 : shift); @@ -3478,8 +3496,8 @@ load_register (counter, reg, ep, dbl) { if (freg != 0) { - macro_build ((char *) NULL, counter, NULL, "dsll32", "d,w,<", reg, - freg, 0); + macro_build ((char *) NULL, counter, (expressionS *) NULL, + "dsll32", "d,w,<", reg, freg, 0); freg = reg; } } @@ -3548,7 +3566,7 @@ load_address (counter, reg, ep, dbl, use lui $reg, (BFD_RELOC_HI16_S) addiu $reg,$reg, (BFD_RELOC_LO16) If we have an addend, we always use the latter form. - + With 64bit address space and a usable $at we want lui $reg, (BFD_RELOC_MIPS_HIGHEST) lui $at, (BFD_RELOC_HI16_S) @@ -3556,7 +3574,7 @@ load_address (counter, reg, ep, dbl, use daddiu $at, (BFD_RELOC_LO16) dsll32 $reg,0 dadd $reg,$reg,$at - + If $at is already in use, we use an path which is suboptimal on superscalar processors. lui $reg, (BFD_RELOC_MIPS_HIGHEST) @@ -3583,10 +3601,10 @@ load_address (counter, reg, ep, dbl, use reg, reg, (int) BFD_RELOC_MIPS_HIGHER); macro_build (p, counter, ep, "daddiu", "t,r,j", AT, AT, (int) BFD_RELOC_LO16); - macro_build (p, counter, NULL, "dsll32", "d,w,<", - reg, reg, 0); - macro_build (p, counter, NULL, "dadd", "d,v,t", - reg, reg, AT); + macro_build (p, counter, (expressionS *) NULL, "dsll32", + "d,w,<", reg, reg, 0); + macro_build (p, counter, (expressionS *) NULL, "dadd", + "d,v,t", reg, reg, AT); *used_at = 1; } else @@ -3595,12 +3613,12 @@ load_address (counter, reg, ep, dbl, use reg, (int) BFD_RELOC_MIPS_HIGHEST); macro_build (p, counter, ep, "daddiu", "t,r,j", reg, reg, (int) BFD_RELOC_MIPS_HIGHER); - macro_build (p, counter, NULL, "dsll", "d,w,<", - reg, reg, 16); + macro_build (p, counter, (expressionS *) NULL, "dsll", + "d,w,<", reg, reg, 16); macro_build (p, counter, ep, "daddiu", "t,r,j", reg, reg, (int) BFD_RELOC_HI16_S); - macro_build (p, counter, NULL, "dsll", "d,w,<", - reg, reg, 16); + macro_build (p, counter, (expressionS *) NULL, "dsll", + "d,w,<", reg, reg, 16); macro_build (p, counter, ep, "daddiu", "t,r,j", reg, reg, (int) BFD_RELOC_LO16); } @@ -3819,10 +3837,11 @@ macro (ip) expr1.X_add_number = 8; macro_build ((char *) NULL, &icnt, &expr1, "bgez", "s,p", sreg); if (dreg == sreg) - macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", "", + 0); else move_register (&icnt, dreg, sreg); - macro_build ((char *) NULL, &icnt, NULL, + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, dbl ? "dsub" : "sub", "d,v,t", dreg, 0, sreg); --mips_opts.noreorder; @@ -3855,7 +3874,8 @@ macro (ip) return; } load_register (&icnt, AT, &imm_expr, dbl); - macro_build ((char *) NULL, &icnt, NULL, s2, "d,v,t", treg, sreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s2, "d,v,t", + treg, sreg, AT); break; case M_AND_I: @@ -3885,14 +3905,15 @@ macro (ip) { macro_build ((char *) NULL, &icnt, &imm_expr, "ori", "t,r,i", treg, sreg, (int) BFD_RELOC_LO16); - macro_build ((char *) NULL, &icnt, NULL, "nor", "d,v,t", - treg, treg, 0); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nor", + "d,v,t", treg, treg, 0); } return; } load_register (&icnt, AT, &imm_expr, HAVE_64BIT_GPRS); - macro_build ((char *) NULL, &icnt, NULL, s2, "d,v,t", treg, sreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s2, "d,v,t", + treg, sreg, AT); break; case M_BEQ_I: @@ -3925,18 +3946,17 @@ macro (ip) if (treg == 0) { macro_build ((char *) NULL, &icnt, &offset_expr, - likely ? "bgezl" : "bgez", - "s,p", sreg); + likely ? "bgezl" : "bgez", "s,p", sreg); return; } if (sreg == 0) { macro_build ((char *) NULL, &icnt, &offset_expr, - likely ? "blezl" : "blez", - "s,p", treg); + likely ? "blezl" : "blez", "s,p", treg); return; } - macro_build ((char *) NULL, &icnt, NULL, "slt", "d,v,t", AT, sreg, treg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "slt", "d,v,t", + AT, sreg, treg); macro_build ((char *) NULL, &icnt, &offset_expr, likely ? "beql" : "beq", "s,t,p", AT, 0); break; @@ -3964,7 +3984,8 @@ macro (ip) if (warn_nops) as_warn (_("Branch %s is always false (nop)"), ip->insn_mo->name); - macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", + "", 0); } else { @@ -4031,8 +4052,8 @@ macro (ip) likely ? "beql" : "beq", "s,t,p", 0, treg); return; } - macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", AT, sreg, - treg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu", + "d,v,t", AT, sreg, treg); macro_build ((char *) NULL, &icnt, &offset_expr, likely ? "beql" : "beq", "s,t,p", AT, 0); break; @@ -4081,7 +4102,8 @@ macro (ip) likely ? "bltzl" : "bltz", "s,p", treg); return; } - macro_build ((char *) NULL, &icnt, NULL, "slt", "d,v,t", AT, treg, sreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "slt", "d,v,t", + AT, treg, sreg); macro_build ((char *) NULL, &icnt, &offset_expr, likely ? "bnel" : "bne", "s,t,p", AT, 0); break; @@ -4097,8 +4119,8 @@ macro (ip) } if (sreg == 0) goto do_false; - macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", AT, treg, - sreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu", + "d,v,t", AT, treg, sreg); macro_build ((char *) NULL, &icnt, &offset_expr, likely ? "bnel" : "bne", "s,t,p", AT, 0); break; @@ -4118,7 +4140,8 @@ macro (ip) likely ? "bgezl" : "bgez", "s,p", treg); return; } - macro_build ((char *) NULL, &icnt, NULL, "slt", "d,v,t", AT, treg, sreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "slt", "d,v,t", + AT, treg, sreg); macro_build ((char *) NULL, &icnt, &offset_expr, likely ? "beql" : "beq", "s,t,p", AT, 0); break; @@ -4174,8 +4197,8 @@ macro (ip) } if (sreg == 0) goto do_true; - macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", AT, treg, - sreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu", + "d,v,t", AT, treg, sreg); macro_build ((char *) NULL, &icnt, &offset_expr, likely ? "beql" : "beq", "s,t,p", AT, 0); break; @@ -4225,7 +4248,8 @@ macro (ip) likely ? "bgtzl" : "bgtz", "s,p", treg); return; } - macro_build ((char *) NULL, &icnt, NULL, "slt", "d,v,t", AT, sreg, treg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "slt", "d,v,t", + AT, sreg, treg); macro_build ((char *) NULL, &icnt, &offset_expr, likely ? "bnel" : "bne", "s,t,p", AT, 0); break; @@ -4241,7 +4265,8 @@ macro (ip) likely ? "bnel" : "bne", "s,t,p", 0, treg); return; } - macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", AT, sreg, + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu", + "d,v,t", AT, sreg, treg); macro_build ((char *) NULL, &icnt, &offset_expr, likely ? "bnel" : "bne", "s,t,p", AT, 0); @@ -4261,9 +4286,11 @@ macro (ip) { as_warn (_("Divide by zero.")); if (mips_trap) - macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", 0, 0); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "teq", + "s,t", 0, 0); else - macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break", + "c", 7); return; } @@ -4272,17 +4299,19 @@ macro (ip) mips_any_noreorder = 1; if (mips_trap) { - macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", treg, 0); - macro_build ((char *) NULL, &icnt, NULL, + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "teq", + "s,t", treg, 0); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, dbl ? "ddiv" : "div", "z,s,t", sreg, treg); } else { expr1.X_add_number = 8; macro_build ((char *) NULL, &icnt, &expr1, "bne", "s,t,p", treg, 0); - macro_build ((char *) NULL, &icnt, NULL, + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, dbl ? "ddiv" : "div", "z,s,t", sreg, treg); - macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break", + "c", 7); } expr1.X_add_number = -1; macro_build ((char *) NULL, &icnt, &expr1, @@ -4295,8 +4324,8 @@ macro (ip) expr1.X_add_number = 1; macro_build ((char *) NULL, &icnt, &expr1, "daddiu", "t,r,j", AT, 0, (int) BFD_RELOC_LO16); - macro_build ((char *) NULL, &icnt, NULL, "dsll32", "d,w,<", AT, AT, - 31); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "dsll32", + "d,w,<", AT, AT, 31); } else { @@ -4306,7 +4335,8 @@ macro (ip) } if (mips_trap) { - macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", sreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "teq", + "s,t", sreg, AT); /* We want to close the noreorder block as soon as possible, so that later insns are available for delay slot filling. */ --mips_opts.noreorder; @@ -4315,15 +4345,17 @@ macro (ip) { expr1.X_add_number = 8; macro_build ((char *) NULL, &icnt, &expr1, "bne", "s,t,p", sreg, AT); - macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", "", + 0); /* We want to close the noreorder block as soon as possible, so that later insns are available for delay slot filling. */ --mips_opts.noreorder; - macro_build ((char *) NULL, &icnt, NULL, "break", "c", 6); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break", + "c", 6); } - macro_build ((char *) NULL, &icnt, NULL, s, "d", dreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "d", dreg); break; case M_DIV_3I: @@ -4366,9 +4398,11 @@ macro (ip) { as_warn (_("Divide by zero.")); if (mips_trap) - macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", 0, 0); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "teq", + "s,t", 0, 0); else - macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break", + "c", 7); return; } if (imm_expr.X_op == O_constant && imm_expr.X_add_number == 1) @@ -4385,8 +4419,8 @@ macro (ip) { if (strcmp (s2, "mflo") == 0) { - macro_build ((char *) NULL, &icnt, NULL, dbl ? "dneg" : "neg", - "d,w", dreg, sreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, + dbl ? "dneg" : "neg", "d,w", dreg, sreg); } else move_register (&icnt, dreg, 0); @@ -4394,8 +4428,9 @@ macro (ip) } load_register (&icnt, AT, &imm_expr, dbl); - macro_build ((char *) NULL, &icnt, NULL, s, "z,s,t", sreg, AT); - macro_build ((char *) NULL, &icnt, NULL, s2, "d", dreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "z,s,t", + sreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s2, "d", dreg); break; case M_DIVU_3: @@ -4419,8 +4454,10 @@ macro (ip) mips_any_noreorder = 1; if (mips_trap) { - macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", treg, 0); - macro_build ((char *) NULL, &icnt, NULL, s, "z,s,t", sreg, treg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "teq", + "s,t", treg, 0); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "z,s,t", + sreg, treg); /* We want to close the noreorder block as soon as possible, so that later insns are available for delay slot filling. */ --mips_opts.noreorder; @@ -4429,14 +4466,16 @@ macro (ip) { expr1.X_add_number = 8; macro_build ((char *) NULL, &icnt, &expr1, "bne", "s,t,p", treg, 0); - macro_build ((char *) NULL, &icnt, NULL, s, "z,s,t", sreg, treg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "z,s,t", + sreg, treg); /* We want to close the noreorder block as soon as possible, so that later insns are available for delay slot filling. */ --mips_opts.noreorder; - macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break", + "c", 7); } - macro_build ((char *) NULL, &icnt, NULL, s2, "d", dreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s2, "d", dreg); return; case M_DLA_AB: @@ -4445,9 +4484,21 @@ macro (ip) /* Load the address of a symbol into a register. If breg is not zero, we then add a base register to it. */ + if (treg == breg) + { + tempreg = AT; + used_at = 1; + } + else + { + tempreg = treg; + used_at = 0; + } + /* When generating embedded PIC code, we permit expressions of the form - la $4,foo-bar + la $treg,foo-bar + la $treg,foo-bar($breg) where bar is an address in the current section. These are used when getting the addresses of functions. We don't permit X_add_number to be non-zero, because if the symbol is @@ -4462,16 +4513,30 @@ macro (ip) (symbol_get_value_expression (offset_expr.X_op_symbol) ->X_add_symbol) == now_seg))) - && breg == 0 && (offset_expr.X_add_number == 0 || OUTPUT_FLAVOR == bfd_target_elf_flavour)) { - macro_build ((char *) NULL, &icnt, &offset_expr, "lui", "t,u", - treg, (int) BFD_RELOC_PCREL_HI16_S); + if (breg == 0) + { + tempreg = treg; + used_at = 0; + macro_build ((char *) NULL, &icnt, &offset_expr, "lui", "t,u", + tempreg, (int) BFD_RELOC_PCREL_HI16_S); + } + else + { + macro_build ((char *) NULL, &icnt, &offset_expr, "lui", "t,u", + tempreg, (int) BFD_RELOC_PCREL_HI16_S); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, + HAVE_32BIT_ADDRESSES ? "addu" : "daddu", + "d,v,t", tempreg, tempreg, breg); + } macro_build ((char *) NULL, &icnt, &offset_expr, HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu", - "t,r,j", treg, treg, (int) BFD_RELOC_PCREL_LO16); - return; + "t,r,j", treg, tempreg, (int) BFD_RELOC_PCREL_LO16); + if (! used_at) + return; + break; } if (offset_expr.X_op != O_symbol @@ -4481,17 +4546,6 @@ macro (ip) offset_expr.X_op = O_constant; } - if (treg == breg) - { - tempreg = AT; - used_at = 1; - } - else - { - tempreg = treg; - used_at = 0; - } - if (offset_expr.X_op == O_constant) load_register (&icnt, tempreg, &offset_expr, dbl); else if (mips_pic == NO_PIC) @@ -4503,7 +4557,7 @@ macro (ip) addiu $tempreg,$tempreg, (BFD_RELOC_LO16) If we have a constant, we need two instructions anyhow, so we may as well always use the latter form. - + With 64bit address space and a usable $at we want lui $tempreg, (BFD_RELOC_MIPS_HIGHEST) lui $at, (BFD_RELOC_HI16_S) @@ -4511,7 +4565,7 @@ macro (ip) daddiu $at, (BFD_RELOC_LO16) dsll32 $tempreg,0 dadd $tempreg,$tempreg,$at - + If $at is already in use, we use an path which is suboptimal on superscalar processors. lui $tempreg, (BFD_RELOC_MIPS_HIGHEST) @@ -4537,9 +4591,9 @@ macro (ip) tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER); macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j", AT, AT, (int) BFD_RELOC_LO16); - macro_build (p, &icnt, NULL, "dsll32", "d,w,<", - tempreg, tempreg, 0); - macro_build (p, &icnt, NULL, "dadd", "d,v,t", + macro_build (p, &icnt, (expressionS *) NULL, "dsll32", + "d,w,<", tempreg, tempreg, 0); + macro_build (p, &icnt, (expressionS *) NULL, "dadd", "d,v,t", tempreg, tempreg, AT); used_at = 1; } @@ -4549,11 +4603,11 @@ macro (ip) tempreg, (int) BFD_RELOC_MIPS_HIGHEST); macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j", tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER); - macro_build (p, &icnt, NULL, "dsll", "d,w,<", + macro_build (p, &icnt, (expressionS *) NULL, "dsll", "d,w,<", tempreg, tempreg, 16); macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j", tempreg, tempreg, (int) BFD_RELOC_HI16_S); - macro_build (p, &icnt, NULL, "dsll", "d,w,<", + macro_build (p, &icnt, (expressionS *) NULL, "dsll", "d,w,<", tempreg, tempreg, 16); macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j", tempreg, tempreg, (int) BFD_RELOC_LO16); @@ -4619,8 +4673,7 @@ macro (ip) frag_grow (32); if (expr1.X_add_number == 0 && tempreg == PIC_CALL_REG) lw_reloc_type = (int) BFD_RELOC_MIPS_CALL16; - macro_build ((char *) NULL, &icnt, &offset_expr, - dbl ? "ld" : "lw", + macro_build ((char *) NULL, &icnt, &offset_expr, dbl ? "ld" : "lw", "t,o(b)", tempreg, lw_reloc_type, GP); if (expr1.X_add_number == 0) { @@ -4642,8 +4695,7 @@ macro (ip) (breg == 0 ? mips_opts.warn_about_macros : 0)), - offset_expr.X_add_symbol, (offsetT) 0, - (char *) NULL); + offset_expr.X_add_symbol, 0, NULL); if (breg == 0) { macro_build (p, &icnt, (expressionS *) NULL, "nop", ""); @@ -4664,10 +4716,9 @@ macro (ip) macro_build ((char *) NULL, &icnt, &expr1, HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu", "t,r,j", tempreg, tempreg, (int) BFD_RELOC_LO16); - (void) frag_var (rs_machine_dependent, 0, 0, - RELAX_ENCODE (0, 0, -12, -4, 0, 0), - offset_expr.X_add_symbol, (offsetT) 0, - (char *) NULL); + frag_var (rs_machine_dependent, 0, 0, + RELAX_ENCODE (0, 0, -12, -4, 0, 0), + offset_expr.X_add_symbol, 0, NULL); } else { @@ -4698,7 +4749,7 @@ macro (ip) inserting an unnecessary nop after the lw. */ hold_mips_optimize = mips_optimize; mips_optimize = 2; - macro_build_lui ((char *) NULL, &icnt, &expr1, AT); + macro_build_lui (NULL, &icnt, &expr1, AT); mips_optimize = hold_mips_optimize; macro_build ((char *) NULL, &icnt, &expr1, @@ -4707,10 +4758,9 @@ macro (ip) macro_build ((char *) NULL, &icnt, (expressionS *) NULL, HAVE_32BIT_ADDRESSES ? "addu" : "daddu", "d,v,t", tempreg, tempreg, AT); - (void) frag_var (rs_machine_dependent, 0, 0, - RELAX_ENCODE (0, 0, -16 + off1, -8, 0, 0), - offset_expr.X_add_symbol, (offsetT) 0, - (char *) NULL); + frag_var (rs_machine_dependent, 0, 0, + RELAX_ENCODE (0, 0, -16 + off1, -8, 0, 0), + offset_expr.X_add_symbol, 0, NULL); used_at = 1; } } @@ -4802,8 +4852,7 @@ macro (ip) (breg == 0 ? mips_opts.warn_about_macros : 0)), - offset_expr.X_add_symbol, (offsetT) 0, - (char *) NULL); + offset_expr.X_add_symbol, 0, NULL); } else if (expr1.X_add_number >= -0x8000 && expr1.X_add_number < 0x8000) @@ -4819,8 +4868,7 @@ macro (ip) (breg == 0 ? mips_opts.warn_about_macros : 0)), - offset_expr.X_add_symbol, (offsetT) 0, - (char *) NULL); + offset_expr.X_add_symbol, 0, NULL); } else { @@ -4854,7 +4902,7 @@ macro (ip) inserting an unnecessary nop after the lw. */ hold_mips_optimize = mips_optimize; mips_optimize = 2; - macro_build_lui ((char *) NULL, &icnt, &expr1, AT); + macro_build_lui (NULL, &icnt, &expr1, AT); mips_optimize = hold_mips_optimize; macro_build ((char *) NULL, &icnt, &expr1, @@ -4870,8 +4918,7 @@ macro (ip) (breg == 0 ? mips_opts.warn_about_macros : 0)), - offset_expr.X_add_symbol, (offsetT) 0, - (char *) NULL); + offset_expr.X_add_symbol, 0, NULL); used_at = 1; } @@ -5039,8 +5086,7 @@ macro (ip) "nop", ""); p = frag_var (rs_machine_dependent, 4, 0, RELAX_ENCODE (0, 4, -8, 0, 0, 0), - offset_expr.X_add_symbol, (offsetT) 0, - (char *) NULL); + offset_expr.X_add_symbol, 0, NULL); } else { @@ -5064,8 +5110,7 @@ macro (ip) p = frag_var (rs_machine_dependent, 12 + gpdel, 0, RELAX_ENCODE (16, 12 + gpdel, gpdel, 8 + gpdel, 0, 0), - offset_expr.X_add_symbol, (offsetT) 0, - (char *) NULL); + offset_expr.X_add_symbol, 0, NULL); if (gpdel > 0) { macro_build (p, &icnt, (expressionS *) NULL, "nop", ""); @@ -5287,6 +5332,46 @@ macro (ip) else fmt = "t,o(b)"; + /* For embedded PIC, we allow loads where the offset is calculated + by subtracting a symbol in the current segment from an unknown + symbol, relative to a base register, e.g.: + $treg, -($breg) + This is used by the compiler for switch statements. */ + if (mips_pic == EMBEDDED_PIC + && offset_expr.X_op == O_subtract + && (symbol_constant_p (offset_expr.X_op_symbol) + ? S_GET_SEGMENT (offset_expr.X_op_symbol) == now_seg + : (symbol_equated_p (offset_expr.X_op_symbol) + && (S_GET_SEGMENT + (symbol_get_value_expression (offset_expr.X_op_symbol) + ->X_add_symbol) + == now_seg))) + && breg != 0 + && (offset_expr.X_add_number == 0 + || OUTPUT_FLAVOR == bfd_target_elf_flavour)) + { + /* For this case, we output the instructions: + lui $tempreg, (BFD_RELOC_PCREL_HI16_S) + addiu $tempreg,$tempreg,$breg + $treg,($tempreg) (BFD_RELOC_PCREL_LO16) + If the relocation would fit entirely in 16 bits, it would be + nice to emit: + $treg,($breg) (BFD_RELOC_PCREL_LO16) + instead, but that seems quite difficult. */ + macro_build ((char *) NULL, &icnt, &offset_expr, "lui", "t,u", + tempreg, (int) BFD_RELOC_PCREL_HI16_S); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, + ((bfd_arch_bits_per_address (stdoutput) == 32 + || ! ISA_HAS_64BIT_REGS (mips_opts.isa)) + ? "addu" : "daddu"), + "d,v,t", tempreg, tempreg, breg); + macro_build ((char *) NULL, &icnt, &offset_expr, s, fmt, treg, + (int) BFD_RELOC_PCREL_LO16, tempreg); + if (! used_at) + return; + break; + } + if (offset_expr.X_op != O_constant && offset_expr.X_op != O_symbol) { @@ -5317,7 +5402,7 @@ macro (ip) addu $tempreg,$tempreg,$breg $treg,($tempreg) (BFD_RELOC_LO16) With a constant we always use the latter case. - + With 64bit address space and no base register and $at usable, we want lui $tempreg, (BFD_RELOC_MIPS_HIGHEST) @@ -5368,12 +5453,12 @@ macro (ip) macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j", tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER); if (breg != 0) - macro_build (p, &icnt, NULL, "daddu", "d,v,t", - AT, AT, breg); - macro_build (p, &icnt, NULL, "dsll32", "d,w,<", - tempreg, tempreg, 0); - macro_build (p, &icnt, NULL, "daddu", "d,v,t", - tempreg, tempreg, AT); + macro_build (p, &icnt, (expressionS *) NULL, "daddu", + "d,v,t", AT, AT, breg); + macro_build (p, &icnt, (expressionS *) NULL, "dsll32", + "d,w,<", tempreg, tempreg, 0); + macro_build (p, &icnt, (expressionS *) NULL, "daddu", + "d,v,t", tempreg, tempreg, AT); macro_build (p, &icnt, &offset_expr, s, fmt, treg, (int) BFD_RELOC_LO16, tempreg); used_at = 1; @@ -5384,22 +5469,22 @@ macro (ip) tempreg, (int) BFD_RELOC_MIPS_HIGHEST); macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j", tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER); - macro_build (p, &icnt, NULL, "dsll", "d,w,<", - tempreg, tempreg, 16); + macro_build (p, &icnt, (expressionS *) NULL, "dsll", + "d,w,<", tempreg, tempreg, 16); macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j", tempreg, tempreg, (int) BFD_RELOC_HI16_S); - macro_build (p, &icnt, NULL, "dsll", "d,w,<", - tempreg, tempreg, 16); + macro_build (p, &icnt, (expressionS *) NULL, "dsll", + "d,w,<", tempreg, tempreg, 16); if (breg != 0) - macro_build (p, &icnt, NULL, "daddu", "d,v,t", - tempreg, tempreg, breg); + macro_build (p, &icnt, (expressionS *) NULL, "daddu", + "d,v,t", tempreg, tempreg, breg); macro_build (p, &icnt, &offset_expr, s, fmt, treg, (int) BFD_RELOC_LO16, tempreg); } return; } - + if (breg == 0) { if ((valueT) offset_expr.X_add_number > MAX_GPREL_OFFSET @@ -5485,8 +5570,7 @@ macro (ip) macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", ""); p = frag_var (rs_machine_dependent, 4, 0, RELAX_ENCODE (0, 4, -8, 0, 0, 0), - offset_expr.X_add_symbol, (offsetT) 0, - (char *) NULL); + offset_expr.X_add_symbol, 0, NULL); macro_build (p, &icnt, &offset_expr, HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu", "t,r,j", tempreg, tempreg, (int) BFD_RELOC_LO16); @@ -5539,7 +5623,7 @@ macro (ip) tempreg); p = frag_var (rs_machine_dependent, 12 + gpdel, 0, RELAX_ENCODE (12, 12 + gpdel, gpdel, 8 + gpdel, 0, 0), - offset_expr.X_add_symbol, (offsetT) 0, (char *) NULL); + offset_expr.X_add_symbol, 0, NULL); if (gpdel > 0) { macro_build (p, &icnt, (expressionS *) NULL, "nop", ""); @@ -5891,6 +5975,11 @@ macro (ip) fmt = "t,o(b)"; ldd_std: + /* We do _not_ bother to allow embedded PIC (symbol-local_symbol) + loads for the case of doing a pair of loads to simulate an 'ld'. + This is not currently done by the compiler, and assembly coders + writing embedded-pic code can cope. */ + if (offset_expr.X_op != O_symbol && offset_expr.X_op != O_constant) { @@ -6071,8 +6160,7 @@ macro (ip) (void) frag_var (rs_machine_dependent, 0, 0, RELAX_ENCODE (0, 0, -16 - off, -8, 1, 0), - offset_expr.X_add_symbol, (offsetT) 0, - (char *) NULL); + offset_expr.X_add_symbol, 0, NULL); } else if (mips_pic == SVR4_PIC) { @@ -6141,8 +6229,7 @@ macro (ip) p = frag_var (rs_machine_dependent, 16 + gpdel + off, 0, RELAX_ENCODE (24 + off, 16 + gpdel + off, gpdel, 8 + gpdel + off, 1, 0), - offset_expr.X_add_symbol, (offsetT) 0, - (char *) NULL); + offset_expr.X_add_symbol, 0, NULL); if (gpdel > 0) { macro_build (p, &icnt, (expressionS *) NULL, "nop", ""); @@ -6339,10 +6426,10 @@ macro2 (ip) case M_DMUL: dbl = 1; case M_MUL: - macro_build ((char *) NULL, &icnt, NULL, - dbl ? "dmultu" : "multu", - "s,t", sreg, treg); - macro_build ((char *) NULL, &icnt, NULL, "mflo", "d", dreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, + dbl ? "dmultu" : "multu", "s,t", sreg, treg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mflo", "d", + dreg); return; case M_DMUL_I: @@ -6352,9 +6439,10 @@ macro2 (ip) not trying to be that fancy. GCC should do this for us anyway. */ load_register (&icnt, AT, &imm_expr, dbl); - macro_build ((char *) NULL, &icnt, NULL, + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, dbl ? "dmult" : "mult", "s,t", sreg, AT); - macro_build ((char *) NULL, &icnt, NULL, "mflo", "d", dreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mflo", "d", + dreg); break; case M_DMULO_I: @@ -6372,23 +6460,29 @@ macro2 (ip) mips_any_noreorder = 1; if (imm) load_register (&icnt, AT, &imm_expr, dbl); - macro_build ((char *) NULL, &icnt, NULL, + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, dbl ? "dmult" : "mult", "s,t", sreg, imm ? AT : treg); - macro_build ((char *) NULL, &icnt, NULL, "mflo", "d", dreg); - macro_build ((char *) NULL, &icnt, NULL, + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mflo", "d", + dreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, dbl ? "dsra32" : "sra", "d,w,<", dreg, dreg, 31); - macro_build ((char *) NULL, &icnt, NULL, "mfhi", "d", AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mfhi", "d", + AT); if (mips_trap) - macro_build ((char *) NULL, &icnt, NULL, "tne", "s,t", dreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "tne", "s,t", + dreg, AT); else { expr1.X_add_number = 8; - macro_build ((char *) NULL, &icnt, &expr1, "beq", "s,t,p", dreg, AT); - macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0); - macro_build ((char *) NULL, &icnt, NULL, "break", "c", 6); + macro_build ((char *) NULL, &icnt, &expr1, "beq", "s,t,p", dreg, + AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", "", + 0); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break", + "c", 6); } --mips_opts.noreorder; - macro_build ((char *) NULL, &icnt, NULL, "mflo", "d", dreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mflo", "d", dreg); break; case M_DMULOU_I: @@ -6406,57 +6500,70 @@ macro2 (ip) mips_any_noreorder = 1; if (imm) load_register (&icnt, AT, &imm_expr, dbl); - macro_build ((char *) NULL, &icnt, NULL, + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, dbl ? "dmultu" : "multu", "s,t", sreg, imm ? AT : treg); - macro_build ((char *) NULL, &icnt, NULL, "mfhi", "d", AT); - macro_build ((char *) NULL, &icnt, NULL, "mflo", "d", dreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mfhi", "d", + AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mflo", "d", + dreg); if (mips_trap) - macro_build ((char *) NULL, &icnt, NULL, "tne", "s,t", AT, 0); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "tne", "s,t", + AT, 0); else { expr1.X_add_number = 8; macro_build ((char *) NULL, &icnt, &expr1, "beq", "s,t,p", AT, 0); - macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0); - macro_build ((char *) NULL, &icnt, NULL, "break", "c", 6); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", "", + 0); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break", + "c", 6); } --mips_opts.noreorder; break; case M_ROL: - macro_build ((char *) NULL, &icnt, NULL, "subu", "d,v,t", AT, 0, treg); - macro_build ((char *) NULL, &icnt, NULL, "srlv", "d,t,s", AT, sreg, AT); - macro_build ((char *) NULL, &icnt, NULL, "sllv", "d,t,s", dreg, sreg, - treg); - macro_build ((char *) NULL, &icnt, NULL, "or", "d,v,t", dreg, dreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "subu", + "d,v,t", AT, 0, treg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "srlv", + "d,t,s", AT, sreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sllv", + "d,t,s", dreg, sreg, treg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "or", + "d,v,t", dreg, dreg, AT); break; case M_ROL_I: if (imm_expr.X_op != O_constant) as_bad (_("rotate count too large")); - macro_build ((char *) NULL, &icnt, NULL, "sll", "d,w,<", AT, sreg, - (int) (imm_expr.X_add_number & 0x1f)); - macro_build ((char *) NULL, &icnt, NULL, "srl", "d,w,<", dreg, sreg, - (int) ((0 - imm_expr.X_add_number) & 0x1f)); - macro_build ((char *) NULL, &icnt, NULL, "or", "d,v,t", dreg, dreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sll", "d,w,<", + AT, sreg, (int) (imm_expr.X_add_number & 0x1f)); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "srl", "d,w,<", + dreg, sreg, (int) ((0 - imm_expr.X_add_number) & 0x1f)); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "or", "d,v,t", + dreg, dreg, AT); break; case M_ROR: - macro_build ((char *) NULL, &icnt, NULL, "subu", "d,v,t", AT, 0, treg); - macro_build ((char *) NULL, &icnt, NULL, "sllv", "d,t,s", AT, sreg, AT); - macro_build ((char *) NULL, &icnt, NULL, "srlv", "d,t,s", dreg, sreg, - treg); - macro_build ((char *) NULL, &icnt, NULL, "or", "d,v,t", dreg, dreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "subu", + "d,v,t", AT, 0, treg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sllv", + "d,t,s", AT, sreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "srlv", + "d,t,s", dreg, sreg, treg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "or", + "d,v,t", dreg, dreg, AT); break; case M_ROR_I: if (imm_expr.X_op != O_constant) as_bad (_("rotate count too large")); - macro_build ((char *) NULL, &icnt, NULL, "srl", "d,w,<", AT, sreg, - (int) (imm_expr.X_add_number & 0x1f)); - macro_build ((char *) NULL, &icnt, NULL, "sll", "d,w,<", dreg, sreg, - (int) ((0 - imm_expr.X_add_number) & 0x1f)); - macro_build ((char *) NULL, &icnt, NULL, "or", "d,v,t", dreg, dreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "srl", "d,w,<", + AT, sreg, (int) (imm_expr.X_add_number & 0x1f)); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sll", "d,w,<", + dreg, sreg, (int) ((0 - imm_expr.X_add_number) & 0x1f)); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "or", "d,v,t", + dreg, dreg, AT); break; case M_S_DOB: @@ -6486,8 +6593,8 @@ macro2 (ip) sreg, (int) BFD_RELOC_LO16); else { - macro_build ((char *) NULL, &icnt, NULL, "xor", "d,v,t", dreg, - sreg, treg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "xor", + "d,v,t", dreg, sreg, treg); macro_build ((char *) NULL, &icnt, &expr1, "sltiu", "t,r,j", dreg, dreg, (int) BFD_RELOC_LO16); } @@ -6529,8 +6636,8 @@ macro2 (ip) else { load_register (&icnt, AT, &imm_expr, 0); - macro_build ((char *) NULL, &icnt, NULL, "xor", "d,v,t", dreg, - sreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "xor", + "d,v,t", dreg, sreg, AT); used_at = 1; } macro_build ((char *) NULL, &icnt, &expr1, "sltiu", "t,r,j", dreg, dreg, @@ -6545,7 +6652,8 @@ macro2 (ip) case M_SGEU: s = "sltu"; sge: - macro_build ((char *) NULL, &icnt, NULL, s, "d,v,t", dreg, sreg, treg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "d,v,t", + dreg, sreg, treg); macro_build ((char *) NULL, &icnt, &expr1, "xori", "t,r,i", dreg, dreg, (int) BFD_RELOC_LO16); return; @@ -6564,9 +6672,9 @@ macro2 (ip) else { load_register (&icnt, AT, &imm_expr, 0); - macro_build ((char *) NULL, &icnt, NULL, - mask == M_SGE_I ? "slt" : "sltu", - "d,v,t", dreg, sreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, + mask == M_SGE_I ? "slt" : "sltu", "d,v,t", dreg, sreg, + AT); used_at = 1; } macro_build ((char *) NULL, &icnt, &expr1, "xori", "t,r,i", dreg, dreg, @@ -6581,7 +6689,8 @@ macro2 (ip) case M_SGTU: s = "sltu"; sgt: - macro_build ((char *) NULL, &icnt, NULL, s, "d,v,t", dreg, treg, sreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "d,v,t", + dreg, treg, sreg); return; case M_SGT_I: /* sreg > I <==> I < sreg */ @@ -6591,28 +6700,31 @@ macro2 (ip) s = "sltu"; sgti: load_register (&icnt, AT, &imm_expr, 0); - macro_build ((char *) NULL, &icnt, NULL, s, "d,v,t", dreg, AT, sreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "d,v,t", + dreg, AT, sreg); break; - case M_SLE: /* sreg <= treg <==> treg >= sreg <==> not (treg < sreg) */ + case M_SLE: /* sreg <= treg <==> treg >= sreg <==> not (treg < sreg) */ s = "slt"; goto sle; case M_SLEU: s = "sltu"; sle: - macro_build ((char *) NULL, &icnt, NULL, s, "d,v,t", dreg, treg, sreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "d,v,t", + dreg, treg, sreg); macro_build ((char *) NULL, &icnt, &expr1, "xori", "t,r,i", dreg, dreg, (int) BFD_RELOC_LO16); return; - case M_SLE_I: /* sreg <= I <==> I >= sreg <==> not (I < sreg) */ + case M_SLE_I: /* sreg <= I <==> I >= sreg <==> not (I < sreg) */ s = "slt"; goto slei; case M_SLEU_I: s = "sltu"; slei: load_register (&icnt, AT, &imm_expr, 0); - macro_build ((char *) NULL, &icnt, NULL, s, "d,v,t", dreg, AT, sreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "d,v,t", + dreg, AT, sreg); macro_build ((char *) NULL, &icnt, &expr1, "xori", "t,r,i", dreg, dreg, (int) BFD_RELOC_LO16); break; @@ -6627,7 +6739,8 @@ macro2 (ip) return; } load_register (&icnt, AT, &imm_expr, 0); - macro_build ((char *) NULL, &icnt, NULL, "slt", "d,v,t", dreg, sreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "slt", "d,v,t", + dreg, sreg, AT); break; case M_SLTU_I: @@ -6640,31 +6753,31 @@ macro2 (ip) return; } load_register (&icnt, AT, &imm_expr, 0); - macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", dreg, sreg, - AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu", + "d,v,t", dreg, sreg, AT); break; case M_SNE: if (sreg == 0) - macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", dreg, 0, - treg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu", + "d,v,t", dreg, 0, treg); else if (treg == 0) - macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", dreg, 0, - sreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu", + "d,v,t", dreg, 0, sreg); else { - macro_build ((char *) NULL, &icnt, NULL, "xor", "d,v,t", dreg, - sreg, treg); - macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", dreg, 0, - dreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "xor", + "d,v,t", dreg, sreg, treg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu", + "d,v,t", dreg, 0, dreg); } return; case M_SNE_I: if (imm_expr.X_op == O_constant && imm_expr.X_add_number == 0) { - macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", dreg, 0, - sreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu", + "d,v,t", dreg, 0, sreg); return; } if (sreg == 0) @@ -6697,11 +6810,12 @@ macro2 (ip) else { load_register (&icnt, AT, &imm_expr, 0); - macro_build ((char *) NULL, &icnt, NULL, "xor", "d,v,t", dreg, - sreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "xor", + "d,v,t", dreg, sreg, AT); used_at = 1; } - macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", dreg, 0, dreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu", + "d,v,t", dreg, 0, dreg); if (used_at) break; return; @@ -6720,7 +6834,7 @@ macro2 (ip) return; } load_register (&icnt, AT, &imm_expr, dbl); - macro_build ((char *) NULL, &icnt, NULL, + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, dbl ? "dsub" : "sub", "d,v,t", dreg, sreg, AT); break; @@ -6738,7 +6852,7 @@ macro2 (ip) return; } load_register (&icnt, AT, &imm_expr, dbl); - macro_build ((char *) NULL, &icnt, NULL, + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, dbl ? "dsubu" : "subu", "d,v,t", dreg, sreg, AT); break; @@ -6761,7 +6875,8 @@ macro2 (ip) s = "tne"; trap: load_register (&icnt, AT, &imm_expr, 0); - macro_build ((char *) NULL, &icnt, NULL, s, "s,t", sreg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "s,t", sreg, + AT); break; case M_TRUNCWS: @@ -6777,21 +6892,25 @@ macro2 (ip) mips_emit_delays (true); ++mips_opts.noreorder; mips_any_noreorder = 1; - macro_build ((char *) NULL, &icnt, NULL, "cfc1", "t,G", treg, 31); - macro_build ((char *) NULL, &icnt, NULL, "cfc1", "t,G", treg, 31); - macro_build ((char *) NULL, &icnt, NULL, "nop", ""); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "cfc1", "t,G", + treg, 31); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "cfc1", "t,G", + treg, 31); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", ""); expr1.X_add_number = 3; macro_build ((char *) NULL, &icnt, &expr1, "ori", "t,r,i", AT, treg, (int) BFD_RELOC_LO16); expr1.X_add_number = 2; macro_build ((char *) NULL, &icnt, &expr1, "xori", "t,r,i", AT, AT, (int) BFD_RELOC_LO16); - macro_build ((char *) NULL, &icnt, NULL, "ctc1", "t,G", AT, 31); - macro_build ((char *) NULL, &icnt, NULL, "nop", ""); - macro_build ((char *) NULL, &icnt, NULL, + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "ctc1", "t,G", + AT, 31); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", ""); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, mask == M_TRUNCWD ? "cvt.w.d" : "cvt.w.s", "D,S", dreg, sreg); - macro_build ((char *) NULL, &icnt, NULL, "ctc1", "t,G", treg, 31); - macro_build ((char *) NULL, &icnt, NULL, "nop", ""); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "ctc1", "t,G", + treg, 31); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", ""); --mips_opts.noreorder; break; @@ -6814,8 +6933,10 @@ macro2 (ip) offset_expr.X_add_number += 1; macro_build ((char *) NULL, &icnt, &offset_expr, "lbu", "t,o(b)", AT, (int) BFD_RELOC_LO16, breg); - macro_build ((char *) NULL, &icnt, NULL, "sll", "d,w,<", treg, treg, 8); - macro_build ((char *) NULL, &icnt, NULL, "or", "d,v,t", treg, treg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sll", "d,w,<", + treg, treg, 8); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "or", "d,v,t", + treg, treg, AT); break; case M_ULD: @@ -6891,10 +7012,10 @@ macro2 (ip) expr1.X_add_number = 0; macro_build ((char *) NULL, &icnt, &expr1, "lbu", "t,o(b)", AT, (int) BFD_RELOC_LO16, AT); - macro_build ((char *) NULL, &icnt, NULL, "sll", "d,w,<", treg, - treg, 8); - macro_build ((char *) NULL, &icnt, NULL, "or", "d,v,t", treg, - treg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sll", "d,w,<", + treg, treg, 8); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "or", "d,v,t", + treg, treg, AT); break; case M_USH: @@ -6904,7 +7025,8 @@ macro2 (ip) offset_expr.X_add_number += 1; macro_build ((char *) NULL, &icnt, &offset_expr, "sb", "t,o(b)", treg, (int) BFD_RELOC_LO16, breg); - macro_build ((char *) NULL, &icnt, NULL, "srl", "d,w,<", AT, treg, 8); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "srl", "d,w,<", + AT, treg, 8); if (target_big_endian) offset_expr.X_add_number -= 1; else @@ -6978,8 +7100,8 @@ macro2 (ip) expr1.X_add_number = 0; macro_build ((char *) NULL, &icnt, &expr1, "sb", "t,o(b)", treg, (int) BFD_RELOC_LO16, AT); - macro_build ((char *) NULL, &icnt, NULL, "srl", "d,w,<", treg, - treg, 8); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "srl", "d,w,<", + treg, treg, 8); if (! target_big_endian) expr1.X_add_number = 1; else @@ -6992,10 +7114,10 @@ macro2 (ip) expr1.X_add_number = 1; macro_build ((char *) NULL, &icnt, &expr1, "lbu", "t,o(b)", AT, (int) BFD_RELOC_LO16, AT); - macro_build ((char *) NULL, &icnt, NULL, "sll", "d,w,<", treg, - treg, 8); - macro_build ((char *) NULL, &icnt, NULL, "or", "d,v,t", treg, - treg, AT); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sll", "d,w,<", + treg, treg, 8); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "or", "d,v,t", + treg, treg, AT); break; default: @@ -7054,19 +7176,20 @@ mips16_macro (ip) mips_emit_delays (true); ++mips_opts.noreorder; mips_any_noreorder = 1; - macro_build ((char *) NULL, &icnt, NULL, + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, dbl ? "ddiv" : "div", "0,x,y", xreg, yreg); expr1.X_add_number = 2; macro_build ((char *) NULL, &icnt, &expr1, "bnez", "x,p", yreg); - macro_build ((char *) NULL, &icnt, NULL, "break", "6", 7); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break", "6", + 7); /* FIXME: The normal code checks for of -1 / -0x80000000 here, since that causes an overflow. We should do that as well, but I don't see how to do the comparisons without a temporary register. */ --mips_opts.noreorder; - macro_build ((char *) NULL, &icnt, NULL, s, "x", zreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "x", zreg); break; case M_DIVU_3: @@ -7088,20 +7211,23 @@ mips16_macro (ip) mips_emit_delays (true); ++mips_opts.noreorder; mips_any_noreorder = 1; - macro_build ((char *) NULL, &icnt, NULL, s, "0,x,y", xreg, yreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "0,x,y", + xreg, yreg); expr1.X_add_number = 2; macro_build ((char *) NULL, &icnt, &expr1, "bnez", "x,p", yreg); - macro_build ((char *) NULL, &icnt, NULL, "break", "6", 7); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break", + "6", 7); --mips_opts.noreorder; - macro_build ((char *) NULL, &icnt, NULL, s2, "x", zreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s2, "x", zreg); break; case M_DMUL: dbl = 1; case M_MUL: - macro_build ((char *) NULL, &icnt, NULL, + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, dbl ? "dmultu" : "multu", "x,y", xreg, yreg); - macro_build ((char *) NULL, &icnt, NULL, "mflo", "x", zreg); + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mflo", "x", + zreg); return; case M_DSUBU_I: @@ -8214,23 +8340,11 @@ mips_ip (str, ip) /* If this value won't fit into a 16 bit offset, then go find a macro that will generate the 32 bit offset - code pattern. As a special hack, we accept the - difference of two local symbols as a constant. This - is required to suppose embedded PIC switches, which - use an instruction which looks like - lw $4,$L12-$LS12($4) - The problem with handling this in a more general - fashion is that the macro function doesn't expect to - see anything which can be handled in a single - constant instruction. */ + code pattern. */ if (c == S_EX_NONE && (offset_expr.X_op != O_constant || offset_expr.X_add_number >= 0x8000 - || offset_expr.X_add_number < -0x8000) - && (mips_pic != EMBEDDED_PIC - || offset_expr.X_op != O_subtract - || (S_GET_SEGMENT (offset_expr.X_add_symbol) - != S_GET_SEGMENT (offset_expr.X_op_symbol)))) + || offset_expr.X_add_number < -0x8000)) break; if (c == S_EX_HI) @@ -8263,14 +8377,14 @@ mips_ip (str, ip) if (imm_expr.X_op == O_constant) imm_expr.X_add_number = (imm_expr.X_add_number >> 16) & 0xffff; -#ifdef OBJ_ELF - else if (c == S_EX_HIGHEST) - *imm_reloc = BFD_RELOC_MIPS_HIGHEST; else if (c == S_EX_HI) { *imm_reloc = BFD_RELOC_HI16_S; imm_unmatched_hi = true; } +#ifdef OBJ_ELF + else if (c == S_EX_HIGHEST) + *imm_reloc = BFD_RELOC_MIPS_HIGHEST; else if (c == S_EX_GP_REL) { /* This occurs in NewABI only. */ @@ -8479,8 +8593,7 @@ mips16_ip (str, ip) && *imm_reloc > BFD_RELOC_UNUSED && insn->pinfo != INSN_MACRO) { - mips16_immed ((char *) NULL, 0, - *imm_reloc - BFD_RELOC_UNUSED, + mips16_immed (NULL, 0, *imm_reloc - BFD_RELOC_UNUSED, imm_expr.X_add_number, true, mips16_small, mips16_ext, &ip->insn_opcode, &ip->use_extend, &ip->extend); @@ -9166,9 +9279,9 @@ my_getSmallParser (str, len, nestlevel) *str = b; goto percent_op; } - else - /* Some other expression in the braces. */ - *len = strcspn (*str, ")") + 1; + + /* Some other expression in the braces. */ + *len = strcspn (*str, ")") + 1; } /* Check for percent_op. */ else if (*str[0] == '%') @@ -9222,7 +9335,7 @@ my_getSmallExpression (ep, str) /* Don't update oldstr if the last call had nested percent_op's. */ if (! oldstr) oldstr = str; - + do { oldc = c; @@ -9378,6 +9491,7 @@ md_number_to_chars (buf, val, n) number_to_chars_littleendian (buf, val, n); } +#ifdef OBJ_ELF static int support_64bit_objects(void) { const char **list, **l; @@ -9396,6 +9510,7 @@ static int support_64bit_objects(void) free (list); return (*l != NULL); } +#endif /* OBJ_ELF */ CONST char *md_shortopts = "nO::g::G:"; @@ -9410,83 +9525,82 @@ struct option md_longopts[] = {"mips3", no_argument, NULL, OPTION_MIPS3}, #define OPTION_MIPS4 (OPTION_MD_BASE + 4) {"mips4", no_argument, NULL, OPTION_MIPS4}, -#define OPTION_MCPU (OPTION_MD_BASE + 5) - {"mcpu", required_argument, NULL, OPTION_MCPU}, -#define OPTION_MEMBEDDED_PIC (OPTION_MD_BASE + 6) +#define OPTION_MIPS5 (OPTION_MD_BASE + 5) + {"mips5", no_argument, NULL, OPTION_MIPS5}, +#define OPTION_MIPS32 (OPTION_MD_BASE + 6) + {"mips32", no_argument, NULL, OPTION_MIPS32}, +#define OPTION_MIPS64 (OPTION_MD_BASE + 7) + {"mips64", no_argument, NULL, OPTION_MIPS64}, +#define OPTION_MEMBEDDED_PIC (OPTION_MD_BASE + 8) {"membedded-pic", no_argument, NULL, OPTION_MEMBEDDED_PIC}, -#define OPTION_TRAP (OPTION_MD_BASE + 7) +#define OPTION_TRAP (OPTION_MD_BASE + 9) {"trap", no_argument, NULL, OPTION_TRAP}, {"no-break", no_argument, NULL, OPTION_TRAP}, -#define OPTION_BREAK (OPTION_MD_BASE + 8) +#define OPTION_BREAK (OPTION_MD_BASE + 10) {"break", no_argument, NULL, OPTION_BREAK}, {"no-trap", no_argument, NULL, OPTION_BREAK}, -#define OPTION_EB (OPTION_MD_BASE + 9) +#define OPTION_EB (OPTION_MD_BASE + 11) {"EB", no_argument, NULL, OPTION_EB}, -#define OPTION_EL (OPTION_MD_BASE + 10) +#define OPTION_EL (OPTION_MD_BASE + 12) {"EL", no_argument, NULL, OPTION_EL}, -#define OPTION_M4650 (OPTION_MD_BASE + 11) - {"m4650", no_argument, NULL, OPTION_M4650}, -#define OPTION_NO_M4650 (OPTION_MD_BASE + 12) - {"no-m4650", no_argument, NULL, OPTION_NO_M4650}, -#define OPTION_M4010 (OPTION_MD_BASE + 13) - {"m4010", no_argument, NULL, OPTION_M4010}, -#define OPTION_NO_M4010 (OPTION_MD_BASE + 14) - {"no-m4010", no_argument, NULL, OPTION_NO_M4010}, -#define OPTION_M4100 (OPTION_MD_BASE + 15) - {"m4100", no_argument, NULL, OPTION_M4100}, -#define OPTION_NO_M4100 (OPTION_MD_BASE + 16) - {"no-m4100", no_argument, NULL, OPTION_NO_M4100}, -#define OPTION_MIPS16 (OPTION_MD_BASE + 17) +#define OPTION_MIPS16 (OPTION_MD_BASE + 13) {"mips16", no_argument, NULL, OPTION_MIPS16}, -#define OPTION_NO_MIPS16 (OPTION_MD_BASE + 18) +#define OPTION_NO_MIPS16 (OPTION_MD_BASE + 14) {"no-mips16", no_argument, NULL, OPTION_NO_MIPS16}, -#define OPTION_M3900 (OPTION_MD_BASE + 19) - {"m3900", no_argument, NULL, OPTION_M3900}, -#define OPTION_NO_M3900 (OPTION_MD_BASE + 20) - {"no-m3900", no_argument, NULL, OPTION_NO_M3900}, -#define OPTION_MABI (OPTION_MD_BASE + 21) - {"mabi", required_argument, NULL, OPTION_MABI}, -#define OPTION_M7000_HILO_FIX (OPTION_MD_BASE + 22) +#define OPTION_M7000_HILO_FIX (OPTION_MD_BASE + 15) {"mfix7000", no_argument, NULL, OPTION_M7000_HILO_FIX}, -#define OPTION_NO_M7000_HILO_FIX (OPTION_MD_BASE + 23) +#define OPTION_NO_M7000_HILO_FIX (OPTION_MD_BASE + 16) {"no-fix-7000", no_argument, NULL, OPTION_NO_M7000_HILO_FIX}, -#define OPTION_GP32 (OPTION_MD_BASE + 24) +#define OPTION_FP32 (OPTION_MD_BASE + 17) + {"mfp32", no_argument, NULL, OPTION_FP32}, +#define OPTION_GP32 (OPTION_MD_BASE + 18) {"mgp32", no_argument, NULL, OPTION_GP32}, -#define OPTION_GP64 (OPTION_MD_BASE + 25) - {"mgp64", no_argument, NULL, OPTION_GP64}, -#define OPTION_CONSTRUCT_FLOATS (OPTION_MD_BASE + 26) +#define OPTION_CONSTRUCT_FLOATS (OPTION_MD_BASE + 19) {"construct-floats", no_argument, NULL, OPTION_CONSTRUCT_FLOATS}, -#define OPTION_NO_CONSTRUCT_FLOATS (OPTION_MD_BASE + 27) +#define OPTION_NO_CONSTRUCT_FLOATS (OPTION_MD_BASE + 20) {"no-construct-floats", no_argument, NULL, OPTION_NO_CONSTRUCT_FLOATS}, -#define OPTION_MIPS32 (OPTION_MD_BASE + 28) - {"mips32", no_argument, NULL, OPTION_MIPS32}, -#define OPTION_MIPS5 (OPTION_MD_BASE + 29) - {"mips5", no_argument, NULL, OPTION_MIPS5}, -#define OPTION_MIPS64 (OPTION_MD_BASE + 30) - {"mips64", no_argument, NULL, OPTION_MIPS64}, -#define OPTION_MARCH (OPTION_MD_BASE + 31) +#define OPTION_MARCH (OPTION_MD_BASE + 21) {"march", required_argument, NULL, OPTION_MARCH}, -#define OPTION_MTUNE (OPTION_MD_BASE + 32) +#define OPTION_MTUNE (OPTION_MD_BASE + 22) {"mtune", required_argument, NULL, OPTION_MTUNE}, -#define OPTION_FP32 (OPTION_MD_BASE + 33) - {"mfp32", no_argument, NULL, OPTION_FP32}, +#define OPTION_MCPU (OPTION_MD_BASE + 23) + {"mcpu", required_argument, NULL, OPTION_MCPU}, +#define OPTION_M4650 (OPTION_MD_BASE + 24) + {"m4650", no_argument, NULL, OPTION_M4650}, +#define OPTION_NO_M4650 (OPTION_MD_BASE + 25) + {"no-m4650", no_argument, NULL, OPTION_NO_M4650}, +#define OPTION_M4010 (OPTION_MD_BASE + 26) + {"m4010", no_argument, NULL, OPTION_M4010}, +#define OPTION_NO_M4010 (OPTION_MD_BASE + 27) + {"no-m4010", no_argument, NULL, OPTION_NO_M4010}, +#define OPTION_M4100 (OPTION_MD_BASE + 28) + {"m4100", no_argument, NULL, OPTION_M4100}, +#define OPTION_NO_M4100 (OPTION_MD_BASE + 29) + {"no-m4100", no_argument, NULL, OPTION_NO_M4100}, +#define OPTION_M3900 (OPTION_MD_BASE + 30) + {"m3900", no_argument, NULL, OPTION_M3900}, +#define OPTION_NO_M3900 (OPTION_MD_BASE + 31) + {"no-m3900", no_argument, NULL, OPTION_NO_M3900}, +#define OPTION_GP64 (OPTION_MD_BASE + 32) + {"mgp64", no_argument, NULL, OPTION_GP64}, #ifdef OBJ_ELF -#define OPTION_ELF_BASE (OPTION_MD_BASE + 35) +#define OPTION_ELF_BASE (OPTION_MD_BASE + 33) #define OPTION_CALL_SHARED (OPTION_ELF_BASE + 0) -#define OPTION_NON_SHARED (OPTION_ELF_BASE + 1) -#define OPTION_XGOT (OPTION_ELF_BASE + 2) -#define OPTION_32 (OPTION_ELF_BASE + 3) -#define OPTION_N32 (OPTION_ELF_BASE + 4) -#define OPTION_64 (OPTION_ELF_BASE + 5) {"KPIC", no_argument, NULL, OPTION_CALL_SHARED}, {"call_shared", no_argument, NULL, OPTION_CALL_SHARED}, +#define OPTION_NON_SHARED (OPTION_ELF_BASE + 1) {"non_shared", no_argument, NULL, OPTION_NON_SHARED}, +#define OPTION_XGOT (OPTION_ELF_BASE + 2) {"xgot", no_argument, NULL, OPTION_XGOT}, +#define OPTION_MABI (OPTION_ELF_BASE + 3) + {"mabi", required_argument, NULL, OPTION_MABI}, +#define OPTION_32 (OPTION_ELF_BASE + 4) {"32", no_argument, NULL, OPTION_32}, +#define OPTION_N32 (OPTION_ELF_BASE + 5) {"n32", no_argument, NULL, OPTION_N32}, +#define OPTION_64 (OPTION_ELF_BASE + 6) {"64", no_argument, NULL, OPTION_64}, -#endif - +#endif /* OBJ_ELF */ {NULL, no_argument, NULL, 0} }; size_t md_longopts_size = sizeof (md_longopts); @@ -9751,55 +9865,57 @@ md_parse_option (c, arg) /* The -32 and -64 options tell the assembler to output the 32 bit or the 64 bit MIPS ELF format. */ case OPTION_32: - mips_abi = O32_ABI; + mips_opts.abi = O32_ABI; break; case OPTION_N32: - mips_abi = N32_ABI; + mips_opts.abi = N32_ABI; break; case OPTION_64: - mips_abi = N64_ABI; + mips_opts.abi = N64_ABI; if (! support_64bit_objects()) as_fatal (_("No compiled in support for 64 bit object file format")); break; +#endif /* OBJ_ELF */ case OPTION_GP32: - mips_gp32 = 1; - if (mips_abi != O32_ABI) - mips_abi = NO_ABI; + file_mips_gp32 = 1; + if (mips_opts.abi != O32_ABI) + mips_opts.abi = NO_ABI; break; case OPTION_GP64: - mips_gp32 = 0; - if (mips_abi == O32_ABI) - mips_abi = NO_ABI; + file_mips_gp32 = 0; + if (mips_opts.abi == O32_ABI) + mips_opts.abi = NO_ABI; break; case OPTION_FP32: - mips_fp32 = 1; - if (mips_abi != O32_ABI) - mips_abi = NO_ABI; + file_mips_fp32 = 1; + if (mips_opts.abi != O32_ABI) + mips_opts.abi = NO_ABI; break; +#ifdef OBJ_ELF case OPTION_MABI: if (strcmp (arg, "32") == 0) - mips_abi = O32_ABI; + mips_opts.abi = O32_ABI; else if (strcmp (arg, "o64") == 0) - mips_abi = O64_ABI; + mips_opts.abi = O64_ABI; else if (strcmp (arg, "n32") == 0) - mips_abi = N32_ABI; + mips_opts.abi = N32_ABI; else if (strcmp (arg, "64") == 0) { - mips_abi = N64_ABI; + mips_opts.abi = N64_ABI; if (! support_64bit_objects()) as_fatal (_("No compiled in support for 64 bit object file " "format")); } else if (strcmp (arg, "eabi") == 0) - mips_abi = EABI_ABI; + mips_opts.abi = EABI_ABI; else - mips_abi = NO_ABI; + mips_opts.abi = NO_ABI; break; #endif /* OBJ_ELF */ @@ -9981,7 +10097,7 @@ mips_frob_file_before_adjust () } /* Sort any unmatched HI16_S relocs so that they immediately precede - the corresponding LO reloc. This is called before md_apply_fix and + the corresponding LO reloc. This is called before md_apply_fix3 and tc_gen_reloc. Unmatched HI16_S relocs can only be generated by explicit use of the %hi modifier. */ @@ -10098,13 +10214,6 @@ mips_force_relocation (fixp) || fixp->fx_r_type == BFD_RELOC_LO16)) return 1; - if (HAVE_NEWABI - && S_GET_SEGMENT (fixp->fx_addsy) == bfd_abs_section_ptr - && (fixp->fx_r_type == BFD_RELOC_MIPS_SUB - || fixp->fx_r_type == BFD_RELOC_HI16_S - || fixp->fx_r_type == BFD_RELOC_LO16)) - return 1; - return (mips_pic == EMBEDDED_PIC && (fixp->fx_pcrel || SWITCH_TABLE (fixp) @@ -10112,12 +10221,32 @@ mips_force_relocation (fixp) || fixp->fx_r_type == BFD_RELOC_PCREL_LO16)); } +#ifdef OBJ_ELF +static int +mips_need_elf_addend_fixup (fixP) + fixS *fixP; +{ + return (S_GET_OTHER (fixP->fx_addsy) == STO_MIPS16 + || ((S_IS_WEAK (fixP->fx_addsy) + || S_IS_EXTERN (fixP->fx_addsy)) + && !S_IS_COMMON (fixP->fx_addsy)) + || (symbol_used_in_reloc_p (fixP->fx_addsy) + && (((bfd_get_section_flags (stdoutput, + S_GET_SEGMENT (fixP->fx_addsy)) + & SEC_LINK_ONCE) != 0) + || !strncmp (segment_name (S_GET_SEGMENT (fixP->fx_addsy)), + ".gnu.linkonce", + sizeof (".gnu.linkonce") - 1)))); +} +#endif + /* Apply a fixup to the object file. */ -int -md_apply_fix (fixP, valueP) +void +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - valueT *valueP; + valueT * valP; + segT seg ATTRIBUTE_UNUSED; { unsigned char *buf; long insn; @@ -10130,7 +10259,7 @@ md_apply_fix (fixP, valueP) || fixP->fx_r_type == BFD_RELOC_HI16_S || fixP->fx_r_type == BFD_RELOC_LO16 || fixP->fx_r_type == BFD_RELOC_GPREL16 - || fixP->fx_r_type == BFD_RELOC_MIPS_LITERAL + || fixP->fx_r_type == BFD_RELOC_MIPS_LITERAL || fixP->fx_r_type == BFD_RELOC_GPREL32 || fixP->fx_r_type == BFD_RELOC_64 || fixP->fx_r_type == BFD_RELOC_CTOR @@ -10143,31 +10272,19 @@ md_apply_fix (fixP, valueP) || fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY); - value = *valueP; + value = * valP; /* If we aren't adjusting this fixup to be against the section symbol, we need to adjust the value. */ #ifdef OBJ_ELF if (fixP->fx_addsy != NULL && OUTPUT_FLAVOR == bfd_target_elf_flavour) { - if (S_GET_OTHER (fixP->fx_addsy) == STO_MIPS16 - || ((S_IS_WEAK (fixP->fx_addsy) - || S_IS_EXTERN (fixP->fx_addsy)) - && !S_IS_COMMON (fixP->fx_addsy)) - || (symbol_used_in_reloc_p (fixP->fx_addsy) - && (((bfd_get_section_flags (stdoutput, - S_GET_SEGMENT (fixP->fx_addsy)) - & SEC_LINK_ONCE) != 0) - || !strncmp (segment_name (S_GET_SEGMENT (fixP->fx_addsy)), - ".gnu.linkonce", - sizeof (".gnu.linkonce") - 1)))) - + if (mips_need_elf_addend_fixup (fixP)) { valueT symval = S_GET_VALUE (fixP->fx_addsy); + value -= symval; - if (value != 0 - && ! fixP->fx_pcrel - && fixP->fx_r_type != BFD_RELOC_MIPS_GPREL) + if (value != 0 && ! fixP->fx_pcrel) { /* In this case, the bfd_install_relocation routine will incorrectly add the symbol value back in. We just want @@ -10231,7 +10348,7 @@ md_apply_fix (fixP, valueP) } #endif - fixP->fx_addnumber = value; /* Remember value for tc_gen_reloc */ + fixP->fx_addnumber = value; /* Remember value for tc_gen_reloc. */ if (fixP->fx_addsy == NULL && ! fixP->fx_pcrel) fixP->fx_done = 1; @@ -10471,8 +10588,6 @@ md_apply_fix (fixP, valueP) default: internalError (); } - - return 1; } #if 0 @@ -10961,10 +11076,6 @@ s_mipsset (x) else if (strncmp (name, "mips", 4) == 0) { int isa; - static int saved_mips_gp32; - static int saved_mips_fp32; - static enum mips_abi_level saved_mips_abi; - static int is_saved; /* Permit the user to change the ISA on the fly. Needless to say, misuse can cause serious problems. */ @@ -10972,41 +11083,28 @@ s_mipsset (x) switch (isa) { case 0: - mips_gp32 = saved_mips_gp32; - mips_fp32 = saved_mips_fp32; - mips_abi = saved_mips_abi; - is_saved = 0; + mips_opts.gp32 = file_mips_gp32; + mips_opts.fp32 = file_mips_fp32; + mips_opts.abi = file_mips_abi; break; case 1: case 2: case 32: - if (! is_saved) - { - saved_mips_gp32 = mips_gp32; - saved_mips_fp32 = mips_fp32; - saved_mips_abi = mips_abi; - } - mips_gp32 = 1; - mips_fp32 = 1; - is_saved = 1; + mips_opts.gp32 = 1; + mips_opts.fp32 = 1; break; case 3: case 4: case 5: case 64: - if (! is_saved) - { - saved_mips_gp32 = mips_gp32; - saved_mips_fp32 = mips_fp32; - saved_mips_abi = mips_abi; - } - mips_gp32 = 0; - mips_fp32 = 0; - mips_abi = NO_ABI; - is_saved = 1; + /* Loosen ABI register width restriction. */ + if (mips_opts.abi == O32_ABI) + mips_opts.abi = NO_ABI; + mips_opts.gp32 = 0; + mips_opts.fp32 = 0; break; default: - as_bad (_("unknown ISA level")); + as_bad (_("unknown ISA level %s"), name + 4); break; } @@ -11020,7 +11118,7 @@ s_mipsset (x) case 5: mips_opts.isa = ISA_MIPS5; break; case 32: mips_opts.isa = ISA_MIPS32; break; case 64: mips_opts.isa = ISA_MIPS64; break; - default: as_bad (_("unknown ISA level")); break; + default: as_bad (_("unknown ISA level %s"), name + 4); break; } } else if (strcmp (name, "autoextend") == 0) @@ -11127,7 +11225,7 @@ s_cpload (ignore) /* In ELF, this symbol is implicitly an STT_OBJECT symbol. */ symbol_get_bfdsym (ex.X_add_symbol)->flags |= BSF_OBJECT; - macro_build_lui ((char *) NULL, &icnt, &ex, GP); + macro_build_lui (NULL, &icnt, &ex, GP); macro_build ((char *) NULL, &icnt, &ex, "addiu", "t,r,j", GP, GP, (int) BFD_RELOC_LO16); @@ -11286,7 +11384,7 @@ s_cprestore (ignore) /* Handle the .cpreturn pseudo-op defined for NewABI PIC code. If an offset was given in the preceeding .gpsetup, it results in: ld $gp, offset($sp) - + If a register $reg2 was given there, it results in: daddiu $gp, $gp, $reg2 */ @@ -12162,6 +12260,19 @@ tc_gen_reloc (section, fixp) } } +#ifdef OBJ_ELF + /* md_apply_fix3 has a double-subtraction hack to get + bfd_install_relocation to behave nicely. GPREL relocations are + handled correctly without this hack, so undo it here. We can't + stop md_apply_fix3 from subtracting twice in the first place since + the fake addend is required for variant frags above. */ + if (fixp->fx_addsy != NULL && OUTPUT_FLAVOR == bfd_target_elf_flavour + && code == BFD_RELOC_MIPS_GPREL + && reloc->addend != 0 + && mips_need_elf_addend_fixup (fixp)) + reloc->addend += S_GET_VALUE (fixp->fx_addsy); +#endif + /* To support a PC relative reloc when generating embedded PIC code for ECOFF, we use a Cygnus extension. We check for that here to make sure that we don't let such a reloc escape normally. */ @@ -12195,7 +12306,7 @@ mips_relax_frag (fragp, stretch) if (! RELAX_MIPS16_P (fragp->fr_subtype)) return 0; - if (mips16_extended_frag (fragp, (asection *) NULL, stretch)) + if (mips16_extended_frag (fragp, NULL, stretch)) { if (RELAX_MIPS16_EXTENDED (fragp->fr_subtype)) return 0; @@ -12433,20 +12544,20 @@ mips_elf_final_processing () elf_elfheader (stdoutput)->e_flags |= EF_MIPS_PIC; /* Set the MIPS ELF ABI flags. */ - if (mips_abi == NO_ABI) + if (file_mips_abi == NO_ABI) ; - else if (mips_abi == O32_ABI) + else if (file_mips_abi == O32_ABI) elf_elfheader (stdoutput)->e_flags |= E_MIPS_ABI_O32; - else if (mips_abi == O64_ABI) + else if (file_mips_abi == O64_ABI) elf_elfheader (stdoutput)->e_flags |= E_MIPS_ABI_O64; - else if (mips_abi == EABI_ABI) + else if (file_mips_abi == EABI_ABI) { if (mips_eabi64) elf_elfheader (stdoutput)->e_flags |= E_MIPS_ABI_EABI64; else elf_elfheader (stdoutput)->e_flags |= E_MIPS_ABI_EABI32; } - else if (mips_abi == N32_ABI) + else if (file_mips_abi == N32_ABI) elf_elfheader (stdoutput)->e_flags |= EF_MIPS_ABI2; /* Nothing to do for "64". */ diff -uprN binutils-2.11.92.0.10/gas/config/tc-mips.h binutils-2.11.92.0.12/gas/config/tc-mips.h --- binutils-2.11.92.0.10/gas/config/tc-mips.h Mon Aug 27 11:44:51 2001 +++ binutils-2.11.92.0.12/gas/config/tc-mips.h Fri Nov 16 14:05:52 2001 @@ -111,7 +111,7 @@ extern int mips_fix_adjustable PARAMS (( #define TC_FORCE_RELOCATION(fixp) mips_force_relocation (fixp) extern int mips_force_relocation PARAMS ((struct fix *)); -/* md_apply_fix sets fx_done correctly. */ +/* md_apply_fix3 sets fx_done correctly. */ #define TC_HANDLE_FX_DONE 1 /* Register mask variables. These are set by the MIPS assembly code diff -uprN binutils-2.11.92.0.10/gas/config/tc-mmix.c binutils-2.11.92.0.12/gas/config/tc-mmix.c --- binutils-2.11.92.0.10/gas/config/tc-mmix.c Wed Dec 31 16:00:00 1969 +++ binutils-2.11.92.0.12/gas/config/tc-mmix.c Fri Nov 16 14:05:52 2001 @@ -0,0 +1,4178 @@ +/* tc-mmix.c -- Assembler for Don Knuth's MMIX. + Copyright (C) 2001 Free Software Foundation. + + This file is part of GAS, the GNU Assembler. + + GAS is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GAS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GAS; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Knuth's assembler mmixal does not provide a relocatable format; mmo is + to be considered a final link-format. In the final link, we make mmo, + but for relocatable files, we use ELF. + + One goal is to provide a superset of what mmixal does, including + compatible syntax, but the main purpose is to serve GCC. */ + + +#include +#include "as.h" +#include "subsegs.h" +#include "bfd.h" +#include "elf/mmix.h" +#include "opcode/mmix.h" +#include "safe-ctype.h" +#include "dwarf2dbg.h" +#include "obstack.h" + +/* Something to describe what we need to do with a fixup before output, + for example assert something of what it became or make a relocation. */ + +enum mmix_fixup_action + { + mmix_fixup_byte, + mmix_fixup_register, + mmix_fixup_register_or_adjust_for_byte + }; + +static int get_spec_regno PARAMS ((char *)); +static int get_operands PARAMS ((int, char *, expressionS[])); +static int get_putget_operands + PARAMS ((struct mmix_opcode *, char *, expressionS[])); +static void s_prefix PARAMS ((int)); +static void s_greg PARAMS ((int)); +static void s_loc PARAMS ((int)); +static void s_bspec PARAMS ((int)); +static void s_espec PARAMS ((int)); +static void mmix_s_local PARAMS ((int)); +static void mmix_greg_internal PARAMS ((char *)); +static void mmix_set_geta_branch_offset PARAMS ((char *, offsetT value)); +static void mmix_set_jmp_offset PARAMS ((char *, offsetT)); +static void mmix_fill_nops PARAMS ((char *, int)); +static int cmp_greg_symbol_fixes PARAMS ((const PTR, const PTR)); +static int cmp_greg_val_greg_symbol_fixes + PARAMS ((const PTR p1, const PTR p2)); +static void mmix_handle_rest_of_empty_line PARAMS ((void)); +static void mmix_discard_rest_of_line PARAMS ((void)); +static void mmix_byte PARAMS ((void)); +static void mmix_cons PARAMS ((int)); +static void mmix_frob_local_reloc PARAMS ((bfd *, asection *, PTR)); + +/* Continue the tradition of symbols.c; use control characters to enforce + magic. These are used when replacing e.g. 8F and 8B so we can handle + such labels correctly with the common parser hooks. */ +#define MAGIC_FB_BACKWARD_CHAR '\003' +#define MAGIC_FB_FORWARD_CHAR '\004' + +/* Copy the location of a frag to a fix. */ +#define COPY_FR_WHERE_TO_FX(FRAG, FIX) \ + do \ + { \ + (FIX)->fx_file = (FRAG)->fr_file; \ + (FIX)->fx_line = (FRAG)->fr_line; \ + } \ + while (0) + +const char *md_shortopts = "x"; +static int current_fb_label = -1; +static char *pending_label = NULL; + +static bfd_vma lowest_text_loc = (bfd_vma) -1; +static int text_has_contents = 0; + +/* The alignment of the previous instruction, and a boolean for whether we + want to avoid aligning the next WYDE, TETRA, OCTA or insn. */ +static int last_alignment = 0; +static int want_unaligned = 0; + +static bfd_vma lowest_data_loc = (bfd_vma) -1; +static int data_has_contents = 0; + +/* The fragS of the instruction being assembled. Only valid from within + md_assemble. */ +fragS *mmix_opcode_frag = NULL; + +/* Raw GREGs as appearing in input. These may be fewer than the number + after relaxing. */ +static int n_of_raw_gregs = 0; +static struct + { + char *label; + expressionS exp; + } mmix_raw_gregs[MAX_GREGS]; + +/* Fixups for all unique GREG registers. We store the fixups here in + md_convert_frag, then we use the array to convert + BFD_RELOC_MMIX_BASE_PLUS_OFFSET fixups in tc_gen_reloc. The index is + just a running number and is not supposed to be correlated to a + register number. */ +static fixS *mmix_gregs[MAX_GREGS]; +static int n_of_cooked_gregs = 0; + +/* Pointing to the register section we use for output. */ +static asection *real_reg_section; + +/* For each symbol; unknown or section symbol, we keep a list of GREG + definitions sorted on increasing offset. It seems no use keeping count + to allocate less room than the maximum number of gregs when we've found + one for a section or symbol. */ +struct mmix_symbol_gregs + { + int n_gregs; + struct mmix_symbol_greg_fixes + { + fixS *fix; + + /* A signed type, since we may have GREGs pointing slightly before the + contents of a section. */ + offsetT offs; + } greg_fixes[MAX_GREGS]; + }; + +/* Should read insert a colon on something that starts in column 0 on + this line? */ +static int label_without_colon_this_line = 1; + +/* Should we expand operands for external symbols? */ +static int expand_op = 1; + +/* Should we warn when expanding operands? FIXME: test-cases for when -x + is absent. */ +static int warn_on_expansion = 1; + +/* Should we merge non-zero GREG register definitions? */ +static int merge_gregs = 1; + +/* Should we emit built-in symbols? */ +static int predefined_syms = 1; + +/* Should we anything but the listed special register name (e.g. equated + symbols)? */ +static int equated_spec_regs = 1; + +/* Do we require standard GNU syntax? */ +int mmix_gnu_syntax = 0; + +/* Do we globalize all symbols? */ +int mmix_globalize_symbols = 0; + +/* Do we know that the next semicolon is at the end of the operands field + (in mmixal mode; constant 1 in GNU mode)? */ +int mmix_next_semicolon_is_eoln = 1; + +/* Do we have a BSPEC in progress? */ +static int doing_bspec = 0; +static char *bspec_file; +static unsigned int bspec_line; + +struct option md_longopts[] = + { +#define OPTION_RELAX (OPTION_MD_BASE) +#define OPTION_NOEXPAND (OPTION_RELAX + 1) +#define OPTION_NOMERGEGREG (OPTION_NOEXPAND + 1) +#define OPTION_NOSYMS (OPTION_NOMERGEGREG + 1) +#define OPTION_GNU_SYNTAX (OPTION_NOSYMS + 1) +#define OPTION_GLOBALIZE_SYMBOLS (OPTION_GNU_SYNTAX + 1) +#define OPTION_FIXED_SPEC_REGS (OPTION_GLOBALIZE_SYMBOLS + 1) + {"linkrelax", no_argument, NULL, OPTION_RELAX}, + {"no-expand", no_argument, NULL, OPTION_NOEXPAND}, + {"no-merge-gregs", no_argument, NULL, OPTION_NOMERGEGREG}, + {"no-predefined-syms", no_argument, NULL, OPTION_NOSYMS}, + {"gnu-syntax", no_argument, NULL, OPTION_GNU_SYNTAX}, + {"globalize-symbols", no_argument, NULL, OPTION_GLOBALIZE_SYMBOLS}, + {"fixed-special-register-names", no_argument, NULL, + OPTION_FIXED_SPEC_REGS}, + {NULL, no_argument, NULL, 0} + }; + +size_t md_longopts_size = sizeof (md_longopts); + +static struct hash_control *mmix_opcode_hash; + +/* We use these when implementing the PREFIX pseudo. */ +char *mmix_current_prefix; +struct obstack mmix_sym_obstack; + + +/* For MMIX, we encode the relax_substateT:s (in e.g. fr_substate) as one + bit length, and the relax-type shifted on top of that. There seems to + be no point in making the relaxation more fine-grained; the linker does + that better and we might interfere by changing non-optimal relaxations + into other insns that cannot be relaxed as easily. + + Groups for MMIX relaxing: + + 1. GETA + extra length: zero or three insns. + + 2. Bcc + extra length: zero or five insns. + + 3. PUSHJ + extra length: zero or four insns. + + 4. JMP + extra length: zero or four insns. */ + +#define STATE_GETA (1) +#define STATE_BCC (2) +#define STATE_PUSHJ (3) +#define STATE_JMP (4) +#define STATE_GREG (5) + +/* No fine-grainedness here. */ +#define STATE_LENGTH_MASK (1) + +#define STATE_ZERO (0) +#define STATE_MAX (1) + +/* More descriptive name for convenience. */ +/* FIXME: We should start on something different, not MAX. */ +#define STATE_UNDF STATE_MAX + +/* FIXME: For GREG, we must have other definitions; UNDF == MAX isn't + appropriate; we need it the other way round. This value together with + fragP->tc_frag_data shows what state the frag is in: tc_frag_data + non-NULL means 0, NULL means 8 bytes. */ +#define STATE_GREG_UNDF ENCODE_RELAX (STATE_GREG, STATE_ZERO) +#define STATE_GREG_DEF ENCODE_RELAX (STATE_GREG, STATE_MAX) + +/* These displacements are relative to the adress following the opcode + word of the instruction. The catch-all states have zero for "reach" + and "next" entries. */ + +#define GETA_0F (65536 * 4 - 8) +#define GETA_0B (-65536 * 4 - 4) + +#define GETA_MAX_LEN 4*4 +#define GETA_3F 0 +#define GETA_3B 0 + +#define BCC_0F GETA_0F +#define BCC_0B GETA_0B + +#define BCC_MAX_LEN 6*4 +#define BCC_5F GETA_3F +#define BCC_5B GETA_3B + +#define PUSHJ_0F GETA_0F +#define PUSHJ_0B GETA_0B + +#define PUSHJ_MAX_LEN 5*4 +#define PUSHJ_4F GETA_3F +#define PUSHJ_4B GETA_3B + +#define JMP_0F (65536 * 256 * 4 - 8) +#define JMP_0B (-65536 * 256 * 4 - 4) + +#define JMP_MAX_LEN 5*4 +#define JMP_4F 0 +#define JMP_4B 0 + +#define RELAX_ENCODE_SHIFT 1 +#define ENCODE_RELAX(what, length) (((what) << RELAX_ENCODE_SHIFT) + (length)) + +const relax_typeS mmix_relax_table[] = + { + /* Error sentinel (0, 0). */ + {1, 1, 0, 0}, + + /* Unused (0, 1). */ + {1, 1, 0, 0}, + + /* GETA (1, 0). */ + {GETA_0F, GETA_0B, 0, ENCODE_RELAX (STATE_GETA, STATE_MAX)}, + + /* GETA (1, 1). */ + {GETA_3F, GETA_3B, + GETA_MAX_LEN - 4, 0}, + + /* BCC (2, 0). */ + {BCC_0F, BCC_0B, 0, ENCODE_RELAX (STATE_BCC, STATE_MAX)}, + + /* BCC (2, 1). */ + {BCC_5F, BCC_5B, + BCC_MAX_LEN - 4, 0}, + + /* PUSHJ (3, 0). */ + {PUSHJ_0F, PUSHJ_0B, 0, ENCODE_RELAX (STATE_PUSHJ, STATE_MAX)}, + + /* PUSHJ (3, 1). */ + {PUSHJ_4F, PUSHJ_4B, + PUSHJ_MAX_LEN - 4, 0}, + + /* JMP (4, 0). */ + {JMP_0F, JMP_0B, 0, ENCODE_RELAX (STATE_JMP, STATE_MAX)}, + + /* JMP (4, 1). */ + {JMP_4F, JMP_4B, + JMP_MAX_LEN - 4, 0}, + + /* GREG (5, 0), (5, 1), though the table entry isn't used. */ + {0, 0, 0, 0}, {0, 0, 0, 0} +}; + +const pseudo_typeS md_pseudo_table[] = + { + /* Support " .greg sym,expr" syntax. */ + {"greg", s_greg, 0}, + + /* Support " .bspec expr" syntax. */ + {"bspec", s_bspec, 1}, + + /* Support " .espec" syntax. */ + {"espec", s_espec, 1}, + + /* Support " .local $45" syntax. */ + {"local", mmix_s_local, 1}, + + /* Support DWARF2 debugging info. */ + {"file", dwarf2_directive_file, 0}, + {"loc", dwarf2_directive_loc, 0}, + + {NULL, 0, 0} + }; + +const char mmix_comment_chars[] = "%!"; + +/* A ':' is a valid symbol character in mmixal. It's the prefix + delimiter, but other than that, it works like a symbol character, + except that we strip one off at the beginning of symbols. An '@' is a + symbol by itself (for the current location); space around it must not + be stripped. */ +const char mmix_symbol_chars[] = ":@"; + +const char line_comment_chars[] = "*#"; + +const char line_separator_chars[] = ";"; + +const char mmix_exp_chars[] = "eE"; + +const char mmix_flt_chars[] = "rf"; + + +/* Fill in the offset-related part of GETA or Bcc. */ + +static void +mmix_set_geta_branch_offset (opcodep, value) + char *opcodep; + offsetT value; +{ + if (value < 0) + { + value += 65536 * 4; + opcodep[0] |= 1; + } + + value /= 4; + md_number_to_chars (opcodep + 2, value, 2); +} + +/* Fill in the offset-related part of JMP. */ + +static void +mmix_set_jmp_offset (opcodep, value) + char *opcodep; + offsetT value; +{ + if (value < 0) + { + value += 65536 * 256 * 4; + opcodep[0] |= 1; + } + + value /= 4; + md_number_to_chars (opcodep + 1, value, 3); +} + +/* Fill in NOP:s for the expanded part of GETA/JMP/Bcc/PUSHJ. */ + +static void +mmix_fill_nops (opcodep, n) + char *opcodep; + int n; +{ + int i; + + for (i = 0; i < n; i++) + md_number_to_chars (opcodep + i*4, SWYM_INSN_BYTE << 24, 4); +} + +/* See macro md_parse_name in tc-mmix.h. */ + +int +mmix_current_location (fn, exp) + void (*fn) PARAMS ((expressionS *)); + expressionS *exp; +{ + (*fn) (exp); + + return 1; +} + +/* Get up to three operands, filling them into the exp array. + General idea and code stolen from the tic80 port. */ + +static int +get_operands (max_operands, s, exp) + int max_operands; + char *s; + expressionS exp[]; +{ + char *p = s; + int numexp = 0; + int nextchar = ','; + + while (nextchar == ',') + { + /* Skip leading whitespace */ + while (*p == ' ' || *p == '\t') + p++; + + /* Check to see if we have any operands left to parse */ + if (*p == 0 || *p == '\n' || *p == '\r') + { + break; + } + else if (numexp == max_operands) + { + /* This seems more sane than saying "too many operands". We'll + get here only if the trailing trash starts with a comma. */ + as_bad (_("invalid operands")); + mmix_discard_rest_of_line (); + return 0; + } + + /* Begin operand parsing at the current scan point. */ + + input_line_pointer = p; + expression (&exp[numexp]); + + if (exp[numexp].X_op == O_illegal) + { + as_bad (_("invalid operands")); + } + else if (exp[numexp].X_op == O_absent) + { + as_bad (_("missing operand")); + } + + numexp++; + p = input_line_pointer; + + /* Skip leading whitespace */ + while (*p == ' ' || *p == '\t') + p++; + nextchar = *p++; + } + + /* If we allow "naked" comments, ignore the rest of the line. */ + if (nextchar != ',') + { + mmix_handle_rest_of_empty_line (); + input_line_pointer--; + } + + /* Mark the end of the valid operands with an illegal expression. */ + exp[numexp].X_op = O_illegal; + + return (numexp); +} + +/* Get the value of a special register, or -1 if the name does not match + one. NAME is a null-terminated string. */ + +static int +get_spec_regno (name) + char *name; +{ + int i; + + if (name == NULL) + return -1; + + if (*name == ':') + name++; + + /* Well, it's a short array and we'll most often just match the first + entry, rJ. */ + for (i = 0; mmix_spec_regs[i].name != NULL; i++) + if (strcmp (name, mmix_spec_regs[i].name) == 0) + return mmix_spec_regs[i].number; + + return -1; +} + +/* For GET and PUT, parse the register names "manually", so we don't use + user labels. */ +static int +get_putget_operands (insn, operands, exp) + struct mmix_opcode *insn; + char *operands; + expressionS exp[]; +{ + expressionS *expp_reg; + expressionS *expp_sreg; + char *sregp = NULL; + char *sregend = operands; + char *p = operands; + char c = *sregend; + int regno; + + /* Skip leading whitespace */ + while (*p == ' ' || *p == '\t') + p++; + + input_line_pointer = p; + + if (insn->operands == mmix_operands_get) + { + expp_reg = &exp[0]; + expp_sreg = &exp[1]; + + expression (expp_reg); + + p = input_line_pointer; + + /* Skip whitespace */ + while (*p == ' ' || *p == '\t') + p++; + + if (*p == ',') + { + p++; + + /* Skip whitespace */ + while (*p == ' ' || *p == '\t') + p++; + sregp = p; + input_line_pointer = sregp; + c = get_symbol_end (); + sregend = input_line_pointer; + } + } + else + { + expp_sreg = &exp[0]; + expp_reg = &exp[1]; + + /* Initialize to error state in case we'll never call expression on + this operand. */ + expp_reg->X_op = O_illegal; + + sregp = p; + c = get_symbol_end (); + sregend = p = input_line_pointer; + *p = c; + + /* Skip whitespace */ + while (*p == ' ' || *p == '\t') + p++; + + if (*p == ',') + { + p++; + + /* Skip whitespace */ + while (*p == ' ' || *p == '\t') + p++; + + input_line_pointer = p; + expression (expp_reg); + } + *sregend = 0; + } + + regno = get_spec_regno (sregp); + *sregend = c; + + /* Let the caller issue errors; we've made sure the operands are + invalid. */ + if (expp_reg->X_op != O_illegal + && expp_reg->X_op != O_absent + && regno != -1) + { + expp_sreg->X_op = O_register; + expp_sreg->X_add_number = regno + 256; + } + + return 2; +} + +/* Handle MMIX-specific option. */ + +int +md_parse_option (c, arg) + int c; + char *arg ATTRIBUTE_UNUSED; +{ + switch (c) + { + case 'x': + warn_on_expansion = 0; + break; + + case OPTION_RELAX: + linkrelax = 1; + break; + + case OPTION_NOEXPAND: + expand_op = 0; + break; + + case OPTION_NOMERGEGREG: + merge_gregs = 0; + break; + + case OPTION_NOSYMS: + predefined_syms = 0; + equated_spec_regs = 0; + break; + + case OPTION_GNU_SYNTAX: + mmix_gnu_syntax = 1; + label_without_colon_this_line = 0; + break; + + case OPTION_GLOBALIZE_SYMBOLS: + mmix_globalize_symbols = 1; + break; + + case OPTION_FIXED_SPEC_REGS: + equated_spec_regs = 0; + break; + + default: + return 0; + } + + return 1; +} + +/* Display MMIX-specific help text. */ + +void +md_show_usage (stream) + FILE * stream; +{ + fprintf (stream, _(" MMIX-specific command line options:\n")); + fprintf (stream, _("\ + -fixed-special-register-names\n\ + Allow only the original special register names.\n")); + fprintf (stream, _("\ + -globalize-symbols Make all symbols global.\n")); + fprintf (stream, _("\ + -gnu-syntax Turn off mmixal syntax compatibility.\n")); + fprintf (stream, _("\ + -relax Create linker relaxable code.\n")); + fprintf (stream, _("\ + -no-predefined-syms Do not provide mmixal built-in constants.\n\ + Implies -fixed-special-register-names.\n")); + fprintf (stream, _("\ + -no-expand Do not expand GETA, branches, PUSHJ or JUMP\n\ + into multiple instructions.\n")); + fprintf (stream, _("\ + -no-merge-gregs Do not merge GREG definitions with nearby values.\n")); + fprintf (stream, _("\ + -x Do not warn when an operand to GETA, a branch,\n\ + PUSHJ or JUMP is not known to be within range.\n\ + The linker will catch any errors.\n")); +} + +/* Step to end of line, but don't step over the end of the line. */ + +static void +mmix_discard_rest_of_line () +{ + while (*input_line_pointer + && (! is_end_of_line [(unsigned char) *input_line_pointer] + || TC_EOL_IN_INSN (input_line_pointer))) + input_line_pointer++; +} + +/* Act as demand_empty_rest_of_line if we're in strict GNU syntax mode, + otherwise just ignore the rest of the line (and skip the end-of-line + delimiter). */ + +static void +mmix_handle_rest_of_empty_line () +{ + if (mmix_gnu_syntax) + demand_empty_rest_of_line (); + else + { + mmix_discard_rest_of_line (); + input_line_pointer++; + } +} + +/* Initialize GAS MMIX specifics. */ + +void +mmix_md_begin () +{ + int i; + const struct mmix_opcode *opcode; + + /* We assume nobody will use this, so don't allocate any room. */ + obstack_begin (&mmix_sym_obstack, 0); + + /* This will break the day the "lex" thingy changes. For now, it's the + only way to make ':' part of a name, and a name beginner. */ + lex_type [':'] = (LEX_NAME | LEX_BEGIN_NAME); + + mmix_opcode_hash = hash_new (); + + real_reg_section + = bfd_make_section_old_way (stdoutput, MMIX_REG_SECTION_NAME); + + for (opcode = mmix_opcodes; opcode->name; opcode++) + hash_insert (mmix_opcode_hash, opcode->name, (char *) opcode); + + /* We always insert the ordinary registers 0..255 as registers. */ + for (i = 0; i < 256; i++) + { + char buf[5]; + + /* Alternatively, we could diddle with '$' and the following number, + but keeping the registers as symbols helps keep parsing simple. */ + sprintf (buf, "$%d", i); + symbol_table_insert (symbol_new (buf, reg_section, i, + &zero_address_frag)); + } + + /* Insert mmixal built-in names if allowed. */ + if (predefined_syms) + { + for (i = 0; mmix_spec_regs[i].name != NULL; i++) + symbol_table_insert (symbol_new (mmix_spec_regs[i].name, + reg_section, + mmix_spec_regs[i].number + 256, + &zero_address_frag)); + + /* FIXME: Perhaps these should be recognized as specials; as field + names for those instructions. */ + symbol_table_insert (symbol_new ("ROUND_CURRENT", reg_section, 512, + &zero_address_frag)); + symbol_table_insert (symbol_new ("ROUND_OFF", reg_section, 512 + 1, + &zero_address_frag)); + symbol_table_insert (symbol_new ("ROUND_UP", reg_section, 512 + 2, + &zero_address_frag)); + symbol_table_insert (symbol_new ("ROUND_DOWN", reg_section, 512 + 3, + &zero_address_frag)); + symbol_table_insert (symbol_new ("ROUND_NEAR", reg_section, 512 + 4, + &zero_address_frag)); + } +} + +/* Assemble one insn in STR. */ + +void +md_assemble (str) + char *str; +{ + char *operands = str; + char modified_char = 0; + struct mmix_opcode *instruction; + fragS *opc_fragP = NULL; + int max_operands = 3; + + /* Note that the struct frag member fr_literal in frags.h is char[], so + I have to make this a plain char *. */ + /* unsigned */ char *opcodep = NULL; + + expressionS exp[4]; + int n_operands = 0; + + /* Move to end of opcode. */ + for (operands = str; + is_part_of_name (*operands); + ++operands) + ; + + if (ISSPACE (*operands)) + { + modified_char = *operands; + *operands++ = '\0'; + } + + instruction = (struct mmix_opcode *) hash_find (mmix_opcode_hash, str); + if (instruction == NULL) + { + as_bad (_("unknown opcode: `%s'"), str); + + /* Avoid "unhandled label" errors. */ + pending_label = NULL; + return; + } + + /* Put back the character after the opcode. */ + if (modified_char != 0) + operands[-1] = modified_char; + + input_line_pointer = operands; + + /* Is this a mmixal pseudodirective? */ + if (instruction->type == mmix_type_pseudo) + { + /* For mmixal compatibility, a label for an instruction (and + emitting pseudo) refers to the _aligned_ address. We emit the + label here for the pseudos that don't handle it themselves. When + having an fb-label, emit it here, and increment the counter after + the pseudo. */ + switch (instruction->operands) + { + case mmix_operands_loc: + case mmix_operands_byte: + case mmix_operands_prefix: + case mmix_operands_local: + case mmix_operands_bspec: + case mmix_operands_espec: + if (current_fb_label >= 0) + colon (fb_label_name (current_fb_label, 1)); + else if (pending_label != NULL) + { + colon (pending_label); + pending_label = NULL; + } + break; + + default: + break; + } + + /* Some of the pseudos emit contents, others don't. Set a + contents-emitted flag when we emit something into .text */ + switch (instruction->operands) + { + case mmix_operands_loc: + /* LOC */ + s_loc (0); + break; + + case mmix_operands_byte: + /* BYTE */ + mmix_byte (); + break; + + case mmix_operands_wyde: + /* WYDE */ + mmix_cons (2); + break; + + case mmix_operands_tetra: + /* TETRA */ + mmix_cons (4); + break; + + case mmix_operands_octa: + /* OCTA */ + mmix_cons (8); + break; + + case mmix_operands_prefix: + /* PREFIX */ + s_prefix (0); + break; + + case mmix_operands_local: + /* LOCAL */ + mmix_s_local (0); + break; + + case mmix_operands_bspec: + /* BSPEC */ + s_bspec (0); + break; + + case mmix_operands_espec: + /* ESPEC */ + s_espec (0); + break; + + default: + BAD_CASE (instruction->operands); + } + + /* These are all working like the pseudo functions in read.c:s_..., + in that they step over the end-of-line marker at the end of the + line. We don't want that here. */ + input_line_pointer--; + + /* Step up the fb-label counter if there was a definition on this + line. */ + if (current_fb_label >= 0) + { + fb_label_instance_inc (current_fb_label); + current_fb_label = -1; + } + + /* Reset any don't-align-next-datum request, unless this was a LOC + directive. */ + if (instruction->operands != mmix_operands_loc) + want_unaligned = 0; + + return; + } + + /* Not a pseudo; we *will* emit contents. */ + if (now_seg == data_section) + { + if (lowest_data_loc != (bfd_vma) -1 && (lowest_data_loc & 3) != 0) + { + if (data_has_contents) + as_bad (_("specified location wasn't TETRA-aligned")); + else if (want_unaligned) + as_bad (_("unaligned data at an absolute location is not supported")); + + lowest_data_loc &= ~(bfd_vma) 3; + lowest_data_loc += 4; + } + + data_has_contents = 1; + } + else if (now_seg == text_section) + { + if (lowest_text_loc != (bfd_vma) -1 && (lowest_text_loc & 3) != 0) + { + if (text_has_contents) + as_bad (_("specified location wasn't TETRA-aligned")); + else if (want_unaligned) + as_bad (_("unaligned data at an absolute location is not supported")); + + lowest_text_loc &= ~(bfd_vma) 3; + lowest_text_loc += 4; + } + + text_has_contents = 1; + } + + /* After a sequence of BYTEs or WYDEs, we need to get to instruction + alignment. For other pseudos, a ".p2align 2" is supposed to be + inserted by the user. */ + if (last_alignment < 2 && ! want_unaligned) + { + frag_align (2, 0, 0); + record_alignment (now_seg, 2); + last_alignment = 2; + } + else + /* Reset any don't-align-next-datum request. */ + want_unaligned = 0; + + /* For mmixal compatibility, a label for an instruction (and emitting + pseudo) refers to the _aligned_ address. So we have to emit the + label here. */ + if (pending_label != NULL) + { + colon (pending_label); + pending_label = NULL; + } + + /* We assume that mmix_opcodes keeps having unique mnemonics for each + opcode, so we don't have to iterate over more than one opcode; if the + syntax does not match, then there's a syntax error. */ + + /* Operands have little or no context and are all comma-separated; it is + easier to parse each expression first. */ + switch (instruction->operands) + { + case mmix_operands_reg_yz: + case mmix_operands_pop: + case mmix_operands_regaddr: + case mmix_operands_pushj: + case mmix_operands_get: + case mmix_operands_put: + case mmix_operands_set: + case mmix_operands_save: + case mmix_operands_unsave: + max_operands = 2; + break; + + case mmix_operands_sync: + case mmix_operands_jmp: + case mmix_operands_resume: + max_operands = 1; + break; + + /* The original 3 is fine for the rest. */ + default: + break; + } + + /* If this is GET or PUT, and we don't do allow those names to be + equated, we need to parse the names ourselves, so we don't pick up a + user label instead of the special register. */ + if (! equated_spec_regs + && (instruction->operands == mmix_operands_get + || instruction->operands == mmix_operands_put)) + n_operands = get_putget_operands (instruction, operands, exp); + else + n_operands = get_operands (max_operands, operands, exp); + + /* If there's a fb-label on the current line, set that label. This must + be done *after* evaluating expressions of operands, since neither a + "1B" nor a "1F" refers to "1H" on the same line. */ + if (current_fb_label >= 0) + { + fb_label_instance_inc (current_fb_label); + colon (fb_label_name (current_fb_label, 0)); + current_fb_label = -1; + } + + /* We also assume that the length of the instruction is determinable + from the first format character. Currently *all* the information is + in the first character. We need a self-contained frag since we want + the relocation to point to the instruction, not the variant part. */ + + opcodep = frag_more (4); + mmix_opcode_frag = opc_fragP = frag_now; + frag_now->fr_opcode = opcodep; + + /* Mark start of insn for DWARF2 debug features. */ + if (OUTPUT_FLAVOR == bfd_target_elf_flavour) + dwarf2_emit_insn (4); + + md_number_to_chars (opcodep, instruction->match, 4); + + switch (instruction->operands) + { + case mmix_operands_jmp: + if (n_operands == 0 && ! mmix_gnu_syntax) + /* Zeros are in place - nothing needs to be done when we have no + operands. */ + break; + + /* Add a frag for a JMP relaxation; we need room for max four + extra instructions. We don't do any work around here to check if + we can determine the offset right away. */ + if (n_operands != 1 || exp[0].X_op == O_register) + { + as_bad (_("invalid operand to opcode %s: `%s'"), + instruction->name, operands); + return; + } + + if (expand_op) + frag_var (rs_machine_dependent, 4*4, 0, + ENCODE_RELAX (STATE_JMP, STATE_UNDF), + exp[0].X_add_symbol, + exp[0].X_add_number, + opcodep); + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal, 4, + exp + 0, 1, BFD_RELOC_MMIX_ADDR27); + break; + + case mmix_operands_pushj: + /* We take care of PUSHJ in full here. */ + if (n_operands != 2 + || ((exp[0].X_op == O_constant || exp[0].X_op == O_register) + && (exp[0].X_add_number > 255 || exp[0].X_add_number < 0))) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + + if (exp[0].X_op == O_register || exp[0].X_op == O_constant) + opcodep[1] = exp[0].X_add_number; + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 1, + 1, exp + 0, 0, BFD_RELOC_MMIX_REG_OR_BYTE); + + if (expand_op) + frag_var (rs_machine_dependent, PUSHJ_MAX_LEN - 4, 0, + ENCODE_RELAX (STATE_PUSHJ, STATE_UNDF), + exp[1].X_add_symbol, + exp[1].X_add_number, + opcodep); + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal, 4, + exp + 1, 1, BFD_RELOC_MMIX_ADDR19); + break; + + case mmix_operands_regaddr: + /* GETA/branch: Add a frag for relaxation. We don't do any work + around here to check if we can determine the offset right away. */ + if (n_operands != 2 || exp[1].X_op == O_register) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + + if (! expand_op) + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal, 4, + exp + 1, 1, BFD_RELOC_MMIX_ADDR19); + else if (instruction->type == mmix_type_condbranch) + frag_var (rs_machine_dependent, BCC_MAX_LEN - 4, 0, + ENCODE_RELAX (STATE_BCC, STATE_UNDF), + exp[1].X_add_symbol, + exp[1].X_add_number, + opcodep); + else + frag_var (rs_machine_dependent, GETA_MAX_LEN - 4, 0, + ENCODE_RELAX (STATE_GETA, STATE_UNDF), + exp[1].X_add_symbol, + exp[1].X_add_number, + opcodep); + break; + + default: + break; + } + + switch (instruction->operands) + { + case mmix_operands_regs: + /* We check the number of operands here, since we're in a + FALLTHROUGH sequence in the next switch. */ + if (n_operands != 3 || exp[2].X_op == O_constant) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + /* FALLTHROUGH. */ + case mmix_operands_regs_z: + if (n_operands != 3) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + /* FALLTHROUGH. */ + case mmix_operands_reg_yz: + case mmix_operands_roundregs_z: + case mmix_operands_roundregs: + case mmix_operands_regs_z_opt: + case mmix_operands_neg: + case mmix_operands_regaddr: + case mmix_operands_get: + case mmix_operands_set: + case mmix_operands_save: + if (n_operands < 1 + || (exp[0].X_op == O_register && exp[0].X_add_number > 255)) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + + if (exp[0].X_op == O_register) + opcodep[1] = exp[0].X_add_number; + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 1, + 1, exp + 0, 0, BFD_RELOC_MMIX_REG); + break; + + default: + ; + } + + /* A corresponding once-over for those who take an 8-bit constant as + their first operand. */ + switch (instruction->operands) + { + case mmix_operands_pushgo: + /* PUSHGO: X is a constant, but can be expressed as a register. + We handle X here and use the common machinery of T,X,3,$ for + the rest of the operands. */ + if (n_operands < 2 + || ((exp[0].X_op == O_constant || exp[0].X_op == O_register) + && (exp[0].X_add_number > 255 || exp[0].X_add_number < 0))) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + else if (exp[0].X_op == O_constant || exp[0].X_op == O_register) + opcodep[1] = exp[0].X_add_number; + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 1, + 1, exp + 0, 0, BFD_RELOC_MMIX_REG_OR_BYTE); + break; + + case mmix_operands_pop: + if ((n_operands == 0 || n_operands == 1) && ! mmix_gnu_syntax) + break; + /* FALLTHROUGH. */ + case mmix_operands_x_regs_z: + if (n_operands < 1 + || (exp[0].X_op == O_constant + && (exp[0].X_add_number > 255 + || exp[0].X_add_number < 0))) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + + if (exp[0].X_op == O_constant) + opcodep[1] = exp[0].X_add_number; + else + /* FIXME: This doesn't bring us unsignedness checking. */ + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 1, + 1, exp + 0, 0, BFD_RELOC_8); + default: + ; + } + + /* Handle the rest. */ + switch (instruction->operands) + { + case mmix_operands_set: + /* SET: Either two registers, "$X,$Y", with Z field as zero, or + "$X,YZ", meaning change the opcode to SETL. */ + if (n_operands != 2 + || (exp[1].X_op == O_constant + && (exp[1].X_add_number > 0xffff || exp[1].X_add_number < 0))) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + + if (exp[1].X_op == O_constant) + { + /* There's an ambiguity with "SET $0,Y" when Y isn't defined + yet. To keep things simple, we assume that Y is then a + register, and only change the opcode if Y is defined at this + point. + + There's no compatibility problem with mmixal, since it emits + errors if the field is not defined at this point. */ + md_number_to_chars (opcodep, SETL_INSN_BYTE, 1); + + opcodep[2] = (exp[1].X_add_number >> 8) & 255; + opcodep[3] = exp[1].X_add_number & 255; + break; + } + /* FALLTHROUGH. */ + case mmix_operands_x_regs_z: + /* SYNCD: "X,$Y,$Z|Z". */ + /* FALLTHROUGH. */ + case mmix_operands_regs: + /* Three registers, $X,$Y,$Z. */ + /* FALLTHROUGH. */ + case mmix_operands_regs_z: + /* Operands "$X,$Y,$Z|Z", number of arguments checked above. */ + /* FALLTHROUGH. */ + case mmix_operands_pushgo: + /* Operands "$X|X,$Y,$Z|Z", optional Z. */ + /* FALLTHROUGH. */ + case mmix_operands_regs_z_opt: + /* Operands "$X,$Y,$Z|Z", with $Z|Z being optional, default 0. Any + operands not completely decided yet are postponed to later in + assembly (but not until link-time yet). */ + + if ((n_operands != 2 && n_operands != 3) + || (exp[1].X_op == O_register && exp[1].X_add_number > 255) + || (n_operands == 3 + && ((exp[2].X_op == O_register + && exp[2].X_add_number > 255 + && mmix_gnu_syntax) + || (exp[2].X_op == O_constant + && (exp[2].X_add_number > 255 + || exp[2].X_add_number < 0))))) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + + if (n_operands == 2) + { + symbolS *sym; + + /* The last operand is immediate whenever we see just two + operands. */ + opcodep[0] |= IMM_OFFSET_BIT; + + /* Now, we could either have an implied "0" as the Z operand, or + it could be the constant of a "base address plus offset". It + depends on whether it is allowed; only memory operations, as + signified by instruction->type and "T" and "X" operand types, + and it depends on whether we find a register in the second + operand, exp[1]. */ + if (exp[1].X_op == O_register && exp[1].X_add_number <= 255) + { + /* A zero then; all done. */ + opcodep[2] = exp[1].X_add_number; + break; + } + + /* Not known as a register. Is base address plus offset + allowed, or can we assume that it is a register anyway? */ + if ((instruction->operands != mmix_operands_regs_z_opt + && instruction->operands != mmix_operands_x_regs_z + && instruction->operands != mmix_operands_pushgo) + || (instruction->type != mmix_type_memaccess_octa + && instruction->type != mmix_type_memaccess_tetra + && instruction->type != mmix_type_memaccess_wyde + && instruction->type != mmix_type_memaccess_byte + && instruction->type != mmix_type_memaccess_block + && instruction->type != mmix_type_jsr + && instruction->type != mmix_type_branch)) + { + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 2, + 1, exp + 1, 0, BFD_RELOC_MMIX_REG); + break; + } + + /* To avoid getting a NULL add_symbol for constants and then + catching a SEGV in write_relocs since it doesn't handle + constants well for relocs other than PC-relative, we need to + pass expressions as symbols and use fix_new, not fix_new_exp. */ + sym = make_expr_symbol (exp + 1); + + /* Now we know it can be a "base address plus offset". Add + proper fixup types so we can handle this later, when we've + parsed everything. */ + fix_new (opc_fragP, opcodep - opc_fragP->fr_literal + 2, + 8, sym, 0, 0, BFD_RELOC_MMIX_BASE_PLUS_OFFSET); + break; + } + + if (exp[1].X_op == O_register) + opcodep[2] = exp[1].X_add_number; + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 2, + 1, exp + 1, 0, BFD_RELOC_MMIX_REG); + + /* In mmixal compatibility mode, we allow special registers as + constants for the Z operand. They have 256 added to their + register numbers, so the right thing will happen if we just treat + those as constants. */ + if (exp[2].X_op == O_register && exp[2].X_add_number <= 255) + opcodep[3] = exp[2].X_add_number; + else if (exp[2].X_op == O_constant + || (exp[2].X_op == O_register && exp[2].X_add_number > 255)) + { + opcodep[3] = exp[2].X_add_number; + opcodep[0] |= IMM_OFFSET_BIT; + } + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 3, + 1, exp + 2, 0, + (instruction->operands == mmix_operands_set + || instruction->operands == mmix_operands_regs) + ? BFD_RELOC_MMIX_REG : BFD_RELOC_MMIX_REG_OR_BYTE); + break; + + case mmix_operands_pop: + /* POP, one eight and one 16-bit operand. */ + if (n_operands == 0 && ! mmix_gnu_syntax) + break; + if (n_operands == 1 && ! mmix_gnu_syntax) + goto a_single_24_bit_number_operand; + /* FALLTHROUGH. */ + case mmix_operands_reg_yz: + /* A register and a 16-bit unsigned number. */ + if (n_operands != 2 + || exp[1].X_op == O_register + || (exp[1].X_op == O_constant + && (exp[1].X_add_number > 0xffff || exp[1].X_add_number < 0))) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + + if (exp[1].X_op == O_constant) + { + opcodep[2] = (exp[1].X_add_number >> 8) & 255; + opcodep[3] = exp[1].X_add_number & 255; + } + else + /* FIXME: This doesn't bring us unsignedness checking. */ + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 2, + 2, exp + 1, 0, BFD_RELOC_16); + break; + + case mmix_operands_jmp: + /* A JMP. Everyhing is already done. */ + break; + + case mmix_operands_roundregs: + /* Two registers with optional rounding mode or constant in between. */ + if ((n_operands == 3 && exp[2].X_op == O_constant) + || (n_operands == 2 && exp[1].X_op == O_constant)) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + /* FALLTHROUGH. */ + case mmix_operands_roundregs_z: + /* Like FLOT, "$X,ROUND_MODE,$Z|Z", but the rounding mode is + optional and can be the corresponding constant. */ + { + /* Which exp index holds the second operand (not the rounding + mode). */ + int op2no = n_operands - 1; + + if ((n_operands != 2 && n_operands != 3) + || ((exp[op2no].X_op == O_register + && exp[op2no].X_add_number > 255) + || (exp[op2no].X_op == O_constant + && (exp[op2no].X_add_number > 255 + || exp[op2no].X_add_number < 0))) + || (n_operands == 3 + /* We don't allow for the rounding mode to be deferred; it + must be determined in the "first pass". It cannot be a + symbol equated to a rounding mode, but defined after + the first use. */ + && ((exp[1].X_op == O_register + && exp[1].X_add_number < 512) + || (exp[1].X_op == O_constant + && exp[1].X_add_number < 0 + && exp[1].X_add_number > 4) + || (exp[1].X_op != O_register + && exp[1].X_op != O_constant)))) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + + /* Add rounding mode if present. */ + if (n_operands == 3) + opcodep[2] = exp[1].X_add_number & 255; + + if (exp[op2no].X_op == O_register) + opcodep[3] = exp[op2no].X_add_number; + else if (exp[op2no].X_op == O_constant) + { + opcodep[3] = exp[op2no].X_add_number; + opcodep[0] |= IMM_OFFSET_BIT; + } + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 3, + 1, exp + op2no, 0, + instruction->operands == mmix_operands_roundregs + ? BFD_RELOC_MMIX_REG + : BFD_RELOC_MMIX_REG_OR_BYTE); + break; + } + + case mmix_operands_sync: + a_single_24_bit_number_operand: + if (n_operands != 1 + || exp[0].X_op == O_register + || (exp[0].X_op == O_constant + && (exp[0].X_add_number > 0xffffff || exp[0].X_add_number < 0))) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + + if (exp[0].X_op == O_constant) + { + opcodep[1] = (exp[0].X_add_number >> 16) & 255; + opcodep[2] = (exp[0].X_add_number >> 8) & 255; + opcodep[3] = exp[0].X_add_number & 255; + } + else + /* FIXME: This doesn't bring us unsignedness checking. */ + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 1, + 3, exp + 0, 0, BFD_RELOC_24); + break; + + case mmix_operands_neg: + /* Operands "$X,Y,$Z|Z"; NEG or NEGU. Y is optional, 0 is default. */ + + if ((n_operands != 3 && n_operands != 2) + || (n_operands == 3 && exp[1].X_op == O_register) + || ((exp[1].X_op == O_constant || exp[1].X_op == O_register) + && (exp[1].X_add_number > 255 || exp[1].X_add_number < 0)) + || (n_operands == 3 + && ((exp[2].X_op == O_register && exp[2].X_add_number > 255) + || (exp[2].X_op == O_constant + && (exp[2].X_add_number > 255 + || exp[2].X_add_number < 0))))) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + + if (n_operands == 2) + { + if (exp[1].X_op == O_register) + opcodep[3] = exp[1].X_add_number; + else if (exp[1].X_op == O_constant) + { + opcodep[3] = exp[1].X_add_number; + opcodep[0] |= IMM_OFFSET_BIT; + } + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 3, + 1, exp + 1, 0, BFD_RELOC_MMIX_REG_OR_BYTE); + break; + } + + if (exp[1].X_op == O_constant) + opcodep[2] = exp[1].X_add_number; + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 2, + 1, exp + 1, 0, BFD_RELOC_8); + + if (exp[2].X_op == O_register) + opcodep[3] = exp[2].X_add_number; + else if (exp[2].X_op == O_constant) + { + opcodep[3] = exp[2].X_add_number; + opcodep[0] |= IMM_OFFSET_BIT; + } + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 3, + 1, exp + 2, 0, BFD_RELOC_MMIX_REG_OR_BYTE); + break; + + case mmix_operands_regaddr: + /* A GETA/branch-type. */ + break; + + case mmix_operands_get: + /* "$X,spec_reg"; GET. + Like with rounding modes, we demand that the special register or + symbol is already defined when we get here at the point of use. */ + if (n_operands != 2 + || (exp[1].X_op == O_register + && (exp[1].X_add_number < 256 || exp[1].X_add_number >= 512)) + || (exp[1].X_op == O_constant + && (exp[1].X_add_number < 0 || exp[1].X_add_number > 256)) + || (exp[1].X_op != O_constant && exp[1].X_op != O_register)) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + + opcodep[3] = exp[1].X_add_number - 256; + break; + + case mmix_operands_put: + /* "spec_reg,$Z|Z"; PUT. */ + if (n_operands != 2 + || (exp[0].X_op == O_register + && (exp[0].X_add_number < 256 || exp[0].X_add_number >= 512)) + || (exp[0].X_op == O_constant + && (exp[0].X_add_number < 0 || exp[0].X_add_number > 256)) + || (exp[0].X_op != O_constant && exp[0].X_op != O_register)) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + + opcodep[1] = exp[0].X_add_number - 256; + + /* Note that the Y field is zero. */ + + if (exp[1].X_op == O_register) + opcodep[3] = exp[1].X_add_number; + else if (exp[1].X_op == O_constant) + { + opcodep[3] = exp[1].X_add_number; + opcodep[0] |= IMM_OFFSET_BIT; + } + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 3, + 1, exp + 1, 0, BFD_RELOC_MMIX_REG_OR_BYTE); + break; + + case mmix_operands_save: + /* "$X,0"; SAVE. */ + if (n_operands != 2 + || exp[1].X_op != O_constant + || exp[1].X_add_number != 0) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + break; + + case mmix_operands_unsave: + if (n_operands < 2 && ! mmix_gnu_syntax) + { + if (n_operands == 1) + { + if (exp[0].X_op == O_register) + opcodep[3] = exp[0].X_add_number; + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 3, + 1, exp, 0, BFD_RELOC_MMIX_REG); + } + break; + } + + /* "0,$Z"; UNSAVE. */ + if (n_operands != 2 + || exp[0].X_op != O_constant + || exp[0].X_add_number != 0 + || exp[1].X_op == O_constant + || (exp[1].X_op == O_register + && exp[1].X_add_number > 255)) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + + if (exp[1].X_op == O_register) + opcodep[3] = exp[1].X_add_number; + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 3, + 1, exp + 1, 0, BFD_RELOC_MMIX_REG); + break; + + case mmix_operands_xyz_opt: + /* SWYM, TRIP, TRAP: zero, one, two or three operands. */ + if (n_operands == 0 && ! mmix_gnu_syntax) + /* Zeros are in place - nothing needs to be done for zero + operands. We don't allow this in GNU syntax mode, because it + was believed that the risk of missing to supply an operand is + higher than the benefit of not having to specify a zero. */ + ; + else if (n_operands == 1 && exp[0].X_op != O_register) + { + if (exp[0].X_op == O_constant) + { + if (exp[0].X_add_number > 255*255*255 + || exp[0].X_add_number < 0) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + else + { + opcodep[1] = (exp[0].X_add_number >> 16) & 255; + opcodep[2] = (exp[0].X_add_number >> 8) & 255; + opcodep[3] = exp[0].X_add_number & 255; + } + } + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 1, + 3, exp, 0, BFD_RELOC_24); + } + else if (n_operands == 2 + && exp[0].X_op != O_register + && exp[1].X_op != O_register) + { + /* Two operands. */ + + if (exp[0].X_op == O_constant) + { + if (exp[0].X_add_number > 255 + || exp[0].X_add_number < 0) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + else + opcodep[1] = exp[0].X_add_number & 255; + } + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 1, + 1, exp, 0, BFD_RELOC_8); + + if (exp[1].X_op == O_constant) + { + if (exp[1].X_add_number > 255*255 + || exp[1].X_add_number < 0) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + else + { + opcodep[2] = (exp[1].X_add_number >> 8) & 255; + opcodep[3] = exp[1].X_add_number & 255; + } + } + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 2, + 2, exp + 1, 0, BFD_RELOC_16); + } + else if (n_operands == 3 + && exp[0].X_op != O_register + && exp[1].X_op != O_register + && exp[2].X_op != O_register) + { + /* Three operands. */ + + if (exp[0].X_op == O_constant) + { + if (exp[0].X_add_number > 255 + || exp[0].X_add_number < 0) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + else + opcodep[1] = exp[0].X_add_number & 255; + } + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 1, + 1, exp, 0, BFD_RELOC_8); + + if (exp[1].X_op == O_constant) + { + if (exp[1].X_add_number > 255 + || exp[1].X_add_number < 0) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + else + opcodep[2] = exp[1].X_add_number & 255; + } + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 2, + 1, exp + 1, 0, BFD_RELOC_8); + + if (exp[2].X_op == O_constant) + { + if (exp[2].X_add_number > 255 + || exp[2].X_add_number < 0) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + else + opcodep[3] = exp[2].X_add_number & 255; + } + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 3, + 1, exp + 2, 0, BFD_RELOC_8); + } + else if (n_operands <= 3 + && (strcmp (instruction->name, "trip") == 0 + || strcmp (instruction->name, "trap") == 0)) + { + /* The meaning of operands to TRIP and TRAP are not defined, so + we add combinations not handled above here as we find them. */ + if (n_operands == 3) + { + /* Don't require non-register operands. Always generate + fixups, so we don't have to copy lots of code and create + maintanance problems. TRIP is supposed to be a rare + instruction, so the overhead should not matter. We + aren't allowed to fix_new_exp for an expression which is + an O_register at this point, however. */ + if (exp[0].X_op == O_register) + opcodep[1] = exp[0].X_add_number; + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 1, + 1, exp, 0, BFD_RELOC_MMIX_REG_OR_BYTE); + if (exp[1].X_op == O_register) + opcodep[2] = exp[1].X_add_number; + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 2, + 1, exp + 1, 0, BFD_RELOC_MMIX_REG_OR_BYTE); + if (exp[2].X_op == O_register) + opcodep[3] = exp[2].X_add_number; + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 3, + 1, exp + 2, 0, BFD_RELOC_MMIX_REG_OR_BYTE); + } + else if (n_operands == 2) + { + if (exp[0].X_op == O_register) + opcodep[2] = exp[0].X_add_number; + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 2, + 1, exp, 0, BFD_RELOC_MMIX_REG_OR_BYTE); + if (exp[1].X_op == O_register) + opcodep[3] = exp[1].X_add_number; + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 3, + 1, exp + 1, 0, BFD_RELOC_MMIX_REG_OR_BYTE); + } + else + { + as_bad (_("unsupported operands to %s: `%s'"), + instruction->name, operands); + return; + } + } + else + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + break; + + case mmix_operands_resume: + if (n_operands == 0 && ! mmix_gnu_syntax) + break; + + if (n_operands != 1 + || exp[0].X_op == O_register + || (exp[0].X_op == O_constant + && (exp[0].X_add_number < 0 + || exp[0].X_add_number > 255))) + { + as_bad (_("invalid operands to opcode %s: `%s'"), + instruction->name, operands); + return; + } + + if (exp[0].X_op == O_constant) + opcodep[3] = exp[0].X_add_number; + else + fix_new_exp (opc_fragP, opcodep - opc_fragP->fr_literal + 3, + 1, exp + 0, 0, BFD_RELOC_8); + break; + + case mmix_operands_pushj: + /* All is done for PUSHJ already. */ + break; + + default: + BAD_CASE (instruction->operands); + } +} + +/* For the benefit of insns that start with a digit, we assemble by way of + tc_unrecognized_line too, through this function. */ + +int +mmix_assemble_return_nonzero (str) + char *str; +{ + int last_error_count = had_errors (); + char *s2 = str; + char c; + + /* Normal instruction handling downcases, so we must too. */ + while (ISALNUM (*s2)) + { + if (ISUPPER ((unsigned char) *s2)) + *s2 = TOLOWER (*s2); + s2++; + } + + /* Cut the line for sake of the assembly. */ + for (s2 = str; *s2 && *s2 != '\n'; s2++) + ; + + c = *s2; + *s2 = 0; + md_assemble (str); + *s2 = c; + + return had_errors () == last_error_count; +} + +/* The PREFIX pseudo. */ + +static void +s_prefix (unused) + int unused ATTRIBUTE_UNUSED; +{ + char *p; + int c; + + SKIP_WHITESPACE (); + + p = input_line_pointer; + + c = get_symbol_end (); + + /* Reseting prefix? */ + if (*p == ':' && p[1] == 0) + mmix_current_prefix = NULL; + else + { + /* Put this prefix on the mmix symbols obstack. We could malloc and + free it separately, but then we'd have to worry about that. + People using up memory on prefixes have other problems. */ + obstack_grow (&mmix_sym_obstack, p, strlen (p) + 1); + p = obstack_finish (&mmix_sym_obstack); + + /* Accumulate prefixes, and strip a leading ':'. */ + if (mmix_current_prefix != NULL || *p == ':') + p = mmix_prefix_name (p); + + mmix_current_prefix = p; + } + + *input_line_pointer = c; + + mmix_handle_rest_of_empty_line (); +} + +/* We implement prefixes by using the tc_canonicalize_symbol_name hook, + and store each prefixed name on a (separate) obstack. This means that + the name is on the "notes" obstack in non-prefixed form and on the + mmix_sym_obstack in prefixed form, but currently it is not worth + rewriting the whole GAS symbol handling to improve "hooking" to avoid + that. (It might be worth a rewrite for other reasons, though). */ + +char * +mmix_prefix_name (shortname) + char *shortname; +{ + if (*shortname == ':') + return shortname + 1; + + if (mmix_current_prefix == NULL) + as_fatal (_("internal: mmix_prefix_name but empty prefix")); + + if (*shortname == '$') + return shortname; + + obstack_grow (&mmix_sym_obstack, mmix_current_prefix, + strlen (mmix_current_prefix)); + obstack_grow (&mmix_sym_obstack, shortname, strlen (shortname) + 1); + return obstack_finish (&mmix_sym_obstack); +} + +/* The GREG pseudo. At LABEL, we have the name of a symbol that we + want to make a register symbol, and which should be initialized with + the value in the expression at INPUT_LINE_POINTER (defaulting to 0). + Either and (perhaps less meaningful) both may be missing. LABEL must + be persistent, perhaps allocated on an obstack. */ + +static void +mmix_greg_internal (label) + char *label; +{ + expressionS *expP = &mmix_raw_gregs[n_of_raw_gregs].exp; + + /* Don't set the section to register contents section before the + expression has been parsed; it may refer to the current position. */ + expression (expP); + + /* FIXME: Check that no expression refers to the register contents + section. May need to be done in elf64-mmix.c. */ + if (expP->X_op == O_absent) + { + /* Default to zero if the expression was absent. */ + expP->X_op = O_constant; + expP->X_add_number = 0; + expP->X_unsigned = 0; + expP->X_add_symbol = NULL; + expP->X_op_symbol = NULL; + } + + /* We must handle prefixes here, as we save the labels and expressions + to be output later. */ + mmix_raw_gregs[n_of_raw_gregs].label + = mmix_current_prefix == NULL ? label : mmix_prefix_name (label); + + if (n_of_raw_gregs == MAX_GREGS - 1) + as_bad (_("too many GREG registers allocated (max %d)"), MAX_GREGS); + else + n_of_raw_gregs++; + + mmix_handle_rest_of_empty_line (); +} + +/* The ".greg label,expr" worker. */ + +static void +s_greg (unused) + int unused ATTRIBUTE_UNUSED; +{ + char *p; + char c; + p = input_line_pointer; + + /* This will skip over what can be a symbol and zero out the next + character, which we assume is a ',' or other meaningful delimiter. + What comes after that is the initializer expression for the + register. */ + c = get_symbol_end (); + + if (! is_end_of_line [(unsigned char) c]) + input_line_pointer++; + + if (*p) + { + /* The label must be persistent; it's not used until after all input + has been seen. */ + obstack_grow (&mmix_sym_obstack, p, strlen (p) + 1); + mmix_greg_internal (obstack_finish (&mmix_sym_obstack)); + } + else + mmix_greg_internal (NULL); +} + +/* The "BSPEC expr" worker. */ + +static void +s_bspec (unused) + int unused ATTRIBUTE_UNUSED; +{ + asection *expsec; + asection *sec; + char secname[sizeof (MMIX_OTHER_SPEC_SECTION_PREFIX) + 20] + = MMIX_OTHER_SPEC_SECTION_PREFIX; + expressionS exp; + int n; + + /* Get a constant expression which we can evaluate *now*. Supporting + more complex (though assembly-time computable) expressions is + feasible but Too Much Work for something of unknown usefulness like + BSPEC-ESPEC. */ + expsec = expression (&exp); + mmix_handle_rest_of_empty_line (); + + /* Check that we don't have another BSPEC in progress. */ + if (doing_bspec) + { + as_bad (_("BSPEC already active. Nesting is not supported.")); + return; + } + + if (exp.X_op != O_constant + || expsec != absolute_section + || exp.X_add_number < 0 + || exp.X_add_number > 65535) + { + as_bad (_("invalid BSPEC expression")); + exp.X_add_number = 0; + } + + n = (int) exp.X_add_number; + + sprintf (secname + strlen (MMIX_OTHER_SPEC_SECTION_PREFIX), "%d", n); + sec = bfd_get_section_by_name (stdoutput, secname); + if (sec == NULL) + { + /* We need a non-volatile name as it will be stored in the section + struct. */ + char *newsecname = xstrdup (secname); + sec = bfd_make_section (stdoutput, newsecname); + + if (sec == NULL) + as_fatal (_("can't create section %s"), newsecname); + + if (!bfd_set_section_flags (stdoutput, sec, + bfd_get_section_flags (stdoutput, sec) + | SEC_READONLY)) + as_fatal (_("can't set section flags for section %s"), newsecname); + } + + /* Tell ELF about the pending section change. */ + obj_elf_section_change_hook (); + subseg_set (sec, 0); + + /* Save position for missing ESPEC. */ + as_where (&bspec_file, &bspec_line); + + doing_bspec = 1; +} + +/* The "ESPEC" worker. */ + +static void +s_espec (unused) + int unused ATTRIBUTE_UNUSED; +{ + /* First, check that we *do* have a BSPEC in progress. */ + if (! doing_bspec) + { + as_bad (_("ESPEC without preceding BSPEC")); + return; + } + + mmix_handle_rest_of_empty_line (); + doing_bspec = 0; + + /* When we told ELF about the section change in s_bspec, it stored the + previous section for us so we can get at it with the equivalent of a + .previous pseudo. */ + obj_elf_previous (0); +} + +/* The " .local expr" and " local expr" worker. We make a BFD_MMIX_LOCAL + relocation against the current position against the expression. + Implementing this by means of contents in a section lost. */ + +static void +mmix_s_local (unused) + int unused ATTRIBUTE_UNUSED; +{ + expressionS exp; + + /* Don't set the section to register contents section before the + expression has been parsed; it may refer to the current position in + some contorted way. */ + expression (&exp); + + if (exp.X_op == O_absent) + { + as_bad (_("missing local expression")); + return; + } + else if (exp.X_op == O_register) + { + /* fix_new_exp doesn't like O_register. Should be configurable. + We're fine with a constant here, though. */ + exp.X_op = O_constant; + } + + fix_new_exp (frag_now, 0, 0, &exp, 0, BFD_RELOC_MMIX_LOCAL); + mmix_handle_rest_of_empty_line (); +} + +/* Set fragP->fr_var to the initial guess of the size of a relaxable insn + and return it. Sizes of other instructions are not known. This + function may be called multiple times. */ + +int +md_estimate_size_before_relax (fragP, segment) + fragS *fragP; + segT segment; +{ + int length; + +#define HANDLE_RELAXABLE(state) \ + case ENCODE_RELAX (state, STATE_UNDF): \ + if (fragP->fr_symbol != NULL \ + && S_GET_SEGMENT (fragP->fr_symbol) == segment) \ + { \ + /* The symbol lies in the same segment - a relaxable case. */ \ + fragP->fr_subtype \ + = ENCODE_RELAX (state, STATE_ZERO); \ + } \ + break; + + switch (fragP->fr_subtype) + { + HANDLE_RELAXABLE (STATE_GETA); + HANDLE_RELAXABLE (STATE_BCC); + HANDLE_RELAXABLE (STATE_PUSHJ); + HANDLE_RELAXABLE (STATE_JMP); + + case ENCODE_RELAX (STATE_GETA, STATE_ZERO): + case ENCODE_RELAX (STATE_BCC, STATE_ZERO): + case ENCODE_RELAX (STATE_PUSHJ, STATE_ZERO): + case ENCODE_RELAX (STATE_JMP, STATE_ZERO): + /* When relaxing a section for the second time, we don't need to do + anything except making sure that fr_var is set right. */ + break; + + case STATE_GREG_DEF: + length = fragP->tc_frag_data != NULL ? 0 : 8; + fragP->fr_var = length; + + /* Don't consult the relax_table; it isn't valid for this + relaxation. */ + return length; + break; + + default: + BAD_CASE (fragP->fr_subtype); + } + + length = mmix_relax_table[fragP->fr_subtype].rlx_length; + fragP->fr_var = length; + + return length; +} + +/* Turn a string in input_line_pointer into a floating point constant of type + type, and store the appropriate bytes in *litP. The number of LITTLENUMS + emitted is stored in *sizeP . An error message is returned, or NULL on + OK. */ + +char * +md_atof (type, litP, sizeP) + int type; + char *litP; + int *sizeP; +{ + int prec; + LITTLENUM_TYPE words[4]; + char *t; + int i; + + switch (type) + { + /* FIXME: Having 'f' in mmix_flt_chars (and here) makes it + problematic to also have a forward reference in an expression. + The testsuite wants it, and it's customary. + We'll deal with the real problems when they come; we share the + problem with most other ports. */ + case 'f': + case 'r': + prec = 2; + break; + case 'd': + prec = 4; + break; + default: + *sizeP = 0; + return _("bad call to md_atof"); + } + + t = atof_ieee (input_line_pointer, type, words); + if (t) + input_line_pointer = t; + + *sizeP = prec * 2; + + for (i = 0; i < prec; i++) + { + md_number_to_chars (litP, (valueT) words[i], 2); + litP += 2; + } + return NULL; +} + +/* Convert variable-sized frags into one or more fixups. */ + +void +md_convert_frag (abfd, sec, fragP) + bfd *abfd ATTRIBUTE_UNUSED; + segT sec ATTRIBUTE_UNUSED; + fragS *fragP; +{ + /* Pointer to first byte in variable-sized part of the frag. */ + char *var_partp; + + /* Pointer to first opcode byte in frag. */ + char *opcodep; + + /* Size in bytes of variable-sized part of frag. */ + int var_part_size = 0; + + /* This is part of *fragP. It contains all information about addresses + and offsets to varying parts. */ + symbolS *symbolP; + unsigned long var_part_offset; + + /* This is the frag for the opcode. It, rather than fragP, must be used + when emitting a frag for the opcode. */ + fragS *opc_fragP = fragP->tc_frag_data; + fixS *tmpfixP; + + /* Where, in file space, does addr point? */ + bfd_vma target_address; + bfd_vma opcode_address; + + know (fragP->fr_type == rs_machine_dependent); + + var_part_offset = fragP->fr_fix; + var_partp = fragP->fr_literal + var_part_offset; + opcodep = fragP->fr_opcode; + + symbolP = fragP->fr_symbol; + + target_address + = ((symbolP ? S_GET_VALUE (symbolP) : 0) + fragP->fr_offset); + + /* The opcode that would be extended is the last four "fixed" bytes. */ + opcode_address = fragP->fr_address + fragP->fr_fix - 4; + + switch (fragP->fr_subtype) + { + case ENCODE_RELAX (STATE_GETA, STATE_ZERO): + case ENCODE_RELAX (STATE_BCC, STATE_ZERO): + case ENCODE_RELAX (STATE_PUSHJ, STATE_ZERO): + mmix_set_geta_branch_offset (opcodep, target_address - opcode_address); + if (linkrelax) + { + tmpfixP + = fix_new (opc_fragP, opcodep - opc_fragP->fr_literal, 4, + fragP->fr_symbol, fragP->fr_offset, 1, + BFD_RELOC_MMIX_ADDR19); + COPY_FR_WHERE_TO_FX (fragP, tmpfixP); + } + var_part_size = 0; + break; + + case ENCODE_RELAX (STATE_JMP, STATE_ZERO): + mmix_set_jmp_offset (opcodep, target_address - opcode_address); + if (linkrelax) + { + tmpfixP + = fix_new (opc_fragP, opcodep - opc_fragP->fr_literal, 4, + fragP->fr_symbol, fragP->fr_offset, 1, + BFD_RELOC_MMIX_ADDR27); + COPY_FR_WHERE_TO_FX (fragP, tmpfixP); + } + var_part_size = 0; + break; + + case STATE_GREG_DEF: + if (fragP->tc_frag_data == NULL) + { + tmpfixP + = fix_new (fragP, var_partp - fragP->fr_literal, 8, + fragP->fr_symbol, fragP->fr_offset, 0, BFD_RELOC_64); + COPY_FR_WHERE_TO_FX (fragP, tmpfixP); + mmix_gregs[n_of_cooked_gregs++] = tmpfixP; + var_part_size = 8; + } + else + var_part_size = 0; + break; + +#define HANDLE_MAX_RELOC(state, reloc) \ + case ENCODE_RELAX (state, STATE_MAX): \ + var_part_size \ + = mmix_relax_table[ENCODE_RELAX (state, STATE_MAX)].rlx_length; \ + mmix_fill_nops (var_partp, var_part_size / 4); \ + if (warn_on_expansion) \ + as_warn_where (fragP->fr_file, fragP->fr_line, \ + _("operand out of range, instruction expanded")); \ + tmpfixP = fix_new (fragP, var_partp - fragP->fr_literal - 4, 8, \ + fragP->fr_symbol, fragP->fr_offset, 1, reloc); \ + COPY_FR_WHERE_TO_FX (fragP, tmpfixP); \ + break + + HANDLE_MAX_RELOC (STATE_GETA, BFD_RELOC_MMIX_GETA); + HANDLE_MAX_RELOC (STATE_BCC, BFD_RELOC_MMIX_CBRANCH); + HANDLE_MAX_RELOC (STATE_PUSHJ, BFD_RELOC_MMIX_PUSHJ); + HANDLE_MAX_RELOC (STATE_JMP, BFD_RELOC_MMIX_JMP); + + default: + BAD_CASE (fragP->fr_subtype); + break; + } + + fragP->fr_fix += var_part_size; + fragP->fr_var = 0; +} + +/* Applies the desired value to the specified location. + Also sets up addends for RELA type relocations. + Stolen from tc-mcore.c. + + Note that this function isn't called when linkrelax != 0. */ + +void +md_apply_fix3 (fixP, valP, segment) + fixS * fixP; + valueT * valP; + segT segment; +{ + char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; + /* Note: use offsetT because it is signed, valueT is unsigned. */ + offsetT val = (offsetT) * valP; + segT symsec + = (fixP->fx_addsy == NULL + ? absolute_section : S_GET_SEGMENT (fixP->fx_addsy)); + + /* If the fix is relative to a symbol which is not defined, or, (if + pcrel), not in the same segment as the fix, we cannot resolve it + here. */ + if (fixP->fx_addsy != NULL + && (! S_IS_DEFINED (fixP->fx_addsy) + || S_IS_WEAK (fixP->fx_addsy) + || (fixP->fx_pcrel && symsec != segment) + || (! fixP->fx_pcrel + && symsec != absolute_section + && ((fixP->fx_r_type != BFD_RELOC_MMIX_REG + && fixP->fx_r_type != BFD_RELOC_MMIX_REG_OR_BYTE) + || (symsec != reg_section + && symsec != real_reg_section))))) + { + fixP->fx_done = 0; + return; + } + else if (fixP->fx_r_type == BFD_RELOC_MMIX_LOCAL + || fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT + || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) + { + /* These are never "fixed". */ + fixP->fx_done = 0; + return; + } + else + /* We assume every other relocation is "fixed". */ + fixP->fx_done = 1; + + switch (fixP->fx_r_type) + { + case BFD_RELOC_64: + case BFD_RELOC_32: + case BFD_RELOC_24: + case BFD_RELOC_16: + case BFD_RELOC_8: + case BFD_RELOC_64_PCREL: + case BFD_RELOC_32_PCREL: + case BFD_RELOC_24_PCREL: + case BFD_RELOC_16_PCREL: + case BFD_RELOC_8_PCREL: + md_number_to_chars (buf, val, fixP->fx_size); + break; + + case BFD_RELOC_MMIX_ADDR19: + if (expand_op) + { + /* This shouldn't happen. */ + BAD_CASE (fixP->fx_r_type); + break; + } + /* FALLTHROUGH. */ + case BFD_RELOC_MMIX_GETA: + case BFD_RELOC_MMIX_CBRANCH: + case BFD_RELOC_MMIX_PUSHJ: + /* If this fixup is out of range, punt to the linker to emit an + error. This should only happen with -no-expand. */ + if (val < -(((offsetT) 1 << 19)/2) + || val >= ((offsetT) 1 << 19)/2 - 1 + || (val & 3) != 0) + { + if (warn_on_expansion) + as_warn_where (fixP->fx_file, fixP->fx_line, + _("operand out of range")); + fixP->fx_done = 0; + val = 0; + } + mmix_set_geta_branch_offset (buf, val); + break; + + case BFD_RELOC_MMIX_ADDR27: + if (expand_op) + { + /* This shouldn't happen. */ + BAD_CASE (fixP->fx_r_type); + break; + } + /* FALLTHROUGH. */ + case BFD_RELOC_MMIX_JMP: + /* If this fixup is out of range, punt to the linker to emit an + error. This should only happen with -no-expand. */ + if (val < -(((offsetT) 1 << 27)/2) + || val >= ((offsetT) 1 << 27)/2 - 1 + || (val & 3) != 0) + { + if (warn_on_expansion) + as_warn_where (fixP->fx_file, fixP->fx_line, + _("operand out of range")); + fixP->fx_done = 0; + val = 0; + } + mmix_set_jmp_offset (buf, val); + break; + + case BFD_RELOC_MMIX_REG_OR_BYTE: + if (fixP->fx_addsy != NULL + && (S_GET_SEGMENT (fixP->fx_addsy) != real_reg_section + || S_GET_VALUE (fixP->fx_addsy) > 255) + && S_GET_SEGMENT (fixP->fx_addsy) != absolute_section) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("invalid operands")); + buf[0] = val; + + /* If this reloc is for a Z field, we need to adjust + the opcode if we got a constant here. + FIXME: Can we make this more robust? */ + + if ((fixP->fx_where & 3) == 3 + && (fixP->fx_addsy == NULL + || S_GET_SEGMENT (fixP->fx_addsy) == absolute_section)) + buf[-3] |= IMM_OFFSET_BIT; + + /* We don't want this "symbol" appearing in output, because that + will fail. */ + if (fixP->fx_addsy + && S_GET_SEGMENT (fixP->fx_addsy) == real_reg_section) + symbol_clear_used_in_reloc (fixP->fx_addsy); + break; + + case BFD_RELOC_MMIX_REG: + if (fixP->fx_addsy == NULL + || S_GET_SEGMENT (fixP->fx_addsy) != real_reg_section + || S_GET_VALUE (fixP->fx_addsy) > 255) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("invalid operands")); + *buf = val; + + if (fixP->fx_addsy + && S_GET_SEGMENT (fixP->fx_addsy) == real_reg_section) + symbol_clear_used_in_reloc (fixP->fx_addsy); + break; + + case BFD_RELOC_MMIX_BASE_PLUS_OFFSET: + /* These are never "fixed". */ + fixP->fx_done = 0; + return; + + case BFD_RELOC_MMIX_PUSHJ_1: + case BFD_RELOC_MMIX_PUSHJ_2: + case BFD_RELOC_MMIX_PUSHJ_3: + case BFD_RELOC_MMIX_CBRANCH_J: + case BFD_RELOC_MMIX_CBRANCH_1: + case BFD_RELOC_MMIX_CBRANCH_2: + case BFD_RELOC_MMIX_CBRANCH_3: + case BFD_RELOC_MMIX_GETA_1: + case BFD_RELOC_MMIX_GETA_2: + case BFD_RELOC_MMIX_GETA_3: + case BFD_RELOC_MMIX_JMP_1: + case BFD_RELOC_MMIX_JMP_2: + case BFD_RELOC_MMIX_JMP_3: + default: + BAD_CASE (fixP->fx_r_type); + break; + } + + if (fixP->fx_done) + /* Make sure that for completed fixups we have the value around for + use by e.g. mmix_frob_file. */ + fixP->fx_offset = val; +} + +/* A bsearch function for looking up a value against offsets for GREG + definitions. */ + +static int +cmp_greg_val_greg_symbol_fixes (p1, p2) + const PTR p1; + const PTR p2; +{ + offsetT val1 = *(offsetT *) p1; + offsetT val2 = ((struct mmix_symbol_greg_fixes *) p2)->offs; + + if (val1 >= val2 && val1 < val2 + 255) + return 0; + + if (val1 > val2) + return 1; + + return -1; +} + +/* Generate a machine-dependent relocation. */ + +arelent * +tc_gen_reloc (section, fixP) + asection *section ATTRIBUTE_UNUSED; + fixS *fixP; +{ + bfd_signed_vma val + = fixP->fx_offset + (fixP->fx_addsy ? S_GET_VALUE (fixP->fx_addsy) : 0); + arelent *relP; + bfd_reloc_code_real_type code = BFD_RELOC_NONE; + char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; + symbolS *addsy = fixP->fx_addsy; + asection *addsec = addsy == NULL ? NULL : S_GET_SEGMENT (addsy); + bfd_vma addend = fixP->fx_offset; + asymbol *baddsy = addsy != NULL ? symbol_get_bfdsym (addsy) : NULL; + + /* A single " LOCAL expression" in the wrong section will not work when + linking to MMO; relocations for zero-content sections are then + ignored. Normally, relocations would modify section contents, and + you'd never think or be able to do something like that. The + relocation resulting from a LOCAL directive doesn't have an obvious + and mandatory location. I can't figure out a way to do this better + than just helping the user around this limitation here; hopefully the + code using the local expression is around. Putting the LOCAL + semantics in a relocation still seems right; a section didn't do. */ + if (bfd_section_size (section->owner, section) == 0) + as_bad_where + (fixP->fx_file, fixP->fx_line, + fixP->fx_r_type == BFD_RELOC_MMIX_LOCAL + /* The BFD_RELOC_MMIX_LOCAL-specific message is supposed to be + user-friendly, though a little bit non-substantial. */ + ? _("directive LOCAL must be placed in code or data") + : _("internal confusion: relocation in a section without contents")); + + /* FIXME: Range tests for all these. */ + switch (fixP->fx_r_type) + { + case BFD_RELOC_64: + case BFD_RELOC_32: + case BFD_RELOC_24: + case BFD_RELOC_16: + case BFD_RELOC_8: + code = fixP->fx_r_type; + + if (addsy == NULL + || bfd_is_abs_section (S_GET_SEGMENT (addsy))) + { + /* Resolve this reloc now, as md_apply_fix3 would have done (not + called if -linkrelax). There is no point in keeping a reloc + to an absolute symbol. No reloc that is subject to + relaxation must be to an absolute symbol; difference + involving symbols in a specific section must be signalled as + an error if the relaxing cannot be expressed; having a reloc + to the resolved (now absolute) value does not help. */ + md_number_to_chars (buf, val, fixP->fx_size); + return NULL; + } + break; + + case BFD_RELOC_64_PCREL: + case BFD_RELOC_32_PCREL: + case BFD_RELOC_24_PCREL: + case BFD_RELOC_16_PCREL: + case BFD_RELOC_8_PCREL: + case BFD_RELOC_MMIX_LOCAL: + case BFD_RELOC_VTABLE_INHERIT: + case BFD_RELOC_VTABLE_ENTRY: + case BFD_RELOC_MMIX_GETA: + case BFD_RELOC_MMIX_GETA_1: + case BFD_RELOC_MMIX_GETA_2: + case BFD_RELOC_MMIX_GETA_3: + case BFD_RELOC_MMIX_CBRANCH: + case BFD_RELOC_MMIX_CBRANCH_J: + case BFD_RELOC_MMIX_CBRANCH_1: + case BFD_RELOC_MMIX_CBRANCH_2: + case BFD_RELOC_MMIX_CBRANCH_3: + case BFD_RELOC_MMIX_PUSHJ: + case BFD_RELOC_MMIX_PUSHJ_1: + case BFD_RELOC_MMIX_PUSHJ_2: + case BFD_RELOC_MMIX_PUSHJ_3: + case BFD_RELOC_MMIX_JMP: + case BFD_RELOC_MMIX_JMP_1: + case BFD_RELOC_MMIX_JMP_2: + case BFD_RELOC_MMIX_JMP_3: + case BFD_RELOC_MMIX_ADDR19: + case BFD_RELOC_MMIX_ADDR27: + code = fixP->fx_r_type; + break; + + case BFD_RELOC_MMIX_REG_OR_BYTE: + /* If we have this kind of relocation to an unknown symbol or to the + register contents section (that is, to a register), then we can't + resolve the relocation here. */ + if (addsy != NULL + && (bfd_is_und_section (S_GET_SEGMENT (addsy)) + || strcmp (bfd_get_section_name (addsec->owner, addsec), + MMIX_REG_CONTENTS_SECTION_NAME) == 0)) + { + code = fixP->fx_r_type; + break; + } + + /* If the relocation is not to the register section or to the + absolute section (a numeric value), then we have an error. */ + if (addsy != NULL + && (S_GET_SEGMENT (addsy) != real_reg_section + || val > 255 + || val < 0) + && ! bfd_is_abs_section (S_GET_SEGMENT (addsy))) + goto badop; + + /* Set the "immediate" bit of the insn if this relocation is to Z + field when the value is a numeric value, i.e. not a register. */ + if ((fixP->fx_where & 3) == 3 + && (addsy == NULL + || S_GET_SEGMENT (addsy) == absolute_section)) + buf[-3] |= IMM_OFFSET_BIT; + + buf[0] = val; + return NULL; + + case BFD_RELOC_MMIX_BASE_PLUS_OFFSET: + if (addsy != NULL + && strcmp (bfd_get_section_name (addsec->owner, addsec), + MMIX_REG_CONTENTS_SECTION_NAME) == 0) + { + /* This changed into a register; the relocation is for the + register-contents section. The constant part remains zero. */ + code = BFD_RELOC_MMIX_REG; + break; + } + + /* If we've found out that this was indeed a register, then replace + with the register number. The constant part is already zero. + + If we encounter any other defined symbol, then we must find a + suitable register and emit a reloc. */ + if (addsy == NULL + || S_GET_SEGMENT (addsy) != real_reg_section) + { + struct mmix_symbol_gregs *gregs; + struct mmix_symbol_greg_fixes *fix; + + if (S_IS_DEFINED (addsy)) + { + if (! symbol_section_p (addsy) + && ! bfd_is_abs_section (S_GET_SEGMENT (addsy))) + as_fatal (_("internal: BFD_RELOC_MMIX_BASE_PLUS_OFFSET not resolved to section")); + + /* If this is an absolute symbol sufficiently near + lowest_data_loc, then we canonicalize on the data + section. Note that val is signed here; we may subtract + lowest_data_loc which is unsigned. Careful with those + comparisons. */ + if (lowest_data_loc != (bfd_vma) -1 + && (bfd_vma) val + 256 > lowest_data_loc + && bfd_is_abs_section (S_GET_SEGMENT (addsy))) + { + val -= (offsetT) lowest_data_loc; + addsy = section_symbol (data_section); + } + /* Likewise text section. */ + else if (lowest_text_loc != (bfd_vma) -1 + && (bfd_vma) val + 256 > lowest_text_loc + && bfd_is_abs_section (S_GET_SEGMENT (addsy))) + { + val -= (offsetT) lowest_text_loc; + addsy = section_symbol (text_section); + } + } + + gregs = *symbol_get_tc (addsy); + + /* If that symbol does not have any associated GREG definitions, + we can't do anything. FIXME: implement allocate-on-demand in + the linker. */ + if (gregs == NULL + || (fix = bsearch (&val, gregs->greg_fixes, gregs->n_gregs, + sizeof (gregs->greg_fixes[0]), + cmp_greg_val_greg_symbol_fixes)) == NULL + /* The register must not point *after* the address we want. */ + || fix->offs > val + /* Neither must the register point more than 255 bytes + before the address we want. */ + || fix->offs + 255 < val) + { + as_bad_where (fixP->fx_file, fixP->fx_line, + _("no suitable GREG definition for operands")); + return NULL; + } + else + { + /* Transform the base-plus-offset reloc for the actual area + to a reloc for the register with the address of the area. + Put addend for register in Z operand. */ + buf[1] = val - fix->offs; + code = BFD_RELOC_MMIX_REG; + baddsy + = (bfd_get_section_by_name (stdoutput, + MMIX_REG_CONTENTS_SECTION_NAME) + ->symbol); + + addend = fix->fix->fx_frag->fr_address + fix->fix->fx_where; + } + } + else if (S_GET_VALUE (addsy) > 255) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("invalid operands")); + else + { + *buf = val; + return NULL; + } + break; + + case BFD_RELOC_MMIX_REG: + if (addsy != NULL + && (bfd_is_und_section (S_GET_SEGMENT (addsy)) + || strcmp (bfd_get_section_name (addsec->owner, addsec), + MMIX_REG_CONTENTS_SECTION_NAME) == 0)) + { + code = fixP->fx_r_type; + break; + } + + if (addsy != NULL + && (S_GET_SEGMENT (addsy) != real_reg_section + || val > 255 + || val < 0) + && ! bfd_is_und_section (S_GET_SEGMENT (addsy))) + /* Drop through to error message. */ + ; + else + { + buf[0] = val; + return NULL; + } + /* FALLTHROUGH. */ + + /* The others are supposed to be handled by md_apply_fix3. + FIXME: ... which isn't called when -linkrelax. Move over + md_apply_fix3 code here for everything reasonable. */ + badop: + default: + as_bad_where + (fixP->fx_file, fixP->fx_line, + _("operands were not reducible at assembly-time")); + + /* Unmark this symbol as used in a reloc, so we don't bump into a BFD + assert when trying to output reg_section. FIXME: A gas bug. */ + if (addsy) + symbol_clear_used_in_reloc (addsy); + return NULL; + } + + relP = (arelent *) xmalloc (sizeof (arelent)); + assert (relP != 0); + relP->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); + *relP->sym_ptr_ptr = baddsy; + relP->address = fixP->fx_frag->fr_address + fixP->fx_where; + + relP->addend = addend; + + /* If this had been a.out, we would have had a kludge for weak symbols + here. */ + + relP->howto = bfd_reloc_type_lookup (stdoutput, code); + if (! relP->howto) + { + const char *name; + + name = S_GET_NAME (addsy); + if (name == NULL) + name = _(""); + as_fatal (_("cannot generate relocation type for symbol %s, code %s"), + name, bfd_get_reloc_code_name (code)); + } + + return relP; +} + +/* Do some reformatting of a line. FIXME: We could transform a mmixal + line into traditional (GNU?) format, unless #NO_APP, and get rid of all + ugly labels_without_colons etc. */ + +void +mmix_handle_mmixal () +{ + char *s0 = input_line_pointer; + char *s; + char *label = NULL; + char c; + + if (pending_label != NULL) + as_fatal (_("internal: unhandled label %s"), pending_label); + + if (mmix_gnu_syntax) + return; + + /* If the first character is a '.', then it's a pseudodirective, not a + label. Make GAS not handle label-without-colon on this line. We + also don't do mmixal-specific stuff on this line. */ + if (input_line_pointer[0] == '.') + { + label_without_colon_this_line = 0; + return; + } + + /* Don't handle empty lines here. */ + while (1) + { + if (*s0 == 0 || is_end_of_line [(unsigned int) *s0]) + return; + + if (! ISSPACE (*s0)) + break; + + s0++; + } + + /* If we're on a line with a label, check if it's a mmixal fb-label. + Save an indicator and skip the label; it must be set only after all + fb-labels of expressions are evaluated. */ + if (ISDIGIT (input_line_pointer[0]) + && input_line_pointer[1] == 'H' + && ISSPACE (input_line_pointer[2])) + { + char *s; + current_fb_label = input_line_pointer[0] - '0'; + + /* We have to skip the label, but also preserve the newlineness of + the previous character, since the caller checks that. It's a + mess we blame on the caller. */ + input_line_pointer[1] = input_line_pointer[-1]; + input_line_pointer += 2; + + s = input_line_pointer; + while (*s && ISSPACE (*s) && ! is_end_of_line[(unsigned int) *s]) + s++; + + /* For errors emitted here, the book-keeping is off by one; the + caller is about to bump the counters. Adjust the error messages. */ + if (is_end_of_line [(unsigned int) *s]) + { + char *name; + unsigned int line; + as_where (&name, &line); + as_bad_where (name, line + 1, + _("[0-9]H labels may not appear alone on a line")); + current_fb_label = -1; + } + if (*s == '.') + { + char *name; + unsigned int line; + as_where (&name, &line); + as_bad_where (name, line + 1, + _("[0-9]H labels do not mix with dot-pseudos")); + current_fb_label = -1; + } + } + else + { + current_fb_label = -1; + if (is_name_beginner (input_line_pointer[0])) + label = input_line_pointer; + } + + s0 = input_line_pointer; + /* Skip over label. */ + while (*s0 && is_part_of_name (*s0)) + s0++; + + /* Remove trailing ":" off labels, as they'd otherwise be considered + part of the name. But don't do it for local labels. */ + if (s0 != input_line_pointer && s0[-1] == ':' + && (s0 - 2 != input_line_pointer + || ! ISDIGIT (s0[-2]))) + s0[-1] = ' '; + else if (label != NULL) + { + /* For labels that don't end in ":", we save it so we can later give + it the same alignment and address as the associated instruction. */ + + /* Make room for the label including the ending nul. */ + int len_0 = s0 - label + 1; + + /* Save this label on the MMIX symbol obstack. Saving it on an + obstack is needless for "IS"-pseudos, but it's harmless and we + avoid a little code-cluttering. */ + obstack_grow (&mmix_sym_obstack, label, len_0); + pending_label = obstack_finish (&mmix_sym_obstack); + pending_label[len_0 - 1] = 0; + } + + while (*s0 && ISSPACE (*s0) && ! is_end_of_line [(unsigned int) *s0]) + s0++; + + if (pending_label != NULL && is_end_of_line [(unsigned int) *s0]) + /* Whoops, this was actually a lone label on a line. Like :-ended + labels, we don't attach such labels to the next instruction or + pseudo. */ + pending_label = NULL; + + /* Find local labels of operands. Look for "[0-9][FB]" where the + characters before and after are not part of words. Break if a single + or double quote is seen anywhere. It means we can't have local + labels as part of list with mixed quoted and unquoted members for + mmixal compatibility but we can't have it all. For the moment. + Replace the 'B' or 'F' with MAGIC_FB_BACKWARD_CHAR and + MAGIC_FB_FORWARD_CHAR respectively. */ + + /* First make sure we don't have any of the magic characters on the line + appearing as input. */ + s = s0; + while (*s) + { + c = *s++; + if (is_end_of_line [(unsigned int) c]) + break; + if (c == MAGIC_FB_BACKWARD_CHAR || c == MAGIC_FB_FORWARD_CHAR) + as_bad (_("invalid characters in input")); + } + + /* Scan again, this time looking for ';' after operands. */ + s = s0; + + /* Skip the insn. */ + while (*s + && ! ISSPACE (*s) + && *s != ';' + && ! is_end_of_line[(unsigned int) *s]) + s++; + + /* Skip the spaces after the insn. */ + while (*s + && ISSPACE (*s) + && *s != ';' + && ! is_end_of_line[(unsigned int) *s]) + s++; + + /* Skip the operands. While doing this, replace [0-9][BF] with + (MAGIC_FB_BACKWARD_CHAR|MAGIC_FB_FORWARD_CHAR)[0-9]. */ + while ((c = *s) != 0 + && ! ISSPACE (c) + && c != ';' + && ! is_end_of_line[(unsigned int) c]) + { + if (c == '"') + { + s++; + + /* FIXME: Test-case for semi-colon in string. */ + while (*s + && *s != '"' + && (! is_end_of_line [(unsigned int) *s] || *s == ';')) + s++; + + if (*s == '"') + s++; + } + else if (ISDIGIT (c)) + { + if ((s[1] != 'B' && s[1] != 'F') + || is_part_of_name (s[-1]) + || is_part_of_name (s[2])) + s++; + else + { + s[0] = (s[1] == 'B' + ? MAGIC_FB_BACKWARD_CHAR : MAGIC_FB_FORWARD_CHAR); + s[1] = c; + } + } + else + s++; + } + + /* Skip any spaces after the operands. */ + while (*s + && ISSPACE (*s) + && *s != ';' + && !is_end_of_line[(unsigned int) *s]) + s++; + + /* If we're now looking at a semi-colon, then it's an end-of-line + delimiter. */ + mmix_next_semicolon_is_eoln = (*s == ';'); + + /* Make IS into an EQU by replacing it with "= ". Only match upper-case + though; let lower-case be a syntax error. */ + s = s0; + if (s[0] == 'I' && s[1] == 'S' && ISSPACE (s[2])) + { + *s = '='; + s[1] = ' '; + + /* Since labels can start without ":", we have to handle "X IS 42" + in full here, or "X" will be parsed as a label to be set at ".". */ + input_line_pointer = s; + + /* Right after this function ends, line numbers will be bumped if + input_line_pointer[-1] = '\n'. We want accurate line numbers for + the equals call, so we bump them before the call, and make sure + they aren't bumped afterwards. */ + bump_line_counters (); + + /* A fb-label is valid as an IS-label. */ + if (current_fb_label >= 0) + { + char *fb_name; + + /* We need to save this name on our symbol obstack, since the + string we got in fb_label_name is volatile and will change + with every call to fb_label_name, like those resulting from + parsing the IS-operand. */ + fb_name = fb_label_name (current_fb_label, 1); + obstack_grow (&mmix_sym_obstack, fb_name, strlen (fb_name) + 1); + equals (obstack_finish (&mmix_sym_obstack), 0); + fb_label_instance_inc (current_fb_label); + current_fb_label = -1; + } + else + { + if (pending_label == NULL) + as_bad (_("empty label field for IS")); + else + equals (pending_label, 0); + pending_label = NULL; + } + + /* For mmixal, we can have comments without a comment-start + character. */ + mmix_handle_rest_of_empty_line (); + input_line_pointer--; + + input_line_pointer[-1] = ' '; + } + else if (s[0] == 'G' + && s[1] == 'R' + && strncmp (s, "GREG", 4) == 0 + && (ISSPACE (s[4]) || is_end_of_line[(unsigned char) s[4]])) + { + input_line_pointer = s + 4; + + /* Right after this function ends, line numbers will be bumped if + input_line_pointer[-1] = '\n'. We want accurate line numbers for + the s_greg call, so we bump them before the call, and make sure + they aren't bumped afterwards. */ + bump_line_counters (); + + /* A fb-label is valid as a GREG-label. */ + if (current_fb_label >= 0) + { + char *fb_name; + + /* We need to save this name on our symbol obstack, since the + string we got in fb_label_name is volatile and will change + with every call to fb_label_name, like those resulting from + parsing the IS-operand. */ + fb_name = fb_label_name (current_fb_label, 1); + + /* Make sure we save the canonical name and don't get bitten by + prefixes. */ + obstack_1grow (&mmix_sym_obstack, ':'); + obstack_grow (&mmix_sym_obstack, fb_name, strlen (fb_name) + 1); + mmix_greg_internal (obstack_finish (&mmix_sym_obstack)); + fb_label_instance_inc (current_fb_label); + current_fb_label = -1; + } + else + mmix_greg_internal (pending_label); + + /* Back up before the end-of-line marker that was skipped in + mmix_greg_internal. */ + input_line_pointer--; + input_line_pointer[-1] = ' '; + + pending_label = NULL; + } + else if (pending_label != NULL) + { + input_line_pointer += strlen (pending_label); + + /* See comment above about getting line numbers bumped. */ + input_line_pointer[-1] = '\n'; + } +} + +/* Give the value of an fb-label rewritten as in mmix_handle_mmixal, when + parsing an expression. + + On valid calls, input_line_pointer points at a MAGIC_FB_BACKWARD_CHAR + or MAGIC_FB_BACKWARD_CHAR, followed by an ascii digit for the label. + We fill in the label as an expression. */ + +void +mmix_fb_label (expP) + expressionS *expP; +{ + symbolS *sym; + char *fb_internal_name; + + /* This doesn't happen when not using mmixal syntax. */ + if (mmix_gnu_syntax + || (input_line_pointer[0] != MAGIC_FB_BACKWARD_CHAR + && input_line_pointer[0] != MAGIC_FB_FORWARD_CHAR)) + return; + + /* The current backward reference has augmentation 0. A forward + reference has augmentation 1, unless it's the same as a fb-label on + _this_ line, in which case we add one more so we don't refer to it. + This is the semantics of mmixal; it differs to that of common + fb-labels which refer to a here-label on the current line as a + backward reference. */ + fb_internal_name + = fb_label_name (input_line_pointer[1] - '0', + (input_line_pointer[0] == MAGIC_FB_FORWARD_CHAR ? 1 : 0) + + ((input_line_pointer[1] - '0' == current_fb_label + && input_line_pointer[0] == MAGIC_FB_FORWARD_CHAR) + ? 1 : 0)); + + input_line_pointer += 2; + sym = symbol_find_or_make (fb_internal_name); + + /* We don't have to clean up unrelated fields here; we just do what the + expr machinery does, but *not* just what it does for [0-9][fb], since + we need to treat those as ordinary symbols sometimes; see testcases + err-byte2.s and fb-2.s. */ + if (S_GET_SEGMENT (sym) == absolute_section) + { + expP->X_op = O_constant; + expP->X_add_number = S_GET_VALUE (sym); + } + else + { + expP->X_op = O_symbol; + expP->X_add_symbol = sym; + expP->X_add_number = 0; + } +} + +/* See whether we need to force a relocation into the output file. + This is used to force out switch and PC relative relocations when + relaxing. */ + +int +mmix_force_relocation (fixP) + fixS * fixP; +{ + if (fixP->fx_r_type == BFD_RELOC_MMIX_LOCAL + || fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT + || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY + || fixP->fx_r_type == BFD_RELOC_MMIX_BASE_PLUS_OFFSET) + return 1; + + /* FIXME: This is dubious. Handling of weak symbols should have been + caught before we get here. */ + if ((fixP->fx_addsy && S_IS_WEAK (fixP->fx_addsy))) + return 1; + + if (linkrelax) + return 1; + + /* All our pcrel relocations are must-keep. Note that md_apply_fix3 is + called *after* this, and will handle getting rid of the presumed + reloc; a relocation isn't *forced* other than to be handled by + md_apply_fix3 (or tc_gen_reloc if linkrelax). */ + if (fixP->fx_pcrel) + return 1; + + return 0; +} + +/* The location from which a PC relative jump should be calculated, + given a PC relative reloc. */ + +long +md_pcrel_from_section (fixP, sec) + fixS * fixP; + segT sec; +{ + if (fixP->fx_addsy != (symbolS *) NULL + && (! S_IS_DEFINED (fixP->fx_addsy) + || S_GET_SEGMENT (fixP->fx_addsy) != sec)) + { + /* The symbol is undefined (or is defined but not in this section). + Let the linker figure it out. */ + return 0; + } + + return (fixP->fx_frag->fr_address + fixP->fx_where); +} + +/* Adjust the symbol table. We make reg_section relative to the real + register section. + + FIXME: There's a gas bug; should be fixed when the reg_section symbol + is "accidentally" saved for relocs which are really fixups that will be + fixed up. */ + +void +mmix_adjust_symtab () +{ + symbolS *sym; + symbolS *prevsym; + symbolS *regsec = section_symbol (reg_section); + segT realregsec = NULL; + + for (prevsym = sym = symbol_rootP; + sym != NULL; + prevsym = sym, sym = symbol_next (sym)) + if (S_GET_SEGMENT (sym) == reg_section) + { + if (sym == regsec + || (!S_IS_EXTERN (sym) && !symbol_used_in_reloc_p (sym))) + { + symbol_remove (sym, &symbol_rootP, &symbol_lastP); + + /* We make one extra turn, or we'll lose the next symbol. We + assume that the symbol we remove is not the symbol root + (.text normally is). */ + sym = prevsym; + } + else + { + /* Change section to the *real* register section, so it gets + proper treatment when writing it out. Only do this for + global symbols. This also means we don't have to check for + $0..$255. */ + if (realregsec == NULL) + realregsec + = bfd_make_section_old_way (stdoutput, MMIX_REG_SECTION_NAME); + + S_SET_SEGMENT (sym, realregsec); + } + } +} + +/* This is the expansion of LABELS_WITHOUT_COLONS. + We let md_start_line_hook tweak label_without_colon_this_line, and then + this function returns the tweaked value, and sets it to 1 for the next + line. FIXME: Very, very brittle. Not sure it works the way I + thought at the time I first wrote this. */ + +int +mmix_label_without_colon_this_line () +{ + int retval = label_without_colon_this_line; + + if (! mmix_gnu_syntax) + label_without_colon_this_line = 1; + + return retval; +} + +/* This is the expansion of md_relax_frag. We go through the ordinary + relax table function except when the frag is for a GREG. Then we have + to check whether there's another GREG by the same value that we can + join with. */ + +long +mmix_md_relax_frag (seg, fragP, stretch) + segT seg; + fragS *fragP; + long stretch; +{ + if (fragP->fr_subtype != STATE_GREG_DEF + && fragP->fr_subtype != STATE_GREG_UNDF) + return relax_frag (seg, fragP, stretch); + + /* If we're defined, we don't grow. */ + if (fragP->fr_subtype == STATE_GREG_DEF) + return 0; + + as_fatal (_("internal: unexpected relax type %d:%d"), + fragP->fr_type, fragP->fr_subtype); + return 0; +} + +/* Various things we punt until all input is seen. */ + +void +mmix_md_end () +{ + fragS *fragP; + symbolS *mainsym; + int i; + + /* The first frag of GREG:s going into the register contents section. */ + fragS *mmix_reg_contents_frags = NULL; + + /* Reset prefix. All labels reachable at this point must be + canonicalized. */ + mmix_current_prefix = NULL; + + if (doing_bspec) + as_bad_where (bspec_file, bspec_line, _("BSPEC without ESPEC.")); + + /* Emit the low LOC setting of .text. */ + if (text_has_contents && lowest_text_loc != (bfd_vma) -1) + { + symbolS *symbolP; + char locsymbol[sizeof (":") - 1 + + sizeof (MMIX_LOC_SECTION_START_SYMBOL_PREFIX) - 1 + + sizeof (".text")]; + + /* An exercise in non-ISO-C-ness, this one. */ + sprintf (locsymbol, ":%s%s", MMIX_LOC_SECTION_START_SYMBOL_PREFIX, + ".text"); + symbolP + = symbol_new (locsymbol, absolute_section, lowest_text_loc, + &zero_address_frag); + S_SET_EXTERNAL (symbolP); + } + + /* Ditto .data. */ + if (data_has_contents && lowest_data_loc != (bfd_vma) -1) + { + symbolS *symbolP; + char locsymbol[sizeof (":") - 1 + + sizeof (MMIX_LOC_SECTION_START_SYMBOL_PREFIX) - 1 + + sizeof (".data")]; + + sprintf (locsymbol, ":%s%s", MMIX_LOC_SECTION_START_SYMBOL_PREFIX, + ".data"); + symbolP + = symbol_new (locsymbol, absolute_section, lowest_data_loc, + &zero_address_frag); + S_SET_EXTERNAL (symbolP); + } + + /* Unless GNU syntax mode, set "Main" to be a function, so the + disassembler doesn't get confused when we write truly + mmixal-compatible code (and don't use .type). Similarly set it + global (regardless of -globalize-symbols), so the linker sees it as + the start symbol in ELF mode. */ + mainsym = symbol_find (MMIX_START_SYMBOL_NAME); + if (mainsym != NULL && ! mmix_gnu_syntax) + { + symbol_get_bfdsym (mainsym)->flags |= BSF_FUNCTION; + S_SET_EXTERNAL (mainsym); + } + + if (n_of_raw_gregs != 0) + { + /* Emit GREGs. They are collected in order of appearance, but must + be emitted in opposite order to both have section address regno*8 + and the same allocation order (within a file) as mmixal. */ + segT this_segment = now_seg; + subsegT this_subsegment = now_subseg; + asection *regsec + = bfd_make_section_old_way (stdoutput, + MMIX_REG_CONTENTS_SECTION_NAME); + subseg_set (regsec, 0); + + /* Finally emit the initialization-value. Emit a variable frag, which + we'll fix in md_estimate_size_before_relax. We set the initializer + for the tc_frag_data field to NULL, so we can use that field for + relaxation purposes. */ + mmix_opcode_frag = NULL; + + frag_grow (0); + mmix_reg_contents_frags = frag_now; + + for (i = n_of_raw_gregs - 1; i >= 0; i--) + { + if (mmix_raw_gregs[i].label != NULL) + /* There's a symbol. Let it refer to this location in the + register contents section. The symbol must be globalized + separately. */ + colon (mmix_raw_gregs[i].label); + + frag_var (rs_machine_dependent, 8, 0, STATE_GREG_UNDF, + make_expr_symbol (&mmix_raw_gregs[i].exp), 0, NULL); + } + + subseg_set (this_segment, this_subsegment); + } + + /* Iterate over frags resulting from GREGs and move those that evidently + have the same value together and point one to another. + + This works in time O(N^2) but since the upper bound for non-error use + is 223, it's best to keep this simpler algorithm. */ + for (fragP = mmix_reg_contents_frags; fragP != NULL; fragP = fragP->fr_next) + { + fragS **fpp; + fragS *fp = NULL; + fragS *osymfrag; + offsetT osymval; + expressionS *oexpP; + symbolS *symbolP = fragP->fr_symbol; + + if (fragP->fr_type != rs_machine_dependent + || fragP->fr_subtype != STATE_GREG_UNDF) + continue; + + /* Whatever the outcome, we will have this GREG judged merged or + non-merged. Since the tc_frag_data is NULL at this point, we + default to non-merged. */ + fragP->fr_subtype = STATE_GREG_DEF; + + /* If we're not supposed to merge GREG definitions, then just don't + look for equivalents. */ + if (! merge_gregs) + continue; + + osymval = (offsetT) S_GET_VALUE (symbolP); + osymfrag = symbol_get_frag (symbolP); + + /* If the symbol isn't defined, we can't say that another symbol + equals this frag, then. FIXME: We can look at the "deepest" + defined name; if a = c and b = c then obviously a == b. */ + if (! S_IS_DEFINED (symbolP)) + continue; + + oexpP = symbol_get_value_expression (fragP->fr_symbol); + + /* If the initialization value is zero, then we must not merge them. */ + if (oexpP->X_op == O_constant && osymval == 0) + continue; + + /* Iterate through the frags downward this one. If we find one that + has the same non-zero value, move it to after this one and point + to it as the equivalent. */ + for (fpp = &fragP->fr_next; *fpp != NULL; fpp = &fpp[0]->fr_next) + { + fp = *fpp; + + if (fp->fr_type != rs_machine_dependent + || fp->fr_subtype != STATE_GREG_UNDF) + continue; + + /* Calling S_GET_VALUE may simplify the symbol, changing from + expr_section etc. so call it first. */ + if ((offsetT) S_GET_VALUE (fp->fr_symbol) == osymval + && symbol_get_frag (fp->fr_symbol) == osymfrag) + { + /* Move the frag links so the one we found equivalent comes + after the current one, carefully considering that + sometimes fpp == &fragP->fr_next and the moves must be a + NOP then. */ + *fpp = fp->fr_next; + fp->fr_next = fragP->fr_next; + fragP->fr_next = fp; + break; + } + } + + if (*fpp != NULL) + fragP->tc_frag_data = fp; + } +} + +/* qsort function for mmix_symbol_gregs. */ + +static int +cmp_greg_symbol_fixes (parg, qarg) + const PTR parg; + const PTR qarg; +{ + const struct mmix_symbol_greg_fixes *p + = (const struct mmix_symbol_greg_fixes *) parg; + const struct mmix_symbol_greg_fixes *q + = (const struct mmix_symbol_greg_fixes *) qarg; + + return p->offs > q->offs ? 1 : p->offs < q->offs ? -1 : 0; +} + +/* Collect GREG definitions from mmix_gregs and hang them as lists sorted + on increasing offsets onto each section symbol or undefined symbol. + + Also, remove the register convenience section so it doesn't get output + as an ELF section. */ + +void +mmix_frob_file () +{ + int i; + struct mmix_symbol_gregs *all_greg_symbols[MAX_GREGS]; + int n_greg_symbols = 0; + + /* Collect all greg fixups and decorate each corresponding symbol with + the greg fixups for it. */ + for (i = 0; i < n_of_cooked_gregs; i++) + { + offsetT offs; + symbolS *sym; + struct mmix_symbol_gregs *gregs; + fixS *fixP; + + fixP = mmix_gregs[i]; + know (fixP->fx_r_type == BFD_RELOC_64); + + /* This case isn't doable in general anyway, methinks. */ + if (fixP->fx_subsy != NULL) + { + as_bad_where (fixP->fx_file, fixP->fx_line, + _("GREG expression too complicated")); + continue; + } + + sym = fixP->fx_addsy; + offs = (offsetT) fixP->fx_offset; + + /* If the symbol is defined, then it must be resolved to a section + symbol at this time, or else we don't know how to handle it. */ + if (S_IS_DEFINED (sym)) + { + if (! symbol_section_p (sym) + && ! bfd_is_abs_section (S_GET_SEGMENT (sym))) + as_fatal (_("internal: GREG expression not resolved to section")); + + offs += S_GET_VALUE (sym); + } + + /* If this is an absolute symbol sufficiently near lowest_data_loc, + then we canonicalize on the data section. Note that offs is + signed here; we may subtract lowest_data_loc which is unsigned. + Careful with those comparisons. */ + if (lowest_data_loc != (bfd_vma) -1 + && (bfd_vma) offs + 256 > lowest_data_loc + && bfd_is_abs_section (S_GET_SEGMENT (sym))) + { + offs -= (offsetT) lowest_data_loc; + sym = section_symbol (data_section); + } + /* Likewise text section. */ + else if (lowest_text_loc != (bfd_vma) -1 + && (bfd_vma) offs + 256 > lowest_text_loc + && bfd_is_abs_section (S_GET_SEGMENT (sym))) + { + offs -= (offsetT) lowest_text_loc; + sym = section_symbol (text_section); + } + + gregs = *symbol_get_tc (sym); + + if (gregs == NULL) + { + gregs = xmalloc (sizeof (*gregs)); + gregs->n_gregs = 0; + symbol_set_tc (sym, &gregs); + all_greg_symbols[n_greg_symbols++] = gregs; + } + + gregs->greg_fixes[gregs->n_gregs].fix = fixP; + gregs->greg_fixes[gregs->n_gregs++].offs = offs; + } + + /* For each symbol having a GREG definition, sort those definitions on + offset. */ + for (i = 0; i < n_greg_symbols; i++) + qsort (all_greg_symbols[i]->greg_fixes, all_greg_symbols[i]->n_gregs, + sizeof (all_greg_symbols[i]->greg_fixes[0]), cmp_greg_symbol_fixes); + + if (real_reg_section != NULL) + { + asection **secpp; + + /* FIXME: Pass error state gracefully. */ + if (bfd_get_section_flags (stdoutput, real_reg_section) & SEC_HAS_CONTENTS) + as_fatal (_("register section has contents\n")); + + /* FIXME: This does not seem like the proper way to kill a section, + but it's the way it's done elsewhere, like elf64-alpha.c. */ + /* Really remove the section. */ + for (secpp = &stdoutput->sections; + *secpp != real_reg_section; + secpp = &(*secpp)->next) + ; + *secpp = (*secpp)->next; + --stdoutput->section_count; + } + +} + +/* Provide an expression for a built-in name provided when-used. + Either a symbol that is a handler; living in 0x10*[1..8] and having + name [DVWIOUZX]_Handler, or a mmixal built-in symbol. + + If the name isn't a built-in name and parsed into *EXPP, return zero. */ + +int +mmix_parse_predefined_name (name, expP) + char *name; + expressionS *expP; +{ + char *canon_name; + char *handler_charp; + const char handler_chars[] = "DVWIOUZX"; + symbolS *symp; + + if (! predefined_syms) + return 0; + + canon_name = tc_canonicalize_symbol_name (name); + + if (canon_name[1] == '_' + && strcmp (canon_name + 2, "Handler") == 0 + && (handler_charp = strchr (handler_chars, *canon_name)) != NULL) + { + /* If the symbol doesn't exist, provide one relative to the .text + section. + + FIXME: We should provide separate sections, mapped in the linker + script. */ + symp = symbol_find (name); + if (symp == NULL) + symp = symbol_new (name, text_section, + 0x10 * (handler_charp + 1 - handler_chars), + &zero_address_frag); + } + else + { + /* These symbols appear when referenced; needed for + mmixal-compatible programs. */ + unsigned int i; + + static const struct + { + const char *name; + valueT val; + } predefined_abs_syms[] = + { + {"Data_Segment", (valueT) 0x20 << 56}, + {"Pool_Segment", (valueT) 0x40 << 56}, + {"Stack_Segment", (valueT) 0x60 << 56}, + {"StdIn", 0}, + {"StdOut", 1}, + {"StdErr", 2}, + {"TextRead", 0}, + {"TextWrite", 1}, + {"BinaryRead", 2}, + {"BinaryWrite", 3}, + {"BinaryReadWrite", 4}, + {"Halt", 0}, + {"Fopen", 1}, + {"Fclose", 2}, + {"Fread", 3}, + {"Fgets", 4}, + {"Fgetws", 5}, + {"Fwrite", 6}, + {"Fputs", 7}, + {"Fputws", 8}, + {"Fseek", 9}, + {"Ftell", 10}, + {"D_BIT", 0x80}, + {"V_BIT", 0x40}, + {"W_BIT", 0x20}, + {"I_BIT", 0x10}, + {"O_BIT", 0x08}, + {"U_BIT", 0x04}, + {"Z_BIT", 0x02}, + {"X_BIT", 0x01}, + {"Inf", 0x7ff00000} + }; + + /* If it's already in the symbol table, we shouldn't do anything. */ + symp = symbol_find (name); + if (symp != NULL) + return 0; + + for (i = 0; + i < sizeof (predefined_abs_syms)/sizeof (predefined_abs_syms[0]); + i++) + if (strcmp (canon_name, predefined_abs_syms[i].name) == 0) + { + symbol_table_insert (symbol_new (predefined_abs_syms[i].name, + absolute_section, + predefined_abs_syms[i].val, + &zero_address_frag)); + + /* Let gas find the symbol we just created, through its + ordinary lookup. */ + return 0; + } + + /* Not one of those symbols. Let gas handle it. */ + return 0; + } + + expP->X_op = O_symbol; + expP->X_add_number = 0; + expP->X_add_symbol = symp; + expP->X_op_symbol = NULL; + + return 1; +} + +/* Worker for mmix_frob_file_before_adjust. */ + +static void +mmix_frob_local_reloc (abfd, sec, xxx) + bfd *abfd ATTRIBUTE_UNUSED; + asection *sec; + PTR xxx ATTRIBUTE_UNUSED; +{ + segment_info_type *seginfo = seg_info (sec); + fixS *fixp; + + if (seginfo == NULL) + return; + + for (fixp = seginfo->fix_root; fixp; fixp = fixp->fx_next) + if (! fixp->fx_done && fixp->fx_addsy != NULL) + { + symbolS *sym = fixp->fx_addsy; + asection *section = S_GET_SEGMENT (sym); + + if (section == reg_section + && fixp->fx_r_type == BFD_RELOC_MMIX_LOCAL) + { + /* If the register is marked global, we don't need to replace + with the *real* register section since that will be done + when the symbol is changed. */ + if (! S_IS_EXTERNAL (sym)) + /* If it's a local symbol, we replace it with an anonymous + one with the same constant value. */ + fixp->fx_addsy = expr_build_uconstant (S_GET_VALUE (sym)); + } + } +} + +/* Change fixups for register symbols for BFD_MMIX_LOCAL to be for an + absolute symbol. */ + +void +mmix_frob_file_before_adjust () +{ + return; + bfd_map_over_sections (stdoutput, mmix_frob_local_reloc, (char *) 0); +} + +/* Just check that we don't have a BSPEC/ESPEC pair active when changing + sections "normally", and get knowledge about alignment from the new + section. */ + +void +mmix_md_elf_section_change_hook () +{ + if (doing_bspec) + as_bad (_("section change from within a BSPEC/ESPEC pair is not supported")); + + last_alignment = bfd_get_section_alignment (now_seg->owner, now_seg); + want_unaligned = 0; +} + +/* The LOC worker. This is like s_org, but we have to support changing + section too. */ + +static void +s_loc (ignore) + int ignore ATTRIBUTE_UNUSED; +{ + segT section; + expressionS exp; + char *p; + symbolS *sym; + offsetT off; + + /* Must not have a BSPEC in progress. */ + if (doing_bspec) + { + as_bad (_("directive LOC from within a BSPEC/ESPEC pair is not supported")); + return; + } + + section = expression (&exp); + + if (exp.X_op == O_illegal + || exp.X_op == O_absent + || exp.X_op == O_big + || section == undefined_section) + { + as_bad (_("invalid LOC expression")); + return; + } + + if (section == absolute_section) + { + /* Translate a constant into a suitable section. */ + + if (exp.X_add_number < ((offsetT) 0x20 << 56)) + { + /* Lower than Data_Segment - assume it's .text. */ + section = text_section; + + /* Save the lowest seen location, so we can pass on this + information to the linker. We don't actually org to this + location here, we just pass on information to the linker so + it can put the code there for us. */ + + /* If there was already a loc (that has to be set lower than + this one), we org at (this - lower). There's an implicit + "LOC 0" before any entered code. FIXME: handled by spurious + settings of text_has_contents. */ + if (exp.X_add_number < 0 + || exp.X_add_number < (offsetT) lowest_text_loc) + { + as_bad (_("LOC expression stepping backwards is not supported")); + exp.X_op = O_absent; + } + else + { + if (text_has_contents && lowest_text_loc == (bfd_vma) -1) + lowest_text_loc = 0; + + if (lowest_text_loc == (bfd_vma) -1) + { + lowest_text_loc = exp.X_add_number; + + /* We want only to change the section, not set an offset. */ + exp.X_op = O_absent; + } + else + exp.X_add_number -= lowest_text_loc; + } + } + else + { + /* Do the same for the .data section. */ + section = data_section; + + if (exp.X_add_number < (offsetT) lowest_data_loc) + { + as_bad (_("LOC expression stepping backwards is not supported")); + exp.X_op = O_absent; + } + else + { + if (data_has_contents && lowest_data_loc == (bfd_vma) -1) + lowest_data_loc = (bfd_vma) 0x20 << 56; + + if (lowest_data_loc == (bfd_vma) -1) + { + lowest_data_loc = exp.X_add_number; + + /* We want only to change the section, not set an offset. */ + exp.X_op = O_absent; + } + else + exp.X_add_number -= lowest_data_loc; + } + } + } + + if (section != now_seg) + { + obj_elf_section_change_hook (); + subseg_set (section, 0); + + /* Call our section change hooks using the official hook. */ + md_elf_section_change_hook (); + } + + if (exp.X_op != O_absent) + { + if (exp.X_op != O_constant && exp.X_op != O_symbol) + { + /* Handle complex expressions. */ + sym = make_expr_symbol (&exp); + off = 0; + } + else + { + sym = exp.X_add_symbol; + off = exp.X_add_number; + } + + p = frag_var (rs_org, 1, 1, (relax_substateT) 0, sym, off, (char *) 0); + *p = 0; + } + + mmix_handle_rest_of_empty_line (); +} + +/* The BYTE worker. We have to support sequences of mixed "strings", + numbers and other constant "first-pass" reducible expressions separated + by comma. */ + +static void +mmix_byte () +{ + unsigned int c; + char *start; + + if (now_seg == text_section) + text_has_contents = 1; + else if (now_seg == data_section) + data_has_contents = 1; + + do + { + SKIP_WHITESPACE (); + switch (*input_line_pointer) + { + case '\"': + ++input_line_pointer; + start = input_line_pointer; + while (is_a_char (c = next_char_of_string ())) + { + FRAG_APPEND_1_CHAR (c); + } + + if (input_line_pointer[-1] != '\"') + { + /* We will only get here in rare cases involving #NO_APP, + where the unterminated string is not recognized by the + preformatting pass. */ + as_bad (_("unterminated string")); + mmix_discard_rest_of_line (); + return; + } + break; + + default: + { + expressionS exp; + segT expseg = expression (&exp); + + /* We have to allow special register names as constant numbers. */ + if ((expseg != absolute_section && expseg != reg_section) + || (exp.X_op != O_constant + && (exp.X_op != O_register + || exp.X_add_number <= 255))) + { + as_bad (_("BYTE expression not a pure number")); + mmix_discard_rest_of_line (); + return; + } + else if ((exp.X_add_number > 255 && exp.X_op != O_register) + || exp.X_add_number < 0) + { + /* Note that mmixal does not allow negative numbers in + BYTE sequences, so neither should we. */ + as_bad (_("BYTE expression not in the range 0..255")); + mmix_discard_rest_of_line (); + return; + } + + FRAG_APPEND_1_CHAR (exp.X_add_number); + } + break; + } + + SKIP_WHITESPACE (); + c = *input_line_pointer++; + } + while (c == ','); + + input_line_pointer--; + + if (mmix_gnu_syntax) + demand_empty_rest_of_line (); + else + { + mmix_discard_rest_of_line (); + /* Do like demand_empty_rest_of_line and step over the end-of-line + boundary. */ + input_line_pointer++; + } + + /* Make sure we align for the next instruction. */ + last_alignment = 0; +} + +/* Like cons_worker, but we have to ignore "naked comments", not barf on + them. Implements WYDE, TETRA and OCTA. We're a little bit more + lenient than mmix_byte but FIXME: they should eventually merge. */ + +static void +mmix_cons (nbytes) + int nbytes; +{ + expressionS exp; + char *start; + + /* If we don't have any contents, then it's ok to have a specified start + address that is not a multiple of the max data size. We will then + align it as necessary when we get here. Otherwise, it's a fatal sin. */ + if (now_seg == text_section) + { + if (lowest_text_loc != (bfd_vma) -1 + && (lowest_text_loc & (nbytes - 1)) != 0) + { + if (text_has_contents) + as_bad (_("data item with alignment larger than location")); + else if (want_unaligned) + as_bad (_("unaligned data at an absolute location is not supported")); + + lowest_text_loc &= ~((bfd_vma) nbytes - 1); + lowest_text_loc += (bfd_vma) nbytes; + } + + text_has_contents = 1; + } + else if (now_seg == data_section) + { + if (lowest_data_loc != (bfd_vma) -1 + && (lowest_data_loc & (nbytes - 1)) != 0) + { + if (data_has_contents) + as_bad (_("data item with alignment larger than location")); + else if (want_unaligned) + as_bad (_("unaligned data at an absolute location is not supported")); + + lowest_data_loc &= ~((bfd_vma) nbytes - 1); + lowest_data_loc += (bfd_vma) nbytes; + } + + data_has_contents = 1; + } + + /* Always align these unless asked not to (valid for the current pseudo). */ + if (! want_unaligned) + { + last_alignment = nbytes == 2 ? 1 : (nbytes == 4 ? 2 : 3); + frag_align (last_alignment, 0, 0); + record_alignment (now_seg, last_alignment); + } + + /* For mmixal compatibility, a label for an instruction (and emitting + pseudo) refers to the _aligned_ address. So we have to emit the + label here. */ + if (current_fb_label >= 0) + colon (fb_label_name (current_fb_label, 1)); + else if (pending_label != NULL) + { + colon (pending_label); + pending_label = NULL; + } + + SKIP_WHITESPACE (); + + if (is_end_of_line [(unsigned int) *input_line_pointer]) + { + /* Default to zero if the expression was absent. */ + + exp.X_op = O_constant; + exp.X_add_number = 0; + exp.X_unsigned = 0; + exp.X_add_symbol = NULL; + exp.X_op_symbol = NULL; + emit_expr (&exp, (unsigned int) nbytes); + } + else + do + { + unsigned int c; + + switch (*input_line_pointer) + { + /* We support strings here too; each character takes up nbytes + bytes. */ + case '\"': + ++input_line_pointer; + start = input_line_pointer; + while (is_a_char (c = next_char_of_string ())) + { + exp.X_op = O_constant; + exp.X_add_number = c; + exp.X_unsigned = 1; + emit_expr (&exp, (unsigned int) nbytes); + } + + if (input_line_pointer[-1] != '\"') + { + /* We will only get here in rare cases involving #NO_APP, + where the unterminated string is not recognized by the + preformatting pass. */ + as_bad (_("unterminated string")); + mmix_discard_rest_of_line (); + return; + } + break; + + default: + { + expression (&exp); + emit_expr (&exp, (unsigned int) nbytes); + SKIP_WHITESPACE (); + } + break; + } + } + while (*input_line_pointer++ == ','); + + input_line_pointer--; /* Put terminator back into stream. */ + + mmix_handle_rest_of_empty_line (); + + /* We don't need to step up the counter for the current_fb_label here; + that's handled by the caller. */ +} + +/* The md_do_align worker. At present, we just record an alignment to + nullify the automatic alignment we do for WYDE, TETRA and OCTA, as gcc + does not use the unaligned macros when attribute packed is used. + Arguably this is a GCC bug. */ + +void +mmix_md_do_align (n, fill, len, max) + int n; + char *fill ATTRIBUTE_UNUSED; + int len ATTRIBUTE_UNUSED; + int max ATTRIBUTE_UNUSED; +{ + last_alignment = n; + want_unaligned = n == 0; +} diff -uprN binutils-2.11.92.0.10/gas/config/tc-mmix.h binutils-2.11.92.0.12/gas/config/tc-mmix.h --- binutils-2.11.92.0.10/gas/config/tc-mmix.h Wed Dec 31 16:00:00 1969 +++ binutils-2.11.92.0.12/gas/config/tc-mmix.h Fri Nov 16 14:05:52 2001 @@ -0,0 +1,210 @@ +/* tc-mmix.h -- Header file for tc-mmix.c. + Copyright (C) 2001 Free Software Foundation, Inc. + Written by Hans-Peter Nilsson (hp@bitrange.com). + + This file is part of GAS, the GNU Assembler. + + GAS is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GAS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#define TC_MMIX + +/* See gas/doc/internals.texi for explanation of these macros. */ +#define TARGET_FORMAT "elf64-mmix" +#define TARGET_ARCH bfd_arch_mmix +#define TARGET_BYTES_BIG_ENDIAN 1 + +extern const char mmix_comment_chars[]; +#define tc_comment_chars mmix_comment_chars + +extern const char mmix_symbol_chars[]; +#define tc_symbol_chars mmix_symbol_chars + +extern const char mmix_exp_chars[]; +#define EXP_CHARS mmix_exp_chars + +extern const char mmix_flt_chars[]; +#define FLT_CHARS mmix_flt_chars + +/* "@" is a synonym for ".". */ +#define LEX_AT (LEX_BEGIN_NAME) + +extern int mmix_label_without_colon_this_line PARAMS ((void)); +#define LABELS_WITHOUT_COLONS mmix_label_without_colon_this_line () + +extern int mmix_next_semicolon_is_eoln; +#define TC_EOL_IN_INSN(p) (*(p) == ';' && ! mmix_next_semicolon_is_eoln) + +/* This is one direction we can get mmixal compatibility. */ +extern void mmix_handle_mmixal PARAMS ((void)); +#define md_start_line_hook mmix_handle_mmixal + +extern void mmix_md_begin PARAMS ((void)); +#define md_begin mmix_md_begin + +extern void mmix_md_end PARAMS ((void)); +#define md_end mmix_md_end + +extern int mmix_current_location \ + PARAMS ((void (*fn) (expressionS *), expressionS *)); +extern int mmix_parse_predefined_name PARAMS ((char *, expressionS *)); + +extern char *mmix_current_prefix; + +/* A bit ugly, since we "know" that there's a static function + current_location that does what we want. We also strip off a leading + ':' in another ugly way. + + The [DVWIOUZX]_Handler symbols are provided when-used. */ + +extern int mmix_gnu_syntax; +#define md_parse_name(name, exp, cpos) \ + (! mmix_gnu_syntax \ + && (name[0] == '@' \ + ? (! is_part_of_name (name[1]) \ + && mmix_current_location (current_location, exp)) \ + : ((name[0] == ':' || isupper (name[0])) \ + && mmix_parse_predefined_name (name, exp)))) + +extern char *mmix_prefix_name PARAMS ((char *)); + +/* We implement when *creating* a symbol, we also need to strip a ':' or + prepend a prefix. */ +#define tc_canonicalize_symbol_name(x) \ + (mmix_current_prefix == NULL && (x)[0] != ':' ? (x) : mmix_prefix_name (x)) + +#define md_undefined_symbol(x) NULL + +extern void mmix_fb_label PARAMS ((expressionS *)); + +/* Since integer_constant is local to expr.c, we have to make this a + macro. FIXME: Do it cleaner. */ +#define md_operand(exp) \ + do { \ + if (input_line_pointer[0] == '#') \ + { \ + input_line_pointer++; \ + integer_constant (16, (exp)); \ + } \ + else if (input_line_pointer[0] == '&' \ + && input_line_pointer[1] != '&') \ + as_bad (_("`&' serial number operator is not supported")); \ + else \ + mmix_fb_label (exp); \ + } while (0) + + +/* Gas dislikes the 2ADD, 8ADD etc. insns, so we have to assemble them in + the error-recovery loop. Hopefully there are no significant + differences. Also, space on a line isn't gracefully handled. */ +extern int mmix_assemble_return_nonzero PARAMS ((char *)); +#define tc_unrecognized_line(c) \ + ((c) == ' ' \ + || (((c) == '1' || (c) == '2' || (c) == '4' || (c) == '8') \ + && mmix_assemble_return_nonzero (input_line_pointer - 1))) + +#define md_number_to_chars number_to_chars_bigendian + +#define WORKING_DOT_WORD + +extern const struct relax_type mmix_relax_table[]; +#define TC_GENERIC_RELAX_TABLE mmix_relax_table + +/* We use the relax table for everything except the GREG frags. */ +extern long mmix_md_relax_frag PARAMS ((segT, fragS *, long)); +#define md_relax_frag mmix_md_relax_frag + +#define tc_fix_adjustable(X) \ + ((! (X)->fx_addsy \ + || (! S_IS_WEAK ((X)->fx_addsy) \ + && S_GET_SEGMENT ((X)->fx_addsy) != reg_section)) \ + && (X)->fx_r_type != BFD_RELOC_VTABLE_INHERIT \ + && (X)->fx_r_type != BFD_RELOC_VTABLE_ENTRY) + +/* Adjust symbols which are registers. */ +#define tc_adjust_symtab() mmix_adjust_symtab () +extern void mmix_adjust_symtab PARAMS ((void)); + +/* Avoid outputting GAS register section symbols. This happens when the + assembly had errors, and will propagate to an assert in BFD. FIXME: + It seems the symbol output when-errors is a bug in GAS. Fix that + some time. See also tc_gen_reloc. + + Here's where we make all symbols global, when so requested. + We must avoid doing that for expression symbols or section symbols, + though. */ +extern int mmix_globalize_symbols; +#define tc_frob_symbol(sym, punt) \ + do { \ + if (S_GET_SEGMENT (sym) == reg_section \ + || (symp) == section_symbol (absolute_section)) \ + (punt) = 1; \ + \ + if (mmix_globalize_symbols \ + && ! symbol_section_p (sym) \ + && symp != section_symbol (absolute_section) \ + && (! S_IS_LOCAL (sym) \ + || S_GET_SEGMENT (sym) == reg_section) \ + && (S_GET_SEGMENT (sym) != reg_section \ + || (S_GET_NAME (sym)[0] != '$' \ + && S_GET_VALUE (sym) < 256))) \ + S_SET_EXTERNAL (sym); \ + } while (0) + +/* When relaxing, we need to emit various relocs we otherwise wouldn't. */ +#define TC_FORCE_RELOCATION(fix) mmix_force_relocation (fix) +extern int mmix_force_relocation PARAMS ((struct fix *)); + +/* Call md_pcrel_from_section(), not md_pcrel_from(). */ +#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC) +extern long md_pcrel_from_section PARAMS ((struct fix *, segT)); + +#define md_section_align(seg, size) (size) + +#define LISTING_HEADER "GAS for MMIX" + +/* The default of 4 means Bcc expansion looks like it's missing a line. */ +#define LISTING_LHS_CONT_LINES 5 + +extern fragS *mmix_opcode_frag; +#define TC_FRAG_TYPE fragS * +#define TC_FRAG_INIT(frag) (frag)->tc_frag_data = mmix_opcode_frag + +/* We need to associate each section symbol with a list of GREGs defined + for that section/segment and sorted on offset, between the point where + all symbols have been evaluated and all frags mapped, and when the + fixups are done and relocs are output. Similarly for each unknown + symbol. */ +extern void mmix_frob_file PARAMS ((void)); +#define tc_frob_file mmix_frob_file + +/* Used by mmix_frob_file. Hangs on section symbols and unknown symbols. */ +struct mmix_symbol_gregs; +#define TC_SYMFIELD_TYPE struct mmix_symbol_gregs * + +extern void mmix_frob_file_before_adjust PARAMS ((void)); +#define tc_frob_file_before_adjust mmix_frob_file_before_adjust + +extern void mmix_md_elf_section_change_hook PARAMS ((void)); +#define md_elf_section_change_hook mmix_md_elf_section_change_hook + +extern void mmix_md_do_align PARAMS ((int, char *, int, int)); +#define md_do_align(n, fill, len, max, label) \ + mmix_md_do_align (n, fill, len, max) + +/* Each insn is a tetrabyte (4 bytes) long, but if there are BYTE + sequences sprinkled in, we can get unaligned DWARF2 offsets, so let's + explicitly say one byte. */ +#define DWARF2_LINE_MIN_INSN_LENGTH 1 diff -uprN binutils-2.11.92.0.10/gas/config/tc-mn10200.c binutils-2.11.92.0.12/gas/config/tc-mn10200.c --- binutils-2.11.92.0.10/gas/config/tc-mn10200.c Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/config/tc-mn10200.c Fri Nov 16 14:05:52 2001 @@ -760,7 +760,7 @@ md_begin () op++; } - /* This is both a simplification (we don't have to write md_apply_fix) + /* This is both a simplification (we don't have to write md_apply_fix3) and support for future optimizations (branch shortening and similar stuff in the linker. */ linkrelax = 1; @@ -1300,16 +1300,15 @@ md_pcrel_from (fixp) #endif } -int -md_apply_fix3 (fixp, valuep, seg) - fixS *fixp; - valueT *valuep; - segT seg; +void +md_apply_fix3 (fixP, valP, seg) + fixS * fixP; + valueT * valP ATTRIBUTE_UNUSED; + segT seg ATTRIBUTE_UNUSED; { /* We shouldn't ever get here because linkrelax is nonzero. */ abort (); - fixp->fx_done = 1; - return 0; + fixP->fx_done = 1; } /* Insert an operand value into an instruction. */ diff -uprN binutils-2.11.92.0.10/gas/config/tc-mn10200.h binutils-2.11.92.0.12/gas/config/tc-mn10200.h --- binutils-2.11.92.0.10/gas/config/tc-mn10200.h Fri Mar 9 11:17:06 2001 +++ binutils-2.11.92.0.12/gas/config/tc-mn10200.h Fri Nov 16 14:05:52 2001 @@ -1,5 +1,5 @@ /* tc-mn10200.h -- Header file for tc-mn10200.c. - Copyright 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -31,7 +31,6 @@ #define TARGET_FORMAT "elf32-mn10200" -#define MD_APPLY_FIX3 #define md_operand(x) /* Permit temporary numeric labels. */ diff -uprN binutils-2.11.92.0.10/gas/config/tc-mn10300.c binutils-2.11.92.0.12/gas/config/tc-mn10300.c --- binutils-2.11.92.0.10/gas/config/tc-mn10300.c Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/config/tc-mn10300.c Fri Nov 16 14:05:52 2001 @@ -1908,21 +1908,21 @@ md_pcrel_from (fixp) return fixp->fx_frag->fr_address + fixp->fx_where; } -int -md_apply_fix3 (fixp, valuep, seg) - fixS *fixp; - valueT *valuep; +void +md_apply_fix3 (fixP, valP, seg) + fixS * fixP; + valueT * valP; segT seg; { - char *fixpos = fixp->fx_where + fixp->fx_frag->fr_literal; + char * fixpos = fixP->fx_where + fixP->fx_frag->fr_literal; int size = 0; - int value; + int value = (int) * valP; - assert (fixp->fx_r_type < BFD_RELOC_UNUSED); + assert (fixP->fx_r_type < BFD_RELOC_UNUSED); /* This should never happen. */ if (seg->flags & SEC_ALLOC) - abort (); + abort (); /* The value we are passed in *valuep includes the symbol values. Since we are using BFD_ASSEMBLER, if we are doing this relocation @@ -1935,22 +1935,20 @@ md_apply_fix3 (fixp, valuep, seg) *valuep, and must use fx_offset instead. However, if the reloc is PC relative, we do want to use *valuep since it includes the result of md_pcrel_from. */ - if (fixp->fx_addsy == (symbolS *) NULL || fixp->fx_pcrel) - value = *valuep; - else - value = fixp->fx_offset; + if (fixP->fx_addsy != (symbolS *) NULL && ! fixP->fx_pcrel) + value = fixP->fx_offset; /* If the fix is relative to a symbol which is not defined, or not in the same segment as the fix, we cannot resolve it here. */ - if (fixp->fx_addsy != NULL - && (! S_IS_DEFINED (fixp->fx_addsy) - || (S_GET_SEGMENT (fixp->fx_addsy) != seg))) + if (fixP->fx_addsy != NULL + && (! S_IS_DEFINED (fixP->fx_addsy) + || (S_GET_SEGMENT (fixP->fx_addsy) != seg))) { - fixp->fx_done = 0; - return 0; + fixP->fx_done = 0; + return; } - switch (fixp->fx_r_type) + switch (fixP->fx_r_type) { case BFD_RELOC_8: case BFD_RELOC_8_PCREL: @@ -1969,22 +1967,20 @@ md_apply_fix3 (fixp, valuep, seg) case BFD_RELOC_VTABLE_INHERIT: case BFD_RELOC_VTABLE_ENTRY: - fixp->fx_done = 0; - return 1; + fixP->fx_done = 0; + return; case BFD_RELOC_NONE: default: - as_bad_where (fixp->fx_file, fixp->fx_line, - _("Bad relocation fixup type (%d)"), fixp->fx_r_type); + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Bad relocation fixup type (%d)"), fixP->fx_r_type); } md_number_to_chars (fixpos, value, size); /* If a symbol remains, pass the fixup, as a reloc, onto the linker. */ - if (fixp->fx_addsy == NULL) - fixp->fx_done = 1; - - return 0; + if (fixP->fx_addsy == NULL) + fixP->fx_done = 1; } /* Return nonzero if the fixup in FIXP will require a relocation, diff -uprN binutils-2.11.92.0.10/gas/config/tc-mn10300.h binutils-2.11.92.0.12/gas/config/tc-mn10300.h --- binutils-2.11.92.0.10/gas/config/tc-mn10300.h Fri Mar 9 11:17:06 2001 +++ binutils-2.11.92.0.12/gas/config/tc-mn10300.h Fri Nov 16 14:05:52 2001 @@ -1,5 +1,5 @@ /* tc-mn10300.h -- Header file for tc-mn10300.c. - Copyright 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -35,13 +35,9 @@ #define TC_FORCE_RELOCATION(fixp) mn10300_force_relocation (fixp) extern int mn10300_force_relocation PARAMS ((struct fix *)); -#define TC_HANDLES_FX_DONE - #define obj_fix_adjustable(fixP) mn10300_fix_adjustable (fixP) extern boolean mn10300_fix_adjustable PARAMS ((struct fix *)); -#define MD_APPLY_FIX3 md_apply_fix3 - /* Fixup debug sections since we will never relax them. */ #define TC_LINKRELAX_FIXUP(seg) (seg->flags & SEC_ALLOC) diff -uprN binutils-2.11.92.0.10/gas/config/tc-ns32k.c binutils-2.11.92.0.12/gas/config/tc-ns32k.c --- binutils-2.11.92.0.10/gas/config/tc-ns32k.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-ns32k.c Fri Nov 16 14:05:52 2001 @@ -1954,52 +1954,43 @@ md_fix_pcrel_adjust (fixP) out separate functions for each kind of thing we could be fixing. They all get called from here. */ -#ifdef BFD_ASSEMBLER -int -md_apply_fix (fixP, valp) - fixS *fixP; - valueT *valp; -#else void -md_apply_fix (fixP, val) +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - long val; -#endif + valueT * valP; + segT seg ATTRIBUTE_UNUSED; { -#ifdef BFD_ASSEMBLER - long val = *valp; -#endif + long val = * (long *) valP; fragS *fragP = fixP->fx_frag; - char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; if (fix_bit_fixP (fixP)) - { /* Bitfields to fix, sigh. */ - md_number_to_field (buf, val, fix_bit_fixP (fixP)); + /* Bitfields to fix, sigh. */ + md_number_to_field (buf, val, fix_bit_fixP (fixP)); + + else switch (fix_im_disp (fixP)) + { + case 0: + /* Immediate field. */ + md_number_to_imm (buf, val, fixP->fx_size); + break; + + case 1: + /* Displacement field. */ + /* Calculate offset */ + md_number_to_disp (buf, + (fixP->fx_pcrel ? val + md_fix_pcrel_adjust (fixP) + : val), fixP->fx_size); + break; + + case 2: + /* Pointer in a data object. */ + md_number_to_chars (buf, val, fixP->fx_size); + break; } - else - switch (fix_im_disp (fixP)) - { - case 0: /* Immediate field. */ - md_number_to_imm (buf, val, fixP->fx_size); - break; - - case 1: /* Displacement field. */ - /* Calculate offset */ - { - md_number_to_disp (buf, - (fixP->fx_pcrel ? val + md_fix_pcrel_adjust (fixP) - : val), fixP->fx_size); - } - break; - - case 2: /* Pointer in a data object. */ - md_number_to_chars (buf, val, fixP->fx_size); - break; - } -#ifdef BSD_ASSEMBLER - return 1; -#endif + + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } /* Convert a relaxed displacement to ditto in final output */ diff -uprN binutils-2.11.92.0.10/gas/config/tc-openrisc.h binutils-2.11.92.0.12/gas/config/tc-openrisc.h --- binutils-2.11.92.0.10/gas/config/tc-openrisc.h Wed May 2 14:51:53 2001 +++ binutils-2.11.92.0.12/gas/config/tc-openrisc.h Fri Nov 16 14:05:52 2001 @@ -51,7 +51,6 @@ extern long md_pcrel_from_section PARAMS /* We don't need to handle .word strangely. */ #define WORKING_DOT_WORD -#define MD_APPLY_FIX3 #define md_apply_fix3 gas_cgen_md_apply_fix3 extern boolean openrisc_fix_adjustable PARAMS ((struct fix *)); @@ -61,8 +60,6 @@ extern boolean openrisc_fix_adjustable P extern int openrisc_force_relocation PARAMS ((struct fix *)); #define TC_FORCE_RELOCATION(fix) openrisc_force_relocation (fix) -#define TC_HANDLES_FX_DONE - #define tc_gen_reloc gas_cgen_tc_gen_reloc /* Call md_pcrel_from_section(), not md_pcrel_from(). */ diff -uprN binutils-2.11.92.0.10/gas/config/tc-pdp11.c binutils-2.11.92.0.12/gas/config/tc-pdp11.c --- binutils-2.11.92.0.10/gas/config/tc-pdp11.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-pdp11.c Fri Nov 16 14:05:52 2001 @@ -163,15 +163,17 @@ md_number_to_chars (con, value, nbytes) } /* Fix up some data or instructions after we find out the value of a symbol - that they reference. */ + that they reference. Knows about order of bytes in address. */ -int /* Knows about order of bytes in address. */ -md_apply_fix (fixP, value) +void +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - valueT *value; + valueT * valP; + segT seg ATTRIBUTE_UNUSED; { valueT code; valueT mask; + valueT val = * valP; char *buf; int shift; int size; @@ -200,13 +202,15 @@ md_apply_fix (fixP, value) } if (fixP->fx_addsy != NULL) - *value += symbol_get_bfdsym (fixP->fx_addsy)->section->vma; + val += symbol_get_bfdsym (fixP->fx_addsy)->section->vma; /* *value += fixP->fx_addsy->bsym->section->vma; */ code &= ~mask; - code |= (*value >> shift) & mask; + code |= (val >> shift) & mask; number_to_chars_littleendian (buf, code, size); - return 0; + + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } long @@ -1553,7 +1557,7 @@ tc_gen_reloc (section, fixp) *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; - /* this is taken account for in md_apply_fix() */ + /* This is taken account for in md_apply_fix3(). */ reloc->addend = -symbol_get_bfdsym (fixp->fx_addsy)->section->vma; switch (fixp->fx_r_type) diff -uprN binutils-2.11.92.0.10/gas/config/tc-pj.c binutils-2.11.92.0.12/gas/config/tc-pj.c --- binutils-2.11.92.0.10/gas/config/tc-pj.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-pj.c Fri Nov 16 14:05:52 2001 @@ -427,13 +427,14 @@ PJ options:\n\ /* Apply a fixup to the object file. */ -int -md_apply_fix (fixP, valp) +void +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - valueT *valp; + valueT * valP; + segT seg ATTRIBUTE_UNUSED; { char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; - long val = *valp; + long val = * (long *) valP; long max, min; int shift; @@ -452,7 +453,7 @@ md_apply_fix (fixP, valp) case BFD_RELOC_VTABLE_INHERIT: case BFD_RELOC_VTABLE_ENTRY: fixP->fx_done = 0; - return 0; + return; case BFD_RELOC_PJ_CODE_REL16: if (val < -0x8000 || val >= 0x7fff) @@ -526,7 +527,8 @@ md_apply_fix (fixP, valp) if (max != 0 && (val < min || val > max)) as_bad_where (fixP->fx_file, fixP->fx_line, _("offset out of range")); - return 0; + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } /* Put number into target byte order. Always put values in an diff -uprN binutils-2.11.92.0.10/gas/config/tc-ppc.c binutils-2.11.92.0.12/gas/config/tc-ppc.c --- binutils-2.11.92.0.10/gas/config/tc-ppc.c Fri Oct 19 23:57:49 2001 +++ binutils-2.11.92.0.12/gas/config/tc-ppc.c Fri Nov 16 14:05:52 2001 @@ -1304,7 +1304,7 @@ ppc_insert_operand (insn, operand, val, const char *errmsg; errmsg = NULL; - insn = (*operand->insert) (insn, (long) val, &errmsg); + insn = (*operand->insert) (insn, (long) val, ppc_cpu | ppc_size, &errmsg); if (errmsg != (const char *) NULL) as_bad_where (file, line, errmsg); } @@ -1942,7 +1942,7 @@ md_assemble (str) from the input. */ if ((operand->flags & PPC_OPERAND_FAKE) != 0) { - insn = (*operand->insert) (insn, 0L, &errmsg); + insn = (*operand->insert) (insn, 0L, ppc_cpu | ppc_size, &errmsg); if (errmsg != (const char *) NULL) as_bad (errmsg); continue; @@ -1955,7 +1955,7 @@ md_assemble (str) { if (operand->insert) { - insn = (*operand->insert) (insn, 0L, &errmsg); + insn = (*operand->insert) (insn, 0L, ppc_cpu | ppc_size, &errmsg); if (errmsg != (const char *) NULL) as_bad (errmsg); } @@ -2312,7 +2312,7 @@ md_assemble (str) BFD_RELOC_UNUSED plus the operand index. This lets us easily handle fixups for any operand type, although that is admittedly not a very exciting feature. We pick a BFD reloc type in - md_apply_fix. */ + md_apply_fix3. */ for (i = 0; i < fc; i++) { const struct powerpc_operand *operand; @@ -5080,36 +5080,33 @@ ppc_fix_adjustable (fix) that, we determine the correct reloc code and put it back in the fixup. */ -int -md_apply_fix3 (fixp, valuep, seg) - fixS *fixp; - valueT *valuep; +void +md_apply_fix3 (fixP, valP, seg) + fixS *fixP; + valueT * valP; segT seg ATTRIBUTE_UNUSED; { - valueT value; + valueT value = * valP; #ifdef OBJ_ELF - value = *valuep; - if (fixp->fx_addsy != NULL) + if (fixP->fx_addsy != NULL) { /* `*valuep' may contain the value of the symbol on which the reloc will be based; we have to remove it. */ - if (symbol_used_in_reloc_p (fixp->fx_addsy) - && S_GET_SEGMENT (fixp->fx_addsy) != absolute_section - && S_GET_SEGMENT (fixp->fx_addsy) != undefined_section - && ! bfd_is_com_section (S_GET_SEGMENT (fixp->fx_addsy))) - value -= S_GET_VALUE (fixp->fx_addsy); + if (symbol_used_in_reloc_p (fixP->fx_addsy) + && S_GET_SEGMENT (fixP->fx_addsy) != absolute_section + && S_GET_SEGMENT (fixP->fx_addsy) != undefined_section + && ! bfd_is_com_section (S_GET_SEGMENT (fixP->fx_addsy))) + value -= S_GET_VALUE (fixP->fx_addsy); /* FIXME: Why '+'? Better yet, what exactly is '*valuep' supposed to be? I think this is related to various similar FIXMEs in tc-i386.c and tc-sparc.c. */ - if (fixp->fx_pcrel) - value += fixp->fx_frag->fr_address + fixp->fx_where; + if (fixP->fx_pcrel) + value += fixP->fx_frag->fr_address + fixP->fx_where; } else - { - fixp->fx_done = 1; - } + fixP->fx_done = 1; #else /* FIXME FIXME FIXME: The value we are passed in *valuep includes the symbol values. Since we are using BFD_ASSEMBLER, if we are @@ -5121,38 +5118,37 @@ md_apply_fix3 (fixp, valuep, seg) *valuep, and must use fx_offset instead. However, if the reloc is PC relative, we do want to use *valuep since it includes the result of md_pcrel_from. This is confusing. */ - if (fixp->fx_addsy == (symbolS *) NULL) - { - value = *valuep; - fixp->fx_done = 1; - } - else if (fixp->fx_pcrel) - value = *valuep; + if (fixP->fx_addsy == (symbolS *) NULL) + fixP->fx_done = 1; + + else if (fixP->fx_pcrel) + ; + else { - value = fixp->fx_offset; - if (fixp->fx_subsy != (symbolS *) NULL) + value = fixP->fx_offset; + if (fixP->fx_subsy != (symbolS *) NULL) { - if (S_GET_SEGMENT (fixp->fx_subsy) == absolute_section) - value -= S_GET_VALUE (fixp->fx_subsy); + if (S_GET_SEGMENT (fixP->fx_subsy) == absolute_section) + value -= S_GET_VALUE (fixP->fx_subsy); else { /* We can't actually support subtracting a symbol. */ - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("expression too complex")); } } } #endif - if ((int) fixp->fx_r_type >= (int) BFD_RELOC_UNUSED) + if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED) { int opindex; const struct powerpc_operand *operand; char *where; unsigned long insn; - opindex = (int) fixp->fx_r_type - (int) BFD_RELOC_UNUSED; + opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED; operand = &powerpc_operands[opindex]; @@ -5165,38 +5161,36 @@ md_apply_fix3 (fixp, valuep, seg) && operand->bits == 16 && operand->shift == 0 && operand->insert == NULL - && fixp->fx_addsy != NULL - && symbol_get_tc (fixp->fx_addsy)->subseg != 0 - && symbol_get_tc (fixp->fx_addsy)->class != XMC_TC - && symbol_get_tc (fixp->fx_addsy)->class != XMC_TC0 - && S_GET_SEGMENT (fixp->fx_addsy) != bss_section) + && fixP->fx_addsy != NULL + && symbol_get_tc (fixP->fx_addsy)->subseg != 0 + && symbol_get_tc (fixP->fx_addsy)->class != XMC_TC + && symbol_get_tc (fixP->fx_addsy)->class != XMC_TC0 + && S_GET_SEGMENT (fixP->fx_addsy) != bss_section) { - value = fixp->fx_offset; - fixp->fx_done = 1; + value = fixP->fx_offset; + fixP->fx_done = 1; } #endif /* Fetch the instruction, insert the fully resolved operand value, and stuff the instruction back again. */ - where = fixp->fx_frag->fr_literal + fixp->fx_where; + where = fixP->fx_frag->fr_literal + fixP->fx_where; if (target_big_endian) insn = bfd_getb32 ((unsigned char *) where); else insn = bfd_getl32 ((unsigned char *) where); insn = ppc_insert_operand (insn, operand, (offsetT) value, - fixp->fx_file, fixp->fx_line); + fixP->fx_file, fixP->fx_line); if (target_big_endian) bfd_putb32 ((bfd_vma) insn, (unsigned char *) where); else bfd_putl32 ((bfd_vma) insn, (unsigned char *) where); - if (fixp->fx_done) - { - /* Nothing else to do here. */ - return 1; - } + if (fixP->fx_done) + /* Nothing else to do here. */ + return; - assert (fixp->fx_addsy != NULL); + assert (fixP->fx_addsy != NULL); /* Determine a BFD reloc value based on the operand information. We are only prepared to turn a few of the operands into @@ -5204,35 +5198,35 @@ md_apply_fix3 (fixp, valuep, seg) if ((operand->flags & PPC_OPERAND_RELATIVE) != 0 && operand->bits == 26 && operand->shift == 0) - fixp->fx_r_type = BFD_RELOC_PPC_B26; + fixP->fx_r_type = BFD_RELOC_PPC_B26; else if ((operand->flags & PPC_OPERAND_RELATIVE) != 0 && operand->bits == 16 && operand->shift == 0) - fixp->fx_r_type = BFD_RELOC_PPC_B16; + fixP->fx_r_type = BFD_RELOC_PPC_B16; else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0 && operand->bits == 26 && operand->shift == 0) - fixp->fx_r_type = BFD_RELOC_PPC_BA26; + fixP->fx_r_type = BFD_RELOC_PPC_BA26; else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0 && operand->bits == 16 && operand->shift == 0) - fixp->fx_r_type = BFD_RELOC_PPC_BA16; + fixP->fx_r_type = BFD_RELOC_PPC_BA16; #if defined (OBJ_XCOFF) || defined (OBJ_ELF) else if ((operand->flags & PPC_OPERAND_PARENS) != 0 && operand->bits == 16 && operand->shift == 0 - && ppc_is_toc_sym (fixp->fx_addsy)) + && ppc_is_toc_sym (fixP->fx_addsy)) { - fixp->fx_r_type = BFD_RELOC_PPC_TOC16; + fixP->fx_r_type = BFD_RELOC_PPC_TOC16; #ifdef OBJ_ELF if (BFD_DEFAULT_TARGET_SIZE == 64 && ppc_size == PPC_OPCODE_64 && (operand->flags & PPC_OPERAND_DS) != 0) - fixp->fx_r_type = BFD_RELOC_PPC64_TOC16_DS; + fixP->fx_r_type = BFD_RELOC_PPC64_TOC16_DS; #endif - fixp->fx_size = 2; + fixP->fx_size = 2; if (target_big_endian) - fixp->fx_where += 2; + fixP->fx_where += 2; } #endif /* defined (OBJ_XCOFF) || defined (OBJ_ELF) */ else @@ -5242,23 +5236,23 @@ md_apply_fix3 (fixp, valuep, seg) /* Use expr_symbol_where to see if this is an expression symbol. */ - if (expr_symbol_where (fixp->fx_addsy, &sfile, &sline)) - as_bad_where (fixp->fx_file, fixp->fx_line, + if (expr_symbol_where (fixP->fx_addsy, &sfile, &sline)) + as_bad_where (fixP->fx_file, fixP->fx_line, _("unresolved expression that must be resolved")); else - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("unsupported relocation against %s"), - S_GET_NAME (fixp->fx_addsy)); - fixp->fx_done = 1; - return 1; + S_GET_NAME (fixP->fx_addsy)); + fixP->fx_done = 1; + return; } } else { #ifdef OBJ_ELF - ppc_elf_validate_fix (fixp, seg); + ppc_elf_validate_fix (fixP, seg); #endif - switch (fixp->fx_r_type) + switch (fixP->fx_r_type) { case BFD_RELOC_CTOR: if (BFD_DEFAULT_TARGET_SIZE == 64 && ppc_size == PPC_OPCODE_64) @@ -5266,26 +5260,26 @@ md_apply_fix3 (fixp, valuep, seg) /* fall through */ case BFD_RELOC_32: - if (fixp->fx_pcrel) - fixp->fx_r_type = BFD_RELOC_32_PCREL; + if (fixP->fx_pcrel) + fixP->fx_r_type = BFD_RELOC_32_PCREL; /* fall through */ 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, + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, value, 4); break; case BFD_RELOC_64: ctor64: - if (fixp->fx_pcrel) - fixp->fx_r_type = BFD_RELOC_64_PCREL; + if (fixP->fx_pcrel) + fixP->fx_r_type = BFD_RELOC_64_PCREL; /* fall through */ case BFD_RELOC_64_PCREL: - md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, value, 8); break; @@ -5320,20 +5314,20 @@ md_apply_fix3 (fixp, valuep, seg) case BFD_RELOC_PPC64_TOC16_HA: #endif #endif - if (fixp->fx_pcrel) + if (fixP->fx_pcrel) { - if (fixp->fx_addsy != NULL) - as_bad_where (fixp->fx_file, fixp->fx_line, + if (fixP->fx_addsy != NULL) + as_bad_where (fixP->fx_file, fixP->fx_line, _("cannot emit PC relative %s relocation against %s"), - bfd_get_reloc_code_name (fixp->fx_r_type), - S_GET_NAME (fixp->fx_addsy)); + bfd_get_reloc_code_name (fixP->fx_r_type), + S_GET_NAME (fixP->fx_addsy)); else - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("cannot emit PC relative %s relocation"), - bfd_get_reloc_code_name (fixp->fx_r_type)); + bfd_get_reloc_code_name (fixP->fx_r_type)); } - md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, value, 2); break; @@ -5341,46 +5335,46 @@ md_apply_fix3 (fixp, valuep, seg) lis %r3,(L1-L2)@ha where L1 and L2 are defined later. */ case BFD_RELOC_HI16: - if (fixp->fx_pcrel) + if (fixP->fx_pcrel) abort (); - md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, PPC_HI (value), 2); break; case BFD_RELOC_HI16_S: - if (fixp->fx_pcrel) + if (fixP->fx_pcrel) abort (); - md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, PPC_HA (value), 2); break; #ifdef OBJ_ELF #if BFD_DEFAULT_TARGET_SIZE == 64 case BFD_RELOC_PPC64_HIGHER: - if (fixp->fx_pcrel) + if (fixP->fx_pcrel) abort (); - md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, PPC_HIGHER (value), 2); break; case BFD_RELOC_PPC64_HIGHER_S: - if (fixp->fx_pcrel) + if (fixP->fx_pcrel) abort (); - md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, PPC_HIGHERA (value), 2); break; case BFD_RELOC_PPC64_HIGHEST: - if (fixp->fx_pcrel) + if (fixP->fx_pcrel) abort (); - md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, PPC_HIGHEST (value), 2); break; case BFD_RELOC_PPC64_HIGHEST_S: - if (fixp->fx_pcrel) + if (fixP->fx_pcrel) abort (); - md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, PPC_HIGHESTA (value), 2); break; @@ -5395,10 +5389,10 @@ md_apply_fix3 (fixp, valuep, seg) case BFD_RELOC_PPC64_TOC16_LO_DS: case BFD_RELOC_PPC64_PLTGOT16_DS: case BFD_RELOC_PPC64_PLTGOT16_LO_DS: - if (fixp->fx_pcrel) + if (fixP->fx_pcrel) abort (); { - unsigned char *where = fixp->fx_frag->fr_literal + fixp->fx_where; + unsigned char *where = fixP->fx_frag->fr_literal + fixP->fx_where; unsigned long val; if (target_big_endian) @@ -5417,45 +5411,45 @@ md_apply_fix3 (fixp, valuep, seg) /* Because SDA21 modifies the register field, the size is set to 4 bytes, rather than 2, so offset it here appropriately. */ case BFD_RELOC_PPC_EMB_SDA21: - if (fixp->fx_pcrel) + if (fixP->fx_pcrel) abort (); - md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where + ((target_big_endian) ? 2 : 0), value, 2); break; case BFD_RELOC_8: - if (fixp->fx_pcrel) + if (fixP->fx_pcrel) abort (); - md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where, value, 1); break; case BFD_RELOC_24_PLT_PCREL: case BFD_RELOC_PPC_LOCAL24PC: - if (!fixp->fx_pcrel && !fixp->fx_done) + if (!fixP->fx_pcrel && !fixP->fx_done) abort (); - if (fixp->fx_done) + if (fixP->fx_done) { char *where; unsigned long insn; /* Fetch the instruction, insert the fully resolved operand value, and stuff the instruction back again. */ - where = fixp->fx_frag->fr_literal + fixp->fx_where; + where = fixP->fx_frag->fr_literal + fixP->fx_where; if (target_big_endian) insn = bfd_getb32 ((unsigned char *) where); else insn = bfd_getl32 ((unsigned char *) where); if ((value & 3) != 0) - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("must branch to an address a multiple of 4")); if ((offsetT) value < -0x40000000 || (offsetT) value >= 0x40000000) - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("@local or @plt branch destination is too far away, %ld bytes"), (long) value); insn = insn | (value & 0x03fffffc); @@ -5467,15 +5461,15 @@ md_apply_fix3 (fixp, valuep, seg) break; case BFD_RELOC_VTABLE_INHERIT: - fixp->fx_done = 0; - if (fixp->fx_addsy - && !S_IS_DEFINED (fixp->fx_addsy) - && !S_IS_WEAK (fixp->fx_addsy)) - S_SET_WEAK (fixp->fx_addsy); + fixP->fx_done = 0; + if (fixP->fx_addsy + && !S_IS_DEFINED (fixP->fx_addsy) + && !S_IS_WEAK (fixP->fx_addsy)) + S_SET_WEAK (fixP->fx_addsy); break; case BFD_RELOC_VTABLE_ENTRY: - fixp->fx_done = 0; + fixP->fx_done = 0; break; #ifdef OBJ_ELF @@ -5483,37 +5477,35 @@ md_apply_fix3 (fixp, valuep, seg) /* Generated by reference to `sym@tocbase'. The sym is ignored by the linker. */ case BFD_RELOC_PPC64_TOC: - fixp->fx_done = 0; + fixP->fx_done = 0; break; #endif #endif default: fprintf (stderr, - _("Gas failure, reloc value %d\n"), fixp->fx_r_type); + _("Gas failure, reloc value %d\n"), fixP->fx_r_type); fflush (stderr); abort (); } } #ifdef OBJ_ELF - fixp->fx_addnumber = value; + fixP->fx_addnumber = value; #else - if (fixp->fx_r_type != BFD_RELOC_PPC_TOC16) - fixp->fx_addnumber = 0; + if (fixP->fx_r_type != BFD_RELOC_PPC_TOC16) + fixP->fx_addnumber = 0; else { #ifdef TE_PE - fixp->fx_addnumber = 0; + fixP->fx_addnumber = 0; #else /* We want to use the offset within the data segment of the symbol, not the actual VMA of the symbol. */ - fixp->fx_addnumber = - - bfd_get_section_vma (stdoutput, S_GET_SEGMENT (fixp->fx_addsy)); + fixP->fx_addnumber = + - bfd_get_section_vma (stdoutput, S_GET_SEGMENT (fixP->fx_addsy)); #endif } #endif - - return 1; } /* Generate a reloc for a fixup. */ diff -uprN binutils-2.11.92.0.10/gas/config/tc-ppc.h binutils-2.11.92.0.12/gas/config/tc-ppc.h --- binutils-2.11.92.0.10/gas/config/tc-ppc.h Mon Aug 27 11:44:51 2001 +++ binutils-2.11.92.0.12/gas/config/tc-ppc.h Fri Nov 16 14:05:52 2001 @@ -82,9 +82,6 @@ extern char *ppc_target_format PARAMS (( /* We don't need to handle .word strangely. */ #define WORKING_DOT_WORD -/* We set the fx_done field appropriately in md_apply_fix. */ -#define TC_HANDLES_FX_DONE - #define MAX_MEM_FOR_RS_ALIGN_CODE 4 #define HANDLE_ALIGN(FRAGP) \ if ((FRAGP)->fr_type == rs_align_code) \ @@ -292,9 +289,6 @@ extern int ppc_elf_frob_symbol PARAMS (( #define DWARF2_LINE_MIN_INSN_LENGTH 4 #endif /* OBJ_ELF */ -/* call md_apply_fix3 with segment instead of md_apply_fix */ -#define MD_APPLY_FIX3 - /* call md_pcrel_from_section, not md_pcrel_from */ #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC) extern long md_pcrel_from_section PARAMS ((struct fix *, segT)); diff -uprN binutils-2.11.92.0.10/gas/config/tc-s390.c binutils-2.11.92.0.12/gas/config/tc-s390.c --- binutils-2.11.92.0.10/gas/config/tc-s390.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-s390.c Fri Nov 16 14:05:52 2001 @@ -1641,6 +1641,36 @@ tc_s390_fix_adjustable(fixP) return 1; } +/* Return true if we must always emit a reloc for a type and false if + there is some hope of resolving it a assembly time. */ +int +tc_s390_force_relocation (fixp) + struct fix *fixp; +{ + /* Ensure we emit a relocation for every reference to the global + offset table or to the procedure link table. */ + switch (fixp->fx_r_type) + { + case BFD_RELOC_390_GOT12: + case BFD_RELOC_32_GOT_PCREL: + case BFD_RELOC_32_GOTOFF: + case BFD_RELOC_390_GOTPC: + case BFD_RELOC_390_GOT16: + case BFD_RELOC_390_GOTPCDBL: + case BFD_RELOC_390_GOT64: + case BFD_RELOC_390_GOTENT: + case BFD_RELOC_390_PLT32: + case BFD_RELOC_390_PLT16DBL: + case BFD_RELOC_390_PLT32DBL: + case BFD_RELOC_390_PLT64: + case BFD_RELOC_VTABLE_INHERIT: + case BFD_RELOC_VTABLE_ENTRY: + return 1; + default: + return 0; + } +} + /* Apply a fixup to the object code. This is called for all the fixups we generated by the call to fix_new_exp, above. In the call above we used a reloc code which was the largest legal reloc code @@ -1650,100 +1680,110 @@ tc_s390_fix_adjustable(fixP) that, we determine the correct reloc code and put it back in the fixup. */ -int -md_apply_fix3 (fixp, valuep, seg) - fixS *fixp; - valueT *valuep; - segT seg ATTRIBUTE_UNUSED; +void +md_apply_fix3 (fixP, valP, seg) + fixS *fixP; + valueT *valP; + segT seg; { char *where; - valueT value; + valueT value = * valP; - value = *valuep; - where = fixp->fx_frag->fr_literal + fixp->fx_where; + where = fixP->fx_frag->fr_literal + fixP->fx_where; - if (fixp->fx_subsy != NULL) + if (fixP->fx_subsy != NULL) { - if (!S_IS_DEFINED (fixp->fx_subsy)) - as_bad_where (fixp->fx_file, fixp->fx_line, + if ((fixP->fx_addsy != NULL + && S_GET_SEGMENT (fixP->fx_addsy) == S_GET_SEGMENT (fixP->fx_subsy) + && SEG_NORMAL (S_GET_SEGMENT (fixP->fx_addsy))) + || (S_GET_SEGMENT (fixP->fx_subsy) == absolute_section)) + value += S_GET_VALUE (fixP->fx_subsy); + if (!S_IS_DEFINED (fixP->fx_subsy)) + as_bad_where (fixP->fx_file, fixP->fx_line, _("unresolved fx_subsy symbol that must be resolved")); - value -= S_GET_VALUE(fixp->fx_subsy); - } + value -= S_GET_VALUE(fixP->fx_subsy); - if (fixp->fx_addsy != NULL) + if (S_GET_SEGMENT (fixP->fx_subsy) == seg && ! fixP->fx_pcrel) + value += MD_PCREL_FROM_SECTION (fixP, seg); + } + + if (fixP->fx_addsy != NULL) { - /* `*valuep' may contain the value of the symbol on which the reloc - will be based; we have to remove it. */ - if (fixp->fx_addsy->sy_used_in_reloc - && S_GET_SEGMENT (fixp->fx_addsy) != absolute_section - && S_GET_SEGMENT (fixp->fx_addsy) != undefined_section - && ! bfd_is_com_section (S_GET_SEGMENT (fixp->fx_addsy))) - value -= S_GET_VALUE (fixp->fx_addsy); + if ((fixP->fx_subsy != NULL + && S_GET_SEGMENT (fixP->fx_addsy) == S_GET_SEGMENT (fixP->fx_subsy) + && SEG_NORMAL (S_GET_SEGMENT(fixP->fx_addsy))) + || (S_GET_SEGMENT (fixP->fx_addsy) == seg + && fixP->fx_pcrel && TC_RELOC_RTSYM_LOC_FIXUP (fixP)) + || (!fixP->fx_pcrel + && S_GET_SEGMENT (fixP->fx_addsy) == absolute_section) + || (S_GET_SEGMENT (fixP->fx_addsy) != undefined_section + && !bfd_is_com_section (S_GET_SEGMENT (fixP->fx_addsy)) + && TC_FIX_ADJUSTABLE(fixP))) + value -= S_GET_VALUE (fixP->fx_addsy); - if (fixp->fx_pcrel) - value += fixp->fx_frag->fr_address + fixp->fx_where; + if (fixP->fx_pcrel) + value += fixP->fx_frag->fr_address + fixP->fx_where; } else - fixp->fx_done = 1; + fixP->fx_done = 1; - if ((int) fixp->fx_r_type >= (int) BFD_RELOC_UNUSED) + if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED) { const struct s390_operand *operand; int opindex; - opindex = (int) fixp->fx_r_type - (int) BFD_RELOC_UNUSED; + opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED; operand = &s390_operands[opindex]; - if (fixp->fx_done) + if (fixP->fx_done) { /* Insert the fully resolved operand value. */ s390_insert_operand (where, operand, (offsetT) value, - fixp->fx_file, fixp->fx_line); - - return 1; + fixP->fx_file, fixP->fx_line); + return; } /* Determine a BFD reloc value based on the operand information. We are only prepared to turn a few of the operands into relocs. */ - fixp->fx_offset = value; + fixP->fx_offset = value; if (operand->bits == 12 && operand->shift == 20) { - fixp->fx_size = 2; - fixp->fx_where += 2; - fixp->fx_r_type = BFD_RELOC_390_12; + fixP->fx_size = 2; + fixP->fx_where += 2; + fixP->fx_r_type = BFD_RELOC_390_12; } else if (operand->bits == 12 && operand->shift == 36) { - fixp->fx_size = 2; - fixp->fx_where += 4; - fixp->fx_r_type = BFD_RELOC_390_12; + fixP->fx_size = 2; + fixP->fx_where += 4; + fixP->fx_r_type = BFD_RELOC_390_12; } else if (operand->bits == 8 && operand->shift == 8) { - fixp->fx_size = 1; - fixp->fx_where += 1; - fixp->fx_r_type = BFD_RELOC_8; + fixP->fx_size = 1; + fixP->fx_where += 1; + fixP->fx_r_type = BFD_RELOC_8; } else if (operand->bits == 16 && operand->shift == 16) { - fixp->fx_size = 2; - fixp->fx_where += 2; + fixP->fx_size = 2; + fixP->fx_where += 2; if (operand->flags & S390_OPERAND_PCREL) { - fixp->fx_r_type = BFD_RELOC_390_PC16DBL; - fixp->fx_offset += 2; + fixP->fx_r_type = BFD_RELOC_390_PC16DBL; + fixP->fx_offset += 2; } else - fixp->fx_r_type = BFD_RELOC_16; + fixP->fx_r_type = BFD_RELOC_16; } else if (operand->bits == 32 && operand->shift == 16 && (operand->flags & S390_OPERAND_PCREL)) { - fixp->fx_size = 4; - fixp->fx_where += 2; - fixp->fx_offset += 2; - fixp->fx_r_type = BFD_RELOC_390_PC32DBL; + fixP->fx_size = 4; + fixP->fx_where += 2; + fixP->fx_offset += 2; + fixP->fx_r_type = BFD_RELOC_390_PC32DBL; } else { @@ -1752,29 +1792,29 @@ md_apply_fix3 (fixp, valuep, seg) /* Use expr_symbol_where to see if this is an expression symbol. */ - if (expr_symbol_where (fixp->fx_addsy, &sfile, &sline)) - as_bad_where (fixp->fx_file, fixp->fx_line, + if (expr_symbol_where (fixP->fx_addsy, &sfile, &sline)) + as_bad_where (fixP->fx_file, fixP->fx_line, _("unresolved expression that must be resolved")); else - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("unsupported relocation type")); - fixp->fx_done = 1; - return 1; + fixP->fx_done = 1; + return; } } else { - switch (fixp->fx_r_type) + switch (fixP->fx_r_type) { case BFD_RELOC_8: - if (fixp->fx_pcrel) + if (fixP->fx_pcrel) abort (); - if (fixp->fx_done) + if (fixP->fx_done) md_number_to_chars (where, value, 1); break; case BFD_RELOC_390_12: case BFD_RELOC_390_GOT12: - if (fixp->fx_done) + if (fixP->fx_done) { unsigned short mop; @@ -1788,45 +1828,45 @@ md_apply_fix3 (fixp, valuep, seg) case BFD_RELOC_GPREL16: case BFD_RELOC_16_GOT_PCREL: case BFD_RELOC_16_GOTOFF: - if (fixp->fx_pcrel) - as_bad_where (fixp->fx_file, fixp->fx_line, + if (fixP->fx_pcrel) + as_bad_where (fixP->fx_file, fixP->fx_line, "cannot emit PC relative %s relocation%s%s", - bfd_get_reloc_code_name (fixp->fx_r_type), - fixp->fx_addsy != NULL ? " against " : "", - (fixp->fx_addsy != NULL - ? S_GET_NAME (fixp->fx_addsy) + bfd_get_reloc_code_name (fixP->fx_r_type), + fixP->fx_addsy != NULL ? " against " : "", + (fixP->fx_addsy != NULL + ? S_GET_NAME (fixP->fx_addsy) : "")); - if (fixp->fx_done) + if (fixP->fx_done) md_number_to_chars (where, value, 2); break; case BFD_RELOC_390_GOT16: - if (fixp->fx_done) + if (fixP->fx_done) md_number_to_chars (where, value, 2); break; case BFD_RELOC_390_PC16DBL: case BFD_RELOC_390_PLT16DBL: value += 2; - if (fixp->fx_done) + if (fixP->fx_done) md_number_to_chars (where, (offsetT) value >> 1, 2); break; case BFD_RELOC_32: - if (fixp->fx_pcrel) - fixp->fx_r_type = BFD_RELOC_32_PCREL; + if (fixP->fx_pcrel) + fixP->fx_r_type = BFD_RELOC_32_PCREL; else - fixp->fx_r_type = BFD_RELOC_32; - if (fixp->fx_done) + fixP->fx_r_type = BFD_RELOC_32; + if (fixP->fx_done) md_number_to_chars (where, value, 4); break; case BFD_RELOC_32_PCREL: case BFD_RELOC_32_BASEREL: - fixp->fx_r_type = BFD_RELOC_32_PCREL; - if (fixp->fx_done) + fixP->fx_r_type = BFD_RELOC_32_PCREL; + if (fixP->fx_done) md_number_to_chars (where, value, 4); break; case BFD_RELOC_32_GOT_PCREL: case BFD_RELOC_390_PLT32: - if (fixp->fx_done) + if (fixP->fx_done) md_number_to_chars (where, value, 4); break; case BFD_RELOC_390_PC32DBL: @@ -1834,58 +1874,56 @@ md_apply_fix3 (fixp, valuep, seg) case BFD_RELOC_390_GOTPCDBL: case BFD_RELOC_390_GOTENT: value += 2; - if (fixp->fx_done) + if (fixP->fx_done) md_number_to_chars (where, (offsetT) value >> 1, 4); break; case BFD_RELOC_32_GOTOFF: - if (fixp->fx_done) + if (fixP->fx_done) md_number_to_chars (where, value, sizeof (int)); break; case BFD_RELOC_390_GOT64: case BFD_RELOC_390_PLT64: - if (fixp->fx_done) + if (fixP->fx_done) md_number_to_chars (where, value, 8); break; case BFD_RELOC_64: - if (fixp->fx_pcrel) - fixp->fx_r_type = BFD_RELOC_64_PCREL; + if (fixP->fx_pcrel) + fixP->fx_r_type = BFD_RELOC_64_PCREL; else - fixp->fx_r_type = BFD_RELOC_64; - if (fixp->fx_done) + fixP->fx_r_type = BFD_RELOC_64; + if (fixP->fx_done) md_number_to_chars (where, value, 8); break; case BFD_RELOC_64_PCREL: - fixp->fx_r_type = BFD_RELOC_64_PCREL; - if (fixp->fx_done) + fixP->fx_r_type = BFD_RELOC_64_PCREL; + if (fixP->fx_done) md_number_to_chars (where, value, 8); break; case BFD_RELOC_VTABLE_INHERIT: case BFD_RELOC_VTABLE_ENTRY: - fixp->fx_done = 0; - return 1; + fixP->fx_done = 0; + return; default: { - const char *reloc_name = bfd_get_reloc_code_name (fixp->fx_r_type); + const char *reloc_name = bfd_get_reloc_code_name (fixP->fx_r_type); if (reloc_name != NULL) fprintf (stderr, "Gas failure, reloc type %s\n", reloc_name); else - fprintf (stderr, "Gas failure, reloc type #%i\n", fixp->fx_r_type); + fprintf (stderr, "Gas failure, reloc type #%i\n", fixP->fx_r_type); fflush (stderr); abort (); } } - fixp->fx_offset = value; + fixP->fx_offset = value; } - - return 1; } /* Generate a reloc for a fixup. */ diff -uprN binutils-2.11.92.0.10/gas/config/tc-s390.h binutils-2.11.92.0.12/gas/config/tc-s390.h --- binutils-2.11.92.0.10/gas/config/tc-s390.h Thu Jul 26 18:02:55 2001 +++ binutils-2.11.92.0.12/gas/config/tc-s390.h Fri Nov 16 14:05:52 2001 @@ -44,13 +44,15 @@ struct fix; && S_IS_DEFINED ((FIX)->fx_addsy) \ && ! S_IS_COMMON ((FIX)->fx_addsy)))) -#define TC_FORCE_RELOCATION(FIXP) \ - ((FIXP)->fx_r_type == BFD_RELOC_VTABLE_INHERIT \ - || (FIXP)->fx_r_type == BFD_RELOC_VTABLE_ENTRY) +#define TC_FORCE_RELOCATION(FIXP) tc_s390_force_relocation(FIXP) +extern int tc_s390_force_relocation PARAMS ((struct fix *)); #define tc_fix_adjustable(X) tc_s390_fix_adjustable(X) extern int tc_s390_fix_adjustable PARAMS ((struct fix *)); +#define TC_FIX_ADJUSTABLE(fixP) \ + (! symbol_used_in_reloc_p ((fixP)->fx_addsy) && tc_fix_adjustable (fixP)) + /* The target BFD architecture. */ #define TARGET_ARCH bfd_arch_s390 extern enum bfd_architecture s390_arch PARAMS ((void)); @@ -83,9 +85,6 @@ extern int target_big_endian; /* We don't need to handle .word strangely. */ #define WORKING_DOT_WORD -/* We set the fx_done field appropriately in md_apply_fix. */ -#define TC_HANDLES_FX_DONE - #define md_number_to_chars number_to_chars_bigendian #define md_do_align(n, fill, len, max, around) \ @@ -106,9 +105,6 @@ if (fragP->fr_type == rs_align_code) - fragP->fr_address \ - fragP->fr_fix)); -/* call md_apply_fix3 with segment instead of md_apply_fix */ -#define MD_APPLY_FIX3 - /* call md_pcrel_from_section, not md_pcrel_from */ #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC) extern long md_pcrel_from_section PARAMS ((struct fix *, segT)); diff -uprN binutils-2.11.92.0.10/gas/config/tc-sh.c binutils-2.11.92.0.12/gas/config/tc-sh.c --- binutils-2.11.92.0.10/gas/config/tc-sh.c Fri Oct 19 23:57:49 2001 +++ binutils-2.11.92.0.12/gas/config/tc-sh.c Fri Nov 16 14:05:52 2001 @@ -2377,7 +2377,7 @@ sh_frob_file () } /* Called after relaxing. Set the correct sizes of the fragments, and - create relocs so that md_apply_fix will fill in the correct values. */ + create relocs so that md_apply_fix3 will fill in the correct values. */ void md_convert_frag (headers, seg, fragP) @@ -2769,24 +2769,16 @@ sh_elf_final_processing () /* Apply a fixup to the object file. */ -#ifdef BFD_ASSEMBLER -int -md_apply_fix (fixP, valp) - fixS *fixP; - valueT *valp; -#else void -md_apply_fix (fixP, val) - fixS *fixP; - long val; -#endif +md_apply_fix3 (fixP, valP, seg) + fixS * fixP; + valueT * valP; + segT seg ATTRIBUTE_UNUSED; { char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; int lowbyte = target_big_endian ? 1 : 0; int highbyte = target_big_endian ? 0 : 1; -#ifdef BFD_ASSEMBLER - long val = *valp; -#endif + long val = * (long *) valP; long max, min; int shift; @@ -2812,11 +2804,11 @@ md_apply_fix (fixP, val) we need. FIXME. */ case BFD_RELOC_16: bfd_set_error (bfd_error_bad_value); - return false; + return; case BFD_RELOC_8: bfd_set_error (bfd_error_bad_value); - return false; + return; } } @@ -2966,17 +2958,13 @@ md_apply_fix (fixP, val) case BFD_RELOC_VTABLE_INHERIT: case BFD_RELOC_VTABLE_ENTRY: fixP->fx_done = 0; -#ifdef BFD_ASSEMBLER - return 0; -#else return; -#endif #ifdef OBJ_ELF case BFD_RELOC_32_PLT_PCREL: /* Make the jump instruction point to the address of the operand. At runtime we merely add the offset to the actual PLT entry. */ - *valp = 0xfffffffc; + * valP = 0xfffffffc; break; case BFD_RELOC_SH_GOTPC: @@ -2996,12 +2984,12 @@ md_apply_fix (fixP, val) earlier versions of the PIC patches, the pcrel_adjust field was used to store the correction, but since the expression is not pcrel, I felt it would be confusing to do it this way. */ - *valp -= 1; + * valP -= 1; md_number_to_chars (buf, val, 4); break; case BFD_RELOC_32_GOT_PCREL: - *valp = 0; /* Fully resolved at runtime. No addend. */ + * valP = 0; /* Fully resolved at runtime. No addend. */ md_number_to_chars (buf, 0, 4); break; @@ -3026,9 +3014,8 @@ md_apply_fix (fixP, val) if (max != 0 && (val < min || val > max)) as_bad_where (fixP->fx_file, fixP->fx_line, _("offset out of range")); -#ifdef BFD_ASSEMBLER - return 0; -#endif + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } /* Called just before address relaxation. Return the length @@ -3259,7 +3246,7 @@ sh_coff_reloc_mangle (seg, fix, intr, pa { /* We can't store the offset in the object file, since this reloc does not take up any space, so we store it in r_offset. - The fx_addnumber field was set in md_apply_fix. */ + The fx_addnumber field was set in md_apply_fix3. */ intr->r_offset = fix->fx_addnumber; } else if (fix->fx_r_type == BFD_RELOC_SH_COUNT) diff -uprN binutils-2.11.92.0.10/gas/config/tc-sh.h binutils-2.11.92.0.12/gas/config/tc-sh.h --- binutils-2.11.92.0.10/gas/config/tc-sh.h Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/config/tc-sh.h Fri Nov 16 14:05:52 2001 @@ -163,7 +163,6 @@ extern int tc_coff_sizemachdep PARAMS (( /* Whether or not the target is big endian */ extern int target_big_endian; - #ifdef TE_LINUX #define TARGET_FORMAT (!target_big_endian ? "elf32-sh-linux" : "elf32-shbig-linux") #else diff -uprN binutils-2.11.92.0.10/gas/config/tc-sparc.c binutils-2.11.92.0.12/gas/config/tc-sparc.c --- binutils-2.11.92.0.10/gas/config/tc-sparc.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-sparc.c Fri Nov 16 14:05:52 2001 @@ -2881,18 +2881,16 @@ md_number_to_chars (buf, val, n) /* Apply a fixS to the frags, now that we know the value it ought to hold. */ -int -md_apply_fix3 (fixP, value, segment) +void +md_apply_fix3 (fixP, valP, segment) fixS *fixP; - valueT *value; + valueT *valP; segT segment; { char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; - offsetT val; + offsetT val = * (offsetT *) valP; long insn; - val = *value; - assert (fixP->fx_r_type < BFD_RELOC_UNUSED); fixP->fx_addnumber = val; /* Remember value for emit_reloc. */ @@ -2905,23 +2903,30 @@ md_apply_fix3 (fixP, value, segment) don't want to include the value of an externally visible symbol. */ if (fixP->fx_addsy != NULL) { - if (symbol_used_in_reloc_p (fixP->fx_addsy) - && (S_IS_EXTERNAL (fixP->fx_addsy) - || S_IS_WEAK (fixP->fx_addsy) - || (S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) + symbolS * sym = fixP->fx_addsy; + segT seg = S_GET_SEGMENT (sym); + + if (symbol_used_in_reloc_p (sym) + && (S_IS_EXTERNAL (sym) + || S_IS_WEAK (sym) +#if 0 /* Although fixups against local symbols in SEC_MERGE sections + should be treated as if they were against external symbols + write.c:fixup_segment() will not have included the value of + the symbol under these particular cicumstances. */ + || (seg->flags & SEC_MERGE) +#endif || (sparc_pic_code && ! fixP->fx_pcrel) - || (S_GET_SEGMENT (fixP->fx_addsy) != segment - && ((bfd_get_section_flags (stdoutput, - S_GET_SEGMENT (fixP->fx_addsy)) - & SEC_LINK_ONCE) != 0 - || strncmp (segment_name (S_GET_SEGMENT (fixP->fx_addsy)), - ".gnu.linkonce", - sizeof ".gnu.linkonce" - 1) == 0))) - && S_GET_SEGMENT (fixP->fx_addsy) != absolute_section - && S_GET_SEGMENT (fixP->fx_addsy) != undefined_section - && ! bfd_is_com_section (S_GET_SEGMENT (fixP->fx_addsy))) - fixP->fx_addnumber -= S_GET_VALUE (fixP->fx_addsy); - return 1; + || (seg != segment + && (((bfd_get_section_flags (stdoutput, seg) & SEC_LINK_ONCE) != 0) + || (strncmp (segment_name (seg), + ".gnu.linkonce", + sizeof ".gnu.linkonce" - 1) == 0)))) + && seg != absolute_section + && seg != undefined_section + && ! bfd_is_com_section (seg)) + fixP->fx_addnumber -= S_GET_VALUE (sym); + + return; } #endif @@ -2992,7 +2997,7 @@ md_apply_fix3 (fixP, value, segment) || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) { fixP->fx_done = 0; - return 1; + return; } else { @@ -3164,14 +3169,10 @@ md_apply_fix3 (fixP, value, segment) case BFD_RELOC_SPARC_LM22: case BFD_RELOC_HI22: if (!fixP->fx_addsy) - { - insn |= (val >> 10) & 0x3fffff; - } + insn |= (val >> 10) & 0x3fffff; else - { - /* FIXME: Need comment explaining why we do this. */ - insn &= ~0xffff; - } + /* FIXME: Need comment explaining why we do this. */ + insn &= ~0xffff; break; case BFD_RELOC_SPARC22: @@ -3187,14 +3188,10 @@ md_apply_fix3 (fixP, value, segment) case BFD_RELOC_LO10: if (!fixP->fx_addsy) - { - insn |= val & 0x3ff; - } + insn |= val & 0x3ff; else - { - /* FIXME: Need comment explaining why we do this. */ - insn &= ~0xff; - } + /* FIXME: Need comment explaining why we do this. */ + insn &= ~0xff; break; case BFD_RELOC_SPARC_OLO10: @@ -3265,8 +3262,6 @@ md_apply_fix3 (fixP, value, segment) /* Are we finished with this relocation now? */ if (fixP->fx_addsy == 0 && !fixP->fx_pcrel) fixP->fx_done = 1; - - return 1; } /* Translate internal representation of relocation info to BFD target diff -uprN binutils-2.11.92.0.10/gas/config/tc-sparc.h binutils-2.11.92.0.12/gas/config/tc-sparc.h --- binutils-2.11.92.0.10/gas/config/tc-sparc.h Thu Jul 26 18:02:55 2001 +++ binutils-2.11.92.0.12/gas/config/tc-sparc.h Fri Nov 16 14:05:52 2001 @@ -1,6 +1,6 @@ /* tc-sparc.h - Macros and type defines for the sparc. Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000 Free Software Foundation, Inc. + 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -110,9 +110,6 @@ extern void sparc_handle_align PARAMS (( extern int elf32_sparc_force_relocation PARAMS ((struct fix *)); #endif -#define MD_APPLY_FIX3 -#define TC_HANDLES_FX_DONE - #ifdef OBJ_ELF /* Keep relocations against global symbols. Don't turn them into relocations against sections. This is required for the dynamic diff -uprN binutils-2.11.92.0.10/gas/config/tc-tahoe.c binutils-2.11.92.0.12/gas/config/tc-tahoe.c --- binutils-2.11.92.0.10/gas/config/tc-tahoe.c Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/config/tc-tahoe.c Fri Nov 16 14:05:52 2001 @@ -470,11 +470,12 @@ md_number_to_imm (con, value, nbytes) #endif /* comment */ void -tc_apply_fix (fixP, val) - fixS *fixP; - long val; +md_apply_fix3 (fixP, valP, seg) + fixS *fixP ATTRIBUTE_UNUSED; + valueT * valP ATTRIBUTE_UNUSED; + segT seg ATTRIBUTE_UNUSED: { - /* should never be called */ + /* Should never be called. */ know (0); } diff -uprN binutils-2.11.92.0.10/gas/config/tc-tic30.c binutils-2.11.92.0.12/gas/config/tc-tic30.c --- binutils-2.11.92.0.10/gas/config/tc-tic30.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-tic30.c Fri Nov 16 14:05:52 2001 @@ -1559,10 +1559,11 @@ md_convert_frag (abfd, sec, fragP) debug ("In md_convert_frag()\n"); } -int -md_apply_fix (fixP, valP) +void +md_apply_fix3 (fixP, valP, seg) fixS *fixP; valueT *valP; + segT seg ATTRIBUTE_UNUSED; { valueT value = *valP; @@ -1574,15 +1575,18 @@ md_apply_fix (fixP, valP) debug ("fx_offset = %d\n", (int) fixP->fx_offset); { char *buf = fixP->fx_frag->fr_literal + fixP->fx_where; + value /= INSN_SIZE; if (fixP->fx_size == 1) - { /* Special fix for LDP instruction. */ - value = (value & 0x00FF0000) >> 16; - } + /* Special fix for LDP instruction. */ + value = (value & 0x00FF0000) >> 16; + debug ("new value = %ld\n", (long) value); md_number_to_chars (buf, value, fixP->fx_size); } - return 1; + + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } int diff -uprN binutils-2.11.92.0.10/gas/config/tc-tic54x.c binutils-2.11.92.0.12/gas/config/tc-tic54x.c --- binutils-2.11.92.0.10/gas/config/tc-tic54x.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-tic54x.c Fri Nov 16 14:05:52 2001 @@ -39,7 +39,11 @@ We don't convert '' to '\0' We don't allow strings with .byte/.half/.short/.long Probably details of the subsym stuff are different - TI sets labels to be data type 4 (T_INT); GAS uses T_NULL. */ + TI sets labels to be data type 4 (T_INT); GAS uses T_NULL. + + COFF1 limits section names to 8 characters. + Some of the default behavior changed from COFF1 to COFF2. +*/ #include #include @@ -235,8 +239,7 @@ static subsegT stag_saved_subseg; /* Output a single character (upper octect is zero). */ static void -tic54x_emit_char (c) - char c; +tic54x_emit_char (char c) { expressionS exp; @@ -248,9 +251,7 @@ tic54x_emit_char (c) /* Walk backwards in the frag chain. */ static fragS * -frag_prev (frag, seg) - fragS *frag; - segT seg; +frag_prev (fragS *frag, segT seg) { segment_info_type *seginfo = seg_info (seg); fragS *fragp; @@ -263,9 +264,7 @@ frag_prev (frag, seg) } static fragS * -bit_offset_frag (frag, seg) - fragS *frag; - segT seg; +bit_offset_frag (fragS *frag, segT seg) { while (frag != NULL) { @@ -283,9 +282,7 @@ bit_offset_frag (frag, seg) none. .field/.space/.bes may leave words partially allocated. */ static int -frag_bit_offset (frag, seg) - fragS *frag; - segT seg; +frag_bit_offset (fragS *frag, segT seg) { frag = bit_offset_frag (frag, seg); @@ -319,8 +316,7 @@ parse_expression (char *str, expressionS unsupported. */ static void -tic54x_asg (x) - int x ATTRIBUTE_UNUSED; +tic54x_asg (int x ATTRIBUTE_UNUSED) { int c; char *name; @@ -381,8 +377,7 @@ tic54x_asg (x) table, since that's what works best. */ static void -tic54x_eval (x) - int x ATTRIBUTE_UNUSED; +tic54x_eval (int x ATTRIBUTE_UNUSED) { char c; int value; @@ -458,8 +453,7 @@ tic54x_eval (x) (not yet implemented). */ static void -tic54x_bss (x) - int x ATTRIBUTE_UNUSED; +tic54x_bss (int x ATTRIBUTE_UNUSED) { char c; char *name; @@ -522,7 +516,7 @@ tic54x_bss (x) symbol_set_frag (symbolP, frag_now); p = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, - (offsetT) (words << 1), (char *) 0); + (offsetT) (words * OCTETS_PER_BYTE), (char *) 0); *p = 0; /* Fill char. */ S_SET_SEGMENT (symbolP, bss_section); @@ -548,12 +542,11 @@ tic54x_bss (x) } static void -stag_add_field_symbols (stag, path, base_offset, rootsym, root_stag_name) - struct stag *stag; - const char *path; - bfd_vma base_offset; - symbolS *rootsym; - const char *root_stag_name; +stag_add_field_symbols (struct stag *stag, + const char *path, + bfd_vma base_offset, + symbolS *rootsym, + const char *root_stag_name) { char prefix[strlen (path) + 2]; struct stag_field *field = stag->field; @@ -606,11 +599,10 @@ stag_add_field_symbols (stag, path, base complete dereferencing symbols to the symbol table. */ static void -stag_add_field (parent, name, offset, stag) - struct stag *parent; - const char *name; - bfd_vma offset; - struct stag *stag; +stag_add_field (struct stag *parent, + const char *name, + bfd_vma offset, + struct stag *stag) { struct stag_field *sfield = xmalloc (sizeof (struct stag_field)); @@ -787,8 +779,7 @@ tic54x_endstruct (int is_union) format on the existing allocated space. */ static void -tic54x_tag (ignore) - int ignore ATTRIBUTE_UNUSED; +tic54x_tag (int ignore ATTRIBUTE_UNUSED) { char *name = input_line_pointer; int c = get_symbol_end (); @@ -1104,8 +1095,7 @@ tic54x_cons (int type) these, so we ignore the type here. */ void -tic54x_global (type) - int type; +tic54x_global (int type) { char *name; int c; @@ -1139,9 +1129,8 @@ tic54x_global (type) /* Remove the symbol from the local label hash lookup. */ static void -tic54x_remove_local_label (key, value) - const char *key; - PTR value ATTRIBUTE_UNUSED; +tic54x_remove_local_label (const char *key, + PTR value ATTRIBUTE_UNUSED) { PTR *elem = hash_delete (local_label_hash[macro_level], key); free (elem); @@ -1150,8 +1139,7 @@ tic54x_remove_local_label (key, value) /* Reset all local labels. */ static void -tic54x_clear_local_labels (ignored) - int ignored ATTRIBUTE_UNUSED; +tic54x_clear_local_labels (int ignored ATTRIBUTE_UNUSED) { hash_traverse (local_label_hash[macro_level], tic54x_remove_local_label); } @@ -1165,7 +1153,9 @@ tic54x_clear_local_labels (ignored) ARG is 't' for text, 'd' for data, or '*' for a named section - For compatibility, '*' sections have SEC_DATA set instead of SEC_CODE. */ + For compatibility, '*' sections are SEC_CODE if instructions are + encountered, or SEC_DATA if not. +*/ static void tic54x_sect (int arg) @@ -1195,11 +1185,13 @@ tic54x_sect (int arg) int c; name = input_line_pointer; c = get_symbol_end (); + len = strlen(name); name = strcpy (xmalloc (len + 10), name); *input_line_pointer = c; demand_empty_rest_of_line (); } - /* Make sure all named initialized sections are SEC_DATA. */ + /* Make sure all named initialized sections flagged properly. If we + encounter instructions, we'll flag it with SEC_CODE as well. */ strcat (name, ",\"w\"\n"); input_scrub_insert_line (name); obj_coff_section (0); @@ -1356,8 +1348,7 @@ tic54x_space (int arg) Has no effect on the current section. */ static void -tic54x_usect (x) - int x ATTRIBUTE_UNUSED; +tic54x_usect (int x ATTRIBUTE_UNUSED) { char c; char *name; @@ -1453,8 +1444,7 @@ tic54x_usect (x) } static enum cpu_version -lookup_version (ver) - const char *ver; +lookup_version (const char *ver) { enum cpu_version version = VNONE; @@ -1475,8 +1465,7 @@ lookup_version (ver) } static void -set_cpu (version) - enum cpu_version version; +set_cpu (enum cpu_version version) { cpu = version; if (version == V545LP || version == V546LP) @@ -1503,8 +1492,7 @@ set_cpu (version) static int cpu_needs_set = 1; static void -tic54x_version (x) - int x ATTRIBUTE_UNUSED; +tic54x_version (int x ATTRIBUTE_UNUSED) { enum cpu_version version = VNONE; enum cpu_version old_version = cpu; @@ -1573,12 +1561,11 @@ tic54x_float_cons (int type) /* The argument is capitalized if it should be zero-terminated 's' is normal string with upper 8-bits zero-filled, 'p' is packed. - Code copied from read.c, and slightly modified so that strings are packed + Code copied from stringer, and slightly modified so that strings are packed and encoded into the correct octets. */ static void -tic54x_stringer (type) - int type; +tic54x_stringer (int type) { register unsigned int c; char *start; @@ -1665,15 +1652,13 @@ tic54x_stringer (type) } static void -tic54x_p2align (arg) - int arg ATTRIBUTE_UNUSED; +tic54x_p2align (int arg ATTRIBUTE_UNUSED) { as_bad (_("p2align not supported on this target")); } static void -tic54x_align_words (arg) - int arg; +tic54x_align_words (int arg) { /* Only ".align" with no argument is allowed within .struct/.union. */ int count = arg; @@ -1705,8 +1690,7 @@ tic54x_align_words (arg) /* Initialize multiple-bit fields withing a single word of memory. */ static void -tic54x_field (ignore) - int ignore ATTRIBUTE_UNUSED; +tic54x_field (int ignore ATTRIBUTE_UNUSED) { expressionS exp; int size = 16; @@ -1826,8 +1810,7 @@ tic54x_field (ignore) available yet. seg_info ()->bss is the next best thing. */ static int -tic54x_initialized_section (seg) - segT seg; +tic54x_initialized_section (segT seg) { return !seg_info (seg)->bss; } @@ -1840,8 +1823,7 @@ tic54x_initialized_section (seg) Name is required for uninitialized sections. */ static void -tic54x_clink (ignored) - int ignored ATTRIBUTE_UNUSED; +tic54x_clink (int ignored ATTRIBUTE_UNUSED) { segT seg = now_seg; @@ -1887,8 +1869,7 @@ tic54x_clink (ignored) set to "." instead. */ static void -tic54x_set_default_include (dot) - int dot; +tic54x_set_default_include (int dot) { char *dir = "."; char *tmp = NULL; @@ -1932,8 +1913,7 @@ tic54x_set_default_include (dot) Entering/exiting included/copied file clears all local labels. */ static void -tic54x_include (ignored) - int ignored ATTRIBUTE_UNUSED; +tic54x_include (int ignored ATTRIBUTE_UNUSED) { char newblock[] = " .newblock\n"; char *filename; @@ -1976,8 +1956,7 @@ tic54x_include (ignored) } static void -tic54x_message (type) - int type; +tic54x_message (int type) { char *msg; char c; @@ -2023,8 +2002,7 @@ tic54x_message (type) run address (vma). */ static void -tic54x_label (ignored) - int ignored ATTRIBUTE_UNUSED; +tic54x_label (int ignored ATTRIBUTE_UNUSED) { char *name = input_line_pointer; symbolS *symbolP; @@ -2045,8 +2023,7 @@ tic54x_label (ignored) absolute local symbols. */ static void -tic54x_mmregs (ignored) - int ignored ATTRIBUTE_UNUSED; +tic54x_mmregs (int ignored ATTRIBUTE_UNUSED) { symbol *sym; @@ -2079,8 +2056,7 @@ tic54x_loop (int count) /* Normally, endloop gets eaten by the preceding loop. */ static void -tic54x_endloop (ignore) - int ignore ATTRIBUTE_UNUSED; +tic54x_endloop (int ignore ATTRIBUTE_UNUSED) { as_bad (_("ENDLOOP without corresponding LOOP")); ignore_rest_of_line (); @@ -2089,8 +2065,7 @@ tic54x_endloop (ignore) /* .break [condition]. */ static void -tic54x_break (ignore) - int ignore ATTRIBUTE_UNUSED; +tic54x_break (int ignore ATTRIBUTE_UNUSED) { int cond = 1; @@ -2105,8 +2080,7 @@ tic54x_break (ignore) } static void -set_address_mode (mode) - int mode; +set_address_mode (int mode) { amode = mode; if (mode == far_mode) @@ -2120,8 +2094,7 @@ set_address_mode (mode) static int address_mode_needs_set = 1; static void -tic54x_address_mode (mode) - int mode; +tic54x_address_mode (int mode) { if (assembly_begun && amode != (unsigned) mode) { @@ -2144,8 +2117,7 @@ tic54x_address_mode (mode) Designate initialized sections for blocking. */ static void -tic54x_sblock (ignore) - int ignore ATTRIBUTE_UNUSED; +tic54x_sblock (int ignore ATTRIBUTE_UNUSED) { int c = ','; @@ -2200,8 +2172,7 @@ tic54x_sblock (ignore) symbols assigned with .set/.equ may not be redefined. */ static void -tic54x_set (ignore) - int ignore ATTRIBUTE_UNUSED; +tic54x_set (int ignore ATTRIBUTE_UNUSED) { symbolS *symbolP; char *name; @@ -2256,8 +2227,7 @@ tic54x_sslist (int show) Define a substitution string to be local to a macro. */ static void -tic54x_var (ignore) - int ignore ATTRIBUTE_UNUSED; +tic54x_var (int ignore ATTRIBUTE_UNUSED) { static char empty[] = ""; char *name; @@ -2305,8 +2275,7 @@ tic54x_var (ignore) FIXME need to try the source file directory as well. */ static void -tic54x_mlib (ignore) - int ignore ATTRIBUTE_UNUSED; +tic54x_mlib (int ignore ATTRIBUTE_UNUSED) { char *filename; char *path; @@ -2408,6 +2377,8 @@ const pseudo_typeS md_pseudo_table[] = { { "algebraic", s_ignore , 0 }, { "align" , tic54x_align_words , 128 }, + { "ascii" , tic54x_stringer , 'p' }, + { "asciz" , tic54x_stringer , 'P' }, { "even" , tic54x_align_words , 2 }, { "asg" , tic54x_asg , 0 }, { "eval" , tic54x_eval , 0 }, @@ -2626,9 +2597,7 @@ tic54x_macro_end () } static int -subsym_symlen (a, ignore) - char *a; - char *ignore ATTRIBUTE_UNUSED; +subsym_symlen (char *a, char *ignore ATTRIBUTE_UNUSED) { return strlen (a); } @@ -2636,9 +2605,7 @@ subsym_symlen (a, ignore) /* Compare symbol A to string B. */ static int -subsym_symcmp (a, b) - char *a; - char *b; +subsym_symcmp (char *a, char *b) { return strcmp (a, b); } @@ -2647,9 +2614,7 @@ subsym_symcmp (a, b) assumes b is an integer char value as a string. Index is one-based. */ static int -subsym_firstch (a, b) - char *a; - char *b; +subsym_firstch (char *a, char *b) { int val = atoi (b); char *tmp = strchr (a, val); @@ -2660,9 +2625,7 @@ subsym_firstch (a, b) /* Similar to firstch, but returns index of last occurrence of B in A. */ static int -subsym_lastch (a, b) - char *a; - char *b; +subsym_lastch (char *a, char *b) { int val = atoi (b); char *tmp = strrchr (a, val); @@ -2674,9 +2637,7 @@ subsym_lastch (a, b) symbol table). */ static int -subsym_isdefed (a, ignore) - char *a; - char *ignore ATTRIBUTE_UNUSED; +subsym_isdefed (char *a, char *ignore ATTRIBUTE_UNUSED) { symbolS *symbolP = symbol_find (a); @@ -2688,9 +2649,7 @@ subsym_isdefed (a, ignore) symbols, unsubstituted. */ static int -subsym_ismember (sym, list) - char *sym; - char *list; +subsym_ismember (char *sym, char *list) { char *elem, *ptr, *listv; @@ -2728,9 +2687,7 @@ subsym_ismember (sym, list) 5 if decimal. */ static int -subsym_iscons (a, ignore) - char *a; - char *ignore ATTRIBUTE_UNUSED; +subsym_iscons (char *a, char *ignore ATTRIBUTE_UNUSED) { expressionS exp; @@ -2769,9 +2726,7 @@ subsym_iscons (a, ignore) /* Return 1 if A is a valid symbol name. Expects string input. */ static int -subsym_isname (a, ignore) - char *a; - char *ignore ATTRIBUTE_UNUSED; +subsym_isname (char *a, char *ignore ATTRIBUTE_UNUSED) { if (!is_name_beginner (*a)) return 0; @@ -2789,9 +2744,7 @@ subsym_isname (a, ignore) Note this does not recognize "A" or "B" accumulators. */ static int -subsym_isreg (a, ignore) - char *a; - char *ignore ATTRIBUTE_UNUSED; +subsym_isreg (char *a, char *ignore ATTRIBUTE_UNUSED) { if (hash_find (reg_hash, a)) return 1; @@ -2803,9 +2756,7 @@ subsym_isreg (a, ignore) /* Return the structrure size, given the stag. */ static int -subsym_structsz (name, ignore) - char *name; - char *ignore ATTRIBUTE_UNUSED; +subsym_structsz (char *name, char *ignore ATTRIBUTE_UNUSED) { struct stag *stag = (struct stag *) hash_find (stag_hash, name); if (stag) @@ -2822,9 +2773,8 @@ subsym_structsz (name, ignore) return zero, we punt and return zero. */ static int -subsym_structacc (stag_name, ignore) - char *stag_name ATTRIBUTE_UNUSED; - char *ignore ATTRIBUTE_UNUSED; +subsym_structacc (char *stag_name ATTRIBUTE_UNUSED, + char *ignore ATTRIBUTE_UNUSED) { return 0; } @@ -3115,8 +3065,7 @@ static const math_proc_entry math_procs[ void md_begin () { - template *opcode; - partemplate *paropcode; + template *tm; symbol *sym; const subsym_proc_entry *subsym_proc; const math_proc_entry *math_proc; @@ -3143,26 +3092,24 @@ md_begin () } op_hash = hash_new (); - for (opcode = (template *) tic54x_optab; opcode->name; opcode++) + for (tm = (template *) tic54x_optab; tm->name; tm++) { - if (hash_find (op_hash, opcode->name)) + if (hash_find (op_hash, tm->name)) continue; - hash_err = hash_insert (op_hash, opcode->name, (char *) opcode); + hash_err = hash_insert (op_hash, tm->name, (char *) tm); if (hash_err) as_fatal ("Internal Error: Can't hash %s: %s", - opcode->name, hash_err); + tm->name, hash_err); } parop_hash = hash_new (); - for (paropcode = (partemplate *) tic54x_paroptab; - paropcode->name; - paropcode++) + for (tm = (template *) tic54x_paroptab; tm->name; tm++) { - if (hash_find (parop_hash, paropcode->name)) + if (hash_find (parop_hash, tm->name)) continue; - hash_err = hash_insert (parop_hash, paropcode->name, (char *) paropcode); + hash_err = hash_insert (parop_hash, tm->name, (char *) tm); if (hash_err) as_fatal ("Internal Error: Can't hash %s: %s", - paropcode->name, hash_err); + tm->name, hash_err); } reg_hash = hash_new (); for (sym = (symbol *) regs; sym->name; sym++) @@ -3232,7 +3179,6 @@ md_begin () typedef struct _tic54x_insn { const template *tm; /* Opcode template. */ - const partemplate *ptm; /* Parallel opcode template. */ char mnemonic[MAX_LINE]; /* Opcode name/mnemonic. */ char parmnemonic[MAX_LINE]; /* 2nd mnemonic of parallel insn. */ @@ -3268,10 +3214,10 @@ static int encode_dmad (tic54x_insn *, s static int operands_match (tic54x_insn *, struct opstruct *, int, const enum optype *, int, int); static int encode_address (tic54x_insn *, struct opstruct *); +static int is_accumulator (struct opstruct *); static int -is_accumulator (operand) - struct opstruct *operand; +is_accumulator (struct opstruct *operand) { return strcasecmp (operand->buf, "a") == 0 || strcasecmp (operand->buf, "b") == 0; @@ -3282,9 +3228,7 @@ is_accumulator (operand) the next array. */ static int -get_operands (operands, line) - struct opstruct operands[]; - char *line; +get_operands (struct opstruct operands[], char *line) { char *lptr = line; int numexp = 0; @@ -3409,8 +3353,7 @@ get_operands (operands, line) /* Predicates for different operand types. */ static int -is_immediate (operand) - struct opstruct *operand; +is_immediate (struct opstruct *operand) { return *operand->buf == '#'; } @@ -3419,8 +3362,7 @@ is_immediate (operand) and must *not* have the '#' prefix. */ static int -is_absolute (operand) - struct opstruct *operand; +is_absolute (struct opstruct *operand) { return operand->exp.X_op == O_constant && !is_immediate (operand); } @@ -3428,8 +3370,7 @@ is_absolute (operand) /* Is this an indirect operand? */ static int -is_indirect (operand) - struct opstruct *operand; +is_indirect (struct opstruct *operand) { return operand->buf[0] == '*'; } @@ -3437,8 +3378,7 @@ is_indirect (operand) /* Is this a valid dual-memory operand? */ static int -is_dual (operand) - struct opstruct *operand; +is_dual (struct opstruct *operand) { if (is_indirect (operand) && strncasecmp (operand->buf, "*ar", 3) == 0) { @@ -3458,8 +3398,7 @@ is_dual (operand) } static int -is_mmreg (operand) - struct opstruct *operand; +is_mmreg (struct opstruct *operand) { return (is_absolute (operand) || is_immediate (operand) @@ -3467,9 +3406,7 @@ is_mmreg (operand) } static int -is_type (operand, type) - struct opstruct *operand; - enum optype type; +is_type (struct opstruct *operand, enum optype type) { switch (type) { @@ -3727,9 +3664,7 @@ encode_address (insn, operand) } static int -encode_indirect (insn, operand) - tic54x_insn *insn; - struct opstruct *operand; +encode_indirect (tic54x_insn *insn, struct opstruct *operand) { int arf; int mod; @@ -3801,11 +3736,9 @@ encode_indirect (insn, operand) } static int -encode_integer (insn, operand, which, min, max, mask) - tic54x_insn *insn; - struct opstruct *operand; - int which, min, max; - unsigned short mask; +encode_integer (tic54x_insn *insn, + struct opstruct *operand, + int which, int min, int max, unsigned short mask) { long parse, integer; @@ -3860,9 +3793,7 @@ encode_integer (insn, operand, which, mi } static int -encode_condition (insn, operand) - tic54x_insn *insn; - struct opstruct *operand; +encode_condition (tic54x_insn *insn, struct opstruct *operand) { symbol *cc = (symbol *) hash_find (cc_hash, operand->buf); if (!cc) @@ -3922,9 +3853,7 @@ encode_condition (insn, operand) } static int -encode_cc3 (insn, operand) - tic54x_insn *insn; - struct opstruct *operand; +encode_cc3 (tic54x_insn *insn, struct opstruct *operand) { symbol *cc3 = (symbol *) hash_find (cc3_hash, operand->buf); int value = cc3 ? cc3->value : operand->exp.X_add_number << 8; @@ -3939,9 +3868,7 @@ encode_cc3 (insn, operand) } static int -encode_arx (insn, operand) - tic54x_insn *insn; - struct opstruct *operand; +encode_arx (tic54x_insn *insn, struct opstruct *operand) { int arf = strlen (operand->buf) >= 3 ? operand->buf[2] - '0' : -1; if (strncasecmp ("ar", operand->buf, 2) || arf < 0 || arf > 7) @@ -3954,9 +3881,7 @@ encode_arx (insn, operand) } static int -encode_cc2 (insn, operand) - tic54x_insn *insn; - struct opstruct *operand; +encode_cc2 (tic54x_insn *insn, struct opstruct *operand) { symbol *cc2 = (symbol *) hash_find (cc2_hash, operand->buf); if (!cc2) @@ -3974,7 +3899,7 @@ encode_operand (insn, type, operand) enum optype type; struct opstruct *operand; { - int ext = insn->tm && ((insn->tm->flags & FL_EXT) != 0); + int ext = (insn->tm->flags & FL_EXT) != 0; if (type == OP_MMR && operand->exp.X_op != O_constant) { @@ -4195,10 +4120,16 @@ encode_operand (insn, type, operand) } static void -emit_insn (insn) - tic54x_insn *insn; +emit_insn (tic54x_insn *insn) { int i; + flagword oldflags = bfd_get_section_flags (stdoutput, now_seg); + flagword flags = oldflags | SEC_CODE; + + if (! bfd_set_section_flags (stdoutput, now_seg, flags)) + as_warn (_("error setting flags for \"%s\": %s"), + bfd_section_name (stdoutput, now_seg), + bfd_errmsg (bfd_get_error ())); for (i = 0; i < insn->words; i++) { @@ -4222,13 +4153,12 @@ emit_insn (insn) return the total number of words used by the instruction. */ static int -build_insn (insn) - tic54x_insn *insn; +build_insn (tic54x_insn *insn) { int i; /* Only non-parallel instructions support lk addressing. */ - if (insn->tm) + if (!(insn->tm->flags & FL_PAR)) { for (i = 0; i < insn->opcount; i++) { @@ -4245,11 +4175,10 @@ build_insn (insn) } } } - insn->words = - (insn->tm ? insn->tm->words : insn->ptm->words) + insn->is_lkaddr; + insn->words = insn->tm->words + insn->is_lkaddr; - insn->opcode[0].word = insn->tm ? insn->tm->opcode : insn->ptm->opcode; - if (insn->tm && (insn->tm->flags & FL_EXT)) + insn->opcode[0].word = insn->tm->opcode; + if (insn->tm->flags & FL_EXT) insn->opcode[1 + insn->is_lkaddr].word = insn->tm->opcode2; for (i = 0; i < insn->opcount; i++) @@ -4258,7 +4187,7 @@ build_insn (insn) if (!encode_operand (insn, type, &insn->operands[i])) return 0; } - if (insn->ptm) + if (insn->tm->flags & FL_PAR) for (i = 0; i < insn->paropcount; i++) { enum optype partype = insn->paroperands[i].type; @@ -4272,8 +4201,7 @@ build_insn (insn) } static int -optimize_insn (insn) - tic54x_insn *insn; +optimize_insn (tic54x_insn *insn) { /* Optimize some instructions, helping out the brain-dead programmer. */ #define is_zero(op) ((op).exp.X_op == O_constant && (op).exp.X_add_number == 0) @@ -4366,9 +4294,7 @@ optimize_insn (insn) /* Find a matching template if possible, and get the operand strings. */ static int -tic54x_parse_insn (insn, line) - tic54x_insn *insn; - char *line; +tic54x_parse_insn (tic54x_insn *insn, char *line) { insn->tm = (template *) hash_find (op_hash, insn->mnemonic); if (!insn->tm) @@ -4415,8 +4341,7 @@ static int parallel_on_next_line_hint = Look for a subsequent line starting with "||". */ static int -next_line_shows_parallel (next_line) - char *next_line; +next_line_shows_parallel (char *next_line) { /* Look for the second half. */ while (ISSPACE (*next_line)) @@ -4427,31 +4352,29 @@ next_line_shows_parallel (next_line) } static int -tic54x_parse_parallel_insn_firstline (insn, line) - tic54x_insn *insn; - char *line; +tic54x_parse_parallel_insn_firstline (tic54x_insn *insn, char *line) { - insn->ptm = (partemplate *) hash_find (parop_hash, insn->mnemonic); - if (!insn->ptm) + insn->tm = (template *) hash_find (parop_hash, insn->mnemonic); + if (!insn->tm) { as_bad (_("Unrecognized parallel instruction \"%s\""), insn->mnemonic); return 0; } - while (insn->ptm->name && strcasecmp (insn->ptm->name, - insn->mnemonic) == 0) + while (insn->tm->name && strcasecmp (insn->tm->name, + insn->mnemonic) == 0) { insn->opcount = get_operands (insn->operands, line); if (insn->opcount < 0) return 0; if (insn->opcount == 2 && operands_match (insn, &insn->operands[0], insn->opcount, - insn->ptm->operand_types, 2, 2)) + insn->tm->operand_types, 2, 2)) { return 1; } - ++(insn->ptm); + ++(insn->tm); } /* Didn't find a matching parallel; try for a normal insn. */ return 0; @@ -4460,30 +4383,28 @@ tic54x_parse_parallel_insn_firstline (in /* Parse the second line of a two-line parallel instruction. */ static int -tic54x_parse_parallel_insn_lastline (insn, line) - tic54x_insn *insn; - char *line; +tic54x_parse_parallel_insn_lastline (tic54x_insn *insn, char *line) { int valid_mnemonic = 0; insn->paropcount = get_operands (insn->paroperands, line); - while (insn->ptm->name && strcasecmp (insn->ptm->name, + while (insn->tm->name && strcasecmp (insn->tm->name, insn->mnemonic) == 0) { - if (strcasecmp (insn->ptm->parname, insn->parmnemonic) == 0) + if (strcasecmp (insn->tm->parname, insn->parmnemonic) == 0) { valid_mnemonic = 1; - if (insn->paropcount >= insn->ptm->minops - && insn->paropcount <= insn->ptm->maxops + if (insn->paropcount >= insn->tm->minops + && insn->paropcount <= insn->tm->maxops && operands_match (insn, insn->paroperands, insn->paropcount, - insn->ptm->paroperand_types, - insn->ptm->minops, insn->ptm->maxops)) + insn->tm->paroperand_types, + insn->tm->minops, insn->tm->maxops)) { return 1; } } - ++(insn->ptm); + ++(insn->tm); } if (valid_mnemonic) as_bad (_("Invalid operand (s) for parallel instruction \"%s\""), @@ -5414,19 +5335,20 @@ tic54x_cons_fix_new (fragS *frag, int wh If fixp->fx_addsy is non-NULL, we'll have to generate a reloc entry. */ -int -md_apply_fix (fixP, valP) +void +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - valueT *valP; + valueT * valP; + segT seg ATTRIBUTE_UNUSED; { char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; - valueT val = *valP; + valueT val = * valP; switch (fixP->fx_r_type) { default: as_fatal ("Bad relocation type: 0x%02x", fixP->fx_r_type); - return 0; + return; case BFD_RELOC_TIC54X_MS7_OF_23: val = (val >> 16) & 0x7F; /* Fall through. */ @@ -5460,7 +5382,8 @@ md_apply_fix (fixP, valP) break; } - return 0; /* Return value is ignored. */ + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } /* This is our chance to record section alignment diff -uprN binutils-2.11.92.0.10/gas/config/tc-tic54x.h binutils-2.11.92.0.12/gas/config/tc-tic54x.h --- binutils-2.11.92.0.10/gas/config/tc-tic54x.h Fri Apr 13 11:19:49 2001 +++ binutils-2.11.92.0.12/gas/config/tc-tic54x.h Fri Nov 16 14:05:52 2001 @@ -83,26 +83,26 @@ extern void tic54x_cons_fix_new PARAMS(( */ #define md_number_to_chars tic54x_number_to_chars -extern void tic54x_number_to_chars PARAMS((char *, valueT, int)); +extern void tic54x_number_to_chars (char *, valueT, int); #define tc_adjust_symtab() tic54x_adjust_symtab() -extern void tic54x_adjust_symtab PARAMS(()); +extern void tic54x_adjust_symtab (void); #define tc_unrecognized_line(ch) tic54x_unrecognized_line(ch) -extern int tic54x_unrecognized_line PARAMS((int ch)); +extern int tic54x_unrecognized_line (int ch); #define md_parse_name(s,e,c) tic54x_parse_name(s,e) -extern int tic54x_parse_name PARAMS((char *name, expressionS *e)); +extern int tic54x_parse_name (char *name, expressionS *e); #define md_undefined_symbol(s) tic54x_undefined_symbol(s) -extern symbolS *tic54x_undefined_symbol PARAMS((char *name)); +extern symbolS *tic54x_undefined_symbol (char *name); #define md_macro_start() tic54x_macro_start() -extern void tic54x_macro_start (); +extern void tic54x_macro_start (void); #define md_macro_end() tic54x_macro_end() -extern void tic54x_macro_end (); +extern void tic54x_macro_end (void); #define md_macro_info(args) tic54x_macro_info(args) extern void tic54x_macro_info PARAMS((void *macro)); #define tc_frob_label(sym) tic54x_define_label (sym) extern void tic54x_define_label PARAMS((symbolS *)); #define md_start_line_hook() tic54x_start_line_hook() -extern void tic54x_start_line_hook (); +extern void tic54x_start_line_hook (void); #define md_estimate_size_before_relax(f,s) \ tic54x_estimate_size_before_relax(f,s) @@ -125,4 +125,6 @@ extern void tic54x_convert_frag(bfd *, s /* spruce up the listing output */ #define LISTING_WORD_SIZE 2 +extern void tic54x_global (int); + #endif diff -uprN binutils-2.11.92.0.10/gas/config/tc-tic80.c binutils-2.11.92.0.12/gas/config/tc-tic80.c --- binutils-2.11.92.0.10/gas/config/tc-tic80.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-tic80.c Fri Nov 16 14:05:52 2001 @@ -960,10 +960,12 @@ TIc80 options:\n\ To indicate that a fixup has been eliminated, set fixP->fx_done. */ void -md_apply_fix (fixP, val) +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - long val; + valueT * valP; + segT seg ATTRIBUTE_UNUSED; { + long val = * (long *) valP; char *dest = fixP->fx_frag->fr_literal + fixP->fx_where; int overflow; @@ -1001,6 +1003,9 @@ md_apply_fix (fixP, val) fixP->fx_r_type); break; } + + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } /* Functions concerning relocs. */ diff -uprN binutils-2.11.92.0.10/gas/config/tc-v850.c binutils-2.11.92.0.12/gas/config/tc-v850.c --- binutils-2.11.92.0.10/gas/config/tc-v850.c Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/config/tc-v850.c Fri Nov 16 14:05:52 2001 @@ -2210,7 +2210,7 @@ md_assemble (str) BFD_RELOC_UNUSED plus the operand index. This lets us easily handle fixups for any operand type, although that is admittedly not a very exciting feature. We pick a BFD reloc type in - md_apply_fix. */ + md_apply_fix3. */ for (i = 0; i < fc; i++) { const struct v850_operand *operand; @@ -2340,52 +2340,51 @@ v850_pcrel_from_section (fixp, section) return fixp->fx_frag->fr_address + fixp->fx_where; } -int -md_apply_fix3 (fixp, valuep, seg) - fixS *fixp; - valueT *valuep; +void +md_apply_fix3 (fixP, valueP, seg) + fixS *fixP; + valueT *valueP; segT seg ATTRIBUTE_UNUSED; { - valueT value; + valueT value = * valueP; char *where; - if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT - || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) + if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT + || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) { - fixp->fx_done = 0; - return 1; + fixP->fx_done = 0; + return; } - if (fixp->fx_addsy == (symbolS *) NULL) - { - value = *valuep; - fixp->fx_done = 1; - } - else if (fixp->fx_pcrel) - value = *valuep; + if (fixP->fx_addsy == (symbolS *) NULL) + fixP->fx_done = 1; + + else if (fixP->fx_pcrel) + ; + else { - value = fixp->fx_offset; - if (fixp->fx_subsy != (symbolS *) NULL) + value = fixP->fx_offset; + if (fixP->fx_subsy != (symbolS *) NULL) { - if (S_GET_SEGMENT (fixp->fx_subsy) == absolute_section) - value -= S_GET_VALUE (fixp->fx_subsy); + if (S_GET_SEGMENT (fixP->fx_subsy) == absolute_section) + value -= S_GET_VALUE (fixP->fx_subsy); else { /* We don't actually support subtracting a symbol. */ - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("expression too complex")); } } } - if ((int) fixp->fx_r_type >= (int) BFD_RELOC_UNUSED) + if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED) { int opindex; const struct v850_operand *operand; unsigned long insn; - opindex = (int) fixp->fx_r_type - (int) BFD_RELOC_UNUSED; + opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED; operand = &v850_operands[opindex]; /* Fetch the instruction, insert the fully resolved operand @@ -2393,53 +2392,50 @@ md_apply_fix3 (fixp, valuep, seg) Note the instruction has been stored in little endian format! */ - where = fixp->fx_frag->fr_literal + fixp->fx_where; + where = fixP->fx_frag->fr_literal + fixP->fx_where; insn = bfd_getl32 ((unsigned char *) where); insn = v850_insert_operand (insn, operand, (offsetT) value, - fixp->fx_file, fixp->fx_line, NULL); + fixP->fx_file, fixP->fx_line, NULL); bfd_putl32 ((bfd_vma) insn, (unsigned char *) where); - if (fixp->fx_done) - { - /* Nothing else to do here. */ - return 1; - } + if (fixP->fx_done) + /* Nothing else to do here. */ + return; /* Determine a BFD reloc value based on the operand information. We are only prepared to turn a few of the operands into relocs. */ if (operand->bits == 22) - fixp->fx_r_type = BFD_RELOC_V850_22_PCREL; + fixP->fx_r_type = BFD_RELOC_V850_22_PCREL; else if (operand->bits == 9) - fixp->fx_r_type = BFD_RELOC_V850_9_PCREL; + fixP->fx_r_type = BFD_RELOC_V850_9_PCREL; else { #if 0 fprintf (stderr, "bits: %d, insn: %x\n", operand->bits, insn); #endif - as_bad_where (fixp->fx_file, fixp->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("unresolved expression that must be resolved")); - fixp->fx_done = 1; - return 1; + fixP->fx_done = 1; + return; } } - else if (fixp->fx_done) + else if (fixP->fx_done) { /* We still have to insert the value into memory! */ - where = fixp->fx_frag->fr_literal + fixp->fx_where; + where = fixP->fx_frag->fr_literal + fixP->fx_where; - if (fixp->fx_size == 1) + if (fixP->fx_size == 1) *where = value & 0xff; - else if (fixp->fx_size == 2) + else if (fixP->fx_size == 2) bfd_putl16 (value & 0xffff, (unsigned char *) where); - else if (fixp->fx_size == 4) + else if (fixP->fx_size == 4) bfd_putl32 (value, (unsigned char *) where); } - fixp->fx_addnumber = value; - return 1; + fixP->fx_addnumber = value; } /* Parse a cons expression. We have to handle hi(), lo(), etc diff -uprN binutils-2.11.92.0.10/gas/config/tc-v850.h binutils-2.11.92.0.12/gas/config/tc-v850.h --- binutils-2.11.92.0.10/gas/config/tc-v850.h Wed Aug 22 08:52:10 2001 +++ binutils-2.11.92.0.12/gas/config/tc-v850.h Fri Nov 16 14:05:52 2001 @@ -34,7 +34,6 @@ /* The target BFD format. */ #define TARGET_FORMAT "elf32-v850" -#define MD_APPLY_FIX3 #define md_operand(x) #define obj_fix_adjustable(fixP) v850_fix_adjustable(fixP) diff -uprN binutils-2.11.92.0.10/gas/config/tc-vax.c binutils-2.11.92.0.12/gas/config/tc-vax.c --- binutils-2.11.92.0.10/gas/config/tc-vax.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-vax.c Fri Nov 16 14:05:52 2001 @@ -289,12 +289,18 @@ md_number_to_chars (con, value, nbytes) that they reference. */ void /* Knows about order of bytes in address. */ -md_apply_fix (fixP, value) - fixS *fixP; - long value; +md_apply_fix3 (fixP, valueP, seg) + fixS * fixP; + valueT * valueP; + segT seg ATTRIBUTE_UNUSED; { + valueT value = * valueP; + number_to_chars_littleendian (fixP->fx_where + fixP->fx_frag->fr_literal, - (valueT) value, fixP->fx_size); + value, fixP->fx_size); + + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } long diff -uprN binutils-2.11.92.0.10/gas/config/tc-w65.c binutils-2.11.92.0.12/gas/config/tc-w65.c --- binutils-2.11.92.0.10/gas/config/tc-w65.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/config/tc-w65.c Fri Nov 16 14:05:52 2001 @@ -978,10 +978,12 @@ md_section_align (seg, size) } void -md_apply_fix (fixP, val) +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - long val; + vauleT * valP; + segT seg ATTRIBUTE_UNUSED; { + long val = * (long *) valP; char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; int addr = fixP->fx_frag->fr_address + fixP->fx_where; @@ -1030,9 +1032,12 @@ md_apply_fix (fixP, val) default: abort (); } + + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } -/* Put number into target byte order */ +/* Put number into target byte order. */ void md_number_to_chars (ptr, use, nbytes) diff -uprN binutils-2.11.92.0.10/gas/config/tc-z8k.c binutils-2.11.92.0.12/gas/config/tc-z8k.c --- binutils-2.11.92.0.10/gas/config/tc-z8k.c Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/config/tc-z8k.c Fri Nov 16 14:05:52 2001 @@ -1405,10 +1405,12 @@ md_section_align (seg, size) } void -md_apply_fix (fixP, val) +md_apply_fix3 (fixP, valP, segment) fixS *fixP; - long val; + valueT * valP; + segT segment ATTRIBUTE_UNUSED; { + long val = * (long *) valP; char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; switch (fixP->fx_r_type) @@ -1464,6 +1466,9 @@ md_apply_fix (fixP, val) default: abort (); } + + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } int diff -uprN binutils-2.11.92.0.10/gas/configure binutils-2.11.92.0.12/gas/configure --- binutils-2.11.92.0.10/gas/configure Mon Oct 22 10:25:11 2001 +++ binutils-2.11.92.0.12/gas/configure Fri Nov 16 14:05:52 2001 @@ -2478,9 +2478,10 @@ EOF mips-*-sysv4*MP* | mips-*-gnu*) fmt=elf em=tmips ;; mips-*-sysv*) fmt=ecoff ;; - mips-*-elf* | mips-*-rtems* | mips-*-openbsd*) + mips-*-elf* | mips-*-rtems* | mips-*-netbsd* | mips-*-openbsd*) fmt=elf ;; mips-*-vxworks*) fmt=elf mips_stabs_elf=y ;; + mmix-*-*) fmt=elf bfd_gas=yes ;; mn10200-*-*) fmt=elf bfd_gas=yes ;; mn10300-*-*) fmt=elf bfd_gas=yes ;; openrisc-*-*) fmt=elf bfd_gas=yes ;; @@ -2517,7 +2518,8 @@ EOF s390x-*-linux-gnu*) fmt=elf em=linux ;; s390-*-linux-gnu*) fmt=elf em=linux ;; - sh-*-linux*) fmt=elf em=linux ;; + sh*eb-*-linux*) fmt=elf em=linux endian=big ;; + sh*-*-linux*) fmt=elf em=linux endian=little ;; sh-*-elf*) fmt=elf ;; sh-*-coff*) fmt=coff bfd_gas=yes;; sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;; @@ -3076,7 +3078,7 @@ EOF # 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:3080: checking for $ac_word" >&5 +echo "configure:3082: 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 @@ -3106,7 +3108,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3110: checking for $ac_word" >&5 +echo "configure:3112: 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 @@ -3157,7 +3159,7 @@ fi # 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:3161: checking for $ac_word" >&5 +echo "configure:3163: 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 @@ -3189,7 +3191,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:3193: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:3195: 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. @@ -3200,12 +3202,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 3204 "configure" +#line 3206 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:3209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3211: \"$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 @@ -3231,12 +3233,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:3235: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:3237: 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:3240: checking whether we are using GNU C" >&5 +echo "configure:3242: 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 @@ -3245,7 +3247,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3249: \"$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:3251: \"$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 @@ -3264,7 +3266,7 @@ 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:3268: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:3270: 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 @@ -3301,7 +3303,7 @@ do # 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:3305: checking for $ac_word" >&5 +echo "configure:3307: 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 @@ -3332,7 +3334,7 @@ done test -n "$YACC" || YACC="yacc" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:3336: checking how to run the C preprocessor" >&5 +echo "configure:3338: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3347,13 +3349,13 @@ else # 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:3357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3359: \"$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 : @@ -3364,13 +3366,13 @@ else 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:3374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3376: \"$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 : @@ -3381,13 +3383,13 @@ else 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:3391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3393: \"$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 : @@ -3417,7 +3419,7 @@ do # 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:3421: checking for $ac_word" >&5 +echo "configure:3423: 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 @@ -3450,7 +3452,7 @@ test -n "$LEX" || LEX=""$missing_dir/mis # 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:3454: checking for $ac_word" >&5 +echo "configure:3456: 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 @@ -3484,7 +3486,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:3488: checking for yywrap in -l$ac_lib" >&5 +echo "configure:3490: 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 @@ -3492,7 +3494,7 @@ else 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:3509: \"$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 @@ -3526,7 +3528,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:3530: checking lex output file root" >&5 +echo "configure:3532: 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 @@ -3547,7 +3549,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:3551: checking whether yytext is a pointer" >&5 +echo "configure:3553: 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 @@ -3559,14 +3561,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPU 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:3572: \"$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 @@ -3588,11 +3590,11 @@ EOF fi -ALL_LINGUAS= +ALL_LINGUAS="fr" # 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:3596: checking for $ac_word" >&5 +echo "configure:3598: 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 @@ -3620,12 +3622,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3624: checking for ANSI C header files" >&5 +echo "configure:3626: 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 @@ -3633,7 +3635,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3639: \"$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* @@ -3650,7 +3652,7 @@ rm -f conftest* 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 @@ -3668,7 +3670,7 @@ fi 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 @@ -3689,7 +3691,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3700,7 +3702,7 @@ if (XOR (islower (i), ISLOWER (i)) || to exit (0); } EOF -if { (eval echo configure:3704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3724,12 +3726,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3728: checking for working const" >&5 +echo "configure:3730: 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:3784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3799,21 +3801,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3803: checking for inline" >&5 +echo "configure:3805: 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:3819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3839,12 +3841,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3843: checking for off_t" >&5 +echo "configure:3845: 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 @@ -3872,12 +3874,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3876: checking for size_t" >&5 +echo "configure:3878: 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 @@ -3907,19 +3909,19 @@ fi # 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:3911: checking for working alloca.h" >&5 +echo "configure:3913: 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:3923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3925: \"$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 @@ -3940,12 +3942,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3944: checking for alloca" >&5 +echo "configure:3946: 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:3979: \"$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 @@ -4005,12 +4007,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:4009: checking whether alloca needs Cray hooks" >&5 +echo "configure:4011: 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 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4039: checking for $ac_func" >&5 +echo "configure:4041: 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:4069: \"$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 @@ -4090,7 +4092,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:4094: checking stack direction for C alloca" >&5 +echo "configure:4096: 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 @@ -4098,7 +4100,7 @@ else 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:4123: \"$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 @@ -4142,17 +4144,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4146: checking for $ac_hdr" >&5 +echo "configure:4148: 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:4156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4158: \"$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* @@ -4181,12 +4183,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4185: checking for $ac_func" >&5 +echo "configure:4187: 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:4215: \"$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 @@ -4234,7 +4236,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:4238: checking for working mmap" >&5 +echo "configure:4240: 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 @@ -4242,7 +4244,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4388: \"$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 @@ -4410,17 +4412,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4414: checking for $ac_hdr" >&5 +echo "configure:4416: 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:4424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4426: \"$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* @@ -4450,12 +4452,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4454: checking for $ac_func" >&5 +echo "configure:4456: 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:4484: \"$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 @@ -4507,12 +4509,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4511: checking for $ac_func" >&5 +echo "configure:4513: 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:4541: \"$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 @@ -4569,19 +4571,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:4573: checking for LC_MESSAGES" >&5 +echo "configure:4575: 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:4585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4587: \"$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 @@ -4602,7 +4604,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:4606: checking whether NLS is requested" >&5 +echo "configure:4608: 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" @@ -4622,7 +4624,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:4626: checking whether included gettext is requested" >&5 +echo "configure:4628: 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" @@ -4641,17 +4643,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:4645: checking for libintl.h" >&5 +echo "configure:4647: 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:4655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4657: \"$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* @@ -4668,19 +4670,19 @@ fi 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:4672: checking for gettext in libc" >&5 +echo "configure:4674: 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:4684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4686: \"$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 @@ -4696,7 +4698,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:4700: checking for bindtextdomain in -lintl" >&5 +echo "configure:4702: 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 @@ -4704,7 +4706,7 @@ else 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:4721: \"$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 @@ -4731,19 +4733,19 @@ fi 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:4735: checking for gettext in libintl" >&5 +echo "configure:4737: 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:4749: \"$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 @@ -4771,7 +4773,7 @@ EOF # 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:4775: checking for $ac_word" >&5 +echo "configure:4777: 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 @@ -4805,12 +4807,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4809: checking for $ac_func" >&5 +echo "configure:4811: 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:4839: \"$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 @@ -4860,7 +4862,7 @@ done # 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:4864: checking for $ac_word" >&5 +echo "configure:4866: 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 @@ -4896,7 +4898,7 @@ fi # 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:4900: checking for $ac_word" >&5 +echo "configure:4902: 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 @@ -4928,7 +4930,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4968,7 +4970,7 @@ fi # 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:4972: checking for $ac_word" >&5 +echo "configure:4974: 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 @@ -5002,7 +5004,7 @@ fi # 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:5006: checking for $ac_word" >&5 +echo "configure:5008: 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 @@ -5038,7 +5040,7 @@ fi # 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:5042: checking for $ac_word" >&5 +echo "configure:5044: 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 @@ -5128,7 +5130,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:5132: checking for catalogs to be installed" >&5 +echo "configure:5134: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -5156,17 +5158,17 @@ echo "configure:5132: checking for catal 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:5160: checking for linux/version.h" >&5 +echo "configure:5162: 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:5170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5172: \"$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* @@ -5229,7 +5231,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:5233: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:5235: 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" @@ -5254,7 +5256,7 @@ fi echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:5258: checking for executable suffix" >&5 +echo "configure:5260: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5264,7 +5266,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:5268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:5270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -5289,17 +5291,17 @@ for ac_hdr in string.h stdlib.h memory.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5293: checking for $ac_hdr" >&5 +echo "configure:5295: 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:5303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5305: \"$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* @@ -5329,7 +5331,7 @@ done # Put this here so that autoconf's "cross-compiling" message doesn't confuse # people who are not cross-compiling but are compiling cross-assemblers. echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6 -echo "configure:5333: checking whether compiling a cross-assembler" >&5 +echo "configure:5335: checking whether compiling a cross-assembler" >&5 if test "${host}" = "${target}"; then cross_gas=no else @@ -5344,19 +5346,19 @@ echo "$ac_t""$cross_gas" 1>&6 # 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:5348: checking for working alloca.h" >&5 +echo "configure:5350: 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:5360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5362: \"$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 @@ -5377,12 +5379,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:5381: checking for alloca" >&5 +echo "configure:5383: 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:5416: \"$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 @@ -5442,12 +5444,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:5446: checking whether alloca needs Cray hooks" >&5 +echo "configure:5448: 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 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5476: checking for $ac_func" >&5 +echo "configure:5478: 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:5506: \"$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 @@ -5527,7 +5529,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:5531: checking stack direction for C alloca" >&5 +echo "configure:5533: 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 @@ -5535,7 +5537,7 @@ else 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:5560: \"$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 @@ -5576,21 +5578,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:5580: checking for inline" >&5 +echo "configure:5582: 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:5596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -5620,12 +5622,12 @@ esac for ac_func in unlink remove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5624: checking for $ac_func" >&5 +echo "configure:5626: 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:5654: \"$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 @@ -5677,12 +5679,12 @@ done for ac_func in sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5681: checking for $ac_func" >&5 +echo "configure:5683: 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:5711: \"$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 @@ -5740,7 +5742,7 @@ case $host in ;; *-ncr-sysv4.3*) echo $ac_n "checking for _mwvalidcheckl in -lmw""... $ac_c" 1>&6 -echo "configure:5744: checking for _mwvalidcheckl in -lmw" >&5 +echo "configure:5746: checking for _mwvalidcheckl in -lmw" >&5 ac_lib_var=`echo mw'_'_mwvalidcheckl | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5748,7 +5750,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5765: \"$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 @@ -5780,7 +5782,7 @@ else fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:5784: checking for main in -lm" >&5 +echo "configure:5786: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5788,14 +5790,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5801: \"$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 @@ -5818,7 +5820,7 @@ fi ;; *) echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:5822: checking for main in -lm" >&5 +echo "configure:5824: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5826,14 +5828,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5839: \"$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 @@ -5864,12 +5866,12 @@ esac # enough, but on some of those systems, the assert macro relies on requoting # working properly! echo $ac_n "checking for working assert macro""... $ac_c" 1>&6 -echo "configure:5868: checking for working assert macro" >&5 +echo "configure:5870: checking for working assert macro" >&5 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5885,7 +5887,7 @@ assert (a == b ; return 0; } EOF -if { (eval echo configure:5889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_assert_ok=yes else @@ -5926,12 +5928,12 @@ gas_test_headers=" " echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 -echo "configure:5930: checking whether declaration is required for strstr" >&5 +echo "configure:5932: checking whether declaration is required for strstr" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+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:5948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_strstr=no else @@ -5963,12 +5965,12 @@ fi echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 -echo "configure:5967: checking whether declaration is required for malloc" >&5 +echo "configure:5969: checking whether declaration is required for malloc" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+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:5985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_malloc=no else @@ -6000,12 +6002,12 @@ fi echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 -echo "configure:6004: checking whether declaration is required for free" >&5 +echo "configure:6006: checking whether declaration is required for free" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+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:6022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_free=no else @@ -6037,12 +6039,12 @@ fi echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 -echo "configure:6041: checking whether declaration is required for sbrk" >&5 +echo "configure:6043: checking whether declaration is required for sbrk" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+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:6059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_sbrk=no else @@ -6074,12 +6076,12 @@ fi echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6 -echo "configure:6078: checking whether declaration is required for environ" >&5 +echo "configure:6080: checking whether declaration is required for environ" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+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:6096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_environ=no else @@ -6114,12 +6116,12 @@ fi # for it? echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 -echo "configure:6118: checking whether declaration is required for errno" >&5 +echo "configure:6120: checking whether declaration is required for errno" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+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:6140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_errno=no else diff -uprN binutils-2.11.92.0.10/gas/configure.in binutils-2.11.92.0.12/gas/configure.in --- binutils-2.11.92.0.10/gas/configure.in Fri Oct 19 23:57:49 2001 +++ binutils-2.11.92.0.12/gas/configure.in Fri Nov 16 14:05:52 2001 @@ -356,9 +356,10 @@ changequote([,])dnl mips-*-sysv4*MP* | mips-*-gnu*) fmt=elf em=tmips ;; mips-*-sysv*) fmt=ecoff ;; - mips-*-elf* | mips-*-rtems* | mips-*-openbsd*) + mips-*-elf* | mips-*-rtems* | mips-*-netbsd* | mips-*-openbsd*) fmt=elf ;; mips-*-vxworks*) fmt=elf mips_stabs_elf=y ;; + mmix-*-*) fmt=elf bfd_gas=yes ;; mn10200-*-*) fmt=elf bfd_gas=yes ;; mn10300-*-*) fmt=elf bfd_gas=yes ;; openrisc-*-*) fmt=elf bfd_gas=yes ;; @@ -393,7 +394,8 @@ changequote([,])dnl s390x-*-linux-gnu*) fmt=elf em=linux ;; s390-*-linux-gnu*) fmt=elf em=linux ;; - sh-*-linux*) fmt=elf em=linux ;; + sh*eb-*-linux*) fmt=elf em=linux endian=big ;; + sh*-*-linux*) fmt=elf em=linux endian=little ;; sh-*-elf*) fmt=elf ;; sh-*-coff*) fmt=coff bfd_gas=yes;; sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;; @@ -844,7 +846,7 @@ AC_PROG_CC AC_PROG_YACC AM_PROG_LEX -ALL_LINGUAS= +ALL_LINGUAS="fr" CY_GNU_GETTEXT AM_MAINTAINER_MODE diff -uprN binutils-2.11.92.0.10/gas/doc/Makefile.am binutils-2.11.92.0.12/gas/doc/Makefile.am --- binutils-2.11.92.0.10/gas/doc/Makefile.am Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/doc/Makefile.am Fri Nov 16 14:05:52 2001 @@ -10,7 +10,8 @@ MANCONF = -Dman TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl -POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1 +POD2MAN = pod2man --center="GNU Development Tools" \ + --release="binutils-$(VERSION)" --section=1 man_MANS = as.1 @@ -39,6 +40,7 @@ CPU_DOCS = \ c-m68k.texi \ c-m88k.texi \ c-mips.texi \ + c-mmix.texi \ c-ns32k.texi \ c-pdp11.texi \ c-pj.texi \ diff -uprN binutils-2.11.92.0.10/gas/doc/Makefile.in binutils-2.11.92.0.12/gas/doc/Makefile.in --- binutils-2.11.92.0.10/gas/doc/Makefile.in Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/doc/Makefile.in Fri Nov 16 14:05:52 2001 @@ -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. @@ -126,7 +126,8 @@ MANCONF = -Dman TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl -POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1 +POD2MAN = pod2man --center="GNU Development Tools" \ + --release="binutils-$(VERSION)" --section=1 man_MANS = as.1 @@ -149,6 +150,7 @@ CPU_DOCS = \ c-m68k.texi \ c-m88k.texi \ c-mips.texi \ + c-mmix.texi \ c-ns32k.texi \ c-pdp11.texi \ c-pj.texi \ @@ -185,7 +187,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: @@ -275,7 +277,7 @@ uninstall-info: 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 -uprN binutils-2.11.92.0.10/gas/doc/all.texi binutils-2.11.92.0.12/gas/doc/all.texi --- binutils-2.11.92.0.10/gas/doc/all.texi Mon Oct 15 21:27:23 2001 +++ binutils-2.11.92.0.12/gas/doc/all.texi Fri Nov 16 14:05:52 2001 @@ -44,6 +44,7 @@ @set M880X0 @set MCORE @set MIPS +@set MMIX @set PDP11 @set PJ @set PPC diff -uprN binutils-2.11.92.0.10/gas/doc/as.texinfo binutils-2.11.92.0.12/gas/doc/as.texinfo --- binutils-2.11.92.0.10/gas/doc/as.texinfo Fri Oct 19 23:57:49 2001 +++ binutils-2.11.92.0.12/gas/doc/as.texinfo Fri Nov 16 14:05:52 2001 @@ -13,6 +13,9 @@ @c %**start of header @setfilename as.info @c ---config--- +@macro gcctabopt{body} +@code{\body\} +@end macro @c defaults, config file may override: @set have-stabs @c --- @@ -43,6 +46,7 @@ @set M880X0 @set MCORE @set MIPS +@set MMIX @set PDP11 @set PJ @set PPC @@ -155,7 +159,7 @@ notice identical to this one except for @sp 13 The Free Software Foundation Inc. thanks The Nice Computer Company of Australia for loaning Dean Elsner to write the -first (Vax) version of @code{as} for Project @sc{gnu}. +first (Vax) version of @command{as} for Project @sc{gnu}. The proprietors, management and staff of TNCCA thank FSF for distracting the boss while they got some work done. @@ -191,10 +195,10 @@ Copyright @copyright{} 1991, 92, 93, 94, @node Top @top Using @value{AS} -This file is a user guide to the @sc{gnu} assembler @code{@value{AS}} version +This file is a user guide to the @sc{gnu} assembler @command{@value{AS}} version @value{VERSION}. @ifclear GENERIC -This version of the file describes @code{@value{AS}} configured to generate +This version of the file describes @command{@value{AS}} configured to generate code for @value{TARGET} architectures. @end ifclear @@ -221,9 +225,9 @@ section entitled "GNU Free Documentation @node Overview @chapter Overview @iftex -This manual is a user guide to the @sc{gnu} assembler @code{@value{AS}}. +This manual is a user guide to the @sc{gnu} assembler @command{@value{AS}}. @ifclear GENERIC -This version of the manual describes @code{@value{AS}} configured to generate +This version of the manual describes @command{@value{AS}} configured to generate code for @value{TARGET} architectures. @end ifclear @end iftex @@ -231,57 +235,71 @@ code for @value{TARGET} architectures. @cindex invocation summary @cindex option summary @cindex summary of options -Here is a brief summary of how to invoke @code{@value{AS}}. For details, +Here is a brief summary of how to invoke @command{@value{AS}}. For details, @pxref{Invoking,,Comand-Line Options}. @c man title AS the portable GNU assembler. +@ignore @c man begin SEEALSO gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}. @c man end +@end ignore @c We don't use deffn and friends for the following because they seem @c to be limited to one line for the header. @smallexample @c man begin SYNOPSIS -@value{AS} [ -a[cdhlns][=file] ] [ -D ] [ --defsym @var{sym}=@var{val} ] - [ -f ] [ --gstabs ] [ --gdwarf2 ] [ --help ] [ -I @var{dir} ] - [ -J ] [ -K ] [ -L ] - [ --listing--lhs-width=NUM ][ --listing-lhs-width2=NUM ] - [ --listing-rhs-width=NUM ][ --listing-cont-lines=NUM ] - [ --keep-locals ] [ -o @var{objfile} ] [ -R ] [ --statistics ] [ -v ] - [ -version ] [ --version ] [ -W ] [ --warn ] [ --fatal-warnings ] - [ -w ] [ -x ] [ -Z ] [ --target-help ] +@value{AS} [@b{-a}[@b{cdhlns}][=@var{file}]] [@b{-D}] [@b{--defsym} @var{sym}=@var{val}] + [@b{-f}] [@b{--gstabs}] [@b{--gdwarf2}] [@b{--help}] [@b{-I} @var{dir}] + [@b{-J}] [@b{-K}] [@b{-L}] + [@b{--listing-lhs-width}=@var{NUM}] [@b{--listing-lhs-width2}=@var{NUM}] + [@b{--listing-rhs-width}=@var{NUM}] [@b{--listing-cont-lines}=@var{NUM}] + [@b{--keep-locals}] [@b{-o} @var{objfile}] [@b{-R}] [@b{--statistics}] [@b{-v}] + [@b{-version}] [@b{--version}] [@b{-W}] [@b{--warn}] [@b{--fatal-warnings}] + [@b{-w}] [@b{-x}] [@b{-Z}] [@b{--target-help}] [@var{target-options}] + [@b{--}|@var{files} @dots{}] +@c +@c Target dependent options are listed below. Keep the list sorted. +@c Add an empty line for separation. @ifset A29K @c am29k has no machine-dependent assembler options @end ifset @ifset ARC - [ -marc[5|6|7|8] ] - [ -EB | -EL ] + +@emph{Target ARC options:} + [@b{-marc[5|6|7|8]}] + [@b{-EB}|@b{-EL}] @end ifset @ifset ARM - [ -m[arm]1 | -m[arm]2 | -m[arm]250 | -m[arm]3 | - -m[arm]6 | -m[arm]60 | -m[arm]600 | -m[arm]610 | - -m[arm]620 | -m[arm]7[t][[d]m[i]][fe] | -m[arm]70 | - -m[arm]700 | -m[arm]710[c] | -m[arm]7100 | - -m[arm]7500 | -m[arm]8 | -m[arm]810 | -m[arm]9 | - -m[arm]920 | -m[arm]920t | -m[arm]9tdmi | - -mstrongarm | -mstrongarm110 | -mstrongarm1100 ] - [ -m[arm]v2 | -m[arm]v2a | -m[arm]v3 | -m[arm]v3m | - -m[arm]v4 | -m[arm]v4t | -m[arm]v5 | -[arm]v5t | - -[arm]v5te ] - [ -mthumb | -mall ] - [ -mfpa10 | -mfpa11 | -mfpe-old | -mno-fpu ] - [ -EB | -EL ] - [ -mapcs-32 | -mapcs-26 | -mapcs-float | - -mapcs-reentrant ] - [ -mthumb-interwork ] [ -moabi ] [ -k ] + +@emph{Target ARM options:} + [@b{-m[arm]1}|@b{-m[arm]2}|@b{-m[arm]250}|@b{-m[arm]3}| + @b{-m[arm]6}|@b{-m[arm]60}|@b{-m[arm]600}|@b{-m[arm]610}| + @b{-m[arm]620}|@b{-m[arm]7[t][[d]m[i]][fe]}|@b{-m[arm]70}| + @b{-m[arm]700}|@b{-m[arm]710[c]}|@b{-m[arm]7100}| + @b{-m[arm]7500}|@b{-m[arm]8}|@b{-m[arm]810}|@b{-m[arm]9}| + @b{-m[arm]920}|@b{-m[arm]920t}|@b{-m[arm]9tdmi}| + @b{-mstrongarm}|@b{-mstrongarm110}|@b{-mstrongarm1100}] + [@b{-m[arm]v2}|@b{-m[arm]v2a}|@b{-m[arm]v3}|@b{-m[arm]v3m}| + @b{-m[arm]v4}|@b{-m[arm]v4t}|@b{-m[arm]v5}|@b{-[arm]v5t}| + @b{-[arm]v5te}] + [@b{-mthumb}|@b{-mall}] + [@b{-mfpa10}|@b{-mfpa11}|@b{-mfpe-old}|@b{-mno-fpu}] + [@b{-EB}|@b{-EL}] + [@b{-mapcs-32}|@b{-mapcs-26}|@b{-mapcs-float}| + @b{-mapcs-reentrant}] + [@b{-mthumb-interwork}] [@b{-moabi}] [@b{-k}] @end ifset @ifset D10V - [ -O ] + +@emph{Target D10V options:} + [@b{-O}] @end ifset @ifset D30V - [ -O | -n | -N ] + +@emph{Target D30V options:} + [@b{-O}|@b{-n}|@b{-N}] @end ifset @ifset H8 @c Hitachi family chips have no machine-dependent assembler options @@ -289,75 +307,113 @@ gcc(1), ld(1), and the Info entries for @ifset HPPA @c HPPA has no machine-dependent assembler options (yet). @end ifset -@ifset PJ - [ -mb | -me ] -@end ifset -@ifset PPC - [ -mpwrx | -mpwr2 | -mpwr | -m601 | -mppc | -mppc32 | -m603 | -m604 | - -m403 | -m405 | -mppc64 | -m620 | -mppc64bridge | -mbooke | - -mbooke32 | -mbooke64 ] - [ -mcom | -many | -maltivec ] [ -memb ] - [ -mregnames | -mno-regnames ] - [ -mrelocatable | -mrelocatable-lib ] - [ -mlittle | -mlittle-endian | -mbig, -mbig-endian ] - [ -msolaris | -mno-solaris ] -@end ifset -@ifset SPARC -@c The order here is important. See c-sparc.texi. - [ -Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite - -Av8plus | -Av8plusa | -Av9 | -Av9a ] - [ -xarch=v8plus | -xarch=v8plusa ] [ -bump ] - [ -32 | -64 ] -@end ifset -@ifset TIC54X - [ -mcpu=54[123589] | -mcpu=54[56]lp ] [ -mfar-mode | -mf ] - [ -merrors-to-file | -me ] -@end ifset -@ifset Z8000 -@c Z8000 has no machine-dependent assembler options +@ifset I80386 + +@emph{Target i386 options:} + [@b{--32}|@b{--64}] @end ifset @ifset I960 + +@emph{Target i960 options:} @c see md_parse_option in tc-i960.c - [ -ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | - -AKC | -AMC ] - [ -b ] [ -no-relax ] + [@b{-ACA}|@b{-ACA_A}|@b{-ACB}|@b{-ACC}|@b{-AKA}|@b{-AKB}| + @b{-AKC}|@b{-AMC}] + [@b{-b}] [@b{-no-relax}] @end ifset @ifset M32R - [ --m32rx | --[no-]warn-explicit-parallel-conflicts | - --W[n]p ] + +@emph{Target M32R options:} + [@b{--m32rx}|@b{--[no-]warn-explicit-parallel-conflicts}| + @b{--W[n]p}] @end ifset @ifset M680X0 - [ -l ] [ -m68000 | -m68010 | -m68020 | ... ] -@end ifset -@ifset MCORE - [ -jsri2bsr ] [ -sifilter ] [ -relax ] - [ -mcpu=[210|340] ] + +@emph{Target M680X0 options:} + [@b{-l}] [@b{-m68000}|@b{-m68010}|@b{-m68020}|@dots{}] @end ifset @ifset M68HC11 - [ -m68hc11 | -m68hc12 ] - [ --force-long-branchs ] [ --short-branchs ] - [ --strict-direct-mode ] [ --print-insn-syntax ] - [ --print-opcodes ] [ --generate-example ] + +@emph{Target M68HC11 options:} + [@b{-m68hc11}|@b{-m68hc12}] + [@b{--force-long-branchs}] [@b{--short-branchs}] + [@b{--strict-direct-mode}] [@b{--print-insn-syntax}] + [@b{--print-opcodes}] [@b{--generate-example}] +@end ifset +@ifset MCORE + +@emph{Target MCORE options:} + [@b{-jsri2bsr}] [@b{-sifilter}] [@b{-relax}] + [@b{-mcpu=[210|340]}] @end ifset @ifset MIPS - [ -nocpp ] [ -EL ] [ -EB ] [ -G @var{num} ] [ -mcpu=@var{CPU} ] - [ -mips1 ] [ -mips2 ] [ -mips3 ] [ -mips4 ] [ -mips5 ] - [ -mips32 ] [ -mips64 ] - [ -m4650 ] [ -no-m4650 ] - [ --trap ] [ --break ] [ -n ] - [ --emulation=@var{name} ] + +@emph{Target MIPS options:} + [@b{-nocpp}] [@b{-EL}] [@b{-EB}] [@b{-G} @var{num}] [@b{-mcpu}=@var{CPU} ] + [@b{-mips1}] [@b{-mips2}] [@b{-mips3}] [@b{-mips4}] [@b{-mips5}] + [@b{-mips32}] [@b{-mips64}] + [@b{-m4650}] [@b{-no-m4650}] + [@b{--trap}] [@b{--break}] [@b{-n}] + [@b{--emulation}=@var{name} ] +@end ifset +@ifset MMIX + +@emph{Target MMIX options:} + [@b{--fixed-special-register-names}] [@b{--globalize-symbols}] + [@b{--gnu-syntax}] [@b{--relax}] [@b{--no-predefined-symbols}] + [@b{--no-expand}] [@b{--no-merge-gregs}] [@b{-x}] +@end ifset +@ifset PDP11 + +@emph{Target PDP11 options:} + [@b{-mpic}|@b{-mno-pic}] [@b{-mall}] [@b{-mno-extensions}] + [@b{-m}@var{extension}|@b{-mno-}@var{extension}] + [@b{-m}@var{cpu}] [@b{-m}@var{machine}] +@end ifset +@ifset PJ + +@emph{Target picoJava options:} + [@b{-mb}|@b{-me}] +@end ifset +@ifset PPC + +@emph{Target PowerPC options:} + [@b{-mpwrx}|@b{-mpwr2}|@b{-mpwr}|@b{-m601}|@b{-mppc}|@b{-mppc32}|@b{-m603}|@b{-m604}| + @b{-m403}|@b{-m405}|@b{-mppc64}|@b{-m620}|@b{-mppc64bridge}|@b{-mbooke}| + @b{-mbooke32}|@b{-mbooke64}] + [@b{-mcom}|@b{-many}|@b{-maltivec}] [@b{-memb}] + [@b{-mregnames}|@b{-mno-regnames}] + [@b{-mrelocatable}|@b{-mrelocatable-lib}] + [@b{-mlittle}|@b{-mlittle-endian}|@b{-mbig}|@b{-mbig-endian}] + [@b{-msolaris}|@b{-mno-solaris}] +@end ifset +@ifset SPARC + +@emph{Target SPARC options:} +@c The order here is important. See c-sparc.texi. + [@b{-Av6}|@b{-Av7}|@b{-Av8}|@b{-Asparclet}|@b{-Asparclite} + @b{-Av8plus}|@b{-Av8plusa}|@b{-Av9}|@b{-Av9a}] + [@b{-xarch=v8plus}|@b{-xarch=v8plusa}] [@b{-bump}] + [@b{-32}|@b{-64}] +@end ifset +@ifset TIC54X + +@emph{Target TIC54X options:} + [@b{-mcpu=54[123589]}|@b{-mcpu=54[56]lp}] [@b{-mfar-mode}|@b{-mf}] + [@b{-merrors-to-file} @var{}|@b{-me} @var{}] +@end ifset +@ifset Z8000 +@c Z8000 has no machine-dependent assembler options @end ifset - [ -- | @var{files} @dots{} ] @c man end @end smallexample @c man begin OPTIONS -@table @code +@table @gcctabopt @item -a[cdhlmns] Turn on listings, in any of a variety of ways: -@table @code +@table @gcctabopt @item -ac omit false conditionals @@ -452,7 +508,7 @@ Set the maximum number of lines printed to @var{number} + 1. @item -o @var{objfile} -Name the object-file output from @code{@value{AS}} @var{objfile}. +Name the object-file output from @command{@value{AS}} @var{objfile}. @item -R Fold the data section into the text section. @@ -466,10 +522,10 @@ Remove local absolute symbols from the o @item -v @itemx -version -Print the @code{as} version. +Print the @command{as} version. @item --version -Print the @code{as} version and exit. +Print the @command{as} version and exit. @item -W @itemx --no-warn @@ -499,7 +555,7 @@ Standard input, or source files to assem The following options are available when @value{AS} is configured for an ARC processor. -@table @code +@table @gcctabopt @item -marc[5|6|7|8] This option selects the core processor variant. @item -EB | -EL @@ -511,7 +567,7 @@ Select either big-endian (-EB) or little The following options are available when @value{AS} is configured for the ARM processor family. -@table @code +@table @gcctabopt @item -m[arm][1|2|3|6|7|8|9][...] Specify which ARM processor variant is the target. @item -m[arm]v[2|2a|3|3m|4|4t|5|5t] @@ -535,7 +591,7 @@ Specify that PIC code has been generated @ifset D10V The following options are available when @value{AS} is configured for a D10V processor. -@table @code +@table @gcctabopt @cindex D10V optimization @cindex optimization, D10V @item -O @@ -546,7 +602,7 @@ Optimize output by parallelizing instruc @ifset D30V The following options are available when @value{AS} is configured for a D30V processor. -@table @code +@table @gcctabopt @cindex D30V optimization @cindex optimization, D30V @item -O @@ -566,7 +622,7 @@ Warn when a nop after a 32-bit multiply The following options are available when @value{AS} is configured for the Intel 80960 processor. -@table @code +@table @gcctabopt @item -ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC Specify which variant of the 960 architecture is the target. @@ -584,7 +640,7 @@ error if necessary. The following options are available when @value{AS} is configured for the Mitsubishi M32R series. -@table @code +@table @gcctabopt @item --m32rx Specify which processor in the M32R family is the target. The default @@ -605,7 +661,7 @@ encountered. The following options are available when @value{AS} is configured for the Motorola 68000 series. -@table @code +@table @gcctabopt @item -l Shorten references to undefined symbols, to one word instead of two. @@ -635,10 +691,10 @@ unit coprocessor. The default is to ass For details about the PDP-11 machine dependent features options, see @ref{PDP-11-Options}. -@table @code +@table @gcctabopt @item -mpic | -mno-pic Generate position-independent (or position-dependent) code. The -default is @code{-mpic}. +default is @option{-mpic}. @item -mall @itemx -mall-extensions @@ -665,7 +721,7 @@ model, and disable all other extensions. The following options are available when @value{AS} is configured for a picoJava processor. -@table @code +@table @gcctabopt @cindex PJ endianness @cindex endianness, PJ @@ -684,7 +740,7 @@ Generate ``little endian'' format output The following options are available when @value{AS} is configured for the Motorola 68HC11 or 68HC12 series. -@table @code +@table @gcctabopt @item -m68hc11 | -m68hc12 Specify what processor is the target. The default is @@ -711,16 +767,16 @@ print the list of instructions with synt @item --generate-example print an example of instruction for each possible instruction and then exit. -This option is only useful for testing @code{@value{AS}}. +This option is only useful for testing @command{@value{AS}}. @end table @end ifset @ifset SPARC -The following options are available when @code{@value{AS}} is configured +The following options are available when @command{@value{AS}} is configured for the SPARC architecture: -@table @code +@table @gcctabopt @item -Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite @itemx -Av8plus | -Av8plusa | -Av9 | -Av9a Explicitly select a variant of the SPARC architecture. @@ -744,7 +800,7 @@ Warn when the assembler switches to anot The following options are available when @value{AS} is configured for the 'c54x architecture. -@table @code +@table @gcctabopt @item -mfar-mode Enable extended addressing mode. All addresses and relocations will assume extended addressing (usually 23 bits). @@ -760,7 +816,7 @@ behaviour in the shell. The following options are available when @value{AS} is configured for a MIPS processor. -@table @code +@table @gcctabopt @item -G @var{num} This option sets the largest size of an object that can be referenced implicitly with the @code{gp} register. It is only accepted for targets that @@ -805,7 +861,7 @@ understood. @cindex emulation @item --emulation=@var{name} -This option causes @code{@value{AS}} to emulate @code{@value{AS}} configured +This option causes @command{@value{AS}} to emulate @command{@value{AS}} configured for some other target, in all respects, including output format (choosing between ELF and ECOFF only), handling of pseudo-opcodes which may generate debugging information or store symbol table information, and default @@ -818,7 +874,7 @@ in the name. Using @samp{-EB} or @samp{ selection in any case. This option is currently supported only when the primary target -@code{@value{AS}} is configured for is a MIPS ELF or ECOFF target. +@command{@value{AS}} is configured for is a MIPS ELF or ECOFF target. Furthermore, the primary target or others specified with @samp{--enable-targets=@dots{}} at configuration time must include support for the other format, if both are to be available. For example, the Irix 5 @@ -829,7 +885,7 @@ fine-grained control over the assembler' more processors. @item -nocpp -@code{@value{AS}} ignores this option. It is accepted for compatibility with +@command{@value{AS}} ignores this option. It is accepted for compatibility with the native tools. @need 900 @@ -844,7 +900,7 @@ Control how to deal with multiplication break exception. @item -n -When this option is used, @code{@value{AS}} will issue a warning every +When this option is used, @command{@value{AS}} will issue a warning every time it generates a nop instruction from a macro. @end table @end ifset @@ -853,7 +909,7 @@ time it generates a nop instruction from The following options are available when @value{AS} is configured for an MCore processor. -@table @code +@table @gcctabopt @item -jsri2bsr @itemx -nojsri2bsr Enable or disable the JSRI to BSR transformation. By default this is enabled. @@ -880,6 +936,10 @@ Assemble for a little endian target. @end table @end ifset +@ifset MMIX +See the info pages for documentation of the MMIX-specific options. +@end ifset + @c man end @menu @@ -897,13 +957,13 @@ Assemble for a little endian target. @cindex manual, structure and purpose This manual is intended to describe what you need to know to use -@sc{gnu} @code{@value{AS}}. We cover the syntax expected in source files, including +@sc{gnu} @command{@value{AS}}. We cover the syntax expected in source files, including notation for symbols, constants, and expressions; the directives that -@code{@value{AS}} understands; and of course how to invoke @code{@value{AS}}. +@command{@value{AS}} understands; and of course how to invoke @command{@value{AS}}. @ifclear GENERIC We also cover special features in the @value{TARGET} -configuration of @code{@value{AS}}, including assembler directives. +configuration of @command{@value{AS}}, including assembler directives. @end ifclear @ifset GENERIC This manual also describes some of the machine-dependent features of @@ -949,10 +1009,10 @@ computer (in particular, the kinds of co once this assumption is granted examples and definitions need less qualification. -@code{@value{AS}} is part of a team of programs that turn a high-level +@command{@value{AS}} is part of a team of programs that turn a high-level human-readable series of instructions into a low-level computer-readable series of instructions. Different versions of -@code{@value{AS}} are used for different kinds of computer. +@command{@value{AS}} are used for different kinds of computer. @end ignore @c There used to be a section "Terminology" here, which defined @@ -969,9 +1029,9 @@ computer-readable series of instructions @c man begin DESCRIPTION -@sc{gnu} @code{as} is really a family of assemblers. +@sc{gnu} @command{as} is really a family of assemblers. @ifclear GENERIC -This manual describes @code{@value{AS}}, a member of that family which is +This manual describes @command{@value{AS}}, a member of that family which is configured for the @value{TARGET} architectures. @end ifclear If you use (or have used) the @sc{gnu} assembler on one architecture, you @@ -981,9 +1041,9 @@ including object file formats, most asse @dfn{pseudo-ops}) and assembler syntax.@refill @cindex purpose of @sc{gnu} assembler -@code{@value{AS}} is primarily intended to assemble the output of the +@command{@value{AS}} is primarily intended to assemble the output of the @sc{gnu} C compiler @code{@value{GCC}} for use by the linker -@code{@value{LD}}. Nevertheless, we've tried to make @code{@value{AS}} +@code{@value{LD}}. Nevertheless, we've tried to make @command{@value{AS}} assemble correctly everything that other assemblers for the same machine would assemble. @ifset VAX @@ -992,14 +1052,14 @@ Any exceptions are documented explicitly @ifset M680X0 @c This remark should appear in generic version of manual; assumption @c here is that generic version sets M680x0. -This doesn't mean @code{@value{AS}} always uses the same syntax as another +This doesn't mean @command{@value{AS}} always uses the same syntax as another assembler for the same architecture; for example, we know of several incompatible versions of 680x0 assembly language syntax. @end ifset @c man end -Unlike older assemblers, @code{@value{AS}} is designed to assemble a source +Unlike older assemblers, @command{@value{AS}} is designed to assemble a source program in one pass of the source file. This has a subtle impact on the @kbd{.org} directive (@pxref{Org,,@code{.org}}). @@ -1014,20 +1074,20 @@ are typically different in different fil Attributes,,Symbol Attributes}. @ifclear GENERIC @ifclear MULTI-OBJ -On the @value{TARGET}, @code{@value{AS}} is configured to produce +On the @value{TARGET}, @command{@value{AS}} is configured to produce @value{OBJ-NAME} format object files. @end ifclear @c The following should exhaust all configs that set MULTI-OBJ, ideally @ifset A29K -On the @value{TARGET}, @code{@value{AS}} can be configured to produce either +On the @value{TARGET}, @command{@value{AS}} can be configured to produce either @code{a.out} or COFF format object files. @end ifset @ifset I960 -On the @value{TARGET}, @code{@value{AS}} can be configured to produce either +On the @value{TARGET}, @command{@value{AS}} can be configured to produce either @code{b.out} or COFF format object files. @end ifset @ifset HPPA -On the @value{TARGET}, @code{@value{AS}} can be configured to produce either +On the @value{TARGET}, @command{@value{AS}} can be configured to produce either SOM or ELF format object files. @end ifset @end ifclear @@ -1037,7 +1097,7 @@ SOM or ELF format object files. @cindex command line conventions -After the program name @code{@value{AS}}, the command line may contain +After the program name @command{@value{AS}}, the command line may contain options and file names. Options may appear in any order, and may be before, after, or between file names. The order of file names is significant. @@ -1045,12 +1105,12 @@ significant. @cindex standard input, as input file @kindex -- @file{--} (two hyphens) by itself names the standard input file -explicitly, as one of the files for @code{@value{AS}} to assemble. +explicitly, as one of the files for @command{@value{AS}} to assemble. @cindex options, command line Except for @samp{--} any command line argument that begins with a hyphen (@samp{-}) is an option. Each option changes the behavior of -@code{@value{AS}}. No option changes the way another option works. An +@command{@value{AS}}. No option changes the way another option works. An option is a @samp{-} followed by one or more letters; the case of the letter is important. All options are optional. @@ -1071,7 +1131,7 @@ standard). These two command lines are @cindex source program @cindex files, input We use the phrase @dfn{source program}, abbreviated @dfn{source}, to -describe the program input to one run of @code{@value{AS}}. The program may +describe the program input to one run of @command{@value{AS}}. The program may be in one or more files; how the source is partitioned into files doesn't change the meaning of the source. @@ -1081,24 +1141,24 @@ The source program is a concatenation of order specified. @c man begin DESCRIPTION -Each time you run @code{@value{AS}} it assembles exactly one source +Each time you run @command{@value{AS}} it assembles exactly one source program. The source program is made up of one or more files. (The standard input is also a file.) -You give @code{@value{AS}} a command line that has zero or more input file +You give @command{@value{AS}} a command line that has zero or more input file names. The input files are read (from left file name to right). A command line argument (in any position) that has no special meaning is taken to be an input file name. -If you give @code{@value{AS}} no file names it attempts to read one input file -from the @code{@value{AS}} standard input, which is normally your terminal. You -may have to type @key{ctl-D} to tell @code{@value{AS}} there is no more program +If you give @command{@value{AS}} no file names it attempts to read one input file +from the @command{@value{AS}} standard input, which is normally your terminal. You +may have to type @key{ctl-D} to tell @command{@value{AS}} there is no more program to assemble. Use @samp{--} if you need to explicitly name the standard input file in your command line. -If the source is empty, @code{@value{AS}} produces a small, empty object +If the source is empty, @command{@value{AS}} produces a small, empty object file. @c man end @@ -1113,12 +1173,12 @@ number in a physical file; the other ref ``logical'' file. @xref{Errors, ,Error and Warning Messages}. @dfn{Physical files} are those files named in the command line given -to @code{@value{AS}}. +to @command{@value{AS}}. @dfn{Logical files} are simply names declared explicitly by assembler directives; they bear no relation to physical files. Logical file names help -error messages reflect the original source file, when @code{@value{AS}} source -is itself synthesized from other files. @code{@value{AS}} understands the +error messages reflect the original source file, when @command{@value{AS}} source +is itself synthesized from other files. @command{@value{AS}} understands the @samp{#} directives emitted by the @code{@value{GCC}} preprocessor. See also @ref{File,,@code{.file}}. @@ -1129,7 +1189,7 @@ is itself synthesized from other files. @cindex output file @kindex a.out @kindex .o -Every time you run @code{@value{AS}} it produces an output file, which is +Every time you run @command{@value{AS}} it produces an output file, which is your assembly language program translated into numbers. This file is the object file. Its default name is @ifclear BOUT @@ -1139,9 +1199,9 @@ is the object file. Its default name is @ifset GENERIC @code{a.out}, or @end ifset -@code{b.out} when @code{@value{AS}} is configured for the Intel 80960. +@code{b.out} when @command{@value{AS}} is configured for the Intel 80960. @end ifset -You can give it another name by using the @code{-o} option. Conventionally, +You can give it another name by using the @option{-o} option. Conventionally, object file names end with @file{.o}. The default name is used for historical reasons: older assemblers were capable of assembling self-contained programs directly into a runnable program. (For some formats, this isn't currently @@ -1165,10 +1225,10 @@ information for the debugger. @cindex error messages @cindex warning messages @cindex messages from assembler -@code{@value{AS}} may write warnings and error messages to the standard error +@command{@value{AS}} may write warnings and error messages to the standard error file (usually your terminal). This should not happen when a compiler -runs @code{@value{AS}} automatically. Warnings report an assumption made so -that @code{@value{AS}} could keep assembling a flawed program; errors report a +runs @command{@value{AS}} automatically. Warnings report an assumption made so +that @command{@value{AS}} could keep assembling a flawed program; errors report a grave problem that stops the assembly. @c man end @@ -1225,7 +1285,7 @@ to particular machine architectures. @c man begin DESCRIPTION -If you are invoking @code{@value{AS}} via the @sc{gnu} C compiler (version 2), +If you are invoking @command{@value{AS}} via the @sc{gnu} C compiler (version 2), you can use the @samp{-Wa} option to pass arguments through to the assembler. The assembler arguments must be separated from each other (and the @samp{-Wa}) by commas. For example: @@ -1273,7 +1333,7 @@ assembler.) @end menu @node a -@section Enable Listings: @code{-a[cdhlns]} +@section Enable Listings: @option{-a[cdhlns]} @kindex -a @kindex -ac @@ -1322,19 +1382,19 @@ stdin only after they have been preproce memory usage and makes the code more efficient. @node D -@section @code{-D} +@section @option{-D} @kindex -D This option has no effect whatsoever, but it is accepted to make it more likely that scripts written for other assemblers also work with -@code{@value{AS}}. +@command{@value{AS}}. @node f -@section Work Faster: @code{-f} +@section Work Faster: @option{-f} @kindex -f @cindex trusted compiler -@cindex faster processing (@code{-f}) +@cindex faster processing (@option{-f}) @samp{-f} should only be used when assembling programs written by a (trusted) compiler. @samp{-f} stops the assembler from doing whitespace and comment preprocessing on @@ -1343,27 +1403,27 @@ the input file(s) before assembling them @quotation @emph{Warning:} if you use @samp{-f} when the files actually need to be -preprocessed (if they contain comments, for example), @code{@value{AS}} does +preprocessed (if they contain comments, for example), @command{@value{AS}} does not work correctly. @end quotation @node I -@section @code{.include} search path: @code{-I} @var{path} +@section @code{.include} search path: @option{-I} @var{path} @kindex -I @var{path} @cindex paths for @code{.include} @cindex search path for @code{.include} @cindex @code{include} directive search path Use this option to add a @var{path} to the list of directories -@code{@value{AS}} searches for files specified in @code{.include} -directives (@pxref{Include,,@code{.include}}). You may use @code{-I} as +@command{@value{AS}} searches for files specified in @code{.include} +directives (@pxref{Include,,@code{.include}}). You may use @option{-I} as many times as necessary to include a variety of paths. The current -working directory is always searched first; after that, @code{@value{AS}} +working directory is always searched first; after that, @command{@value{AS}} searches any @samp{-I} directories in the same order as they were specified (left to right) on the command line. @node K -@section Difference Tables: @code{-K} +@section Difference Tables: @option{-K} @kindex -K @ifclear DIFF-TBL-KLUGE @@ -1378,14 +1438,14 @@ alteration on other platforms. @ifset DIFF-TBL-KLUGE @cindex difference tables, warning @cindex warning for altered difference tables -@code{@value{AS}} sometimes alters the code emitted for directives of the form +@command{@value{AS}} sometimes alters the code emitted for directives of the form @samp{.word @var{sym1}-@var{sym2}}; @pxref{Word,,@code{.word}}. You can use the @samp{-K} option if you want a warning issued when this is done. @end ifset @node L -@section Include Local Labels: @code{-L} +@section Include Local Labels: @option{-L} @kindex -L @cindex local labels, retaining in output @@ -1393,10 +1453,10 @@ Labels beginning with @samp{L} (upper ca labels}. @xref{Symbol Names}. Normally you do not see such labels when debugging, because they are intended for the use of programs (like compilers) that compose assembler programs, not for your notice. -Normally both @code{@value{AS}} and @code{@value{LD}} discard such labels, so you do not +Normally both @command{@value{AS}} and @code{@value{LD}} discard such labels, so you do not normally debug with them. -This option tells @code{@value{AS}} to retain those @samp{L@dots{}} symbols +This option tells @command{@value{AS}} to retain those @samp{L@dots{}} symbols in the object file. Usually if you do this you also tell the linker @code{@value{LD}} to preserve symbols whose names begin with @samp{L}. @@ -1407,7 +1467,7 @@ On the HPPA local labels begin with @sam @end ifset @node listing -@section Configuring listing output: @code{--listing} +@section Configuring listing output: @option{--listing} The listing feature of the assembler can be enabled via the command line switch @samp{-a} (@pxref{a}). This feature combines the input source file(s) with a @@ -1416,7 +1476,7 @@ them as a listing file. The format of t ops inside the assembler source (@pxref{List} @pxref{Title} @pxref{Sbttl} @pxref{Psize} @pxref{Eject}) and also by the following switches: -@table @code +@table @gcctabopt @item --listing-lhs-width=@samp{number} @kindex --listing-lhs-width @cindex Width of first line disassembly output @@ -1446,18 +1506,18 @@ displayed for a given single line of sou @end table @node M -@section Assemble in MRI Compatibility Mode: @code{-M} +@section Assemble in MRI Compatibility Mode: @option{-M} @kindex -M @cindex MRI compatibility mode -The @code{-M} or @code{--mri} option selects MRI compatibility mode. This -changes the syntax and pseudo-op handling of @code{@value{AS}} to make it +The @option{-M} or @option{--mri} option selects MRI compatibility mode. This +changes the syntax and pseudo-op handling of @command{@value{AS}} to make it compatible with the @code{ASM68K} or the @code{ASM960} (depending upon the configured target) assembler from Microtec Research. The exact nature of the MRI syntax will not be documented here; see the MRI manuals for more information. Note in particular that the handling of macros and macro arguments is somewhat different. The purpose of this option is to permit -assembling existing MRI assembler code using @code{@value{AS}}. +assembling existing MRI assembler code using @command{@value{AS}}. The MRI compatibility is not complete. Certain operations of the MRI assembler depend upon its object file format, and can not be supported using other object @@ -1468,7 +1528,7 @@ individually. These are: @item global symbols in common section The m68k MRI assembler supports common sections which are merged by the linker. -Other object file formats do not support this. @code{@value{AS}} handles +Other object file formats do not support this. @command{@value{AS}} handles common sections by treating them as a single common symbol. It permits local symbols to be defined within a common section, but it can not support global symbols, since it has no way to describe them. @@ -1483,7 +1543,7 @@ are not support by other object file for The MRI @code{END} pseudo-op permits the specification of a start address. This is not supported by other object file formats. The start address may -instead be specified using the @code{-e} option to the linker, or in a linker +instead be specified using the @option{-e} option to the linker, or in a linker script. @item @code{IDNT}, @code{.ident} and @code{NAME} pseudo-ops @@ -1494,14 +1554,14 @@ name to the output file. This is not su @item @code{ORG} pseudo-op The m68k MRI @code{ORG} pseudo-op begins an absolute section at a given -address. This differs from the usual @code{@value{AS}} @code{.org} pseudo-op, +address. This differs from the usual @command{@value{AS}} @code{.org} pseudo-op, which changes the location within the current section. Absolute sections are not supported by other object file formats. The address of a section may be assigned within a linker script. @end itemize There are some other features of the MRI assembler which are not supported by -@code{@value{AS}}, typically either because they are difficult or because they +@command{@value{AS}}, typically either because they are difficult or because they seem of little consequence. Some of these may be supported in future releases. @itemize @bullet @@ -1526,7 +1586,7 @@ The m68k @code{NOOBJ} pseudo-op is not s @item @code{OPT} branch control options The m68k @code{OPT} branch control options---@code{B}, @code{BRS}, @code{BRB}, -@code{BRL}, and @code{BRW}---are ignored. @code{@value{AS}} automatically +@code{BRL}, and @code{BRW}---are ignored. @command{@value{AS}} automatically relaxes all branches, whether forward or backward, to an appropriate size, so these options serve no purpose. @@ -1577,13 +1637,13 @@ The i960 @code{.setreal} pseudo-op is no @end itemize @node MD -@section Dependency tracking: @code{--MD} +@section Dependency tracking: @option{--MD} @kindex --MD @cindex dependency tracking @cindex make rules -@code{@value{AS}} can generate a dependency file for the file it creates. This +@command{@value{AS}} can generate a dependency file for the file it creates. This file consists of a single rule suitable for @code{make} describing the dependencies of the main source file. @@ -1592,12 +1652,12 @@ The rule is written to the file named in This feature is used in the automatic updating of makefiles. @node o -@section Name the Object File: @code{-o} +@section Name the Object File: @option{-o} @kindex -o @cindex naming object file @cindex object file name -There is always one object file output when you run @code{@value{AS}}. By +There is always one object file output when you run @command{@value{AS}}. By default it has the name @ifset GENERIC @ifset I960 @@ -1618,65 +1678,65 @@ default it has the name You use this option (which takes exactly one filename) to give the object file a different name. -Whatever the object file is called, @code{@value{AS}} overwrites any +Whatever the object file is called, @command{@value{AS}} overwrites any existing file of the same name. @node R -@section Join Data and Text Sections: @code{-R} +@section Join Data and Text Sections: @option{-R} @kindex -R @cindex data and text sections, joining @cindex text and data sections, joining @cindex joining text and data sections @cindex merging text and data sections -@code{-R} tells @code{@value{AS}} to write the object file as if all +@option{-R} tells @command{@value{AS}} to write the object file as if all data-section data lives in the text section. This is only done at the very last moment: your binary data are the same, but data section parts are relocated differently. The data section part of your object file is zero bytes long because all its bytes are appended to the text section. (@xref{Sections,,Sections and Relocation}.) -When you specify @code{-R} it would be possible to generate shorter +When you specify @option{-R} it would be possible to generate shorter address displacements (because we do not have to cross between text and data section). We refrain from doing this simply for compatibility with -older versions of @code{@value{AS}}. In future, @code{-R} may work this way. +older versions of @command{@value{AS}}. In future, @option{-R} may work this way. @ifset COFF -When @code{@value{AS}} is configured for COFF output, +When @command{@value{AS}} is configured for COFF output, this option is only useful if you use sections named @samp{.text} and @samp{.data}. @end ifset @ifset HPPA -@code{-R} is not supported for any of the HPPA targets. Using -@code{-R} generates a warning from @code{@value{AS}}. +@option{-R} is not supported for any of the HPPA targets. Using +@option{-R} generates a warning from @command{@value{AS}}. @end ifset @node statistics -@section Display Assembly Statistics: @code{--statistics} +@section Display Assembly Statistics: @option{--statistics} @kindex --statistics @cindex statistics, about assembly @cindex time, total for assembly @cindex space used, maximum for assembly Use @samp{--statistics} to display two statistics about the resources used by -@code{@value{AS}}: the maximum amount of space allocated during the assembly +@command{@value{AS}}: the maximum amount of space allocated during the assembly (in bytes), and the total execution time taken for the assembly (in @sc{cpu} seconds). @node traditional-format -@section Compatible output: @code{--traditional-format} +@section Compatible output: @option{--traditional-format} @kindex --traditional-format -For some targets, the output of @code{@value{AS}} is different in some ways +For some targets, the output of @command{@value{AS}} is different in some ways from the output of some existing assembler. This switch requests -@code{@value{AS}} to use the traditional format instead. +@command{@value{AS}} to use the traditional format instead. For example, it disables the exception frame optimizations which -@code{@value{AS}} normally does by default on @code{@value{GCC}} output. +@command{@value{AS}} normally does by default on @code{@value{GCC}} output. @node v -@section Announce Version: @code{-v} +@section Announce Version: @option{-v} @kindex -v @kindex -version @@ -1687,41 +1747,41 @@ option @samp{-v} (which you can also spe command line. @node W -@section Control Warnings: @code{-W}, @code{--warn}, @code{--no-warn}, @code{--fatal-warnings} +@section Control Warnings: @option{-W}, @option{--warn}, @option{--no-warn}, @option{--fatal-warnings} -@code{@value{AS}} should never give a warning or error message when +@command{@value{AS}} should never give a warning or error message when assembling compiler output. But programs written by people often -cause @code{@value{AS}} to give a warning that a particular assumption was +cause @command{@value{AS}} to give a warning that a particular assumption was made. All such warnings are directed to the standard error file. @kindex @samp{-W} @kindex @samp{--no-warn} @cindex suppressing warnings @cindex warnings, suppressing -If you use the @code{-W} and @code{--no-warn} options, no warnings are issued. +If you use the @option{-W} and @option{--no-warn} options, no warnings are issued. This only affects the warning messages: it does not change any particular of -how @code{@value{AS}} assembles your file. Errors, which stop the assembly, +how @command{@value{AS}} assembles your file. Errors, which stop the assembly, are still reported. @kindex @samp{--fatal-warnings} @cindex errors, caused by warnings @cindex warnings, causing error -If you use the @code{--fatal-warnings} option, @code{@value{AS}} considers +If you use the @option{--fatal-warnings} option, @command{@value{AS}} considers files that generate warnings to be in error. @kindex @samp{--warn} @cindex warnings, switching on -You can switch these options off again by specifying @code{--warn}, which +You can switch these options off again by specifying @option{--warn}, which causes warnings to be output as usual. @node Z -@section Generate Object File in Spite of Errors: @code{-Z} +@section Generate Object File in Spite of Errors: @option{-Z} @cindex object file, after errors @cindex errors, continuing after -After an error message, @code{@value{AS}} normally produces no output. If for +After an error message, @command{@value{AS}} normally produces no output. If for some reason you are interested in object file output even after -@code{@value{AS}} gives an error message on your program, use the @samp{-Z} -option. If there are any errors, @code{@value{AS}} continues anyways, and +@command{@value{AS}} gives an error message on your program, use the @samp{-Z} +option. If there are any errors, @command{@value{AS}} continues anyways, and writes an object file after a final warning message of the form @samp{@var{n} errors, @var{m} warnings, generating bad object file.} @@ -1731,13 +1791,13 @@ errors, @var{m} warnings, generating bad @cindex machine-independent syntax @cindex syntax, machine-independent This chapter describes the machine-independent syntax allowed in a -source file. @code{@value{AS}} syntax is similar to what many other +source file. @command{@value{AS}} syntax is similar to what many other assemblers use; it is inspired by the BSD 4.2 @ifclear VAX assembler. @end ifclear @ifset VAX -assembler, except that @code{@value{AS}} does not assemble Vax bit-fields. +assembler, except that @command{@value{AS}} does not assemble Vax bit-fields. @end ifset @menu @@ -1753,7 +1813,7 @@ assembler, except that @code{@value{AS}} @section Preprocessing @cindex preprocessing -The @code{@value{AS}} internal preprocessor: +The @command{@value{AS}} internal preprocessor: @itemize @bullet @cindex whitespace, removed by preprocessor @item @@ -1810,7 +1870,7 @@ as exactly one space. @section Comments @cindex comments -There are two ways of rendering comments to @code{@value{AS}}. In both +There are two ways of rendering comments to @command{@value{AS}}. In both cases the comment is equivalent to one space. Anything from @samp{/*} through the next @samp{*/} is a comment. @@ -1922,7 +1982,7 @@ the line is ignored. (Just like a comme # This is logical line # 36. @end smallexample This feature is deprecated, and may disappear from future versions -of @code{@value{AS}}. +of @command{@value{AS}}. @node Symbol Intro @section Symbols @@ -2020,7 +2080,7 @@ directive: typically valid for any compu a letter the statement is an assembly language @dfn{instruction}: it assembles into a machine language instruction. @ifset GENERIC -Different versions of @code{@value{AS}} for different computers +Different versions of @command{@value{AS}} for different computers recognize different instructions. In fact, the same symbol may represent a different instruction in a different computer's assembly language.@refill @@ -2091,8 +2151,8 @@ double-quotes or null characters. The w into a string is to @dfn{escape} these characters: precede them with a backslash @samp{\} character. For example @samp{\\} represents one backslash: the first @code{\} is an escape which tells -@code{@value{AS}} to interpret the second character literally as a backslash -(which prevents @code{@value{AS}} from recognizing the second @code{\} as an +@command{@value{AS}} to interpret the second character literally as a backslash +(which prevents @command{@value{AS}} from recognizing the second @code{\} as an escape character). The complete list of escapes follows. @cindex escape codes, character @@ -2175,8 +2235,8 @@ this character, because an unescaped @sa Any other character when escaped by @kbd{\} gives a warning, but assembles as if the @samp{\} was not present. The idea is that if you used an escape sequence you clearly didn't want the literal -interpretation of the following character. However @code{@value{AS}} has no -other interpretation, so @code{@value{AS}} knows it is giving you the wrong +interpretation of the following character. However @command{@value{AS}} has no +other interpretation, so @command{@value{AS}} knows it is giving you the wrong code and warns you of the fact. @end table @@ -2216,7 +2276,7 @@ H8/500) immediately following an acute accent is taken as a literal character and does not count as the end of a statement. The value of a character constant in a numeric expression is the machine's byte-wide code for -that character. @code{@value{AS}} assumes your character code is ASCII: +that character. @command{@value{AS}} assumes your character code is ASCII: @kbd{'A} means 65, @kbd{'B} means 66, and so on. @refill @node Numbers @@ -2224,7 +2284,7 @@ that character. @code{@value{AS}} assum @cindex constants, number @cindex number constants -@code{@value{AS}} distinguishes three kinds of numbers according to how they +@command{@value{AS}} distinguishes three kinds of numbers according to how they are stored in the target machine. @emph{Integers} are numbers that would fit into an @code{int} in the C language. @emph{Bignums} are integers, but they are stored in more than 32 bits. @emph{Flonums} @@ -2289,10 +2349,10 @@ integers are permitted while bignums are @cindex precision, floating point A @dfn{flonum} represents a floating point number. The translation is indirect: a decimal floating point number from the text is converted by -@code{@value{AS}} to a generic binary floating point number of more than +@command{@value{AS}} to a generic binary floating point number of more than sufficient precision. This generic floating point number is converted to a particular computer's floating point format (or formats) by a -portion of @code{@value{AS}} specialized to that computer. +portion of @command{@value{AS}} specialized to that computer. A flonum is written by writing (in order) @itemize @bullet @@ -2303,7 +2363,7 @@ The digit @samp{0}. @end ifset @item -A letter, to tell @code{@value{AS}} the rest of the number is a flonum. +A letter, to tell @command{@value{AS}} the rest of the number is a flonum. @ifset GENERIC @kbd{e} is recommended. Case is not important. @ignore @@ -2372,9 +2432,9 @@ One or more decimal digits. At least one of the integer part or the fractional part must be present. The floating point number has the usual base-10 value. -@code{@value{AS}} does all processing using integers. Flonums are computed +@command{@value{AS}} does all processing using integers. Flonums are computed independently of any floating point hardware in the computer running -@code{@value{AS}}. +@command{@value{AS}}. @ifclear GENERIC @ifset I960 @@ -2392,7 +2452,7 @@ specify two numbers separated by a colon @var{mask}:@var{value} @end example @noindent -@code{@value{AS}} applies a bitwise @sc{and} between @var{mask} and +@command{@value{AS}} applies a bitwise @sc{and} between @var{mask} and @var{value}. The resulting number is then packed @@ -2434,11 +2494,11 @@ For example there may be a ``read only'' @cindex linker, and assembler @cindex assembler, and linker The linker @code{@value{LD}} reads many object files (partial programs) and -combines their contents to form a runnable program. When @code{@value{AS}} +combines their contents to form a runnable program. When @command{@value{AS}} emits an object file, the partial program is assumed to start at address 0. @code{@value{LD}} assigns the final addresses for the partial program, so that different partial programs do not overlap. This is actually an -oversimplification, but it suffices to explain how @code{@value{AS}} uses +oversimplification, but it suffices to explain how @command{@value{AS}} uses sections. @code{@value{LD}} moves blocks of bytes of your program to their run-time @@ -2451,12 +2511,12 @@ the proper run-time addresses. @ifset H8 For the H8/300 and H8/500, and for the Hitachi SH, -@code{@value{AS}} pads sections if needed to +@command{@value{AS}} pads sections if needed to ensure they end on a word (sixteen bit) boundary. @end ifset @cindex standard assembler sections -An object file written by @code{@value{AS}} has at least three sections, any +An object file written by @command{@value{AS}} has at least three sections, any of which may be empty. These are named @dfn{text}, @dfn{data} and @dfn{bss} sections. @@ -2464,7 +2524,7 @@ of which may be empty. These are named @ifset GENERIC When it generates COFF output, @end ifset -@code{@value{AS}} can also generate whatever other named sections you specify +@command{@value{AS}} can also generate whatever other named sections you specify using the @samp{.section} directive (@pxref{Section,,@code{.section}}). If you do not use any directives that place output in the @samp{.text} or @samp{.data} sections, these sections still exist, but are empty. @@ -2472,16 +2532,16 @@ or @samp{.data} sections, these sections @ifset HPPA @ifset GENERIC -When @code{@value{AS}} generates SOM or ELF output for the HPPA, +When @command{@value{AS}} generates SOM or ELF output for the HPPA, @end ifset -@code{@value{AS}} can also generate whatever other named sections you +@command{@value{AS}} can also generate whatever other named sections you specify using the @samp{.space} and @samp{.subspace} directives. See @cite{HP9000 Series 800 Assembly Language Reference Manual} (HP 92432-90001) for details on the @samp{.space} and @samp{.subspace} assembler directives. @ifset SOM -Additionally, @code{@value{AS}} uses different names for the standard +Additionally, @command{@value{AS}} uses different names for the standard text, data, and bss sections when generating SOM output. Program text is placed into the @samp{$CODE$} section, data into @samp{$DATA$}, and BSS into @samp{$BSS$}. @@ -2498,7 +2558,7 @@ section starts at address @code{0}, the @end ifset To let @code{@value{LD}} know which data changes when the sections are -relocated, and how to change that data, @code{@value{AS}} also writes to the +relocated, and how to change that data, @command{@value{AS}} also writes to the object file details of the relocation needed. To perform relocation @code{@value{LD}} must know, each time an address in the object file is mentioned: @@ -2519,12 +2579,12 @@ Is the reference to an address ``Program @cindex addresses, format of @cindex section-relative addressing -In fact, every address @code{@value{AS}} ever uses is expressed as +In fact, every address @command{@value{AS}} ever uses is expressed as @display (@var{section}) + (@var{offset into section}) @end display @noindent -Further, most expressions @code{@value{AS}} computes have this section-relative +Further, most expressions @command{@value{AS}} computes have this section-relative nature. @ifset SOM (For some object formats, such as SOM for the HPPA, some expressions are @@ -2560,7 +2620,7 @@ the addresses of all partial programs' t data and bss sections. Some sections are manipulated by @code{@value{LD}}; others are invented for -use of @code{@value{AS}} and have no meaning except during assembly. +use of @command{@value{AS}} and have no meaning except during assembly. @node Ld Sections @section Linker Sections @@ -2579,7 +2639,7 @@ use of @code{@value{AS}} and have no mea @itemx text section @itemx data section @end ifset -These sections hold your program. @code{@value{AS}} and @code{@value{LD}} treat them as +These sections hold your program. @command{@value{AS}} and @code{@value{LD}} treat them as separate but equal sections. Anything you can say of one section is true another. @ifset aout-bout @@ -2672,11 +2732,11 @@ DDDD}\boxit{2cm}{\tt 00000}\ \dots\hfil} @cindex internal assembler sections @cindex sections in messages, internal -These sections are meant only for the internal use of @code{@value{AS}}. They +These sections are meant only for the internal use of @command{@value{AS}}. They have no meaning at run-time. You do not really need to know about these -sections for most purposes; but they can be mentioned in @code{@value{AS}} +sections for most purposes; but they can be mentioned in @command{@value{AS}} warning messages, so it might be helpful to have an idea of their -meanings to @code{@value{AS}}. These sections are used to permit the +meanings to @command{@value{AS}}. These sections are used to permit the value of every expression in your assembly language program to be a section-relative address. @@ -2722,7 +2782,7 @@ text or data @end ifset @end ifclear that you want to end up near to each other in the object file, even though they -are not contiguous in the assembler source. @code{@value{AS}} allows you to +are not contiguous in the assembler source. @command{@value{AS}} allows you to use @dfn{subsections} for this purpose. Within each section, there can be numbered subsections with values from 0 to 8192. Objects assembled into the same subsection go into the object file together with other objects in the same @@ -2738,7 +2798,7 @@ goes in subsection number zero. @ifset GENERIC Each subsection is zero-padded up to a multiple of four bytes. (Subsections may be padded a different amount on different flavors -of @code{@value{AS}}.) +of @command{@value{AS}}.) @end ifset @ifclear GENERIC @ifset H8 @@ -2800,7 +2860,7 @@ begins in @code{text 0}. For instance: Each section has a @dfn{location counter} incremented by one for every byte assembled into that section. Because subsections are merely a convenience -restricted to @code{@value{AS}} there is no concept of a subsection location +restricted to @command{@value{AS}} there is no concept of a subsection location counter. There is no way to directly manipulate a location counter---but the @code{.align} directive changes it, and any label definition captures its current value. The location counter of the section where statements are being @@ -2841,7 +2901,7 @@ to debug. @quotation @cindex debuggers, and symbol order -@emph{Warning:} @code{@value{AS}} does not place symbols in the object file in +@emph{Warning:} @command{@value{AS}} does not place symbols in the object file in the same order they were declared. This may break some debuggers. @end quotation @@ -2867,7 +2927,7 @@ definitions. @ifset HPPA On the HPPA, the usual form for a label need not be immediately followed by a colon, but instead must start in column zero. Only one label may be defined on -a single line. To work around this, the HPPA version of @code{@value{AS}} also +a single line. To work around this, the HPPA version of @command{@value{AS}} also provides a special directive @code{.label} for defining labels more flexibly. @end ifset @@ -2965,10 +3025,10 @@ parts: @table @code @item L -All local labels begin with @samp{L}. Normally both @code{@value{AS}} and +All local labels begin with @samp{L}. Normally both @command{@value{AS}} and @code{@value{LD}} forget symbols that start with @samp{L}. These labels are used for symbols you are never intended to see. If you use the -@samp{-L} option then @code{@value{AS}} retains these symbols in the +@samp{-L} option then @command{@value{AS}} retains these symbols in the object file. If you also instruct @code{@value{LD}} to retain these symbols, you may use them in debugging. @@ -3017,7 +3077,7 @@ is named @samp{L6@kbd{C-A}5}. @cindex current address @cindex location counter The special symbol @samp{.} refers to the current address that -@code{@value{AS}} is assembling into. Thus, the expression @samp{melvin: +@command{@value{AS}} is assembling into. Thus, the expression @samp{melvin: .long .} defines @code{melvin} to contain its own address. Assigning a value to @code{.} is treated the same as a @code{.org} directive. Thus, the expression @samp{.=.+4} is the same as saying @@ -3042,7 +3102,7 @@ attributes. The detailed definitions are in @file{a.out.h}. @end ifset -If you use a symbol without defining it, @code{@value{AS}} assumes zero for +If you use a symbol without defining it, @command{@value{AS}} assumes zero for all these attributes, and probably won't warn you. This makes the symbol an externally defined symbol, which is generally what you would want. @@ -3114,7 +3174,7 @@ format depends on the object-code output @cindex @code{b.out} symbol attributes @cindex symbol attributes, @code{b.out} -These symbol attributes appear only when @code{@value{AS}} is configured for +These symbol attributes appear only when @command{@value{AS}} is configured for one of the Berkeley-descended object output formats---@code{a.out} or @code{b.out}. @@ -3148,13 +3208,13 @@ one of the Berkeley-descended object out This is an arbitrary 16-bit value. You may establish a symbol's descriptor value by using a @code{.desc} statement (@pxref{Desc,,@code{.desc}}). A descriptor value means nothing to -@code{@value{AS}}. +@command{@value{AS}}. @node Symbol Other @subsubsection Other @cindex other attribute, of @code{a.out} symbol -This is an arbitrary 8-bit value. It means nothing to @code{@value{AS}}. +This is an arbitrary 8-bit value. It means nothing to @command{@value{AS}}. @end ifset @ifset COFF @@ -3177,7 +3237,7 @@ respectively, with @code{.val} and @code @subsubsection Auxiliary Attributes @cindex auxiliary attributes, COFF symbols -The @code{@value{AS}} directives @code{.dim}, @code{.line}, @code{.scl}, +The @command{@value{AS}} directives @code{.dim}, @code{.line}, @code{.scl}, @code{.size}, and @code{.tag} can generate auxiliary symbol table information for COFF. @end ifset @@ -3208,10 +3268,10 @@ Whitespace may precede and/or follow an The result of an expression must be an absolute number, or else an offset into a particular section. If an expression is not absolute, and there is not -enough information when @code{@value{AS}} sees the expression to know its +enough information when @command{@value{AS}} sees the expression to know its section, a second pass over the source program might be necessary to interpret the expression---but the second pass is currently not implemented. -@code{@value{AS}} aborts with an error message in this situation. +@command{@value{AS}} aborts with an error message in this situation. @menu * Empty Exprs:: Empty Expressions @@ -3225,7 +3285,7 @@ the expression---but the second pass is @cindex expressions, empty An empty expression has no value: it is just whitespace or null. Wherever an absolute expression is required, you may omit the -expression, and @code{@value{AS}} assumes a value of (absolute) 0. This +expression, and @command{@value{AS}} assumes a value of (absolute) 0. This is compatible with other assemblers. @node Integer Exprs @@ -3265,7 +3325,7 @@ integer. Numbers are usually integers. A number can be a flonum or bignum. In this case, you are warned -that only the low order 32 bits are used, and @code{@value{AS}} pretends +that only the low order 32 bits are used, and @command{@value{AS}} pretends these 32 bits are an integer. You may write integer-manipulating instructions that act on exotic constants, compatible with other assemblers. @@ -3290,7 +3350,7 @@ whitespace. @subsection Prefix Operator @cindex prefix operators -@code{@value{AS}} has the following @dfn{prefix operators}. They each take +@command{@value{AS}} has the following @dfn{prefix operators}. They each take one argument, which must be absolute. @c the tex/end tex stuff surrounding this small table is meant to make @@ -3318,7 +3378,7 @@ one argument, which must be absolute. @cindex operators, permitted arguments @dfn{Infix operators} take two arguments, one on either side. Operators have precedence, but operations with equal precedence are performed left -to right. Apart from @code{+} or @code{-}, both arguments must be +to right. Apart from @code{+} or @option{-}, both arguments must be absolute, and the result is absolute. @enumerate @@ -3605,7 +3665,7 @@ Some machine configurations provide addi This directive stops the assembly immediately. It is for compatibility with other assemblers. The original idea was that the assembly language source would be piped into the assembler. If the sender -of the source quit, it could use this directive tells @code{@value{AS}} to +of the source quit, it could use this directive tells @command{@value{AS}} to quit also. One day @code{.abort} will not be supported. @ifset COFF @@ -3613,11 +3673,11 @@ quit also. One day @code{.abort} will n @section @code{.ABORT} @cindex @code{ABORT} directive -When producing COFF output, @code{@value{AS}} accepts this directive as a +When producing COFF output, @command{@value{AS}} accepts this directive as a synonym for @samp{.abort}. @ifset BOUT -When producing @code{b.out} output, @code{@value{AS}} accepts this directive, +When producing @code{b.out} output, @command{@value{AS}} accepts this directive, but ignores it. @end ifset @end ifset @@ -3749,7 +3809,7 @@ example, an alignment of 16 means that t address should be zero). The alignment must be an absolute expression, and it must be a power of two. If @code{@value{LD}} allocates uninitialized memory for the common symbol, it will use the alignment when placing the symbol. If -no alignment is specified, @code{@value{AS}} will set the alignment to the +no alignment is specified, @command{@value{AS}} will set the alignment to the largest power of two less than or equal to the size of the symbol, up to a maximum of 16. @end ifset @@ -3763,7 +3823,7 @@ The syntax for @code{.comm} differs slig @section @code{.data @var{subsection}} @cindex @code{data} directive -@code{.data} tells @code{@value{AS}} to assemble the following statements onto the +@code{.data} tells @command{@value{AS}} to assemble the following statements onto the end of the data subsection numbered @var{subsection} (which is an absolute expression). If @var{subsection} is omitted, it defaults to zero. @@ -3779,7 +3839,7 @@ Begin defining debugging information for definition extends until the @code{.endef} directive is encountered. @ifset BOUT -This directive is only observed when @code{@value{AS}} is configured for COFF +This directive is only observed when @command{@value{AS}} is configured for COFF format output; when producing @code{b.out}, @samp{.def} is recognized, but ignored. @end ifset @@ -3796,9 +3856,9 @@ This directive sets the descriptor of th to the low 16 bits of an absolute expression. @ifset COFF -The @samp{.desc} directive is not available when @code{@value{AS}} is +The @samp{.desc} directive is not available when @command{@value{AS}} is configured for COFF output; it is only for @code{a.out} or @code{b.out} -object format. For the sake of compatibility, @code{@value{AS}} accepts +object format. For the sake of compatibility, @command{@value{AS}} accepts it, but produces no output, when configured for COFF. @end ifset @end ifset @@ -3816,7 +3876,7 @@ information in the symbol table. It is @ifset BOUT @samp{.dim} is only meaningful when generating COFF format output; when -@code{@value{AS}} is generating @code{b.out}, it accepts this directive but +@command{@value{AS}} is generating @code{b.out}, it accepts this directive but ignores it. @end ifset @end ifset @@ -3830,7 +3890,7 @@ ignores it. assembles floating point numbers. @ifset GENERIC The exact kind of floating point numbers emitted depends on how -@code{@value{AS}} is configured. @xref{Machine Dependencies}. +@command{@value{AS}} is configured. @xref{Machine Dependencies}. @end ifset @ifclear GENERIC @ifset IEEEFLOAT @@ -3852,7 +3912,7 @@ Force a page break at this point, when g @section @code{.else} @cindex @code{else} directive -@code{.else} is part of the @code{@value{AS}} support for conditional +@code{.else} is part of the @command{@value{AS}} support for conditional assembly; @pxref{If,,@code{.if}}. It marks the beginning of a section of code to be assembled if the condition for the preceding @code{.if} was false. @@ -3861,7 +3921,7 @@ was false. @section @code{.elseif} @cindex @code{elseif} directive -@code{.elseif} is part of the @code{@value{AS}} support for conditional +@code{.elseif} is part of the @command{@value{AS}} support for conditional assembly; @pxref{If,,@code{.if}}. It is shorthand for beginning a new @code{.if} block that would otherwise fill the entire @code{.else} section. @@ -3869,7 +3929,7 @@ assembly; @pxref{If,,@code{.if}}. It is @section @code{.end} @cindex @code{end} directive -@code{.end} marks the end of the assembly file. @code{@value{AS}} does not +@code{.end} marks the end of the assembly file. @command{@value{AS}} does not process anything in the file past the @code{.end} directive. @ifset COFF @@ -3882,7 +3942,7 @@ This directive flags the end of a symbol @ifset BOUT @samp{.endef} is only meaningful when generating COFF format output; if -@code{@value{AS}} is configured to generate @code{b.out}, it accepts this +@command{@value{AS}} is configured to generate @code{b.out}, it accepts this directive but ignores it. @end ifset @end ifset @@ -3896,7 +3956,7 @@ directive but ignores it. @section @code{.endif} @cindex @code{endif} directive -@code{.endif} is part of the @code{@value{AS}} support for conditional assembly; +@code{.endif} is part of the @command{@value{AS}} support for conditional assembly; it marks the end of a block of code that is only assembled conditionally. @xref{If,,@code{.if}}. @@ -3931,8 +3991,8 @@ Except for the contents of the error mes @node Err @section @code{.err} @cindex @code{err} directive -If @code{@value{AS}} assembles a @code{.err} directive, it will print an error -message and, unless the @code{-Z} option was used, it will not generate an +If @command{@value{AS}} assembles a @code{.err} directive, it will print an error +message and, unless the @option{-Z} option was used, it will not generate an object file. This can be used to signal error an conditionally compiled code. @node Exitm @@ -3944,7 +4004,7 @@ Exit early from the current macro defini @cindex @code{extern} directive @code{.extern} is accepted in the source program---for compatibility -with other assemblers---but it is ignored. @code{@value{AS}} treats +with other assemblers---but it is ignored. @command{@value{AS}} treats all undefined symbols as external. @node Fail @@ -3952,8 +4012,8 @@ all undefined symbols as external. @cindex @code{fail} directive Generates an error or a warning. If the value of the @var{expression} is 500 -or more, @code{@value{AS}} will print a warning message. If the value is less -than 500, @code{@value{AS}} will print an error message. The message will +or more, @command{@value{AS}} will print a warning message. If the value is less +than 500, @command{@value{AS}} will print an error message. The message will include the value of @var{expression}. This can occasionally be useful inside complex nested macros or conditional assembly. @@ -3964,14 +4024,14 @@ complex nested macros or conditional ass @cindex @code{file} directive @cindex logical file name @cindex file name, logical -@code{.file} tells @code{@value{AS}} that we are about to start a new logical +@code{.file} tells @command{@value{AS}} that we are about to start a new logical file. @var{string} is the new file name. In general, the filename is recognized whether or not it is surrounded by quotes @samp{"}; but if you wish to specify an empty file name, you must give the quotes--@code{""}. This statement may go away in future: it is only recognized to be compatible with -old @code{@value{AS}} programs. +old @command{@value{AS}} programs. @ifset A29K -In some configurations of @code{@value{AS}}, @code{.file} has already been +In some configurations of @command{@value{AS}}, @code{.file} has already been removed to avoid conflicts with other assemblers. @xref{Machine Dependencies}. @end ifset @end ifclear @@ -3989,7 +4049,7 @@ more than 8, then it is deemed to have t other people's assemblers. The contents of each @var{repeat} bytes is taken from an 8-byte number. The highest order 4 bytes are zero. The lowest order 4 bytes are @var{value} rendered in the -byte-order of an integer on the computer @code{@value{AS}} is assembling for. +byte-order of an integer on the computer @command{@value{AS}} is assembling for. Each @var{size} bytes in a repetition is taken from the lowest order @var{size} bytes of this number. Again, this bizarre behavior is compatible with other people's assemblers. @@ -4008,7 +4068,7 @@ This directive assembles zero or more fl has the same effect as @code{.single}. @ifset GENERIC The exact kind of floating point numbers emitted depends on how -@code{@value{AS}} is configured. +@command{@value{AS}} is configured. @xref{Machine Dependencies}. @end ifset @ifclear GENERIC @@ -4094,7 +4154,7 @@ This directive is a synonym for both @sa @cindex @code{ident} directive This directive is used by some assemblers to place tags in object files. -@code{@value{AS}} simply accepts the directive for source-file +@command{@value{AS}} simply accepts the directive for source-file compatibility with such assemblers, but does not actually emit anything for it. @@ -4324,7 +4384,7 @@ The syntax for @code{.lcomm} differs sli @section @code{.lflags} @cindex @code{lflags} directive (ignored) -@code{@value{AS}} accepts this directive, for compatibility with other +@command{@value{AS}} accepts this directive, for compatibility with other assemblers, but ignores it. @ifclear no-line-dir @@ -4345,7 +4405,7 @@ Change the logical line number. @var{li expression. The next line has that logical line number. Therefore any other statements on the current line (after a statement separator character) are reported as on logical line number @var{line-number} @minus{} 1. One day -@code{@value{AS}} will no longer support this directive: it is recognized only +@command{@value{AS}} will no longer support this directive: it is recognized only for compatibility with existing assembler programs. @ifset GENERIC @@ -4358,7 +4418,7 @@ not available; use the synonym @code{.ln @ifclear no-line-dir Even though this is a directive associated with the @code{a.out} or -@code{b.out} object-code formats, @code{@value{AS}} still recognizes it +@code{b.out} object-code formats, @command{@value{AS}} still recognizes it when producing COFF output, and treats @samp{.line} as though it were the COFF @samp{.ln} @emph{if} it is found outside a @code{.def}/@code{.endef} pair. @@ -4413,14 +4473,14 @@ Warn if any of the duplicates do not hav @samp{.ln} is a synonym for @samp{.line}. @end ifclear @ifset no-line-dir -Tell @code{@value{AS}} to change the logical line number. @var{line-number} +Tell @command{@value{AS}} to change the logical line number. @var{line-number} must be an absolute expression. The next line has that logical line number, so any other statements on the current line (after a statement separator character @code{;}) are reported as on logical line number @var{line-number} @minus{} 1. @ifset BOUT -This directive is accepted, but ignored, when @code{@value{AS}} is +This directive is accepted, but ignored, when @command{@value{AS}} is configured for @code{b.out}; its effect is only associated with COFF output format. @end ifset @@ -4431,8 +4491,8 @@ output format. @cindex @code{mri} directive @cindex MRI mode, temporarily -If @var{val} is non-zero, this tells @code{@value{AS}} to enter MRI mode. If -@var{val} is zero, this tells @code{@value{AS}} to exit MRI mode. This change +If @var{val} is non-zero, this tells @command{@value{AS}} to enter MRI mode. If +@var{val} is zero, this tells @command{@value{AS}} to exit MRI mode. This change affects code assembled until the next @code{.mri} directive, or until the end of the file. @xref{M, MRI mode, MRI mode}. @@ -4553,7 +4613,7 @@ Exit early from the current macro defini @cindex number of macros executed @cindex macros, count executed @item \@@ -@code{@value{AS}} maintains a counter of how many macros it has +@command{@value{AS}} maintains a counter of how many macros it has executed in this pseudo-variable; you can copy that number to your output with @samp{\@@}, but @emph{only within a macro definition}. @@ -4608,7 +4668,7 @@ expression with the same section as the you can't use @code{.org} to cross sections: if @var{new-lc} has the wrong section, the @code{.org} directive is ignored. To be compatible with former assemblers, if the section of @var{new-lc} is absolute, -@code{@value{AS}} issues a warning, then pretends the section of @var{new-lc} +@command{@value{AS}} issues a warning, then pretends the section of @var{new-lc} is the same as the current subsection. @code{.org} may only increase the location counter, or leave it @@ -4618,7 +4678,7 @@ backwards. @c double negative used below "not undefined" because this is a specific @c reference to "undefined" (as SEG_UNKNOWN is called in this manual) @c section. doc@cygnus.com 18feb91 -Because @code{@value{AS}} tries to assemble programs in one pass, @var{new-lc} +Because @command{@value{AS}} tries to assemble programs in one pass, @var{new-lc} may not be undefined. If you really detest this restriction we eagerly await a chance to share your improved assembler. @@ -4708,7 +4768,7 @@ stack. @section @code{.print @var{string}} @cindex @code{print} directive -@code{@value{AS}} will print @var{string} on the standard output during +@command{@value{AS}} will print @var{string} on the standard output during assembly. You must put @var{string} in double quotes. @ifset ELF @@ -4741,7 +4801,7 @@ If you do not use @code{.psize}, listing of 60. You may omit the comma and @var{columns} specification; the default width is 200 columns. -@code{@value{AS}} generates formfeeds whenever the specified number of +@command{@value{AS}} generates formfeeds whenever the specified number of lines is exceeded (or whenever you explicitly request one, using @code{.eject}). @@ -4842,7 +4902,7 @@ symbolic debugging information. @ifset BOUT The @samp{.scl} directive is primarily associated with COFF output; when -configured to generate @code{b.out} output format, @code{@value{AS}} +configured to generate @code{b.out} output format, @command{@value{AS}} accepts this directive but ignores it. @end ifset @end ifset @@ -5022,7 +5082,7 @@ This directive assembles zero or more fl has the same effect as @code{.float}. @ifset GENERIC The exact kind of floating point numbers emitted depends on how -@code{@value{AS}} is configured. @xref{Machine Dependencies}. +@command{@value{AS}} is configured. @xref{Machine Dependencies}. @end ifset @ifclear GENERIC @ifset IEEEFLOAT @@ -5041,7 +5101,7 @@ information in the symbol table. It is @ifset BOUT @samp{.size} is only meaningful when generating COFF format output; when -@code{@value{AS}} is generating @code{b.out}, it accepts this directive but +@command{@value{AS}} is generating @code{b.out}, it accepts this directive but ignores it. @end ifset @@ -5116,7 +5176,7 @@ compatibility with other AMD 29K assembl @cindex @code{stab@var{x}} directives There are three directives that begin @samp{.stab}. All emit symbols (@pxref{Symbols}), for use by symbolic debuggers. -The symbols are not entered in the @code{@value{AS}} hash table: they +The symbols are not entered in the @command{@value{AS}} hash table: they cannot be referenced elsewhere in the source file. Up to five fields are required: @@ -5291,7 +5351,7 @@ definitions in the symbol table with ins @ifset BOUT @samp{.tag} is only used when generating COFF format output; when -@code{@value{AS}} is generating @code{b.out}, it accepts this directive but +@command{@value{AS}} is generating @code{b.out}, it accepts this directive but ignores it. @end ifset @end ifset @@ -5300,7 +5360,7 @@ ignores it. @section @code{.text @var{subsection}} @cindex @code{text} directive -Tells @code{@value{AS}} to assemble the following statements onto the end of +Tells @command{@value{AS}} to assemble the following statements onto the end of the text subsection numbered @var{subsection}, which is an absolute expression. If @var{subsection} is omitted, subsection number zero is used. @@ -5327,7 +5387,7 @@ records the integer @var{int} as the typ @ifset BOUT @samp{.type} is associated only with COFF format output; when -@code{@value{AS}} is configured for @code{b.out} output, it accepts this +@command{@value{AS}} is configured for @code{b.out} output, it accepts this directive but ignores it. @end ifset @@ -5378,7 +5438,7 @@ records the address @var{addr} as the va entry. @ifset BOUT -@samp{.val} is used only for COFF output; when @code{@value{AS}} is +@samp{.val} is used only for COFF output; when @command{@value{AS}} is configured for @code{b.out}, it accepts this directive but ignores it. @end ifset @end ifset @@ -5427,10 +5487,10 @@ This directive expects zero or more @var separated by commas. @ifclear GENERIC @ifset W32 -For each expression, @code{@value{AS}} emits a 32-bit number. +For each expression, @command{@value{AS}} emits a 32-bit number. @end ifset @ifset W16 -For each expression, @code{@value{AS}} emits a 16-bit number. +For each expression, @command{@value{AS}} emits a 16-bit number. @end ifset @end ifclear @ifset GENERIC @@ -5456,11 +5516,11 @@ interest to you does 32-bit addressing ( @end ifset In order to assemble compiler output into something that works, -@code{@value{AS}} occasionally does strange things to @samp{.word} directives. +@command{@value{AS}} occasionally does strange things to @samp{.word} directives. Directives of the form @samp{.word sym1-sym2} are often emitted by -compilers as part of jump tables. Therefore, when @code{@value{AS}} assembles a +compilers as part of jump tables. Therefore, when @command{@value{AS}} assembles a directive of the form @samp{.word sym1-sym2}, and the difference between -@code{sym1} and @code{sym2} does not fit in 16 bits, @code{@value{AS}} +@code{sym1} and @code{sym2} does not fit in 16 bits, @command{@value{AS}} creates a @dfn{secondary jump table}, immediately before the next label. This secondary jump table is preceded by a short-jump to the first byte after the secondary table. This short-jump prevents the flow @@ -5478,7 +5538,7 @@ minus the address of the long-jump to @c entries in the original jump table as necessary. @ifset INTERNALS -@emph{This feature may be disabled by compiling @code{@value{AS}} with the +@emph{This feature may be disabled by compiling @command{@value{AS}} with the @samp{-DWORKING_DOT_WORD} option.} This feature is likely to confuse assembly language programmers. @end ifset @@ -5503,11 +5563,11 @@ They are included for compatibility with @cindex machine dependencies The machine instruction sets are (almost by definition) different on -each machine where @code{@value{AS}} runs. Floating point representations -vary as well, and @code{@value{AS}} often supports a few additional +each machine where @command{@value{AS}} runs. Floating point representations +vary as well, and @command{@value{AS}} often supports a few additional directives or command-line options for compatibility with other assemblers on a particular platform. Finally, some versions of -@code{@value{AS}} support special pseudo-instructions for branch +@command{@value{AS}} support special pseudo-instructions for branch optimization. This chapter discusses most of these differences, though it does not @@ -5566,6 +5626,9 @@ subject, see the hardware manufacturer's @ifset MIPS * MIPS-Dependent:: MIPS Dependent Features @end ifset +@ifset MMIX +* MMIX-Dependent:: MMIX Dependent Features +@end ifset @ifset SH * SH-Dependent:: Hitachi SH Dependent Features @end ifset @@ -5625,7 +5688,7 @@ subject, see the hardware manufacturer's The machine instruction sets are different on each Hitachi chip family, and there are also some syntax differences among the families. This -chapter describes the specific @code{@value{AS}} features for each +chapter describes the specific @command{@value{AS}} features for each family. @menu @@ -5693,6 +5756,10 @@ family. @include c-mips.texi @end ifset +@ifset MMIX +@include c-mmix.texi +@end ifset + @ifset NS32K @include c-ns32k.texi @end ifset @@ -5743,12 +5810,12 @@ family. @cindex bugs in assembler @cindex reporting bugs in assembler -Your bug reports play an essential role in making @code{@value{AS}} reliable. +Your bug reports play an essential role in making @command{@value{AS}} reliable. Reporting a bug may help you by bringing a solution to your problem, or it may not. But in any case the principal function of a bug report is to help the -entire community by making the next version of @code{@value{AS}} work better. -Bug reports are your contribution to the maintenance of @code{@value{AS}}. +entire community by making the next version of @command{@value{AS}} work better. +Bug reports are your contribution to the maintenance of @command{@value{AS}}. In order for a bug report to serve its purpose, you must include the information that enables us to fix the bug. @@ -5770,21 +5837,21 @@ If you are not sure whether you have fou @cindex crash of assembler @item If the assembler gets a fatal signal, for any input whatever, that is a -@code{@value{AS}} bug. Reliable assemblers never crash. +@command{@value{AS}} bug. Reliable assemblers never crash. @cindex error on valid input @item -If @code{@value{AS}} produces an error message for valid input, that is a bug. +If @command{@value{AS}} produces an error message for valid input, that is a bug. @cindex invalid input @item -If @code{@value{AS}} does not produce an error message for invalid input, that +If @command{@value{AS}} does not produce an error message for invalid input, that is a bug. However, you should note that your idea of ``invalid input'' might be our idea of ``an extension'' or ``support for traditional practice''. @item If you are an experienced user of assemblers, your suggestions for improvement -of @code{@value{AS}} are welcome in any case. +of @command{@value{AS}} are welcome in any case. @end itemize @node Bug Reporting @@ -5793,14 +5860,14 @@ of @code{@value{AS}} are welcome in any @cindex assembler bugs, reporting A number of companies and individuals offer support for @sc{gnu} products. If -you obtained @code{@value{AS}} from a support organization, we recommend you +you obtained @command{@value{AS}} from a support organization, we recommend you contact that organization first. You can find contact information for many support companies and individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs distribution. -In any event, we also recommend that you send bug reports for @code{@value{AS}} +In any event, we also recommend that you send bug reports for @command{@value{AS}} to @samp{bug-binutils@@gnu.org}. The fundamental principle of reporting bugs usefully is this: @@ -5830,21 +5897,21 @@ To enable us to fix the bug, you should @itemize @bullet @item -The version of @code{@value{AS}}. @code{@value{AS}} announces it if you start +The version of @command{@value{AS}}. @command{@value{AS}} announces it if you start it with the @samp{--version} argument. Without this, we will not know whether there is any point in looking for -the bug in the current version of @code{@value{AS}}. +the bug in the current version of @command{@value{AS}}. @item -Any patches you may have applied to the @code{@value{AS}} source. +Any patches you may have applied to the @command{@value{AS}} source. @item The type of machine you are using, and the operating system name and version number. @item -What compiler (and its version) was used to compile @code{@value{AS}}---e.g. +What compiler (and its version) was used to compile @command{@value{AS}}---e.g. ``@code{gcc-2.7}''. @item @@ -5862,20 +5929,20 @@ high level language source. Most compil when run with the @samp{-S} option. If you are using @code{@value{GCC}}, use the options @samp{-v --save-temps}; this will save the assembler source in a file with an extension of @file{.s}, and also show you exactly how -@code{@value{AS}} is being run. +@command{@value{AS}} is being run. @item A description of what behavior you observe that you believe is incorrect. For example, ``It gets a fatal signal.'' -Of course, if the bug is that @code{@value{AS}} gets a fatal signal, then we +Of course, if the bug is that @command{@value{AS}} gets a fatal signal, then we will certainly notice it. But if the bug is incorrect output, we might not notice unless it is glaringly wrong. You might as well not give us a chance to make a mistake. Even if the problem you experience is a fatal signal, you should still say so explicitly. Suppose something strange is going on, such as, your copy of -@code{@value{AS}} is out of synch, or you have encountered a bug in the C +@command{@value{AS}} is out of synch, or you have encountered a bug in the C library on your system. (This has happened!) Your copy might crash and ours would not. If you told us to expect a crash, then when ours fails to crash, we would know that the bug was not happening for us. If you had not told us to @@ -5883,10 +5950,10 @@ expect a crash, then we would not be abl observations. @item -If you wish to suggest changes to the @code{@value{AS}} source, send us context +If you wish to suggest changes to the @command{@value{AS}} source, send us context diffs, as generated by @code{diff} with the @samp{-u}, @samp{-c}, or @samp{-p} option. Always send diffs from the old file to the new file. If you even -discuss something in the @code{@value{AS}} source, refer to it by context, not +discuss something in the @command{@value{AS}} source, refer to it by context, not by line number. The line numbers in our development sources will not match those in your @@ -5924,7 +5991,7 @@ the necessary information, such as the t a patch is all we need. We might see problems with your patch and decide to fix the problem another way, or we might not understand it at all. -Sometimes with a program as complicated as @code{@value{AS}} it is very hard to +Sometimes with a program as complicated as @command{@value{AS}} it is very hard to construct an example that will make the program follow a certain path through the code. If you do not send us the example, we will not be able to construct one, so we will not be able to verify that the bug is fixed. @@ -5943,7 +6010,7 @@ things without first using the debugger @node Acknowledgements @chapter Acknowledgements -If you have contributed to @code{@value{AS}} and your name isn't listed here, +If you have contributed to @command{@value{AS}} and your name isn't listed here, it is not meant as a slight. We just don't know about it. Send mail to the maintainer, and we'll correct the situation. Currently @c (January 1994), @@ -6004,7 +6071,7 @@ Ian Lance Taylor of Cygnus Support merge added support for MIPS ECOFF and ELF targets, wrote the initial RS/6000 and PowerPC assembler, and made a few other minor patches. -Steve Chamberlain made @code{@value{AS}} able to generate listings. +Steve Chamberlain made @command{@value{AS}} able to generate listings. Hewlett-Packard contributed support for the HP9000/300. diff -uprN binutils-2.11.92.0.10/gas/doc/c-mmix.texi binutils-2.11.92.0.12/gas/doc/c-mmix.texi --- binutils-2.11.92.0.10/gas/doc/c-mmix.texi Wed Dec 31 16:00:00 1969 +++ binutils-2.11.92.0.12/gas/doc/c-mmix.texi Wed Nov 21 15:35:32 2001 @@ -0,0 +1,559 @@ +@c Copyright 2001 Free Software Foundation, Inc. +@c This is part of the GAS manual. +@c For copying conditions, see the file as.texinfo. +@c MMIX description by Hans-Peter Nilsson, hp@bitrange.com +@ifset GENERIC +@page +@node MMIX-Dependent +@chapter MMIX Dependent Features +@end ifset +@ifclear GENERIC +@node Machine Dependencies +@chapter MMIX Dependent Features +@end ifclear + +@cindex MMIX support +@menu +* MMIX-Opts:: Command-line Options +* MMIX-Expand:: Instruction expansion +* MMIX-Syntax:: Syntax +* MMIX-mmixal:: Differences to @code{mmixal} syntax and semantics +@end menu + +@node MMIX-Opts +@section Command-line Options + +@cindex options, MMIX +@cindex MMIX options +The MMIX version of @code{@value{AS}} has some machine-dependent options. + +@cindex @samp{--fixed-special-register-names} command line option, MMIX +When @samp{--fixed-special-register-names} is specified, only the register +names specified in @ref{MMIX-Regs} are recognized in the instructions +@code{PUT} and @code{GET}. + +@cindex @samp{--globalize-symbols} command line option, MMIX +You can use the @samp{--globalize-symbols} to make all symbols global. +This option is useful when splitting up a @code{mmixal} program into +several files. + +@cindex @samp{--gnu-syntax} command line option, MMIX +The @samp{--gnu-syntax} turns off most syntax compatibility with +@code{mmixal}. Its usability is currently doubtful. + +@cindex @samp{--relax} command line option, MMIX +The @samp{--relax} option is not fully supported, but will eventually make +the object file prepared for linker relaxation. + +@cindex @samp{--no-predefined-syms} command line option, MMIX +If you want to avoid inadvertently calling a predefined symbol and would +rather get an error, for example when using @code{@value{AS}} with a +compiler or other machine-generated code, specify +@samp{--no-predefined-syms}. This turns off built-in predefined +definitions of all such symbols, including rounding-mode symbols, segment +symbols, @samp{BIT} symbols, and @code{TRAP} symbols used in @code{mmix} +``system calls''. It also turns off predefined special-register names, +except when used in @code{PUT} and @code{GET} instructions. + +@cindex @samp{--no-expand} command line option, MMIX +By default, some instructions are expanded to fit the size of the operand +or an external symbol (@pxref{MMIX-Expand}). By passing +@samp{--no-expand}, no such expansion will be done, instead causing errors +at link time if the operand does not fit. + +@cindex @samp{--no-merge-gregs} command line option, MMIX +The @code{mmixal} documentation (@pxref{mmixsite}) specifies that global +registers allocated with the @samp{GREG} directive (@pxref{MMIX-greg}) and +initialized to the same non-zero value, will refer to the same global +register. This isn't strictly enforcable in @code{@value{AS}} since the +final addresses aren't known until link-time, but it will do an effort +unless the @samp{--no-merge-gregs} option is specified. (Register merging +isn't yet implemented in @code{@value{LD}}.) + +@cindex @samp{-x} command line option, MMIX +@code{@value{AS}} will warn every time it expands an instruction to fit an +operand unless the option @samp{-x} is specified. It is believed that +this behaviour is more useful than just mimicking @code{mmixal}'s +behaviour, in which instructions are only expanded if the @samp{-x} option +is specified, and assembly fails otherwise, when an instruction needs to +be expanded. It needs to be kept in mind that @code{mmixal} is both an +assembler and linker, while @code{@value{AS}} will expand instructions +that at link stage can be contracted. (Though linker relaxation isn't yet +implemented in @code{@value{LD}}.) + +@node MMIX-Expand +@section Instruction expansion + +@cindex instruction expansion, MMIX +When @code{@value{AS}} encounters an instruction with an operand that is +either not known or does not fit the operand size of the instruction, +@code{@value{AS}} (and @code{@value{LD}}) will expand the instruction into +a sequence of instructions semantically equivalent to the operand fitting +the instruction. Expansion will take place for the following +instructions: + +@table @asis +@item @samp{GETA} +Expands to a sequence of four instructions: @code{SETL}, @code{INCML}, +@code{INCMH} and @code{INCH}. The operand must be a multiple of four. +@item Conditional branches +A branch instruction is turned into a branch with the complemented +condition and prediction bit over five instructions; four instructions +setting @code{$255} to the operand value, which like with @code{GETA} must +be a multiple of four, and a final @code{GO $255,$255,0}. +@item @samp{PUSHJ} +Similar to expansion for conditional branches; four instructions set +@code{$255} to the operand value, followed by a @code{PUSHGO $255,$255,0}. +@item @samp{JMP} +Similar to conditional branches and @code{PUSHJ}. The final instruction +is @code{GO $255,$255,0}. +@end table + +The linker @code{@value{LD}} is expected to shrink these expansions for +code assembled with @samp{--relax} (though not currently implemented). + +@node MMIX-Syntax +@section Syntax + +The assembly syntax is supposed to be upward compatible with that +described in Sections 1.3 and 1.4 of @samp{The Art of Computer +Programming, Volume 1}. Draft versions of those chapters as well as other +MMIX information is located at +@anchor{mmixsite}@url{http://www-cs-faculty.stanford.edu/~knuth/mmix-news.html}. +Most code examples from the mmixal package located there should work +unmodified when assembled and linked as single files, with a few +noteworthy exceptions (@pxref{MMIX-mmixal}). + +Before an instruction is emitted, the current location is aligned to the +next four-byte boundary. If a label is defined at the beginning of the +line, its value will be the aligned value. + +In addition to the traditional hex-prefix @samp{0x}, a hexadecimal number +can also be specified by the prefix character @samp{#}. + +After all operands to an MMIX instruction or directive have been +specified, the rest of the line is ignored, treated as a comment. + +@menu +* MMIX-Chars:: Special Characters +* MMIX-Symbols:: Symbols +* MMIX-Regs:: Register Names +* MMIX-Pseudos:: Assembler Directives +@end menu + +@node MMIX-Chars +@subsection Special Characters +@cindex line comment characters, MMIX +@cindex MMIX line comment characters + +The characters @samp{*} and @samp{#} are line comment characters; each +start a comment at the beginning of a line, but only at the beginning of a +line. A @samp{#} prefixes a hexadecimal number if found elsewhere on a +line. + +Two other characters, @samp{%} and @samp{!}, each start a comment anywhere +on the line. Thus you can't use the @samp{modulus} and @samp{not} +operators in expressions normally associated with these two characters. + +A @samp{;} is a line separator, treated as a new-line, so separate +instructions can be specified on a single line. + +@node MMIX-Symbols +@subsection Symbols +The character @samp{:} is permitted in identifiers. There are two +exceptions to it being treated as any other symbol character: if a symbol +begins with @samp{:}, it means that the symbol is in the global namespace +and that the current prefix should not be prepended to that symbol +(@pxref{MMIX-prefix}). The @samp{:} is then not considered part of the +symbol. For a symbol in the label position (first on a line), a @samp{:} +at the end of a symbol is silently stripped off. A label is permitted, +but not required, to be followed by a @samp{:}, as with many other +assembly formats. + +The character @samp{@@} in an expression, is a synonym for @samp{.}, the +current location. + +In addition to the common forward and backward local symbol formats +(@pxref{Symbol Names}), they can be specified with upper-case @samp{B} and +@samp{F}, as in @samp{8B} and @samp{9F}. A local label defined for the +current position is written with a @samp{H} appended to the number: +@smallexample +3H LDB $0,$1,2 +@end smallexample +This and traditional local-label formats cannot be mixed: a label must be +defined and referred to using the same format. + +There's a minor caveat: just as for the ordinary local symbols, the local +symbols are translated into ordinary symbols using control characters are +to hide the ordinal number of the symbol. Unfortunately, these symbols +are not translated back in error messages. Thus you may see confusing +error messages when local symbols are used. Control characters +@samp{\003} (control-C) and @samp{\004} (control-D) are used for the +MMIX-specific local-symbol syntax. + +The symbol @samp{Main} is handled specially; it is always global. + +By defining the symbols @samp{__.MMIX.start..text} and +@samp{__.MMIX.start..data}, the address of respectively the @samp{.text} +and @samp{.data} segments of the final program can be defined, though when +linking more than one object file, the code or data in the object file +containing the symbol is not guaranteed to be start at that position; just +the final executable. @xref{MMIX-loc}. + +@node MMIX-Regs +@subsection Register names +@cindex register names, MMIX +@cindex MMIX register names + +Local and global registers are specified as @samp{$0} to @samp{$255}. +The recognized special register names are @samp{rJ}, @samp{rA}, @samp{rB}, +@samp{rC}, @samp{rD}, @samp{rE}, @samp{rF}, @samp{rG}, @samp{rH}, +@samp{rI}, @samp{rK}, @samp{rL}, @samp{rM}, @samp{rN}, @samp{rO}, +@samp{rP}, @samp{rQ}, @samp{rR}, @samp{rS}, @samp{rT}, @samp{rU}, +@samp{rV}, @samp{rW}, @samp{rX}, @samp{rY}, @samp{rZ}, @samp{rBB}, +@samp{rTT}, @samp{rWW}, @samp{rXX}, @samp{rYY} and @samp{rZZ}. A leading +@samp{:} is optional for special register names. + +Local and global symbols can be equated to register names and used in +place of ordinary registers. + +Similarly for special registers, local and global symbols can be used. +Also, symbols equated from numbers and constant expressions are allowed in +place of a special register, except when either of the options +@code{--no-predefined-syms} and @code{--fixed-special-register-names} are +specified. Then only the special register names above are allowed for the +instructions having a special register operand; @code{GET} and @code{PUT}. + +@node MMIX-Pseudos +@subsection Assembler Directives +@cindex assembler directives, MMIX +@cindex pseudo-ops, MMIX +@cindex MMIX assembler directives +@cindex MMIX pseudo-ops + +@table @code +@item LOC +@cindex assembler directive LOC, MMIX +@cindex pseudo-op LOC, MMIX +@cindex MMIX assembler directive LOC +@cindex MMIX pseudo-op LOC + +@anchor{MMIX-loc} +The @code{LOC} directive sets the current location to the value of the +operand field, which may include changing sections. If the operand is a +constant, the section is set to either @code{.data} if the value is +@code{0x2000000000000000} or larger, else it is set to @code{.text}. +Within a section, the current location may only be changed to +monotonically higher addresses. A LOC expression must be a previously +defined symbol or a ``pure'' constant. + +An example, which sets the label @var{prev} to the current location, and +updates the current location to eight bytes forward: +@smallexample +prev LOC @@+8 +@end smallexample + +When a LOC has a constant as its operand, a symbol +@code{__.MMIX.start..text} or @code{__.MMIX.start..data} is defined +depending on the address as mentioned above. Each such symbol is +interpreted as special by the linker, locating the section at that +address. Note that if multiple files are linked, the first object file +with that section will be mapped to that address (not necessarily the file +with the LOC definition). + +@item LOCAL +@cindex assembler directive LOCAL, MMIX +@cindex pseudo-op LOCAL, MMIX +@cindex MMIX assembler directive LOCAL +@cindex MMIX pseudo-op LOCAL + +@anchor{MMIX-local} +Example: +@smallexample + LOCAL external_symbol + LOCAL 42 + .local asymbol +@end smallexample + +This directive-operation generates a link-time assertion that the operand +does not correspond to a global register. The operand is an expression +that at link-time resolves to a register symbol or a number. A number is +treated as the register having that number. There is one restriction on +the use of this directive: the pseudo-directive must be placed in a +section with contents, code or data. + +@item IS +@cindex assembler directive IS, MMIX +@cindex pseudo-op IS, MMIX +@cindex MMIX assembler directive IS +@cindex MMIX pseudo-op IS + +@anchor{MMIX-is} +The @code{IS} directive: +@smallexample +asymbol IS an_expression +@end smallexample +sets the symbol @samp{asymbol} to @samp{an_expression}. A symbol may not +be set more than once using this directive. Local labels may be set using +this directive, for example: +@smallexample +5H IS @@+4 +@end smallexample + +@item GREG +@cindex assembler directive GREG, MMIX +@cindex pseudo-op GREG, MMIX +@cindex MMIX assembler directive GREG +@cindex MMIX pseudo-op GREG + +@anchor{MMIX-greg} +This directive reserves a global register, gives it an initial value and +optionally gives it a symbolic name. Some examples: + +@smallexample +areg GREG +breg GREG data_value + GREG data_buffer + .greg creg, another_data_value +@end smallexample + +The symbolic register name can be used in place of a (non-special) +register. If a value isn't provided, it defaults to zero. Unless the +option @samp{--no-merge-gregs} is specified, non-zero registers allocated +with this directive may be eliminated by @code{@value{AS}}; another +register with the same value used in its place. +Any of the instructions +@samp{CSWAP}, +@samp{GO}, +@samp{LDA}, +@samp{LDBU}, +@samp{LDB}, +@samp{LDHT}, +@samp{LDOU}, +@samp{LDO}, +@samp{LDSF}, +@samp{LDTU}, +@samp{LDT}, +@samp{LDUNC}, +@samp{LDVTS}, +@samp{LDWU}, +@samp{LDW}, +@samp{PREGO}, +@samp{PRELD}, +@samp{PREST}, +@samp{PUSHGO}, +@samp{STBU}, +@samp{STB}, +@samp{STCO}, +@samp{STHT}, +@samp{STOU}, +@samp{STSF}, +@samp{STTU}, +@samp{STT}, +@samp{STUNC}, +@samp{SYNCD}, +@samp{SYNCID}, +can have a value nearby @anchor{GREG-base}an initial value in place of its +second and third operands. Here, ``nearby'' is defined as within the +range 0@dots{}255 from the initial value of such an allocated register. + +@smallexample +buffer1 BYTE 0,0,0,0,0 +buffer2 BYTE 0,0,0,0,0 + @dots{} + GREG buffer1 + LDOU $42,buffer2 +@end smallexample +In the example above, the @samp{Y} field of the @code{LDOUI} instruction +(LDOU with a constant Z) will be replaced with the global register +allocated for @samp{buffer1}, and the @samp{Z} field will have the value +5, the offset from @samp{buffer1} to @samp{buffer2}. The result is +equivalent to this code: +@smallexample +buffer1 BYTE 0,0,0,0,0 +buffer2 BYTE 0,0,0,0,0 + @dots{} +tmpreg GREG buffer1 + LDOU $42,tmpreg,(buffer2-buffer1) +@end smallexample + +Global registers allocated with this directive are allocated in order +higher-to-lower within a file. Other than that, the exact order of +register allocation and elimination is undefined. For example, the order +is undefined when more than one file with such directives are linked +together. + +@item BYTE +@cindex assembler directive BYTE, MMIX +@cindex pseudo-op BYTE, MMIX +@cindex MMIX assembler directive BYTE +@cindex MMIX pseudo-op BYTE + +@anchor{MMIX-byte} +The @samp{BYTE} directive takes a series of operands separated by a comma. +If an operand is a string (@pxref{Strings}), each character of that string +is emitted as a byte. Other operands must be constant expressions without +forward references, in the range 0@dots{}255. If you need operands having +expressions with forward references, use @samp{.byte} (@pxref{Byte}). An +operand can be omitted, defaulting to a zero value. + +@item WYDE +@itemx TETRA +@itemx OCTA +@cindex assembler directive WYDE, MMIX +@cindex pseudo-op WYDE, MMIX +@cindex MMIX assembler directive WYDE +@cindex MMIX pseudo-op WYDE +@cindex assembler directive TETRA, MMIX +@cindex pseudo-op TETRA, MMIX +@cindex MMIX assembler directive TETRA +@cindex MMIX pseudo-op TETRA +@cindex assembler directive OCTA, MMIX +@cindex pseudo-op OCTA, MMIX +@cindex MMIX assembler directive OCTA +@cindex MMIX pseudo-op OCTA + +@anchor{MMIX-constants} +The directives @samp{WYDE}, @samp{TETRA} and @samp{OCTA} emit constants of +two, four and eight bytes size respectively. Before anything else happens +for the directive, the current location is aligned to the respective +constant-size bondary. If a label is defined at the beginning of the +line, its value will be that after the alignment. A single operand can be +omitted, defaulting to a zero value emitted for the directive. Operands +can be expressed as strings (@pxref{Strings}), in which case each +character in the string is emitted as a separate constant of the size +indicated by the directive. + +@item PREFIX +@cindex assembler directive PREFIX, MMIX +@cindex pseudo-op PREFIX, MMIX +@cindex MMIX assembler directive PREFIX +@cindex MMIX pseudo-op PREFIX + +@anchor{MMIX-prefix} +The @samp{PREFIX} directive sets a symbol name prefix to be prepended to +all symbols (except local symbols, @pxref{MMIX-Symbols}), that are not +prefixed with @samp{:}, until the next @samp{PREFIX} directive. Such +prefixes accumulate. For example, +@smallexample + PREFIX a + PREFIX b +c IS 0 +@end smallexample +defines a symbol @samp{abc} with the value 0. + +@item BSPEC +@itemx ESPEC +@cindex assembler directive BSPEC, MMIX +@cindex pseudo-op BSPEC, MMIX +@cindex MMIX assembler directive BSPEC +@cindex MMIX pseudo-op BSPEC +@cindex assembler directive ESPEC, MMIX +@cindex pseudo-op ESPEC, MMIX +@cindex MMIX assembler directive ESPEC +@cindex MMIX pseudo-op ESPEC + +@anchor{MMIX-spec} +A pair of @samp{BSPEC} and @samp{ESPEC} directives delimit a section of +special contents (without specified semantics). Example: +@smallexample + BSPEC 42 + TETRA 1,2,3 + ESPEC +@end smallexample +The single operand to @samp{BSPEC} must be number in the range +0@dots{}255. The @samp{BSPEC} number 80 is used by the GNU binutils +implementation. +@end table + +@node MMIX-mmixal +@section Differences to @code{mmixal} +@cindex mmixal differences +@cindex differences, mmixal + +The binutils @code{@value{AS}} and @code{@value{LD}} combination has a few +differences in function compared to @code{mmixal} (@pxref{mmixsite}). + +The replacement of a symbol with a GREG-allocated register +(@pxref{GREG-base}) is not handled the exactly same way in +@code{@value{AS}} as in @code{mmixal}. This is apparent in the +@code{mmixal} example file @code{inout.mms}, where different registers +with different offsets, eventually yielding the same address, are used in +the first instruction. This type of difference should however not affect +the function of any program unless it has specific assumptions about the +allocated register number. + +Line numbers (in the @samp{mmo} object format) are currently not +supported. + +Expression operator precedence is not that of mmixal: operator precedence +is that of the C programming language. It's recommended to use +parentheses to explicitly specify wanted operator precedence whenever more +than one type of operators are used. + +The serialize unary operator @code{&}, the fractional division operator +@samp{//}, the logical not operator @code{!} and the modulus operator +@samp{%} are not available. + +Symbols are not global by default, unless the option +@samp{--globalize-symbols} is passed. Use the @samp{.global} directive to +globalize symbols (@pxref{Global}). + +Operand syntax is a bit stricter with @code{@value{AS}} than +@code{mmixal}. For example, you can't say @code{addu 1,2,3}, instead you +must write @code{addu $1,$2,3}. + +You can't LOC to a lower address than those already visited +(i.e. ``backwards''). + +A LOC directive must come before any emitted code. + +Predefined symbols are visible as file-local symbols after use. (In the +ELF file, that is---the linked mmo file has no notion of a file-local +symbol.) + +Some mapping of constant expressions to sections in LOC expressions is +attempted, but that functionality is easily confused and should be avoided +unless compatibility with @code{mmixal} is required. A LOC expression to +@samp{0x2000000000000000} or higher, maps to the @samp{.data} section and +lower addresses map to the @samp{.text} section (@pxref{MMIX-loc}). + +The code and data areas are each contiguous. Sparse programs with +far-away LOC directives will take up the same amount of space as a +contiguous program with zeros filled in the gaps between the LOC +directives. If you need sparse programs, you might try and get the wanted +effect with a linker script and splitting up the code parts into sections +(@pxref{Section}). Assembly code for this, to be compatible with +@code{mmixal}, would look something like: +@smallexample + .if 0 + LOC away_expression + .else + .section away,"ax" + .fi +@end smallexample +@code{@value{AS}} will not execute the LOC directive and @code{mmixal} +ignores the lines with @code{.}. This construct can be used generally to +help compatibility. + +Symbols can't be defined twice--not even to the same value. + +Instruction mnemonics are recognized case-insensitive, though the +@samp{IS} and @samp{GREG} pseudo-operations must be specified in +upper-case characters. + +There's no unicode support. + +The following is a list of programs in +@url{http://www-cs-faculty.stanford.edu/~knuth/mmix-news.html} dated +2001-08-25 (md5sum c393470cfc86fac040487d22d2bf0172) that assemble with +@code{mmixal} but do not assemble with @code{@value{AS}}: + +@table @code +@item silly.mms +LOC to a previous address. +@item sim.mms +Redefines symbol @samp{Done}. +@item test.mms +Uses the serial operator @samp{&}. +@end table diff -uprN binutils-2.11.92.0.10/gas/doc/c-sh.texi binutils-2.11.92.0.12/gas/doc/c-sh.texi --- binutils-2.11.92.0.10/gas/doc/c-sh.texi Fri Mar 9 11:17:15 2001 +++ binutils-2.11.92.0.12/gas/doc/c-sh.texi Fri Nov 16 14:05:52 2001 @@ -1,4 +1,4 @@ -@c Copyright 1991, 1992, 1993, 1994, 1995, 1997 +@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 2001 @c Free Software Foundation, Inc. @c This is part of the GAS manual. @c For copying conditions, see the file as.texinfo. @@ -18,11 +18,35 @@ @node SH Options @section Options -@cindex SH options (none) -@cindex options, SH (none) -@code{@value{AS}} has no additional command-line options for the Hitachi +@cindex SH options +@cindex options, SH +@code{@value{AS}} has following command-line options for the Hitachi SH family. +@table @code +@kindex -little +@kindex -big +@kindex -relax +@kindex -small +@kindex -dsp + +@item -little +Generate little endian code. + +@item -big +Generate big endian code. + +@item -relax +Alter jump instructions for long displacements. + +@item -small +Align sections to 4 byte boundaries, not 16. + +@item -dsp +Enable sh-dsp insns, and disable sh3e / sh4 insns. + +@end table + @node SH Syntax @section Syntax diff -uprN binutils-2.11.92.0.10/gas/doc/internals.texi binutils-2.11.92.0.12/gas/doc/internals.texi --- binutils-2.11.92.0.10/gas/doc/internals.texi Thu Aug 30 09:30:37 2001 +++ binutils-2.11.92.0.12/gas/doc/internals.texi Fri Nov 16 14:05:52 2001 @@ -512,7 +512,7 @@ A number which is added into the fixup. @item fx_addnumber Some CPU backends use this field to convey information between -@code{md_apply_fix} and @code{tc_gen_reloc}. The machine independent code does +@code{md_apply_fix3} and @code{tc_gen_reloc}. The machine independent code does not use it. @item fx_next @@ -1235,17 +1235,17 @@ information removed. Depending upon the @code{md_convert_frag} the frag information may or may not be necessary, as may the resolved values of the symbols. The default value is 1. -@item md_apply_fix -@cindex md_apply_fix +@item md_apply_fix3 +@cindex md_apply_fix3 GAS will call this for each fixup. It should store the correct value in the object file. @code{fixup_segment} performs a generic overflow check on the -@code{valueT *val} argument after @code{md_apply_fix} returns. If the overflow -check is relevant for the target machine, then @code{md_apply_fix} should +@code{valueT *val} argument after @code{md_apply_fix3} returns. If the overflow +check is relevant for the target machine, then @code{md_apply_fix3} should modify @code{valueT *val}, typically to the value stored in the object file. @item TC_HANDLES_FX_DONE @cindex TC_HANDLES_FX_DONE -If this macro is defined, it means that @code{md_apply_fix} correctly sets the +If this macro is defined, it means that @code{md_apply_fix3} correctly sets the @code{fx_done} field in the fixup. @item tc_gen_reloc diff -uprN binutils-2.11.92.0.10/gas/dwarf2dbg.c binutils-2.11.92.0.12/gas/dwarf2dbg.c --- binutils-2.11.92.0.10/gas/dwarf2dbg.c Mon Oct 1 15:25:22 2001 +++ binutils-2.11.92.0.12/gas/dwarf2dbg.c Fri Nov 16 14:05:52 2001 @@ -524,8 +524,9 @@ get_frag_fix (frag) for (fr = frchain_root; fr; fr = fr->frch_next) if (fr->frch_last == frag) { - return ((char *) obstack_next_free (&fr->frch_obstack) - - frag->fr_literal); + long align_mask = -1 << get_recorded_alignment (fr->frch_seg); + return (((char *) obstack_next_free (&fr->frch_obstack) + - frag->fr_literal) + ~align_mask) & align_mask; } abort (); diff -uprN binutils-2.11.92.0.10/gas/po/POTFILES.in binutils-2.11.92.0.12/gas/po/POTFILES.in --- binutils-2.11.92.0.10/gas/po/POTFILES.in Thu Oct 4 14:35:43 2001 +++ binutils-2.11.92.0.12/gas/po/POTFILES.in Fri Nov 16 14:05:52 2001 @@ -86,6 +86,8 @@ config/tc-mcore.c config/tc-mcore.h config/tc-mips.c config/tc-mips.h +config/tc-mmix.c +config/tc-mmix.h config/tc-mn10200.c config/tc-mn10200.h config/tc-mn10300.c diff -uprN binutils-2.11.92.0.10/gas/po/fr.po binutils-2.11.92.0.12/gas/po/fr.po --- binutils-2.11.92.0.10/gas/po/fr.po Wed Dec 31 16:00:00 1969 +++ binutils-2.11.92.0.12/gas/po/fr.po Fri Nov 16 14:05:52 2001 @@ -0,0 +1,9239 @@ +# Messages français pour GNU concernant gas. +# Copyright (C) 2001 Free Software Foundation, Inc. +# Michel Robitaille , since 1996. +# +msgid "" +msgstr "" +"Project-Id-Version: GNU gas 2.11\n" +"POT-Creation-Date: 2001-01-11 12:04-0800\n" +"PO-Revision-Date: 2001-10-02 08:00-0500\n" +"Last-Translator: Michel Robitaille \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: app.c:464 app.c:478 +msgid "end of file in comment" +msgstr "fin du fichier dans le commentaire" + +#: app.c:557 +msgid "end of file in string: inserted '\"'" +msgstr "fin du fichier dans la chaîne: inséré '\"'" + +#: app.c:623 +#, c-format +msgid "Unknown escape '\\%c' in string: Ignored" +msgstr "Caractère d'échappement inconnue '\\%c' dans la chaîne: ignoré" + +#: app.c:632 +msgid "End of file in string: '\"' inserted" +msgstr "Fin du fichier dans la chaîne: '\"' inséré" + +#: app.c:752 +msgid "end of file not at end of a line; newline inserted" +msgstr "fin du fichier n'est pas à la fin de la ligne; nouvelle ligne insérée" + +#: app.c:910 +msgid "end of file in multiline comment" +msgstr "fin de fichier dans un commentaire multilignes" + +#: app.c:974 MRO +msgid "end of file after a one-character quote; \\0 inserted" +msgstr "fin du fichier après la présence d'un seul caractère apostrophe; \\0 inséré" + +#: app.c:982 +msgid "end of file in escape character" +msgstr "fin de fichier dans le caractère d'échappement" + +#: app.c:994 +msgid "Missing close quote: (assumed)" +msgstr "Apostrophe de fermeture manquant: (assumé)" + +#: app.c:1057 app.c:1111 app.c:1186 +msgid "end of file in comment; newline inserted" +msgstr "fin de fichier dans le commentaire; nouvelle ligne insérée" + +#: app.c:1121 +msgid "EOF in Comment: Newline inserted" +msgstr "EOF dans le commentaire: nouvelle ligne insérée" + +#: as.c:147 +msgid "missing emulation mode name" +msgstr "nom du mode d'émulation manquant" + +#: as.c:162 +msgid "unrecognized emulation name `%s'" +msgstr "nom de l'émulation non reconnu `%s'" + +#: as.c:209 +#, c-format +msgid "GNU assembler version %s (%s) using BFD version %s" +msgstr "Version de l'assembleur GNU %s (%s) utilisant la version BFD %s" + +#: as.c:212 +msgid "GNU assembler version %s (%s)" +msgstr "Version de l'assembleur GNU %s (%s)" + +#: as.c:221 +msgid "Usage: %s [option...] [asmfile...]\n" +msgstr "Usage: %s [option...] [fichier-assembleur...]\n" + +#: as.c:223 +msgid "" +"Options:\n" +" -a[sub-option...]\t turn on listings\n" +" \t Sub-options [default hls]:\n" +" \t c omit false conditionals\n" +" \t d omit debugging directives\n" +" \t h include high-level source\n" +" \t l include assembly\n" +" \t m include macro expansions\n" +" \t n omit forms processing\n" +" \t s include symbols\n" +" \t L include line debug statistics (if applicable)\n" +" \t =FILE list to FILE (must be last sub-option)\n" +msgstr "" +"Options:\n" +" -a[sous-option...]\t activer l'affichage\n" +" \t Sous-options [par défaut hls]:\n" +" \t c omettre les faux conditionels\n" +" \t d omettre les directives de débug\n" +" \t h inclure les sources de haut niveau\n" +" \t l inclure l'assembleur\n" +" \t m inclure l'expansion de macros\n" +" \t n omettre le tratiement des formulaires (forms)\n" +" \t s inclure les symboles\n" +" \t L inclure les lignes pour les statistiques de débug\n" +" (si applicable)\n" +" \t =FICHIER les lister au FICHIER (doit être la dernière sous-option)\n" + +#: as.c:237 +msgid " -D produce assembler debugging messages\n" +msgstr " -D produire les messages de débug assembleur\n" + +#: as.c:239 +msgid " --defsym SYM=VAL define symbol SYM to given value\n" +msgstr " --defsym SYMBOLE=VALEUR définir le SYMBOLE avec une valeur\n" + +#: as.c:255 +msgid " emulate output (default %s)\n" +msgstr " émuler la sortie (par défaut %s)\n" + +#: as.c:259 +msgid " -f skip whitespace and comment preprocessing\n" +msgstr " -f escamoter le pré-traitement des espaces blancs et des commentaires\n" + +#: as.c:261 MRO +msgid " --gstabs generate stabs debugging information\n" +msgstr " --gstabs générer les talons d'information pour le débug\n" + +#: as.c:263 +msgid " --gdwarf2 generate DWARF2 debugging information\n" +msgstr " --gdwarf2 généréer les informations de débug DWARF2\n" + +#: as.c:265 +msgid " --help show this message and exit\n" +msgstr " --help afficher l'aide-mémoire et quitter\n" + +#: as.c:267 +msgid " --target-help show target specific options\n" +msgstr " --target-help montrer les options spécifiques de la cible\n" + +#: as.c:269 +msgid " -I DIR add DIR to search list for .include directives\n" +msgstr "" +" -I RÉPERTOIRE ajouter le RÉPERTOIRE à la liste de recherche\n" +"pour les directive .include\n" + +#: as.c:271 +msgid " -J don't warn about signed overflow\n" +msgstr " -J ne pas avertir lors d'un débordement signé\n" + +#: as.c:273 +msgid " -K warn when differences altered for long displacements\n" +msgstr " -K avertir lorsque des différences sont altérées lors de longs déplacements\n" + +#: as.c:275 +msgid " -L,--keep-locals keep local symbols (e.g. starting with `L')\n" +msgstr " -L,--keep-locals conserver les symboles locaux (i.e. débutant par `L')\n" + +#: as.c:277 +msgid " -M,--mri assemble in MRI compatibility mode\n" +msgstr " -M,--mri assembler en mode compatibilité MRI\n" + +#: as.c:279 +msgid " --MD FILE write dependency information in FILE (default none)\n" +msgstr "" +" --MD FICHIER écrire les information de dépendance dans le\n" +" FICHIER (par défaut aucun)\n" + +#: as.c:281 +msgid " -nocpp ignored\n" +msgstr " -nocpp ignorée\n" + +#: as.c:283 +msgid " -o OBJFILE name the object-file output OBJFILE (default a.out)\n" +msgstr "" +" -o NOM donner le NOM au fichier d'objets de sortie\n" +" (par défaut a.out)\n" + +#: as.c:285 +msgid " -R fold data section into text section\n" +msgstr " -R joindre la section de données avec la section texte\n" + +#: as.c:287 +msgid " --statistics print various measured statistics from execution\n" +msgstr " --statistics afficher diverses mesures de statistiques de l'exécution\n" + +#: as.c:289 +msgid " --strip-local-absolute strip local absolute symbols\n" +msgstr " --strip-local-absolute éliminer les symboles absolus locaux\n" + +#: as.c:291 +msgid " --traditional-format Use same format as native assembler when possible\n" +msgstr " --traditional-format utiliser le même format que l'assembleur natif lorsque c'est possible\n" + +#: as.c:293 +msgid " --version print assembler version number and exit\n" +msgstr " --version afficher le numéro de la version de l'assembleur et quitter\n" + +#: as.c:295 +msgid " -W --no-warn suppress warnings\n" +msgstr " -W --no-warn supprimer les avertissements\n" + +#: as.c:297 +msgid " --warn don't suppress warnings\n" +msgstr " --warn ne pas supprimer les avertissements\n" + +#: as.c:299 +msgid " --fatal-warnings treat warnings as errors\n" +msgstr " --fatal-warnings traiter les averitssements comme des erreurs\n" + +#: as.c:301 +msgid "" +" --itbl INSTTBL extend instruction set to include instructions\n" +" matching the specifications defined in file INSTTBL\n" +msgstr "" +" --itbl INSTTBL étendre le jeu d'instructions pour inclure les\n" +" instructions concordants avec les spécifications\n" +" définies dans le fichier INSTTBL\n" + +#: as.c:304 +msgid " -w ignored\n" +msgstr " -w ignorée\n" + +#: as.c:306 +msgid " -X ignored\n" +msgstr " -X ignorée\n" + +#: as.c:308 +msgid " -Z generate object file even after errors\n" +msgstr " -Z générer le fichier objet même après des erreurs\n" + +#: as.c:310 +msgid "" +" --listing-lhs-width set the width in words of the output data column of\n" +" the listing\n" +msgstr "" +" --listing-lhs-width initialiser la largeur en mots de la colonne de données\n" +" en sortie sur le listing\n" + +#: as.c:313 +msgid "" +" --listing-lhs-width2 set the width in words of the continuation lines\n" +" of the output data column; ignored if smaller than\n" +" the width of the first line\n" +msgstr "" +" --listing-lhs-width2 initialiser la largeur en mots des lignes de continuation\n" +" de la colonne de données en sortie; ignoré si plus petit que\n" +" la largeur de la première ligne\n" + +#: as.c:317 +msgid "" +" --listing-rhs-width set the max width in characters of the lines from\n" +" the source file\n" +msgstr "" +" --listing-rhs-width initialiser la largeur maximale en caractères des lignes\n" +" du fichier source\n" + +#: as.c:320 +msgid "" +" --listing-cont-lines set the maximum number of continuation lines used\n" +" for the output data column of the listing\n" +msgstr "" +" --listing-cont-lines initialiser le nombre maximal de lignes de continuation à utiliser\n" +" pour la colonne de donnée en sortie dans le listing\n" + +#: as.c:327 gasp.c:3527 +#, c-format +msgid "Report bugs to %s\n" +msgstr "Rapporter toutes anomalies à %s\n" + +#. This output is intended to follow the GNU standards document. +#: as.c:527 +msgid "GNU assembler %s\n" +msgstr "Assembleur GNU %s\n" + +#: as.c:528 +msgid "Copyright 2000 Free Software Foundation, Inc.\n" +msgstr "Copyright 2000 Free Software Foundation, Inc.\n" + +#: as.c:529 gasp.c:3621 +msgid "" +"This program is free software; you may redistribute it under the terms of\n" +"the GNU General Public License. This program has absolutely no warranty.\n" +msgstr "" +"Ce logiciel est libre; vous pouvez le redistribuer selon les termes de la\n" +"licence GNU General Public License. AUCUNE garantie n'est donnée.\n" + +#: as.c:532 +#, c-format +msgid "This assembler was configured for a target of `%s'.\n" +msgstr "Cet assembleur a été configuré pour la cible `%s'.\n" + +#: as.c:539 +msgid "multiple emulation names specified" +msgstr "multiples noms d'émulation spécifiés" + +#: as.c:541 +msgid "emulations not handled in this configuration" +msgstr "émulations non traités dans cette configuration" + +#: as.c:546 +msgid "alias = %s\n" +msgstr "alias = %s\n" + +#: as.c:547 +#, c-format +msgid "canonical = %s\n" +msgstr "canonique = %s\n" + +#: as.c:548 +#, c-format +msgid "cpu-type = %s\n" +msgstr "type de CPU = %s\n" + +#: as.c:550 +msgid "format = %s\n" +msgstr "format = %s\n" + +#: as.c:553 +#, c-format +msgid "bfd-target = %s\n" +msgstr "cible-bfd = %s\n" + +#: as.c:566 +msgid "bad defsym; format is --defsym name=value" +msgstr "defsym erroné; format est --defsym nom=valeur" + +#: as.c:590 +msgid "No file name following -t option\n" +msgstr "Aucun nom de fichier après l'option -t\n" + +#: as.c:606 +msgid "Failed to read instruction table %s\n" +msgstr "Échec de lecture de la table d'instructions %s\n" + +#: as.c:723 +msgid "invalid listing option `%c'" +msgstr "Option de listage invalide '%c'" + +#: as.c:922 +#, c-format +msgid "%d warnings, treating warnings as errors" +msgstr "%d AVERTISSEMENTS, traitement des avertissements comme des erreurs" + +#: as.c:953 +#, c-format +msgid "%s: total time in assembly: %ld.%06ld\n" +msgstr "%s: temps total d'assemblage: %ld.%06ld\n" + +#: as.c:956 +msgid "%s: data size %ld\n" +msgstr "%s: taille des données %ld\n" + +#: as.h:225 +#, c-format +msgid "Case value %ld unexpected at line %d of file \"%s\"\n" +msgstr "Casse inattendue valeur %ld à la ligne %d du fichier \"%s\"\n" + +#. +#. * We have a GROSS internal error. +#. * This should never happen. +#. +#: atof-generic.c:437 config/tc-a29k.c:544 config/tc-i860.c:340 +#: config/tc-i860.c:832 config/tc-m68k.c:3176 config/tc-m68k.c:3205 +#: config/tc-sparc.c:2543 +msgid "failed sanity check." +msgstr "la vérification de l'état de santé a échoué" + +#: cond.c:77 +msgid "invalid identifier for \".ifdef\"" +msgstr "identificateur invalide pour \".ifdef\"" + +#: cond.c:131 +msgid "non-constant expression in \".if\" statement" +msgstr "expression n'est pas une constante dans la déclaration \".if\"" + +#: cond.c:227 +msgid "bad format for ifc or ifnc" +msgstr "mauvais format pour ifc ou ifnc" + +#: cond.c:261 +msgid "\".elseif\" without matching \".if\" - ignored" +msgstr "\".elseif\" sans pairage \".if\" - ignoré" + +#: cond.c:266 +msgid "\".elseif\" after \".else\" - ignored" +msgstr "\".elseif\" après \".else\" - ignoré" + +#: cond.c:269 cond.c:378 +msgid "here is the previous \"else\"" +msgstr "voici le \"else\" précédent" + +#: cond.c:272 cond.c:381 +msgid "here is the previous \"if\"" +msgstr "voici le \"if\" précédent" + +#: cond.c:305 +msgid "non-constant expression in \".elseif\" statement" +msgstr "expression n'est pas une constante dans la déclaration \".elseif\"" + +#: cond.c:340 +msgid "\".endif\" without \".if\"" +msgstr "\".endif\" sans \".if\"" + +#: cond.c:370 +msgid ".else without matching .if - ignored" +msgstr ".else sans concordance avec .if - ignoré" + +#: cond.c:375 +msgid "duplicate \"else\" - ignored" +msgstr "duplicité du \"else\" - ignoré" + +#: cond.c:426 +msgid ".ifeqs syntax error" +msgstr ".ifeqs erreur de syntaxe" + +#: cond.c:509 +msgid "end of macro inside conditional" +msgstr "fin de macro à l'intérieur d'un conditionnel" + +#: cond.c:511 +msgid "end of file inside conditional" +msgstr "fin de fichier à l'intérieur d'un conditionnel" + +#: cond.c:514 +msgid "here is the start of the unterminated conditional" +msgstr "voici le début du conditionnel non terminé" + +#: cond.c:518 +msgid "here is the \"else\" of the unterminated conditional" +msgstr "voici le \"else\" du conditionnel non terminé" + +#: config/obj-aout.c:162 +#, c-format +msgid "Attempt to put a common symbol into set %s" +msgstr "Tentative de placer un symbole commun dans l'ensemble %s" + +#: config/obj-aout.c:166 +#, c-format +msgid "Attempt to put an undefined symbol into set %s" +msgstr "Tentative de placer le symbole indéfini dans l'ensemble %s" + +#: config/obj-aout.c:197 config/obj-coff.c:1246 config/obj-elf.c:1739 +#: ecoff.c:3647 +#, c-format +msgid "Symbol `%s' can not be both weak and common" +msgstr "Symbole `%s' ne peut être à la fois 'weak' et 'common'" + +#: config/obj-aout.c:255 config/obj-coff.c:1982 +msgid "unresolved relocation" +msgstr "relocalisation non résolue" + +#: config/obj-aout.c:257 config/obj-coff.c:1984 +#, c-format +msgid "bad relocation: symbol `%s' not in symbol table" +msgstr "relocalisation erronée: symbole `%s' n'est pas dans la table des symboles" + +#: config/obj-aout.c:344 +#, c-format +msgid "%s: bad type for weak symbol" +msgstr "%s: type erroné pour un symbole faible" + +#: config/obj-aout.c:458 config/obj-coff.c:2913 write.c:1868 +#, c-format +msgid "%s: global symbols not supported in common sections" +msgstr "%s: symboles globaux non supportés dans les section communes" + +#: config/obj-aout.c:524 +#, c-format +msgid "Local symbol %s never defined." +msgstr "Symbole local %s n'a jamais été défini." + +#: config/obj-aout.c:612 +msgid "subsegment index too high" +msgstr "index de sous-segments trop grand" + +#: config/obj-bout.c:319 config/obj-vms.c:561 +#, c-format +msgid "Local symbol %s never defined" +msgstr "Symbole local %s n'a jamais été défini." + +#: config/obj-coff.c:156 +#, c-format +msgid "Inserting \"%s\" into structure table failed: %s" +msgstr "Insertion de \"%s\" dans la table de structure a échoué: %s" + +#. Zero is used as an end marker in the file. +#: config/obj-coff.c:451 +msgid "Line numbers must be positive integers\n" +msgstr "Les numéros de lignes doit être des entiers positifs\n" + +#: config/obj-coff.c:484 config/obj-coff.c:2328 +msgid ".ln pseudo-op inside .def/.endef: ignored." +msgstr ".ln pseudo opérateur à l'intérieur de .def/.endef: ignoré." + +#: config/obj-coff.c:527 ecoff.c:3283 +msgid ".loc outside of .text" +msgstr ".loc à l'extérieur de .text" + +#: config/obj-coff.c:534 +msgid ".loc pseudo-op inside .def/.endef: ignored." +msgstr ".loc pseudo opérateur à l'intérieur de .def/.endef: ignoré." + +#: config/obj-coff.c:622 config/obj-coff.c:2385 +msgid ".def pseudo-op used inside of .def/.endef: ignored." +msgstr ".def pseudo opérateur utilisé à l'intérieur de .def/.endef: ignoré." + +#: config/obj-coff.c:668 config/obj-coff.c:2437 +msgid ".endef pseudo-op used outside of .def/.endef: ignored." +msgstr ".endef pseudo opérateur utilisé à l'extérieur de .def/.endef: ignoré." + +#: config/obj-coff.c:706 +msgid "`%s' symbol without preceding function" +msgstr "`%s' symbole sans fonction qui la précède" + +#: config/obj-coff.c:793 config/obj-coff.c:2512 +msgid "unexpected storage class %d" +msgstr "classe de stockage inattendue %d" + +#: config/obj-coff.c:906 config/obj-coff.c:2619 +msgid ".dim pseudo-op used outside of .def/.endef: ignored." +msgstr ".dim pseudo opérateur utilisé à l'extérieur de .def/.endef: ignoré." + +#: config/obj-coff.c:926 config/obj-coff.c:2639 +msgid "badly formed .dim directive ignored" +msgstr "directive .dim mal composée - ignorée" + +#: config/obj-coff.c:977 config/obj-coff.c:2702 +msgid ".size pseudo-op used outside of .def/.endef ignored." +msgstr ".size pseudo opérateur utilisé à l'extérieur de .def/.endef ignoré." + +#: config/obj-coff.c:993 config/obj-coff.c:2718 +msgid ".scl pseudo-op used outside of .def/.endef ignored." +msgstr ".scl pseudo opérateur utilisé à l'extérieur de .def/.endef ignoré." + +#: config/obj-coff.c:1011 config/obj-coff.c:2736 +msgid ".tag pseudo-op used outside of .def/.endef ignored." +msgstr ".tag pseudo opérateur utilisé à l'extérieur de .def/.endef ignoré." + +#: config/obj-coff.c:1030 config/obj-coff.c:2754 +#, c-format +msgid "tag not found for .tag %s" +msgstr "étiquette non repérée pour .tag %s" + +#: config/obj-coff.c:1045 config/obj-coff.c:2769 +msgid ".type pseudo-op used outside of .def/.endef ignored." +msgstr ".type pseudo opérateur utilisé à l'extérieur de .def/.endef ignoré." + +#: config/obj-coff.c:1067 config/obj-coff.c:2791 +msgid ".val pseudo-op used outside of .def/.endef ignored." +msgstr ".val pseudo opérateur utilisé à l'extérieur de .def/.endef ignoré." + +#: config/obj-coff.c:1207 config/obj-coff.c:2986 +msgid "mismatched .eb" +msgstr ".eb ne concorde pas" + +#: config/obj-coff.c:1225 config/obj-coff.c:3026 +msgid "C_EFCN symbol out of scope" +msgstr "symbole C_EFCN hors gamme" + +#. STYP_INFO +#. STYP_LIB +#. STYP_OVER +#: config/obj-coff.c:1447 +msgid "unsupported section attribute '%c'" +msgstr "attribut de section non supporté '%c'" + +#: config/obj-coff.c:1452 config/obj-coff.c:3726 config/tc-ppc.c:3925 +msgid "unknown section attribute '%c'" +msgstr "attribut de section inconnu '%c'" + +#: config/obj-coff.c:1482 config/tc-ppc.c:3943 read.c:2512 +#, c-format +msgid "error setting flags for \"%s\": %s" +msgstr "erreur lors de l'initialisation des fanions de \"%s\": %s" + +#: config/obj-coff.c:1493 config/obj-elf.c:723 +#, c-format +msgid "Ignoring changed section attributes for %s" +msgstr "A ignoré les attributs de section modifiés pour %s" + +#: config/obj-coff.c:1629 +#, c-format +msgid "0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n" +msgstr "0x%lx: \"%s\" type = %ld, classe = %d, segment = %d\n" + +#: config/obj-coff.c:1809 config/obj-ieee.c:69 +msgid "Out of step\n" +msgstr "Compteur d'étapes épuisée\n" + +#: config/obj-coff.c:2244 +msgid "bfd_coff_swap_scnhdr_out failed" +msgstr "bfd_coff_swap_scnhdr_out a échoué" + +#: config/obj-coff.c:2469 +msgid "`.bf' symbol without preceding function\n" +msgstr "`.bf' symbole sans fonction qui la précède\n" + +#: config/obj-coff.c:3422 config/obj-ieee.c:507 output-file.c:52 +#: output-file.c:119 +#, c-format +msgid "FATAL: Can't create %s" +msgstr "FATALE: ne peut créer %s" + +#: config/obj-coff.c:3600 +msgid "Can't close %s: %s" +msgstr "Ne peut fermer %s: %s" + +#: config/obj-coff.c:3634 +#, c-format +msgid "Too many new sections; can't add \"%s\"" +msgstr "Trop de nouvelles sections; ne peut l'ajouter \"%s\"" + +#: config/obj-coff.c:4041 config/tc-m88k.c:1257 config/tc-sparc.c:3531 +msgid "Expected comma after name" +msgstr "Virgule attendue après le nom" + +#: config/obj-coff.c:4047 read.c:1956 +msgid "Missing size expression" +msgstr "Expression de la taille manquante" + +#: config/obj-coff.c:4053 +#, c-format +msgid "lcomm length (%d.) <0! Ignored." +msgstr "longueur lcomm (%d.) <0! Ignoré." + +#: config/obj-coff.c:4081 read.c:2190 +#, c-format +msgid "Symbol %s already defined" +msgstr "Symbole %s est déjà défini" + +#: config/obj-coff.c:4176 config/tc-i960.c:3215 +#, c-format +msgid "No 'bal' entry point for leafproc %s" +msgstr "Pas de point d'entrée 'bal' pour la procédure leafproc %s" + +#: config/obj-coff.c:4255 write.c:2575 +#, c-format +msgid "Negative of non-absolute symbol %s" +msgstr "Négatif d'un symbole non absolu %s" + +#: config/obj-coff.c:4276 write.c:2589 MRO +msgid "callj to difference of 2 symbols" +msgstr "appel de callj pour différencier 2 symboles" + +#: config/obj-coff.c:4322 +#, c-format +msgid "Can't emit reloc {- %s-seg symbol \"%s\"} @ file address %ld." +msgstr "Ne peut produire de relocalisation {- %s-seg symbole \"%s\"} @ fichier adresse %ld." + +#. 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. +#: config/obj-coff.c:4411 config/tc-i960.c:3235 write.c:2733 +msgid "can't use COBR format with external label" +msgstr "ne peut utiliser un format COBR avec une étiquette externe" + +#: config/obj-coff.c:4490 +#, c-format +msgid "Value of %ld too large for field of %d bytes at 0x%lx" +msgstr "Valeur de %ld trop grande pour un champ de %d octets à 0x%lx" + +#: config/obj-coff.c:4504 write.c:2823 +#, c-format +msgid "Signed .word overflow; switch may be too large; %ld at 0x%lx" +msgstr "Débordement de .word signé; commutation peut être trop grande; %ld à 0x%lx" + +#: config/obj-ecoff.c:241 +msgid "Can't set GP value" +msgstr "Ne peut initialiser une valeur GP" + +#: config/obj-ecoff.c:248 +msgid "Can't set register masks" +msgstr "Ne peut initialiser les masques de registres" + +#: config/obj-elf.c:308 config/tc-sparc.c:3674 config/tc-v850.c:259 +msgid "Expected comma after symbol-name" +msgstr "Virgule attendue après un nom de symbole" + +#: config/obj-elf.c:315 config/tc-sparc.c:3684 +#, c-format +msgid ".COMMon length (%d.) <0! Ignored." +msgstr "longueur de .common (%d.) <0! Ignoré." + +#: config/obj-elf.c:325 config/tc-alpha.c:4335 config/tc-sparc.c:3694 +#: config/tc-v850.c:282 +msgid "Ignoring attempt to re-define symbol" +msgstr "Tentative ignorée de re-définition de symbole" + +#: config/obj-elf.c:333 config/tc-sparc.c:3702 config/tc-v850.c:292 +#, c-format +msgid "Length of .comm \"%s\" is already %ld. Not changed to %d." +msgstr "longueur de .comm \"%s\" est déjà %ld. N'a pas été modifié à %d." + +#: config/obj-elf.c:356 config/tc-v850.c:319 +msgid "Common alignment negative; 0 assumed" +msgstr "Alignement négative du commun; 0 est assumé" + +#: config/obj-elf.c:375 config/tc-m32r.c:1286 config/tc-ppc.c:1518 +#: config/tc-v850.c:382 +msgid "Common alignment not a power of 2" +msgstr "Alignement du commun n'est pas une puissance de 2" + +#: config/obj-elf.c:438 config/tc-sparc.c:3826 config/tc-v850.c:564 +#, c-format +msgid "bad .common segment %s" +msgstr "segment .common erroné %s" + +#: config/obj-elf.c:664 +#, c-format +msgid "Setting incorrect section type for %s" +msgstr "Initialisation incorrect du type de section de %s" + +#: config/obj-elf.c:668 +#, c-format +msgid "Ignoring incorrect section type for %s" +msgstr "A ignoré le type de section incorrect de %s" + +#: config/obj-elf.c:681 +#, c-format +msgid "Setting incorrect section attributes for %s" +msgstr "Initialisation incorrecte des attributs de section de %s" + +#: config/obj-elf.c:753 +msgid "Unrecognized .section attribute: want a,w,x" +msgstr "Attribut .section non reconnu: attendu: a,w,x" + +#: config/obj-elf.c:793 +msgid "Unrecognized section attribute" +msgstr "attribut de section non reconnue" + +#: config/obj-elf.c:815 +msgid "Unrecognized section type" +msgstr "type de section non reconnu" + +#: config/obj-elf.c:866 +msgid "Missing section name" +msgstr "Nom de section manquant" + +#: config/obj-elf.c:932 +msgid "Bad .section directive - character following name is not '#'" +msgstr "Directive .section erronée - caractère suivant le nom n'est pas '#'" + +#: config/obj-elf.c:1033 +msgid ".previous without corresponding .section; ignored" +msgstr ".previous sans directive correspondante .section; ignoré" + +#: config/obj-elf.c:1060 +msgid ".popsection without corresponding .pushsection; ignored" +msgstr ".popsection sans directive correspondante .pushsection; ignoré" + +#: config/obj-elf.c:1113 +msgid "expected comma after name in .symver" +msgstr "virgule attendue après le nom dans .symver" + +#: config/obj-elf.c:1137 +#, c-format +msgid "missing version name in `%s' for symbol `%s'" +msgstr "nom de version manquant dans `%s' pour le symbole `%s'" + +#: config/obj-elf.c:1148 +#, c-format +msgid "multiple versions [`%s'|`%s'] for symbol `%s'" +msgstr "version multiples [`%s'|`%s'] pour le symbole `%s'" + +#: config/obj-elf.c:1361 config/obj-som.c:155 config/obj-som.c:201 +msgid "Expected quoted string" +msgstr "chaîne mise en commentaire attendue" + +#: config/obj-elf.c:1382 +#, c-format +msgid "expected comma after name `%s' in .size directive" +msgstr "virgule attendue après le nom `%s' dans la directive .size" + +#: config/obj-elf.c:1391 +msgid "missing expression in .size directive" +msgstr "expression manquante dans la directive .size" + +#: config/obj-elf.c:1467 +msgid "ignoring unrecognized symbol type \"%s\"" +msgstr "type de symbole non reconnu est ignoré \"%s\"" + +#: config/obj-elf.c:1648 +msgid ".size expression too complicated to fix up" +msgstr "expression .size trop compliquée pour tenter de la corriger" + +#: config/obj-elf.c:1680 +#, c-format +msgid "invalid attempt to declare external version name as default in symbol `%s'" +msgstr "tentative invalide de déclaration d'un nom de version externe comme symbole par défaut `%s'" + +#: config/obj-elf.c:1862 +msgid "Failed to set up debugging information: %s" +msgstr "Échec d'initialisation des informations de débug: %s" + +#: config/obj-elf.c:1882 +msgid "Can't start writing .mdebug section: %s" +msgstr "Ne peut débuter l'écriture de la section .mdebug %s" + +#: config/obj-elf.c:1890 +msgid "Could not write .mdebug section: %s" +msgstr "Ne peut écrire la section .mdebug: %s" + +#: config/obj-ieee.c:455 +msgid "too many sections" +msgstr "trop de sections" + +#: config/obj-som.c:138 +msgid "Only one .version pseudo-op per file!" +msgstr "Un seul pseudo opérateur .version par fichier!" + +#: config/obj-som.c:164 +#, c-format +msgid "FATAL: Attaching version header %s" +msgstr "FATAL: attachement de l'en-tête de version %s" + +#: config/obj-som.c:184 +msgid "Only one .copyright pseudo-op per file!" +msgstr "Un seul pseudo opérateur .copyright par fichier!" + +#: config/obj-som.c:210 +#, c-format +msgid "FATAL: Attaching copyright header %s" +msgstr "FATAL: attachement de l'en-tête de version %s" + +#: config/obj-vms.c:462 +#, c-format +msgid "compiler emitted zero-size common symbol `%s' already defined" +msgstr "compilateur a donné une taille zéro pour un symbole commun `%s' déjà défini" + +#: config/obj-vms.c:472 +#, c-format +msgid "compiler redefined zero-size common symbol `%s'" +msgstr "compilateur a re-défini la taille zéro du symbole commun `%s'" + +#: config/obj-vms.c:591 +#, c-format +msgid "Couldn't create VMS object file \"%s\"" +msgstr "Ne peut créer un fichier objet VMS \"%s\"" + +#: config/obj-vms.c:616 +msgid "I/O error writing VMS object file (length prefix)" +msgstr "Erreur d'E/S lors de l'écriture du fichier objet VMS (préfixe de longueur)" + +#: config/obj-vms.c:630 +msgid "I/O error writing VMS object file" +msgstr "Erreur d'E/S lors de l'écriture du fichier objet VMS" + +#: config/obj-vms.c:1220 +msgid "Couldn't find source file \"%s\", status=%%X%x" +msgstr "Ne peut repérer le fichier source \"%s\", état=%%X%x" + +#: config/obj-vms.c:1718 config/obj-vms.c:2894 +#, c-format +msgid "debugger forward reference error, dbx type %d" +msgstr "erreur de référence avant en débug, dbx type %d" + +#: config/obj-vms.c:1793 +#, c-format +msgid "Variable descriptor %d too complicated. Defined as `void *'." +msgstr "Descripteur de variable %d trop compliqué. Défini comme 'void *'." + +#: config/obj-vms.c:2107 +msgid "" +"***Warning - the assembly code generated by the compiler has placed \n" +" global constant(s) in the text psect. These will not be available to \n" +" other modules, since this is not the correct way to handle this. You \n" +" have two options: 1) get a patched compiler that does not put global \n" +" constants in the text psect, or 2) remove the 'const' keyword from \n" +" definitions of global variables in your source module(s). Don't say \n" +" I didn't warn you! \n" +msgstr "" +"***AVERTISSEMENT*** - le code assemblé généré par le compilateur a placé\n" +" les constantes globales dans la portion texte du psect. Il ne sera pas\n" +" disponible aux autres modules, étant donné que ce n'est pas la manière \n" +" correcte de traiter cela. Vous avez alors 2 options: \n" +" 1) obtenir un correctif du compilateur qui n'insère pas de constantes\n" +" globales dans la portion texte du psect\n" +"OU\n" +" 2) enlever le mot mot 'const' de la définition des variables globales\n" +" des modules sources.\n" +" Vous avez été maintenant averti! \n" + +#: config/obj-vms.c:2421 +#, c-format +msgid "debugginer output: %d is an unknown untyped variable." +msgstr "résultat de débug: %d est un type inconnu de variable sans type." + +#: config/obj-vms.c:2639 +#, c-format +msgid "debugger output: structure element `%s' has undefined type" +msgstr "résultat de débug: élément de structure `%s' a un type indéfini" + +#: config/obj-vms.c:2750 +#, c-format +msgid "debugger output: %d is an unknown type of variable." +msgstr "résultat de débug: %d a un type indéfini de variable" + +#: config/obj-vms.c:2883 +#, c-format +msgid "debugger output: Unable to resolve %d circular references." +msgstr "résultat de débug: incapable de résoudre %d les références circurlaires" + +#: config/obj-vms.c:3085 +#, c-format +msgid "Module name truncated: %s\n" +msgstr "Nom du module a été tronqué: %s\n" + +#: config/obj-vms.c:3363 +#, c-format +msgid "Symbol %s replaced by %s\n" +msgstr "Symbole %s remplacé par %s\n" + +#. impossible +#: config/obj-vms.c:3646 +msgid "Unknown VMS psect type (%ld)" +msgstr "Type de section psect VMS inconnue (%ld)" + +#: config/obj-vms.c:3687 +#, c-format +msgid "Globalsymbol attribute for symbol %s was unexpected." +msgstr "Attribut de type Globalsymbol pour le symbole %s attendu." + +#: config/obj-vms.c:3836 +msgid "Invalid data type for globalvalue" +msgstr "Type de données invalide pour un type globalvalue" + +#: config/obj-vms.c:3848 +#, c-format +msgid "Invalid globalvalue of %s" +msgstr "Valeur de type globalvalue invalide pour %s" + +#: config/obj-vms.c:4198 +msgid "Couldn't find fixup fragment when checking for indirect reference" +msgstr "Ne peut repérer un fragment de correctif lors de la vérification des références indirectes" + +#: config/obj-vms.c:4541 config/obj-vms.c:4682 +msgid "Fixup data addsy and subsy don't have the same type" +msgstr "Les correctifs de données 'addsy' et 'subsy' n'ont pas le même type" + +#: config/obj-vms.c:4545 config/obj-vms.c:4686 +msgid "Fixup data addsy and subsy don't have an appropriate type" +msgstr "Les correctifs de données 'addsy' et 'subsy' n'ont pas un type approprié" + +#: config/obj-vms.c:4548 config/obj-vms.c:4689 +msgid "Fixup data is erroneously \"pcrel\"" +msgstr "Correctif de données est erroné \"pcrel\"" + +#: config/obj-vms.c:4564 config/obj-vms.c:4708 +msgid "Fixup datum is not a longword" +msgstr "Correctif des données n'est pas un 'longword'" + +#: config/obj-vms.c:4568 config/obj-vms.c:4712 +msgid "Fixup datum is not \"fixP->fx_addsy\"" +msgstr "Correctif des données n'est pas \"fixP->fx_addsy\"" + +#: config/obj-vms.c:4783 +#, c-format +msgid "" +"g++ wrote an extern reference to `%s' as a routine.\n" +"I will fix it, but I hope that it was note really a routine." +msgstr "" +"g++ a écrit une référence externe vers `%s' comme étant une routine.\n" +"Cela sera corrigé, mais en en espérant qu'il ne s'agit pas réellement d'une routine." + +#: config/obj-vms.c:4915 +msgid "Can't handle global xtors symbols yet." +msgstr "Ne peut traiter les symboles xtors globaux encore." + +#: config/obj-vms.c:4918 +msgid "Unknown %s" +msgstr "inconnu: %s" + +#. +#. * Error otherwise. +#. +#: config/obj-vms.c:5003 +msgid "unhandled stab type %d" +msgstr "type de 'stab' non traité %d" + +#: config/tc-a29k.c:160 config/tc-sparc.c:3878 +msgid "Unknown segment type" +msgstr "type de segment inconnu" + +#. Probably a memory allocation problem? Give up now. +#: config/tc-a29k.c:330 config/tc-hppa.c:1412 config/tc-mips.c:1030 +#: config/tc-mips.c:1072 config/tc-sparc.c:846 +msgid "Broken assembler. No assembly attempted." +msgstr "Bris d'assemblage. Aucune tentative d'assemblage." + +#: config/tc-a29k.c:375 config/tc-avr.c:1124 config/tc-d10v.c:532 +#: config/tc-d30v.c:552 config/tc-h8300.c:296 config/tc-h8500.c:294 +#: config/tc-mcore.c:655 config/tc-mn10200.c:954 config/tc-mn10300.c:1335 +#: config/tc-ppc.c:1974 config/tc-sh.c:838 config/tc-tic80.c:282 +#: config/tc-v850.c:2076 config/tc-w65.c:248 config/tc-z8k.c:336 +msgid "missing operand" +msgstr "opérande manquante" + +#: config/tc-a29k.c:415 config/tc-cris.c:913 config/tc-cris.c:921 +#: config/tc-hppa.c:1545 config/tc-i860.c:431 config/tc-i860.c:448 +#: config/tc-sparc.c:1408 config/tc-sparc.c:1414 +msgid "Unknown opcode: `%s'" +msgstr "code-op inconnu: `%s'" + +#: config/tc-a29k.c:420 +msgid "Unknown opcode `%s'." +msgstr "code-op inconnu `%s'" + +#: config/tc-a29k.c:452 +msgid "Too many operands: %s" +msgstr "Trop d'opérandes: %s" + +#: config/tc-a29k.c:474 config/tc-a29k.c:505 +#, c-format +msgid "Immediate value of %ld is too large" +msgstr "Valeur immédiate de %ld est trop grande" + +#: config/tc-a29k.c:890 +#, c-format +msgid "bad relocation type: 0x%02x" +msgstr "type de relocalisation erroné: 0x%02x" + +#: config/tc-a29k.c:914 +#, c-format +msgid "need %o3\n" +msgstr "a besoin de %o3\n" + +#: config/tc-a29k.c:930 +msgid "a29k_convert_frag\n" +msgstr "a29k_convert_frag\n" + +#: config/tc-a29k.c:939 +msgid "a29k_estimate_size_before_relax\n" +msgstr "a29k_estimate_size_before_relax\n" + +#: config/tc-a29k.c:1090 +#, c-format +msgid "label \"$%d\" redefined" +msgstr "étiquette \"$%d\" redéfinie" + +#: config/tc-a29k.c:1163 +msgid "Invalid expression after %%%%\n" +msgstr "expression invalide après %%%%\n" + +#: config/tc-a29k.c:1174 +msgid "Invalid register in & expression" +msgstr "registre invalide dans l'expression &" + +#: config/tc-alpha.c:837 +msgid "internal error: can't hash opcode `%s': %s" +msgstr "erreur interne: ne peut insérer dans la table de hachage le code-op `%s': %s" + +#: config/tc-alpha.c:871 +#, c-format +msgid "internal error: can't hash macro `%s': %s" +msgstr "erreur interne: ne peut insérer dans la table de hachage la macro `%s': %s" + +#: config/tc-alpha.c:954 config/tc-i960.c:2700 +msgid "syntax error" +msgstr "erreur de syntaxe" + +#: config/tc-alpha.c:1028 config/tc-arm.c:6629 config/tc-h8300.c:1373 +#: config/tc-h8500.c:1197 config/tc-hppa.c:3939 config/tc-i860.c:931 +#: config/tc-m68hc11.c:478 config/tc-m68k.c:4179 config/tc-m88k.c:1105 +#: config/tc-ns32k.c:1663 config/tc-sparc.c:2830 config/tc-z8k.c:1324 +msgid "Bad call to MD_ATOF()" +msgstr "Appel erroné de MD_ATOF()" + +#: config/tc-alpha.c:1078 +msgid "Unknown CPU identifier `%s'" +msgstr "identificateur de CPU inconnu `%s'" + +#: config/tc-alpha.c:1122 +msgid "" +"Alpha options:\n" +"-32addr\t\t\ttreat addresses as 32-bit values\n" +"-F\t\t\tlack floating point instructions support\n" +"-mev4 | -mev45 | -mev5 | -mev56 | -mpca56 | -mev6 | -mall\n" +"\t\t\tspecify variant of Alpha architecture\n" +"-m21064 | -m21066 | -m21164 | -m21164a | -m21164pc | -m21264\n" +"\t\t\tthese variants include PALcode opcodes\n" +msgstr "" +"Options pour Alpha:\n" +"-32addr traiter les addresses comme des valeurs de 32 bits\n" +"-F suppléer le manque de soutien des instructions en virgule flottante\n" +"-mev4 | -mev45 | -mev5 | -mev56 | -mpca56 | -mev6 | -mall\n" +" spécifier le type d'architecture Alpha\n" +"-m21064 | -m21066 | -m21164 | -m21164a | -m21164pc | -m21264\n" +" inclure les code-op PAL des variantes d'architecture\n" + +#: config/tc-alpha.c:1132 +msgid "" +"VMS options:\n" +"-+\t\t\thash encode (don't truncate) names longer than 64 characters\n" +"-H\t\t\tshow new symbol after hash truncation\n" +msgstr "" +"-+ encoder par hachage (sans tronquer) les noms plus longs que 64 caractères\n" +"-H afficher les nouveaux symboles après une troncation du hachage\n" + +#: config/tc-alpha.c:1305 +#, c-format +msgid "unhandled relocation type %s" +msgstr "type de relocalisation non traité %s" + +#: config/tc-alpha.c:1318 +msgid "non-absolute expression in constant field" +msgstr "expression non absolue dams le champ de constante" + +#: config/tc-alpha.c:1332 +#, c-format +msgid "type %d reloc done?\n" +msgstr "type %d relocalisation complété?\n" + +#: config/tc-alpha.c:1383 config/tc-alpha.c:1390 config/tc-mips.c:7356 +msgid "Used $at without \".set noat\"" +msgstr "Utilisation de $at sans \".set noat\"" + +#: config/tc-alpha.c:1572 +#, c-format +msgid "cannot represent `%s' relocation in object file" +msgstr "ne peut représenter la relocalisation `%s' dans le fichier objet" + +#: config/tc-alpha.c:1579 +#, c-format +msgid "internal error? cannot generate `%s' relocation" +msgstr "erreur interne? ne peut générer la relocalisation `%s'" + +#: config/tc-alpha.c:1633 +#, c-format +msgid "frame reg expected, using $%d." +msgstr "registre de trame attendu, utilise $%d" + +#: config/tc-alpha.c:1758 +#, c-format +msgid "No !literal!%d was found" +msgstr "Aucun !literal!%d n'a été retrouvé" + +#. only support one relocation op per insn +#: config/tc-alpha.c:1946 +msgid "More than one relocation op per insn" +msgstr "Plus d'un opérateur de relocalisation par insn" + +#: config/tc-alpha.c:1963 +msgid "No relocation operand" +msgstr "Pas d'opérande de relocalisation" + +#: config/tc-alpha.c:1969 +#, c-format +msgid "No !sequence-number after !%s" +msgstr "Pas de !sequence-number après !%s" + +#: config/tc-alpha.c:1982 +msgid "Unknown relocation operand: !%s" +msgstr "Opérande de relocalisation inconnue: !%s" + +#: config/tc-alpha.c:1995 +#, c-format +msgid "Bad sequence number: !%s!%s" +msgstr "Numéro de séquence erroné: !%s!%s" + +#: config/tc-alpha.c:2346 +#, c-format +msgid "operand out of range (%s not between %d and %d)" +msgstr "opérande hors gamme (%s n'est pas entre %d et %d)" + +#: config/tc-alpha.c:2445 config/tc-d10v.c:621 config/tc-d30v.c:640 +#: config/tc-mn10200.c:1009 config/tc-mn10300.c:1406 config/tc-ppc.c:1940 +#: config/tc-ppc.c:2048 config/tc-ppc.c:2060 config/tc-v850.c:1856 +#: config/tc-v850.c:1879 config/tc-v850.c:2099 +msgid "too many fixups" +msgstr "trop de correctifs" + +#: config/tc-alpha.c:2660 config/tc-alpha.c:2729 +#, c-format +msgid "inappropriate arguments for opcode `%s'" +msgstr "arguments inappropriés pour le code-op `%s'" + +#: config/tc-alpha.c:2662 config/tc-alpha.c:2731 +msgid "opcode `%s' not supported for target %s" +msgstr "code-op `%s' n'est pas supporté pour la cible %s" + +#: config/tc-alpha.c:2666 config/tc-alpha.c:2734 config/tc-avr.c:1090 +msgid "unknown opcode `%s'" +msgstr "code-op inconnu `%s'" + +#: config/tc-alpha.c:2706 config/tc-alpha.c:2773 config/tc-alpha.c:3284 +#: config/tc-alpha.c:3344 config/tc-alpha.c:3396 config/tc-alpha.c:3471 +#: config/tc-alpha.c:3556 config/tc-alpha.c:3682 config/tc-alpha.c:3859 +#: config/tc-alpha.c:3916 config/tc-alpha.c:4026 config/tc-alpha.c:4133 +#: config/tc-alpha.c:4210 +msgid "Cannot use !%s!%d with %s" +msgstr "Ne peut utiliser !%s!%d avec %s" + +#: config/tc-alpha.c:2794 +msgid "can not resolve expression" +msgstr "ne peut résoudre l'expression" + +#: config/tc-alpha.c:2936 config/tc-alpha.c:3128 +msgid "overflow in literal (.lita) table" +msgstr "débordement dans la table de litérals (.lita)" + +#: config/tc-alpha.c:2943 config/tc-alpha.c:2966 config/tc-alpha.c:3141 +#: config/tc-alpha.c:3485 config/tc-alpha.c:3563 config/tc-alpha.c:3611 +#: config/tc-alpha.c:3711 config/tc-alpha.c:3936 config/tc-alpha.c:4048 +msgid "macro requires $at register while noat in effect" +msgstr "macro requiert le registre $at alors qu'il n'est pas effectif" + +#: config/tc-alpha.c:2945 config/tc-alpha.c:2968 config/tc-alpha.c:3143 +msgid "macro requires $at while $at in use" +msgstr "macro requiert $at alors que $at est utilisé" + +#: config/tc-alpha.c:3090 expr.c:83 read.c:3164 +msgid "bignum invalid; zero assumed" +msgstr "grand nombre invalide; zéro assumé" + +#: config/tc-alpha.c:3092 expr.c:85 read.c:3166 read.c:3499 read.c:4397 +msgid "floating point number invalid; zero assumed" +msgstr "nombre flottant invalide; zéro assumé" + +#: config/tc-alpha.c:3097 +msgid "can't handle expression" +msgstr "ne peut traiter l'expression" + +#: config/tc-alpha.c:3134 +msgid "overflow in literal (.lit8) table" +msgstr "débordement dans la table de litérals (.lit8)" + +#: config/tc-alpha.c:3306 +msgid "bad instruction format for lda !%s!%ld" +msgstr "format d'instruction erroné pour lda !%s!%ld" + +#: config/tc-alpha.c:4306 config/tc-ppc.c:1467 config/tc-ppc.c:3689 +#: read.c:1369 +#, c-format +msgid ".COMMon length (%ld.) <0! Ignored." +msgstr "longueur de .COMMon (%ld.) <0! ignoré." + +#: config/tc-alpha.c:4344 config/tc-alpha.c:4353 config/tc-ppc.c:3726 +#: read.c:1393 +#, c-format +msgid "Length of .comm \"%s\" is already %ld. Not changed to %ld." +msgstr "Longueur de .comm \"%s\" est déjà %ld. N'a pas été changé pour %ld." + +#: config/tc-alpha.c:4455 ecoff.c:3087 +msgid ".ent directive has no name" +msgstr "La directive .ent n'a pas de nom" + +#: config/tc-alpha.c:4463 +msgid "nested .ent directives" +msgstr "directive .ent imbriquées" + +#: config/tc-alpha.c:4499 ecoff.c:3035 +msgid ".end directive has no name" +msgstr "Directive .end n'a pas de nom" + +#: config/tc-alpha.c:4508 +msgid ".end directive names different symbol than .ent" +msgstr "Directive .end a un nom différent de symbole que .ent" + +#: config/tc-alpha.c:4585 +msgid "Invalid argument %d to .prologue." +msgstr "argument invalide %d pour .prologue" + +#: config/tc-alpha.c:4677 +msgid "ECOFF debugging is disabled." +msgstr "Mise au point de ECOFF est désactivée." + +#: config/tc-alpha.c:4698 +msgid "Unknown section directive" +msgstr "Directive de section inconnue" + +#: config/tc-alpha.c:4734 +msgid ".ent directive has no symbol" +msgstr "Directive .ent n'a pas de symbole" + +#: config/tc-alpha.c:4761 +msgid "Bad .frame directive 1./2. param" +msgstr "Directive .frame erronée paramètre 1./2." + +#: config/tc-alpha.c:4773 +msgid "Bad .frame directive 3./4. param" +msgstr "Directive .frame erronée paramètre 3./4." + +#: config/tc-alpha.c:4798 +msgid ".pdesc directive not in link (.link) section" +msgstr "Directive .pdesc n'est pas dans la section .link" + +#: config/tc-alpha.c:4806 +msgid ".pdesc has no matching .ent" +msgstr ".pdesc n'est pas pairé avec .ent" + +#: config/tc-alpha.c:4817 +msgid ".pdesc directive has no entry symbol" +msgstr "Directive .pdesc n'a pas de symbole d'entrée" + +#: config/tc-alpha.c:4830 +msgid "No comma after .pdesc " +msgstr "Pas de virgule après .pdesc " + +#: config/tc-alpha.c:4853 +msgid "unknown procedure kind" +msgstr "type de procédure inconnue" + +#: config/tc-alpha.c:4947 +msgid ".name directive not in link (.link) section" +msgstr "Directive .name n'est pas dans la section .link" + +#: config/tc-alpha.c:4955 +msgid ".name directive has no symbol" +msgstr "Directive .name n'a pas de symbole" + +#: config/tc-alpha.c:4989 +msgid "No symbol after .linkage" +msgstr "Pas de symbole après .linkage" + +#: config/tc-alpha.c:5017 +msgid "No symbol after .code_address" +msgstr "Pas de symbole après .code_address" + +#: config/tc-alpha.c:5050 ecoff.c:3253 +msgid "Bad .mask directive" +msgstr "Directive .mask erronée" + +#: config/tc-alpha.c:5071 ecoff.c:3183 +msgid "Bad .fmask directive" +msgstr "Directive .fmask erronée" + +#: config/tc-alpha.c:5241 config/tc-arm.c:1593 read.c:2150 read.c:2737 +#: stabs.c:464 +#, c-format +msgid "Expected comma after name \"%s\"" +msgstr "Virgule attendue après le nom \"%s\"" + +#. *symbol_get_obj (symbolP) = (signed char) temp; +#: config/tc-alpha.c:5252 +#, c-format +msgid "unhandled: .proc %s,%d" +msgstr "non traité: .proc %s,%d" + +#: config/tc-alpha.c:5287 +#, c-format +msgid "Tried to .set unrecognized mode `%s'" +msgstr "Essayé la directive .set pour un mode non reconnu `%s'" + +#. not fatal, but it might not work in the end +#: config/tc-alpha.c:5304 +msgid "File overrides no-base-register option." +msgstr "Le fichier écrase l'option no-base-register" + +#: config/tc-alpha.c:5321 +#, c-format +msgid "Bad base register, using $%d." +msgstr "Registre de base erroné, utilise $%d." + +#: config/tc-alpha.c:5343 +#, c-format +msgid "Alignment too large: %d. assumed" +msgstr "Alignement trop grand: %d. assumé" + +#: config/tc-alpha.c:5347 config/tc-d30v.c:2219 +msgid "Alignment negative: 0 assumed" +msgstr "Alignement négatif: 0 assumé" + +#: config/tc-alpha.c:5662 +#, c-format +msgid "Chose GP value of %lx\n" +msgstr "Choisir une valeur GP de %lx\n" + +#: config/tc-arc.c:1618 config/tc-arm.c:7532 +msgid "md_estimate_size_before_relax\n" +msgstr "md_estimate_size_before_relax\n" + +#: config/tc-arc.c:1630 +msgid "md_convert_frag\n" +msgstr "md_convert_frag\n" + +#: config/tc-arm.c:1156 +msgid "Bad arguments to instruction" +msgstr "Arguments erronés pour l'instruction" + +#: config/tc-arm.c:1157 +msgid "r15 not allowed here" +msgstr "r15 n'est pas permis ici" + +#: config/tc-arm.c:1158 +msgid "Instruction should not have flags" +msgstr "L'instruction ne devrait pas avoir de fanions" + +#: config/tc-arm.c:1159 +msgid "Instruction is not conditional" +msgstr "L'instruction n'est pas conditionnelle" + +#: config/tc-arm.c:1160 +msgid "acc0 expected" +msgstr "acc0 attendu" + +#: config/tc-arm.c:1289 +msgid "Literal Pool Overflow" +msgstr "Débordement du bassin de mots" + +#: config/tc-arm.c:1431 +msgid "Invalid syntax for .req directive." +msgstr "Syntaxe invalide pour le directive .req" + +#: config/tc-arm.c:1506 config/tc-mips.c:9916 read.c:2035 +#, c-format +msgid "Alignment too large: %d. assumed." +msgstr "Alignement trop grand: %d. assumé." + +#: config/tc-arm.c:1509 read.c:2040 +msgid "Alignment negative. 0 assumed." +msgstr "Alignement négatif: 0 assumé" + +#: config/tc-arm.c:1643 config/tc-m32r.c:417 read.c:2795 read.c:4857 +#, c-format +msgid "symbol `%s' already defined" +msgstr "symbole `%s' est déjà défini" + +#: config/tc-arm.c:1714 +msgid "selected processor does not support THUMB opcodes" +msgstr "le processeur choisi ne supporte pas les code-op THUMB" + +#: config/tc-arm.c:1727 +msgid "selected processor does not support ARM opcodes" +msgstr "le processeur choisi ne supporte pas les code-op ARM" + +#: config/tc-arm.c:1739 +#, c-format +msgid "invalid instruction size selected (%d)" +msgstr "taille d'instruction invalide (%d)" + +#: config/tc-arm.c:1774 +#, c-format +msgid "invalid operand to .code directive (%d) (expecting 16 or 32)" +msgstr "opérande invalide pour la directive .code (%d) (attendu 16 ou 32)" + +#: config/tc-arm.c:1785 +msgid "Garbage following instruction" +msgstr "Instruction suivie de rebuts" + +#. In the few cases where we might be able to accept something else +#. this error can be overridden. +#: config/tc-arm.c:1835 +#, c-format +msgid "Register expected, not '%.100s'" +msgstr "Registre attendu, pas '%.100s'" + +#. In the few cases where we might be able to accept +#. something else this error can be overridden. +#: config/tc-arm.c:1907 +msgid "flag for {c}psr instruction expected" +msgstr "fanion pour instruction {c}psr attendu" + +#: config/tc-arm.c:1937 +msgid "Illegal co-processor number" +msgstr "Numéro de co-processeur illégal" + +#: config/tc-arm.c:1944 +msgid "Bad or missing co-processor number" +msgstr "Numéro de co-processeur erroné ou manquant" + +#: config/tc-arm.c:1968 config/tc-arm.c:3054 config/tc-arm.c:3246 +msgid "bad or missing expression" +msgstr "expression erronée ou manquante" + +#: config/tc-arm.c:1974 +msgid "immediate co-processor expression too large" +msgstr "expression 'immediate' pour co-processeur est trop grande" + +#. In the few cases where we might be able to accept something else +#. this error can be overridden. +#: config/tc-arm.c:1999 +msgid "Co-processor register expected" +msgstr "Registre de coprocesseur attendu" + +#. In the few cases where we might be able to accept something else +#. this error can be overridden. +#: config/tc-arm.c:2023 +msgid "Floating point register expected" +msgstr "Registre en virgule flottante attendu" + +#: config/tc-arm.c:2040 +msgid "immediate expression expected" +msgstr "expression immédiate attendue" + +#: config/tc-arm.c:2055 +msgid "co-processor address must be word aligned" +msgstr "adresse du coprocesseur doit être alignée sur un mot" + +#: config/tc-arm.c:2061 +msgid "offset too large" +msgstr "décalage d'adresse trop grand" + +#: config/tc-arm.c:2109 +msgid "pc may not be used in post-increment" +msgstr "le PC ne peut être utilisé dans une instruction de post-incrémentation" + +#: config/tc-arm.c:2125 config/tc-arm.c:2578 config/tc-arm.c:3438 +#: config/tc-arm.c:4358 +msgid "pre-indexed expression expected" +msgstr "instruction pre-indexée attendue" + +#: config/tc-arm.c:2138 config/tc-arm.c:2591 config/tc-arm.c:3449 +#: config/tc-arm.c:4370 config/tc-arm.c:4716 +msgid "missing ]" +msgstr "] manquant" + +#: config/tc-arm.c:2148 +msgid "pc may not be used with write-back" +msgstr "PC le peut être utilisé en mode ré-écriture" + +#: config/tc-arm.c:2203 +msgid "comma expected after register name" +msgstr "virgule attendue après le nom du registre" + +#: config/tc-arm.c:2222 +msgid "{C|S}PSR expected" +msgstr "{C|S}PSR attendu" + +#: config/tc-arm.c:2250 +msgid "comma missing after psr flags" +msgstr "virgule manquante après les fanions psr" + +#: config/tc-arm.c:2267 config/tc-arm.c:2277 +msgid "only a register or immediate value can follow a psr flag" +msgstr "seul un registre ou une valeur immédiate peut suivre un fanion PSR" + +#: config/tc-arm.c:2284 +msgid "immediate value cannot be used to set this field" +msgstr "une valeur immédiate ne peut être utilisée pour ce champ" + +#: config/tc-arm.c:2301 config/tc-arm.c:3673 config/tc-arm.c:3939 +#: config/tc-arm.c:3959 +msgid "Invalid constant" +msgstr "constante invalide" + +#: config/tc-arm.c:2351 +msgid "rdhi, rdlo and rm must all be different" +msgstr "rdhi, rdlo et rm doivent tous être différents" + +#: config/tc-arm.c:2407 +msgid "rd and rm should be different in mul" +msgstr "rd et rm doivent être différents dans mul" + +#: config/tc-arm.c:2463 +msgid "rd and rm should be different in mla" +msgstr "rd et rm doivent être différents dans mla" + +#: config/tc-arm.c:2512 +#, c-format +msgid "acc0 expected, not '%.100s'" +msgstr "acc0 attendu, et non pas '%.100s'" + +#: config/tc-arm.c:2695 +msgid "rdhi and rdlo must be different" +msgstr "rdhi et rdlo doivent être différents" + +#: config/tc-arm.c:2815 +msgid "Warning: Instruction unpredictable when using r15" +msgstr "AVERTISSEMENT: instruction imprévisible lorsque r15 est utilisé" + +#: config/tc-arm.c:3063 config/tc-arm.c:3255 config/tc-arm.c:5503 +#: config/tc-arm.c:5536 config/tc-arm.c:5546 +msgid "immediate value out of range" +msgstr "valeur immediate est hors gamme" + +#: config/tc-arm.c:3403 +msgid "'[' expected after PLD mnemonic" +msgstr "'[' attendu après la mnémonique PLD" + +#: config/tc-arm.c:3428 config/tc-arm.c:3458 +msgid "writeback used in preload instruction" +msgstr "more ré-écriture utilisé dans une instruction de préchargement" + +#. Deny all knowledge. +#: config/tc-arm.c:3506 +#, c-format +msgid "bad instruction '%.100s'" +msgstr "instruction erronée '%.100s'" + +#: config/tc-arm.c:3530 +msgid "Destination register must be even" +msgstr "Registre de destination doit être pair" + +#: config/tc-arm.c:3536 +msgid "r12 or r14 not allowed here" +msgstr "r12 ou r14 ne sont pas permis ici" + +#: config/tc-arm.c:3544 +msgid "pre/post-indexing used when modified address register is destination" +msgstr "pré/post-indexation utilisée alors que le registre d'adresse est modifié pour la destination" + +#: config/tc-arm.c:3657 +msgid "bad_segment" +msgstr "bad_segment" + +#: config/tc-arm.c:3703 config/tc-arm.c:3714 +msgid "Shift expression expected" +msgstr "Expression de décalage attendu" + +#: config/tc-arm.c:3738 +msgid "shift requires register or #expression" +msgstr "décalage requiert un registre ou #expression" + +#: config/tc-arm.c:3739 +msgid "shift requires #expression" +msgstr "décalage requiert ou #expression" + +#: config/tc-arm.c:3769 +msgid "Shift of 0 ignored." +msgstr "décalage de 0 est ignoré" + +#: config/tc-arm.c:3775 +msgid "Invalid immediate shift" +msgstr "Décalage immédiat invalide" + +#: config/tc-arm.c:3930 config/tc-arm.c:4400 +msgid "Constant expression expected" +msgstr "Expression de constante attendu" + +#: config/tc-arm.c:3972 +msgid "Register or shift expression expected" +msgstr "Registre ou expression de décalage attendu" + +#: config/tc-arm.c:4025 +msgid "Invalid floating point immediate expression" +msgstr "Expression invalide d'une valeur immédiate en virgule flottante" + +#: config/tc-arm.c:4029 +msgid "Floating point register or immediate expression expected" +msgstr "Registre en virgule flottante ou expression immédiate attendu" + +#: config/tc-arm.c:4198 +msgid "address offset too large" +msgstr "décalage d'adresse trop grand" + +#: config/tc-arm.c:4275 +msgid "Processor does not support halfwords or signed bytes" +msgstr "Le processeur ne supporte pas les demi-mots ou les octets signés" + +#: config/tc-arm.c:4296 +msgid "Address expected" +msgstr "Adresse attendue" + +#: config/tc-arm.c:4326 config/tc-arm.c:4341 config/tc-arm.c:4379 +#, c-format +msgid "%s register same as write-back base" +msgstr "registre %s identique à la base de ré-écriture arrière" + +#: config/tc-arm.c:4328 config/tc-arm.c:4343 config/tc-arm.c:4381 +msgid "destination" +msgstr "destination" + +#: config/tc-arm.c:4328 config/tc-arm.c:4343 config/tc-arm.c:4381 +msgid "source" +msgstr "source" + +#: config/tc-arm.c:4420 +msgid "literal pool insertion failed" +msgstr "insertion dans le bassin de mots à échoué" + +#: config/tc-arm.c:4459 +msgid "Pre-increment instruction with translate" +msgstr "Instruction de pré-incrémentation avec traduction" + +#: config/tc-arm.c:4500 +msgid "Bad range in register list" +msgstr "Hors gamme dans la liste de registres" + +#: config/tc-arm.c:4508 config/tc-arm.c:4517 config/tc-arm.c:4559 +#, c-format +msgid "Warning: Duplicated register (r%d) in register list" +msgstr "AVERTISSEMENT: duplication de registre (r%d) dans la liste des registres" + +#: config/tc-arm.c:4520 +msgid "Warning: Register range not in ascending order" +msgstr "AVERTISSEMENT: registres ne sont pas dans un ordre ascendant" + +#: config/tc-arm.c:4532 +msgid "Missing `}'" +msgstr "`}' manquant" + +#: config/tc-arm.c:4548 +msgid "invalid register mask" +msgstr "masque de registre invalide" + +#: config/tc-arm.c:4569 config/tc-avr.c:852 config/tc-cris.c:2733 +#: config/tc-d10v.c:1560 config/tc-d30v.c:1865 config/tc-mips.c:3230 +#: config/tc-mips.c:4162 config/tc-mips.c:4947 config/tc-mips.c:5493 +#: config/tc-ppc.c:4854 config/tc-v850.c:2385 +msgid "expression too complex" +msgstr "expression trop complexe" + +#: config/tc-arm.c:4608 +msgid "r15 not allowed as base register" +msgstr "R15 n'est pas permis comme registre de base" + +#: config/tc-arm.c:4676 config/tc-arm.c:4690 +msgid "r15 not allowed in swap" +msgstr "R15 n'est pas permis dans l'espace de commutation (swap)" + +#: config/tc-arm.c:4788 +msgid "Use of r15 in bx in ARM mode is not really useful" +msgstr "Utilisation de R15 dans le bx en mode ARM n'est pas très utile" + +#: config/tc-arm.c:5044 config/tc-v850.c:1959 config/tc-v850.c:1980 +msgid "constant expression expected" +msgstr "expression de constante attendue" + +#: config/tc-arm.c:5050 +msgid "Constant value required for number of registers" +msgstr "Valeur de constante requise pour les numéros de registres" + +#: config/tc-arm.c:5058 +msgid "number of registers must be in the range [1:4]" +msgstr "Les numéros de registres doivent être dans les bornes [1:4]" + +#: config/tc-arm.c:5119 +msgid "R15 not allowed as base register with write-back" +msgstr "R15 n'est pas permis comme registre de base en mode ré-écriture" + +#: config/tc-arm.c:5367 +msgid "lo register required" +msgstr "registre LO requis" + +#: config/tc-arm.c:5375 +msgid "hi register required" +msgstr "registre HI requis" + +#: config/tc-arm.c:5445 +msgid "dest and source1 must be the same register" +msgstr "dest et source1 doivent être le même registre" + +#: config/tc-arm.c:5452 +msgid "subtract valid only on lo regs" +msgstr "soustraction valide seulement avec des registres LO" + +#: config/tc-arm.c:5476 +msgid "invalid Hi register with immediate" +msgstr "registre HI invalide avec une immédiat" + +#: config/tc-arm.c:5514 +msgid "invalid immediate value for stack adjust" +msgstr "valeur immédiate invalide pour l'ajustement de la pile" + +#: config/tc-arm.c:5525 +msgid "invalid immediate for address calculation" +msgstr "immédiat invalide pour le calcul d'adresse" + +#: config/tc-arm.c:5612 +msgid "source1 and dest must be same register" +msgstr "source1 et dest doivent être le même registre" + +#: config/tc-arm.c:5646 +msgid "Invalid immediate for shift" +msgstr "immédiat invalide pour un décalage" + +#: config/tc-arm.c:5725 +msgid "only lo regs allowed with immediate" +msgstr "seul les registres LO sont permis avec un immédiat" + +#: config/tc-arm.c:5744 +msgid "invalid immediate" +msgstr "type immédiat invalide" + +#: config/tc-arm.c:5798 +msgid "expected ']'" +msgstr "']' attendu" + +#: config/tc-arm.c:5865 +msgid "byte or halfword not valid for base register" +msgstr "octet ou demi-mot non valide pour un registre de base" + +#: config/tc-arm.c:5870 +msgid "R15 based store not allowed" +msgstr "R15 utilisé comme registre de base de stockage n'est pas permis" + +#: config/tc-arm.c:5875 +msgid "Invalid base register for register offset" +msgstr "Registre de base invalide pour un registre de décalage" + +#: config/tc-arm.c:5893 +msgid "invalid offset" +msgstr "décalage invalide" + +#: config/tc-arm.c:5904 +msgid "invalid base register in load/store" +msgstr "registre de base invalide pour un chargement/stockage" + +#: config/tc-arm.c:5928 +msgid "Invalid offset" +msgstr "Décalage invalide" + +#: config/tc-arm.c:6003 +msgid "dest and source1 one must be the same register" +msgstr "dest et source1 doivent être le même registre" + +#: config/tc-arm.c:6011 +msgid "Rs and Rd must be different in MUL" +msgstr "Rs et Rd doivent être différents dans MUL" + +#: config/tc-arm.c:6155 +msgid "Inserted missing '!': load/store multiple always writes back base register" +msgstr "Insertion de '!' manquant: chargement/stockage multiple exécute toujours des ré-écritures sur le registre de base" + +#: config/tc-arm.c:6171 config/tc-arm.c:6271 +msgid "Expression too complex" +msgstr "Expression trop complexe" + +#: config/tc-arm.c:6177 +msgid "only lo-regs valid in load/store multiple" +msgstr "seuls les registres LO sont valides dans de multiples chargement/stockage" + +#: config/tc-arm.c:6223 +msgid "Syntax: ldrs[b] Rd, [Rb, Ro]" +msgstr "Syntaxe: ldrs[b] Rd, [Rb, Ro]" + +#: config/tc-arm.c:6287 +msgid "invalid register list to push/pop instruction" +msgstr "liste de registres invalide pour les instructions push/pop" + +#: config/tc-arm.c:6429 config/tc-cris.c:664 +msgid "Virtual memory exhausted" +msgstr "Mémoire virtuelle épuisée" + +#: config/tc-arm.c:6835 +#, c-format +msgid "invalid constant (%lx) after fixup" +msgstr "constante invalide (%lx) après le correctif" + +#: config/tc-arm.c:6871 +#, c-format +msgid "Unable to compute ADRL instructions for PC offset of 0x%lx" +msgstr "Incapable de calculer les instructions ADRL pour le décalage PC de 0x%lx" + +#: config/tc-arm.c:6901 +#, c-format +msgid "bad immediate value for offset (%ld)" +msgstr "valeur immédiate erronée pour le décalage (%ld)" + +#: config/tc-arm.c:6923 config/tc-arm.c:6945 +msgid "invalid literal constant: pool needs to be closer" +msgstr "litéral de constante invalide: le bassin doit être plus près" + +#: config/tc-arm.c:6925 +#, c-format +msgid "bad immediate value for half-word offset (%ld)" +msgstr "valeur immédiate erronée pour le décalage d'un demi-mot (%ld)" + +#: config/tc-arm.c:6962 +msgid "shift expression is too large" +msgstr "l'expression de décalage est trop grande" + +#: config/tc-arm.c:6981 config/tc-arm.c:6990 +msgid "Invalid swi expression" +msgstr "expression 'swi' invalide" + +#: config/tc-arm.c:7000 +msgid "Invalid expression in load/store multiple" +msgstr "Expression invalide dans chargement/stockage multiples" + +#: config/tc-arm.c:7053 +msgid "gas can't handle same-section branch dest >= 0x04000000" +msgstr "gas ne peut traiter la destination d'un branchement d'un même section >= 0x04000000" + +#: config/tc-arm.c:7062 +msgid "out of range branch" +msgstr "branchement hors gamme" + +#: config/tc-arm.c:7095 config/tc-arm.c:7111 config/tc-mips.c:9743 +msgid "Branch out of range" +msgstr "Branchement hors gammme" + +#: config/tc-arm.c:7134 +msgid "Branch with link out of range" +msgstr "Branchement avec un lien hors gamme" + +#: config/tc-arm.c:7201 +msgid "Illegal value for co-processor offset" +msgstr "Valeur illégale pour un décalage de co-processeur" + +#: config/tc-arm.c:7225 +#, c-format +msgid "Invalid offset, target not word aligned (0x%08X)" +msgstr "Décalage invalide, cible n'est pas aligner sur une frontière de mot (0x%08X)" + +#: config/tc-arm.c:7231 config/tc-arm.c:7240 config/tc-arm.c:7247 +#: config/tc-arm.c:7254 config/tc-arm.c:7261 +#, c-format +msgid "Invalid offset, value too big (0x%08lX)" +msgstr "Décalage invalide, valeur trop grande (0x%08lX)" + +#: config/tc-arm.c:7300 +msgid "Invalid immediate for stack address calculation" +msgstr "Immédiat invalide pour un calcul d'adresse de pile" + +#: config/tc-arm.c:7309 +#, c-format +msgid "Invalid immediate for address calculation (value = 0x%08lX)" +msgstr "Immédait invalide pour le calcul d'adresse (valeur = 0x%08lX)" + +#: config/tc-arm.c:7319 +msgid "Invalid 8bit immediate" +msgstr "Immédiat de 8 bits invalide" + +#: config/tc-arm.c:7327 +msgid "Invalid 3bit immediate" +msgstr "Immédiat de 3 bits invalide" + +#: config/tc-arm.c:7343 +#, c-format +msgid "Invalid immediate: %ld is too large" +msgstr "Immédiat invalide: %ld est trop grand" + +#: config/tc-arm.c:7358 +#, c-format +msgid "Illegal Thumb shift value: %ld" +msgstr "Valeur de décalage Thumb illégale: %ld" + +#: config/tc-arm.c:7372 config/tc-mn10300.c:1961 +#, c-format +msgid "Bad relocation fixup type (%d)" +msgstr "Type de correctif de relocalisation erroné (%d)" + +#: config/tc-arm.c:7445 +msgid "Literal referenced across section boundary (Implicit dump?)" +msgstr "Litéral référencé à travers une frontière de section (vidange implicite?)" + +#: config/tc-arm.c:7458 +#, c-format +msgid "Internal_relocation (type %d) not fixed up (IMMEDIATE)" +msgstr "Relocalisation interne (type %d) n'est pas corrigé (IMMEDIATE)" + +#: config/tc-arm.c:7464 +msgid "ADRL used for a symbol not defined in the same file" +msgstr "ADRL utilisé pour un symbole qui n'est pas défini dans le même fichier" + +#: config/tc-arm.c:7469 +#, c-format +msgid "Internal_relocation (type %d) not fixed up (OFFSET_IMM)" +msgstr "Relocalisation interne (type %d) n'est pas corrigé (OFFSET_IMM)" + +#: config/tc-arm.c:7490 config/tc-cris.c:2672 config/tc-mcore.c:2109 +#: config/tc-ns32k.c:2369 +msgid "" +msgstr "" + +#: config/tc-arm.c:7493 +#, c-format +msgid "Cannot represent %s relocation in this object file format" +msgstr "Ne peut représenter la relocalisation %s dans ce format de fichier objet" + +#: config/tc-arm.c:7514 config/tc-mips.c:11261 config/tc-sh.c:3177 +#, c-format +msgid "Can not represent %s relocation in this object file format" +msgstr "Ne peut représenter la relocalisation %s dans ce format de fichier objet" + +#: config/tc-arm.c:7611 +#, c-format +msgid "No operator -- statement `%s'\n" +msgstr "Pas d'opérateur -- déclaration `%s'\n" + +#: config/tc-arm.c:7629 +msgid "selected processor does not support this opcode" +msgstr "le processeur choisi ne supporte pas ce code-op" + +#: config/tc-arm.c:7675 +#, c-format +msgid "Opcode `%s' must have suffix from list: <%s>" +msgstr "Code-op `%s' doit avoir un suffixe dans la liste: <%s>" + +#: config/tc-arm.c:7706 +msgid "Warning: Use of the 'nv' conditional is deprecated\n" +msgstr "AVERTISSEMENT: utilisation du conditionnal 'nv' est déprécié\n" + +#: config/tc-arm.c:7723 +#, c-format +msgid "Opcode `%s' is unconditional\n" +msgstr "Code-op `%s' est inconditionnel\n" + +#: config/tc-arm.c:7747 +#, c-format +msgid "Opcode `%s' must have suffix from <%s>\n" +msgstr "Code-op `%s' doit avoir une suffixe dans <%s>\n" + +#: config/tc-arm.c:7838 +#, c-format +msgid "register '%s' does not exist\n" +msgstr "registre '%s' n'existe pas\n" + +#: config/tc-arm.c:7843 +#, c-format +msgid "ignoring redefinition of register alias '%s'" +msgstr "a ignoré la redéfinition de l'alias du registre '%s'" + +#: config/tc-arm.c:7849 +#, c-format +msgid "ignoring redefinition of register alias '%s' to non-existant register '%s'" +msgstr "redéfinition ignorée de l'alias de registre '%s' pour un registre non existant '%s'" + +#: config/tc-arm.c:7853 +msgid "ignoring incomplete .req pseuso op" +msgstr "a ignoré le pseudo opérateur incomplet .req" + +#: config/tc-arm.c:7860 +#, c-format +msgid "bad instruction `%s'" +msgstr "instruction `%s' erronée" + +#: config/tc-arm.c:8035 +msgid "Unrecognised APCS switch -m%s" +msgstr "Commutateur APCS non reconnue -m%s" + +#: config/tc-arm.c:8192 config/tc-arm.c:8205 config/tc-arm.c:8218 +#: config/tc-arm.c:8231 config/tc-arm.c:8237 +msgid "Invalid architecture variant -m%s" +msgstr "Variante d'architecture invalide -m%s" + +#: config/tc-arm.c:8244 +#, c-format +msgid "Invalid processor variant -m%s" +msgstr "Variante de processor invalide -m%s" + +#: config/tc-arm.c:8267 +msgid "" +" ARM Specific Assembler Options:\n" +" -m[arm][] select processor variant\n" +" -m[arm]v[2|2a|3|3m|4|4t|5[t][e]] select architecture variant\n" +" -mthumb only allow Thumb instructions\n" +" -mthumb-interwork mark the assembled code as supporting interworking\n" +" -mall allow any instruction\n" +" -mfpa10, -mfpa11 select floating point architecture\n" +" -mfpe-old don't allow floating-point multiple instructions\n" +" -mno-fpu don't allow any floating-point instructions.\n" +" -k generate PIC code.\n" +msgstr "" +" Options spécifique de l'assembleur ARM:\n" +" -m[arm][] sélectionner la vairante du processeur\n" +" -m[arm]v[2|2a|3|3m|4|4t|5[t][e]] sélectionner la variante d'architecture\n" +" -mthumb permettre seulement des instruction 'Thumb'\n" +" -mthumb-interwork marquer le code assemblé comme supportant\n" +" l'inter-réseautage\n" +" -mall permettre n'importe quelle instruction\n" +" -mfpa10, -mfpa11 sélectionner l'architecture en virgule flottante\n" +" -mfpe-old ne peut permettre les instructions multiples\n" +" en virgule flotttante\n" +" -mno-fpu ne pas permettre aucune instruction en virgule\n" +" flottante\n" +" -k générer code indépendant de la position PIC\n" + +#: config/tc-arm.c:8279 +msgid "" +" -mapcs-32, -mapcs-26 specify which ARM Procedure Calling Standard to use\n" +" -matpcs use ARM/Thumb Procedure Calling Standard\n" +" -mapcs-float floating point args are passed in FP regs\n" +" -mapcs-reentrant the code is position independent/reentrant\n" +msgstr "" +" -mapcs-32, -mapcs-26 spécifier le type d'appel de procédure standard ARM\n" +" à utiliser\n" +" -matpcs utiliser l'appel de procédure stanard ARM/Thumb\n" +" -mapcs-float passer les arguments en virgule flottante dans\n" +" les registres FP\n" +" -mapcs-reentrant le code est indépendant de la position/ré-entrant\n" + +#: config/tc-arm.c:8286 +msgid " -moabi support the old ELF ABI\n" +msgstr " -moabi supporter l'ancien ABI ELF\n" + +#: config/tc-arm.c:8290 +msgid "" +" -EB assemble code for a big endian cpu\n" +" -EL assemble code for a little endian cpu\n" +msgstr "" +" -EB assembler le code pour un système à octets\n" +" de poids fort\n" +" -EL assembler le code pour un système à octets\n" +" de poids faible\n" + +#: config/tc-arm.c:8443 +msgid "%s: unexpected function type: %d" +msgstr "%s: type de fonction inattendu: %d" + +#: config/tc-arm.h:98 +msgid "arm convert_frag\n" +msgstr "arm convert_frag\n" + +#: config/tc-avr.c:185 +msgid "Known MCU names:" +msgstr "Noms MCU connus:" + +#: config/tc-avr.c:254 +msgid "" +"AVR options:\n" +" -mmcu=[avr-name] select microcontroller variant\n" +" [avr-name] can be:\n" +" avr1 - AT90S1200, ATtiny1x, ATtiny28\n" +" avr2 - AT90S2xxx, AT90S4xxx, AT90S8xxx, ATtiny22\n" +" avr3 - ATmega103, ATmega603\n" +" avr4 - ATmega83, ATmega85\n" +" avr5 - ATmega161, ATmega163, ATmega32, AT94K\n" +" or immediate microcontroller name.\n" +msgstr "" +"Options AVR:\n" +" -mmcu=[nom-avr] sélectionner la variante du micro-contrôleur\n" +" [nom-avr] peut être:\n" +" avr1 - AT90S1200, ATtiny1x, ATtiny28\n" +" avr2 - AT90S2xxx, AT90S4xxx, AT90S8xxx, ATtiny22\n" +" avr3 - ATmega103, ATmega603\n" +" avr4 - ATmega83, ATmega85\n" +" avr5 - ATmega161, ATmega163, ATmega32, AT94K\n" +" ou un nom immédiat de micro-contrôleur\n" + +#: config/tc-avr.c:264 +msgid "" +" -mall-opcodes accept all AVR opcodes, even if not supported by MCU\n" +" -mno-skip-bug disable warnings for skipping two-word instructions\n" +" (default for avr4, avr5)\n" +" -mno-wrap reject rjmp/rcall instructions with 8K wrap-around\n" +" (default for avr3, avr5)\n" +msgstr "" +" -mall-opcodes accepter tous les code-op AVR, même non supportés par MCU\n" +" -mno-skip-bug désactiver les avertissements pour l'escamotage des\n" +" instructions de 2 mots (par défaut pour avr4, avr5)\n" +" -mno-wrap rejeter les instructions rjmp/rcall avec un emballage de 8K\n" +" (par défaut pour avr3, avr5)\n" + +#: config/tc-avr.c:312 +msgid "unknown MCU: %s\n" +msgstr "MCU inconnue: %s\n" + +#: config/tc-avr.c:321 +#, c-format +msgid "redefinition of mcu type `%s' to `%s'" +msgstr "redéfinition du type MCU `%s' à `%s'" + +#: config/tc-avr.c:372 config/tc-d10v.c:313 config/tc-d30v.c:366 +#: config/tc-mips.c:8789 config/tc-mn10200.c:375 config/tc-pj.c:356 +#: config/tc-ppc.c:4518 config/tc-sh.c:2058 config/tc-v850.c:1291 +msgid "bad call to md_atof" +msgstr "appel erroné à md_atof" + +#: config/tc-avr.c:435 +msgid "constant value required" +msgstr "valeur constante requise" + +#: config/tc-avr.c:438 +msgid "number must be less than %d" +msgstr "le nombre doit être plus petit que %d" + +#: config/tc-avr.c:490 +msgid "`,' required" +msgstr "`,' requis" + +#: config/tc-avr.c:509 +msgid "undefined combination of operands" +msgstr "combinaison d'opérandes indéfinie" + +#: config/tc-avr.c:518 +msgid "skipping two-word instruction" +msgstr "escamotage d'une instruction de 2 mots" + +#: config/tc-avr.c:580 +msgid "register r16-r23 required" +msgstr "resigstres R16-R32 requis" + +#: config/tc-avr.c:586 +msgid "register number above 15 required" +msgstr "Numéro de registre au-dessus de 15 est requis" + +#: config/tc-avr.c:592 +msgid "even register number required" +msgstr "numéro paire de registre est requis" + +#: config/tc-avr.c:598 +msgid "register r24, r26, r28 or r30 required" +msgstr "registre R24, R26, R28 ou R30 est requis" + +#: config/tc-avr.c:604 +msgid "register name or number from 0 to 31 required" +msgstr "nom de registre ou numéro de registre 0 à 31 est requis" + +#: config/tc-avr.c:622 +msgid "pointer register (X, Y or Z) required" +msgstr "registre de pointeur (X, Y ou Z) est requist" + +#: config/tc-avr.c:629 +msgid "cannot both predecrement and postincrement" +msgstr "ne peut à la fois pré-décrémenter et post-décrémenter" + +#: config/tc-avr.c:637 +msgid "addressing mode not supported" +msgstr "mode d'adressage non supporté" + +#: config/tc-avr.c:643 +msgid "can't predecrement" +msgstr "ne peut faire une pré-décrémentation" + +#: config/tc-avr.c:646 +msgid "pointer register Z required" +msgstr "registre de pointeurs Z requis" + +#: config/tc-avr.c:664 +msgid "pointer register (Y or Z) required" +msgstr "registre de pointeurs (Y ou Z) requis" + +#: config/tc-avr.c:769 +msgid "unknown constraint `%c'" +msgstr "contrainte inconnue `%c'" + +#: config/tc-avr.c:882 config/tc-avr.c:898 config/tc-avr.c:999 +#, c-format +msgid "odd address operand: %ld" +msgstr "opérande d'adresse impaire: %ld" + +#: config/tc-avr.c:890 config/tc-avr.c:909 +#, c-format +msgid "operand out of range: %ld" +msgstr "opérande hors gamme: %ld" + +#: config/tc-avr.c:1008 config/tc-d10v.c:1631 config/tc-d30v.c:1990 +msgid "line %d: unknown relocation type: 0x%x" +msgstr "ligne %d: type de relocalisation inconnu: 0x%x" + +#: config/tc-avr.c:1022 +msgid "only constant expression allowed" +msgstr "seule une expression de constante est permise" + +#: config/tc-avr.c:1060 config/tc-d10v.c:1495 config/tc-d30v.c:1807 +#: config/tc-mn10200.c:1254 config/tc-mn10300.c:1810 config/tc-ppc.c:5161 +#: config/tc-v850.c:2301 +#, c-format +msgid "reloc %d not supported by object file format" +msgstr "relocalisation %d n'est pas supporté dans le format du fichier objet" + +#: config/tc-avr.c:1084 config/tc-d10v.c:1102 config/tc-d10v.c:1116 +#: config/tc-h8300.c:1239 config/tc-h8500.c:1098 config/tc-mcore.c:988 +#: config/tc-pj.c:265 config/tc-sh.c:1640 config/tc-z8k.c:1195 +msgid "can't find opcode " +msgstr "ne peut repérer le code-op " + +#: config/tc-avr.c:1101 +#, c-format +msgid "illegal opcode %s for mcu %s" +msgstr "code-op illégale %s pour MCU %s" + +#: config/tc-avr.c:1109 +msgid "garbage at end of line" +msgstr "rebut à la fin de la ligne" + +#: config/tc-avr.c:1173 +msgid "illegal expression" +msgstr "expression illégale" + +#: config/tc-avr.c:1199 config/tc-avr.c:1265 +msgid "`)' required" +msgstr "`)' requis" + +#: config/tc-avr.c:1219 +#, c-format +msgid "constant out of 8-bit range: %d" +msgstr "constante hors gamme pour les bornes de 8 bits: %d" + +#: config/tc-avr.c:1222 +msgid "expression possibly out of 8-bit range" +msgstr "expression possiblement hors gamme pour 8 bits" + +#: config/tc-avr.c:1293 config/tc-avr.c:1300 +msgid "illegal %srelocation size: %d" +msgstr "taille des %srelocalisations illégale: %d" + +#: config/tc-cris.c:672 +msgid "Can't hash `%s': %s\n" +msgstr "Ne peut adresser par hachage `%s': %s\n" + +#: config/tc-cris.c:673 +msgid "(unknown reason)" +msgstr "(raison inconnue)" + +#: config/tc-cris.c:677 +#, c-format +msgid "Buggy opcode: `%s' \"%s\"\n" +msgstr "Code-op erroné: `%s' \"%s\"\n" + +#: config/tc-cris.c:1002 +#, c-format +msgid "Immediate value not in 5 bit unsigned range: %ld" +msgstr "Valeur immédiate n'est pas dans les bornes non signées de 5 bits: %ld" + +#: config/tc-cris.c:1018-R option not supported on this target." +#, c-format +msgid "Immediate value not in 4 bit unsigned range: %ld" +msgstr "Valeur immédiate n'est pas dans les bornes non signées de 4 bits: %ld" + +#: config/tc-cris.c:1057 +#, c-format +msgid "Immediate value not in 6 bit range: %ld" +msgstr "Valeur immédiate n'est pas dans les bornes non signées de 6 bits: %ld" + +#: config/tc-cris.c:1072 +#, c-format +msgid "Immediate value not in 6 bit unsigned range: %ld" +msgstr "Valeur immédiate n'est pas dans les bornes non signées de 6 bits: %ld" + +#. Others have a generic warning. +#: config/tc-cris.c:1159 +#, c-format +msgid "Unimplemented register `%s' specified" +msgstr "Registre spécifié non implanté `%s'" + +#. We've come to the end of instructions with this +#. opcode, so it must be an error. +#: config/tc-cris.c:1309 +msgid "Illegal operands" +msgstr "opérandes illégales" + +#: config/tc-cris.c:1341 config/tc-cris.c:1372 +#, c-format +msgid "Immediate value not in 8 bit range: %ld" +msgstr "Valeur immédiate n'est pas dans les bornes non signées de 8 bits: %ld" + +#: config/tc-cris.c:1351 config/tc-cris.c:1379 +#, c-format +msgid "Immediate value not in 16 bit range: %ld" +msgstr "Valeur immédiate n'est pas dans les bornes non signées de 16 bits: %ld" + +#. FIXME: Find out and change to as_warn_where. Add testcase. +#: config/tc-cris.c:2316 +msgid "32-bit conditional branch generated" +msgstr "Branchement conditionnel 32 bits a été généré" + +#. FIXME: Is this function mentioned in the internals.texi manual? If +#. not, add it. +#: config/tc-cris.c:2395 +msgid "Bad call to md_atof () - floating point formats are not supported" +msgstr "Appel erroné à md_atof() - format en virgule flottante n'est pas supporté" + +#: config/tc-cris.c:2456 +#, c-format +msgid "Value not in 16 bit range: %ld" +msgstr "Valeur n'est pas dans les bornes de 16 bits: %ld" + +#: config/tc-cris.c:2466 +#, c-format +msgid "Value not in 8 bit range: %ld" +msgstr "Valeur n'est pas dans les bornes de 8 bits: %ld" + +#: config/tc-cris.c:2473 +#, c-format +msgid "Value not in 4 bit unsigned range: %ld" +msgstr "Valeur n'est pas dans les bornes de 4 bits: %ld" + +#: config/tc-cris.c:2480 +#, c-format +msgid "Value not in 5 bit unsigned range: %ld" +msgstr "Valeur n'est pas dans les bornes de 5 bits: %ld" + +#: config/tc-cris.c:2487 +#, c-format +msgid "Value not in 6 bit range: %ld" +msgstr "Valeur n'est pas dans les bornes de 6 bits: %ld" + +#: config/tc-cris.c:2494 +#, c-format +msgid "Value not in 6 bit unsigned range: %ld" +msgstr "Valeur n'est pas dans les bornes non signées de 6 bits: %ld" + +#: config/tc-cris.c:2542 +msgid "Please use --help to see usage and options for this assembler.\n" +msgstr "SVP utiliser --help pour connaître les options pour ect assembleur.\n" + +#: config/tc-cris.c:2554 +msgid "--no-underscore is invalid with a.out format" +msgstr "--no-underscore est invalide pour une format a.out" + +#: config/tc-cris.c:2619 +msgid "Semantics error. This type of operand can not be relocated, it must be an assembly-time constant" +msgstr "" +"Erreur de sémantique. Ce type d'opérande ne peut être relocalisé, ce doit être\n" +"une constante utilisée au moment de l'assemblage" + +#: config/tc-cris.c:2673 +#, c-format +msgid "Cannot generate relocation type for symbol %s, code %s" +msgstr "Ne peut générer un type de relocalisation pour le symbole %s, code %s" + +#: config/tc-cris.c:2686 +msgid "CRIS-specific options:\n" +msgstr "Options spécifiques CRIS:\n" + +#: config/tc-cris.c:2688 +msgid " -h, -H Don't execute, print this help text. Deprecated.\n" +msgstr " -h, -H afficher l'aide mémoire. Déprécié.\n" + +#: config/tc-cris.c:2690 +msgid " -N Warn when branches are expanded to jumps.\n" +msgstr " -N avertir lorsque l'expansion des branches est faite pour des sauts.\n" + +#: config/tc-cris.c:2692 +msgid " --underscore User symbols are normally prepended with underscore.\n" +msgstr "" +" --underscore symboles usagers sont normalement préfixés avec\n" +" le caractère de soulignement.\n" + +#: config/tc-cris.c:2694 +msgid " Registers will not need any prefix.\n" +msgstr " registres n'ont pas besoin de préfixe\n" + +#: config/tc-cris.c:2696 +msgid " --no-underscore User symbols do not have any prefix.\n" +msgstr " --no-underscore les symboles usagers n'ont pas de préfixe\n" + +#: config/tc-cris.c:2698 +msgid " Registers will require a `$'-prefix.\n" +msgstr " registres auront besoin de `$'-prefix\n" + +#: config/tc-cris.c:2718 +msgid "Invalid relocation" +msgstr "Relocalisation invalide" + +#: config/tc-cris.c:2758 +msgid "Invalid pc-relative relocation" +msgstr "relocalisation relative du PC invalide" + +#: config/tc-cris.c:2796 +#, c-format +msgid "Adjusted signed .word (%ld) overflows: `switch'-statement too large." +msgstr "A ajusté le débordement signé de .word (%ld): option -statement trop grande." + +#: config/tc-cris.c:2870 +msgid "Unknown .syntax operand" +msgstr "Opérande inconnue .syntax" + +#: config/tc-d10v.c:246 +msgid "" +"D10V options:\n" +"-O Optimize. Will do some operations in parallel.\n" +"--gstabs-packing Pack adjacent short instructions together even\n" +" when --gstabs is specified. On by default.\n" +"--no-gstabs-packing If --gstabs is specified, do not pack adjacent\n" +" instructions together.\n" +msgstr "" +"Options D10V:\n" +"-O Optimiser. Certaines opérations seont faites en parallèle.\n" +"--gstabs-packing empaqueter les instructions adjacentes short ensembles mêne\n" +" lorsque --gstabs est spécifié. Activé par défaut.\n" +"--no-gstabs-packing Si --gstabs est spécifié, ne pas empaqueter les instructions\n" +" adjacentes ensembles.\n" + +#: config/tc-d10v.c:530 config/tc-d30v.c:550 config/tc-mn10200.c:951 +#: config/tc-mn10300.c:1332 config/tc-ppc.c:1972 config/tc-tic80.c:278 +#: config/tc-v850.c:2073 +msgid "illegal operand" +msgstr "opérande illégale" + +#: config/tc-d10v.c:573 config/tc-d10v.c:655 config/tc-d30v.c:656 +#, c-format +msgid "operand out of range: %d" +msgstr "opérande hors gamme: %d" + +#: config/tc-d10v.c:716 +msgid "Instruction must be executed in parallel with another instruction." +msgstr "L'instruction doit être exécutée en parallèle avec une autre." + +#: config/tc-d10v.c:772 +msgid "Instruction must be executed in parallel" +msgstr "L'instruction doit être exécutée en parallèle" + +#: config/tc-d10v.c:775 +msgid "Long instructions may not be combined." +msgstr "Les instructions longues ne peuvent pas être combinées." + +#: config/tc-d10v.c:817 +msgid "One of these instructions may not be executed in parallel." +msgstr "Une de ces instructions ne peut pas être exécutée en parallèle" + +#: config/tc-d10v.c:821 config/tc-d30v.c:877 +msgid "Two IU instructions may not be executed in parallel" +msgstr "Deux instruction IU ne peuvent pas être exécutées en parallèle" + +#: config/tc-d10v.c:823 config/tc-d10v.c:831 config/tc-d10v.c:848 +#: config/tc-d10v.c:865 config/tc-d30v.c:878 config/tc-d30v.c:887 +msgid "Swapping instruction order" +msgstr "Ordre d'instruction de commutation (swapping)" + +#: config/tc-d10v.c:829 config/tc-d30v.c:884 +msgid "Two MU instructions may not be executed in parallel" +msgstr "Deux instructions MU ne peuvent pas être exécutées en parallèle." + +#: config/tc-d10v.c:852 config/tc-d30v.c:904 +msgid "IU instruction may not be in the left container" +msgstr "L'instruction IU ne peut pas être laissé dans le conteneur de gauche" + +#: config/tc-d10v.c:854 config/tc-d10v.c:871 MRO +msgid "Instruction in R container is squashed by flow control instruction in L container." +msgstr "" +"Instruction dans le conteneur R est écrasé par une instruction de contrôle de flux\n" +"du conteneur L." + +#: config/tc-d10v.c:869 config/tc-d30v.c:915 +msgid "MU instruction may not be in the right container" +msgstr "L'instruction MU ne peut pas être dans le conteneur de droite" + +#: config/tc-d10v.c:877 config/tc-d30v.c:927 +msgid "unknown execution type passed to write_2_short()" +msgstr "type d'excution inconnue passé à write_2_short()" + +#: config/tc-d10v.c:1130 config/tc-d10v.c:1151 config/tc-d30v.c:1411 +msgid "Unable to mix instructions as specified" +msgstr "Incapable de mélanger les instructions tel que spécifié" + +#: config/tc-d10v.c:1198 config/tc-d30v.c:1548 +msgid "unknown opcode: %s" +msgstr "code-op inconnu: %s" + +#: config/tc-d10v.c:1280 config/tc-d10v.c:1451 config/tc-tic80.c:535 +msgid "bad opcode or operands" +msgstr "Code-op ou opérandes erronés" + +#: config/tc-d10v.c:1353 config/tc-m68k.c:4286 +msgid "value out of range" +msgstr "valeur hors gamme" + +#: config/tc-d10v.c:1426 +msgid "illegal operand - register name found where none expected" +msgstr "opérande illégale - nom de registre repéré alors qu'aucun n'était attendu" + +#: config/tc-d10v.c:1462 config/tc-tic80.c:546 +msgid "Register number must be EVEN" +msgstr "le numéro de registre doit être PAIR" + +#: config/tc-d10v.c:1611 +#, c-format +msgid "line %d: rep or repi must include at least 4 instructions" +msgstr "ligne %d: rep ou repi doit inclure au moins 4 instructions" + +#: config/tc-d30v.c:192 +#, c-format +msgid "Register name %s conflicts with symbol of the same name" +msgstr "Nom de registre %s est en conflit avec un symbole du même nom" + +#: config/tc-d30v.c:288 +msgid "" +"\n" +"D30V options:\n" +"-O Make adjacent short instructions parallel if possible.\n" +"-n Warn about all NOPs inserted by the assembler.\n" +"-N\t\t\tWarn about NOPs inserted after word multiplies.\n" +"-c Warn about symbols whoes names match register names.\n" +"-C Opposite of -C. -c is the default.\n" +msgstr "" +"\n" +"Option D30V:\n" +"-O rendre le instructions adjacentes courtes parallèles\n" +" si possible.\n" +"-n avertir de tous les NOP insérés par l'assembleur.\n" +"-N avertir de tous les NOP insérés après des mots multiples\n" +"-c avertir de tous les symboles ayant des noms identiques à\n" +" aux noms de registres\n" +"-C inverse de -c. -c est le défaut.\n" + +#: config/tc-d30v.c:462 +msgid "unexpected 12-bit reloc type" +msgstr "type de relocalisation 12-bits attendu" + +#: config/tc-d30v.c:469 +msgid "unexpected 18-bit reloc type" +msgstr "type de relocalisation 18-bits attendu" + +#: config/tc-d30v.c:720 +#, c-format +msgid "%s NOP inserted" +msgstr "%s NOP inséré" + +#: config/tc-d30v.c:721 +msgid "sequential" +msgstr "séquentiel" + +#: config/tc-d30v.c:721 +msgid "parallel" +msgstr "parallèle" + +#: config/tc-d30v.c:873 +msgid "Instructions may not be executed in parallel" +msgstr "Les instructions ne peuvent pas être exécutées en parallèle" + +#: config/tc-d30v.c:886 +#, c-format +msgid "Executing %s in IU may not work" +msgstr "Exécution de %s dans IU peut ne pas fonctionner" + +#: config/tc-d30v.c:893 +#, c-format +msgid "Executing %s in IU may not work in parallel execution" +msgstr "Exécution de %s dans IU peut ne pas fonctionner lors d'une exécution en parallèle" + +#: config/tc-d30v.c:906 +#, c-format +msgid "special left instruction `%s' kills instruction `%s' in right container" +msgstr "instruction spéciale de gauche %s' écrase l'instruction du conteneur de droite `%s'" + +#: config/tc-d30v.c:917 +#, c-format +msgid "Executing %s in reverse serial with %s may not work" +msgstr "Exécuter %s en ordre sériel inverse avec %s peut ne pas fonctionner" + +#: config/tc-d30v.c:920 +#, c-format +msgid "Executing %s in IU in reverse serial may not work" +msgstr "Exécuter %s dans IU en ordre sériel inverse peut ne pas fonctionner" + +#: config/tc-d30v.c:1290 config/tc-d30v.c:1307 +msgid "Cannot assemble instruction" +msgstr "Ne peut assembler l'instruction" + +#: config/tc-d30v.c:1292 +msgid "First opcode is long. Unable to mix instructions as specified." +msgstr "Le 1er code-op est long. Incapable de mélanger des instructions tel que spécifié." + +#: config/tc-d30v.c:1361 +msgid "word of NOPs added between word multiply and load" +msgstr "mot de NOP ajouté entre 'word multiply' et 'load'" + +#: config/tc-d30v.c:1363 +msgid "word of NOPs added between word multiply and 16-bit multiply" +msgstr "mot de NOP ajouté entre 'word multiply' et '16- bits multiply'" + +#: config/tc-d30v.c:1395 +msgid "Instruction uses long version, so it cannot be mixed as specified" +msgstr "L'instruction utilise une version avec long, aussi elle ne peut être mélangée tel que spécifié" + +#: config/tc-d30v.c:1478 config/tc-d30v.c:1516 +msgid "unknown condition code: %s" +msgstr "code de condition inconnue: %s" + +#: config/tc-d30v.c:1509 +#, c-format +msgid "cmpu doesn't support condition code %s" +msgstr "cmpu ne supporte pas le code de condition %s" + +#: config/tc-d30v.c:1559 +#, c-format +msgid "operands for opcode `%s' do not match any valid format" +msgstr "opérande pour le code-op `%s' ne correspond pas avec un format valide" + +#: config/tc-d30v.c:1777 +msgid "Odd numbered register used as target of multi-register instruction" +msgstr "Registre numéroté impair utilisé comme cible d'une instruction à multiples resgistres" + +#: config/tc-d30v.c:1879 +#, c-format +msgid "line %d: unable to place address of symbol '%s' into a byte" +msgstr "ligne %d: incapable d'insérer l'adresse du symbole '%s' dans un octet" + +#: config/tc-d30v.c:1882 +#, c-format +msgid "line %d: unable to place value %x into a byte" +msgstr "ligne %d: incapable d'insérer la valeur %x dans un octet" + +#: config/tc-d30v.c:1890 +#, c-format +msgid "line %d: unable to place address of symbol '%s' into a short" +msgstr "ligne %d: incapable d'insérer l'adresse du symbole '%s' dans un short" + +#: config/tc-d30v.c:1893 +#, c-format +msgid "line %d: unable to place value %x into a short" +msgstr "ligne %d: incpable d'insérer la valeur %x dans un short" + +#: config/tc-d30v.c:1901 +#, c-format +msgid "line %d: unable to place address of symbol '%s' into a quad" +msgstr "ligne %d: incapable d'insérer l'adresse du symbole '%s' dans un quad" + +#: config/tc-d30v.c:2072 +#, c-format +msgid "value too large to fit in %d bits" +msgstr "valeur trop grande pour entrer dans %d bits" + +#: config/tc-d30v.c:2215 +#, c-format +msgid "Alignment too large: %d assumed" +msgstr "Alignement trop grand: %d assumé" + +#: config/tc-fr30.c:84 +msgid " FR30 specific command line options:\n" +msgstr " Options spécifiques de la ligne de commande FR30:\n" + +#: config/tc-fr30.c:143 +#, c-format +msgid "Instruction %s not allowed in a delay slot." +msgstr "Instruction %s n'est pas permise dans la plage de délai" + +#: config/tc-fr30.c:380 config/tc-m32r.c:1555 +msgid "Addend to unresolved symbol not on word boundary." +msgstr "Ajout d'un symbole non résolu n'est pas sur une frontière de mot" + +#: config/tc-fr30.c:538 config/tc-i960.c:772 config/tc-m32r.c:1864 +msgid "Bad call to md_atof()" +msgstr "appel erroné de md_atof()" + +#: config/tc-h8300.c:245 config/tc-h8300.c:253 +msgid "Reg not valid for H8/300" +msgstr "Registre invalide pour H8/300" + +#: config/tc-h8300.c:413 config/tc-h8300.c:416 config/tc-h8300.c:419 +#: config/tc-h8300.c:423 +msgid "Invalid register list for ldm/stm\n" +msgstr "Liste de registres invalide pour ldm/stm\n" + +#: config/tc-h8300.c:475 config/tc-h8300.c:537 config/tc-h8300.c:544 +msgid "Wrong size pointer register for architecture." +msgstr "Taille erronée du registre de pointeur pour l'architecture" + +#: config/tc-h8300.c:502 config/tc-h8300.c:511 config/tc-h8300.c:521 +msgid "expected @(exp, reg16)" +msgstr "@ attendu (exp, reg16)" + +#: config/tc-h8300.c:600 +msgid "expect :8 or :16 here" +msgstr "attendu :8 ou :16 ici" + +#: config/tc-h8300.c:801 +msgid "operand %s0x%lx out of range." +msgstr "opérande %s0x%lx hors gamme." + +#: config/tc-h8300.c:889 +msgid "Can't work out size of operand.\n" +msgstr "Ne peut traiter la taille de l'opérande.\n" + +#: config/tc-h8300.c:937 +#, c-format +msgid "Opcode `%s' with these operand types not available in H8/300 mode" +msgstr "Code-op `%s' avec ces type d'opérandes ne sont pas disponibles en mode H8/300" + +#: config/tc-h8300.c:988 config/tc-h8300.c:1008 +msgid "Need #1 or #2 here" +msgstr "A besoin de #1 ou #2 ici" + +#: config/tc-h8300.c:1003 +msgid "#4 not valid on H8/300." +msgstr "#4 n'est pas valide sur H8/300." + +#: config/tc-h8300.c:1089 config/tc-h8300.c:1121 +#, c-format +msgid "branch operand has odd offset (%lx)\n" +msgstr "opérande de branchement a un décalage impair (%lx)\n" + +#: config/tc-h8300.c:1159 +msgid "destination operand must be 16 bit register" +msgstr "opérande de destination doit être un registre de 16 bits" + +#: config/tc-h8300.c:1168 +msgid "source operand must be 8 bit register" +msgstr "opérande source doit être un registre de 8 bits" + +#: config/tc-h8300.c:1176 +msgid "destination operand must be 16bit absolute address" +msgstr "opérande de destination doit être une adresse absolue de 16 bits" + +#: config/tc-h8300.c:1183 +msgid "destination operand must be 8 bit register" +msgstr "opérande de destination doit être un registre de 8 bits" + +#: config/tc-h8300.c:1191 +msgid "source operand must be 16bit absolute address" +msgstr "opérande source doit être une adresse absolue de 16 bits" + +#: config/tc-h8300.c:1199 +msgid "invalid operands" +msgstr "opérandes invalides" + +#: config/tc-h8300.c:1250 config/tc-h8500.c:1104 config/tc-mips.c:7984 +#: config/tc-sh.c:1877 config/tc-w65.c:740 config/tc-z8k.c:1205 +msgid "unknown opcode" +msgstr "code-op inconnu" + +#: config/tc-h8300.c:1296 +msgid "mismatch between opcode size and operand size" +msgstr "pas de concordance entre la taille du code-op et celle de l'opérande" + +#: config/tc-h8300.c:1307 config/tc-h8500.c:1131 config/tc-sh.c:2013 +#: config/tc-w65.c:770 config/tc-z8k.c:1258 +msgid "call to tc_crawl_symbol_chain \n" +msgstr "appel de tc_crawl_symbol_chain \n" + +#: config/tc-h8300.c:1321 config/tc-h8500.c:1145 config/tc-sh.c:2020 +#: config/tc-w65.c:784 config/tc-z8k.c:1272 +msgid "call to tc_headers_hook \n" +msgstr "appel de tc_headers_hook \n" + +#: config/tc-h8300.c:1412 config/tc-h8500.c:1235 config/tc-z8k.c:1386 +msgid "call to tc_aout_fix_to_chars \n" +msgstr "appel de tc_aout_fix_to_chars \n" + +#: config/tc-h8300.c:1422 config/tc-z8k.c:1396 +msgid "call to md_convert_frag \n" +msgstr "appel de md_convert_frag \n" + +#: config/tc-h8300.c:1467 config/tc-z8k.c:1477 +msgid "call tomd_estimate_size_before_relax \n" +msgstr "appel de tomd_estimate_size_before_relax \n" + +#: config/tc-h8500.c:333 +msgid ":24 not valid for this opcode" +msgstr ":24 n'est pas valide pour ce code-op" + +#: config/tc-h8500.c:340 +msgid "expect :8,:16 or :24" +msgstr "attendu :8,:16 ou :24" + +#: config/tc-h8500.c:397 +msgid "syntax error in reg list" +msgstr "Erreur de syntaxe dans la liste reg" + +#: config/tc-h8500.c:415 +msgid "missing final register in range" +msgstr "registre final manque pour définir les bornes" + +#: config/tc-h8500.c:502 config/tc-h8500.c:509 config/tc-h8500.c:515 +msgid "expected @(exp, Rn)" +msgstr "@ attendu (exp, Rn)" + +#: config/tc-h8500.c:531 +msgid "@Rn+ needs word register" +msgstr "@Rn+ a besoin d'un registre de mots" + +#: config/tc-h8500.c:541 +msgid "@Rn needs word register" +msgstr "@Rn a besoin d'un registre de mots" + +#: config/tc-h8500.c:838 config/tc-sh.c:1357 +msgid "unhandled %d\n" +msgstr "%d non traité\n" + +#: config/tc-h8500.c:866 config/tc-sh.c:1382 +#, c-format +msgid "operand must be absolute in range %d..%d" +msgstr "l'opérande doit être absolu dans les bornes %d..%d" + +#: config/tc-h8500.c:955 config/tc-sh.c:1580 +#, c-format +msgid "failed for %d\n" +msgstr "a échoué pour %d\n" + +#: config/tc-h8500.c:1120 config/tc-sh.c:1681 config/tc-sh.c:1926 +#: config/tc-w65.c:759 +msgid "invalid operands for opcode" +msgstr "opérandes invalides pour code-op" + +#. Simple range checking for FIELD againt HIGH and LOW bounds. +#. IGNORE is used to suppress the error message. +#: config/tc-hppa.c:1119 +#, c-format +msgid "Field out of range [%d..%d] (%d)." +msgstr "Champ hors gamme [%d..%d] (%d)." + +#. Simple alignment checking for FIELD againt ALIGN (a power of two). +#. IGNORE is used to suppress the error message. +#: config/tc-hppa.c:1133 +#, c-format +msgid "Field not properly aligned [%d] (%d)." +msgstr "Champ incorrectement alligné [%d] (%d)." + +#: config/tc-hppa.c:1162 +msgid "Missing .exit\n" +msgstr ".exit manquant\n" + +#: config/tc-hppa.c:1165 +msgid "Missing .procend\n" +msgstr ".procend manquant\n" + +#: config/tc-hppa.c:1345 +msgid "Invalid field selector. Assuming F%%." +msgstr "Sélecteur de champ invalide. F%% assumé." + +#: config/tc-hppa.c:1372 config/tc-hppa.c:6839 config/tc-hppa.c:6845 +#: config/tc-hppa.c:6851 config/tc-hppa.c:6857 config/tc-mn10300.c:924 +#: config/tc-mn10300.c:2133 +msgid "could not set architecture and machine" +msgstr "ne peut initialiser l'architecture et la machine" + +#: config/tc-hppa.c:1378 +msgid "-R option not supported on this target." +msgstr "L'option -R n'est pas supportée pour la cible." + +#: config/tc-hppa.c:1394 config/tc-sparc.c:802 config/tc-sparc.c:838 +msgid "Internal error: can't hash `%s': %s\n" +msgstr "Erreur interne: ne peut adresser par hachage `%s': %s\n" + +#: config/tc-hppa.c:1402 config/tc-i860.c:190 +msgid "internal error: losing opcode: `%s' \"%s\"\n" +msgstr "erreur interne: perte du code-op: `%s' \"%s\"\n" + +#: config/tc-hppa.c:1471 config/tc-hppa.c:6978 config/tc-hppa.c:7033 +msgid "Missing function name for .PROC (corrupted label chain)" +msgstr "Nom de fonction manquant pour .PROC (chaîne d'étiquette corrompue)" + +#: config/tc-hppa.c:1474 config/tc-hppa.c:7036 +msgid "Missing function name for .PROC" +msgstr "Nom de fonction mauqnat pour .PROC" + +#: config/tc-hppa.c:1582 config/tc-hppa.c:4812 +msgid "could not update architecture and machine" +msgstr "ne peut mettre à jour l'architecture et la machine" + +#: config/tc-hppa.c:1789 +msgid "Invalid Indexed Load Completer." +msgstr "Complèteur de chargement indexé invalide." + +#: config/tc-hppa.c:1794 +msgid "Invalid Indexed Load Completer Syntax." +msgstr "Syntaxe de complèteur de chargement indexé invalide." + +#: config/tc-hppa.c:1830 +msgid "Invalid Short Load/Store Completer." +msgstr "Short Load/Store Completer invalide." + +#: config/tc-hppa.c:1889 config/tc-hppa.c:1894 +msgid "Invalid Store Bytes Short Completer" +msgstr "Store Bytes Short Completer invalide" + +#: config/tc-hppa.c:2205 config/tc-hppa.c:2211 +msgid "Invalid left/right combination completer" +msgstr "Combinaison de complèteur left/right invalide" + +#: config/tc-hppa.c:2260 config/tc-hppa.c:2267 +msgid "Invalid permutation completer" +msgstr "Permutation de complèteur invalide" + +#: config/tc-hppa.c:2368 +msgid "Invalid Add Condition: %s" +msgstr "Condition d'addition invalide: %s" + +#: config/tc-hppa.c:2379 config/tc-hppa.c:2389 +#, c-format +msgid "Invalid Add and Branch Condition: %c" +msgstr "Condition d'addition et de branchement invalide: %c" + +#: config/tc-hppa.c:2410 +msgid "Invalid Compare/Subtract Condition" +msgstr "Condition comparaison/soustraction invalide" + +#: config/tc-hppa.c:2450 +msgid "Invalid Bit Branch Condition: %c" +msgstr "Condition de bit de branchement invalide: %c" + +#: config/tc-hppa.c:2536 +#, c-format +msgid "Invalid Compare/Subtract Condition: %s" +msgstr "Condition comparaison/soustraction invalide: %s" + +#: config/tc-hppa.c:2548 +#, c-format +msgid "Invalid Compare/Subtract Condition: %c" +msgstr "Condition comparaison/soustraction invalide: %c" + +#: config/tc-hppa.c:2563 +msgid "Invalid Compare and Branch Condition." +msgstr "Condition comparaison et de branchement invalide." + +#: config/tc-hppa.c:2659 +msgid "Invalid Logical Instruction Condition." +msgstr "Instruction de condition logique invalide." + +#: config/tc-hppa.c:2714 +msgid "Invalid Shift/Extract/Deposit Condition." +msgstr "Condition décalage/extraction/dépot invalide." + +#: config/tc-hppa.c:2826 +msgid "Invalid Unit Instruction Condition." +msgstr "Instruction unaire (Unit) de condition invalide." + +#: config/tc-hppa.c:3174 config/tc-hppa.c:3205 config/tc-hppa.c:3238 +#: config/tc-hppa.c:3270 +msgid "Branch to unaligned address" +msgstr "Branchement non aligné sur une adresse" + +#: config/tc-hppa.c:3450 +msgid "Invalid SFU identifier" +msgstr "Identificateur SFU invalide" + +#: config/tc-hppa.c:3500 +msgid "Invalid COPR identifier" +msgstr "Identificateur COPR invalide" + +#: config/tc-hppa.c:3629 +msgid "Invalid Floating Point Operand Format." +msgstr "Format d'opérande en virgule flottante invalide." + +#: config/tc-hppa.c:3746 config/tc-hppa.c:3766 config/tc-hppa.c:3786 +#: config/tc-hppa.c:3806 config/tc-hppa.c:3826 +msgid "Invalid register for single precision fmpyadd or fmpysub" +msgstr "Registre invalide pour la précision simple fmpyadd ou fmpysub" + +#: config/tc-hppa.c:3883 +msgid "Invalid operands %s" +msgstr "opérandes invalides %s" + +#: config/tc-hppa.c:4001 +msgid "Cannot handle fixup at %s:%d" +msgstr "Ne peut traiter le correctif à %s:%d" + +#: config/tc-hppa.c:4296 +msgid " -Q ignored\n" +msgstr " -Q ignoré\n" + +#: config/tc-hppa.c:4300 +msgid " -c print a warning if a comment is found\n" +msgstr " -c avertir si un commentaire est trouver\n" + +#: config/tc-hppa.c:4366 +#, c-format +msgid "no hppa_fixup entry for fixup type 0x%x at %s:%d" +msgstr "pas d'entrée hppa_fixup entry pour le coirrectif du type 0x%x à %s:%d" + +#: config/tc-hppa.c:4533 +msgid "Unknown relocation encountered in md_apply_fix." +msgstr "Relocalisation inconnue rencontrée dans md_apply_fix." + +#: config/tc-hppa.c:4676 config/tc-hppa.c:4701 +#, c-format +msgid "Undefined register: '%s'." +msgstr "Registre indéfinie: '%s'." + +#: config/tc-hppa.c:4735 +#, c-format +msgid "Non-absolute symbol: '%s'." +msgstr "Symbole non absolu: '%s'." + +#: config/tc-hppa.c:4750 +#, c-format +msgid "Undefined absolute constant: '%s'." +msgstr "Constante absolue indéfinie: '%s'." + +#: config/tc-hppa.c:4851 +msgid "Invalid FP Compare Condition: %s" +msgstr "Condition de comparaison FP invalide: %s" + +#: config/tc-hppa.c:4907 +#, c-format +msgid "Invalid FTEST completer: %s" +msgstr "Complèteur FTEST invalise: %s" + +#: config/tc-hppa.c:4974 config/tc-hppa.c:5012 +msgid "Invalid FP Operand Format: %3s" +msgstr "Format d'opérande FP invalide: %3s" + +#: config/tc-hppa.c:5091 +msgid "Bad segment in expression." +msgstr "Segment erroné dans l'expression." + +#: config/tc-hppa.c:5150 +msgid "Bad segment (should be absolute)." +msgstr "Segement erroné (doit être absolu)." + +#: config/tc-hppa.c:5193 +msgid "Invalid argument location: %s\n" +msgstr "Localisation invalide de l'argument: %s\n" + +#: config/tc-hppa.c:5224 +msgid "Invalid argument description: %d" +msgstr "Description invalide de l'argument: %d" + +#: config/tc-hppa.c:5247 +msgid "Invalid Nullification: (%c)" +msgstr "Nullification invalide: (%c)" + +#: config/tc-hppa.c:5983 +msgid "Invalid .CALL argument: %s" +msgstr "Argument invalide .CALL: %s" + +#: config/tc-hppa.c:6114 +msgid ".callinfo is not within a procedure definition" +msgstr ".callinfo n'est pas à l'intérieur de la définition de procédure" + +#: config/tc-hppa.c:6134 +#, c-format +msgid "FRAME parameter must be a multiple of 8: %d\n" +msgstr "Paramètre FRAME doit être un multiple de 8: %d\n" + +#: config/tc-hppa.c:6153 +msgid "Value for ENTRY_GR must be in the range 3..18\n" +msgstr "Valeur de ENTRY_GR doit être dans la plage 3..18\n" + +#: config/tc-hppa.c:6165 +msgid "Value for ENTRY_FR must be in the range 12..21\n" +msgstr "Valeur de ENTRY_FR doit être dans la plage 12..21\n" + +#: config/tc-hppa.c:6175 +msgid "Value for ENTRY_SR must be 3\n" +msgstr "Valeur de ENTRY_SR doit être 3\n" + +#: config/tc-hppa.c:6231 +msgid "Invalid .CALLINFO argument: %s" +msgstr "Argument à .CALLINFO invalide: %s" + +#: config/tc-hppa.c:6342 +msgid "The .ENTER pseudo-op is not supported" +msgstr "Le pseudo-op .ENTER n'est pas supporté" + +#: config/tc-hppa.c:6358 +msgid "Misplaced .entry. Ignored." +msgstr ".entry mal positionné. Ignoré." + +#: config/tc-hppa.c:6362 +msgid "Missing .callinfo." +msgstr ".callinfo manquant." + +#: config/tc-hppa.c:6426 +msgid ".REG expression must be a register" +msgstr "Expression .REG doit être un registre" + +#: config/tc-hppa.c:6442 read.c:4728 +msgid "bad or irreducible absolute expression; zero assumed" +msgstr "expression absolue erronée ou irréductible; zéro assumé" + +#: config/tc-hppa.c:6453 +msgid ".REG must use a label" +msgstr ".REG doit avoir une étiquette" + +#: config/tc-hppa.c:6455 +msgid ".EQU must use a label" +msgstr ".EQU doit avoir une étiquette" + +#: config/tc-hppa.c:6508 +msgid ".EXIT must appear within a procedure" +msgstr ".EXIT doit apparaître à l'intérieur d'une procédure" + +#: config/tc-hppa.c:6512 +msgid "Missing .callinfo" +msgstr ".callinfo manquant" + +#: config/tc-hppa.c:6516 +msgid "No .ENTRY for this .EXIT" +msgstr "Pas de .ENTRY pour ce .EXIT" + +#: config/tc-hppa.c:6543 +msgid "Cannot define export symbol: %s\n" +msgstr "Ne peut définit un symbole d'exportation: %s\n" + +#: config/tc-hppa.c:6601 +#, c-format +msgid "Using ENTRY rather than CODE in export directive for %s" +msgstr "Utilise ENTRY plutôt que CODE dans la directive d'exportation pour %s" + +#: config/tc-hppa.c:6718 +#, c-format +msgid "Undefined .EXPORT/.IMPORT argument (ignored): %s" +msgstr "Argument .EXPORT/.IMPORT non défini (ignoré): %s" + +#: config/tc-hppa.c:6800 +msgid "Missing label name on .LABEL" +msgstr "Nom d'étiquette manquant pour .LABEL" + +#: config/tc-hppa.c:6805 +msgid "extra .LABEL arguments ignored." +msgstr "arguments superflues pour .LABEL sont ignorés." + +#: config/tc-hppa.c:6822 +msgid "The .LEAVE pseudo-op is not supported" +msgstr "Le pseudo-op .LEAVE n'est pas supporté" + +#: config/tc-hppa.c:6861 +msgid "Unrecognized .LEVEL argument\n" +msgstr "Argument .LEVEL non reconnu\n" + +#: config/tc-hppa.c:6897 +msgid "Cannot define static symbol: %s\n" +msgstr "Ne peut définir le symbole statique: %s\n" + +#: config/tc-hppa.c:6932 +msgid "Nested procedures" +msgstr "Procédure imbriquées" + +#: config/tc-hppa.c:6942 MRO +msgid "Cannot allocate unwind descriptor\n" +msgstr "Ne peut allouer un descripteur non étendu\n" + +#: config/tc-hppa.c:7040 +msgid "misplaced .procend" +msgstr ".procend mal positionné" + +#: config/tc-hppa.c:7043 +msgid "Missing .callinfo for this procedure" +msgstr ".callinfo manquant pour cette procédure" + +#: config/tc-hppa.c:7046 +msgid "Missing .EXIT for a .ENTRY" +msgstr ".EXIT manquant pour un .ENTRY" + +#: config/tc-hppa.c:7084 +msgid "Not in a space.\n" +msgstr "N'est pas dans l'espace.\n" + +#: config/tc-hppa.c:7087 +msgid "Not in a subspace.\n" +msgstr "N'est pas dans le sous-espace.\n" + +#: config/tc-hppa.c:7178 +msgid "Invalid .SPACE argument" +msgstr "Argument .SPACE invalide" + +#: config/tc-hppa.c:7225 +msgid "Can't change spaces within a procedure definition. Ignored" +msgstr "Ne peut changes les espace à l'intérieur d'une définition de procédure. Ignoré" + +#: config/tc-hppa.c:7354 +#, c-format +msgid "Undefined space: '%s' Assuming space number = 0." +msgstr "Espace indéfini: '%s' Numéro d'espace assumé = 0." + +#: config/tc-hppa.c:7378 +msgid "Must be in a space before changing or declaring subspaces.\n" +msgstr "Doit être dans un espace avant de changer ou déclarer des sous-espaces.\n" + +#: config/tc-hppa.c:7382 +msgid "Can't change subspaces within a procedure definition. Ignored" +msgstr "Ne peut modifier des sous-espaces à l'intéieur de la définitin d'une procédure. Ignoré" + +#: config/tc-hppa.c:7417 +msgid "Parameters of an existing subspace can't be modified" +msgstr "Paramètres de sous-espaces existants ne peuvent être modifiés" + +#: config/tc-hppa.c:7468 +msgid "Alignment must be a power of 2" +msgstr "Alignement doit être une puissance de 2" + +#: config/tc-hppa.c:7510 +msgid "FIRST not supported as a .SUBSPACE argument" +msgstr "FIRST n'est pas supporté comme un argument pour .SUBSPACE" + +#: config/tc-hppa.c:7512 +msgid "Invalid .SUBSPACE argument" +msgstr "argument .SUBSPACE invallide" + +#: config/tc-hppa.c:7692 +msgid "Internal error: Unable to find containing space for %s." +msgstr "Erreur interne: incapable de repérer l'espace contenu pour %s." + +#: config/tc-hppa.c:7731 +#, c-format +msgid "Out of memory: could not allocate new space chain entry: %s\n" +msgstr "Mémoire épuisé: ne peut allouer un nouvel espace pour une entrée de chaîne: %s\n" + +#: config/tc-hppa.c:7817 +#, c-format +msgid "Out of memory: could not allocate new subspace chain entry: %s\n" +msgstr "Mémoire épuisé: ne peut allouer un nouvel sous-espace pour une entrée de chaîne: %s\n" + +#: config/tc-hppa.c:8511 +#, c-format +msgid "Symbol '%s' could not be created." +msgstr "Symbole '%s' n'a pu être créé." + +#: config/tc-hppa.c:8515 +msgid "No memory for symbol name." +msgstr "Pas de mémoire pour le nom de symbole." + +#: config/tc-i386.c:581 +msgid "%s shortened to %s" +msgstr "%s réduit à %s" + +#: config/tc-i386.c:636 +msgid "same type of prefix used twice" +msgstr "même type de préfixe utilisé deux fois" + +#: config/tc-i386.c:654 +msgid "64bit mode not supported on this CPU." +msgstr "mode 64 bits n'est pas supporté sur ce CPU" + +#: config/tc-i386.c:658 +msgid "32bit mode not supported on this CPU." +msgstr "mode 32 bits n'est pas supporté sur ce CPU" + +#: config/tc-i386.c:691 +msgid "bad argument to syntax directive." +msgstr "mauvais argument pour la directive de syntaxe" + +#: config/tc-i386.c:734 +msgid "no such architecture: `%s'" +msgstr "pas de telle architecture: %s" + +#: config/tc-i386.c:739 +msgid "missing cpu architecture" +msgstr "architecture cpu manquante" + +#: config/tc-i386.c:812 config/tc-i386.c:835 config/tc-m68k.c:3802 +msgid "Internal Error: Can't hash %s: %s" +msgstr "Erreur interne: ne peut adresser par hachage %s: %s" + +#: config/tc-i386.c:1088 +msgid "There are no unsigned pc-relative relocations" +msgstr "Il n'y a pas de relocalisations relatives au PC non signées" + +#: config/tc-i386.c:1095 config/tc-i386.c:4622 +#, c-format +msgid "can not do %d byte pc-relative relocation" +msgstr "ne peut faire une relocalisation relative au PC de %d octets" + +#: config/tc-i386.c:1112 +#, c-format +msgid "can not do %s %d byte relocation" +msgstr "ne peut faire une relocalisation %s %d octets" + +#: config/tc-i386.c:1221 config/tc-i386.c:1314 +#, c-format +msgid "no such instruction: `%s'" +msgstr "pas de telle instruction: `%s'" + +#: config/tc-i386.c:1230 +#, c-format +msgid "invalid character %s in mnemonic" +msgstr "caractère invalide %s dans la mnémonique" + +#: config/tc-i386.c:1237 +msgid "expecting prefix; got nothing" +msgstr "préfixe attendu; n'a rien obtenu" + +#: config/tc-i386.c:1239 +msgid "expecting mnemonic; got nothing" +msgstr "mnémonique attendue; n'a rien obtenu" + +#: config/tc-i386.c:1257 +#, c-format +msgid "redundant %s prefix" +msgstr "préfixe %s redondant" + +#: config/tc-i386.c:1325 +msgid "`%s' is not supported on `%s'" +msgstr "`%s' n'est pas supporté sur `%s'" + +#: config/tc-i386.c:1330 +msgid "use .code16 to ensure correct addressing mode" +msgstr "utilise .code16 pour assurer un mode d'adressage correct" + +#: config/tc-i386.c:1338 +#, c-format +msgid "expecting string instruction after `%s'" +msgstr "chaîne d'instruction attendue après `%s'" + +#: config/tc-i386.c:1359 +#, c-format +msgid "invalid character %s before operand %d" +msgstr "caractère ivalide %s avant l'opérande %d" + +#: config/tc-i386.c:1373 +#, c-format +msgid "unbalanced parenthesis in operand %d." +msgstr "parenthèses non pairées dans l'éopérande %d." + +#: config/tc-i386.c:1376 +#, c-format +msgid "unbalanced brackets in operand %d." +msgstr "crochets non pairés dans l'opérande %d." + +#: config/tc-i386.c:1385 +#, c-format +msgid "invalid character %s in operand %d" +msgstr "caractère invalide %s dans l'opérande %d" + +#: config/tc-i386.c:1412 +#, c-format +msgid "spurious operands; (%d operands/instruction max)" +msgstr "fausses opérandes; (%d opérandes/instructions au maximum)" + +#: config/tc-i386.c:1435 +msgid "expecting operand after ','; got nothing" +msgstr "opérande attendue après ','; n'a rien obtenu" + +#: config/tc-i386.c:1440 +msgid "expecting operand before ','; got nothing" +msgstr "opérande attendue avant ','; n'a rien obtenu" + +#. We found no match. +#: config/tc-i386.c:1782 +#, c-format +msgid "suffix or operands invalid for `%s'" +msgstr "suffixe ou opérande invalide pour `%s'" + +#: config/tc-i386.c:1793 +#, c-format +msgid "indirect %s without `*'" +msgstr "indirect %s sans `*'" + +#. Warn them that a data or address size prefix doesn't +#. affect assembly of the next line of code. +#: config/tc-i386.c:1801 +#, c-format +msgid "stand-alone `%s' prefix" +msgstr "préfixe `%s' autonome" + +#: config/tc-i386.c:1837 config/tc-i386.c:1852 +msgid "`%s' operand %d must use `%%es' segment" +msgstr "`%s' opérande %d doit utiliser le segment `%%es'" + +#: config/tc-i386.c:1867 +msgid "Extended register `%%%s' available only in 64bit mode." +msgstr "Registre étendu `%%%s' disponible seulement en mode 64 bits." + +#. Prohibit these changes in the 64bit mode, since +#. the lowering is more complicated. +#: config/tc-i386.c:1938 config/tc-i386.c:1989 config/tc-i386.c:2004 +#: config/tc-i386.c:2032 config/tc-i386.c:2060 +msgid "Incorrect register `%%%s' used with`%c' suffix" +msgstr "Registre incorrect `%%%s' utilisé avec le suffixe `%c'" + +#: config/tc-i386.c:1944 config/tc-i386.c:1994 config/tc-i386.c:2065 +msgid "using `%%%s' instead of `%%%s' due to `%c' suffix" +msgstr "utilise `%%%s' au lieu de `%%%s' en raison du suffixe `%c'" + +#: config/tc-i386.c:1957 config/tc-i386.c:1975 config/tc-i386.c:2019 +#: config/tc-i386.c:2046 +msgid "`%%%s' not allowed with `%s%c'" +msgstr "`%%%s' n'est pas permis avec `%s%c'" + +#: config/tc-i386.c:2106 +msgid "no instruction mnemonic suffix given; can't determine immediate size" +msgstr "aucun suffixe de mnémonique d'instruction fourni; ne peut déterminer la taille de l'immédiat" + +#: config/tc-i386.c:2132 +#, c-format +msgid "no instruction mnemonic suffix given; can't determine immediate size %x %c" +msgstr "aucun suffixe de mnémonique d'instruction fourni; ne peut déterminer la taille de l'immédiat %x %c" + +#: config/tc-i386.c:2157 +msgid "no instruction mnemonic suffix given and no register operands; can't size instruction" +msgstr "" +"aucun suffixe de mnémonique d'instruction fourni et pas d'opérandes registre;\n" +"ne peut déterminer la taille de l'instruction" + +#: config/tc-i386.c:2205 +msgid "64bit operations available only in 64bit modes." +msgstr "opérations 64 bits disponibles seulement en mode 64 bits." + +#. Reversed arguments on faddp, fsubp, etc. +#: config/tc-i386.c:2273 +msgid "translating to `%s %%%s,%%%s'" +msgstr "traduction à `%s %%%s,%%%s'" + +#. Extraneous `l' suffix on fp insn. +#: config/tc-i386.c:2280 +msgid "translating to `%s %%%s'" +msgstr "traduction à `%s %%%s'" + +#: config/tc-i386.c:2551 +msgid "you can't `pop %%cs'" +msgstr "vous ne pouvez pas utiliser `pop %%cs'" + +#. UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc. +#: config/tc-i386.c:2584 +#, c-format +msgid "translating to `%sp'" +msgstr "traduction à `%sp'" + +#: config/tc-i386.c:2627 +msgid "Can't encode registers '%%%s' in the instruction requiring REX prefix.\n" +msgstr "Ne peut encoder les registres '%%%s' dans l'instruction nécessitant le préfixe REX.\n" + +#: config/tc-i386.c:2679 config/tc-i386.c:2751 config/tc-i386.c:2798 +msgid "skipping prefixes on this instruction" +msgstr "escamotage des préfixes sur cette instruction" + +#: config/tc-i386.c:2819 +msgid "16-bit jump out of range" +msgstr "saut de 16 bits hors gamme" + +#: config/tc-i386.c:2828 +msgid "can't handle non absolute segment in `%s'" +msgstr "ne peut traiter un segment non absolu dans `%s'" + +#: config/tc-i386.c:3085 +msgid "only 1 or 2 immediate operands are allowed" +msgstr "seulement les opérandes immédiates 1 ou 2 sont permises" + +#: config/tc-i386.c:3115 config/tc-i386.c:3353 +msgid "GOT relocations not supported in 16 bit mode" +msgstr "relocalisation GOT n'est pas supporté enmode 16 bits" + +#: config/tc-i386.c:3152 config/tc-i386.c:3389 +msgid "bad reloc specifier in expression" +msgstr "spécificateur de relocalisation erroné dans l'expression" + +#: config/tc-i386.c:3170 config/tc-i386.c:3424 +#, c-format +msgid "ignoring junk `%s' after expression" +msgstr "ignoré les rebuts `%s' après l'expression" + +#. Missing or bad expr becomes absolute 0. +#: config/tc-i386.c:3177 +#, c-format +msgid "missing or invalid immediate expression `%s' taken as 0" +msgstr "expression immédiate invalide ou manquante `%s' prise alors pour 0" + +#: config/tc-i386.c:3208 config/tc-i386.c:3454 +#, c-format +msgid "unimplemented segment %s in operand" +msgstr "segment non implanté %s dans l'opérande" + +#: config/tc-i386.c:3210 config/tc-i386.c:3456 +#, c-format +msgid "unimplemented segment type %d in operand" +msgstr "type de segment non implanté %d dans l'opérande" + +#: config/tc-i386.c:3252 config/tc-i386.c:5392 +#, c-format +msgid "expecting scale factor of 1, 2, 4, or 8: got `%s'" +msgstr "facteur d'échelle attendu de 1, 2, 4, ou 8: a obtenu `%s'" + +#: config/tc-i386.c:3258 +#, c-format +msgid "scale factor of %d without an index register" +msgstr "facteur d'échelle de %d sans registre d'index" + +#. Missing or bad expr becomes absolute 0. +#: config/tc-i386.c:3435 +#, c-format +msgid "missing or invalid displacement expression `%s' taken as 0" +msgstr "expression de déplacement invalide ou manquante `%s' alors 0 assumé" + +#: config/tc-i386.c:3541 +msgid "`%s' is not a valid base/index expression" +msgstr "`%s' n'est pas une expression de base/index valide" + +#: config/tc-i386.c:3545 +#, c-format +msgid "`%s' is not a valid %s bit base/index expression" +msgstr "`%s' n'est pas une expression de base/index valide de %s bits" + +#: config/tc-i386.c:3620 +msgid "bad memory operand `%s'" +msgstr "opérande mémoire erronée `%s'" + +#: config/tc-i386.c:3635 +#, c-format +msgid "junk `%s' after register" +msgstr "rebut `%s' après le registre" + +#: config/tc-i386.c:3644 config/tc-i386.c:3759 config/tc-i386.c:3795 +msgid "bad register name `%s'" +msgstr "mauvais nom de registre `%s'" + +#: config/tc-i386.c:3652 +msgid "immediate operand illegal with absolute jump" +msgstr "opérande immédiate illégale avec un saut absolu" + +#: config/tc-i386.c:3674 +#, c-format +msgid "too many memory references for `%s'" +msgstr "trop de références en mémoire pour `%s'" + +#: config/tc-i386.c:3752 +#, c-format +msgid "expecting `,' or `)' after index register in `%s'" +msgstr "attendu `,' ou `)' après le registre d'index dans `%s'" + +#: config/tc-i386.c:3774 +#, c-format +msgid "expecting `)' after scale factor in `%s'" +msgstr "attendu `)' après le facteur d'échelle dans `%s'" + +#: config/tc-i386.c:3781 +#, c-format +msgid "expecting index register or scale factor after `,'; got '%c'" +msgstr "attendu un registre d'index ou un facteur d'échelle après `,'; a obtenu '%c'" + +#: config/tc-i386.c:3788 +#, c-format +msgid "expecting `,' or `)' after base register in `%s'" +msgstr "attendu `,' ou `)' après le registre de base dans `%s'" + +#. It's not a memory operand; argh! +#: config/tc-i386.c:3829 +#, c-format +msgid "invalid char %s beginning operand %d `%s'" +msgstr "caractère invalide %s au débutde l'opérande %d `%s'" + +#: config/tc-i386.c:4267 +msgid "Bad call to md_atof ()" +msgstr "Appel erroné à md_atof ()" + +#: config/tc-i386.c:4431 config/tc-sparc.c:548 +#, c-format +msgid "No compiled in support for %d bit object file format" +msgstr "N'est pas compilé pour le support de format de fichier objet de %d bits" + +#: config/tc-i386.c:4449 +msgid "" +" -Q ignored\n" +" -V print assembler version number\n" +" -k ignored\n" +" -q quieten some warnings\n" +" -s ignored\n" +msgstr "" +" -Q ignoré\n" +" -V afficher la version de l'assembler\n" +" -k ignoré\n" +" -q ne pas produire d'avertissements\n" +" -s ignoré\n" + +#: config/tc-i386.c:4456 +msgid " -q quieten some warnings\n" +msgstr " -q ne pas produire d'avertissement\n" + +#: config/tc-i386.c:4475 +msgid "Unknown architecture" +msgstr "architecture inconnue" + +#: config/tc-i386.c:4515 +msgid "GOT already in symbol table" +msgstr "GOT est déjà dans la table de symboles" + +#: config/tc-i386.c:4636 +#, c-format +msgid "can not do %d byte relocation" +msgstr "ne peut relocaliser %d octets" + +#: config/tc-i386.c:4697 +msgid "cannot represent relocation type %s" +msgstr "ne peut représenter le type de relocalisation %s" + +#: config/tc-i386.c:4994 +#, c-format +msgid "too many memory references for '%s'" +msgstr "trop de références mémoire pour `%s'" + +#: config/tc-i386.c:5157 +msgid "Unknown operand modifier `%s'\n" +msgstr "modificateur d'opérande inconnu `%s'\n" + +#: config/tc-i386.c:5364 +msgid "`%s' is not a valid segment register" +msgstr "`%s' n'est pas un registre de segment valide" + +#: config/tc-i386.c:5374 config/tc-i386.c:5495 +msgid "Register scaling only allowed in memory operands." +msgstr "Registre d'échelle seulement permis dans les opérandes en mémoire" + +#: config/tc-i386.c:5405 +msgid "Too many register references in memory operand.\n" +msgstr "Trop de références registre dans l'opérande mémoire.\n" + +#: config/tc-i386.c:5474 +#, c-format +msgid "Syntax error. Expecting a constant. Got `%s'.\n" +msgstr "Erreur de syntaxe. Attendait une constante. A obtenu `%s'.\n" + +#: config/tc-i386.c:5544 +msgid "Unrecognized token '%s'" +msgstr "Jeton non reconnu '%s'" + +#: config/tc-i386.c:5561 +msgid "Unexpected token `%s'\n" +msgstr "Jeton attendu `%s'\n" + +#: config/tc-i386.c:5705 +msgid "Unrecognized token `%s'\n" +msgstr "Jeton non reconnnu `%s'\n" + +#: config/tc-i860.c:154 config/tc-i860.c:158 +msgid "Unknown temporary pseudo register" +msgstr "Pseudo registre temporaire inconnu" + +#: config/tc-i860.c:181 config/tc-mips.c:1027 +msgid "internal error: can't hash `%s': %s\n" +msgstr "Erreur interne: ne peut adresser par hachage `%s': %s\n" + +#: config/tc-i860.c:201 +msgid "Defective assembler. No assembly attempted." +msgstr "Assembleur défectueux. Aucune tentative d'assemblage." + +#: config/tc-i860.c:347 +#, c-format +msgid "Expanded opcode after delayed branch: `%s'" +msgstr "Code-op étendu après un branchement retardé: `%s'" + +#: config/tc-i860.c:351 +msgid "Expanded opcode in dual mode: `%s'" +msgstr "Expansion du code-op en mode dual: `%s'" + +#: config/tc-i860.c:355 +#, c-format +msgid "An instruction was expanded (%s)" +msgstr "Une instruction a été étendu (%s)" + +#: config/tc-i860.c:613 +msgid "Pipelined instruction: fsrc1 = fdest" +msgstr "Instruction pipelinée: fsrc1 = fdest" + +#: config/tc-i860.c:776 config/tc-i860.c:783 config/tc-i860.c:790 +msgid "Assembler does not yet support PIC" +msgstr "Assembleu be supporte pas encore PIC" + +#: config/tc-i860.c:849 +msgid "Illegal operands for %s" +msgstr "opérandes illégales pour %s" + +#: config/tc-i860.c:873 config/tc-sparc.c:2730 +msgid "bad segment" +msgstr "segment erroné" + +#: config/tc-i860.c:965 +msgid "md_number_to_disp\n" +msgstr "md_number_to_disp\n" + +#: config/tc-i860.c:975 +msgid "i860_number_to_field\n" +msgstr "i860_number_to_field\n" + +#: config/tc-i860.c:984 +msgid "i860_estimate_size_before_relax\n" +msgstr "i860_estimate_size_before_relax\n" + +#: config/tc-i860.c:1075 +msgid "" +" -EL\t\t\t generate code for little endian mode (default)\n" +" -EB\t\t\t generate code for big endian mode\n" +" -mwarn-expand\t\t warn if pseudo operations are expanded\n" +msgstr "" +" -EL générer du code pour un système à octets de poids faible (pas défaut)\n" +" -EB générer du code pour un système à octets de poids fort\n" +" -mwarn-expand avertir si des pseudo opérations sont étendues\n" + +#. SVR4 compatibility flags. +#: config/tc-i860.c:1081 +msgid "" +" -V\t\t\t print assembler version number\n" +" -Qy, -Qn\t\t ignored\n" +msgstr "" +" -V afficher la version de l'assembleur\n" +" -Qy, -Qn ignoré\n" + +#: config/tc-i860.c:1150 +msgid "This immediate requires 0 MOD 2 alignment" +msgstr "Cette immédiate requiert un alignement 0 MOD 2" + +#: config/tc-i860.c:1153 +msgid "This immediate requires 0 MOD 4 alignment" +msgstr "Cette immédiate requiert un alignement 0 MOD 4" + +#: config/tc-i860.c:1156 +msgid "This immediate requires 0 MOD 8 alignment" +msgstr "Cette immédiate requiert un alignement 0 MOD 8" + +#: config/tc-i860.c:1159 +msgid "This immediate requires 0 MOD 16 alignment" +msgstr "Cette immédiate requiert un alignement 0 MOD 16" + +#: config/tc-i860.c:1257 +msgid "5-bit immediate too large" +msgstr "immédiate de 5 bits trop grande" + +#: config/tc-i860.c:1260 +msgid "5-bit field must be absolute" +msgstr "champ de 5 bits doit être absolu" + +#: config/tc-i860.c:1306 config/tc-i860.c:1329 +msgid "A branch offset requires 0 MOD 4 alignment" +msgstr "Un décalage de branchement requiert un alignement 0 MOD 4" + +#: config/tc-i860.c:1350 +msgid "Unrecognized fix-up (0x%08x)" +msgstr "Forme de correctif non reconnu (0x%08x)" + +#: config/tc-i860.h:82 +msgid "i860_convert_frag\n" +msgstr "i860_convert_frag\n" + +#: config/tc-i960.c:549 +#, c-format +msgid "Hashing returned \"%s\"." +msgstr "La fonction de hachage a retourné \"%s\"." + +#. Offset of last character in opcode mnemonic +#: config/tc-i960.c:583 +msgid "branch prediction invalid on this opcode" +msgstr "prédiction de branchement invalide pour ce code-op" + +#: config/tc-i960.c:623 +msgid "invalid opcode, \"%s\"." +msgstr "code-op invalide, \"%s\"." + +#: config/tc-i960.c:628 +#, c-format +msgid "improper number of operands. expecting %d, got %d" +msgstr "nombre incorrect d'opérandes. Attendait %d, a obtenu %d" + +#: config/tc-i960.c:860 +#, c-format +msgid "Fixup of %ld too large for field width of %d" +msgstr "Correctif de %ld trop grand pour la largeur du champ de %d" + +#: config/tc-i960.c:977 +msgid "invalid architecture %s" +msgstr "architecture invalide %s" + +#: config/tc-i960.c:997 +msgid "I960 options:\n" +msgstr "Options I960:\n" + +#: config/tc-i960.c:1000 +msgid "" +"\n" +"\t\t\tspecify variant of 960 architecture\n" +"-b\t\t\tadd code to collect statistics about branches taken\n" +"-link-relax\t\tpreserve individual alignment directives so linker\n" +"\t\t\tcan do relaxing (b.out format only)\n" +"-no-relax\t\tdon't alter compare-and-branch instructions for\n" +"\t\t\tlong displacements\n" +msgstr "" +"\n" +" spécifier la variante d'architecture 960\n" +"-b ajouter du code pour la cueuillette de statistiques au sujet des branchements utilisés\n" +"-link-relax préserver les directives individuelles pour que l'éditeur de lien\n" +" puisse faire la relaxe (format b.out seulement)\n" +"-no-relax ne pas altérer les instructions comparer-et-aiguiller pour\n" +" les longs déplacements\n" + +#: config/tc-i960.c:1403 +msgid "too many operands" +msgstr "trop d'opérandes" + +#: config/tc-i960.c:1462 config/tc-i960.c:1689 +msgid "expression syntax error" +msgstr "erreur de syntaxe dans l'expression" + +#: config/tc-i960.c:1500 +msgid "attempt to branch into different segment" +msgstr "tentative de branchement dans un segment différent" + +#: config/tc-i960.c:1504 +#, c-format +msgid "target of %s instruction must be a label" +msgstr "cible de l'instruction %s doit être une étiquette" + +#: config/tc-i960.c:1543 +msgid "unmatched '['" +msgstr "'[' non pairé" + +#: config/tc-i960.c:1554 +msgid "garbage after index spec ignored" +msgstr "rabiut après la spécification d'index ignoré" + +#. We never moved: there was no opcode either! +#: config/tc-i960.c:1620 +msgid "missing opcode" +msgstr "code-op manquant" + +#: config/tc-i960.c:1923 +msgid "invalid constant" +msgstr "constante invalide" + +#: config/tc-i960.c:2035 +msgid "invalid index register" +msgstr "registre d'index invalide" + +#: config/tc-i960.c:2058 +msgid "invalid scale factor" +msgstr "facteur d'échelle invalide" + +#: config/tc-i960.c:2241 +msgid "unaligned register" +msgstr "registre non aligné" + +#: config/tc-i960.c:2264 +msgid "no such sfr in this architecture" +msgstr "pas de tel 'sfr' pour cette architecture" + +#: config/tc-i960.c:2302 +msgid "illegal literal" +msgstr "litéral illégal" + +#. Should not happen: see block comment above +#: config/tc-i960.c:2532 +#, c-format +msgid "Trying to 'bal' to %s" +msgstr "Tentative de 'bal' vers %s" + +#: config/tc-i960.c:2543 +msgid "Looks like a proc, but can't tell what kind.\n" +msgstr "Ressemble à une procédure, mais ne peut dire de quel genre.\n" + +#: config/tc-i960.c:2574 +msgid "should have 1 or 2 operands" +msgstr "devrait avoir 1 ou 2 opérandes" + +#: config/tc-i960.c:2583 config/tc-i960.c:2602 +#, c-format +msgid "Redefining leafproc %s" +msgstr "Redéfinition leafproc %s" + +#: config/tc-i960.c:2633 +msgid "should have two operands" +msgstr "devrait avoir deux opérandes" + +#: config/tc-i960.c:2643 +msgid "'entry_num' must be absolute number in [0,31]" +msgstr "'entry_num' doit être un nombre absolu dans [0,31]" + +#: config/tc-i960.c:2652 +#, c-format +msgid "Redefining entrynum for sysproc %s" +msgstr "Redéfinition entrynum pour sysproc %s" + +#: config/tc-i960.c:2759 +msgid "architecture of opcode conflicts with that of earlier instruction(s)" +msgstr "conflit de code-op d'architecture avec ceux d'instructions déjà définies" + +#: config/tc-i960.c:2780 +msgid "big endian mode is not supported" +msgstr "système à octets de poids fort n'est pas supporté" + +#: config/tc-i960.c:2782 +msgid "ignoring unrecognized .endian type `%s'" +msgstr "type de système à octets non reconnu dans .endian `%s'" + +#: config/tc-i960.c:3064 +#, c-format +msgid "leafproc symbol '%s' undefined" +msgstr "symbole leafproc '%s' est indéfini" + +#: config/tc-i960.c:3074 +#, c-format +msgid "Warning: making leafproc entries %s and %s both global\n" +msgstr "AVERTISSEMENT: créer des entrées 'leafproc' %s et %s toutes les 2 globales\n" + +#: config/tc-i960.c:3183 +msgid "option --link-relax is only supported in b.out format" +msgstr "L'option --link-relax est seulement supporté dans le format b.out" + +#: config/tc-i960.c:3226 +msgid "callj to difference of two symbols" +msgstr "appel de callj pour différencier deux symboles" + +#: config/tc-ia64.c:4077 +msgid "Register name expected" +msgstr "Nom de registre attendu" + +#: config/tc-ia64.c:4082 config/tc-ia64.c:4368 +msgid "Comma expected" +msgstr "Virgule attendu" + +#: config/tc-ia64.c:4090 +msgid "Register value annotation ignored" +msgstr "Annotation de valeur de registre ignorée" + +#: config/tc-ia64.c:4114 +msgid "Directive invalid within a bundle" +msgstr "Directive invalide à l'intérieur du paquet" + +#: config/tc-ia64.c:4181 +msgid "Missing predicate relation type" +msgstr "Type de relation de prédicact manquant" + +#: config/tc-ia64.c:4197 +msgid "Unrecognized predicate relation type" +msgstr "Type de relation de prédicat non reconnu" + +#: config/tc-ia64.c:4217 config/tc-ia64.c:4242 +msgid "Predicate register expected" +msgstr "Registre de prédicat attendu" + +#: config/tc-ia64.c:4229 +msgid "Duplicate predicate register ignored" +msgstr "Prédicat de registre en double ignoré" + +#: config/tc-ia64.c:4251 +msgid "Bad register range" +msgstr "Gamme de registre erronée" + +#: config/tc-ia64.c:4279 +msgid "Predicate source and target required" +msgstr "Prédicat source et cible requis" + +#: config/tc-ia64.c:4281 config/tc-ia64.c:4293 +msgid "Use of p0 is not valid in this context" +msgstr "Utilisation de p n'est pas valide dans ce contexte" + +#: config/tc-ia64.c:4288 +msgid "At least two PR arguments expected" +msgstr "Au moins deux arguments PR attendus" + +#: config/tc-ia64.c:4302 +msgid "At least one PR argument expected" +msgstr "Au moins un argument PR attendu" + +#: config/tc-ia64.c:4338 MRO +#, c-format +msgid "Inserting \"%s\" into entry hint table failed: %s" +msgstr "Insertion de \"%s\" dans la table d'indices a échoué: %s" + +#. FIXME -- need 62-bit relocation type +#: config/tc-ia64.c:4758 +msgid "62-bit relocation not yet implemented" +msgstr "Relocalisation 62 bits n'est pas encore implantée" + +#: config/tc-ia64.c:4820 +msgid "lower 16 bits of mask ignored" +msgstr "16 bits du bas du masque sont ignorés" + +#: config/tc-ia64.c:5317 +msgid "Value truncated to 62 bits" +msgstr "Valeur tronquée à 62 bits" + +#: config/tc-ia64.c:5668 +msgid "Additional NOP may be necessary to workaround Itanium processor A/B step errata" +msgstr "L'ajout de NOP peut être nécessaire pour contrer les erreurs d'étapes A/B du processeur Itanium" + +#: config/tc-ia64.c:5849 +msgid "Unrecognized option '-x%s'" +msgstr "Option non reconnue '-x%s'" + +#: config/tc-ia64.c:5877 +msgid "" +"IA-64 options:\n" +" -milp32|-milp64|-mlp64|-mp64\tselect data model (default -mlp64)\n" +" -mle | -mbe\t\t select little- or big-endian byte order (default -mle)\n" +" -x | -xexplicit\t turn on dependency violation checking (default)\n" +" -xauto\t\t automagically remove dependency violations\n" +" -xdebug\t\t debug dependency violation checker\n" +msgstr "" +"Options IA-64:\n" +" -milp32|-milp64|-mlp64|-mp64 sélectionner le modèle de données (par défaut -mlp64)\n" +" -mle | -mbe sélectionner le système à octet de poids faible ou fort (par défaut -mle)\n" +" -x | -xexplicit activer la vérification de violation de dépendance (par défaut)\n" +" -xauto enlever automatiquement les violations de dépendance\n" +" -xdebug passer en mode débug le vérificateur de violations de dépendance\n" + +#: config/tc-ia64.c:6147 config/tc-mips.c:1014 +msgid "Could not set architecture and machine" +msgstr "Ne peut initialiser l'architecture et la machine" + +#: config/tc-ia64.c:6223 +msgid "Explicit stops are ignored in auto mode" +msgstr "Les arrêts explicites sont ignorés en mode auto" + +#: config/tc-ia64.c:6273 +msgid "Found '{' after explicit switch to automatic mode" +msgstr "Trouvé '{' après un passage explicite en mode automatique" + +#: config/tc-ia64.c:6686 +#, c-format +msgid "Unhandled dependency %s for %s (%s), note %d" +msgstr "Dépendance non traitée %s pour %s (%s), noter %d" + +#: config/tc-ia64.c:7962 +msgid "Unrecognized dependency specifier %d\n" +msgstr "Spécificateur de dépendance non reconnu %d\n" + +#: config/tc-ia64.c:8753 +msgid "Only the first path encountering the conflict is reported" +msgstr "Seul le premier chemin où le conflit est rencontré est rapporté" + +#: config/tc-ia64.c:8756 +msgid "This is the location of the conflicting usage" +msgstr "Voici la localisation d'un usage conflictuel." + +#. Pretend that we do not recognise this option. +#: config/tc-m32r.c:231 +msgid "Unrecognised option: -hidden" +msgstr "Option non reconnue: -hidden" + +#: config/tc-m32r.c:265 +msgid " M32R specific command line options:\n" +msgstr " Option spécifiques de la ligne de commande M32R:\n" + +#: config/tc-m32r.c:267 +msgid " -m32r disable support for the m32rx instruction set\n" +msgstr " -m32r désactiver le support du jeu d'instructions m32rx\n" + +#: config/tc-m32r.c:269 +msgid " -m32rx support the extended m32rx instruction set\n" +msgstr " -m32rx supporter le jeu étendu d'instructions m32rx\n" + +#: config/tc-m32r.c:271 +msgid " -O try to combine instructions in parallel\n" +msgstr " -O essayer de combiner les instructions en parallèle\n" + +#: config/tc-m32r.c:274 +msgid " -warn-explicit-parallel-conflicts warn when parallel instructions\n" +msgstr " -warn-explicit-parallel-conflicts avertir lorsque des instructions parallèles\n" + +#: config/tc-m32r.c:276 +msgid " violate contraints\n" +msgstr " violent les contraintes\n" + +#: config/tc-m32r.c:278 +msgid " -no-warn-explicit-parallel-conflicts do not warn when parallel\n" +msgstr " -no-warn-explicit-parallel-conflicts ne pas avertir lorsque des instructions\n" + +#: config/tc-m32r.c:280 +msgid " instructions violate contraints\n" +msgstr " parallèles violent les contraintes\n" + +#: config/tc-m32r.c:282 +msgid " -Wp synonym for -warn-explicit-parallel-conflicts\n" +msgstr " -Wp identique à -warn-explicit-parallel-conflicts\n" + +#: config/tc-m32r.c:284 +msgid " -Wnp synonym for -no-warn-explicit-parallel-conflicts\n" +msgstr " -Wnp identique à -no-warn-explicit-parallel-conflicts\n" + +#: config/tc-m32r.c:287 +msgid " -warn-unmatched-high warn when an (s)high reloc has no matching low reloc\n" +msgstr "" +" -warn-unmatched-high avertir lorsqu'il y a un relocalisation de type haute\n" +" qui ne concorde pas avec une relocalisation de type basse\n" + +#: config/tc-m32r.c:289 +msgid " -no-warn-unmatched-high do not warn about missing low relocs\n" +msgstr " -no-warn-unmatched-high ne pas avertir lorsque des relocalisations basses sont manquantes\n" + +#: config/tc-m32r.c:291 +msgid " -Wuh synonym for -warn-unmatched-high\n" +msgstr " -Wuh identique à -warn-unmatched-high\n" + +#: config/tc-m32r.c:293 +msgid " -Wnuh synonym for -no-warn-unmatched-high\n" +msgstr " -Wnuh identique à -no-warn-unmatched-high\n" + +#: config/tc-m32r.c:297 +msgid " -relax create linker relaxable code\n" +msgstr " -relax créer du code relaxable pour l'éditeur de liens\n" + +#: config/tc-m32r.c:299 +msgid " -cpu-desc provide runtime cpu description file\n" +msgstr " -cpu-desc fournir un fichier description du cpu pour l'exécution\n" + +#: config/tc-m32r.c:688 +msgid "Instructions write to the same destination register." +msgstr "Les instructions écrivent au même registre de destination." + +#: config/tc-m32r.c:696 +msgid "Instructions do not use parallel execution pipelines." +msgstr "Les instructions n'utilisent pas de pipelines parallèles durant l'exécution." + +#: config/tc-m32r.c:703 +msgid "Instructions share the same execution pipeline" +msgstr "Les instructions partagent le même pipeline durant l'exécution" + +#: config/tc-m32r.c:773 config/tc-m32r.c:870 +#, c-format +msgid "not a 16 bit instruction '%s'" +msgstr "n'est pas une instruction de 16 bits '%s'" + +#: config/tc-m32r.c:780 config/tc-m32r.c:877 config/tc-m32r.c:1033 +msgid "unknown instruction '%s'" +msgstr "instruction inconnue '%s'" + +#: config/tc-m32r.c:789 config/tc-m32r.c:884 config/tc-m32r.c:1040 +#, c-format +msgid "instruction '%s' is for the M32RX only" +msgstr "instruction '%s' est valable seulement pour M32RX" + +#: config/tc-m32r.c:798 config/tc-m32r.c:893 +#, c-format +msgid "instruction '%s' cannot be executed in parallel." +msgstr "instruction '%s' ne peut êtreexécutée en parallèle." + +#: config/tc-m32r.c:854 config/tc-m32r.c:918 config/tc-m32r.c:1090 +msgid "internal error: lookup/get operands failed" +msgstr "erreur interne: opérande lookup/get a échoué" + +#: config/tc-m32r.c:903 +#, c-format +msgid "'%s': only the NOP instruction can be issued in parallel on the m32r" +msgstr "'%s': seule l'instruction NOP peut être utilisée en parallèle sur le m32r" + +#: config/tc-m32r.c:932 +#, c-format +msgid "%s: output of 1st instruction is the same as an input to 2nd instruction - is this intentional ?" +msgstr "%s: la sortie de la 1ere instruction est la même que l'entrée de la 2e instruction - est-ce intentionnel ?" + +#: config/tc-m32r.c:936 +#, c-format +msgid "%s: output of 2nd instruction is the same as an input to 1st instruction - is this intentional ?" +msgstr "%s: la sortie de la 2e instruction est la même que l'entrée de la 1ere instruction - est-ce intentionnel ?" + +#: config/tc-m32r.c:1250 config/tc-ppc.c:1459 config/tc-ppc.c:3681 read.c:1358 +msgid "Expected comma after symbol-name: rest of line ignored." +msgstr "Virgule attendue après le nomde symbole: reste de la ligne ignoré." + +#: config/tc-m32r.c:1260 +#, c-format +msgid ".SCOMMon length (%ld.) <0! Ignored." +msgstr "longueur .SCOMMon (%ld.) <0! Ignoré." + +#: config/tc-m32r.c:1274 config/tc-ppc.c:1481 config/tc-ppc.c:2392 +#: config/tc-ppc.c:3705 +msgid "ignoring bad alignment" +msgstr "mauvais alignement ignoré" + +#: config/tc-m32r.c:1301 config/tc-ppc.c:1492 config/tc-ppc.c:3717 read.c:1382 +#: read.c:2108 +#, c-format +msgid "Ignoring attempt to re-define symbol `%s'." +msgstr "Tentative ignorée de re-définition du symbole `%s'." + +#: config/tc-m32r.c:1310 +#, c-format +msgid "Length of .scomm \"%s\" is already %ld. Not changed to %ld." +msgstr "Longueur de .scomm \"%s\" est déjà %ld. N'a pas été changé à %ld." + +#: config/tc-m32r.c:1786 +msgid "Unmatched high/shigh reloc" +msgstr "Relocalisation high/shigh non pairée" + +#: config/tc-m68hc11.c:305 +#, c-format +msgid "" +"Motorola 68HC11/68HC12 options:\n" +" -m68hc11 | -m68hc12 specify the processor [default %s]\n" +" --force-long-branchs always turn relative branchs into absolute ones\n" +" -S,--short-branchs do not turn relative branchs into absolute ones\n" +" when the offset is out of range\n" +" --strict-direct-mode do not turn the direct mode into extended mode\n" +" when the instruction does not support direct mode\n" +" --print-insn-syntax print the syntax of instruction in case of error\n" +" --print-opcodes print the list of instructions with syntax\n" +" --generate-example generate an example of each instruction\n" +" (used for testing)\n" +msgstr "" +"Options Motorola 68HC11/68HC12:\n" +" -m68hc11 | -m68hc12 spécifier le processeur (par défaut %s)\n" +" --force-long-branchs toujours convertir les branchements relatifs en absolus\n" +" -S,--short-branchs ne pas convertir les branchements relatifs en absolus\n" +" lorsque le décalage est hors gamme\n" +" --strict-direct-mode ne pas convertir le mode direct en mode étendu\n" +" lorsque l'instruction ne supporte pas le mode direct\n" +" --print-insn-syntax afficher la syntaxe de l'instruction en cas d'erreur\n" +" --print-opcodes afficher la liste des instruction avec la syntaxe\n" +" --generate-example générer un exemple de chaque instruction\n" +" (utiliser en mode test)\n" + +#: config/tc-m68hc11.c:346 +msgid "Default target `%s' is not supported." +msgstr "Cible de défaut `%s' n'est pas supportée." + +#. Dump the opcode statistics table. +#: config/tc-m68hc11.c:365 +msgid "Name # Modes Min ops Max ops Modes mask # Used\n" +msgstr "Nom # Modes Min ops Max ops Modes masq. # Utilisé\n" + +#: config/tc-m68hc11.c:415 +#, c-format +msgid "Option `%s' is not recognized." +msgstr "L'option `%s' n'est pas reconnue." + +#: config/tc-m68hc11.c:636 +msgid "#" +msgstr "#" + +#: config/tc-m68hc11.c:645 +msgid "#" +msgstr "#" + +#: config/tc-m68hc11.c:654 config/tc-m68hc11.c:663 +msgid ",X" +msgstr ",X" + +#: config/tc-m68hc11.c:681 +msgid "*" +msgstr "*" + +#: config/tc-m68hc11.c:693 +msgid "#" +msgstr "#" + +#: config/tc-m68hc11.c:703 +#, c-format +msgid "symbol%d" +msgstr "symbole%d" + +#: config/tc-m68hc11.c:705 +msgid "" +msgstr "" + +#: config/tc-m68hc11.c:724 +msgid "