summaryrefslogtreecommitdiffstats
path: root/lld/ELF/SyntheticSections.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/SyntheticSections.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/SyntheticSections.cpp')
-rw-r--r--lld/ELF/SyntheticSections.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index 3f1a15bad11..b547956ab73 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -1268,6 +1268,8 @@ template <class ELFT> void DynamicSection<ELFT>::finalizeContents() {
DtFlags1 |= DF_1_GLOBAL;
if (Config->ZInitfirst)
DtFlags1 |= DF_1_INITFIRST;
+ if (Config->ZInterpose)
+ DtFlags1 |= DF_1_INTERPOSE;
if (Config->ZNodelete)
DtFlags1 |= DF_1_NODELETE;
if (Config->ZNodlopen)
OpenPOWER on IntegriCloud