summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonrad Kleine <kkleine@redhat.com>2019-09-11 14:33:21 +0000
committerKonrad Kleine <kkleine@redhat.com>2019-09-11 14:33:21 +0000
commitd44c4a71df9d6294c944542598ec1085cd4d5add (patch)
treec578e8bd91015f93006f06cf020da2feea7156b8
parent3ad8278737d042c6b5b61c0143ee68db66be91fe (diff)
downloadbcm5719-llvm-d44c4a71df9d6294c944542598ec1085cd4d5add.tar.gz
bcm5719-llvm-d44c4a71df9d6294c944542598ec1085cd4d5add.zip
Revert "[LLDB][ELF] Fixup for comments in D67390"
This reverts commit 813f05915d29904878d926f9849ca3dbe78096af. llvm-svn: 371624
-rw-r--r--lldb/lit/Modules/ELF/load-from-dynsym-alone.test2
-rw-r--r--lldb/lit/Modules/ELF/load-symtab-and-dynsym.test2
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp11
3 files changed, 8 insertions, 7 deletions
diff --git a/lldb/lit/Modules/ELF/load-from-dynsym-alone.test b/lldb/lit/Modules/ELF/load-from-dynsym-alone.test
index 8647c521e4a..74560abcc72 100644
--- a/lldb/lit/Modules/ELF/load-from-dynsym-alone.test
+++ b/lldb/lit/Modules/ELF/load-from-dynsym-alone.test
@@ -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
diff --git a/lldb/lit/Modules/ELF/load-symtab-and-dynsym.test b/lldb/lit/Modules/ELF/load-symtab-and-dynsym.test
index 3700211763b..ff2ef86b24a 100644
--- a/lldb/lit/Modules/ELF/load-symtab-and-dynsym.test
+++ b/lldb/lit/Modules/ELF/load-symtab-and-dynsym.test
@@ -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
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index e1f08ffaa18..20e26f033d1 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -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) {
OpenPOWER on IntegriCloud