Index: lld/trunk/ELF/SyntheticSections.cpp =================================================================== --- lld/trunk/ELF/SyntheticSections.cpp +++ lld/trunk/ELF/SyntheticSections.cpp @@ -795,7 +795,7 @@ if (DtFlags1) add({DT_FLAGS_1, DtFlags1}); - if (!Config->Entry.empty()) + if (!Config->Shared && !Config->Relocatable) add({DT_DEBUG, (uint64_t)0}); }