[PATCH] D27496: [ELF] Only binaries should have DT_DEBUG entry

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 17:38:17 PST 2016


phosek created this revision.
phosek added a reviewer: ruiu.
phosek added a subscriber: llvm-commits.
phosek set the repository for this revision to rL LLVM.
phosek added a project: lld.

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


Repository:
  rL LLVM

https://reviews.llvm.org/D27496

Files:
  ELF/SyntheticSections.cpp


Index: ELF/SyntheticSections.cpp
===================================================================
--- ELF/SyntheticSections.cpp
+++ 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});
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27496.80517.patch
Type: text/x-patch
Size: 353 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161207/0e26ae7d/attachment.bin>


More information about the llvm-commits mailing list