Commit graph

13660 commits

Author SHA1 Message Date
Steve Chamberlain
229ba4b362 * ldmain.c (main): Remove PE stuff.
* lexsup.c (options): Load more PE options.
	(set_pe_value): New function.
1995-08-22 01:32:11 +00:00
Steve Chamberlain
7494201cbf * libcoff-in.h (coff_data_type.link_info): New field. 1995-08-22 01:21:52 +00:00
Steve Chamberlain
e2936fc40b * internal.h: (internal_filehdr): Moved PE stuff into
internal_extra_pe_filehdr.
	(internal_aouthdr): Moved PE stuff into
	interanl_extra_pe_aouthdr.

	* bfdlink.h (struct bfd_link_info): Remove PE stuff.
1995-08-22 01:13:43 +00:00
Steve Chamberlain
e9614321da Mon Aug 21 17:49:28 1995 steve chamberlain <sac@slash.cygnus.com>
* bfd-in.h (bfd_link_subsystem): Turn enum into #defines.
	(bfd_link_pe_info_dval): New
	(bfd_link_stack_heap): Renamed and massaged into bfd_link_pe_info.
	* bfd-in2.h: rebuilt.
	* bfd.c (NT_subsystem, NT_stack_heap): Deleted.
	* coffcode.h (pe_value): New function.
	(fill_pe_header_info): New function.
	(coff_write_object_contents): Use new function.
	* cofflink.c (coff_final_link_info): Remove pe randomness.
	(dores_com): Update info in bfd_link_pe_info_dval.
	(process_embedded_commands): Use the bfd_link_pe_info_dval.
	(_bfd_coff_final_link): Remove PE stuff, initialize
	coff_data->link_info.
	* coffswap.h (coff_swap_[aout|filehdr]_out): Use indirect PE pointer.
	(coff_swap_scnhdr_out): Use real imagebase.
	* libcoff (coff_data_type.link_info): New field.
1995-08-22 01:02:23 +00:00
Ian Lance Taylor
259d19c2be * m68k-opc.c (m68k_opcode_aliases): Add bhib as an alias for bhis,
and likewise for the other branches.  Add bhs as an alias for bcc,
	and likewise for the size variants.  Add dbhs as an alias for
	dbcc.
1995-08-21 21:34:54 +00:00
Ian Lance Taylor
a5e03353ae * as.c (parse_args): Accept --defsym SYM=VALUE.
* doc/as.texinfo, doc/as.1: Document --defsym.
1995-08-21 21:18:57 +00:00
Ian Lance Taylor
4026c1222f * read.c (read_a_source_file): In MRI mode, don't end the
statement inside a quotation.
	(s_space): Don't warn about a zero repeat count in MRI mode.
	* config/tc-m68k.c (crack_operand): In MRI mode, don't count
	parentheses inside quotes.
	(md_assemble): In MRI mode, anything after the operands field is a
	comment.
	(parse_mri_control_operand): Adjust start and stop to remove
	spaces.
	(s_mri_for): Likewise.
1995-08-21 21:05:06 +00:00
Ian Lance Taylor
9821fda925 * app.c (do_scrub_next_char): If LEX_IS_STRINGQUOTE or
LEX_IS_ONECHAR_QUOTE is seen in	state 10, preserve one space.
1995-08-21 21:03:50 +00:00
Kung Hsu
bb8e4e4d95 * remote-udi.c (udi_wait): Mask off high bits of stop reason.
* remote-udi.c (fetch_register): For unfetchable regs, pretend it's
	done. Fix a bug.
