Commit graph

529 commits

Author SHA1 Message Date
Ian Lance Taylor
1a69212c01 config/tc-mips.[ch] changes. 1994-04-14 17:40:43 +00:00
Stan Shebs
cc886e3d1e Tue Apr 12 18:25:13 1994 Stan Shebs (shebs@andros.cygnus.com)
* subsegs.c (subsegs_begin): Call memset with args in the correct
	order.
	(subseg_get): Clear newly allocated seginfo, set its pointer slots
	to NULL instead of 0.

Fixes a problem observed in sparc-lynx progressive.
1994-04-13 02:02:48 +00:00
Jeff Law
caed9e8251 * config/tc-hppa.c (pa_procend): Handle case where label was
defined after the .proc directive.
1994-04-11 16:11:12 +00:00
Jeff Law
0521099057 * config/tc-hppa.c (pa_procend): Give an error if we encounter a
procend for a procedure without a name.
1994-04-11 16:02:12 +00:00
Ian Lance Taylor
1c803e5223 * config/tc-mips.c (macro): Pass NULL for expression argument to
macro_build for nori case.
	(SWITCH_TABLE): Define.
	(mips_force_relocation): Force a relocation for a switch table
	entry.
	(md_apply_fix): Write switch table entry value into file.
	(tc_gen_reloc): Use BFD_RELOC_GPREL32 for a switch table entry,
	and set the addend to the difference between the reloc address and
	the subtrahend.
1994-04-07 18:33:09 +00:00
Jeff Law
0b503989f5 * config/tc-hppa.h (elf_tc_symbol): Delete. No longer used.
(elf_tc_make_sections): Likewise.
        (hppa_tc_make_sections, hppa_tc_symbol): Delete extern decls.

        * config/tc-hppa.c (hppa_tc_make_sections): Delete function.
        (hppa_tc_symbol): Likewise.

        * config/obj-elf.c (elf_frob_file): Delete elf_tc_symbol and
        elf_tc_make_sections stuff.  It was there to support PA braindamage
        which has been fixed, and in the case of elf_tc_make_sections is
        redundant with elf_tc_final_processing.
1994-04-07 17:39:16 +00:00
Jeff Law
f39a73b1b6 * configure.in (hppa*-*-*elf*): Don't require "-hp-" for the
manufacturer.
1994-04-07 03:49:18 +00:00
Ian Lance Taylor
f3645945cf * config/tc-mips.c (mips_ip): For case 'o', when generating
embedded PIC code, accept the difference between two local symbols
	as being constant.
	(mips_force_relocation): Only force a reloc to be generated for a
	PC relative fixup.
	(md_apply_fix): For BFD_RELOC_32 and BFD_RELOC_LO16, put the fixup
	value into the file if the fixup will not generate a reloc.
1994-04-05 19:57:32 +00:00
Ken Raeburn
03fcf1f8f1 sparc, doc/Makefile.in changes 1994-04-05 18:18:04 +00:00
Jeff Law
79381848ca * config/tc-hppa.c (tc_gen_reloc): Fix thinko in ELF version. 1994-04-05 00:06:46 +00:00
Ian Lance Taylor
1937a66509 * config/tc-ppc.c (ppc_insert_operand): Check PPC_OPERAND_SIGNED
flag rather than signedp field.  Only permit extended range if
	PPC_OPERAND_SIGNOPT flag is set and assembling in 32 bit mode.
	Based on patch from David Edelsohn (edelsohn@npac.syr.edu).
1994-04-04 17:28:56 +00:00
Ian Lance Taylor
1e147242d7 * config/tc-ppc.c (ppc_size): New static variable.
(ppc_arch): Check for PPC_OPCODE_PPC before PPC_OPCODE_POWER.
	(md_begin): If an instruction has a size specific flag set, only
	add it if we are assembling that size.
1994-04-04 16:42:16 +00:00
Ian Lance Taylor
7ab2e983d6 * config/tc-sparc.c (tc_gen_reloc): Add a gruesome hack to get
cross section PC relative relocs right for COFF and ELF.
1994-03-31 21:54:06 +00:00
Ken Raeburn
75d20ac894 * config/obj-coff.h (SEPARATE_STAB_SECTIONS): Always define.
(OBJ_PROCESS_STAB): Don't define.
1994-03-28 19:40:53 +00:00
Ian Lance Taylor
57afabd05a * config/obj-aout.c (obj_aout_frob_symbols): Don't let BFD clobber
the type of symbol set symbols which happen to be in the absolute
	or undefined section.
