From: Ali Saidi Date: Mon, 23 Aug 2010 16:18:40 +0000 (-0500) Subject: Loader: Don't insert symbols into the symbol table that begin wiht '$'. X-Git-Tag: stable_2012_02_02~906 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ef3a3dc28aad51ca15c5add0b094009170acc23b;p=gem5.git Loader: Don't insert symbols into the symbol table that begin wiht '$'. --- 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); + } } } }