3 * write.c (adjust_reloc_syms): Fix linkonce check for ELF.
7 * config/tc-mips.c (prev_insn_reloc_type): New static variable.
8 (RELAX_MIPS16_ENCODE): Add dslot and jal_dslot arguments, and
9 store them. Adjust other RELAX_MIPS16 macros.
10 (RELAX_MIPS16_DSLOT): Define.
11 (RELAX_MIPS16_JAL_DSLOT): Define.
12 (append_insn): Pass new arguments to RELAX_MIPS16_ENCODE. Correct
13 handling of whether previous instruction has a fixup. Set
15 (mips_no_prev_insn): Clear prev_insn_reloc_type.
16 (mips16_extended_frag): Use the right base address for a PC
18 (md_convert_frag): Likewise. If a PC relative add or load is
19 used, record the alignment for the section.
23 * write.c (adjust_reloc_syms): Don't reduce a reloc against a
24 linkonce section into a reloc against the section symbol.
26 * config/tc-mips.c (mips16_macro): Remove nop instructions after
29 * config/tc-mips.c (md_begin): If configured for an embedded ELF
30 system, don't set the section alignment to 2**4.
31 (s_change_sec): Likewise.
32 (append_insn): Call record_alignment for the section.
33 (md_section_align): Don't align the section size for an embedded
38 * write.c (adjust_reloc_syms): Make sure that symbols are
39 resolved; expression symbols may have been skipped.
40 * config/obj-coff.c (fixup_segment): Likewise.
44 * config/tc-ppc.c (ppc_elf_suffix): Move @plt to
45 BFD_RELOC_24_PLT_PCREL relocation.
46 (md_apply_fix3): Support BFD_RELOC_24_PLT_PCREL.
51 * config/tc-d10v.c (write_2_short): Remove code that called
52 parallel_ok() when the programmer specified parallel instructions.
57 * config/tc-mn10300.c (md_assemble): Update to handle endianness
60 * config/tc-mn10200.c (md_assemble): Opcode 0x0 is valid!
61 * config/tc-mn10300.c (md_assemble): Likewise.
65 * config/tc-mips.c (append_insn): Make sure there is enough room
66 in a frag after a mips16 instruction to switch it with a jump
69 * config/tc-mips.c (mips16_extended_frag): Give an error for an
70 attempt to use a non absolute symbol in an extending frag.
74 * config/tc-mn10200.c: Flesh out assembler support for MN10200.
75 * config/tc-mn10200.h: Likewise.
79 * app.c (do_scrub_chars): At the end of a C comment, pass space to
80 UNGET rather than PUT. Set old_state before setting state to -2.
82 * config/tc-mips.c (mips16_extended_frag): Avoid an infinite loop
83 when extending because the value is exactly maxtiny + 1.
85 * config/tc-mips.c (RELAX_MIPS16_ENCODE): Add small and ext
86 arguments, and store them. Adjust other RELAX_MIPS16 macros.
87 (RELAX_MIPS16_USER_SMALL): Define.
88 (RELAX_MIPS16_USER_EXT): Define.
89 (mips16_small, mips16_ext): New static variables.
90 (append_insn): Pass mips16_small and mips16_ext to
92 (mips16_ip): Set mips16_small and mips16_ext.
93 (mips16_immed): Don't check mips16_autoextend.
94 (mips16_extended_frag): Check USER_SMALL and USER_EXT.
96 * write.c (write_relocs): Print an error for an out of range
97 fixup, rather than calling abort.
99 * as.c (main): Unlink the output file if there are errors while
100 generating the fixups.
104 * config/tc-mips.c (mips16_extended_frag): Don't call
106 (md_convert_frag): Call resolve_symbol_value before calling
107 S_GET_VALUE, and don't add in the frag address.
109 * config/tc-mips.c (mips16_immed): Add file and line parameters,
110 and use them when reporting errors. Change all callers.
114 * config/tc-mn10300.c: Fix various gcc -Wall warnings.
115 Remove '$' prefixing for registers.
120 * config/tc-d10v.c (md_assemble): Check to see if prev_seg
121 is initialized before using it.
122 (d10v_cleanup): No longer uses its argument, so make it void.
124 * config/tc-d10v.h (d10v_cleanup): Change prototype.
129 * write.c (fixup_segment): Don't discard the symbol for a PC
130 relative fixup to an absolute symbol.
135 * config/tc-d10v.c (md_assemble, d10v_cleanup): Fix bug
136 with multiple sections.
141 * config/tc-mips.c (md_longopts): Rename mips-16 to mips16, and
142 no-mips-16 to no-mips16.
143 (s_mipsset): Accept .set mips16 and .set nomips16.
147 * config/tc-ppc.c (ppc_elf_suffix): Take expressionS pointer
148 argument, and check for +/- constant following the suffix, folding
149 it into the expression.
150 (ppc_elf_cons): Change ppc_elf_suffix calls.
151 (md_assemble): Ditto.
152 (shlib): Replace boolean mrelocatable with enumeration shlib.
153 (md_parse_option): Discriminate between PIC style shared libraries
155 (ppc_elf_validate_fix): Don't report warnings for PIC style shared
160 * config/tc-ppc.h ({tc,ppc}_comment_chars): Define, so that we can
161 change the comment characters.
163 * config/tc-ppc.c (comment_chars): Delete in favor of
165 (ppc_{eabi,solaris}_comment_chars): Eabi and Solaris versions of
167 (ppc_comment_chars): Select appropriate comment chars by default.
168 (msolaris): New flag for -m{,no-}solaris.
169 (md_parse_option): Recognize -K pic. Add support for
171 (md_show_usage): Update.
172 (md_begin): Do not set ELF flags if Solaris.
173 (ppc_elf_suffix): @local sets R_PPC_LOCAL24PC relocation.
174 (md_apply_fix3): Add support for R_PPC_LOCAL24PC.
178 * as.c (main): Correct handling of flag_always_generate_output.
182 * config/tc-mn10300.c (tc_gen_reloc): Get the addend from
183 fx_offset, not fx_addnumber.
185 * config/tc-mn10300.h (tc_fix_adjustable): Don't do any
190 * config/tc-i386.c: Correct misspelling: balenced to balanced.
194 * config/tc-mips.c (md_section_align): Check for an alignment of
195 4, not an alignment of 16. Corrects August 7 patch.
199 * configure, conf.in: Rebuild with autoconf 2.12.
201 * config/tc-ppc.c (ppc_elf_lcomm): Don't give an error if no
202 alignment is specified.
204 Add support for mips16 (16 bit MIPS implementation):
205 * config/tc-mips.c: Extensive additions for mips16 support, not
207 (RELAX_OLD, RELAX_NEW): Use only 7 bits each.
208 (insn_uses_reg): Change last parameter to an enum.
209 * config/tc-mips.h (LOCAL_LABELS_DOLLAR): Define as 0.
210 (md_relax_frag): Define as mips_relax_frag.
211 (mips_relax_frag): Declare.
212 (struct mips_cl_insn): Add use_extend and extend fields.
213 (tc_fix_adjustable): Define.
214 * config/obj-elf.h (S_GET_OTHER): Define.
215 (S_SET_OTHER): Define.
219 * config/tc-m68k.c (m68k_ip): Implement cases for new <, >, m, n,
220 o and p operand specifiers.
224 * write.c: Delete "ifndef md_relax_frag" around is_dnrange.
225 (relax_segment, case rs_org): Move code inside braces. Move locals
226 target,after inside too.
227 (relax_segment, case rs_machine_dependent): Guts moved to ...
228 (relax_frag): New function.
229 Call md_prepare_relax_scan if defined.
230 * config/tc-m68k.h (md_prepare_relax_scan): Renamed from
235 * config/tc-mn10300.c (address_registers): Use '$' as register
236 prefix instead of '%'.
237 (data_registers, other_registers, md_assemble): Likewise.
239 * config/tc-mn10300.c (address_registers): Use '%' prefix for regs.
240 (data_registers, other_registers, md_assemble): Likewise.
242 * config/tc-mn10300.c (md_assemble): Correctly determine the
243 correct location and type for each relocation.
244 (md_pcrel_from): Simplify.
248 * config/tc-sh.c (md_convert_frag): Improve warning when branch is
249 converted into branch around branch.
253 * config/tc-mn10300.h (DIFF_EXPR_OK): Don't define this.
254 (tc_fix_adjustable): Don't adjust relocs against weak symbols or
256 * config/tc-mn10300.c (md_begin): Set linkrelax.
257 (md_assemble): Create fixups as needed.
258 (md_apply_fix3): Gut. It shouldn't ever get called anymore.
263 * config/tc-d10v.c (parallel_ok): When automatically converting
264 serial ops to parallel, do not consider a branch as the first
270 * config/tc-mn10300.c (md_assemble): Handle MN10300_OPERAND_REG_LIST.
274 * config/tc-mn10300.c (mn10300_insert_operand): Provide prototype
276 (check_operand): Likewise.
281 * config/tc-d10v.c (parallel_ok): Branch and link instructions
283 (write_2_short): Call parallel_ok to check whether two short
284 instructions the user requested execute in parallel, can be
289 * config/tc-d10v.c (write_2_short): Fix bug that wouldn't
290 allow a branch and link in parallel with an exe instruction.
294 * doc/c-d10v.texi: Add info on @word modifier.
299 * config/tc-mn10300.c (mn10300_insert_operand): MN10300_OPERAND_SPLIT
300 operands are assumed to be 32bits. Use "bits" field to hold the
301 number of bits in the main instruction word for MN10300_OPERAND_SPLIT.
302 (mn10300_check_operand): MN10300_OPERAND_SPLIT operands are assumed
305 * config/tc-mn10300.c (mn10300_insert_operand): Shift low part
306 of a MN10300_OPERAND_SPLIT operand by operand->shift.
308 * config/tc-mn10300.c (mn10300_insert_operand): Handle
309 MN10300_OPERAND_SPLIT.
313 * config/tc-mn10300.c (md_assemble): Insert operands into
314 the extension part of the instruction if necessary.
315 (mn10300_insert_operand): Accept pointer to extension word
316 argument. Make insn a pointer argument too. Return type
317 is now void. All callers changed.
321 * config/tc-mn10300.c (mn10300_insert_operand): Handle
322 repeated register operands.
326 * doc/as.texinfo: Added section on reporting bugs.
328 * config/tc-alpha.c: Change uses of void * to PTR. Change the
329 alpha_macro emit field to expect a const argument, and change the
330 arg field to be const. Fix some spacing to follow the GNU
335 * config/tc-alpha.c (md_parse_option): Add knowledge of 21164pc
336 (pca56) and 21264 (ev6) cpus.
337 (md_apply_fix): Private relocation types are now negative.
338 (alpha_force_relocation): Likewise.
339 (tc_gen_reloc): Likewise.
340 (emit_insn): Likewise.
341 (emit_ldXu): Do the right thing when the hardware can do byte insns.
342 (emit_stX): Likewise.
343 (emit_sextX): Likewise.
347 * config/obj-coff.c (do_relocs_for): Call resolve_symbol_value on
348 a symbol found in a reloc.
350 * symbols.c (resolve_symbol_value): Improve the error message if
351 an undefined symbol is used in an expression.
355 * doc/internals.texi: Rewrite, and add a lot of documentation.
356 * doc/Makefile.in (internals.info): New target.
361 * config/tc-v850.h (tc_fix_adjustable): Don't adjust relocs
362 against weak symbols.
366 * config/tc-v850.c (md_assemble): Don't lose for relaxable
369 * config/tc-v850.c (md_convert_frag): Make sure we insert the
370 fixup at the right address within the frag.
372 * config/tc-v850.c (md_convert_frag): Don't set fragP->fr_fix
373 to an absolute value, instead increment it as needed.
375 * config/tc-v850.h (TC_GENERIC_RELAX_TABLE): Define.
376 * config/tc-v850.c: Fix some indention problems.
377 (md_relax_table): Define for D9->D99 branch displacement
379 (md_convert_frag): Do something useful instead of aborting.
380 (md_estimate_size_before_relax): Likewise.
381 (md_assemble): Note if the matching instruction has a relaxable
382 operand. If it does, allocate frag with frag_var and don't
389 * config/tc-d10v.h (md_cleanup): New function. This is needed to
390 write out any buffered instructions when a ".end" is found.
395 * read.c (read_a_source_file): New hook md_cleanup().
399 * write.c (fix_new_exp): Use make_expr_symbol to build an
400 expression symbol for a complex fixup.
405 * config/tc-v850.c (v850_reloc_prefix): Several disgusting
406 hacks to improve parsing of complex hi, lo, zda, etc
408 (md_assemble): Don't demand and eat a trailing ')' after finding
409 a v850 relocation prefix. Sign extend the constant in a
410 BFD_RELOC_LO16 expression. Do eat a trailing ')' after a complete
412 (parse_cons_expression_v850): Don't eat a trailing ')' after
413 finding a v850 relocation prefix.
415 * config/tc-v850.h (TC_PARSE_CONS_EXPRESSION): Define.
416 (TC_CONS_FIX_NEW): Likewise.
417 * config/tc-v850.c (parse_cons_expression_v850): New function.
418 (cons_fix_new_v850): Likewise.
420 * config/tc-v850.h (tc_fix_adjustable): Don't adjust TDA relocs.
425 * config/tc-ppc.c (md_apply_fix3): Give a better warning message
426 for an unknown relocation type.
431 * config/tc-v850.c (md_pseudo_table): Add .word; allocates
436 * config/tc-v850.c (md_assemble): Handle TDAOFF relocs
437 differently for movea & sst/sld insns.
443 * config/tc-d10v.c (parallel_ok): Don't allow illegal combinations
449 * obj.h (struct format_ops): Add frob_file_after_relocs field.
450 * config/obj-multi.h (obj_frob_file_after_relocs): Define.
451 * config/obj-ecoff.c (ecoff_format_ops): Initialize new
452 frob_file_after_relocs field.
453 * config/obj-elf.c (elf_format_ops): Likewise.
454 * config/tc-mips.c: Undefine obj_frob_file_after_relocs before
459 * config/tc-mips.c (cons_fix_new_mips): Only treat 8 byte reloc
460 specially if not ELF.
461 (md_apply_fix): Handle BFD_RELOC_64.
462 (tc_gen_reloc): Handle BFD_RELOC_64.
464 * config/tc-i386.c (md_apply_fix3): Don't increment value for a PC
465 relative reloc when BFD_ASSEMBLER and OBJ_AOUT (more ugly gas
468 * config/obj-aout.h (S_IS_DEFINE): non BFD_ASSEMBLER version:
469 Don't check S_GET_OTHER.
473 * config/tc-mips.c (mips_ip): Accept an odd floating point
474 register with l.s or s.s.
476 * config/obj-aout.c (obj_pseudo_table): Use obj_aout_type for
478 (obj_aout_type): New static function.
482 * Makefile.in ($(OBJS)): Depend upon libiberty.h.
487 * config/tc-v850.c (v850_reloc_prefix): Recognize zdaoff, tdaoff
488 and sdaoff expressions.
490 * write.c (fixup_segment): Don't add symbol value to addend if
492 * config/tc-v850.h (tc_fix_adjustable): Don't adjust any
495 * config/tc-v850.c (md_pcrel_from): Undo yesterday's changes.
496 (md_pcrel_from_section): Likewise.
497 * config/tc-v850.h (MD_PCREL_FROM_SECTION): Likewise.
501 * config/tc-v850.c (md_pcrel_from): Delete unused function.
502 (md_pcrel_from_section): New function.
503 * config/tc-v850.h (MD_PCREL_FROM_SECTION): Define.
508 * config/tc-mips.c (load_register): Add cast to offsetT when using
513 * config/obj-elf.c (elf_frob_file): Move ECOFF debug processing to ...
514 (elf_frob_file_after_relocs): ... here. New function.
515 * config/obj-elf.h (obj_from_file_after_relocs): New macro.
516 * write.c (write_object_file): Call *frob_after_relocs after the
517 call to write_relocs.
519 * config/tc-alpha.c: Use new BFD_RELOC_ALPHA_ELF_LITERAL reloc.
521 * config/tc-alpha.c (load_expression): Don't SET_VALUE on the section
522 symbol, as this messes up linking. Instead, expand the recursive call
523 inline and change up the appropriate bits to get the 0x8000 offset
528 * config/tc-sparc.h (tc_fix_adjustable): Permit the difference of
529 two symbols in the same segment to be adjusted.
531 * configure.in: Don't get confused by CPU-VENDOR-linux-gnu.
532 * configure: Rebuild.
536 * config/tc-ppc.c (ppc_insert_operand): Change most warnings into
538 (ppc_elf_validate_fix): Ditto.
539 (md_assemble): Ditto.
541 (ppc_pe_section): Ditto.
542 (ppc_frob_symbol): Ditto.
546 * config/mn10300.c (md_assemble): Pass an extra shift count
547 to mn10300_insert_operand based on the opcode format.
548 (mn10300_insert_operand): Accept and use extra shift count
551 * config/tc-mn10300.c (md_assemble): Use FMT_* macros for
552 formats rather than hard-coded constants.
554 * config/tc-mn10300.c (md_assemble): Format D5 instructions
555 are 7 bytes long. Write out instructions in big-endian format.
559 * config/tc-mn10300.c (md_assemble): Tweak further so
560 that all instructions are parsed correctly.
564 * as.h: Include libiberty.h.
565 (xmalloc, xrealloc): Don't declare.
566 * as.c: Don't include libiberty.h.
567 * expr.c, read.c, stabs.c, config/obj-coff.c: Likewise.
568 * config/tc-mips.c: Likewise.
569 * messages.c: Likewise.
570 (xstrerror): Don't declare.
575 * config/tc-mn10300.h (pre_defined_registers) Remove.
576 (system_registers, cc_names): Likewise.
577 (address_registers, data_registers, other_registers): New register
579 (register_name, system_register_name, cc_name): Remove.
580 (mn10300_reloc_prefix): Likewise.
581 (data_register_name): New function.
582 (address_register_name, other_register_name): Likewise.
583 (md_assemble): Rough cut at parsing operands. Remove lots of
585 (md_apply_fix3): Disable for now.
589 * config/tc-m68k.c (select_control_regs): New function, extracted
590 out of m68k_init_after_args.
591 (m68k_init_after_args): Use it.
592 (mri_chip): Use it here as well to update set of allowed control
597 * config/obj-elf.c (elf_begin): New function.
598 (obj_elf_section): Add the section symbol to the symbol table.
599 * config/obj-elf.h (obj_begin): Define.
600 (elf_begin): Declare.
601 * as.c (perform_an_assembly_pass): Call obj_begin if it is
606 * config/obj-coff.c (fixup_segment): Subtract the section address
607 from a PC relative reloc if TC_M68K.
611 * config/tc-sparc.c (md_pseudo_table): Make .uahalf, .uaword, and
612 .uaxword available even if not OBJ_ELF.
613 (md_atof): Remove unused local variable wordP.
617 * config/tc-mn10x00.c, config/tc-mn10x00.h: New files
618 for Matsushita MN10x00 support.
619 * configure.in: Recognize mn10x00-*-*
620 * configure: Rebuilt.
624 * obj-evax.h: move openvms definitions from here to tc-alpha.c.
625 * tc-alpha.c: add support for vms_case_hack like in vax/vms.
626 (load_expression): track clobbering of base reg before jmp/jsr.
627 (s_alpha_file): pass case_hack flags and source filename via
629 * tc-alpha.h (TC_CONS_FIX_NEW): define
633 * configure.in (mips-*-rtems*): New target, like mips-*-elf*.
634 * configure: Rebuild.
638 * read.c (s_macro): Warn if a macro has the same name as a
640 (s_space): In m68k MRI mode, align to a word boundary.
641 * macro.c (define_macro): Add namep parameter. Change all
643 * macro.h (define_macro): Update declaration.
645 * as.c (show_usage): Print bug report address.
646 (parse_args): Change version printing to match current GNU
648 * gasp.c (show_usage): Print bug report address.
649 (main): Change version printing to match current GNU standards.
651 * config/tc-m68k.c (init_table): Correct access control unit
654 * config/tc-alpha.c: Add some static function prototypes.
655 (alpha_macros): Move to top of file. Make static.
656 (alpha_num_macros): Move to top of file.
661 * tc-v850.h: Define LOCAL_LABEL to recognise _.L_* symbols
667 * listing.c (list_symbol_table): Remove bogus code in BFD64 case,
668 and just call sprintf_vma.
672 * expr.c (expr): Change >>= to >> (fix typo). (From meissner).
676 * read.c (float_cons): Call md_flush_pending_output if it is
682 * config/tc-d10v.c (md_operand): Created. Allows operands to
684 * config/tc-d10v.h (md_operand): Undefined.
689 * config/tc-m68k.c (add_fix): Treat a width of '3' like 'B'.
690 (md_assemble): A fixup width of '3' means a 1 byte reloc.
694 * config/obj-coff.c (fixup_segment): Don't adjust PC relative
695 reloc for the i960 for a reloc in the same section. This undoes
696 one of the two changes made Aug 19.
700 * config/obj-coff.c (obj_coff_endef): Both versions: Move C_STAT
701 symbols to the position of the debugging information.
705 * expr.c (expr): Always use unsigned right shifts for >>.
709 * config/tc-arm.c (md_apply_fix3): Update two thumb instruction
710 slots when processing BL fixups.
712 * config/tc-arm.c (output_inst): Ensure Thumb BL fixup is marked
713 on the first half of the instruction.
717 * ecoff.c (ecoff_stab): Create an expression symbol for a complex
718 stabs expression, rather than giving an error.
720 * ecoff.c (ecoff_new_file): Don't do anything if we are still in
725 * config/tc-mips.c (append_insn): Fill in the value for a constant
726 jump, rather than creating a reloc.
730 * config/tc-mips.c (append_insn): Don't swap an instruction which
731 sets a condition code with an instruction which uses a condition
733 (mips_ip): In cases 'N' and 'M', look for $fccN rather than an
736 * config/tc-mips.c (md_begin): Recognize r5000 for cpu.
737 (mips_ip): Give a better error message if the ISA level is wrong.
738 (md_parse_option): Recognize -mcpu=[v][r]5000.
742 * config/tc-mips.c (COUNT_TOP_ZEROES): Added macro to count
744 (load_register): Ensure hi32 bits are not lost during lo32bit
745 processing. Fix shift offset that was overflowing into the next
746 instruction field. Add code to generate shorter sequences for
747 constants with a single contiguous seqeuence of ones.
752 * config/tc-d10v.c (d10v_dot_word): New function to support
753 "@word" with the word pseudo-op.
754 (md_apply_fix3): Cleanup and changes to support correct sizes
755 for 16 and 18-bit relocs.
760 * configure.in (sparc-*-aout): Set `em'.
761 * configure: Regenerated.
762 * config/te-sparcaout.h: New file.
763 * config/tc-sparc.h (TARGET_BYTES_BIG_ENDIAN): Define.
764 Ifdef TE_SPARCOUT define TARGET_FORMAT and SPARC_BIENDIAN.
765 * config/tc-sparc.c (INSN_BIG_ENDIAN): New macro.
766 (SPECIAL_CASE_{SETSW,SETX}): Define.
767 ({NOP,OR,FMOVS,SETHI,SLLX,SRA}_INSN): Define.
768 (md_begin): Delete setting of `target_big_endian'.
769 (output_insn): New function.
770 (md_assemble): Rewrite. Add `setx' support.
771 (sparc_ip): Handle `0' operand char. Recognize setuw, setsw, setx
773 (md_atof): Add little endian support.
774 (md_number_to_chars): Likewise.
775 (md_apply_fix): Likewise.
776 (md_longopts): Recognize -EL,-EB ifdef SPARC_BIENDIAN.
777 (md_parse_option): Likewise.
778 (md_show_usage): Print -EL, -EB ifdef SPARC_BIENDIAN.
782 * ecoff.c (ecoff_new_file): New function.
783 * ecoff.h (ecoff_new_file): Declare.
784 * config/obj-ecoff.h (obj_app_file): Define.
788 * config/tc-alpha.c (load_expression): Bias the .lit8 section
789 symbol by 32k so that our 16-bit signed offset can address the
794 * config/tc-mips.c (load_register): Remove unused variable tmp.
798 * config/tc-mips.c (load_register): Remove unnecessary code that
799 was causing the high 32bits of 64bit constants to be lost.
804 * config/tc-d10v.c: Added changes to support function
805 pointers and "@word" syntax.
811 * config/tc-v850.c: Remove commented out and #if 0'd code.
812 (v850_reloc_prefix): Provide prototype.
813 (postfix, get_reloc, build_insn): Remove prototypes for nonexistant
815 (md_begin, md_assemble, md_apply_fix3): Remove unused variables.
816 (md_assemble): Add default to case statement.
820 * config/tc-v850.c (md_assemble): Compute size of the instrction
823 * config/tc-v850.c (md_apply_fix3): Do simple byte, short and
828 * config/tc-v850.c (md_apply_fix3): Use little endian get/put
829 routines to fetch/store the updated instruction from/to memory.
830 (v850_insert_operand): If the operand has a specialized insert
835 * config/tc-v850.c (reg_name_search): Align calling convention to
836 be like identical function found in tc-ppc.c.
837 (get_reloc): Removed.
838 (v850_reloc_prefix): New function, parse lo(), hi() and hi0().
839 (md_assemble): emit fixups.
840 (md_pcrel_from): renamed from md_pcrel_from_section, emit proper
842 (md_apply_fix3): handle fixups/relocs.
843 * config/tc-v850.h (MD_PCREL_FROM_SECTION): Removed definition.
849 * configure.in (sh-*-elf*): New target.
850 * config/tc-sh.h (TARGET_ARCH): Define.
851 (WORKING_DOT_WORD): Define.
852 (TC_COFF_FIX2RTYPE): Only define if OBJ_COFF.
853 (BFD_ARCH, COFF_MAGIC, TC_COUNT_RELOC): Likewise.
854 (TC_RELOC_MANGLE, tc_coff_symbol_emit_hook): Likewise.
855 (DO_NOT_STRIP, NEED_FX_R_TYPE, TC_KEEP_FX_OFFSET): Likewise.
856 (TC_COFF_SIZEMACHDEP, tc_frob_file): Likewise.
857 (SUB_SEGMENT_ALIGN): Likewise.
858 (RELOC_32): Don't define.
859 (tc_frob_file_before_adjust): Define if BFD_ASSEMBLER.
860 (target_big_endian): Declare if OBJ_ELF.
861 (TARGET_FORMAT): Define if OBJ_ELF.
862 * config/tc-sh.c: Use BFD reloc codes instead of SH COFF reloc
864 (tc_crawl_symbol_chain): Only define if OBJ_COFF.
865 (tc_headers_hook, tc_coff_sizemachdep): Likewise.
866 (struct sh_count_relocs): Define.
867 (sh_count_relocs): New static function, broken out of
868 sh_frob_file. Add BFD_ASSEMBLER code.
869 (sh_frob_section): Likewise.
870 (sh_frob_file): Call sh_frob_section.
871 (md_convert_frag): If BFD_ASSEMBLER, change type of headers, and
872 call section_symbol rather than seg_info (seg)->dot.
873 (md_section_align): Add OBJ_ELF version.
874 (SWITCH_TABLE_CONS): Define.
875 (SWITCH_TABLE): Use SWITCH_TABLE_CONS.
876 (md_apply_fix): Change parameter types if BFD_ASSEMBLER. Only
877 handle fx_r_type == 0 if not BFD_ASSEMBLER. Return 0 if
879 (struct reloc_map): Define if not BFD_ASSEMBLER.
880 (coff_reloc_map): Likewise.
881 (sh_coff_reloc_mangle): Use coff_reloc_map to convert fx_r_type.
882 (tc_gen_reloc): New function if BFD_ASSEMBLER.
883 * write.c (write_relocs): Ifdef out fx_where test which triggers
884 inappropriately for SH ELF.
885 (write_object_file): Call tc_frob_file_before_adjust and
886 obj_frob_file_before_adjust if they are defined.
888 * write.c (write_object_file): Use BFD_RELOC_16, not
889 BFD_RELOC_NONE, when calling fix_new_exp for a broken word.
891 * read.c (emit_expr): Fix conversion of byte count to BFD reloc
897 * config/tc-d10v.c (find_opcode): Fix problem with calculating
898 branch sizes in across sections.
904 * config/tc-850.c (md_assemble): Handle hi() correctly. Handle
909 * config/tc-v850.c (md_begin): Deal with end of opcode
916 * config/tc-d10v.c (find_opcode): Fix a bug which could generate
917 the wrong opcode for cases like st2w where there are many forms
918 of the same instruction.
923 * expr.c (operand): If md_parse_name is defined, call it before
924 calling symbol_find_or_make.
925 * config/tc-ppc.h (md_parse_name): Define.
926 (ppc_parse_name): Declare.
927 * config/tc-ppc.c (reg_name_search): Add regs and regcount
929 (register_name): Update call to reg_name_search.
930 (cr_operand): New static variable.
931 (cr_names): New static const array.
932 (ppc_parse_name): New function.
933 (md_assemble): If PPC_OPERAND_CR is set in the operand flags, set
934 cr_operand before calling expression.
938 * config/tc-hppa.c (tc_gen_reloc): Add new argument to
939 hppa_gen_reloc_type call.
944 * config/tc-d10v.c: Fixed ".word". Fixed problem with range checking
945 on addresses. Improved error messages.
946 * doc/c-d10v.texi: Added docs for register pairs.
950 * config/tc-d10v.c (parallel_ok): Fix bug in parallel
956 * ecoff.c (init_file): Initialize fMerge to 1.
957 (add_file): Restore old file merging code, but only merge files if
959 (ecoff_directive_loc): Clear fMerge field of current file.
960 (ecoff_generate_asm_lineno): Likewise.
965 * doc/c-d10v.texi: Fix typo.
971 * config/tc-v850.c (md_assemble): Correct bit masking for
972 hi and lo expressions.
974 * config/tc-v850.c (md_assemble): Rough cut at demanding
975 "ep" or "r30" in sst and sld instructions.
976 (md_apply_fix3): Don't abort. Just warn that we don't
979 * config/tc-v850.c (CC_NAME_CNT): Define.
980 (cc_name): New function.
981 (md_assemble): Handle V850_OPERAND_CC correctly.
983 * config/tc-v850.c (md_assemble): Don't forget to initialize
986 * config/tc-v850.c (reg_name_search): Generalize to search
987 any given register table.
988 (register_name): Pass appropriate table and size to reg_name_search.
989 (system_register_name): New function.
990 (SYSREG_NAME_CNT): Define.
991 (md_assemble): Handle operands which are system registers.
993 * config/tc-v850.c (md_assemble): If we find a register, but the
994 opcode doesn't want a register, then we don't have a match.
995 (md_assemble): Get size of the instruction from the opcode table.
1000 * configure.in: Set and substitute HLDENV.
1001 * configure: Rebuild.
1002 * Makefile.in (HLDENV): New variable.
1003 (as.new): Use $(HLDENV).
1005 * ecoff.c (ecoff_directive_endef): Avoid a division by zero error
1006 if an array dimension is not known.
1011 * config/tc-d10v.c: Fix a reloc bug caused by my last change.
1012 * doc/c-d10v.texi: Cleanup.
1018 * config/tc-v850.c: New file.
1019 * config/tc-v850.h: New file.
1020 * configure (v850-*-elf): New target.
1021 * configure.in (v850-*-elf): New target.
1027 * doc/c-d10v.texi: New file.
1028 * doc/all.texi: Added D10V stuff.
1029 * doc/as.texinfo: Added D10V stuff.
1033 * config/tc-d10v.c: All references to defined symbols should
1034 now use the optimal instruction. .float and .double now work.
1039 * config/obj-coff.c (fixup_segment): Adjust PC relative reloc by
1040 section address for the i960 as is done for the i386.
1044 * mpw-config.in: Add wildcards for config matching, add mips-*-*
1045 case, forward-include bfd/elf-bfd.h.
1050 * config/tc-d10v.c: Add additional information to the opcode
1051 table to help determinine which instructions can be done
1057 * config/tc-arm.c: Major changes to add Thumb support, with lots
1059 Reverted to INSN_SIZE macro, rather than insn_size variable.
1060 (insns): Added ARM "bx" instruction support.
1061 (tinsns): Added Thumb instruction definition structure.
1062 (arm_tops_hsh): Added hash structure for Thumb opcodes.
1063 (md_pseudo_table): Added ".arm", ".thumb" and ".code" pseudo-ops.
1064 (opcode_select,s_arm,s_thumb,s_code): Added.
1065 (decode_shift): Allow upper-case RRX.
1066 (do_ldst): Simpler halfword support.
1067 (do_ldmstm): Improved.
1068 (reg_list, do_bx, thumb_reg, thumb_add_sub, thumb_shift,
1069 thumb_mov_compare, thumb_load_store, do_t_arit, do_t_add,
1070 do_t_asr, do_t_branch, do_t_bx, do_t_compare, do_t_ldmstm,
1071 do_t_ldrb, do_t_ldrh, do_t_lds, do_t_lsl, do_t_lsr, do_t_mov,
1072 do_t_push_pop, do_t_str, do_t_strb, do_t_strh, do_t_sub, do_t_swi,
1074 (md_apply_fix3): Add support for BFD_RELOC_ARM_THUMB_* relocations.
1075 (md_parse_option): Add support for -mthumb.
1076 (md_show_usage): Updated to reflect new command line option.
1077 (arm_data_in_code, arm_canonicalize_symbol_name): Added.
1078 * config/tc-arm.h: Provide TC_FIX_TYPE to allow private ARM
1079 fragment information to be held.
1083 * tc-arm.c (md_apply_fix3): Also set fixP->fx_done if fx_addsy is
1084 non-null, but is a constant.
1085 (fix_new_arm): Call make_expr_symbol to make the expression symbol
1086 so that error reporting will work correctly.
1090 * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust relocs
1091 against weak symbols.
1095 * config/tc-ppc.h (TC_FORCE_RELOCTION): Define if OBJ_XCOFF.
1096 (ppc_force_relocation): Declare if OBJ_XCOFF.
1097 * config/tc-ppc.c (ppc_force_relocation): New function if
1102 * config/tc-mips.h (BYTE_ORDER): Don't define. No longer used.
1107 * config/tc-d10v.c: Fix problem with relocs.
1112 * config/tc-sh.c (sh_do_align): If not BFD_ASSEMBLER, always align
1113 with nops if not in data_section or bss_section.
1117 Add support for openVMS/Alpha.
1118 * as.h (PRINTF_LIKE): Don't define if VMS, for now.
1119 * config/obj-evax.c: New file.
1120 * config/obj-evax.h: New file.
1121 * config/tc-alpha.c: Add support for EVAX format if OBJ_EVAX is
1123 * config/tc-alpha.h: Add support for EVAX format if OBJ_EVAX is
1124 defined. Add case for bfd_target_evax_flavour.
1125 * config/vms-a-conf.h: New file.
1126 * conf-a-gas.com: New file.
1127 * configure.in: Add target alpha-*-*vms*.
1128 * configure: Rebuild.
1129 * makefile.vms: New file.
1130 * read.c (s_lcomm): Align bss_seg on 8 byte boundary if OBJ_EVAX.
1131 Don't call ffs on openVMS/Alpha.
1135 * configure.in: Make GAS_CHECK_DECL_NEEDED include <string.h> or
1136 <strings.h> if they exist. Call GAS_CHECK_DECL_NEEDED on strstr
1138 * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
1139 (NEED_DECLARATION_SBRK): New macro.
1140 * configure, conf.in: Rebuild.
1141 * as.h: Only include <strings.h> if HAVE_STRINGS_H.
1142 (strstr): Declare if NEED_DECLARATION_STRSTR.
1143 * as.c: If HAVE_SBRK and NEED_DECLARATION_SBRK, declare sbrk.
1147 * symbols.c (resolve_symbol_value): Handle addition or subtraction
1148 by a constant before entering the main switch. Reject attempts to
1149 apply an arithmetic function to non-absolute symbols, except for
1150 the special case of subtraction of two symbols in the same
1153 * config/tc-mips.c (md_section_align): Do align if OBJ_ELF, but
1154 not to more than a 16 byte boundary.
1156 * config/tc-i386.c (tc_gen_reloc): Accept all relocs; remove
1158 (tc_gen_reloc): If out of memory call as_fatal rather than
1159 assert. If no howto found, call as_bad_where rather than
1160 as_fatal. Change the error message slightly. Set howto to a
1161 non-NULL value in order to keep going.
1166 * config/tc-d10v.c: Added code to support 32-bit fixups for stabs.
1171 * config/tc-h8300.c (get_specific): New operand "size" derived
1172 from ".b", ".w" and ".l" extensions. All callers changed. If
1173 the base instruction has no operands, then use the size to
1174 determine which specific instruction to use.
1178 * config/tc-i960.c (mem_fmt): Call parse_expr before emit.
1182 * config/tc-mips.c (md_section_align): Don't change addr if
1187 * config/tc-hppa.c: Revert yesterday's changes.
1192 * config/tc-d10v.c: Disable range checking on 16-bit values.
1197 * config/tc-m68k.c (m68k_ip): Set ok_arch for every instruction,
1198 not just the ones that don't match.
1203 * config/tc-d10v.c: Fixed bugs in short relocs and range checking.
1208 * config/tc-arm.c: Changed INSN_SIZE to variable insn_size, as
1209 pre-cursor to adding Thumb support. Also added cpu_variant flag
1210 information to each of the asm_flg structures.
1211 (md_parse_option): Updated ARM7 parsing to allow 't' for
1212 thumb/halfword support, aswell as 'm' for long multiply.
1213 (md_show_usage): Updated help message.
1214 (md_assemble): Check that instruction flags are applicated to the
1215 current cpu variant.
1216 (md_apply_fix3, tc_gen_reloc): Add BFD_RELOC_ARM_OFFSET_IMM8 and
1217 BFD_RELOC_ARM_HWLITERAL relocation support for new halfword and
1218 signextension instructions.
1219 (do_ldst): Generate halfword and signextension variants if
1220 mnemonic flags match.
1221 (ldst_extend): Do not allow shifts in the offset field of halfword
1222 or signextension instructions.
1223 (validate_offset_imm): Provide check on halfword and signextension
1225 (add_to_lit_pool): Merge identical literal pool values.
1229 * config/tc-hppa.c (selector_table): Add 'E' selector.
1230 (cons_fix_new_hppa): Don't coke on e_esel.
1231 (tc_gen_reloc, SOM version): Handle R_COMP2 when used
1232 to help generate exception handling tables.
1233 (md_apply_fix): Don't try to apply fixups with an e_esel
1235 (hppa_fix_adjustable): Fixups with e_esel selectors
1240 * config/tc-sparc.c (md_pseudo_table): Add 2byte, 4byte, and 8byte
1246 * config/tc-d10v.c: Added lots of error checking. Added hacks
1247 to support accumulator shifts.
1252 * symbols.c (S_SET_EXTERNAL): Let .weak override.
1253 (S_CLEAR_EXTERNAL): Likewise.
1254 (S_SET_WEAK): Remove error; just let .weak override.
1259 * config/tc-d10v.c (md_assemble): Now handles multiline
1264 * config/tc-d10v.c: Fix packaging bug. Added range checking.
1265 Added kludge for divs instruction. Fixed minor problem with
1266 multiple text sections.
1267 * config/tc-d10v.h (d10v_cleanup): Change prototype.
1271 * config/tc-d10v.c (md_apply_fix3): Fix all instruction
1272 addresses to be right-shifted by 2.
1276 * config/tc-d10v.c: Many changes to get relocs working.
1277 (register_name): No longer creates a symbol for register names.
1278 (pre_defined_registers): moved to opcodes/d10v-opc.c.
1279 (d10v_insert_operand): Now works correctly for either container.
1280 * config/tc-d10v.h (d10v_cleanup): Declare.
1285 * config/tc-mips.c (tc_gen_reloc): BFD_RELOC_PCREL_HI16_S and
1286 BFD_RELOC_PCREL_LO16 are expected to be PC relative.
1290 * tc-alpha.c: Patches to track current minimum alignment to reduce
1291 the number of fragments created with frag_align.
1292 (alpha_current_align): New static variable.
1293 (s_alpha_text): Reset alignment to 0.
1294 (s_alpha_data, s_alpha_rdata, s_alpha_sdata): Likewise.
1295 (s_alpha_stringer, s_alpha_space): New functions.
1296 (s_alpha_cons, alpha_flush_pending_output): Remove functions.
1297 (alpha_cons_align): New function to replace both of them.
1298 (emit_insn): Only align if alpha_current_align is less than 2;
1299 reset alpha_current_align to 2.
1300 (s_alpha_gprel32): Likewise.
1301 (s_alpha_section): New function. Basically duplicate the other
1302 alpha section change hooks. Only define for ELF.
1303 (s_alpha_float_cons): Simplify alignment handling.
1304 (md_pseudo_table): Only define "rdata" and "sdata" if OBJ_ECOFF.
1305 If OBJ_ELF, define "section", "section.s", "sect", and "sect.s".
1306 Don't define the s_alpha_cons pseudo-ops. Do define
1307 s_alpha_stringer and s_alpha_space pseudo-ops.
1308 (alpha_align): Skip if less than current default alignment. Set
1310 * tc-alpha.h (md_flush_pending_output): Remove.
1311 (md_cons_align): Add.
1313 * tc-alpha.c: Add oodles of function description comments.
1314 (md_bignum_to_chars): Remove; there are no callers.
1315 (md_show_usage): Mention some more variants.
1320 * configure.in (sparc-*-sysv4*): New target.
1321 * configure: Rebuild.
1323 * config/tc-sparc.c (md_pseudo_table): Change uahalf, uaword, and
1324 uaxword to use s_uacons.
1325 (sparc_no_align_cons): New static variable.
1326 (s_uacons): New static function.
1327 (sparc_cons_align): If sparc_no_align_cons is set, just clear it
1330 * config/tc-sparc.c (s_common): Remove unused label allocate_bss.
1332 * configure.in: Add mips-*-irix6* target. Handle Irix 6 like Irix
1333 5 with regard to shared libraries.
1334 * configure: Rebuild.
1336 * config/tc-m68k.c (m68k_ip): Use the correct length when
1337 allocating space for the unsupported architecture error message.
1342 * configure.in (d10v-*-*): Allow d10v-*-*, don't require d10v-*-elf*.
1346 * config/tc-d10v.c: New file.
1347 * config/tc-d10v.h: New file.
1348 * configure (d10v-*-elf): New target.
1349 * configure.in (d10v-*-elf): New target.
1354 * config/tc-ppc.c (md_parse_option): Recognize -K PIC.
1358 * config/tc-alpha.c (alpha_align): Change fill parameter
1359 to a pointer. Take NULL as 0 or nop depending on section. Change
1361 (s_alpha_align): Rename local variables.
1363 * doc/as.texinfo (.align): Document action of omitted
1368 * config/tc-ppc.c (md_apply_fix3): Give a useful error message
1369 when an unsupported PC relative reloc is seen, rather than calling
1372 * app.c (do_scrub_chars): Remove not_cpp_line local variable.
1373 Instead, check state when '#' comment is seen.
1377 * config/tc-mips.c (mips_regmask_frag): Only define if OBJ_ELF or
1379 (tc_gen_reloc): If fixup was changed to be PC relative, change
1380 reloc type accordingly. Use name of reloc in error message.
1382 * as.h: Don't define const or volatile.
1383 * flonum.h: Don't define const.
1385 * config/tc-m68k.c (tc_gen_reloc): Change the code appropriately
1386 if fx_pcrel is set. Correct setting the addend case in the
1387 OBJ_ELF case (from Andreas Schwab
1389 (md_show_usage): Correct -mfc5200 to -m5200.
1393 * doc/c-m68k.texi: Document -m5200 flag.
1394 * doc/as.texinfo: Likewise.
1396 * config/tc-m68k.c (m68k_ip): The coldfire does not support 8x
1401 * symbols.c (S_SET_EXTERNAL): Change as_warn to as_bad.
1402 (S_CLEAR_EXTERNAL, S_SET_WEAK): Likewise.
1406 * Makefile.in (VERSION): Set to cygnus-2.7.1.
1408 * Released binutils 2.7.
1412 * config/tc-mips.c (mips_ip): Only perform range check when
1413 dealing with O_constant expressions.
1417 * m68k-parse.h (m68k_register): Add new coldfile control
1420 * config/tc-m68k.c (mcf5200_control_regs): New variable,
1421 array of control registers for the coldfire.
1422 (cpu_of_arch): Added mcf5200.
1423 (archs): Added mcf5200.
1424 (init_table): Add new control registers.
1425 (m68k_ip): Added support for new control registers.
1426 (m68k_init_after_args): Likewise.
1428 * config/tc-m68k.c (md_show_usage): Add -m5200 to usage text.
1432 * read.h (is_it_end_of_statement): Declare.
1433 * read.c (is_it_end_of_statement): Remove declaration.
1435 * config/tc-ppc.c (ppc_elf_suffix): Correct parenthesization of ||
1437 (md_assemble): Fix handling of @l with an unsigned constant. Add
1438 default case to reloc switch.
1440 * config/tc-i386.h (AOUT_MACHTYPE): Define as 0 if TE_386BSD.
1443 * ecoff.c (last_lineno): New static variable.
1444 (add_procedure): Set last_lineno.
1445 (ecoff_directive_loc): Likewise.
1446 (ecoff_generate_asm_lineno): Likewise.
1447 (ecoff_fix_loc): New function.
1448 * ecoff.h (ecoff_fix_loc): Declare.
1449 * config/tc-mips.c (append_insn): When inserting nops, and using
1450 ECOFF debugging, call ecoff_fix_loc.
1454 * config/tc-h8300.c (build_bytes): If an operand type is
1455 marked as SRC_IN_DST retrieve it from the "destination" op.
1459 * configure.in (arm-*-riscix*): Set emulation to riscix.
1460 * configure: Rebuild.
1461 * config/te-riscix.h: New file to define TE_RISCIX.
1463 * config/tc-sh.h (SUB_SEGMENT_ALIGN): Define.
1467 * Makefile.in (config.status): Just run config.status as other
1472 * mpw-config.in (TARGET_OS): Add definition to conf.
1476 * config/tc-mips.c (append_insn): Parenthesize
1477 cop_interlocks expressions.
1481 * listing.c (listing_print): Close the listing file if it is not
1482 stdout. Close the other files opened for the listing.
1484 * config/tc-sparc.h (md_cons_align): Define.
1485 (sparc_cons_align): Declare.
1486 (HANDLE_ALIGN): Define.
1487 (sparc_handle_align): Declare.
1488 * config/tc-sparc.c (sparc_cons_align): New function.
1489 (sparc_handle_align): New function.
1490 * read.c (cons_worker): Call md_cons_align if it is defined.
1492 * as.h (struct frag): Add fr_file and fr_line fields.
1493 * frags.c (frag_new): Set fr_file and fr_line.
1494 (frag_var): Likewise.
1495 (frag_variant): Likewise.
1497 * as.h (struct frag): Remove unused align_mask and align_offset
1500 * listing.c (calc_hex): Offset by fr_fix when examining fr_var.
1505 * configure.in (mips-*-osf*): New target.
1506 * configure: Rebuild.
1508 * config/tc-m68k.c: Add 68ec060 as a synonym for 68060.
1512 * config/tc-mips.c: Added cop_interlocks, to avoid NOP insertion
1513 between co-processor comparisons and branches for the VR4300.
1517 * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
1518 INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
1520 * configure.in (AC_PREREQ): autoconf 2.5 or higher.
1521 * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
1522 includedir): Use autoconf set values.
1527 * listing.c (listing_eject): Don't do anything if listing is 0.
1528 (listing_list): Likewise.
1529 (listing_source_line): Likewise.
1530 (listing_title): Don't save title if listing is 0.
1531 (listing_source_file): Check listing rather than listing_tail.
1533 * configure.in: On alpha*-*-osf*, link against libbfd.a if not
1534 using shared libraries.
1535 * configure: Rebuild.
1539 * config/tc-mips.c (mips_ip): In case 'i'/'j', don't require an
1540 absolute expression if a relocation type was specified.
1544 * configure.in: Add support for *-*-rtems* configurations.
1545 * configure: Rebuild.
1549 * configure.in: Add alpha-*-linuxecoff* target. Use elf for
1550 alpha-*-linux* target. Force bfd_gas for alpha-*. Require
1551 opcodes library for alpha.
1552 * configure: Rebuild with autoconf 2.10.
1553 * config/tc-alpha.c: Substantial rewrite to add ELF support and
1554 use new opcode table.
1555 * config/tc-alpha.h (md_undefined_symbol): Don't define.
1556 (LOCAL_LABEL): Define differently if OBJ_ELF.
1557 (FAKE_LABEL_NAME): Define if OBJ_ELF.
1558 * config/alpha-opcode.h: Remove.
1559 * config/obj-elf.h: If TC_ALPHA, define ECOFF_DEBUGGING.
1560 * Makefile.in (TARG_CPU_DEP_alpha): Depend upon
1561 include/opcode/alpha.h rather than config/alpha-opcode.h.
1565 * config/obj-aout.c (obj_emit_relocations): Give an error if the
1566 relocation symbol was not resolved.
1567 * config/obj-coff.c (do_relocs_for): Likewise.
1569 * write.c (adjust_reloc_syms): Refetch the symbol section after
1570 calling S_GET_VALUE, since it may have changed.
1572 * expr.c (struct expr_symbol_line): Define.
1573 (expr_symbol_lines): New static variable.
1574 (make_expr_symbol): Add entry to expr_symbol_lines.
1575 (expr_symbol_where): New function.
1576 * expr.h: Use extern on function declarations.
1577 (expr_symbol_where): Declare.
1578 * symbols.c (resolve_symbol_value): Try to use expr_symbol_where
1579 rather than printing the meaningless name of an expression
1584 * config/tc-i386.c (md_number_to_chars): Deleted.
1585 * config/tc-i386.h (md_number_to_chars): New macro.
1587 * config/tc-alpha.c (build_operate_n, build_mem): Moved earlier in
1589 (load_symbol_address, load_expression): Use build_mem.
1590 (build_operate): New function.
1591 (emit_addq_r): Use it.
1595 * symbols.c (colon): #if VMS, use S_SET_OTHER to store `const_flag'.
1599 * config/tc-vax.h (NOP_OPCODE): Define.
1603 * config/obj-vms.h (S_IS_COMMON): Define.
1604 (S_IS_LOCAL): Check for \002 as well as \001.
1605 (LONGWORD_ALIGNMENT): New macro.
1606 (SUB_SEGMENT_ALIGN): Use it.
1610 * config/vms-conf.h: Reconcile with conf.in.
1614 * write.c (is_dnrange): Only define if TC_GENERIC_RELAX_TABLE is
1617 * doc/as.texinfo: Document that any number of hex digits can
1620 * as.c (struct defsym_list): Define.
1621 (defsyms): New static variable.
1622 (parse_args): Just put --defsym arguments on defsyms list, rather
1624 (main): Define defsyms after output file is created.
1626 * config/tc-m68k.c (m68k_ip): Reject PRE and POST indexing mode on
1629 * config/tc-mips.c (mips_ip): In cases 'I', 'i', and 'j', set
1630 insn_error rather than calling check_absolute_expr.
1632 * as.c (emulation_name): Remove unused static variable.
1633 (default_emul_bfd_name): Add return NULL to avoid warning.
1634 * ecoff.c (ecoff_stab): Remove unused variables name and
1636 * frags.c (frag_new): Remove unused variable tmp.
1637 * hash.c (hash_grow): Parenthesize + within <<.
1638 (hash_print_statistics): Use %lu, not %d, to print unsigned
1640 * messages.c: Include "libiberty.h".
1641 (fprint_value): Add cast to avoid printf warning.
1642 (sprint_value): Likewise.
1643 * read.c: Include "ecoff.h".
1644 (emit_expr): Add casts to avoid printf warnings.
1645 * read.h: Use extern for function declarations.
1646 (pop_insert): Declare.
1647 * stabs.c: Include "ecoff.h".
1648 * subsegs.c (subseg_set_rest): Remove unused variables tmp,
1649 former_last_fragP, and new_fragP.
1650 * subsegs.h (subsegs_print_statistics): Declare.
1651 * symbols.c (debug_verify_symchain): Change macro to discard
1653 * write.c (dump_section_relocs): Likewise.
1654 * write.h: Use extern for function declarations.
1655 (write_print_statistics): Declare.
1656 * config/e-mipsecoff.c (mipsecoff_bfd_name): Return NULL to avoid
1658 * config/e-mipself.c (mipself_bfd_name): Likewise.
1659 * config/obj-elf.h (elf_ecoff_set_ext): Declare.
1661 * config/tc-sparc.h (TC_RELOC_RTSYM_LOC_FIXUP): If OBJ_ELF, always
1662 emit relocations against external symbols.
1664 * config/tc-alpha.c (tc_gen_reloc): Output a sensible error
1665 message if bfd_reloc_type_lookup fails, rather than calling
1668 * config/tc-alpha.c (alpha_force_relocation): Add
1669 BFD_RELOC_12_PCREL to switch.
1673 * config/tc-i386.h (LOCAL_LABEL,FAKE_LABEL_NAME): Use defaults for
1674 TE_PE (Lfoo, not .Lfoo).
1678 * read.c (s_fill): Don't warn about a zero repeat count.
1680 * config/tc-mips.c (mips_ip): Don't warn about using AT as a
1681 coprocessor register.
1683 * config/tc-i386.c (md_assemble): When checking the size of a
1684 register to set the size of an instruction, do a bitwise and with
1685 Reg8 and Reg16 rather than requiring the type to be exactly Reg8
1690 * config/tc-h8300.c (parse_reg): Tweak error messages.
1691 (build_bytes): Likewise.
1692 (skip_colonthing): Handle :32 suffix.
1693 (get_specific): Promote L_24 to L_32 if it makes a match.
1694 Don't always promote L_8 to L_16.
1695 (do_a_fix_imm): Clean up L_32 and L_24 handling.
1697 * config/tc-h8300.c (Smode): New variable.
1698 (h8300hmode): Turn off Hmode.
1699 (h8300smode): New function. Turn on Smode and Hmode.
1700 (md_pseudo_table): New ".h8300s" pseudo-op.
1701 (parse_reg): Handle "exr" register.
1702 (get_operand): Handle bizarre syntax for "stm.l" and "ldm.l".
1703 Handle "mach" and "machl" operands for ldmac.
1704 (get_specific): Handle "stm.l" and "ldm.l".
1705 (build_bytes): Handle "stm.l" and "ldm.l"; handle MACREG operands.
1706 * config/tc-h8300.h (COFF_MAGIC): Handle H8/S magic number.
1711 * doc/as.texinfo: Reorder chapter of machine dependent options so
1712 that it is sorted by chip name.
1714 * doc/as.texinfo: Use consistant spelling of Vax.
1715 * doc/c-vax.texi: Likewise.
1719 * config/tc-hppa.c (md_pseudo_table): Add ".begin_try" and ".end_try"
1721 (tc_gen_reloc, SOM version): Handle R_BEGIN_TRY and R_END_TRY.
1722 (md_apply_fix): Likewise.
1723 (pa_try): New function.
1724 (hppa_force_relocation): Force relocs for BEGIN_TRY and END_TRY.
1728 * config/tc-hppa.c (md_pseudo_table): Add ".level" pseudo op.
1729 (pa_level): New function.
1733 * listing.c (listing_newline): Don't do anything if listing is 0.
1737 * subsegs.c (section_symbol): If symbol_table_frozen is set, call
1738 symbol_create, not symbol_new.
1742 * write.c (adjust_reloc_syms): Don't set sy_used_in_reloc for an
1743 absolute symbol unless TC_FORCE_RELOCATION returns true.
1745 * config/obj-coff.c (previous_file_symbol): Remove BFD_ASSEMBLER
1747 (c_dot_file_symbol): BFD_ASSEMBLER version: Don't set the value of
1748 the symbol to a pointer. Don't set previous_file_symbol.
1749 Simplify symbol list rearrangement.
1750 (coff_frob_symbol): Don't do anything with C_FILE symbols.
1751 (coff_adjust_symtab): Don't check previous_file_symbol.
1755 * config/tc-ppc.c (ppc_elf_lcomm): New function for .lcomm
1757 (md_pseudo_table): Add ppc_elf_lcomm.
1761 * config/tc-m68k.c (m68k_ip): Accept ABSL for 'O', so that `bfextu
1762 d0{24:1},d0' works without an immediate prefix on the bit numbers.
1763 (md_begin): Add digits to alt_notend_table.
1764 (md_parse_option): Make s a const pointer.
1766 * config/tc-sparc.c (md_pseudo_table): Add "empty".
1767 (s_empty): New static function.
1769 * config/obj-coff.c (struct filename_list): Only define if not
1771 (filename_list_head, filename_list_tail): Likewise.
1772 (c_section_symbol): Remove unused BFD_ASSEMBLER version.
1773 (obj_coff_endef, BFD_ASSEMBLER version): Don't set the debugging
1774 flag for C_MOS, C_MOE, C_MOU, or C_EOS symbols, since they should
1775 have a section of N_ABS rather than N_DEBUG. If we do a merge,
1776 remove the new symbol from the list.
1777 (obj_coff_endef, both versions): Call tag_insert even if there is
1778 an old symbol with the same name, if the old symbol does not
1780 (coff_frob_symbol): Check SF_GET_TAG, C_EOF, and C_FILE outside of
1781 the SF_GET_DEBUG condition. Don't call SA_SET_SYM_ENDNDX with a
1782 symbol that will be moved to the end of the symbol list.
1783 (coff_adjust_section_syms): Always call section_symbol for .text,
1785 (coff_frob_section): Likewise. Also, remove unused variable
1788 * config/tc-ns32k.c (convert_iif): Call frag_grow rather than
1789 manipulating frags directly.
1790 (md_number_to_field): Adjust mem_ptr correctly if ENDIAN is
1793 * app.c (do_scrub_chars): If '/' is LINE_COMMENT_START, check
1794 whether the next character is '*' before checking whether we are
1795 at the start of a line. Permit LINE_COMMENT_START to start a
1796 comment in state 1 (seen some whitespace) as well, to match the
1799 * gasp.c (do_align): Permit a fill value for .align.
1803 * read.c (next_char_of_string): Warn if a newline is seen in the
1804 middle of a string. Call bump_line_counters when appropriate.
1808 * symbols.c (colon): Use LOCAL_LABEL.
1812 * Makefile.in (install): Don't check to see if tooldir exists.
1813 Make $(tooldir) and $(tooldir)/bin.
1817 * config/ppc-sol.mt (TDEFINES): Don't turn on -mregnames by
1822 * config/tc-mips.c (mips_ip): Don't call as_warn if we are setting
1823 insn_error. Don't put the string "ERROR" in insn_error. Set
1824 insn_error rather than calling as_warn for an unsupported opcode.
1828 * config/tc-mips.c (md_parse_option): Check for a 64 bit format
1829 before permitting -64.
1830 * output-file.c (output_file_create): Remove duplicate
1835 * config/tc-mips.c (md_begin): If -64, create a .MIPS.options
1836 section rather than a .reginfo section.
1837 (mips_elf_final_processing): If -64, write out 64 bit RegInfo
1840 * config/tc-mips.c (load_register): If mips_isa < 3, permit a 32
1841 bit value with the high bit set.
1845 * read.c (s_lcomm): Set section flags for .sbss section.
1847 * config/tc-mips.c (mips_64): New static variable.
1848 (mips_target_format): If mips_64, return elf64 targets rather than
1850 (md_longopts): Add "32" and "64".
1851 (md_parse_option): Handle -32 and -64.
1852 (md_show_usage): Mention -32 and -64.
1853 (cons_fix_new_mips): If mips_64, don't convert an 8 byte reloc to
1858 * config/tc-ppc.c (comment_chars): Make '!' a comment character
1859 for Solaris compatibility.
1861 * stabs.c (s_stab_generic): Under PowerPC Solaris, convert a
1862 .stabd with 4 arguments into a .stabn.
1866 * config/tc-mips.c (macro): When passing X_add_number to
1867 macro_build, cast it to int first.
1871 * config/tc-z8k.c (md_apply_fix): Handle fx_r_type of 0, as
1872 created by emit_expr.
1874 * symbols.c (symbol_create): If bfd_make_empty_symbol fails, call
1875 as_perror rather than assert.
1879 * config/tc-mips.c (mips_ip): Mark sections created to hold
1880 floating point information as read only.
1884 * config/tc-ppc.c (ppc_set_cpu): Change defaults to match AIX.
1888 * read.c (potable): Add .skip as a synonym for .space.
1890 * stabs.c (s_stab_generic): For PowerPC ELF, allow .stabd to take
1891 4 arguments, providing the 4th argument is 0, to allow
1892 compatibility with the Solaris assembler.
1896 * config/tc-sh.h (struct sh_segment_info_type): Define.
1897 (TC_SEGMENT_INFO_TYPE): Define.
1898 (sh_frob_label): Declare.
1899 (tc_frob_label): Define.
1900 (sh_flush_pending_output): Declare.
1901 (md_flush_pending_output): Define.
1902 * config/tc-sh.c (md_assemble): If relaxing, emit a R_SH_CODE
1903 reloc before the instruction if necessary.
1904 (sh_frob_label): New function.
1905 (sh_flush_pending_output): New function.
1906 (sh_coff_frob_file): Ignore ALIGN, CODE, DATA, and LABEL relocs
1907 when looking for the reloc for the target of .uses.
1908 (md_convert_frag): Fix printf format (%0xlx to 0x%lx).
1909 (sh_force_relocation): Force CODE, DATA, and LABEL relocs to be
1911 (md_apply_fix): Ignore CODE, DATA, and LABEL relocs.
1912 (sh_coff_reloc_mangle): Force CODE, DATA, and LABEL relocs to use
1913 the absolute symbol.
1915 * subsegs.h (segment_info_type): Add tc_segment_info_data field if
1916 TC_SEGMENT_INFO_TYPE is defined.
1920 * config/tc-i386.c (md_assemble): Make sure the opcode suffix
1921 matches the register size.
1925 * config/obj-coff.c (count_entries_in_chain): Ignore Fixups with
1927 (do_relocs_for): Likewise.
1928 (fixup_segment): Don't just quit if linkrelax is set. Try to
1929 apply non pc-relative sym1-sym2 fixups, even if linkrelax is
1934 * config/tc-ppc.c (ppc_elf_validate_fix): Allow GOT and section
1935 relative relocations with -mrelocatable. Also allow unfixed
1936 relocs in .ex_shared.
1940 * config/obj-coff.c (yank_symbols): Check that FNAME_OFFSET is
1941 non-zero before assuming this is a long file name.
1942 (w_strings): Likewise.
1943 (c_dot_file_symbol): Set FNAME_OFFSET to 1 for a long file name.
1945 * config/obj-coff.c (w_strings): Move declaration of i inside
1946 #ifdef block which uses it.
1950 * config/tc-h8300.c (do_a_fix_imm): Rename last argument to
1951 "relaxmode". Output relocs which identify various relaxing
1952 possibilities for mov.[bwl] instructions.
1953 (build_bytes): Pass in a relaxing mode to do_a_fix_imm.
1957 * config/tc-arm.h (TC_HANDLES_FX_DONE): Define.
1958 (MD_APPLY_FIX3): Define.
1959 * config/tc-arm.c (my_get_expression): Only watch for bad segments
1961 (md_apply_fix3): Renamed from md_apply_fix.
1962 If pcrel reloc and symbol is in different section, undo effects
1967 * config/tc-hppa.c (hppa_fix_adjustable): Don't adjust
1968 any reloc with an LR% or RR% field selector for SOM.
1972 * Makefile.in: Add subsegs.h to appropriate TARG_CPU_DEP_*
1977 * config/obj-coff.c (coff_frob_symbol): Don't merge a symbol with
1979 (yank_symbols): Likewise.
1983 * subsegs.h (segment_info_type): If MANY_SEGMENTS and not
1984 BFD_ASSEMBLER, add name field.
1985 * config/obj-coff.c: Include "libiberty.h".
1986 (coff_header_append): Handle long section names.
1987 (crawl_symbols): Just use the name field for the symbol name,
1988 without worrying about null byte termination.
1989 (w_strings): Handle long section names.
1990 (write_object_file): Likewise. Also, use the name field, rather
1992 (obj_coff_add_segment): Permit long section names.
1993 (obj_coff_init_stab_section): Use the name field, rather than
1995 (adjust_stab_section): Likewise.
1996 * config/te-pe.h (COFF_LONG_SECTION_NAMES): Define.
1998 * config/tc-i960.c (brtab_emit): Don't set fx_im_disp field.
1999 (mem_fmt): Likewise.
2000 (md_apply_fix): Don't check fx_im_disp field.
2004 * configure.in: Add * after sparc*-*-vxworks.
2005 * configure: Rebuild.
2007 * app.c (do_scrub_begin): If tc_comment_chars is not defined,
2008 define it to comment_chars. Use tc_comment_chars rather than
2010 (do_scrub_chars): Use tc_comment_chars rather than comment_chars.
2011 * config/tc-m68k.h (tc_comment_chars): Define.
2012 (m68k_comment_chars): Declare.
2013 * config/tc-m68k.c (m68k_comment_chars): Rename from
2014 comment_chars. Change into a pointer rather than an array.
2015 (md_longopts): Add "bitwise-or".
2016 (md_parse_option): Handle OPTION_BITWISE_OR.
2017 (md_show_usage): Mention --bitwise-or.
2018 * doc/c-m68k.texi: Document --bitwise-or.
2022 * config/tc-m68k.c (m68k_ip): Prevent attempts to use long offsets
2025 * config/obj-coff.c (obj_coff_section): BFD_ASSEMBLER version:
2026 call demand_empty_rest_of_line. Non BFD_ASSEMBLER version:
2027 correct handling of input line pointer, and call
2028 demand_empty_rest_of_line.
2032 * config/tc-sparc.c (in_bitfield_range): New static function.
2033 (sparc_ip): New cases X,Y. Use SPARC_OPCODE_ARCH_V9_P.
2034 (md_apply_fix, cases BFD_RELOC_32_PCREL_S2,
2035 BFD_RELOC_SPARC_{WDISP16,WDISP19}): Fix undefined code.
2036 (md_apply_fix): New cases BFD_RELOC_SPARC_[56].
2037 (tc_gen_reloc): New cases BFD_RELOC_SPARC_[56].
2041 * config/obj-coff.c: BFD_ASSEMBLER:
2042 (coff_last_bf): New static variable.
2043 (coff_frob_symbol): Set endndx of a .bf symbol.
2045 (obj_coff_endef): Call SF_SET_PROCESS on a .bf symbol.
2046 (last_bfP): New static variable.
2047 (yank_symbols): Set endndx of a .bf symbol.
2051 * config/tc-ppc.c (md_parse_option): Add support for Solaris's -le
2052 and -s options. Add -be for good measure.
2056 * read.c (s_space): Support non-constant fill value. Handle fill
2057 value correctly for a size other than 1.
2061 * config/tc-arm.c (my_get_float_expression): Update call to
2062 gen_to_words, X_PRECISION changed from 6 to 5.
2066 * config/tc-ppc.c (register_name,reg_name_search): Move register
2067 name lookup from PE specific code to all targets. Add support for
2068 -mregnames/-mno-regnames to control whether register names are
2070 (md_assemble): Call register_name for all platforms.
2071 (md_parse_option): Add support for -mregnames/-mno-regnames.
2073 * configure.in (powerpcle*-*-solaris): Add support.
2074 (powerpc*-*-linux): Ditto.
2075 * configure: Regenerate.
2077 * config/ppc-sol.mt: New config file for PowerPC Solaris.
2081 * config/tc-mips.c (mips_frob_file): Permit multiple %hi relocs to
2082 be associated with a single %lo reloc.
2084 * config/tc-mips.c (load_address): Cast X_add_number to valueT
2085 before comparing against MAX_GPREL_OFFSET, so that negative
2086 numbers are handled correctly.
2091 * config/tc-sparc.c (last_insn): New static variable.
2092 (md_assemble): Warn about putting floating point branches in a
2093 delay slot. If architecture is less than v9, insert NOP
2094 instructions between floating point instructions and floating
2095 point branches. (The SunOS assembler does both these operations.)
2096 Save the last instruction opcode.
2097 (sparc_ip): Add pinsn parameter. Change caller.
2099 * config/tc-m68k.c (md_estimate_size_before_relax): Correct check
2100 for byte jump to next instruction to skip empty frags.
2104 * config/tc-alpha.c (alpha_ip): If we are going to call emit_add64
2105 for addq with a 16 bit signed value, just emit a lda instruction
2110 * config/tc-h8300.c (do_a_fix_imm): Don't cut off high bits
2115 * configure.in: Permit --enable-shared to specify a list of
2117 * configure: Rebuild.
2121 * config/tc-h8300.c (get_specific): Remove some #if 0 code.
2122 (build_bytes): Remove all ABSMOV related code; it's unnecessary.
2126 * config/atof-ieee.c: Fix handling of denormalized extended
2127 precision numbers and overflow/underflow detection.
2128 (MAX_PRECISION, X_PRECISION, P_PRECISION): Changed from 6 to 5, to
2129 not include the 16 bit gap in the m68k extended precision format.
2133 * configure.in: Add i386-*-freebsdelf* target; from John Polstra
2135 * configure: Rebuild.
2139 * config/tc-mips.c: Allow non-zero offsets from .sdata symbols to
2140 be accessed using the $gp register.
2141 * config/tc-mips.h (MAX_GPREL_OFFSET): Added.
2145 * config/tc-sparc.c (sparc_md_end): Set bfd machine number to
2146 bfd_mach_sparc_sparclet if current_architecture is sparclet.
2150 * read.c (get_line_sb): Bump line counters based on
2151 input_line_pointer[-1], not *input_line_pointer. Don't bother to
2152 call LISTING_NEWLINE.
2153 (s_macro): Don't call demand_empty_rest_of_line.
2154 * app.c (do_scrub_chars): When handling C style comments, unget
2159 * read.h (enum linkonce_type): Define.
2160 (s_linkonce): Declare.
2161 * read.c (potable): Add "linkonce".
2162 (s_linkonce): New function.
2163 * subsegs.h (segment_info_type): Add linkonce field to
2164 MANY_SEGMENTS && ! BFD_ASSEMBLER section.
2165 * config/obj-coff.h (obj_handle_link_once): Define if TE_PE.
2166 (obj_coff_pe_handle_link_once): Declare if TE_PE.
2167 * config/obj-coff.c: If TE_PE and not BFD_ASSEMBLER, #include
2169 (obj_coff_pe_handle_link_once): New function, defined if TE_PE.
2170 (c_section_symbol): If TE_PE, set the x_comdat field in the aux
2171 entry based on the linkonce field in segment_info.
2172 * doc/as.texinfo: Document .linkonce.
2176 * doc/as.1: Changed to be recognized by catman -w on Solaris.
2180 * stabs.c (s_stab_generic): Call the listing functions before
2181 doing the rest of the processing, which may involve freeing the
2182 string. Pass string, not string + stroff, to OBJ_PROCESS_STAB in
2183 SEPARATE_STAB_SECTIONS case.
2185 * config/tc-hppa.c: Remove nested comment.
2186 (tc_gen_reloc): Move label done inside the ifdef in which it is
2188 (md_apply_fix): Pass pointers to correct types to libhppa.h
2189 functions. Always return a value.
2191 * config/tc-mips.h (tc_frob_file): Define.
2192 (mips_frob_file): Declare.
2193 * config/tc-mips.c (struct mips_hi_fixup): Define.
2194 (mips_hi_fixup_list): New static variable.
2195 (imm_unmatched_hi): New static variable.
2196 (md_assemble): Clear imm_reloc, imm_unmatched_hi, and
2197 offset_reloc. Pass imm_unmatched_hi to append_insn.
2198 (append_insn): Add unmatched_hi parameter. If it is set, add the
2199 new fixup to mips_hi_fixup_list. Change all callers.
2200 (mips_ip): Set imm_unmatched_hi when appropriate.
2201 (mips_frob_file): New function.
2205 * configure.in (sparc-*-solaris2*): Renamed from sparc*-*-solaris2*.
2206 * configure: Regenerated.
2210 * as.c (main): Call bfd_set_error_program_name.
2214 * as.h (strdup): Don't declare.
2215 * stabs.c: Include libiberty.h
2216 (get_stab_string_offset): Use xstrdup rather than strdup.
2217 (s_stab_generic): Likewise.
2218 * as.c (parse_args): Likewise.
2219 * read.c (s_mri_sect): Likewise.
2221 * gasp.c (change_base): Recognize \(...) construct documented to
2222 pass through enclosed characters literally through to the output.
2223 (process_assigns): Likewise. Also, be more careful to avoid
2224 looking past the end of the buffer.
2228 * config/tc-i386.c (md_parse_option): If OBJ_ELF, ignore -k for
2233 * doc/as.texinfo, doc/c-i960.texi: Fix typos.
2237 * config/alpha-opcode.h: Added cvtst instruction.
2241 * ecoff.c (ecoff_stab): Don't try to make a symbol out of the stab
2242 string. Extract the addend from the result of expression.
2246 * app.c (do_scrub_chars): If whitespace is seen in state 11, and
2247 LABELS_WITHOUT_COLONS is not defined, and we are not in m68k MRI
2248 mode, change the state to 3 rather than 1.
2252 * config/obj-coff.h (C_REGISTER_SECTION): Change from 20 to 50, to
2253 correspond to 11 March change.
2257 * config/tc-h8300.c (build_bytes, MEMIND case): Generate
2258 an R_MEM_INDIRECT reloc rather than R_RELBYTE.
2262 * configure: Rebuild with autoconf 2.8.
2266 * config/atof-ieee.c (gen_to_words): Improve handling of
2267 X_PRECISION numbers. Based on patches from Andreas Schwab
2272 * as.h (SEG_NORMAL, SEG_LIST): Bump segment limit from 10 to 40.
2274 * subsegs.c (MANY_SEGMENTS): Increase segment limit.
2275 * obj-coff.c (seg_N_TYPE, seg_info_off_by_4): Likewise.
2276 (do_relocs_for, w_symbols, obj_coff_add_segment, do_linenos_for,
2277 crawl_symbols, coff_header_append): Loop to SEG_LAST rather than
2282 * config/tc-sparc.c (sparc_ip): Handle operand char 'O' (neg reg).
2286 * config/tc-hppa.c (SUBSEG_MILLI): Define.
2287 (pa_def_subspaces): Add $MILLICODE$.
2288 (pa_spaces_begin): Set section flags for $MILLICODE$.
2292 * config/obj-elf.c (obj_elf_section): Only SEC_LOAD if the type is
2293 not SHT_NOBITS. Don't tamper with flags based on type if a
2294 special section was found (revert Feb 29 change).
2296 * config/tc-sh.c (sh_do_align): Only align using the nop pattern
2297 if aligning to a longword boundary or greater.
2301 * config/tc-sh.c (sh_do_align): Pass 1 not 2 to frag_align.
2305 * configure.in (i386-*-cygwin32): Don't use bfd_gas.
2306 * configure: Regenerated.
2310 * config/tc-hppa.c: Add default definitions for R_N0SEL and
2311 R_N1SEL since they're not defined for old versions of hpux.
2313 * config/tc-hppa.c (tc_gen_reloc): Fix typo in R_COMP2 code.
2314 Set "sym_ptr_ptr" and "addend" fields to dummy values for
2315 R_N0SEL and R_N1SEL.
2319 * flonum-konst.c: Add two more constants for 1e+-2048 and
2320 1e+-4096, and correct the other constants.
2322 * symbols.c (resolve_symbol_value): Handle O_logical_not.
2326 * config/obj-elf.c (obj_elf_section): Allow predefined section
2327 types to set the nobits type. Avoid a shadowed declaration.
2331 * config/tc-hppa.c (hppa_fix_adjustable): For SOM, don't
2332 reduce relocs using e_nlrsel field selectors.
2334 * write.c (fix_new_exp): Don't use #elif. Some compilers
2337 * config/tc-hppa.c (selector_table): Add "n", "nl", and "nlr" to
2339 (pa_chk_field_selector): Handle new field selectors for SOM.
2343 * configure.in (m68k-*-linux*aout*, m68k-*-linux*): New targets.
2344 * configure: Rebuild.
2345 * config/te-linux.h (LOCAL_LABELS_FB): Define.
2346 * config/tc-m68k.h (TARGET_FORMAT) [TE_LINUX]: Define to
2348 * config/tc-m68k.c (comment_chars): Don't include '#' if TE_LINUX
2353 * mpw-make.sed: Update to handle shared library support.
2357 * config/tc-sparc.c (sparc_ip): Print all architectures that support
2358 the insn on mismatch.
2362 * configure.in: Add support for a29-coff.
2363 * configure: Rebuild.
2367 * config/tc-sh.c (sh_coff_frob_file): Don't consider the address
2368 of the section when looking for the R_SH_USES fixup, because the
2369 frag addresses have not yet been adjusted.
2371 * gdbinit.in: Set a breakpoint on as_warn_where.
2373 * config/tc-mips.c (macro): Add missing arguments to macro_build
2378 * config/tc-h8300.c (tc_reloc_mangle): Change reloc based on size
2379 if it is TC_CONS_RELOC. Set a size of 4 to R_RELLONG.
2383 * config/tc-sparc.c (sparc_ip): Recognize %asr0 for v8.
2387 * config/tc-sparc.c (parse_keyword_arg): Accept leading '%'.
2388 (sparc_ip): Accept %asr[1..31] for v8 and %asr[%16..31] for v9.
2389 Recognize [uU] format args as sparclet cpregs.
2393 * config/tc-sh.c (sh_handle_align): Don't emit R_SH_ALIGN relocs
2398 * config/tc-sparc.h (TC_RELOC_RTSYM_LOC_FIXUP): Check S_IS_WEAK as
2399 well as S_IS_EXTERNAL.
2400 (tc_fix_adjustable): Likewise.
2401 * config/tc-sparc.c (md_apply_fix): In OBJ_ELF case, check for
2402 S_IS_WEAK as well as S_IS_EXTERNAL when deciding whether to return
2404 (tc_gen_reloc): Check S_IS_WEAK as wel as S_IS_EXTERNAL when
2405 deciding whether to convert BFD_RELOC_32_PCREL_S2 if PIC.
2409 * config/tc-sparc.c (max_architecture): Change to sparclite for
2411 (default_compatible): Delete.
2412 (sparc_ffs): New function.
2413 (md_begin): Only call SPARC_OPCODE_CONFLICT_P once.
2414 (sparc_ip): Rewrite architecture match and bump logic.
2418 * configure.in: Check for 'do not mix' from native linker before
2419 trying to use -rpath.
2420 * configure: Rebuild.
2424 * config/obj-coff.h (SF_ADJ_LNNOPTR): Define (non BFD_ASSEMBLER).
2425 (SF_GET_ADJ_LNNOPTR): Define (non BFD_ASSEMBLER).
2426 (SF_SET_ADJ_LNNOPTR): Define (non BFD_ASSEMBLER).
2427 * config/obj-coff.c (obj_coff_endef): Set ADJ_LNNOPTR when LNNOPTR
2429 (w_symbols): If ADJ_LNNOPTR is set, add the section lnnoptr field
2430 to the symbol lnnoptr field, to get the correct file offset.
2434 * config/obj-elf.c (elf_frob_symbol): On the PowerPC, force all
2435 symbols that are not function, file, or section symbols to be
2440 * configure: Set and substitute RPATH_ENVVAR.
2441 * configure: Rebuild.
2442 * Makefile.in (RPATH_ENVVAR): New variable.
2443 (check): Use $(RPATH_ENVVAR) rather than LD_LIBRARY_PATH.
2446 doesn't need opcodes. If configuring shared, opcodes needs bfd.
2447 * configure: Rebuild.
2451 * read.c (s_mri_sect): Don't return '\0' in type. Set all
2452 appropriate flags in BFD section.
2454 * configure.in (m68k-*-psos*): New target.
2455 * configure: Rebuild.
2456 * config/te-psos.h: New file.
2457 * config/tc-m68k.c (comment_chars): Don't include '#' if TE_PSOS
2463 * configure.in: Remove duplicate setting of cpu_type. Check
2464 whether opcodes library is required for on all targets, not just
2466 * configure: Rebuild.
2468 * config/tc-mips.c (mips_big_got): New static variable.
2469 (s_extern): Don't declare.
2470 (reg_needs_delay): New static function.
2471 (macro_build): Permit GOT/CALL_HI/LO relocs.
2472 (macro_build_lui): If place is not NULL, use the number in the
2474 (load_address): Handle mips_big_got case.
2475 (macro): Handle mips_big_got for M_LA_AB, M_JAL_A, and load and
2477 (OPTION_XGOT): Define.
2478 (md_longopts): Add "xgot" if OBJ_ELF.
2479 (md_parse_option): Handle -xgot.
2480 (md_show_usage): Mention -xgot.
2481 (md_apply_fix): Permit GOT/CALL_HI/LO relocs.
2482 (tc_gen_reloc): Handle GOT/CALL_HI/LO relocs.
2486 * config/tc-m68k.c (m68k_ip) [operand kind '#']: When fixing
2487 the byte relocation, point it to the low byte of the word.
2491 * configure.in: Set HDLFLAGS for *-*-hpux with --enable-shared.
2492 * configure: Rebuild.
2496 * configure.in: Recognize any sparc* cpu.
2497 * configure: Regenerated.
2501 * read.c (potable): Add "mri" and ".mri".
2502 (s_mri): New function.
2503 * read.h (s_mri): Declare.
2504 * app.c (scrub_m68k_mri): New static variable.
2505 (mri_pseudo): New static variable.
2506 (do_scrub_begin): Add m68k_mri parameter. Use it rather than
2507 flag_m68k_mri. Initialize scrub_m68k_mri.
2508 (mri_state, mri_last_ch): New static variables.
2509 (struct app_save): Add scrub_m68k_mri, mri_state, and mri_last_ch
2511 (app_push): Save new fields.
2512 (app_pop): Restore new fields.
2513 (do_scrub_chars): Check scrub_m68k_mri rather than flag_mri_mri.
2514 If TC_M68K, use a trivial state machine to look for occurrences of
2515 the .mri pseudo-op, and change the mode appropriately.
2516 * as.h (do_scrub_begin): Update prototype.
2517 * input-scrub.c (input_scrub_begin): Pass flag_m68k_mri to
2519 * config/tc-m68k.c (reg_prefix_optional_seen): New static
2521 (m68k_mri_mode_change): New function.
2522 (md_parse_option): Set reg_prefix_optional_seen.
2523 * config/tc-m68k.h (m68k_mri_mode_change): Declare.
2524 (MRI_MODE_CHANGE): Define.
2525 * doc/as.texinfo: Document .mri pseudo-op.
2527 * app.c (do_scrub_chars): In MRI mode, don't treat '#' as a
2532 Support for OBJ_ELF on m68k, mostly inside #ifdef OBJ_ELF:
2533 * config/m68k-parse.h (enum pic_relocation): Define.
2534 (struct m68k_exp): Add pic_reloc field.
2535 * config/tc-m68k.h (TC_RELOC_RTSYM_LOC_FIXUP): Define.
2536 (tc_fix_adjustable): Define to call tc_m68k_fix_adjustable.
2537 (NO_RELOC): Define to BFD_RELOC_NONE if BFD_ASSEMBLER, to zero
2539 * config/tc-m68k.c: Delete definition of NO_RELOC.
2540 (struct m68k_it): Add pic_reloc field.
2541 (add_fix): Copy over pic_reloc field.
2542 (md_pseudo_table): Interpret .align parameter as byte count.
2543 (mote_pseudo_table): Likewise.
2544 (tc_m68k_fix_adjustable): New function.
2545 (get_reloc_code): New function.
2546 (md_assemble): Use it as last argument to fix_new_exp.
2547 (md_apply_fix_2): For a relocation against a symbol don't put the
2548 addend into the data.
2549 (tc_gen_reloc): Different addend computation for OBJ_ELF.
2550 (m68k_ip): Don't relax an operand that requires pic relocation.
2551 (md_begin): Align .text, .data and .bss on 4 byte boundary by
2553 * write.c (fixup_segment): Don't add symbol value to addend if
2554 TC_M68K and OBJ_ELF.
2555 * config/m68k-parse.y (yylex): Handle @PLTPC, etc.
2556 (motorola_operand): Add rule for `(zapc, EXPR)'.
2560 * ecoff.c (ecoff_directive_weakext): Fixed so that whitespace
2561 *really* is permissible before the comma.
2565 * config/tc-sh.c (sh_do_align): Align to a 2 byte boundary before
2566 inserting nop instructions.
2570 * config/te-aux.h: Change include of aux.h to aux-coff.h.
2574 * config/tc-i960.c (tc_coff_symbol_emit_hook): Correct storage
2575 class setting for a CALLNAME symbol in COFF.
2577 * read.c (potable): Pass negative numbers for new .balign[wl] and
2578 .p2align[wl] pseudo-ops.
2579 (s_align_bytes): Treat a negative argument as specifying the fill
2581 (s_align_ptwo): Likewise.
2585 * read.c (potable): Add balignw, balignl, p2alignw, and p2alignl.
2586 (do_align): Take new len parameter. Change all callers. Pass it
2588 (s_align_bytes): Arg now indicates the length of the fill pattern.
2589 (s_align_ptwo): Likewise.
2590 * config/obj-coff.c (write_object_file): Pass length to
2592 * config/tc-i386.h (md_do_align): Take new len parameter.
2593 * config/tc-m88k.h (md_do_align): Likewise.
2594 * config/tc-m88k.c (m88k_do_align): Likewise.
2595 * config/tc-sh.h (md_do_align): Likewise.
2596 * config/tc-sh.c (sh_do_align): Likewise.
2597 * doc/as.texinfo: Document new pseudo-ops.
2599 * config/obj-coff.c (fixup_mdeps): Divide offset by fr_var, as is
2600 done in cvt_frag_to_fill.
2602 * config/tc-sh.h (sh_do_align): Declare.
2603 (md_do_align): Define.
2604 * config/tc-sh.c (sh_do_align): New function.
2606 * ecoff.c (ecoff_build_lineno): Don't try to store the address
2607 difference if the next address is before the current one.
2609 * config/tc-m68k.c (struct m68k_cpu): Add alias field.
2610 (archs): Initialize new field.
2611 (m68k_ip): Don't list alias names when listing CPUs which support
2614 * as.c (main): Call parse_args before read_begin.
2615 * app.c (do_scrub_chars): If flag_m68k_mri, don't put a dot in
2616 front of generated pseudo-ops.
2617 * read.c (potable): Ignore "name".
2618 (s_app_file): Permit a single quote after the string, since one
2619 may appear in m68k MRI mode.
2621 * configure.in: Check for --enable-shared. If linking against
2622 shared BFD and opcodes, fix library name on SunOS, and try to set
2624 * configure: Rebuild.
2628 * as.h (flag_m68k_mri): Declare.
2629 * as.c (parse_args): If TC_M68K, set flag_m68k_mri for -M.
2630 * Many files: For MRI syntax that is specific to the m68k MRI
2631 assembler, check flag_m68k_mri rather than flag_mri or
2632 MRI_MODE_NEEDS_PSEUDO_DOT.
2636 * config/tc-i960.c (ARCH_HX): Define.
2638 (targ_has_sfr): Handle ARCH_HX.
2639 (targ_has_iclass): Handle ARCH_HX.
2640 (tc_coff_fix2rtype): Add return 0 to avoid warning.
2641 (tc_headers_hook): If the architecture was specified explicitly,
2642 use it when setting the flags. Set the extern variable coff_flags
2643 rather than headers->filehdr.f_flags, since the latter is set
2644 unconditionally in obj-coff.c.
2645 (i960_handle_align): Remove unused variable fixp.
2647 Support for building bfd and opcodes as shared libraries, based on
2649 * configure.in: Set OPCODES and BFD to search directories.
2650 Substitute OPCODES_DEP and BFDDEP. On SunOS, set HLDFLAGS.
2651 * configure: Rebuild.
2652 * Makefile.in (LDFLAGS, HLDFLAGS): New variables.
2653 (LIBDEPS): New variable.
2654 (as.new0: Depend upon $(LIBDEPS) rather than $(LIBS). Use
2655 $(HLDFLAGS) in link.
2656 (check): Set LD_LIBRARY_PATH in the environment.
2660 * config/tc-ppc.h (ELF_TC_SPECIAL_SECTIONS): Make .sdata2, .sbss2,
2661 .PPC.EMB.sdata0, and .PPC.EMB.sbss0 sections all default to
2662 read-only, not read/write.
2666 * Makefile.in (INSTALL_XFORM): Remove -e.
2670 * write.c (write_relocs): Use S_IS_DEFINED and S_IS_COMMON rather
2671 than comparing S_GET_SEGMENT to undefined_section.
2672 (write_object_file): Skip symbols which were equated to an
2673 undefined or common symbol.
2674 * symbols.c (resolve_symbol_value): Use S_IS_DEFINED and
2675 S_IS_COMMON rather than comparing S_GET_SEGMENT to
2677 (S_GET_VALUE): Likewise. Avoid recursion problems if S_IS_DEFINED
2678 or S_IS_COMMON call S_GET_VALUE.
2679 * config/obj-aout.h (S_IS_COMMON): Define if not BFD_ASSEMBLER.
2680 * config/obj-aout.c (obj_emit_relocations): If a reloc is equated
2681 to an undefined or common symbol, convert the reloc to be against
2683 (obj_crawl_symbol_chain): Skip symbols which were equated to an
2684 undefined or common symbol.
2685 * config/obj-bout.h (S_IS_COMMON): Define if not BFD_ASSEMBLER.
2686 * config/obj-bout.c (obj_emit_relocations): If a reloc is equated
2687 to an undefined or common symbol, convert the reloc to be against
2689 (obj_crawl_symbol_chain): Skip symbols which were equated to an
2690 undefined or common symbol.
2691 * config/obj-coff.c (do_relocs_for): Use S_IS_DEFINED and
2692 S_IS_COMMON rather than comparing S_GET_SEGMENT to
2694 (yank_symbols): Skip symbols which were equated to an undefined or
2699 * config/obj-aout.h (S_IS_LOCAL): Check for \002 as well as \001.
2700 * config/obj-bout.h (S_IS_LOCAL): Likewise.
2702 * configure.in: Make sure we only add m68k-parse.o to
2703 ${extra_objects} once, no matter how many m68k targets have been
2705 * configure: Rebuild.
2709 * configure.in (i386-*-cygwin32, ppc-*-cygwin32): New.
2710 * configure: Rebuild.
2714 * config/tc-m68k.c (md_pseudo_table): Add "extend" and "ldouble".
2715 * doc/c-m68k.texi: Document .extend and .ldouble.
2717 * configure.in (m68*-apple-aux*): New target.
2718 * config/te-aux.h: New file.
2719 * config/obj-coff.c (compare_external_relocs): New static function
2721 (do_relocs_for): Sort relocs if TE_AUX.
2722 (fixup_segment): If TE_AUX, store common symbol value in segment.
2723 * config/tc-m68k.h (TARGET_FORMAT): Define if TE_AUX.
2727 * config/obj-coff.h (S_IS_LOCAL): Check for \002 as well as \001.
2729 * config/tc-mips.c (s_mips_globl): Set BSF_OBJECT if it is not
2731 (s_cpload): Set BSF_OBJECT for _gp_disp symbol.
2732 * read.c (s_lcomm): If S_SET_SIZE is defined, set the size of the
2734 * ecoff.c (add_procedure): Set the BSF_FUNCTION flag.
2735 (ecoff_build_symbols): If S_SET_SIZE is defined, set the size of
2736 an undefined symbol and the size of a function symbol.
2737 * config/obj-elf.c (elf_frob_symbol): If TC_MIPS, set BSF_OBJECT
2738 for all common symbols.
2742 * config/tc-i960.c (parse_memop): In MRI mode, don't use implicit
2745 * expr.c (operand): Accept 0x hex constants in MRI mode if not on
2750 * config/obj-elf.c (obj_elf_type): Set BSF_OBJECT flag for a type
2753 * ecoff.c (localsym_t): Add addend field.
2754 (add_ecoff_symbol): Add addend argument. Change all callers.
2755 (coff_sym_value): Make static.
2756 (coff_sym_addend): New static variable.
2757 (ecoff_directive_def): Initialize coff_sym_addend.
2758 (ecoff_directive_val): Accept symbol + constant.
2759 (ecoff_directive_endef): Pass coff_sym_addend to add_ecoff_symbol.
2760 (ecoff_build_symbols): Include the addend in the symbol value.
2764 * config/tc-ppc.c (md_assemble): Ignore overflow on
2765 BFD_RELOC_16_GOTOFF and BFD_RELOC_PPC_TOC16.
2769 * config/tc-ppc.c (md_apply_fix3): SDA21 relocations are now 4
2770 bytes in size, so offset appropriately in big endian mode when
2771 writing the bottom 2 bytes.
2775 * config/tc-sparc.c (default_compatible): New static local.
2776 (md_begin): Initialize it. Rewrite warn_on_bump handling.
2777 (sparc_ip): If no architecture or -bump specified, don't mark as
2778 mismatched those in default_compatible.
2783 * configure.in (i386-*-sco*elf*): Use fmt elf, targ sco5.
2784 * configure: Rebuild.
2785 * config/sco5.mt: New file; set TDEFINES to -DSCO_ELF.
2786 * config/tc-i386.c (sco_id): New function, if SCO_ELF.
2787 * config/tc-i386.h (tc_init_after_args): Define if SCO_ELF.
2788 (sco_id): Declare if SCO_ELF.
2792 * config/tc-sparc.c (initial_architecture,can_bump_v9_p): Deleted.
2793 ({max,warn_after}_architecture): New static locals.
2794 (md_begin): Replace NUMOPCODES with sparc_num_opcodes.
2795 If both architecture and -bump requested, set max_architecture to max.
2796 (sparc_md_end): Simplify.
2797 (sparc_ip): Replace references to can_bump_v9_p with max_architecture.
2798 Rewrite code to bump architecture and check for conflicts.
2799 (md_longopts): Recognize -xarch={v8plus,v8plusa} for compatibility
2800 with Solaris assembler.
2801 (md_parse_option): Likewise. Call sparc_opcode_lookup_arch.
2802 (md_show_usage): Update.
2806 * Makefile.in (RUNTEST): Fix reference to $${srcdir}.
2810 * config/tc-sparc.h (TARGET_FORMAT): Use #ifdef SPARC_ARCH64 instead of
2811 #ifdef sparcv9 when choosing value.
2814 (sparc_md_end): Declare.
2815 * config/tc-sparc.c (SPARC_V9): Renamed from sparcv9.
2816 (initial_architecture): New static local.
2817 (can_bump_v9_p): Likewise.
2818 (NO_V9): Delete all occurrences.
2819 (sparc_md_end): New function.
2820 (sparc_ip): New local v9_arg_p. Rework fp reg number test.
2821 Don't bump architecture to v9 unless can_bump_v9_p set.
2822 (md_parse_option): -A<arch> passed, set can_bump_v9_p accordingly.
2823 * configure.in (sparc64 target cpu): Don't set obj_format here.
2824 (SPARC_V9): Renamed from sparcv9.
2825 (sparc64-*-elf*): Define SPARC_ARCH64.
2826 * configure: Regenerated.
2827 * acconfig.h (SPARC_V9): Renamed from sparcv9.
2828 (SPARC_ARCH64): Add.
2829 * conf.in: Regenerated.
2830 * config/vmsconf.h: Update.
2834 * config/tc-mips.c (load_register): Optimise "dli" loads.
2835 (md_show_usage): add "-mcpu=vr4100" to help text.
2839 * symbols.c (resolve_symbol_value): If a symbol is equated to an
2840 undefined symbol, preserve the X_op of O_symbol.
2841 (S_GET_VALUE): Fix check to permit this case.
2842 * write.c (write_relocs): If a reloc is against an undefined
2843 symbol equated to another symbol, change the reloc to be against
2845 * config/obj-coff.c (do_relocs_for): Likewise.
2847 * config/tc-ppc.c (ppc_csect): An unnamed csect is storage class
2852 * config/obj-elf.c (elf/ppc.h): Include elf/ppc.h if target
2853 computer is PowerPC.
2855 * config/tc-ppc.c (md_apply_fix3): Add more embedded relocations.
2857 * config/tc-ppc.h (ELF_TC_SPECIAL_SECTIONS): Add sections
2858 mentioned in the eabi.
2862 * config/tc-ppc.c (ppc_reldata): Changed alignement on reldata_section
2863 * config/tc-ppc.c (ppc_pdata): Changed the alignment on pdata_section
2867 * config/tc-ppc.c (mapping): Add more relocation suffixes.
2871 * config/tc-ppc.c (ppc_elf_validate_fix): Allow .gcc_except_table
2872 as a section it is ok to have unadorned -mrelocatable pointers in.
2876 * config/tc-ppc.c (ppc_section*): Wrap these functions inside
2881 * config/obj-elf.c (obj_elf_section): Add hooks so machine
2882 dependent section attributes can be handled.
2884 * config/tc-ppc.h: (md_elf_section_{letter,type,word,flags}): New
2885 macros to add support for exclude section flag and ordered section
2888 * config/tc-ppc.c (ppc_elf_section_{letter,type,word,flags}): New
2889 functions to add support for exclude section flag and ordered
2894 * subsegs.c (section_symbol): Don't try to look up the section
2895 symbol in the hash table. It should be possible to have a symbol
2896 with the same name as a section, but no connection to it.
2898 * read.c (cons_worker): Only call mri_comment_end from flag_mri.
2901 * expr.c (operand): Skip whitespace after a close parenthesis.
2906 * config/tc-sh.c (md_apply_fix): Call as_bad_where instead of
2907 as_warn_where for relocation overflow.
2908 (parse_reg): Accept register name only if next character is
2913 * ecoff.c (ecoff_stab): Simplify. Correctly handle sym + offset
2914 addresses for static variables.
2918 * config/tc-ppc.c (mapping): Make @got give a real GOT relocation,
2919 and xgot give the old toc16 relocation.
2920 (md_apply_fix3): Support all GOT relocations.
2924 * config/tc-mips.c (load_address): Correctly handle a constant in
2929 * config/tc-sh.c (parse_reg): Recognize SH3 registers.
2930 (get_specific): Handle A_SSR, A_SPC and A_REG_B.
2931 (build_Mbytes): Handle REG_B.
2935 * ecoff.c (ecoff_build_aux): Use new bfd_big_endian macro.
2939 * mpw-make.sed: If linking, edit ALL_CFLAGS to CFLAGS.
2943 * config/obj-coff.c (write_object_file): Set the s_align field to
2944 the number of bytes, rather than to the power of 2.
2948 * Makefile.in (DISTCLEAN_HERE): New variable.
2949 (distclean): Use it.
2950 (maintainer-clean): Depend upon clean-here rather than clean,
2951 distclean, and clean-info. Run make maintainer-clean in doc.
2952 Remove files listed in DISTCLEAN_HERE.
2953 * doc/Makefile.in (maintainer-clean realclean): Split out from
2954 distclean. Depend upon clean-info and distclean.
2958 * mac-as.r: Fix copyright and version strings.
2959 (cfrg): Use PROG_NAME instead of literal name.
2963 * read.c (read_a_source_file): If tc_unrecognized_line is defined,
2965 * config/tc-a29k.h (tc_unrecognized_line): Define.
2966 * config/tc-a29k.c (a29k_unrecognized_line): New function.
2967 (md_operand): Handle a29k style local dollar labels.
2971 * config/obj-multi.h: If OBJ_MAYBE_ELF, define OBJ_SYMFIELD_TYPE.
2975 * read.c (s_fill): If md_flush_pending_output is defined, call
2980 * config/obj-coff.c (size_section, fill_section, fixup_mdeps):
2981 Treat rs_align_code like rs_align.
2985 * config/tc-arm.c (cp_address_required_here): Set pre_inc when
2986 converting an absolute address into a PC-relative one.
2990 * mpw-config.in: Don't always use te-generic.h for emulation.
2991 (powerpc-apple-macos): Use emulation te-macos.h.
2993 (mips-gm-magic): New configuration.
2995 * mpw-make.sed (install, install-only): Edit in Mac-specific
3000 * configure.in: Improve message about unsupported ELF targets.
3001 * configure: Rebuild.
3003 * config/tc-m88k.c (m88k_do_align): Correct check for whether fill
3004 pattern is zero. From Manfred Hollstein.
3008 * config/tc-ppc.c (ppc_pe_section): To get the alignment right for
3009 the various idata sections, we check the name on the .section pseudo.
3013 * config/obj-coff.c (fixup_segment): If TC_M88K is defined, do not
3014 add section's paddr to add_number; compatibility to native as and
3019 * configure.in: Treat m68k-sysv4 like m68k-elf, not m68k-sysv3.
3021 * hash.c (struct hash_entry): Moved here...
3022 * hash.h (struct hash_entry): ...from here.
3024 * config/obj-elf.c (elf_frob_symbol): Don't free and clear sy_obj
3025 if it's already known to be null.
3029 * config/tc-ppc.c (md_apply_fix3): Don't adjust the value for 32
3030 bit relocs converted to PC relative relocs. This turned out to
3031 add the offset from the beginning of .text twice.
3035 * stabs.c (s_stab_generic): In 's' case, free string from
3038 * config/obj-elf.h (ELF_TARGET_SYMBOL_FIELDS): Remove unused field
3040 * config/obj-multi.h (ELF_TARGET_SYMBOL_FIELDS) [OBJ_MAYBE_ELF]:
3043 * subsegs.h (segment_info_type): Make bitfields unsigned.
3045 * expr.h (struct expressionS): Make X_op and X_unsigned bitfields,
3046 and move them together. On most systems this will reduce the
3047 structure size by one word.
3048 (operatorT): Define O_max.
3049 * expr.c (expr_begin): Verify that X_op is wide enough to hold
3052 * read.c (pop_insert): Print error returned by hash table
3055 * as.c (dump_statistics): Split out from main; dump some hash
3056 table stats and target-specific stats.
3057 (start_time): No longer automatic to main.
3058 (main): Set file-level start_time and call dump_statistics at
3059 exit. Exit by calling xexit.
3060 (show_usage): Make --statistics description less specific.
3061 * subsegs.c (subsegs_print_statistics): New function.
3062 * write.c (write_print_statistics): New function.
3063 (n_fixups): New static variable.
3064 (fix_new_internal): Increment it.
3065 * read.c (read_print_statistics): New function.
3066 * read.h (read_print_statistics): Declare.
3067 * symbol.c (symbol_print_statistics): New function.
3068 * symbol.h (symbol_print_statistics): Declare.
3069 * hash.c (hash_print_statistics): New function.
3070 * hash.h (hash_print_statistics): Declare.
3071 * config/tc-i386.c (i386_print_statistics): New function.
3072 * config/tc-i386.h (i386_print_statistics): Declare.
3073 (tc_print_statistics): New macro.
3074 * messages.c (as_fatal, as_assert, as_abort): Use xexit, not
3077 * hash.c (DELETED): Rewrite to use a valid but unique address.
3078 (START_POWER): Reduce to 10.
3079 (enum stat_enum): New enumerator, replacing STAT_* index macros.
3080 Add new values for counting strcmp calls.
3081 (GROW_FACTOR): New macro.
3082 (hash_grow): Use GROW_FACTOR. Rewrite for quick returns instead
3084 (FULL_VALUE): New macro. Use 1/4 of table size instead of 1/2.
3085 (hash_new): Use FULL_VALUE.
3086 (struct hash_control): Definition moved here.
3087 (hash_code): Don't mask to low bits.
3088 (hash_ask): Mask returned hash code here. Check hash value before
3089 calling strcmp; count strcmp calls.
3090 * hash.h (struct hash_control): Declare, don't define, here.
3091 (HASH_STATLENGTH): Deleted.
3092 (struct hash_entry): Add field for hash code.
3093 (hash_say, hash_apply): Don't declare.
3095 * hash.c (destroy): Return void.
3096 (applicatee): Ditto.
3097 (main): Fix declarations.
3098 (hash_apply): Return void. Argument `function' returns void. Put
3099 inside "#ifdef TEST".
3100 (hash_say): Define only if TEST is defined.
3101 * hash.h (hash_apply, hash_say): Declarations deleted.
3105 * configure: Rebuild with autoconf 2.7.
3109 * aclocal.m4 (AC_PROG_CC): Remove local definition.
3110 * configure: Rebuild with autoconf 2.6.
3114 * config/tc-ppc.c (ppc_debug_name_section_size): Remove.
3115 (ppc_stabx): Don't increment ppc_debug_name_section_size.
3117 (ppc_frob_file): Remove.
3118 * config/tc-ppc.h (tc_frob_file): Don't define.
3119 (ppc_frob_file): Don't declare.
3123 * Makefile.in (TARG_CPU_DEP_alpha): Mention alpha-opcode.h.
3124 * config/alpha-opcode.h: Include one-operand variants of jmp and
3127 * config/te-delt88.h: Renamed from te-delta88.h, to avoid conflict
3128 with te-delta.h in 8.3 file systems.
3129 * configure.in: Adjusted.
3133 * config/tc-mips.c (s_err): Remove; just use the one in read.c.
3135 * config/m68k-parse.y (yylex): In MRI mode, '@' can start an octal
3137 * expr.c (operand): Handle MRI suffixes after unadorned 0.
3141 Version 2.6 released.
3142 * Makefile.in (VERSION): Updated to 2.6.
3144 * config/obj-coff.c (write_object_file): Change use of md_do_align
3145 to pass a pointer rather than a fill value, to match other uses.
3149 * config/tc-ns32k.h (TC_FIX_TYPE): Add missing semicolon.
3151 * as.c (main): Move md_end call to just after call to
3152 perform_an_assembly_pass. Delete cpu-specific code here.
3153 * config/tc-i960.h (md_end): New macro, calls brtab_emit.
3154 * config/tc-arm.c (md_end): Unused function deleted.
3155 * config/tc-ns32k.c (md_end): Ditto.
3157 * config/tc-i386.c (i386_align_code): New function, moved here
3158 from HANDLE_ALIGN macro.
3159 * config/tc-i386.h (HANDLE_ALIGN): Call it.
3163 * config/tc-i386.h (md_do_align): cast fill and 0x90 to char
3168 * config/tc-i386.h (md_do_align): Make ".align n,0x90" generate
3169 multi-byte nops to avoid changing gcc. The necessary gcc change
3170 might break old assemblers.
3174 * config/tc-i386.h (md_do_align, HANDLE_ALIGN): Add macros to
3175 generate optimal multi-byte nop instructions for ".align n"
3176 ".align n,0x90", and aligns requiring more than 15 bytes of
3177 padding still generate multiple 0x90's as before.
3181 * config/tc-m68k.c (s_mri_until): Call pop_mri_control.
3185 * configure.in (ppc-*-macos*, ppc-*-mpw*): New configurations.
3186 * configure: Update.
3187 * mpw-make.sed: Reorder commands to make sed happier.
3188 * config/te-macos.h: New file.
3189 * config/tc-ppc.h (TARGET_FORMAT): Set correctly for PowerMac.
3193 * config/tc-hppa.c (pa_ip): Fix off-by-2 bug in length check for
3194 conditional branches.
3195 (md_apply_fix): Likewise.
3199 * config/tc-a29k.c (md_apply_fix): Warn if an attempt is made to
3200 generate a reloc which the linker will not handle correctly. Fix
3201 overflow checking--R_IREL is 18 bits, not 17.
3205 * config/obj-coff.c (fixup_segment): Don't subtract md_pcrel_from
3206 from a PC relative reloc if TC_A29K.
3208 * config/tc-a29k.c (line_separator_chars): Restore '@'. Existing
3209 code depends upon it.
3211 * config/tc-a29k.c (md_operand): Handle $float, $double, and
3212 $extend. Based on code from Eric Freudenthal
3214 * config/tc-a29k.h (LEX_DOLLAR): Define.
3215 * read.c (LEX_DOLLAR): Define if not defined.
3216 (lex_type): Use LEX_DOLLAR.
3220 * configure.in (a29k-nyu-sym1): New target, just like other a29k
3225 * config/obj-coff.c (c_dot_file_symbol): Cast xmalloc return.
3229 * config/tc-ppc.c (md_apply_fix3): Added BFD_RELOC_RVA. Currently
3230 used only by "dlltool.c".
3234 * config/tc-alpha.c: Undefine inline if not __GNUC__.
3235 (md_pseudo_table): Don't define "extern".
3239 * config/tc-ppc.c (ppc_biei): Force symbol into text_section.
3241 * config/tc-ppc.c (md_show_usage): Put backslash at end of line.
3245 * macro.c (macro_expand_body): Don't warn about == with a
3246 nonexistent parameter, in case it is in a comment field.
3248 * as.c (main): On TC_A29K, call macro_init with macro_alternate
3250 * macro.c (get_any_string): Don't keep quotes if macro_strip_at is
3251 set, even if macro_alternate is set.
3252 (get_apost_token): If macro_strip_at, only skip kind if it is '@'.
3253 (sub_actual): If macro_strip_at, and kind is '@', don't look up
3254 the token unless it ended in '@'.
3255 * config/tc-a29k.c (line_separator_chars): Remove '@'.
3256 * doc/c-a29k.texi: Document macro usage on A29K.
3260 * config/tc-m68k.c (m68k_ip): Handle new 'W' place, meaning a
3262 (install_operand): Likewise.
3264 * config/obj-elf.c (ecoff_debug_pseudo_table): Add "extern".
3268 * configure.in (m88k-motorola-sysv*): New target.
3269 * configure: Rebuild.
3270 * config/te-delta88.h: New file.
3271 * config/obj-coff.c (write_object_file): Use md_do_align if it is
3273 * config/tc-m88k.h (SUB_SEGMENT_ALIGN): Define.
3274 (md_do_align): Define.
3275 * config/tc-m88k.c: Include "subsegs.h".
3276 (m88k_do_align): New function.
3278 * config/te-delta.h (STRIP_UNDERSCORE): Don't define.
3279 (COFF_NOLOAD_PROBLEM): Define.
3280 (LOCAL_LABELS_DOLLAR, LOCAL_LABELS_FB): Define.
3284 * config/tc-i386.c (md_assemble): For a jump instruction with
3285 non-constant target, require 7 available bytes in the current
3290 * config/obj-elf.h: Include bfd/elf-bfd.h rather than
3295 * configure.in (alpha-*-linux*): Use ecoff.
3296 * configure: Rebuild.
3297 * ecoff.c (ecoff_directive_extern): New function.
3298 (ecoff_directive_weakext): New function.
3299 (ecoff_build_symbols): Handle weak symbols.
3300 (ecoff_setup_ext): Likewise.
3301 (ecoff_frob_symbol): Warn about weak common symbols.
3302 * ecoff.h (ecoff_directive_extern): Declare.
3303 (ecoff_directive_weakext): Declare.
3304 * symbols.c (S_IS_WEAK): New function.
3305 * symbols.h (S_IS_WEAK): Declare.
3306 * config/obj-ecoff.c (obj_pseudo_table): Add "extern" and
3308 * config/tc-mips.c (mips_pseudo_table): Remove "extern".
3313 * config/tc-ppc.c (ppc_lglobl): Do the right thing.
3315 * config/tc-ppc.c (ppc_bb): Call SF_SET_PROCESS.
3316 (ppc_eb): Likewise. Set the storage class to C_BLOCK, not C_FCN.
3317 (ppc_frob_symbol): Don't change C_BLOCK symbols to C_HIDEXT.
3318 * config/obj-coff.c (coff_frob_symbol): Don't call
3319 SA_SET_SYM_ENDNDX with the current symbol; call it with the next
3320 one. If OBJ_XCOFF, try to figure out whether the symbol is going
3323 * config/tc-ppc.c (md_pseudo_table): Add "bc" and "ec".
3324 (ppc_stab_symbol): New static variable.
3325 (ppc_change_csect): Check that ppc_toc_csect is not NULL.
3326 (ppc_stabx): Set ppc_stab_symbol around call to symbol_make. Set
3327 sy_tc.real_name to the stab string.
3328 (ppc_bc, ppc_ec): New static functions.
3329 (ppc_canonicalize_symbol_name): If ppc_stab_symbol is set, don't
3331 (ppc_symbol_new_hook): If ppc_stab_symbol is set, don't look for a
3333 (ppc_frob_symbol): Set BSF_NOT_AT_END for symbols with csect aux
3336 * input-scrub.c (input_scrub_push): Reset sb_index.
3340 * listing.c (listing_newline): Don't create a frag in the absolute
3345 * config/tc-ppc.c (md_pseudo_table): Add "data" and "text".
3346 (ppc_csect): Move most of the code to ppc_change_csect, and call
3348 (ppc_change_csect): New static function, taken from ppc_csect.
3349 (ppc_section): New static function.
3350 (ppc_saw_abs): New static varable.
3351 (ppc_frob_symbol): Create aux entry for absolute symbols. Warn if
3352 a symbol has no csect.
3353 (ppc_adjust_symtab): New function.
3354 * config/tc-ppc.h (tc_adjust_symtab): Define if OBJ_XCOFF.
3355 (ppc_adjust_symtab): Declare if OBJ_XCOFF.
3357 * write.c (write_object_file): If tc_adjust_symtab is defined,
3358 call it just before the call to obj_adjust_symtab.
3360 * symbols.c (symbol_find_or_make): Change name to be const.
3361 * symbols.h (symbol_find_or_make): Update declaration.
3365 * doc/as.texinfo (Align): Mention SH.
3366 * doc/c-m68k.texi (M68K-Directives, .even): Describe behavior, not
3368 * doc/c-z8k.texi (Z8000 Directives, global): Fix minor typo.
3369 (Z8000 Directives, even): Don't give numeric align value, instead
3374 * tc-arm.c (do_ldst): Assemble ldr/str r0, [r1] as a pre-increment
3379 * Makefile.in (diststuff): Also make info.
3380 (maintainer-clean realclean): Also make clean-info.
3384 * config/tc-hppa.c (md_pseudo_table): Add new ".nsubspa" opcode.
3385 (pa_subspace): For ".nsubspa", always create a new subspace
3386 with the given attributes, even if one already exists with the
3391 * config/tc-ppc.h (TC_FORCE_RELOCATION_SECTION): Rename from
3392 TC_FORCE_RELOCATION, taking an additional section argument. If
3393 the section of the target symbol is not the same as the current
3394 section, always force the relocation to be used.
3395 (MD_PCREL_FROM_SECTION): New macro to call md_pcrel_from_section.
3397 * config/tc-ppc.c (md_pcrel_from_section): Rename from the
3398 md_pcrel_from function, taking an additional section argument.
3399 Invoke TC_FORCE_RELOCATION_SECTION instead of TC_FORCE_RELOCATION.
3401 * write.c (TC_FORCE_RELOCATION_SECTION): Define in terms of the
3402 older TC_FORCE_RELOCATION if not defined.
3403 (MD_PCREL_FROM_SECTION): If not defined, invoke md_pcrel_from.
3404 (fixup_segment): Use MD_PCREL_FROM_SECTION instead of
3405 md_pcrel_from, and TC_FORCE_RELOCATION_SECTION instead of
3406 TC_FORCE_RELOCATION.
3410 * input-scrub.c (as_where): Set name to null pointer if we don't
3412 * messages.c (identify): Only print filename if non-null.
3413 (as_show_where): Ditto, for line number too.
3414 (as_warn_internal, as_bad_internal): Ditto.
3416 * input-file.c (input_file_open): If the input file can't be
3417 opened, consider it an error.
3421 * config/tc-mips.c: Added mips_4100 control, and support for
3422 accepting the 4100 as a MIPS architecture variant (md_begin,
3423 macro_build, mips_ip, md_parse_option). Adding suitable
3424 command-line OPTIONs, and updating the help text (md_show_usage).
3428 * subsegs.c (subseg_begin): Only set absolute_frchain.fix_* when
3429 BFD_ASSEMBLER is defined.
3431 * Use one active frag and one obstack per frag chain:
3432 * frags.c (frags): Variable deleted.
3433 (frag_alloc): New function.
3434 (frag_grow, frag_more, frag_variant, frag_now_fix,
3435 frag_append_1_char): Refer to frchain_now->frch_obstack instead of
3437 (frag_new): Ditto. Verify that frch_last and frag_now match on
3438 entry and exit, and that old frag_now has non-zero type. Replace
3439 "know" uses with "assert". Use frag_alloc instead of mucking with
3441 * frags.h (frags): Declaration deleted.
3442 * subsegs.h (struct frchain): Add new field frch_frag_now.
3443 * subsegs.c (frchains, dummy_frag, absolute_frchain): New static
3445 (subsegs_begin): Initialize frchains obstack. Under gcc, don't
3446 give it any stricter alignment than frchainS structures need. Do
3447 not initialize frags obstack. Set frag_now to point to
3448 dummy_obstack. Initialize absolute_frchain.
3449 (subseg_set_rest): Save and restore frag_now in frch_frag_now
3450 field of frchainS. Don't create new frags on section switch, and
3451 use frag_alloc when creating a new frag chain. For absolute
3452 section, set frchain_now to absolute_frchain. Verify that
3453 frch_last and frag_now match on entry and exit. Initialize
3454 per-chain obstack, and under gcc, set required alignment to that
3455 needed by fragS structure.
3457 * write.c (chain_frchains_together_1): Verify fr_type is nonzero.
3459 * stabs.c (get_stab_string_offset): Only copy input string if a
3460 fresh copy is needed, not if the section already exists.
3461 (s_stab_generic): Cache stab section name to bypass lookups, since
3462 usually it will match. Could be made faster still by changing the
3463 memory allocation rules.
3464 (s_xstab): Cache section name to bypass repeated string
3467 * frags.c (frag_new): Deleted register declarations.
3469 * listing.c (frag_now): Don't declare.
3471 * as.c (chunksize): New variable.
3472 (debug_memory): New variable.
3473 (main): If debug_memory is set, reduce chunksize and
3475 * as.h (chunksize): Declare it.
3476 * read.c (read_begin): Use it.
3478 * config/tc-alpha.c (md_shortopts): Include 'g'.
3479 (md_parse_option): Ignore it.
3481 * Makefile.in (distclean): Remove Makefile and config.status from
3482 testsuite directory.
3483 (clean-here): Don't delete testsuite. Instead, delete only the
3484 files within it that would be generated by running tests.
3486 * config/tc-hppa.c (hppa_elf_mark_end_of_function): Call
3487 frag_now_fix instead of accessing obstack info directly.
3488 * config/tc-arm.c (s_ltorg): Ditto.
3489 (md_assemble): Ditto.
3491 * config/tc-i386.c (md_assemble): Call frag_grow instead of
3496 * stabs.c (aout_process_stab): Insert debug symbol into symbol
3497 chain after parsing value expression, if any, to avoid separating
3498 continued .stabs lines.
3502 * config/tc-mips.c (mips_elf_pseudo_table): Remove.
3503 (mips_pop_insert): Don't call pop_insert on mips_elf_pseudo_table.
3507 * config/tc-ppc.c (md_begin): Use new flags PPC_OPCODE_COMMON for
3508 -mcom support and PPC_OPCODE_ANY for -many.
3509 (md_parse_option): Ditto.
3511 (md_begin): For duplicate instructions, print all duplicates
3516 * config/tc-ppc.c (md_parse_option): Support for -mcom to turn on
3517 common mode operation.
3518 (md_show_usage): Add -mcom to usage message.
3522 * expr.c (op_rank): Add O_symbol_rva.
3523 * expr.h (operatorT): Add O_symbol_rva.
3524 * read.c (cons_worker): Set O_symbol_rva when necessary.
3525 * write.c (fix_new_exp): Understand O_symbol_rva.
3529 * config/tc-mips.c: Correct s_cons arguments. From Michael
3534 * config/tc-ppc.c (ppc_macro): Make count unsigned.
3535 (ppc_biei): Set segment to now_seg and value to coff_n_line_nos.
3536 (ppc_frob_symbol): Handle C_BINCL and C_EINCL symbols by setting
3538 * config/obj-coff.c (coff_n_line_nos): Rename from n_line_nos, and
3539 make non-static. Change all users.
3540 * config/obj-coff.h (coff_n_line_nos): Declare.
3546 * configure.in (AC_ARG_WITH(bfd-assembler)): Fix help message.
3548 * config/obj-elf.c (obj_elf_common): Convert specified byte
3549 alignment to power of two. Set size of local bss symbol.
3551 * config/tc-m68k.c (tc_gen_reloc): Fix typo in variable name.
3555 * sb.c, macro.c: Decide whether to include <string.h> or
3556 <strings.h> just as as.h does.
3560 * Makefile.in (site.exp): Fix setting of $srcdir.
3562 * config/tc-arm.c (md_atof): Fix little-endian output.
3563 * config/tc-arm.h (ARM_BI_ENDIAN): Move definition so defined for
3568 * doc/as.texinfo: Split out the NS32k family documentation,
3569 despite its being commented out for now.
3570 * doc/c-ns32k.texi: New file.
3572 * sb.c, macro.c: Include string.h.
3574 * Makefile.in (comparison): Only check *.o; we don't care if
3575 timestamps inserted by the native linker differ.
3577 * config/tc-alpha.c (alpha_align): Only fill with a no-op pattern
3578 if alignment stricter than 4 bytes is requested; in that case,
3579 align to a 4-byte boundary first.
3583 * config/obj-vms.c (VMS_RSYM_Parse): eliminate "might be used
3584 uninitialized" warning for `Max_Source_Offset'.
3588 * config/tc-ppc.c (parse_toc_entry): New function to parse [toc]
3589 qualifiers and detect errors if present.
3590 (md_assemble): Add call to parse_toc_entry. Also added some support
3591 for the [tocv] qualifier.
3592 (ppc_pe_tocd): New function to support data in the toc section.
3596 * config/tc-ppc.c (ppc_frob_symbol): Don't create an aux entry for
3601 * config/tc-m68k.c (isword): Accept all values from -65536 to
3602 +65535, so ~VAL will not be rejected.
3604 * cond.c (s_endif): Call demand_empty_rest_of_line. In MRI mode,
3605 skip characters after the pseudo-op.
3607 * read.c (get_line_sb): Don't look past buffer_limit.
3608 (s_include): In MRI mode, skip characters after the file name.
3612 * config/m68k-parse.y (m68k_reg_parse): In MRI mode, permit
3613 periods in register names.
3615 For older changes see ChangeLog.1.