summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Driver.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2018-09-14 14:25:37 +0000
committerEd Maste <emaste@freebsd.org>2018-09-14 14:25:37 +0000
commitc0b474f67a33f7106e19ac21bbbe2fdd2ec1661b (patch)
tree3b7675f27a3a5c084d385a3556aee060d8c531a8 /lld/ELF/Driver.cpp
parent3c011e1e3c45dc53d135ad2ffc0b2d7998bc8e2c (diff)
downloadbcm5719-llvm-c0b474f67a33f7106e19ac21bbbe2fdd2ec1661b.tar.gz
bcm5719-llvm-c0b474f67a33f7106e19ac21bbbe2fdd2ec1661b.zip
lld: add -z interpose support
-z interpose sets the DF_1_INTERPOSE flag, marking the object as an interposer. Via FreeBSD PR 230604, linking Valgrind with lld failed. Differential Revision: https://reviews.llvm.org/D52094 llvm-svn: 342239
Diffstat (limited to 'lld/ELF/Driver.cpp')
-rw-r--r--lld/ELF/Driver.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 49ad1b30603..f7abcfe0fd4 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -341,9 +341,10 @@ static bool getZFlag(opt::InputArgList &Args, StringRef K1, StringRef K2,
static bool isKnown(StringRef S) {
return S == "combreloc" || S == "copyreloc" || S == "defs" ||
S == "execstack" || S == "global" || S == "hazardplt" ||
- S == "initfirst" || S == "keep-text-section-prefix" || S == "lazy" ||
- S == "muldefs" || S == "nocombreloc" || S == "nocopyreloc" ||
- S == "nodelete" || S == "nodlopen" || S == "noexecstack" ||
+ S == "initfirst" || S == "interpose" ||
+ 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 == "now" || S == "origin" || S == "relro" || S == "retpolineplt" ||
S == "rodynamic" || S == "text" || S == "wxneeded" ||
@@ -836,6 +837,7 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) {
Config->ZGlobal = hasZOption(Args, "global");
Config->ZHazardplt = hasZOption(Args, "hazardplt");
Config->ZInitfirst = hasZOption(Args, "initfirst");
+ Config->ZInterpose = hasZOption(Args, "interpose");
Config->ZKeepTextSectionPrefix = getZFlag(
Args, "keep-text-section-prefix", "nokeep-text-section-prefix", false);
Config->ZNodelete = hasZOption(Args, "nodelete");
OpenPOWER on IntegriCloud