Commit Graph

14792 Commits

Author SHA1 Message Date
Ian Lance Taylor 6933148af0 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
p_paddr if p_paddr is zero.
	(make_mapping): Set includes_filehdr and includes_phdrs for first
	PT_LOAD segment.
	(map_sections_to_segments): Set includes_phdrs for PT_PHDR
	segment.
	(assign_file_positions_for_segments): Handle includes_filehdr and
	includes_phdrs.  Remove special handling of PT_PHDR and first
	PT_LOAD segments.
	(copy_private_bfd_data): Set includes_filehdr and includes_phdr
	when appropriate.  Remove special handling of PT_PHDR segment.
	Use a more complex condition for when a section is included in a
	segment to handle Solaris linker oddities.
1995-11-30 22:15:13 +00:00
Per Bothner 638536a7ef * config.guess: Recognize Pentium under SCO. 1995-11-30 22:00:52 +00:00
Kim Knuttila 531a1af274 idata alignment in .s files 1995-11-30 18:47:11 +00:00
Kim Knuttila d611a82e67 Expose .edata section 1995-11-30 18:18:38 +00:00
David Edelsohn 781332facb Add a comment saying .junk sections are discarded by the linker. 1995-11-30 17:15:12 +00:00
Ian Lance Taylor e7f2e923be Thu Nov 30 11:32:34 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
* configure.host (m68*-motorola-sysv): Define HOSTING_CRT0 and
	HOSTING_LIBS for testing.
	(m88*-motorola-sysv3): Define HOSTING_CRT0 and HOSTING_LIBS for
	testing.
1995-11-30 16:30:13 +00:00
Ian Lance Taylor 464070de43 Thu Nov 30 11:23:42 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
* config/obj-coff.c (fixup_segment): If TC_M88K is defined, do not
	add section's paddr to add_number; compatibility to native as and
	ld forbids.
1995-11-30 16:25:27 +00:00
Ian Lance Taylor f62fed1c4a Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
* coff-m88k.c (howto_table): Reformatted for easier reading;
	special_function now points to new function m88k_special_reloc.
	(howto_hvrt16): Function previously used for handling HVRT16 relocs
	removed.
	(rtype2howto): Do not add reloc's r_offset to the addend, this will
	be done correctly by m88k_special_reloc.
	(reloc_processing): New function to be used by RELOC_PROCESSING.
	(RELOC_PROCESSING): Define to call reloc_processing.
1995-11-30 16:23:05 +00:00
Michael Meissner 1f1e5dd85f Let autoconf determine if host is big endian or not 1995-11-30 11:13:08 +00:00
Ken Raeburn 9d5aef8075 configure.in: handle m68k-sysv4 correctly 1995-11-30 04:24:08 +00:00
Ken Raeburn ac9ef8eef1 Move struct hash_entry from hash.h to hash.c. 1995-11-30 04:22:27 +00:00
Ken Raeburn 6a08732583 (elf_frob_symbol): Don't free and clear sy_obj if it's already known to be null. 1995-11-30 04:19:13 +00:00
Per Bothner 787f2cb332 * Makefile.in: Add .exp.check rule.
* callch.ch:  Add missing "%." to format strings.
	* callch.exp:  Fix argument to gdb_load.
	* chexp.exp:  Add specific error messages to test_print_reject calls.
	* misc.exp:  Add a test for PR 8496.
	* pr-6632.exp, pr-8136.exp:  Link executables from two .o files.
