Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions ddprof-lib/src/main/cpp/symbols_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,14 +353,11 @@ void ElfParser::loadSymbolTable(const char *symbols, size_t total_size,
symbols += ent_size) {
ElfSymbol *sym = (ElfSymbol *)symbols;
if (sym->st_name != 0 && sym->st_value != 0) {
// sanity check the offsets not to exceed the file size
if (_length == 0 || (sym->st_name < _length && sym->st_value < _length)) {
// Skip special AArch64 mapping symbols: $x and $d
if (sym->st_size != 0 || sym->st_info != 0 ||
strings[sym->st_name] != '$') {
_cc->add(_base + sym->st_value, (int)sym->st_size,
strings + sym->st_name);
}
// Skip special AArch64 mapping symbols: $x and $d
if (sym->st_size != 0 || sym->st_info != 0 ||
strings[sym->st_name] != '$') {
_cc->add(_base + sym->st_value, (int)sym->st_size,
strings + sym->st_name);
}
}
}
Expand Down
Loading