LLDB mainline
ObjectFileELF.h
Go to the documentation of this file.
1//===-- ObjectFileELF.h --------------------------------------- -*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SOURCE_PLUGINS_OBJECTFILE_ELF_OBJECTFILEELF_H
10#define LLDB_SOURCE_PLUGINS_OBJECTFILE_ELF_OBJECTFILEELF_H
11
12#include <cstdint>
13
14#include <optional>
15#include <vector>
16
20#include "lldb/Utility/UUID.h"
21#include "lldb/lldb-private.h"
22
23#include "ELFHeader.h"
24
25struct ELFNote {
29
30 std::string n_name;
31
32 ELFNote() = default;
33
34 /// Parse an ELFNote entry from the given DataExtractor starting at position
35 /// \p offset.
36 ///
37 /// \param[in] data
38 /// The DataExtractor to read from.
39 ///
40 /// \param[in,out] offset
41 /// Pointer to an offset in the data. On return the offset will be
42 /// advanced by the number of bytes read.
43 ///
44 /// \return
45 /// True if the ELFRel entry was successfully read and false otherwise.
46 bool Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset);
47
48 size_t GetByteSize() const {
49 return 12 + llvm::alignTo(n_namesz, 4) + llvm::alignTo(n_descsz, 4);
50 }
51};
52
53/// \class ObjectFileELF
54/// Generic ELF object file reader.
55///
56/// This class provides a generic ELF (32/64 bit) reader plugin implementing
57/// the ObjectFile protocol.
59public:
60 // Static Functions
61 static void Initialize();
62
63 static void Terminate();
64
65 static llvm::StringRef GetPluginNameStatic() { return "elf"; }
66
67 static llvm::StringRef GetPluginDescriptionStatic() {
68 return "ELF object file reader.";
69 }
70
72 CreateInstance(const lldb::ModuleSP &module_sp, lldb::DataBufferSP data_sp,
73 lldb::offset_t data_offset, const lldb_private::FileSpec *file,
74 lldb::offset_t file_offset, lldb::offset_t length);
75
77 const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp,
78 const lldb::ProcessSP &process_sp, lldb::addr_t header_addr);
79
80 static size_t GetModuleSpecifications(const lldb_private::FileSpec &file,
81 lldb::DataBufferSP &data_sp,
82 lldb::offset_t data_offset,
83 lldb::offset_t file_offset,
84 lldb::offset_t length,
86
87 static bool MagicBytesMatch(lldb::DataBufferSP &data_sp, lldb::addr_t offset,
88 lldb::addr_t length);
89
90 // PluginInterface protocol
91 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
92
93 // LLVM RTTI support
94 static char ID;
95 bool isA(const void *ClassID) const override {
96 return ClassID == &ID || ObjectFile::isA(ClassID);
97 }
98 static bool classof(const ObjectFile *obj) { return obj->isA(&ID); }
99
100 // ObjectFile Protocol.
101 bool ParseHeader() override;
102
104 bool value_is_offset) override;
105
106 lldb::ByteOrder GetByteOrder() const override;
107
108 bool IsExecutable() const override;
109
110 uint32_t GetAddressByteSize() const override;
111
113
114 void ParseSymtab(lldb_private::Symtab &symtab) override;
115
116 bool IsStripped() override;
117
118 void CreateSections(lldb_private::SectionList &unified_section_list) override;
119
120 void Dump(lldb_private::Stream *s) override;
121
123
124 lldb_private::UUID GetUUID() override;
125
126 /// Return the contents of the .gnu_debuglink section, if the object file
127 /// contains it.
128 std::optional<lldb_private::FileSpec> GetDebugLink();
129
130 uint32_t GetDependentModules(lldb_private::FileSpecList &files) override;
131
134
136
138
139 ObjectFile::Type CalculateType() override;
140
141 ObjectFile::Strata CalculateStrata() override;
142
144 lldb::offset_t section_offset, void *dst,
145 size_t dst_len) override;
146
148 lldb_private::DataExtractor &section_data) override;
149
150 llvm::ArrayRef<elf::ELFProgramHeader> ProgramHeaders();
152
153 llvm::StringRef
154 StripLinkerSymbolAnnotations(llvm::StringRef symbol_name) const override;
155
156 void RelocateSection(lldb_private::Section *section) override;
157
158protected:
159
160 std::vector<LoadableData>
161 GetLoadableData(lldb_private::Target &target) override;
162
164 MapFileDataWritable(const lldb_private::FileSpec &file, uint64_t Size,
165 uint64_t Offset);
166
167private:
168 ObjectFileELF(const lldb::ModuleSP &module_sp, lldb::DataBufferSP data_sp,
169 lldb::offset_t data_offset, const lldb_private::FileSpec *file,
170 lldb::offset_t offset, lldb::offset_t length);
171
172 ObjectFileELF(const lldb::ModuleSP &module_sp,
173 lldb::DataBufferSP header_data_sp,
174 const lldb::ProcessSP &process_sp, lldb::addr_t header_addr);
175
176 typedef std::vector<elf::ELFProgramHeader> ProgramHeaderColl;
177
180 };
181
182 typedef std::vector<ELFSectionHeaderInfo> SectionHeaderColl;
183 typedef SectionHeaderColl::iterator SectionHeaderCollIter;
184 typedef SectionHeaderColl::const_iterator SectionHeaderCollConstIter;
185
186 typedef std::vector<elf::ELFDynamic> DynamicSymbolColl;
187 typedef DynamicSymbolColl::iterator DynamicSymbolCollIter;
188 typedef DynamicSymbolColl::const_iterator DynamicSymbolCollConstIter;
189
190 /// An ordered map of file address to address class. Used on architectures
191 /// like Arm where there is an alternative ISA mode like Thumb. The container
192 /// is ordered so that it can be binary searched.
193 typedef std::map<lldb::addr_t, lldb_private::AddressClass>
195
196 /// Version of this reader common to all plugins based on this class.
197 static const uint32_t m_plugin_version = 1;
198 static const uint32_t g_core_uuid_magic;
199
200 /// ELF file header.
202
203 /// ELF build ID.
205
206 /// ELF .gnu_debuglink file and crc data if available.
209
210 /// Collection of program headers.
212
213 /// Collection of section headers.
215
216 /// Collection of symbols from the dynamic table.
218
219 /// Object file parsed from .gnu_debugdata section (\sa
220 /// GetGnuDebugDataObjectFile())
221 std::shared_ptr<ObjectFileELF> m_gnu_debug_data_object_file;
222
223 /// List of file specifications corresponding to the modules (shared
224 /// libraries) on which this object file depends.
225 mutable std::unique_ptr<lldb_private::FileSpecList> m_filespec_up;
226
227 /// Cached value of the entry point for this module.
229
230 /// The architecture detected from parsing elf file contents.
232
233 /// The address class for each symbol in the elf file
235
236 /// Returns the index of the given section header.
237 size_t SectionIndex(const SectionHeaderCollIter &I);
238
239 /// Returns the index of the given section header.
240 size_t SectionIndex(const SectionHeaderCollConstIter &I) const;
241
242 // Parses the ELF program headers.
243 static size_t GetProgramHeaderInfo(ProgramHeaderColl &program_headers,
244 lldb_private::DataExtractor &object_data,
245 const elf::ELFHeader &header);
246
247 // Finds PT_NOTE segments and calculates their crc sum.
248 static uint32_t
251
252 /// Parses all section headers present in this object file and populates
253 /// m_program_headers. This method will compute the header list only once.
254 /// Returns true iff the headers have been successfully parsed.
255 bool ParseProgramHeaders();
256
257 /// Parses all section headers present in this object file and populates
258 /// m_section_headers. This method will compute the header list only once.
259 /// Returns the number of headers parsed.
260 size_t ParseSectionHeaders();
261
263
265 uint64_t length,
266 lldb_private::ArchSpec &arch_spec);
267
268 /// Parses the elf section headers and returns the uuid, debug link name,
269 /// crc, archspec.
270 static size_t GetSectionHeaderInfo(SectionHeaderColl &section_headers,
271 lldb_private::DataExtractor &object_data,
272 const elf::ELFHeader &header,
273 lldb_private::UUID &uuid,
274 std::string &gnu_debuglink_file,
275 uint32_t &gnu_debuglink_crc,
276 lldb_private::ArchSpec &arch_spec);
277
278 /// Scans the dynamic section and locates all dependent modules (shared
279 /// libraries) populating m_filespec_up. This method will compute the
280 /// dependent module list only once. Returns the number of dependent
281 /// modules parsed.
282 size_t ParseDependentModules();
283
284 /// Parses the dynamic symbol table and populates m_dynamic_symbols. The
285 /// vector retains the order as found in the object file. Returns the
286 /// number of dynamic symbols parsed.
287 size_t ParseDynamicSymbols();
288
289 /// Populates the symbol table with all non-dynamic linker symbols. This
290 /// method will parse the symbols only once. Returns the number of symbols
291 /// parsed and a map of address types (used by targets like Arm that have
292 /// an alternative ISA mode like Thumb).
293 std::pair<unsigned, FileAddressToAddressClassMap>
295 lldb_private::Section *symtab);
296
297 /// Helper routine for ParseSymbolTable().
298 std::pair<unsigned, FileAddressToAddressClassMap>
299 ParseSymbols(lldb_private::Symtab *symbol_table, lldb::user_id_t start_id,
300 lldb_private::SectionList *section_list,
301 const size_t num_symbols,
302 const lldb_private::DataExtractor &symtab_data,
303 const lldb_private::DataExtractor &strtab_data);
304
305 /// Scans the relocation entries and adds a set of artificial symbols to the
306 /// given symbol table for each PLT slot. Returns the number of symbols
307 /// added.
308 unsigned ParseTrampolineSymbols(lldb_private::Symtab *symbol_table,
309 lldb::user_id_t start_id,
310 const ELFSectionHeaderInfo *rela_hdr,
311 lldb::user_id_t section_id);
312
313 void ParseUnwindSymbols(lldb_private::Symtab *symbol_table,
315
316 /// Relocates debug sections
317 unsigned RelocateDebugSections(const elf::ELFSectionHeader *rel_hdr,
318 lldb::user_id_t rel_id,
319 lldb_private::Symtab *thetab);
320
321 unsigned ApplyRelocations(lldb_private::Symtab *symtab,
322 const elf::ELFHeader *hdr,
323 const elf::ELFSectionHeader *rel_hdr,
324 const elf::ELFSectionHeader *symtab_hdr,
325 const elf::ELFSectionHeader *debug_hdr,
327 lldb_private::DataExtractor &symtab_data,
328 lldb_private::DataExtractor &debug_data,
329 lldb_private::Section *rel_section);
330
331 /// Loads the section name string table into m_shstr_data. Returns the
332 /// number of bytes constituting the table.
334
335 /// Utility method for looking up a section given its name. Returns the
336 /// index of the corresponding section or zero if no section with the given
337 /// name can be found (note that section indices are always 1 based, and so
338 /// section index 0 is never valid).
339 lldb::user_id_t GetSectionIndexByName(const char *name);
340
341 /// Returns the section header with the given id or NULL.
343
344 /// \name ELF header dump routines
345 //@{
346 static void DumpELFHeader(lldb_private::Stream *s,
347 const elf::ELFHeader &header);
348
350 unsigned char ei_data);
351
353 elf::elf_half e_type);
354 //@}
355
356 /// \name ELF program header dump routines
357 //@{
359
361 const elf::ELFProgramHeader &ph);
362
364 elf::elf_word p_type);
365
367 elf::elf_word p_flags);
368 //@}
369
370 /// \name ELF section header dump routines
371 //@{
373
375 const ELFSectionHeaderInfo &sh);
376
378 elf::elf_word sh_type);
379
381 elf::elf_xword sh_flags);
382 //@}
383
384 /// ELF dependent module dump routine.
386
387 const elf::ELFDynamic *FindDynamicSymbol(unsigned tag);
388
389 unsigned PLTRelocationType();
390
393 lldb_private::ArchSpec &arch_spec,
394 lldb_private::UUID &uuid);
395
397
398 /// Takes the .gnu_debugdata and returns the decompressed object file that is
399 /// stored within that section.
400 ///
401 /// \returns either the decompressed object file stored within the
402 /// .gnu_debugdata section or \c nullptr if an error occured or if there's no
403 /// section with that name.
404 std::shared_ptr<ObjectFileELF> GetGnuDebugDataObjectFile();
405};
406
407#endif // LLDB_SOURCE_PLUGINS_OBJECTFILE_ELF_OBJECTFILEELF_H
Generic structures and typedefs for ELF files.
Generic COFF object file reader.
Definition: ObjectFileELF.h:58
static size_t GetSectionHeaderInfo(SectionHeaderColl &section_headers, lldb_private::DataExtractor &object_data, const elf::ELFHeader &header, lldb_private::UUID &uuid, std::string &gnu_debuglink_file, uint32_t &gnu_debuglink_crc, lldb_private::ArchSpec &arch_spec)
Parses the elf section headers and returns the uuid, debug link name, crc, archspec.
std::vector< elf::ELFProgramHeader > ProgramHeaderColl
static void DumpELFHeader(lldb_private::Stream *s, const elf::ELFHeader &header)
unsigned ParseTrampolineSymbols(lldb_private::Symtab *symbol_table, lldb::user_id_t start_id, const ELFSectionHeaderInfo *rela_hdr, lldb::user_id_t section_id)
Scans the relocation entries and adds a set of artificial symbols to the given symbol table for each ...
lldb_private::ArchSpec m_arch_spec
The architecture detected from parsing elf file contents.
static void DumpELFSectionHeader_sh_type(lldb_private::Stream *s, elf::elf_word sh_type)
std::vector< elf::ELFDynamic > DynamicSymbolColl
std::shared_ptr< ObjectFileELF > m_gnu_debug_data_object_file
Object file parsed from .gnu_debugdata section (.
SectionHeaderColl::iterator SectionHeaderCollIter
uint32_t m_gnu_debuglink_crc
unsigned RelocateDebugSections(const elf::ELFSectionHeader *rel_hdr, lldb::user_id_t rel_id, lldb_private::Symtab *thetab)
Relocates debug sections.
bool isA(const void *ClassID) const override
Definition: ObjectFileELF.h:95
bool AnySegmentHasPhysicalAddress()
static bool classof(const ObjectFile *obj)
Definition: ObjectFileELF.h:98
static void Initialize()
static void DumpELFProgramHeader(lldb_private::Stream *s, const elf::ELFProgramHeader &ph)
lldb_private::Address m_entry_point_address
Cached value of the entry point for this module.
size_t ReadSectionData(lldb_private::Section *section, lldb::offset_t section_offset, void *dst, size_t dst_len) override
llvm::StringRef StripLinkerSymbolAnnotations(llvm::StringRef symbol_name) const override
static void ParseARMAttributes(lldb_private::DataExtractor &data, uint64_t length, lldb_private::ArchSpec &arch_spec)
lldb_private::DataExtractor GetSegmentData(const elf::ELFProgramHeader &H)
void RelocateSection(lldb_private::Section *section) override
Perform relocations on the section if necessary.
FileAddressToAddressClassMap m_address_class_map
The address class for each symbol in the elf file.
static llvm::StringRef GetPluginDescriptionStatic()
Definition: ObjectFileELF.h:67
static const uint32_t g_core_uuid_magic
static size_t GetModuleSpecifications(const lldb_private::FileSpec &file, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, lldb_private::ModuleSpecList &specs)
bool IsExecutable() const override
Tells whether this object file is capable of being the main executable for a process.
void DumpDependentModules(lldb_private::Stream *s)
ELF dependent module dump routine.
static void DumpELFHeader_e_type(lldb_private::Stream *s, elf::elf_half e_type)
static size_t GetProgramHeaderInfo(ProgramHeaderColl &program_headers, lldb_private::DataExtractor &object_data, const elf::ELFHeader &header)
static bool MagicBytesMatch(lldb::DataBufferSP &data_sp, lldb::addr_t offset, lldb::addr_t length)
DynamicSymbolColl m_dynamic_symbols
Collection of symbols from the dynamic table.
static void DumpELFSectionHeader(lldb_private::Stream *s, const ELFSectionHeaderInfo &sh)
std::vector< ELFSectionHeaderInfo > SectionHeaderColl
static void DumpELFHeader_e_ident_EI_DATA(lldb_private::Stream *s, unsigned char ei_data)
lldb_private::ArchSpec GetArchitecture() override
Get the ArchSpec for this object file.
std::optional< lldb_private::FileSpec > GetDebugLink()
Return the contents of the .gnu_debuglink section, if the object file contains it.
llvm::StringRef GetPluginName() override
Definition: ObjectFileELF.h:91
lldb_private::AddressClass GetAddressClass(lldb::addr_t file_addr) override
Get the address type given a file address in an object file.
static void DumpELFSectionHeader_sh_flags(lldb_private::Stream *s, elf::elf_xword sh_flags)
DynamicSymbolColl::const_iterator DynamicSymbolCollConstIter
lldb_private::UUID GetUUID() override
Gets the UUID for this object file.
static void DumpELFProgramHeader_p_type(lldb_private::Stream *s, elf::elf_word p_type)
static lldb_private::Status RefineModuleDetailsFromNote(lldb_private::DataExtractor &data, lldb_private::ArchSpec &arch_spec, lldb_private::UUID &uuid)
size_t SectionIndex(const SectionHeaderCollIter &I)
Returns the index of the given section header.
static void DumpELFProgramHeader_p_flags(lldb_private::Stream *s, elf::elf_word p_flags)
static llvm::StringRef GetPluginNameStatic()
Definition: ObjectFileELF.h:65
size_t ParseDependentModules()
Scans the dynamic section and locates all dependent modules (shared libraries) populating m_filespec_...
void DumpELFSectionHeaders(lldb_private::Stream *s)
std::shared_ptr< ObjectFileELF > GetGnuDebugDataObjectFile()
Takes the .gnu_debugdata and returns the decompressed object file that is stored within that section.
static const uint32_t m_plugin_version
Version of this reader common to all plugins based on this class.
static lldb::WritableDataBufferSP MapFileDataWritable(const lldb_private::FileSpec &file, uint64_t Size, uint64_t Offset)
void Dump(lldb_private::Stream *s) override
Dump a description of this object to a Stream.
static uint32_t CalculateELFNotesSegmentsCRC32(const ProgramHeaderColl &program_headers, lldb_private::DataExtractor &data)
lldb_private::UUID m_uuid
ELF build ID.
void DumpELFProgramHeaders(lldb_private::Stream *s)
std::pair< unsigned, FileAddressToAddressClassMap > ParseSymbolTable(lldb_private::Symtab *symbol_table, lldb::user_id_t start_id, lldb_private::Section *symtab)
Populates the symbol table with all non-dynamic linker symbols.
size_t ParseDynamicSymbols()
Parses the dynamic symbol table and populates m_dynamic_symbols.
static lldb_private::ObjectFile * CreateInstance(const lldb::ModuleSP &module_sp, lldb::DataBufferSP data_sp, lldb::offset_t data_offset, const lldb_private::FileSpec *file, lldb::offset_t file_offset, lldb::offset_t length)
ObjectFile::Type CalculateType() override
The object file should be able to calculate its type by looking at its file header and possibly the s...
lldb::SectionType GetSectionType(const ELFSectionHeaderInfo &H) const
bool SetLoadAddress(lldb_private::Target &target, lldb::addr_t value, bool value_is_offset) override
Sets the load address for an entire module, assuming a rigid slide of sections, if possible in the im...
std::unique_ptr< lldb_private::FileSpecList > m_filespec_up
List of file specifications corresponding to the modules (shared libraries) on which this object file...
bool ParseProgramHeaders()
Parses all section headers present in this object file and populates m_program_headers.
DynamicSymbolColl::iterator DynamicSymbolCollIter
size_t GetSectionHeaderStringTable()
Loads the section name string table into m_shstr_data.
std::vector< LoadableData > GetLoadableData(lldb_private::Target &target) override
Loads this objfile to memory.
const ELFSectionHeaderInfo * GetSectionHeaderByIndex(lldb::user_id_t id)
Returns the section header with the given id or NULL.
void CreateSections(lldb_private::SectionList &unified_section_list) override
lldb::user_id_t GetSectionIndexByName(const char *name)
Utility method for looking up a section given its name.
uint32_t GetAddressByteSize() const override
Gets the address size in bytes for the current object file.
SectionHeaderColl::const_iterator SectionHeaderCollConstIter
ProgramHeaderColl m_program_headers
Collection of program headers.
unsigned ApplyRelocations(lldb_private::Symtab *symtab, const elf::ELFHeader *hdr, const elf::ELFSectionHeader *rel_hdr, const elf::ELFSectionHeader *symtab_hdr, const elf::ELFSectionHeader *debug_hdr, lldb_private::DataExtractor &rel_data, lldb_private::DataExtractor &symtab_data, lldb_private::DataExtractor &debug_data, lldb_private::Section *rel_section)
lldb::ByteOrder GetByteOrder() const override
Gets whether endian swapping should occur when extracting data from this object file.
bool ParseHeader() override
Attempts to parse the object header.
static void Terminate()
elf::ELFHeader m_header
ELF file header.
std::string m_gnu_debuglink_file
ELF .gnu_debuglink file and crc data if available.
void ParseUnwindSymbols(lldb_private::Symtab *symbol_table, lldb_private::DWARFCallFrameInfo *eh_frame)
std::pair< unsigned, FileAddressToAddressClassMap > ParseSymbols(lldb_private::Symtab *symbol_table, lldb::user_id_t start_id, lldb_private::SectionList *section_list, const size_t num_symbols, const lldb_private::DataExtractor &symtab_data, const lldb_private::DataExtractor &strtab_data)
Helper routine for ParseSymbolTable().
SectionHeaderColl m_section_headers
Collection of section headers.
lldb_private::Address GetEntryPointAddress() override
Returns the address of the Entry Point in this object file - if the object file doesn't have an entry...
static char ID
Definition: ObjectFileELF.h:94
ObjectFile::Strata CalculateStrata() override
The object file should be able to calculate the strata of the object file.
void ParseSymtab(lldb_private::Symtab &symtab) override
Parse the symbol table into the provides symbol table object.
unsigned PLTRelocationType()
static lldb_private::ObjectFile * CreateMemoryInstance(const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr)
uint32_t GetDependentModules(lldb_private::FileSpecList &files) override
Extract the dependent modules from an object file.
size_t ParseSectionHeaders()
Parses all section headers present in this object file and populates m_section_headers.
lldb_private::Address GetBaseAddress() override
Returns base address of this object file.
bool IsStripped() override
Detect if this object file has been stripped of local symbols.
const elf::ELFDynamic * FindDynamicSymbol(unsigned tag)
std::map< lldb::addr_t, lldb_private::AddressClass > FileAddressToAddressClassMap
An ordered map of file address to address class.
llvm::ArrayRef< elf::ELFProgramHeader > ProgramHeaders()
lldb_private::Address GetImageInfoAddress(lldb_private::Target *target) override
Similar to Process::GetImageInfoAddress().
A section + offset based address class.
Definition: Address.h:62
An architecture specification class.
Definition: ArchSpec.h:31
A uniqued constant string class.
Definition: ConstString.h:40
An data extractor class.
Definition: DataExtractor.h:48
A file collection class.
Definition: FileSpecList.h:85
A file utility class.
Definition: FileSpec.h:56
A plug-in interface definition class for object file parsers.
Definition: ObjectFile.h:44
ObjectFile(const lldb::ModuleSP &module_sp, const FileSpec *file_spec_ptr, lldb::offset_t file_offset, lldb::offset_t length, lldb::DataBufferSP data_sp, lldb::offset_t data_offset)
Construct with a parent module, offset, and header data.
Definition: ObjectFile.cpp:241
An error handling class.
Definition: Status.h:44
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
uint32_t elf_word
Definition: ELFHeader.h:44
uint64_t elf_xword
Definition: ELFHeader.h:47
uint16_t elf_half
Definition: ELFHeader.h:43
uint64_t offset_t
Definition: lldb-types.h:83
std::shared_ptr< lldb_private::Process > ProcessSP
Definition: lldb-forward.h:381
ByteOrder
Byte ordering definitions.
uint64_t user_id_t
Definition: lldb-types.h:80
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
Definition: lldb-forward.h:328
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP
Definition: lldb-forward.h:329
uint64_t addr_t
Definition: lldb-types.h:79
std::shared_ptr< lldb_private::Module > ModuleSP
Definition: lldb-forward.h:365
bool Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset)
Parse an ELFNote entry from the given DataExtractor starting at position offset.
size_t GetByteSize() const
Definition: ObjectFileELF.h:48
elf::elf_word n_descsz
Definition: ObjectFileELF.h:27
ELFNote()=default
std::string n_name
Definition: ObjectFileELF.h:30
elf::elf_word n_namesz
Definition: ObjectFileELF.h:26
elf::elf_word n_type
Definition: ObjectFileELF.h:28
lldb_private::ConstString section_name
Represents an entry in an ELF dynamic table.
Definition: ELFHeader.h:276
Generic representation of an ELF file header.
Definition: ELFHeader.h:56
Generic representation of an ELF program header.
Definition: ELFHeader.h:192
Generic representation of an ELF section header.
Definition: ELFHeader.h:159