diff --git a/lldb/source/Symbol/Symbol.cpp b/lldb/source/Symbol/Symbol.cpp --- a/lldb/source/Symbol/Symbol.cpp +++ b/lldb/source/Symbol/Symbol.cpp @@ -115,7 +115,8 @@ } bool Symbol::ValueIsAddress() const { - return m_addr_range.GetBaseAddress().GetSection().get() != nullptr; + return m_addr_range.GetBaseAddress().GetSection().get() != nullptr || + m_type == eSymbolTypeAbsolute; } ConstString Symbol::GetDisplayName() const { diff --git a/lldb/source/Symbol/Symtab.cpp b/lldb/source/Symbol/Symtab.cpp --- a/lldb/source/Symbol/Symtab.cpp +++ b/lldb/source/Symbol/Symtab.cpp @@ -1100,6 +1100,7 @@ case eSymbolTypeCode: case eSymbolTypeResolver: case eSymbolTypeReExported: + case eSymbolTypeAbsolute: symbol_indexes.push_back(temp_symbol_indexes[i]); break; default: diff --git a/lldb/test/Shell/SymbolFile/absolute-symbol.s b/lldb/test/Shell/SymbolFile/absolute-symbol.s new file mode 100644 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/absolute-symbol.s @@ -0,0 +1,7 @@ +# RUN: %clang %s -g -c -o %t.o +# RUN: %lldb -b -o 'target modules lookup -s absolute_symbol' %t.o | FileCheck %s +# CHECK: 1 symbols match 'absolute_symbol' +# CHECK: Address: 0x0000000012345678 (0x0000000012345678) +# CHECK: Summary: 0x0000000012345678 +.globl absolute_symbol +absolute_symbol = 0x12345678