Commit Graph

644 Commits

Author SHA1 Message Date
David MacKenzie 288897f490 * ldmisc.c (vfinfo): For `%I', if the file is in an archive, print
the archive filename too.
1994-01-28 21:20:11 +00:00
Ken Raeburn 9b928d3419 get rid of rcs crud 1994-01-28 20:17:18 +00:00
Ken Raeburn 6e0a904fd0 Fix test case to be valid ANSI C++.
Don't require use of fixed C++ header files, so "../gcc/xgcc -B../gcc/" ought
to work for CXX.

In cdtest.exp: Combine "rm" lines.  Added some commentary on things still
broken in this test case.
1994-01-28 20:09:26 +00:00
Ken Raeburn 57e5ec0783 * lib/ld.exp (simple_diff): Indicate failure if files have different numbers of
lines.  Don't muck with $differences to avoid indicating a pass, just return.

Also got rid of trailing whitespace on some lines.
1994-01-28 20:05:56 +00:00
David MacKenzie fb55f9b8ae * ldlex.l: Add rule to catch invalid input characters instead of
printing them.  Include "ldmain.h" for program_name decl.
	(lex_warn_invalid): New function.
	* Makefile.in: Add dependency.
1994-01-28 19:36:53 +00:00
Ken Raeburn f3c6455fda * Makefile.in (check): Don't bother running any tests of
cross-linker until the test suite no longer assumes native mode.
1994-01-28 18:02:43 +00:00
Ken Raeburn e2f9f0f639 keep test suite 1994-01-28 17:19:22 +00:00
Steve Chamberlain 804c860185 Thu Jan 27 17:19:54 1994 Steve Chamberlain (sac@jonny.cygnus.com)
* ldlang.c (print_one_symbol, print_input_section):  Print
	global symbols in symbol table again.
1994-01-28 01:26:25 +00:00
David MacKenzie 7b40f2b169 * ldmain.c ldmain.h ldgram.y: If -v -V or --version was given,
exit successfully instead of complaining if no input files are
	given.
1994-01-27 20:49:21 +00:00
Rob Savoye 03372cf4ab Change all occurances of RUNTEST_FLAGS to RUNTESTFLAGS to be consistant with
everything else. (and now work recursively too)
1994-01-26 21:44:50 +00:00
Stan Shebs 74e6b793b8 * Makefile.in: Format variable definitions consistently.
(LD_PROG): Remove unnecessary variables from link command,
	change variable LOADLIBES to EXTRALIBS.
1994-01-26 04:24:30 +00:00
Stan Shebs 747a47f2be Add MPW/GM sanitizing 1994-01-26 04:19:32 +00:00
Stan Shebs 9218920aba Tue Jan 25 20:01:55 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-xconfig.in: New file, mpw x mips configuration fragment.
	* mpw-em.c: New file, compressed version of em_mipsidt.c.
1994-01-26 04:18:25 +00:00
Stan Shebs b5b2c88649 Tue Jan 25 19:54:19 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-config.in: New file, MPW configuration fragment.
	* mpw-build.in: New file, MPW build script fragment.
	* mpw-make.in: New file, MPW makefile fragment.
	(This file is semi-automatically generated from Makefile.in.)
	* ldfile.c (slash): If MPW, set to `:'.
	* ldlex.l (TRUE_FALSE_ALREADY_DEFINED): If MPW, set this to
	prevent redefinition errors.
1994-01-26 04:17:05 +00:00
Stan Shebs 8594f56890 Tue Jan 25 13:19:41 1994 Stan Shebs (shebs@andros.cygnus.com)
* ldmain.c (main): Compute and display total execution time.
	* ld.texinfo (-stats): Document the option.
1994-01-25 21:30:00 +00:00
Ian Lance Taylor 5dad4c9728 * ldmain.c (reloc_overflow): Added name, reloc_name and addend
arguments.
1994-01-24 20:22:12 +00:00
Ian Lance Taylor de08b0b153 * ldlang.c (lookup_name): Set BFD GP size to -G argument value
after opening BFD.
1994-01-24 19:55:02 +00:00
Ian Lance Taylor 755f42fe99 * ldlang.c (relaxing): Removed global variable.
(lang_size_sections): If the canonical symbols have not already
	been read in, read them in before relaxing.
	* ldlang.h (relaxing): Removed declaration.
1994-01-24 17:59:18 +00:00
Ian Lance Taylor 5e6cd559cf * ldlang.c (new_afile): Initialize loaded field to false.
(lookup_name): If file was already loaded, don't call the
	add_symbols entry point again.
