[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 31 05:04:30 PDT 2024
================
@@ -402,6 +413,29 @@ class ObjectFileELF : public lldb_private::ObjectFile {
/// .gnu_debugdata section or \c nullptr if an error occured or if there's no
/// section with that name.
std::shared_ptr<ObjectFileELF> GetGnuDebugDataObjectFile();
+
+ /// Get the bytes that represent the .dynamic section.
+ ///
+ /// This function will fetch the data for the .dynamic section in an ELF file.
+ /// If the ELF file is loaded from a file on disk, it will use the PT_DYNAMIC
+ /// program header to extract the data and fall back to using the section
+ /// headers. If the ELF file is loaded from memory, it will use the PT_DYNAMIC
----------------
labath wrote:
I believe these functions shouldn't distinguish whether the file is in memory or not, but rather whether it has section headers present.
https://github.com/llvm/llvm-project/pull/101237
More information about the lldb-commits
mailing list