Commit Graph

736 Commits

Author SHA1 Message Date
Ian Lance Taylor e6d84626b4 * scripttempl/sa29200.sc: Align all sections to four byte
boundaries.
1994-04-27 20:04:55 +00:00
Steve Chamberlain 6c86b9ff98 * Makefile.in, configure.in: Support for go32 coff.
* config/i386-go32.mt: New file
	* emulparams/i386go32.sh: New file
	* scripttempl/i386go32.sc: New file
1994-04-27 17:52:13 +00:00
Stan Shebs 028f887219 Tue Apr 26 17:20:03 1994 Stan Shebs (shebs@andros.cygnus.com)
* Makefile.in (em_m68klynx.c, em_i386lynx.c, em_sparclynx.c): Use
	Lynx-specific script templates.
	* configure.in (sparclite*-*-coff): Use coff-sparc.
	* emulparams/i386lynx.sh (SCRIPT_NAME): Set to i386lynx.
	* emulparams/sparclynx.sh (SCRIPT_NAME): Set to sparclynx.
	(ENTRY): Set to __main.
	* scripttempl/i386lynx.sc: New file, script for I386 Lynx.
	* scripttempl/m68klynx.sc: Add insertion of ctor/dtor sections.
	* scripttempl/sparclynx.sc: New file, script for uSparc Lynx.
1994-04-27 00:31:11 +00:00
Ian Lance Taylor c435aba810 * scripttempl/mips.sc: Force _gp and .lit8 to be aligned to a 16
byte boundary, in case the global constructors do not take up an
	even 16 bytes.
1994-04-26 21:49:45 +00:00
Ian Lance Taylor cde7350107 * config/i386v4.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not
exist, get crtbegin based on gcc -print-libgcc-file-name.
	(HOSTING_LIBS): Similar change for ../gcc/crtend.o.
1994-04-26 16:42:52 +00:00
Ian Lance Taylor feaa9c4bda * ldlang.c (lang_size_sections): When no address is given for a
section, align it according to its requirements.
1994-04-25 19:28:58 +00:00
Ian Lance Taylor 1e45c4c38e * Makefile.in (clean, distclean): Remove configdoc.texi. 1994-04-21 21:25:17 +00:00
Bill Cox 9ad75873fa * configure.in: Add recognition of i[34]86-*-bsd386. 1994-04-19 19:14:15 +00:00
Ian Lance Taylor 9d87af5697 * ldlang.c (lang_size_sections): When relaxing, adjust the
position of a padding statement, and adjust dot accordingly.
1994-04-15 18:37:05 +00:00
Ian Lance Taylor b22034745a There is no interesting Irix 5, or PowerPC, or RS/6000 support in the
linker, so don't mention them.
1994-04-14 04:02:34 +00:00
Bill Cox 099c286e74 * Makefile.in (check): Set TCL_LIBRARY for runtest. 1994-04-11 23:17:18 +00:00
Ian Lance Taylor 4f2ee95801 * scripttempl/i386coff.sc: If relocating, don't put .init and
.fini sections into .text; keep them separate.
	* config/i386sco.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not
	exist, get crtbegin based on gcc -print-libgcc-file-name.
	(HOSTING_LIBS): Similar change for ../gcc/crtend.o.
1994-04-11 16:35:39 +00:00
Jeff Law f39a73b1b6 * configure.in (hppa*-*-*elf*): Don't require "-hp-" for the
manufacturer.
1994-04-07 03:49:18 +00:00
Jeff Law 79f7de91c4 * emultempl/hppaelf.em (hppaelf_finish): Only resize sections
if building a final executable.
1994-04-06 07:10:09 +00:00
Ken Raeburn 632dcce87b note that pa support is elf only 1994-04-05 18:55:56 +00:00
Ian Lance Taylor 67d0e7ffa1 * ldmain.c (main): Check the return value of bfd_close. 1994-04-05 16:18:31 +00:00
Ian Lance Taylor be9ffc1fd0 * scripttempl/alpha.sc: Clean up section alignment to ensure that
sections never overlap when using -r.
1994-03-31 23:08:37 +00:00
Ian Lance Taylor 6c00b04ff8 * ldmisc.c (vfinfo): Change symbol reading slightly for recent BFD
changes: get_symtab_upper_bound renamed and returns long,
	bfd_canonicalize_symtab returns long, check for error indications.