1995-11-30 03:35:14 +00:00
Per Bothner 5e54886116 * ch-exp.y: Replaced by ...
* ch-exp.c:  New file.  Use recursive-descent.
	Recognize labelled array tuples and powerset ranges.
	* Makefile.in:  Update for no longer using yacc for ch-exp.

	* c-lang.c:  Make various functions non-static.
	* c-lang.h:  Add bunches of prototypes.
	* cp-valprint.c (cp_print_value_fields):  Also take address.
	(cp_print_value):  Likewise.  Use baselcass_offset.
	* stabsread.c (current_symbol):  New static variable.
	(type_synonym_name):  Remove.
	(read_type):  If copying, make copy be a TYPE_CODE_TYPEDEF.
	(read_array_type):  Don't need to handle undefined element type here.
	(cleanup_undefined_types):  Ditto.
	(read_range_type):  Look for Chill ranges.
	* valops.c (value_assign):  Fix case lval_internalvar - don't try
	to assign into old value (which might be too small!).
	(value_coerce_array):  No longer need special VALUE_REPEATED handling.
	(value_arg_coerce):  Cleaner array->pointer decay mechanism.
	(search_struct_field):  Use baseclass_offset rather than
	baseclass_addr.
	(value_slice):  Use get_discrete_bounds.
	* value.h (COERCE_VARYING_ARRAY):  Take type argumnt as well.
	* values.c (baseclass_offset):  Change parameter interface.
	(baseclass_addr):  Removed.
	* c-typeprint.c, c-valprint.c, ch-valprint.c, values.c, valops.c:
	Add check_typedef/CHECK_TYPEDEF as needed.
1995-11-30 03:26:34 +00:00
Per Bothner dcdba37e2d * scm-valprint.c (scm_isymnames): Remove "#@" prefix.
(scm_scmval_print):  Do not print "#@" prefix.
	* mdebugread.c:  Add check_typedef/CHECK_TYPEDEF as needed.
1995-11-30 03:10:59 +00:00
Stan Shebs b18319318b Fix MPW tool installation 1995-11-30 02:55:03 +00:00
Per Bothner bcbf388e99 * f-typeprint.c, valarith.c, valprint.c, typeprint.c, eval.c:
Add check_typedef/CHECK_TYPEDEF as needed.
	* f-typeprint.c:  Various cleaning up.
	* valarith.c (value_subscript):  Also subscript bitstrings (for Chill).
	* typeprint.c (print_type_scalar):  Also support TYPE_CODE_RANGE.
	* eval.c (evaluate_subexp_standard case OP_ARRAY):  Implement
	support for labelled array tuples and ranges in powerset tuples.
	(init_array_element):  New function.
1995-11-30 02:32:29 +00:00
Per Bothner 940d596798 * alpha-tdep.c, c-exp.y, h8500-tdep.c, f-exp.y, f-valprint.c,
findvar.c, hppa-tdep.c, infcmd.c, language.c, printcmd.c,
 	rs6000-tdep.c, symmisc.c, symtab.c:
	Add check_typedef/CHECK_TYPEDEF as needed.
1995-11-30 01:43:37 +00:00
Per Bothner d1f4065e64 * gdbtypes.h (enum type_code): Added TYPE_CODE_TYPEDEF.
(check_typedef):  New prototype.
	(CHECK_TYPEDEF):  New macro.
	(TYPE_DUMMY_RANGE):  Removed.
	* gdbtypes.c (get_discrete_bounds):  Fix paren error; make more robust.
	(create_array_type):  Don't force_to_range_type;  users of the
	array are responsible for handling non-range index types.
	(create_set_type):  Likewise.
	(force_to_range_type):  Removed.
	(check_typedef):  New function handles stub types and typedefs.
	(check_stub_type):  Just call check_typedef. (To be removed.)
	(recursive_dump_type):  Handle TYPE_CODE_TYPEDEF.
	* ch-lang.c (type_lower_upper):  Use get_discrete_bounds.
	(evaluate_subexp_chill):  Handle string repetition.
	Re-arrange to handle EVAL_AVOID_SIDE_EFFECTS better.
	* ch-typeprint.c (chill_type_print_base):  Handle TYPE_CODE_TYPEDEF.
	Pass show=0 in recursive calls various places.
	(case TYPE_CODE_ARRAY):  Don't require index type to have
	TYPE_CODE_RANGE.
	(case TYPE_CODE_RANGE):  Don't need to support TYPE_DUMMY_RANGE.
	* gdbtypes.c, ch-lang.c, ch-typeprint.c (numerous places):
	Add check_typedef/CHECK_TYPEDEF as needed.
