Commit graph

6565 commits

Author SHA1 Message Date
Ian Lance Taylor
5ac34ac37e * Extensive changes to permit symbols to contain any expression
type and to delay the computation of the expression until the
	value is actually needed.  This permits setting symbols to values
	calculated based on object code size.  Expressions were changed to
	no longer be in a section, to stop the overloading of segment and
	expression type that previously occurred.

	* as.c (big_section, pass1_section, diff_section, absent_section):
	Removed.
	(expr_section): Added (used for dummy symbols which hold
	intermediate expression values).
	(perform_an_assembly_pass): Create expr_section, do not create the
	sections now removed.
	* as.h (segT): Removed SEG_ABSENT, SEG_PASS1, SEG_BIG, and
	SEG_DIFFERENCE.  Added SEG_EXPR.
	(SEG_NORMAL): Corresponding changes.
	* subsegs.c (seg_name, subsegs_begin): Changed accordingly.
	* write.c (write_object_file): Ditto.
	* config/obj-aout.c (seg_N_TYPE): Ditto.
	* config/obj-bout.c (seg_N_TYPE): Ditto.
	* config/obj-coff.c (seg_N_TYPE): Ditto.
	* config/obj-coffbfd.c (seg_N_TYPE): Ditto.
	* config/obj-vms.c (seg_N_TYPE): Ditto.

	* expr.h (operatorT): Moved in from expr.c, added some values.
	(expressionS): Added X_op field, removed X_seg field; renamed
	X_subtract_symbol to X_op_symbol.
	* expr.c: Extensive changes to assign expression types rather than
	sections and to simplify the parsing.
	* write.c (fix_new_internal): New static function.
	(fix_new): Removed sub_symbol argument.
	(fix_new_exp): New function, takes expression argument.
	* write.h: Prototype changes for fix_new and fix_new_exp.
	* cond.c (s_if): Changed accordingly.
	* read.c (s_lsym, pseudo_set, emit_expr, parse_bitfield_cons,
	parse_repeat_cons, get_segmented_expression,
	get_known_segmented_expression, get_absolute_expression): Ditto.
	* symbols.c (resolve_symbol_value, S_GET_VALUE, S_SET_VALUE):
	Ditto.
	* write.c (write_object_file): Ditto.
	* config/obj-coff.c (obj_coff_def, obj_coff_val): Ditto.
	* config/obj-coffbfd.c (obj_coff_def, obj_coff_val,
	obj_coff_endef, yank_symbols): Ditto.
	* config/obj-elf.c (obj_elf_stab_generic, obj_elf_size): Ditto.
	* config/tc-a29k.c (md_assemble, parse_operand, machine_ip,
	print_insn, md_operand): Ditto.
	* config/tc-h8300.c (parse_exp, colonmod24, check_operand,
	do_a_fix_imm, build_bytes): Ditto.
	* config/tc-h8500.c (parse_exp, skip_colonthing, parse_reglist,
	get_specific, check, insert, md_convert_frag): Ditto.
	* config/tc-hppa.c (the_insn, fix_new_hppa, cons_fix_new_hppa,
	md_assemble, pa_ip, getExpression, getAbsoluteExpression,
	evaluateAbsolute, pa_build_unwind_subspace, pa_entry,
	process_exit): Ditto.
	* config/tc-hppa.h (STAB_FIXUP, is_DP_relative, is_PC_relative,
	is_complex): Ditto.
	* config/tc-i386.c (pe, md_assemble, i386_operand,
	md_estimate_size_before_relax, md_create_long_jump): Ditto.
	* config/tc-i860.c (md_assemble, getExpression, print_insn):
	Ditto.
	* config/tc-i960.c (parse_expr, subs, segs, md_convert_frag,
	get_cdisp, mem_fmt, parse_ldconst, relax_cobr, s_sysproc,
	i960_handle_align): Ditto.
	* config/tc-m68k.c (struct m68k_exp, struct m68k_it, seg, op,
	subs, add_fix, isvar, m68k_ip, md_assemble, md_convert_frag_1,
	md_estimate_size_before_relax, md_create_long_jump, get_num):
	Ditto.
	* config/tc-m88k.c (md_assemble, get_imm16, get_pcr,
	md_create_short_jump, md_create_long_jump): Ditto.
	* config/tc-mips.c (md_assemble, append_insn, gp_reference,
	macro_build, macro, my_getExpression): Ditto.  Also removed
	get_optional_absolute_expression; just use get_absolute_expression
	instead.
	* config/tc-ns32k.c (get_addr_mode, evaluate_expr, convert_iif,
	fix_new_ns32k, fix_new_ns32k_exp, cons_fix_new_ns32k): Ditto.
	* config/tc-ns32k.h (fix_new_ns32k prototype): Ditto.
	* config/tc-sh.c (parse_exp, check, insert, md_convert_frag):
	Ditto.
	* config/tc-sparc.c (md_assemble, sparc_ip, getExpression,
	print_insn): Ditto.
	* config/tc-tahoe.c (struct top, md_estimate_size_before_relax,
	tip_op, md_assemble): Ditto.
	* config/tc-vax.c (seg_of_operand, md_assemble,
	md_estimate_size_before_relax, md_create_long_jump): Ditto.
	* config/tc-z8k.c (parse_exp, check_operand, newfix): Ditto.
