Commit Graph

87 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
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
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
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
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
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
Nick Clifton 0752a4049e oops - change omitted from previous delta 2000-01-04 23:48:31 +00:00
Nick Clifton 870df5dcbc Applied Mumit Kha's patch to tweak dll production code. 2000-01-04 23:44:03 +00:00
DJ Delorie 6eec49fcec * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Defer
merging sections when not relocating.
1999-09-29 17:44:35 +00:00
DJ Delorie e4e24acbc8 1999-09-14 Donn Terry <donn@interix.com>
* emultempl/pe.em (gld_${EMULATION_NAME}_after_open): allow for
	terminating null.
1999-09-14 22:19:55 +00:00
Ian Lance Taylor 361d94e768 1999-09-13 Donn Terry <donn@interix.com>
* emultempl/pe.em: Remove the output file at the start, in case it
	is not writable.
1999-09-13 23:45:47 +00:00
Ian Lance Taylor 71add73133 * pe.em: Don't include "../bfd/libbfd.h".
(gld_${EMULATION_NAME}_after_open): Use xmalloc rather than
	bfd_alloc.
1999-09-12 16:59:56 +00:00
Ian Lance Taylor 1069dd8da7 * pe-dll.h: New file.
* pe-dll.c: Include "pe-dll.h".  Mark unused arguments as needed
	to avoid warnings.
	(edata_sz, reloc_sz): Change from int to size_t.
	(pe_details_type): Change type of imagebase_reloc from int to
	unsigned int.
	(pe_detail_list): Fully initialize last entry.
	(pe_dll_id_target): Change parameter to const.
	(pe_dll_generate_def_file): Likewise.
	(pe_dll_generate_implib): Likewise.
	(pe_implied_import_dll): Likewise.  Change dll_name to const.
	* emultempl/pe.em: Include "pe-dll.h".  Remove declarations now in
	pe-dll.h.
	(init): Fully initialize __dll__ entry.
	(gld_${EMULATION_NAME}_after_open): Remove unused variables
	sequence, elt, and i.
	* deffile.h: Add preprocessor guard.
	* deffilep.y (def_debug): Remove.
	* Makefile.am: Rebuild dependencies.
	(HFILES): Add pe-dll.h.
1999-09-12 15:27:48 +00:00
Ian Lance Taylor 2be9b2c7ee 1999-09-12 Donn Terry <donn@interix.com>
* emultempl/pe.em (PE_DEF_SECTION_ALIGNMENT): If
	OVERRIDE_SECTION_ALIGNMENT is defined, change to that.
	(gld_${EMULATION_NAME}_before_parse): Use EXECUTABLE_NAME if it is
	defined, rather than a.exe.
	(init): Define __subsystem__ as ${SUBSYSTEM}.
	(set_pe_subsystem): Add ${INITIAL_SYMBOL_CHAR} before entry symbol
	name.
1999-09-12 14:52:33 +00:00
Ian Lance Taylor 597e25914e * emultempl/ostring.sed: Rename from stringify.sed.
* emultempl/astring.sed: New file.
	* Makefile.am (stringify.sed): New target.
	(GEN_DEPENDS): Change $(srcdir)/emultempl/stringify.sed to
	stringify.sed.
	* configure.in: Define and substitute STRINGIFY.
	* emultempl/*.em: Use stringify.sed from build directory rather
	than source directory.
	* emultempl/elf32.em: Use stringify.sed rather than inline sed
	script.
	* emultempl/gld960.em, emultempl/gld960c.em: Likewise.
	* emultempl/hppaelf.em, emultempl/linux.em: Likewise.
	* emultempl/lnk960.em, emultempl/sunos.em: Likewise.
	* configure, Makefile.in: Rebuild.
1999-08-06 22:46:03 +00:00
Nick Clifton f11523b013 Abort if input format is ARM and output format is not 1999-07-05 07:51:39 +00:00
Nick Clifton 6f798e5c17 Add new command line switch --thumb-entry. 1999-06-21 03:30:32 +00:00
Ian Lance Taylor 2a275620b1 * emultempl/pe.em (gld_${EMULATION_NAME}_after_parse): Don't add
entry_symbol as an undefined symbol when doing a relocateable
	link.  From <jeffdb@goodnet.com>.
1999-06-12 14:00:03 +00:00
Nick Clifton 434d1125a3 Rename epoc-pe interworking function names to avoid a name space clash 1999-06-04 07:40:35 +00:00
Nick Clifton 46d23b7c90 Rename ARM interworking functions to avoid a name space collision 1999-06-02 14:26:01 +00:00
DJ Delorie c6c37250e9 1999-05-10 DJ Delorie <dj@cygnus.com>
* scripttempl/pe.sc: Specify the output arch, which Ian says is
	the Right Thing to do.
	* emultempl/pe.em: various changes to parameterize the
	target-specific information.
	(gld_i386pe_after_open): Detect and fix MS import libraries
	by renaming the member objects (which are all named the same).
	* pe-dll.c: various changes to parameterize the target-specific
	information.
	(generate_reloc): support relocs more generically to allow for
	expansion.
	(pe_exe_build_sections): new; used to add .relocs to .exes
	(pe_exe_fill_sections): ditto
1999-05-11 21:06:50 +00:00
Catherine Moore 626e01051a 1999-05-10 Catherine Moore <clm@cygnus.com>
* emulttempl/pe.em (gld_${EMULATION_NAME}_after_open):
	Check for TARGET_IS_arm_epoc_pe.
	(gld_${EMULATION_NAME}_before_allocation): Likewise.
1999-05-10 18:30:21 +00:00
Richard Henderson 252b5132c7 19990502 sourceware import 1999-05-03 07:29:11 +00:00