1995-11-30 01:07:28 +00:00
Per Bothner f2ed3a80bb * top.c (command_line_input): Only strip out an initial #-comment.
Looking for internal comments is language-specific (breaks Scheme).
1995-11-29 23:22:32 +00:00
Per Bothner badefd2800 * expression.h (enum exp_opcode): Add BINOP_RANGE.
* expprint.c (dump_expression):  Support BINOP_RANGE.
	* eval.c (evaluate_subexp_standard):  Handle BINOP_RANGE (as error).
	(case MULTI_SUBSCRIPT):  Fix broken f77 value->int ad hoc conversion.
	* ch-lang.c (chill_op_print_tab):  Support BINOP_RANGE.
	(evaluate_subexp_chill):  Error on BINOP_COMMA.
1995-11-29 22:59:31 +00:00
Ian Lance Taylor b00c57ec37 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
(pe_print_pdata): Likewise.
1995-11-29 22:10:57 +00:00
Ian Lance Taylor a9713b91a7 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
obstack_alloc fails.
	(bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
	fails.
	* libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
	* Many files: don't set bfd_error_no_memory if one of the above
	routines fails.
1995-11-29 22:05:37 +00:00
J.T. Conklin 8f2bdc2032 Merge in stuff accidently commited to sh3e branch 1995-11-29 22:00:53 +00:00
Per Bothner d9f12910a4 * Makefile.in: Clean up so doc stuff stays in doc sub-dir. 1995-11-29 22:00:41 +00:00
J.T. Conklin d25fd70ded * configure.in (noconfigdirs): Disable target-libio on v810-*-*.
* config/mt-v810 (CC_FOR_TARGET, AS_FOR_TARGET, AR_FOR_TARGET,
RANLIB_FOR_TARGET): Set as appropriate for NEC v810 toolchain.
1995-11-29 21:57:12 +00:00
Michael Meissner b9ab37f0a8 Make debugging remote gdb friendlier 1995-11-29 21:41:21 +00:00
Jim Wilson 9dfb65e661 * gencode.c (tab): In shad/shld definitions, negate R[m] before
the and operation instead of after.  For shad delete cast.  For shld
	use UR instead of R and delete cast.
1995-11-29 20:41:46 +00:00
Ian Lance Taylor 3dbf33eeb4 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
if p_paddr_valid is set.
	(copy_private_bfd_data): New static function.
	(_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
1995-11-29 20:04:17 +00:00
Ian Lance Taylor 44ef8897da * elf.c (assign_file_positions_for_segments): Fix case where extra
program headers were allocated.
1995-11-29 19:14:33 +00:00
Ian Lance Taylor 27fb8f2933 * elf.c (_bfd_elf_print_private_bfd_data): New function.
* elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
	* elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
	_bfd_elf_print_private_bfd_data.
1995-11-29 18:46:07 +00:00
Michael Meissner 77fa4d98a8 Fix -mrelocatable 1995-11-29 18:17:24 +00:00
Ian Lance Taylor 5d85ec2d4e * ld-srec/srec.exp: Add setup_xfail for i960 COFF targets. 1995-11-29 17:59:04 +00:00
Ian Lance Taylor 64ecde4619 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
	Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
	(alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
	RELOC_SECTION_LITA for ALPHA_R_IGNORE.
	(alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
	RELOC_SECTION_ABS to RELOC_SECTION_NONE.
1995-11-29 17:40:58 +00:00
Ian Lance Taylor 2a3486d2f9 * configure.in: Don't configure gas for alpha-dec-osf*. 1995-11-29 17:09:41 +00:00
David Edelsohn bbc6c9c129 Fix typo. 1995-11-29 03:36:46 +00:00
David Edelsohn 7c40dd08ee * Makefile.in (target_subdir): Define.
(CC_FOR_TARGET, CXX_FOR_TARGET): Use it to find target libraries.
	* configure.in (X_CFLAGS): Fix typo.
	(target_subdir): Set to "${target_alias}/" if cross.
	* configure: Regenerated.
1995-11-29 03:35:35 +00:00
David Edelsohn 9c0bc1daf9 * Makefile.in (target_subdir): Define.
(CC_FOR_TARGET, CXX_FOR_TARGET): Use it to find target libraries.
	* configure.in (X_CFLAGS): Fix typo.
	(target_subdir): Set to "${target_alias}/" if cross.
	* configure.in: Regenerated.
1995-11-29 03:34:57 +00:00
David Edelsohn 799de4c4a0 * dlltool.c (fill_ordinals): Don't reference d_export_vec if
there are no exported functions.
1995-11-29 01:25:25 +00:00
David Edelsohn 4588619966 * dbxread.c (dbx_symfile_read): Set block_address_function_relative
for `pe' format files.
1995-11-28 23:45:17 +00:00
Ian Lance Taylor 4f0ad91b9b * configure.in: Default to --with-stabs for some targets for which
it makes sense: mips*-*-*, alpha*-*-osf*, i[345]86*-*-sysv4* and
	i[345]86*-*-unixware*.
1995-11-28 22:15:27 +00:00
Ian Lance Taylor fd0198f023 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
* elf.c (make_mapping): New static function.
	(map_sections_to_segments): New static function.
	(elf_sort_sections): New static function.
	(assign_file_positions_for_segments): New static function.
	(map_program_segments): Remove.
	(get_program_header_size): Remove sorted_hdrs, count, and
	maxpagesize parameters.  Simplify.
	(assign_file_positions_except_relocs): When generating an
	executable, use assign_file_positions_for_segments.
	(elf_sort_hdrs): Remove.
	(_bfd_elf_sizeof_headers): Remove eliminated parameters from call
	to get_program_header_size.
1995-11-28 22:02:13 +00:00
Ian Lance Taylor 6d2d98d313 * internal.h (struct elf_segment_map): Define. 1995-11-28 21:55:33 +00:00
Fred Fish bfe8f51619 * magic.h: Renamed to gmagic.h to avoid <magic.h> conflict.
* magic.c:  Renamed to gmagic.c in sympathy.
	* eval.c, gmagic.c, config/tm-magic.h:
 	Include "gmagic.h" rather than "magic.h".
1995-11-28 19:33:22 +00:00
Ken Raeburn c6e4e83496 Various Thanksgiving weekend hacks: clean up hash table, reduce various
structure sizes, stabs string memory use cleanup, statistics dump.
1995-11-28 19:23:15 +00:00
Ken Raeburn 6594d6b9c2 Clean up hash code, parameterize some actions, tweak some parameters. Hash
table entries, table allocation and control structure are larger now, but
collisions are reduced and string compares even further reduced.

Dump lots more statistics, especially hash code data, for --statistics.  Dump
statistics even in error cases.

Details in ChangeLog.
1995-11-28 19:21:09 +00:00
Ken Raeburn da954cd7b6 Remove unused sy_name_offset from ELF_TARGET_SYMBOL_FIELDS. 1995-11-28 19:09:58 +00:00
Michael Meissner cf644706d6 fix typo 1995-11-28 18:57:30 +00:00
Michael Meissner 290ad14a9d Add determining when we do not have enough writeback slots; Do not do model specific handling if not printing out the information 1995-11-28 18:47:07 +00:00
Ian Lance Taylor 5aca405826 * lexsup.c (parse_args): Set config.dynamic_link to false for -N
and -n.
1995-11-28 17:15:37 +00:00