Commit Graph

832 Commits

Author SHA1 Message Date
Ian Lance Taylor
b019d460d1 * scripttempl/elf.sc: Copy several more relocation sections into
the output.  Put .got.plt sections into .got.
1994-07-26 15:04:40 +00:00
Ian Lance Taylor
31ddb15694 * scripttempl/elf.sc: Use PROVIDE to define etext, edata, and end.
Add a new script operator, PROVIDE, to define a symbol only if it
	is needed.
	* ldgram.y (PROVIDE): New token.
	(assignment): Accept PROVIDE.
	* ldlex.l (PROVIDE): New token.
	* ldexp.h (node_type): Add etree_provide to node_class enum.
	(exp_provide): Declare.
	* ldexp.c (exp_fold_tree): Handle etree_provide.
	(exp_provide): New function.
	(exp_print_tree): Handle etree_provide.
	* ld.texinfo: Document PROVIDE.
1994-07-22 20:55:45 +00:00
Ian Lance Taylor
36c6e8c37f * ldlang.c (lang_common): Pass desired alignment to
lang_one_common as power of two.
	(lang_one_common): Get common symbol alignment from linker hash
	table entry.  Treat desired alignment as a power of two.
1994-07-22 18:46:28 +00:00
Ian Lance Taylor
309c8153fa * ldlang.c (wild_section): Attach all section with the given name,
not just the first one.  If there is no name, attach all sections
	even if the SEC_IS_COMMON flag is set.
1994-07-22 16:23:35 +00:00
Ian Lance Taylor
a1ad915dc4 * ld.h (args_type): Add field rpath.
* lexsup.c (S_ISDIR): Define if not already defined.
	(parse_args): Add support for -rpath.  If -R is used to name a
	directory, treat it as -rpath for Solaris compatibility.
	* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
	Pass command_line.rpath to bfd_elf32_size_dynamic_sections.
	* ldmain.c (main): Initialize command_line.rpath to NULL.
	* ld.texinfo: Document -rpath option.
1994-07-20 19:55:36 +00:00
Ken Raeburn
cdf7137776 ns32k port from Ian Dall 1994-07-14 19:20:53 +00:00
Ian Lance Taylor
db770dfa72 * lexsup.c (parse_args): Changed "retain-symbols-file" from
no_argument to required_argument.  From djm.
1994-07-08 15:06:29 +00:00
Jeff Law
aee611f53c * scripttempl/hppaelf.sc (__stack_zero): Don't define this name,
it was for the HPUX dynamic loader's use and it creates problems
	with ELF GDB.
1994-07-05 01:38:32 +00:00
Stan Shebs
10f1b5978b Elim dup of file names 1994-06-30 23:19:26 +00:00
Stan Shebs
8b50a709e9 Fix typo 1994-06-30 00:08:11 +00:00
Jean Marie Diaz
0373062441 * config/solaris2.mh (NATIVE_LIB_DIRS): Define as /usr/ccs/lib. 1994-06-29 21:18:47 +00:00
Jean Marie Diaz
111b24d572 * lexsup.c (parse_args): Accept -Bstatic and -Bdynamic. Do not
accept plain -B.
	* ld.texinfo: -Bstatic is not ignored.
1994-06-29 20:59:53 +00:00
Stan Shebs
22691fe7be * mpw-config.in (emulname): Set based on target.
(ldemul-list.h): Construct.
	* mpw-make.in (install-only): New target.
	(install): Depend on install-only.
1994-06-28 20:20:35 +00:00
Stan Shebs
83896c8b2b * mpw-xconfig.in: Remove ldemul-list.h construction, now in
generic config.
1994-06-28 20:16:32 +00:00
Stan Shebs
1c883f34fc * ldlex.l: Recognize \r the same as \n. 1994-06-28 19:16:24 +00:00
David MacKenzie
1f8b3b5746 Change --with-targets to --enable-targets, per GNU coding standards. 1994-06-23 20:08:57 +00:00
Ian Lance Taylor
cf4245afad * lexsup.c (parse_args): Add support for new options -( -) with
synonyms --start-group --end-group.
	* ldlang.h (enum statement_enum): Add lang_group_statement_enum.
	(lang_group_statement_type): Define new struct.
	(lang_statement_union_type): Add group_statement field.
	(lang_enter_group, lang_leave_group): Declare.
	* ldlang.c (lang_for_each_statement_worker): Handle
	lang_group_statement_enum.
	(map_input_to_output_sections, print_statement): Likewise.
	(lang_size_sections, lang_do_assignments): Likewise.
	(open_input_bfds): Completely rewrite.  Now does its own looping,
	rather than using lang_for_each_statement.  Handle groups.
	(lang_process): Update call to open_input_bfds.
	(print_group): New static function.
	(lang_enter_group, lang_leave_group): New static functions.
	* ldfile.c (ldfile_open_file): If the file has already been
	opened, just return rather than taking an assertion failure.
	* ldver.c (help): Mention new options.
	* ld.texinfo: Document new options.
