aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texinfo
diff options
context:
space:
mode:
authorCharles Wilson <cygwin@cwilson.fastmail.fm>2001-08-02 23:12:02 +0000
committerCharles Wilson <cygwin@cwilson.fastmail.fm>2001-08-02 23:12:02 +0000
commitb044cda1de4ec364e0d9d6bf152442345914e254 (patch)
treeb486812749801a2161ee183b4de9ff8a11c05663 /ld/ld.texinfo
parent3ede731b3062fb1b69bbc3fea0da685d46409d03 (diff)
downloadbinutils-b044cda1de4ec364e0d9d6bf152442345914e254.zip
binutils-b044cda1de4ec364e0d9d6bf152442345914e254.tar.gz
binutils-b044cda1de4ec364e0d9d6bf152442345914e254.tar.bz2
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.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r--ld/ld.texinfo67
1 files changed, 65 insertions, 2 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index b763dfe..634ce64 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -1601,8 +1601,22 @@ otherwise wouldn't be any exported symbols. When symbols are
explicitly exported via DEF files or implicitly exported via function
attributes, the default is to not export anything else unless this
option is given. Note that the symbols @code{DllMain@@12},
-@code{DllEntryPoint@@0}, and @code{impure_ptr} will not be automatically
-exported.
+@code{DllEntryPoint@@0}, @code{DllMainCRTStartup@@12}, and
+@code{impure_ptr} will not be automatically
+exported. Also, symbols imported from other DLLs will not be
+re-exported, nor will symbols specifying the DLL's internal layout
+such as those beginning with @code{_head_} or ending with
+@code{_iname}. In addition, no symbols from @code{libgcc},
+@code{libstd++}, @code{libmingw32}, or @code{crtX.o} will be exported.
+Symbols whose names begin with @code{__rtti_} or @code{__builtin_} will
+not be exported, to help with C++ DLLs. Finally, there is an
+extensive list of cygwin-private symbols that are not exported
+(obviously, this applies on when building DLLs for cygwin targets).
+These cygwin-excludes are: @code{_cygwin_dll_entry@@12},
+@code{_cygwin_crt0_common@@8}, @code{_cygwin_noncygwin_dll_entry@@12},
+@code{_fmode}, @code{_impure_ptr}, @code{cygwin_attach_dll},
+@code{cygwin_premain0}, @code{cygwin_premain1}, @code{cygwin_premain2},
+@code{cygwin_premain3}, and @code{environ}.
@kindex --exclude-symbols
@item --exclude-symbols @var{symbol},@var{symbol},...
@@ -1672,6 +1686,55 @@ file corresponding to the DLL the linker is generating. This DEF file
library with @code{dlltool} or may be used as a reference to
automatically or implicitly exported symbols.
+@cindex DLLs, creating
+@kindex --out-implib
+@item --out-implib @var{file}
+The linker will create the file @var{file} which will contain an
+import lib corresponding to the DLL the linker is generating. This
+import lib (which should be called @code{*.dll.a} or @code{*.a}
+may be used to link clients against the generated DLL; this behavior
+makes it possible to skip a separate @code{dlltool} import library
+creation step.
+
+@kindex --enable-auto-image-base
+@item --enable-auto-image-base
+Automatically choose the image base for DLLs, unless one is specified
+using the @code{--image-base} argument. By using a hash generated
+from the dllname to create unique image bases for each DLL, in-memory
+collisions and relocations which can delay program execution are
+avoided.
+
+@kindex --disable-auto-image-base
+@item --disable-auto-image-base
+Do not automatically generate a unique image base. If there is no
+user-specified image base (@code{--image-base}) then use the platform
+default.
+
+@cindex DLLs, linking to
+@kindex --dll-search-prefix
+@item --dll-search-prefix @var{string}
+When linking dynamically to a dll without an import library, i
+search for @code{<string><basename>.dll} in preference to
+@code{lib<basename>.dll}. This behavior allows easy distinction
+between DLLs built for the various "subplatforms": native, cygwin,
+uwin, pw, etc. For instance, cygwin DLLs typically use
+@code{--dll-search-prefix=cyg}.
+
+@kindex --enable-auto-import
+@item --enable-auto-import
+Do sophisticalted linking of @code{_symbol} to @code{__imp__symbol} for
+DATA imports from DLLs, and create the necessary thunking symbols when
+building the DLLs with those DATA exports.
+
+@kindex --disable-auto-import
+@item --disable-auto-import
+Do not attempt to do sophisticalted linking of @code{_symbol} to
+@code{__imp__symbol} for DATA imports from DLLs.
+
+@kindex --enable-extra-pe-debug
+@item --enable-extra-pe-debug
+Show additional debug info related to auto-import symbol thunking.
+
@kindex --section-alignment
@item --section-alignment
Sets the section alignment. Sections in memory will always begin at