aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-10-16 15:15:39 +0000
committerNick Clifton <nickc@redhat.com>2009-10-16 15:15:39 +0000
commit2927aacaee356e861452258500e0b7ace0449977 (patch)
tree75d3b031ef6f40d1771f59145a1a69e852588a83 /ld/emultempl
parent3873ba12303f6ceec282b213c59e18d2bc061a58 (diff)
downloadgdb-2927aacaee356e861452258500e0b7ace0449977.zip
gdb-2927aacaee356e861452258500e0b7ace0449977.tar.gz
gdb-2927aacaee356e861452258500e0b7ace0449977.tar.bz2
* emultempl/pe.em (OPTION_EXCLUDE_ALL_SYMBOLS): New macro.
(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.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/pe.em8
-rw-r--r--ld/emultempl/pep.em6
2 files changed, 13 insertions, 1 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 788818d..d233bd1 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -196,7 +196,8 @@ fragment <<EOF
#define OPTION_OUT_DEF (OPTION_SUPPORT_OLD_CODE + 1)
#define OPTION_EXPORT_ALL (OPTION_OUT_DEF + 1)
#define OPTION_EXCLUDE_SYMBOLS (OPTION_EXPORT_ALL + 1)
-#define OPTION_KILL_ATS (OPTION_EXCLUDE_SYMBOLS + 1)
+#define OPTION_EXCLUDE_ALL_SYMBOLS (OPTION_EXCLUDE_SYMBOLS + 1)
+#define OPTION_KILL_ATS (OPTION_EXCLUDE_ALL_SYMBOLS + 1)
#define OPTION_STDCALL_ALIASES (OPTION_KILL_ATS + 1)
#define OPTION_ENABLE_STDCALL_FIXUP (OPTION_STDCALL_ALIASES + 1)
#define OPTION_DISABLE_STDCALL_FIXUP (OPTION_ENABLE_STDCALL_FIXUP + 1)
@@ -276,6 +277,7 @@ gld${EMULATION_NAME}_add_options
{"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-all-symbols", no_argument, NULL, OPTION_EXCLUDE_ALL_SYMBOLS},
{"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS},
{"exclude-modules-for-implib", required_argument, NULL, OPTION_EXCLUDE_MODULES_FOR_IMPLIB},
{"kill-at", no_argument, NULL, OPTION_KILL_ATS},
@@ -389,6 +391,7 @@ gld_${EMULATION_NAME}_list_options (FILE *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-all-symbols Exclude all symbols from automatic export\n"));
fprintf (file, _(" --exclude-libs lib,lib,... Exclude libraries from automatic export\n"));
fprintf (file, _(" --exclude-modules-for-implib mod,mod,...\n"));
fprintf (file, _(" Exclude objects, archive members from auto\n"));
@@ -669,6 +672,9 @@ gld${EMULATION_NAME}_handle_option (int optc)
case OPTION_EXCLUDE_SYMBOLS:
pe_dll_add_excludes (optarg, EXCLUDESYMS);
break;
+ case OPTION_EXCLUDE_ALL_SYMBOLS:
+ pe_dll_exclude_all_symbols = 1;
+ break;
case OPTION_EXCLUDE_LIBS:
pe_dll_add_excludes (optarg, EXCLUDELIBS);
break;
diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
index 90af020..ff0c589 100644
--- a/ld/emultempl/pep.em
+++ b/ld/emultempl/pep.em
@@ -158,6 +158,7 @@ enum options
OPTION_OUT_DEF,
OPTION_EXPORT_ALL,
OPTION_EXCLUDE_SYMBOLS,
+ OPTION_EXCLUDE_ALL_SYMBOLS,
OPTION_KILL_ATS,
OPTION_STDCALL_ALIASES,
OPTION_ENABLE_STDCALL_FIXUP,
@@ -227,6 +228,7 @@ gld${EMULATION_NAME}_add_options
{"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-all-symbols", no_argument, NULL, OPTION_EXCLUDE_ALL_SYMBOLS},
{"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS},
{"exclude-modules-for-implib", required_argument, NULL, OPTION_EXCLUDE_MODULES_FOR_IMPLIB},
{"kill-at", no_argument, NULL, OPTION_KILL_ATS},
@@ -334,6 +336,7 @@ gld_${EMULATION_NAME}_list_options (FILE *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-all-symbols Exclude all symbols from automatic export\n"));
fprintf (file, _(" --exclude-libs lib,lib,... Exclude libraries from automatic export\n"));
fprintf (file, _(" --exclude-modules-for-implib mod,mod,...\n"));
fprintf (file, _(" Exclude objects, archive members from auto\n"));
@@ -609,6 +612,9 @@ gld${EMULATION_NAME}_handle_option (int optc)
case OPTION_EXCLUDE_SYMBOLS:
pep_dll_add_excludes (optarg, EXCLUDESYMS);
break;
+ case OPTION_EXCLUDE_ALL_SYMBOLS:
+ pep_dll_exclude_all_symbols = 1;
+ break;
case OPTION_EXCLUDE_LIBS:
pep_dll_add_excludes (optarg, EXCLUDELIBS);
break;