diff options
author | Christopher Faylor <me+cygwin@cgf.cx> | 2002-05-22 18:03:09 +0000 |
---|---|---|
committer | Christopher Faylor <me+cygwin@cgf.cx> | 2002-05-22 18:03:09 +0000 |
commit | 70b0be790399493084660877bf2cfeae26c61117 (patch) | |
tree | eff851bbfc460723fcabdf9273b1437f63acc41d /ld/emultempl/pe.em | |
parent | 76feaaf3597dd644456717109f9268006c24bb6c (diff) | |
download | gdb-70b0be790399493084660877bf2cfeae26c61117.zip gdb-70b0be790399493084660877bf2cfeae26c61117.tar.gz gdb-70b0be790399493084660877bf2cfeae26c61117.tar.bz2 |
* 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.
Diffstat (limited to 'ld/emultempl/pe.em')
-rw-r--r-- | ld/emultempl/pe.em | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index d9db9ae..ba5d83a 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -221,6 +221,7 @@ gld_${EMULATION_NAME}_before_parse() #define OPTION_DLL_ENABLE_AUTO_IMPORT (OPTION_NO_DEFAULT_EXCLUDES + 1) #define OPTION_DLL_DISABLE_AUTO_IMPORT (OPTION_DLL_ENABLE_AUTO_IMPORT + 1) #define OPTION_ENABLE_EXTRA_PE_DEBUG (OPTION_DLL_DISABLE_AUTO_IMPORT + 1) +#define OPTION_EXCLUDE_LIBS (OPTION_ENABLE_EXTRA_PE_DEBUG + 1) static struct option longopts[] = { /* PE options */ @@ -247,6 +248,7 @@ static struct option longopts[] = { {"output-def", required_argument, NULL, OPTION_OUT_DEF}, {"export-all-symbols", no_argument, NULL, OPTION_EXPORT_ALL}, {"exclude-symbols", required_argument, NULL, OPTION_EXCLUDE_SYMBOLS}, + {"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS}, {"kill-at", no_argument, NULL, OPTION_KILL_ATS}, {"add-stdcall-alias", no_argument, NULL, OPTION_STDCALL_ALIASES}, {"enable-stdcall-fixup", no_argument, NULL, OPTION_ENABLE_STDCALL_FIXUP}, @@ -333,6 +335,7 @@ gld_${EMULATION_NAME}_list_options (file) fprintf (file, _(" --disable-stdcall-fixup Don't link _sym to _sym@nn\n")); fprintf (file, _(" --enable-stdcall-fixup Link _sym to _sym@nn without warnings\n")); fprintf (file, _(" --exclude-symbols sym,sym,... Exclude symbols from automatic export\n")); + fprintf (file, _(" --exclude-libs lib,lib,... Exclude libraries from automatic export\n")); fprintf (file, _(" --export-all-symbols Automatically export all globals to DLL\n")); fprintf (file, _(" --kill-at Remove @nn from exported symbols\n")); fprintf (file, _(" --out-implib <file> Generate import library\n")); @@ -586,7 +589,10 @@ gld_${EMULATION_NAME}_parse_args(argc, argv) pe_dll_export_everything = 1; break; case OPTION_EXCLUDE_SYMBOLS: - pe_dll_add_excludes (optarg); + pe_dll_add_excludes (optarg, 0); + break; + case OPTION_EXCLUDE_LIBS: + pe_dll_add_excludes (optarg, 1); break; case OPTION_KILL_ATS: pe_dll_kill_ats = 1; |