20#ifndef KERNEL_LINKER_SYMBOLTABLE_H
21#define KERNEL_LINKER_SYMBOLTABLE_H
23#include "pedigree/kernel/compiler.h"
24#include "pedigree/kernel/process/Mutex.h"
25#include "pedigree/kernel/processor/types.h"
26#include "pedigree/kernel/utilities/HashTable.h"
27#include "pedigree/kernel/utilities/SharedPointer.h"
28#include "pedigree/kernel/utilities/String.h"
29#include "pedigree/kernel/utilities/StringView.h"
30#include "pedigree/kernel/utilities/Tree.h"
31#include "pedigree/kernel/utilities/utility.h"
78 void preallocate(
size_t numGlobal,
size_t numWeak,
Elf* localElf,
size_t numLocal);
87 void eraseByElf(
Elf* pParent);
114 Symbol() : m_pParent(0), m_Binding(Global), m_Value(0) {}
115 Symbol(
Elf* pP,
Binding b, uintptr_t v) : m_pParent(pP), m_Binding(b), m_Value(v) {}
117 Elf* getParent()
const {
123 uintptr_t getValue()
const {
149 Elf* m_pOriginatingElf;
151 mutable Mutex m_Lock;
153 bool m_bPreallocated;
void insert(const String &name, Binding binding, Elf *pParent, uintptr_t value)
void preallocate(size_t numGlobal, size_t numWeak, Elf *localElf, size_t numLocal)
void insertMultiple(SymbolTable *pOther, const String &name, Binding binding, Elf *pParent, uintptr_t value)
uintptr_t lookupOwned(const HashedStringView &name, Elf *owner)
void copyTable(Elf *pNewElf, const SymbolTable &newSymtab)
SharedPointer< Symbol > doInsert(const String &name, Binding binding, Elf *pParent, uintptr_t value)
SymbolTable & operator=(const SymbolTable &)
symbolTree_t * getOrInsertTree(Elf *, Binding table=Local)
SymbolTable(const SymbolTable &symtab)
void insertShared(const String &name, SharedPointer< Symbol > &symbol)
uintptr_t EXPORTED_PUBLIC lookup(const HashedStringView &name, Elf *pElf, Policy policy=LocalFirst, Binding *pBinding=0)
bool hasPreallocated() const
void preallocateAdditional(size_t numGlobal, size_t numWeak, Elf *localElf, size_t numLocal)