diff options
author | Ali Saidi <Ali.Saidi@arm.com> | 2010-08-23 11:18:40 -0500 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@arm.com> | 2010-08-23 11:18:40 -0500 |
commit | ef3a3dc28aad51ca15c5add0b094009170acc23b (patch) | |
tree | 5f4e325f2978876908a8bb9b72f5c0372b894b5a /src/base/loader | |
parent | 230acc291c8147af20448e9865c800fce73b322c (diff) | |
download | gem5-ef3a3dc28aad51ca15c5add0b094009170acc23b.tar.xz |
Loader: Don't insert symbols into the symbol table that begin wiht '$'.
Diffstat (limited to 'src/base/loader')
-rw-r--r-- | src/base/loader/elf_object.cc | 8 |
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); + } } } } |