1994-03-30 22:05:05 +00:00
Ian Lance Taylor f078dc7cf2 * ldlang.c (print_input_section): For section size, use
_cooked_size if it is non-zero, size otherwise.
	(size_input_section): Likewise.
	(lang_do_assignments): Likewise (case lang_input_section_enum).
1994-03-25 22:22:29 +00:00
Ian Lance Taylor 193c5f93a1 * ldlang.c (new_afile): Add new argument add_to_list. Don't set
real to true for lang_input_file_is_marker_enum.  Clear the_bfd.
	(lang_add_input_file): Pass true to new_afile for add_to_list.
	(lookup_name): Remove force_load argument.  Changed all callers.
	Pass false to new_afile for add_to_list.  Split loading of symbols
	out into separate function.
	(load_symbols): New function split out of lookup_name.  Don't load
	the symbols if they are already loaded.
	(open_input_bfds): For lang_input_statement_enum call load_symbols
	rather than lookup_name.
	(lang_process): Pass abs_output_section rather than NULL to
	lang_size_sections.
	(lang_startup): Set real field of first_file to true.
1994-03-24 20:25:12 +00:00
Ian Lance Taylor a2670c2f8b * emultemp/gld960.em: Include libiberty.h
(gld960_before_parse): Pass NULL as final argument to concat.
1994-03-23 19:17:27 +00:00
Ian Lance Taylor f7a26f1b78 * scripttempl/aout.sc: Force _end and __end to be aligned to a
four byte boundary.
1994-03-22 23:46:17 +00:00
Ian Lance Taylor f3bc3ac3fa * ldwrite.c (build_link_order): Handle lang_data_statement_enum by
building a bfd_data_link_order, rather than by setting the section
	contents immediately.
1994-03-22 18:18:32 +00:00
Ian Lance Taylor 4fdbafb247 Changes to make -Ur work again.
* ldmain.c (add_to_set): Now takes reloc argument rather than
	bitsize.  Check config.build_constructors here.  If an new hash
	table entry is created, mark it as undefined.
	(constructor_callback): No longer takes bitsize argument.  Pass
	BFD_RELOC_CTOR to ldctor_add_set_entry, but first make sure the
	BFD backend supports it.
	(reloc_overflow): Handle a NULL abfd argument.
	(reloc_dangerous, unattached_reloc): Likewise.
	* ldctor.c: Include ldmain.h.
	(struct set_info): Change bitsize field to reloc.
	(ldctor_add_set_entry): Now takes reloc argument rather than
	bitsize.  Don't bother to check config.build_constructors here.
	(ldctor_build_sets): Get the size from the reloc howto.  If
	generating relocateable output, call lang_add_reloc rather than
	lang_add_data.
	* ldctor.h (ldctor_add_set_entry): Change declaration to use reloc
	instead of bitsize.
	* ldlang.h (statement_enum): Add lang_reloc_statement_enum.
	(lang_reloc_statement_type): New structure.
	(lang_statement_union_type): Add reloc_statement field.
	(lang_add_reloc): Declare new function.
	* ldlang.c (lang_for_each_statement_worker): Handle
	lang_reloc_statement_enum.
	(map_input_to_output_sections, print_statement): Likewise.
	(lang_size_sections, lang_do_assignments): Likewise.
	(print_reloc_statement): New function.
	(lang_add_reloc): New function.
	* ldwrite.c (build_link_order): Handle lang_reloc_statement_enum.
