summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@arm.com>2010-08-23 11:18:40 -0500
committerAli Saidi <Ali.Saidi@arm.com>2010-08-23 11:18:40 -0500
commitef3a3dc28aad51ca15c5add0b094009170acc23b (patch)
tree5f4e325f2978876908a8bb9b72f5c0372b894b5a /src/base
parent230acc291c8147af20448e9865c800fce73b322c (diff)
downloadgem5-ef3a3dc28aad51ca15c5add0b094009170acc23b.tar.xz
Loader: Don't insert symbols into the symbol table that begin wiht '$'.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/loader/elf_object.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc
index 9d9109ab4..2db206a3c 100644
--- a/src/base/loader/elf_object.cc
+++ b/src/base/loader/elf_object.cc
@@ -375,8 +375,12 @@ ElfObject::loadSomeSymbols(SymbolTable *symtab, int binding, Addr mask)
for (ii = 0; ii < count; ++ii) {
gelf_getsym(data, ii, &sym);
if (GELF_ST_BIND(sym.st_info) == binding) {
- symtab->insert(sym.st_value & mask,
- elf_strptr(elf, shdr.sh_link, sym.st_name));
+ char *sym_name = elf_strptr(elf, shdr.sh_link, sym.st_name);
+ if (sym_name && sym_name[0] != '$') {
+ DPRINTF(Loader, "Symbol: %-40s value %#x\n",
+ sym_name, sym.st_value);
+ symtab->insert(sym.st_value & mask, sym_name);
+ }
}
}
}