2 * Copyright 2016, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
5 #ifndef ELF_SYMBOL_LOOKUP_H
6 #define ELF_SYMBOL_LOOKUP_H
9 #include <Referenceable.h>
12 #include "SymbolInfo.h"
15 class ElfSymbolLookupSource
: public BReferenceable
{
17 virtual ssize_t
Read(uint64 address
, void* buffer
,
22 class ElfSymbolLookup
{
24 static const uint32 kGetSymbolCountFromHash
= ~(uint32
)0;
27 virtual ~ElfSymbolLookup();
29 static status_t
Create(ElfSymbolLookupSource
* source
,
30 uint64 symbolTable
, uint64 symbolHash
,
31 uint64 stringTable
, uint32 symbolCount
,
32 uint32 symbolTableEntrySize
,
33 uint64 textDelta
, bool is64Bit
,
34 bool swappedByteOrder
, bool cacheSource
,
35 ElfSymbolLookup
*& _lookup
);
37 virtual status_t
Init(bool cacheSource
) = 0;
38 virtual status_t
NextSymbolInfo(uint32
& index
,
39 SymbolInfo
& _info
) = 0;
40 virtual status_t
GetSymbolInfo(const char* name
,
41 uint32 symbolType
, SymbolInfo
& _info
) = 0;
45 #endif // ELF_SYMBOL_LOOKUP_H