Commit Graph

19 Commits

Author SHA1 Message Date
Kai Tietz ce11ba6c9d 2009-01-08 Kai Tietz <kai.tietz@onevision.com>
* pe.em (OPTION_USE_NUL_PREFIXED_IMPORT_TABLES): New.
	(gld..._add_options): Add new option
	--use-nul-prefixed-import-tables.
	(gld..._handle_option): Likewise.
	* pep.em: Same as for pe.em.
	* ld.texinfo: Add new option documentation for
	--use-nul-prefixed-import-tables.
	* pe-dll.c (pe_use_nul_prefixed_import_tables): New.
	(make_head): Make prefix leading zero prefix element for
	idata$4 and idata$5 dependent to new flag.
	(make_import_fixup_entry): Remove idata4/5 prefix.
	* pe-dll.h (pe_use_nul_prefixed_import_tables): New.
	* pep-dll.c (pe_use_nul_prefixed_import_tables): New.
	* pep-dll.h (pep_use_nul_prefixed_import_tables): New.
	* NEWS: Add new option.
2009-01-08 13:28:48 +00:00
Dave Korn e1c37eb57e * NEWS: Mention new feature --exclude-modules-for-implib.
* ld.texinfo:  Document new --exclude-modules-for-implib option.
	* pe-dll.c (exclude_list_struct):  Change type member from int to
	new enumeration exclude_type.
	(pe_dll_add_excludes):  Accept exclude_type instead of int param.
	(auto_export):  Replace magic constants by exclude_type values and
	handle new choice EXCLUDEFORIMPLIB.
	(pe_dll_generate_implib):  Accept a pointer to the link_info and
	iterate all input BFDs looking for EXCLUDEFORIMPLIB modules; re-open
	fresh BFDs for any found and link into import lib archive chain.
	* pe-dll.h (exclude_type):  Add new enumerated type to replace magic
	constants previously used for exclude_list_struct type member.
	(pe_dll_add_excludes, pe_dll_generate_implib):  Update prototypes.
	* pep-dll.h (exclude_type, pe_dll_add_excludes,
	pe_dll_generate_implib):  Likewise to all the above.
	* emultempl/pe.em (OPTION_EXCLUDE_MODULES_FOR_IMPLIB):  Define new
	getopts long option code for new --exclude-modules-for-implib option.
	(gld${EMULATION_NAME}_add_options):  Add new entry to xtra_long[].
	(gld_${EMULATION_NAME}_list_options):  List usage for it.
	(gld${EMULATION_NAME}_handle_option):  Use exclude_type enumerated
	values when calling pe_dll_add_excludes, and handle EXCLUDEFORIMPLIB.
	(gld_${EMULATION_NAME}_finish):  Pass pointer to link_info when
	calling pe_dll_generate_implib.
	* emultempl/pep.em (options):  Define new enumerated value for getopts
	long option code for new --exclude-modules-for-implib option.
	(gld${EMULATION_NAME}_add_options, gld_${EMULATION_NAME}_list_options,
	gld${EMULATION_NAME}_handle_option, gld_${EMULATION_NAME}_finish):
	Again, likewise to all the above.
2009-01-03 18:04:16 +00:00
Kai Tietz 6cb442d374 2008-11-14 Kai Tietz <kai.tietz@onevision.com>
* emultempl/pep.em (..._before_parse): initialize
	pei386_runtime_pseudo_reloc by version 2.
	(OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1): New option.
	(OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2): New option.
	(make_import_fixup): Use relocation size to read addend.
	* emultempl/pe.em (..._before_parse): initialize
	pei386_runtime_pseudo_reloc by version 1.
	(OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1): New option.
	(OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2): New option.
	* pe-dll.c (pe-dll.h): Remove useless include.
	(make_runtime_pseudo_reloc): Change addend to use bfd_vma.
	Handle the two variants of pseudo-relocation.
	(pe_create_import_fixup): Change addend to type bfd_vma.
	Modify for the two pseudo_relocation variants.
	(runtime_pseudp_reloc_v2_init): New static variable.
	* pe-dll.h (pe_create_import_fixup): Change addend argument type
	to bfd_vma.
	* pep-dll.h (pep_create_import_fixup): Likewise.
	* NEWS: Add comment.
2008-11-14 15:13:05 +00:00
Nick Clifton f96b4a7b0f Update sources to GPLv3 2007-07-06 14:09:45 +00:00
Alan Modra 3db64b0092 bfd/
Many files: Include sysdep.h before bfd.h.
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
binutils/
	* bucumm.h: Split off host dependencies to..
	* sysdep.h: ..here.
	Many files: Include sysdep.h.  Remove duplicate headers and reorder.
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
ld/
	Many files: Include sysdep.h first.  Remove duplicate headers.
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
opcodes/
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
	* ns32k-dis.c: Include sysdep.h first.