1994-03-22 00:24:13 +00:00
Ian Lance Taylor 0a6ffe9cfd Remove ppc.em; do it all in nlmconv instead. 1994-03-12 03:19:27 +00:00
Ian Lance Taylor de0abbfc79 Set Emacs local variables to never use version control. 1994-03-08 18:55:57 +00:00
David MacKenzie 0071a731ef * config/i386bsd.mh: New file. 1994-03-08 12:25:06 +00:00
Ian Lance Taylor 7f0638d54b * elf.sc: Permit TEXT_START_SYMBOLS and DATA_START_SYMBOLS to be
defined.
	* emulparams/elf32mipb.s (TEXT_START_SYMBOLS): Define _ftext.
	(DATA_START_SYMBOLS): Define _fdata.
1994-03-07 20:26:24 +00:00
Stan Shebs d9abc278a6 Fri Mar 4 11:43:47 1994 Stan Shebs (shebs@andros.cygnus.com)
* ldlang.c (lookup_name): Stomp on a pointer if in MPW.
	* mpw-em.c: Edit to reflect changed syntax of compiled-in linker
	scripts.
1994-03-04 19:53:16 +00:00
Stan Shebs ddde2a14a7 Mon Feb 28 11:09:48 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-xconfig.in (emulname): Define.
1994-02-28 19:15:10 +00:00
Stan Shebs 764eb34944 Lose mpw-build.in 1994-02-28 19:14:06 +00:00
Stan Shebs 496977f2f6 Mon Feb 28 11:07:41 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-build.in: Remove, subsumed in mpw-make.in.
	* mpw-make.in (bindir): Fix pathname.
	(install): Move here from mpw-build.in.
1994-02-28 19:13:40 +00:00
Stan Shebs b897ed67cb Mon Feb 28 10:59:14 1994 Stan Shebs (shebs@andros.cygnus.com)
* ldlang.c (cat): Define using ANSI style if ALMOST_STDC defined.
1994-02-28 19:05:34 +00:00
Jeff Law ff68559e31 * emultempl/hppaelf.em (hppaelf_finish): Update comments. This
works again.  Attach some output symbols to the stub file bfd.
1994-02-28 04:23:40 +00:00
Jeff Law 2e39abdb96 * emultempl/hppaelf.em: Include elf32-hppa.h.
(file_chain): Add decl.
        (hppa_look_for_stubs_in_section): Delete decl.
        (hppaelf_finish): Reenable code.  Do not pass symbols
        down to hppa_look_for_stubs_in_section.
1994-02-28 00:30:36 +00:00
Ian Lance Taylor b495c31442 * ldmain.c (write_map): Don't define. Removed all references.
Just use map_file or map_filename instead.
	(add_archive_element): Use minfo to write map information, not
	info_msg.
	(constructor_callback): Use fprintf to write map information, not
	info_msg.
	* ldmain.h (write_map): Don't declare.
	* ldgram.y (mri_script_command): Removed reference to write_map.
	* ldlang.c (lang_one_common): Likewise.
	* lexsup.c (parse_args): Likewise.
1994-02-26 19:01:50 +00:00
Ian Lance Taylor bff600cfa4 * scripttempl/elf.sc: Force all sections to be aligned. 1994-02-26 05:34:52 +00:00
Ian Lance Taylor 27baca7182 * ldgram.y (section): Reverse the order of memspec_opt and
fill_opt to avoid an ambiguity when both are used.
	* ld.texinfo: Changed accordingly.
1994-02-26 05:32:29 +00:00
Ian Lance Taylor 6232b6c4c5 * ldgram.y: Move include of ldlex.h back with other includes.
* ldlex.h (input_type): Don't initialize enum constants to
	particular values.
	* ldlex.l: Use a switch to return the right token based on
	input_type, rather than knowing that input_type has a value based
	on a token type.
1994-02-26 03:22:26 +00:00
Ian Lance Taylor 4725fb48f5 * ldgram.y (dirlist_ptr): Removed; not used.
* lexsup.c: Include ldver.h.
	* Makefile.in: Rebuilt dependencies.
1994-02-26 03:17:02 +00:00
Ian Lance Taylor fc1dfb7169 Fri Feb 25 18:55:54 1994 Ted Lemon (mellon@pepper.ncd.com)
* ldlang.c (lookup_name): don't call bfd_set_gp_size.
	(ldlang_add_file): call it here instead.