1994-03-28 17:43:54 +00:00
Ian Lance Taylor
882bdc6952 Mon Mar 28 12:35:00 1994 David Edelsohn (edelsohn@npac.syr.edu)
* config/tc-ppc.c (md_parse_option): Add -mpwrx (POWER/2 aka
	RIOS2), -mpwr (POWER aka RIOS1), -mppc (PowerPC aka MPC603/604),
	and -many (all architectures).
1994-03-28 17:38:39 +00:00
Jeff Law
de3ffc7aef * config/tc-hppa.c (tc_gen_reloc): Set addend for relocation
involving a function symbol which is not a plabel to zero.
        (md_apply_fix): Never pass a function symbol to field_adjust.
1994-03-27 22:05:21 +00:00
Ian Lance Taylor
645f842c99 * config/obj-aout.c (obj_aout_frob_symbol): If N_EXT is set for an
N_INDR symbol, set BSF_EXPORT and clear BSF_LOCAL.
1994-03-25 22:53:40 +00:00
Ian Lance Taylor
5b63f465fc * config/tc-mips.c (append_insn): If EMBEDDED_PIC, don't swap a
branch with an instruction that uses $at, in case the branch is
	later expanded.
	(macro): If EMBEDDED_PIC, case M_JAL_A may use $at.
	(md_pcrel_from): If not OBJ_AOUT, return 4 for an undefined symbol
	to make it pcrel_offset.
	(tc_gen_reloc): If not OBJ_AOUT, set the reloc addend to
	reloc->address; another gruesome hack to get gas reloc handling to
	do the right thing.
1994-03-25 22:40:44 +00:00
Ken Raeburn
11d7c06453 * config/tc-alpha.c (alpha_ip): Only set GP prolog size if using PV register.
(T12): New macro.
(emit_insn): New function.
(md_assemble): Call it.
(alpha_force_relocation): Handle BFD_RELOC_26, for call_pal instructions.
(lituse_pending): New variable.  Set by anything that generates a LITERAL
reloc, cleared by anything that generates a LITUSE reloc, tested by code that
might want to emit a LITUSE reloc.
(emit_unaligned_io): New function.  Currently calls md_assemble, but it should
eventually be converted to generate the insn itself and call emit_insn directly.
(emit_load_unal, emit_store_unal, emit_byte_manip_r, emit_extract_r,
emit_insert_r, emit_mask_r, emit_sign_extend, emit_bis_r): Likewise.
(alpha_ip, case 'I'): Handle with BFD_RELOC_23.
(alpha_ip, label get_macro): Don't emit the final instruction if the opcode is
zero.
(alpha_ip, case 'B', subcase 'd'): New case, for subword and unaligned memory
access macros.
(md_apply_fix): Handle BFD_RELOC_26.  Generate an error message if the value
can't be resolved.
1994-03-25 02:39:19 +00:00
Ian Lance Taylor
d9aba8051e * config/tc-mips.c (enum mips_pic_level): New enum.
(mips_pic): Change from int to enum mips_pic_level.  Change all
	uses (0 becomes NO_PIC, 2 becomes SVR4_PIC).
	(load_address): Handle EMBEDDED_PIC.
	(macro): Handle EMBEDDED_PIC in all PIC cases.
	(md_parse_option): Accept -membedded-pic to use EMBEDDED_PIC.  If
	OBJ_ELF, accept -KPIC and -call_shared to use SVR4_PIC and accept
	-non_shared to use NO_PIC (this is how the Irix 5 assembler
	works).  Do not permit -G with SVR4_PIC.
	(s_abicalls): Warn if -G was used, and force -G 0.
	(tc_gen_reloc): Set reloc->addend to 0 for a PC relative reloc for
	anything but a.out, not just for ELF.  For ECOFF, don't generate a
	BFD_RELOC_16_PCREL_S2 reloc unless using EMBEDDED_PIC.
