Commit Graph

84 Commits

Author SHA1 Message Date
Nick Clifton 6e45556a36 Add tests of return values from bfd function calls 2000-10-16 19:08:45 +00:00
Nick Clifton 102c86f873 Oops - fix mistake in previous delta where unused variable 'nsyms' was
deleted, but along with its (necessary) call to bfd_canonicalize_symtab.
2000-10-13 20:41:08 +00:00
Nick Clifton b9a6918857 Add #ifdef DLL_SUPPORT around use of pe_dll_search_prefix. 2000-10-13 20:16:03 +00:00
DJ Delorie 627427debc * emultempl/pe.em (pe_dll_search_prefix): New variable,
(longopts): New --dll-search-prefix option.
(gld_${EMULATION_NAME}_list_options): Document.
(gld_${EMULATION_NAME}_parse_args): Handle.
(gld_${EMULATION_NAME}_open_dynamic_archive): When linking
dynamically, search for a dll named '<prefix><basename>.dll'
in preference to 'lib<basename>.dll' if --dll-search-prefix
is specified.
2000-10-12 19:18:20 +00:00
DJ Delorie 486e80e2d5 * emultempl/pe.em (gld_*_after_open): detect case where there two
import libraries for same dll; rename one to ensure proper link
order.

* pe-dll.c (process_def_file): compare ordinals to -1, not 0; fix
typo
(generate_edata): fix typo
2000-10-02 14:39:46 +00:00
DJ Delorie 1bd591624c oops, didn't mean to check in that change yet 2000-09-28 20:58:57 +00:00
DJ Delorie 45b1f63c8c * pe-dll.c (process_def_file): Uninitialized data wasn't
exported with --export-all-symbols switch.

* pe-dll.c (fill_edata): rearrange the data so that ordinals and
noname work properly.
2000-09-28 20:53:40 +00:00
Alan Modra 47d89dba5e .plt stub for lazy linking, --stub-group-size=N ld switch,
import stub fix, extra DIR14F reloc to fix abort in tc_gen_reloc
2000-09-27 17:30:19 +00:00
Nick Clifton 36bdbeeca5 Conditionalise the embedded relocs feature on the m68*-*-elf target 2000-09-22 00:41:50 +00:00
Alan Modra b3ea35849f Handle out of memory situations. 2000-09-20 04:20:26 +00:00
Alan Modra 25f7275229 Group stub sections. 2000-09-18 12:22:43 +00:00
Nick Clifton 0752970ef8 add support for embedded relocs in m68k ELF port 2000-09-15 18:52:52 +00:00
Alan Modra ed15ac6a0a Fix an orphan section problem caused by weird linker scripts. 2000-09-07 09:09:19 +00:00
Alan Modra 71bfc0aef6 Fix list handling for orphan section output statements. 2000-09-07 07:08:58 +00:00
Alan Modra f998903041 Fix place_orphan crash. 2000-09-06 15:28:25 +00:00
Nick Clifton 5b343f5ae8 Regenerate files using fixed aclocal install. 2000-09-06 00:13:34 +00:00
Alan Modra 3231d22e8f Shared lib support for elf32-hppa 2000-09-05 04:07:46 +00:00
Alan Modra a854a4a7c8 --split-by-reloc, --split-by-file extensions. --unique option. 2000-09-05 03:05:19 +00:00
H.J. Lu dcb0bd0eef 2000-08-24 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
	check -rpath nor LD_RUN_PATH for cross link.
	* ld.texinfo: Document the change.
2000-08-25 20:24:11 +00:00
H.J. Lu 6dd8c765d3 2000-08-23 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Get
	the current runpath list from bfd_elf_get_runpath_list ()
	before search.
2000-08-23 23:03:00 +00:00
H.J. Lu ec4eb78a39 2000-08-22 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search
	the DT_RPATH/DT_RUNPATH entries for DT_NEEDED after
	LD_LIBRARY_PATH for native linker. Display the needed DSO if
	trace_file_tries is non-zero.
	(gld${EMULATION_NAME}_try_needed): Report the needed DSO found
	if trace_file_tries is non-zero.

	* ld.texinfo: Document the usage of DT_RPATH/DT_RUNPATH.
	* News: Mention it.
2000-08-22 19:34:37 +00:00
Nick Clifton e374f1d977 Refer to -rpath not --rpath in error message 2000-08-09 00:51:42 +00:00
Alan Modra 4b209b2234 Keep track of last optind value, and rename a couple of functions
for consistency.
2000-08-04 04:41:33 +00:00
Alan Modra 41392f033d Add some shell variables and shell code to elf32.em
to allow elf32.em to be used by ports that require
some minor variations or a few extra functions.
Implement for hppaelf and armelf.
Fix header file include order in m68kcoff.em
2000-07-28 01:33:14 +00:00
Alan Modra 04925e1e0b Move functions around in preparation for next patch 2000-07-28 01:07:09 +00:00
Nick Clifton 20bccb3485 Applied Michael's Sokolov's patch to implement --embedded-relocs for m68k coff. 2000-07-21 23:31:53 +00:00
H.J. Lu 699845ef7b 2000-07-20 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (longopts): Duplicate "disable-new-dtags"
	and "disable-new-dtags" to stop getopt from treating -d/-e as
	abbreviations for these options.
2000-07-20 21:59:40 +00:00
H.J. Lu 6c1439be21 2000-07-20 H.J. Lu <hjl@gnu.org>
* ld.texinfo: Add documentation for --disable-new-dtags and
	--enable-new-dtags.

	* ldmain.c (main): Initialize link_info.new_dtags to false.

	* emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Add
	--disable-new-dtags and --enable-new-dtags.
	(gld_${EMULATION_NAME}_list_options): Likewise.
