diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-09-14 19:50:36 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-09-14 19:50:36 +0000 |
commit | c0b5e99154254294ae5c679d3f5b023c6ecf8f89 (patch) | |
tree | b02e2529091860cf92f333cb15150aa43564a64d /contrib/llvm | |
parent | c826f0db60516231571da8c4097a9963077c4317 (diff) | |
parent | df57b3139f5e58b9f900deb4ee2e74f961b75328 (diff) | |
download | src-test2-c0b5e99154254294ae5c679d3f5b023c6ecf8f89.tar.gz src-test2-c0b5e99154254294ae5c679d3f5b023c6ecf8f89.zip |
Notes
Diffstat (limited to 'contrib/llvm')
-rw-r--r-- | contrib/llvm/tools/lld/ELF/Config.h | 1 | ||||
-rw-r--r-- | contrib/llvm/tools/lld/ELF/Driver.cpp | 1 | ||||
-rw-r--r-- | contrib/llvm/tools/lld/ELF/SyntheticSections.cpp | 2 | ||||
-rw-r--r-- | contrib/llvm/tools/lld/docs/ld.lld.1 | 8 |
4 files changed, 11 insertions, 1 deletions
diff --git a/contrib/llvm/tools/lld/ELF/Config.h b/contrib/llvm/tools/lld/ELF/Config.h index 53f0852fa98f..2a488c3a1189 100644 --- a/contrib/llvm/tools/lld/ELF/Config.h +++ b/contrib/llvm/tools/lld/ELF/Config.h @@ -183,6 +183,7 @@ struct Configuration { bool ZHazardplt; bool ZIfuncnoplt; bool ZInitfirst; + bool ZInterpose; bool ZKeepTextSectionPrefix; bool ZNodelete; bool ZNodlopen; diff --git a/contrib/llvm/tools/lld/ELF/Driver.cpp b/contrib/llvm/tools/lld/ELF/Driver.cpp index b8be526d9424..66417b0178ce 100644 --- a/contrib/llvm/tools/lld/ELF/Driver.cpp +++ b/contrib/llvm/tools/lld/ELF/Driver.cpp @@ -846,6 +846,7 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) { Config->ZHazardplt = hasZOption(Args, "hazardplt"); Config->ZIfuncnoplt = hasZOption(Args, "ifunc-noplt"); 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"); diff --git a/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp b/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp index 8b02a14c93c2..ce659e50e81a 100644 --- a/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp +++ b/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp @@ -1266,6 +1266,8 @@ template <class ELFT> void DynamicSection<ELFT>::finalizeContents() { DtFlags |= DF_SYMBOLIC; if (Config->ZInitfirst) DtFlags1 |= DF_1_INITFIRST; + if (Config->ZInterpose) + DtFlags1 |= DF_1_INTERPOSE; if (Config->ZNodelete) DtFlags1 |= DF_1_NODELETE; if (Config->ZNodlopen) diff --git a/contrib/llvm/tools/lld/docs/ld.lld.1 b/contrib/llvm/tools/lld/docs/ld.lld.1 index 67591f2bbcac..b51608c7e959 100644 --- a/contrib/llvm/tools/lld/docs/ld.lld.1 +++ b/contrib/llvm/tools/lld/docs/ld.lld.1 @@ -3,7 +3,7 @@ .\" .\" This man page documents only lld's ELF linking support, obtained originally .\" from FreeBSD. -.Dd August 22, 2018 +.Dd September 14, 2018 .Dt LD.LLD 1 .Os .Sh NAME @@ -462,6 +462,12 @@ environments. Sets the .Dv DF_1_INITFIRST flag to indicate the module should be initialized first. +.It Cm interpose +Set the +.Dv DF_1_INTERPOSE +flag to indicate that the object is an interposer. +Runtime linkers perform symbol resolution by first searching the application, +followed by interposers, and then any other dependencies. .It Cm muldefs Do not error if a symbol is defined multiple times. The first definition will be used. |