1994-02-26 03:11:21 +00:00
David MacKenzie ff33a8c167 * ldgram.y: Include ldlex.h after %token decls, for byacc. 1994-02-26 02:14:30 +00:00
Jeff Law 531a5bd189 * emultempl/hppaelf.em: First attempt to clean this file up.
Add comments in several functions as to their purpose and
        how they function (or my current best guess).  Clean up horrible
        spacing and indention that never should have been accepted in the
        first place.  Add FIXMEs for issues which need to be resolved.
        Disable linker-stub generation until it gets fixed.  This allows
        the linker to at least work on simple code for testing purposes.
1994-02-26 00:33:30 +00:00
Jeff Law a62494c41b * ldlang.c (lang_size_sections): No longer static (PA ELF calls
it via hppaelf_finish).  Prototype moved into ldlang.h.
        (lang_process): Move problematic extra call to lang_size_sections
        into the PA ELF specific code.
        * emultempl/hppaelf.em (hppaelf_finish): Extra call to
        lang_size_sections moved here.
1994-02-25 18:51:35 +00:00
David MacKenzie 9d3898b251 Add missing newline in einfo message. 1994-02-25 04:12:50 +00:00
David MacKenzie d5b79a89b9 * lexsup.c (parse_args): Use symbolic numbers for long options.
Fix misunderstanding in -Y and -call_shared et al.
1994-02-25 04:08:55 +00:00
Ian Lance Taylor b3cefbc393 For some reason this directory was missing a .Sanitize file. 1994-02-25 03:59:10 +00:00
Ian Lance Taylor 3de3daca78 Make correspond to djm's last change. 1994-02-25 03:39:17 +00:00
Ian Lance Taylor c361ce46c5 * configure.in (powerpc-*-elf*): New target; use ppc-elf32.
* config/ppc-elf32.mt: New file.
	* emulparams/elf32ppc.sh: New file.
	* emultempl/ppc.em: New file.
	* Makefile.in (ALL_EMULATIONS): Added em_elf32ppc.o.
	(em_elf32ppc.c): New target; uses elf32ppc.sh, ppc.em and elf.sc.
	(EMULATION_OFILES): Added dependencies on ldexp.h and ldlang.h.
1994-02-25 03:32:08 +00:00
David MacKenzie d4e5e3c330 Use getopt instead of lex and yacc to parse the command line.
* ld.texinfo (Options): Document changes to option syntax.
	* Makefile.in: Update dependencies.
	* ldver.c (help): Tweak dashes in usage message.
	* ldgram.y (%union): Remove unused members.
	Remove %tokens for command line options; add ones for input types.
	(command_line): Rules removed.
	(file): Instead of command line, recognize an
	input type indicator, then use the nonterminal for that type.
	(defsym_expr): New nonterminal from code formerly in command_line.
	* ldlex.h: Declare parser input type enum and variable.
	Don't declare parse_line.
	* ldlex.l: Remove unused variables.  Make some used ones static
	and comment them.
	(COMMAND): Start state and its rules removed.
	At start of yylex, return input state token if at start of input.
	(lex_redirect): Don't need to set yyout.
	(ldlex_command): Function removed.
	* ldmain.c (main): Instead of calling parse_line, set up the
	redirections and call yyparse directly.
	* ldmisc.c (vfinfo): If there's no input filename, print nothing, not
	"command line".
	* lexsup.c: Remove #if 0'd code.
	(parse_line): Function removed.
	(parse_args): Rewrite to use getopt_long_only.
	(set_default_dirlist): New function from code formerly in
	ldgram.y:command_line.
	(set_section_start): New function.
	* emultempl/generic.em, emultempl/gld960.em, emultempl/hppaelf.em,
	emultempl/lnk960.em, emultempl/m88kbcs.em: Don't enclose
	compiled-in link scripts in "{" and "}", as the grammar no longer
	wants them to be.
1994-02-25 03:26:25 +00:00