2000-07-20 21:18:23 +00:00
H.J. Lu 19e3be22a4 2000-07-20 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (gld_${EMULATION_NAME}_list_options):
	Print out ignored -z options.
2000-07-20 16:13:26 +00:00
H.J. Lu e0ee487bb5 2000-07-19 H.J. Lu <hjl@gnu.org>
* emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Removed.
	(PARSE_AND_LIST_PROLOGUE): New.
	(PARSE_AND_LIST_LONGOPTS): Likewise.
	(PARSE_AND_LIST_OPTIONS): Likewise.
	(PARSE_AND_LIST_ARGS_CASES): Likewise.

	* ldmain.c (main): Clear link_info.flags and link_info.flags_1.

	* lexsup.c (ld_options): Comment out 'z'.
	(parse_args): Likewise.

	* emultempl/elf32.em: Include "elf/common.h".
	(gld_${EMULATION_NAME}_parse_args): Defined. Handle some -z
	options.
	(gld_${EMULATION_NAME}_list_options): Likewise.

	* ld.texinfo: Add documentation for the recognized -z options.
2000-07-20 03:25:10 +00:00
H.J. Lu 49e56c493d 2000-07-19 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call
	bfd_elf_set_dt_needed_soname ().
2000-07-20 03:17:32 +00:00
DJ Delorie 0ad8cf4c25 * src/ld/emultempl/pe.em (gld_*_open_dynamic_archive): New search
order for dynamic library '-lfoo' on pei386: libfoo.dll.a,
foo.dll.a, libfoo.a, libfoo.dll, foo.dll. This fixes compatibility
errors introduced by the old dynamic lib search order.
2000-07-17 18:59:58 +00:00
Alan Modra b71e277823 Remove some forward declarations in ldemul.h and ldfile.h, and
re-arrange header include order.
Fix shadowing warnings in ldlang.h
Fix compile errors in mpw-elfmips.c
2000-07-11 03:42:41 +00:00
H.J. Lu 2ef53d6665 2000-07-10 H.J. Lu <hjl@gnu.org>
* emultempl/pe.em (pe_enable_stdcall_fixup): Protect with
	DLL_SUPPORT.
	(strhash): Likewise.
	(compute_dll_image_base): Likewise.
	(pe_undef_found_sym): Likewise.
	(pe_undef_cdecl_match): Likewise.
	(gld_${EMULATION_NAME}_open_dynamic_archive): Mark the
	argument "arch" with ATTRIBUTE_UNUSED.
2000-07-10 17:20:35 +00:00
Alan Modra 4900fc0695 hppaelf.em: Merge from elf32.em and implement multiple linker stubs.
Makefile.am: Re-enable ehppaelf.o, add ehppalinux.o
configure.tgt: targ_emul=hppalinux for hppa*linux
2000-07-09 08:45:29 +00:00
DJ Delorie 602e90d3d5 * ld/emultempl/pe.em: institute the following search order for
dynamic libraries on pei386: libfoo.dll.a, foo.dll.a (import
libs), libfoo.dll, foo.dll (link direct to dll).  Fall back to
static lib (libfoo.a) if none of the above are found.
2000-07-07 20:09:28 +00:00
DJ Delorie 5f577f7d70 * ld/emultempl/pe.em (pe_enable_auto_image_base): New variable.
(longopts): New --{enable,disable}-auto-image-base options.
(gld_${EMULATION_NAME}_list_options): Document.
(gld_${EMULATION_NAME}_parse): Handle.
(strhash): New static function.
(compute_dll_image_base): New static function.
(gld_${EMULATION_NAME}_set_symbols): Use.
2000-07-07 20:01:35 +00:00
Timothy Wall 74459f0e3e tic54x/ibmc54xdsp target for ld. 2000-06-20 13:29:07 +00:00
Nick Clifton 60bcf0fa8c Applied Stephane Carrez <Stephane.Carrez@worldnet.fr> patches to add support
for m68hc11 and m68hc12 processors.
2000-06-19 01:22:44 +00:00
David O'Brien 57a6fd078e * emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all
input objects to be ECOFF.
(check_sections): einfo takes %B, not %P, to print a BFD name.

Approved by:	Nick Clifton <nickc@cygnus.com>
		Message-Id: <200006081748.KAA12555@elmo.cygnus.com>
2000-06-08 18:39:43 +00:00
Nick Clifton 690a460e0c Apply patch from Charles Wilson to make PE ports search for dynamic libraries
in foo.dll and libfoo.dll before libfoo.a.
2000-05-16 20:53:26 +00:00
Alan Modra aea4bd9d34 place_orphan optimisations 2000-04-25 05:14:16 +00:00
H.J. Lu 20d04697a8 2000-04-18 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
	lang_leave_output_section_statement () after calling
	lang_enter_output_section_statement ().
	* emultempl/armelf.em: Likewise.
2000-04-18 23:39:03 +00:00
Alan Modra 5ba474214c Yet another set of fixes for orphan sections. 2000-04-18 05:53:41 +00:00
Alan Modra 01cc8ff856 Zero start address of orphan ~(SEC_LOAD | SEC_ALLOC) sections. 2000-04-14 01:58:29 +00:00
Alan Modra 6a345e871d Keep output orphan sections in the same order as input. 2000-04-12 02:43:37 +00:00
Nick Clifton f0c87f889d Fix building with --enable-targets=all. 2000-03-01 20:54:37 +00:00
Alan Modra 40d109bfbc GCC warning fix: Add missing NULL initialiser for find_potential_libraries. 2000-02-29 05:53:53 +00:00
Nick Clifton 344a211f99 Add support for WinCE based toolchains. 2000-02-24 17:53:12 +00:00
Timothy Wall 562d3460fb Add LMA memory region functionality. 2000-02-16 18:53:32 +00:00