1994-06-23 00:36:00 +00:00
Ian Lance Taylor
02b5798089 * ldlang.c (end_of_data_section_statement_list): Don't define.
(lang_leave_output_section_statement): Don't set obsolete variable
	end_of_data_section_statement_list.
1994-06-22 23:07:14 +00:00
Ian Lance Taylor
62a4b36c6b * scripttempl/go32coff.sc: Don't put ${DATA_ALIGNMENT} inside an
ALIGN.
1994-06-22 20:11:07 +00:00
Ian Lance Taylor
686739e2c6 * ldlang.c (lang_size_sections): Adjust current region address
even for sections with an explicit address.  From
	ralphc@pyramid.com (Ralph Campbell).
1994-06-22 20:04:29 +00:00
Ian Lance Taylor
7d56d4f1c6 * emulparams/i386linux.sh (NONPAGED_TEXT_START_ADDR): Set to 0.
From jrs@world.std.com (Rick Sladkey).
1994-06-22 18:07:32 +00:00
Ian Lance Taylor
3b7553e793 * scripttempl/mipsbsd.sc: Let sections align to their natural
boundaries.
1994-06-22 17:47:11 +00:00
Jeff Law
c4aa82c196 * scripttempl/hppaelf.sc: Place .data and .bss at 0x40000000
when generating relocatable objects.
1994-06-17 04:50:29 +00:00
Ken Raeburn
8e3b100c24 deleted code for keep-v9 that does nothing useful 1994-06-17 00:52:10 +00:00
Ian Lance Taylor
64887de2ee * lexsup.c (parse_args): Add -shared to longopts, and handle it.
* ldmain.c (main): Initialize link_info.shared to false.  Give
	error if link_info.relocateable and link_info.shared are both set.
1994-06-16 19:32:07 +00:00
Ian Lance Taylor
5d1ffb2fe3 * configure.in: If EMUL_EXTRA* is defined in a config file, treat
it as naming an emulation to be added to EMULATION_OFILES.
	* config/i386-linux.mt (EMUL_EXTRA1): Define as elf_i386.
1994-06-16 19:11:03 +00:00
Ian Lance Taylor
bf82ab6830 * Makefile.in: Rebuilt dependencies.
(ALL_EMULATIONS): Add ei386linux.o, eelf32_sparc.o,
	eelf64_sparc.o.  Remove $(OTHER_EMULATIONS).
	(ei386linux.c, eelf32_sparc.c, eelf64_sparc.c): New targets.
	* config/i386-linux.mt (OTHER_EMULATIONS): Don't define.
	(ei386linux.c): Remove; now in Makefile.in.
	* config/i386-lynx.mt (OTHER_EMULATIONS): Don't define.
	* config/m68k-lynx.mt (OTHER_EMULATIONS): Don't define.
	* config/sparc-lynx.mt (OTHER_EMULATIONS): Don't define.
	* config/sparc64-elf.mt (OTHER_EMULATIONS): Don't define.
	(eelf64_sparc.c): Remove; now in Makefile.in.
	* config/sun4sol2.mt (OTHER_EMULATIONS): Don't define.
	(eelf32_sparc.c): Remove; now in Makefile.in.
1994-06-16 19:01:48 +00:00
Ian Lance Taylor
08f20f66c4 Thu Jun 16 14:25:22 1994 Eric Youngdale (ericy@cais.cais.com)
* emultempl/linux.em: New file providing support for linking
	against Linux shared libraries.
	* config/i386-linux.mt (ei386linux.c): Depend upon linux.em.
	* emulparams/i386linux.sh (TEMPLATE_NAME): Define as linux.
1994-06-16 18:36:40 +00:00
Ian Lance Taylor
641fe79b46 * ldexp.c (exp_print_tree): Don't crash if etree_rel section has
no owner--it might be bfd_abs_section.  From Eric Youngdale
	<ericy@cais.cais.com>.
1994-06-16 16:32:03 +00:00
Ian Lance Taylor
952b6c2c8d * scripttempl/aout.sc: Let sections align to their natural
boundaries.
1994-06-16 16:23:19 +00:00
Ian Lance Taylor
33b90e5265 * ldemul.h (ldemul_open_dynamic_archive): Declare.
(ld_emulation_xfer_type): Add new field open_dynamic_archive.
	* ldemul.c: Include ldexp.h and ldlang.h.
	(ldemul_open_dynamic_archive): New function.
	* ldfile.h (ldfile_open_file_search): Declare.
	* ldfile.c: Include ldemul.h.
	(try_open_bfd): Rename from cache_bfd_openr.  Return boolean
	argument, not bfd *.  Change all callers.
	(ldfile_open_file_search): Rename from open_a.  Return boolean
	argument, not bfd *.  Clean up.  Change all callers.
	(ldfile_open_file): If doing a dynamic link, call
	ldemul_open_dynamic_archive rather than assuming the extension of
	a dynamic object is ".so".
	* emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
	New function.
	(ld_${EMULATION_NAME}_emulation): Initialize open_dynamic_archive
	field.
	* emultempl/sunos.em (ld_${EMULATION_NAME}_emulation): Likewise.
