summaryrefslogtreecommitdiff
path: root/ELF/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ELF/Driver.cpp')
-rw-r--r--ELF/Driver.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/ELF/Driver.cpp b/ELF/Driver.cpp
index 10ad13f214d5..4630e110bcd8 100644
--- a/ELF/Driver.cpp
+++ b/ELF/Driver.cpp
@@ -259,6 +259,9 @@ static void checkOptions(opt::InputArgList &Args) {
if (Config->Pie && Config->Shared)
error("-shared and -pie may not be used together");
+ if (!Config->Shared && !Config->FilterList.empty())
+ error("-F may not be used without -shared");
+
if (!Config->Shared && !Config->AuxiliaryList.empty())
error("-f may not be used without -shared");
@@ -631,6 +634,7 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) {
getArg(Args, OPT_export_dynamic, OPT_no_export_dynamic, false);
Config->FatalWarnings =
getArg(Args, OPT_fatal_warnings, OPT_no_fatal_warnings, false);
+ Config->FilterList = getArgs(Args, OPT_filter);
Config->Fini = Args.getLastArgValue(OPT_fini, "_fini");
Config->GcSections = getArg(Args, OPT_gc_sections, OPT_no_gc_sections, false);
Config->GdbIndex = Args.hasArg(OPT_gdb_index);