summaryrefslogtreecommitdiff
path: root/src/base/loader/elf_object.cc
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@arm.com>2010-08-23 11:18:39 -0500
committerAli Saidi <Ali.Saidi@arm.com>2010-08-23 11:18:39 -0500
commit4ab68fc999458617dbcfc91131404a1996e75482 (patch)
tree748f8c85b3a69d8efd5a75453a939d03e710ab84 /src/base/loader/elf_object.cc
parentf2642e205549efefb7391de32b189e94e5503ddc (diff)
downloadgem5-4ab68fc999458617dbcfc91131404a1996e75482.tar.xz
Loader: Use address mask provided to load*Symbols when loading the symbols from the symbol table.
Diffstat (limited to 'src/base/loader/elf_object.cc')
-rw-r--r--src/base/loader/elf_object.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc
index 6096cb2e3..9d9109ab4 100644
--- a/src/base/loader/elf_object.cc
+++ b/src/base/loader/elf_object.cc
@@ -335,7 +335,7 @@ ElfObject::ElfObject(const string &_filename, int _fd,
bool
-ElfObject::loadSomeSymbols(SymbolTable *symtab, int binding)
+ElfObject::loadSomeSymbols(SymbolTable *symtab, int binding, Addr mask)
{
Elf *elf;
int sec_idx = 1; // there is a 0 but it is nothing, go figure
@@ -375,7 +375,7 @@ ElfObject::loadSomeSymbols(SymbolTable *symtab, int binding)
for (ii = 0; ii < count; ++ii) {
gelf_getsym(data, ii, &sym);
if (GELF_ST_BIND(sym.st_info) == binding) {
- symtab->insert(sym.st_value,
+ symtab->insert(sym.st_value & mask,
elf_strptr(elf, shdr.sh_link, sym.st_name));
}
}
@@ -392,13 +392,13 @@ ElfObject::loadSomeSymbols(SymbolTable *symtab, int binding)
bool
ElfObject::loadGlobalSymbols(SymbolTable *symtab, Addr addrMask)
{
- return loadSomeSymbols(symtab, STB_GLOBAL);
+ return loadSomeSymbols(symtab, STB_GLOBAL, addrMask);
}
bool
ElfObject::loadLocalSymbols(SymbolTable *symtab, Addr addrMask)
{
- return loadSomeSymbols(symtab, STB_LOCAL);
+ return loadSomeSymbols(symtab, STB_LOCAL, addrMask);
}
bool