(init_file): Initialize fake.
(add_file): Add new parameter fake. Change all callers.
(ecoff_build_debug): Don't warn about a missing .end for a fake
file.
PR 6509.
* config/tc-i386.c (md_apply_fix3): Rename from md_apply_fix1.
Accept pointer to value and segment. Fix OBJ_ELF PCREL case to
handle global defined symbols correctly.
(md_apply_fix): Remove both versions.
* config/tc-i386.h (MD_APPLY_FIX3): Define.
BSF_FUNCTION.
(symbol_globalP, symbol_global_lastP): New global variables.
(yank_symbols): Sort defined global symbols to the end, just
before the undefined symbols.
(glue_symbols): Add two arguments, and use them instead of
referring directly to global variables.
(crawl_symbols): Call glue_symbols twice, once for defined globals
and once for undefined. Add corresponding know calls.
PR 5491.
* write.c (fixup_segment): Pass fixP to TC_RELOC_RTSYM_LOC_FIXUP,
not fixP->fx_r_type.
* config/tc-sparc.c (sparc_pic_code): New global variable.
(md_apply_fix): If generating PIC, adjust fx_addnumber for any non
PC relative reloc.
(tc_gen_reloc): If generating PIC, adjust various reloc types.
Remove fx_pcrel assert, since it is no longer true.
(md_parse_option): Handle -K PIC.
* config/tc-sparc.h (sparc_pic_code): Declare if OBJ_ELF.
(TC_RELOC_RTSYM_LOC_FIXUP): Define if OBJ_ELF.
(tc_fix_adjustable): Don't adjust PC relative relocs if PIC.
* config/tc-i386.h (TC_RELOC_RTSYM_LOC_FIXUP): Take a fixp, not a
reloc type.
PR 7131.
* as.c (listing_filename): New static variable.
(show_usage): Mention -a=file.
(parse_args): Support = option of -a to set name of listing file.
(main): Pass listing_filename to listing_print.
* listing.c (list_file): New static variable.
(various): Replace printf with fprintf to list_file.
(listing_print): If name argument is not NULL, open it as
list_file.
* doc/as.texinfo, doc/as.1: Document -a=file.
PR 6354.
at_end.
(file_info): Initialize at_end, not end_pending.
(buffer_line): If at_end set, just return immediately. Don't
worry about end_pending cases. Set at_end when EOF is read.
(print_source): Check at_end, not end_pending.
(listing_listing): Likewise.
PR 6636.
(md_parse_option): If OBJ_ELF, check for -K. Die if -K PIC, since
PIC code is not currently supported.
* as.c (parse_args): Change std_shortopts to be an array rather
than a constant string. Only include 'K' if WORKING_DOT_WORD is
not defined. Only check for 'K' in that case as well.
* as.h (flag_warn_displacement): Only declare if WORKING_DOT_WORD
is not defined.
PR 7131.
(ecoff_directive_def): Set ecoff_debugging_seen.
(ecoff_stab): Likewise.
* ecoff.h: Make idempotent.
(ecoff_debugging_seen): Declare.
* config/tc-mips.c: Include ecoff.h.
(mips_debug): New static variable.
(s_stringer, s_mips_space): Remove unneeded declarations.
(md_parse_option): In case 'g', set mips_debug to debugging level.
(mips_local_label): New function.
* tc-mips.h (LOCAL_LABEL): Call mips_local_label.
(mips_local_label): Declare.
PR 6978.
* config/tc-hppa.c (tc_gen_reloc, SOM version): Handle
relocations for the difference of two (possibly external)
symbols.
(hppa_fix_adjustable): For SOM, reject reductions involving
the difference of two symbols.
(hppa_force_relocation): Force relocations for expressions
involving the difference of two symbols.
gas/bfd part of mentor-7363
* config/obj-coff.c (filename_list_head, filename_list_tail): New.
(yank_symbols): Notice and record filenames which are too long.
(w_strings): Write out filename strings.
(c_dot_file_symbols): Put long filenames onto list.
the strange common symbol format that other 386s formats
do.
* config/tc-i386.c (md_begin): If LEX_AT defined then
'@' is in the set of identifiers.
(i386_operand): If LEX_AT, then don't look for @goto stuff.
* config/te-pe.h: Define LEX_AT.
and libcoff.h.
(fill_section): Call PROGRESS.
* Makefile.in (INCLUDES): Add bfd srcdir.
* mpw-config.in: Add bfd_gas flag and set for each config.
(i386-unknown-go32, m68k-unknown-coff): Recognize.
* mpw-make.in (HACK_O_RAMA, OBJ_COFF_OMIT_TIMESTAMP): Add to
config.h.
FAKE_LABEL_NAME instead of checking third character. (Suggested by Pat Rankin.)
Mon 5 Jun 20:10:46 1995 Pat Rankin (rankin@eql.caltech.edu)
Add support for N_ABS and N_ABS|N_EXT type symbols.
* config/obj-vms.h (LSY_S_M_{DEF,REL}, ENV_S_M_{DEF,NESTED}): New macros for
local symbols (from <lsydef.h> and <envdef.h>).
* config/obj-vms.c (Current_Environment): New file-scope variable.
(VMS_Local_Environment_Setup): New routine.
(GBLSYM_LCL): New macro.
(VMS_Global_Symbol_Spec): Handle local symbols too.
(VMS_Psect_Spec): Set GLOBALVALUE_BIT for absolute symbols.
(VMS_Emit_Globalvalues): Handle local and global absolute symbols.
(VMS_Store_PIC_Symbol_Reference): Ditto.
(vms_write_object_file: GSD symbol loop): Ditto.
Check explicitly for undefined local dollar and f/b labels, and print a useful
message if any are found, instead of generating obscure undefined symbol table
entries.
For VMS gas port, make libiberty build on its own instead of driving it all out
of the gas directory. Also improve some of the libiberty support for VMS.
* config/obj-multi.h (obj_frob_symbol, obj_frob_file, S_GET_SIZE, S_SET_SIZE,
S_GET_ALIGN, S_SET_ALIGN, obj_copy_symbol_attributes, OBJ_PROCESS_STAB): New
macros.
* config/tc-mips.c: Protect against redefining them also when including
obj-elf.h. Test only OBJ_ELF for including elf/mips.h.
Initial support for PE object files.
* configure.in, configure (i386-*-pe, i386-*-*nt): Add.
* config/obj-coff.c (fixup_segment): Cope with PE wierdness.
* config/obj-coff.h (TE_PE): New target format.
non-MANY_SEGMENTS configuration. It should never get invoked, but this is
easier than conditionalizing some of the uses.
(struct seg_info_trash): Dummy type used by above to make code compile.
isn't set, abort.
(SEPARATE_STAB_SECTIONS): Default to zero.
(aout_process_stab): New function, split out from s_stab_generic.
(OBJ_PROCESS_STAB) [AOUT_STABS]: Define to call aout_process_stab, if not
already defined.
(s_stab_generic): Test SEPARATE_STAB_SECTIONS at run time. If it's not set,
and OBJ_PROCESS_STAB isn't defined, abort. Always pass six arguments to
OBJ_PROCESS_STAB.
* config/obj-aout.h (AOUT_STABS): Define.
* config/obj-bout.h (AOUT_STABS): Define.
them to zero.
* config/tc-*.h, config/te-*.h: If defining them, define them to be 1 instead
of empty.
* expr.c (integer_constant, operand): Test them at run time instead of compile
time.
* read.c (read_a_source_file): Ditto.
* symbols.c (colon): Ditto.
(dollar_*, define_dollar_label, fb_*): Define unconditionally.
* symbols.h (dollar_*, define_dollar_label, fb_*): Declare unconditionally.
PC relative call since those only occur in cases where the linker
can fix them up.
(hppa_force_relocation): Force relocations for out of range PC
relative calls.
from Bryan Ford <baford@schirf.cs.utah.edu>:
* read.c (potable): Added balign and p2align, for aligning by bytes or powers
of two independent of what ".align" does for a given target.
* doc/as.texinfo: Document them.
* config/tc-sh.c (md_convert_frag): Instead of aborting on large displacements,
print an error message. Don't invoke the code that followed the abort call
until it's been verified.
some AIX versions.
* configure: Regenerated.
* configure.in: Add m68k-*-elf.
* config/tc-m68k.c (comment_chars) [OBJ_ELF]: Include '#'.
(md_pseudo_table) [OBJ_ELF]: Ignore "swbeg".
(md_begin): Set alt_notend_table['&'], so svr4-style immediate operands are
accepted.
(md_apply_fix): Argument VALP should point to valueT.
(md_convert_frag): Argument SEC should be type segT.
(md_shortopts) [OBJ_ELF]: Accept 'Q' with an argument.
(md_parse_option): Ignore it.
(md_convert_frag_1): Add in frag address for the symbol in the displacement
calculation.
* config/tc-m68k.h (TARGET_FORMAT) [OBJ_ELF]: Use "elf32-m68k".
(TARGET_ARCH): Define.
(REGISTER_PREFIX_OPTIONAL) [OBJ_ELF]: Default to 0.
(LOCAL_LABEL, FAKE_LABEL_NAME, REGISTER_PREFIX_OPTIONAL): Handle these the same
way for OBJ_ELF as for M68KCOFF.
unsigned seemingly negative number. Don't bother shifting a zero
value.
(mips_ip): For case 'j', if there are more alternatives, and the
ISA level is at least 3, don't accept an unsigned seemingly
negative number.
(fixup_segment): If linkrelax is set, just return.
(write_object_file): Don't treat h8300 and z8k specially with regard to fixups.
* config/tc-h8300.c (md_begin): Set linkrelax.
* config/tc-z8k.c (md_begin): Ditto.
Tue Jan 10 13:34:14 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
* config/obj-coff.c (write_object_file): Don't treat h8300 and z8k
specially with regard to fixups.
r10000. If mips_isa is 4, set the machine number to 8000.
(append_insn): If mips_isa is at least 4, don't generate nops for
coprocessor delays. Check INSN_READ_FPR_R when setting
mips_cprmask[1].
(mips_emit_delays): If mips_isa is at least 4, don't generate nops
for coprocessor delays.
(mips_ip): Check for INSN_ISA4 instructions. Handle new argument
types 'h', 'R', 'N', and 'M'.
(md_longopts): Accept "mips4".
(md_parse_option): Handle -mips4, and -mcpu=10000 and -mcpu=8000.
(s_mipsset): Permit .set mips4.
(md_begin): Make hash table errors fatal. Process opcode aliases after main
opcode table.
(md_apply_fix_2, case 4): Recode setting of lower_limit to avoid gcc warning.
be consistent with current naming conventions.
(md_begin): Set a default architecture and machine type.
(pa_ip): If the current instruction specifies a newer machine type
than the current machine type, then update the current machine
type.
(need_pa11_opcode): Likewise.
* config/tc-sparc.c (md_apply_fix): If OBJ_ELF, subtract out the
value of a defined symbol; the value was added in by
fixup_segment. This was previously corrected, if the reloc was
changed to be against a section symbol, in tc_gen_reloc.
BFD_RELOC_32 to BFD_RELOC_386_GOTPC to handle a switch in frags.
Patch originally from Rob Ryan <robr@cmu.edu>.
* config/tc-i386.c: Include subsegs.h.
(tc_i386_fix_adjustable): Declare return value.
(i386_operand): Don't use an assignment directly as a condition.
* config/vms-conf.h (HAVE_UNISTD_H): define it unconditionally.
* config-gas.com: test for availability of <unistd.h>; create a rudimentary
one if necessary.
* config/tc-hppa.c (md_apply_fix): Go ahead and call
hppa_field_adjust to get a new value for R_DATA_ONE_SYMBOL
relocations in SOM.
(hppa_fix_adjustable): Refine somewhat.
* config/tc-ppc.c (md_parse_option): Accept mpwr2 as a synonym for
mpwrx; mppc32, m603, and m604 as synonyms for mppc; and mppc64 and
m620 for PowerPC64 mode.
(ppc_symbol_new_hook): Add T0 as synonym for TC0 suffix.
* config/tc-sh.c (md_begin): Remove unused variable table.
(md_assemble): Remove unused variable p.
(md_convert_frag): Cast fr_address to unsigned long for printf.
(md_apply_fix): Use as_warn_where rather than as_warn.
(sh_init_after_args): Remove empty function.
* config/obj-vms.c: Changed exported function names to lower case. (Changed
call sites in write.c.) Declare VMS system function names used, conditional on
actually being on VMS. Changed many functions that returned no useful value to
now be declared to return void. Removed many unused variables. Supply missing
return statements or values. Supply `default' case in switch statements.
Ensure local variables get initialized.
* config/tc-vax.c: Minor changes to silence "gcc -Wall".
* config/obj-vms.h, config/tc-vax.h: Added some missing declarations.
* expr.c (operand): Parenthesize && within ||.
* listing.c (listing_newline): Likewise.
(list_symbol_table): Use %lu to print sizeof.
* symbols.c: Comment out unused function indent.
(print_symbol_value_1): Cast pointer to unsigned long for printf.
* config/obj-coff.c (do_relocs_for): Only declare symbol_ptr if it
will be used.
* config/tc-h8300.c (md_begin): Remove unused variable reg.
(get_operand): Declare type of parameter direction. Remove unused
variable size.
(get_specific): Fix comment to avoid nested comments.
(check_operand): Cast X_add_number to unsigned long for printf.
(build_bytes): Remove unused local variables output_ptr, part, and
high.
(build_bytes): Cast X_add_number to unsigned long for printf.
(clever_message): Remove unused variable scan.
(md_assemble): Remove unused variable i.
(tc_coff_sizemachdep): Remove unused function.
* tc-h8300.h (tc_reloc_mangle): Declare.
(md_begin): Handle a cpu string of "4650". If mips_4650 was not
initialized, set it to 0.
(append_insn): Don't insert nops around HI and LO on a 4650.
(mips_emit_delays): Likewise.
(mips_ip): Use INSN_ISA mask to check ISA of instruction. Check
for INSN_4650.
(md_longopts): Add m4650 and no-m4650.
(md_parse_option): Handle mips-cpu=4650. Handle -m4650 and
-no-m4650.
* doc/as.texinfo: Document new MIPS options.
* read.c (s_space): Rewrite to handle general expressions. Generate rs_space
frags for non-constant values.
* write.c (cvt_frag_to_fill): Treat rs_align_code and rs_space like rs_align
and rs_org. Verify that fr_offset is non-negative, and force frag type to
rs_fill only after assertion checks.
(relax_segment): Treat rs_align_code like rs_align. Treat rs_space like rs_org
in the first switch; in the second, force the operand to a constant, and use it
for the growth size.
* subsegs.c (subsegs_begin): Don't do it here.
* as.c (main): Call frag_init before subsegs_begin.
* frags.c (frag_append_1_char): New function.
* frags.h (frag_append_1_char): Declare it.
(FRAG_APPEND_1_CHAR): Call it. Old definition is commented out for now.
* as.h (struct frag): Added (but commented out) new fields for tracking current
alignment.
(frag_now_fix): Changed macro to function declaration.
* frags.c (frag_now_fix): Define function here.
(frag_new): Use it instead of accessing `frags' directly.
* frags.h (frags): Change comment to indicate it shouldn't be accessed directly.
* subsegs.h (struct frchain): New field frch_obstack, intended to eventually
replace global `frags' obstack.
* subsegs.c (subseg_set_rest): Use frag_now_fix instead of accessing `frags'
directly. Initialize fields of new frchainS explicitly instead of with memset.
* config/obj-coff.c (obj_coff_ln) [!BFD_ASSEMBLER]: Use frag_now_fix.
* config/tc-mips.c (s_loc), config/obj-vms.c (vms_resolve_symbol_redef),
symbols.c (colon): Likewise.
config/tc-h8500.c, config/tc-hppa.c, config/tc-hppa.h, config/tc-sh.c,
config/tc-z8k.c: Don't rely on use of ".." when including header files.
* config/tc-rce.c: Ditto.
* config/obj-coff.c (fixup_segment): Reformat condition in an `if' statement.
objects and speed up the linker.
* config/tc-hppa.c (struct call_info): Replace end_symbol field
with a size field.
(hppa_elf_mark_end_function): Delete unneeded function.
(pa_build_unwind_subspace): For the 2nd unwind relocation, use
the function symbol + function size instead of a special symbol
for the end of the function.
(process_exit): Compute the function size here. Don't call
hppa_elf_mark_end_of_function anymore.
(pa_procend): Likewise.
(hppa_fix_adjustable): Only reject 32bit relocations for SOM.
(elf_hppa_final_processing): Simplify.
OBJDUMP_FOR_TARGET, NM_FOR_TARGET; they're not used.
(AS_FOR_TARGET, CC_FOR_TARGET, OBJDUMP, OBJDUMP_FOR_TARGET, NM, NM_FOR_TARGET):
Don't define.
(VMS_OTHER_OBJS): Add xmalloc.o and xexit.o from libiberty.
(tooldir): Use exec_prefix, not libdir.