[lld] r288877 - [ELF] Only binaries should have DT_DEBUG entry

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 18:05:43 PST 2016


Author: phosek
Date: Tue Dec  6 20:05:42 2016
New Revision: 288877

URL: http://llvm.org/viewvc/llvm-project?rev=288877&view=rev
Log:
[ELF] Only binaries should have DT_DEBUG entry

The presence of DT_DEBUG entry is unrelated to the existence of entry point.

Differential Revision: https://reviews.llvm.org/D27496

Modified:
    lld/trunk/ELF/SyntheticSections.cpp

Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=288877&r1=288876&r2=288877&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Tue Dec  6 20:05:42 2016
@@ -795,7 +795,7 @@ template <class ELFT> void DynamicSectio
   if (DtFlags1)
     add({DT_FLAGS_1, DtFlags1});
 
-  if (!Config->Entry.empty())
+  if (!Config->Shared && !Config->Relocatable)
     add({DT_DEBUG, (uint64_t)0});
 }
 




More information about the llvm-commits mailing list