Commit graph

759 commits

Author SHA1 Message Date
Ian Lance Taylor
a7aa7a2ba9 * config/tc-sparc.c (md_shortopts): Add "K:" if OBJ_ELF.
(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.
1995-07-05 21:52:10 +00:00
Ian Lance Taylor
3f8416d5e1 * config/obj-coff.c (obj_coff_line): Call listing_source_line, in
both BFD_ASSEMBLER and non BFD_ASSEMBLER versions of the function.
PR 7006.
1995-07-05 20:31:31 +00:00
Ian Lance Taylor
f219dc655a * config/obj-aout.c (obj_aout_frob_symbol): Warn about an attempt
to put an undefined symbol into a set.
PR 6340.
1995-07-05 19:04:58 +00:00
Ian Lance Taylor
ca046e3444 * config/tc-m88k.c (md_pseudo_table): Add ".set" so that the
explicit pseudo-op works, while continuing to treat "set" as an
	instruction.
PR 5199.
1995-07-05 17:13:16 +00:00
Ian Lance Taylor
3af584b4a1 Correct last change 1995-07-05 16:25:44 +00:00
Ian Lance Taylor
22ba90ce85 * ecoff.c (ecoff_debugging_seen): New global variable.
(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.
1995-07-05 16:10:50 +00:00
Jeff Law
249c7415a4 * config/tc-hppa.h (MAX_RELOC_EXPANSION): Bump to 6.
* 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
1995-07-03 23:33:21 +00:00
Steve Chamberlain
e5c5ce23fd Support for long filenames non-bfd coff. bfd/7288
* 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.
1995-06-30 00:53:37 +00:00
Steve Chamberlain
30355216bd * config/obj-coff.c (fixup_segment): PE doens't use
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.
1995-06-29 00:41:02 +00:00
Jeff Law
764771905a * config/tc-hppa.c (pa_build_unwind_subspace): Zero out memory
from frag_more calls.
1995-06-19 21:34:39 +00:00
Stan Shebs
d21041b3e2 * config/obj-coff.c: Don't use "bfd/" when including libbfd.h
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.
1995-06-16 00:07:45 +00:00
Jeff Law
4ff6f92ae8 * config/tc-hppa.c (pa_ip): Check for invalid register in single
precision fmpyadd and fmpysub instructions.
1995-06-13 04:29:41 +00:00
Ken Raeburn
3c650d09e8 vms cleanup, fixes from Pat Rankin 1995-06-09 21:16:07 +00:00
Ken Raeburn
d5263ab426 * config/obj-vms.c (vms_write_object_file, case N_DATA): Use strcmp against
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.
1995-06-06 17:59:06 +00:00
Ken Raeburn
58abad7d79 vms fixes from Pat Rankin 1995-06-01 22:12:20 +00:00
J.T. Conklin
6053ed629e * config/te-dpx2.h: Include obj-format.h.
(COFF_MAGIC): Renamed from FILE_HEADER_MAGIC.
1995-05-28 04:36:45 +00:00
Ken Raeburn
0509f0643c more vms updates from Pat Rankin 1995-05-20 20:11:38 +00:00
Ken Raeburn
ff15324f63 Bunch of changes from Richard Earnshaw for generic bi-endian ARM aout targets.
Details in change logs.
1995-05-18 22:21:18 +00:00
Michael Meissner
9914665911 Little endian fix 1995-05-16 23:30:21 +00:00
Ken Raeburn
739708fa4a Make Irix 5 configuration work again:
* 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.
1995-05-16 22:28:26 +00:00
Steve Chamberlain
b04b02a544 Fri May 12 14:17:47 1995 Steve Chamberlain <sac@slash.cygnus.com>
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.
1995-05-12 21:26:01 +00:00
Ken Raeburn
511cd41cc1 update for new files 1995-05-12 00:04:35 +00:00
Ken Raeburn
e7757ad0bc First cut at handling multiple emulation modes for some MIPS targets.
Mostly works, not entirely.
Details in ChangeLog.
1995-05-10 23:08:40 +00:00
Michael Meissner
8370e93e49 Add little endian PowerPC support. 1995-05-09 21:17:19 +00:00
Ken Raeburn
e51a3912ef SEPARATE_STAB_SECTIONS should be defined to 1, not empty. 1995-05-05 21:44:11 +00:00
Ken Raeburn
5b9a7bef31 * config/obj-ecoff.h (OBJ_PROCESS_STAB): Add new first argument, ignored.
* config/obj-elf.h (OBJ_PROCESS_STAB) [ECOFF_DEBUGGING]: Ditto.

* config/obj-ecoff.h (ECOFF_DEBUGGING): Define to 1, not empty.
* config/obj-elf.h (ECOFF_DEBUGGING): Ditto.  Test value, not whether it's
defined.
1995-05-04 23:41:32 +00:00
Ken Raeburn
8c5e0f5e05 * stabs.c (get_stab_string_offset): Always define. If SEPARATE_STAB_SECTIONS
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.
1995-05-04 23:40:26 +00:00
Ken Raeburn
9777b772c8 * as.h (LOCAL_LABELS_DOLLAR, LOCAL_LABELS_FB): If not already defined, 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.
1995-05-04 01:56:40 +00:00
Jeff Law
4829cd65a7 * config/tc-hppa.c (md_apply_fix): Do nothing for an out of range
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.
1995-05-03 19:10:55 +00:00
Ken Raeburn
1dc1e7989f * config/tc-mips.c: Use USE_STDARG and USE_VARARGS instead of NO_STDARG &c.
* config/tc-mips.c (mips_target_format): Changed to a function, checking flavor
and byte order at run time.
(md_parse_option, cases OPTION_EB and OPTION_EL): Set target_big_endian here.
(md_begin): Not here.
* config/tc-mips.h (mips_target_format): Adjust declaration.
(TARGET_FORMAT): Call mips_target_format.

* config/tc-mips.h (USE_GLOBAL_POINTER_OPT): Define in terms of OUTPUT_FLAVOR.
* config/tc-mips.c (g_switch_value, g_switch_seen): Define unconditionally.
(md_begin, mips_ip, md_parse_option, s_change_sec, s_option, s_abicalls,
nopic_need_relax): Check USE_GLOBAL_POINTER_OPT at run time, instead of
compiling conditionally on GPOPT.
(GPOPT): Don't define.
(md_shortopts): Always include -G.
(RDATA_SECTION_NAME): Select at run time.
(md_begin): Test for ELF format at run time instead of compile time.
(mips_ip, s_change_sec): Ditto.
(md_parse_option, cases OPTION_CALL_SHARED and OPTION_NON_SHARED): Ditto.
(OPTION_CALL_SHARED, OPTION_NON_SHARED, mips_regmask_frag): Define
unconditionally.
1995-05-02 19:33:00 +00:00
Ken Raeburn
833c46e1fb Move cpu-specific dependencies into Makefile.in, instead of having sometimes
multiple copies in config/*.mt.  Select between several make variables with
autoconf substitution of cpu_type into a variable name reference.
1995-05-02 06:46:21 +00:00
Ken Raeburn
78dace0a00 deleting more unused macros 1995-05-02 06:26:15 +00:00
Ken Raeburn
91a165d12e delete some unused TE_* macros 1995-05-02 04:47:35 +00:00
Ken Raeburn
12aab635e0 * read.c (s_app_file): If obj_app_file is defined, call it with string as argument.
Don't call c_dot_file_symbol or elf_file_symbol.
* config/obj-coff.h (obj_app_file): Define as c_dot_file_symbol.
* config/obj-elf.h (obj_app_file): Define as elf_file_symbol.

* as.h (OUTPUT_FLAVOR): Don't define here.
* config/obj-aout.h (OUTPUT_FLAVOR) [BFD_ASSEMBLER]: Define.
* config/obj-bout.h (OUTPUT_FLAVOR): Define.
* config/obj-coff.h (OUTPUT_FLAVOR) [BFD_ASSEMBLER]: Define.
* config/obj-ecoff.h (OUTPUT_FLAVOR): Define.
* config/obj-elf.h (OUTPUT_FLAVOR): Define.
1995-05-01 20:44:46 +00:00
David Edelsohn
fa7a56f8dc * config/tc-arc.c (delay_slot_type): New function.
(md_assemble): Use hashed list of insns.
	Print warning if 8 byte insn appears in delay slot.
	(md_operand): Handle %st(sym1-sym2).
	(get_arc_exp_reloc_type): Likewise.
	(md_apply_fix, case BFD_RELOC_ARC_B26): Now using implicit addends
	so must store them here.
1995-04-12 14:41:21 +00:00
Ken Raeburn
9b0da28b13 write.c: Complain about .space or .org moving backwards.
Do generic rs_machine_dependent relaxation only if TC_GENERIC_RELAX_TABLE is
defined.  Use its value as the base of the table, so the actual declaration
can be cpu-specific (and const or not as appropriate).  For other cpus where
this isn't done (the majority), delete md_relax_table altogether.

For machines with WORKING_DOT_WORD, delete md_{short,long}_jump_size.
1995-04-11 06:10:34 +00:00
Ken Raeburn
04ef74bb13 (PCINDEX): New macro.
(md_relax_table): No longer const.  Add PCINDEX entries.
(m68k_ip): For AINDX with simple symbol operand, generate a PCINDEX frag if PC
is used, or do normal non-AINDX processing for address register.
(m68k_init_after_args): If cpu is 68000 or 68010, fix md_relax_table to prevent
relaxation of PCINDEX/BYTE mode to SHORT, since they don't support that mode.
(md_convert_frag_1, case PCLEA/LONG): Add 4 to offset, not 2.  Add support for
new PCINDEX modes.
(md_estimate_size_before_relax): Process PCINDEX/SZ_UNDEF mode.
(md_convert_frag_1, case PCLEA/SHORT): Add 2 to offset.
(m68k_ip, case most punctuation/AOFF): If using PC, call add_frag using PCLEA.
1995-04-11 01:31:08 +00:00
Ken Raeburn
d8a1c247ae Fix for PR6697:
(nopic_need_relax): New static function, split out from
md_estimate_size_before_relax.
(md_estimate_size_before_relax): Call it.
(load_address, macro): In NO_PIC branches, if nopic_need_relax returns nonzero,
don't attempt GP optimization.
1995-04-11 01:29:49 +00:00
Ken Raeburn
b79de3a178 Don't explicitly include config.h. Deleted a bunch of "#if 0" code and useless
comments.
(struct m68k_cpu): New type.
(archs, n_archs): New variables, with single list of name/enum mapping and
aliases.
(m68k_ip): Delete the table here.
(m68k_init_after_args): Use the new table here instead of open-coding it.
(md_parse_option, case 'm'): Ditto.
1995-04-11 01:03:07 +00:00
David Edelsohn
5acf432d3f * config/tc-arc.c (arc_condition_codes): Deleted.
(init_opcode_tables): Delete cpu_type_map, call
	arc_get_opcode_mach instead.
	(arc_common): Delete non-ELF stuff.  Require leading '.' in .data.
	(md_apply_fix): Delete non-ELF stuff.
	Disable special handling of limm values, treat them normally.
	(get_arc_exp_reloc_type): New argument `data_p'.  Callers updated.
	(md_assemble): All limm operands must be output by gas, the opcode
	insertion routines cannot be used (they don't do anything and we're
	using implicit addends now so we need to output something).
	* config/tc-arc.h (FAKE_LABEL_NAME): Define.
1995-04-07 03:13:42 +00:00
Michael Meissner
ce9a280583 Warn rather than cause an error if the reloc is not compatible with -mrelocatable. 1995-03-14 22:05:48 +00:00
Ken Raeburn
0eb1f9cefa whitespace/comment formatting 1995-03-10 22:33:28 +00:00
Ian Lance Taylor
5fc2a6ecd2 * config/obj-coff.c (coff_header_append): Check return value of
bfd_coff_swap_scnhdr_out.
1995-03-09 23:02:43 +00:00
David Edelsohn
df0f11ff33 Delete this patch, it breaks the h8300 assembler.
* config/obj-coff.c (write_object_file): Don't treat h8300 and z8k
	specially with regard to fixups.
1995-03-09 21:51:42 +00:00
Michael Meissner
74e1b52ea3 Allow .stab section to contain non PC relative addresses if -mrelocatable. 1995-03-08 15:03:50 +00:00
Jeff Law
2c23d22bee * config/tc-hppa.c (pa_ip, case 'z'): Don't lose argument
relocation bits for absolute calls.
1995-03-06 02:42:14 +00:00
Michael Meissner
3f81f3cfe4 If -mrelocatable, warn about relocs that are incompatible. 1995-03-03 21:34:36 +00:00
Ken Raeburn
03678945bd (md_operand): Replaced empty function in .c file with empty macro in .h file. 1995-02-28 23:37:38 +00:00
Ian Lance Taylor
0877841d73 * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust PLT or
GOT relocs either.
1995-02-28 20:35:41 +00:00
Ian Lance Taylor
6b67ed7865 tweak previous patch 1995-02-24 20:25:52 +00:00