diff --git a/contrib/llvm-project/lld/ELF/SyntheticSections.cpp b/contrib/llvm-project/lld/ELF/SyntheticSections.cpp index 2ae6277a36a..67709916cd3 100644 --- a/contrib/llvm-project/lld/ELF/SyntheticSections.cpp +++ b/contrib/llvm-project/lld/ELF/SyntheticSections.cpp @@ -1315,6 +1315,8 @@ template void DynamicSection::finalizeContents() { dtFlags1 |= DF_1_NODELETE; if (config->zNodlopen) dtFlags1 |= DF_1_NOOPEN; + if (config->pie) + dtFlags1 |= DF_1_PIE; if (config->zNow) { dtFlags |= DF_BIND_NOW; dtFlags1 |= DF_1_NOW;