3 * config/obj-coff.c: Minor formatting/stylistic changes, plus:
4 (obj_coff_section): Declare.
5 (obj_pseudo_table): Make it available only if MANY_SECTIONS.
6 (obj_symbol_to_chars) [CROSS_COMPILE]: Some attemps to make this
7 work. It still doesn't. It now fails to compile, instead of
8 silently compiling to do nothing.
9 * config/obj-coff.h (SEPARATE_STAB_SECTIONS): Define only if
11 (OBJ_PROCESS_STAB) [! MANY_SECTIONS]: New macro, just emits
14 Handle Alpha load-immediate-FP pseudo-instructions:
15 * config/alpha-opcode.h (ldif, ldig, ldis, ldit): New patterns.
16 * config/tc-alpha.c (lit8_sec, lit4_sec, lit8_sym, lit4_sym): New
18 (create_literal_section): New function.
19 (create_lita_section): Now a macro.
20 (get_lit8_offset, get_lit4_offset): New functions.
21 (maybe_set_gp): New function.
22 (select_gp_value): Call it.
23 (load_expression): Preserve addend if symbol is a section symbol.
24 (alpha_ip): Handle new operand type `F' for floating-point
25 constants; store them in .lit{4,8} sections.
26 (alpha_ip, case 'G'): Emit LITUSE relocations for symbol exprs.
28 * config/tc-i386.c (smallest_imm_type): Never return Imm1.
32 * config/obj-coffbfd.c (w_strings): Only copy strings out if
33 their symbols are going to be written.
37 * messages.c (as_perror): Declare arguments const.
38 * as.h (as_perror): Change declaration.
42 * config/tc-mips.c (load_address): When calling frag_grow, allow
43 for the (up to) two nops which may be inserted by append_insn if
49 * config/atof-ieee.c (make_invalid_floating_point_number):
50 Add cast to avoid warning from gcc.
54 * config/tc-hppa.c: Add a few casts to make HP C compiler happy.
56 * config/obj-som.c (obj_som_version, obj_som_copyright): Be
58 to handle an error from bfd_som_attach_aux_hdr.
60 * config/tc-hppa.h: Wrap ELF specific decls inside an ifdef.
64 * config/tc-alpha.c (md_atof): Omit warning about FP values.
65 (line_comment_chars): Add ! to list.
66 (md_apply_fix): Do process 32- and 64-bit relocations.
68 * config/obj-coffbfd.c (obj_coff_lcomm): Put "#if 0" around the
69 unused parts (most of the function).
70 (obj_coff_init_stab_section): Cast alloca result.
72 * configure.in (i960-*-coff, i960-*-vxworks5.*): Use coffbfd, and
74 * config/ic960coff.mt: New file.
75 * config/obj-coffbfd.h [TC_I960]: Include coff/i960.h.
76 (TARGET_FORMAT) [TC_I960]: Use coff-Intel-little.
77 * config/te-ic960.h (CROSS_COMPILE): Don't undef this. We'll
78 always build little-endian object files.
79 * config/tc-i960.c (md_reloc_size): Don't define at all if BFD or
80 BFD_ASSEMBLER is defined.
81 (mem_fmt): Since COFF doesn't handle callx relocations yet, treat
82 them like normal 32-bit relocations.
83 (md_apply_fix): For callx relocations, store zero.
84 (tc_bout_fix_to_chars): Store symbol index for all callx
85 relocations, regardless of link-relax setting.
86 (tc_coff_fix2rtype, tc_coff_sizemachdep): New functions.
87 (i960_handle_align) [! OBJ_BOUT]: If link-relax option is
88 selected, print an error message and clear it.
89 * config/tc-i960.h (BFD_ARCH, COFF_FLAGS, COFF_MAGIC,
90 TC_COUNT_RELOC, TC_COFF_FIX2RTYPE, TC_COFF_SIZEMACHDEP,
91 tc_fix_adjustable): New macros.
92 (tc_coff_fix2rtype, tc_coff_sizemachdep): Declare.
96 * config/tc-hppa.c (hppa_tc_symbol): Call PA ELF BFD version.
97 (hppa_tc_make_sections): Likewise.
98 (pa_build_symextn_section): Delete unused function.
99 (hppa_tc_make_symextn_section): Likewise.
100 (pa_export): Delete call to pa_build_symextn_section.
102 * config/tc-hppa.h (hppa_tc_symbol): Add extern decl.
103 (elf_hppa_final_processing): Delete extern decl.
104 (hppa_tc_symbol): Delete extern decl.
108 * config/obj-coffbfd.c (fill_section): Correct test for whether to
113 * configure.in: Don't require version number for i386-*-mach.
115 * read.c (potable): Added ".this_GCC_requires_the_GNU_assembler",
116 which is ignored by gas, but will cause other assemblers to choke.
117 Intended for use by gcc ports that require gas instead of native
122 * config/ho-hppaosf.h: Fix braino in test for ANSI-C.
126 * write.c (write_contents): Give the user a reasonable error
127 message rather than "assertion failed" if bfd_set_section_contents
132 * config/ho-mach3.h: New file.
136 * ecoff.c (ecoff_build_debug): Don't set hdr->magic here. It is
137 now set in bfd/ecofflink.c:ecoff_write_symhdr.
139 * config/obj-coffbfd.c (write_object_file): use bfd_get_error (),
141 * config/obj-elf.c (elf_frob_file): Likewise.
143 * read.c (s_lcomm): Use an alignment power of 3 for 8 byte .lcomm
146 * config/ho-hpux.h (BROKEN_ASSERT): Define if not __GNUC__.
148 * read.c (read_a_source_file): Use correct arguments to memcpy
154 * config/obj-coff.h (obj_coff_section): Declare.
155 * config/obj-coff.c (obj_pseudo_table): For "section", use
157 (obj_coff_section): Rewrite.
161 * configure.in (i386-*-mach3*): New target; uses BFD.
162 * config/te-mach.h: New file.
163 * config/obj-aout.c (obj_aout_frob_file): New function.
164 * config/obj-aout.h (obj_aout_frob_file): Declare it.
165 (frob_file): New macro.
166 * config/tc-i386.c (md_apply_fix_1) [TE_Mach]: Don't adjust
168 * config/tc-i386.h (TARGET_FORMAT) [TE_Mach]: Use a.out-mach3.
170 * write.c (write_object_file): Removed register declarations.
174 Some support for PowerPC ELF.
175 * configure.in: If cpu is powerpc*, use ppc.
176 (ppc-*-sysv4*): Use object format elf.
177 * config/tc-ppc.h: Only declare a number of things if OBJ_COFF is
179 (TARGET_ARCH): Make it call ppc_arch.
181 (TARGET_FORMAT): Set based on OBJ_COFF or OBJ_ELF.
182 (NO_STRING_ESCAPES): Define.
183 (LOCAL_LABEL, FAKE_LABEL_NAME): Define for OBJ_ELF.
184 * config/tc-ppc.c: Only define a number of functions of OBJ_COFF
186 (md_pseudo_table): Most pseudo-ops are OBJ_COFF specific. Added
187 OBJ_COFF specific "bi" and "ei".
188 (md_parse_option): Fix handling of -u. Make -m601 set
189 PPC_OPCODE_601. If OBJ_ELF, accept -V and -Q.
190 (ppc_set_cpu): New function.
191 (ppc_arch): New function.
192 (md_begin): Call ppc_set_cpu.
193 (ppc_insert_operand): For a signed operand accept an unsigned
194 value, for IBM compatibility.
195 (ppc_byte): Don't call stringer for strings; instead, treat two
196 double quotes as a single double quote.
197 (ppc_comm): Set sy_tc.output for a .lcomm symbol.
198 (ppc_biei): New function.
199 (ppc_tc): If not OBJ_COFF, ignore first argument.
200 (ppc_fix_adjustable): Call as_bad_where, not as_bad.
201 (ppc_is_toc_sym): New function.
202 (md_apply_fix): Use ppc_is_toc_sym. Handle BFD_RELOC_16 and
207 * messages.c (as_perror) [BFD_ASSEMBLER]: Use bfd_get_error and
208 bfd_set_error and new error names.
212 * configure.in: Support i960-vxworks versions > 5.0 as coff.
213 Default is still bout if no version is specified.
215 * atof-generic.c (atof_generic): Use switch and strcasecmp instead
216 of large number of compares when looking for inf/nan values.
220 * config/tc-mips.c (macro): Do unaligned loads and stores
221 correctly when big endian, and give errors on overflow rather than
222 generating incorrect code.
226 * as.c: Include libiberty.h.
228 * read.c (do_align): Don't define label just_record_alignment
229 unless it might be used.
231 * as.c (main): If md_parse_long_option is defined, call it with a
233 * config/tc-mips.h (md_parse_long_option): Define.
234 * config/tc-mips.c (mips_trap): New static variable.
235 (md_begin): Report an error if mips_trap is set at ISA level 1.
236 (macro): If mips_trap, use trap instructions instead of break
237 instructions for overflow and divide by zero detection.
238 (mips_parse_long_option): New function. Support --trap,
239 --no-break, --break and --no-trap.
240 * doc/as.texinfo: Document new options.
242 * read.c (potable): Add "zero".
243 * config/tc-i386.c (md_pseudo_table): Remove "zero".
244 * config/tc-m88k.c (md_pseudo_table): Likewise.
248 * config/tc-sparc.c (sparc_ip): Reject integer values for
249 pc-relative operand fields. This forces "call 0" to become "jmpl
250 %g0,%o7" with no relocations needed.
254 * as.h (xmalloc, xrealloc): Declare using PTR rather than char *.
255 * xmalloc.c (xmalloc, xrealloc): Use PTR rather than char *.
257 * app.c (do_scrub_next_char): If NO_STRING_ESCAPES is defined,
258 don't treat backslash specially inside strings.
259 * read.c (next_char_of_string): Likewise.
263 * config/obj-coffbfd.c (obj_coff_init_stab_section): Use memset
264 instead of memcpy to zero the initial stab symbol, duh.
265 * config/obj-elf.c (obj_elf_init_stab_section): Ditto.
266 * config/obj-som.c (obj_som_init_stab_section): Ditto.
270 * write.c (fixup_segment): Use as_bad_where, not as_bad.
272 * subsegs.c (subseg_set_rest): Call memset with the arguments in
273 the right order. Explicitly clear fix_root and fix_tail fields.
277 * config/obj-coff.c (coff_frob_symbol): For abs_symbol, set *punt
280 * symbols.c (symbol_begin): Initialize value of abs_symbol
283 * write.c (adjust_reloc_syms): Use abs_symbol instead of calling
286 * ecoff.c (ecoff_build_debug): Fix "/*" in comment to silence
287 complaint from "gcc -Wall".
289 * configure.in (alpha-*-netware*): New target, like alpha-*-osf*.
291 * config/tc-alpha.c (GP_ADJUSTMENT): Move definition to start of
293 (tc_gen_reloc): Remove uninitialized variable `code', and code
294 that tried to use it (incorrectly). For LITERAL reloc, set addend
295 to negative of GP value.
296 (load_symbol_address): Don't adjust return value by GP_ADJUSTMENT.
298 * write.c (write_relocs): Print some sensible error message if
299 bfd_perform_relocation returns bfd_reloc_overflow.
303 * configure.in (hppa*-*elf*): New configuration for PA ELF.
304 (hppa*-*-osf*): Default object format is SOM.
308 * config/tc-alpha.c (md_atof): Warn that floating-point values
309 might not assemble properly.
311 * configure.in (target alpha-*-osf*): Don't set "dev=yes" any
314 * config/tc-alpha.c (load_expression): Parenthesize operations in
315 range checking, to avoid precedence questions.
317 * config/tc-alpha.c (addr32): New static variable.
318 (md_parse_option): Set it for "-32addr".
319 (load_symbol_address): If addr32 is set, use ldl instead of ldq.
321 * atof-generic.c (atof_generic): Calculate maximum_useful_digits
322 and more_than_enough_bits_for_digits in integer arithmetic, to
323 eliminate the only sources of dependence on floating point
324 support, which doesn't work yet on the Alpha.
328 * ecoff.c (ecoff_build_debug) [TC_ALPHA]: Specify version stamp as
329 0x30b for Alpha for now, until ".verstamp" is handled.
331 * literal.c (add_to_literal_pool): Use seginfo->frchainP, which
332 actually refers to the literal pool section, rather than
333 frchain_now, which refers to whatever section the assembler was
336 * write.c (fixup_segment): Only do range checking if size of fixup
337 is smaller than word size. Otherwise, we always wind up with
340 * config/tc-alpha.c (md_section_align): Change second argument and
341 return type to valueT, to agree with tc.h.
342 (alpha_do_align): Local static array nop_pattern is now unsigned
343 char, to avoid overflow warnings.
344 * config/tc-alpha.h (md_section_align): Delete declaration.
346 * config/obj-ecoff.c (ecoff_frob_file): Ensure that ecoff_data for
347 output bfd is non-null before indirecting through it.
349 * config/tc-alpha.c (alpha_frob_ecoff_data): Renamed from
351 * config/tc-alpha.h (tc_frob_file): Macro deleted.
352 * config/obj-ecoff.c (ecoff_frob_file) [TC_ALPHA]: Call
353 alpha_frob_ecoff_data, then fill in optional-header info with gp
354 value and register masks.
360 * config/obj-som.c (obj_som_init_stab_section): Same change
361 as coffbfd and elf below. Zero the initial stab symbol after
366 * config/obj-coffbfd.c (obj_coff_init_stab_section): Zero the
367 initial stab symbol after allocating it.
368 * config/obj-elf.c (obj_elf_init_stab_section): Ditto.
372 * config/tc-hppa.c (pa_ip): addb[tf] should only accept
373 non-negated condition completers. Add support for addb pseudo-op
374 which accepts both negated and non-negated completers.
378 * configure.in (rs6000*): Use cpu_type ppc.
379 (ppc-*-aix*): New target; use coff and force bfd_gas.
380 * config/tc-ppc.h, config/tc-ppc.c: New files for PowerPC/POWER
381 (RS/6000) support. At the moment, only XCOFF is supported.
383 * config/obj-coff.c (SA_SET_SYM_ENDNDX): Made non-static.
384 (S_SET_DATA_TYPE): Likewise.
385 (coff_last_function): Renamed from local static last_functionP in
386 coff_frob_symbol and made externally visible.
387 (coff_frob_symbol): New local static set_end; use it to try to
388 avoid calling SA_SET_SYM_ENDNDX on a symbol that will be punted.
389 * config/obj-coff.h (S_SET_DATA_TYPE): Declare.
390 (SA_SET_SYM_ENDNDX): Declare.
391 (coff_last_function): Declare.
393 * expr.c (operand): If DOLLAR_DOT is defined, accept `$' as
394 equivalent to `.' to mean the current location.
396 * read.c (LEX_BR): If not defined, define as 0.
397 (lex_type): Use LEX_BR as the type of `{',`}',`[',`]'.
399 * symbols.c (symbol_new): If tc_canonicalize_symbol_name is
400 defined, call it with preserved_copy_of_name. If
401 tc_symbol_new_hook is defined, call it on the new symbol.
402 (symbol_find_base): If tc_canonicalize_symbol_name is defined,
403 call it on a copy of the name argument.
405 * write.c (write_object_file): Simplified usage of obj_frob_symbol
406 and tc_frob_symbol. Always call both if the symbol is going to be
409 * write.c (relax_segment): Use %ld rather than %d when printing
410 fragP->fr_var, and cast it to long.
412 Changed relocs to be based on subsegments (when BFD_ASSEMBLER).
413 * subsegs.h (struct frchain): If BFD_ASSEMBLER, added new fields
414 fix_root and fix_tail.
415 (segment_info_type): If BFD_ASSEMBLER, don't define fix_tail
417 * write.c (fix_new_internal): If BFD_ASSEMBLER, set fix_rootP and
418 fix_tailP based on frchain_now, not seg_info (now_seg).
419 (chain_frchains_together_1): Chain the subsegment relocs together.
420 * subsegs.c (subseg_change): Don't clear fix_tail field.
421 (subseg_get): Likewise.
422 * literal.c (add_to_literal_pool): Look through the relocs via
423 frchain_now, not seginfo.
427 * config/obj-ecoff.h (TARGET_SYMBOL_FIELDS): Changed
428 ecoff_undefined to ecoff_extern_size.
429 * config/obj-elf.h (ELF_TARGET_SYMBOL_FIELDS): Likewise.
430 * config/tc-mips.c (s_extern): Set ecoff_extern_size to the
431 external symbol size, rathern than setting the symbol value.
432 (md_estimate_size_before_relax): Check both ecoff_extern_size and
433 symbol value to see if GP referencing can be used.
434 * ecoff.c (ecoff_symbol_new_hook): Clear ecoff_extern_size, not
436 (ecoff_frob_symbol): Don't check ecoff_undefined.
437 (ecoff_build_symbols): Get size of an undefined symbol from
438 sym->ecoff_extern_size, not S_GET_VALUE (sym).
442 * Makefile.in: Avoid bug in losing hpux sed.
446 * config/tc-mips.c (file_mips_isa): New static variable.
448 (s_mipsset): Add support for .set mipN to set the ISA level.
450 * gasp.c (kinfo): Fully bracket initializer.
454 * gasp.c (malloc): Don't declare, since host.h or system header
455 files may declare it differently.
457 * config/atof-ieee.c (int_to_gen): Now static.
459 * config/ho-i386aix.h: Include sys/types.h and stdlib.h, not
460 ho-sysv.h. Based loosely on a patch from Minh Tran-Le.
464 * gasp.c: Include host.h.
468 * config/tc-mips.c (mips_ip): Make an unsupported instruction a
469 warning, not an error.
471 * config/obj-coff.c (dot_text_symbol, dot_data_symbol,
472 dot_bss_symbol): Don't define if BFD_ASSEMBLER.
473 (obj_symbol_to_chars): bfd_coff_swap_aux_out now takes more
475 (coff_line_base): Renamed from line_base. Changed all uses.
476 (coff_add_linesym): Renamed from add_line_sym. Made non-static.
478 * config/obj-coff.h: If TC_PPC, include coff/rs6000.h.
479 (S_SET_STORAGE_CLASS, S_GET_STORAGE_CLASS): Declare if
481 (coff_line_base): Declare.
482 (coff_add_linesym): Declare if BFD_ASSEMBLER.
483 * config/obj-coffbfd.c (symbol_to_chars): bfd_coff_swap_aux_out
484 now takes more arguments.
488 * as.c (statistics_flag): Renamed from quiet_flag.
489 (main): Get statistics with --statistics instead of -noquiet.
493 * Makefile.in: Support for Gnu ASsembler Preprocessor.
495 * read.c (s_lcomm): Align lcomm data.
496 * config/tc-z8k.c (tc_reloc_mangle): Don't allow subtraction
497 from different sections.
501 * write.c (write_object_file): If tc_frob_file is defined, call it
502 just before calling obj_frob_file.
503 * config/tc-alpha.c (alpha_gp_value): Renamed from gp_value
504 (references changed), and made non-static.
505 (getExpression): Return void.
506 (select_gp_value): Abort if gp_value is non-zero. Delete call to
507 non-existent bfd_set_gp_value.
508 (alpha_validate_fix): Function deleted.
509 (alpha_frob_symbol): Function deleted.
510 (alpha_local_label): Function deleted.
511 (alpha_frob_file): Renamed from alpha_end.
512 * config/tc-alpha.h (alpha_frob_symbol, alpha_validate_fix,
513 alpha_local_label, alpha_end): Declarations deleted.
514 (alpha_gp_value, alpha_frob_file): Declare.
515 (tc_frob_symbol, TC_VALIDATE_FIX, md_end): Macros deleted.
516 (LOCAL_LABEL): Move code here from tc-alpha.c:alpha_local_label.
517 (md_convert_frag): Simplified slightly.
518 (tc_frob_file): New macro.
520 * read.c (do_align): New function, most of guts of s_align_*
521 functions. Look for md_do_align macro, give it a chance to bypass
522 all but recording of section alignment.
523 (s_align_bytes, s_align_ptwo): Call do_align.
524 (s_lcomm) [TC_ALPHA]: Align object to largest power of two that
527 * frags.c (frag_align_pattern): New function.
528 (frag_align): Rewrite for clarity.
530 * config/tc-vax.c (md_assemble): Handle O_constant expression.
531 (vip_begin): Returns pointer to const char. Cast hash_insert arg
532 to PTR to avoid compiler complaints about const.
533 (md_begin): Local variable errtxt must point to const.
535 * configure.in: Handle host vax-*-ultrix* like vax-*-bsd*. Don't
536 bother with *-*-ultrix or *-*-sysv*, except *-*-sysv, since only
537 the last has an existing host support file. Do handle vax-bsd and
542 * config/obj-coff.c (obj_coff_section_header_append): Do not
543 declare if BFD_ASSEMBLER.
544 (stack_pop): Correct test for stack underflow.
545 (obj_coff_endef, obj_coff_dim, obj_coff_line, obj_coff_size,
546 obj_coff_scl, obj_coff_tag, obj_coff_type, obj_coff_val): Declare
547 type of ignored argument to avoid gcc warning.
548 (align): Removed unused function.
552 * config/tc-alpha.c, config/tc-alpha.h, config/alpha-opcode.h: New
553 files, based on port of gas-1.38 contributed by CMU, using a.out
554 variant. Updated for gas-2.x and ECOFF. Floating-point constants
555 are still broken, bootstrap testing incomplete.
557 * literal.c: Comment changes.
559 * listing.c (listing_source_file): Check for null listing_tail
560 before indirecting through it.
562 * expr.h (struct expressionS): Added struct tag.
564 * as.h: If __GNUC__ and inline are both undefined, define inline
567 * write.c (cvt_frag_to_fill): Don't assume that fr_var for
568 rs_align or rs_org frags will be 1.
569 (relax_segment): For rs_align, if fr_var is not 1, complain if
570 required padding is not a multiple of the size of the pad pattern.
571 (fixup_segment): Leave gp-relative relocations alone. For pcrel
572 relocations referring to the same segment, clear fx_pcrel when
574 * as.h: Adjust comments on rs_align.
576 * atof-generic.c: Some reformatting.
577 (atof_generic): Be careful when mixing signed/unsigned values of
580 * write.c, config/obj-{aout,bout,coff*}.c, config/tc-sparc.c:
581 Query the fx_done field instead of fx_addsy to see if the fixup
582 still needs to be applied. Set fx_done and clear fx_addsy both,
583 for now. If TC_HANDLES_FX_DONE isn't defined, assume md_apply_fix
584 will only clear fx_addsy, and set fx_done accordingly after
586 * config/tc-sparc.h (TC_HANDLES_FX_DONE): Define.
587 * config/tc-sparc.c (md_apply_fix): Set fx_done for non-pcrel fix
590 * symbols.c (dot_text_symbol, dot_data_symbol, dot_bss_symbol):
592 (symbol_begin): Moved to end of file, so function inlining can
594 (fb_label_count, fb_label_max): Default C static initializers are
596 * symbols.h (dot_text_symbol, dot_data_symbol, dot_bss_symbol):
597 Declarations deleted.
598 * config/obj-coff.c (dot_text_symbol, dot_data_symbol,
599 dot_bss_symbol): Defined here, static.
601 * config/obj-aout.c [BFD_ASSEMBLER]: Undef NO_RELOC before
602 including aout/aout64.h.
604 * write.c (write_object_file): If EMIT_SECTION_SYMBOLS is false,
605 don't write out a section symbol even if it's used in a
606 relocation; assume relocations will handle section numbers
607 somehow. Rename "punt_it" label to "punt_it_if_unused" to reflect
609 (EMIT_SECTION_SYMBOLS): Default to 1.
610 (adjust_reloc_syms): Don't create a new symbol for an absolute
611 reference; just use the absolute section symbol.
612 (write_relocs): Make printout of reloc values dependent on flag
614 * config/obj-aout.h (EMIT_SECTION_SYMBOLS): Define as 0.
615 * config/obj-ecoff.h (EMIT_SECTION_SYMBOLS): Ditto.
619 * read.c (lex_type): No longer make '{' a valid character for
622 * as.c (main): Print long values using %ld.
624 * messages.c (as_warn_internal): New static function.
625 (as_warn, 3 versions): Use as_warn_internal.
626 (as_warn_where, 3 versions): New function.
627 * as.h (as_warn_where): Declare.
631 * as.c (quiet_flag): New flag.
632 (main): If -noquiet given, display execution time and memory used.
636 * doc/{all.texi,as.texinfo}: Add documentation for HPPA port.
640 * ecoff.c (ecoff_frob_symbol): New function. Put undefined
641 symbols of known size in the undefined section. Put small common
642 symbols in a .scommon section.
643 * ecoff.h (ecoff_frob_symbol): Declare.
644 * config/obj-ecoff.h (obj_frob_symbol): Define.
645 * config/obj-elf.c (obj_elf_write_symbol_p, obj_elf_write_symbol,
646 obj_elf_frob_symbol): Removed unused functions.
647 * config/obj-elf.h (obj_frob_symbol, obj_write_symbol): Removed
649 (obj_elf_frob_symbol, obj_elf_write_symbol): Removed declarations
651 (obj_frob_symbol): Define if ECOFF_DEBUGGING.
653 * tc-mips.c (g_switch_seen): New static variable.
654 (md_parse_option): Set g_switch_seen for -G option.
655 (s_option): If creating PIC code, force the GP size to be 0. Warn
656 if -G switch used with a non-zero value.
658 * symbols.c (S_IS_COMMON): Use bfd_is_com_section rather than
659 comparing against bfd_com_section.
663 * read.c (s_lcomm): Treat Alpha like MIPS in handling of .sbss
668 * expr.c (operand): For floating point operand with unusual fp
669 char from FLT_CHARS, preserve the character. Patch from Lisa
674 * config/tc-mips.c (md_pseudo_table): Add all data allocation
675 pseudo-ops: .hword, .int, .long, .octa, .quad, .short, .single.
679 * config/obj-coffbfd.c (obj_coff_endef): For C_EFCN, C_BLOCK and
680 C_FCN assume .val has been set to .
684 * config/tc-hppa.c: Disable multiple $CODE$ subspace code. It
685 confuses GDB for some unknown reason.
686 * cofnig/obj-som.c: Likewise.
690 * literal.c (add_to_literal_pool): Handle duplicates of values
691 already written to literal pool.
695 * config/obj-aout.c (obj_aout_frob_symbol): Try to get symbols
696 with explicitly marked stabs through BFD: if a symbol marked
697 N_UNDF | N_EXT is in the absolute section, move it to the
698 undefined section; move a symbol marked N_INDR into
699 bfd_ind_section and set the BSF_INDIRECT flag; set the
700 BSF_WARNING flag for a symbol makred N_WARNING.
704 * ecoff.h (ecoff_set_gp_prolog_size): Declare.
705 * ecoff.c (ecoff_set_gp_prolog_size): Return type is void.
709 * config/tc-hppa.c (pa_ip): Explicitly check for comma before 'u'
710 and 'f' template operand.
712 * config/tc-hppa.c (pa_ip): Handle 'N', 'O', 'o', '0', '1', 'u',
713 and '2' in copr and sfu instruction templates.
717 * as.h (subseg_force_new): Add prototype.
721 * app.c (do_scrub_next_char): Allow lines like " foolab :".
723 * read.c (emit_expr): Fix computation of mask.
724 * config/obj-elf.c (obj_elf_section): Fix loop termination test.
728 * ecoff.c (ecoff_set_gp_prolog_size): New function.
729 (current_file_idx): New static variable.
730 (add_file): Use and increment current_file_idx instead of indx
733 * struc-symbol.h (struct symbol): Make all bitfields unsigned.
735 * config/tc-i960.c (i960_validate_fix): Added argument
736 add_symbolPP. Indirect through it to get "add_symbolP".
737 * config/tc-i960.h (i960_validate_fix): Supply prototype.
738 (TC_VALIDATE_FIX): Pass address of add_symbolP.
740 * configure.in (i386-*-netbsd*): New target, using te-netbsd.h.
741 (i386-*-netbsd0.8): New target, like 386bsd.
743 * configure.in: Set BFDDEF in Makefile to "define" or "undef".
744 * Makefile.in (config.h): Protect against multiple inclusions.
745 Define or undef BFD_ASSEMBLER as specified by $(BFDDEF).
746 (ALL_CFLAGS): Omit $(BFDDEF).
747 * as.h: Include config.h.
748 (struct symbol): Added forward declaration.
749 (add_to_literal_pool): Fix declaration.
750 * as.c: Don't include config.h.
752 * literal.c (add_to_literal_pool): Take symbol and addend as
753 arguments, instead of expression, for now. Fix calculation of
756 * subsegs.h (segment_info_type) [NEED_LITERAL_POOL]: Add field
761 * subsegs.c (subseg_get): Accept new argument "force_new". If
762 set then a new segment is always created. All callers changed.
763 (subseg_force_new): New function. Similar to subseg_new, but
764 always force a new segment to be created.
766 * config/obj-som.c (som_frob_file): Call adjust_code_sections
768 (adjust_code_sections): New function. Adjusts the VMA for all the
771 * config/tc-hppa.c (md_assemble): Also handle creating a fixup
772 for the unwind descriptors if a function's label follows the
773 .PROC and .ENTRY directives.
774 (pa_entry): Don't set BSF_FUNCTION for the label symbol here; it
775 is done elsewhere. Don't create a fixup for the unwind
776 descriptors if the function's label has not been defined yet.
777 (pa_proc): For SOM, place each procedure within a new $CODE$
778 subspace. Adjust the segment and frag for the associated
779 function label if it exists.
783 * config/tc-hppa.c (hppa_fix_struct): Add new "segment" field.
784 (hppa_fix_new): Initialize segment field.
785 (md_apply_fix): Do nothing for pc-relative fixup which involves
786 crossing a segment boundary.
787 (pa_procend): Undefine the current label after handling .PROC
788 and .PROCEND directives.
789 (dummy_symbol): Make type "symbolS *". Change references as
794 * read.c (read_a_source_file): Cast array argument to unsigned
796 * write.c (adjust_reloc_syms): Remove unused variable symseginfo.
797 (write_object_file): Don't define punt_it if it won't be used.
798 (fixup_segment): Don't define skip if it won't be used.
800 * config/tc-mips.h (TARGET_FORMAT): Define as mips_target_format.
801 (mips_target_format): Declare.
802 * config/tc-mips.c (mips_target_format): Define with appropriate
804 (md_parse_option): If -EL or -EB is used, change byte_order and
805 mips_target_format as appropriate.
809 * app.c (do_scrub_next_char): Another attempt to fix bugs
810 dealing with labels without colons (for HPPA and MRI).
814 * expr.c (integer_constant): Fix computation of too_many_digits.
815 Variable digit_2 renamed to start. Fix check for whether number
817 * read.c (emit_expr): Use valueT instead of long.
821 * config/obj-elf.c: If TC_MIPS, include elf/mips.h.
822 (special_sections): Define.
823 (obj_elf_special_section): Get default types and attributes from
824 list of special sections.
825 * config/tc-mips.c (ELF_TC_SPECIAL_SECTIONS): Define.
827 * config/obj-ecoff.c (ecoff_frob_file): Force .sdata and .sbss
828 sections to be close together.
830 * config/tc-mips.c (macro): Corrected $at warnings in a couple of
833 * listing.c (listing_prev_line): New function.
834 * listing.c: Include subsegs.h.
835 (listing_prev_line): New function.
836 (calc_hex): Reset byte_in_frag to zero for each new frag.
837 * config/tc-mips.c (append_insn): Call listing_prev_line after
838 emitting nop instructions.
839 * Makefile.in (listing.o): Depends upon subsegs.h.
843 * config/tc-hppa.c (pa_ip): Put check for missing label on .PROC
844 here. Handle case where label may be defined after the .PROC.
845 (pa_proc): It is not an error if the procedure's label isn't
846 defined before the .PROC directive.
850 * config/te-netbsd.h: New file.
851 * config/tc-i386.h (TARGET_FORMAT) [TE_NetBSD]: Use bfd target
852 a.out-netbsd-386 for this configuration.
856 * ecoff.c (ecoff_stab): Don't clobber the ECOFF symbol information
857 with the associated stabs information.
858 (ecoff_build_symbols): Never set the type of stabs symbols to
859 st_Global. Don't update the symbol index or ifd if the gas symbol
860 is not the same as the ECOFF symbol (which is now the case for
865 * config/tc-mips.c (macro): Add a LOSING_COMPILER ifdef that
867 (macro2): New function, if LOSING_COMPILER defined.
871 * config/obj-coffbfd.c (fill_section): Don't ever fill past the
872 end of a section. (write_object_file): Temporary fix - setup
877 * config/tc-sparc.c (tc_gen_reloc): Fix handling of addends in
878 non-pcrel_offset relocations.
882 * config/tc-mips.c (mips_ip): Warn about using $1 as well as $at
887 * literal.c: New file.
888 * Makefile.in (REAL_SOURCES, OBJS): List it.
890 * as.h (DEBUG): Don't define.
891 (struct expressionS, struct fix): Declare in case they're used in
893 (add_to_literal_pool) [BFD_ASSEMBLER]: Declare.
895 * config/tc-mips.h (TARGET_FORMAT) [OBJ_AOUT]: Fix for new names
898 * subsegs.c (subseg_get): New function. Creates segment if
899 needed, returns pointer, but doesn't change current segment.
900 (subseg_new): Use it.
904 * Makefile.in (INCLUDES): Add $(srcdir)/.. to places to search.
905 * config/obj-ecoff.c: Include files as "bfd/" instead of "../bfd/".
906 * app.c, flonum.h, hex-value.c (const): Change #if to be more
911 * config/ho-vsta.h, configure.in, .Sanitize: Add support for VSTa
916 * write.c (write_relocs): bfd_perform_relocation now takes an
917 additional argument, to return an error string (which we ignore).
921 * write.h (struct fix): Field tc_fix_data should be type PTR, not
922 void*, for compatibility with non-ANSI compilers. Added
923 single-bit field "fx_done".
927 * tc-hppa.c (pre_defined_registers): Convert to lower case.
928 Delete spurious register names "%r4L", etc.
929 (selector_table): Sort and convert to lower case.
930 (cons_fix_new_hppa): `reloc_type' => `rel_type'.
931 (pa_ip): Always use strcmp for non-text and strcasecmp for text.
932 (reg_name_search): Rewrite to call strcasecmp only once per
934 (pa_chk_field_selector): Rewrite to use binary search.
935 (pa_parse_neg_add_cmpltr): Use strcasecmp for completer comparisons.
936 (pa_parse_space_stmt): $TEXT$ and $PRIVATE$ are symbols; use case
937 sensitive comparisons.
938 (pa_parse_space_stmt): Canonicalize strncasecmp arg to lower case.
939 (pa_space): "$text$" => "$TEXT$"; "$private$" => "$PRIVATE$". Use
940 case sensitive comparison for all symbolic names.
941 (pa_subspace): Canonicalize strncasecmp arg to lower case.
942 (pa_subspace_start): Use case sensitive comparison for symbolic names.
946 * write.c (adjust_reloc_syms) [RELOC_REQUIRES_SYMBOL]: If no
947 symbol is present (i.e., relocation against absolute), create a
948 phony local symbol, and use it in the reloc.
949 (fixup_segment): When adjusting a reloc with an absolute symbol,
950 have TC_FORCE_RELOCATION control clearing add_symbolP too.
951 * config/tc-sparc.h (RELOC_REQUIRES_SYMBOL): Define, for OBJ_COFF.
953 * symbols.c (S_IS_EXTERNAL, S_IS_LOCAL): Don't use both BSF_EXPORT
954 and BSF_GLOBAL, since they're the same.
956 * as.c (main): Only invoke md_end if it's defined as a macro.
957 * tc.h (md_end): Don't declare it.
958 * config/tc-*.[ch] (md_end): Deleted, in cases where it doesn't do
960 * config/tc-vax.c (vip_end): Deleted null function.
961 * config/tc-mips.c (md_mips_end): Renamed from md_end.
962 * config/tc-mips.h (md_mips_end): Declare.
963 (md_end): New macro, calls md_mips_end.
965 * write.c (write_object_file): Don't close output file.
966 * as.c (main): Close output file (if needed) after calling
967 listing_print, which should be after calling write_object_file,
968 which sets the frag addresses.
970 * config/obj-coff.c (obj_coff_dim, obj_coff_endef, obj_coff_line,
971 obj_coff_scl, obj_coff_size, obj_coff_tag, obj_coff_type,
972 obj_coff_val): Add unused int argument to satisfy prototypes; goes
973 with Ian's 10 Sep changes.
974 (S_GET_DATA_TYPE, S_SET_DATA_TYPE, S_GET_STORAGE_CLASS,
975 S_SET_STORAGE_CLASS): Now function instead of macros.
976 (obj_emit_lineno) [BFD_ASSEMBLER]: Deleted.
977 (tag_insert): Local var ERROR_STRING is const. Use "const" not
978 "CONST" for argument NAME. Fixed prototype.
979 (coff_frob_symbol): Removed explicit "#if 1" directive. If
980 S_IS_EXTERNAL, set storage class to C_EXT.
981 (s_get_name): Use "const" not "CONST".
982 * config/obj-coff.h (S_GET_DATA_TYPE, S_SET_DATA_TYPE,
983 S_GET_STORAGE_CLASS, S_SET_STORAGE_CLASS): Deleted.
984 (obj_emit_lineno): Declare only for non-BFD_ASSEMBLER. For
985 BFD_ASSEMBLER, define as macro that aborts.
986 (obj_extra_stuff, tc_headers_hook): Declare only for
988 (coff_frob_symbol): Fix prototype.
992 * config/tc-sparc.c (tc_gen_reloc): Test of pcrel_offset had sense
997 * config/tc-hppa.c (md_begin): Initialize "dummy_label".
998 (tc_gen_reloc, SOM version): For relocations which have no symbol,
999 set sym_ptr_ptr to dummy_label. Avoids lossage in generic BFD code.
1003 * read.c (lex_type): No longer make '[' a valid character for
1006 * config/tc-vax.c (tc_aout_fix_to_chars): Local variable
1007 NBYTES_R_LENGTH now const.
1009 * config/obj-*.c, config/tc-*.c: Omit superfluous "return"
1010 statements at ends of functions. Don't check for null return from
1011 hash_new, since it won't return at all if there's no memory
1012 available. Also, check for null return from hash_insert, rather
1013 than zero-length string, as success indicator.
1015 * subsegs.c (section_symbol): New function.
1016 * subsegs.h (section_symbol): Declare.
1017 * write.c (adjust_reloc_syms): Use it.
1021 * Makefile.in (RUNTEST): New variable.
1022 (CHECKFLAGS): Pass it down.
1024 * ecoff.c (ecoff_directive_frame): Permit extra trailing operands;
1025 unused for now, but supplied by Alpha OSF1 compiler.
1027 * as.h: Protect against multiple inclusions.
1028 (int_to_gen): Don't declare.
1030 * config/atof-vax.c (atof_vax): NULL is not a valid character
1035 * configure.in (hppa*-*-osf*): Do not consider this a developmental
1038 * config/tc-hppa.c (md_apply_fix): Handle cases where no
1039 relocation will be emitted for 32bit formats.
1043 * config/tc-hppa.c (md_apply_fix): Do not call hppa_field_adjust
1044 for any of the 'T' field selectors.
1048 * config/tc-h8500.c (build_bytes): Get reloc type right for a
1049 %page operation. (md_assemble): Don't modify input_line_pointer.
1050 (mdcoff_sizemachdep): New function.
1051 * config/tc-h8500.h (TC_COFF_SIZEMACHDEP): New macro.
1052 * config/tc-z8k.c (get_operand): Delete bogus check.
1056 * write.c (number_to_chars_*): Delete bogus range check.
1058 * output-file.c (TARGET_ARCH): No default.
1062 * config/tc-sh.c (md_convert_frag): Truncate disps before calling
1063 md_number_to_chars. (md_assemble): Don't modify
1068 * config/tc-h8300.c (md_assemble): Don't update input_line_pointer.
1072 * config/obj-som.[ch] (obj_read_begin_hook): Remove last change.
1073 Breaks with the HP compilers.
1075 * config/tc-hppa.c (struct call_info): Remove fields which were
1076 set but never used. Remove all code which sets those fields.
1077 (struct subspace_dictionary_chain): Likewise.
1078 (struct space_dictionary_chain): Likewise.
1079 (pa_desc): Delete useless function. Delete all references.
1080 (hppa_tc_make_sections): No need to count the number of symbols for
1081 the symbol extension section.
1085 * config/obj-som.c (obj_som_version): Pass version string to
1087 (obj_som_copyright): New function. Much like obj_som_version.
1089 * config/tc-hppa.c (obj_copyright): Define as appropriate for
1091 (pa_copyright): Just a stub now.
1093 * config/obj-som.c (obj_read_begin_hook): Delete unused function.
1094 * config/obj-som.h (obj_read_begin_hook): Provide dummy definition.
1095 (TARGET_SYMBOL_FIELDS): Delete. SOM isn't making use of them.
1097 * config/tc-hppa.c (tc_gen_reloc, SOM version): Handle relocation
1098 expansion due to rounding mode selectors. Handle R_[RDSN]_MODE
1099 relocations for selecting the current rounding mode.
1101 * config/tc-hppa.c (evaluate_absolute): Support e_rrsel and
1102 e_rlsel field selectors.
1106 * config/obj-elf.h: If ECOFF_DEBUGGING, undef
1107 SEPARATE_STAB_SECTIONS and INIT_STAB_SECTION, and define
1108 OBJ_PROCESS_STAB to call ecoff_stab.
1109 * config/obj-elf.c: Don't compile obj_elf_init_stab_section if
1110 INIT_STAB_SECTION is not defined.
1114 * config/tc-hppa.c (md_apply_fix): Delete old wrapper function.
1115 (md_apply_fix_1): Rename to md_apply_fix. Fix argument decls.
1116 Fix comments in various places. Always return a value.
1117 Avoid dereferencing a NULL fx_addsy.
1118 (hppa_force_relocation): Avoid dereferencing a NULL fx_addsy.
1122 * tc-hppa.c: (tc_gen_reloc): Addend for a plabel relocation should
1123 be either 0 or 2 (no static link or static link required). Always
1124 assume no static link.
1128 * config/tc-sparc.c (tc_gen_reloc): Make adjustment to addend be
1129 dependent on howto fields, not on format flavour.
1131 * struc-symbol.h (struct symbol): New fields sy_obj and sy_tc,
1132 defined as types OBJ_SYMFIELD_TYPE and TC_SYMFIELD_TYPE, if those
1134 * config/obj-coff.h (TC_SYMFIELD_TYPE, OBJ_SYMFIELD_TYPE): Define.
1135 (TARGET_SYMBOL_FIELDS, I960_SYM_FIELDS): Don't define.
1136 (sy_tc, sy_obj): Define so that the fields look like they used to,
1137 until all references get changed.
1139 * write.c (fixup_segment): Lots of variables no longer register.
1140 Reordered some code for easier reading.
1141 * config/obj-coff.c (obj_coff_dim): dim_index no longer register.
1142 Deleted superfluous return statement.
1143 (obj_coff_line, obj_coff_size, obj_coff_scl, obj_coff_type,
1144 obj_coff_val, tag_init, tag_insert): Deleted superfluous return
1146 (align, obj_coff_section): Deleted debugging printfs.
1147 * config/tc-i386.c (md_assemble): Discard some register decls.
1148 Use assignment rather than memcpy to copy template.
1149 (op_hash, reg_hash, prefix_hash): Default C initialization of
1150 statics is sufficient.
1151 * config/tc-sparc.c (print_insn): Array Reloc is now const, and
1154 * config/obj-coff.h (TARGET_FORMAT): Only use coff-sparc-lynx if
1155 TE_LYNX; use coff-sparc otherwise.
1156 [USE_NATIVE_HEADERS]: Delete this code; it isn't used.
1158 * write.c (fixup_segment): Call TC_VALIDATE_FIX, if defined,
1159 before processing a fixup. Call TC_ADJUST_RELOC_COUNT just before
1160 returning. Remove some i960-coff-specific code.
1161 (TC_ADJUST_RELOC_COUNT): Default to doing nothing.
1162 * config/tc-i960.h (TC_ADJUST_RELOC_COUNT) [OBJ_COFF]: Define.
1163 (i960_validate_fix): Declare.
1164 (TC_VALIDATE_FIX): Define.
1165 * config/tc-i960.c (i960_validate_fix): New function.
1167 * write.c (number_to_chars_littleendian): New function. Write out
1168 bytes in little endian order, doing size and range checking.
1169 (number_to_chars_bigendian): New function, similar.
1170 * write.h: Declare them.
1171 * config/tc-*.c (md_number_to_chars): Use them.
1172 * config/tc-vax.c (md_apply_fix): Ditto.
1173 * config/tc-i386.c (md_apply_fix): Ditto.
1175 * config/obj-coff.c: Rearranged code for handling line number
1177 (line_fsym): Renamed from function_lineoff in BFD_ASSEMBLER case,
1178 since the usage is different from non-BFD_ASSEMBLER case.
1179 (in_function, clear_function, set_function): New macros, to
1180 combine some of the functionality implemented in differnet ways in
1181 BFD_ASSEMBLER and non-... code. Used in other functions that used
1182 to check function_lineoff &c.
1183 (obj_emit_lineno): Split into two copies, one for BFD_ASSEMBLER,
1184 one for not. Non-BFD_ASSEMBLER version now has temporary variable
1185 to contain char* pointer pointed to by char** argument. Always
1186 follow CROSS_COMPILE code; easier to read that way.
1187 (obj_coff_ln): Don't call add_lineno or c_line_new if appline is
1189 (obj_coff_endef) [BFD_ASSEMBLER]: Don't do anything special for
1190 ".bf", it's been done elsewhere.
1191 (coff_frob_symbol): If ilne number data is pending, call
1192 add_linesym to flush it.
1193 (coff_frob_file): Don't do that here.
1194 * config/obj-coff.h (coff_frob_file): Declare.
1195 (obj_frob_file): Define, to call it.
1197 * config/tc-sparc.h (md_create_short_jump, md_create_long_jump,
1198 md_estimate_size_before_relax: Define them as macros calling
1200 * config/tc-sparc.c: Don't define them as functions.
1202 * configure.in: Handle target alpha-*-osf*. (No cpu files yet.)
1206 * Makefile (clean): Depend on clean-here.
1210 * config/ho-go32.h: Include fopen-bin.h.
1211 * as.h: If FOPEN_WB isn't defined, include fopen-same.h.
1212 * output-file.c (output_file_create): Use FOPEN_WB instead of "w".
1213 * input-file.c (input_file_open): Use FOPEN_RT instead of "r".
1214 * listing.c (file_info): Use FOPEN_RB instead of "rb".
1215 * read.c (s_include): Use FOPEN_RT instead of "r".
1217 * stabs.c: Include obstack.h.
1219 * tc.h (md_create_long_jump): Don't declare if it's already
1221 (md_create_short_jump, md_estimate_size_before_relax): Ditto.
1223 * messages.c (as_perror) [BFD_ASSEMBLER]: Use bfd_errmsg instead
1224 of strerror. Clear bfd_error.
1226 * config/te-lynx.h (LOCAL_LABELS_FB): Define, if not already
1231 * config/tc-hppa.c (hppa_elf_mark_end_of_function): New function.
1232 (pa_process_exit, pa_procend): Call it for ELF objects.
1236 * config/tc-mips.c (macro): Subtract 8 from offset in non PIC l.d
1238 coproc before doing goto ld.
1242 * write.c (TC_FORCE_RELOCATION): Provide a default definition.
1243 (fixup_segment): Allow the target machine to specify that a
1244 relocation must be generated for a particular fixup. Remove
1245 #ifndef TC_HPPA hack.
1247 * config/tc-hppa.h (TC_FORCE_RELOCATION): Define.
1249 * config/tc-hppa.c (md_apply_fix_1): Never change fx_addsy to
1250 be NULL. Only fixup_segment is supposed to do that.
1251 (hppa_force_relocation): New function.
1255 * Makefile.in (stabs.o): Added dependencies.
1257 * config/obj-ecoff.c (ecoff_frob_file): Don't call bfd_set_symtab.
1261 * app.c (do_scrub_next_char): Output a TAB before any
1264 * config/tc-hppa.c (fix_new_hppa): Make sure a sub_symbol
1265 exists before trying to peek at its name.
1266 (pa_space): Do not call pa_align_subseg. See hppa/unsorted/align3.s
1268 (pa_align_subseg): Delete unused/unwanted function.
1272 * read.c (read_a_source_file): Fix test for when to stick a colon
1273 on the end of a label. Make code conditional on either MRI or
1274 LABELS_WITHOUT_COLONS.
1276 * app.c (do_scrub_next_char): If a line begins with whitespace, leave
1277 the single whitespace character alone. Eat all others.
1279 * config/tc-hppa.h (LABELS_WITHOUT_COLONS): Define.
1283 * config/tc-hppa.c (pa_procend): Do not call process_exit.
1284 (exit_processing_complete): Delete unwanted variable and all
1289 * ecoff.c (ecoff_setup_ext): Renamed from ecoff_build_ext.
1290 Changed to not actually build the external symbol information, as
1291 that is now done by the ECOFF back end.
1292 (ecoff_build_debug): Changed accordingly.
1293 * ecoff.h (obj_ecoff_set_ext): Declare. obj-format.c function
1294 called by ecoff_setup_ext.
1295 * config/obj-ecoff.c (ecoff_frob_file): If debug_info count is 0,
1296 set corresponding pointer to NULL. Don't set raw_size and
1298 (obj_ecoff_set_sym_index): Removed.
1299 (obj_ecoff_set_ext): New function.
1300 * config/obj-ecoff.h (obj_set_sym_index): Don't define.
1301 (obj_ecoff_set_sym_index): Don't declare.
1302 * config/obj-elf.c (obj_ecoff_set_ext, elf_get_extr,
1303 elf_set_index): New functions used for ECOFF_DEBUGGING.
1304 (elf_frob_file): Reworked ECOFF debug generation to use
1305 new functions in bfd/ecofflink.c.
1309 * config/tc-hppa.c (pa_def_subspaces): Only create the unwind
1310 subspace for ELF. In the SOM world, the linker is responsible
1311 for creating the unwind subspaces.
1315 * config/obj-coffbfd.c: Use PARAMS rather than EXFUN.
1316 (yank_symbols): Don't call S_SET_EXTERNAL if the storage class is
1317 already set. Fixes .def var; .val external_var; .scl 3; .endef.
1318 (adjust_stab_section): Make static. Declare return type. Remove
1321 * config/tc-i386.h: Declare tc_coff_fix2rtype and
1322 tc_coff_sizemachdep.
1326 * write.c (write_object_file): Disable obj_check_file_symbols
1327 hook; only back end using it wasn't using it correctly.
1328 (write_object_file): Always call obj_frob_symbol and
1329 tc_frob_symbol; always retain symbol if it's used by a relocation,
1330 regardless of what these routines indicate.
1331 * config/obj-coff.c (coff_frob_symbol): Renamed from
1332 coff_check_file_symbols.
1333 * config/obj-coff.h (obj_check_file_symbols): Deleted.
1334 (coff_frob_symbol): Declare.
1335 (obj_frob_symbol): Call it.
1337 * config/obj-coff.c (obj_crawl_symbol_chain, obj_emit_strings,
1338 obj_pre_write_hook): Don't define for BFD_ASSEMBLER.
1339 (c_section_header): Ditto. Delete superfluous return at end of
1342 * config/obj-coff.h [TC_SPARC]: Include coff/sparc.h, and specify
1344 (SA_GET_SYM_TAGNDX): Use BFD_HEADERS version for BFD_ASSEMBLER
1346 (c_section_header): Rewrite prototype so that it contains no
1347 preprocessing directives. Don't declare it at all if
1350 * configure.in (sparc*-*-lynxos): New target, using coff and
1353 * stabs.c: New file.
1354 * Makefile.in (REAL_SOURCES, OBJS): List it.
1355 * read.c (STAB_SECTION_NAME, STAB_STRING_SECTION_NAME,
1356 get_stab_string_offset, s_stab_generic, s_stab, s_xstab, s_desc):
1359 * config/tc-sparc.c (tc_gen_reloc): Handle coff files like elf
1364 * configure.in (mips-*-irix5*): New target. Use elf and mips-big.
1365 * config/obj-elf.c: If ECOFF_DEBUGGING, include ecoff.h.
1366 (obj_pseudo_table): If ECOFF_DEBUGGING, define ECOFF
1368 (obj_read_begin_hook): If ECOFF_DEBUGGING, call
1369 ecoff_read_begin_hook.
1370 (obj_symbol_new_hook): If ECOFF_DEBUGGING, call
1371 ecoff_symbol_new_hook.
1372 (obj_elf_init_stab_section): Cast alloca result.
1373 (elf_frob_file): If ECOFF_DEBUGGING, finish up ECOFF debugging
1374 information and write it out into .mdebug section.
1375 * config/obj-elf.h (ELF_TARGET_SYMBOL_FIELDS): New macro.
1376 (TARGET_SYMBOL_FIELDS): Use ELF_TARGET_SYMBOL_FIELDS.
1377 (ECOFF_DEBUGGING): Define if TC_MIPS.
1378 (TARGET_SYMBOL_FIELDS): If ECOFF_DEBUGGING, override to add
1379 fields required by ECOFF.
1380 * config/tc-mips.c: Check ECOFF_DEBUGGING rather than
1381 OBJ_ECOFF in many cases.
1382 (mips_any_noreorder): New variable.
1383 (mips_cprestore_offset): Initialize to -1.
1384 (mips_frame_reg): New variable.
1385 (RELAX_ENCODE, RELAX_OLD, RELAX_NEW, RELAX_RELOC1,
1386 RELAX_RELOC2, RELAX_RELOC3, RELAX_WARN): New macros.
1387 (md_pseudo_table): Handle "gpword" and "cpadd".
1388 (md_begin): Initialize ok to false. If OBJ_ELF, set alignment
1389 of text, data and bss sections to 4. Set alignment of
1390 .reginfo section to 2. If ECOFF_DEBUGGING, create .mdebug
1392 (ALIGN_ERR, ALIGN_ERR2): Removed unused and useless alignment
1394 (append_insn, macro_build, macro_build_lui): Take place
1395 argument. Changed all callers.
1396 (append_insn): If appending a nop, don't emit one.
1397 (macro_build): Changed assertion for 'i', 'j', 'o' case.
1398 (gp_reference): Removed.
1399 (load_address): New function.
1400 (macro): If mips_noreorder is used, set mips_any_noreorder.
1401 Extensive changes to handle GP and PIC symbols differently.
1402 Build both possible code choices using a variant frag, and
1403 make a final decision at the end of assembly when all
1404 information is known. Added PIC support for all symbol
1406 (mips_ip): Don't permit anything but a number after $ for a
1407 coprocessor register. Don't use .lit4 or .lit8 sections when
1408 generating PIC code. If OBJ_ELF, set alignment of .lit4 or
1410 (md_apply_fix): Accept and ignore GOT16 and GPREL32 relocs.
1411 (s_change_sec): Set alignment of ELF .rodata or .sdata section
1413 (s_mipsset): If .set noreorder, set mips_any_noreorder.
1414 (s_cpload): Ignore .cpload if not generating PIC code. Warn
1415 if .cpload is not in noreorder section.
1416 (s_cprestore): Ignore .cprestore if not generating PIC code.
1417 (s_gpword, s_cpadd): New functions.
1418 (tc_get_register): Added frame argument; if true, set
1419 mips_frame_reg to return value. Changed all callers.
1420 (md_estimate_size_before_relax): Don't error out, but instead
1421 determine how much a frag should grow.
1422 (tc_gen_reloc): Return multiple relocs if appropriate, as
1423 determined by md_estimate_size_before_relax.
1424 (md_convert_frag): New function.
1425 (mips_elf_final_processing): Set ELF header flags based on
1426 mips_any_noreorder and mips_pic.
1427 * config/tc-mips.h (RELOC_EXPANSION_POSSIBLE): Define.
1428 (MAX_RELOC_EXPANSION): Define to be 3.
1429 (md_relax_frag): Define to be 0.
1430 (md_convert_frag): Don't define.
1431 (tc_get_register): Changed declaration.
1433 * ecoff.h, ecoff.c: New files pulled out of config/obj-ecoff.c to
1434 support generating ECOFF debugging information for MIPS ELF
1435 targets. Compiled only if ECOFF_DEBUGGING is defined. Changed
1436 handling of external symbols: it now always generates exactly
1437 those external symbols that are defined in the global symbol list.
1438 * Makefile.in (REAL_SOURCES): Added ecoff.c.
1439 (REAL_HEADERS): Added ecoff.h.
1440 (OBJS): Added ecoff.o.
1441 (ecoff.o): New target.
1442 * config/obj-ecoff.c: Almost entirely moved into ecoff.c.
1443 Remaining code mostly just calls ecoff.c code.
1444 * config/obj-ecoff.h: Define ECOFF_DEBUGGING.
1445 (TARGET_SYMBOL_FIELDS): Make ecoff_symbol a pointer to a
1447 (obj_read_begin_hook, obj_symbol_new_hook): Define to call
1448 functions in ecoff.c.
1449 (ecoff_stab): Don't declare (now declared in ecoff.h).
1450 (obj_set_sym_index): Define.
1451 (obj_ecoff_set_sym_index): Declare.
1453 * frags.h (frag_grow): Declare.
1454 * frags.c (frag_grow): Made non-static.
1456 * write.c (is_dnrange): Do not define if md_relax_frag is defined.
1457 (relax_segment): If md_relax_frag is defined, use it to handle a
1458 frag of type rs_machine_dependent rather than looking through
1461 * read.c (read_a_source_file): If we find a bad pseudo-op,
1462 do a continue to go on to the next line rather than a break.
1463 Removed duplicate bad pseudo-op code which was never executed.
1465 * read.c (s_lcomm): Do not require a comma after the name.
1467 * subsegs.h (segment_info_type): Changed hadone field to bitfield.
1469 * as.c (perform_an_assembly_pass): Set bss flag for bss_section.
1470 * read.c (s_lcomm): Set bss flag for .sbss section if used.
1471 * write.c (relax_and_size_seg): Don't set SEC_HAS_CONTENTS for a
1472 bss section. Set SEC_RELOC if there are any relocations, even for
1473 a zero size section.
1475 * write.c (write_relocs): In RELOC_EXPANSION_POSSIBLE case, base
1476 data offset on reloc[0]->address rather than reloc[j]->address, so
1477 that multiple relocs can affect different memory locations.
1479 * write.c (chain_frchains_together, relax_and_size_seg,
1480 adjust_reloc_syms, write_relocs): Make third argument PTR, not
1481 char *, to match definition of bfd_map_over_sections.
1483 * app.c (do_scrub_next_char): Don't interpret a comment character
1484 as starting a CPP line directive unless it is a '#' and is the
1485 very first characters on the line (i.e., do not permit leading
1488 * messages.c (identify): Make file argument non-const, to match
1493 * config/tc-hppa.c (pa_ip): Fix thinko in 21bit range check.
1497 * config/tc-sh.c (md_apply_fix): Cope with IMM16 type too.
1498 * config/tc-z8k.c (build_bytes, md_apply_fix): Understand nDISP7
1503 * config/tc-hppa.[ch]: Fix assorted trivial indention problems.
1504 * config/obj-som.c (obj_som_version): Add missing ';'.
1505 (som_frob_file): Delete whitespace at EOL.
1509 * Makefile.in (VERSION): Updated following 2.2 release.
1513 * config/tc-hppa.c (hppa_fix_struct): Use a real type for the
1514 field selector, rather than an int. All uses of field selectors
1516 (tc_gen_reloc): For SOM PLABELs, always set addend to zero for now.
1517 (md_apply_fix_1): Do not call hppa_field_adjust for any PLABEL
1522 * config/tc-hppa.c (pa_type_args): For .import statements,
1523 silently ignore attempt to change the symbol type for a function
1524 from ST_ENTRY to ST_CODE on .import.
1528 * write.h (fixS): Rename fx_callj field to fx_tcbit.
1529 * write.c, config/obj-coff.c, config/obj-coffbfd.c,
1530 config/tc-i960.c: Corresponding changes.
1534 * Makefile.in (distclean): Delete config-stamp and config.h
1536 * config/tc-hppa.c (evaluate_absolute): Avoid relying on
1539 * config/tc-hppa.c (pa_type_args): Renamed from pa_export_args.
1540 Accept new argument "is_export". All callers changed. When
1541 processing a .export directive for a function, do not allow
1542 the user to set the type to "CODE", instead warn and set the
1547 * config/tc-mips.c (mips_ip, printInsn): Handle 'k' (from Ted
1549 (mips_ip): Permit odd numbered floating point registers if -mips3.
1550 (macro): Use BFD_RELOC_MIPS_LITERAL relocation for M_LI_SS.
1554 * configure.in: Remove h8300h, we have multilib now.
1558 * configure.in: Support generic netware as being ELF format.
1559 Recognise unixware if the user supplies it.
1563 * First cut at cleaning up PA instruction parsing.
1564 * config/tc-hppa.c (pa_get_absolute_expression): Accept pointer to
1565 insn structure as an argument, and a pointer to a string. All
1566 callers changed. Always read any field selector here. Call
1567 evaluate absolute to get a return value.
1568 (evaluate_absolute): Addept pointer to insn structure as its
1569 argument. All callers changed.
1570 (INSERT_FIELD_AND_CONTINUE): New macro for inserting a bitfield
1571 into an instruction and continuing the main pa_ip loop.
1572 (CHECK_FIELD): New macro for simple range checking of fields.
1573 (pa_ip): Delete unused variables. Use INSERT_FIELD_AND_CONTINUE
1574 and CHECK_FIELD. All immediate fields now pass through
1575 pa_get_absolute_expression which will also handle field selectors.
1576 Delete dead code. Simplify.
1577 (md_apply_fix_1): Use CHECK_FIELD to verify any fixes that are
1578 applied are in range. Use bfd_put_32 rather than inserting each
1579 byte of the fixed instrution into the buffer ourselves.
1581 * write.c (fixup_segment): Delete {SEG,GLOBAL}_DIFF_ALLOWED code,
1582 it was PA specific and is no longer needed (it's now handled
1583 within the PA backend).
1584 * config/tc-hppa.h (SEG_DIFF_ALLOWED): Delete definition.
1585 * config/tc-hppa.c (fix_new_hppa): If the subtract symbol for
1586 a fixup is $global$ change it to NULL as $global$ is really only
1587 needed long enough to determine the base type of relocation to use.
1589 * config/tc-hppa.c (create_new_subspace): Initialize subspace_defined.
1591 * config/tc-hppa.c (pa-ip, case 'z'): Make field selectors work
1592 for 'z' operands (target of ble branch).
1596 * config/tc-hppa.c: (update_subspace): Fix type and name of last
1597 parameter. All callers fixed.
1598 (md_begin, pa_chk_field_selector, pa_entry): Lint.
1600 * config/tc-hppa.c (cons_fix_new_hppa): Reset field selector
1601 to default state after it's been used.
1605 * config/obj-som.c (obj_som_init_stab_section): Change
1606 space/subspace sort keys for the stab sections so as to avoid
1607 bugs in the hp linker and pxdb.
1611 * write.c (chain_frchains_together): Update pointer to last
1612 frag for a segment in the seginfo structure.
1616 * Makefile.in: Changed RUNTESTFLAGS to RUNTEST_FLAGS
1620 * write.c (fixup_segment): Handle conversion of subtraction to
1621 pc-relative addressing even if pc-relative flag is already set.
1623 * config/tc-m68k.c (m68k_ip_op): Use strchr, not index. Don't
1626 * doc/Makefile.in (distclean): Delete intermediate files from dvi
1627 build, but not the dvi or info files.
1628 * Makefile.in (clean-here): New target; cleans up current
1630 (distclean): Use it instead of clean.
1632 * read.c (s_xstab): Don't use alloca.
1634 * messages.c (identify): New routine; print message identifying
1635 following messages as coming from assembler.
1636 (as_show_where, as_bad_internal, as_bad_where): Call it.
1637 (as_fatal): Don't need to identify program any more.
1641 * read.c (s_lcomm): Put small objects in .sbss for MIPS ELF as
1643 (get_stab_string_offset): Remove unused variable aligned.
1647 * tc-hppa.c: Add %dp and %rp as synonyms for %r27 and %r2 in the
1648 predefined register table.
1649 (pa_parse_number): Handle %rp in common register shortcut code.
1650 Consistently set return value to -1 for an error. Clean up error
1651 messages and only print them when "print_errors" is true. Handle
1652 empty string case like the HP assembler -- assume a value of
1655 * config/ho-hpux.h: Do not include ho-sysv.h. Instead include
1656 standard hpux include files to pick up various function decls.
1658 * config/ho-hppaosf.h: Delete _IO* macros. They are defined in
1659 stdio.h. Delete bogus declaration of free. Get path to
1660 alloca-conf.h right.
1664 * expr.c (operand): Fix checks for characters following "0b" or
1669 * config/obj-som.h (obj_attach_unwind_info): Define as a hook
1670 so GAS can attach unwind descriptor information to a BFD symbol.
1671 * config/tc-hppa.c (fix_new_hppa): If necessary attach unwind
1672 descriptor information to the BFD symbol.
1673 (md_apply_fix): R_HPPA_ENTRY and R_HPPA_EXIT can never be "applied",
1674 they are simply markers. Make R_HPPA_UNWIND_* handling OBJ_ELF
1676 (pa_build_unwind_subspace): Whole function is OBJ_ELF dependent.
1677 (pa_entry): Build a R_HPPA_ENTRY relocation when configured for SOM.
1678 (pa_exit): Likewise, but built a R_HPPA_EXIT relocation. Do not
1679 build "end-of-function" symbols for SOM, they are not needed.
1681 * config/tc-hppa.c (process_exit): Create temporary symbols with
1682 correct prefixes so they can be eliminated later.
1684 * config/tc-hppa.c (call_info struct): Delete unused "frame" field.
1685 (pa_callinfo): Insert framesize into the unwind information as
1686 soon as it's available.
1687 (pa_build_unwind_subspace): Do not insert framesize into the unwind
1690 * Add support for marker type relocations. These mark areas
1691 of interest to the linker. ENTRY/EXIT relocations for SOM are
1692 an example of marker relocations.
1693 * write.c (write_relocs): Instead of assuming size of a relocation
1694 is 4 bytes, pick up the size from relocation itself.
1695 (fixup_segment): Do not complain that a value is too small for
1698 * struc-symbol.h: Add new "sy_used" field to the symbol structure.
1699 * expr.c (operand): Set sy_used for any symbol used as an operand.
1700 (expr): Likewise for any symbol used in an expression.
1701 * config/tc-hppa.h (tc_frob_symbol): Define. Punt imported
1702 symbols which are never used and absolute symbols which local scope.
1704 * config/obj-som.h (obj_frob_file): Define.
1705 * config/obj-som.c (obj_som_init_stab_section): Set alignment
1706 of stab sections. Make space for the special stab entry.
1707 (adjust_stab_sections): Adjust the special entry in the
1709 (som_frob_file): New function. Simply calls adjust_stab_sections
1714 * config/tc-mips.c (PIC_CALL_REG, SP, FP): Define.
1715 (mips_pic, mips_cprestore_offset): New static variables.
1716 (md_pseudo_table): Handle .abicalls, .cpload, and .cprestore.
1717 Ignore .bgnb and .endb.
1718 (gp_reference): _gp_disp is never addressed off GP.
1719 (macro_build): Ignore macros while searching for insn. For cases
1720 i, j, and o, accept the reloc type as an argument rather than
1721 assuming BFD_RELOC_LO16. Don't try to convert BFD_RELOC_LO16 to
1722 BFD_RELOC_MIPS_GPREL. Added new case a.
1723 (set_at, load_register, macro): Changed calls to macro_build to
1724 pass new argument for i, j and o cases.
1725 (macro): Handle M_JAL_1, M_JAL_2 and M_JAL_A. These require
1726 special handling when generating SVR4 PIC code.
1727 (mips_ip, tc_get_register, s_frame): Use macros FP, SP, GP and AT
1728 rather than hard coded constants.
1729 (md_apply_fix): Handle BFD_RELOC_MIPS_LITERAL and
1730 BFD_RELOC_MIPS_CALL16.
1731 (s_option): Set mips_pic based on .option picN.
1732 (s_abicalls): New function; set mips_pic to 2.
1733 (s_cpload): New function; handle .cpload.
1734 (s_cprestore): New function; handle .cprestore.
1736 * config/obj-ecoff.c (obj_pseudo_table): Add entries for .bgnb,
1737 .endb and .verstamp, setting them to s_ignore.
1741 * config/tc-hppa.c (subspace_dictionary_chain): Add new ssd_defined
1742 field. Define SUBSPACE_DEFINED accessor macro.
1743 (pa_subspace): Allow user to override subspace attributes for
1744 built-in subspaces. Set ssd_defined at the end of fcn -- that
1745 way the attributes can only be changed once. Pass newly allocated
1746 name to is_defined_subspace, not a pointer to the input line.
1747 Fix typo in space/subspace rework.
1748 (is_defined_subspace): Delete unused 2nd arg. All callers changed.
1750 * config/tc-hppa.c (pa_import): If currently in the text segment
1751 and a symbol is imported without type information, set BSF_FUNCTION
1753 * write.c (relax_and_size_seg): Correct test to determine if
1754 the section's size was rounded up.
1756 * config/obj-som.h (obj_set_symbol_type): Define a hook so GAS
1757 can properly set all the SOM symbol types.
1758 * config/tc-hppa.c (pa_symbol_type): New enum to represent the
1759 symbol types which can be set from an IMPORT/EXPORT statement.
1760 (pa_export_args): Set the pa_symbol_type type based on arguments.
1761 If defined, call obj_set_symbol_type to pass this information on
1764 * read.c (get_stab_string_offset): Set SEC_DEBUGGING for any
1765 stab section we make.
1766 (s_stab_generic): Likewise.
1770 * Allow backends to override the value of the fake label.
1771 * write.h (LOCAL_LABEL): Delete DOT_LABEL_PREFIX code. Instead
1772 assume backends will define LOCAL_LABEL if anything other than
1773 'L' is used to denote a local label.
1774 (FAKE_LABEL_NAME): New macro. Defines the default name used for
1776 * expr.c (make_expr_symbol): Delete DOT_LABEL_PREFIX code
1777 and instead simply use the string defined by FAKE_LABEL_NAME.
1778 (operand): Likewise.
1779 * read.c (s_stab_generic): Likewise.
1780 * config/tc-hppa.h (FAKE_LABEL_NAME): Define as L$0\001 so it's
1781 known to be a local label.
1782 * config/tc-i386.h (DOT_LABEL_PREFIX): Delete.
1783 (LOCAL_LABEL, FAKE_LABEL_NAME): Define.
1784 * config/tc-m68k.h (DOT_LABEL_PREFIX): Delete.
1785 (LOCAL_LABEL, FAKE_LABEL_NAME): Define.
1786 * config/te-sco386.h (DOT_LABEL_PREFIX): Delete.
1787 (LOCAL_LABEL, FAKE_LABEL_NAME): Define.
1789 Rework space/subspace handling in PA code to fully support
1790 SOM spaces/subspaces.
1791 * config/tc-hppa.c (USE_ALIASES): New object-format dependent define
1792 to control the use of space/subspace name aliases.
1793 (update_subspace): Accept space chain entry for containing space
1794 as a new parameter. All callers changed.
1795 (pa_get_label): Use current_space rather than pa_segment_to_space.
1796 (pa_define_label): Likewise.
1797 (pa_undefine_label): Likewise.
1798 (md_begin): Change into the (possibly modified) text_section.
1799 (pa_parse_space_stmt): Create a new segment/space if create_flag
1800 is true, and the space name is not one of the two predefined spaces.
1801 (pa_subspace): Use current_space rather than a lookup via
1802 pa_segment_to_space. Reset BFD section flags as required by
1803 the .subspace directive. Likewise for the section alignment.
1804 Pass the current space to update_subspace and create_new_subspace.
1805 (pa_spaces_begin): Only use space/subspace aliases if USE_ALIASES
1806 is true. When not using aliases, create a BFD section for each
1807 subspace encountered. When not using aliases replace the default
1808 text, data, and bss segments with new ones.
1809 (create_new_subspace): When not using aliases each subspace has a
1810 section/segment and subsegments are not needed, so set the subsegment
1813 * config/tc-hppa.c (pa_parse_space_stmt): If needed, call
1814 obj_set_section_attributes to pass space attributes to the
1816 (create_new_space): Likewise.
1817 (create_new_subspace): Likewise for subspace attributes using
1818 obj_set_subsection_attributes.
1819 (update_subspace): Likewise for subspace attributes using
1820 obj_set_subsection_attributes.
1822 * config/tc-hppa.c (pa_parse_space_stmt): Get segment and sort key
1823 for $TEXT$ and $PRIVATE$ from the default space structure.
1825 * config/tc-hppa.c (pa_export_args): Always set BSF_FUNCTION
1826 as appropriate for the given type.
1828 * config/tc-hppa.c (tc_gen_reloc): Preliminary stab at handling
1831 * config/tc-hppa.c (pa_comm): Delete incorrect check for symbol
1834 * config/obj-som.[ch]: New files for SOM support. Note SOM
1835 support is not yet complete in GAS or BFD.
1837 * config/ho-hppabsd.h: Delete IO* macros, they are defined in
1838 stdio.h. Delete declaration of free. Include stdlib.h, unistd.h,
1843 * Allow backends to override the section names used for embedded
1844 stabs support. Needed for SOM.
1845 * read.c (STAB_SECTION_NAME): Default the name of the stab section
1847 (STAB_STRING_SECTION_NAME): Likewise for the stab strings section.
1848 (get_stab_string_offset): Is now passed the full name for the
1849 stab string section rather than a name prefix. All references
1851 (s_stab_generic): New argument for the stab string section name.
1852 all references changed.
1853 (s_xstab): Append "str" to the stab section name to get the
1854 stab string section name.
1855 * config/obj-coffbfd.c (obj_coff_init_stab_section): Append "str"
1856 to stab section name to get the stab string section name. Pass
1857 the full name of the stab string section to get_stab_string_offset.
1858 * config/obj-elf.c (obj_elf_init_stab_section): Likewise.
1860 * config/tc-hppa.c (md_begin): Disable "-R" option to fold
1861 textand data segments. Warn user "-R" is unsupported on the
1866 * config/tc-hppa.c (md_pseudo_table): Default alignment is 8 for
1867 .align and .ALIGN directives.
1869 * config/tc-hppa.c (pa_space): Do not report an error for a .space
1870 directive which does not define a "well-known" space and does
1871 not include a space number as an argument.
1873 * config/tc-hppa.c (pa_def_subspaces): Correct initialization of the
1874 "defined", "loadable", "code_only" and "space_index" fields.
1875 (pa_def_spaces): Correct initialization of the "spnum", "defined",
1876 and "private" fields.
1878 * write.h (struct fix): Add new tc_fix_data field for the various
1879 backends to attach machine dependent fixup information to.
1880 * write.c (fix_new_internal): Initialize new tc_fix_data field.
1881 * config/tc-hppa.c (hppa_fix_struct): Delete unnecessary fix_fixP and
1883 (hppa_find_hppa_fix): Delete unnecessary function. Fix all
1884 callers to get HPPA fixup information from the tc_fix_data field
1886 (hppa_fix_root): Delete unnecessary variable.
1887 (fix_new_hppa): Attach HPPA fixup data to the GAS fixup.
1889 * config/tc-hppa.c (pa_set_start_symbol); Delete unwanted
1890 function. Fix all callers.
1891 (subspace_dictionary_chain): Delete unused ssd_start_sym field.
1893 * config/tc-hppa.c (hppa_fix_adjustable): New function to determine
1894 if a particular fixup is adjustable.
1895 * config/tc-hppa.h (tc_fix_adjustable): Call hppa_fix_adjustable to
1896 perform the real work.
1898 * config/tc-hppa.h (RELOC_EXPANSION_POSSIBLE): Move definition out
1899 of OBJ_XXX conditionals.
1900 (MAX_RELOC_EXPANSION): Likewise.
1902 * config/tc-hppa.c (log2): Renamed from is_power_of_2. Fix all
1903 callers. Now returns log2 (N) for positive N which are an exact
1904 power of two or -1 for an error.
1906 * config/tc-hppa.c (pa_callinfo): Range check values provided for
1907 ENTRY_GR, ENTRY_FR and ENTRY_SR. Properly adjust vaues before
1908 inserting them into the unwind table.
1910 * config/tc-hppa.c (NEEDS_FIXUP): Delete definition and all references.
1911 (hppa_gen_reloc_type): New object format dependent macro.
1912 (pa_ip): Delete tons of code which was either OBJ_SOM or OBJ_ELF
1913 conditional. The code can (and will) be shared between SOM & ELF
1914 formats in the near future.
1915 (cons_fix_new_hppa, md_apply_fix_1): Likewise.
1916 (pa_build_unwind_subspace, process_exit, pa_exit): Likewise.
1917 (tc_gen_reloc): Use hppa_gen_reloc rather than an object format
1920 * config/tc-hppa.c (pa_comm): Set the segment for a common symbol
1923 * config/obj-elf.h (obj_elf_version): Add extern prototype.
1925 * configure.in (hppa-*-bsd*): New configuration.
1926 BFD is always used for GAS generating SOM objects.
1928 * write.c (adjust_reloc_syms): Set sy_used_in_reloc if an
1929 adjustment is rejected by the target machine.
1931 * config/tc-hppa.c (pa_big_cons): Delete function and its
1932 declaration. All callers changed to use pa_cons.
1934 * write.c (fixup_segment): Fix indention and open/close brace
1937 From Pete Hoogenboom:
1938 * config/tc-hppa.c (md_atof): Return a NULL on success rather than
1941 * config/tc-hppa.c (pa_parse_space_stmt): Advance
1942 input_line_poitner when an invalid argument is encountered.
1946 * config/tc-a29k.c (md_begin): When opcodes are mashed together in
1947 the table, require that the one without bit 0x1000000 set come
1948 first. Require further that it be case 'b' or 'P'. The a29k
1949 opcode table already meets these constraints.
1950 (machine_ip): When handling case 'i' or 'A', make sure that the
1951 appropriate opcode really exists by looking at the next entry in
1956 * config/tc-m68k.c (m68k_ip): Adjust offsets for PC relative
1957 fixups. Add 6 for long 7.3 case, 2 for short 7.2 case.
1959 * config/obj-ecoff.c (obj_ecoff_ent): Ignore an optional number
1960 after a .ent directive.
1962 * config/tc-mips.c (mips_ip): Handle '>' case (shift amount
1963 between 32 and 63 for double shift instruction). Do & 0x1f rather
1965 (printInsn): Handle '>'.
1969 * config/tc-ns32k.c (tc_aout_fix_to_chars): Output the symbol
1970 number in the right place. Untested. Probably does not work for
1973 * config/tc-m68k.c (md_apply_fix_2): Error if a short branch uses
1974 an illegal offset of 0 or -1.
1976 * config/obj-elf.c (obj_elf_init_stab_section): Align .stab
1977 section to a longword boundary.
1981 * Makefile.in (CHECKFLAGS): Pass down RUNTESTFLAGS.
1984 * config/tc-hppa.c (tc_gen_reloc): ELF32_HPPA_R_ADDEND ->
1989 * config/tc-sh.c (build_Mbytes): Write the relocs to the correct
1990 address. (md_assemble): Make error handling a bit more graceful.
1991 (md_apply_fix): Don't warn on non aligned displacement.
1993 * config/tc-z8k.c (get_specific, built_bytes): Understand all the
1998 * doc/Makefile.in (install-info): Use "$<*" so VPATH will find
1999 as.info* even if they're in $(srcdir) (e.g., for FSF
2002 * write.c (write_relocs): For relocs that are pc_relative and
2003 pcrel_offset and not partial_inplace, adjust reloc->addend to
2004 compensate for a bfd_perform_relocation bug.
2006 * config/tc-sparc.h: Removed remaining non-BFD_ASSEMBLER code.
2007 * config/tc-sparc.c: Ditto.
2008 (tc_gen_reloc): Include fx_offset for pcrel fixups.
2012 * tc-mips.c (md_pseudo_table): Add dword pseudo op.
2016 * messages.c: replaced all variables called Format with 'format',
2017 for consistency throughout
2019 * configure.in: handle mips*- instead of mips, mips*el for little
2020 endian configurations
2024 * input-scrub.c (physical_input_file, logical_input_file,
2025 physical_input_line, logical_input_line): Made static.
2026 (as_where): Return current file name and line number, don't print
2028 * messages.c (as_show_where): New static function. Other
2029 functions use it instead of as_where.
2030 (as_bad_internal): New static function.
2031 (as_bad): Use as_bad_internal.
2032 (as_bad_where): New function, like as_bad but taking a file name
2034 * as.h (as_bad_where): Declare.
2035 (as_where): Change prototype for new arguments.
2036 * write.h (fixS): Added fields fx_file and fx_line.
2037 * write.c (fix_new_internal): Save file and line number in fix.
2038 (fixup_segment): Use as_bad_where, not as_bad.
2039 * input-file.c (f_in, file_name): Made static.
2040 * cond.c (struct file_line): Just use file and line fields.
2041 (s_else): Use as_where and as_bad_where, not get_file_line and
2043 (get_file_line, set_file_line): Removed.
2044 * listing.c (listing_newline): Use as_where.
2045 * config/obj-coffbfd.c (obj_coff_init_stab_section): Use as_where.
2046 * config/obj-ecoff.c (add_file): Use as_where.
2047 * config/obj-elf.c (obj_elf_init_stab_section): Use as_where.
2048 * config/tc-m68k.c (md_apply_fix_2): Use as_bad_where.
2049 * config/tc-mips.c (tc_gen_reloc): Use as_bad_where, not assert.
2053 * config/tc-m68k.h: Don't define REGISTER_PREFIX or
2054 OPTIONAL_REGISTER_PREFIX if either is already defined.
2056 * config/tc-m68k.c (m68k_ip): Delete some code in "#if 0".
2058 * configure.in: Set bfd_gas for all sparc targets. Added facility
2059 for keeping or rejecting configurations still under development;
2060 default is to assume production environment, and reject configs
2061 still being worked on. Mark Elf configurations (except sparc and
2062 i386) as developmental. Deleted cases matching some generic names
2063 in favor of more specific names. (E.g., when we get Alpha
2064 support, we'll still only support VMS for Vax.)
2066 * config/tc-sparc.h (md_end): New macro.
2067 * config/tc-sparc.c (md_end): Function deleted.
2068 (BFD_RELOC_*): Delete macros that used to help keep the non-bfd
2069 version compiling. All sparc targets will use bfd now.
2070 * tc.h (md_end): Don't declare if it's defined as a macro.
2072 Changes from Jeff Law and Peter Hoogenboom:
2074 * read.c (next_char_of_string): Limit octal character constants to
2077 * config/tc-hppa.h: Major cleanup. Use GNU-style comments. Warn
2078 against placing additional object-file dependent code here. Warn
2079 against contaminating all of GAS with the internals of tc-hppa.c
2080 through inclusion of tc-hppa.h. Delete all forward declarations
2081 for functions only used within tc-hppa.c, likewise for structures,
2082 variables, and #defines. Try to group OBJ_ELF and OBJ_SOM
2083 conditional code in a few small places.
2085 * config/tc-hppa.c: Major cleanup. Use GNU-style comments. Group
2086 structures, global variables, forward declarations together.
2087 Reduce (or in some cases eliminate) OBJ_ELF and OBJ_SOM
2088 conditional code -- try to group conditional code together
2089 into a few places. Make all functions and variables which
2090 are only used within tc-hppa.c static. PARAMize all functions.
2091 Add comments to functions. Delete unused functions, variables,
2092 #defines, etc. Delete unused members within structures. Delete
2093 ldil;ble hacks -- it is believed they were installed to work
2094 around old gas bugs. Avoid using mixed case for local
2095 functions, variables, and structures. Fix formatting problems
2096 not found by GNU-indent. Add FIXME notices for things which
2097 should be worked on the near future. Delete lots of old
2098 useless (1.36 PA-SOM) code.
2100 * config/tc-hppa.c: (fix_new_hppa): Initialize the fx_r_type
2101 field of the fixS structure. Needed to build unwind
2102 descriptors correctly.
2104 * write.c: (fixup_segment): Allow expressions such as
2105 sym1-sym2+const as long as sym2 is $global$.
2107 * write.c (adjust_reloc_syms): Provide a hook so that a target
2108 cpu configuration can reject certain relocation reductions.
2109 * tc-hppa.h (tc_fix_adjustable): New macro. Only accept relocations
2110 which do not involve function symbols.
2112 * config/tc-hppa.h: Reindent with GNU-indent. Delete references
2113 to OBJ_OSFROSE. Fix typos (OBJ_SOME -> OBJ_SOM). Delete unused
2115 * config/tc-hppa.c: Likewise.
2117 * config/tc-hppa.c (md_apply_fix_1): Use elf_symbol_type, instead
2118 of elf32_symbol_type.
2119 (pa_export_args): Likewise.
2120 (elf_hppa_final_processing): Likewise.
2121 (pa_desc): Do not call obj_elf_desc. (Is pa_desc even needed
2123 (hppa_tc_make_sections): Do not declare elf_get_symtab_map any
2126 * config/tc-hppa.c: (md_section_align): Align all sections to
2127 a multiple of the section alignment rather than always a
2130 * config/tc-hppa.c (hppa_tc_symbol): If the argument relocation
2131 bits are zero (eg they specify no relocations), then do not even
2132 bother adding their entries to thesymextn section.
2136 * config/tc-sparc.c (md_parse_option): Accept and ignore -sparc
2137 option, which is used by the SunOS make default .s.o rule.
2141 * config/tc-m68k.h (AOUT_MACHTYPE): Define to be external variable
2143 * config/tc-m68k.c (omagic): Remove obsolete and unused variable.
2144 (m68k_aout_machtype): New variable, if OBJ_AOUT.
2145 (md_assemble): Initialize m68k_aout_machtype based on
2146 current_architecture, if OBJ_AOUT.
2147 (md_parse_option): Remove obsolete reference to omagic.
2151 * config/tc-mips.c (md_pseudo_table): Ignore .livereg pseudo-op.
2152 (s_option): Ignore .option O* and .option pic*.
2153 (s_ent): Skip whitespace between symbol and optional digit.
2154 (my_getSmallExpression): Handle ($xx) correctly: assume 0($xx).
2156 * app.c (do_scrub_next_char): Always accept 'x' and 'X' as escape
2157 characters in state 6.
2158 * read.c (next_char_of_string): Accept \Xh* and \xh* where h* are
2161 * config/tc-i386.c (md_apply_fix_1): Make cross segment calls work
2162 for ELF by hacking around bizarre bfd_perform_relocation behaviour
2163 that I don't dare change.
2167 * config/tc-i386.c: (md_begin): Do not zero static arrays. Don't
2168 call strchr for each character to see if it is a special char,
2169 instead add a second loop over special_chars. Set alignment
2170 of text, data and bss sections to 4.
2171 (pi, te, pt, pe, ps): Add declarations so that DEBUG386 can be
2173 (reloc): Don't return 8 and 16 bit non-PC relative relocations on
2174 ELF, since the ELF object format does not have these type of
2175 relocations. Change the abort into as as_bad and return
2176 BFD_RELOC_NONE to silence compiler warnings.
2177 (md_assemble): Keep track of the instruction size. Allow white
2178 space between the $ and the constant for compatibility with older
2179 gases and other assemblers.
2180 (i386_operand): Skip spaces between $ and expression.
2181 (tc_gen_reloc): Don't allow anything but 32 bit relocations on
2182 ELF. Convert abort into an as_bad and assert into as_fatal.
2186 * config/obj-coffbfd.c (fixup_segment) [DIFF_EXPR_OK]: If
2187 sub_symbolP is in the current segment, convert to a PC-relative
2188 fixup and discard the symbol.
2192 * config/obj-ecoff.c (ecoff_build_symbols): Handle st_End symbol
2193 for st_StaticProc just like st_Proc.
2195 * write.c (relax_and_size_all_segments): Moved #endif for OBJ_BOUT
2196 so that OBJ_BOUT doesn't forget to adjust all the fragments in the
2201 * config/tc-mips.c: If OBJ_ELF, include elf/mips.h.
2202 (mips_regmask_frag): New static variable, if OBJ_ELF.
2203 (md_begin): If OBJ_ELF, create .reginfo section and set
2204 mips_regmask_frag to a frag.
2205 (mips_elf_final_processing): New function, if OBJ_ELF. Set
2206 mips_regmask_frag to register mask information.
2207 * config/tc-mips.h (elf_tc_final_processing): New macro, defined
2212 * messages.c (as_fatal): Use myname when printing messages.
2214 * config/tc-i960.c (md_begin): Use null pointer, not empty string,
2215 as initial "return" value in case hashing isn't needed.
2217 * config/tc-a29k.c (md_atof): Return null, not empty string, on
2219 * config/tc-h8300.c (md_atof), config/tc-h8500.c (md_atof),
2220 config/tc-hppa.c (md_atof), config/tc-i860.c (md_atof),
2221 config/tc-i960.c (md_atof), config/tc-m88k.c (md_atof),
2222 config/tc-ns32k.c (md_atof), config/tc-sh.c (md_atof): Ditto.
2227 * config/tc-h8300.c (get_specific): Special action if 8 bit
2228 address seen. (check_operand): Don't complain if truncating top
2229 bits of an 8 bit address. (build_bytes): Allow an immediate and
2230 an absolute in the same insn.
2234 * write.c (write_contents): Don't crash if seginfo is NULL.
2236 * config/obj-ecoff.c (ecoff_frob_file): Write out register masks
2237 by modifying .reginfo section, not by directly modifying BFD
2242 * config/ho-sunos.h: remove extern time declaration
2246 * messages.c (as_fatal): Do mention that it's the assembler that
2247 got the fatal error.
2251 * config/tc-mips.c (mips_gprmask, mips_cprmask): New variables to
2252 hold register masks.
2253 (md_begin): Initialize them to zero.
2254 (append_insn): Update mips_gprmask and mips_cprmask. Also add
2255 register variables pinfo and prev_pinfo.
2256 * config/tc-mips.h (mips_gprmask, mips_cprmask): Declare.
2257 * config/obj-ecoff.c (ecoff_frob_file): If TC_MIPS, set gprmask
2258 and cprmask from mips_gprmask and mips_cprmask.
2260 * config/tc-mips.h: Define TARGET_FORMAT if OBJ_ELF.
2261 * config/tc-mips.c (GPOPT): Define if OBJ_ECOFF or OBJ_ELF.
2262 (various): Change all references to GP references to apply if
2263 GPOPT, not if OBJ_ECOFF.
2264 (s_change_sec): Rearrange somewhat. If OBJ_ELF, use .rodata
2265 instead of .rdata. If OBJ_ELF, set section flags for .rodata and
2267 (s_frame, s_loc, s_mask): Comment out entire functions, rather
2268 than just body. They're not used anyhow.
2269 * configure.in: Set cpu_type to mips for mips*. Accept
2270 mips-*-elfl* and mips-*-elf*.
2274 * config/obj-elf.c (obj_elf_common): Allow the alignment field to
2279 * config/tc-mips.c (cons_fix_new_mips): New function. Turn
2280 BFD_RELOC_64 into BFD_RELOC_32.
2281 * config/tc-mips.h (TC_CONS_FIX_NEW): Define.
2282 (cons_fix_new_mips): Declare.
2284 Changes to let cons handle bignums like general expressions.
2285 * expr.h (expressionS): New field X_unsigned.
2286 * expr.c (operand): Initialize X_unsigned to 1. Set it to 0 for
2288 (expr) Fix typo resultP to right if missing operand. Set
2289 X_unsigned to 1 when building new expression.
2290 * read.c (potable): Make "octa" and "quad" call cons, not
2292 (cons): Handle bignums. If given an O_constant (small integer) to
2293 fill a big space, turn it into a bignum.
2294 (parse_bitfield_cons): Set X_unsigned field.
2295 (bignum_low, bignum_limit, bignum_high, grow_bignum, big_cons):
2297 * read.h (big_cons): Remove prototype.
2298 * symbols.c (resolve_symbol_value): Don't give a warning if a
2299 symbol in expr_section can not be resolved.
2300 (S_SET_VALUE): Clear X_unsigned.
2301 * write.c (write_object_file): If resolve_symbol_value failed on a
2302 symbol we are writing out, give a warning.
2303 * config/tc-h8500.c (parse_reglist): Set X_unsigned.
2304 * config/tc-hppa.c (md_pseudo_table): Change "octa" and "quad" to
2305 call pa_cons, not pa_big_cons.
2306 (pa_big_cons): Remove.
2307 * config/tc-hppa.h (pa_big_cons): Remove declaration.
2308 * config/tc-i960.c (md_pseudo_table): Change "quad" to call cons,
2313 * doc/as.texinfo (Copying): new node, to handle the recent changes
2314 in the texinfo/gpl.texinfo file
2318 * read.c (big_cons): Handle "0" correctly.
2320 * config/tc-mips.c (md_begin): Set target_big_endian correctly.
2324 * config/tc-m68k.c (m68k_ip): Mode 7.3 operand using PC should
2325 have pc-relative fixup.
2326 (md_parse_option): Move "-k" case down near "-pic" case.
2328 * configure.in: Alphabetize list of cpu type alternatives. Enable
2329 OS values of "linux*elf*" and "linux*coff*" to select those
2330 formats, with linux emulation. Don't bother checking for upper-
2331 or mixed-case versions of "ose".
2335 * config/z8k.c (md_pseudo_table): add "unseg".
2339 * config/m88k-opcode.h (m88k_opcodes): correct a few mistakes
2340 found while extending the dissassembler.
2344 * configure.in: Split i386 LynxOS out from other coff targets,
2345 add a specific Lynx emulation.
2346 Add m68k LynxOS target.
2347 * config/tc-i386.c: Define specific Lynx target format.
2348 * config/tc-m68k.c: Define specific Lynx target format.
2349 * config/te-lynx.h: New file.
2351 * config/obj-coffbfd.h: Don't set TARGET_FORMAT to be
2352 "coff-{i386,m68k}" if TARGET_FORMAT already defined.
2353 (INIT_STAB_SECTION): Define.
2354 * config/obj-coffbfd.c: Include <time.h>.
2355 (write_object_file): Look for .stab sections and call
2356 adjust_stab_section.
2357 (adjust_stab_section): New function, fills in the first symbol
2358 of a stab section with number of symbols and string table size.
2359 (obj_coff_init_stab_section): New function, creates the initial
2360 symbol for a stab section.
2364 * config/atof-vax.c (md_atof): Return null on success instead of
2366 * config/atof-tahoe.c (md_atof): Ditto.
2367 * read.c (float_cons): Expect a null pointer for success, not an
2370 * hash.c (hash_insert, hash_jam, hash_grow): Return null pointer
2371 on success, instead of empty string. All callers changed.
2373 * config/tc-vax.c: Use PARAMS in declarations.
2374 (vip_op): Use NULL instead of empty string for success in error
2379 * expr.c (expr) [DIFF_EXPR_OK]: Permit subtraction of two symbols
2380 in different defined segments.
2382 * write.c (relax_segment): Localize "aim" variable. If
2383 DIFF_EXPR_OK, don't impose checks on symbol segment types.
2384 (fixup_segment) [DIFF_EXPR_OK]: If sub_symbolP is in the current
2385 segment, convert to a PC-relative fixup and discard the symbol.
2387 * config/tc-m68k.c (flag_want_pic): New variable, mostly ignored.
2388 (md_parse_option) [TE_SUN3]: Set it for "-k".
2389 (m68k_ip): Generate proper fixup for mode 7.3.
2390 * config/tc-m68k.h (DIFF_EXPR_OK): Define.
2394 * config/tc-m68k.c (struct m68k_incant, getone, gettwo): Moved
2395 earlier in the file.
2396 (insop, add_exp): Now defined as functions, for readability.
2397 (insop): Now takes two arguments; callers changed.
2401 * config/tc-m88k.c (get_o6): new function.
2402 (get_bf, get_cmp, get_cnd, get_cr, get_fcr, get_imm16, get_reg,
2403 get_vec9, getval, get_pcr, calcop, match_name): make static and
2405 (s_file): remove extraneous forward decl.
2406 (md_begin): add const to retval decl.
2407 (calcop): cope with instructions without arguments. Handle 'o'
2408 type argument, the o6 field of the prot insn.
2409 (md_estimate_size_before_relax): return a dummy value.
2411 * config/m88k-opcode.h (m88k_opcodes): comment change; o6 field is
2412 in bits 10 through 7. flt.[dxs]s requires an r register in the
2413 second argument. New instruction lda.x. New instruction muls
2418 * Makefile.in (distclean): Recurse like clean.
2419 * doc/Makefile.in (distclean): New target.
2421 * config/tc-mips.c (md_begin): Set BFD architecture and machine
2422 based on MIPS ISA level.
2426 * as.c (main): "exhausted", not "exhuasted".
2428 * struc-symbol.h (struct symbol): Add sy_used_in_reloc field.
2429 * write.c (adjust_reloc_syms): Set sy_used_in_reloc.
2430 (write_object_file): Never strip symbols with sy_used_in_reloc
2433 * config/obj-elf.c (obj_elf_section): Rewrote to handle both
2434 Solaris and SVR4 style .section pseudo-ops.
2435 (obj_elf_ident): Set SEC_READONLY for .comment section.
2436 * config/tc-sparc.c (md_apply_fix): If this is ELF, and we're
2437 generating a reloc, don't apply a fix.
2441 * config/obj-coffbfd.c (relax_align): Now static.
2445 * read.c (get_stab_string_offset): Make non-static. Make
2446 arguments const. Don't align strings to 4 byte boundaries.
2447 * read.h: Declare get_stab_string_offset.
2448 * config/obj-elf.c (obj_elf_section): Set SEC_ALLOC as well as
2449 SEC_LOAD for progbits section.
2450 (obj_elf_init_stab_section): New function.
2451 (adjust_stab_sections): Add casts to avoid warnings.
2452 * config/obj-elf.h (INIT_STAB_SECTION): Call
2453 obj_elf_init_stab_section.
2454 (OBJ_PROCESS_STAB): Removed definition.
2458 * config/obj-elf.h (S_GET_SIZE): Define.
2459 (obj_frob_forward_symbol): Define.
2460 * config/tc-i386.c (line_comment_chars): Initialize in all cases.
2464 * tc.h: Declare tc_gen_reloc differently depending upon
2465 RELOC_EXPANSION_POSSIBLE.
2466 * config/obj-elf.c (obj_elf_section): Only set flags when first
2467 creating the section.
2471 * config/tc-mips.c (append_insn): Don't swap a trap instruction
2476 * config/obj-elf.c (obj_elf_data, obj_elf_text): New functions;
2477 set previous_section and previous_subsection and then call s_data
2478 and s_text, respectively.
2479 (obj_pseudo_table): Add data and text.
2480 (obj_elf_section): Add SEC_LOAD to default initialization of
2481 flags. Treat .rodata1 like .rodata. Set SEC_LOAD as well as
2482 SEC_ALLOC for "alloc" string. Don't bother trying to find the
2483 section; just use subseg_new.
2485 * read.c (change_to_section): Removed. This is now done by
2487 (get_stab_string_offset): Rearranged somewhat. Create the section
2488 using subseg_new. Store the string index in seg_info, rather than
2489 in a static variable. Force the first string to be empty. Use
2490 frag_more rather than FRAG_APPEND_1_CHAR.
2491 (s_stab_generic): Rewrote.
2492 * subsegs.h (segment_info_type): Added stabu union.
2493 * subsegs.c (subseg_new): Initialize stab_string_size to 0.
2494 * config/obj-aout.c: Don't include aout/stab_gnu.h.
2495 (obj_aout_stab, obj_aout_desc): Removed.
2496 (obj_pseudo_table): Removed desc and stabX entries.
2497 * config/obj-bout.c: Same changes as config/obj-aout.c.
2498 * config/obj-bout.h (S_SET_TYPE): Define.
2499 (tc_bout_fix_to_chars): Declare.
2500 * config/obj-coff.c (obj_coff_stab): Removed.
2501 (obj_pseudo_table): Removed desc and stabX entries.
2502 * config/obj-coff.h (SEPARATE_STAB_SECTIONS): Define.
2503 * config/obj-coffbfd.c (current_stab_symbol): Removed.
2504 * config/obj-coffbfd.h (obj_symbol_type): Removed n_strx, n_type,
2505 n_other, n_desc and n_value fields.
2506 (S_{S,G}ET_{OFFSET,OTHER,TYPE,DESC}): Removed.
2507 (MAKE_STAB_SYMBOL): Removed.
2508 * config/obj-ecoff.c (obj_ecoff_stab): Renamed to ecoff_stab.
2509 Changed arguments and removed parsing code.
2510 (obj_pseudo_table): Removed stabX entries.
2511 * config/obj-ecoff.h (ecoff_stab): Declare.
2512 (OBJ_PROCESS_STAB): Define.
2513 * config/obj-elf.c: Don't include aout/stab_gnu.h.
2514 (obj_elf_stab, obj_elf_xstab, obj_elf_desc,
2515 elf_stab_symbol_string, elf_stab_symbol, obj_elf_stab_generic):
2517 (obj_pseudo_table): Removed desc, stabX and xstabs entries.
2518 (obj_elf_version): Use subseg_new, not bfd_make_section. Don't
2519 set SEC_LOAD for .note section.
2520 (adjust_stab_sections): Get frag pointer from seg_info, rather
2521 than looking through frags.
2522 * config/obj-elf.h (S_{S,G}ET_{OTHER,TYPE,DESC}): Removed.
2523 (SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB):
2525 * config/obj-vms.c (obj_aout_stab): Removed.
2526 (obj_pseudo_table): Removed stabX entries.
2527 * config/obj-vms.h (S_SET_TYPE): Define.
2529 * as.h: Declare listing.
2530 * read.c: Don't declare listing.
2531 (emit_expr): Cast fix_new_exp argument.
2532 (parse_bitfield_cons): Correct printf format.
2533 * symbols.c (symbol_new): Add cast to avoid warning.
2534 * write.h: Declare text_last_frag and data_last_frag.
2535 * config/obj-bout.c (obj_bout_line): Added dummy argument.
2536 * config/obj-coffbfd.c: Add some casts to avoid warnings.
2537 * config/tc-a29k.c: Likewise.
2538 * config/tc-i960.c: Likewise. Also fully bracket structure
2539 initializations, fix printf formats, and remove unused variables.
2543 * read.c (s_desc): Only compile and use if S_SET_DESC is defined.
2544 * struc-symbol.h: Declare verify_symbol_chain and
2545 verify_symbol_chain_2 even if not SYMBOLS_NEED_BACKPOINTERS.
2546 * symbols.c (verify_symbol_chain): Removed useless expression.
2547 * write.c (headers, the_object_file): Only use if not
2548 BFD_ASSEMBLER and not BFD.
2549 (fixup_segment, cvs_frag_to_fill): Only use if BFD_ASSEMBLER or
2551 (merge_data_into_text): Only use if BFD_ASSEMBLER or (not BFD and
2553 * write.h: Declare relax_segment.
2554 * config/obj-coffbfd.c (stack_pop, stack_push, stack_init): Made
2556 (stack_top): Commented out, since it's not used.
2557 Fixed up pseudo-op functions to take an ignored int argument.
2558 (size_section): Added default BAD_CASE to switch.
2559 Changed bzero calls to memset.
2560 * config/obj-coffbfd.h (S_IS_LOCAL): Call strchr on S_GET_NAME
2561 (s), not on s itself.
2562 * config/tc-a29k.c (s_use): Take ignored int argument. Only
2563 define if OBJ_COFF is not defined.
2564 * config/tc-i386.c: (fits_in_signed_byte, smallest_imm_type): Make
2565 argument signed again.
2566 * config/tc-m68k.c (s_bss, s_even, s_proc): Take ignored int
2568 (m68k_ip): Fully bracket initialization of archs.
2569 Correct several formats for __LINE__ to be %d rather than %s.
2570 (init_table): Fully bracket initialization.
2571 Cast values larger than 0x7f assigned to fr_opcode to char.
2573 * subsegs.c: Renamed non-BFD_ASSEMBLER subseg_new to subseg_set.
2574 Wrote non-BFD_ASSEMBLER subseg_new. Now subseg_new always takes a
2575 section name, and subseg_set always takes a segT. Changed all
2576 callers as appropriate.
2577 * config/obj-coffbfd.c (change_to_section): Renamed to
2578 obj_coff_add_segment. Corrected. Made callers use subseg_new.
2579 * config/obj-coffbfd.h (obj_segment_name, obj_add_segment):
2584 * config/tc-sparc.h (LOCAL_LABEL): Remove test for name[0] == 'L'.
2588 * config/obj-elf.h (S_SET_SIZE): Actually set the size.
2591 * Added a number of casts to function calls.
2592 * app.c (do_scrub_begin), as.c (main), expr.c (integer_constant,
2593 operand, expr), read.c (read_begin, HANDLE_CONDITIONAL_ASSEMBLY,
2594 read_a_source_file, s_align_bytes, demand_empty_rest_of_line,
2595 ignore_rest_of_line, big_cons, is_it_end_of_statement, s_ignore),
2596 read.h (is_name_beginner, is_part_of_name), config/obj-elf.c
2597 (obj_elf_section), config/tc-i386.c (parse_register),
2598 config/tc-sparc.c (isoctal, s_proc): Cast char
2599 array indices to unsigned char.
2600 * app.c (process_escape): Make static. Add prototype. Change
2601 argument from char to int.
2602 * as.c: Include output-file.h for prototypes. Comment out unused
2604 * Makefile.in (as.o): Depend on output-file.h.
2605 * as.h (BAD_CASE): Cast val argument to long, and use %ld.
2606 (pseudo_typeS): Add prototype to poc_handler field.
2607 (print_version_id): Add prototype.
2608 (xmalloc, xrealloc): Change size arguments to unsigned long.
2609 (do_scrub_next_char): Add prototypes for function arguments.
2610 (had_errors, had_warnings, scrub_from_file): Remove duplicate
2612 * atof-generic.c (atof_generic): Make size variables unsigned.
2613 * cond.c (ignore_input): Removed unused local variable ptr.
2614 * expr.c (floating_constant, integer_constant): Make static. Add
2616 * flonum-copy.c (flonum_copy): Make size variables unsigned.
2617 * frags.h: Add prototype for frag_init.
2618 * hash.h, hash.c: Change hash values from char * to PTR, make hash
2619 strings const, make returned error strings const char *. Added
2620 prototypes for functions.
2621 * input-file.h, input-file.c (input_file_buffer_size): Return
2623 * input-scrub.c (buffer_length): Make unsigned.
2624 (input_scrub_push, input_scrub_pop): Make static.
2625 * listing.c (list_symbol_table): Cast sprintf argument to unsigned
2626 long and use %lx. Print name of segment rather than address of
2628 (listing_list, listing_title): Change argument to int.
2629 (listing_eject, listing_flags, listing_psize): Add int argument.
2630 * listing.h: Corresponding declaration changes.
2631 * obj.h (obj_emit_symbols): Rename prototype argument to avoid
2633 * read.h: Change get_absolute_expression prototype to return
2634 offsetT. Add prototype for next_char_of_string. Various
2636 * read.c: Remove prototype for next_char_of_string.
2637 (pobegin): Make errtxt const. Make new_length, tmp_len and num
2639 (s_abort, s_align_ptwo, s_comm, s_data, s_app_line, s_fill,
2640 s_globl, s_lsym, s_org, s_set, s_text, s_desc): Add int argument.
2642 (s_comm): Change temp from valueT to offsetT. Cast to long when
2643 printing and use %ld (only for error messages anyhow).
2644 (s_long, s_int): Remove unused functions.
2645 (cons): Change argument to int.
2646 (emit_expr): Use %lx when printing longs.
2647 (get_absolute_expression): Return offsetT, not long.
2648 (get_stab_string_offset): Comment out unless
2649 SEPARATE_STAB_SECTIONS.
2650 (s_stab_generic): Remove unused offset. Define seg_is_new only
2651 if SEPARATE_STAB_SECTIONS. Use toP only in local block.
2652 * struc-symbol.h (verify_symbol_chain_2): Add prototype.
2653 * symbols.c: Remove nested comment.
2654 (symbol_new): Rename value to valu.
2655 (colon): Use %ld and cast to long in error message.
2656 * symbols.h: Remove duplicate verify_symbol_chain declaration.
2657 * tc.h: Remove unused md_emit_relocations declaration.
2658 (tc_gen_reloc): Add declaration.
2659 * write.c (cvt_frag_to_fill): Change first argument name depending
2661 (write_relocs): Remove unused offset, frags. Remove tc_gen_reloc
2662 declarations. Make n unsigned.
2663 (write_contents): Remove unused i, n, relocs, fixp. Rename frags
2664 to f to avoid shadowing.
2665 (write_object_file): Define fragP only if not BFD_ASSEMBLER or not
2666 WORKING_DOT_WORD. Remove unused keep. Only declare punt and
2667 punt_it if they will be used. Make i and n unsigned.
2668 (fixup_segment): Cast to long and use %ld in error message.
2669 * xmalloc.c (xmalloc, xrealloc): Make size argument unsigned.
2670 * config/obj-aout.h: Remove nested comment. Add prototype for
2671 obj_aout_frob_symbol.
2672 (obj_aout_line, obj_aout_desc): Add int argument.
2673 * config/obj-ecoff.c: Changed build routines to use an unsigned
2675 (add_string): Make len unsigned long.
2676 (obj_ecoff_stab): Use %lu in error message.
2677 * config/obj-elf.c (obj_elf_common): Comment out unused label
2679 (obj_elf_frob_symbol): Return 0 (currently broken).
2680 (obj_elf_desc, obj_elf_version, obj_elf_size, obj_elf_type,
2681 obj_elf_ident, obj_elf_weak, obj_elf_local, obj_elf_common,
2682 obj_elf_line, obj_elf_previous): Add int argument.
2683 (obj_elf_write_symbol_p): Make static.
2684 * config/obj-elf.h (obj_elf_write_symbol): Add prototype.
2685 * config/tc-hppa.h: Remove declarations of functions declared in
2687 * config/tc-i386.c (ENCODE_RELAX_STATE): Cast to relax_substateT.
2688 (s_bss): Add int argument.
2689 (fits_in_signed_byte, smallest_imm_type): Make argument unsigned.
2690 (dummy): Remove unused function.
2691 (md_assemble): Rename local o to op to avoid shadowing.
2692 (tc_gen_reloc): Rename local reloc to rel to avoid shadowing.
2693 * config/tc-m68k.c (s_data1, s_data2): Add int argument.
2694 * config/tc-mips.c (mips_ip, md_apply_fix): Cast to long and use
2695 %ld in error messages.
2696 * config/tc-sparc.c: Remove duplicate declarations.
2697 (getExpression): Rewrite condition to avoid empty conditional
2699 (s_reg, s_proc, s_reserve, s_common, s_seg, s_xword): Add int
2704 Changes from Jeff Law:
2706 * config/tc-hppa.c (md_assemble): Fix typo.
2707 (pa_ip): Delete unused variables and labels. Do not check for
2708 unsigned values being < 0, it can't happen.
2709 (is_same_frag): Return a value in recursive call case.
2710 (pa_callinfo): Delete unused variables and labels.
2711 (pa_comm): Likewise.
2712 (pa_copyright): Likewise.
2713 (pa_export): Likewise.
2714 (pa_import): Likewise.
2715 (pa_param): Likewise.
2716 (pa_space): Likewise.
2717 (pa_subspace): Likewise.
2721 * read.c (get_stab_string_offset, s_stab_generic): If
2722 BFD_ASSEMBLER, call subseg_set rather than subseg_new.
2726 * config/obj-elf.c (obj_elf_section): Set SEC_LOAD when using
2727 default flag values.
2731 * read.c: (change_to_section): Don't include body if not MANY_SECTIONS.
2733 * read.c: (s_stab, s_xstab, s_desc): New functions to parse
2734 various stab-related directives.
2735 * read.h: (s_stab, s_xstab, s_desc): New function prototypes.
2736 * write.c: (merge_data_into_text): Fix ifdef tangle.
2737 * config/obj-coffbfd.c (current_stab_symbol): Fake symbol
2738 for stab reader to use.
2739 * config/obj-coffbfdh.h (obj_symbol_type): Added fields for
2740 stab reader, macros to access.
2744 * config/obj-elf.h (elf_symbol): Fixed name of elf_symbol_type.
2746 * config/tc-hppa.h (struct default_subspace_dict, struct
2747 default_space_dict): Field "sort" is now unsigned char.
2749 * config/tc-hppa.c (pa_def_subspaces, pa_def_spaces): Align
2750 columns for easier reading.
2751 (bcmp, index): Deleted USG-specific definitions. Should be dealt
2752 with in ho-*.h, or in libiberty. Changed mention of index to
2754 (label_symbolP, label_symbol_defined, callinfo_found,
2755 within_entry_exit, exit_processing_complete, within_procedure,
2756 pa_def_subspaces, pa_def_spaces, pa_pseudo_op_moves_pc,
2757 label_symbols_rootP, pa_get_label, pa_label_is_defined,
2758 pa_undefine_label): Now static.
2759 (movers): Now const, in addition to pointing to const data.
2760 * config/tc-hppa.h (label_symbolS_rootP, pa_get_label,
2761 pa_label_is_defined, pa_undefine_label, pa_pseudo_op_moves_pc):
2762 Delete declarations.
2764 Merged more changes from Jeff Law and Pete Hoogenboom:
2766 * config/tc-hppa.c (pa_def_subspaces, pa_def_subspaces): Remove
2767 entries for .stab and .stabstr.
2769 * config/obj-elf.c: (elf_stab_symbol_string): Set the
2770 SEC_LOAD attribute for the .stabstr section.
2771 (obj_elf_stab_generic): Set the SEC_LOAD attribute for the
2773 (obj_elf_stab_generic): Change '#if 1' to '#if 0'.
2774 (obj_elf_stab_generic): Incorrect byte count on call to
2775 md_number_to_chars function.
2777 * config/tc-hppa.c (hppa_tc_symbol): Static functions need
2778 argument relocation bits too.
2780 * config/tc-hppa.c (pa_stringer): Correctly handle escaping
2781 characters which should appear unaltered in the output string (for
2782 example an escaped double-quote).
2784 * config/tc-hppa.c (pa_parse_nonneg_cmpsub_cmpltr): Always
2786 (pa_parse_neg_cmpsub_cmpltr): Likewise.
2787 (pa_parse_nonneg_add_cmpltr): Likewise.
2788 (pa_parse_neg_add_cmpltr): Likewise.
2790 * config/tc-hppa.h (parse_cons_expression_hppa): Remove prototype
2792 (cons_fix_new_hppa): Likewise.
2793 * config/tc-hppa.c (md_apply_fix): Fix type of valp to match
2796 * config/tc-hppa.c: Include libhppa.h.
2798 * config/tc-hppa.h: Delete extern declarations of functions
2801 * config/tc-hppa.c (pa_space): Rework to avoid unwanted #ifdef
2802 OBJ_ELF conditionals.
2803 * config/tc-hppa.h (LOCAL_LABEL): Correctly identify local labels
2808 * config/tc-mips.c (macro_build): Accept 'z', and ignore it.
2809 (macro): Use "z,s,t" for div instructions to match corresponding
2810 change in opcode table.
2811 (mips_ip): Added 'z'--must be zero register.
2815 * write.c (write_relocs) [RELOC_EXPANSION_POSSIBLE]: Declare
2816 tc_gen_reloc correctly.
2818 * configure.in: Use "case" instead of "if" when possible. Rewrote
2819 Makefile editing to reduce work done. Treat "hppa*" as "hppa".
2823 * config/obj-coffbfd.c (obj_coff_section): add 'd' as an alias for
2824 section type of data. 'd' seems to be used for m88k.
2828 * config/tc-mips.c (mips_align, s_stringer, s_cons, s_float_cons,
2829 s_mips_space): Set insn_label to NULL to avoid changing it at the
2830 next .align statement.
2831 (append_insn): Don't swap jal with instruction that sets the
2832 register that jal sets.
2836 * configure.in: recognize m88110.
2840 Merged changes from Pete Hoogenboom and Jeff Law at Utah:
2841 * config/tc-hppa.c (pa_build_unwind_subspace): SEC_ALLOC should
2842 not be on for .hppa_unwind.
2843 (md_pseudo_table): .PARAM and .param are valid pseudo-ops for GAS.
2844 (pa_param): New function to handle .PARAM directives.
2845 (pa_ip): Pass "isbranch" argument down to pa_parse_*_compltr
2846 functions. Handle '|' for movb; allow movb,n.
2847 (pa_parse_nonneg_cmpsub_cmpltr): Delete old useless
2848 version. Handle cases where no completer exists for
2850 (pa_parse_neg_cmpsub_cmpltr): Handle cases where no
2851 completer exists for comb,n or addb,n. Make logic
2852 mirror that of pa_parse_nonneg_cmpsub_cmpltr.
2853 (pa_parse_nonneg_add_cmpltr): Likewise.
2854 (pa_parse_neg_add_cmpltr): Likewise.
2855 * tc-hppa.h (pa_param): Declare.
2859 * config/tc-hppa.c (hppa_tc_make_symextn_section): Now static.
2860 Added forward declaration.
2862 Merged changes from Pete Hoogenboom and Jeff Law at Utah:
2864 * config/obj-elf.c (elf_frob_file): Arguments were incorrect on
2865 call to elf_tc_make_sections.
2866 (obj_elf_version): A .note section shouldn't have the SEC_ALLOC
2869 * config/tc-hppa.c (hppa_tc_make_sections): Add some processing to
2870 handle symbol extension sections.
2872 * config/tc-hppa.c (pa_build_symextn_section): New function to
2873 create a symbol extension section.
2874 (pa_export_args): Make call to pa_build_symextn_section.
2875 (hppa_tc_symbol, hppa_tc_make_sections,
2876 hppa_tc_make_symextn_section): New functions.
2877 * config/tc-hppa.h: Update elf_tc_symbol and elf_tc_make_sections
2880 * read.c (emit_expr): Place check for TC_CONS_FIX_NEW in the
2881 BFD_ASSEMBLER branch as well.
2883 * config/tc-hppa.h: If ELF is the target object format, define
2884 some ELF- and hppa-specific types and constants.
2886 * config/tc-hppa.c (getExpression): Fix a typo.
2888 * read.c (read_a_source_file): Use TC_EQUAL_IN_INSN to determine
2889 if a `=' is part of an instruction.
2890 (read_a_source_file): Handle case where end-of-line markers are
2891 also used within instructions.
2892 * config/tc-hppa.h (TC_EQUAL_IN_INSN, TC_EOL_IN_INSN): Define.
2894 * config/tc-hppa.c (md_apply_fix_1): Keep relocations for
2895 out-of-range branches/'calls using "bl" or calls which may need
2896 argument relocation stubs. Do not need/keep relocations for
2897 conditional branches.
2898 (elf_hppa_final_processing): Fix calculation of function size.
2900 * config/obj-elf.c (obj_elf_version): Mark .note section as
2903 * config/tc-hppa.c (parse_cons_expression_hppa): Pass exp, not the
2904 address of exp, to expression.
2905 (pa_build_unwind_subspace): Turn SEC_HAS_CONTENTS flag on.
2906 (md_apply_fix_1): Delete unwanted comments.
2907 (process_exit): Symbols marking the end of a function are always
2910 * config/tc-hppa.c: Include elf32-hppa.h from BFD tree.
2911 (pa_space): Declare and initialize gdb_section.
2913 * config/obj-elf.c (elf_frob_file): Change
2914 elf_tc_final_processing_hook to elf_tc_final_processing.
2916 * config/tc-hppa.c (fix_new_hppa): Fix argument list to match
2917 argument type declarations.
2918 (getExpression): Fix typo.
2919 (pa_export_args): Change elf_symbol_type to elf32_symbol_type.
2920 (elf_hppa_final_processing): Likewise. Name changed from
2921 elf_hppa_final_processing_hook.
2922 (start_symbol_root, start_symbol_last): Deleted.
2924 * config/tc-hppa.h (TC_PARSE_CONS_EXPRESSION): Fix typo.
2926 * config/tc-hppa.h: Replace "symbolS" with "struct symbol" to
2927 avoid changing include ordering.
2929 * config/tc-hppa.c (pa_ip, case 'y'): Handle just like 't'.
2933 * config/tc-mips.c (set_at): Added unsignedp argument. Use
2935 (set_at_unsigned): Removed; changed callers to use set_at.
2936 (load_register): Removed unused ip argument. Changed callers.
2937 (append_insn): Don't swap branch and branch likely.
2938 (macro_build): Handle 'u'.
2939 (load_register): Handle 64 bit constants.
2940 (macro): Added M_DABS, removed M_ABSU. Numerous changes to
2941 support 64 bit constants.
2942 (mips_ip): Use hex constants in range checks for clarity.
2943 (md_number_to_chars): Support 8 byte values.
2947 * config/tc-m88k.h: updated copyrights.
2948 (TC_CONS_RELOC): declare to be RELOC_32.
2952 * config/tc-mips.c (mips_isa): New static variable.
2953 (md_begin): Initialize mips_isa based on TARGET_CPU. Don't sanity
2954 check macros. Set text alignment and GP size here.
2955 (md_assemble): Don't set text alignment and GP size here.
2956 (append_insn): Don't insert NOPs for load delays if mips_isa >= 2.
2957 Use the right mask and shift for WRITE_FPR_T and WRITE_FPR_S. Add
2958 a NOP after a branch likely.
2959 (mips_emit_delays): Don't insert NOPS for load delays if mips_isa
2961 (macro): Support r6000 and r4000 macros.
2962 (mips_ip): Check insn ISA level against mips_isa before using it.
2963 Added 'x' case for ignored register.
2964 (md_parse_option): Handle -mipsN and -mcpu=XX.
2968 * config/tc-i386.c (md_pseudo_table) [OBJ_ELF]: Handle ".zero".
2972 * config/tc-sparc.c (s_local): Function moved and renamed...
2973 * config/obj-elf.c (obj_elf_local): ...to here.
2974 * config/tc-sparc.c (md_pseudo_table), config/obj-elf.c
2975 (obj_pseudo_table): Move handling of ".local".
2977 * tc.h (md_parse_option): Don't declare if defined as a macro.
2979 * config/tc-i386.h (NO_RELOC) [BFD_ASSEMBLER]: Define as
2981 (md_parse_option): New macro, converted from function.
2982 * config/tc-i386.c (md_parse_option): Function deleted.
2983 (comment_chars) [OBJ_ELF]: Include "/".
2984 (line_comment_chars) [OBJ_ELF || TE_I386AIX]: Don't include "/".
2985 (md_assemble): Cast 0xe9 to char explicitly, to avoid compiler
2987 (md_assemble, md_estimate_size_before_relax, md_create_long_jump):
2988 Call reloc for fix_new type, or use correct enumerator, instead of
2989 always using NO_RELOC.
2990 (i386_operand): Change "ifndef I386COFF" to "ifdef OBJ_AOUT" for
2991 tests for valid section.
2992 (md_convert_frag) [BFD_ASSEMBLER]: Compensate for frag start
2994 (md_apply_fix_1) [BFD_ASSEMBLER]: For pc-relative reloc with
2995 symbol, compensate for location of reloc.
2996 (reloc, BFD_RELOC_32, BFD_RELOC_32_PCREL) [!BFD_ASSEMBLER]: Define
3001 * config/obj-elf.c: Undef NO_RELOC before including aout/aout64.h.
3002 (obj_elf_weak): New function.
3003 (obj_pseudo_table): Handle ".weak".
3004 (obj_elf_section): If section directive includes a string, ignore
3005 it for now. Accept "progbits" flag.
3006 (obj_elf_type): Accept `@' before flag name.
3008 * write.c (relax_and_size_seg) [BFD_ASSEMBLER]: Get rid of `if(1)'
3010 (fixup_segment) [BFD_ASSEMBLER]: Use bfd_is_com_section, rather
3011 than checking for bfd_com_section directly.
3012 (fixup_segment): Simplify range check.
3013 (fixup_segment) [OBJ_COFF && TC_I960]: Simplify cpp condition
3016 * symbols.h (S_SET_WEAK): Declare.
3017 * symbols.c (S_SET_WEAK): New function.
3018 (S_SET_EXTERNAL, S_CLEAR_EXTERNAL): Don't bother with BSF_EXPORT,
3019 it's not a separate flag any more. Clear BSF_WEAK.
3021 * read.c (potable): Treat "string" like "asciz".
3025 * config/tc-mips.c (append_insn): Don't swap branch instructions
3026 if .set nobopt or .set volatile.
3027 (gp_reference): .lit8 and .lit4 are accessed via the GP register.
3028 (macro): Added cases M_LI_S, M_LI_SS. Fixed M_LI_D and M_LI_DD.
3029 (mips_ip): Added cases 'F', 'L', 'f', 'l' for floating point.
3030 * config/obj-ecoff.c: Renamed some variables to avoid shadow
3035 * config/obj-coff.h (S_IS_COMMON): add missing backslash
3037 * configure.in (z8k-*-{coff,sim}): use coffbfd for this target
3041 * config/tc-mips.c (mips_ip): Suggested by
3043 names for 'E' and 'G' argument types (coprocessor registers) and
3044 don't warn if $1 is used on the coprocessor.
3045 (macro): Handle M_{L,S}WC{0,2,3}_AB correctly.
3049 * read.c (emit_expr): Use BFD_RELOC_16 for 2-byte values.
3050 * config/tc-sparc.c (md_apply_fix, tc_gen_reloc): Handle
3052 * config/tc-sparc.h (WORKING_DOT_WORD): Define.
3056 * write.c (merge_data_into_text): Define only if BFD_ASSEMBLER is
3057 defined or BFD is not.
3058 (relax_and_size_all_segments): Declare local variable fragP.
3062 * config/tc-sparc.c (md_apply_fix, case BFD_RELOC_32): Fill in
3063 bytes with real values, not zeros.
3067 * configure.in (mips-*-riscos*, mips-*-sysv*): New (untested)
3068 targets, using ecoff and mips-big.
3071 Johnson): Added case for 'C' for coprocessor instruction codes.
3075 * config/obj-elf.c (obj_pseudo_table): Handle ".8byte".
3077 * read.c (emit_expr): Use BFD_RELOC_64 for 8-byte expressions.
3079 * write.c (write_object_file): Test DEBUG_SYMS instead of DEBUG
3080 for verifying symbol chain.
3081 (merge_data_into_text, relax_and_size_all_segments): New
3082 functions, split out from write_object_file.
3086 * config/obj-elf.c (obj_elf_stab_generic, in disabled code): If
3087 debug section is new, allocate an extra 12 bytes at its start. If
3088 ".stabs" type is N_SO, fill in filename symbol field of that first
3089 entry. Return early if "goof", to simplify later code slightly.
3090 (adjust_stab_sections): New function.
3091 (elf_frob_file): Apply adjust_stab_sections to each section.
3093 * config/obj-elf.c (obj_elf_section, obj_elf_previous): No longer
3095 * config/obj-elf.h (obj_elf_section, obj_elf_previous): Declare.
3096 * config/tc-sparc.c (md_pseudo_table): Call them for "pushsection"
3097 and "popsection", and call cons for "uaword" and "uahalf".
3099 * config/obj-elf.c (obj_elf_version): Use English in error
3104 * config/obj-ecoff.c: Updated for BFD ECOFF changes. Now gets the
3105 swapping routines and external structure sizes via the
3106 ecoff_backend information. No longer includes coff/mips.h.
3110 * config/obj-ecoff.c (get_tag): Save tag name in permanent memory
3111 and in hash_ptr->string.
3113 * app.c (do_scrub_next_char): Reset state to 0 after .appline if
3114 file name is not seen.
3118 * write.c: Don't use short int in a prototype.
3120 * expr.c (operand): Make return value simply depend on contents of
3121 returned expression.
3125 * configure.in: sparc*-aout and sparc*-vxworks are BFD assemblers
3129 * config/ho-sunos.h: remove some old function decls that conflict
3130 w/ ANSI, and which weren't needed anyway
3134 * config/obj-elf.h (obj_frob_symbol): Renamed from tc_frob_symbol,
3135 and disabled since it breaks Ian's new symbol-value code.
3137 * expr.c (integer_constant): Accept more digits if BFD64.
3141 * config/tc-m68k.c (m68k_ip): If we have a normal constant when we
3142 expect a bignum, turn it into a bignum. Output extra zeroes
3143 before a short bignum, rather than after.
3147 * symbols.c (symbol_new): Conditionalize verify_symbol_chain call
3148 on DEBUG_SYMS, not DEBUG.
3149 (symbol_remove): Likewise.
3150 (symbol_insert): Likewise.
3154 * config/tc-mips.c (mips_optimize): New static variable.
3155 (append_insn): If mips_optimize == 0, always insert NOP
3156 instructions. If mips_optimize < 2, don't swap branches.
3157 (md_parse_option): If -Ox or -gx, set mips_optimize accordingly.
3161 * Makefile.in (clean): if testsuite does not exist, then skip it.
3165 * config/tc-mips.c (prev_insn_unreordered,
3166 prev_prev_insn_unreordered): New static variables.
3167 (append_insn): Don't swap branch instruction if
3168 prev_prev_insn_unreordered (see comment).
3169 (mips_no_prev_insn): Clear the unreordered variables.
3170 (s_mipsset): When turning on reordering, set the unreordered
3175 * config/obj-elf.c (obj_elf_section): Sections ".init" and ".fini"
3176 are also magic, and have special default flag settings.
3177 (obj_elf_frob_symbol): Since the return value from this function
3178 isn't used, don't bother calling obj_elf_write_symbol_p, since it
3179 doesn't accomplish anything else.
3181 * config/tc-sparc.c (md_section_align): Round up section size only
3184 * symbols.c: Don't define DEBUG by default.
3188 * write.c (fix_new_exp): Handle a O_uminus expression.
3190 * expr.c (expr): Don't let absolute_section override
3191 undefined_section for the return value.
3193 * read.c (read_a_source_file): In NO_PSEUDO_DOT case, if we find a
3194 pseudo-op with a poc_handler field of NULL, ignore it and treat it
3195 as an instruction instead.
3196 * config/tc-m88k.c (md_pseudo_table): Add "set" with a NULL
3199 * config/tc-h8500.c (md_begin): Use a local variable when
3200 initializing md_relax_table to avoid warnings about modifying a
3201 supposedly const data structure.
3205 * config/obj-aout.c: Only include aout/aout64.h if BFD_ASSEMBLER
3210 * configure.in (case ${host}): Map *-*-sysv4* to gas_host=sysv.
3211 * configure.in (case ${generic_target}): Add i[34]86-*-sysv4*
3212 case to set obj_format=elf. Must go before i386-*-sysv* case that
3213 sets obj_format=coffbsd. Add *-*-sysv4* to *-*-elf and
3214 *-*-solaris case, and move to before *-sysv* case that wants to
3215 set obj_format to coff.
3216 * config/tc-i386.c (i386_operand): Change all 'exp.X_op' to
3218 * config/tc-i386.c (md_apply_fix): Fix valp to be 'valueT *' for
3223 * config/obj-aout.c: Include aout/aout64.h.
3224 (obj_aout_frob_symbol): Set BSF_DEBUGGING for a constructor
3225 symbol, so that BFD doesn't tamper with the type.
3227 * read.c (read_a_source_file): If NO_PSEUDO_DOT is defined, look
3228 up opcodes as pseudo-ops even if they don't start with '.'.
3229 * config/tc-m88k.h (NO_PSEUDO_DOT): Define.
3230 * config/tc-m88k.c (md_assemble): Removed special pseudo-op
3232 (md_apply_fix): Set fx_offset to the upper 16 bits of the reloc.
3233 Output the low 16 bits for RELOC_HI16, not the high 16 bits.
3234 * config/obj-coffbfd.c (do_relocs_for): If TC_M88K, set the
3235 r_offset field of the reloc to the fixup offset.
3236 (fixup_segments): If TC_M88K, don't warn about fixup overflows.
3237 * doc/as.texinfo: Minor updates.
3241 * Extensive changes to permit symbols to contain any expression
3242 type and to delay the computation of the expression until the
3243 value is actually needed. This permits setting symbols to values
3244 calculated based on object code size. Expressions were changed to
3245 no longer be in a section, to stop the overloading of segment and
3246 expression type that previously occurred.
3248 * as.c (big_section, pass1_section, diff_section, absent_section):
3250 (expr_section): Added (used for dummy symbols which hold
3251 intermediate expression values).
3252 (perform_an_assembly_pass): Create expr_section, do not create the
3253 sections now removed.
3254 * as.h (segT): Removed SEG_ABSENT, SEG_PASS1, SEG_BIG, and
3255 SEG_DIFFERENCE. Added SEG_EXPR.
3256 (SEG_NORMAL): Corresponding changes.
3257 * subsegs.c (seg_name, subsegs_begin): Changed accordingly.
3258 * write.c (write_object_file): Ditto.
3259 * config/obj-aout.c (seg_N_TYPE): Ditto.
3260 * config/obj-bout.c (seg_N_TYPE): Ditto.
3261 * config/obj-coff.c (seg_N_TYPE): Ditto.
3262 * config/obj-coffbfd.c (seg_N_TYPE): Ditto.
3263 * config/obj-vms.c (seg_N_TYPE): Ditto.
3265 * expr.h (operatorT): Moved in from expr.c, added some values.
3266 (expressionS): Added X_op field, removed X_seg field; renamed
3267 X_subtract_symbol to X_op_symbol.
3268 * expr.c: Extensive changes to assign expression types rather than
3269 sections and to simplify the parsing.
3270 * write.c (fix_new_internal): New static function.
3271 (fix_new): Removed sub_symbol argument.
3272 (fix_new_exp): New function, takes expression argument.
3273 * write.h: Prototype changes for fix_new and fix_new_exp.
3274 * cond.c (s_if): Changed accordingly.
3275 * read.c (s_lsym, pseudo_set, emit_expr, parse_bitfield_cons,
3276 parse_repeat_cons, get_segmented_expression,
3277 get_known_segmented_expression, get_absolute_expression): Ditto.
3278 * symbols.c (resolve_symbol_value, S_GET_VALUE, S_SET_VALUE):
3280 * write.c (write_object_file): Ditto.
3281 * config/obj-coff.c (obj_coff_def, obj_coff_val): Ditto.
3282 * config/obj-coffbfd.c (obj_coff_def, obj_coff_val,
3283 obj_coff_endef, yank_symbols): Ditto.
3284 * config/obj-elf.c (obj_elf_stab_generic, obj_elf_size): Ditto.
3285 * config/tc-a29k.c (md_assemble, parse_operand, machine_ip,
3286 print_insn, md_operand): Ditto.
3287 * config/tc-h8300.c (parse_exp, colonmod24, check_operand,
3288 do_a_fix_imm, build_bytes): Ditto.
3289 * config/tc-h8500.c (parse_exp, skip_colonthing, parse_reglist,
3290 get_specific, check, insert, md_convert_frag): Ditto.
3291 * config/tc-hppa.c (the_insn, fix_new_hppa, cons_fix_new_hppa,
3292 md_assemble, pa_ip, getExpression, getAbsoluteExpression,
3293 evaluateAbsolute, pa_build_unwind_subspace, pa_entry,
3294 process_exit): Ditto.
3295 * config/tc-hppa.h (STAB_FIXUP, is_DP_relative, is_PC_relative,
3297 * config/tc-i386.c (pe, md_assemble, i386_operand,
3298 md_estimate_size_before_relax, md_create_long_jump): Ditto.
3299 * config/tc-i860.c (md_assemble, getExpression, print_insn):
3301 * config/tc-i960.c (parse_expr, subs, segs, md_convert_frag,
3302 get_cdisp, mem_fmt, parse_ldconst, relax_cobr, s_sysproc,
3303 i960_handle_align): Ditto.
3304 * config/tc-m68k.c (struct m68k_exp, struct m68k_it, seg, op,
3305 subs, add_fix, isvar, m68k_ip, md_assemble, md_convert_frag_1,
3306 md_estimate_size_before_relax, md_create_long_jump, get_num):
3308 * config/tc-m88k.c (md_assemble, get_imm16, get_pcr,
3309 md_create_short_jump, md_create_long_jump): Ditto.
3310 * config/tc-mips.c (md_assemble, append_insn, gp_reference,
3311 macro_build, macro, my_getExpression): Ditto. Also removed
3312 get_optional_absolute_expression; just use get_absolute_expression
3314 * config/tc-ns32k.c (get_addr_mode, evaluate_expr, convert_iif,
3315 fix_new_ns32k, fix_new_ns32k_exp, cons_fix_new_ns32k): Ditto.
3316 * config/tc-ns32k.h (fix_new_ns32k prototype): Ditto.
3317 * config/tc-sh.c (parse_exp, check, insert, md_convert_frag):
3319 * config/tc-sparc.c (md_assemble, sparc_ip, getExpression,
3321 * config/tc-tahoe.c (struct top, md_estimate_size_before_relax,
3322 tip_op, md_assemble): Ditto.
3323 * config/tc-vax.c (seg_of_operand, md_assemble,
3324 md_estimate_size_before_relax, md_create_long_jump): Ditto.
3325 * config/tc-z8k.c (parse_exp, check_operand, newfix): Ditto.
3329 * configure.in: i386-lynx is the same as i386-coff
3333 * config/obj-elf.c (obj_elf_previous): New function.
3334 (previous_section, previous_subsection): New vars.
3335 (obj_elf_section): Save current place in case DWARF code wants us
3336 to pop back to it. Handle unquoted section name as well as quoted
3337 section name. Don't crash on invalid strings.
3338 (obj_pseudo_table): Handle new pseudos "previous", "2byte", and
3341 * config/obj-elf.h: Don't include struc-symbol.h.
3342 (obj_elf_frob_symbol): Declare arg as struct symbol *.
3344 * tc-sparc.h (LOCAL_LABEL) [OBJ_ELF]: Local labels can start with
3347 * write.c (write_relocs): New function, split off from
3348 write_contents. Use memset instead of bzero.
3349 (write_object_file): Apply write_relocs to each section before
3350 applying write_contents.
3352 * read.c (read_begin): Call obstack_begin with values closer to 1K
3354 (read_a_source_file, big_cons, float_cons): Use memcpy instead of
3359 * config/tc-m68k.c (m68k_ip_op): Don't decrement strend when
3360 calculating opP->isiz; this permits the expression size to be
3361 determined as well, later on.
3363 * expr.c (clean_up_expression): Don't cancel the subtraction of
3366 * read.c (s_data), config/obj-coffbfd.c (obj_coff_data): If -R,
3367 switch to text section rather than data section.
3371 * config/tc-m68k.c (m68k_ip, case AINDX): Add 6 to operand
3372 expression (to take the pc-rel instruction itself into account)
3373 before using the expression, instead of after.
3377 * read.c (float_cons): Simplified parsing logic. If
3378 REPEAT_CONS_EXPRESSIONS is defined, accept a repeat count.
3380 * symbols.c (colon): Rather than a special case for TC_HPPA,
3381 use new macro tc_frob_label.
3382 * config/tc-hppa.h (tc_frob_label): Define.
3384 * config/tc-mips.c: Many changes to support simple assembler
3386 (insn_label, prev_insn, prev_prev_insn, dummy_opcode,
3387 prev_insn_valid, prev_insn_frag, prev_insn_where,
3388 prev_insn_fixp, prev_insn_is_delay_slot): New static
3390 (insn_uses_reg, mips_no_prev_insn, mips_emit_delays,
3391 mips_align, s_stringer, s_mips_space): New static functions.
3392 (mips_define_label): New global function.
3393 (md_pseudo_table): For "ascii", "asciz", "asciiz", call
3394 s_stringer. Changed argument to float_cons from 0 or 1 to 'f'
3395 or 'd'. For "space" call s_mips_space.
3396 (md_begin): Call mips_no_prev_insn.
3397 (append_insn): Only insert necessary NOP instructions.
3398 (macro): Call mips_emit_delays before setting mips_noreorder.
3399 Increment and decrement mips_noreorder rather than using
3400 save_reorder_condition. Don't bother to use noreorder in
3401 M_L_DOB and M_L_DAB, since append_insn will not insert a NOP.
3402 (md_atof): Handle floating point numbers correctly for both
3403 big and little endian targets.
3404 (s_align, s_cons): Call mips_align rather than frag_align.
3405 (s_change_seg, s_cons): Call mips_emit_delays.
3406 (s_float_cons): Let float_cons do the work.
3407 (s_mipsset): Call mips_emit_delays when setting noreorder.
3408 * config/tc-mips.h (tc_frob_label): Define to be
3411 * config/obj-ecoff.c (ecoff_build_symbols, ecoff_build_procs,
3412 ecoff_frob_files): Consistently use S_GET_VALUE rather than
3413 bfd_asymbol_value. Warn if taking difference of symbols in
3418 * config/obj-ecoff.c (ecoff_frob_file): Discard all open scopes,
3421 * config/obj-coffbfd.c (fixup_segment): If TC_M88K, don't adjust
3422 by md_pcrel_from if we are relocating against a symbol (we still
3423 need md_pcrel_from for a PC relative relocation within the same
3425 * config/tc-m88k.c (md_pcrel_from): Corrected return value.
3426 (omagic): Removed unused variable.
3428 * Preliminary support for m88k-coff.
3429 * configure.in (m88k-*-coff*): New target. Use coffbfd and
3431 * config/m88kcoff.mt: New file.
3432 * read.c (lex_type): New macro LEX_AT to set lex type of '@'.
3433 (pseudo_set): Handle difference of symbols in different fragments
3434 by saving the entire expression as the value of the symbol.
3435 * symbols.c (resolve_symbol_value): Resolve difference
3437 * config/obj-coffbfd.c (obj_pseudo_table): If TC_M88K, accept
3438 "sdef" as a synonym for "def".
3439 * config/obj-coffbfd.h: If TC_M88K, include coff/m88k.h and set
3441 (S_IS_LOCAL): Any symbol which includes \001 in the name is local.
3442 * config/tc-m88k.c, config/tc-m88k.h: Numerous changes to bring
3443 m88k port up to date, and to add COFF support.
3447 * Removed sy_forward and replaced it with an undefined expression
3448 as the value of a symbol.
3449 * struc-symbol.h (struct symbol): Removed sy_forward field. Added
3450 sy_resolved and sy_resolving single bit fields.
3451 * symbols.c (symbol_new): Don't initialize sy_forward field.
3452 (resolve_symbol_value): New function to adjust symbol value by
3453 fragment address, using recursion to resolve forward symbols.
3454 * symbols.h: Added prototype for new function.
3455 * read.c (pseudo_set): Set symbolP->sy_value to an undefined
3456 expression rather than setting symbolP->sy_forward.
3457 * write.c (write_object_file): Use resolve_symbol_value on
3458 symbols, keeping the common case (the old behaviour) inline.
3459 * config/obj-aout.c (obj_aout_frob_symbol): Removed sy_forward
3460 handling (subsumed by write.c change).
3461 * config/obj-coff.c, config/obj-coffbfd.c (obj_coff_val): Set
3462 sy_value rather than sy_forward.
3463 * config/obj-coffbfd.c (obj_coff_endef, yank_symbols): Check
3464 expression segment rather than sy_forward.
3465 (yank_symbols): Use resolve_symbol_value.
3466 (crawl_symbols): Removed extra pass over symbols.
3467 * config/obj-aout.c, config/obj-bout.c, config/obj-coff.c,
3468 config/obj-vms.c (obj_crawl_symbol_chain): Removed extra pass over
3469 symbols which handled sy_forward; use resolve_symbol_value
3471 * config/obj-coff.h, config/obj-coffbfd.h (obj_frob_forward_symbol):
3473 * config/obj-elf.c (obj_elf_stab_generic): Check expression
3474 segment rather than sy_forward.
3475 * config/obj-vms.c (VMS_Check_For_Main): Don't initialize
3476 sy_forward; do initialize sy_resolved and sy_resolving.
3477 * config/tc-hppa.h (STAB_FIXUP): Use sy_value, not sy_forward.
3479 * Changes to keep a full expression as the value of a symbol, not
3481 * struc-symbol.h: New field sy_value.
3482 * as.h: Include expr.h before struc-symbol.h.
3483 * expr.h: Use struct symbol rather than symbolS.
3484 * symbols.c (S_GET_VALUE, S_SET_VALUE): Rewrote to retrieve value
3485 of sy_value field; compile unconditionally, not just if
3487 * symbols.h: Compile S_{SG}ET_VALUE prototypes unconditionally.
3488 * write.c (write_object_file): Set BFD symbol value to gas symbol
3490 * config/obj-aout.h, config/obj-bout.h, config/obj-coff.h,
3491 config/obj-coffbfd.h, config/obj-generic.h, config/obj-vms.h
3492 (S_GET_VALUE, S_SET_VALUE): Removed macro definitions.
3493 * config/obj-ieee.c (S_GET_VALUE, S_SET_VALUE): Removed.
3494 * config/obj-coff.h, obj-coffbfd.h: Rewrote several macros to use
3495 S_GET_VALUE rather than ost_entry.n_value.
3496 * config/obj-aout.c (obj_symbol_to_chars), config/obj-bout.c
3497 (obj_symbol_to_chars), config/obj-coff.c (obj_symbol_to_chars),
3498 config/obj-coffbfd.c (symbol_to_chars): Get value to write out
3499 using S_GET_VALUE--don't assume it is already set.
3500 * config/obj-ieee.c (do_symbols): Set BFD symbol value to gas
3502 * config/obj-vms.c (various): Don't assign directly to
3503 S_GET_VALUE; use S_SET_VALUE instead.
3507 * configure.in: Recognize h8300h.
3511 * config/tc-h8500.c (line_comment_chars): Add hash.
3512 (parse_exp, skip_colonthing, build_bytes): Add support for
3513 R_H8500_HIGH16 relocation type.
3517 * config/obj-elf.c (obj_elf_section): Allow `@' to introduce an
3518 attribute name. Handle `execinstr' attribute.
3522 * config/tc-mips.c (mips_ip): Don't warn on 'i' or 'j' mismatch if
3523 there is another alternative for the instruction.
3527 * doc/as.texinfo: updates for H8/300H
3531 * config/tc-i960.c (md_create_short_jump, md_create_long_jump,
3532 md_number_to_chars, md_section_align): Adjusted to use valueT,
3533 addressT, to match tc.h.
3537 * config/tc-sparc.c (s_common): Revamp to handle both syntaxes,
3538 independent of format.
3542 * config/tc-h8300.h (TC_CONS_RELOC): Use R_RELLONG if h8/300h.
3544 Wed Jul 7 18:11:07 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
3546 * configure.in: define CROSS=-DCROSS_COMPILE if it is a cross
3547 build; also recognize h8300-*-coff
3551 * symbols.c (fb_label_instance, fb_label_instance_inc): Don't dump
3552 core just because somebody uses a label before it is defined.
3554 * config/mips-opcode.h: Moved to opcode/mips.h.
3555 * config/tc-mips.c: Include opcode/mips.h rather than
3557 (append_insn): An extra NOP is only needed after instructions
3558 which set HI or LO, not after instructions which read it.
3559 (macro_build, mips_ip): Support new 'E', 'G' and 'B' arguments.
3560 (macro): cfc1 and ctc1 now take "t,G" rather than "t,d".
3561 * config/tc-mips.h (struct mips_opcode): Don't define.
3562 * config/mips-big.mt, config/mips-lit.mt (TARG_CPU_DEPENDENTS):
3563 Set to $(srcdir)/../include/opcode/mips.h.
3565 Get the MIPS assembler up to speed with other gas changes:
3567 * config/obj-ecoff.c (ecoff_set_vma, ecoff_frob_symbol):
3568 Removed; don't change the symbol value.
3569 (ecoff_build_symbols, ecoff_build_procs, ecoff_frob_file): Use
3570 bfd_asymbol_value rather than S_GET_VALUE to include section
3571 vma in symbol value.
3572 (ecoff_frob_file): Ignore BSF_SECTION_SYM symbols, since ECOFF
3573 doesn't output them. Set the vma of sections.
3574 * config/obj-ecoff.h: Don't define obj_frob_symbol.
3575 * config/tc-mips.c (tc_gen_reloc): Adjustment by section vma is no
3577 (various): use valueT rather than long.
3581 * as.h (valueT): Typedef moved here.
3582 * struc-symbol.h (valueT): ...from here.
3583 * write.c (write_object_file): Locals from_addr, to_addr,
3584 table_addr are now addressT. Supply prototype for bfd_alloc for
3586 (fixup_segment): Local add_number is now valueT. Correct some
3587 range-checking bugs.
3588 (relax_align): Type `int' should be sufficient for the exponent.
3589 (fix_new): Argument offset is type offsetT. Locals size and
3590 newsize are type valueT.
3591 * write.h (struct fix): Fields fx_offset and fx_addnumber are now
3593 (fix_new): Fix prototype.
3594 * symbols.c (symbol_new): Symbol value is type valueT.
3595 (S_SET_VALUE, S_GET_VALUE): Likewise.
3596 (S_IS_*): Specify int return type explicitly.
3597 * symbols.h (symbol_new, S_GET_VALUE, S_SET_VALUE): Fixed
3599 * read.c (s_comm): Values read are type valueT.
3600 * expr.h (expressionS): Field X_add_number is an offsetT.
3601 * tc.h (md_create_long_jump, md_create_short_jump,
3602 md_section_align): Addresses are now type addressT.
3603 (md_number_to_chars, md_apply_fix): Pass value as valueT.
3604 * config/tc-i386.c (md_create_short_jump, md_create_long_jump,
3605 md_number_to_chars, md_section_align): Adjusted.
3606 * config/tc-sparc.c (sparc_ip): Initialize `len' variable to make
3608 (md_create_short_jump, md_create_long_jump, md_number_to_chars,
3609 md_section_align): Adjusted.
3611 * config/tc-sparc.c (s_reserve): Permit use for other than a.out
3613 (s_common): Handle Solaris-2 version.
3615 * config/ho-generic.h (free): Returns void if __STDC__.
3617 * config/obj-elf.h (obj_elf_frob_symbol, elf_frob_file,
3618 elf_file_symbol): Declare.
3620 * expr.c (floating_constant, integer_constant): Now return void.
3624 * configure.in: Match on sparc*-fujitsu-none rather than
3625 sparclite*-fujitsu-none.
3629 * read.c (cons): Conditionalize parsing of expression. Move
3630 putting value into object file into separate function. Separate
3631 out MRI and WANT_BITFIELDS cases into separate functions.
3632 (emit_expr): New function to write data into object file.
3633 Conditionalize on TC_CONS_FIX_NEW and TC_CONS_RELOC rather than on
3635 (parse_bitfield_cons): New function to parse bitfield expressions
3636 as used by i960 assemblers. Only compiled if
3637 BITFIELD_CONS_EXPRESSIONS is defined.
3638 (parse_mri_cons): New function to parse MRI style strings. Only
3639 compiled if MRI is defined.
3640 (parse_repeat_cons): New function to parse repeat counts. Only
3641 compiled if REPEAT_CONS_EXPRESSIONS is defined.
3642 * read.h (emit_expr): Added declaration of new function.
3643 * config/tc-a29k.h (TC_CONS_RELOC): Define to be RELOC_32.
3644 * config/tc-h8300.h (TC_CONS_RELOC): Define to be R_RELWORD.
3645 * config/tc-hppa.c (parse_cons_expression_hppa): New function to
3646 parse a HPPA expression, rather than special case in cons
3648 (cons_fix_new_hppa): New function to emit an HPPA fixup, rather
3649 than special case in emit_expr function.
3650 * config/tc-hppa.h (TC_PARSE_CONS_EXPRESSION, TC_CONS_FIX_NEW):
3651 Define to use new functions from tc-hppa.c.
3652 * config/tc-i960.h (BITFIELD_CONS_EXPRESSIONS): Define.
3653 (WANT_BITFIELDS): Removed; now obsolete.
3654 * config/tc-mips.h (REPEAT_CONS_EXPRESSIONS): Define.
3655 * config/tc-ns32k.c (cons_fix_new_ns32k): New function to emit an
3656 NS32K fixup, rather than special case in emit_expr function.
3657 * config/tc-ns32k.h (TC_CONS_FIX_NEW): Define to be
3658 cons_fix_new_ns32k. Also use PARAMS rather than checking
3660 * config/tc-sparc.h (TC_CONS_RELOC): Define to RELOC_32.
3662 * write.c (relax_and_size_seg, adjust_reloc_syms, write_contents):
3663 Don't core dump if gas has no information about a section.
3667 * write.c (relax_and_size_seg): Always fully process a section.
3668 Section size is last frag's (vm)address plus its size. If no
3669 relocations are present, force SEC_RELOC flag clear.
3670 (dump_section_relocs): New debugging routine.
3671 (adjust_reloc_syms): New routine, broken out from write_contents.
3672 Don't adjust relocs that are already relative to section symbol.
3673 Look for obj_fix_adjustable macro to know what else to skip,
3674 instead of obj_write_symbol. Look for section symbol stored in
3675 section information.
3676 (write_object_file): Map adjust_reloc_syms over all sections.
3677 (write_contents): Clear SEC_RELOC flag if no relocations are
3680 * as.h (__PTR_TO_INT, __INT_TO_PTR): New versions for Saber, to
3683 * write.c (remove_subsegs): Don't define for BFD_ASSEMBLER.
3687 * Makefile.in (all, dvi, info, install-info, clean-info): do not
3688 echo recursion lines.
3689 (install-info, clean-info): collapse into the dvi and info rule.
3693 * as.h (strstr): Disable declaration for now.
3694 (fprint_value, sprint_value): Declare.
3696 * subsegs.c (subseg_new_rest): Use memset to clear new frag.
3697 (subseg_new) [BFD_ASSEMBLER]: Initialize all seginfo fields.
3699 * expr.c (expr_part): Made sanity checks a.out-specific.
3700 (expr): Disabled sanity checks.
3702 * subsegs.h (segment_info_type) [BFD_ASSEMBLER]: Add field for
3704 * subsegs.c (subseg_change): Initialize section symbol pointer
3705 when setting up a new section.
3707 * symbols.c (symbol_new) [BFD_ASSEMBLER]: Point BFD symbol's udata
3708 field back at gas symbol structure.
3710 * symbols.c (colon): Cast obstack_next_free value to char* before
3711 doing arithmetic on it.
3712 * subsegs.c (subseg_new_rest): Likewise.
3713 * as.h (frag_now_fix): Likewise.
3715 * config/obj-elf.c (elf_file_symbol): Use subseg_new instead of
3716 calling bfd_make_section_old_way directly, and call subseg_set
3717 instead of subseg_change. Now returns void.
3718 (obj_elf_write_symbol): Only check local symbols for now.
3719 (elf_stab_symbol): Now static and void, and disabled until it
3721 (obj_elf_size): For expression values, fail silently for now.
3722 (obj_symbol_new_hook): Do nothing.
3724 * config/tc-sparc.c (tc_gen_reloc): Handle BFD_RELOC_SPARC_WDISP22
3726 (s_local) [OBJ_ELF]: New function.
3727 (md_pseudo_table) [OBJ_ELF]: Call it for "local".
3728 (s_common): Rearrange to handle Solaris .common pseudo, which may
3729 sometimes use bss space instead of common.
3730 * config/obj-elf.h (TARGET_SYMBOL_FIELDS): Add new `local' field.
3732 Thu Jun 24 16:33:53 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
3734 * configure.in: set host config to hpux for hppa*-hp-hpux
3738 * app.c (app_pop, app_push): Fix bug reported by Chris Arthur.
3742 * subsegs.c (subseg_new): Don't special-case a.out -R flag here.
3743 * config/obj-aout.c (s_sect): Do it here.
3745 * as.h (BAD_CASE): Don't make some lame compilers think we want
3746 substitution inside strings.
3748 * as.c (print_version_id): New function, split off from main.
3750 * config/tc-sparc.c (md_parse_option) [OBJ_ELF]: Print version id
3751 for -V. Ignore -Q and -s options for now.
3753 Mon Jun 21 17:37:59 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
3755 * Makefile.in: make installation & builds work again for crosses
3759 * listing.c (list_symbol_table): Rewrite to print wide (>32 bits)
3760 symbol values correctly.
3762 * write.c (write_object_file): Deleted unused variables.
3763 (fixup_segment): Use sprint_value.
3765 * messages.c (sprint_value, fprint_value): New routines.
3767 * config/obj-elf.c (elf_stab_symbol): Now returns void.
3768 (obj_elf_stab_generic): Fix typo in logic.
3770 * Makefile.in (INCLUDES): Look in ../bfd for bfd.h.
3772 * as.h (addressT, offsetT): New types, using BFD types if
3774 (relax_addressT, struct frag): Use them.
3775 * struc-symbol.h (valueT, struct broken_word): Likewise.
3777 * as.h (subseg_new) [BFD_ASSEMBLER]: Name argument is const.
3778 * subsegs.c (subseg_new) [BFD_ASSEMBLER]: Name argument is const.
3782 * Makefile.in: canonicalize install.sh; for use within
3783 this directory (and subdirs)
3787 * m88k-opcode.h : fixed tiny tiny mistake - xcr was incorrectly
3788 specified, should have both S1 and S2 fields identical
3789 If only finding the problem was as fast as fixing the bug !!!!
3793 * write.c (write_contents): Do write out non-loadable sections.
3794 Debug sections can fall in this category.
3796 * read.c (s_app_file): Call elf_file_symbol for ELF files.
3797 * config/obj-elf.c (elf_file_symbol): New function.
3799 * config/obj-elf.c (elf_stab_symbol_string): Renamed from pa_...,
3800 added argument to specify section base name.
3801 (obj_elf_stab_generic): Renamed from ..._stab. New argument
3802 specifies section base name.
3803 (obj_elf_stab): New function, calls obj_elf_stab_generic with
3804 ".stab" as section base name.
3805 (obj_elf_xstab): New function, calls obj_elf_stab_generic.
3806 (obj_elf_type): Handle "object". Use bitwise-or to merge in
3807 symbol flags rather than simply replacing, so global/local flags
3809 (obj_elf_ident): Rewrite.
3811 Tue Jun 15 17:03:25 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
3813 * Makefile.in: remove parentdir support; use INSTALL_XFORM
3817 * config/tc-i386.c (md_pseudo_table): .align uses a power of two
3818 for any a.out target, not just Linux and 386BSD.
3819 * config/tc-i386.h (DOT_LABEL_PREFIX): Do not define for any a.out
3824 * config/tc-m88k.c: Don't include flonum.h, md.h, m88k.h. They
3825 don't exist or duplicate other inclusions.
3827 * config/tc-vax.h (NO_RELOC): Define.
3831 * gas/config/m88k-opcode.h (m88k_opcodes): Add 88110 instructions.
3832 * gas/config/tc-m88k.c (get_reg): New arg reg_prefix. Compare first
3833 char to reg_prefix instead of to 'r'.
3834 (calcop): Change calls to get_reg.
3835 (calcop): Handle new case 'x' to set reg_prefix.
3836 (calcop): Set reg_prefix to 'r' after each call to get_reg.
3837 (cmpslot): Add 88110 conditions.
3839 * gas/config/m88k-opcode.h: Swap cases for "rot" for consistency.
3841 * gas/config/tc-m88k.c (get_bf): Always restore input_line_pointer
3844 * gas/config/m88k-opcode.h (m88k_opcodes): Make equal mnemonics
3845 adjacent; mov.s and mov.d swapped.
3846 (m88k_opcodes): Fix typo `r2' -> `2'.
3850 * config/h8300.c: Support for H8/300-H opcodes.
3852 * config/obj-coffbfd.c (w_strings): String table length is 4
3853 bytes, no matter what the host int size is.
3855 * configure.in (alpha-*-osf*): New.
3859 * configure.in (mips-*-ecoffl*): New target; use ecoff and
3861 (mips-*-ecoff*): Added trailing '*'.
3863 * config/obj-ecoff.c (ecoff_build_procs): Force the adr of the
3864 first FDR in a file to be zero.
3868 * Makefile.in (VERSION): Jump to 2.1.4.
3870 * config/ho-hppabsd.h: New file, from Peter Hoogenboom.
3872 * config/tc-mips.c (md_assemble): Call bfd_set_gp_size only for
3877 * config/tc-m68k.c (md_assemble): The 68040 cpu doesn't want a
3880 * config/obj-elf.c, config/obj-elf.h: Update for new type, macro,
3881 and routine names. Assuming 32 bits for now.
3883 * config/obj-elf.c (elf_frob_file): Look for macro
3884 elf_tc_final_processing_hook, instead of assuming a function
3886 * config/tc-hppa.c (elf_hppa_final_processing_hook): Renamed from
3887 tc_final_processing_hook.
3888 * config/tc-hppa.h (elf_tc_final_processing_hook): Use it.
3890 * config/tc-hppa.h (elf_tc_symbol, elf_tc_make_sections): Macros
3891 moved here from obj-elf.h.
3892 * config/obj-elf.h: Don't include CPU-specific header files.
3896 * configure.in: configurations should match on 'hppa*' not 'hppa'.
3898 * read.c: Add support for HPPA assembly language syntax (denoted
3899 with '#ifdef TC_HPPA').
3901 * symbols.c: Add support for HPPA assembly language syntax (denoted
3902 with '#ifdef TC_HPPA').
3904 * write.c (write_contents): Add support for HPPA-style
3907 * config/obj-elf.c: Stab symbols weren't written properly.
3910 (obj_elf_write_symbol):
3911 (obj_elf_write_symbol_p):
3912 (obj_elf_frob_symbol):
3916 * config/tc-hppa.c: Support for HPPA symbol extension sections.
3917 Remove some unused code. Support for HPPA assembly language
3928 (elf_tc_make_sections):
3934 * config/obj-ecoff.c (obj_read_begin_hook, add_file): Assume
3935 hash_new will have succeeded if it returns.
3936 * config/tc-a29k.c (md_begin): Likewise.
3938 * config/tc-i386.c (tc_aout_fix_to_chars): Now nbytes_r_length is
3940 (mode_from_disp_size, opcode_suffic_to_type): Now inline under
3942 (fits_in_{signed,unsigned}_{byte,word}): Likewise.
3944 * expr.c: Delete register declarations; gcc ignores them anyways.
3948 * hash.c (hash_new): Use xmalloc, since many callers don't check
3953 * frags.c (zero_address_frag, bss_address_frag): These are
3956 * tc.h (md_reloc_size): This is const.
3957 * config/tc-{a29k,h8300,h8500,i386,i860,i960,m68k,ns32k,z8k}.c
3958 (md_reloc_size): Now const.
3960 * config/aout_gnu.h (enum machine_type, enum reloc_type): Delete
3962 * as.h (enum _segT): Ditto.
3964 * struc-symbol.h (N_TYPE_seg): This should be const.
3968 * config/obj-ecoff.c (add_file): Cast file_name to char * in
3969 listing_source_file call.
3971 * config/obj-elf.c (elf_stab_symbol_string): Cast first argument
3972 of subseg_new call to eliminate const attribute.
3973 (obj_elf_stab): Ditto.
3974 (obj_symbol_new_hook): Cast first argument of bzero call to char *.
3976 * read.c (s_align_bytes): Properly record alignment.
3978 * expr.c (__): Undefine __ macro before use, since OSF/1 uses it
3979 for the prototype/no prototype macro.
3981 * as.c (got_sig): Don't do return ((SIGTY) 0), SIGTY might well be
3984 * as.h (relax_stateT enum): Delete trailing comma.
3988 * app.c (do_scrub_begin): Let line_comment_chars override
3990 (do_scrub_next_char): If a line comment character is not at the
3991 start of a line, treat it as a comment character if it is one.
3992 For a CPP line comment use pseudo-op .appline rather than .line.
3993 * input-scrub.c (logical_input_line): Make int rather than
3995 (input_scrub_push, input_scrub_begin): Initialize
3996 logical_input_line to -1 rather than 0.
3997 (bump_line_counters): Increment logical_input_line.
3998 (new_logical_line): If line_number is -2, decrement
4000 (as_where): Use logical_input_line even if it is 0.
4001 * read.h (s_app_file prototype): Now takes an int argument.
4002 * read.c (potable): Make .appfile call s_app_file with 1. New
4003 .appline pseudo-op calls s_app_line.
4004 (s_app_file): If .appfile, call new_logical_line with -2 to
4005 account for newline inserted by do_scrub_next_char. If listing,
4006 call listing_source_file.
4007 (s_app_line): New function to handle fake pseudo-op .appline.
4008 * config/obj-coff.c (obj_pseudo_table): Make .appline call
4010 (obj_coff_ln): Added argument to indicate whether .appline.
4011 * config/obj-coffbfd.c (obj_pseudo_table): Make .appline call
4013 (obj_coff_ln): Added argument to indicate whether .appline.
4014 * config/tc-mips.c (s_file): Pass argument to s_app_file.
4018 * config/obj-bout.h (S_GET_VALUE): Removed unnecessary cast.
4022 * config/tc-m68k.c (md_apply_fix_2): Straighten out check for
4027 * config/tc-h5000.c (build_bytes): Understand @rd mode and build
4028 relocations correctly.
4032 * Makefile.in (FLAGS_TO_PASS): Leave out TEXI2DVI for now, because
4035 * config/tc-m68k.c (md_apply_fix_2): Apply range checks and warn
4036 if value is out of range.
4038 Patch from Minh Tran-Le:
4039 * config/tc-i386.c (i386_operand): For in/out port register used
4040 as base reg, include InOutPortReg in operand type.
4041 (MATCH): Accept overlap value of InOutPortReg.
4045 * config/obj-ecoff.c (add_file, obj_ecoff_loc, obj_ecoff_stab):
4046 Add calls to listing routines to produce combined source/assembler
4048 (obj_ecoff_stab): Create a file pointer if none used yet.
4049 (ecoff_frob_file): Set symcount to correct value.
4053 * Makefile.in (VERSION): Bump to version 2.1, in preparation for
4056 * config/obj-aout.h (H_GET_HEADER_SIZE, H_SET_SYMBOL_TABLE_SIZE):
4057 Define in terms of constants, not C structure sizes.
4059 * config/tc-rs6000.c, config/tc-rs6000.h: Delete empty files.
4063 * config/obj-aout.c (obj_header_append): Don't define if it's
4065 * config/obj-hp300.h (obj_header_append): Define it as a macro.
4066 * config/obj-hp300.c (hp300_header_append): New function.
4068 * Makefile.in (distclean): Don't bother cleaning up doc files;
4069 they aren't going to be in this directory.
4073 * config/obj-ecoff.c (ecoff_build_symbols): Handle absolute
4076 * tc.h (TC_COFF_SIZEMACHDEP): Don't define here.
4077 * config/tc-sh.h (TC_COFF_SIZEMACHDEP): Define here instead.
4081 * config/obj-vms.c (VMS_Symbol_type_list): Don't bother with
4084 * configure.in (targets): Treat m68*-*-sysv* like m68k-*-coff.
4088 * config/tc-mips.c (macro): Correct floating point double word
4089 loads and stores for big endian target.
4093 * config/tc-i386.c: Replace SEG_* with *_section, fix up subseg_*
4094 calls. Deleted some unused code.
4095 * config/obj-coff.c: Likewise.
4097 ELF support, mostly contributed by Utah:
4098 * config/obj-elf.c (obj_elf_section, obj_elf_stab, obj_elf_line,
4099 obj_elf_type): Rewrite.
4100 (obj_elf_frob_symbol, elf_stab_symbol_string, elf_stab_symbol,
4101 obj_elf_desc, obj_elf_version, obj_symbol_new_hook, obj_elf_size):
4103 (obj_elf_ident): Dummy.
4104 * config/obj-elf.h (FALSE, TRUE, S_*, tc_frob_symbol,
4105 TARGET_SYMBOL_FIELDS): New macros.
4106 (gdb_section): New variable decl.
4108 * config/tc-i386.c (md_atof): Return zero, not empty string, on
4111 BFD_ASSEMBLER conditional changes:
4112 * config/obj-coff.c (lineno_rootP, seg_N_TYPE, *_section_header):
4114 (SA_SET_SYM_ENDNDX, SA_SET_SYM_TAGNDX): New functions.
4115 (fetch_coff_debug_section): Ditto.
4116 (obj_coff_endef): Call fetch_coff_debug_section.
4117 (struct line_no): New type.
4118 (c_symbol_merge): New way for copying aux fields.
4119 (c_dot_file_symbol): Put symbol in absolute section, and set flag
4121 (function_lineoff): New symbol.
4122 (function_lineoff, text_lineno_number, our_lineno_number,
4123 lineno_lastP): Don't define.
4124 (c_line_new): Don't define.
4125 (obj_emit_lineno, obj_coff_endef): Use abort calls as, uh,
4127 line-number recording gets implemented.
4128 (obj_new_symbol_hook): New code for handling aux fields.
4129 (add_lineno, add_linesym): New functions.
4130 (obj_coff_ln): Call add_lineno, not c_line_new.
4131 (obj_coff_endef): New code for handling symbol names. New lineno
4132 code. Look for section name "*DEBUG*" for debugging section.
4133 (align, coff_check_file_symbols, obj_coff_section,
4134 coff_frob_file): New functions.
4135 * config/obj-coff.h: Reordered some includes.
4136 (BYTE_ORDERING, FILE_HEADER_MAGIC, seg_N_TYPE, N_TYPE_seg,
4137 DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE, AOUTHDR, AOUTHDRSIZE): Don't
4139 (TARGET_SYMBOL_FIELDS, I960_SYM_FIELDS): New macros.
4140 (SYM_AUXENT): New macro (for non-BFD_ASSEMBLER too) for accessing
4141 aux entries. Most SA_* macros now use it unconditionally.
4142 (S_*): Use `bsym' field, and access BFD private data.
4143 (SF_*): Use `sy_flags' symbol field for most of these.
4144 (H_*, object_headers, lineno, lineno_*P, OBJ_EMIT_LINENO): Don't
4146 (*_section_header): Don't define.
4147 * config/tc-i386.c (md_convert_frag, md_apply_fix): Changed
4149 (tc_gen_reloc) [I386COFF]: New function.
4150 (tc_aout_fix_to_chars, tc_coff_fix2rtype): Don't define.
4151 * config/tc-i386.h (TARGET_ARCH, TARGET_BYTES_BIG_ENDIAN): New
4154 * config/obj-coff.c (stack_init): Don't do assignments inside
4156 (obj_coff_def): Simplified handling of symbol name a bit.
4157 (tag_insert): Name argument is now pointer to CONST.
4158 (obj_crawl_symbol_chain): Commented out.
4160 * config/obj-coff.h: Use PARAMS macro in prototypes.
4162 * write.c (relax_and_size_seg) [BFD_ASSEMBLER]: Don't indirect
4163 through frchainP pointer if it is null.
4165 * configure.in: Warn if BFD mode is explicitly turned off but is
4166 required by specified target.
4167 (mips ecoff targets): Don't need to set bfd_gas here; it gets
4168 taken care of later.
4170 * config/obj-coffbfd.c (crawl_symbols): Don't clear sy_forward
4172 (yank_symbols): Merge symbols only if sy_forward is null.
4174 * config/tc-m68k.h (AOUT_MACHTYPE): Don't define if already
4177 * tc.h (md_convert_frag) [BFD_ASSEMBLER]: Section arg is not
4179 * config/tc-m68k.c (md_convert_frag) [BFD_ASSEMBLER]: Ditto.
4181 * config/tc-sparc.h (LOCAL_LABEL) [OBJ_ELF]: Anything starting
4182 with "." is a local label.
4184 * config/te-hppa.h, config/tc-hppa.h, config/tc-hppa.c: New config
4187 * config/te-linux.h, config/te-386bsd.h: New config files.
4188 * configure.in (i386-*-linux, i386-*-bsd): Use them.
4189 * config/tc-i386.h (TARGET_FORMAT): Select format based on target
4191 (DOT_LABEL_PREFIX): Don't define for 386bsd or Linux.
4195 * config/obj-ecoff.c (init_file): Set fMerge to 0 since dbx seems
4196 to want it that way.
4197 (ecoff_build_symbols): Turn local st_Proc symbols into
4198 st_StaticProc symbols. Set index field of external st_Proc and
4199 st_staticProc symbols correctly.
4200 * config/tc-mips.h (NO_LISTING): Don't define. People might want
4205 * config/obj-hp300.h, config/obj-hp300.c, config/te-hp300.h: New
4207 * configure.in (m68k-*-hpux): Use them.
4209 * config/obj-aout.c (obj_pre_write_hook): Use AOUT_VERSION if
4210 defined, otherwise zero.
4212 * config/aout_gnu.h (OMAGIC): Don't define if already defined.
4216 * config/tc-sparc.c (sparc_ip): Allow any abs expression as an
4217 address space number.
4221 * config/obj-aout.h (TARGET_DEFAULT): Don't default this at all.
4223 * config/tc-a29k.c: Include ctype.h.
4224 (define_some_regs): Added special-purpose registers for 29050.
4226 * config/tc-i386.c (comment_chars) [TE_I386AIX]: Include "/".
4228 * config/obj-coffbfd.c (fill_section): Don't set STYP_REG here.
4229 (change_to_section): Set it here instead.
4233 * config/obj-ecoff.c (obj_symbol_new_hook): Make up a .file if one
4234 hasn't been seen yet.
4235 (add_ecoff_symbol): Don't refer to cur_file_ptr if it is NULL.
4239 * config/tc-sh.ch, config/tc-sh.h: New files supporting Hitachi
4244 * expr.c (operand): Fix unary plus operator (previously was the
4245 same as '~' operator!).
4249 * write.c (cvt_frag_to_fill): Define even if BFD is defined.
4250 (write_object_file): Do define if BFD_ASSEMBLER. Invoke
4251 obj_check_file_symbols if defined. Call verify_symbol_chain_2
4252 instead of open-coding it. Fix some bugs in patching up symbol
4254 (relax_segment): Make some code we "ought to be able to" use for
4255 all targets no longer conditionalized on ns32k target; instead, do
4256 it always, and if the appropriate conditions fail, abort.
4258 * symbols.c (DEBUG): Enabled.
4259 (symbol_new): Make sure bfd_make_empty_symbol works.
4260 (verify_symbol_chain_2): New funcion; takes one symbol as
4261 argument, anywhere in the chain.
4262 (dollar_label*): Use default initializers.
4264 * as.c (perform_an_assembly_pass): Call md_begin here...
4265 (main): ...and not here.
4267 * config/tc-m68k.h (TARGET_FORMAT): Use a.out-sunos-big for a.out.
4268 (tc_frob_symbol): New macro: Get rid of symbols in reg_section.
4270 * config/tc-m68k.c (omagic): Don't define for BFD_ASSEMBLER.
4271 (add_fix, add_frag): Now functions instead of macros.
4272 (m68k_reg_parse, m68k_ip, md_estimate_size_before_relax, get_num,
4273 s_data1, s_data2, s_bss): Use new *_section names, for
4274 compatibility with BFD_ASSEMBLER mode; rewrite switch statements
4275 to handle non-integral segT.
4276 (tc_coff_fix2rtype, tc_aout_fix_to_chars,
4277 tc_coff_symbol_emit_hook): Don't define for BFD_ASSEMBLER.
4278 (tc_gen_reloc): New routine for BFD_ASSEMBLER.
4279 (md_apply_fix, md_apply_fix_2): Renamed old md_apply_fix to
4280 md_apply_fix_2; new md_apply_fix definition varies interface
4281 depending on BFD_ASSEMBLER.
4282 (md_convert_frag, md_convert_frag_1): Likewise. Use new *_section
4285 * config/obj-vms.c: Include config.h.
4286 (version_string): Delete declaration.
4287 (Write_VMS_MHD_Records): Use GAS_VERSION instead.
4288 (vms_resolve_symbol_redef): New function, taken from VMS code in
4291 (VMS_Store_Struct, VMS_Def_Struct, VMS_Set_Struct,
4292 VMS_TBT_Block_End, get_VMS_time_on_unix, generate_suffix,
4293 VMS_Psect_Spec): Fixed to compiler under traditional C.
4294 * config/obj-vms.h: Use PARAMS macro.
4295 (vms_resolve_symbol_redef): Declare.
4296 (RESOLVE_SYMBOL_REDEFINITION): New macro.
4297 * symbols.c (colon): Remove some VMS-specific code, look for
4298 RESOLVE_SYMBOL_REDEFINITION macro instead.
4300 * config/tc-m68k.c (m68k_ip): Don't try expanding DBcc
4303 * config/tc-i386.c: Reordered some functions so inlining might
4304 work. Use PARAMS in function declarations.
4305 (reloc): New routine.
4306 (md_assemble): Rearrange switch statements to work with
4309 * struc-symbol.h [BFD_ASSEMBLER]: Undefine
4310 SYMBOLS_NEED_BACKPOINTERS before defining it.
4312 * subsegs.c (subseg_new_rest): Now static.
4314 * read.c (pseudo_set): Better error message for difference of
4315 symbols in different frags.
4317 * Makefile.in (check): Pass down some new variables, indicating
4318 pathname or program name for cc, nm, objdump.
4320 * as.h (OUTPUT_FLAVOR): New macro.
4321 * config/tc-sparc.c (tc_gen_reloc): Use OUTPUT_FLAVOR.
4323 * configure.in: Initialize bfd_gas properly. Warn that ELF
4324 support is incomplete.
4328 * read.c (float_cons): Accept null pointer return from md_atof.
4329 * config/tc-m68k.c (md_atof): Return null for success.
4330 * config/tc-sparc.c (md_atof): Ditto.
4334 * doc/as.texinfo: formatting and comment cleanups; show SPARC
4335 alternative options in same style as other machines; simplify some
4336 conditional use; include GPL as separate file (from texinfo dir)
4338 * doc/Makefile.in: (as.info) include directory containing GPL in
4339 makeinfo search path
4341 * doc/h8.texi: new file; conditional settings for GAS manual
4346 * doc/as.texinfo: mention SPARC architecture options.
4350 * configure.in: Rearranged whitespace in per-host/per-target
4351 sections. Added hooks for dropping in HPPA support (not included
4352 yet). Separate out overrides of variables based on target format
4353 and bfd-gas selection from actual target-specific commands. Add
4354 error message for recognized but unsupported format name.
4358 * config/obj-ecoff.h (ecoff_build_lineno): Make ilineMax in
4359 symbolic header match cline in FDR; the native linker seems to
4362 Thu Apr 8 15:51:28 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
4364 * doc/Makefile.in: as.texinfo is in $(srcdir). Use
4365 $(srcdir)/as.texinfo explicitly in several places
4369 * doc/Makefile.in: update dvi, clean targets for new source
4374 * config/ho-decstatn.h: Define BROKEN_ASSERT if not __GNUC__,
4375 rather than undefining know.
4376 * configure.in: Match ultrix*, not just ultrix.
4380 * doc/as.texinfo: converted conditional markup to use new
4381 Texinfo facilities, avoiding m4.
4383 * doc/as-all.texinfo, all.m4, pretex.m4: deleted.
4385 * doc/Makefile.in: recast doc configuration to use a link to an
4386 included texinfo file.
4388 * doc/all.texi: settings for generic form of documentation.
4392 * read.c (cons): Zero out frag when creating reloc.
4396 * config/tc-mips.c (gp_reference): Certain magic symbols can never
4397 be referenced off the GP register.
4399 * app.c (do_scrub_next_char): Handle states 9 and 10 correctly
4400 when dealing with characters of type LEX_IS_TWOCHAR_COMMENT_1ST,
4401 LEX_IS_STRINGQUOTE, and LEX_IS_ONECHAR_QUOTE.
4403 * config/te-irix.h: New file; irix needs a different LOCAL_LABEL
4404 definition from other MIPS targets.
4405 * configure.in (mips-*-irix): Use emulation irix.
4409 * config/tc-h8500.c: Get relax size of branch instructions right,
4410 (get_operand): Parse @sp+ correctly.
4414 * subsegs.h (segment_info_type) [BFD_ASSEMBLER]: Don't include
4415 COFF section header field.
4417 * configure.in: Print error message if host or target is not
4420 * configure.in: If with-bfd-assembler, use obj-coff instead of
4423 * config/ho-generic.h: Include string.h.
4427 * config/tc-mips.h (LOCAL_LABEL): Treat any label starting with
4428 '$' as local, for any object file format.
4430 * config/tc-mips.c (macro): Optimizations to branching code and a
4434 * config/ho-irix.h: New file; if not gcc, define BROKEN_ASSERT.
4435 * configure.in (mips-sgi-irix*): Set gas_host to irix.
4439 * subsegs.c (subseg_new): Set output_section of new section.
4440 * as.c (perform_an_assemly_pass): Don't set output_section here.
4441 * expr.c (expr_part, expr): Turn off section assertions for ECOFF,
4442 since it has additional sections.
4443 * read.c (s_lcomm): For MIPS ECOFF, put small objects in .sbss,
4445 * config/obj-ecoff.h (TARGET_SYMBOL_FIELDS): Added
4446 ecoff_undefined field.
4447 * config/obj-ecoff.c (obj_symbol_new_hook): Initialize
4448 ecoff_undefined field.
4449 (add_file): If using stabs, just output a stabs symbol rather than
4451 (obj_ecoff_begin, obj_ecoff_bend): Ignore line number by reading
4452 it with get_absolute_expression, rather than skipping it by hand.
4453 (obj_ecoff_loc): If using stabs, just output a stabs symbol rather
4454 than ECOFF line number information.
4455 (obj_ecoff_stab): Accept non-zero values for stabs line number.
4456 (ecoff_build_symbols): Set ifilesym correctly. Set storage class
4457 to small, undefined and/or readonly sections if appropriate.
4458 Don't output symbol names containing \001 characters.
4459 (ecoff_frob_file): Make sure at least one fdr is output.
4460 * config/tc-mips.h: Define TC_MIPS.
4461 * config/tc-mips.c (g_switch_value): New static variable.
4462 (md_assemble): Set gp size of output BFD.
4463 (gp_reference): New function; returns 1 if expression can be
4464 accesssed via gp. Always returns 0 if not using ECOFF.
4465 (macro_build): Convert BFD_RELOC_LO16 to BFD_RELOC_MIPS_GPREL if
4467 (macro): Generate sequences using gp if possible.
4468 (md_parse_option): Ignore -EL and -EB. Parse -G.
4469 (md_apply_fix): Added BFD_RELOC_MIPS_GPREL to ignored case.
4470 (s_change_sec): Handle .rdata and .sdata for ECOFF.
4471 (s_extern): Mark symbol as external. Set ecoff_undefined field.
4475 * output-file.c (output_file_create): Don't call as_perror for
4476 filename rejected by application.
4478 * as.c (main) [BFD_ASSEMBLER]: If errors occur, close and unlink
4481 * doc/as.texinfo: Don't use @value in node names for the moment;
4482 references don't appear to work right.
4484 * as.h (const, volatile): Put these definitions back, and use
4487 * doc/as.texinfo: First pass at using new texinfo features --
4488 variables, conditional tests. Far from complete.
4492 * read.c: Temporary hack to handle some 64-bit constants. This
4493 should be redone later.
4494 (target_big_endian): Declare.
4495 (big_cons): If it's set, reverse order of bytes being copied.
4496 * config/tc-sparc.c (md_begin): Set target_big_endian.
4498 * read.c (s_ignore): Delete declaration of is_end_of_line.
4500 * config/obj-coffbfd.c (yank_symbols): Build list of file symbol
4501 forward pointers properly.
4505 * config/obj-coffbfd.c (do_relocs_for): Fix bug where nrelocs
4506 wasn't being stored into scnhdr.
4507 * config/obj-coffbfd.h: Add prototype of s_get_segment.
4508 * read.c (TC_START_LABEL): Default definition.
4509 (read_a_source_file): Use TC_START_LABEL macro to work out
4510 if a label has been seen.
4514 * configure.in: Set BFDDEF and BFDLIB at the top of Makefile, not
4515 the bottom (make expands variables in dependencies when the
4516 dependencies are read, not when they are used).
4518 * config/obj-coffbfd.c (fill_section): Don't set NOLOAD bit for
4519 a29k .bss section; the mondfe program doesn't like it.
4523 * config/tc-m68k.c: Use PARAMS macro, and use CONST instead of
4525 (current_architecture): Don't need initializer.
4529 * doc/none.m4: Define Z8000.
4530 * doc/Makefile.in (as-*.texinfo): Refer to $(srcdir). Remove the
4531 texinfo file before recreating it.
4532 (TEXI2DVI): Need to set TEXINPUTS if "make as.dvi" is to work in
4534 (srcdir): Delete second, bogus definition.
4535 (as.info): Look for as-*.texinfo in current directory rather than
4539 * doc/configure.in: Create links to all as-*.texinfo files in the
4540 source directory, if that's not the current directory.
4542 * configure.in (per-host): Accept MIPS host with BSD version
4544 (per-target): Classify i486 as i386. Use generic cpu_type instead
4545 of target_cpu in selecting format etc.
4547 * app.c (do_scrub_next_char): Use .appfile, not .app-file.
4548 * read.c (potable): Change .app-file to .appfile.
4550 * config/ho-decstatn.h: Renamed from ho-decstation.h.
4551 * configure.in: Adjusted.
4553 * config/obj-bfd-sunos.*: Unused; deleted.
4555 * Makefile.in (version.c, vers-stamp): Deleted.
4556 (config.h): Define GAS_VERSION.
4557 * as.c (version_string): Deleted declaration.
4558 (main): Look for GAS_VERSION instead.
4560 * doc/as.texinfo: Updated description of -a* (listing) options,
4561 and describe how to pass them through from gcc.
4563 * config/obj-coffbfd.c (do_relocs_for): Don't allocate storage or
4564 process relocs if there aren't any relocs to process. Avoids
4565 malloc/free bug on SCO too.
4567 * as.h: Move local include files below system include files, to
4568 avoid some redefinition complaints on some systems.
4569 (const, volatile): Don't need these conditionally defined if we
4570 use CONST and VOLATILE from ansidecl.h.
4571 (seg_name): Use CONST, not const.
4575 * config/tc-mips.c: Reindented to GNU standards.
4579 * config/obj-coffbfd.c (do_relocs_for): Remove a29k special case.
4580 (fixup_segment): Add a29k special case; the linker is not prepared
4581 to see a segment offset here.
4583 * app.c (do_scrub_next_char): Added new state, 10, modifying state
4584 9 to only keep a space in between identifier characters.
4586 Wed Mar 24 02:16:22 1993 david d `zoo' zuhn (zoo at poseidon.cygnus.com)
4588 * Makefile.in: add dvi target; as-$(config).texinfo might live in
4589 srcdir, might be in objdir.
4591 * doc/Makefile.in: dvi depends on as.dvi
4593 Mon Mar 22 23:59:13 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
4595 * Makefile.in: add installcheck target
4599 * config/tc-mips.c (macro): Use $AT for any floating point load.
4603 * config/tc-m68k.c (m68k_ip): For operand type 'M', reject
4604 bignums, but don't emit error message.
4608 * Makefile.in (targ-cpu.o): Depend on config.h.
4612 * app.c (do_scrub_next_char): Added new state, 9, to avoid
4613 dropping a space immediately following an identifier.
4614 * expr.c, write.c: Rewrote assert expressions to not use multiple
4615 lines; I don't think that can be done portably.
4616 * config/tc-mips.c (macro): Use $AT if target register is zero in
4617 load instruction, which it can be for a floating point load.
4621 * write.c (write_contents): Compute the relocs before writing out
4622 the section contents.
4623 * config/obj-ecoff.h, config/obj-ecoff.c: Numerous changes to get
4624 symbol table and values right.
4625 * config/tc-mips.h (LOCAL_LABEL): If OBJ_ECOFF, any label starting
4627 * config/tc-mips.c (tc_gen_reloc): If OBJ_ECOFF, adjust the addend
4630 * config/z8k.mt (TARG_CPU_DEPENDENTS): The relevant file is
4631 z8k-opc.h, not z8k.h.
4633 * config/obj-coffbfd.c (obj_coff_endef): Correct test for .bf
4636 Fri Mar 12 18:33:36 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
4638 * configure.in: recognize sparc-sun-solaris2* instead of -solaris2
4642 * expr.c, write.c: Ultrix native 4.2 cc requires assert condition
4643 to be on a single line.
4647 * Makefile.in (config.h): Create file, writing out definitions of
4648 target cpu, alias, and canonical name.
4649 (ALL_CFLAGS): No longer define TARGET_CPU.
4651 * Makefile.in (check): Print a message, instead of quitting
4654 * as.c (main): Don't catch any signals, for now.
4656 * version.c: Deleted.
4657 * Makefile.in: Generate it, putting in only the version number
4659 (VERSION): New variable.
4660 * as.c: Include config.h.
4661 (main): Reformatted version string. Include target alias. Don't
4662 print if not requested (i.e., unknown -v argument).
4664 * as.c (stralloc): Deleted.
4665 (main): Call strdup instead.
4667 * configure.in: Handle all 68300 series chips.
4668 * config/tc-m68k.c: Include config.h.
4669 (md_assemble): Assume TARGET_CPU is defined. Accept some 68300
4670 series cpus as defaults.
4671 (md_parse_option): Accept some m68300 series CPUs as defaults.
4675 * as.c (EXIT_SUCCESS, EXIT_FAILURE): Define to normal values if
4676 not already defined.
4677 (main, got_sig): Use them.
4678 * config/ho-vms.h (EXIT_SUCCESS, EXIT_FAILURE): Reverse default
4683 * config/obj-ecoff.c, config/obj-ecoff.h: Preliminary ECOFF
4686 * config/tc-mips.h (TARGET_FORMAT): Define based on OBJ_AOUT vs.
4687 OBJ_ECOFF as well as TARGET_BYTES_*_ENDIAN.
4688 (struct loc, struct proc, struct file): Moved to tc-mips.c within
4689 #ifndef OBJ_ECOFF block, since ECOFF uses different versions.
4690 * config/tc-mips.c: Rearranged for ECOFF support. Added
4691 prototypes for all static functions. Moved existing minimal
4692 debugging format support info #ifndef OBJ_ECOFF blocks.
4693 (macro_build_lui): Eliminated sign_extend argument, because ECOFF
4694 does not support a non sign extended high 16 bits reloc. Adjusted
4695 all callers accordingly.
4696 (tc_get_register): Renamed from get_register, and made non-static.
4698 * config/mips-big.mt, config/mips-lit.mt: New files. Define
4699 TARGET_BYTES_BIG_ENDIAN and TARGET_BYTES_LITTLE_ENDIAN,
4701 * configure.in (mips-*-bsd*): Use gas_target mips-lit.
4702 (mips-*-ultrix*, mips-*-irix*, mips-*-ecoff): New targets, using
4703 obj_format ecoff and gas_target mips-lit or mips-big.
4707 * version.c: Bump to version 2.0.1.
4711 * write.c (chain_frchains_together): Check that seg_info (section)
4713 (write_object_file): Call obj_frob_file after setting the symbols,
4718 * Version 2.0 released.
4722 * config/tc-i386.h (TC_COUNT_RELOC): Look for fx_addsy only.
4726 * read.h: Define stringer here.
4727 read.c, config/obj-ieee.c, config/obj-tcm88k.c: Not any of these
4732 * read.c (s_space): Multiply repeat count by mult, not fill.
4736 * read.c: Include ctype.h.
4740 Patches from Eric Youngdale:
4741 * make-gas.com: Find obstack.obj if it's not in the current
4743 * read.c (s_ignore): Don't declare is_end_of_line. It's
4744 redundant, and triggers a VMS gcc compiler bug.
4746 * write.c (write_object_file): Macro SUB_SEGMENT_ALIGN now takes
4747 current segment as an argument. (Ignored in all cases but VMS.)
4748 All callers and definitions changed.
4752 * listing.c: Cleaned up a bit, added prototypes, made NO_LISTING
4757 * config/tc-m68k.c (isbyte): Accept all values from -255 to +255,
4758 so "~0x80" won't be rejected.
4760 * config/obj-elf.c: No longer include elf/reloc.h.
4761 (obj_elf_section): Set SEC_READONLY and SEC_CODE for text section.
4762 (obj_elf_stab, obj_elf_desc): Deleted do-nothing and commented-out
4764 (obj_elf_xstab): New routine.
4765 (obj_elf_set_size): Call as_warn, not fprintf. Pass desired
4766 argument to s_ignore. Put "#if 0" around unused code.
4767 (obj_pseudo_table): Use s_ignore instead of do-nothing routines.
4768 Call elf_xstabs for .stabs and .xstabs operators.
4770 * config/tc-sparc.h (TARGET_FORMAT) [OBJ_ELF]: Now "elf32-sparc".
4772 * write.c (relax_and_size_seg): Set SEC_RELOC only if fixups are
4775 * configure.in: mips-bsd configuration was missing format spec.
4778 * Makefile.in (Makefile): Depends on configure.in.
4780 * config/tc-mips.c (append_insn): Don't check for alignment of
4781 frag in memory; alignment of instructions in section is a separate
4784 * config/tc-mips.c (macro_build_lui): Fix some assumptions of ANSI
4787 * listing.h: Always provide function declarations, not macros, so
4792 * CONTRIBUTORS: Update Gilmore entry.
4796 * frags.c (frag_init): New function.
4797 (zero_address_frag, bss_address_frag): Now initialized at run
4799 * as.c (main): Call frag_init.
4803 * app.c (do_scrub_next_char): In LEX_IS_LINE_COMMENT_START case:
4804 Don't unget ch2 if we didn't get it.
4808 * doc/Makefile.in (TEXIDIR): Updated for new layout.
4810 * config/tc-sparc.c (s_common): Add support for ELF version.
4811 (tc_gen_reloc) [BFD_ASSEMBLER]: New function.
4812 * config/tc-sparc.h (TARGET_ARCH, TARGET_FORMAT) [BFD_ASSEMBLER]:
4814 (md_convert_frag): New macro.
4816 * config/tc-m68k.c (m68k_ip): For PC-relative addressing of a
4817 symbol, fix the offset so "+2" isn't required.
4819 * config/tc-i960.c (line_comment_chars, line_separator_chars):
4820 Define as common/bss.
4821 (op_hash, reg_hash, areg_hash, iclasses_seen, br_cnt): Default C
4822 initializers are sufficient.
4824 * config/obj-aout.h [BFD_ASSEMBLER]: Include libaout.h from bfd.
4825 (TARGET_FORMAT) [BFD_ASSEMBLER]: Default to "a.out".
4826 (S_SET_*, S_GET_*, obj_frob_symbol) [BFD_ASSEMBLER]: New macros.
4827 (S_SET_TYPE) [!BFD_ASSEMBLER]: New macro.
4828 * config/obj-aout.c: Use PARAMS macro for declarations. Remove
4829 "IGNORE_DEBUG" conditional, since both branches are identical.
4830 Use S_SET_TYPE, S_GET_TYPE, and S_GET_DESC instead of directly
4831 referencing symbol structure members.
4832 (obj_aout_frob_symbol) [BFD_ASSEMBLER]: New function.
4834 * as.h (struct frag): Reordered a couple of fields for better
4837 * write.c (record_alignment) [BFD_ASSEMBLER]: Record it in the
4839 (write_contents) [BFD_ASSEMBLER]: New function.
4840 (write_object_file) [BFD_ASSEMBLER]: Always handle -R here. Call
4841 fix_new with BFD_RELOC_NONE instead of 0 or NO_RELOC. Call
4842 obj_frob_file, obj_frob_symbol, tc_frob_symbol if defined.
4843 (fixup_segment): Make sure common-section symbols get treated the
4844 same as undefined symbols.
4845 (fix_new) [BFD_ASSEMBLER]: Argument r_type is of type
4846 bfd_reloc_code_real_type. Use seg_fix_{root,tail}P derived from
4848 * write.h (fix_new): Update prototype.
4850 * tc.h (md_operand, md_convert_frag, tc_headers_hook,
4851 md_section_align, md_undefined_symbol): Don't provide prototypes
4852 if these are defined as macros.
4853 (md_convert_frag) [BFD_ASSEMBLER]: BFD version needs bfd and
4856 * symbols.c (symbol_new): Argument NAME is now pointer to const.
4857 Simplified STRIP_UNDERSCORE code. Remove assumptions about null
4858 pointers in freshly allocated storage. [BFD_ASSEMBLER]: Get new
4860 (colon): Display other/desc fields of redefined symbol only if
4861 S_GET_OTHER and S_GET_DESC are defined.
4862 (symbol_make): Argument NAME is now pointer to const.
4863 (symbol_find, symbol_find_base): Likewise.
4864 (S_IS_*, S_GET_*, S_SET_*) [BFD_ASSEMBLER]: New functions.
4865 * symbols.h: Fix prototypes for new const arguments. Add
4866 prototypes for BFD_ASSEMBLER S_* functions.
4868 * subsegs.c (subseg_change) [BFD_ASSEMBLER]: BFD version of code
4869 for changing to an existing section.
4870 (subseg_new_rest) [BFD_ASSEMBLER]: Split off from subseg_new,
4871 called by subseg_new and subseg_set.
4872 (subseg_new) [BFD_ASSEMBLER]: Rewritten to change to new section,
4873 given section name and subseg number.
4874 (subseg_set) [BFD_ASSEMBLER]: New function; change to a possibly
4875 new section/subsection.
4877 * read.c: Don't include ctype.h.
4878 (cons) [BFD_ASSEMBLER]: For undefined symbols, use BFD_RELOC_32
4879 for now; should be machine-dependent.
4881 * configure.in: Accept *-*-elf and *-*-solaris* as ELF format
4882 targets, forcing BFD use.
4886 * config/tc-sparc.c: Use PARAMS macro for static function
4887 declarations. Use BFD_RELOC_ macros everywhere, with
4888 compatibility macros declared for non-BFD mode.
4889 (struct sparc_it) [BFD_ASSEMBLER]: Use bfd_reloc_code_real_type
4890 instead of enum reloc_type.
4891 (emit_sparc_reloc): Commented-out function deleted.
4892 (md_convert_frag): Deleted.
4893 (tc_aout_pre_write_hook): Don't define for BFD_ASSEMBLER.
4894 (md_apply_fix): Changed calling sequence (conditionally) for BFD
4896 * config/tc-sparc.h (md_convert_frag): New macro.
4898 * config/obj-aout.c (obj_aout_stab): Refer to undefined_section,
4899 not SEG_UNKNOWN. Use S_SET_TYPE, S_GET_TYPE, S_GET_DESC instead
4900 of referencing fields directly.
4902 * write.c (cvt_frag_to_fill): New function; extracted from
4904 (write_object_file) [! BFD_ASSEMBLER]: Call it.
4905 (relax_and_size_seg) [BFD_ASSEMBLER]: New function; relax section
4906 and set its size and flags.
4908 * struc-symbol.h (struct symbol) [BFD_ASSEMBLER]: Replace some
4909 fields with BFD equivalents. Turn on back-pointers, and add
4910 target-specific fields at end.
4914 * config/obj-coffbfd.c (fill_section): Don't set vaddr here.
4915 (write_object_file): Set it here instead, so that fixup_segment
4916 can see the correct value.
4920 * write.c (write_object_file): Check for errors and warnings and
4921 bail out before processing contents.
4922 (chain_frchains_together_1): New function, does most of the work
4924 (chain_frchains_together) [BFD_ASSEMBLER]: New function.
4925 (remove_subsegs) [! BFD]: Call it.
4926 (write_object_file) [BFD_ASSEMBLER]: Converted to use BFD
4927 structures and routines.
4929 * config/obj-elf.*: New files.
4931 * config/mips.mt, config/rs6000.mt: Deleted.
4933 * config/h8300.mt: Don't specify compiler here.
4935 * config/z8k.mt: The z8k code depends on the z8k opcode table,
4937 * config/tc-z8k.h: Comment fix.
4939 * write.c: Reordered some functions for better inlining.
4940 (fixup_segment): Linkrelax code is no longer conditional on
4945 * config/{h8500.mt, tc-h8500.c, tc-h8500.h, obj-coffbfd.c,
4946 obj-coffbfd.h}: support for the H8/500
4950 * config/obj-vms.h (SUB_SEGMENT_ALIGN): Define VMS version here.
4951 * write.c (write_object_file): Not here.
4952 (fix_new): Initialize fx_addnumber.
4954 * listing.c: Don't include target-cpu.h explicitly, since as.h
4959 * write.h [BFD_ASSEMBLER]: Don't declare next_object_file_charP,
4960 *_fix_root, *_fix_tail, seg_fix_rootP, seg_fix_tailP.
4961 (struct fix): Reordered fields for compactness and efficiency.
4962 Converted some logical fields to 1-bit fields.
4964 * config/obj-aout.h: Use PARAMS.
4965 [BFD_ASSEMBLER]: Don't define/declare AOUT_MACHTYPE, seg_N_TYPE,
4966 N_TYPE_seg, DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE.
4968 * read.c: Don't include listing.h; as.h includes it. Removed
4970 [BFD_ASSEMBLER]: Include subsegs.h.
4971 (old_buffer, new_broken_words): Default initialization is
4974 * output-file.c [BFD_ASSEMBLER]: Include bfd.h, default TARGET_MACH
4975 to 0, define stdoutput.
4976 (output_file_create) [BFD_ASSEMBLER]: Call bfd_perror on failure.
4977 Call bfd_set_arch_mach.
4978 (output_file_close) [BFD_ASSEMBLER]: Call bfd_close, not
4979 bfd_close_all_done. Call bfd_perror on failure.
4980 (output_file_append) [BFD_ASSEMBLER]: Don't define.
4982 * config/m68kcoff.mt (LOCAL_LOADLIBES): Delete definition.
4984 * subsegs.h (segment_info_type): Always define. Omit field scnhdr
4985 if not MANY_SEGMENTS. Define new field bfd_section if
4987 (seg_info): New macro.
4989 * expr.c, input-scrub.c: Use PARAMS macro. Deleted unused
4990 variables, and some irrelevant comments.
4992 * Makefile.in (ALL_CFLAGS): Include $(BFDDEF).
4993 (LIBS): Include $(BFDLIB). Don't bother with $(CLIB).
4994 * configure.in: Permit --with-bfd-assembler now, with a warning.
4995 Variable need_bfd is now a boolean, as is new variable bfd_gas.
4996 Set BFDDEF and BFDLIB in Makefile when appropriate.
4998 * as.c: Removed "#ifdef DONTDEF" and "#ifdef comment" code.
4999 (main): Refer to flag_always_generate_output instead of
5002 * as.c (main) [BFD_ASSEMBLER]: Open output bfd.
5003 (*_section) [BFD_ASSEMBLER]: Define them.
5004 (perform_an_assembly_pass) [BFD_ASSEMBLER]: Initialize them, and
5005 set section flags when appropriate.
5006 * as.h (SEG_NORMAL) [BFD_ASSEMBLER]: Require that the specified
5007 section is not absolute, undefined, or an assembler internal one.
5008 (absolute_section, undefined_section): Always define.
5009 * expr.c, read.c, symbols.c: Refer to *_section, not SEG_*; break
5010 switch statements into if-else trees.
5011 * symbols.c [MANY_SEGMENTS]: Deleted redundant definitions of
5012 SEG_BSS and SEG_DATA.
5014 * as.h (frag_now_fix): New macro.
5015 * symbols.c (colon): Use it.
5019 * config/tc-mips.c: Added mips support for mips-dec-bsd.
5020 * config/tc-mips.h: Added mips support for mips-dec-bsd.
5021 * config/ho-mipsbsd.h: Added mips support for mips-dec-bsd.
5022 * config/mips-opcode.h: Added mips support for mips-dec-bsd.
5023 * configure.in: Added mips support for mips-dec-bsd.
5024 * atof-generic.c: Define TRUE and FALSE if not defined.
5028 * version.c: Bumped version number to 1.93.05.
5032 * config/obj-coff.c (obj_emit_relocations): Don't use #elif.
5033 (obj_emit_lineno): Don't need return at end of void function.
5034 (obj_symbol_new_hook): Ditto.
5036 * config/tc-m68k.c: Removed some unused code.
5037 (tc_aout_fix_to_chars): Array nbytes_r_length is now const.
5039 * config/tc-m68k.h (TC_COUNT_RELOC): Don't emit reloc if only
5040 offset field is set.
5044 * config/tc-sparc.c (architecture_requested, warn_on_bump,
5045 md_relax_table): Use default zero initialization.
5046 (s_reserve): Since SEG_E2 is equivalent to SEG_BSS, just use the
5047 latter, instead of selecting with preprocessor conditionals.
5049 Thu Jan 7 08:58:21 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
5051 * configure.in: recognise all sparclite variants
5055 * read.c (s_data) [!BFD_ASSEMBLER]: Fix typo in 4 Jan change --
5056 accidentally changed to use subseg_change where it should have
5061 * expr.c (operand): If character other than comma or newline is a
5062 logical end-of-line character, use the newline case.
5063 From Eric Youngdale:
5064 (operand): Set X_add_number field for floating-point numbers.
5065 (operand): Treat zero byte as end-of-operand.
5067 * configure.in (per-target): Look for with_bfd_assembler option.
5068 For now, only accept "no", until the merge is done.
5071 * as.c, flonum-konst.c, hex-value.c, input-file.c, version.c,
5072 config/obj-aout.h, config/obj-vms.c: VMS -> HO_VMS.
5073 * read.c: Finish conversion to S_* macros in the VMS only
5074 parts of the program. Add "const" modifier to hex_value.
5075 * as.c, read.c, symbols.c, write.c: Change "ifdef VMS" to
5077 * expr.c: Add "const" modifier to hex_value.
5078 * symbols.c: Finish conversion to S_* macros in the VMS only
5079 parts of the program. Add "const" modifier to
5080 md_[long,short]_jump_size. Remove declaration of const_flag
5081 (which will be declared in obj-vms.h).
5082 * write.c: Add "const" modifier to md_[long,short]_jump_size.
5083 Fix arguments to VMS_write_object_file.
5084 * config-gas.com: New file. Script for VMS systems to set up the
5085 configuration to build gas for VMS, and create config.status.
5086 * make-gas.com: Redone to work with new scheme.
5087 * obj-vms.c: Patch to fix bug where we were not correctly parsing the
5089 * obj-vms.c: Define macros COPY_LONG and COPY_SHORT which
5090 will swap bytes if needed on a big endian system. Use throughout
5092 * obj-vms.c (obj_aout_stab): Add code to generate listing file.
5093 * obj-vms.c (VMS_typedef_parse): Add alias to correctly handle certain
5094 types of malformed stabs. Change parsing algorithm so that we are
5095 more certain of having all of the information that we need on hand.
5096 * obj-vms.c (final_forward_reference): New function, used to help
5097 resolve the data types of as many struct elements as possible
5098 when some part of the struct is not fully defined by the compiler.
5099 * obj-vms.c (VMS_LSYM_Parse): Correctly handle case of continuation
5101 * obj-vms.c (VMS_write_object_file): Define all vtable psects
5102 as symbols as well in the object file. Look for external functions
5103 that start with "__vt.", and turn them into variables, since the
5104 g++ compiler is incapable of doing this.
5105 * tc-vax.c: Add '1' option for backward compatibility with older GCC
5107 * bignum-copy.c (bignum_copy): Fix bug where we pad with zeroes.
5108 * input-scrub.c (as_where): Fix bug where as would crash if we did not
5109 have the name of the source file yet.
5110 * config/ho-vms.h: define HO_VMS, not HO_VAX.
5114 * read.c (s_data): Always use "data_section", since it'll map to
5115 SEG_DATA or SEG_E1 if needed.
5116 (s_lcomm): Likewise with bss_section.
5117 (s_fill): Use memset, not bzero.
5121 * read.c: Deleted some code under "#ifdef DONTDEF" that was for
5122 handling GDB symbol table data.
5124 * config/obj-aout.h (segment_name): Delete definition.
5125 (seg_name): Delete declaration.
5126 * config/obj-bout.h (segment_name, seg_name): Ditto.
5127 * config/obj-vms.h (segment_name, seg_name): Ditto.
5128 * config/obj-coff.h (segment_name): Ditto.
5129 * config/obj-coffbfd.h (segment_name): Ditto.
5131 * Changes for BFD_ASSEMBLER:
5132 * obj.h (obj_crawl_symbol_chain): Declare only if not
5134 (obj_header_append, obj_pre_write_hook): Ditto.
5135 * as.h (stdoutput): New var, defined only if BFD_ASSEMBLER.
5136 (segT) [BFD_ASSEMBLER]: New typedef for "asection *".
5137 (segment_name) If BFD_ASSEMBLER, look up BFD section name;
5138 otherwise, use seg_name array.
5139 (seg_name): Declare only if not BFD_ASSEMBLER.
5140 (section_alignment): Declare only if not BFD_ASSEMBLER.
5141 (big_section, reg_section, pass1_section, diff_section,
5142 absent_section, text_section, data_section, bss_section): If
5143 BFD_ASSEMBLER, declare as variables; otherwise, declare as macros,
5144 mapping to segT enum values.
5145 (tc_aout_fix_to_chars, next_object_file_charP): Force parse errors
5146 if these are used or defined, if BFD_ASSEMBLER.
5147 (subseg_set, subseg_new) [BFD_ASSEMBLER]: Functionality of old
5148 subseg_new split into two functions.
5149 (SEG_NORMAL): For BFD_ASSEMBLER, always return true, for now.
5151 * as.h (volatile): Don't define if already defined.
5152 (had_errors, had_warnings): Provide prototypes for ANSI C even if
5154 (as_bad, as_fatal, as_tsktsk, as_warn): For GNU C version 2,
5155 declare with format attribute for -Wformat checking.
5159 * app.c, config/tc-*.c: Don't include read.h, since it is already
5162 * These are based on patches from Minh Tran-le
5164 * configure.in (i[34]86-ibm-aix*): Accept i486 for host. Use
5165 obj_format coffbfd and gas_target i386coff for target.
5166 (i[34]86-*-isc*): New host (uses sysv).
5167 * config/i386aix.mt: Removed (no longer used).
5168 * config/mh-i386aix (RANLIB): Use true rather than /bin/true.
5170 (LDFLAGS): Added, defined as -shlib.
5171 * config/te-i386aix.h (REVERSE_SORT_RELOCS): Undefine.
5172 * config/te-sco386.h (LOCAL_LABEL): Don't define.
5173 (DOT_LABEL_PREFIX): Define.
5174 * expr.c (operand): If DOT_LABEL_PREFIX, use .L0\001 as a label
5175 name rather than L0\001.
5176 * read.c (s_lcomm): Make a frag in SEG_BSS rather than using
5178 * symbols.c, symbols.h (local_bss_counter): Removed.
5179 * write.c (write_object_file): bss no longer uses
5180 local_bss_counter. Pass correct data and bss size to
5181 VMS_write_object_file.
5182 * config/obj-vms.c (VMS_write_object_file): Accept bss size as
5183 argument, rather than using local_bss_counter.
5184 * config/tc-m88k.c (s_bss): Don't use local_bss_counter.
5185 * config/tc-sparc.c (s_reserve): Don't use local_bss_counter.
5186 * config/obj-coffbfd.c (had_lineno, had_reloc): Removed.
5187 (size_section): Restored sanity check.
5188 (do_relocs_for): Base section address on s_paddr rather than
5189 computing it. Adjust a29k R_IHIHALF special case to account for
5190 section paddr (used to require paddr to be zero). If there are no
5191 reclos, set s_relptr to 0. Set relocation size in object_headers.
5192 (fill_section): Always set s_vaddr here, removing
5193 ZERO_BASED_SEGMENTS case. Force s_scnptr for bss to 0. Don't set
5194 NOLOAD for i386 .bss, because it confuses the SVR3 native linker.
5195 Set STYP_INFO for .comment.
5196 (coff_header_append): Use object headers and H_{SET,GET}_* macros.
5197 Make aouthdr writing depend on OBJ_COFF_OMIT_OPTIONAL_HEADER.
5198 (crawl_symbols): Handle 8 character section name correctly. Use
5199 H_{SET,GET}_* macros.
5200 (do_linenos_for): Set lineno size in object_headers.
5201 (write_object_file): Use H_{SET,GET}_* macros. Don't bother to
5202 set s_vaddr here. If string_byte_count remains 4, set it back to
5203 0, and only write strings out if there are some. Call
5204 fill_section before do_relocs_for and do_linenos_for.
5205 (obj_coff_section): Handle optional quoted second argument giving
5206 section characteristics.
5207 (obj_coff_bss): Added to handle .bss.
5208 (obj_coff_ident): Added to handle .ident (puts string in .comment
5210 (obj_coff_lcomm): Put common symbols in .bss, not .data.
5211 (fixup_mdeps): Change to segment. Call frag_wane after
5213 (fixup_segment): Explicitly check S_IS_COMMON before making 386
5214 adjustment (already happened only for common symbols, but this is
5216 * config/obj-coffbfd.h (OBJ_COFF_OMIT_OPTIONAL_HEADER): Define.
5217 * config/tc-i386.c (s_bss): Don't use if I386COFF.
5218 (md_pseudo_table): Ignore .optim and .noopt.
5219 (tc_coff_sizemachdep): New function.
5220 * config/tc-i386.h (REVERSE_SORT_RELOCS): Undef, for SVR3
5222 (LOCAL_LABEL): Removed definition.
5223 (DOT_LABEL_PREFIX): Defined.
5227 * app.c (app_push): Use memcpy, not bcopy.
5228 (do_scrub_next_char): For \", return " not '.
5229 (symbol_chars): Now const.
5231 * expr.c (operand): If not LOCAL_LABELS_FB, don't look for "0f"
5232 and "0b". If LOCAL_LABELS_DOLLAR, check for "0$".
5234 * config/obj-coff.h: Don't use #elif.
5236 * config/ho-sunos.h: Don't include sys/stdtypes.h; 4.0.3 doesn't
5241 * write.c, obj-ieee.c: don't define SUB_SEGMENT_ALIGN if it is
5246 * app.c (do_scrub_begin): allow single quote strings if so
5249 * config/*z8k*: checkpoint
5253 * read.c (read_a_source_file): avoid calling xmalloc (0).
5257 * listing.c: Call xmalloc, not malloc; don't declare malloc.
5259 * Changes to support SCO 3.2v4:
5260 * read.c (s_align_bytes, s_align_ptwo): If not SEG_DATA or
5261 SEG_BSS, fill with NOP_OPCODE.
5262 * config/i386coff.mt: Add opcode/i386.h to TARG_CPU_DEPENDENTS.
5263 * config/obj-coffbfd.c (do_relocs_for): Increment addr even if not
5264 using ZERO_BASED_SEGMENTS.
5265 (fill_section): If ZERO_BASED_SEGMENTS, set segment addresses, but
5266 never set segment address for SEG_E2 (.bss) and don't write out
5267 SEG_E2 contents. Set .init and .fini sections to STYP_TEXT.
5268 (obj_coff_endef): Don't merge labels or symbols awaiting forward
5269 definitions, and don't merge tags with non-tags. Check for .bf
5270 rather than just checking whether the second character is b and
5271 the third character is f.
5272 (obj_coff_val): gcc can generate values which we don't handle
5273 correctly; discard information for now, since it only affects the
5274 debugging information.
5275 (tag_find_or_name): Don't insert tags in the symbol table.
5276 (yank_symbols): Don't merge labels.
5277 (write_object_file): Don't define SUB_SEGMENT_ALIGN if it is
5278 already defined. Fill subsegments with NOP_OPCODE, not 0. Don't
5279 set segment address if ZERO_BASED_SEGMENTS.
5280 (obj_coff_section): Accept and ignore a trailing quoted string, as
5281 used in AT&T i386 syntax.
5282 (fixup_segment): Take segment as argument. On the i386, adjust PC
5283 relative addends by the segment vaddr.
5284 * tc-i386.h: Define SUB_SEGMENT_ALIGN.
5285 * tc-a29k.h: Define ZERO_BASED_SEGMENTS.
5286 * tc-i386.c: (i386_operand): If I386COFF, accept any segment type.
5290 * config/obj-coffbfd.c: Include libcoff.h.
5292 * version.c: Now version 1.93.
5296 * config/tc-i386.c (md_pseudo_table): For 386bsd and linux, do
5297 power-of-two alignment for .align.
5299 * as.h: If BROKEN_ASSERT, just redefine `assert' to be trivial,
5300 and leave everything else alone.
5304 * Makefile.in (as.new): Don't bother saving as.old.
5306 * write.c: Conditionalize on OBJ_VMS, not VMS.
5307 (magic_number_for_object_file): Don't define if OBJ_VMS.
5309 * config/obj-vms.c: Changes for traditional C.
5313 * config/ho-generic.h (malloc, realloc): Declare.
5315 * Lots of comment/whitespace changes.
5317 * write.h (struct fix): Some fields reordered, narrowed.
5319 * read.c (MASK_CHAR): Define using C types, not magic number.
5321 * as.c, input-file.c: Deleted some unused code.
5323 * app.c, as.h: Doc fix.
5325 * flonum-konst.c, flonum-mult.c: Include ansidecl.h.
5327 * as.h (xmalloc): Argument is long.
5329 * xmalloc.c (error): Remove declaration; as.h takes care of it.
5331 * doc/as.texinfo: Regrouped documentation of some command-line
5332 options. Updated options documentation for m68k. Some minor
5333 wording/punctuation changes.
5337 * configure.in: Accept target OS "vms".
5339 * symbols.c: Merged ANSI and non-ANSI function decls, using
5342 * xmalloc.c: Just include as.h, don't bother trying to figure out
5345 * strstr.c, strerror.c: Deleted.
5346 * Makefile.in: Deleted references.
5348 * config/tc-ns32k.c: Don't include header file for string
5349 declarations; leave that to ho-*.h.
5351 Fri Nov 27 04:11:36 1992 Ken Raeburn (raeburn at cambridge-laptop.cygnus.com)
5353 * config/coff_gnu.h [TC_I860]: Guesses for reloc type values,
5354 imported from FSF sources.
5356 * messages.c (strerror): Declare unconditionally.
5358 * as.h: Delete alloca and register definitions.
5360 * config/atof-ieee.c (mask): Now const.
5362 * obstack.c, obstack.h: Deleted.
5364 * as.h (flag_readonly_data_in_text): New flag.
5365 * as.c (main): Set it for -R.
5367 * as.h (flag_suppress_warnings): New flag.
5368 * as.c (main): Set it for -W.
5369 * messages.c (as_warn): Check it instead of flagseen['W'].
5371 * as.h (flag_always_generate_output): New flag.
5372 * as.c (main): Set it for -Z.
5374 * config/tc-sparc.h: Define NEED_FX_R_TYPE.
5375 * config/tc-a29k.h: Ditto.
5376 * write.h (struct fix): Don't conditionalize fx_r_type field on TC
5379 * as.h: Merged ANSI and non-ANSI function decls, using PARAMS
5381 * bignum.h, expr.h, flonum.h, frags.h, input-file.h, listing.h,
5382 obj.h, output-file.h, read.h, struc-symbol.h, symbols.h, tc.h,
5386 * xmalloc.c: Conditionalize on HAVE_MALLOC_H, not USG. Fold in
5387 xrealloc from xrealloc.c.
5388 * xrealloc.c: Deleted.
5389 * Makefile.in (REAL_SOURCES, OBJS): Adjusted.
5391 * configure.in: For host CPU a29k, rs6000, vax, consider using bsd
5394 * config/ho-sysv.h (setbuffer, HO_USG): Deleted.
5396 * config/atof-ieee.c (atof_ieee): Exponent field isn't a pointer;
5397 don't initialize it with NULL.
5399 * config/ho-vax.h (M_VAX): Deleted; was unused.
5401 * README-vms, config/ho-vms.h, config/obj-vms.c, config/obj-vms.h:
5402 New files imported from FSF version, contributed by Eric Youngdale.
5403 * README-vms-dbg, config/vms: Deleted.
5405 * ChangeLog, config/ChangeLog: Merged.
5407 * config/*tahoe*, configure.in: Tahoe support brought in from FSF
5410 * input-file.c (input_file_open): Eliminate call to setvbuf.
5411 [USG] (setbuffer): Deleted macro.
5415 * all files: Whitespace changes for GNU indentation style, done by
5416 GNU `indent'. Some cleanup still needed, especially of comments.
5418 * configure.in: No te-386bsd.h file exists; don't try to use it.
5420 * obj-coff.c (obj_coff_endef): Use as_warn, not fprintf.
5422 * tc-m68k.c (md_assemble): Don't complain about 68000 with 68881;
5423 could be doing emulation.
5428 * doc/Makefile.in, doc/all.m4, doc/as-all.texinfo, doc/as.texinfo:
5433 * Makefile.in (as.o, obj-format.o): added dependency on subsegs.h.
5435 * subsegs.h: add extern to segment_info declaration.
5437 * read.h: added extern declarations for comment_chars,
5438 line_comment_chars, and line_separator_chars.
5439 read.c, app.c: removed definitions of comment_chars,
5440 line_comment_chars, and line_separator_chars.
5442 * tc-m68k.c (m68k_reg_parse): If REGISTER_PREFIX isn't defined,
5443 still accept (but don't require) OPTIONAL_REGISTER_PREFIX before
5445 (insert_reg): put REGISTER_PREFIX before register names before
5446 putting them in the symbol table.
5447 * tc-m68k.h (OPTIONAL_REGISTER_PREFIX): Define to be "%", if not
5450 * obj-coffbfd.c (fill_section): set STYP_NOLOAD bit for .bss
5453 * atof-ieee.c, atof-ns32k.c, tc-*.c: made EXP_CHARS, FLT_CHARS,
5454 comment_chars, line_comment_chars and line_seperator_chars
5455 consistently const, and always initialized them. Included read.h.
5459 * tc-sparc.c (sparc_ip): Add code to flag error if an absolute
5460 constant will not fit in an immediate field.
5461 (md_apply_fix, RELOC_BASE13 case): Check for relocation overflow.
5465 * obj-coff.c (callj_table): Delete global variable.
5466 (obj_emit_relocations): Define it locally here, and only if
5469 * tc-m68k.c (m68k_reg_parse): Underscore is part of a symbol name.
5470 (m68k_ip): Don't warn about bignum used as float bit-pattern.
5472 * obj-coff.c: Replaced ANSI and non-ANSI function declarations
5473 with a single set using PARAMS macro.
5475 * tc-i960.c (tc_bout_fix_to_chars): Bit-field fixups want a length
5478 * tc-i960.c: Missed a couple of 0->NO_RELOC conversions.
5480 * tc-i960.h (N_BALNAME, N_CALLNAME): Define as char-type values,
5481 so widening works consistently.
5485 * version.c: Put conditional "const" before version_string, not
5486 before dummy function for VMS. Now version 1.91.03.
5488 * app.c (do_scrub_next_char): Need double-\ before `000' to show
5489 printed rep of null character.
5493 * obj-coffbfd.c (write_object_file): check return value of
5498 * Support for i386-sysv.
5499 obj-coffbfd.c (do_relocs_for, write_object_file): set segment
5500 addresses to reasonable sizes. New define ZERO_BASED_SEGMENTS can
5501 be used to set them all to zero as was done before.
5502 (fill_section): segment addresses now set in write_object_file.
5503 (fill_section): Don't set STYP_NOLOAD for .bss section.
5504 (fixup_segment): 386 uses strange common symbol format.
5505 tc-i386.c (tc_coff_fix2rtype): use R_DIR32, not R_RELLONG, for
5506 compatibility with SVR3.2 linker.
5507 * configure.in: i386-sysv and i386-sco use coffbfd.
5509 * app.c (do_scrub_next_char): discard whitespace after a label.
5511 Sat Oct 10 12:33:45 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
5513 * configure.in: differentiate between SunOS 4 and Solaris2 for Sun4
5514 hosts, use the sysv configuration for solaris2
5518 fix i960+non-bfd coff bit rot.
5519 * obj-coff.c (c_dot_file_symbol, obj_coff_ln, obj_coff_line):
5520 support for C source listings. (obj_coff_endef): look in the right
5521 part of the symbol for the symbol name
5523 * tc-m68k.c (get_num): make it work for all segments, not just the
5526 Mon Oct 5 03:30:36 1992 Mark Eichin (eichin at tweedledumber.cygnus.com)
5528 * configure.in: recognize i386-*-bsd emulation.
5530 Thu Oct 1 23:05:12 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
5532 * configure.in: use the cpu-vendor-os triple for host and target
5536 * obj-coffbfd.c (write_object_file): don't fixup for the z8k
5537 * tc-z8k.c: lots of bug fixes
5541 * tc-i960.h, tc-i960.c: avoid the ANSI preprocessor addition
5542 #elif, since it is not supported by old compilers.
5543 ho-rs6000.h, tc-m68k.c: the native RS/6000 compiler miscompiles a
5544 couple of expressions in tc-m68k.c.
5548 * read.c (cons): If NO_RELOC is defined, use it.
5550 * tc-i960.c (get_cdisp): Use NO_RELOC, not 0, in call to fix_new.
5554 * tc-m68k.h: if M68KCOFF, define DOT_LABEL_PREFIX (to require
5555 local labels to start with a .) and set REGISTER_PREFIX to %.
5556 tc-m68k.c (m68k_reg_parse): accept REGISTER_PREFIX if defined.
5560 * messages.c: Comment changes.
5564 * as.h: Test if __STDC__ is defined only, don't test its value.
5565 * messages.c: If __STDC__ is not defined, define NO_STDARG.
5569 * listing.c (debugging_pseudo): Add stabs and stabn as things to
5574 * obj-coffbfd.c (do_relocs_for,fill_section): now allocate all
5575 sections starting from zero, rather than making them consecutive.
5576 This makes subsequent reloc calculations easier, esp if the object
5577 format doesn't understand addends. (obj_coff_lcomm): (maybe temporarily)
5578 allocate lcomm in .data rather than in .bss. It seems that some
5579 tools can't cope with a non-zero sized bss before linkage.
5583 * tc-m68k.c: Replace "enum m68k_architecture" with "int"
5584 throughout. That enum no longer means what we thought it meant.
5586 * tc-m68k.c (md_assemble, md_parse_option): Handle new
5587 "-mno-688[58]1" options.
5589 * tc-m68k.c: Added CPU32 support.
5593 * tc-m68k.c (m68k_ip): An(disp) is not pc relative.
5597 * Makefile.in (as.new): Remove dependence on LOCAL_LOADLIBES.
5598 Change LIBDEPS dependence to LIBS.
5602 * Makefile.in (install): if $(tooldir) exists, install as in
5607 * Added WARN_SIGNED_OVERFLOW_WORD define to give an error if any
5608 .word is < -32768 or > 32767. The -J flag causes the error to be
5609 ignored. This is to catch over-sized switches generated by gcc on
5610 systems which don't support the broken .word hack.
5611 as.c (main): permit -J if WARN_SIGNED_OVERFLOW_WORD.
5612 write.c (fixup_segment): check for signed .word overflow if
5613 WARN_SIGNED_OVERFLOW_WORD.
5615 * write.c (fixup_segment): fixed missing parens in expression
5616 checking for byte or word overflow.
5618 * obj-coffbfd.h: define WARN_SIGNED_OVERFLOW_WORD.
5619 obj-coffbfd.c (fixup_segment): check for signed .word overflow if
5620 WARN_SIGNED_OVERFLOW_WORD.
5622 * obj-coffbfd.c (fixup_segment): fixed missing parens in
5623 expression checking for byte or word overflow.
5627 Support for i386 coff
5628 * obj-coffbfd.h : added stuff
5629 * tc-i386.c (tc_coff_fix2rtype): new function
5630 * tc-i386.h : new coff defines
5634 * input-scrub.c (input_scrub_push): call input_file_begin, not
5636 messages.c (as_perror): print ": " between the passed in error and
5637 the strerror, like perror does.
5641 * Makefile.in: use gas_target instead of modifying target_cpu.
5642 From Steve Chamberlain:
5643 Makefile.in: Handle m68*-*-coff*.
5644 read.c, read.h: add mult argument to s_space
5646 * tc-m68k.c (m68k_ip, m68k_ip_op, get_num, try_moto_index): merge
5647 Motorola and MIT syntax; gas can now assemble either type of
5649 tc-m68kmote.c, tc-m68kmote.h: removed now superfluous files.
5650 From Steve Chamberlain:
5651 m68kcoff.mt: for m68k COFF.
5652 obj-coffbfd.c: (fixup_mdeps) added
5653 (size_section) removed bad sanity check
5654 (fill_section) added rs_machine_dependent case
5655 (write_object_file) call fixup_mdeps
5656 (fixup_segment) set fx_subsy to 0.
5657 obj-coffbfd.h: define WORKING_DOT_WORD (too hard to support) and
5659 tc-m68k.c, config/tc-m68k.h: added m68k COFF support and Motorala
5664 * Makefile.in (LIBS): Include opcode library.
5668 * config/tc-m68k.c (get_num, case SEG_BIG): If only small integers
5669 including zero are accepted, pass +0.0.
5673 * Makefile.in: map "as" through program_transform_name when
5676 * doc/Makefile.in: map "as" through program_transform_name when
5681 * Makefile.in (as.new): Depend on LOCAL_LOADLIBES.
5685 * obj-bout.h, obj-bout.c (obj_header_append, obj_symbol_to_chars),
5686 tc-i960.c (md_ri_to_chars): Always output bout object file in
5687 little endian byte order (used to use endianness of host).
5691 * config/tc-m68k.c (init_table): Now const. Always include 68851
5692 data, so that "bc" is available to 68040 cache instructions.
5693 Added "tt0", "tt1", and 68ec030 variants.
5694 (md_assemble): Complain if 68000 (only) and 68881 are specified.
5695 (enum _register): Added TT0, TT1.
5696 (m68k_ip, cases '3' and 't'): Handle new operand type codes. Pass
5697 line number correctly in "internal error" messages. Don't print
5698 architecture-mismatch message for operand errors.
5701 * config/tc-m68k.c (m68k_ip, case '_'): Use addword twice rather
5702 than install_operand.
5706 * listing.c (buffer_line): rewind to the start of include
5707 files, they might be included twice.
5709 * z8k.c, z8k.h, z8k.mt: z8000 support stuff
5713 * Makefile.in: defined TARGET_CPU for C code so that it can choose
5714 one element of a family.
5716 * tc-m68k.c: use TARGET_CPU to choose default cpu type.
5718 * te-generic.h: default to LOCAL_LABELS_DOLLAR and LOCAL_LABELS_FB
5719 so that we can assemble hand-written libgcc code.
5723 * messages.c (as_warn): Use fputs, not fprintf, with a buffer that
5724 has already been formatted (but may still contain %-characters).
5729 * tc-m68k.c, tc-m68kmote.c: the cas2 instruction is supposed to be
5730 written with indirection on the last two operands, which can be
5731 either data or address registers. Added a new operand type 'r'
5732 which accepts either register type. Added '(' to notend stuff in
5733 tc-m68kmote.c to accept (a0):(a2) in cas2 instruction.
5737 * as.h (enum _relax_state): Start off at one, not zero, to better
5738 catch uninitialized-variable errors.
5739 (linkrelax): Declare new variable.
5741 * messages.c (warning_count, error_count): Default initializer is
5744 * write.c: Merged some declarations, using PARMS macro.
5745 (text_frag_root, data_frag_root, bss_frag_root, text_last_frag,
5746 data_last_frag): No longer static.
5747 (write_object_file, case rs_align or rs_org): If HANDLE_ALIGN is
5748 defined, call it. Change segments before calling fixup_segment.
5749 (relax_align): If linkrelax, provide extra padding.
5751 * obj-bout.c (obj_emit_relocations): Emit alignment relocs despite
5752 their not having symbols associated.
5754 * tc-i960.c (norelax, instrument_branches): Default initializer is
5756 (linkrelax): Delete variable definition.
5757 (mem_fmt): Call fix_new with NO_RELOC.
5758 (tc_bout_fix_to_chars): Handle alignment relocs.
5759 (i960_handle_align): New function.
5760 * tc-i960.h (linkrelax): Delete declaration.
5761 (HANDLE_ALIGN): New macro; calls i960_handle_align.
5762 (NEED_FX_R_TYPE, NO_RELOC): New macros.
5766 * config/sparc.mt: New file. Grab sparc opcode table from bfd
5771 * Makefile.in: always create installation directories. Removed
5772 MINUS_G, set CFLAGS to default to -g, added FLAGS_TO_PASS, passed
5773 FLAGS_TO_PASS to recursive makes.
5775 * doc/Makefile.in: always create installation directories.
5779 * input-scrub.c (input_scrub_pop, input_scrub_push): memcpy was
5780 being used with args swapped, causing occasional lossage when
5781 refilling buffers after an include file.
5785 * messages.c (as_tsktsk): Use correct ANSI form for stdarg
5786 version. Discard bogus DONTDEF version.
5787 (as_warn, as_bad, as_fatal): Likewise.
5791 * config/tc-m68k.c (m68k_ip): If instruction is invalid for the
5792 selected architecture, print a message saying so and listing what
5793 processors support it, rather than saying "operands mismatch".
5797 * as.h [BROKEN_ASSERT]: If defined, turn off all assertion checks.
5799 * config/ho-rs6000.h (M_RS6000): Don't define it.
5801 (BROKEN_ASSERT): Define it if not __STDC__.
5805 * sparc.mt: New file.
5809 * tc-m68k.c: ".align N" means align to N-byte boundary *only*
5810 if TN_SUN3; otherwise align to 2**N-byte bounary.
5814 * read.c (s_fill): make the .fill size clamped error a warn and
5815 fix bug where 0's were always placed.
5817 * config/tc-h8300.c: if a :8 is seen after an operand, fill top
5818 two bytes of any constant with 0xff:
5822 * config/tc-m68k.c (md_pseudo_table): fix the .align thing
5823 the right way; for just the 68k. Sun 3 .align is nbytes, not ptwo.
5825 Wed Aug 5 01:54:34 1992 John Gilmore (gnu at cygnus.com)
5827 * tc-m68k.c (try_index): Error if index scaling specified and
5828 assembling for an older CPU than a 68020.
5832 * config/tc-sparc.c (tc_aout_fix_to_chars): If pc-relative, take
5833 fx_offset into account.
5837 * configure.in (mips host): Accept "ultrix" with version number.
5839 * expr.c (floating_constant): Separate "=-" to avoid confusing
5840 ancient or broken compilers.
5842 * config/tc-m68k.c (m68k_ip): Mismatch error could also indicate
5843 processor/opcode mismatch, so reword the error message.
5844 (md_assemble): If no CPU has been set (even if FPU/PMMU
5845 characteristics have been), default to 68020. Don't need extra
5846 quotes around error string.
5850 * read.c (potable): Revert sac's incorrect change made Jul 13.
5851 Align really is supposed to be ptwo not nbytes.
5855 * Makefile.in: _Do_ include libiberty. (from sef)
5859 * expr.c (integer_constant): Handle "0f" and "0b" label references
5864 * write.c (fixup_segment): if relaxing, don't do anything.
5865 * config/obj-bout.[ch] : maintain the a_relaxable file header info
5866 * config/tc-i960.c: new option -linkrelax
5870 * expr.c (expr): allow SEG_BSS in expressions
5871 * read.c (potable): align should be nbytes, not ptwo!
5872 * write.c (write_object_file): extra glue for new bss attributes
5873 (relax_segment): SEG_BSS is ok now
5874 * config/tc-m68k.c (m68k_ip_op): can now parse more @( modes
5878 * obj-coffbfd.c (fill_section): mark .lit sections as STYP_LIT
5882 * configure.in: recognize m680x0 as having sun3 emulation mode for
5883 vxworks environment.
5888 * Makefile.in: Add program_suffix (parallel to program_prefix)
5892 * app.c (process_escape): new function to handle escapes the right
5893 way, (do_scrub_next_char): use new function
5894 * cond.c (s_ifdef): do ifdef/ifndef right
5895 * read.c (s_fill): make the , expressions optional like the doc
5897 * config/tc-h8300.[ch]: better warnings
5901 * subsegs.c (subsegs_begin): create bss0_frchainP in the same was
5904 * write.c (write_object_file): various changes to handle data in
5905 the BSS segment in much the same was as stuff in the DATA segment.
5907 * tc-m68k.c (m68kip): Fix typo so that only arch's >=68020 do
5908 pcrel data stuff. (md_estimate_size_before_relax): when relaxing a
5909 68010 bxx into a bra+6 jmpxx, put the bytes of the jmp opcode into
5910 the right place. (s_bss): Don't put .bss stuff into SEG_DATA, put
5915 * expr.c(expr): allow SEG_REGISTER in expressions.
5916 * read.c(pseudo_set): register expressions can be the source of a
5918 * subsegs.c (subseg_new): Now -R forces all changes to SEG_DATA to
5919 goto SEG_TEXT (if a.out)
5920 * write.c (write_object_file): If a.out don't use the old way for
5922 * config/obj-a.out (s_sect): complain if the user tries to use a
5923 subsegment with a value which might interfere with out -R hackery.
5924 * config/tc-m68k.c (m68k_reg_parse): lookup names in symbol table
5925 rather than use ugly if tree. (init_regtable): insert register
5926 names into symbol table.
5930 * write.c (write_object_file): keep the fix_tail clean, which
5931 fixes a bug in -R where relocations were being lost.
5935 * configure.in: recognize m680x0 as having sun3 emulation mode for
5936 vxworks environment.
5940 * configure.in: recognize m680x0 as an m68k
5944 * configure.in: Recognize sparclite as a sparc variant.
5946 * tc-sparc.c: Use new ARCHITECTURES_CONFLICT_P macro. Mention new
5951 * config/tc-a29k.c: lint
5952 * listing.c, expr.c: patches from Andrew Smith
5956 * doc/Makefile.in: use m4 rather than gm4.
5960 * obj-coffbfd.c: use is a synonym for section, (do_relocs_for):
5961 calc the base of relocs correctly.
5962 * tc-a29k.c (parse_operand): allow expressions to be in any section.
5966 * as.c, write.c: use -K rather than -k for the broken word warning
5971 * Makefile.in: do not print recursion lines.
5975 * Makefile.in: the tooldir copy of gas goes directly in tooldir.
5979 * write.c (write_object_file): For b.out format, round up section
5980 start addresses to match required alignment.
5984 * Makefile.in (install): Install into $(tooldir)/bin, since that's
5985 where gcc looks for it.
5989 * Makefile.in: Changed some lines to be less confusing for some
5992 * input-file.c: Conditionalize on _IOFBF, not VMS.
5994 * read.c, write.c: Change a series of ifdef/elif to
5995 ifdef/else/ifdef etc.
5999 * symbols.c (fb_label_init): fix sizeof to memset.
6003 * Makefile.in: install the man page.
6005 * Makefile.in: pass down MAKEINFO explicitly on info.
6007 * doc/Makefile.in: use $(MAKEINFO) not makeinfo.
6011 * flonum-const.c: renamed flonum-konst.c to stop dos name
6016 * tc-m68k.h, te-sun3.h: moved LOCAL_LABELS_FB definition from
6017 tc-m68k.h to te-sun3.h.
6021 * configure.in: vxworks68 gets te-sun3.h.
6023 * expr.c: remove limitation that local_labels_dollar or
6024 local_labels_fb must be < 10.
6026 * symbols.c: remove local_labels_dollar, replace with a function
6027 interface for a sparse array. All users adjusted.
6029 * te-sun3.h: add LOCAL_LABELS_DOLLAR.
6033 * doc/Makefile.in: commented out line for building as-all.texinfo.
6036 * doc/as.texinfo, doc/as-all.texinfo: added menu item hooks.
6040 * Makefile.in: added check target.
6044 * Makefile.in: added tooldir and program_prefix.
6048 * write.{c,h} (fix_new): Make these declarations consistent.
6052 * Makefile.in (strerror.o): Add rule so that broken Sun make can
6055 Wed Feb 26 19:26:28 1992 Steve Chamberlain (sac at thepub.cygnus.com)
6057 * read.c, obj-coffbfd.c : fix h8300 specific bit rot
6059 * expr.c (operand): if can't work out what sort of operand it is,
6060 then look through FLT_CHARS for a hint.
6064 * Makefile.in, configure.in: removed traces of namesubdir,
6065 -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced
6066 copyrights to '92, changed some from Cygnus to FSF.
6068 * doc/Makefile.in, doc/configure.in: removed traces of namesubdir,
6069 -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced
6070 copyrights to '92, changed some from Cygnus to FSF.
6072 Tue Feb 25 14:17:15 1992 Steve Chamberlain (sac at rtl.cygnus.com)
6074 * expr.c: If an expression is single comma, then return with
6075 SEG_ABSENT rather than an error - since the sparc front end does
6076 really strange things with things like fbge,a
6078 * as.h: include bfd.h if using many sections
6079 * expr.c: LOCAL_LABELS_FB had been changed to lower case - so
6080 local labels didn't work.
6081 * listing.c (list_symbol_table): don't core dump when there's no
6083 * write.c, write.h: call fix_new with the right number of args on
6085 * config/tc-h8300.[ch] : fix bugs reported by HMSI, and make
6088 Sat Feb 22 12:26:28 1992 Steve Chamberlain (sac at rtl.cygnus.com)
6090 * app.c: MRI compatibility - allow single quote to start a string.
6091 * as.c: fix typo recently introduced.
6092 * as.h : Don't include aout/reloc.h - it's not right for COFF!
6093 * expr.c: Much rewriting, to accomodate MRI syntax for
6094 expressions. Also easier to read now.
6095 * listing.c: Put back defuns
6096 * read.c: modified to accept MRI syntax, put back listing pseudo
6097 ops so that an assembler built with NO_LISTING ignores list ops
6099 * write.c, write.h: fixs - only keep a reloc type in a fix if the target
6100 machine is a SPARC or a 29K.
6101 * config/obj-aout.c: added s_sect pseudo op
6102 * config/obj-coffbfd.c: lints, set the filehdr flags right and
6103 fill in the timestamp.
6104 * config/obj-coffbfd.h: Since we don't include aout/reloc.h
6105 anymore, define all the relocs which the tc-<x> bit will use so we
6106 can translate from them to the coff types.
6107 * config/tc-a29k.c: reloc_type isn't ane enum any more
6108 * config/tc-m68k.c: Added NO_RELOC definition.
6112 * Makefile.in: put header files before C source for TAGS; remove
6113 references to non-existent syscalls.h.
6115 * read.c, write.c subsegs.c: back out the .bss changes.
6117 * obj-aout.c: do not include stab.gnu.h if NO_LISTING.
6119 * tc-i860.c, a.out.gnu.h: move i860 relocs to a proper place.
6125 * symbols.c (local_label_name): symbols now start with ^A.
6127 * read.c, subsegs.c, write.c obj-coff.c: added handling of
6128 `.bss` pseudo op for unitialized data. The new gcc (1.37.9x)
6129 generate these sections. .align: will use NOP_OPCODE or 0
6130 for padding. This is just for being nice to the
6133 * expr.c (operand): changed to generate local label "\001L0"
6134 starting with a ^A so that it is recognized as a local label.
6136 * as.c (perform_an_assembly_pass): zero bss_fix_root, too.
6138 * tc-i386.c: tc-i386.c: added handling of the following opcodes:
6139 i/o opcodes - inb, inw, outb and outw. string manipulation with
6140 att syntax - scmp, slod, smov, ssca, ssto.
6142 * obj-coff.c: (for aix386) Moved the symbols .text, .data and .bss
6143 to just after .file .
6145 In obj_crawl_symbol_chain() where it tries to put the external
6146 symbols apart, with the condition:
6147 (!S_IS_DEFINED(symbolP) &&
6148 !S_IS_DEBUG(symbolP) &&
6149 !SF_GET_STATICS(symbolP))
6150 it was moving too many symbols out. So I switch it back to the
6152 (S_GET_STORAGE_CLASS(symbolP) == C_EXT && !SF_GET_FUNCTION(symbolP))
6154 In obj_emit_relocations() added the conditional on KEEP_RELOC_INFO
6155 so that we don't use the F_RELFLG which make the linker complain
6156 that somebody has stripped the relocation info.
6158 Also, the AIX ld program require that the relocation table
6159 is sorted by r_vaddr like the standard ATT assembler does.
6161 [he also changed the sizeof(struct ...)'s into the coff
6162 style FOOSZ macros. I'm not sure this is right, but I can't
6163 remember why. xoxorich.]
6167 * Makefile.in, configure.in, doc: use the doc. Build it, install
6170 Tue Feb 18 02:21:25 1992 K. Richard Pixley (rich at cygnus.com)
6172 * read.c: white space and comments only.
6174 * configure.in: use the new atof-ns32.c for ns32k.
6176 * write.c: comment change only.
6178 * tc-m88k.[hc]: pulled in from hack's unfinished work. These
6179 aren't yet integrated.
6181 * tc-i860.[hc]: blew off the dust. Something must still be done
6182 about conflicting relocation types.
6184 * tc-ns32k.c: Replaced previous tc_aout_fix_to_chars stub with the
6187 * tc-i960.c, tc-sparc.c: white space and comments only.
6189 * tc-a29k.h: delete duplicate macro definition.
6191 * new file atof-ns32k.c copied from hack's last unreleased gas.
6193 Mon Feb 17 07:51:06 1992 K. Richard Pixley (rich at cygnus.com)
6195 * config/tc-ns32k.c: actually make tc_aout_fix_to_chars work
6198 * nearly everything. flush ChangeLog, package as gas-1.92.1.
6199 ChangeLog's prior to this are sketchy at best. I have logs.
6200 They just aren't ChangeLogs.
6204 version-control: never