[llvm-branch-commits] [lldb] r235352 - Fix thumb symbol value fixup in ObjectFileELF

Stephane Sezer sas at cd80.net
Mon Apr 20 14:28:31 PDT 2015


Author: sas
Date: Mon Apr 20 16:28:31 2015
New Revision: 235352

URL: http://llvm.org/viewvc/llvm-project?rev=235352&view=rev
Log:
Fix thumb symbol value fixup in ObjectFileELF

Summary:
This is a cross-port of r235098 by Tamas Berghammer <tberghammer at google.com>.

This patch fixes a critical bug in thumb symbol handling on ARM platforms.

Reviewers: tberghammer, hans, clayborg

Subscribers: rengolin, aemerson, lldb-commits

Differential Revision: http://reviews.llvm.org/D9123

Modified:
    lldb/branches/release_36/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp

Modified: lldb/branches/release_36/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_36/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=235352&r1=235351&r2=235352&view=diff
==============================================================================
--- lldb/branches/release_36/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/branches/release_36/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Mon Apr 20 16:28:31 2015
@@ -1890,7 +1890,7 @@ ObjectFileELF::ParseSymbols (Symtab *sym
 
         // symbol_value_offset may contain 0 for ARM symbols or -1 for
         // THUMB symbols. See above for more details.
-        uint64_t symbol_value = symbol.st_value | symbol_value_offset;
+        uint64_t symbol_value = symbol.st_value + symbol_value_offset;
         if (symbol_section_sp && CalculateType() != ObjectFile::Type::eTypeObjectFile)
             symbol_value -= symbol_section_sp->GetFileAddress();
         bool is_global = symbol.getBinding() == STB_GLOBAL;





More information about the llvm-branch-commits mailing list