1994-06-15 23:49:01 +00:00
Ian Lance Taylor
ece5b08d17 Comment fix. 1994-06-15 21:23:28 +00:00
Ian Lance Taylor
4279241152 * lexsup.c (parse_args): Accept -static as a synonym for
-non_shared.
1994-06-15 21:22:43 +00:00
Ian Lance Taylor
cbbf960822 * ldmain.c (get_emulation): Ignore -m486 for Linux compatibility.
* lexsup.c (parse_args): Ignore -qmagic for Linux compatibility.
1994-06-15 21:04:21 +00:00
Ian Lance Taylor
7fb9ca5fc2 Let the user change the dynamic linker used by ELF code.
* ld.h (args_type): Add new field interpreter.
	* lexsup.c (parse_args): Add dynamic-linker to longopts, and
	handle it.
	* ldmain.c (main): Initialize command_line.interpreter to NULL.
	* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Get
	the ELF backend to return the .interp section.  If
	command_line.interpreter is not NULL, set the contents of .interp
	to it.
	* ld.texinfo: Mention -dynamic-linker.
1994-06-15 20:46:43 +00:00
Ian Lance Taylor
57569ce8d1 * config/sun4sol2.mt (eelf32_sparc.c): Depend upon elf32.em, not
generic.em.
1994-06-15 20:44:54 +00:00
Ian Lance Taylor
bec7a138ab * lexsup.c (parse_args): Sort out the option macros and change the
definitions to make it easier to add a new option.
1994-06-15 17:55:46 +00:00
Ian Lance Taylor
66da6c8470 * scripttempl/aout.sc: Define __etext and __edata to go along with
_etext and _edata.
1994-06-15 16:17:48 +00:00
Ian Lance Taylor
605da7e26f * ldver.c (help): Mention -traditional-format. 1994-06-15 16:01:17 +00:00
Ian Lance Taylor
c96386c4d8 * ld.h (ld_config_type): Add new field traditional_format.
* lexsup.c (parse_args): Add traditional_format to longopts, and
	handle it.
	* ldmain.c (main): Initialize config.traditional_format to false.
	* ldlang.c (ldlang_open_output): Set BFD_TRADITIONAL_FORMAT in BFD
	flags of output_bfd according to config.traditional_format.
	* ld.texinfo: Document -traditional-format.
1994-06-15 06:01:45 +00:00
Ian Lance Taylor
7fe331f17b * ldctor.c (ldctor_add_entry): Add entries to a set in the order
they are encountered.
1994-06-15 03:12:42 +00:00
Ian Lance Taylor
39a00f7d5a Tue Jun 14 18:05:09 1994 Eric Youngdale (ericy@cais.cais.com)
* emulparams/i386linux.sh (TEXT_START_ADDR): Define as 0x1000.
	(NONPAGED_TEXT_START_ADDR): Define as 0x20.
1994-06-14 22:07:40 +00:00
Ian Lance Taylor
236772170b * scripttempl/alpha.sc: Define _ftext, _etext and _fdata insted of
_FTEXT, _ETEXT and _FDATA.  Dont define _END.
1994-06-13 22:34:46 +00:00
Ian Lance Taylor
e845d28994 * ldfile.c (open_a): If this is not an archive, try to open it in
the current directory before searching for it.
1994-06-13 21:35:27 +00:00
Ian Lance Taylor
3e1fd33d8a * lexsup.c (parse_args): Treat -i as a synonym for -r. 1994-06-13 21:00:20 +00:00
Ian Lance Taylor
f24078fd07 * ldgram.y (exp): Treat BLOCK as a synonym for ALIGN, so that
BLOCK works in a section address as documented.
1994-06-13 20:25:28 +00:00
Ian Lance Taylor
eb7edfa156 * ldgram.y (YYDEBUG): Don't define. 1994-06-13 19:47:50 +00:00
Stan Shebs
9d5baff61b Conditionalize on mips-idt-ecoff. 1994-06-12 23:59:15 +00:00
Ian Lance Taylor
6beb80b22f Don't sanitize out SPARC v9 stuff. 1994-06-10 21:22:31 +00:00
Ian Lance Taylor
5cad5873e0 Restore sparc64 targets clobbered in 1994/04/07 checkin. 1994-06-10 21:19:49 +00:00