1994-03-22 20:27:58 +00:00
Ian Lance Taylor
e1b5066f45 * config/obj-ecoff.h (obj_sec_sym_ok_for_reloc): Define to be 1. 1994-03-22 19:00:08 +00:00
Ken Raeburn
c37f6138d4 * Makefile.in (config-stamp): If `defs' is defined, emit a preprocessor
directive to create a macro named by this value into config.new; don't
explicitly go for BFD_ASSEMBLER.
* configure.in: Define `defs', not `BFDDEF'.  Set it to MANY_SEGMENTS for any
obj-coffbfd target.
* config/obj-coffbfd.h (BFD_HEADERS, BFD): Define.
* config/i386coff.mt (TDEFINES): Don't define BFD, MANY_SEGMENTS, BFD_HEADERS.
(LOCAL_LOADLIBES): Deleted.
* config/m68kcoff.mt (TDEFINES): Don't define those macros.
* config/m88kcoff.mt (TDEFINES): Ditto.
* config/ebmon29k.mt: Deleted.
* config/h8300hds.mt: Deleted.
* config/ic960coff.mt: Deleted.
* config/sparc.mt: Deleted.
* config/h8300.mt (LOCAL_LOADLIBES, TDEFINES): Deleted.
* config/h8500.mt (LOCAL_LOADLIBES, TDEFINES): Deleted.
* config/sh.mt (LOCAL_LOADLIBES, TDEFINES): Deleted.
* config/z8k.mt (LOCAL_LOADLIBES): Deleted.
(TDEFINES): Don't define the coffbfd macros.

* Makefile.in: Insert makefile fragments before OBJS definition.
(OBJS): Add $(TE_OBJS).
1994-03-20 21:13:59 +00:00
Ken Raeburn
3680de746a * config/obj-coff.c (obj_pseudo_table): Supply "section" unconditionally. 1994-03-20 21:07:43 +00:00
Ken Raeburn
1871f91a91 * write.c (set_symtab): Define only if BFD_ASSEMBLER. 1994-03-20 21:01:31 +00:00
Jeff Law
c20c75060d * Makefile.in (STAGESTUFF): Add gasp.new. 1994-03-20 20:06:53 +00:00
Ken Raeburn
1cf7548efc * write.c (symbol_table_frozen): New variable, to be set after bfd_set_symtab
is called.
(dump_section_relocs): Note whether a symbol is a section symbol or not.
(adjust_reloc_syms): For now, always supply an absolute symbol for fixups
without symbols but not yet `done'.  Use section_symbol to get the symbol,
instead of going directly for abs_symbol.
(write_relocs) [DEBUG4]: Abort if any symbol referred to by a reloc is not a
section symbol and is not in the symbol table.
(set_symtab): New function, broken out from write_object_file.  Counts symbol
table instead of relying on an earlier count.
(write_object_file): Call set_symtab, but do it after potentially invoking the
*_frob_file macros.  Don't bother counting symbols.  Call symbol_remove,
instead of expanding it in place.  Moved the conditionalized `object_file_size'
declaration down to conditionalized block where it's used.  When using the
absolute symbol for a fixup without a symbol, set sy_used_in_reloc.
(write_object_file) [BFD_ASSEMBLER]: Call section_symbol to get the correct
symbol for the absolute section.
1994-03-19 02:36:09 +00:00
Ken Raeburn
ec3c65e19b sparc *13 relocs, obj_sec_sym_ok_for_reloc stuff 1994-03-19 02:02:23 +00:00
Ken Raeburn
1be3cf74ed ic960coff.mt typo fix 1994-03-19 01:29:36 +00:00
Ken Raeburn
634233a31b * configure.in: Eliminated all targets using obj-coff but not defining
BFD_ASSEMBLER; I think all such targets that are supported will be matched by
real CPU-OS combinations earlier in the case statement.

