4 Commits

Author SHA1 Message Date
Greg Clayton
c526eb891b Fix buildbots with no x86 target.
Fix for: https://github.com/llvm/llvm-project/pull/116689
2024-11-18 19:37:56 -08:00
Greg Clayton
5ae4d505c3
Add support for reading the dynamic symbol table from PT_DYNAMIC (#116689)
Resubmissions of https://github.com/llvm/llvm-project/pull/112596 with
buildbot fixes.

Allow LLDB to parse the dynamic symbol table from an ELF file or memory
image in an ELF file that has no section headers. This patch uses the
ability to parse the PT_DYNAMIC segment and find the DT_SYMTAB,
DT_SYMENT, DT_HASH or DT_GNU_HASH to find and parse the dynamic symbol
table if the section headers are not present. It also adds a helper
function to read data from a .dynamic key/value pair entry correctly
from the file or from memory.
2024-11-18 16:25:19 -08:00
Shubham Sandeep Rastogi
f14e1a8597 Revert "Add support for reading the dynamic symbol table from PT_DYNAMIC (#112596)"
This reverts commit a7b2e73bcaa91255a20f1f2e692bec9eb6c17022.

This patch broke the greendragon bot

Failed Tests (10):
  lldb-api :: python_api/sbplatform/TestLocateModuleCallback.py
  lldb-unit :: Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleCallbackSuccessWithModuleAndSymbol
  lldb-unit :: Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleCallbackSuccessWithOnlySymbol
  lldb-unit :: Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleCallbackSuccessWithSymbolAsModule
  lldb-unit :: Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleCallbackSuccessWithSymbolAsModuleAndSymbol
  lldb-unit :: Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleCallbackSuccessWithSymbolByPlatformUUID
  lldb-unit :: Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleWithCachedModuleAndSymbol
  lldb-unit :: Target/./TargetTests/ModuleCacheTest/GetAndPut
  lldb-unit :: Target/./TargetTests/ModuleCacheTest/GetAndPutStrangeHostname
  lldb-unit :: Target/./TargetTests/ModuleCacheTest/GetAndPutUuidExists
2024-11-18 11:09:58 -08:00
Greg Clayton
a7b2e73bca
Add support for reading the dynamic symbol table from PT_DYNAMIC (#112596)
Allow LLDB to parse the dynamic symbol table from an ELF file or memory
image in an ELF file that has no section headers. This patch uses the
ability to parse the PT_DYNAMIC segment and find the DT_SYMTAB,
DT_SYMENT, DT_HASH or DT_GNU_HASH to find and parse the dynamic symbol
table if the section headers are not present. It also adds a helper
function to read data from a .dynamic key/value pair entry correctly
from the file or from memory.
2024-11-18 10:18:11 -08:00