1994-01-21 05:47:18 +00:00
David MacKenzie 8de26d624e * ld.texinfo: Clarify what -T option does. 1994-01-19 21:58:31 +00:00
Steve Chamberlain a843c81763 * scripttempl/m88kbcs.sc: Don't use CREATE_OBJECT_SYMBOLS, that's
for a.out.
1994-01-19 00:21:59 +00:00
Ian Lance Taylor 8a432746ae Motorola Delta sysV68 support from phdm@info.ucl.ac.BE (Philippe
De Muyter).
	* configure.in (m68k-motorola-sysv*) New target.
	* config/delta68.mt: New file.
	* emulparams/delta68.sh: New file.
	* scripttempl/delta68.sc: New file.
	* Makefile.in (ALL_EMULATIONS): Added em_delta68.o.
	(em_delta68.c): New target.
1994-01-14 20:43:07 +00:00
Ian Lance Taylor 901f3538ee * scripttempl/elf.sc: Correct typo. 1994-01-11 18:22:51 +00:00
David MacKenzie c344d88420 * ldgram.y, ldlex.l: Make the space between -e, -u, and -y and
their arguments optional, for compatibility with the old GNU ld.
1994-01-11 03:59:49 +00:00
Ian Lance Taylor 267a3ab363 * scripttempl/elf.c: Define __bss_start before the .sbss section. 1994-01-08 01:01:23 +00:00
Ian Lance Taylor 2f84ec0d97 Various entries. 1994-01-06 20:05:44 +00:00
Ian Lance Taylor b9395be3af * ldmain.c (add_to_set): Add bitsize argument.
(constructor_callback): New function.
	(link_callbacks): Add constructor_callback.
	* ldctor.c (struct set_info): Add bitsize field.
	(ldctor_add_set_entry): Add bitsize argument.
	(ldctor_build_sets): Base the size of the elements of the set on
	the bitsize, rather than always using LONG.
	* ldctor.h (ldctor_add_set_entry): Add bitsize to declaration.
1994-01-06 20:04:26 +00:00
Ian Lance Taylor c477527cbb * ld.h (QUAD_SIZE): Define.
* ldgram.y (QUAD): New token.
	(length): Handle it.
	* ldlex.l: Return QUAD.
	* lexsup.c (keywords): Add QUAD.
	* ldwrite.c (build_link_order): Handle QUAD.
	* ldlang.c (print_data_statement): Handle QUAD.
	(lang_size_sections): Likewise.
	(lang_do_assignments): Likewise.
	* ldexp.c (exp_print_token): Add QUAD to table.
	* ld.texinfo: Describe QUAD.
1994-01-06 19:38:36 +00:00
Ian Lance Taylor 3107eb5b38 * scripttempl/alpha.sc: Don't create .lit4 or .sdata sections,
since the Alpha doesn't use them.
1994-01-06 05:14:48 +00:00
David MacKenzie 080d8af095 * ldemul.h (ld_emulation_xfer_struct): Comment the members. 1994-01-06 01:57:11 +00:00
Rob Savoye de9425a8db Add vsta.mt and vsta.sh. 1994-01-04 16:35:49 +00:00
Rob Savoye 8387f17d83 Support for VSTa micro-kernel. 1994-01-01 20:53:41 +00:00
David MacKenzie 23fdc6bebd clarify change 1994-01-01 19:20:16 +00:00
David MacKenzie 34f9bf4b3c * scripttempl/aout.sc: Pad .text to DATA_ALIGNMENT if relocating;
needed for i386mach.

	* emulparams/i386mach.sh (SEGMENT_SIZE): Fix again.
	(PAGE_SIZE): Don't define; not used.
1994-01-01 19:15:50 +00:00
Ian Lance Taylor 1d166443d4 * ldgram.y (yyerror): Make argument const char *, and actually
print it out rather than assuming it is a syntax error.
	* ldmisc.h: Change declaration of yyerror.
	* ldemul.c, ldwrite.c: Add /*ARGSUSED*/ as appropriate.
1993-12-31 21:17:33 +00:00
David MacKenzie ae9c800701 * emulparams/i386mach.sh (NONPAGED_TEXT_START_ADDR): Don't include
exec header offset, since the exec header isn't loaded.
	(PAGE_SIZE, SEGMENT_SIZE): Agree with bfd/i386mach3.c.
