MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / loadSymbolTable

Method loadSymbolTable

src/symbols_linux.cpp:632–643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

630}
631
632void ElfParser::loadSymbolTable(const char* symbols, size_t total_size, size_t ent_size, const char* strings) {
633 const char* base = this->base();
634 for (const char* symbols_end = symbols + total_size; symbols < symbols_end; symbols += ent_size) {
635 ElfSymbol* sym = (ElfSymbol*)symbols;
636 if (sym->st_name != 0 && sym->st_value != 0) {
637 // Skip special AArch64 mapping symbols: $x and $d
638 if (sym->st_size != 0 || sym->st_info != 0 || strings[sym->st_name] != '$') {
639 _cc->add(base + sym->st_value, (int)sym->st_size, strings + sym->st_name);
640 }
641 }
642 }
643}
644
645void ElfParser::addRelocationSymbols(ElfSection* reltab, const char* plt) {
646 ElfSection* symtab = section(reltab->sh_link);

Callers

nothing calls this directly

Calls 2

baseMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected