Commit graph

11 commits

Author SHA1 Message Date
DJ Delorie
c59356d3b4 * pe-dll.c (make_head): name object files sequentially to ensure
they link in the right order.
	(make_tail): same here
	(pe_process_import_defs): use sequential names for bfds to ensure
	proper link order.
	(pe_implied_import_dll): new function; handles linking directly
	against DLLs by simulating IMPORTS directives.  * emultempl/pe.em
	(gld_i386pe_before_parse): hack bfd to not recognize .dll files
	via bfd_pe_dll_not_recognized_hack
1998-11-24 04:33:33 +00:00
DJ Delorie
3feaa5aff8 * emultempl/pe.em (gld_i386pe_after_open): call
pe_process_import_defs
	* pe-dll.c (pe_dll_generate_def_file): calculate BASE from
	pe_data, only print if actually set.  Print version only if
	set.
	(save_relocs): save relocs for both input and output.
	(make_one): support internal/external different names.
	(pe_dll_generate_implib): support new make_one
	(pe_process_import_defs): new function; handles IMPORT
	directives in .def files.
1998-11-23 19:47:31 +00:00
DJ Delorie
f5eb8577bd typo 1998-11-17 03:32:36 +00:00
DJ Delorie
d3ca9a538c * emultempl/pe.em (gld_i386_finish): generate import library
* deffile.h: add hint member.
* pe-dll.c (pe_dll_generate_implib): New function with helpers;
generates the import library directly from the export table.
(fill_edata): remember the actual hint for the import library.
1998-11-17 03:18:06 +00:00
DJ Delorie
b138a74d47 * pe-dll.c (generate_reloc): don't output PE relocs for sections
that won't be loaded.
1998-11-11 23:11:38 +00:00
DJ Delorie
a18b9a3df3 * pe-dll.c (fill_edata): don't strip underscores 1998-11-11 18:50:40 +00:00
DJ Delorie
e2586bc8de * pe-dll.c (process_def_file): properly note undefined exported
symbols, clean up old code.
	(pe_dll_generate_def_file): don't crash if pe_def_file is NULL
	* emultempl/pe.em (gld_i386_parse_args): add
 	(en/dis)able-stdcall-fixups
	(pe_fixup_stdcalls): warn about stdcall fixups
	(gld_i386_unrecognized_file): make exported symbols undefs so that
 	archive members get pulled in
1998-11-10 22:57:13 +00:00
DJ Delorie
a3606134a2 * deffilep.y: properly handle relocs with multiple def_files,
cache import module names
1998-11-10 03:54:00 +00:00
DJ Delorie
91c7ad9a6a * pe-dll.c (process_def_file): don't assume exports won't move
during a realloc
1998-11-10 03:45:43 +00:00
DJ Delorie
69c4fd86f9 * pe-dll.c (process_def_file): auto-export everything if
nothing is otherwise exported.
1998-11-09 23:06:47 +00:00
DJ Delorie
eb8061bf35 * pe-dll.c: New file; direct support for PE DLLs
* deffile.h: New file; direct support for PE DLLs
	* deffilep.y: New file; direct support for PE DLLs
	* emultempl/pe.em: add direct support for PE DLLs
	* configure.tgt: allow target-specific extra files
	* configure.in: allow target-specific extra files
	* ldlang.c (lang_add_assignment): return the assignment so that
 	one can change the value later based on the object files (pe-dll
 	DEF files do this)
	* ldint.texinfo: add section for emulation walkthrough
1998-11-09 21:51:51 +00:00