summaryrefslogtreecommitdiff
path: root/ld/pe-dll.h
Commit message (Collapse)AuthorAgeFilesLines
* Update year range in copyright notice of binutils filesAlan Modra2023-01-011-1/+1
| | | | | | The newer update-copyright.py fixes file encoding too, removing cr/lf on binutils/bfdtest2.c and ld/testsuite/ld-cygwin/exe-export.exp, and embedded cr in binutils/testsuite/binutils-all/ar.exp string match.
* Update year range in copyright notice of binutils filesAlan Modra2022-01-021-1/+1
| | | | | | | | | | The result of running etc/update-copyright.py --this-year, fixing all the files whose mode is changed by the script, plus a build with --enable-maintainer-mode --enable-cgen-maint=yes, then checking out */po/*.pot which we don't update frequently. The copy of cgen was with commit d1dd5fcc38ead reverted as that commit breaks building of bfp opcodes files.
* Use bool in ldAlan Modra2021-03-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sysdep.h (POISON_BFD_BOOLEAN): Define. * configure.ac (elf_list_options, elf_shlib_list_options=false), (elf_plt_unwind_list_options=false): Replace FALSE with false, and TRUE with true. * emulparams/call_nop.sh, * emulparams/cet.sh, * emulparams/dynamic_undefined_weak.sh, * emulparams/elf32b4300.sh, * emulparams/elf32lm32.sh, * emulparams/elf32lr5900.sh, * emulparams/elf32lr5900n32.sh, * emulparams/elf32visium.sh, * emulparams/elf_x86_64.sh, * emulparams/extern_protected_data.sh, * emulparams/plt_unwind.sh, * emulparams/reloc_overflow.sh, * emulparams/static.sh, * emulparams/x86-64-lam.sh, * emultempl/aarch64elf.em, * emultempl/aix.em, * emultempl/alphaelf.em, * emultempl/armcoff.em, * emultempl/armelf.em, * emultempl/avrelf.em, * emultempl/beos.em, * emultempl/bfin.em, * emultempl/cr16elf.em, * emultempl/crxelf.em, * emultempl/cskyelf.em, * emultempl/elf.em, * emultempl/genelf.em, * emultempl/hppaelf.em, * emultempl/linux.em, * emultempl/m68hc1xelf.em, * emultempl/metagelf.em, * emultempl/mipself.em, * emultempl/mmix-elfnmmo.em, * emultempl/mmixelf.em, * emultempl/mmo.em, * emultempl/msp430.em, * emultempl/nios2elf.em, * emultempl/pdp11.em, * emultempl/pe.em, * emultempl/pep.em, * emultempl/ppc32elf.em, * emultempl/ppc64elf.em, * emultempl/rxelf.em, * emultempl/rxlinux.em, * emultempl/scoreelf.em, * emultempl/solaris2.em, * emultempl/spuelf.em, * emultempl/ticoff.em, * emultempl/v850elf.em, * emultempl/vms.em, * emultempl/xtensaelf.em, * emultempl/z80.em, * ld.h, * ldbuildid.c, * ldbuildid.h, * ldcref.c, * ldctor.c, * ldctor.h, * ldelf.c, * ldelf.h, * ldelfgen.c, * ldelfgen.h, * ldemul.c, * ldemul.h, * ldexp.c, * ldexp.h, * ldfile.c, * ldfile.h, * ldgram.y, * ldlang.c, * ldlang.h, * ldmain.c, * ldmain.h, * ldmisc.c, * ldmisc.h, * ldwrite.c, * lexsup.c, * mri.c, * pe-dll.c, * pe-dll.h, * pep-dll.h, * plugin.c, * plugin.h, * testplug.c, * testplug2.c, * testplug3.c, * testplug4.c: Replace bfd_boolean with bool, FALSE with false, and TRUE with true. * configure: Regenerate.
* Update year range in copyright notice of binutils filesAlan Modra2021-01-011-1/+1
|
* For PE format files, the base relocation table is necessary if the image is ↵Hannes Domani2020-01-031-0/+1
| | | | | | | | | | | | | | loaded at a different image base than specified in the PE header. This patch provides a new option --enable-reloc-section to force the generation of this section. * emultempl/pe.em: Add new option --enable-reloc-section. * emultempl/pep.em: Likewise. * ld.texi: Document --enable-reloc-section. * pe-dll.c (pe_dll_build_sections): Use pe_dll_enable_reloc_section. (pe_dll_fill_sections): Simplify by calling pe_exe_fill_sections. * pe-dll.h: Add extern declaration of option flag. * pep-dll.c (pe_dll_enable_reloc_section): Add alias define for pep_dll_enable_reloc_section. * pep-dll.h: Add extern declaration of option flag.
* Update year range in copyright notice of binutils filesAlan Modra2020-01-011-1/+1
|
* Update year range in copyright notice of binutils filesAlan Modra2019-01-011-1/+1
|
* Speed up direct linking with DLLs on Windows (1/2).Eric Botcazou2018-04-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch deals with the auto-import feature. There are 2 versions of this feature: the original one, which was piggybacked on the OS loader with an optional help from the runtime (--enable-auto-import --enable-runtime-pseudo-reloc-v1) and is still the one mostly documented in the sources and manual; the enhanced one by Kai Tietz, which is entirely piggybacked on the runtime (--enable-auto-import --enable-runtime-pseudo-reloc-v2) and is the default for Mingw and Cygwin nowadays. The implementation is inefficient because of pe[p]_find_data_imports: for every undefined symbol, the function walks the entire set of relocations for all the input files and does a direct name comparison for each of them. This is easily fixable by using a hash-based map for v1 and a simple hash table for v2. This patch leaves v1 alone and only changes v2. It also factors out pe[p]_find_data_imports into a common function, removes old cruft left and right, and attempts to better separate the implementations of v1 and v2 in the code. ld/ * emultempl/pe.em (U_SIZE): Delete. (pe_data_import_dll): Likewise. (make_import_fixup): Return void, take 4th parameter and pass it down in call to pe_create_import_fixup. (pe_find_data_imports): Move to... (gld_${EMULATION_NAME}_after_open): Run the stdcall fixup pass after the auto-import pass and add a guard before running the latter. * emultempl/pep.em (U_SIZE): Delete. (pep_data_import_dll): Likewise. (make_import_fixup): Return void, take 4th parameter and pass it down in call to pe_create_import_fixup. (pep_find_data_imports): Move to... (gld_${EMULATION_NAME}_after_open): Run the stdcall fixup pass after the auto-import pass and add a guard before running the latter. * pe-dll.c (runtime_pseudp_reloc_v2_init): Change type to bfd_boolean. (pe_walk_relocs_of_symbol): Rename into... (pe_walk_relocs): ...this. Add 2 more parameters,4th parameter to the callback prototype and pass 4th parameter in calls to the callback. If the import hash table is present, invoke the callback on the reloc if the symbol name is in the table. (pe_find_data_imports): ...here. Take 2 parameters. Build an import hash table for the pseudo-relocation support version 2. When it is built, walk the relocations only once at the end; when it is not, do not build a fixup when the symbol isn't part of an import table. Issue the associated warning only after a first fixup is built. (tmp_seq2): Delete. (make_singleton_name_imp): Likewise. (make_import_fixup_mark): Return const char * and a stable string. (make_import_fixup_entry): Do not deal with the pseudo-relocation support version 2. (make_runtime_pseudo_reloc): Factor out code and fix formatting. (pe_create_import_fixup): Add 5th parameter. Clearly separate the pseudo-relocation support version 2 from the rest. Fix formatting. * pe-dll.h (pe_walk_relocs_of_symbol): Delete. (pe_find_data_imports): Declare. (pe_create_import_fixup): Add 5th parameter. * pep-dll.c (pe_data_import_dll): Delete. (pe_find_data_imports): Define. (pe_walk_relocs_of_symbol): Delete. * pep-dll.h (pep_walk_relocs_of_symbol): Delete. (pep_find_data_imports): Declare. (pep_create_import_fixup): Add 5th parameter. * ld.texinfo (--enable-auto-import): Adjust to new implementation.
* Update year range in copyright notice of binutils filesAlan Modra2018-01-031-1/+1
|
* PR 21274, ld segfaults linking PE DLLAlan Modra2017-04-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Don't use fixed size buffers for symbol names. PR 21274 PR 18466 * emultempl/pe.em (pe_find_data_imports): Don't use fixed size symbol buffer. Instead, xmalloc max size needed with space for prefix. Wrap overlong lines. Formatting. Pass symbol buffer copy of name to pe_walk_relocs_of_symbol. (make_inport_fixup): Add "name" param, pass to pe_create_import_fixup. * emultempl/pe.em (pep_find_data_imports): As for pe_find_data_imports. (make_import_fixup): Add "name" param, pass to pep_create_import_fixup. Use bfd_get_signed_* and remove unnecessary casts. Formatting. * pe-dll.c (pe_walk_relocs_of_symbol): Add "name" param. Pass to callback. (make_import_fixup_mark): Add "name" param. Make use of prefix space rather than xmalloc here. (pe_create_import_fixup): Likewise. * pe-dll.h (pe_walk_relocs_of_symbol): Update prototype. (pe_create_import_fixup): Likewise. * pep-dll.h (pep_walk_relocs_of_symbol): Likewise. (pep_create_import_fixup): Likewise.
* Update year range in copyright notice of all files.Alan Modra2017-01-021-1/+1
|
* Copyright update for binutilsAlan Modra2016-01-011-1/+1
|
* ChangeLog rotatation and copyright year updateAlan Modra2015-01-021-1/+1
|
* Update copyright yearsAlan Modra2014-03-051-2/+1
|
* 2010-04-05 Kai Tietz <kai.tietz@onevision.com>Kai Tietz2010-04-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * emultempl/pep.em (U): Macro modified. (U_SIZE): New helper macro. (GET_INIT_SYMBOL_NAME): Likewise. (enum options): Add OPTION_NO_LEADING_UNDERSCORE and OPTION_LEADING_UNDERSCORE enumerator-values. (gld${EMULATION_NAME}_add_options): Add --(no-)leading-underscore option. (definfo): Add new member is_c_symbol. (D): Add to macro underscore mode parameter. (init): Add definition for is_c_symbol. (gld_${EMULATION_NAME}_list_options): Display new options. (set_pep_name): Adjust underscoring dependent fixed symbol handling. (gld_${EMULATION_NAME}_set_symbols): Likewise. (saw_option): Likewise. (gld_${EMULATION_NAME}_unrecognized_file): Likewise. (set_entry_point): Initial initial_symbol_char dependent to target's default and new option flag pep_leading_underscore. * emultempl/pe.em (U): Macro modified. (U_SIZE): New helper macro. (GET_INIT_SYMBOL_NAME): Likewise. (OPTION_LEADING_UNDERSCORE): Add new option define. (OPTION_NO_LEADING_UNDERSCORE): Likewise. (gld${EMULATION_NAME}_add_options): Add --(no-)leading-underscore option. (definfo): Add new member is_c_symbol. (D): Add to macro underscore mode parameter. (init): Add definition for is_c_symbol. (gld_${EMULATION_NAME}_list_options): Display new options. (set_pep_name): Adjust underscoring dependent fixed symbol handling. (gld_${EMULATION_NAME}_set_symbols): Likewise. (saw_option): Likewise. (gld_${EMULATION_NAME}_unrecognized_file): Likewise. (set_entry_point): Initial initial_symbol_char dependent to target's default and new option flag pep_leading_underscore. * pe-dll.c (pe_leading_underscore): New flag variable. (pe_detail_list): Remove const to allow modify of member underscore. (pe_dll_id_target): Initialize pe_details' underscore variable dependent to target's default and flag pe_leading_underscore. * pe-dll.h (pe_leading_underscore): Add extern declaration of option flag. * pep-dll.c (pe_leading_underscore): Add alias define for pep_leading_underscore. * pep-dll.h (pep_leading_underscore) Add extern declaration of option flag. * ld.texinfo: Add documentation for --(no-)leading-underscore option.
* * emultempl/pe.em (OPTION_EXCLUDE_ALL_SYMBOLS): New macro.Nick Clifton2009-10-161-2/+2
| | | | | | | | | | | | | | | (gld${EMULATION_NAME}_add_options): Add new --exclude-all-symbols option to exclude all symbols from automatic export. (gld_${EMULATION_NAME}_list_options): Describe it. (gld${EMULATION_NAME}_handle_option): Handle it. * emultempl/pep.em: Likewise to all the above. * pe-dll.c (pe_dll_exclude_all_symbols): New variable. (process_def_file_and_drectve): Use it. * pe-dll.h (pe_dll_exclude_all_symbols): Declare. * pep-dll.c (pep_dll_exclude_all_symbols): Define pep_ alias. * pep-dll.h (pe_dll_exclude_all_symbols): Declare. * NEWS: Mention the new feature. * ld.texinfo: Document the new command line switch.
* update copyright datesAlan Modra2009-09-021-1/+1
|
* bfd/ChangeLogDave Korn2009-02-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which control long section name handling with ECOFF_NO_LONG_SECTION_NAMES. * coff-mips.c (mips_ecoff_backend_data): Likewise. * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which control long section name handling with XCOFF_NO_LONG_SECTION_NAMES. (bfd_pmac_xcoff_backend_data): Likewise. * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise. (bfd_xcoff_aix5_backend_data): Likewise. (xcoff64_write_object_contents): Delete unused long_section_names local variable. * coff-sh.c (bfd_coff_small_swap_table): Initialise long section name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire struct non-const. * coffcode.h (documentation): Update to describe long section names. (COFFLONGSECTIONCATHELPER): New helper macro. (BLANKOR1TOODD): Likewise. (COFF_ENABLE_LONG_SECTION_NAMES): Likewise. (COFF_LONG_SECTION_NAMES_SETTER): Likewise. (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise. (bfd_coff_set_long_section_names_allowed): New function. (bfd_coff_set_long_section_names_disallowed): Likewise. (struct bfd_coff_backend_data): Add new backend hook function pointer _bfd_coff_set_long_section_names. (bfd_coff_set_long_section_names): New backend hook. (coff_write_object_contents): Only generate long section names if bfd_coff_long_section_names() indicates they are currently enabled. (bfd_coff_std_swap_table): Make non-const, and initialise long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES. (ticoff0_swap_table): Likewise to both. (ticoff1_swap_table): Again, likewise to both. * coffgen.c (make_a_section_from_file): Allow long section names as inputs even if not currently allowed for outputs. * ecoff.c (_bfd_ecoff_no_long_sections): New function. * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank. * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise. * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise. * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise. * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise. * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise. * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise. * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise. * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise. * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise. * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise. * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise. * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise. * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise. * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise. * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise. * libcoff-in.h: Update copyright year to cause updated copyright year in generated libcoff.h, and fix typo. * libcoff.h: Regenerated. * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro. (_bfd_ecoff_no_long_sections): Add prototype. * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro. * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already defined by an including .c file. * ticoff.h (ticoff0_swap_table): Make non-const, and initialise long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES. (ticoff1_swap_table): Likewise to both. ld/ChangeLog * ld.texinfo: Update to mention long section name options. * NEWS: Mention new behaviour and command-line options. * pe-dll.c (pe_use_coff_long_section_names): New global variable. (pe_output_file_set_long_section_names): New function. (pe_dll_build_sections): Call it on output BFDs. (pe_exe_build_sections): Likewise. (pe_dll_fill_sections): Likewise. (pe_exe_fill_sections): Likewise. * pe-dll.h (pe_use_coff_long_section_names): Declare extern. (pe_output_file_set_long_section_names): Add prototype. * pep-dll.c (pe_use_coff_long_section_names): Define pep_ alias. (pe_output_file_set_long_section_names): Likewise. * pep-dll.h (pep_use_coff_long_section_names): Declare extern. (pep_output_file_set_long_section_names): Add prototype. * pe.em (OPTION_ENABLE_LONG_SECTION_NAMES): New getopt value macro. (OPTION_DISABLE_LONG_SECTION_NAMES): Likewise. (gld${EMULATION_NAME}_add_options): Add new options to xtra_long[]. (gld_${EMULATION_NAME}_list_options): Describe them. (gld${EMULATION_NAME}_handle_option): Set or clear global pe_use_coff_long_section_names flag when options recognised. (gld_${EMULATION_NAME}_after_open): En/disable long section names for main output bfd by calling pe_output_file_set_long_section_names. * pep.em (enum options): Extend enum with new getopt option values. (gld${EMULATION_NAME}_add_options): Add new options to xtra_long[]. (gld_${EMULATION_NAME}_list_options): Describe them. (gld${EMULATION_NAME}_handle_option): Set or clear global pe_use_coff_long_section_names flag when options recognised. (gld_${EMULATION_NAME}_after_open): En/disable long section names for main output bfd by calling pep_output_file_set_long_section_names. ld/testsuite/ChangeLog * ld-pe/longsecn-1.d: New test file. * ld-pe/longsecn-2.d: Likewise. * ld-pe/longsecn-3.d: Likewise. * ld-pe/longsecn-4.d: Likewise. * ld-pe/longsecn-5.d: Likewise. * ld-pe/longsecn.d: Likewise. * ld-pe/longsecn.exp: New test control script. * ld-pe/longsecn.s: New test source file.
* 2009-01-08 Kai Tietz <kai.tietz@onevision.com>Kai Tietz2009-01-081-0/+1
| | | | | | | | | | | | | | | | | | * 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.
* * NEWS: Mention new feature --exclude-modules-for-implib.Dave Korn2009-01-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* 2008-11-14 Kai Tietz <kai.tietz@onevision.com>Kai Tietz2008-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | * 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.
* Update sources to GPLv3Nick Clifton2007-07-061-8/+8
|
* bfd/Alan Modra2007-04-261-2/+3
| | | | | | | | | | | | | | | | | | | | 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.
* * pe-dll.c (pe_bfd_is_dll): New function.Christopher Faylor2006-12-181-0/+3
| | | | | | * 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.
* Update FSF addressesNick Clifton2005-05-121-2/+2
|
* update copyright datesAlan Modra2005-03-031-1/+1
|
* Convert to C90Alan Modra2003-06-281-14/+13
|
* s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. SimplifyAlan Modra2002-11-301-16/+25
| | | | comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
* Add --enable-auto-import extension.Nick Clifton2002-11-141-1/+1
|
* * ldexp.c: Replace CONST with const.Alan Modra2002-06-081-2/+2
| | | | | | | | * ldfile.c: Likewise. * ldfile.h: Likewise. * ldlex.l: Likewise. * mri.c: Likewise. * pe-dll.h: Likewise.
* * ldemul.c: Fix formatting.Kazu Hirata2002-05-251-2/+2
| | | | | | * ldfile.c: Likewise. * pe-dll.c: Likewise. * pe-dll.h: Likewise.
* * pe-dll.c (autofilter_liblist): Add more system libs excluded by default.Christopher Faylor2002-05-221-1/+1
| | | | | | | | | | | | | | | | (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.
* 2001-09-12 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>Charles Wilson2001-09-121-1/+1
| | | | | | | | | | | | | | | | | * 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-08-02 Charles Wilson <cwilson@ece.gatech.edu>Charles Wilson2001-08-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Fixtypos in ChangeLogs, fix copyright dates in filesNick Clifton2001-03-131-1/+1
|
* Applied Mumit Kha's patch to tweak dll production code.Nick Clifton2000-01-041-1/+3
|
* * pe-dll.h: New file.Ian Lance Taylor1999-09-121-0/+46
* 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.