1993-12-31 21:13:03 +00:00
David MacKenzie 4156620964 minor fixes 1993-12-31 21:08:12 +00:00
Ian Lance Taylor 93b135859d Removed files that are no longer used by the rewritten linker. 1993-12-30 19:57:49 +00:00
Ian Lance Taylor 4a6afc88bb A major rewrite to move the bulk of the linker into BFD so that
more efficient backend code can be written for specific object
	files.
	* lderror.c, lderror.h, ldindr.c, ldindr.h, ldsym.c, ldsym.h,
	ldwarn.c, ldwarn.h, relax.c, relax.h: Removed.
	* ldctor.c, ldctor.h: Complete rewrite.
	* ldwrite.c, ldwrite.h: Complete rewrite.
	* ld.h (strip_symbols_type, strip_symbols): Removed.  Use
	link_info.strip instead.  Changed all uses.
	(discard_locals_type, discard_locals): Removed.  Use
	link_info.discard instead.  Changed all uses.
	(ld_config_type): Removed relocateable_output field; use
	link_info.relocateable instead; changed all uses.  Added stats
	field.
	(set_asymbol_chain, get_asymbol_chain, get_loader_symbol,
	set_loader_symbol): Removed.
	* ldexp.h (node_class): Added etree_rel.
	(etree_type): Added rel field.
	* ldexp.c (exp_print_token): Bracketed table initialization.
	(exp_relop): New function.
	(fold_name): Use linker hash table rather than ldsym functions.
	(exp_fold_tree): Likewise.  Also, handle etree_rel case.
	(exp_print_tree): Handle etree_rel.
	* ldgram.y (strip_symbols, discard_locals): Removed.
	(OPTION_stats, OPTION_no_keep_memory): New tokens.  Handle them.
	(REL): New token.  Does not appear in grammar, but needed for
	expression code.
	(file): Don't call lang_final; it's called by main anyhow.
	* ldlex.l: Accept -stats and -no-keep-memory options.
	* ldlang.h (fill_type): Make unsigned int, not unsigned short.
	* ldlang.c: Consistently use fill_type for fill argument.
	(lang_init_script_file, script_file): Removed.
	(create_object_symbols): Removed.  Use
	link_info.create_object_symbols_section instead.  Changed all
	uses.
	(lang_add_keepsyms_file): Removed.
	(lookup_name): Call bfd_link_add_symbols instead of
	ldmain_open_file_read_symbol.
	(wild): Don't iterate over script_file.
	(open_output): Create link hash table.
	(lang_place_undefineds): Rewrote.
	(lang_size_sections): Handle relaxing (doesn't work yet).
	(lang_relocate_globals): Removed.
	(lang_finish): Use link hash table rather than ldsym functions.
	(lang_common): Rewrote.
	(lang_one_common): New function.
	(ldlang_add_file): Add file to link_info.input_bfds list.  Set
	usrdata.
	(create_symbol): Removed.
	(lang_process): Don't call lang_init_script_file.  Call
	ldctor_build_sets rather than find_constructors.  Don't call
	lang_relocate_globals.
	(lang_abs_symbol_at_beginning_of): Rewrote.
	(lang_abs_symbol_at_end_of): Rewrote.
	* ldmain.c (had_y): Removed.
	(lprefix, lprefix_len): Removed; use link_info fields instead.
	Changed all uses.
	(multiple_def_count, commons_pending, undefined_global_sym_count,
	total_symbols_seen, total_files_seen): Removed.
	(link_callbacks, link_info): New variables.
	(main): Initialize link_info.  Don't call init_bfd_error_vector or
	ldsym_init.  Don't set now unused variables.  Handle -stats.
	(get_emulation): Removed obsolete and nonfunctional GNU960 code.
	(add_ysym): Rewrote.
	(read_entry_symbols, refize, enter_global_ref, enter_file_symbols,
	search_library, gnu960_check_format, decode_library_subfile,
	linear_library, symdef_library, clear_syms, subfile_wanted_p):
	Removed.
	(add_keepsyms_file, add_archive_element, multiple_definition,
	multiple_common, add_to_set, warning_callback, undefined_symbol,
	reloc_overflow, reloc_dangerous, unattached_reloc, notice_ysym):
	New functions.
	* ldmisc.c (vfinfo): Accept a string for %T, not a symbol.  Don't
	require symbols for %C; look them up instead.
	* emultempl/hppaosf.em: Pass link_info to
	hppa_look_for_stubs_in_section.
	* Makefile.in: Rebuilt dependencies.
	(CFILES): Removed lderror.c, ldindr.c, ldsym.c, ldwarn.c, and
	relax.c.
	(HFILES): Removed lderror.h, ldindr.h, ldsym.h, ldwarn.h, and
	relax.h.
	(EMULATION_OFILES): Depend on bfdlink.h, ldmain.h, ldexp.h,
	ldlang.h and ldctor.h.

	* Makefile.in (ldlex.c): Don't depend on ldgram.h.  Remove
	declarations of free and malloc from flex output.  Change malloc
	to ldmalloc in flex output.
1993-12-30 19:51:41 +00:00
Mark Eichin f2f824ae57 * config/i386-linux.mt: delete ".sh" from genscripts argument
(change made to genscripts on July 21...)

This is all it took for linux-native ld to build. It isn't necessarily useful,
particularly as gcc is still configured to pass -m486 and -dll-verbose, which
this ld doesn't parse...
1993-12-27 19:39:55 +00:00
Jeff Law 93df4ec5fe * ldmain.c (lprefix): Change default from a char to a string
with only one character.
        (lprefix_len): Set default to one.

        * ldmain.h (lprefix_len): Declare.

        * ldsym.c (write_file_locals): Use strncmp rather than a character
        comparison for lprefix.

        * emultmpl/m88kbcs.em (before_parse): Set lprefix and lprefix_len
        correctly.

        * emultmpl/hppaosf.em: Include ldexp.h.
        (before_parse): Set lprefix and lprefix_len correctly.
1993-12-17 05:21:33 +00:00
Ian Lance Taylor 553b002162 * ldlex.h: Don't declare yywrap if it is a macro.
* ldlex.l: Include sysdep.h.
1993-12-14 22:34:41 +00:00
Ian Lance Taylor 498fbd3c56 * ldlang.c (lang_for_each_statement_worker,
lang_for_each_statement): Forgot to use PARAMS.
1993-12-14 22:20:35 +00:00
Ian Lance Taylor 1400cdc51d * Makefile.in: Added .PHONY targets where appropriate. Added some
comments.  Also:
	(gcclibdir, version): Removed unused variables.
	(DEP): New variable, set to mkdep.
	(ALL_CFLAGS): New variable.  Used in .c.o target.
	(CFILES, HFILES, GENERATED_CFILES, GENERATED_HFILES): New
	variables.
	(HEADERS, MANSOURCES, LDCSOURCES, GENERATED_SOURCES,
	GENERATED_HEADERS, LDSOURCES, BFD_SOURCES, SOURCES): Removed
	mostly obsolete variables.  Adjusted remaining uses.
	(DEF_EMUL): Removed variable.
	(ldmain.o): Handle undefined EMUL error correctly.
	(ldemul-list.h): Depend on config.status rather than Makefile.
	Create via temporary file.
	(ver960.c, roll, make): Removed obsolete targets.
	(.dep, .dep1, dep.sed, dep, dep-in): New targets.  Used to rebuild
	dependencies.
1993-12-13 19:46:45 +00:00
Ian Lance Taylor f80837391e New file used for rebuilding dependencies. 1993-12-13 19:37:22 +00:00
Ian Lance Taylor 9f6294075e More gcc lint. 1993-12-12 00:54:14 +00:00
Ian Lance Taylor fcf276c495 Made many changes to eliminate gcc warnings. Made various
cosmetic changes, declared various things in header files, removed
	various extern declarations from .c files.  No substantive
	changes.
1993-12-11 22:55:55 +00:00
Ian Lance Taylor 2c6635a46f * ldlang.c (lang_process): Ifdef out final call to
lang_size_sections again (reverting change of Nove 2), since it
	breaks the Sun4 linker.
1993-12-11 22:46:15 +00:00
Ian Lance Taylor 8e964b071d * ldgram.y (OPTION_Oval): New token.
(command_line_option): Accept and ignore it.
	* ldlex.l (<COMMAND>): Handle -On where n is a number.
1993-12-02 00:25:48 +00:00
Ken Raeburn d05ac46bc6 * configure.in: Group targets by CPU. Merge some m68k target entries with
different CPU specs that use the same ld_target values.

* configure.in: Add sparc*-*-coff.
* config/coff-sparc.mt, emulparams/coff_sparc.sh: New files.
* Makefile.in (ALL_EMULATIONS): Add em_coff_sparc.o.
(em_coff_sparc.c): Add dependencies and build rules.
1993-12-01 22:14:05 +00:00