2007-04-26 14:47:00 +00:00
Christopher Faylor ff2bdb9c0d * pe-dll.c (pe_bfd_is_dll): New function.
* pe-dll.h (pe_bfd_is_dll): Declare.
* emultempl/pe.em (gld_${EMULATION_NAME}_recognized_file): Recognize dlls using
pe_bfd_is_dll instead of using the filename extension.
2006-12-18 22:38:53 +00:00
Nick Clifton 75be928bd2 Update FSF addresses 2005-05-12 07:32:09 +00:00
Alan Modra aef6203bd6 update copyright dates 2005-03-03 11:52:12 +00:00
Alan Modra 1579bae1cd Convert to C90 2003-06-28 05:28:54 +00:00
Alan Modra b34976b65a s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. Simplify
comparisons of bfd_boolean vars with TRUE/FALSE.  Formatting.
2002-11-30 08:39:46 +00:00
Nick Clifton 2fa9fc65a5 Add --enable-auto-import extension. 2002-11-14 18:03:17 +00:00
Alan Modra 4da711b140 * ldexp.c: Replace CONST with const.
* ldfile.c: Likewise.
	* ldfile.h: Likewise.
	* ldlex.l: Likewise.
	* mri.c: Likewise.
	* pe-dll.h: Likewise.
2002-06-08 07:39:45 +00:00
Kazu Hirata 658957dba8 * ldemul.c: Fix formatting.
* ldfile.c: Likewise.
	* pe-dll.c: Likewise.
	* pe-dll.h: Likewise.
2002-05-25 20:39:25 +00:00
Christopher Faylor 70b0be7903 * pe-dll.c (autofilter_liblist): Add more system libs excluded by default.
(autofilter_objlist): Add crtbegin.o, crtend.o.
* emultempl/pe.em (OPTION_EXCLUDE_LIBS): Add new define.
(longopts): Add new option --exclude-libs.
(gld_${EMULATION_NAME}_list_options): Give quick help about it.
(gld_${EMULATION_NAME}_parse_args): Use it.
* pe-dll.h (pe_dll_add_excludes): Add second param to prototype.
* pe-dll.c (exclude_list_struct): Add field type to distinguish symbols from
whole archives.
(pe_dll_add_excludes): Set excludes->type.
(auto_export): Add new variable libname and set to archive basename if abfd.
Use it when filtering default and user-specified libarary excludes.  Let string
"ALL" mean all libs when filtering user-specified libs.
* ld.texinfo: Document --exclude-libs.
2002-05-22 18:03:09 +00:00
Charles Wilson 0d888aac30 2001-09-12 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
* emultempl/pe.em(make_import_fixup): change signature to
        take asection as well as arelec; we need this for proper
        error reporting.  Only call pe_create_import_fixup() if
        there is no attempt to add a constant addend to the reloc;
        otherwise, report error condition.
        * pe-dll.c(pe_walk_relocs_of_symbol): change signature,
        since final argument is a pointer to make_import_fixup().
        Change call to cb() to match make_import_fixup() signature.
        (make_import_fixup_mark): make buffer_len unsigned.
        * pe-dll.h: change signature of pe_walk_relocs_of_symbol.
2001-09-12  Charles Wilson  <cwilson@ece.gatech.edu>
        * ld.texinfo: add verbose documentation for auto-import
        direct-addressing workaround, to compliment the terse
        error message.
2001-09-12 15:58:10 +00:00
Charles Wilson b044cda1de 2001-08-02 Charles Wilson <cwilson@ece.gatech.edu>
* ldmain.c (main): initialize link_info.pei386_auto_import
        * pe-dll.c: new tables for auto-export filtering
        (auto_export): change API, pass abfd for contextual filtering.
        Loop thru tables of excluded symbols instead of comparing
        "by hand".
2001-08-02  Paul Sokolovsky  <paul.sokolovsky@technologist.com>
        * pe-dll.c: new variable pe_dll_enable_extra_debug. New
        static variable current_sec (static struct sec *). Add
        forward declaration for add_bfd_to_link.
        (process_def_file): Don't export undefined symbols. Do not
        export symbols starting with  "_imp__".  Call auto_export()
        with new API.
        (pe_walk_relocs_of_symbol): New function.
        (generate_reloc): add optional extra debugging
        (pe_dll_generate_def_file): eliminate extraneous initial blank
        line in output
        (make_one): enlarge symtab to make room for __nm__ symbols
        (DATA auto-import support).
        (make_singleton_name_thunk): New function.
        (make_import_fixup_mark): New function.
        (make_import_fixup_entry): New function.
        (pe_create_import_fixup): New function.
        (add_bfd_to_link): Specify that 'name' argument is a CONST
        char *.
        * pe-dll.h: declare new variable pe_dll_extra_pe_debug;
        declare new functions pe_walk_relocs_of_symbol and
        pe_create_import_fixup.
        * emultempl/pe.em: add new options --enable-auto-import,
        --disable-auto-import, and --enable-extra-pe-debug.
        (make_import_fixup): New function.
        (pe_find_data_imports): New function.
        (pr_sym): New function.
        (gld_${EMULATION_NAME}_after_open): Add optional extra pe
        debugging. Call pe_find_data_imports.  Mark .idata as DATA, not
        CODE.
2001-08-02  Charles Wilson  <cwilson@ece.gatech.edu>
        * ld.texinfo: add additional documentation for
        --export-all-symbols.  Document --out-implib,
        --enable-auto-image-base, --disable-auto-image-base,
        --dll-search-prefix, --enable-auto-import, and
        --disable-auto-import.
        * ldint.texinfo: Add detailed documentation on auto-import
        implementation.
2001-08-02 23:12:02 +00:00
Nick Clifton a2b64bede3 Fixtypos in ChangeLogs, fix copyright dates in files 2001-03-13 06:14:29 +00:00
Nick Clifton 870df5dcbc Applied Mumit Kha's patch to tweak dll production code. 2000-01-04 23:44:03 +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