(targets *-*-coff*, *-sysv*, *-*-sco*, *-*-sysv32): Deleted.  Made some
comments about the dpx2 configuration, but left it disabled, since it couldn't
be reached before.
(target a29k-amd-ebmonold): Deleted.
1994-03-19 01:24:19 +00:00
Jeff Law
49ccc55510 * config/tc-hppa.c (pa_import): Correctly handle importing of an
already defined symbol.
1994-03-17 21:37:42 +00:00
Jeff Law
c38c91dadb * config/tc-hppa.c (pa_equ): Handle both .reg and .equ correctly. 1994-03-17 00:49:30 +00:00
Ian Lance Taylor
614a3211d4 * config/tc-mips.c (mips_ip): Only accept overly large values for
the 'j' operand if there are no further alternatives for this
	instruction.
1994-03-16 23:49:55 +00:00
Jeff Law
f2ada9106d * config/tc-hppa.c (pa_callinfo): Accept "millicode" as an
argument to a .callinfo directive.  Don't loop forever on errors.
1994-03-16 22:42:51 +00:00
Ian Lance Taylor
d6e6bc1c52 * config/obj-coffbfd.c (adjust_stab_section): Initialize
stabstrseg to SEG_UNKNOWN, not -1.  After loop, check whether it
	is not SEG_UNKNOWN rather than checking whether it is >= 0.
1994-03-16 22:22:17 +00:00
Ian Lance Taylor
23dc1ae33d * config/tc-mips.c (mips_align): Take new argument, label, and use
it instead of global insn_label.
	(s_align, s_cons, s_float_cons, s_gpword): Save insn_label before
	call to mips_emit_delay and pass it to mips_align.
1994-03-16 22:16:02 +00:00
Ken Raeburn
dbc529c4c8 today's changes for vms, misc bugs 1994-03-15 03:08:40 +00:00
Ken Raeburn
954979ca8b various configuration changes, obj-coff change 1994-03-14 20:20:00 +00:00
Ian Lance Taylor
62ea79742a * config/tc-ppc.c (md_pcrel_from): Return 0 for undefined ELF
symbols.
	(ppc_is_toc_sym): Change .toc to .got.
	(md_apply_fix): Change handling of ELF relocs.
	(tc_gen_reloc): Likewise.
1994-03-12 03:28:13 +00:00
Ken Raeburn
63ca2e81fd Some alpha-ecoff and vax-vms related changes. 1994-03-11 23:13:37 +00:00
Ian Lance Taylor
be22008b2c * config/tc-mips.c (mips_ip): Accept numbers between 0x8000 and
0xffff for 'j' to be compatible with MIPS assembler.  These
	numbers are actually treated as negative.
1994-03-11 23:00:17 +00:00
David Edelsohn
2c6db5a158 * config/tc-sparc.h (LOCAL_LABEL): Local labels are .Lfoo. 1994-03-10 21:37:21 +00:00
Ken Raeburn
9e12fbbc67 alpha, coff, i386 changes 1994-03-09 02:45:29 +00:00
Steve Chamberlain
2bac8c544f * config/obj-coffbfd.c (w_strings): Only copy strings out if
their symbols are going to be written.
1994-03-08 22:30:58 +00:00
Ian Lance Taylor
33e61c95a2 Set Emacs local variables to never use version control. 1994-03-08 19:16:31 +00:00
Ian Lance Taylor
d16938f52e * messages.c (as_perror): Declare arguments const.
* as.h (as_perror): Change declaration.
1994-03-08 16:51:28 +00:00
Ian Lance Taylor
8ea7f4e854 * config/tc-mips.c (load_address): When calling frag_grow, allow
for the (up to) two nops which may be inserted by append_insn if
	mips_optimize is 0.
	(macro): Likewise.
1994-03-07 21:12:26 +00:00
David Edelsohn
fa47b47eee * config/atof-ieee.c (make_invalid_floating_point_number):
Add cast to avoid warning from gcc.
1994-03-03 19:39:12 +00:00
Jeff Law
fb338f1d79 * config/tc-hppa.c: Add a few casts to make HP C compiler happy.
* config/obj-som.c (obj_som_version, obj_som_copyright): Be prepared
        to handle an error from bfd_som_attach_aux_hdr.
1994-03-02 20:02:17 +00:00
Jeff Law
34b1685053 * config/tc-hppa.h: Wrap ELF specific decls inside an ifdef. 1994-03-02 18:31:57 +00:00