1993-07-21 00:41:42 +00:00
Jim Kingdon
b9b9f55a52 * Makefile.in (refcard.dvi): Use srcdir where necessary. 1993-07-20 23:37:05 +00:00
Fred Fish
8e946a3bde * coff-m68k.c (m68k_howto2rtype): Make arg CONST to match callers. 1993-07-20 23:20:36 +00:00
Jim Kingdon
69135a69b6 * mips-opc.c: New file, containing opcode table from
../include/opcode/mips.h.
1993-07-20 22:55:21 +00:00
Jim Kingdon
0783d89380 * dynix3.h: New, for symmetry running dynix. 1993-07-20 22:54:28 +00:00
Fred Fish
af0175cf41 * elfcode.h: Fix several illegal pointer combination warnings for
usages of bfd_alloc and alloca.
1993-07-20 22:42:59 +00:00
Jim Kingdon
23d3557255 * mips-tdep.c (heuristic_proc_start): First time we print the
warning, elaborate.
	(_initialize_mips_tdep): Improve docstring for `set heur'.
1993-07-20 22:36:13 +00:00
Fred Fish
f03b1f0d44 * libnlm.h (nlm_obj_tdata): Rename hidden struct members to avoid
apparent Sun C preprocessor recursion.  Fix access macros.
	* nlmcode.h:  Remove spurious '&' before several array references.
1993-07-20 22:07:39 +00:00
Jim Kingdon
df61743d3e * Rename for DOS uniqueness: coff-m68k-un.c -> coff-u68k.c
config/m68k-coffun.mt -> u68k-coff.mt.
	* Makefile.in, configure.in: Corresponding changes.
1993-07-20 21:45:32 +00:00
Jim Kingdon
726d33a436 * config/rs6000/tm-rs6000.h: Remove call to insert_step_breakpoint. 1993-07-20 21:24:20 +00:00
Jim Kingdon
f29b5686e4 * symtab.c (find_line_symtab): New function, to deal with multiple
symtabs with the same name.
	(find_line_pc{,_range}): Use it.
	(find_pc_symtab): Add comment about overlapping symtabs.
1993-07-20 21:15:45 +00:00
Ken Raeburn
051cdcb33e * elf32-sparc.c (elf_sparc_howto_table): Don't use "^&" before
function name; it's valid without, and some compilers give
warnings with it there.
1993-07-20 20:26:51 +00:00
David D. Zuhn
84873870d7 add i386-lynx support 1993-07-20 19:18:13 +00:00
David D. Zuhn
ba82f8e450 support for CONFIG_SHELL 1993-07-20 18:32:12 +00:00
Jim Kingdon
d39d83c1be Reflect symmetry changes 1993-07-20 18:12:53 +00:00
David D. Zuhn
4677e30fad keep mh-lynxos and mh-unixware 1993-07-20 17:34:43 +00:00
Mark Eichin
077398b1bf change linux to use OTHER_EMULATIONS 1993-07-20 16:54:23 +00:00
Mark Eichin
9c4d1ed92c experimental linux support 1993-07-20 16:50:41 +00:00
Ken Raeburn
820c446cce Make emul-list.h depend on Makefile, so changes to EMULATION_OFILES get
reflected.
1993-07-20 16:38:49 +00:00
Ken Raeburn
0750b974c0 disable em_i386linux.o until emulparams/i386linux.sh is checked in 1993-07-20 16:31:47 +00:00
Fred Fish
b70cb81eb5 * bfd.c (union tdata): Add nlm_obj_data;
* targets.c (enum target_flavour):  Add bfd_target_nlm_flavour.
1993-07-20 15:30:58 +00:00
Fred Fish
2b87236749 * bfd-in.h: Apply some of the changes that were made to bfd-in2.h. 1993-07-20 15:22:37 +00:00
Peter Schauer
9d77e877fe * gdb.stabs/configure.in: If configured -with-gnu-as for mips-*-*
targets use aout.mt instead of ecoff.mt as gas understands
	standard aout format.
1993-07-20 07:04:26 +00:00
Fred Fish
f7da728966 Add nlm directory. 1993-07-20 05:16:51 +00:00
Fred Fish
6febb1e388 * (common.h, external.h, internal.h): New files for NLM/NetWare
support.
1993-07-20 05:16:04 +00:00
Fred Fish
1f04121fed * config.sub (netware): Add as a basic system type. 1993-07-20 04:55:52 +00:00
Fred Fish
db85f5231f * Makefile.in (SFILES): Add nlmread.c.
* Makefile.in (OBS):  Add nlmread.o.
	* Makefile.in (nlmread.o):  Add new target.
	* configure.in (i[34]86-*-netware):  New configuration.
	* nlmread.c, config/i386/{i386nw.mt, tm-i386nw.h}:  New files
	for NLM/NetWare support.
1993-07-20 04:53:03 +00:00
Fred Fish
c3e964b955 * configure.in (*-*-netware, i[34]86-*-netware): New configs.
* Makefile.in (BFD32_BACKENDS):  Add nlm.o, nlm32.o, nlm32-gen.o.
	* Makefile.in (BFD64_BACKENDS):  Add nlm64.o, nlm64-gen.o.
	* Makefile.in (CFILES):  Add nlm{32,64}.c, nlm{32,64}-gen.c.
	* Makefile.in (nlm.o, nlm{32,64}.o, nlm{32,64}-gen.o:  New targets.
	* bfd-in2.h (INLINE):  Defines moved here.
	* {aoutx.h, elf.c, elfcode.h}:  Move INLINE defines to bfd-in2.h.
	* libelf.h (CAT4):  Move define to bfd-in2.h.
	* bfd-in2.h (CAT4):  Merge CAT4 macro with other CAT macros.
	* bfd-in2.h (union tdata):  Add nlm_obj_data.
	* bfd-in2.h (enum target_flavour):  Add bfd_target_nlm_flavour.
	* targets.c (bfd_nlm{32,64}_{big,little}_vec):  Add prototypes.
	* targets.c (target_vector):  Add bfd_nlm{32,64}_{big,little}_vec.
	* (libnlm.h, nlm.c, nlmcode.h, nlm{32,64}-gen.c,
	nlm{32,64}-target.h, nlm{32,64}.c, config/i386-nlm.mt):  New files
	for NLM support.
1993-07-20 04:45:13 +00:00
Jim Kingdon
62d4a6865e * lib/gdb.exp (runto): Don't insist that function we are running to
was compiled with -g.

	* gdb.t10/{nodebug.{c,exp},Makefile.in}: New test.
1993-07-20 02:57:39 +00:00
Jim Kingdon
164207cae3 * symtab.h (enum minimal_symbol_type): Add mst_file_*.
* partial-stab.h [DBXREAD_ONLY]: Record statics in miminal symbols.
	* dbxread.c (record_minimal_symbol): Deal with statics.
	* minsyms.c (lookup_minimal_symbol): Prefer externals to statics.
1993-07-20 02:50:15 +00:00
Jim Kingdon
675d65db00 * gdb.t17/interrupt.exp: Before sending ^C, give the inferior time
to get back into the read system call.
	Accept leading newline in case where we woke it up.
1993-07-20 01:15:20 +00:00
Jim Kingdon
3d7d298018 * config/i386/xm-i386sco.h: Define HAVE_TERMIOS. 1993-07-20 00:31:15 +00:00
Jim Kingdon
b2ad2e6473 * hppa-dis.c (print_insn_hppa): Use extract_5r_store for 'r'. 1993-07-20 00:22:35 +00:00
Jim Kingdon
8622d4e5f1 * hppa.h (break): First immediate field is unsigned. 1993-07-20 00:20:44 +00:00
Jim Kingdon
0b3ae81140 * hppa.h: Add rfir instruction. 1993-07-20 00:17:37 +00:00
Jim Kingdon
88bc5cafd0 * printcmd.c, config/pa/xm-pa.h, config/alpha/xm-alpha.h: Make it so
arg_bytes field of makeva_list is always aligned.
	* config/pa/xm-pa.h: Make arglist_address a char *.
1993-07-19 23:31:09 +00:00
Jim Kingdon
1cd080b520 * printcmd.c, config/pa/xm-pa.h, config/alpha/xm-alpha.h: Make it so
arg_bytes field of makeva_list is always aligned.
	* config/pa/xm-pa.h: Make arglist_address a char *.
1993-07-19 23:20:55 +00:00
David D. Zuhn
84d3f42292 fix stupid typo 1993-07-19 22:24:56 +00:00
David D. Zuhn
56e28f3a9b add i386-lynx support 1993-07-19 22:14:45 +00:00
Jim Kingdon
981b3a2794 * hppa-dis.c (print_insn_hppa, case '>'): If next character is 'n',
don't output a space.
1993-07-19 21:39:36 +00:00
Jim Kingdon
17068960cb * hppa-dis.c (float_format_names): 10 is undefined, and 11 is quad. 1993-07-19 20:54:04 +00:00
Ken Raeburn
da0f62a045 dis-asm.h (struct disassemble_info): New field application_data. 1993-07-19 20:12:50 +00:00
Ken Raeburn
623d6e9ab8 various changes 1993-07-19 20:05:41 +00:00
Ken Raeburn
8d6c34a108 (write_relocs): New function, split off from write_contents. Use memset
instead of bzero.
(write_object_file): Apply write_relocs to each section before applying
write_contents.
1993-07-19 20:05:16 +00:00
Ken Raeburn
4380166dfa (read_begin): Call obstack_begin with values closer to 1K multiples.
(read_a_source_file, big_cons, float_cons): Use memcpy instead of bcopy.
1993-07-19 20:04:25 +00:00
Ken Raeburn
9892550d29 forgot to check this in long ago... 1993-07-19 20:03:06 +00:00
Ken Raeburn
7c05f0ec40 (obj_elf_previous): New function.
(previous_section, previous_subsection): New vars.
(obj_elf_section): Save current place in case DWARF code wants us
to pop back to it.  Handle unquoted section name as well as quoted
section name.  Don't crash on invalid strings.
(obj_pseudo_table): Handle new pseudos "previous", "2byte", and "4byte".
1993-07-19 19:49:34 +00:00
Ian Lance Taylor
ce2ad89aca * config/tc-m68k.c (m68k_ip_op): Don't decrement strend when
calculating opP->isiz; this permits the expression size to be
	determined as well, later on.

Fixes PR 2911.
1993-07-19 19:13:30 +00:00
Ken Raeburn
32090b8e4f * elf.c, elfcode.h, libelf.h: Serious reorganization.
Deleted `thunk' structure, merged into tdata, duplicate data eliminated.
Rearranged functions, grouping by function.
Broke up many functions in elfcode.h, re-ordered many parts of file writing
to handle unpredictable state of section relocation table as provided by
various applications.
Still needs cleanup: Merge functions back together, split out data structure
with only data that is used only when writing out object file.

* elf.c (bfd_elf_generic_reloc): New function, taken from coff-mips.c.
* elf32-sparc.c (elf_sparc_howto_table): Use it, to work around
bfd_perform_relocation lossage.
1993-07-19 19:12:59 +00:00
Roland Pesch
da374d8043 Repair bugs in conditionals, spotted by Zoo during "latest" build. 1993-07-19 19:04:24 +00:00