diff options
-rw-r--r-- | gnu/llvm/tools/lld/ELF/Driver.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gnu/llvm/tools/lld/ELF/Driver.cpp b/gnu/llvm/tools/lld/ELF/Driver.cpp index c064d307698..e425a289aa4 100644 --- a/gnu/llvm/tools/lld/ELF/Driver.cpp +++ b/gnu/llvm/tools/lld/ELF/Driver.cpp @@ -344,7 +344,8 @@ static bool isKnown(StringRef S) { S == "keep-text-section-prefix" || S == "lazy" || S == "muldefs" || S == "nocombreloc" || S == "nocopyreloc" || S == "nodelete" || S == "nodlopen" || S == "noexecstack" || - S == "nokeep-text-section-prefix" || S == "norelro" || S == "notext" || + S == "nokeep-text-section-prefix" || S == "norelro" || + S == "noretpolineplt" || S == "notext" || S == "now" || S == "origin" || S == "relro" || S == "retpolineplt" || S == "rodynamic" || S == "text" || S == "wxneeded" || S.startswith("max-page-size=") || S.startswith("stack-size="); @@ -860,7 +861,11 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) { Config->ZNow = getZFlag(Args, "now", "lazy", false); Config->ZOrigin = hasZOption(Args, "origin"); Config->ZRelro = getZFlag(Args, "relro", "norelro", true); - Config->ZRetpolineplt = hasZOption(Args, "retpolineplt"); +#ifndef __OpenBSD__ + Config->ZRetpolineplt = getZFlag(Args, "retpolineplt", "noretpolineplt", false); +#else + Config->ZRetpolineplt = getZFlag(Args, "retpolineplt", "noretpolineplt", true); +#endif Config->ZRodynamic = hasZOption(Args, "rodynamic"); Config->ZStackSize = args::getZOptionValue(Args, OPT_z, "stack-size", 0); Config->ZText = getZFlag(Args, "text", "notext", true); |