[PATCH] D49513: [ELF] gdb-index: don't remove .debug_gnu_pub{names, types} in -r mode
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 18 14:52:11 PDT 2018
MaskRay created this revision.
MaskRay added a reviewer: ruiu.
Herald added subscribers: llvm-commits, arichardson, emaste.
Herald added a reviewer: espindola.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D49513
Files:
ELF/SyntheticSections.cpp
Index: ELF/SyntheticSections.cpp
===================================================================
--- ELF/SyntheticSections.cpp
+++ ELF/SyntheticSections.cpp
@@ -2428,9 +2428,10 @@
// .debug_gnu_pub{names,types} are useless in executables.
// They are present in input object files solely for creating
// a .gdb_index. So we can remove them from the output.
- for (InputSectionBase *S : InputSections)
- if (S->Name == ".debug_gnu_pubnames" || S->Name == ".debug_gnu_pubtypes")
- S->Live = false;
+ if (!Config->Relocatable)
+ for (InputSectionBase *S : InputSections)
+ if (S->Name == ".debug_gnu_pubnames" || S->Name == ".debug_gnu_pubtypes")
+ S->Live = false;
std::vector<GdbChunk> Chunks(Sections.size());
std::vector<std::vector<NameTypeEntry>> NameTypes(Sections.size());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49513.156157.patch
Type: text/x-patch
Size: 824 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180718/38b28c06/attachment.bin>
More information about the llvm-commits
mailing list