1995-08-21 18:56:04 +00:00
Ian Lance Taylor
96dbd10de8 * gas/macros/*: New tests for macros. 1995-08-21 18:45:08 +00:00
Ian Lance Taylor
d2f661bd18 * gasp/pl3.out: Update for changes in commented source output when
LOCAL is used.
1995-08-21 18:42:09 +00:00
Ian Lance Taylor
95074dc362 * doc/as.texinfo: Document irp, irpc, macro, and rept. MRI mode
now supports macros, ifc, ifnc, irp, irpc, rept, and endr, without
	using gasp.
1995-08-21 18:37:10 +00:00
Ian Lance Taylor
7e047ac2c1 Add support for macros.
* as.c: Include sb.h and macro.h.
	(max_macro_next): New global variable.
	(main): Call macro_init.
	(macro_expr): New static function.
	* as.h (max_macro_nest): Declare.
	* read.c (line_label): Rename from mri_line_label.  Change all
	uses.
	(potable): Add exitm, irp, irpc, macro, mexit, rept.
	(read_a_source_file): Always clear line_label at the start of a
	line, not just when flag_mri or LABELS_WITHOUT_COLONS.  Fixup
	MRI/LABELS_WITHOUT_COLONS handling.  In MRI mode, permit label:
	equ val.  Set line_label when calling colon.  In MRI mode, a
	leading '.' does not imply a pseudo-op.  Check for macro expansion
	before calling md_assemble.
	(s_irp): New function.
	(get_line_sb): New static function.
	(s_macro): New function.
	(s_mexit): New function.
	(s_rept): New function.
	* read.h (line_label): Rename from mri_line_label.
	(s_irp, s_rept): Declare.
	(s_macro, s_mexit): Declare.
	* input-scrub.c: Include sb.h.
	(sb_index, from_sb): New static variables.
	(macro_nest): New static variable.
	(struct input_save): Add sb_index and from_sb fields.  Change
	next_saved_file field to be struct input_save *.
	(next_saved_file): Changed to be struct input_save *.
	(input_scrub_push): Change to return type struct input_save *.
	Save sb_index and from_sb.
	(input_scrub_pop): Change parameter type to struct input_save *.
	Restore sb_index and from_sb.
	(input_scrub_include_sb): New function.
	(input_scrub_next_buffer): Handle reading from from_sb.
	(bump_line_counters): Only increment lines if not using from_sb.
	* config/tc-m68k.c (opt_table): Add nest.
	(opt_nest): New static function.
	* gasp.c: Include sb.h and macro.h.  Move all sb related functions
	and definitions to sb.h and sb.c.  Move all macro related
	functions and definitions to macro.h and macro.c.
	* sb.h, sb.c: New files, extracted from gasp.c.
	* macro.h, macro.c: Likewise.
	* Makefile.in (OBJS): Add sb.o and macro.o
	(GASPOBJS): Define.
	(gasp.new): Depend upon $(GASPOBJS).  Use $(GASPOBJS) to link.
	(TARG_CPU_DEP_m68k): Depend upon subsegs.h.
	(gasp.o): Depend upon sb.h and macro.h.
	(sb.o): New target.
	(macro.o): New target.
	(as.o): Depend upon sb.h and macro.h.
	(input-scrub.o): Depend upon sb.h.
	(read.o): Depend upon sb.h and macro.h.
1995-08-21 18:35:11 +00:00
Ian Lance Taylor
7172e2266f * app.c (do_scrub_begin): In MRI mode, set lex of ' to
LEX_IS_STRINGQUOTE.
1995-08-21 18:19:21 +00:00
Ian Lance Taylor
075e616c28 * cond.c (get_mri_string): New static function.
(s_ifc): New function.
1995-08-21 18:18:56 +00:00
Michael Meissner
840886d875 Allow @HA, @L, and @H on constant expressions. 1995-08-21 17:47:01 +00:00
Ian Lance Taylor
68807a39e4 * linker.c (link_action): If an undefined reference follows an
undefined weak reference, change the type to undefined.
	* elflink.h (elf_link_add_archive_symbols): Don't record an
	undefined weak reference as defined, in case it turns into a real
	undefined reference later in the same archive.
1995-08-21 15:12:34 +00:00
Jeff Law
fa296a0c44 * Makefile.in (install): Remove "brokensed" hack, unnecessary now
that we're using autoconf.
	(uninstall): Likewise.
1995-08-21 06:49:42 +00:00
Jim Wilson
c2d8063d3b * config/tc-arm.c (md_reloc_size): Add const to declaration. 1995-08-20 22:56:02 +00:00
Steve Chamberlain
2757dc2534 Sun Aug 20 09:59:00 1995 steve chamberlain <sac@slash.cygnus.com>
Modified to generate archives and objects rather than .s files.
	* dlltool.c (run) New function.
 	(gen_exp_file, gen_lib_file): Use run.
	(workout_prefix): New.
	(usage): Document new options.
	(main): Parse new options.
1995-08-20 17:01:27 +00:00
Peter Schauer
715682510e * gdb.base/funcargs.exp: Fix typos introduced by Aug 15 change.
* gdb.base/callfuncs.c (main):  Use struct_val1 to inhibit xlc
	from optimizing it away.
	* gdb.base/callfuncs.exp:  Remove rs6000-*-* xfails for
	"call inferior func with struct".
1995-08-20 14:03:45 +00:00
Michael Tiemann
f61f41d929 Wire up the breakpoint window so that it works. Also, fix a typo that
kept the breakpoints in the source window from updating when enabled or
disabled.
1995-08-20 00:26:54 +00:00
Ian Lance Taylor
d0af548446 * gasp/gasp.exp (gasp_test): Call prune_system_crud on the output
of diff.
	* lib/gas-defs.exp: Define prune_system_crud if it is not already
	defined.
1995-08-19 21:37:43 +00:00
Peter Schauer
2447e9afab * gdbtypes.c (recursive_dump_type): Add dont_print_type_obstack
to inhibit infinite recursion when printing aggregate types.
1995-08-19 08:21:23 +00:00
Steve Chamberlain
69c626a9aa * dcache.c (dcache_write_line): Write dirty lines right. 1995-08-19 00:54:12 +00:00
Ian Lance Taylor
ca2329727e * read.c (s_include): In MRI mode, don't expect quotes around the
file name.
	* listing.c (listing_title): Don't require the title to be quoted.
1995-08-18 15:15:28 +00:00
Ian Lance Taylor
65d860fc28 * gasp/mri/*.out: Use ;, not !, for the comment character. 1995-08-18 15:10:35 +00:00
Ian Lance Taylor
f8d6e6cd08 * gasp.c (include_print_where_line): Always subtract 1 from
linecount before printing it.
	(process_file): In MRI mode, lines beginning with '*' or '!' are
	comments.
	(do_reg): In MRI mode, don't require parentheses.
	(do_include): In MRI mode, don't requires quotes.  If the file can
	not be found in the include path, try opening it in the current
	directory.  Print the file name correctly in the error message.
	(chartype_init): In MRI mode, set FIRSTBIT for '.'.
	(main): Set comment_char to ';' when entering MRI mode.
1995-08-18 15:09:57 +00:00
Ian Lance Taylor
b4ec75e09f * config/tc-m68k.c: Include subsegs.h.
(m68k_ip): Pass 64 rather than -1 to add_Fix in 'B' 'B' case.
	(md_pcrel_from): If fx_pcrel_adjust is 64, use -1 instead.
You can't portably store negative numbers in a char.
1995-08-18 15:02:56 +00:00
Peter Schauer
673e1bab44 * sparc-tdep.c (isbranch): Fix typo which caused wrong
target addresses for annulled branches.
1995-08-18 13:27:21 +00:00
Ken Raeburn
0c0e50a478 use "ar ts" for RANLIB on hp300 1995-08-18 01:51:53 +00:00
Steve Chamberlain
eb7f87c5c8 Thu Aug 17 13:35:49 1995 steve chamberlain <sac@slash.cygnus.com>
* emultempl/{armpe.sc, i386pe.sc}: Deleted.
	* emultempl/pe.sc: New file performs generic PE support and sorts
	archive members.
	* emulparams/{armpe.sh,i386pe.sh}: Use new file.
	* scripttempl/{armpe.sc, i386pe.sc}: Deleted
	* scripttempl/pe.sc: New.
	* Makefile.in: Use new files.
b
1995-08-17 22:53:56 +00:00
David Edelsohn
ed67cfa226 * scripttempl/h8500s.sc (.rdata): All data must go in data segment.
(.strings,.ctors,.dtors): Likewise.
1995-08-17 21:49:40 +00:00
Ken Raeburn
ff31ebda50 * coff-sh.c (sh_relax_section): Cast value for used_by_bfd field to PTR, not
coff_section_tdata pointer, since PTR is the real type of the field.
* cofflink.c (_bfd_coff_read_internal_relocs): Ditto.
1995-08-17 21:00:14 +00:00
Ken Raeburn
80152a2019 * configure: Add Makefile.tem to list of files to remove in trap handler. 1995-08-17 20:04:38 +00:00
Ian Lance Taylor
92962c7188 Add support for linking SPARC SunOS PIC compiled code.
* sunos.c (SPARC_PLT_PIC_WORD0): Define.
	(SPARC_PLT_PIC_WORD1, SPARC_PLT_PIC_WORD2): Define.
	(struct sunos_link_hash_entry): Add got_offset and plt_offset
	fields.
	(struct sunos_link_hash_table): Add dynamic_sections_created and
	dynamic_sections_needed fields.
	(sunos_link_hash_newfunc): Initialize new fields.
	(sunos_link_hash_table_create): Initialize new fields.
	(sunos_create_dynamic_sections): New static function, broken out
	of sunos_add_dynamic_symbols.
	(sunos_add_dynamic_symbols): Call sunos_create_dynamic_sections.
	(sunos_add_one_symbol): Call sunos_create_dynamic_sections.
	(bfd_sunos_size_dynamic_sections): Call sunos_scan_relocs before
	checking whether we need to set up the dynamic link information.
	Define __GLOBAL_OFFSET_TABLE if anything referred to it.
	(sunos_scan_std_relocs): Call sunos_create_dynamic_sections.  Use
	plt_offset field; only put symbol in .plt if it is not defined by
	a regular object.
	(sunos_scan_ext_relocs): Likewise.  Handle base relative relocs.
	(sunos_scan_dynamic_symbol): Store dynobj in local variable.
	(sunos_write_dynamic_symbol): Check plt_offset rather than
	checking whether symbol is in .plt section.  If symbol is defined
	in a regular object file, use SPARC_PLT_PIC_WORD[012], and don't
	add a JMP_TBL reloc.
	(sunos_check_dynamic_reloc): Add contents and relocationp fields.
	If plt_offset is set, redirect relocation to PLT.  If this is a
	base relative reloc, redirect relocation to GOT.  Check
	dynamic_sections_needed field rather than whether dynobj is set.
	(sunos_finish_dynamic_link): Check dynamic_sections_needed field
	rather than whether dynobj is set.  Don't die if .need and .rules
	sections were not created.
	* aoutx.h (howto_table_ext): Mark PC10, PC22, and JMP_TBL entries
	PC relative.  Mark PC10 complain_overflow_dont.  Mark PC22 and
	JMP_TBL complain_overflow_signed.
	(NAME(aout,final_link)): If info->shared is set, set DYNAMIC.
	(aout_link_input_section_std): Call check_dynamic_reloc for all
	relocs.  Pass contents and &relocation.  Don't warn about an
	undefined symbol until check_dynamic_reloc has been called.  Don't
	warn about an undefined symbol for a base relative reloc.
	(aout_link_input_section_ext): Likewise.  For a base relative
	reloc, always treat r_index as an index into the symbol table.
	* libaout.h (struct aout_backend_data): Add contents and
	relocation argument to check_dynamic_reloc entry point.
	(struct aoutdata): Add local_got_offsets field.
1995-08-17 19:30:46 +00:00
Jeff Law
1ce8a30f17 * config/pa/tm-hppa.h (PROLOGUE_FIRSTLINE_OVERLAP): Define.
Yes, this dusty old macro is really the right thing to do when you've
got a port which performs scheduling on prologues...  Fixes latest
mentor gdb PR.
1995-08-17 04:01:24 +00:00
Steve Chamberlain
a048254cce * scripttempl/armpe.sc: Always start code at 0x401000, even 1995-08-16 23:29:18 +00:00
Steve Chamberlain
ee473c97b5 * dlltool.c (gen_exp_file): Fix RVA handling.
(rva_s, rva_n): Delete.
1995-08-16 23:28:18 +00:00
Ian Lance Taylor
a77024ef11 * binutils-all/nm.exp: Add setup_xfail for mips*-sony-bsd* for
tests which fail on ECOFF targets.
1995-08-16 22:38:42 +00:00
Ken Raeburn
58bd5f50cf * as.h (alloca): Use void* declaration on HP/UX. 1995-08-16 22:15:28 +00:00
Ian Lance Taylor
3a3a17b415 * gas/mri/mri.exp: Change hppa*-*-* expected failures to only
expect failure for targets which use SOM.
1995-08-16 21:57:37 +00:00
Ian Lance Taylor
a46c0ed860 * lib/gas-defs.exp (run_dump_test): If the program to run does not
exist, mark the test as untested.
1995-08-16 21:13:52 +00:00
Ian Lance Taylor
df0d80dbed * binutils-all/objcopy.exp: Change i*86-*-linux xfail for simple
copy test to check for i*86-*-linuxaout* instead.
1995-08-16 20:54:40 +00:00
Ian Lance Taylor
7863267c43 * gas/mri/mri.exp: Add setup_xfail for i960 b.out targets for
common test.
1995-08-16 20:43:22 +00:00
Ian Lance Taylor
a0cc993c12 * lib/gas-defs.exp (run_dump_test): Name the output file dump.o,
rather than using an implicit a.out.
1995-08-16 20:42:15 +00:00
Steve Chamberlain
22cd79c599 Wed Aug 16 11:38:59 1995 steve chamberlain <sac@slash.cygnus.com>
* scripttempl/armpe.sc: Always start code at 0x401000, even
	if -r.
	* ldwrite.c (strdup): New extern declaration.
	* ldgram.y (atype): New rule to clarify type parsing.
	* ldlang.c (init_os): Remove commented out code.
	(lang_size_sections): Set SEC_ALLOC and SEC_LOAD bits
	unless told not to by the link script.
1995-08-16 20:34:44 +00:00
Ian Lance Taylor
4c67b523a3 * config/tc-sparc.c (tc_gen_reloc): If PIC, only change PCREL_S2
to WPLT30 for an undefined or external symbol.  Don't consider
	PC10 or PC22 to be a PC relative reloc when choosing between
	fx_addnumber and fx_offset.
1995-08-16 20:21:49 +00:00
Ian Lance Taylor
51c7f8f3c2 * gas/mri/for.s: Add nop to round out to four byte boundary.
* gas/mri/repeat.s: Likewise.
	* gas/mri/while.s: Likewise.
	* gas/mri/for.d: Expected added nop.
	* gas/mri/repeat.d: Likewise.
	* gas/mri/while.d: Likewise.
1995-08-16 20:17:29 +00:00
Ian Lance Taylor
4decdd5669 * config/tc-z8k.c (md_number_to_chars): Don't do it here, call
number_to_chars_bigendian.
	* config/tc-z8k.h (TARGET_BYTES_BIG_ENDIAN): Define.
1995-08-16 20:05:54 +00:00