[Lldb-commits] [lldb] r371624 - Revert "[LLDB][ELF] Fixup for comments in D67390"
Konrad Kleine via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 11 07:33:21 PDT 2019
Author: kwk
Date: Wed Sep 11 07:33:21 2019
New Revision: 371624
URL: http://llvm.org/viewvc/llvm-project?rev=371624&view=rev
Log:
Revert "[LLDB][ELF] Fixup for comments in D67390"
This reverts commit 813f05915d29904878d926f9849ca3dbe78096af.
Modified:
lldb/trunk/lit/Modules/ELF/load-from-dynsym-alone.test
lldb/trunk/lit/Modules/ELF/load-symtab-and-dynsym.test
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
Modified: lldb/trunk/lit/Modules/ELF/load-from-dynsym-alone.test
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Modules/ELF/load-from-dynsym-alone.test?rev=371624&r1=371623&r2=371624&view=diff
==============================================================================
--- lldb/trunk/lit/Modules/ELF/load-from-dynsym-alone.test (original)
+++ lldb/trunk/lit/Modules/ELF/load-from-dynsym-alone.test Wed Sep 11 07:33:21 2019
@@ -11,7 +11,7 @@
# 2: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
# 3: 0000000000401110 13 FUNC GLOBAL DEFAULT 10 functionInDynsym
-# We want to keep the symbol "functionInDynsym" in the .dynsym section and not
+# We want to keep the symbol "functionInDynsym" in the .dynamic section and not
# have it put the default .symtab section.
# RUN: echo "{functionInDynsym;};" > %T/dynmic-symbols.txt
# RUN: %clang -Wl,--dynamic-list=%T/dynmic-symbols.txt -g -o %t.binary %p/Inputs/load-from-dynsym-alone.c
Modified: lldb/trunk/lit/Modules/ELF/load-symtab-and-dynsym.test
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Modules/ELF/load-symtab-and-dynsym.test?rev=371624&r1=371623&r2=371624&view=diff
==============================================================================
--- lldb/trunk/lit/Modules/ELF/load-symtab-and-dynsym.test (original)
+++ lldb/trunk/lit/Modules/ELF/load-symtab-and-dynsym.test Wed Sep 11 07:33:21 2019
@@ -16,7 +16,7 @@
# 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
# 1: 0000000000401110 15 FUNC GLOBAL DEFAULT 10 functionInSymtab
-# We want to keep the symbol "functionInDynsym" in the .dynsym section and not
+# We want to keep the symbol "functionInDynsym" in the .dynamic section and not
# have it put the default .symtab section.
# RUN: echo "{functionInDynsym;};" > %T/dynmic-symbols.txt
# RUN: %clang -Wl,--dynamic-list=%T/dynmic-symbols.txt -g -o %t.binary %p/Inputs/load-symtab-and-dynsym.c
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=371624&r1=371623&r2=371624&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Wed Sep 11 07:33:21 2019
@@ -2644,11 +2644,12 @@ Symtab *ObjectFileELF::GetSymtab() {
// Sharable objects and dynamic executables usually have 2 distinct symbol
// tables, one named ".symtab", and the other ".dynsym". The dynsym is a
- // smaller version of the symtab that only contains global symbols.
- // Information in the dynsym section is *usually* also found in the symtab,
- // but this is not required as symtab entries can be removed after linking.
- // The minidebuginfo format makes use of this facility to create smaller
- // symbol tables.
+ // smaller version of the symtab that only contains global symbols. The
+ // information found in the dynsym is therefore also found in the symtab,
+ // while the reverse is not necessarily true.
+ // One exception to the above rule is when we have minidebuginfo embedded
+ // into a compressed .gnu_debugdata section. This section contains a .symtab
+ // from which all symbols already contained in the .dynsym are stripped.
Section *symtab =
section_list->FindSectionByType(eSectionTypeELFSymbolTable, true).get();
if (symtab) {
More information about the lldb-commits
mailing list