summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/gas
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/gas')
-rw-r--r--contrib/binutils/gas/ChangeLog572
-rw-r--r--contrib/binutils/gas/Makefile.am32
-rw-r--r--contrib/binutils/gas/Makefile.in34
-rw-r--r--contrib/binutils/gas/aclocal.m418
-rw-r--r--contrib/binutils/gas/app.c3
-rw-r--r--contrib/binutils/gas/as.c6
-rw-r--r--contrib/binutils/gas/as.h3
-rw-r--r--contrib/binutils/gas/asintl.h2
-rw-r--r--contrib/binutils/gas/atof-generic.c2
-rw-r--r--contrib/binutils/gas/bignum-copy.c2
-rw-r--r--contrib/binutils/gas/bignum.h2
-rw-r--r--contrib/binutils/gas/bit_fix.h2
-rw-r--r--contrib/binutils/gas/config.in9
-rw-r--r--contrib/binutils/gas/config/aout_gnu.h3
-rw-r--r--contrib/binutils/gas/config/atof-ieee.c25
-rw-r--r--contrib/binutils/gas/config/obj-aout.c2
-rw-r--r--contrib/binutils/gas/config/obj-aout.h2
-rw-r--r--contrib/binutils/gas/config/obj-coff.c39
-rw-r--r--contrib/binutils/gas/config/obj-coff.h3
-rw-r--r--contrib/binutils/gas/config/obj-ecoff.c10
-rw-r--r--contrib/binutils/gas/config/obj-ecoff.h3
-rw-r--r--contrib/binutils/gas/config/obj-elf.c2
-rw-r--r--contrib/binutils/gas/config/obj-elf.h2
-rw-r--r--contrib/binutils/gas/config/obj-generic.h3
-rw-r--r--contrib/binutils/gas/config/obj-ieee.c2
-rw-r--r--contrib/binutils/gas/config/obj-ieee.h3
-rw-r--r--contrib/binutils/gas/config/obj-multi.h2
-rw-r--r--contrib/binutils/gas/config/tc-alpha.c3
-rw-r--r--contrib/binutils/gas/config/tc-alpha.h3
-rw-r--r--contrib/binutils/gas/config/tc-arm.c202
-rw-r--r--contrib/binutils/gas/config/tc-arm.h22
-rw-r--r--contrib/binutils/gas/config/tc-generic.h2
-rw-r--r--contrib/binutils/gas/config/tc-m68851.h3
-rw-r--r--contrib/binutils/gas/config/tc-ppc.c24
-rw-r--r--contrib/binutils/gas/config/tc-ppc.h2
-rw-r--r--contrib/binutils/gas/config/tc-sparc.c36
-rw-r--r--contrib/binutils/gas/config/tc-sparc.h3
-rw-r--r--contrib/binutils/gas/config/tc-tic30.c2
-rw-r--r--contrib/binutils/gas/config/tc-tic30.h2
-rw-r--r--contrib/binutils/gas/config/tc-v850.c34
-rw-r--r--contrib/binutils/gas/config/tc-v850.h2
-rw-r--r--contrib/binutils/gas/config/tc-z8k.c184
-rw-r--r--contrib/binutils/gas/config/tc-z8k.h3
-rw-r--r--contrib/binutils/gas/config/te-386bsd.h3
-rw-r--r--contrib/binutils/gas/config/te-nbsd.h3
-rw-r--r--contrib/binutils/gas/config/te-ppcnw.h2
-rw-r--r--contrib/binutils/gas/config/te-sparcaout.h2
-rw-r--r--contrib/binutils/gas/debug.c3
-rw-r--r--contrib/binutils/gas/depend.c2
-rw-r--r--contrib/binutils/gas/doc/Makefile.in2
-rw-r--r--contrib/binutils/gas/doc/all.texi3
-rw-r--r--contrib/binutils/gas/doc/as.texinfo40
-rw-r--r--contrib/binutils/gas/doc/c-arm.texi3
-rw-r--r--contrib/binutils/gas/doc/c-i386.texi35
-rw-r--r--contrib/binutils/gas/doc/c-sparc.texi3
-rw-r--r--contrib/binutils/gas/doc/c-v850.texi2
-rw-r--r--contrib/binutils/gas/doc/c-z8k.texi2
-rw-r--r--contrib/binutils/gas/doc/gasp.texi2
-rw-r--r--contrib/binutils/gas/doc/internals.texi10
-rw-r--r--contrib/binutils/gas/dwarf2dbg.c14
-rw-r--r--contrib/binutils/gas/dwarf2dbg.h2
-rw-r--r--contrib/binutils/gas/ecoff.c66
-rw-r--r--contrib/binutils/gas/ecoff.h3
-rw-r--r--contrib/binutils/gas/ehopt.c352
-rw-r--r--contrib/binutils/gas/emul-target.h20
-rw-r--r--contrib/binutils/gas/emul.h20
-rw-r--r--contrib/binutils/gas/expr.c3
-rw-r--r--contrib/binutils/gas/expr.h3
-rw-r--r--contrib/binutils/gas/flonum-copy.c3
-rw-r--r--contrib/binutils/gas/flonum-konst.c2
-rw-r--r--contrib/binutils/gas/flonum-mult.c2
-rw-r--r--contrib/binutils/gas/flonum.h2
-rw-r--r--contrib/binutils/gas/frags.c3
-rw-r--r--contrib/binutils/gas/frags.h6
-rw-r--r--contrib/binutils/gas/gasp.c2
-rw-r--r--contrib/binutils/gas/hash.c3
-rw-r--r--contrib/binutils/gas/hash.h2
-rw-r--r--contrib/binutils/gas/input-file.c2
-rw-r--r--contrib/binutils/gas/input-file.h2
-rw-r--r--contrib/binutils/gas/input-scrub.c3
-rw-r--r--contrib/binutils/gas/itbl-lex.l2
-rw-r--r--contrib/binutils/gas/itbl-ops.c4
-rw-r--r--contrib/binutils/gas/itbl-ops.h2
-rw-r--r--contrib/binutils/gas/itbl-parse.y2
-rw-r--r--contrib/binutils/gas/listing.h2
-rw-r--r--contrib/binutils/gas/literal.c2
-rw-r--r--contrib/binutils/gas/macro.c2
-rw-r--r--contrib/binutils/gas/macro.h3
-rw-r--r--contrib/binutils/gas/messages.c2
-rw-r--r--contrib/binutils/gas/obj.h2
-rw-r--r--contrib/binutils/gas/output-file.c2
-rw-r--r--contrib/binutils/gas/output-file.h3
-rw-r--r--contrib/binutils/gas/po/POTFILES.in4
-rw-r--r--contrib/binutils/gas/read.c42
-rw-r--r--contrib/binutils/gas/read.h3
-rw-r--r--contrib/binutils/gas/sb.c2
-rw-r--r--contrib/binutils/gas/sb.h2
-rw-r--r--contrib/binutils/gas/stabs.c18
-rw-r--r--contrib/binutils/gas/struc-symbol.h2
-rw-r--r--contrib/binutils/gas/subsegs.c3
-rw-r--r--contrib/binutils/gas/subsegs.h2
-rw-r--r--contrib/binutils/gas/symbols.c17
-rw-r--r--contrib/binutils/gas/symbols.h2
-rw-r--r--contrib/binutils/gas/tc.h3
-rw-r--r--contrib/binutils/gas/write.c82
-rw-r--r--contrib/binutils/gas/write.h4
106 files changed, 1601 insertions, 560 deletions
diff --git a/contrib/binutils/gas/ChangeLog b/contrib/binutils/gas/ChangeLog
index 7f6a629..6d9ad98 100644
--- a/contrib/binutils/gas/ChangeLog
+++ b/contrib/binutils/gas/ChangeLog
@@ -1,3 +1,573 @@
+2001-06-18 Philip Blundell <philb@gnu.org>
+
+ * config/tc-arm.c (do_msr): Remove restriction on usage of
+ immediate operands.
+
+2001-06-13 Philip Blundell <philb@gnu.org>
+
+ * config/tc-arm.c (thumb_shift): Improve wording of error message.
+ (do_t_arit): Likewise.
+
+2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-sh.c (md_pseudo_table): Only intercept the .file and
+ .loc pseudos if the dfwarf2 functions are available.
+ (md_assemble): Only call dwarf2_emit_insn if it is available.
+
+2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ Merge from mainline:
+ 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
+ * config/tc-arm.c (arm_handle_align): When truncating an aligned
+ block, ensure that the low order bits of the alignment are
+ preserved.
+ 2001-05-06 Nick Clifton <nickc@cambridge.redhat.com>
+ * config/tc-arm.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define.
+ * config/tc-arm.c (arm_handle_align): Do not insert more than
+ MAX_MEM_FOR_RS_ALIGN_CODE bytes.
+ (arm_frag_align_code): Use MAX_MEM_FOR_RS_ALIGN_CODE.
+ 2001-04-26 Nick Clifton <nickc@cambridge.redhat.com>
+ * config/tc-arm.c (arm_handle_align): New Function: Generate
+ no-op filled alignment frags.
+ (arm_frag_align_code): New Function: Create a code alignment frag.
+ (arm_init_frag): New Function: Initialse the target dependent
+ parts of a frag.
+ * config/tc-arm.h (TC_FRAG_TYPE): Define.
+ (TC_FRAG_INIT): Define.
+ (HANDLE_ALIGN): Define.
+ (md_do_align): Define.
+ 2001-03-12 Nick Clifton <nickc@redhat.com>
+ * config/tc-arm.c (md_begin): Always set machine type based on
+ cpu_variant.
+ 2001-03-06 Nick Clifton <nickc@redhat.com>
+ * config/tc-arm.c (md_apply_fix3): Clear bit zero of offset in
+ BLX(1) instruction.
+
+2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * doc/as.texinfo (Infix Ops): Document that comparison and
+ combiner operators can be used as infix operators.
+
+2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-arm.c: Fix test for overlow of literal pool.
+
+2001-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ Merge from mainline.
+ 2001-06-08 Alan Modra <amodra@bigpond.net.au>
+ * config/tc-mips.c (mips16_mark_labels): Reduce number of calls to
+ S_GET_VALUE by using a temp.
+ (append_insn): Likewise, and for S_SET_VALUE too.
+ (mips_emit_delays): Likewise.
+ (my_getExpression): Likewise.
+ (md_apply_fix): Likewise. Use "valueT" rather than "long" for "value".
+ (mips16_extended_frag): Cater for first relaxation pass having
+ bogus addresses. Use relax_marker to reliably determine whether a
+ symbol frag has been reached on the current pass.
+
+ 2001-06-07 H.J. Lu <hjl@gnu.org>
+ * configure.in: Use MIPS_STABS_ELF for Linux/mips.
+ * configure: Regenerate.
+
+ 2001-06-07 H.J. Lu <hjl@gnu.org>
+ * config/tc-mips.c (mips_pseudo_table): Add "extern" if
+ MIPS_STABS_ELF is defined.
+
+ 2001-06-06 Christian Groessler <cpg@aladdin.de>
+ * config/tc-z8k.c: Removed many warnings by removing unused
+ variables and tagging unused parameters as such.
+ (md_begin): Fixed a typo (","instead of ";").
+ (struct ctrl_table): Add parentheses to initialize array
+ correctly.
+ (struct flag_table): Likewise.
+ (struct intr_table): Likewise.
+ (struct table): Likewise.
+ (check_operand): "#if 0"'ed since it doesn't seem to be used.
+
+ 2001-06-06 Peter Jakubek <pjak@snafu.de>
+ * gas/config/tc-m68k.c (md_show_usage): Add all supported ColdFire
+ options to list (e.g. m5206e, m5307, m5407).
+
+ 2001-06-06 Alan Modra <amodra@bigpond.net.au>
+ * config/tc-i386.c (md_assemble): Handle Pentium4 branch hints.
+ <JumpByte, JumpDword insn output>: Remove dead code.
+
+ 2001-06-05 Nick Clifton <nickc@cambridge.redhat.com>
+ * symbols.c (S_SET_EXTERNAL): Do not override a section symbol's
+ status.
+
+ 2001-05-27 Alan Modra <amodra@one.net.au>
+ * config/tc-m68k.c (md_assemble): Ensure variable part of frag is
+ allocated in the same chunk as the fixed part.
+
+ 2001-05-25 Alan Modra <amodra@one.net.au>
+ * configure.in: Replace linuxoldld with linux*oldld.
+ * configure: Regenerate.
+
+ 2000-05-24 Tom Rix <trix@redhat.com>
+ * config/obj-coff.c (add_lineno): xcoff allows negative line
+ numbers
+ * config/tc-ppc.c (ppc_stabx): fix generated symbol
+
+ 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * config/tc-mips.c (ISA_HAS_64BIT_REGS): Add ISA_MIPS64 as 64 bit
+ architecture, remove erraneous ISA_MIPS32.
+ (md_show_usage): Add MIPS r12k support.
+ (mips_cpu_info_table): Add MIPS r12k support.
+
+ 2001-05-22 Alan Modra <amodra@one.net.au>
+ * config/tc-m68k.c (relaxable_symbol): Only treat external symbols
+ as relaxable if embedded system, make weak syms non-relaxable.
+ Move definition..
+ (tc_m68k_fix_adjustable): ..so it can be used here.
+ (md_apply_fix_2): Sign extend without conditional.
+
+ 2001-05-16 Jeff Johnston <jjohnstn@redhat.com>
+ * cgen.c (gas_cgen_tc_gen_reloc): Changed error message when
+ howto entry is not found.
+
+ 2001-05-10 Alan Modra <amodra@one.net.au>
+ * config/obj-vms.c (obj_crawl_symbol_chain): Don't take address of
+ symbol_next.
+ * config/tc-fr30.c (md_estimate_size_before_relax): Return size of
+ current variable part of frag.
+ * config/tc-m32r.c (md_estimate_size_before_relax): Likewise.
+ * config/tc-m68hc11.c (RELAX_STATE): Define.
+ (RELAX_LENGTH): Define.
+ (md_estimate_size_before_relax): Handle non-relaxable cases
+ separately from relaxable cases for clarity, and return correct
+ size for multi-pass relaxation.
+ * config/tc-tahoe.c (RELAX_LENGTH): Correct.
+ (md_estimate_size_before_relax): As for tc-m68hc11.c.
+ (md_convert_frag): Remove "length_code".
+ * config/tc-vax.c (RELAX_STATE): Define.
+ (RELAX_LENGTH): Define.
+ (md_relax_table): Add missing entry.
+ (md_estimate_size_before_relax): As for tc-m68hc11.c.
+ (md_convert_frag): Remove "length_code".
+ * config/tc-ns32k.c (md_estimate_size_before_relax): Simplify and
+ don't bother setting fr_var. Return correct size for multi-pass
+ relaxation.
+ * config/tc-h8500.c (md_convert_frag): Don't bother clearing fr_var.
+ (md_estimate_size_before_relax): No need to set fr_var.
+ * config/tc-mcore.c (md_convert_frag): Don't bother clearing fr_var.
+ (md_estimate_size_before_relax): No need to set fr_var.
+
+ 2001-05-08 Andreas Schwab <schwab@suse.de>
+ * config/tc-m68k.c: Instead of replacing -1 by 64 in assignment to
+ fx_pcrel_adjust explicitly sign extend when reading it.
+
+ 2001-05-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * Makefile.am (TARG_ENV_HFILES): Add te-hppa64.h and te-hppalinux64.h.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * configure.in: Remove duplicate mips-*-ecoff* entry.
+ * configure: Regenerate.
+ * config/obj-ecoff.c (obj_pseudo_table): Fix terminating entry.
+ (n_names): Cast away type mismatch.
+ (ecoff_sec_sym_ok_for_reloc): Add unused attribute.
+ (obj_ecoff_frob_symbol): Likewise.
+ * ecoff.c: (add_file): Add unused attribute.
+ (ecoff_directive_begin): Likewise.
+ (ecoff_directive_bend): Likewise.
+ (ecoff_directive_def): Likewise.
+ (ecoff_directive_dim): Likewise.
+ (ecoff_directive_scl): Likewise.
+ (ecoff_directive_size): Likewise.
+ (ecoff_directive_type): Likewise.
+ (ecoff_directive_tag): Likewise.
+ (ecoff_directive_val): Likewise.
+ (ecoff_directive_endef): Likewise.
+ (ecoff_directive_end): Likewise.
+ (ecoff_directive_ent): Likewise.
+ (ecoff_directive_extern): Likewise.
+ (ecoff_directive_file): Likewise.
+ (ecoff_directive_fmask): Likewise.
+ (ecoff_directive_frame): Likewise.
+ (ecoff_directive_mask): Likewise.
+ (ecoff_directive_loc): Likewise.
+ (mark_stabs): Likewise.
+ (ecoff_stab): Likewise.
+ (ecoff_frob_symbol): Cast away type mismatch.
+ (ecoff_padding_adjust): Likewise.
+ (ecoff_build_symbols): Likewise.
+ (ecoff_build_procs): Likewise.
+ (ecoff_build_aux): Likewise.
+ (ecoff_build_strings): Likewise.
+ (ecoff_build_fdr): Likewise.
+ (ecoff_build_debug): Likewise.
+ * itbl-ops.c (itbl_assemble): Variable initialization.
+
+ 2001-04-29 Keith M Wesolowski <wesolows@foobazco.org>
+ * config/tc-mips.c (md_parse_option): Also accept
+ elf64-tradbigmips and elf64-tradlittlemips for OPTION_64.
+
+ 2001-04-27 Sean McNeil <sean@mcneil.com>
+ * configure.in: Add arm-vxworks.
+ * configure: Regenerate.
+
+ 2001-04-25 Nick Clifton <nickc@cambridge.redhat.com>
+ * config/obj-coff.c (do_linenos_for): Check to see if the filename
+ symbol has been initialised before extracting its symbol index.
+
+ 2001-04-24 Christian Groessler <cpg@aladdin.de>
+ * config/tc-z8k.c (build_bytes): 12 and 16 bit displacements now
+ generate R_CALLR and R_REL16 relocations
+
+ 2000-04-20 Jason Eckhardt <jle@redhat.com>
+ * config/tc-d10v.h (tc_frob_label): Update the symbol's frag
+ since frag_now can change after d10v_cleanup is called.
+
+ 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
+ * dwarf2dbg.c (process_entries): Don't optimize redundant line notes.
+
+ 2001-04-07 Steven J. Hill <sjhill@cotw.com>
+ * config/tc-mips.c: Support ELF64 for traditional MIPS targets.
+ * Makefile.am: (TARG_ENV_HFILES): Add tc-mips.h.
+ * Makefile.in: Regenerated.
+ * configure.in: Use traditional MIPS targets for Linux/MIPS.
+ * configure: Regenerated.
+
+ 2001-04-05 Alan Modra <alan@linuxcare.com.au>
+ * configure.in: Add h8500-*-coff and h8500-*-rtems targets.
+ * configure: Regenerate.
+ * config/tc-h8500.c (md_estimate_size_before_relax): Add missing
+ cases, and always return size based on current fr_subtype.
+ (md_begin): Move initialization of md_relax_table..
+ (md_relax_table): ..to static initializer. Set rlx_length for
+ UNDEF_WORD_DISP cases.
+ * config/tc-w65.c (md_estimate_size_before_relax): Likewise.
+ (md_begin): Likewise.
+ (md_relax_table): Likewise.
+ * config/tc-mcore.c (md_estimate_size_before_relax): Likewise.
+ (md_relax_table): Set rlx_length for UNDEF_WORD_DISP cases.
+ Set rlx_backward and rlx_forward to zero for unused states.
+ * config/tc-sh.c (md_estimate_size_before_relax): Likewise.
+ (md_relax_table): Set rlx_length for UNDEF_WORD_DISP cases.
+ (UNCOND12, UNCOND32): Remove duplicate defines.
+
+ 2001-03-30 Alan Modra <alan@linuxcare.com.au>
+ * dwarf2dbg.c (dwarf2_directive_file): Fix warnings.
+
+ 2001-03-30 Alan Modra <alan@linuxcare.com.au>
+ * config/tc-sh.c (md_estimate_size_before_relax): Add extra
+ do-nothing cases to switch to avoid abort on a second relaxation
+ pass, and tidy code a little.
+ * config/tc-h8500.c (md_estimate_size_before_relax): Likewise.
+ * config/tc-w65.c (md_estimate_size_before_relax): Likewise.
+ * config/tc-mcore.c (COND12, UNCD12): Rename to DISP12 throughout.
+ (COND32, UNCD32): Rename to DISP32 throughout.
+ (UNDEF_WORD_DISP): Renumber to 3.
+ (md_estimate_size_before_relax): Add extra do-nothing cases.
+ * config/tc-mn10200.c (md_estimate_size_before_relax): Rewrite.
+ * config/tc-ns32k.c (md_estimate_size_before_relax): Add cases to
+ handle word and dword branches.
+
+ 2001-03-17 Alan Modra <alan@linuxcare.com.au>
+ * read.c (do_org): Handle complex expressions.
+ * cgen.c (gas_cgen_finish_insn): Likewise.
+
+ 2001-03-15 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-sh.c (parse_reg): Match capital MACH and MACL.
+
+ 2001-03-06 Igor Shevlyakov <igor@windriver.com>
+ * config/tc-m68k.c : Add 5407 to archs[] table.
+ (HAVE_LONG_BRANCH): Add mcf5407.
+ (select_control_regs): Recognize 5407.
+
+ 2001-03-02 Richard Sandiford <rsandifo@redhat.com>
+ * config/atof-ieee.c (TC_LARGEST_EXPONENT_IS_NORMAL): New macro.
+ (gen_to_words): Print warnings if NaNs are found and the target CPU
+ does not support them. Allow largest exponent to be used in normal
+ numbers if TC_LARGEST_EXPONENT_IS_NORMAL evaluates to true.
+
+ 2001-02-27 Alan Modra <alan@linuxcare.com.au>
+ * configure.in (BFD_VERSION): New.
+ (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
+ * configure: Regenerate.
+
+ 2001-02-26 Mark Elbrecht <snowball3@bigfoot.com>
+ * config/obj-coff.c [BFD_ASSEMBLER] (obj_coff_section): Set
+ SEC_NEVER_LOAD when the 'n' flag is used.
+ Add SEC_NEVER_LOAD to matchflags.
+
+ 2001-02-24 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+ * symbols.c (decode_local_label_name): Initialize message_format
+ only when an error is reported (perf pb due to I18N).
+
+ 2001-02-23 H.J. Lu <hjl@gnu.org>
+ * dwarf2dbg.c (dwarf2_directive_file): Call s_app_file (0) if
+ BFD_ASSEMBLER is not defined.
+
+ 2001-02-16 matthew green <mrg@redhat.com>
+ * cgen.c (gas_cgen_md_apply_fix3): Support BFD_RELOC_64.
+
+ 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+ * config/tc-mips.c (macro): For M_LA_AB emit a
+ BFD_RELOC_MIPS_CALL16 relocation or a
+ BFD_RELOC_MIPS_CALL_HI16/BFD_RELOC_MIPS_CALL_LO16 pair instead of
+ BFD_RELOC_MIPS_GOT16 and
+ BFD_RELOC_MIPS_GOT_HI16/BFD_RELOC_MIPS_GOT_LO16, respectively for
+ loading the jump register when generating SVR4_PIC code.
+
+ 2001-02-10 Chris Demetriou <cgd@broadcom.com>
+ * configure.in: Make 'mipself' and 'mipsecoff' emulations
+ map to MIPS-specific files, as they used to do before the
+ change on 2000-05-21.
+ * configure: Regerate.
+
+ 2001-02-10 Chris Demetriou <cgd@broadcom.com>
+ * config/tc-mips.c (md_parse_option): Don't try to compile
+ ELF-only option code if not ELF.
+
+2001-06-10 Philip Blundell <philb@gnu.org>
+
+ * configure.in: Set version to 2.11.1.
+ * configure: Regenerate.
+
+2001-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * Most files: Update copyright notices.
+
+2001-06-06 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/tc-cris.c (cris_insn_first_word_frag): New.
+ (md_assemble): Call cris_insn_first_word_frag to get the first
+ frag in an insn, not frag_more. Don't call dwarf2_emit_insn at
+ end. Drop variable insn_size.
+ (gen_bdap): Call cris_insn_first_word_frag, not frag_more.
+
+2001-06-06 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * as.c (show_usage): Remove L from listing options. It is not a
+ generic option.
+
+2001-06-06 Tracy Kuhrt <Tracy.Kuhrt@microchip.com>
+
+ * as.c (parse_args): Correct option name "listing-lhs-width2".
+
+2001-05-30 Richard Henderson <rth@redhat.com>
+
+ * read.c (emit_leb128_expr): Call md_cons_align.
+
+2001-05-28 Jeff Sturm <jsturm@one-point.com>
+
+ * config/tc-sparc.c (md_apply_fix3): Handle BFD_RELOC_SPARC_UA16,
+ BFD_RELOC_SPARC_UA32 and BFD_RELOC_SPARC_UA64.
+ (tc_gen_reloc): Likewise.
+ (sparc_cons_align): Don't clear sparc_no_align_cons.
+ (cons_fix_new_sparc): Substitute BFD_RELOC_SPARC_UA{16|32|64} for
+ BFD_RELOC_{16|32|64} iff sparc_no_align_cons is set.
+
+2001-05-23 Alan Modra <amodra@one.net.au>
+
+ Merge from mainline.
+ 2001-05-22 Alan Modra <amodra@one.net.au>
+ * config/tc-arc.c (md_assemble): Use is_end_of_line instead of
+ testing for NULs.
+
+ 2001-05-16 Alan Modra <amodra@one.net.au>
+ * config/tc-arc.c (md_assemble): Correct dwarf2_emit_insn param
+ for 8 byte insns.
+ * config/tc-i386.c (md_assemble): Call dwarf2_emit_insn before
+ opcodes are output rather than after. Delete insn_size.
+ * config/tc-v850.c (md_assemble): Similarly, but delete
+ total_insn_size. Update copyright.
+
+ 2001-05-03 Alan Modra <amodra@one.net.au>
+ * config/tc-i386.c (i386_displacement): Call as_bad for bad GOTOFF
+ expressions rather than triggering an assert.
+
+ 2001-03-30 Alan Modra <alan@linuxcare.com.au>
+ * config/tc-i386.c (UNCOND_JUMP, COND_JUMP, COND_JUMP86): Decrement.
+ (md_relax_table): Remove first four unused entries. Increment
+ rlx_length by one throughout table, and update comments to suit.
+ (md_estimate_size_before_relax): Return size of current variable
+ part of frag to reflect reality when relaxing more than once.
+
+ 2001-03-25 Alan Modra <alan@linuxcare.com.au>
+ * config/tc-i386.c (i386_scale): Accept an absolute expression for
+ scale factor, and return the end of the expression.
+ (i386_operand): Modify for above.
+
+ 2001-03-13 Alan Modra <alan@linuxcare.com.au>
+ * config/tc-i386.c (RELOC_ENUM): Define. Use throughout file.
+ (NUM_FLAG_CODE): Define.
+ (lex_got): New function.
+ (got_reloc): New global var.
+ (x86_cons_fix_new): New function.
+ (x86_cons): New function.
+ (i386_immediate): Use lex_got here, replacing inline code. Change
+ "ignoring junk.." error message to "junk.."
+ (i386_displacement): Likewise.
+ * config/tc-i386.h (TC_PARSE_CONS_EXPRESSION): Define.
+ (x86_cons): Declare.
+ (TC_CONS_FIX_NEW): Define.
+ (x86_cons_fix_new): Declare.
+
+ 2001-03-07 Alan Modra <alan@linuxcare.com.au>
+ * config/tc-i386.c (struct _i386_insn): Rename disp_reloc to reloc.
+ (md_assemble) <smallest displacement>: Use correct field of i.op[]
+ union.
+ <JumpInterSegment output>: Use correct i.disp_reloc[].
+ <immediate output>: Likewise.
+
+ 2001-02-13 Alan Modra <alan@linuxcare.com.au>
+ * doc/c-i386.texi (i386-Arch): Add "jumps"/"nojumps" blurb.
+ Mention effect of < 386 architectures on jump promotion.
+ (i386-Jumps): xref above. Don't assume long disp is 32 bits.
+
+ * config/tc-i386.c (no_cond_jump_promotion): New.
+ (set_cpu_arch): Parse "jumps" arch modifier.
+ (insn_size): Modify usage comment.
+ (ENCODE_RELAX_STATE): Reformat and protect macro arg.
+ (SIZE_FROM_RELAX_STATE): Rename to DISP_SIZE_FROM_RELAX_STATE.
+ (TYPE_FROM_RELAX_STATE): New define.
+ (UNCOND_JUMP, COND_JUMP): Renumber.
+ (md_relax_table): Reorder to suit.
+ (COND_JUMP86): New define.
+ (md_relax_table): Handle COND_JUMP86 cases. Add a few comments.
+ (md_assemble): Create frag var for jumps of max size, encode relax
+ state for COND_JUMP86.
+ (md_estimate_size_before_relax): Handle COND_JUMP86 cases, and
+ leave conditional jumps small if no_cond_jump_promotion.
+ (md_convert_frag): Likewise.
+
+ 2001-05-10 Alan Modra <amodra@one.net.au>
+ * config/tc-v850.c (md_estimate_size_before_relax): Rewrite.
+ (md_convert_frag): Don't bother clearing fr_var.
+ (md_pseudo_table): Correct initialization.
+
+ 2001-05-12 Peter Targett <peter.targett@arccores.com>
+ * config/tc-arc.c: Update copyright and tidy source comments.
+ (md_pseudo_table): Add directive .cpu back as an alias for
+ .option. Add .file and .line for dwarf2 support.
+ (arc_mach_type): Make bfd_mach_arc_6 default.
+ (md_longopts): Add entry 'pre-v6' representing old command line
+ option when assembling for 'arc5' core versions.
+ (md_parse_option): Make OPTION_ARC same as OPTION_ARC6, for new
+ default behaviour.
+ (arc_code_symbol): Make symbol value for @h30 fixup expression
+ equal to O_constant.
+ (md_assemble): Call dwarf2_emit_insn.
+ Include "dwarf2dbg2.h". Formatting fixes throughout file.
+ * config/tc-arc.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
+ * doc/c-arc.texi (ARC_CORE_DEFAULT): Update to new default.
+
+ 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-mn10300.c (mn10300_force_relocation): Don't
+ optimize differences between symbols in code sections to
+ constants.
+ (mn10300_fix_adjustable): Don't adjust to section+offset
+ relocations pointing at symbols in code sections.
+
+ 2001-05-14 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-mn10300.c (md_assemble): Anchor dwarf2 line info
+ before a relaxable insns.
+
+ 2001-05-13 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-mn10300.c (tc_gen_reloc): Don't reject differences
+ between symbols if the base symbol is in the current section;
+ emit a PC-relative relocation instead.
+
+ 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-mn10300.c (md_apply_fix3): Accept PC-relative relocs.
+
+ 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-mn10300.c (md_assemble): Subtract operand->shift
+ from offset in non-pcrel operands too.
+
+ 2001-04-14 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-mn10300.c (md_assemble): Simplify offset adjustment of
+ pc-relative relocations not placed at the end of the instruction.
+
+ 2001-04-06 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-mn10300.c (xr_registers): Added `pc'.
+
+ 2001-03-30 Alan Modra <alan@linuxcare.com.au>
+ * config/tc-mn10300.c (md_estimate_size_before_relax): Rewrite.
+
+ 2001-02-23 Richard Sandiford <rsandifo@redhat.com>
+ * config/tc-mn10300.c (md_apply_fix3): Don't mark a fixup as
+ done if it's against a symbol.
+
+ 2001-03-28 H.J. Lu <hjl@gnu.org>
+ * read.c (equals): Set to local for COFF only if it hasn't been
+ defined before.
+
+ 2001-03-27 Nick Papadonis <nick@coelacanth.com>
+ * read.c (equals): (for COFF) default symbols to being local.
+
+ 2001-03-23 Richard Sandiford <rsandifo@redhat.com>
+ * write.c (fix_new_exp): Print an error if passed a register.
+
+ 2001-03-20 Alan Modra <alan@linuxcare.com.au>
+ * frags.h (struct frag): Add relax_marker.
+ * write.c (is_dnrange): Delete.
+ (relax_frag): Use correct types for `aim', `target', `address'.
+ Delete `offset', `was_address'. Test `relax_marker' instead of
+ using fragile (and slow) address test.
+ (relax_segment): Init and flip `relax_marker'.
+
+ 2001-02-13 Ian Lance Taylor <ian@zembu.com>
+ * write.c (is_dnrange): Stop as soon as the address becomes
+ larger.
+ (relax_frag): Add segment parameter. Only call symbol_get_frag
+ once. Only call is_dnrange if the symbol is in the same segment,
+ and the symbol address is larger.
+ (relax_segment): Pass segment to md_relax_frag and relax_frag.
+ * write.h (relax_frag): Update declaration.
+ * config/tc-fr30.c (fr30_relax_frag): Add segment parameter. Pass
+ it to relax_frag.
+ * config/tc-m32r.c (m32r_relax_frag): Likewise.
+ * config/tc-m32r.h (md_relax_frag): Add segment parameter.
+ (m32r_relax_frag): Update declaration.
+ * config/tc-mips.h (md_relax_frag): Add segment parameter.
+ * config/tc-tic54x.h (md_relax_frag): Likewise.
+ * doc/internals.texi (CPU backend): Update documentation for
+ md_relax_frag.
+
+ 2001-03-15 DJ Delorie <dj@redhat.com>
+ * stabs.c (s_stab_generic): Don't corrupt the notes obstack by
+ blindly freeing string if it isn't at the top of the obstack.
+
+2001-05-14 Richard Henderson <rth@redhat.com>
+
+ * ehopt.c (eh_frame_convert_frag): Fix missed subtype adjustment
+ last change.
+
+2001-05-14 Richard Henderson <rth@redhat.com>
+
+ * ehopt.c (get_cie_info): Rename from eh_frame_code_alignment;
+ also collect whether to expect an FDE augmentation.
+ (check_eh_frame): Rewrite as a state machine. Track where in
+ an FDE we are located, skip any augmentation.
+ (eh_frame_estimate_size_before_relax): Get code alignment from
+ the fragment subtype.
+ (eh_frame_relax_frag, eh_frame_convert_frag): Likewise.
+ * read.c (emit_leb128_expr): Call check_eh_frame.
+
+2001-05-09 Richard Henderson <rth@redhat.com>
+
+ * config/tc-ia64.c (generate_unwind_image): Align the fragment
+ beginning a function's unwind info block.
+
+2001-04-27 David Mosberger <davidm@hpl.hp.com>
+
+ * config/tc-ia64.c (dot_spillmem_p): Fix output_spill_?sprel_p()
+ argument passing order: predicate goes last, not first.
+
+2001-04-16 David O'Brien <obrien@FreeBSD.org>
+
+ * configure.in: Add the em type for FreeBSD targets.
+ * configure: Regenerate.
+
+2001-04-13 Jim Wilson <wilson@redhat.com>
+
+ * tc-ia64.c (is_conditional_branch): Return true for br, brl, and br.
+ excluding br.i.
+
2001-04-02 Philip Blundell <philb@gnu.org>
From 2001-03-17 Richard Henderson <rth@redhat.com>
@@ -107,7 +677,7 @@
* config/tc-i386.c (tc_i386_fix_adjustable): Fix GOTPCREL GOT
entry.
-001-02-18 David O'Brien <obrien@FreeBSD.org>
+2001-02-18 David O'Brien <obrien@FreeBSD.org>
* configure.in (cpu_type, arch): Add a generic FreeBSD specification as
all FreeBSD platforms should look the same at this level.
diff --git a/contrib/binutils/gas/Makefile.am b/contrib/binutils/gas/Makefile.am
index 47b6253..357f3cf 100644
--- a/contrib/binutils/gas/Makefile.am
+++ b/contrib/binutils/gas/Makefile.am
@@ -77,7 +77,7 @@ CPU_TYPES = \
z8k
# Object format types. This is only used for dependency information.
-# We deliberately omit som, since it does not work as a cross assembler.
+# We deliberately omit SOM, since it does not work as a cross assembler.
OBJ_FORMATS = \
aout \
@@ -337,6 +337,8 @@ TARG_ENV_HFILES = \
config/te-go32.h \
config/te-hp300.h \
config/te-hppa.h \
+ config/te-hppa64.h \
+ config/te-hppalinux64.h \
config/te-i386aix.h \
config/te-ic960.h \
config/te-linux.h \
@@ -354,7 +356,8 @@ TARG_ENV_HFILES = \
config/te-sparcaout.h \
config/te-sun3.h \
config/te-svr4.h \
- config/te-sysv32.h
+ config/te-sysv32.h \
+ config/te-tmips.h
# Multi files in config
@@ -945,13 +948,15 @@ DEPTC_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \
$(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c
DEPTC_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \
- $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h
+ struc-symbol.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \
+ $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
DEPTC_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h $(INCDIR)/elf/arc.h \
- $(INCDIR)/elf/reloc-macros.h
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \
+ $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
DEPTC_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h
DEPTC_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \
@@ -1179,7 +1184,7 @@ DEPTC_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h $(INCDIR)/elf/ppc.h \
- $(INCDIR)/elf/reloc-macros.h
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
DEPTC_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \
@@ -1303,11 +1308,11 @@ DEPOBJ_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
DEPOBJ_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
DEPOBJ_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+ struc-symbol.h $(INCDIR)/obstack.h subsegs.h
DEPOBJ_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
DEPOBJ_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/obstack.h
@@ -1849,7 +1854,7 @@ BMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.
#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.
app.o: app.c
as.o: as.c subsegs.h $(INCDIR)/obstack.h output-file.h \
- sb.h macro.h
+ sb.h macro.h dwarf2dbg.h
atof-generic.o: atof-generic.c
bignum-copy.o: bignum-copy.c
cond.o: cond.c macro.h sb.h $(INCDIR)/obstack.h
@@ -1879,7 +1884,8 @@ stabs.o: stabs.c $(INCDIR)/obstack.h subsegs.h ecoff.h \
subsegs.o: subsegs.c subsegs.h $(INCDIR)/obstack.h
symbols.o: symbols.c $(INCDIR)/obstack.h subsegs.h \
struc-symbol.h
-write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h
+write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h \
+ dwarf2dbg.h
gasp.o: gasp.c sb.h macro.h
itbl-ops.o: itbl-ops.c itbl-ops.h
e-crisaout.o: $(srcdir)/config/e-crisaout.c emul-target.h
diff --git a/contrib/binutils/gas/Makefile.in b/contrib/binutils/gas/Makefile.in
index bd1a89e..0e001a6 100644
--- a/contrib/binutils/gas/Makefile.in
+++ b/contrib/binutils/gas/Makefile.in
@@ -189,7 +189,7 @@ CPU_TYPES = \
# Object format types. This is only used for dependency information.
-# We deliberately omit som, since it does not work as a cross assembler.
+# We deliberately omit SOM, since it does not work as a cross assembler.
OBJ_FORMATS = \
aout \
@@ -458,6 +458,8 @@ TARG_ENV_HFILES = \
config/te-go32.h \
config/te-hp300.h \
config/te-hppa.h \
+ config/te-hppa64.h \
+ config/te-hppalinux64.h \
config/te-i386aix.h \
config/te-ic960.h \
config/te-linux.h \
@@ -475,7 +477,8 @@ TARG_ENV_HFILES = \
config/te-sparcaout.h \
config/te-sun3.h \
config/te-svr4.h \
- config/te-sysv32.h
+ config/te-sysv32.h \
+ config/te-tmips.h
# Multi files in config
@@ -659,14 +662,16 @@ DEPTC_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \
DEPTC_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \
- $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h
+ struc-symbol.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \
+ $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
DEPTC_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h $(INCDIR)/elf/arc.h \
- $(INCDIR)/elf/reloc-macros.h
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \
+ $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
DEPTC_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h
@@ -951,7 +956,7 @@ DEPTC_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h $(INCDIR)/elf/ppc.h \
- $(INCDIR)/elf/reloc-macros.h
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
DEPTC_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \
@@ -1110,12 +1115,12 @@ DEPOBJ_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
DEPOBJ_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
DEPOBJ_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+ struc-symbol.h $(INCDIR)/obstack.h subsegs.h
DEPOBJ_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
DEPOBJ_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
@@ -1877,7 +1882,7 @@ configure configure.in gdbinit.in itbl-lex.c itbl-parse.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gtar
+TAR = tar
GZIP_ENV = --best
SOURCES = $(itbl_test_SOURCES) $(as_new_SOURCES) $(EXTRA_as_new_SOURCES) $(gasp_new_SOURCES)
OBJECTS = $(itbl_test_OBJECTS) $(as_new_OBJECTS) $(gasp_new_OBJECTS)
@@ -2695,7 +2700,7 @@ dep-am: DEP
#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.
app.o: app.c
as.o: as.c subsegs.h $(INCDIR)/obstack.h output-file.h \
- sb.h macro.h
+ sb.h macro.h dwarf2dbg.h
atof-generic.o: atof-generic.c
bignum-copy.o: bignum-copy.c
cond.o: cond.c macro.h sb.h $(INCDIR)/obstack.h
@@ -2725,7 +2730,8 @@ stabs.o: stabs.c $(INCDIR)/obstack.h subsegs.h ecoff.h \
subsegs.o: subsegs.c subsegs.h $(INCDIR)/obstack.h
symbols.o: symbols.c $(INCDIR)/obstack.h subsegs.h \
struc-symbol.h
-write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h
+write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h \
+ dwarf2dbg.h
gasp.o: gasp.c sb.h macro.h
itbl-ops.o: itbl-ops.c itbl-ops.h
e-crisaout.o: $(srcdir)/config/e-crisaout.c emul-target.h
diff --git a/contrib/binutils/gas/aclocal.m4 b/contrib/binutils/gas/aclocal.m4
index 338b221..2a3ccb7 100644
--- a/contrib/binutils/gas/aclocal.m4
+++ b/contrib/binutils/gas/aclocal.m4
@@ -83,24 +83,6 @@ AC_DEFUN([CY_WITH_NLS],)
AC_SUBST(INTLLIBS)
])
-#serial 1
-# This test replaces the one in autoconf.
-# Currently this macro should have the same name as the autoconf macro
-# because gettext's gettext.m4 (distributed in the automake package)
-# still uses it. Otherwise, the use in gettext.m4 makes autoheader
-# give these diagnostics:
-# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
-
-undefine([AC_ISC_POSIX])
-
-AC_DEFUN(AC_ISC_POSIX,
- [
- dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
- AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
- ]
-)
-
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
diff --git a/contrib/binutils/gas/app.c b/contrib/binutils/gas/app.c
index 46273c2..5111598 100644
--- a/contrib/binutils/gas/app.c
+++ b/contrib/binutils/gas/app.c
@@ -1,5 +1,6 @@
/* This is the Assembler Pre-Processor
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/as.c b/contrib/binutils/gas/as.c
index 8c7493d..e8c2212 100644
--- a/contrib/binutils/gas/as.c
+++ b/contrib/binutils/gas/as.c
@@ -1,5 +1,6 @@
/* as.c - GAS main program.
- Copyright (C) 1987, 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -231,7 +232,6 @@ Options:\n\
m include macro expansions\n\
n omit forms processing\n\
s include symbols\n\
- L include line debug statistics (if applicable)\n\
=FILE list to FILE (must be last sub-option)\n"));
fprintf (stream, _("\
@@ -401,7 +401,7 @@ parse_args (pargc, pargv)
#define OPTION_LISTING_LHS_WIDTH (OPTION_STD_BASE + 9)
{"listing-lhs-width", required_argument, NULL, OPTION_LISTING_LHS_WIDTH},
#define OPTION_LISTING_LHS_WIDTH2 (OPTION_STD_BASE + 10)
- {"listing-lhs-width", required_argument, NULL, OPTION_LISTING_LHS_WIDTH2},
+ {"listing-lhs-width2", required_argument, NULL, OPTION_LISTING_LHS_WIDTH2},
#define OPTION_LISTING_RHS_WIDTH (OPTION_STD_BASE + 11)
{"listing-rhs-width", required_argument, NULL, OPTION_LISTING_RHS_WIDTH},
#define OPTION_LISTING_CONT_LINES (OPTION_STD_BASE + 12)
diff --git a/contrib/binutils/gas/as.h b/contrib/binutils/gas/as.h
index a98acfe..75abfa9 100644
--- a/contrib/binutils/gas/as.h
+++ b/contrib/binutils/gas/as.h
@@ -1,5 +1,6 @@
/* as.h - global header file
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/asintl.h b/contrib/binutils/gas/asintl.h
index 5b6369f..41bb218 100644
--- a/contrib/binutils/gas/asintl.h
+++ b/contrib/binutils/gas/asintl.h
@@ -1,5 +1,5 @@
/* asintl.h - gas-specific header for gettext code.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
Written by Tom Tromey <tromey@cygnus.com>
diff --git a/contrib/binutils/gas/atof-generic.c b/contrib/binutils/gas/atof-generic.c
index 93eadc1..1309566 100644
--- a/contrib/binutils/gas/atof-generic.c
+++ b/contrib/binutils/gas/atof-generic.c
@@ -1,5 +1,5 @@
/* atof_generic.c - turn a string of digits into a Flonum
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 98, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/bignum-copy.c b/contrib/binutils/gas/bignum-copy.c
index 8384ff1..b4ed7d1 100644
--- a/contrib/binutils/gas/bignum-copy.c
+++ b/contrib/binutils/gas/bignum-copy.c
@@ -1,5 +1,5 @@
/* bignum_copy.c - copy a bignum
- Copyright (C) 1987, 1990, 1991, 1992, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/bignum.h b/contrib/binutils/gas/bignum.h
index e3b2f16..42954cf 100644
--- a/contrib/binutils/gas/bignum.h
+++ b/contrib/binutils/gas/bignum.h
@@ -1,5 +1,5 @@
/* bignum.h-arbitrary precision integers
- Copyright (C) 1987, 1992 Free Software Foundation, Inc.
+ Copyright 1987, 1992 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/bit_fix.h b/contrib/binutils/gas/bit_fix.h
index b9768fd..3eedb3c 100644
--- a/contrib/binutils/gas/bit_fix.h
+++ b/contrib/binutils/gas/bit_fix.h
@@ -1,5 +1,5 @@
/* bit_fix.h
- Copyright (C) 1987, 1992, 2000 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config.in b/contrib/binutils/gas/config.in
index fc7ef2b..e2a6003 100644
--- a/contrib/binutils/gas/config.in
+++ b/contrib/binutils/gas/config.in
@@ -25,6 +25,9 @@
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
+/* Define if you need to in order for stat and other things to work. */
+#undef _POSIX_SOURCE
+
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
@@ -154,6 +157,9 @@
/* Use ELF stabs for MIPS, not ECOFF stabs */
#undef MIPS_STABS_ELF
+/* Use ELF stabs for MIPS, not ECOFF stabs */
+#undef MIPS_STABS_ELF
+
/* Define if default target is PowerPC Solaris. */
#undef TARGET_SOLARIS_COMMENT
@@ -163,6 +169,9 @@
/* Default architecture. */
#undef DEFAULT_ARCH
+/* Default architecture. */
+#undef DEFAULT_ARCH
+
/* Using cgen code? */
#undef USING_CGEN
diff --git a/contrib/binutils/gas/config/aout_gnu.h b/contrib/binutils/gas/config/aout_gnu.h
index 52ea70d..82d744b 100644
--- a/contrib/binutils/gas/config/aout_gnu.h
+++ b/contrib/binutils/gas/config/aout_gnu.h
@@ -1,6 +1,7 @@
/* This file is aout_gnu.h
- Copyright (C) 1987-1992 Free Software Foundation, Inc.
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/atof-ieee.c b/contrib/binutils/gas/config/atof-ieee.c
index 2a916cd..ce6afbb 100644
--- a/contrib/binutils/gas/config/atof-ieee.c
+++ b/contrib/binutils/gas/config/atof-ieee.c
@@ -1,5 +1,5 @@
/* atof_ieee.c - turn a Flonum into an IEEE floating point number
- Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1992, 1994, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,6 +19,13 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+/* Some float formats are based on the IEEE standard, but use the
+ largest exponent for normal numbers instead of NaNs and infinites.
+ The macro TC_LARGEST_EXPONENT_IS_NORMAL should evaluate to true
+ if the target machine uses such a format. The macro can depend on
+ command line flags if necessary. There is no need to define the
+ macro if it would always be 0. */
+
#include "as.h"
/* Flonums returned here. */
@@ -40,6 +47,10 @@ extern const char EXP_CHARS[];
/* Length in LittleNums of guard bits. */
#define GUARD (2)
+#ifndef TC_LARGEST_EXPONENT_IS_NORMAL
+#define TC_LARGEST_EXPONENT_IS_NORMAL 0
+#endif
+
static const unsigned long mask[] =
{
0x00000000,
@@ -291,6 +302,8 @@ gen_to_words (words, precision, exponent_bits)
/* NaN: Do the right thing. */
if (generic_floating_point_number.sign == 0)
{
+ if (TC_LARGEST_EXPONENT_IS_NORMAL)
+ as_warn ("NaNs are not supported by this target\n");
if (precision == F_PRECISION)
{
words[0] = 0x7fff;
@@ -328,6 +341,9 @@ gen_to_words (words, precision, exponent_bits)
}
else if (generic_floating_point_number.sign == 'P')
{
+ if (TC_LARGEST_EXPONENT_IS_NORMAL)
+ as_warn ("Infinities are not supported by this target\n");
+
/* +INF: Do the right thing. */
if (precision == F_PRECISION)
{
@@ -366,6 +382,9 @@ gen_to_words (words, precision, exponent_bits)
}
else if (generic_floating_point_number.sign == 'N')
{
+ if (TC_LARGEST_EXPONENT_IS_NORMAL)
+ as_warn ("Infinities are not supported by this target\n");
+
/* Negative INF. */
if (precision == F_PRECISION)
{
@@ -578,7 +597,9 @@ gen_to_words (words, precision, exponent_bits)
return return_value;
}
- else if ((unsigned long) exponent_4 >= mask[exponent_bits])
+ else if ((unsigned long) exponent_4 > mask[exponent_bits]
+ || (! TC_LARGEST_EXPONENT_IS_NORMAL
+ && (unsigned long) exponent_4 == mask[exponent_bits]))
{
/* Exponent overflow. Lose immediately. */
diff --git a/contrib/binutils/gas/config/obj-aout.c b/contrib/binutils/gas/config/obj-aout.c
index 67bb18e..9d4f24a 100644
--- a/contrib/binutils/gas/config/obj-aout.c
+++ b/contrib/binutils/gas/config/obj-aout.c
@@ -1,5 +1,5 @@
/* a.out object file format
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/obj-aout.h b/contrib/binutils/gas/config/obj-aout.h
index d91cc48..54168d1 100644
--- a/contrib/binutils/gas/config/obj-aout.h
+++ b/contrib/binutils/gas/config/obj-aout.h
@@ -1,5 +1,5 @@
/* obj-aout.h, a.out object file format for gas, the assembler.
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 98, 99, 2000
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/obj-coff.c b/contrib/binutils/gas/config/obj-coff.c
index e16e5df..69e5558 100644
--- a/contrib/binutils/gas/config/obj-coff.c
+++ b/contrib/binutils/gas/config/obj-coff.c
@@ -1,5 +1,6 @@
/* coff object file format
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS.
@@ -445,12 +446,17 @@ add_lineno (frag, offset, num)
{
abort ();
}
+
+#ifndef OBJ_XCOFF
+ /* The native aix assembler accepts negative line number */
+
if (num <= 0)
{
/* Zero is used as an end marker in the file. */
as_warn (_("Line numbers must be positive integers\n"));
num = 1;
}
+#endif /* OBJ_XCOFF */
new_line->next = line_nos;
new_line->frag = frag;
new_line->l.line_number = num;
@@ -1434,7 +1440,7 @@ obj_coff_section (ignore)
switch (*input_line_pointer)
{
case 'b': flags |= SEC_ALLOC; flags &=~ SEC_LOAD; break;
- case 'n': flags &=~ SEC_LOAD; break;
+ case 'n': flags &=~ SEC_LOAD; flags |= SEC_NEVER_LOAD; break;
case 'd': flags |= SEC_DATA | SEC_LOAD; /* fall through */
case 'w': flags &=~ SEC_READONLY; break;
case 'x': flags |= SEC_CODE | SEC_LOAD; break;
@@ -1487,8 +1493,8 @@ obj_coff_section (ignore)
{
/* This section's attributes have already been set. Warn if the
attributes don't match. */
- flagword matchflags = SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
- | SEC_DATA | SEC_SHARED;
+ flagword matchflags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
+ | SEC_DATA | SEC_SHARED | SEC_NEVER_LOAD);
if ((flags ^ oldflags) & matchflags)
as_warn (_("Ignoring changed section attributes for %s"), name);
}
@@ -2075,7 +2081,7 @@ fill_section (abfd, h, file_cursor)
if (s->s_name[0])
{
fragS *frag = segment_info[i].frchainP->frch_root;
- char *buffer;
+ char *buffer = NULL;
if (s->s_size == 0)
s->s_scnptr = 0;
@@ -3349,12 +3355,13 @@ do_linenos_for (abfd, h, file_cursor)
line_ptr != (struct lineno_list *) NULL;
line_ptr = line_ptr->next)
{
-
if (line_ptr->line.l_lnno == 0)
{
- /* Turn a pointer to a symbol into the symbols' index */
- line_ptr->line.l_addr.l_symndx =
- ((symbolS *) line_ptr->line.l_addr.l_symndx)->sy_number;
+ /* Turn a pointer to a symbol into the symbols' index,
+ provided that it has been initialised. */
+ if (line_ptr->line.l_addr.l_symndx)
+ line_ptr->line.l_addr.l_symndx =
+ ((symbolS *) line_ptr->line.l_addr.l_symndx)->sy_number;
}
else
{
@@ -4056,10 +4063,10 @@ obj_coff_lcomm (ignore)
}
*p = 0;
- symbolP = symbol_find_or_make(name);
+ symbolP = symbol_find_or_make (name);
- if (S_GET_SEGMENT(symbolP) == SEG_UNKNOWN &&
- S_GET_VALUE(symbolP) == 0)
+ if (S_GET_SEGMENT (symbolP) == SEG_UNKNOWN &&
+ S_GET_VALUE (symbolP) == 0)
{
if (! need_pass_2)
{
@@ -4073,14 +4080,14 @@ obj_coff_lcomm (ignore)
(offsetT) temp, (char *) 0);
*p = 0;
subseg_set (current_seg, current_subseg); /* restore current seg */
- S_SET_SEGMENT(symbolP, SEG_E2);
- S_SET_STORAGE_CLASS(symbolP, C_STAT);
+ S_SET_SEGMENT (symbolP, SEG_E2);
+ S_SET_STORAGE_CLASS (symbolP, C_STAT);
}
}
else
- as_bad(_("Symbol %s already defined"), name);
+ as_bad (_("Symbol %s already defined"), name);
- demand_empty_rest_of_line();
+ demand_empty_rest_of_line ();
#endif
}
diff --git a/contrib/binutils/gas/config/obj-coff.h b/contrib/binutils/gas/config/obj-coff.h
index 8cf7999..f862f77 100644
--- a/contrib/binutils/gas/config/obj-coff.h
+++ b/contrib/binutils/gas/config/obj-coff.h
@@ -1,5 +1,6 @@
/* coff object file format
- Copyright (C) 1989, 90, 91, 92, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS.
diff --git a/contrib/binutils/gas/config/obj-ecoff.c b/contrib/binutils/gas/config/obj-ecoff.c
index 3f80e7d..d1eabce 100644
--- a/contrib/binutils/gas/config/obj-ecoff.c
+++ b/contrib/binutils/gas/config/obj-ecoff.c
@@ -1,5 +1,5 @@
/* ECOFF object file format.
- Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>.
@@ -95,7 +95,7 @@ const pseudo_typeS obj_pseudo_table[] =
{ "verstamp", s_ignore, 0 },
/* Sentinel. */
- { NULL }
+ { NULL, s_ignore, 0 }
};
/* Swap out the symbols and debugging information for BFD. */
@@ -141,7 +141,7 @@ ecoff_frob_file ()
/* bss segment */
".sbss", ".bss",
};
-#define n_names (sizeof (names) / sizeof (names[0]))
+#define n_names ((int) (sizeof (names) / sizeof (names[0])))
addr = 0;
{
@@ -272,7 +272,7 @@ obj_ecoff_set_ext (sym, ext)
static int
ecoff_sec_sym_ok_for_reloc (sec)
- asection *sec;
+ asection *sec ATTRIBUTE_UNUSED;
{
return 1;
}
@@ -280,7 +280,7 @@ ecoff_sec_sym_ok_for_reloc (sec)
static void
obj_ecoff_frob_symbol (sym, puntp)
symbolS *sym;
- int *puntp;
+ int *puntp ATTRIBUTE_UNUSED;
{
ecoff_frob_symbol (sym);
}
diff --git a/contrib/binutils/gas/config/obj-ecoff.h b/contrib/binutils/gas/config/obj-ecoff.h
index 8bca254..01a67d7 100644
--- a/contrib/binutils/gas/config/obj-ecoff.h
+++ b/contrib/binutils/gas/config/obj-ecoff.h
@@ -1,5 +1,6 @@
/* ECOFF object file format header file.
- Copyright (C) 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1999
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Ian Lance Taylor <ian@cygnus.com>.
diff --git a/contrib/binutils/gas/config/obj-elf.c b/contrib/binutils/gas/config/obj-elf.c
index d56eaa9..162f02f 100644
--- a/contrib/binutils/gas/config/obj-elf.c
+++ b/contrib/binutils/gas/config/obj-elf.c
@@ -1,5 +1,5 @@
/* ELF object file format
- Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/obj-elf.h b/contrib/binutils/gas/config/obj-elf.h
index 43daf64..8e3ce7d 100644
--- a/contrib/binutils/gas/config/obj-elf.h
+++ b/contrib/binutils/gas/config/obj-elf.h
@@ -1,5 +1,5 @@
/* ELF object file format.
- Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/obj-generic.h b/contrib/binutils/gas/config/obj-generic.h
index 00e4638..8cb8020 100644
--- a/contrib/binutils/gas/config/obj-generic.h
+++ b/contrib/binutils/gas/config/obj-generic.h
@@ -1,5 +1,6 @@
/* This file is obj-generic.h
- Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc.
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/obj-ieee.c b/contrib/binutils/gas/config/obj-ieee.c
index 35b49da..521a0d7 100644
--- a/contrib/binutils/gas/config/obj-ieee.c
+++ b/contrib/binutils/gas/config/obj-ieee.c
@@ -1,5 +1,5 @@
/* obj-format for ieee-695 records.
- Copyright (C) 1991, 92, 93, 94, 95, 97, 98, 2000
+ Copyright 1991, 1992, 1993, 1994, 1997, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/obj-ieee.h b/contrib/binutils/gas/config/obj-ieee.h
index fbef1cd..2652bc2 100644
--- a/contrib/binutils/gas/config/obj-ieee.h
+++ b/contrib/binutils/gas/config/obj-ieee.h
@@ -1,5 +1,6 @@
/* This file is obj-ieee.h
- Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc.
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/obj-multi.h b/contrib/binutils/gas/config/obj-multi.h
index 1d68a0c..225de2c 100644
--- a/contrib/binutils/gas/config/obj-multi.h
+++ b/contrib/binutils/gas/config/obj-multi.h
@@ -1,5 +1,5 @@
/* Multiple object format emulation.
- Copyright (C) 1995, 96, 97, 99, 2000
+ Copyright 1995, 1996, 1997, 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/tc-alpha.c b/contrib/binutils/gas/config/tc-alpha.c
index ae42d95..ba42aaa 100644
--- a/contrib/binutils/gas/config/tc-alpha.c
+++ b/contrib/binutils/gas/config/tc-alpha.c
@@ -1,5 +1,6 @@
/* tc-alpha.c - Processor-specific code for the DEC Alpha AXP CPU.
- Copyright (C) 1989, 93-98, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Carnegie Mellon University, 1993.
Written by Alessandro Forin, based on earlier gas-1.38 target CPU files.
Modified by Ken Raeburn for gas-2.x and ECOFF support.
diff --git a/contrib/binutils/gas/config/tc-alpha.h b/contrib/binutils/gas/config/tc-alpha.h
index 7edc412..2fe20b7 100644
--- a/contrib/binutils/gas/config/tc-alpha.h
+++ b/contrib/binutils/gas/config/tc-alpha.h
@@ -1,5 +1,6 @@
/* This file is tc-alpha.h
- Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
Written by Ken Raeburn <raeburn@cygnus.com>.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/tc-arm.c b/contrib/binutils/gas/config/tc-arm.c
index 514dba7..99aff8e 100644
--- a/contrib/binutils/gas/config/tc-arm.c
+++ b/contrib/binutils/gas/config/tc-arm.c
@@ -1,5 +1,5 @@
/* tc-arm.c -- Assemble for the ARM
- Copyright (C) 1994, 95, 96, 97, 98, 1999, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modified by David Taylor (dtaylor@armltd.co.uk)
@@ -1279,12 +1279,23 @@ add_to_lit_pool ()
== inst.reloc.exp.X_add_number)
&& literals[lit_count].exp.X_unsigned == inst.reloc.exp.X_unsigned)
break;
+
+ if (literals[lit_count].exp.X_op == inst.reloc.exp.X_op
+ && inst.reloc.exp.X_op == O_symbol
+ && (literals[lit_count].exp.X_add_number
+ == inst.reloc.exp.X_add_number)
+ && (literals[lit_count].exp.X_add_symbol
+ == inst.reloc.exp.X_add_symbol)
+ && (literals[lit_count].exp.X_op_symbol
+ == inst.reloc.exp.X_op_symbol))
+ break;
+
lit_count++;
}
if (lit_count == next_literal_pool_place) /* New entry. */
{
- if (next_literal_pool_place > MAX_LITERAL_POOL_SIZE)
+ if (next_literal_pool_place >= MAX_LITERAL_POOL_SIZE)
{
inst.error = _("Literal Pool Overflow");
return FAIL;
@@ -2278,12 +2289,17 @@ do_msr (str, flags)
return;
}
+#if 0 /* The first edition of the ARM architecture manual stated that
+ writing anything other than the flags with an immediate operation
+ had UNPREDICTABLE effects. This constraint was removed in the
+ second edition of the specification. */
if ((cpu_variant & ARM_EXT_V5) != ARM_EXT_V5
&& inst.instruction & ((PSR_c | PSR_x | PSR_s) << PSR_SHIFT))
{
inst.error = _("immediate value cannot be used to set this field");
return;
}
+#endif
flags |= INST_IMMEDIATE;
@@ -6014,7 +6030,7 @@ do_t_arit (str)
if (Rs != Rd)
{
- inst.error = _("dest and source1 one must be the same register");
+ inst.error = _("dest and source1 must be the same register");
return;
}
Rs = Rn;
@@ -6513,29 +6529,26 @@ md_begin ()
}
/* Catch special cases. */
- if (cpu_variant != (FPU_DEFAULT | CPU_DEFAULT))
+ if (cpu_variant & ARM_EXT_XSCALE)
+ mach = bfd_mach_arm_XScale;
+ else if (cpu_variant & ARM_EXT_V5E)
+ mach = bfd_mach_arm_5TE;
+ else if (cpu_variant & ARM_EXT_V5)
+ {
+ if (cpu_variant & ARM_EXT_THUMB)
+ mach = bfd_mach_arm_5T;
+ else
+ mach = bfd_mach_arm_5;
+ }
+ else if (cpu_variant & ARM_EXT_HALFWORD)
{
- if (cpu_variant & ARM_EXT_XSCALE)
- mach = bfd_mach_arm_XScale;
- else if (cpu_variant & ARM_EXT_V5E)
- mach = bfd_mach_arm_5TE;
- else if (cpu_variant & ARM_EXT_V5)
- {
- if (cpu_variant & ARM_EXT_THUMB)
- mach = bfd_mach_arm_5T;
- else
- mach = bfd_mach_arm_5;
- }
- else if (cpu_variant & ARM_EXT_HALFWORD)
- {
- if (cpu_variant & ARM_EXT_THUMB)
- mach = bfd_mach_arm_4T;
- else
- mach = bfd_mach_arm_4;
- }
- else if (cpu_variant & ARM_EXT_LONGMUL)
- mach = bfd_mach_arm_3M;
+ if (cpu_variant & ARM_EXT_THUMB)
+ mach = bfd_mach_arm_4T;
+ else
+ mach = bfd_mach_arm_4;
}
+ else if (cpu_variant & ARM_EXT_LONGMUL)
+ mach = bfd_mach_arm_3M;
bfd_set_arch_mach (stdoutput, TARGET_ARCH, mach);
}
@@ -7149,6 +7162,15 @@ md_apply_fix3 (fixP, val, seg)
newval = (newval & 0xf800) | ((value & 0x7fffff) >> 12);
newval2 = (newval2 & 0xf800) | ((value & 0xfff) >> 1);
+ if (fixP->fx_r_type == BFD_RELOC_THUMB_PCREL_BLX)
+ /* Remove bit zero of the adjusted offset. Bit zero can only be
+ set if the upper insn is at a half-word boundary, since the
+ destination address, an ARM instruction, must always be on a
+ word boundary. The semantics of the BLX (1) instruction, however,
+ are that bit zero in the offset must always be zero, and the
+ corresponding bit one in the target address will be set from bit
+ one of the source address. */
+ newval2 &= ~1;
md_number_to_chars (buf, newval, THUMB_SIZE);
md_number_to_chars (buf + THUMB_SIZE, newval2, THUMB_SIZE);
}
@@ -8418,7 +8440,38 @@ arm_frob_label (sym)
ARM_SET_INTERWORK (sym, support_interwork);
#endif
- if (label_is_thumb_function_name)
+ /* Note - do not allow local symbols (.Lxxx) to be labeled
+ as Thumb functions. This is because these labels, whilst
+ they exist inside Thumb code, are not the entry points for
+ possible ARM->Thumb calls. Also, these labels can be used
+ as part of a computed goto or switch statement. eg gcc
+ can generate code that looks like this:
+
+ ldr r2, [pc, .Laaa]
+ lsl r3, r3, #2
+ ldr r2, [r3, r2]
+ mov pc, r2
+
+ .Lbbb: .word .Lxxx
+ .Lccc: .word .Lyyy
+ ..etc...
+ .Laaa: .word Lbbb
+
+ The first instruction loads the address of the jump table.
+ The second instruction converts a table index into a byte offset.
+ The third instruction gets the jump address out of the table.
+ The fourth instruction performs the jump.
+
+ If the address stored at .Laaa is that of a symbol which has the
+ Thumb_Func bit set, then the linker will arrange for this address
+ to have the bottom bit set, which in turn would mean that the
+ address computation performed by the third instruction would end
+ up with the bottom bit set. Since the ARM is capable of unaligned
+ word loads, the instruction would then load the incorrect address
+ out of the jump table, and chaos would ensue. */
+ if (label_is_thumb_function_name
+ && (S_GET_NAME (sym)[0] != '.' || S_GET_NAME (sym)[1] != 'L')
+ && (bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0)
{
/* When the address of a Thumb function is taken the bottom
bit of that address should be set. This will allow
@@ -8743,3 +8796,102 @@ s_arm_elf_cons (nbytes)
}
#endif /* OBJ_ELF */
+
+/* This is called from HANDLE_ALIGN in write.c. Fill in the contents
+ of an rs_align_code fragment. */
+
+void
+arm_handle_align (fragP)
+ fragS *fragP;
+{
+ static char const arm_noop[4] = { 0x00, 0x00, 0xa0, 0xe1 };
+ static char const thumb_noop[2] = { 0xc0, 0x46 };
+ static char const arm_bigend_noop[4] = { 0xe1, 0xa0, 0x00, 0x00 };
+ static char const thumb_bigend_noop[2] = { 0x46, 0xc0 };
+
+ int bytes, fix, noop_size;
+ char * p;
+ const char * noop;
+
+ if (fragP->fr_type != rs_align_code)
+ return;
+
+ bytes = fragP->fr_next->fr_address - fragP->fr_address - fragP->fr_fix;
+ p = fragP->fr_literal + fragP->fr_fix;
+ fix = 0;
+
+ if (bytes > MAX_MEM_FOR_RS_ALIGN_CODE)
+ bytes &= MAX_MEM_FOR_RS_ALIGN_CODE;
+
+ if (fragP->tc_frag_data)
+ {
+ if (target_big_endian)
+ noop = thumb_bigend_noop;
+ else
+ noop = thumb_noop;
+ noop_size = sizeof (thumb_noop);
+ }
+ else
+ {
+ if (target_big_endian)
+ noop = arm_bigend_noop;
+ else
+ noop = arm_noop;
+ noop_size = sizeof (arm_noop);
+ }
+
+ if (bytes & (noop_size - 1))
+ {
+ fix = bytes & (noop_size - 1);
+ memset (p, 0, fix);
+ p += fix;
+ bytes -= fix;
+ }
+
+ while (bytes >= noop_size)
+ {
+ memcpy (p, noop, noop_size);
+ p += noop_size;
+ bytes -= noop_size;
+ fix += noop_size;
+ }
+
+ fragP->fr_fix += fix;
+ fragP->fr_var = noop_size;
+}
+
+/* Called from md_do_align. Used to create an alignment
+ frag in a code section. */
+
+void
+arm_frag_align_code (n, max)
+ int n;
+ int max;
+{
+ char * p;
+
+ /* We assume that there will never be a requirment
+ to support alignments greater than 32 bytes. */
+ if (max > MAX_MEM_FOR_RS_ALIGN_CODE)
+ as_fatal (_("alignments greater than 32 bytes not supported in .text sections."));
+
+ p = frag_var (rs_align_code,
+ MAX_MEM_FOR_RS_ALIGN_CODE,
+ 1,
+ (relax_substateT) max,
+ (symbolS *) NULL,
+ (offsetT) n,
+ (char *) NULL);
+ *p = 0;
+
+}
+
+/* Perform target specific initialisation of a frag. */
+
+void
+arm_init_frag (fragP)
+ fragS *fragP;
+{
+ /* Record whether this frag is in an ARM or a THUMB area. */
+ fragP->tc_frag_data = thumb_mode;
+}
diff --git a/contrib/binutils/gas/config/tc-arm.h b/contrib/binutils/gas/config/tc-arm.h
index 0a823dd..8de5704 100644
--- a/contrib/binutils/gas/config/tc-arm.h
+++ b/contrib/binutils/gas/config/tc-arm.h
@@ -1,5 +1,5 @@
/* This file is tc-arm.h
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modified by David Taylor (dtaylor@armltd.co.uk)
@@ -214,3 +214,23 @@ void armelf_frob_symbol PARAMS ((symbolS *, int *));
#ifdef OBJ_ELF
#define DWARF2_LINE_MIN_INSN_LENGTH 2
#endif
+
+#define MAX_MEM_FOR_RS_ALIGN_CODE 31
+
+/* For frags in code sections we need to record whether they contain
+ ARM code or THUMB code. This is that if they have to be aligned,
+ they can contain the correct type of no-op instruction. */
+#define TC_FRAG_TYPE int
+#define TC_FRAG_INIT(fragp) arm_init_frag (fragp)
+extern void arm_init_frag PARAMS ((struct frag *));
+
+#define HANDLE_ALIGN(fragp) arm_handle_align (fragp)
+extern void arm_handle_align PARAMS ((struct frag *));
+
+#define md_do_align(N, FILL, LEN, MAX, LABEL) \
+ if (FILL == NULL && (N) != 0 && ! need_pass_2 && subseg_text_p (now_seg)) \
+ { \
+ arm_frag_align_code (N, MAX); \
+ goto LABEL; \
+ }
+extern void arm_frag_align_code PARAMS ((int, int));
diff --git a/contrib/binutils/gas/config/tc-generic.h b/contrib/binutils/gas/config/tc-generic.h
index 72df020..f3b676b 100644
--- a/contrib/binutils/gas/config/tc-generic.h
+++ b/contrib/binutils/gas/config/tc-generic.h
@@ -1,6 +1,6 @@
/* This file is tc-generic.h
- Copyright (C) 1987, 91, 92, 95, 1997 Free Software Foundation, Inc.
+ Copyright 1987, 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/tc-m68851.h b/contrib/binutils/gas/config/tc-m68851.h
index 398e1d2..870e881 100644
--- a/contrib/binutils/gas/config/tc-m68851.h
+++ b/contrib/binutils/gas/config/tc-m68851.h
@@ -1,6 +1,7 @@
/* This file is tc-m68851.h
- Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc.
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/tc-ppc.c b/contrib/binutils/gas/config/tc-ppc.c
index 2b826cb..a893209 100644
--- a/contrib/binutils/gas/config/tc-ppc.c
+++ b/contrib/binutils/gas/config/tc-ppc.c
@@ -1,5 +1,5 @@
/* tc-ppc.c -- Assemble for the PowerPC or POWER (RS/6000)
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
@@ -2845,9 +2845,29 @@ ppc_stabx (ignore)
symbol_get_tc (sym)->output = 1;
- if (S_GET_STORAGE_CLASS (sym) == C_STSYM)
+ if (S_GET_STORAGE_CLASS (sym) == C_STSYM) {
+
symbol_get_tc (sym)->within = ppc_current_block;
+ /* In this case :
+
+ .bs name
+ .stabx "z",arrays_,133,0
+ .es
+
+ .comm arrays_,13768,3
+
+ resolve_symbol_value will copy the exp's "within" into sym's when the
+ offset is 0. Since this seems to be corner case problem,
+ only do the correction for storage class C_STSYM. A better solution
+ would be to have the tc field updated in ppc_symbol_new_hook. */
+
+ if (exp.X_op == O_symbol)
+ {
+ symbol_get_tc (exp.X_add_symbol)->within = ppc_current_block;
+ }
+ }
+
if (exp.X_op != O_symbol
|| ! S_IS_EXTERNAL (exp.X_add_symbol)
|| S_GET_SEGMENT (exp.X_add_symbol) != bss_section)
diff --git a/contrib/binutils/gas/config/tc-ppc.h b/contrib/binutils/gas/config/tc-ppc.h
index f246cd7..c2876bf 100644
--- a/contrib/binutils/gas/config/tc-ppc.h
+++ b/contrib/binutils/gas/config/tc-ppc.h
@@ -1,5 +1,5 @@
/* tc-ppc.h -- Header file for tc-ppc.c.
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
diff --git a/contrib/binutils/gas/config/tc-sparc.c b/contrib/binutils/gas/config/tc-sparc.c
index 6c9827c..558dc89 100644
--- a/contrib/binutils/gas/config/tc-sparc.c
+++ b/contrib/binutils/gas/config/tc-sparc.c
@@ -1,5 +1,6 @@
/* tc-sparc.c -- Assemble for the SPARC
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -2970,16 +2971,19 @@ md_apply_fix3 (fixP, value, segment)
/* If this is a data relocation, just output VAL. */
- if (fixP->fx_r_type == BFD_RELOC_16)
+ if (fixP->fx_r_type == BFD_RELOC_16
+ || fixP->fx_r_type == BFD_RELOC_SPARC_UA16)
{
md_number_to_chars (buf, val, 2);
}
else if (fixP->fx_r_type == BFD_RELOC_32
+ || fixP->fx_r_type == BFD_RELOC_SPARC_UA32
|| fixP->fx_r_type == BFD_RELOC_SPARC_REV32)
{
md_number_to_chars (buf, val, 4);
}
- else if (fixP->fx_r_type == BFD_RELOC_64)
+ else if (fixP->fx_r_type == BFD_RELOC_64
+ || fixP->fx_r_type == BFD_RELOC_SPARC_UA64)
{
md_number_to_chars (buf, val, 8);
}
@@ -3315,6 +3319,9 @@ tc_gen_reloc (section, fixp)
case BFD_RELOC_SPARC_LOX10:
case BFD_RELOC_SPARC_REV32:
case BFD_RELOC_SPARC_OLO10:
+ case BFD_RELOC_SPARC_UA16:
+ case BFD_RELOC_SPARC_UA32:
+ case BFD_RELOC_SPARC_UA64:
case BFD_RELOC_VTABLE_ENTRY:
case BFD_RELOC_VTABLE_INHERIT:
code = fixp->fx_r_type;
@@ -4065,12 +4072,9 @@ sparc_cons_align (nbytes)
if (! enforce_aligned_data)
return;
+ /* Don't align if this is an unaligned pseudo-op. */
if (sparc_no_align_cons)
- {
- /* This is an unaligned pseudo-op. */
- sparc_no_align_cons = 0;
- return;
- }
+ return;
nalign = log2 (nbytes);
if (nalign == 0)
@@ -4195,9 +4199,23 @@ cons_fix_new_sparc (frag, where, nbytes, exp)
(nbytes == 2 ? BFD_RELOC_16 :
(nbytes == 4 ? BFD_RELOC_32 : BFD_RELOC_64)));
- if (target_little_endian_data && nbytes == 4
+ if (target_little_endian_data
+ && nbytes == 4
&& now_seg->flags & SEC_ALLOC)
r = BFD_RELOC_SPARC_REV32;
+
+ if (sparc_no_align_cons)
+ {
+ switch (nbytes)
+ {
+ case 2: r = BFD_RELOC_SPARC_UA16; break;
+ case 4: r = BFD_RELOC_SPARC_UA32; break;
+ case 8: r = BFD_RELOC_SPARC_UA64; break;
+ default: abort ();
+ }
+ sparc_no_align_cons = 0;
+ }
+
fix_new_exp (frag, where, (int) nbytes, exp, 0, r);
}
diff --git a/contrib/binutils/gas/config/tc-sparc.h b/contrib/binutils/gas/config/tc-sparc.h
index 17bef83..ce19f5d 100644
--- a/contrib/binutils/gas/config/tc-sparc.h
+++ b/contrib/binutils/gas/config/tc-sparc.h
@@ -1,5 +1,6 @@
/* tc-sparc.h - Macros and type defines for the sparc.
- Copyright (C) 1989, 90-96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/tc-tic30.c b/contrib/binutils/gas/config/tc-tic30.c
index e11cb33..2190a85 100644
--- a/contrib/binutils/gas/config/tc-tic30.c
+++ b/contrib/binutils/gas/config/tc-tic30.c
@@ -1,5 +1,5 @@
/* tc-c30.c -- Assembly code for the Texas Instruments TMS320C30
- Copyright (C) 1998, 1999, 2000 Free Software Foundation.
+ Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/tc-tic30.h b/contrib/binutils/gas/config/tc-tic30.h
index 5b34cf1..d55c870 100644
--- a/contrib/binutils/gas/config/tc-tic30.h
+++ b/contrib/binutils/gas/config/tc-tic30.h
@@ -1,5 +1,5 @@
/* tc-tic30.h -- Header file for tc-tic30.c
- Copyright (C) 1998, 2000 Free Software Foundation.
+ Copyright 1998, 2000 Free Software Foundation, Inc.
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/tc-v850.c b/contrib/binutils/gas/config/tc-v850.c
index 57931950..ce676cd 100644
--- a/contrib/binutils/gas/config/tc-v850.c
+++ b/contrib/binutils/gas/config/tc-v850.c
@@ -1,5 +1,6 @@
/* tc-v850.c -- Assembler code for the NEC V850
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -604,8 +605,8 @@ const pseudo_typeS md_pseudo_table[] = {
{"call_table_text", v850_call_table_text, 0},
{"v850e", set_machine, bfd_mach_v850e},
{"v850ea", set_machine, bfd_mach_v850ea},
- {"file", dwarf2_directive_file },
- {"loc", dwarf2_directive_loc },
+ {"file", dwarf2_directive_file, 0},
+ {"loc", dwarf2_directive_loc, 0},
{ NULL, NULL, 0}
};
@@ -1321,7 +1322,6 @@ md_convert_frag (abfd, sec, fragP)
{
fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol,
fragP->fr_offset, 1, BFD_RELOC_UNUSED + (int)fragP->fr_opcode);
- fragP->fr_var = 0;
fragP->fr_fix += 2;
}
/* Out of range conditional branch. Emit a branch around a jump. */
@@ -1345,7 +1345,6 @@ md_convert_frag (abfd, sec, fragP)
fix_new (fragP, fragP->fr_fix + 2, 4, fragP->fr_symbol,
fragP->fr_offset, 1, BFD_RELOC_UNUSED +
(int) fragP->fr_opcode + 1);
- fragP->fr_var = 0;
fragP->fr_fix += 6;
}
/* Out of range unconditional branch. Emit a jump. */
@@ -1355,7 +1354,6 @@ md_convert_frag (abfd, sec, fragP)
fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol,
fragP->fr_offset, 1, BFD_RELOC_UNUSED +
(int) fragP->fr_opcode + 1);
- fragP->fr_var = 0;
fragP->fr_fix += 4;
}
else
@@ -1702,7 +1700,6 @@ md_assemble (str)
int relaxable = 0;
unsigned long insn;
unsigned long insn_size;
- unsigned long total_insn_size = 0;
char *f;
int i;
int match;
@@ -2153,6 +2150,11 @@ md_assemble (str)
input_line_pointer = str;
+ /* Tie dwarf2 debug info to the address at the start of the insn.
+ We can't do this after the insn has been output as the current
+ frag may have been closed off. eg. by frag_var. */
+ dwarf2_emit_insn (0);
+
/* Write out the instruction. */
if (relaxable && fc > 0)
@@ -2178,7 +2180,6 @@ md_assemble (str)
md_number_to_chars (f, insn, insn_size);
md_number_to_chars (f + 2, 0, 4);
}
- total_insn_size = insn_size;
}
else
{
@@ -2193,15 +2194,11 @@ md_assemble (str)
insn_size = 2;
f = frag_more (insn_size);
- total_insn_size = insn_size;
-
md_number_to_chars (f, insn, insn_size);
if (extra_data_after_insn)
{
f = frag_more (extra_data_len);
- total_insn_size += extra_data_len;
-
md_number_to_chars (f, extra_data, extra_data_len);
extra_data_after_insn = false;
@@ -2274,8 +2271,6 @@ md_assemble (str)
}
input_line_pointer = saved_input_line_pointer;
-
- dwarf2_emit_insn (total_insn_size);
}
/* If while processing a fixup, a reloc really needs to be created
@@ -2315,20 +2310,17 @@ tc_gen_reloc (seg, fixp)
return reloc;
}
-/* Assume everything will fit in two bytes, then expand as necessary. */
+/* Return current size of variable part of frag. */
int
md_estimate_size_before_relax (fragp, seg)
fragS *fragp;
asection *seg ATTRIBUTE_UNUSED;
{
- if (fragp->fr_subtype == 0)
- fragp->fr_var = 4;
- else if (fragp->fr_subtype == 2)
- fragp->fr_var = 2;
- else
+ if (fragp->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0]))
abort ();
- return 2;
+
+ return md_relax_table[fragp->fr_subtype].rlx_length;
}
long
diff --git a/contrib/binutils/gas/config/tc-v850.h b/contrib/binutils/gas/config/tc-v850.h
index 1e597f0..7ce0491 100644
--- a/contrib/binutils/gas/config/tc-v850.h
+++ b/contrib/binutils/gas/config/tc-v850.h
@@ -1,5 +1,5 @@
/* tc-v850.h -- Header file for tc-v850.c.
- Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/tc-z8k.c b/contrib/binutils/gas/config/tc-z8k.c
index 58c85ea..73666ca 100644
--- a/contrib/binutils/gas/config/tc-z8k.c
+++ b/contrib/binutils/gas/config/tc-z8k.c
@@ -1,6 +1,6 @@
/* tc-z8k.c -- Assemble code for the Zilog Z800n
- Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
- Free Software Foundation.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -159,8 +159,6 @@ md_begin ()
for (opcode = z8k_table; opcode->name; opcode++)
{
/* Only enter unique codes into the table. */
- char *src = opcode->name;
-
if (strcmp (opcode->name, prev_name))
{
hash_insert (opcode_hash_control, opcode->name, (char *) opcode);
@@ -178,8 +176,8 @@ md_begin ()
{
opcode_entry_type *fake_opcode;
fake_opcode = (opcode_entry_type *) malloc (sizeof (opcode_entry_type));
- fake_opcode->name = md_pseudo_table[idx].poc_name,
- fake_opcode->func = (void *) (md_pseudo_table + idx);
+ fake_opcode->name = md_pseudo_table[idx].poc_name;
+ fake_opcode->func = (void *) (md_pseudo_table + idx);
fake_opcode->opcode = 250;
hash_insert (opcode_hash_control, fake_opcode->name, fake_opcode);
}
@@ -404,25 +402,24 @@ struct ctrl_names {
};
struct ctrl_names ctrl_table[] = {
- 0x2, "fcw",
- 0X3, "refresh",
- 0x4, "psapseg",
- 0x5, "psapoff",
- 0x5, "psap",
- 0x6, "nspseg",
- 0x7, "nspoff",
- 0x7, "nsp",
- 0 , 0
+ { 0x2, "fcw" },
+ { 0x3, "refresh" },
+ { 0x4, "psapseg" },
+ { 0x5, "psapoff" },
+ { 0x5, "psap" },
+ { 0x6, "nspseg" },
+ { 0x7, "nspoff" },
+ { 0x7, "nsp" },
+ { 0 , 0 }
};
static void
get_ctrl_operand (ptr, mode, dst)
char **ptr;
struct z8k_op *mode;
- unsigned int dst;
+ unsigned int dst ATTRIBUTE_UNUSED;
{
char *src = *ptr;
- int r;
int i;
while (*src == ' ')
@@ -455,23 +452,22 @@ struct flag_names {
};
struct flag_names flag_table[] = {
- 0x1, "p",
- 0x1, "v",
- 0x2, "s",
- 0x4, "z",
- 0x8, "c",
- 0x0, "+",
- 0, 0
+ { 0x1, "p" },
+ { 0x1, "v" },
+ { 0x2, "s" },
+ { 0x4, "z" },
+ { 0x8, "c" },
+ { 0x0, "+" },
+ { 0, 0 }
};
static void
get_flags_operand (ptr, mode, dst)
char **ptr;
struct z8k_op *mode;
- unsigned int dst;
+ unsigned int dst ATTRIBUTE_UNUSED;
{
char *src = *ptr;
- int r;
int i;
int j;
@@ -508,21 +504,20 @@ struct interrupt_names {
};
struct interrupt_names intr_table[] = {
- 0x1, "nvi",
- 0x2, "vi",
- 0x3, "both",
- 0x3, "all",
- 0, 0
+ { 0x1, "nvi" },
+ { 0x2, "vi" },
+ { 0x3, "both" },
+ { 0x3, "all" },
+ { 0, 0 }
};
static void
get_interrupt_operand (ptr, mode, dst)
char **ptr;
struct z8k_op *mode;
- unsigned int dst;
+ unsigned int dst ATTRIBUTE_UNUSED;
{
char *src = *ptr;
- int r;
int i;
while (*src == ' ')
@@ -555,39 +550,38 @@ struct cc_names {
};
struct cc_names table[] = {
- 0x0, "f",
- 0x1, "lt",
- 0x2, "le",
- 0x3, "ule",
- 0x4, "ov",
- 0x4, "pe",
- 0x5, "mi",
- 0x6, "eq",
- 0x6, "z",
- 0x7, "c",
- 0x7, "ult",
- 0x8, "t",
- 0x9, "ge",
- 0xa, "gt",
- 0xb, "ugt",
- 0xc, "nov",
- 0xc, "po",
- 0xd, "pl",
- 0xe, "ne",
- 0xe, "nz",
- 0xf, "nc",
- 0xf, "uge",
- 0 , 0
+ { 0x0, "f" },
+ { 0x1, "lt" },
+ { 0x2, "le" },
+ { 0x3, "ule" },
+ { 0x4, "ov" },
+ { 0x4, "pe" },
+ { 0x5, "mi" },
+ { 0x6, "eq" },
+ { 0x6, "z" },
+ { 0x7, "c" },
+ { 0x7, "ult" },
+ { 0x8, "t" },
+ { 0x9, "ge" },
+ { 0xa, "gt" },
+ { 0xb, "ugt" },
+ { 0xc, "nov" },
+ { 0xc, "po" },
+ { 0xd, "pl" },
+ { 0xe, "ne" },
+ { 0xe, "nz" },
+ { 0xf, "nc" },
+ { 0xf, "uge" },
+ { 0 , 0 }
};
static void
get_cc_operand (ptr, mode, dst)
char **ptr;
struct z8k_op *mode;
- unsigned int dst;
+ unsigned int dst ATTRIBUTE_UNUSED;
{
char *src = *ptr;
- int r;
int i;
while (*src == ' ')
@@ -616,13 +610,10 @@ static void
get_operand (ptr, mode, dst)
char **ptr;
struct z8k_op *mode;
- unsigned int dst;
+ unsigned int dst ATTRIBUTE_UNUSED;
{
char *src = *ptr;
char *end;
- unsigned int num;
- unsigned int len;
- unsigned int size;
mode->mode = 0;
@@ -774,7 +765,7 @@ get_operands (opcode, op_end, operand)
ptr = savptr;
get_operand (&ptr, operand + 0, 0);
if (ptr == 0)
- return;
+ return NULL;
if (*ptr == ',')
ptr++;
get_ctrl_operand (&ptr, operand + 1, 1);
@@ -786,7 +777,7 @@ get_operands (opcode, op_end, operand)
get_operand (&ptr, operand + 0, 0);
}
if (ptr == 0)
- return;
+ return NULL;
if (*ptr == ',')
ptr++;
get_operand (&ptr, operand + 1, 1);
@@ -838,8 +829,7 @@ get_specific (opcode, operands)
int found = 0;
unsigned int noperands = opcode->noperands;
- unsigned int dispreg;
- unsigned int this_index = opcode->idx;
+ int this_index = opcode->idx;
while (this_index == opcode->idx && !found)
{
@@ -848,7 +838,7 @@ get_specific (opcode, operands)
this_try = opcode++;
for (i = 0; i < noperands; i++)
{
- int mode = operands[i].mode;
+ unsigned int mode = operands[i].mode;
if ((mode & CLASS_MASK) != (this_try->arg_info[i] & CLASS_MASK))
{
@@ -912,6 +902,7 @@ get_specific (opcode, operands)
return 0;
}
+#if 0 /* Not used. */
static void
check_operand (operand, width, string)
struct z8k_op *operand;
@@ -935,6 +926,7 @@ check_operand (operand, width, string)
}
}
+#endif
static char buffer[20];
@@ -966,17 +958,15 @@ apply_fix (ptr, type, operand, size)
{
int n = operand->X_add_number;
- operand->X_add_number = n;
newfix ((ptr - buffer) / 2, type, operand);
-#if 1
switch (size)
{
- case 8: /* 8 nibbles == 32 bits */
+ case 8: /* 8 nibbles == 32 bits. */
*ptr++ = n >> 28;
*ptr++ = n >> 24;
*ptr++ = n >> 20;
*ptr++ = n >> 16;
- case 4: /* 4 niblles == 16 bits */
+ case 4: /* 4 nibbles == 16 bits. */
*ptr++ = n >> 12;
*ptr++ = n >> 8;
case 2:
@@ -985,9 +975,7 @@ apply_fix (ptr, type, operand, size)
*ptr++ = n >> 0;
break;
}
-#endif
return ptr;
-
}
/* Now we know what sort of opcodes it is. Let's build the bytes. */
@@ -997,16 +985,10 @@ apply_fix (ptr, type, operand, size)
static void
build_bytes (this_try, operand)
opcode_entry_type *this_try;
- struct z8k_op *operand;
+ struct z8k_op *operand ATTRIBUTE_UNUSED;
{
- unsigned int i;
-
- int length;
- char *output;
char *output_ptr = buffer;
- char part;
int c;
- char high;
int nib;
int nibble;
unsigned int *class_ptr;
@@ -1017,8 +999,7 @@ build_bytes (this_try, operand)
memset (buffer, 20, 0);
class_ptr = this_try->byte_info;
- top:
- for (nibble = 0; c = *class_ptr++; nibble++)
+ for (nibble = 0; (c = *class_ptr++); nibble++)
{
switch (c & CLASS_MASK)
@@ -1030,7 +1011,7 @@ build_bytes (this_try, operand)
/* Direct address, we don't cope with the SS mode right now. */
if (segmented_mode)
{
- da_operand->X_add_number |= 0x80000000;
+ /* da_operand->X_add_number |= 0x80000000; -- Now set at relocation time. */
output_ptr = apply_fix (output_ptr, R_IMM32, da_operand, 8);
}
else
@@ -1107,7 +1088,17 @@ build_bytes (this_try, operand)
*output_ptr++ = reg[c & 0xf];
break;
case CLASS_DISP:
- output_ptr = apply_fix (output_ptr, R_IMM16, da_operand, 4);
+ switch (c & ARG_MASK)
+ {
+ case ARG_DISP12:
+ output_ptr = apply_fix (output_ptr, R_CALLR, da_operand, 4);
+ break;
+ case ARG_DISP16:
+ output_ptr = apply_fix (output_ptr, R_REL16, da_operand, 4);
+ break;
+ default:
+ output_ptr = apply_fix (output_ptr, R_IMM16, da_operand, 4);
+ }
da_operand = 0;
break;
@@ -1170,16 +1161,13 @@ void
md_assemble (str)
char *str;
{
+ char c;
char *op_start;
char *op_end;
- unsigned int i;
struct z8k_op operand[3];
opcode_entry_type *opcode;
opcode_entry_type *prev_opcode;
- char *dot = 0;
- char c;
-
/* Drop leading whitespace. */
while (*str == ' ')
str++;
@@ -1253,21 +1241,21 @@ md_assemble (str)
void
tc_crawl_symbol_chain (headers)
- object_headers *headers;
+ object_headers *headers ATTRIBUTE_UNUSED;
{
printf (_("call to tc_crawl_symbol_chain \n"));
}
symbolS *
md_undefined_symbol (name)
- char *name;
+ char *name ATTRIBUTE_UNUSED;
{
return 0;
}
void
tc_headers_hook (headers)
- object_headers *headers;
+ object_headers *headers ATTRIBUTE_UNUSED;
{
printf (_("call to tc_headers_hook \n"));
}
@@ -1389,9 +1377,9 @@ tc_aout_fix_to_chars ()
void
md_convert_frag (headers, seg, fragP)
- object_headers *headers;
- segT seg;
- fragS *fragP;
+ object_headers *headers ATTRIBUTE_UNUSED;
+ segT seg ATTRIBUTE_UNUSED;
+ fragS *fragP ATTRIBUTE_UNUSED;
{
printf (_("call to md_convert_frag \n"));
abort ();
@@ -1471,8 +1459,8 @@ md_apply_fix (fixP, val)
int
md_estimate_size_before_relax (fragP, segment_type)
- register fragS *fragP;
- register segT segment_type;
+ register fragS *fragP ATTRIBUTE_UNUSED;
+ register segT segment_type ATTRIBUTE_UNUSED;
{
printf (_("call tomd_estimate_size_before_relax \n"));
abort ();
@@ -1491,14 +1479,14 @@ md_number_to_chars (ptr, use, nbytes)
long
md_pcrel_from (fixP)
- fixS *fixP;
+ fixS *fixP ATTRIBUTE_UNUSED;
{
abort ();
}
void
tc_coff_symbol_emit_hook (s)
- symbolS *s;
+ symbolS *s ATTRIBUTE_UNUSED;
{
}
diff --git a/contrib/binutils/gas/config/tc-z8k.h b/contrib/binutils/gas/config/tc-z8k.h
index 130c01c..d1899e1 100644
--- a/contrib/binutils/gas/config/tc-z8k.h
+++ b/contrib/binutils/gas/config/tc-z8k.h
@@ -1,5 +1,6 @@
/* This file is tc-z8k.h
- Copyright (C) 1987-1992, 93, 95, 97, 98, 2000
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1997, 1998,
+ 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/te-386bsd.h b/contrib/binutils/gas/config/te-386bsd.h
index 0f077b5..da2d692 100644
--- a/contrib/binutils/gas/config/te-386bsd.h
+++ b/contrib/binutils/gas/config/te-386bsd.h
@@ -1,5 +1,6 @@
/* te-386bsd.h -- 386BSD target environment declarations.
- Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc.
+ Copyright 1987, 1990, 1991, 1992, 1993, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/te-nbsd.h b/contrib/binutils/gas/config/te-nbsd.h
index 010a711..cb8dc09 100644
--- a/contrib/binutils/gas/config/te-nbsd.h
+++ b/contrib/binutils/gas/config/te-nbsd.h
@@ -1,5 +1,6 @@
/* te-nbsd.h -- NetBSD target environment declarations.
- Copyright (C) 1987, 90, 91, 92, 94, 95, 1998 Free Software Foundation, Inc.
+ Copyright 1987, 1990, 1991, 1992, 1994, 1998, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/te-ppcnw.h b/contrib/binutils/gas/config/te-ppcnw.h
index d23e38c..fcd3a972 100644
--- a/contrib/binutils/gas/config/te-ppcnw.h
+++ b/contrib/binutils/gas/config/te-ppcnw.h
@@ -1,5 +1,5 @@
/* te-ppcnw.h -- Power PC running Netware environment declarations.
- Copyright (C) 1994 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/config/te-sparcaout.h b/contrib/binutils/gas/config/te-sparcaout.h
index 6c92f63..edd3766 100644
--- a/contrib/binutils/gas/config/te-sparcaout.h
+++ b/contrib/binutils/gas/config/te-sparcaout.h
@@ -1,5 +1,5 @@
/* te-sparcaout.h -- embedded sparc-aout target environment declarations.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright 1996, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/debug.c b/contrib/binutils/gas/debug.c
index e9f6f09..7d10387 100644
--- a/contrib/binutils/gas/debug.c
+++ b/contrib/binutils/gas/debug.c
@@ -1,5 +1,6 @@
/* This file is debug.c
- Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/depend.c b/contrib/binutils/gas/depend.c
index 05a9708..c6538dd 100644
--- a/contrib/binutils/gas/depend.c
+++ b/contrib/binutils/gas/depend.c
@@ -1,5 +1,5 @@
/* depend.c - Handle dependency tracking.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/doc/Makefile.in b/contrib/binutils/gas/doc/Makefile.in
index 5f9b258..1f48577 100644
--- a/contrib/binutils/gas/doc/Makefile.in
+++ b/contrib/binutils/gas/doc/Makefile.in
@@ -175,7 +175,7 @@ DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gtar
+TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
diff --git a/contrib/binutils/gas/doc/all.texi b/contrib/binutils/gas/doc/all.texi
index 22742b4..719c80a 100644
--- a/contrib/binutils/gas/doc/all.texi
+++ b/contrib/binutils/gas/doc/all.texi
@@ -1,4 +1,5 @@
-@c Copyright 1992, 1993, 2000 Free Software Foundation, Inc.
+@c Copyright 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001
+@c Free Software Foundation, Inc.
@c This file is part of the documentation for the GAS manual
@c Configuration settings for all-inclusive version of manual
diff --git a/contrib/binutils/gas/doc/as.texinfo b/contrib/binutils/gas/doc/as.texinfo
index fb80ca5..01b3c50 100644
--- a/contrib/binutils/gas/doc/as.texinfo
+++ b/contrib/binutils/gas/doc/as.texinfo
@@ -1,5 +1,6 @@
\input texinfo @c -*-Texinfo-*-
-@c Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 2000, 2001
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+@c 2001
@c Free Software Foundation, Inc.
@c UPDATE!! On future updates--
@c (1) check for new machine-dep cmdline options in
@@ -3136,7 +3137,7 @@ Intermediate precedence
@end table
@item
-Lowest Precedence
+Low Precedence
@table @code
@cindex addition, permitted arguments
@@ -3156,6 +3157,41 @@ result has the section of the left argument.
If both arguments are in the same section, the result is absolute.
You may not subtract arguments from different sections.
@c FIXME is there still something useful to say about undefined - undefined ?
+
+@cindex comparison expressions
+@cindex expressions, comparison
+@item ==
+@dfn{Is Equal To}
+@item <>
+@dfn{Is Not Equal To}
+@item <
+@dfn{Is Less Than}
+@itemx >
+@dfn{Is Greater Than}
+@itemx >=
+@dfn{Is Greater Than Or Equal To}
+@itemx <=
+@dfn{Is Less Than Or Equal To}
+
+The comparison operators can be used as infix operators. A true results has a
+value of -1 whereas a false result has a value of 0. Note, these operators
+perform signed comparisons.
+@end table
+
+@item Lowest Precedence
+
+@table @code
+@item &&
+@dfn{Logical And}.
+
+@item ||
+@dfn{Logical Or}.
+
+These two logical operations can be used to combine the results of sub
+expressions. Note, unlike the comparison operators a true result returns a
+value of 1 but a false results does still return 0. Also note that the logical
+or operator has a slightly lower precedence than logical and.
+
@end table
@end enumerate
diff --git a/contrib/binutils/gas/doc/c-arm.texi b/contrib/binutils/gas/doc/c-arm.texi
index d3de43b..2c67222 100644
--- a/contrib/binutils/gas/doc/c-arm.texi
+++ b/contrib/binutils/gas/doc/c-arm.texi
@@ -1,4 +1,5 @@
-@c Copyright (C) 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
+@c Copyright 1996, 1997, 1998, 1999, 2000, 2001
+@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
diff --git a/contrib/binutils/gas/doc/c-i386.texi b/contrib/binutils/gas/doc/c-i386.texi
index 110d560..1527c8d 100644
--- a/contrib/binutils/gas/doc/c-i386.texi
+++ b/contrib/binutils/gas/doc/c-i386.texi
@@ -1,4 +1,5 @@
-@c Copyright (C) 1991, 92, 93, 94, 95, 97, 1998 Free Software Foundation, Inc.
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001
+@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@ifset GENERIC
@@ -26,7 +27,7 @@ extending the Intel architecture to 64-bits.
* i386-Regs:: Register Naming
* i386-Prefixes:: Instruction Prefixes
* i386-Memory:: Memory References
-* i386-jumps:: Handling of Jump Instructions
+* i386-Jumps:: Handling of Jump Instructions
* i386-Float:: Floating Point
* i386-SIMD:: Intel's MMX and AMD's 3DNow! SIMD Operations
* i386-16bit:: Writing 16-bit Code
@@ -488,7 +489,7 @@ the default absolute addressing.
Other addressing modes remain unchanged in x86-64 architecture, except
registers used are 64-bit instead of 32-bit.
-@node i386-jumps
+@node i386-Jumps
@section Handling of Jump Instructions
@cindex jump optimization, i386
@@ -498,11 +499,11 @@ registers used are 64-bit instead of 32-bit.
Jump instructions are always optimized to use the smallest possible
displacements. This is accomplished by using byte (8-bit) displacement
jumps whenever the target is sufficiently close. If a byte displacement
-is insufficient a long (32-bit) displacement is used. We do not support
+is insufficient a long displacement is used. We do not support
word (16-bit) displacement jumps in 32-bit mode (i.e. prefixing the jump
instruction with the @samp{data16} instruction prefix), since the 80386
insists upon masking @samp{%eip} to 16 bits after the word displacement
-is added.
+is added. (See also @pxref{i386-Arch})
Note that the @samp{jcxz}, @samp{jecxz}, @samp{loop}, @samp{loopz},
@samp{loope}, @samp{loopnz} and @samp{loopne} instructions only come in byte
@@ -696,13 +697,33 @@ supported on the CPU specified. The choices for @var{cpu_type} are:
@item @samp{sledgehammer}
@end multitable
-Apart from the warning, there is only one other effect on
-@code{@value{AS}} operation; If you specify a CPU other than
+Apart from the warning, there are only two other effects on
+@code{@value{AS}} operation; Firstly, if you specify a CPU other than
@samp{i486}, then shift by one instructions such as @samp{sarl $1, %eax}
will automatically use a two byte opcode sequence. The larger three
byte opcode sequence is used on the 486 (and when no architecture is
specified) because it executes faster on the 486. Note that you can
explicitly request the two byte opcode by writing @samp{sarl %eax}.
+Secondly, if you specify @samp{i8086}, @samp{i186}, or @samp{i286},
+@emph{and} @samp{.code16} or @samp{.code16gcc} then byte offset
+conditional jumps will be promoted when necessary to a two instruction
+sequence consisting of a conditional jump of the opposite sense around
+an unconditional jump to the target.
+
+Following the CPU architecture, you may specify @samp{jumps} or
+@samp{nojumps} to control automatic promotion of conditional jumps.
+@samp{jumps} is the default, and enables jump promotion; All external
+jumps will be of the long variety, and file-local jumps will be promoted
+as necessary. (@pxref{i386-Jumps}) @samp{nojumps} leaves external
+conditional jumps as byte offset jumps, and warns about file-local
+conditional jumps that @code{@value{AS}} promotes.
+Unconditional jumps are treated as for @samp{jumps}.
+
+For example
+
+@smallexample
+ .arch i8086,nojumps
+@end smallexample
@node i386-Notes
@section Notes
diff --git a/contrib/binutils/gas/doc/c-sparc.texi b/contrib/binutils/gas/doc/c-sparc.texi
index ab54eb2..624c21e3 100644
--- a/contrib/binutils/gas/doc/c-sparc.texi
+++ b/contrib/binutils/gas/doc/c-sparc.texi
@@ -1,4 +1,5 @@
-@c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1999
+@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@ifset GENERIC
diff --git a/contrib/binutils/gas/doc/c-v850.texi b/contrib/binutils/gas/doc/c-v850.texi
index 5416e0f..4b36461 100644
--- a/contrib/binutils/gas/doc/c-v850.texi
+++ b/contrib/binutils/gas/doc/c-v850.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+@c Copyright 1997 Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
diff --git a/contrib/binutils/gas/doc/c-z8k.texi b/contrib/binutils/gas/doc/c-z8k.texi
index 1fb10e3..d98adea 100644
--- a/contrib/binutils/gas/doc/c-z8k.texi
+++ b/contrib/binutils/gas/doc/c-z8k.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+@c Copyright 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@ifset GENERIC
diff --git a/contrib/binutils/gas/doc/gasp.texi b/contrib/binutils/gas/doc/gasp.texi
index e023edc..e5bda63 100644
--- a/contrib/binutils/gas/doc/gasp.texi
+++ b/contrib/binutils/gas/doc/gasp.texi
@@ -3,7 +3,7 @@
@c
@c This file documents the assembly preprocessor "GASP"
@c
-@c Copyright (c) 1994, 2000 Free Software Foundation, Inc.
+@c Copyright 1994, 1995, 2000 Free Software Foundation, Inc.
@c
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.1
diff --git a/contrib/binutils/gas/doc/internals.texi b/contrib/binutils/gas/doc/internals.texi
index a42bc0f..eebb9bb 100644
--- a/contrib/binutils/gas/doc/internals.texi
+++ b/contrib/binutils/gas/doc/internals.texi
@@ -1,4 +1,7 @@
\input texinfo
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+@c 2001
+@c Free Software Foundation, Inc.
@setfilename internals.info
@node Top
@top Assembler Internals
@@ -1166,9 +1169,10 @@ relocations.
@item md_relax_frag
@cindex md_relax_frag
-This macro may be defined to relax a frag. GAS will call this with the frag
-and the change in size of all previous frags; @code{md_relax_frag} should
-return the change in size of the frag. @xref{Relaxation}.
+This macro may be defined to relax a frag. GAS will call this with the
+segment, the frag, and the change in size of all previous frags;
+@code{md_relax_frag} should return the change in size of the frag.
+@xref{Relaxation}.
@item TC_GENERIC_RELAX_TABLE
@cindex TC_GENERIC_RELAX_TABLE
diff --git a/contrib/binutils/gas/dwarf2dbg.c b/contrib/binutils/gas/dwarf2dbg.c
index e44574d..ea76069 100644
--- a/contrib/binutils/gas/dwarf2dbg.c
+++ b/contrib/binutils/gas/dwarf2dbg.c
@@ -1,5 +1,5 @@
/* dwarf2dbg.c - DWARF2 debug support
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GAS, the GNU Assembler.
@@ -324,7 +324,7 @@ dwarf2_directive_file (dummy)
int dummy ATTRIBUTE_UNUSED;
{
offsetT num;
- const char *filename;
+ char *filename;
int filename_len;
/* Continue to accept a bare string and pass it off. */
@@ -347,7 +347,7 @@ dwarf2_directive_file (dummy)
if (num < files_in_use && files[num].filename != 0)
{
- as_bad (_("File number %d already allocated"), num);
+ as_bad (_("File number %ld already allocated"), (long) num);
return;
}
@@ -873,7 +873,11 @@ process_entries (seg, e)
changed = 1;
}
- if (line != e->loc.line || changed)
+ /* Don't try to optimize away redundant entries; gdb wants two
+ entries for a function where the code starts on the same line as
+ the {, and there's no way to identify that case here. Trust gcc
+ to optimize appropriately. */
+ if (1 /* line != e->loc.line || changed */)
{
int line_delta = e->loc.line - line;
if (frag == NULL)
@@ -1296,7 +1300,7 @@ void
dwarf2_directive_file (dummy)
int dummy ATTRIBUTE_UNUSED;
{
- as_fatal (_("dwarf2 is not supported for this object file format"));
+ s_app_file (0);
}
void
diff --git a/contrib/binutils/gas/dwarf2dbg.h b/contrib/binutils/gas/dwarf2dbg.h
index cdb76ab..8087b29 100644
--- a/contrib/binutils/gas/dwarf2dbg.h
+++ b/contrib/binutils/gas/dwarf2dbg.h
@@ -1,5 +1,5 @@
/* dwarf2dbg.h - DWARF2 debug support
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/ecoff.c b/contrib/binutils/gas/ecoff.c
index f04e530..57ddddc 100644
--- a/contrib/binutils/gas/ecoff.c
+++ b/contrib/binutils/gas/ecoff.c
@@ -1,5 +1,6 @@
/* ECOFF debugging support.
- Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>. A
good deal of it comes directly from mips-tfile.c, by Michael
@@ -2189,7 +2190,7 @@ ecoff_get_cur_proc_sym ()
static void
add_file (file_name, indx, fake)
const char *file_name; /* file name */
- int indx;
+ int indx ATTRIBUTE_UNUSED;
int fake;
{
register int first_ch;
@@ -2425,7 +2426,7 @@ st_to_string (symbol_type)
void
ecoff_directive_begin (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -2463,7 +2464,7 @@ ecoff_directive_begin (ignore)
void
ecoff_directive_bend (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -2522,7 +2523,7 @@ static int coff_inside_enumeration;
void
ecoff_directive_def (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -2568,7 +2569,7 @@ ecoff_directive_def (ignore)
void
ecoff_directive_dim (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int dimens[N_TQ];
int i;
@@ -2618,7 +2619,7 @@ ecoff_directive_dim (ignore)
void
ecoff_directive_scl (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
@@ -2643,7 +2644,7 @@ ecoff_directive_scl (ignore)
void
ecoff_directive_size (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int sizes[N_TQ];
int i;
@@ -2693,7 +2694,7 @@ ecoff_directive_size (ignore)
void
ecoff_directive_type (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
tq_t *tq_ptr;
@@ -2762,7 +2763,7 @@ ecoff_directive_type (ignore)
void
ecoff_directive_tag (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -2790,7 +2791,7 @@ ecoff_directive_tag (ignore)
void
ecoff_directive_val (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
expressionS exp;
@@ -2825,7 +2826,7 @@ ecoff_directive_val (ignore)
void
ecoff_directive_endef (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
symint_t indx;
@@ -3005,7 +3006,7 @@ ecoff_directive_endef (ignore)
void
ecoff_directive_end (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -3062,7 +3063,7 @@ ecoff_directive_end (ignore)
void
ecoff_directive_ent (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -3115,7 +3116,7 @@ ecoff_directive_ent (ignore)
void
ecoff_directive_extern (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
int c;
@@ -3140,7 +3141,7 @@ ecoff_directive_extern (ignore)
void
ecoff_directive_file (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int indx;
char *name;
@@ -3167,7 +3168,7 @@ ecoff_directive_file (ignore)
void
ecoff_directive_fmask (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
@@ -3196,7 +3197,7 @@ ecoff_directive_fmask (ignore)
void
ecoff_directive_frame (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
@@ -3237,7 +3238,7 @@ ecoff_directive_frame (ignore)
void
ecoff_directive_mask (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
@@ -3266,7 +3267,7 @@ ecoff_directive_mask (ignore)
void
ecoff_directive_loc (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
lineno_list_t *list;
symint_t lineno;
@@ -3363,7 +3364,7 @@ ecoff_fix_loc (old_frag, old_frag_offset)
static void
mark_stabs (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (! stabs_seen)
{
@@ -3460,7 +3461,7 @@ ecoff_directive_weakext (ignore)
void
ecoff_stab (sec, what, string, type, other, desc)
- segT sec;
+ segT sec ATTRIBUTE_UNUSED;
int what;
const char *string;
int type;
@@ -3619,7 +3620,7 @@ ecoff_frob_symbol (sym)
{
if (S_IS_COMMON (sym)
&& S_GET_VALUE (sym) > 0
- && S_GET_VALUE (sym) <= bfd_get_gp_size (stdoutput))
+ && S_GET_VALUE (sym) <= (unsigned) bfd_get_gp_size (stdoutput))
{
static asection scom_section;
static asymbol scom_symbol;
@@ -3690,7 +3691,7 @@ ecoff_padding_adjust (backend, buf, bufend, offset, bufptrptr)
unsigned long add;
add = align - (offset & (align - 1));
- if (*bufend - (*buf + offset) < add)
+ if ((unsigned long) (*bufend - (*buf + offset)) < add)
(void) ecoff_add_bytes (buf, bufend, *buf + offset, add);
memset (*buf + offset, 0, add);
offset += add;
@@ -4084,7 +4085,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
s = symbol_get_obj (as_sym)->ecoff_extern_size;
if (s == 0
- || s > bfd_get_gp_size (stdoutput))
+ || s > (unsigned) bfd_get_gp_size (stdoutput))
sc = sc_Undefined;
else
{
@@ -4099,7 +4100,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
{
if (S_GET_VALUE (as_sym) > 0
&& (S_GET_VALUE (as_sym)
- <= bfd_get_gp_size (stdoutput)))
+ <= (unsigned) bfd_get_gp_size (stdoutput)))
sc = sc_SCommon;
else
sc = sc_Common;
@@ -4254,7 +4255,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
if (local)
{
- if (*bufend - sym_out < external_sym_size)
+ if ((bfd_size_type)(*bufend - sym_out) < external_sym_size)
sym_out = ecoff_add_bytes (buf, bufend,
sym_out,
external_sym_size);
@@ -4372,7 +4373,7 @@ ecoff_build_procs (backend, buf, bufend, offset)
first = 0;
}
proc_ptr->pdr.adr = adr - fil_ptr->fdr.adr;
- if (*bufend - pdr_out < external_pdr_size)
+ if ((bfd_size_type)(*bufend - pdr_out) < external_pdr_size)
pdr_out = ecoff_add_bytes (buf, bufend,
pdr_out,
external_pdr_size);
@@ -4445,7 +4446,8 @@ ecoff_build_aux (backend, buf, bufend, offset)
aux_end = aux_ptr + aux_cnt;
for (; aux_ptr < aux_end; aux_ptr++)
{
- if (*bufend - (char *) aux_out < sizeof (union aux_ext))
+ if ((unsigned long) (*bufend - (char *) aux_out)
+ < sizeof (union aux_ext))
aux_out = ((union aux_ext *)
ecoff_add_bytes (buf, bufend,
(char *) aux_out,
@@ -4530,7 +4532,7 @@ ecoff_build_strings (buf, bufend, offset, vp)
else
str_cnt = vp->objects_per_page;
- if (*bufend - str_out < str_cnt)
+ if ((unsigned long)(*bufend - str_out) < str_cnt)
str_out = ecoff_add_bytes (buf, bufend, str_out, str_cnt);
memcpy (str_out, str_link->datum->byte, str_cnt);
@@ -4621,7 +4623,7 @@ ecoff_build_fdr (backend, buf, bufend, offset)
fil_end = fil_ptr + fil_cnt;
for (; fil_ptr < fil_end; fil_ptr++)
{
- if (*bufend - fdr_out < external_fdr_size)
+ if ((bfd_size_type)(*bufend - fdr_out) < external_fdr_size)
fdr_out = ecoff_add_bytes (buf, bufend, fdr_out,
external_fdr_size);
(*swap_fdr_out) (stdoutput, &fil_ptr->fdr, fdr_out);
@@ -4771,7 +4773,7 @@ ecoff_build_debug (hdr, bufp, backend)
space at this point. */
hdr->ipdMax = proc_cnt;
hdr->cbPdOffset = offset;
- if (bufend - (buf + offset) < proc_cnt * external_pdr_size)
+ if ((bfd_size_type)(bufend - (buf + offset)) < proc_cnt * external_pdr_size)
(void) ecoff_add_bytes (&buf, &bufend, buf + offset,
proc_cnt * external_pdr_size);
offset += proc_cnt * external_pdr_size;
diff --git a/contrib/binutils/gas/ecoff.h b/contrib/binutils/gas/ecoff.h
index 8ac65f8..f6b96c6 100644
--- a/contrib/binutils/gas/ecoff.h
+++ b/contrib/binutils/gas/ecoff.h
@@ -1,5 +1,6 @@
/* ecoff.h -- header file for ECOFF debugging support
- Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
Put together by Ian Lance Taylor <ian@cygnus.com>.
diff --git a/contrib/binutils/gas/ehopt.c b/contrib/binutils/gas/ehopt.c
index 4131436..64ea7e0 100644
--- a/contrib/binutils/gas/ehopt.c
+++ b/contrib/binutils/gas/ehopt.c
@@ -1,5 +1,5 @@
/* ehopt.c--optimize gcc exception frame information.
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 2000, 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GAS, the GNU Assembler.
@@ -88,30 +88,27 @@ __FRAME_BEGIN__:
not know this value, it always uses four bytes. We will know the
value at the end of assembly, so we can do better. */
-static int eh_frame_code_alignment PARAMS ((int));
+struct cie_info
+{
+ unsigned code_alignment;
+ int z_augmentation;
+};
+
+static int get_cie_info PARAMS ((struct cie_info *));
-/* Get the code alignment factor from the CIE. */
+/* Extract information from the CIE. */
static int
-eh_frame_code_alignment (in_seg)
- int in_seg;
+get_cie_info (info)
+ struct cie_info *info;
{
- /* ??? Assume .eh_frame and .debug_frame have the same alignment. */
- static int code_alignment;
-
fragS *f;
fixS *fix;
int offset;
char CIE_id;
char augmentation[10];
int iaug;
-
- if (code_alignment != 0)
- return code_alignment;
-
- /* Can't find the alignment if we've changed sections. */
- if (! in_seg)
- return -1;
+ int code_alignment = 0;
/* We should find the CIE at the start of the section. */
@@ -147,10 +144,7 @@ eh_frame_code_alignment (in_seg)
|| f->fr_literal[offset + 1] != CIE_id
|| f->fr_literal[offset + 2] != CIE_id
|| f->fr_literal[offset + 3] != CIE_id)
- {
- code_alignment = -1;
- return -1;
- }
+ return 0;
/* Next make sure the CIE version number is 1. */
@@ -163,10 +157,7 @@ eh_frame_code_alignment (in_seg)
if (f == NULL
|| f->fr_fix - offset < 1
|| f->fr_literal[offset] != 1)
- {
- code_alignment = -1;
- return -1;
- }
+ return 0;
/* Skip the augmentation (a null terminated string). */
@@ -180,10 +171,8 @@ eh_frame_code_alignment (in_seg)
f = f->fr_next;
}
if (f == NULL)
- {
- code_alignment = -1;
- return -1;
- }
+ return 0;
+
while (offset < f->fr_fix && f->fr_literal[offset] != '\0')
{
if ((size_t) iaug < (sizeof augmentation) - 1)
@@ -203,10 +192,7 @@ eh_frame_code_alignment (in_seg)
f = f->fr_next;
}
if (f == NULL)
- {
- code_alignment = -1;
- return -1;
- }
+ return 0;
augmentation[iaug] = '\0';
if (augmentation[0] == '\0')
@@ -230,28 +216,22 @@ eh_frame_code_alignment (in_seg)
f = f->fr_next;
}
if (f == NULL)
- {
- code_alignment = -1;
- return -1;
- }
- }
- else
- {
- code_alignment = -1;
- return -1;
+ return 0;
}
+ else if (augmentation[0] != 'z')
+ return 0;
/* We're now at the code alignment factor, which is a ULEB128. If
it isn't a single byte, forget it. */
code_alignment = f->fr_literal[offset] & 0xff;
- if ((code_alignment & 0x80) != 0 || code_alignment == 0)
- {
- code_alignment = -1;
- return -1;
- }
+ if ((code_alignment & 0x80) != 0)
+ code_alignment = 0;
- return code_alignment;
+ info->code_alignment = code_alignment;
+ info->z_augmentation = (augmentation[0] == 'z');
+
+ return 1;
}
/* This function is called from emit_expr. It looks for cases which
@@ -274,11 +254,28 @@ check_eh_frame (exp, pnbytes)
{
struct frame_data
{
+ enum frame_state
+ {
+ state_idle,
+ state_saw_size,
+ state_saw_cie_offset,
+ state_saw_pc_begin,
+ state_seeing_aug_size,
+ state_skipping_aug,
+ state_wait_loc4,
+ state_saw_loc4,
+ state_error,
+ } state;
+
+ int cie_info_ok;
+ struct cie_info cie_info;
+
symbolS *size_end_sym;
fragS *loc4_frag;
- int saw_size;
- int saw_advance_loc4;
int loc4_fix;
+
+ int aug_size;
+ int aug_shift;
};
static struct frame_data eh_frame_data;
@@ -297,123 +294,177 @@ check_eh_frame (exp, pnbytes)
else
return 0;
- if (d->saw_size && S_IS_DEFINED (d->size_end_sym))
+ if (d->state >= state_saw_size && S_IS_DEFINED (d->size_end_sym))
{
/* We have come to the end of the CIE or FDE. See below where
we set saw_size. We must check this first because we may now
be looking at the next size. */
- d->saw_size = 0;
- d->saw_advance_loc4 = 0;
+ d->state = state_idle;
}
- if (! d->saw_size
- && *pnbytes == 4)
+ switch (d->state)
{
- /* This might be the size of the CIE or FDE. We want to know
- the size so that we don't accidentally optimize across an FDE
- boundary. We recognize the size in one of two forms: a
- symbol which will later be defined as a difference, or a
- subtraction of two symbols. Either way, we can tell when we
- are at the end of the FDE because the symbol becomes defined
- (in the case of a subtraction, the end symbol, from which the
- start symbol is being subtracted). Other ways of describing
- the size will not be optimized. */
- if ((exp->X_op == O_symbol || exp->X_op == O_subtract)
- && ! S_IS_DEFINED (exp->X_add_symbol))
+ case state_idle:
+ if (*pnbytes == 4)
{
- d->saw_size = 1;
- d->size_end_sym = exp->X_add_symbol;
+ /* This might be the size of the CIE or FDE. We want to know
+ the size so that we don't accidentally optimize across an FDE
+ boundary. We recognize the size in one of two forms: a
+ symbol which will later be defined as a difference, or a
+ subtraction of two symbols. Either way, we can tell when we
+ are at the end of the FDE because the symbol becomes defined
+ (in the case of a subtraction, the end symbol, from which the
+ start symbol is being subtracted). Other ways of describing
+ the size will not be optimized. */
+ if ((exp->X_op == O_symbol || exp->X_op == O_subtract)
+ && ! S_IS_DEFINED (exp->X_add_symbol))
+ {
+ d->state = state_saw_size;
+ d->size_end_sym = exp->X_add_symbol;
+ }
}
- }
- else if (d->saw_size
- && *pnbytes == 1
- && exp->X_op == O_constant
- && exp->X_add_number == DW_CFA_advance_loc4)
- {
- /* This might be a DW_CFA_advance_loc4. Record the frag and the
- position within the frag, so that we can change it later. */
- d->saw_advance_loc4 = 1;
- frag_grow (1);
- d->loc4_frag = frag_now;
- d->loc4_fix = frag_now_fix ();
- }
- else if (d->saw_advance_loc4
- && *pnbytes == 4
- && exp->X_op == O_constant)
- {
- int ca;
-
- /* This is a case which we can optimize. The two symbols being
- subtracted were in the same frag and the expression was
- reduced to a constant. We can do the optimization entirely
- in this function. */
-
- d->saw_advance_loc4 = 0;
-
- ca = eh_frame_code_alignment (1);
- if (ca < 0)
+ break;
+
+ case state_saw_size:
+ case state_saw_cie_offset:
+ /* Assume whatever form it appears in, it appears atomically. */
+ d->state += 1;
+ break;
+
+ case state_saw_pc_begin:
+ /* Decide whether we should see an augmentation. */
+ if (! d->cie_info_ok
+ && ! (d->cie_info_ok = get_cie_info (&d->cie_info)))
+ d->state = state_error;
+ else if (d->cie_info.z_augmentation)
{
- /* Don't optimize. */
+ d->state = state_seeing_aug_size;
+ d->aug_size = 0;
+ d->aug_shift = 0;
}
- else if (exp->X_add_number % ca == 0
- && exp->X_add_number / ca < 0x40)
+ else
+ d->state = state_wait_loc4;
+ break;
+
+ case state_seeing_aug_size:
+ /* Bytes == -1 means this comes from an leb128 directive. */
+ if ((int)*pnbytes == -1 && exp->X_op == O_constant)
{
- d->loc4_frag->fr_literal[d->loc4_fix]
- = DW_CFA_advance_loc | (exp->X_add_number / ca);
- /* No more bytes needed. */
- return 1;
+ d->aug_size = exp->X_add_number;
+ d->state = state_skipping_aug;
}
- else if (exp->X_add_number < 0x100)
+ else if (*pnbytes == 1 && exp->X_op == O_constant)
{
- d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc1;
- *pnbytes = 1;
+ unsigned char byte = exp->X_add_number;
+ d->aug_size |= (byte & 0x7f) << d->aug_shift;
+ d->aug_shift += 7;
+ if ((byte & 0x80) == 0)
+ d->state = state_skipping_aug;
}
- else if (exp->X_add_number < 0x10000)
+ else
+ d->state = state_error;
+ break;
+
+ case state_skipping_aug:
+ if ((int)*pnbytes < 0)
+ d->state = state_error;
+ else
{
- d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc2;
- *pnbytes = 2;
+ int left = (d->aug_size -= *pnbytes);
+ if (left == 0)
+ d->state = state_wait_loc4;
+ else if (left < 0)
+ d->state = state_error;
}
- }
- else if (d->saw_advance_loc4
- && *pnbytes == 4
- && exp->X_op == O_subtract)
- {
- /* This is a case we can optimize. The expression was not
- reduced, so we can not finish the optimization until the end
- of the assembly. We set up a variant frag which we handle
- later. */
+ break;
- d->saw_advance_loc4 = 0;
+ case state_wait_loc4:
+ if (*pnbytes == 1
+ && exp->X_op == O_constant
+ && exp->X_add_number == DW_CFA_advance_loc4)
+ {
+ /* This might be a DW_CFA_advance_loc4. Record the frag and the
+ position within the frag, so that we can change it later. */
+ frag_grow (1);
+ d->state = state_saw_loc4;
+ d->loc4_frag = frag_now;
+ d->loc4_fix = frag_now_fix ();
+ }
+ break;
- frag_var (rs_cfa, 4, 0, 0, make_expr_symbol (exp),
- d->loc4_fix, (char *) d->loc4_frag);
+ case state_saw_loc4:
+ d->state = state_wait_loc4;
+ if (*pnbytes != 4)
+ break;
+ if (exp->X_op == O_constant)
+ {
+ /* This is a case which we can optimize. The two symbols being
+ subtracted were in the same frag and the expression was
+ reduced to a constant. We can do the optimization entirely
+ in this function. */
+ if (d->cie_info.code_alignment > 0
+ && exp->X_add_number % d->cie_info.code_alignment == 0
+ && exp->X_add_number / d->cie_info.code_alignment < 0x40)
+ {
+ d->loc4_frag->fr_literal[d->loc4_fix]
+ = DW_CFA_advance_loc
+ | (exp->X_add_number / d->cie_info.code_alignment);
+ /* No more bytes needed. */
+ return 1;
+ }
+ else if (exp->X_add_number < 0x100)
+ {
+ d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc1;
+ *pnbytes = 1;
+ }
+ else if (exp->X_add_number < 0x10000)
+ {
+ d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc2;
+ *pnbytes = 2;
+ }
+ }
+ else if (exp->X_op == O_subtract)
+ {
+ /* This is a case we can optimize. The expression was not
+ reduced, so we can not finish the optimization until the end
+ of the assembly. We set up a variant frag which we handle
+ later. */
+ int fr_subtype;
+
+ if (d->cie_info.code_alignment > 0)
+ fr_subtype = d->cie_info.code_alignment << 3;
+ else
+ fr_subtype = 0;
+
+ frag_var (rs_cfa, 4, 0, fr_subtype, make_expr_symbol (exp),
+ d->loc4_fix, (char *) d->loc4_frag);
+ return 1;
+ }
+ break;
- return 1;
+ case state_error:
+ /* Just skipping everything. */
+ break;
}
- else
- d->saw_advance_loc4 = 0;
return 0;
}
/* The function estimates the size of a rs_cfa variant frag based on
the current values of the symbols. It is called before the
- relaxation loop. We set fr_subtype to the expected length. */
+ relaxation loop. We set fr_subtype{0:2} to the expected length. */
int
eh_frame_estimate_size_before_relax (frag)
fragS *frag;
{
- int ca;
offsetT diff;
+ int ca = frag->fr_subtype >> 3;
int ret;
- ca = eh_frame_code_alignment (0);
diff = resolve_symbol_value (frag->fr_symbol, 0);
- if (ca < 0)
- ret = 4;
- else if (diff % ca == 0 && diff / ca < 0x40)
+ if (ca > 0 && diff % ca == 0 && diff / ca < 0x40)
ret = 0;
else if (diff < 0x100)
ret = 1;
@@ -422,14 +473,14 @@ eh_frame_estimate_size_before_relax (frag)
else
ret = 4;
- frag->fr_subtype = ret;
+ frag->fr_subtype = (frag->fr_subtype & ~7) | ret;
return ret;
}
/* This function relaxes a rs_cfa variant frag based on the current
- values of the symbols. fr_subtype is the current length of the
- frag. This returns the change in frag length. */
+ values of the symbols. fr_subtype{0:2} is the current length of
+ the frag. This returns the change in frag length. */
int
eh_frame_relax_frag (frag)
@@ -437,14 +488,14 @@ eh_frame_relax_frag (frag)
{
int oldsize, newsize;
- oldsize = frag->fr_subtype;
+ oldsize = frag->fr_subtype & 7;
newsize = eh_frame_estimate_size_before_relax (frag);
return newsize - oldsize;
}
/* This function converts a rs_cfa variant frag into a normal fill
frag. This is called after all relaxation has been done.
- fr_subtype will be the desired length of the frag. */
+ fr_subtype{0:2} will be the desired length of the frag. */
void
eh_frame_convert_frag (frag)
@@ -459,30 +510,35 @@ eh_frame_convert_frag (frag)
diff = resolve_symbol_value (frag->fr_symbol, 1);
- if (frag->fr_subtype == 0)
- {
- int ca;
-
- ca = eh_frame_code_alignment (0);
- assert (ca > 0 && diff % ca == 0 && diff / ca < 0x40);
- loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc | (diff / ca);
- }
- else if (frag->fr_subtype == 1)
+ switch (frag->fr_subtype & 7)
{
+ case 0:
+ {
+ int ca = frag->fr_subtype >> 3;
+ assert (ca > 0 && diff % ca == 0 && diff / ca < 0x40);
+ loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc | (diff / ca);
+ }
+ break;
+
+ case 1:
assert (diff < 0x100);
loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc1;
frag->fr_literal[frag->fr_fix] = diff;
- }
- else if (frag->fr_subtype == 2)
- {
+ break;
+
+ case 2:
assert (diff < 0x10000);
loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc2;
md_number_to_chars (frag->fr_literal + frag->fr_fix, diff, 2);
+ break;
+
+ default:
+ md_number_to_chars (frag->fr_literal + frag->fr_fix, diff, 4);
+ break;
}
- else
- md_number_to_chars (frag->fr_literal + frag->fr_fix, diff, 4);
- frag->fr_fix += frag->fr_subtype;
+ frag->fr_fix += frag->fr_subtype & 7;
frag->fr_type = rs_fill;
+ frag->fr_subtype = 0;
frag->fr_offset = 0;
}
diff --git a/contrib/binutils/gas/emul-target.h b/contrib/binutils/gas/emul-target.h
index 3704050..8f18684 100644
--- a/contrib/binutils/gas/emul-target.h
+++ b/contrib/binutils/gas/emul-target.h
@@ -1,3 +1,23 @@
+/* emul-target.h. Default values for struct emulation defined in emul.h
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
#ifndef emul_init
#define emul_init common_emul_init
#endif
diff --git a/contrib/binutils/gas/emul.h b/contrib/binutils/gas/emul.h
index 97c46d8..465f844 100644
--- a/contrib/binutils/gas/emul.h
+++ b/contrib/binutils/gas/emul.h
@@ -1,3 +1,23 @@
+/* emul.h. File format emulation routines
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
#ifndef EMUL_DEFS
#define EMUL_DEFS
diff --git a/contrib/binutils/gas/expr.c b/contrib/binutils/gas/expr.c
index 2df2f63..3b49ac7 100644
--- a/contrib/binutils/gas/expr.c
+++ b/contrib/binutils/gas/expr.c
@@ -1,5 +1,6 @@
/* expr.c -operands, expressions-
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/expr.h b/contrib/binutils/gas/expr.h
index d63ab7f..9483caf 100644
--- a/contrib/binutils/gas/expr.h
+++ b/contrib/binutils/gas/expr.h
@@ -1,5 +1,6 @@
/* expr.h -> header file for expr.c
- Copyright (C) 1987, 92-99, 2000 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/flonum-copy.c b/contrib/binutils/gas/flonum-copy.c
index 79a34c0..1e6b40b 100644
--- a/contrib/binutils/gas/flonum-copy.c
+++ b/contrib/binutils/gas/flonum-copy.c
@@ -1,5 +1,6 @@
/* flonum_copy.c - copy a flonum
- Copyright (C) 1987, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
+ Copyright 1987, 1990, 1991, 1992, 1993, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/flonum-konst.c b/contrib/binutils/gas/flonum-konst.c
index 599ce5e..04fa1f4 100644
--- a/contrib/binutils/gas/flonum-konst.c
+++ b/contrib/binutils/gas/flonum-konst.c
@@ -1,5 +1,5 @@
/* flonum_const.c - Useful Flonum constants
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/flonum-mult.c b/contrib/binutils/gas/flonum-mult.c
index 9733724..e2bcffa 100644
--- a/contrib/binutils/gas/flonum-mult.c
+++ b/contrib/binutils/gas/flonum-mult.c
@@ -1,5 +1,5 @@
/* flonum_mult.c - multiply two flonums
- Copyright (C) 1987, 1990, 1991, 1992, 2000
+ Copyright 1987, 1990, 1991, 1992, 1995, 2000
Free Software Foundation, Inc.
This file is part of Gas, the GNU Assembler.
diff --git a/contrib/binutils/gas/flonum.h b/contrib/binutils/gas/flonum.h
index d1a5042..e50d9bf 100644
--- a/contrib/binutils/gas/flonum.h
+++ b/contrib/binutils/gas/flonum.h
@@ -1,5 +1,5 @@
/* flonum.h - Floating point package
- Copyright (C) 1987, 90, 91, 92, 94, 95, 96, 2000
+ Copyright 1987, 1990, 1991, 1992, 1994, 1996, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/frags.c b/contrib/binutils/gas/frags.c
index f2f8cfe..4dc2a7d 100644
--- a/contrib/binutils/gas/frags.c
+++ b/contrib/binutils/gas/frags.c
@@ -1,5 +1,6 @@
/* frags.c - manage frags -
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/frags.h b/contrib/binutils/gas/frags.h
index c1c652b..e4cb050 100644
--- a/contrib/binutils/gas/frags.h
+++ b/contrib/binutils/gas/frags.h
@@ -1,5 +1,5 @@
/* frags.h - Header file for the frag concept.
- Copyright (C) 1987, 92, 93, 94, 95, 97, 98, 99, 2000
+ Copyright 1987, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -62,6 +62,10 @@ struct frag {
struct list_info_struct *line;
#endif
+ /* Flipped each relax pass so we can easily determine whether
+ fr_address has been adjusted. */
+ unsigned int relax_marker:1;
+
/* What state is my tail in? */
relax_stateT fr_type;
relax_substateT fr_subtype;
diff --git a/contrib/binutils/gas/gasp.c b/contrib/binutils/gas/gasp.c
index b38bbf8..ad33a46 100644
--- a/contrib/binutils/gas/gasp.c
+++ b/contrib/binutils/gas/gasp.c
@@ -1,5 +1,5 @@
/* gasp.c - Gnu assembler preprocessor main program.
- Copyright (C) 1994, 95, 96, 97, 98, 99, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
diff --git a/contrib/binutils/gas/hash.c b/contrib/binutils/gas/hash.c
index f2e98a6..ab28396 100644
--- a/contrib/binutils/gas/hash.c
+++ b/contrib/binutils/gas/hash.c
@@ -1,5 +1,6 @@
/* hash.c -- gas hash table code
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 98, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
+ 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/hash.h b/contrib/binutils/gas/hash.h
index df59d9f..ecab0fa 100644
--- a/contrib/binutils/gas/hash.h
+++ b/contrib/binutils/gas/hash.h
@@ -1,5 +1,5 @@
/* hash.h -- header file for gas hash table routines
- Copyright (C) 1987, 92, 93, 95, 1999 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 1995, 1999 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/input-file.c b/contrib/binutils/gas/input-file.c
index b390a8f..f001e52 100644
--- a/contrib/binutils/gas/input-file.c
+++ b/contrib/binutils/gas/input-file.c
@@ -1,5 +1,5 @@
/* input_file.c - Deal with Input Files -
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 98, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/input-file.h b/contrib/binutils/gas/input-file.h
index 14cb5e3..9934869 100644
--- a/contrib/binutils/gas/input-file.h
+++ b/contrib/binutils/gas/input-file.h
@@ -1,5 +1,5 @@
/* input_file.h header for input-file.c
- Copyright (C) 1987, 1992 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/input-scrub.c b/contrib/binutils/gas/input-scrub.c
index 73cf1ec..e9c7240 100644
--- a/contrib/binutils/gas/input-scrub.c
+++ b/contrib/binutils/gas/input-scrub.c
@@ -1,5 +1,6 @@
/* input_scrub.c - Break up input buffers into whole numbers of lines.
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/itbl-lex.l b/contrib/binutils/gas/itbl-lex.l
index a905ddd..4ac0946 100644
--- a/contrib/binutils/gas/itbl-lex.l
+++ b/contrib/binutils/gas/itbl-lex.l
@@ -1,5 +1,5 @@
/* itbl-lex.l
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright 1997, 1998 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/itbl-ops.c b/contrib/binutils/gas/itbl-ops.c
index 9a78219..d3650cd 100644
--- a/contrib/binutils/gas/itbl-ops.c
+++ b/contrib/binutils/gas/itbl-ops.c
@@ -1,5 +1,5 @@
/* itbl-ops.c
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -500,7 +500,7 @@ unsigned long
itbl_assemble (char *name, char *s)
{
unsigned long opcode;
- struct itbl_entry *e;
+ struct itbl_entry *e = NULL;
struct itbl_field *f;
char *n;
int processor;
diff --git a/contrib/binutils/gas/itbl-ops.h b/contrib/binutils/gas/itbl-ops.h
index 3dfd6f0..bcd68fe 100644
--- a/contrib/binutils/gas/itbl-ops.h
+++ b/contrib/binutils/gas/itbl-ops.h
@@ -1,5 +1,5 @@
/* itbl-ops.h
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/itbl-parse.y b/contrib/binutils/gas/itbl-parse.y
index 7966ee8..c1afdbd 100644
--- a/contrib/binutils/gas/itbl-parse.y
+++ b/contrib/binutils/gas/itbl-parse.y
@@ -1,5 +1,5 @@
/* itbl-parse.y
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright 1997 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/listing.h b/contrib/binutils/gas/listing.h
index c0d5c37..3301735 100644
--- a/contrib/binutils/gas/listing.h
+++ b/contrib/binutils/gas/listing.h
@@ -1,5 +1,5 @@
/* This file is listing.h
- Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 1997
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1997, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/literal.c b/contrib/binutils/gas/literal.c
index f3ccce3..7315f3e 100644
--- a/contrib/binutils/gas/literal.c
+++ b/contrib/binutils/gas/literal.c
@@ -1,5 +1,5 @@
/* as.c - GAS literal pool management.
- Copyright (C) 1994, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 2000 Free Software Foundation, Inc.
Written by Ken Raeburn (raeburn@cygnus.com).
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/macro.c b/contrib/binutils/gas/macro.c
index 74a17ff..8512208 100644
--- a/contrib/binutils/gas/macro.c
+++ b/contrib/binutils/gas/macro.c
@@ -1,5 +1,5 @@
/* macro.c - macro support for gas and gasp
- Copyright (C) 1994, 95, 96, 97, 98, 99, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
diff --git a/contrib/binutils/gas/macro.h b/contrib/binutils/gas/macro.h
index 030fc91..beff9a8 100644
--- a/contrib/binutils/gas/macro.h
+++ b/contrib/binutils/gas/macro.h
@@ -1,5 +1,6 @@
/* macro.h - header file for macro support for gas and gasp
- Copyright (C) 1994, 95, 96, 97, 98, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 2000
+ Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
diff --git a/contrib/binutils/gas/messages.c b/contrib/binutils/gas/messages.c
index e342673..e85deec 100644
--- a/contrib/binutils/gas/messages.c
+++ b/contrib/binutils/gas/messages.c
@@ -1,5 +1,5 @@
/* messages.c - error reporter -
- Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 97, 98, 2000
+ Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/obj.h b/contrib/binutils/gas/obj.h
index 4c9759f..846627a 100644
--- a/contrib/binutils/gas/obj.h
+++ b/contrib/binutils/gas/obj.h
@@ -1,7 +1,7 @@
/* obj.h - defines the object dependent hooks for all object
format backends.
- Copyright (C) 1987, 90, 91, 92, 93, 95, 96, 97, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/output-file.c b/contrib/binutils/gas/output-file.c
index a7df72f..bcd49b5 100644
--- a/contrib/binutils/gas/output-file.c
+++ b/contrib/binutils/gas/output-file.c
@@ -1,5 +1,5 @@
/* output-file.c - Deal with the output file
- Copyright (C) 1987, 90, 91, 93, 92, 94, 95, 96, 1998
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1996, 1998, 1999
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/output-file.h b/contrib/binutils/gas/output-file.h
index 942f1ef..48b7a6a 100644
--- a/contrib/binutils/gas/output-file.h
+++ b/contrib/binutils/gas/output-file.h
@@ -1,6 +1,7 @@
/* This file is output-file.h
- Copyright (C) 1987-1992 Free Software Foundation, Inc.
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/po/POTFILES.in b/contrib/binutils/gas/po/POTFILES.in
index 30dab30..f0a7cd6 100644
--- a/contrib/binutils/gas/po/POTFILES.in
+++ b/contrib/binutils/gas/po/POTFILES.in
@@ -126,18 +126,18 @@ ecoff.c
ecoff.h
ehopt.c
ehopt.c
-emul.h
emul-target.h
+emul.h
expr.c
expr.c
expr.h
flonum-copy.c
flonum-copy.c
-flonum.h
flonum-konst.c
flonum-konst.c
flonum-mult.c
flonum-mult.c
+flonum.h
frags.c
frags.c
frags.h
diff --git a/contrib/binutils/gas/read.c b/contrib/binutils/gas/read.c
index 1086bf0..32050c4 100644
--- a/contrib/binutils/gas/read.c
+++ b/contrib/binutils/gas/read.c
@@ -1,6 +1,6 @@
/* read.c - read a source file -
- Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
- 2000 Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -2379,9 +2379,17 @@ do_org (segment, exp, fill)
else
{
char *p;
+ symbolS *sym = exp->X_add_symbol;
+ offsetT off = exp->X_add_number * OCTETS_PER_BYTE;
- p = frag_var (rs_org, 1, 1, (relax_substateT) 0, exp->X_add_symbol,
- exp->X_add_number * OCTETS_PER_BYTE, (char *) NULL);
+ if (exp->X_op != O_constant && exp->X_op != O_symbol)
+ {
+ /* Handle complex expressions. */
+ sym = make_expr_symbol (exp);
+ off = 0;
+ }
+
+ p = frag_var (rs_org, 1, 1, (relax_substateT) 0, sym, off, (char *) 0);
*p = fill;
}
}
@@ -4385,6 +4393,7 @@ emit_leb128_expr (exp, sign)
int sign;
{
operatorT op = exp->X_op;
+ int nbytes;
if (op == O_absent || op == O_illegal)
{
@@ -4404,6 +4413,17 @@ emit_leb128_expr (exp, sign)
op = O_constant;
}
+ /* Let check_eh_frame know that data is being emitted. nbytes == -1 is
+ a signal that this is leb128 data. It shouldn't optimize this away. */
+ nbytes = -1;
+ if (check_eh_frame (exp, &nbytes))
+ abort ();
+
+ /* Let the backend know that subsequent data may be byte aligned. */
+#ifdef md_cons_align
+ md_cons_align (1);
+#endif
+
if (op == O_constant)
{
/* If we've got a constant, emit the thing directly right now. */
@@ -4849,12 +4869,26 @@ equals (sym_name, reassign)
}
else
{
+#ifdef OBJ_COFF
+ int local;
+
+ symbolP = symbol_find (sym_name);
+ local = symbolP == NULL;
+ if (local)
+#endif /* OBJ_COFF */
symbolP = symbol_find_or_make (sym_name);
/* Permit register names to be redefined. */
if (!reassign
&& S_IS_DEFINED (symbolP)
&& S_GET_SEGMENT (symbolP) != reg_section)
as_bad (_("symbol `%s' already defined"), S_GET_NAME (symbolP));
+
+#ifdef OBJ_COFF
+ /* "set" symbols are local unless otherwise specified. */
+ if (local)
+ SF_SET_LOCAL (symbolP);
+#endif /* OBJ_COFF */
+
pseudo_set (symbolP);
}
diff --git a/contrib/binutils/gas/read.h b/contrib/binutils/gas/read.h
index b6929c8..d19deec 100644
--- a/contrib/binutils/gas/read.h
+++ b/contrib/binutils/gas/read.h
@@ -1,5 +1,6 @@
/* read.h - of read.c
- Copyright (C) 1986, 90, 92, 93, 94, 95, 96, 97, 2000
+ Copyright 1986, 1990, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/sb.c b/contrib/binutils/gas/sb.c
index 6328716..93d2fcf 100644
--- a/contrib/binutils/gas/sb.c
+++ b/contrib/binutils/gas/sb.c
@@ -1,5 +1,5 @@
/* sb.c - string buffer manipulation routines
- Copyright (C) 1994, 1995, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 2000 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
diff --git a/contrib/binutils/gas/sb.h b/contrib/binutils/gas/sb.h
index e73e0de..dd01e0d 100644
--- a/contrib/binutils/gas/sb.h
+++ b/contrib/binutils/gas/sb.h
@@ -1,5 +1,5 @@
/* sb.h - header file for string buffer manipulation routines
- Copyright (C) 1994, 1995, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 2000 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
diff --git a/contrib/binutils/gas/stabs.c b/contrib/binutils/gas/stabs.c
index faf3a9c..eed11b3 100644
--- a/contrib/binutils/gas/stabs.c
+++ b/contrib/binutils/gas/stabs.c
@@ -1,5 +1,5 @@
/* Generic stabs parsing for gas.
- Copyright (C) 1989, 90, 91, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1989, 1990, 1991, 1993, 1995, 1996, 1997, 1998, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -185,7 +185,7 @@ s_stab_generic (what, stab_secname, stabstr_secname)
char *stabstr_secname;
{
long longint;
- char *string;
+ char *string, *saved_string_obstack_end;
int type;
int other;
int desc;
@@ -199,12 +199,19 @@ s_stab_generic (what, stab_secname, stabstr_secname)
'd' indicating which type of .stab this is. */
if (what != 's')
- string = "";
+ {
+ string = "";
+ saved_string_obstack_end = 0;
+ }
else
{
int length;
string = demand_copy_C_string (&length);
+ /* FIXME: We should probably find some other temporary storage
+ for string, rather than leaking memory if someone else
+ happens to use the notes obstack. */
+ saved_string_obstack_end = notes.next_free;
SKIP_WHITESPACE ();
if (*input_line_pointer == ',')
input_line_pointer++;
@@ -335,8 +342,9 @@ s_stab_generic (what, stab_secname, stabstr_secname)
stroff = get_stab_string_offset (string, stabstr_secname);
if (what == 's')
{
- /* release the string */
- obstack_free (&notes, string);
+ /* Release the string, if nobody else has used the obstack. */
+ if (saved_string_obstack_end == notes.next_free)
+ obstack_free (&notes, string);
}
/* At least for now, stabs in a special stab section are always
diff --git a/contrib/binutils/gas/struc-symbol.h b/contrib/binutils/gas/struc-symbol.h
index 485ba5a..6573f2c 100644
--- a/contrib/binutils/gas/struc-symbol.h
+++ b/contrib/binutils/gas/struc-symbol.h
@@ -1,5 +1,5 @@
/* struct_symbol.h - Internal symbol structure
- Copyright (C) 1987, 92, 93, 94, 95, 98, 99, 2000
+ Copyright 1987, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/subsegs.c b/contrib/binutils/gas/subsegs.c
index 1d29bba..611d64c 100644
--- a/contrib/binutils/gas/subsegs.c
+++ b/contrib/binutils/gas/subsegs.c
@@ -1,5 +1,6 @@
/* subsegs.c - subsegments -
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/subsegs.h b/contrib/binutils/gas/subsegs.h
index 504b6df..9a5abb0 100644
--- a/contrib/binutils/gas/subsegs.h
+++ b/contrib/binutils/gas/subsegs.h
@@ -1,5 +1,5 @@
/* subsegs.h -> subsegs.c
- Copyright (C) 1987, 92, 93, 94, 95, 96, 98, 2000
+ Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1998, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/symbols.c b/contrib/binutils/gas/symbols.c
index fba40cf..a72ba42 100644
--- a/contrib/binutils/gas/symbols.c
+++ b/contrib/binutils/gas/symbols.c
@@ -1,5 +1,6 @@
/* symbols.c -symbol table-
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -1530,7 +1531,7 @@ decode_local_label_name (s)
int label_number;
int instance_number;
char *type;
- const char *message_format = _("\"%d\" (instance number %d of a %s label)");
+ const char *message_format;
int index = 0;
#ifdef LOCAL_LABEL_PREFIX
@@ -1554,6 +1555,7 @@ decode_local_label_name (s)
for (instance_number = 0, p++; isdigit ((unsigned char) *p); ++p)
instance_number = (10 * instance_number) + *p - '0';
+ message_format = _("\"%d\" (instance number %d of a %s label)");
symbol_decode = obstack_alloc (&notes, strlen (message_format) + 30);
sprintf (symbol_decode, message_format, label_number, instance_number, type);
@@ -1814,6 +1816,17 @@ S_SET_EXTERNAL (s)
/* Let .weak override .global. */
return;
}
+ if (s->bsym->flags & BSF_SECTION_SYM)
+ {
+ char * file;
+ unsigned int line;
+
+ /* Do not reassign section symbols. */
+ as_where (& file, & line);
+ as_warn_where (file, line,
+ _("Section symbols are already global"));
+ return;
+ }
s->bsym->flags |= BSF_GLOBAL;
s->bsym->flags &= ~(BSF_LOCAL | BSF_WEAK);
}
diff --git a/contrib/binutils/gas/symbols.h b/contrib/binutils/gas/symbols.h
index 87c473c..ad2cde0 100644
--- a/contrib/binutils/gas/symbols.h
+++ b/contrib/binutils/gas/symbols.h
@@ -1,5 +1,5 @@
/* symbols.h -
- Copyright (C) 1987, 90, 92, 93, 94, 95, 97, 99, 2000
+ Copyright 1987, 1990, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/tc.h b/contrib/binutils/gas/tc.h
index 07817be..6becfb8 100644
--- a/contrib/binutils/gas/tc.h
+++ b/contrib/binutils/gas/tc.h
@@ -1,6 +1,7 @@
/* tc.h - target cpu dependent
- Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc.
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/contrib/binutils/gas/write.c b/contrib/binutils/gas/write.c
index 9ef356f..cfdc9b5 100644
--- a/contrib/binutils/gas/write.c
+++ b/contrib/binutils/gas/write.c
@@ -1,5 +1,6 @@
/* write.c - emit .o file
- Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -283,6 +284,10 @@ fix_new_exp (frag, where, size, exp, pcrel, r_type)
case O_absent:
break;
+ case O_register:
+ as_bad (_("register value used as expression"));
+ break;
+
case O_add:
/* This comes up when _GLOBAL_OFFSET_TABLE_+(.-L0) is read, if
the difference expression cannot immediately be reduced. */
@@ -2011,24 +2016,11 @@ write_object_file ()
#ifdef TC_GENERIC_RELAX_TABLE
-static int is_dnrange PARAMS ((fragS *, fragS *));
-
-/* Subroutines of relax_segment. */
-static int
-is_dnrange (f1, f2)
- fragS *f1;
- fragS *f2;
-{
- for (; f1; f1 = f1->fr_next)
- if (f1->fr_next == f2)
- return 1;
- return 0;
-}
-
/* Relax a fragment by scanning TC_GENERIC_RELAX_TABLE. */
long
-relax_frag (fragP, stretch)
+relax_frag (segment, fragP, stretch)
+ segT segment;
fragS *fragP;
long stretch;
{
@@ -2036,20 +2028,26 @@ relax_frag (fragP, stretch)
const relax_typeS *start_type;
relax_substateT next_state;
relax_substateT this_state;
- long aim, target, growth;
- symbolS *symbolP = fragP->fr_symbol;
- long offset = fragP->fr_offset;
- /* Recompute was_address by undoing "+= stretch" done by relax_segment. */
- unsigned long was_address = fragP->fr_address - stretch;
- unsigned long address = fragP->fr_address;
- const relax_typeS *table = TC_GENERIC_RELAX_TABLE;
-
+ long growth;
+ offsetT aim;
+ addressT target;
+ addressT address;
+ symbolS *symbolP;
+ const relax_typeS *table;
+
+ target = fragP->fr_offset;
+ address = fragP->fr_address;
+ table = TC_GENERIC_RELAX_TABLE;
this_state = fragP->fr_subtype;
start_type = this_type = table + this_state;
- target = offset;
+ symbolP = fragP->fr_symbol;
if (symbolP)
{
+ fragS *sym_frag;
+
+ sym_frag = symbol_get_frag (symbolP);
+
#ifndef DIFF_EXPR_OK
#if !defined (MANY_SEGMENTS) && !defined (BFD_ASSEMBLER)
know ((S_GET_SEGMENT (symbolP) == SEG_ABSOLUTE)
@@ -2057,23 +2055,20 @@ relax_frag (fragP, stretch)
|| (S_GET_SEGMENT (symbolP) == SEG_BSS)
|| (S_GET_SEGMENT (symbolP) == SEG_TEXT));
#endif
- know (symbolP->sy_frag);
+ know (sym_frag != NULL);
#endif
know (!(S_GET_SEGMENT (symbolP) == absolute_section)
- || symbolP->sy_frag == &zero_address_frag);
- target += S_GET_VALUE (symbolP) + symbol_get_frag (symbolP)->fr_address;
+ || sym_frag == &zero_address_frag);
+ target += S_GET_VALUE (symbolP) + sym_frag->fr_address;
/* If frag has yet to be reached on this pass,
assume it will move by STRETCH just as we did.
If this is not so, it will be because some frag
- between grows, and that will force another pass.
-
- Beware zero-length frags.
-
- There should be a faster way to do this. */
+ between grows, and that will force another pass. */
- if (symbol_get_frag (symbolP)->fr_address >= was_address
- && is_dnrange (fragP, symbol_get_frag (symbolP)))
+ if (stretch != 0
+ && sym_frag->relax_marker != fragP->relax_marker
+ && S_GET_SEGMENT (symbolP) == segment)
{
target += stretch;
}
@@ -2180,6 +2175,7 @@ relax_segment (segment_frag_root, segment)
address = 0;
for (fragP = segment_frag_root; fragP; fragP = fragP->fr_next)
{
+ fragP->relax_marker = 0;
fragP->fr_address = address;
address += fragP->fr_fix;
@@ -2249,14 +2245,15 @@ relax_segment (segment_frag_root, segment)
long stretch; /* May be any size, 0 or negative. */
/* Cumulative number of addresses we have relaxed this pass.
We may have relaxed more than one address. */
- long stretched; /* Have we stretched on this pass? */
+ int stretched; /* Have we stretched on this pass? */
/* This is 'cuz stretch may be zero, when, in fact some piece of code
grew, and another shrank. If a branch instruction doesn't fit anymore,
we could be scrod. */
do
{
- stretch = stretched = 0;
+ stretch = 0;
+ stretched = 0;
for (fragP = segment_frag_root; fragP; fragP = fragP->fr_next)
{
@@ -2265,6 +2262,7 @@ relax_segment (segment_frag_root, segment)
offsetT offset;
symbolS *symbolP;
+ fragP->relax_marker ^= 1;
was_address = fragP->fr_address;
address = fragP->fr_address += stretch;
symbolP = fragP->fr_symbol;
@@ -2364,8 +2362,8 @@ relax_segment (segment_frag_root, segment)
case rs_org:
{
- long target = offset;
- long after;
+ addressT target = offset;
+ addressT after;
if (symbolP)
{
@@ -2429,12 +2427,12 @@ relax_segment (segment_frag_root, segment)
case rs_machine_dependent:
#ifdef md_relax_frag
- growth = md_relax_frag (fragP, stretch);
+ growth = md_relax_frag (segment, fragP, stretch);
#else
#ifdef TC_GENERIC_RELAX_TABLE
/* The default way to relax a frag is to look through
TC_GENERIC_RELAX_TABLE. */
- growth = relax_frag (fragP, stretch);
+ growth = relax_frag (segment, fragP, stretch);
#endif /* TC_GENERIC_RELAX_TABLE */
#endif
break;
@@ -2466,7 +2464,7 @@ relax_segment (segment_frag_root, segment)
if (growth)
{
stretch += growth;
- stretched++;
+ stretched = 1;
}
} /* For each frag in the segment. */
}
diff --git a/contrib/binutils/gas/write.h b/contrib/binutils/gas/write.h
index 9872e9d..5bab7a2 100644
--- a/contrib/binutils/gas/write.h
+++ b/contrib/binutils/gas/write.h
@@ -1,5 +1,5 @@
/* write.h
- Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 2000
+ Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -181,7 +181,7 @@ extern void record_alignment PARAMS ((segT seg, int align));
extern int get_recorded_alignment PARAMS ((segT seg));
extern void subsegs_finish PARAMS ((void));
extern void write_object_file PARAMS ((void));
-extern long relax_frag PARAMS ((fragS *, long));
+extern long relax_frag PARAMS ((segT, fragS *, long));
extern void relax_segment
PARAMS ((struct frag * seg_frag_root, segT seg_type));
OpenPOWER on IntegriCloud